"use strict";
/*
 * ATTENTION: An "eval-source-map" devtool has been used.
 * This devtool is neither made for production nor for readable output files.
 * It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools.
 * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
 * or disable the default devtool with "devtool: false".
 * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
 */
(self["webpackChunknocode_platform"] = self["webpackChunknocode_platform"] || []).push([[3384],{

/***/ "./src/web/component/apps/Statistic/StatisticCard.less":
/*!*************************************************************!*\
  !*** ./src/web/component/apps/Statistic/StatisticCard.less ***!
  \*************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\"statCard\":\"ImFi+SK4_statCard\"});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViL2NvbXBvbmVudC9hcHBzL1N0YXRpc3RpYy9TdGF0aXN0aWNDYXJkLmxlc3MiLCJtYXBwaW5ncyI6IjtBQUFBO0FBQ0EiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9ub2NvZGUtcGxhdGZvcm0vLi9zcmMvd2ViL2NvbXBvbmVudC9hcHBzL1N0YXRpc3RpYy9TdGF0aXN0aWNDYXJkLmxlc3M/NTFjYiJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBleHRyYWN0ZWQgYnkgbWluaS1jc3MtZXh0cmFjdC1wbHVnaW5cbmV4cG9ydCBkZWZhdWx0IHtcInN0YXRDYXJkXCI6XCJJbUZpK1NLNF9zdGF0Q2FyZFwifTsiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/web/component/apps/Statistic/StatisticCard.less\n");

/***/ }),

/***/ "./src/web/component/apps/Statistic/StatisticSetting.less":
/*!****************************************************************!*\
  !*** ./src/web/component/apps/Statistic/StatisticSetting.less ***!
  \****************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\"statistics-setting-modal\":\"Zqnm+uFS_statistics-setting-modal\",\"statistics-setting-modal-form-item-checkbox\":\"XEWz+Ixc_statistics-setting-modal-form-item-checkbox\",\"statistics-setting-modal-footer\":\"pkgnqvI4_statistics-setting-modal-footer\",\"statistics-setting-modal-body\":\"SLVI63xV_statistics-setting-modal-body\",\"form-item-row\":\"v6VzcB10_form-item-row\",\"form-item-row-50\":\"O1KTVDth_form-item-row-50\",\"form-item-vertical\":\"Yhbgz058_form-item-vertical\",\"form-title\":\"_011rxes1_form-title\",\"filter\":\"_0vojJeKi_filter\",\"is-active\":\"Hr4i7Apt_is-active\",\"filter-label-bar\":\"_2S-gIQ-6_filter-label-bar\",\"sync-filter-setting\":\"_3L66tnD7_sync-filter-setting\"});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViL2NvbXBvbmVudC9hcHBzL1N0YXRpc3RpYy9TdGF0aXN0aWNTZXR0aW5nLmxlc3MiLCJtYXBwaW5ncyI6IjtBQUFBO0FBQ0EiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9ub2NvZGUtcGxhdGZvcm0vLi9zcmMvd2ViL2NvbXBvbmVudC9hcHBzL1N0YXRpc3RpYy9TdGF0aXN0aWNTZXR0aW5nLmxlc3M/M2IxZSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBleHRyYWN0ZWQgYnkgbWluaS1jc3MtZXh0cmFjdC1wbHVnaW5cbmV4cG9ydCBkZWZhdWx0IHtcInN0YXRpc3RpY3Mtc2V0dGluZy1tb2RhbFwiOlwiWnFubSt1RlNfc3RhdGlzdGljcy1zZXR0aW5nLW1vZGFsXCIsXCJzdGF0aXN0aWNzLXNldHRpbmctbW9kYWwtZm9ybS1pdGVtLWNoZWNrYm94XCI6XCJYRVd6K0l4Y19zdGF0aXN0aWNzLXNldHRpbmctbW9kYWwtZm9ybS1pdGVtLWNoZWNrYm94XCIsXCJzdGF0aXN0aWNzLXNldHRpbmctbW9kYWwtZm9vdGVyXCI6XCJwa2ducXZJNF9zdGF0aXN0aWNzLXNldHRpbmctbW9kYWwtZm9vdGVyXCIsXCJzdGF0aXN0aWNzLXNldHRpbmctbW9kYWwtYm9keVwiOlwiU0xWSTYzeFZfc3RhdGlzdGljcy1zZXR0aW5nLW1vZGFsLWJvZHlcIixcImZvcm0taXRlbS1yb3dcIjpcInY2VnpjQjEwX2Zvcm0taXRlbS1yb3dcIixcImZvcm0taXRlbS1yb3ctNTBcIjpcIk8xS1RWRHRoX2Zvcm0taXRlbS1yb3ctNTBcIixcImZvcm0taXRlbS12ZXJ0aWNhbFwiOlwiWWhiZ3owNThfZm9ybS1pdGVtLXZlcnRpY2FsXCIsXCJmb3JtLXRpdGxlXCI6XCJfMDExcnhlczFfZm9ybS10aXRsZVwiLFwiZmlsdGVyXCI6XCJfMHZvakplS2lfZmlsdGVyXCIsXCJpcy1hY3RpdmVcIjpcIkhyNGk3QXB0X2lzLWFjdGl2ZVwiLFwiZmlsdGVyLWxhYmVsLWJhclwiOlwiXzJTLWdJUS02X2ZpbHRlci1sYWJlbC1iYXJcIixcInN5bmMtZmlsdGVyLXNldHRpbmdcIjpcIl8zTDY2dG5EN19zeW5jLWZpbHRlci1zZXR0aW5nXCJ9OyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/web/component/apps/Statistic/StatisticSetting.less\n");

/***/ }),

/***/ "./src/web/component/apps/Statistic/index.less":
/*!*****************************************************!*\
  !*** ./src/web/component/apps/Statistic/index.less ***!
  \*****************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\"drawer\":\"ge4-TjAI_drawer\",\"title\":\"ByDmoXK4_title\",\"title-desc\":\"mJUSmbno_title-desc\",\"add\":\"UduWhfDy_add\",\"icon\":\"s77pvofM_icon\",\"card_empty\":\"UcdA4c8o_card_empty\",\"empty_content\":\"rjPmWQiu_empty_content\",\"empty_text\":\"BuobLxbD_empty_text\"});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViL2NvbXBvbmVudC9hcHBzL1N0YXRpc3RpYy9pbmRleC5sZXNzIiwibWFwcGluZ3MiOiI7QUFBQTtBQUNBIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vbm9jb2RlLXBsYXRmb3JtLy4vc3JjL3dlYi9jb21wb25lbnQvYXBwcy9TdGF0aXN0aWMvaW5kZXgubGVzcz84NjY0Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIGV4dHJhY3RlZCBieSBtaW5pLWNzcy1leHRyYWN0LXBsdWdpblxuZXhwb3J0IGRlZmF1bHQge1wiZHJhd2VyXCI6XCJnZTQtVGpBSV9kcmF3ZXJcIixcInRpdGxlXCI6XCJCeURtb1hLNF90aXRsZVwiLFwidGl0bGUtZGVzY1wiOlwibUpVU21ibm9fdGl0bGUtZGVzY1wiLFwiYWRkXCI6XCJVZHVXaGZEeV9hZGRcIixcImljb25cIjpcInM3N3B2b2ZNX2ljb25cIixcImNhcmRfZW1wdHlcIjpcIlVjZEE0YzhvX2NhcmRfZW1wdHlcIixcImVtcHR5X2NvbnRlbnRcIjpcInJqUG1XUWl1X2VtcHR5X2NvbnRlbnRcIixcImVtcHR5X3RleHRcIjpcIkJ1b2JMeGJEX2VtcHR5X3RleHRcIn07Il0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/web/component/apps/Statistic/index.less\n");

/***/ }),

/***/ "./src/web/component/custom/index.less":
/*!*********************************************!*\
  !*** ./src/web/component/custom/index.less ***!
  \*********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\"custom\":\"_73PhxGtV_custom\",\"custom_main\":\"X58ucWuM_custom_main\",\"addcardmark\":\"+jDUwFlb_addcardmark\"});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViL2NvbXBvbmVudC9jdXN0b20vaW5kZXgubGVzcyIsIm1hcHBpbmdzIjoiO0FBQUE7QUFDQSIsInNvdXJjZXMiOlsid2VicGFjazovL25vY29kZS1wbGF0Zm9ybS8uL3NyYy93ZWIvY29tcG9uZW50L2N1c3RvbS9pbmRleC5sZXNzPzBkZTgiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gZXh0cmFjdGVkIGJ5IG1pbmktY3NzLWV4dHJhY3QtcGx1Z2luXG5leHBvcnQgZGVmYXVsdCB7XCJjdXN0b21cIjpcIl83M1BoeEd0Vl9jdXN0b21cIixcImN1c3RvbV9tYWluXCI6XCJYNTh1Y1d1TV9jdXN0b21fbWFpblwiLFwiYWRkY2FyZG1hcmtcIjpcIitqRFV3RmxiX2FkZGNhcmRtYXJrXCJ9OyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/web/component/custom/index.less\n");

/***/ }),

/***/ "./src/hooks/useClickOutSide.tsx":
/*!***************************************!*\
  !*** ./src/hooks/useClickOutSide.tsx ***!
  \***************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {

eval("\n\nvar _sliceInstanceProperty = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/slice */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/slice.js\");\nvar _Array$from = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/array/from */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/array/from.js\");\nvar _Symbol = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/symbol */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/symbol.js\");\nvar _getIteratorMethod = __webpack_require__(/*! @babel/runtime-corejs3/core-js/get-iterator-method */ \"../../node_modules/@babel/runtime-corejs3/core-js/get-iterator-method.js\");\nvar _Object$defineProperty = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/define-property */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/define-property.js\");\n_Object$defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports[\"default\"] = useOnClickOutside;\nvar _react = __webpack_require__(/*! kd_libs/react */ \"webpack/container/remote/kd_libs/react\");\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof _Symbol !== \"undefined\" && _getIteratorMethod(o) || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function (_e) { function e(_x) { return _e.apply(this, arguments); } e.toString = function () { return _e.toString(); }; return e; }(function (e) { throw e; }), 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 normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function (_e2) { function e(_x2) { return _e2.apply(this, arguments); } e.toString = function () { return _e2.toString(); }; return e; }(function (e) { didErr = true; err = e; }), f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\nfunction _unsupportedIterableToArray(o, minLen) { var _context; if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = _sliceInstanceProperty(_context = Object.prototype.toString.call(o)).call(_context, 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); }\nfunction _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; } /*\n * @Description:\n * @Author: jianhang_he\n * @Date: 2022-11-11 15:22:21\n * @LastEditTime: 2022-11-11 15:22:24\n * @Last Modified by: jianhang_he\n */\nfunction useOnClickOutside(refs, handler) {\n  var isBubble = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n  (0, _react.useEffect)(function () {\n    var listener = function listener(event) {\n      var _iterator = _createForOfIteratorHelper(refs),\n        _step;\n      try {\n        for (_iterator.s(); !(_step = _iterator.n()).done;) {\n          var _ref$current;\n          var ref = _step.value;\n          if (ref !== null && ref !== void 0 && (_ref$current = ref.current) !== null && _ref$current !== void 0 && _ref$current.contains(event.target)) {\n            return;\n          }\n        }\n      } catch (err) {\n        _iterator.e(err);\n      } finally {\n        _iterator.f();\n      }\n      handler(event);\n    };\n    document.addEventListener('mousedown', listener, isBubble);\n    document.addEventListener('touchstart', listener);\n    return function () {\n      document.removeEventListener('mousedown', listener, isBubble);\n      document.removeEventListener('touchstart', listener);\n    };\n  }, [refs, handler]);\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvaG9va3MvdXNlQ2xpY2tPdXRTaWRlLnRzeCIsIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztBQU9BO0FBQUE7QUFBQTtBQUFBO0FBTkE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBR0E7QUFBQTtBQUNBO0FBQ0E7QUFBQTtBQUNBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFDQTtBQUNBO0FBRUE7QUFDQTtBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZXMiOlsid2VicGFjazovL25vY29kZS1wbGF0Zm9ybS8uL3NyYy9ob29rcy91c2VDbGlja091dFNpZGUudHN4Pzg0MDMiXSwic291cmNlc0NvbnRlbnQiOlsiLypcbiAqIEBEZXNjcmlwdGlvbjpcbiAqIEBBdXRob3I6IGppYW5oYW5nX2hlXG4gKiBARGF0ZTogMjAyMi0xMS0xMSAxNToyMjoyMVxuICogQExhc3RFZGl0VGltZTogMjAyMi0xMS0xMSAxNToyMjoyNFxuICogQExhc3QgTW9kaWZpZWQgYnk6IGppYW5oYW5nX2hlXG4gKi9cbmltcG9ydCB7IFJlZk9iamVjdCwgdXNlRWZmZWN0IH0gZnJvbSAncmVhY3QnXG5cbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uIHVzZU9uQ2xpY2tPdXRzaWRlKHJlZnM6IFJlZk9iamVjdDxIVE1MRWxlbWVudD5bXSwgaGFuZGxlcjogKGU6IEV2ZW50KSA9PiB2b2lkLCBpc0J1YmJsZSA9IHRydWUpIHtcbiAgdXNlRWZmZWN0KCgpID0+IHtcbiAgICBjb25zdCBsaXN0ZW5lciA9IChldmVudDogRXZlbnQpID0+IHtcbiAgICAgIGZvciAoY29uc3QgcmVmIG9mIHJlZnMpIHtcbiAgICAgICAgaWYgKHJlZj8uY3VycmVudD8uY29udGFpbnMoZXZlbnQudGFyZ2V0IGFzIEVsZW1lbnQpKSB7XG4gICAgICAgICAgcmV0dXJuXG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGhhbmRsZXIoZXZlbnQpXG4gICAgfVxuXG4gICAgZG9jdW1lbnQuYWRkRXZlbnRMaXN0ZW5lcignbW91c2Vkb3duJywgbGlzdGVuZXIsIGlzQnViYmxlKVxuICAgIGRvY3VtZW50LmFkZEV2ZW50TGlzdGVuZXIoJ3RvdWNoc3RhcnQnLCBsaXN0ZW5lcilcblxuICAgIHJldHVybiAoKSA9PiB7XG4gICAgICBkb2N1bWVudC5yZW1vdmVFdmVudExpc3RlbmVyKCdtb3VzZWRvd24nLCBsaXN0ZW5lciwgaXNCdWJibGUpXG4gICAgICBkb2N1bWVudC5yZW1vdmVFdmVudExpc3RlbmVyKCd0b3VjaHN0YXJ0JywgbGlzdGVuZXIpXG4gICAgfVxuICB9LCBbcmVmcywgaGFuZGxlcl0pXG59XG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/hooks/useClickOutSide.tsx\n");

/***/ }),

/***/ "./src/hooks/useLoadData.js":
/*!**********************************!*\
  !*** ./src/hooks/useLoadData.js ***!
  \**********************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {

eval("\n\nvar _Object$defineProperty = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/define-property */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/define-property.js\");\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime-corejs3/helpers/interopRequireDefault */ \"../../node_modules/@babel/runtime-corejs3/helpers/interopRequireDefault.js\");\n_Object$defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports[\"default\"] = void 0;\nvar _setTimeout2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/set-timeout */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/set-timeout.js\"));\nvar _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/helpers/slicedToArray */ \"../../node_modules/@babel/runtime-corejs3/helpers/slicedToArray.js\"));\nvar _react = __webpack_require__(/*! kd_libs/react */ \"webpack/container/remote/kd_libs/react\");\nvar useLoadData = function useLoadData(promise, showLoadingDelay) {\n  var _useState = (0, _react.useState)(false),\n    _useState2 = (0, _slicedToArray2.default)(_useState, 2),\n    loading = _useState2[0],\n    setLoading = _useState2[1];\n  var _useState3 = (0, _react.useState)(false),\n    _useState4 = (0, _slicedToArray2.default)(_useState3, 2),\n    init = _useState4[0],\n    setInit = _useState4[1];\n  // const [data, setData] = useState()\n  var timer = (0, _react.useRef)();\n  (0, _react.useEffect)(function () {\n    var _promise;\n    timer.current = (0, _setTimeout2.default)(function () {\n      setLoading(true);\n    }, [showLoadingDelay]);\n    (_promise = promise()) === null || _promise === void 0 || _promise.then(function (res) {\n      clearTimeout(timer.current);\n      setInit(true);\n      setLoading(false);\n    });\n  }, []);\n  return [loading, init];\n};\nvar _default = exports[\"default\"] = useLoadData;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvaG9va3MvdXNlTG9hZERhdGEuanMiLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7OztBQUFBO0FBQ0E7QUFDQTtBQUFBO0FBQUE7QUFBQTtBQUNBO0FBQUE7QUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQUEiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9ub2NvZGUtcGxhdGZvcm0vLi9zcmMvaG9va3MvdXNlTG9hZERhdGEuanM/OGQxOCJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyB1c2VTdGF0ZSwgdXNlRWZmZWN0LCB1c2VSZWYgfSBmcm9tICdyZWFjdCdcbmNvbnN0IHVzZUxvYWREYXRhID0gKHByb21pc2UsIHNob3dMb2FkaW5nRGVsYXkpID0+IHtcbiAgY29uc3QgW2xvYWRpbmcsIHNldExvYWRpbmddID0gdXNlU3RhdGUoZmFsc2UpXG4gIGNvbnN0IFtpbml0LCBzZXRJbml0XSA9IHVzZVN0YXRlKGZhbHNlKVxuICAvLyBjb25zdCBbZGF0YSwgc2V0RGF0YV0gPSB1c2VTdGF0ZSgpXG4gIGNvbnN0IHRpbWVyID0gdXNlUmVmKClcbiAgdXNlRWZmZWN0KCgpID0+IHtcbiAgICB0aW1lci5jdXJyZW50ID0gc2V0VGltZW91dCgoKSA9PiB7XG4gICAgICBzZXRMb2FkaW5nKHRydWUpXG4gICAgfSwgW3Nob3dMb2FkaW5nRGVsYXldKVxuICAgIHByb21pc2UoKT8udGhlbigocmVzKSA9PiB7XG4gICAgICBjbGVhclRpbWVvdXQodGltZXIuY3VycmVudClcbiAgICAgIHNldEluaXQodHJ1ZSlcbiAgICAgIHNldExvYWRpbmcoZmFsc2UpXG4gICAgfSlcbiAgfSwgW10pXG4gIHJldHVybiBbbG9hZGluZywgaW5pdF1cbn1cbmV4cG9ydCBkZWZhdWx0IHVzZUxvYWREYXRhXG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/hooks/useLoadData.js\n");

/***/ }),

/***/ "./src/web/component/apps/Statistic/StatisticCard.tsx":
/*!************************************************************!*\
  !*** ./src/web/component/apps/Statistic/StatisticCard.tsx ***!
  \************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {

eval("\n\nvar _typeof = __webpack_require__(/*! @babel/runtime-corejs3/helpers/typeof */ \"../../node_modules/@babel/runtime-corejs3/helpers/typeof.js\");\nvar _WeakMap = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/weak-map */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/weak-map.js\");\nvar _Object$defineProperty = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/define-property */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/define-property.js\");\nvar _Object$getOwnPropertyDescriptor = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor.js\");\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime-corejs3/helpers/interopRequireDefault */ \"../../node_modules/@babel/runtime-corejs3/helpers/interopRequireDefault.js\");\n_Object$defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports[\"default\"] = void 0;\nvar _concat = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/concat */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/concat.js\"));\nvar _utils = __webpack_require__(/*! @/utils */ \"./src/utils/index.tsx\");\nvar _react = _interopRequireWildcard(__webpack_require__(/*! kd_libs/react */ \"webpack/container/remote/kd_libs/react\"));\nvar _StatisticCard = _interopRequireDefault(__webpack_require__(/*! ./StatisticCard.less */ \"./src/web/component/apps/Statistic/StatisticCard.less\"));\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof _WeakMap) return null; var r = new _WeakMap(), t = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != _typeof(e) && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? _Object$getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? _Object$defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }\n/**\r\n * 统计卡片iframe\r\n * iframe拼接：urlPrefix + '/qing/qingNoCodeCardEntrance.do?cardId=xxx'\r\n */\n\nvar StatisticCard = function StatisticCard(_ref) {\n  var _context, _context2;\n  var cardId = _ref.cardId,\n    title = _ref.title,\n    onClick = _ref.onClick;\n  var iframeRef = (0, _react.useRef)(null);\n  var frameUrl = (0, _concat.default)(_context = (0, _concat.default)(_context2 = \"\".concat(window.__domainurl__, \"qing/qingNoCodeCardEntrance.do?cardId=\")).call(_context2, cardId, \"&cardName=\")).call(_context, encodeURIComponent(title));\n  var loadThemeVars = function loadThemeVars() {\n    // 将无代码的主题变量注入到iframe的document里\n    var cssVars = document.documentElement.getAttribute('style');\n    if (cssVars) {\n      var _iframeRef$current;\n      (_iframeRef$current = iframeRef.current) === null || _iframeRef$current === void 0 || _iframeRef$current.contentWindow.document.documentElement.setAttribute('style', cssVars);\n    }\n  };\n  return /*#__PURE__*/_react.default.createElement(\"div\", {\n    className: _StatisticCard.default.statCard,\n    onClick: onClick\n  }, /*#__PURE__*/_react.default.createElement(\"iframe\", {\n    id: \"stat_iframe_card_\".concat(cardId),\n    ref: iframeRef,\n    src: (0, _utils.getUrlWithDataCenter)(frameUrl),\n    frameBorder: \"0\",\n    width: \"100%\",\n    height: \"100%\",\n    onLoad: loadThemeVars\n  }));\n};\nvar _default = exports[\"default\"] = StatisticCard;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViL2NvbXBvbmVudC9hcHBzL1N0YXRpc3RpYy9TdGF0aXN0aWNDYXJkLnRzeCIsIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7QUFJQTtBQUNBO0FBQ0E7QUFBQTtBQUFBO0FBTkE7QUFDQTtBQUNBO0FBQ0E7O0FBV0E7QUFJQTtBQUFBO0FBRkE7QUFDQTtBQUVBO0FBQ0E7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUFBO0FBQUE7QUFDQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBR0E7QUFBQSIsInNvdXJjZXMiOlsid2VicGFjazovL25vY29kZS1wbGF0Zm9ybS8uL3NyYy93ZWIvY29tcG9uZW50L2FwcHMvU3RhdGlzdGljL1N0YXRpc3RpY0NhcmQudHN4P2E1MWIiXSwic291cmNlc0NvbnRlbnQiOlsiLyoqXHJcbiAqIOe7n+iuoeWNoeeJh2lmcmFtZVxyXG4gKiBpZnJhbWXmi7zmjqXvvJp1cmxQcmVmaXggKyAnL3FpbmcvcWluZ05vQ29kZUNhcmRFbnRyYW5jZS5kbz9jYXJkSWQ9eHh4J1xyXG4gKi9cclxuaW1wb3J0IHsgZ2V0VXJsV2l0aERhdGFDZW50ZXIgfSBmcm9tICdAL3V0aWxzJ1xyXG5pbXBvcnQgUmVhY3QsIHsgdXNlUmVmIH0gZnJvbSAncmVhY3QnXHJcbmltcG9ydCBzdHlsZXMgZnJvbSAnLi9TdGF0aXN0aWNDYXJkLmxlc3MnXHJcblxyXG5pbnRlcmZhY2UgU3RhdGlzdGljQ2FyZFByb3BzIHtcclxuICBjYXJkSWQ6IHN0cmluZztcclxuICB0aXRsZTogc3RyaW5nO1xyXG4gIFtwcm9wTmFtZTogc3RyaW5nXTogYW55XHJcbn1cclxuXHJcbmNvbnN0IFN0YXRpc3RpY0NhcmQ6IFJlYWN0LkZDPFN0YXRpc3RpY0NhcmRQcm9wcz4gPSAoe1xyXG4gIGNhcmRJZCxcclxuICB0aXRsZSxcclxuICBvbkNsaWNrXHJcbn0pID0+IHtcclxuICBjb25zdCBpZnJhbWVSZWYgPSB1c2VSZWY8YW55PihudWxsKVxyXG4gIGNvbnN0IGZyYW1lVXJsID0gYCR7d2luZG93Ll9fZG9tYWludXJsX199cWluZy9xaW5nTm9Db2RlQ2FyZEVudHJhbmNlLmRvP2NhcmRJZD0ke2NhcmRJZH0mY2FyZE5hbWU9JHtlbmNvZGVVUklDb21wb25lbnQodGl0bGUpfWBcclxuXHJcbiAgY29uc3QgbG9hZFRoZW1lVmFycyA9ICgpID0+IHtcclxuICAgIC8vIOWwhuaXoOS7o+eggeeahOS4u+mimOWPmOmHj+azqOWFpeWIsGlmcmFtZeeahGRvY3VtZW506YeMXHJcbiAgICBjb25zdCBjc3NWYXJzID0gZG9jdW1lbnQuZG9jdW1lbnRFbGVtZW50LmdldEF0dHJpYnV0ZSgnc3R5bGUnKVxyXG4gICAgaWYgKGNzc1ZhcnMpIHtcclxuICAgICAgaWZyYW1lUmVmLmN1cnJlbnQ/LmNvbnRlbnRXaW5kb3cuZG9jdW1lbnQuZG9jdW1lbnRFbGVtZW50LnNldEF0dHJpYnV0ZSgnc3R5bGUnLCBjc3NWYXJzKVxyXG4gICAgfVxyXG4gIH1cclxuICByZXR1cm4gKFxyXG4gICAgPGRpdiBjbGFzc05hbWU9e3N0eWxlcy5zdGF0Q2FyZH0gb25DbGljaz17b25DbGlja30+XHJcbiAgICAgIDxpZnJhbWUgaWQ9e2BzdGF0X2lmcmFtZV9jYXJkXyR7Y2FyZElkfWB9IHJlZj17aWZyYW1lUmVmfSBzcmM9e2dldFVybFdpdGhEYXRhQ2VudGVyKGZyYW1lVXJsKX0gZnJhbWVCb3JkZXI9JzAnIHdpZHRoPScxMDAlJyBoZWlnaHQ9JzEwMCUnIG9uTG9hZD17bG9hZFRoZW1lVmFyc30gLz5cclxuICAgIDwvZGl2PlxyXG4gIClcclxufVxyXG5cclxuZXhwb3J0IGRlZmF1bHQgU3RhdGlzdGljQ2FyZFxyXG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/web/component/apps/Statistic/StatisticCard.tsx\n");

/***/ }),

/***/ "./src/web/component/apps/Statistic/StatisticSetting.tsx":
/*!***************************************************************!*\
  !*** ./src/web/component/apps/Statistic/StatisticSetting.tsx ***!
  \***************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {

eval("\n\nvar _typeof = __webpack_require__(/*! @babel/runtime-corejs3/helpers/typeof */ \"../../node_modules/@babel/runtime-corejs3/helpers/typeof.js\");\nvar _Object$keys = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/keys */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/keys.js\");\nvar _Object$getOwnPropertySymbols = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols.js\");\nvar _filterInstanceProperty2 = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/filter */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/filter.js\");\nvar _Object$getOwnPropertyDescriptor = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor.js\");\nvar _Object$getOwnPropertyDescriptors = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors.js\");\nvar _Object$defineProperties = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/define-properties */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/define-properties.js\");\nvar _Object$defineProperty = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/define-property */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/define-property.js\");\nvar _WeakMap = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/weak-map */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/weak-map.js\");\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime-corejs3/helpers/interopRequireDefault */ \"../../node_modules/@babel/runtime-corejs3/helpers/interopRequireDefault.js\");\n_Object$defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports[\"default\"] = void 0;\nvar _filter = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/filter */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/filter.js\"));\nvar _promise = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/promise */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/promise.js\"));\nvar _values = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/values */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/values.js\"));\nvar _setTimeout2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/set-timeout */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/set-timeout.js\"));\nvar _values2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/values */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/values.js\"));\nvar _map = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/map */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/map.js\"));\nvar _find = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/find */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/find.js\"));\nvar _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/helpers/defineProperty */ \"../../node_modules/@babel/runtime-corejs3/helpers/defineProperty.js\"));\nvar _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/helpers/slicedToArray */ \"../../node_modules/@babel/runtime-corejs3/helpers/slicedToArray.js\"));\nvar _react = _interopRequireWildcard(__webpack_require__(/*! kd_libs/react */ \"webpack/container/remote/kd_libs/react\"));\nvar _kdesign = __webpack_require__(/*! kd_libs/kdesign1 */ \"webpack/container/remote/kd_libs/kdesign1\");\nvar _ChartsTypeSelect = _interopRequireDefault(__webpack_require__(/*! ./ChartsTypeSelect */ \"./src/web/component/apps/Statistic/ChartsTypeSelect.tsx\"));\nvar _listSettingUtil = __webpack_require__(/*! @/utils/listSettingUtil */ \"./src/utils/listSettingUtil.js\");\nvar _DimensionSelect = _interopRequireDefault(__webpack_require__(/*! ./DimensionSelect */ \"./src/web/component/apps/Statistic/DimensionSelect.tsx\"));\nvar _MeasuresSelect = _interopRequireDefault(__webpack_require__(/*! ./MeasuresSelect */ \"./src/web/component/apps/Statistic/MeasuresSelect.tsx\"));\nvar _menuTableUtil = __webpack_require__(/*! @/utils/menuTableUtil */ \"./src/utils/menuTableUtil.js\");\nvar _reducer = __webpack_require__(/*! @/utils/reducer */ \"./src/utils/reducer.ts\");\nvar _StatisticSetting = _interopRequireDefault(__webpack_require__(/*! ./StatisticSetting.less */ \"./src/web/component/apps/Statistic/StatisticSetting.less\"));\nvar _classnames = _interopRequireDefault(__webpack_require__(/*! classnames */ \"../../node_modules/classnames/index.js\"));\nvar _WebUI = __webpack_require__(/*! nocode_component/WebUI */ \"webpack/container/remote/nocode_component/WebUI\");\nvar _ListFilterSetting = _interopRequireDefault(__webpack_require__(/*! ../../common/ListFilterSetting */ \"./src/web/component/common/ListFilterSetting.tsx\"));\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof _WeakMap) return null; var r = new _WeakMap(), t = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != _typeof(e) && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? _Object$getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? _Object$defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }\nfunction ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty2(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }\nvar PREFIX_CLS = 'statistics-setting';\nvar MAX_COUNT_MAP = {\n  KPI: {\n    dimension: 0,\n    measure: 2\n  },\n  Column: {\n    dimension: 2,\n    measure: 3\n  },\n  StackedColumn: {\n    dimension: 2,\n    measure: 3\n  },\n  Bar: {\n    dimension: 2,\n    measure: 3\n  },\n  StackedBar: {\n    dimension: 2,\n    measure: 3\n  },\n  Line: {\n    dimension: 2,\n    measure: 3\n  },\n  Pie: {\n    dimension: 1,\n    measure: 1\n  },\n  Ring: {\n    dimension: 1,\n    measure: 1\n  }\n};\nvar ModalBody = (0, _react.forwardRef)(function (_ref, ref) {\n  var _formData$measures, _formData$dimensions;\n  var prefixCls = _ref.prefixCls,\n    statSetting = _ref.statSetting,\n    formOptions = _ref.formOptions,\n    listFilterConfig = _ref.listFilterConfig,\n    statField = _ref.statField,\n    getEnumFilterValue = _ref.getEnumFilterValue,\n    syncFilterSettings = _ref.syncFilterSettings,\n    _ref$schemaList = _ref.schemaList,\n    schemaList = _ref$schemaList === void 0 ? [] : _ref$schemaList;\n  var _Form$useForm = _kdesign.Form.useForm(),\n    _Form$useForm2 = (0, _slicedToArray2.default)(_Form$useForm, 1),\n    form = _Form$useForm2[0];\n  var _useReducer = (0, _react.useReducer)(_reducer.assignDataReducer, statSetting),\n    _useReducer2 = (0, _slicedToArray2.default)(_useReducer, 2),\n    formData = _useReducer2[0],\n    setFormData = _useReducer2[1];\n  var _useState = (0, _react.useState)(false),\n    _useState2 = (0, _slicedToArray2.default)(_useState, 2),\n    showFilterSettingPop = _useState2[0],\n    setShowFilterSettingPop = _useState2[1];\n  var _useState3 = (0, _react.useState)((statSetting === null || statSetting === void 0 ? void 0 : statSetting.filters) || []),\n    _useState4 = (0, _slicedToArray2.default)(_useState3, 2),\n    configuredFilterItems = _useState4[0],\n    setConfiguredFilterItems = _useState4[1];\n  var _useState5 = (0, _react.useState)(),\n    _useState6 = (0, _slicedToArray2.default)(_useState5, 2),\n    colHeadFilter = _useState6[0],\n    setColHeadFilter = _useState6[1];\n  var hasChildDropdown = (0, _react.useRef)();\n  var handleCloseFilterSetting = (0, _react.useCallback)(function () {\n    setShowFilterSettingPop(false);\n  }, []);\n  var handleFilterConfirm = (0, _react.useCallback)(function (values) {\n    var newConfiguredFilterItems = (0, _menuTableUtil.getEffectiveFilterItems)(values);\n    setConfiguredFilterItems(newConfiguredFilterItems);\n    setShowFilterSettingPop(false);\n  }, [setConfiguredFilterItems]);\n  var onDelete = (0, _react.useCallback)(function (i) {\n    var newItems = configuredFilterItems === null || configuredFilterItems === void 0 ? void 0 : (0, _filter.default)(configuredFilterItems).call(configuredFilterItems, function (item, index) {\n      return i !== index;\n    });\n    setConfiguredFilterItems(newItems);\n  }, [configuredFilterItems, setConfiguredFilterItems]);\n  var handleGetColHeadFilter = (0, _react.useCallback)(function (v, configuredFilterItems) {\n    getEnumFilterValue({\n      fieldName: v === null || v === void 0 ? void 0 : v.fieldName,\n      compareType: v === null || v === void 0 ? void 0 : v.compareType,\n      value: v === null || v === void 0 ? void 0 : v.value\n    }, configuredFilterItems).then(function (data) {\n      setColHeadFilter(function (filter) {\n        return _objectSpread(_objectSpread({}, filter), {}, (0, _defineProperty2.default)({}, v === null || v === void 0 ? void 0 : v.fieldName, data));\n      });\n    });\n  }, [getEnumFilterValue]);\n  var maxCount = (0, _react.useMemo)(function () {\n    return MAX_COUNT_MAP[formData.chartType] || {};\n  }, [formData.chartType]);\n  (0, _react.useImperativeHandle)(ref, function () {\n    return {\n      validateFields: validateFields,\n      filters: configuredFilterItems,\n      setConfiguredFilterItems: setConfiguredFilterItems\n    };\n  });\n  var validateFields = function validateFields() {\n    return new _promise.default(function (resolve, reject) {\n      form.validateFields().then(function (_ref2) {\n        var values = (0, _values.default)(_ref2);\n        resolve(values);\n      }).catch(function (e) {\n        return reject(e);\n      });\n    });\n  };\n  var filters = (0, _react.useMemo)(function () {\n    return (0, _listSettingUtil.getTransferFilters)((0, _listSettingUtil.getFilters)(configuredFilterItems, listFilterConfig));\n  }, [configuredFilterItems, listFilterConfig]);\n  return /*#__PURE__*/_react.default.createElement(\"div\", {\n    className: _StatisticSetting.default[\"\".concat(prefixCls, \"-modal-body\")]\n  }, /*#__PURE__*/_react.default.createElement(_kdesign.Form, {\n    layout: \"vertical\",\n    form: form,\n    labelWidth: \"100%\",\n    wrapperWidth: \"100%\",\n    onValuesChange: function onValuesChange(changedValue, values) {\n      console.log('form', changedValue, values);\n    }\n  }, /*#__PURE__*/_react.default.createElement(\"div\", {\n    className: _StatisticSetting.default['form-item-row']\n  }, /*#__PURE__*/_react.default.createElement(_kdesign.Form.Item, {\n    label: \"\\u7EDF\\u8BA1\\u5361\\u7247\\u540D\\u79F0\",\n    name: \"title\",\n    required: true,\n    validateTrigger: \"onBlur\",\n    rules: [{\n      required: true,\n      message: '请输入统计卡片名称'\n    }]\n  }, /*#__PURE__*/_react.default.createElement(_kdesign.Input, {\n    type: \"text\",\n    value: formData.title,\n    borderType: \"bordered\",\n    size: \"large\",\n    placeholder: \"\\u8BF7\\u8F93\\u5165\\u7EDF\\u8BA1\\u5361\\u7247\\u540D\\u79F0\",\n    maxLength: 50,\n    onChange: function onChange(e) {\n      return setFormData({\n        title: e.target.value\n      });\n    }\n  })), /*#__PURE__*/_react.default.createElement(_kdesign.Form.Item, {\n    label: \"\\u5206\\u6790\\u7684\\u8868\\u5355\",\n    name: \"formId\"\n    // required\n    // rules={[{\n    //   required: true, message: '请选择分析的表单'\n    // }]}\n  }, /*#__PURE__*/_react.default.createElement(_kdesign.Select, {\n    disabled: true,\n    value: formData.formId,\n    options: formOptions,\n    borderType: \"bordered\",\n    size: \"large\",\n    placeholder: \"\\u8BF7\\u9009\\u62E9\\u5206\\u6790\\u7684\\u8868\\u5355\",\n    onChange: function onChange(id) {\n      return setFormData({\n        formId: id\n      });\n    }\n  }))), /*#__PURE__*/_react.default.createElement(\"div\", {\n    className: _StatisticSetting.default['form-item-vertical']\n  }, /*#__PURE__*/_react.default.createElement(\"div\", {\n    className: _StatisticSetting.default['form-title']\n  }, /*#__PURE__*/_react.default.createElement(\"div\", {\n    className: _StatisticSetting.default['title-left']\n  }, \"\\u7B5B\\u9009\\u6761\\u4EF6\"), /*#__PURE__*/_react.default.createElement(\"div\", {\n    className: _StatisticSetting.default['title-right']\n  }, /*#__PURE__*/_react.default.createElement(_ListFilterSetting.default, {\n    title: \"\\u7B5B\\u9009\",\n    titleRight: /*#__PURE__*/_react.default.createElement(\"div\", {\n      className: _StatisticSetting.default['sync-filter-setting'],\n      onClick: syncFilterSettings\n    }, /*#__PURE__*/_react.default.createElement(_kdesign.Icon, {\n      prefix: \"nocodeplatformicon\",\n      type: \"qiehuan\",\n      rotate: 90\n    }), \"\\u540C\\u6B65\\u8868\\u5355\\u5217\\u8868\\u7B5B\\u9009\\u6761\\u4EF6\"),\n    onClose: handleCloseFilterSetting,\n    onConfirm: handleFilterConfirm,\n    data: listFilterConfig || [],\n    configuredFilterItems: configuredFilterItems,\n    style: {\n      width: '640px',\n      height: '332px'\n    },\n    maskClosable: true,\n    maskStyle: {\n      opacity: 0\n    }\n    // className={style['filter-popup']}\n    ,\n    draggable: true,\n    showClearAll: true,\n    onDelete: onDelete,\n    onColHeadFilterVisibleChange: handleGetColHeadFilter,\n    colHeadFilter: colHeadFilter,\n    visible: showFilterSettingPop,\n    onDropdownVisibleChange: function onDropdownVisibleChange(v) {\n      hasChildDropdown.current = v;\n    },\n    onVisibleChange: function onVisibleChange(v) {\n      (0, _setTimeout2.default)(function () {\n        // 如果子组件存在激活的dropdown, 阻止弹窗关闭\n        if (!hasChildDropdown.current) {\n          setShowFilterSettingPop(v);\n        }\n      });\n    }\n  }, /*#__PURE__*/_react.default.createElement(\"p\", {\n    className: (0, _classnames.default)([(0, _filter.default)(_StatisticSetting.default), (0, _defineProperty2.default)({}, _StatisticSetting.default['is-active'], showFilterSettingPop)])\n  }, /*#__PURE__*/_react.default.createElement(_kdesign.Icon, {\n    prefix: \"nocodeplatformicon\",\n    type: \"shaixuan\"\n  }), \"\\u7B5B\\u9009\")))), /*#__PURE__*/_react.default.createElement(_WebUI.FilterLabelBar, {\n    maxLabelCount: 3,\n    filters: filters,\n    onDelete: onDelete,\n    className: _StatisticSetting.default['filter-label-bar']\n  })), /*#__PURE__*/_react.default.createElement(_kdesign.Form.Item, {\n    label: \"\\u56FE\\u8868\\u7C7B\\u578B\",\n    name: \"chartType\"\n  }, /*#__PURE__*/_react.default.createElement(_ChartsTypeSelect.default, {\n    value: formData.chartType,\n    onChange: function onChange(value) {\n      setFormData({\n        chartType: value\n      });\n    }\n  })), /*#__PURE__*/_react.default.createElement(\"div\", {\n    className: _StatisticSetting.default['form-item-row']\n  }, formData.chartType !== 'KPI' && /*#__PURE__*/_react.default.createElement(_kdesign.Form.Item, {\n    label: \"\\u7EF4\\u5EA6\",\n    name: \"dimensions\",\n    required: true,\n    rules: [{\n      type: 'array',\n      validator: function validator(rule, value, callback, source, options) {\n        if (!(value !== null && value !== void 0 && value.length)) {\n          return [new Error('请添加维度')];\n        } else {\n          var isFullFilled = value.every(function (item) {\n            return (0, _values2.default)(item).every(function (v) {\n              return v !== '';\n            });\n          });\n          return isFullFilled ? [] : [new Error('请选择维度')];\n        }\n      }\n    }]\n  }, /*#__PURE__*/_react.default.createElement(_DimensionSelect.default, {\n    value: formData.dimensions,\n    addText: \"\\u6DFB\\u52A0\\u7EF4\\u5EA6\",\n    fieldsData: statField.dimensionsField || [],\n    maxCount: ((_formData$measures = formData.measures) === null || _formData$measures === void 0 ? void 0 : _formData$measures.length) > 1 ? 1 : maxCount.dimension,\n    onChange: function onChange(value) {\n      return setFormData({\n        dimensions: value\n      });\n    },\n    onAdd: function onAdd(value) {\n      setFormData({\n        dimensions: value\n      });\n      form.setFieldValue('dimensions', value);\n    }\n  })), /*#__PURE__*/_react.default.createElement(_kdesign.Form.Item, {\n    label: \"\\u5EA6\\u91CF\",\n    name: \"measures\",\n    required: true,\n    rules: [{\n      type: 'array',\n      validator: function validator(rule, value, callback, source, options) {\n        if (!(value !== null && value !== void 0 && value.length)) {\n          return [new Error('请添加度量')];\n        } else {\n          var isFullFilled = value.every(function (item) {\n            return (0, _values2.default)(item).every(function (v) {\n              return v !== '';\n            });\n          });\n          return isFullFilled ? [] : [new Error('请选择度量')];\n        }\n      }\n    }]\n  }, /*#__PURE__*/_react.default.createElement(_MeasuresSelect.default, {\n    value: formData.measures,\n    addText: \"\\u6DFB\\u52A0\\u5EA6\\u91CF\",\n    fieldsData: statField.measuresField || [],\n    maxCount: ((_formData$dimensions = formData.dimensions) === null || _formData$dimensions === void 0 ? void 0 : _formData$dimensions.length) > 1 ? 1 : maxCount.measure,\n    onChange: function onChange(value) {\n      return setFormData({\n        measures: value\n      });\n    },\n    onAdd: function onAdd(value) {\n      setFormData({\n        measures: value\n      });\n      form.setFieldValue('measures', value);\n    }\n  }))), /*#__PURE__*/_react.default.createElement(\"div\", {\n    className: _StatisticSetting.default['form-item-row-50']\n  }, /*#__PURE__*/_react.default.createElement(_kdesign.Form.Item, {\n    label: \"\\u6DFB\\u52A0\\u81F3\",\n    name: \"schemaIds\",\n    required: true,\n    rules: [{\n      type: 'array',\n      required: true,\n      message: '请选择视图'\n    }]\n  }, /*#__PURE__*/_react.default.createElement(_kdesign.Select, {\n    mode: \"multiple\",\n    value: formData.schemaIds,\n    options: schemaList,\n    borderType: \"bordered\",\n    placeholder: \"\\u8BF7\\u9009\\u62E9\\u89C6\\u56FE\",\n    onChange: function onChange(ids) {\n      return setFormData({\n        schemaIds: ids\n      });\n    }\n  })))));\n});\nvar ModalFooter = function ModalFooter(_ref4) {\n  var prefixCls = _ref4.prefixCls,\n    onCancel = _ref4.onCancel,\n    onConfirm = _ref4.onConfirm;\n  return /*#__PURE__*/_react.default.createElement(\"div\", {\n    className: _StatisticSetting.default[\"\".concat(prefixCls, \"-modal-footer\")]\n  }, /*#__PURE__*/_react.default.createElement(_kdesign.Button, {\n    onClick: onCancel,\n    type: \"second\",\n    size: \"small\",\n    className: _StatisticSetting.default[\"\".concat(prefixCls, \"-modal-cancel-btn\")]\n  }, \"\\u53D6\\u6D88\"), /*#__PURE__*/_react.default.createElement(_kdesign.Button, {\n    type: \"primary\",\n    size: \"small\",\n    style: {\n      marginLeft: '12px'\n    },\n    onClick: onConfirm,\n    className: _StatisticSetting.default[\"\".concat(prefixCls, \"-modal-ok-btn\")]\n  }, \"\\u786E\\u5B9A\"));\n};\nvar StatisticsSetting = (0, _react.memo)(function (_ref5) {\n  var visible = _ref5.visible,\n    setVisible = _ref5.setVisible,\n    statSetting = _ref5.statSetting,\n    _ref5$formOptions = _ref5.formOptions,\n    formOptions = _ref5$formOptions === void 0 ? [] : _ref5$formOptions,\n    listFilterConfig = _ref5.listFilterConfig,\n    statField = _ref5.statField,\n    getEnumFilterValue = _ref5.getEnumFilterValue,\n    listFilters = _ref5.listFilters,\n    getListFilters = _ref5.getListFilters,\n    onConfirm = _ref5.onConfirm,\n    schemaList = _ref5.schemaList;\n  var _useState7 = (0, _react.useState)(window.innerHeight - 64 - 96),\n    _useState8 = (0, _slicedToArray2.default)(_useState7, 2),\n    bodyMaxHeight = _useState8[0],\n    setBodyMaxHeight = _useState8[1];\n  var modalBodyRef = (0, _react.useRef)(null);\n  var injectFieldName = function injectFieldName(objectKey, target, source, options) {\n    // 根据对象的fieldId，找到对应的fieldName，并注入其中\n    if (source[objectKey]) {\n      var _context;\n      target[objectKey] = (0, _map.default)(_context = source[objectKey]).call(_context, function (item) {\n        var _options$find;\n        var fieldId = item.fieldId;\n        var fieldName = (_options$find = (0, _find.default)(options).call(options, function (f) {\n          return f.number === fieldId;\n        })) === null || _options$find === void 0 ? void 0 : _options$find.name;\n        if (fieldName) return _objectSpread(_objectSpread({}, item), {}, {\n          fieldName: fieldName\n        });\n        return item;\n      });\n    }\n  };\n\n  // 点击确定\n  var handleConfirm = function handleConfirm() {\n    var _modalBodyRef$current = modalBodyRef.current,\n      validateFields = _modalBodyRef$current.validateFields,\n      filters = _modalBodyRef$current.filters;\n    validateFields().then(function (formData) {\n      var measuresField = statField.measuresField,\n        dimensionsField = statField.dimensionsField;\n      var result = _objectSpread({}, formData);\n      injectFieldName('measures', result, formData, measuresField);\n      injectFieldName('dimensions', result, formData, dimensionsField);\n      setVisible(false);\n      // 外部需要传回调，则以外部回调为准\n      onConfirm === null || onConfirm === void 0 || onConfirm(_objectSpread(_objectSpread({}, result), {}, {\n        filters: filters\n      }));\n    }).catch(function (e) {\n      console.warn(e);\n    });\n  };\n\n  // 同步表单筛选条件\n  var syncFilterSettings = function syncFilterSettings() {\n    var outerListFilters = (getListFilters === null || getListFilters === void 0 ? void 0 : getListFilters()) || [];\n    var setConfiguredFilterItems = modalBodyRef.current.setConfiguredFilterItems;\n    setConfiguredFilterItems === null || setConfiguredFilterItems === void 0 || setConfiguredFilterItems(outerListFilters);\n  };\n\n  // 点击取消\n  var handleCancel = function handleCancel() {\n    setVisible(false);\n  };\n  (0, _react.useEffect)(function () {\n    // 这里主要确保弹窗的高度为偶数，为奇数的话transform(-50%, -50%)会导致里面的字体变糊\n    if (bodyMaxHeight % 2 !== 0) {\n      setBodyMaxHeight(bodyMaxHeight - 1);\n    }\n  }, []);\n  return /*#__PURE__*/_react.default.createElement(_kdesign.Modal, {\n    mask: true,\n    visible: visible,\n    keyboard: false,\n    body: /*#__PURE__*/_react.default.createElement(ModalBody, {\n      prefixCls: PREFIX_CLS,\n      ref: modalBodyRef,\n      statSetting: statSetting,\n      formOptions: formOptions,\n      listFilterConfig: listFilterConfig,\n      statField: statField,\n      getEnumFilterValue: getEnumFilterValue,\n      syncFilterSettings: syncFilterSettings,\n      schemaList: schemaList\n    }),\n    bodyStyle: {\n      maxHeight: bodyMaxHeight\n    },\n    titleIcon: null,\n    className: _StatisticSetting.default[\"\".concat(PREFIX_CLS, \"-modal\")],\n    footer: /*#__PURE__*/_react.default.createElement(ModalFooter, {\n      prefixCls: PREFIX_CLS,\n      onConfirm: handleConfirm,\n      onCancel: handleCancel\n    }),\n    maskClosable: false,\n    width: 960,\n    height: 520,\n    title: \"\\u8BBE\\u7F6E\\u7EDF\\u8BA1\\u5361\\u7247\",\n    closable: true,\n    destroyOnClose: true,\n    onCancel: handleCancel,\n    onOk: handleConfirm\n  });\n});\nvar _default = exports[\"default\"] = StatisticsSetting;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64, \n//# sourceURL=webpack-internal:///./src/web/component/apps/Statistic/StatisticSetting.tsx\n");

/***/ }),

/***/ "./src/web/component/apps/Statistic/index.tsx":
/*!****************************************************!*\
  !*** ./src/web/component/apps/Statistic/index.tsx ***!
  \****************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {

eval("\n\nvar _typeof3 = __webpack_require__(/*! @babel/runtime-corejs3/helpers/typeof */ \"../../node_modules/@babel/runtime-corejs3/helpers/typeof.js\");\nvar _Object$keys = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/keys */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/keys.js\");\nvar _Object$getOwnPropertySymbols = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols.js\");\nvar _filterInstanceProperty = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/filter */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/filter.js\");\nvar _Object$getOwnPropertyDescriptor = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor.js\");\nvar _Object$getOwnPropertyDescriptors = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors.js\");\nvar _Object$defineProperties = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/define-properties */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/define-properties.js\");\nvar _Object$defineProperty = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/define-property */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/define-property.js\");\nvar _WeakMap = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/weak-map */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/weak-map.js\");\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime-corejs3/helpers/interopRequireDefault */ \"../../node_modules/@babel/runtime-corejs3/helpers/interopRequireDefault.js\");\n_Object$defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports[\"default\"] = void 0;\nvar _find = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/find */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/find.js\"));\nvar _map = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/map */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/map.js\"));\nvar _concat = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/concat */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/concat.js\"));\nvar _setTimeout2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/set-timeout */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/set-timeout.js\"));\nvar _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/regenerator */ \"../../node_modules/@babel/runtime-corejs3/regenerator/index.js\"));\nvar _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/helpers/typeof */ \"../../node_modules/@babel/runtime-corejs3/helpers/typeof.js\"));\nvar _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/helpers/asyncToGenerator */ \"../../node_modules/@babel/runtime-corejs3/helpers/asyncToGenerator.js\"));\nvar _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/helpers/defineProperty */ \"../../node_modules/@babel/runtime-corejs3/helpers/defineProperty.js\"));\nvar _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/helpers/slicedToArray */ \"../../node_modules/@babel/runtime-corejs3/helpers/slicedToArray.js\"));\nvar _react = _interopRequireWildcard(__webpack_require__(/*! kd_libs/react */ \"webpack/container/remote/kd_libs/react\"));\nvar _kdesign = __webpack_require__(/*! kd_libs/kdesign1 */ \"webpack/container/remote/kd_libs/kdesign1\");\nvar _index = _interopRequireDefault(__webpack_require__(/*! ./index.less */ \"./src/web/component/apps/Statistic/index.less\"));\nvar _apps = __webpack_require__(/*! @/actions/apps */ \"./src/actions/apps.ts\");\nvar _reactRouterDom = __webpack_require__(/*! react-router-dom */ \"../../node_modules/react-router-dom/index.js\");\nvar _StatisticSetting = _interopRequireDefault(__webpack_require__(/*! ./StatisticSetting */ \"./src/web/component/apps/Statistic/StatisticSetting.tsx\"));\nvar _StatisticCard = _interopRequireDefault(__webpack_require__(/*! ./StatisticCard */ \"./src/web/component/apps/Statistic/StatisticCard.tsx\"));\nvar _useClickOutSide = _interopRequireDefault(__webpack_require__(/*! @/hooks/useClickOutSide */ \"./src/hooks/useClickOutSide.tsx\"));\nvar _utils = __webpack_require__(/*! @/utils */ \"./src/utils/index.tsx\");\nvar _WebUI = __webpack_require__(/*! nocode_component/WebUI */ \"webpack/container/remote/nocode_component/WebUI\");\nvar _reducer = __webpack_require__(/*! @/utils/reducer */ \"./src/utils/reducer.ts\");\nvar _home_empty = _interopRequireDefault(__webpack_require__(/*! @@/assets/img/home_empty.png */ \"./assets/img/home_empty.png\"));\nvar _PageEventService = __webpack_require__(/*! @/service/PageEventService */ \"./src/service/PageEventService.ts\");\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof _WeakMap) return null; var r = new _WeakMap(), t = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != _typeof3(e) && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? _Object$getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? _Object$defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }\nfunction ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; } /**\n * 统计抽屉StatisticsDrawer\n */\nvar NoCard = function NoCard(_ref) {\n  var handleAdd = _ref.handleAdd;\n  return /*#__PURE__*/_react.default.createElement(\"div\", {\n    className: _index.default.card_empty\n  }, /*#__PURE__*/_react.default.createElement(\"div\", {\n    className: _index.default.empty_content\n  }, /*#__PURE__*/_react.default.createElement(\"img\", {\n    src: _home_empty.default,\n    alt: \"\\u6682\\u65E0\\u5361\\u7247\",\n    width: 320,\n    height: 160\n  }), /*#__PURE__*/_react.default.createElement(\"div\", {\n    className: _index.default.empty_text\n  }, \"\\u6682\\u65E0\\u5361\\u7247\\uFF0C\\u70B9\\u51FB\\u4E0B\\u65B9\\u6309\\u94AE\\u6DFB\\u52A0\"), /*#__PURE__*/_react.default.createElement(_kdesign.Button, {\n    type: \"primary\",\n    icon: /*#__PURE__*/_react.default.createElement(_kdesign.Icon, {\n      prefix: \"nocodeplatformicon\",\n      type: \"zengjia-yuan\"\n    }),\n    onClick: handleAdd\n  }, \"\\u6DFB\\u52A0\\u5361\\u7247\")));\n};\nvar INIT_SETTING = {\n  title: '',\n  formId: '',\n  chartType: 'Column',\n  measures: [],\n  dimensions: [],\n  filters: []\n};\nvar StatDrawer = function StatDrawer(_ref2) {\n  var visible = _ref2.visible,\n    setVisible = _ref2.setVisible,\n    _ref2$formName = _ref2.formName,\n    formName = _ref2$formName === void 0 ? '' : _ref2$formName,\n    _ref2$env = _ref2.env,\n    env = _ref2$env === void 0 ? '0' : _ref2$env,\n    _ref2$title = _ref2.title,\n    title = _ref2$title === void 0 ? '统计' : _ref2$title,\n    listFilterConfig = _ref2.listFilterConfig,\n    configuredFilterItems = _ref2.configuredFilterItems,\n    getConfiguredFilterItems = _ref2.getConfiguredFilterItems,\n    viewInfo = _ref2.viewInfo,\n    activeSchemaId = _ref2.activeSchemaId,\n    getEnumFilterValue = _ref2.getEnumFilterValue,\n    disabled = _ref2.disabled,\n    disabledAction = _ref2.disabledAction;\n  var _useParams = (0, _reactRouterDom.useParams)(),\n    appId = _useParams.appId,\n    formId = _useParams.targetFormId;\n  var _useState = (0, _react.useState)(null),\n    _useState2 = (0, _slicedToArray2.default)(_useState, 2),\n    cardList = _useState2[0],\n    setCardList = _useState2[1];\n  var _useState3 = (0, _react.useState)(false),\n    _useState4 = (0, _slicedToArray2.default)(_useState3, 2),\n    settingModalVisible = _useState4[0],\n    setSettingModalVisible = _useState4[1];\n  var _useReducer = (0, _react.useReducer)(_reducer.assignDataReducer, _objectSpread(_objectSpread({}, INIT_SETTING), {}, {\n      formId: formId\n    })),\n    _useReducer2 = (0, _slicedToArray2.default)(_useReducer, 2),\n    statSetting = _useReducer2[0],\n    setStatSetting = _useReducer2[1];\n  var _useState5 = (0, _react.useState)({}),\n    _useState6 = (0, _slicedToArray2.default)(_useState5, 2),\n    statField = _useState6[0],\n    setStatField = _useState6[1];\n  var drawerRef = (0, _react.useRef)(null);\n  var editCardIdRef = (0, _react.useRef)(''); // 编辑的卡片id\n  var addCardIdRef = (0, _react.useRef)('');\n\n  // 点击面板外部，触发面板关闭\n  (0, _useClickOutSide.default)([drawerRef], function (e) {\n    var appDom = document.getElementById('app');\n    if (appDom && !(appDom !== null && appDom !== void 0 && appDom.contains(e.target))) return;\n    if (visible && !settingModalVisible) {\n      setVisible(false);\n    }\n  });\n\n  // 获取卡片列表\n  var initAllCards = (0, _react.useCallback)( /*#__PURE__*/function () {\n    var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(callback) {\n      var res, _ref4, _ref4$rows, list, message;\n      return _regenerator.default.wrap(function _callee$(_context) {\n        while (1) switch (_context.prev = _context.next) {\n          case 0:\n            _context.prev = 0;\n            _context.next = 3;\n            return (0, _apps.getStartCard)(appId, formId, env);\n          case 3:\n            res = _context.sent;\n            _ref4 = res || {}, _ref4$rows = _ref4.rows, list = _ref4$rows === void 0 ? [] : _ref4$rows;\n            setCardList(list);\n            callback && callback();\n            _context.next = 15;\n            break;\n          case 9:\n            _context.prev = 9;\n            _context.t0 = _context[\"catch\"](0);\n            console.log(_context.t0);\n            message = _context.t0.message;\n            (0, _utils.showNotice)('error', message);\n            setCardList([]);\n          case 15:\n          case \"end\":\n            return _context.stop();\n        }\n      }, _callee, null, [[0, 9]]);\n    }));\n    return function (_x) {\n      return _ref3.apply(this, arguments);\n    };\n  }(), [setCardList, appId, formId]);\n\n  // 获取统计卡片维度和度量的字段\n  var fetchStatField = /*#__PURE__*/function () {\n    var _ref5 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {\n      var res, _ref6, _ref6$rows, list, message;\n      return _regenerator.default.wrap(function _callee2$(_context2) {\n        while (1) switch (_context2.prev = _context2.next) {\n          case 0:\n            _context2.prev = 0;\n            _context2.next = 3;\n            return (0, _apps.getStatField)(formId);\n          case 3:\n            res = _context2.sent;\n            _ref6 = res || {}, _ref6$rows = _ref6.rows, list = _ref6$rows === void 0 ? [] : _ref6$rows;\n            setStatField((list === null || list === void 0 ? void 0 : list[0]) || {});\n            _context2.next = 14;\n            break;\n          case 8:\n            _context2.prev = 8;\n            _context2.t0 = _context2[\"catch\"](0);\n            console.log(_context2.t0);\n            message = _context2.t0.message;\n            (0, _utils.showNotice)('error', message);\n            setStatField({});\n          case 14:\n          case \"end\":\n            return _context2.stop();\n        }\n      }, _callee2, null, [[0, 8]]);\n    }));\n    return function fetchStatField() {\n      return _ref5.apply(this, arguments);\n    };\n  }();\n  var handleDelete = function handleDelete(cardId) {\n    var cardInfo = (0, _find.default)(cardList).call(cardList, function (item) {\n      return item.cardId === cardId;\n    }) || {};\n    var title = cardInfo.title;\n    _WebUI.WebMsg === null || _WebUI.WebMsg === void 0 || _WebUI.WebMsg.showConfirmModal({\n      title: \"\\u786E\\u5B9A\\u5220\\u9664\".concat(title, \"\\u5417\\uFF1F\"),\n      type: 'delete',\n      onAction: function onAction(key) {\n        switch (key) {\n          case 'ok':\n            deleteCardByIds([cardId]);\n        }\n      }\n    });\n  };\n  var deleteCardByIds = (0, _react.useCallback)( /*#__PURE__*/function () {\n    var _ref7 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(cardIds) {\n      var params, res, _ref8, successCount, message;\n      return _regenerator.default.wrap(function _callee3$(_context3) {\n        while (1) switch (_context3.prev = _context3.next) {\n          case 0:\n            if (!disabled) {\n              _context3.next = 2;\n              break;\n            }\n            return _context3.abrupt(\"return\", disabledAction());\n          case 2:\n            params = {\n              formId: formId,\n              appId: appId,\n              env: env,\n              cardIds: cardIds\n            };\n            _context3.prev = 3;\n            _context3.next = 6;\n            return (0, _apps.deleteStatCard)(params);\n          case 6:\n            res = _context3.sent;\n            _ref8 = res || {}, successCount = _ref8.successCount;\n            if (successCount > 0) {\n              (0, _utils.showNotice)('success', '删除成功');\n              // 刷新列表\n              initAllCards();\n            }\n            _context3.next = 16;\n            break;\n          case 11:\n            _context3.prev = 11;\n            _context3.t0 = _context3[\"catch\"](3);\n            console.log(_context3.t0);\n            message = _context3.t0.message;\n            (0, _utils.showNotice)('error', message || '删除失败');\n          case 16:\n          case \"end\":\n            return _context3.stop();\n        }\n      }, _callee3, null, [[3, 11]]);\n    }));\n    return function (_x2) {\n      return _ref7.apply(this, arguments);\n    };\n  }(), [initAllCards, disabled, disabledAction]);\n  (0, _react.useEffect)(function () {\n    if (visible) {\n      initAllCards();\n      fetchStatField();\n    }\n  }, [visible]);\n\n  // 新增\n  var handleAdd = (0, _react.useCallback)(function () {\n    if (disabled) return disabledAction();\n    editCardIdRef.current = '';\n    var title = \"\\u65B0\\u5EFA\\u7EDF\\u8BA1\\u5361\\u7247\".concat(cardList !== null && cardList !== void 0 && cardList.length ? (cardList === null || cardList === void 0 ? void 0 : cardList.length) + 1 : 1);\n    setStatSetting(_objectSpread(_objectSpread({}, INIT_SETTING), {}, {\n      title: title,\n      formId: formId,\n      schemaIds: [activeSchemaId]\n    }));\n    setSettingModalVisible(true);\n  }, [disabled, disabledAction, setSettingModalVisible, cardList, formId, activeSchemaId]);\n\n  // 获取卡片信息，并弹出配置弹窗\n  var getQingCardInfo = (0, _react.useCallback)( /*#__PURE__*/function () {\n    var _ref9 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(cardId, cardInfo) {\n      var title, schemaIds, _yield$getQingCardPar, _yield$getQingCardPar2, rows, _ref10, qingCardParams, filters, _formId, message;\n      return _regenerator.default.wrap(function _callee4$(_context4) {\n        while (1) switch (_context4.prev = _context4.next) {\n          case 0:\n            title = cardInfo.title, schemaIds = cardInfo.schemaIds;\n            _context4.prev = 1;\n            _context4.next = 4;\n            return (0, _apps.getQingCardParams)(cardId);\n          case 4:\n            _yield$getQingCardPar = _context4.sent;\n            _yield$getQingCardPar2 = _yield$getQingCardPar.rows;\n            rows = _yield$getQingCardPar2 === void 0 ? [] : _yield$getQingCardPar2;\n            _ref10 = rows[0] || {}, qingCardParams = _ref10.qingCardParams, filters = _ref10.filters, _formId = _ref10.formId;\n            setStatSetting(_objectSpread({\n              title: title,\n              filters: filters,\n              formId: _formId,\n              schemaIds: schemaIds\n            }, qingCardParams));\n            setSettingModalVisible(true);\n            _context4.next = 17;\n            break;\n          case 12:\n            _context4.prev = 12;\n            _context4.t0 = _context4[\"catch\"](1);\n            message = _context4.t0.message;\n            console.log(_context4.t0);\n            (0, _utils.showNotice)('error', message);\n          case 17:\n          case \"end\":\n            return _context4.stop();\n        }\n      }, _callee4, null, [[1, 12]]);\n    }));\n    return function (_x3, _x4) {\n      return _ref9.apply(this, arguments);\n    };\n  }(), [setStatSetting]);\n\n  // 编辑\n  var handleEdit = (0, _react.useCallback)(function (cardId) {\n    if (disabled) return disabledAction();\n    editCardIdRef.current = cardId;\n    var cardInfo = (0, _find.default)(cardList).call(cardList, function (item) {\n      return item.cardId === cardId;\n    }) || {};\n    getQingCardInfo(cardId, cardInfo);\n  }, [getQingCardInfo, cardList, disabled, disabledAction]);\n  var renderCards = function renderCards() {\n    return cardList === null || cardList === void 0 ? void 0 : (0, _map.default)(cardList).call(cardList, function (item) {\n      var cardId = item.cardId,\n        title = item.title;\n      return /*#__PURE__*/_react.default.createElement(_StatisticCard.default, {\n        key: cardId,\n        cardId: cardId,\n        title: title\n      });\n    });\n  };\n  var refreshIframeById = function refreshIframeById(cardId, cardTitle) {\n    // 刷新iframe\n    var iframe = document.getElementById(\"stat_iframe_card_\".concat(cardId));\n    if (iframe) {\n      var _context5, _context6;\n      var frameUrl = (0, _concat.default)(_context5 = (0, _concat.default)(_context6 = \"\".concat(window.__domainurl__, \"qing/qingNoCodeCardEntrance.do?cardId=\")).call(_context6, cardId, \"&cardName=\")).call(_context5, encodeURIComponent(cardTitle));\n      iframe.src = (0, _utils.getUrlWithDataCenter)(frameUrl);\n    }\n  };\n  var handleConfirm = /*#__PURE__*/function () {\n    var _ref11 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(formData) {\n      var title, chartType, measures, dimensions, filters, assignOrgs, assignUsers, schemaIds, obj, params, _yield$saveStatSettin, _yield$saveStatSettin2, result, newId, message;\n      return _regenerator.default.wrap(function _callee5$(_context7) {\n        while (1) switch (_context7.prev = _context7.next) {\n          case 0:\n            console.log('formData------', formData);\n            (0, _PageEventService.publishClickUserEvent)({\n              formId: formId,\n              appId: appId,\n              action: 'setc_ana_comf'\n            });\n            title = formData.title, chartType = formData.chartType, measures = formData.measures, dimensions = formData.dimensions, filters = formData.filters, assignOrgs = formData.assignOrgs, assignUsers = formData.assignUsers, schemaIds = formData.schemaIds;\n            obj = {\n              title: title,\n              cardPath: appId,\n              formId: formId,\n              filters: filters,\n              qingCardParams: {\n                chartType: chartType,\n                measures: measures,\n                dimensions: dimensions\n              },\n              schemaIds: schemaIds\n              // authConfig: {\n              //   assignOrgs,\n              //   assignUsers\n              // }\n            };\n            if (editCardIdRef.current) {\n              obj.cardId = editCardIdRef.current;\n            }\n            params = {\n              data: [obj]\n            };\n            _context7.prev = 6;\n            _context7.next = 9;\n            return (0, _apps.saveStatSetting)(params, env);\n          case 9:\n            _yield$saveStatSettin = _context7.sent;\n            _yield$saveStatSettin2 = _yield$saveStatSettin.result;\n            result = _yield$saveStatSettin2 === void 0 ? [] : _yield$saveStatSettin2;\n            (0, _utils.showNotice)('success', '保存成功');\n            if (editCardIdRef.current) {\n              // 编辑保存时，只刷新单个iframe\n              initAllCards(function () {\n                refreshIframeById(editCardIdRef.current, title);\n              });\n            } else {\n              newId = result[0].id;\n              addCardIdRef.current = newId;\n              // 新增时，刷新全量的数据\n              initAllCards();\n            }\n            _context7.next = 21;\n            break;\n          case 16:\n            _context7.prev = 16;\n            _context7.t0 = _context7[\"catch\"](6);\n            message = _context7.t0.message;\n            console.log(_context7.t0);\n            (0, _utils.showNotice)('error', message);\n          case 21:\n          case \"end\":\n            return _context7.stop();\n        }\n      }, _callee5, null, [[6, 16]]);\n    }));\n    return function handleConfirm(_x5) {\n      return _ref11.apply(this, arguments);\n    };\n  }();\n  var formOptions = (0, _react.useMemo)(function () {\n    return [{\n      label: formName,\n      value: formId\n    }];\n  }, [formId, formName]);\n  var schemaList = (0, _react.useMemo)(function () {\n    return (viewInfo === null || viewInfo === void 0 ? void 0 : (0, _map.default)(viewInfo).call(viewInfo, function (_ref12) {\n      var name = _ref12.name,\n        id = _ref12.id;\n      return {\n        label: name,\n        value: id\n      };\n    })) || [];\n  }, [viewInfo]);\n\n  // 监听postMessage消息\n  var dealMessage = (0, _react.useCallback)(function (e) {\n    var messageData = e.data;\n    if (messageData && (0, _typeof2.default)(messageData) === 'object') {\n      var methodName = messageData.methodName,\n        cardId = messageData.cardId;\n      if (methodName === 'openSettingDialog') {\n        handleEdit(cardId);\n      } else if (methodName === 'deleteCard') {\n        handleDelete(cardId);\n      }\n    }\n  }, [handleEdit, deleteCardByIds]);\n  (0, _react.useEffect)(function () {\n    window.addEventListener('message', dealMessage, false);\n    return function () {\n      window.removeEventListener('message', dealMessage, false);\n    };\n  }, [dealMessage]);\n  (0, _react.useEffect)(function () {\n    // 处理新增的卡片-滚动到可视区\n    if (addCardIdRef.current) {\n      (0, _setTimeout2.default)(function () {\n        var iframe = document.getElementById(\"stat_iframe_card_\".concat(addCardIdRef.current));\n        iframe === null || iframe === void 0 || iframe.scrollIntoView();\n        addCardIdRef.current = '';\n      }, 0);\n    }\n  }, [cardList]);\n  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_kdesign.Drawer, {\n    key: activeSchemaId,\n    mask: false,\n    visible: visible,\n    onClose: function onClose() {\n      return setVisible(false);\n    },\n    getContainer: function getContainer() {\n      return document.body;\n    },\n    ref: drawerRef,\n    width: 480,\n    keyboard: false,\n    className: _index.default.drawer,\n    forceRender: true,\n    title: /*#__PURE__*/_react.default.createElement(\"div\", {\n      className: _index.default.title\n    }, /*#__PURE__*/_react.default.createElement(\"div\", {\n      className: _index.default['title-desc']\n    }, title), !!(cardList !== null && cardList !== void 0 && cardList.length) && /*#__PURE__*/_react.default.createElement(\"span\", {\n      className: _index.default.add,\n      onClick: handleAdd\n    }, /*#__PURE__*/_react.default.createElement(_kdesign.Icon, {\n      type: \"zengjia-yuan\",\n      prefix: \"nocodeplatformicon\",\n      className: _index.default.icon\n    }), \"\\u6DFB\\u52A0\"))\n  }, cardList && (cardList.length ? renderCards() : /*#__PURE__*/_react.default.createElement(NoCard, {\n    handleAdd: handleAdd\n  }))), /*#__PURE__*/_react.default.createElement(_StatisticSetting.default, {\n    visible: settingModalVisible,\n    setVisible: setSettingModalVisible,\n    statSetting: statSetting,\n    formOptions: formOptions,\n    listFilterConfig: listFilterConfig || [],\n    statField: statField,\n    getEnumFilterValue: getEnumFilterValue,\n    listFilters: configuredFilterItems,\n    getListFilters: getConfiguredFilterItems,\n    schemaList: schemaList,\n    onConfirm: handleConfirm\n  }));\n};\nvar _default = exports[\"default\"] = StatDrawer;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64, \n//# sourceURL=webpack-internal:///./src/web/component/apps/Statistic/index.tsx\n");

/***/ }),

/***/ "./src/web/component/common/Loading.tsx":
/*!**********************************************!*\
  !*** ./src/web/component/common/Loading.tsx ***!
  \**********************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {

eval("\n\nvar _Object$defineProperty = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/define-property */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/define-property.js\");\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime-corejs3/helpers/interopRequireDefault */ \"../../node_modules/@babel/runtime-corejs3/helpers/interopRequireDefault.js\");\n_Object$defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports[\"default\"] = void 0;\nvar _react = _interopRequireDefault(__webpack_require__(/*! kd_libs/react */ \"webpack/container/remote/kd_libs/react\"));\nvar Loading = function Loading() {\n  return /*#__PURE__*/_react.default.createElement(\"div\", null);\n};\nvar _default = exports[\"default\"] = Loading;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViL2NvbXBvbmVudC9jb21tb24vTG9hZGluZy50c3giLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7QUFBQTtBQUNBO0FBQ0E7QUFLQTtBQUFBIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vbm9jb2RlLXBsYXRmb3JtLy4vc3JjL3dlYi9jb21wb25lbnQvY29tbW9uL0xvYWRpbmcudHN4P2M2OTQiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFJlYWN0IGZyb20gJ3JlYWN0J1xuY29uc3QgTG9hZGluZyA9ICgpID0+IHtcbiAgcmV0dXJuIChcbiAgICA8ZGl2PlxuICAgICAgey8qIOWKoOi9veS4rS4uLiAqL31cbiAgICA8L2Rpdj5cbiAgKVxufVxuXG5leHBvcnQgZGVmYXVsdCBMb2FkaW5nXG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/web/component/common/Loading.tsx\n");

/***/ }),

/***/ "./src/web/component/custom/index.tsx":
/*!********************************************!*\
  !*** ./src/web/component/custom/index.tsx ***!
  \********************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {

eval("\n\nvar _typeof = __webpack_require__(/*! @babel/runtime-corejs3/helpers/typeof */ \"../../node_modules/@babel/runtime-corejs3/helpers/typeof.js\");\nvar _Object$keys = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/keys */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/keys.js\");\nvar _Object$getOwnPropertySymbols = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols.js\");\nvar _filterInstanceProperty = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/filter */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/filter.js\");\nvar _Object$getOwnPropertyDescriptor = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor.js\");\nvar _Object$getOwnPropertyDescriptors = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors.js\");\nvar _Object$defineProperties = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/define-properties */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/define-properties.js\");\nvar _Object$defineProperty = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/define-property */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/define-property.js\");\nvar _WeakMap = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/weak-map */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/weak-map.js\");\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime-corejs3/helpers/interopRequireDefault */ \"../../node_modules/@babel/runtime-corejs3/helpers/interopRequireDefault.js\");\n_Object$defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports[\"default\"] = void 0;\nvar _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/helpers/defineProperty */ \"../../node_modules/@babel/runtime-corejs3/helpers/defineProperty.js\"));\nvar _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/helpers/slicedToArray */ \"../../node_modules/@babel/runtime-corejs3/helpers/slicedToArray.js\"));\nvar _react = _interopRequireWildcard(__webpack_require__(/*! kd_libs/react */ \"webpack/container/remote/kd_libs/react\"));\nvar _HomeContainer = _interopRequireDefault(__webpack_require__(/*! ../../pages/home/HomeContainer */ \"./src/web/pages/home/HomeContainer.tsx\"));\nvar _home = __webpack_require__(/*! ../../pages/home */ \"./src/web/pages/home/index.tsx\");\nvar _app = __webpack_require__(/*! @/app */ \"./src/app.jsx\");\nvar _home2 = __webpack_require__(/*! @/context/home */ \"./src/context/home/index.ts\");\nvar _utils = __webpack_require__(/*! @/utils */ \"./src/utils/index.tsx\");\nvar _lodash = __webpack_require__(/*! kd_libs/lodash */ \"webpack/container/remote/kd_libs/lodash\");\nvar _card = __webpack_require__(/*! @/actions/card */ \"./src/actions/card.ts\");\nvar _index = _interopRequireDefault(__webpack_require__(/*! ./index.less */ \"./src/web/component/custom/index.less\"));\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof _WeakMap) return null; var r = new _WeakMap(), t = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != _typeof(e) && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? _Object$getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? _Object$defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }\nfunction ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; } /*\n * @Description:\n * @Author: jianhang_he\n * @Date: 2023-10-30 16:10:47\n * @LastEditTime: 2024-01-04 17:08:55\n * @Last Modified by: jianhang_he\n */\nvar CustomPage = (0, _react.memo)(function (_ref) {\n  var _boxRef$current;\n  var pageId = _ref.pageId,\n    appId = _ref.appId,\n    readonly = _ref.readonly;\n  var _useReducer = (0, _react.useReducer)(_home.reducer, _home.initState),\n    _useReducer2 = (0, _slicedToArray2.default)(_useReducer, 2),\n    _useReducer2$ = _useReducer2[0],\n    state = _useReducer2$ === void 0 ? {} : _useReducer2$,\n    dispatch = _useReducer2[1];\n  var _useState = (0, _react.useState)(false),\n    _useState2 = (0, _slicedToArray2.default)(_useState, 2),\n    init = _useState2[0],\n    setInit = _useState2[1];\n  var boxRef = (0, _react.useRef)();\n  var _useContext = (0, _react.useContext)(_app.Context),\n    appState = _useContext.state;\n  var _ref2 = appState || {},\n    userInfo = _ref2.userInfo,\n    appsList = _ref2.appsList;\n  var userId = userInfo === null || userInfo === void 0 ? void 0 : userInfo.id;\n  var appInfo = appsList[appId];\n  var _ref3 = appInfo || {},\n    istemplate = _ref3.istemplate;\n  var storeDispatch = (0, _react.useCallback)(function (_ref4) {\n    var type = _ref4.type,\n      data = _ref4.payload;\n    dispatch({\n      type: type,\n      payload: _objectSpread({\n        userId: userId\n      }, data)\n    });\n  }, [userId]);\n\n  // 带viewId时会刷新视图信息(切换视图时用)\n  var loadCardInfo = (0, _react.useCallback)(function (chooseViewId) {\n    var viewId = chooseViewId || (state === null || state === void 0 ? void 0 : state.viewId);\n    init && setInit(false);\n    var cacheData = {};\n    // 读取缓存数据\n    // getStoreData(HOME_CARD, { schemaId: viewId }).then(res => {\n    //   if (res) {\n    //     cacheData = res\n    //     setInit(true)\n    //     dispatch({ type: UPDATE_CARDINFO, payload: { viewId, ...res } })\n    //   }\n    // })\n    (0, _card.getCardBySchmeId)({\n      pageId: viewId\n    }).then(function (data) {\n      var _data$rows;\n      var info = (data === null || data === void 0 || (_data$rows = data.rows) === null || _data$rows === void 0 ? void 0 : _data$rows[0]) || {};\n      setInit(true);\n      var cacheInfo = {\n        cardInfo: cacheData === null || cacheData === void 0 ? void 0 : cacheData.cardInfo,\n        layout: cacheData === null || cacheData === void 0 ? void 0 : cacheData.layout\n      };\n      if (!(0, _lodash.isEqual)(cacheInfo, info)) {\n        storeDispatch({\n          type: _home.UPDATE_CARDINFO,\n          payload: _objectSpread({\n            viewId: viewId\n          }, info)\n        });\n      }\n    }).catch(function (err) {\n      (0, _utils.showNotice)('error', err.message);\n    });\n  }, [init, state.viewId, storeDispatch, userId]);\n  (0, _react.useEffect)(function () {\n    loadCardInfo(pageId);\n  }, [pageId]);\n  var getHomeCardLayout = (0, _react.useCallback)(function () {\n    return state.layout;\n  }, [state.layout]);\n  var getHomeCardInfo = (0, _react.useCallback)(function () {\n    return state.cardInfo;\n  }, [state.cardInfo]);\n  var addCard = (0, _react.useCallback)(function (info, layout) {\n    storeDispatch({\n      type: _home.ADD_CARD,\n      payload: {\n        newCardInfo: info,\n        newCardLayout: layout\n      }\n    });\n  }, [state === null || state === void 0 ? void 0 : state.cardInfo]);\n  return /*#__PURE__*/_react.default.createElement(_home2.HomeCardContext.Provider, {\n    value: {\n      schemaId: pageId,\n      getHomeCardInfo: getHomeCardInfo,\n      getHomeCardLayout: getHomeCardLayout,\n      onRefreshHomeCard: loadCardInfo,\n      handleAddCard: addCard\n    }\n  }, /*#__PURE__*/_react.default.createElement(\"div\", {\n    className: _index.default.custom,\n    ref: boxRef\n  }, /*#__PURE__*/_react.default.createElement(_HomeContainer.default, {\n    wrapperRef: boxRef,\n    pageId: pageId,\n    layoutWidth: (_boxRef$current = boxRef.current) === null || _boxRef$current === void 0 ? void 0 : _boxRef$current.offsetWidth,\n    init: init,\n    state: state,\n    readonly: readonly,\n    istemplate: istemplate,\n    className: _index.default.custom_main\n    // addCardMarkClassName={styles.addcardmark}\n    ,\n    dispatch: storeDispatch\n  })));\n});\nCustomPage.displayName = 'CustomPage';\nvar _default = exports[\"default\"] = CustomPage;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64, \n//# sourceURL=webpack-internal:///./src/web/component/custom/index.tsx\n");

/***/ })

}]);