"use strict";
/*
 * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
 * This devtool is neither made for production nor for readable output files.
 * It uses "eval()" calls to create a separate source file 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_component"] = self["webpackChunknocode_component"] || []).push([[150],{

/***/ "./src/control/web/NocodeFlow/index.less":
/*!***********************************************!*\
  !*** ./src/control/web/NocodeFlow/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\"] = ({\"loading-wrapper\":\"ECnTK4vJ_loading-wrapper\",\"nocode-designer-wrapper\":\"adya10sl_nocode-designer-wrapper\"});\n\n//# sourceURL=webpack://nocode-component/./src/control/web/NocodeFlow/index.less?");

/***/ }),

/***/ "./src/base/index.ts":
/*!***************************!*\
  !*** ./src/base/index.ts ***!
  \***************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   hooks: function() { return /* binding */ hooks; },\n/* harmony export */   mobile: function() { return /* reexport module object */ _mobile__WEBPACK_IMPORTED_MODULE_1__; },\n/* harmony export */   web: function() { return /* reexport module object */ _web__WEBPACK_IMPORTED_MODULE_0__; }\n/* harmony export */ });\n/* harmony import */ var _web__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./web */ \"./src/base/web/index.ts\");\n/* harmony import */ var _mobile__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mobile */ \"./src/base/mobile/index.ts\");\n/* harmony import */ var _hooks_useKDRefBill__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./hooks/useKDRefBill */ \"./src/base/hooks/useKDRefBill.tsx\");\n/* harmony import */ var _hooks_useOnDrop__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./hooks/useOnDrop */ \"./src/base/hooks/useOnDrop.ts\");\n/* harmony import */ var _assets_icon_ncicon_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../assets/icon/ncicon.css */ \"./assets/icon/ncicon.css\");\n/* harmony import */ var _assets_icon_ncicon_css__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_assets_icon_ncicon_css__WEBPACK_IMPORTED_MODULE_4__);\n/*\n * @Description:\n * @Author: jianhang_he\n * @Date: 2023-09-18 13:43:00\n * @LastEditTime: 2024-04-11 15:16:19\n * @Last Modified by: jianhang_he\n */\n\n\n\n\n\nvar hooks = {\n  useKDRefBill: _hooks_useKDRefBill__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  useOnDrop: _hooks_useOnDrop__WEBPACK_IMPORTED_MODULE_3__[\"default\"]\n};\n\n\n//# sourceURL=webpack://nocode-component/./src/base/index.ts?");

/***/ }),

/***/ "./src/control/hooks/remote.config.js":
/*!********************************************!*\
  !*** ./src/control/hooks/remote.config.js ***!
  \********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/keys */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/keys.js\");\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/slice */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/slice.js\");\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"../../node_modules/core-js/modules/es.object.to-string.js\");\n/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"../../node_modules/core-js/modules/web.dom-collections.for-each.js\");\n/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_3__);\n\n\n\n\n/*\n * @Description:\n * @Author: jianhang_he\n * @Date: 2023-02-08 18:56:37\n * @LastEditTime: 2023-03-02 10:13:56\n * @Last Modified by: jianhang_he\n */\nvar HOST = window.__kd_cdnPath__ || window.__domainurl__;\nvar config = {\n  nocode: {\n    url: \"\".concat(HOST + \"ncp\", \"/nocode-designer/nocodeRemoteEntry.js\"),\n    scope: 'nocode_designer'\n  },\n  components: {\n    url: \"\".concat(HOST + \"ncp\", \"/nocode-component/nocodeComponentEntry.js\"),\n    scope: 'nocode_component'\n  },\n  base: {\n    url: \"\".concat(HOST, \"public/designer-base/designerBaseRemoteEntry.js\"),\n    scope: 'designer_base'\n  },\n  nocodeflow: {\n    url: \"\".concat(HOST + \"ncp\", \"/nocode-flow/nocodeFlowRemoteEntry.js\"),\n    scope: 'nocode_flow'\n  }\n};\nif (true) {\n  _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default()(config).forEach(function (key) {\n    var _context, _context2;\n    var _config = config[key];\n    _config.url = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_1___default()(_context = _config.url).call(_context, 0, -3) + '.dev' + _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_1___default()(_context2 = _config.url).call(_context2, -3) + \"?v=\".concat(1729258349369);\n  });\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (config);\n\n//# sourceURL=webpack://nocode-component/./src/control/hooks/remote.config.js?");

/***/ }),

/***/ "./src/control/hooks/useDynamicScript.js":
/*!***********************************************!*\
  !*** ./src/control/hooks/useDynamicScript.js ***!
  \***********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/slicedToArray */ \"../../node_modules/@babel/runtime-corejs3/helpers/esm/slicedToArray.js\");\n/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"../../node_modules/core-js/modules/es.object.to-string.js\");\n/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"../../node_modules/core-js/modules/web.dom-collections.for-each.js\");\n/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/set */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/set.js\");\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_map__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/map */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/map.js\");\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_map__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_map__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var kd_libs_react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! kd_libs/react */ \"webpack/container/remote/kd_libs/react\");\n/* harmony import */ var kd_libs_react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(kd_libs_react__WEBPACK_IMPORTED_MODULE_5__);\n\n\n\n\n\n/*\n * @Author: cxf\n * @Email: jinrui_fang@kingdee.com\n * @Date: 2022-02-18 09:37:31\n * @Last Modified by: fjr\n * @LastEditTime: 2022-02-18 14:19:40\n * @Description: ...\n */\n\n\n// 将远程入口文件注入到html头部\nvar urlCache = new (_babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_3___default())(); // url地址缓存\nvar resolveUrlCache = new (_babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_3___default())(); // url地址缓存\nvar resolveUrlCallbacksMap = new (_babel_runtime_corejs3_core_js_stable_map__WEBPACK_IMPORTED_MODULE_4___default())();\nvar useDynamicScript = function useDynamicScript(url, scope) {\n  var _useState = (0,kd_libs_react__WEBPACK_IMPORTED_MODULE_5__.useState)(false),\n    _useState2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_useState, 2),\n    ready = _useState2[0],\n    setReady = _useState2[1];\n  var _useState3 = (0,kd_libs_react__WEBPACK_IMPORTED_MODULE_5__.useState)(false),\n    _useState4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_useState3, 2),\n    errorLoading = _useState4[0],\n    setErrorLoading = _useState4[1];\n  // console.log(url,scope)\n  (0,kd_libs_react__WEBPACK_IMPORTED_MODULE_5__.useEffect)(function () {\n    if (!url) return;\n    if (resolveUrlCache.has(url) || window[scope]) {\n      // 如果已缓存，直接返回\n      setReady(true);\n      setErrorLoading(false);\n      return;\n    }\n    if (urlCache.has(url)) {\n      if (!resolveUrlCallbacksMap.has(url)) {\n        resolveUrlCallbacksMap.set(url, []);\n      }\n      var callbacks = resolveUrlCallbacksMap.get(url);\n      callbacks.push([function () {\n        setReady(true);\n      }, function () {\n        setReady(false);\n        setErrorLoading(true);\n      }]);\n      return;\n    }\n    // 在这个位置存地址，异步同时引入多个组件的时候，可能还未ready\n    urlCache.add(url);\n    setReady(false);\n    setErrorLoading(false);\n    var element = document.createElement('script');\n    element.src = url;\n    element.type = 'text/javascript';\n    element.async = true;\n    element.onload = function () {\n      // urlCache.add(url); // 在这个位置存地址，会引发多次插入脚本问题\n      resolveUrlCache.add(url); // 在这个位置存地址，异步同时引入多个组件的时候，可能还未ready\n      setReady(true);\n      if (resolveUrlCallbacksMap.has(url)) {\n        var _callbacks = resolveUrlCallbacksMap.get(url);\n        _callbacks.forEach(function (_ref) {\n          var _ref2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_ref, 1),\n            resolveCallback = _ref2[0];\n          return resolveCallback();\n        });\n        resolveUrlCallbacksMap.delete(url);\n      }\n    };\n    document.head.appendChild(element);\n    element.onerror = function () {\n      setReady(false);\n      setErrorLoading(true);\n      if (resolveUrlCallbacksMap.has(url)) {\n        var _callbacks2 = resolveUrlCallbacksMap.get(url);\n        _callbacks2.forEach(function (_ref3) {\n          var _ref4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_ref3, 2),\n            _c = _ref4[0],\n            rejectCallback = _ref4[1];\n          return rejectCallback();\n        });\n        resolveUrlCallbacksMap.delete(url);\n      }\n    };\n    return function () {\n      urlCache.delete(url);\n      resolveUrlCallbacksMap.delete(url);\n      document.head.removeChild(element);\n    };\n  }, [url]);\n  return {\n    errorLoading: errorLoading,\n    ready: ready\n  };\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (useDynamicScript);\n\n//# sourceURL=webpack://nocode-component/./src/control/hooks/useDynamicScript.js?");

/***/ }),

/***/ "./src/control/hooks/useFederationModule.js":
/*!**************************************************!*\
  !*** ./src/control/hooks/useFederationModule.js ***!
  \**************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   useFederatedModule: function() { return /* binding */ useFederatedModule; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/slicedToArray */ \"../../node_modules/@babel/runtime-corejs3/helpers/esm/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_corejs3_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/asyncToGenerator */ \"../../node_modules/@babel/runtime-corejs3/helpers/esm/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/map */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/map.js\");\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_map__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_map__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/concat */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/concat.js\");\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime-corejs3/regenerator */ \"../../node_modules/@babel/runtime-corejs3/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var kd_libs_react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! kd_libs/react */ \"webpack/container/remote/kd_libs/react\");\n/* harmony import */ var kd_libs_react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(kd_libs_react__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _useDynamicScript_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./useDynamicScript.js */ \"./src/control/hooks/useDynamicScript.js\");\n/* harmony import */ var _remote_config_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./remote.config.js */ \"./src/control/hooks/remote.config.js\");\n\n\n\n\n\n\n\n\n/**\n *\n * @param {*} scope\n * @param {*} module\n * @returns Module\n */\nfunction loadModule(configKey, module) {\n  var scope = _remote_config_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"][configKey].scope;\n  return /*#__PURE__*/(0,_babel_runtime_corejs3_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[\"default\"])( /*#__PURE__*/_babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_4___default().mark(function _callee() {\n    var container, factory, Module;\n    return _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_4___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 __webpack_require__.I(\"default\");\n        case 3:\n          container = window[scope]; // or get the container somewhere else\n          // Initialize the container, it may provide shared modules\n          _context.next = 6;\n          return container.init(__webpack_require__.S.default);\n        case 6:\n          _context.next = 11;\n          break;\n        case 8:\n          _context.prev = 8;\n          _context.t0 = _context[\"catch\"](0);\n          console.log(_context.t0);\n        case 11:\n          _context.next = 13;\n          return window[scope].get(module);\n        case 13:\n          factory = _context.sent;\n          Module = factory();\n          return _context.abrupt(\"return\", Module);\n        case 16:\n        case \"end\":\n          return _context.stop();\n      }\n    }, _callee, null, [[0, 8]]);\n  }));\n}\nvar componentCache = new (_babel_runtime_corejs3_core_js_stable_map__WEBPACK_IMPORTED_MODULE_2___default())();\nvar useFederatedModule = function useFederatedModule(configKey) {\n  var _context2, _context3;\n  var module = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"./Main\";\n  var _remoteConfig$configK = _remote_config_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"][configKey],\n    url = _remoteConfig$configK.url,\n    scope = _remoteConfig$configK.scope;\n  var key = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_3___default()(_context2 = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_3___default()(_context3 = \"\".concat(url, \"-\")).call(_context3, scope, \"-\")).call(_context2, module);\n  var _useState = (0,kd_libs_react__WEBPACK_IMPORTED_MODULE_5__.useState)(function () {\n      return componentCache.get(key) || null;\n    }),\n    _useState2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_useState, 2),\n    Component = _useState2[0],\n    setComponent = _useState2[1];\n  var _useDynamicScript = (0,_useDynamicScript_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(url, scope),\n    ready = _useDynamicScript.ready,\n    errorLoading = _useDynamicScript.errorLoading;\n  var isMountRef = (0,kd_libs_react__WEBPACK_IMPORTED_MODULE_5__.useRef)(false);\n  (0,kd_libs_react__WEBPACK_IMPORTED_MODULE_5__.useEffect)(function () {\n    if (!isMountRef.current) {\n      isMountRef.current = true;\n      return;\n    }\n    if (Component) setComponent(null);\n    // Only recalculate when key changes\n  }, [key]);\n  // console.log('useFederatedModule',module,Component)\n  (0,kd_libs_react__WEBPACK_IMPORTED_MODULE_5__.useEffect)(function () {\n    if (ready && !Component) {\n      loadModule(configKey, module)().then(function (resolveModule) {\n        var Comp = resolveModule;\n        componentCache.set(key, Comp);\n        setComponent(Comp);\n      });\n    }\n    // key includes all dependencies (scope/module)\n  }, [Component, ready, key]);\n  return {\n    errorLoading: errorLoading,\n    Component: Component\n  };\n};\n\n//# sourceURL=webpack://nocode-component/./src/control/hooks/useFederationModule.js?");

/***/ }),

/***/ "./src/control/web/NocodeFlow/index.tsx":
/*!**********************************************!*\
  !*** ./src/control/web/NocodeFlow/index.tsx ***!
  \**********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0__ = __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\");\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/filter */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/filter.js\");\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2__ = __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\");\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3__ = __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\");\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/define-properties */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/define-properties.js\");\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/define-property */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/define-property.js\");\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/defineProperty */ \"../../node_modules/@babel/runtime-corejs3/helpers/esm/defineProperty.js\");\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/slicedToArray */ \"../../node_modules/@babel/runtime-corejs3/helpers/esm/slicedToArray.js\");\n/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.function.name.js */ \"../../node_modules/core-js/modules/es.function.name.js\");\n/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"../../node_modules/core-js/modules/es.object.to-string.js\");\n/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"../../node_modules/core-js/modules/web.dom-collections.for-each.js\");\n/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/find */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/find.js\");\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/keys */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/keys.js\");\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/set-timeout */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/set-timeout.js\");\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_splice__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/splice */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/splice.js\");\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_splice__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_splice__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var kd_libs_react__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! kd_libs/react */ \"webpack/container/remote/kd_libs/react\");\n/* harmony import */ var kd_libs_react__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(kd_libs_react__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./index.less */ \"./src/control/web/NocodeFlow/index.less\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! classnames */ \"../../node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var _control_hooks_useFederationModule_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @/control/hooks/useFederationModule.js */ \"./src/control/hooks/useFederationModule.js\");\n/* harmony import */ var _utils_context__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @/utils/context */ \"./src/utils/context.ts\");\n/* harmony import */ var bos_core_Tools__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! bos_core/Tools */ \"webpack/container/remote/bos_core/Tools\");\n/* harmony import */ var bos_core_Tools__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(bos_core_Tools__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! @/constants */ \"./src/constants/index.ts\");\n/* harmony import */ var _base_web__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! @/base/web */ \"./src/base/web/index.ts\");\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! @/base */ \"./src/base/index.ts\");\n/* harmony import */ var _utils_webTools__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! @/utils/webTools */ \"./src/utils/webTools.ts\");\n/* harmony import */ var _base_web_WebMsg__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @/base/web/WebMsg */ \"./src/base/web/WebMsg/index.tsx\");\n/* harmony import */ var _constants_sysActionName__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @/constants/sysActionName */ \"./src/constants/sysActionName.js\");\n\n\n\n\n\n\n\n\nfunction ownKeys(e, r) { var t = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_8___default()(e); if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0___default())) { var o = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0___default()(e); r && (o = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_1___default()(o).call(o, function (r) { return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2___default()(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,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(e, r, t[r]); }) : (_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3___default()) ? _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_4___default()(e, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3___default()(t)) : ownKeys(Object(t)).forEach(function (r) { _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_5___default()(e, r, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2___default()(t, r)); }); } return e; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// 更新表单名称\nvar UPDATE_FLOWNAME = 'updateFlowName';\nvar KDNocodeFlow = (0,kd_libs_react__WEBPACK_IMPORTED_MODULE_15__.memo)(function (_ref) {\n  var controlMeta = _ref.controlMeta;\n  var _useContext = (0,kd_libs_react__WEBPACK_IMPORTED_MODULE_15__.useContext)(_utils_context__WEBPACK_IMPORTED_MODULE_19__.KDContext),\n    model = _useContext.model;\n  var _useState = (0,kd_libs_react__WEBPACK_IMPORTED_MODULE_15__.useState)(null),\n    _useState2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(_useState, 2),\n    meta = _useState2[0],\n    setMeta = _useState2[1];\n  var _useState3 = (0,kd_libs_react__WEBPACK_IMPORTED_MODULE_15__.useState)(null),\n    _useState4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(_useState3, 2),\n    data = _useState4[0],\n    setData = _useState4[1];\n  var pageId = controlMeta.pageId,\n    id = controlMeta.id;\n  var isGetData = (0,kd_libs_react__WEBPACK_IMPORTED_MODULE_15__.useRef)(false);\n  var flowStatus = model.getFormStatus(pageId);\n  var _useFederatedModule = (0,_control_hooks_useFederationModule_js__WEBPACK_IMPORTED_MODULE_18__.useFederatedModule)('nocodeflow'),\n    module = _useFederatedModule.Component; // 请求组件\n  var NoCodeFlow = (module === null || module === void 0 ? void 0 : module.NocodeFlow) || null;\n  var designerRef = (0,kd_libs_react__WEBPACK_IMPORTED_MODULE_15__.useRef)();\n  var designerDataRef = (0,kd_libs_react__WEBPACK_IMPORTED_MODULE_15__.useRef)();\n  var closeMessageRef = (0,kd_libs_react__WEBPACK_IMPORTED_MODULE_15__.useRef)();\n  var _useState5 = (0,kd_libs_react__WEBPACK_IMPORTED_MODULE_15__.useState)(model.getGlobal(_constants__WEBPACK_IMPORTED_MODULE_21__.SET_COMPARE_TYPES) || {}),\n    _useState6 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(_useState5, 2),\n    compareType = _useState6[0],\n    setCompareTyep = _useState6[1];\n  var _useState7 = (0,kd_libs_react__WEBPACK_IMPORTED_MODULE_15__.useState)(model.getGlobal(_constants__WEBPACK_IMPORTED_MODULE_21__.NOCODE_DESIGNER_SAVE_API) || {}),\n    _useState8 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(_useState7, 1),\n    saveapi = _useState8[0];\n\n  // 判断是否有错误，有错误的时候，不显示立即执行弹窗\n  var haveErrorRef = (0,kd_libs_react__WEBPACK_IMPORTED_MODULE_15__.useRef)(false);\n\n  // 发送指令到设计器内部\n  var pubEvent = function pubEvent(actionName, data) {\n    var _designerRef$current, _designerRef$current$;\n    (_designerRef$current = designerRef.current) === null || _designerRef$current === void 0 || (_designerRef$current$ = _designerRef$current.pubEvent) === null || _designerRef$current$ === void 0 || _designerRef$current$.call(_designerRef$current, actionName, data);\n  };\n\n  // 设置sessionStorage\n  var setSessionStorage = function setSessionStorage(key, data) {\n    window.sessionStorage.setItem(key, data);\n    (0,_utils_webTools__WEBPACK_IMPORTED_MODULE_24__.dispatchCustomEvent)('storage');\n  };\n\n  /**\n   * 指令执行\n   */\n  var doMethod = (0,kd_libs_react__WEBPACK_IMPORTED_MODULE_15__.useCallback)(function (_ref2) {\n    var _saveapi$saveStatus, _closeMessageRef$curr;\n    var methodname = _ref2.methodname,\n      args = _ref2.args;\n    if (methodname === _constants__WEBPACK_IMPORTED_MODULE_21__.SET_SYNC_DATA) {\n      var _context;\n      haveErrorRef.current = false;\n      var _ref3 = (args === null || args === void 0 ? void 0 : args[0]) || {},\n        _ref3$errors = _ref3.errors,\n        errors = _ref3$errors === void 0 ? {} : _ref3$errors;\n      haveErrorRef.current = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_12___default()(_context = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_8___default()(errors)).call(_context, function (key) {\n        var _errors$key;\n        return ((_errors$key = errors[key]) === null || _errors$key === void 0 ? void 0 : _errors$key.length) > 0;\n      }) || false;\n    }\n    switch (methodname) {\n      case 'open':\n        // const data = args?.[0] || {}\n        setData(args);\n        designerDataRef.current = (args === null || args === void 0 ? void 0 : args[0]) || {};\n        var _ref4 = designerDataRef.current || {},\n          procInstId = _ref4.procInstId,\n          _id = _ref4.id,\n          name = _ref4.name;\n        var storageKey = procInstId || _id;\n        setSessionStorage(\"nocode-flow-data-\".concat(storageKey), name);\n        model.emitEvent(_constants__WEBPACK_IMPORTED_MODULE_21__.UPDATE_NOCODE_FLOW_NAME, name);\n        break;\n      case 'closeWfSaveLoading':\n        saveapi === null || saveapi === void 0 || (_saveapi$saveStatus = saveapi.saveStatus) === null || _saveapi$saveStatus === void 0 || _saveapi$saveStatus.call(saveapi);\n        (_closeMessageRef$curr = closeMessageRef.current) === null || _closeMessageRef$curr === void 0 || _closeMessageRef$curr.call(closeMessageRef);\n        if (!haveErrorRef.current) {\n          model.emitEvent(_constants__WEBPACK_IMPORTED_MODULE_21__.SEND_MESSAGE_TO_PLATFORM, {\n            type: _constants__WEBPACK_IMPORTED_MODULE_21__.SHOW_LUNCH_FLOW_MODAL,\n            args: args\n          });\n        } else {\n          haveErrorRef.current = false;\n        }\n        break;\n      case _constants_sysActionName__WEBPACK_IMPORTED_MODULE_26__.REFBILL_REFRESH_REF_LIST:\n        // 发给无代码\n        model.emitEvent(_constants_sysActionName__WEBPACK_IMPORTED_MODULE_26__.REFBILL_REFRESH_REF_LIST, args);\n        break;\n      // 下面这些是不是可以直接designerRef.current?.pubEvent?.(methodname, args[0]) ？\n      // case SET_SYNC_DATA:\n      //   pubEvent(SET_SYNC_DATA, args[0])\n      //   break\n      // case SET_QUERY:\n      //   pubEvent(SET_QUERY, args[0])\n      //   break\n      // case SET_LIST_CONFIG:\n      //   pubEvent(SET_LIST_CONFIG, args[0])\n      //   break\n      // case SET_FILTER_ITEM_LOOK:\n      //   pubEvent(SET_FILTER_ITEM_LOOK, args[0])\n      //   break\n      default:\n        pubEvent(methodname, args[0]);\n        break;\n    }\n  }, [designerRef.current]);\n\n  // 请求model数据\n  var fetchDomainModel = (0,kd_libs_react__WEBPACK_IMPORTED_MODULE_15__.useCallback)(function () {\n    // 这里需要改成流程相关的接口\n    (0,bos_core_Tools__WEBPACK_IMPORTED_MODULE_20__.fetchData)(pageId, 'nocode/getWfDomainModel.do').then(function (res) {\n      if (res.data) {\n        setMeta(res.data);\n      }\n    });\n  }, [pageId]);\n\n  // 遍历指令\n  var invokeMethod = (0,kd_libs_react__WEBPACK_IMPORTED_MODULE_15__.useCallback)(function (res) {\n    res.forEach(function (item) {\n      return doMethod(item);\n    });\n  }, []);\n  var updateFormHandler = (0,kd_libs_react__WEBPACK_IMPORTED_MODULE_15__.useCallback)(function (args) {\n    switch (args.type) {\n      case UPDATE_FLOWNAME:\n        // 更新表单名称\n        updateFormName(args.payload);\n        break;\n      default:\n        break;\n    }\n  }, []);\n  var updateCompareTypes = (0,kd_libs_react__WEBPACK_IMPORTED_MODULE_15__.useCallback)(function (v) {\n    console.log('updateCompareTypes', v);\n    setCompareTyep(v);\n  }, [setCompareTyep]);\n  var addNewRecordListener = function addNewRecordListener(data) {\n    invokeAction('addNewRef', [data.formId]);\n  };\n  (0,kd_libs_react__WEBPACK_IMPORTED_MODULE_15__.useEffect)(function () {\n    window.noCodeDesignerRef = {\n      save: save,\n      getDesignerData: function getDesignerData() {\n        return designerDataRef.current;\n      }\n    };\n    fetchDomainModel();\n    var removeMethodListener = model.addControlAction('InvokeControlMethod', pageId, id, invokeMethod);\n    var removeSaveListener = model.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_21__.NOCODE_FLOW_SAVE, save);\n    var removeUpdateListener = model.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_21__.NOCODE_DESIGNER_UPDATE, updateFormHandler);\n    var removeSetCompareTypesListener = model.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_21__.SET_COMPARE_TYPES, updateCompareTypes);\n    var removeAddNewRecordListener = model.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_21__.ADD_NEW_RECORD, addNewRecordListener);\n    return function () {\n      var _closeMessageRef$curr2;\n      removeMethodListener();\n      removeSaveListener();\n      removeUpdateListener();\n      removeSetCompareTypesListener === null || removeSetCompareTypesListener === void 0 || removeSetCompareTypesListener();\n      (_closeMessageRef$curr2 = closeMessageRef.current) === null || _closeMessageRef$curr2 === void 0 || _closeMessageRef$curr2.call(closeMessageRef);\n      removeAddNewRecordListener();\n    };\n  }, []);\n  var onData = (0,kd_libs_react__WEBPACK_IMPORTED_MODULE_15__.useCallback)(function (data) {\n    designerDataRef.current = data;\n    // const { formId } = data?.nodes?.[0] || {}\n    // console.log('onData', formId)\n    model.emitEvent(_constants__WEBPACK_IMPORTED_MODULE_21__.NOCODE_FLOW_DATA, data, true);\n  }, []);\n  var onApi = (0,kd_libs_react__WEBPACK_IMPORTED_MODULE_15__.useCallback)(function (designerApi) {\n    designerRef.current = _objectSpread({}, designerApi);\n  }, []);\n  (0,kd_libs_react__WEBPACK_IMPORTED_MODULE_15__.useEffect)(function () {\n    // 通知bos-platform（DesignerHomePage）那边，数据已经获取完毕\n    if (meta && data && NoCodeFlow && !isGetData.current) {\n      isGetData.current = true;\n      model.emitEvent(_constants__WEBPACK_IMPORTED_MODULE_21__.DESIGNER_MOUNT, true);\n    }\n  }, [meta, data, NoCodeFlow]);\n  var batchInvoke = (0,kd_libs_react__WEBPACK_IMPORTED_MODULE_15__.useCallback)(function (actionName, id, args, params) {\n    return model.batchInvoke(actionName, pageId, id, args, params);\n  }, [pageId]);\n  var invokeAction = (0,kd_libs_react__WEBPACK_IMPORTED_MODULE_15__.useCallback)(function (actionName, args) {\n    var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n    // console.log(':::::::', actionName, pageId, id, args, params, enforce)\n    batchInvoke(actionName, id, args, params);\n  }, [id, batchInvoke]);\n\n  /**\n   * 保存流程信息\n   * @param postKey\n   */\n  var save = function save() {\n    var postKey = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'save';\n    // setTimeout为了防止属性修改后没有失焦，直接点击保存，发送数据不是最新的问题\n    _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_13___default()(function () {\n      var keys = postKey.split(',');\n      var post = formatePostData();\n      var args = keys.length > 1 ? _babel_runtime_corejs3_core_js_stable_instance_splice__WEBPACK_IMPORTED_MODULE_14___default()(keys).call(keys, 1) : [postKey];\n      invokeAction('designerBarClick', args, [post]);\n      closeMessageRef.current = (0,_base_web_WebMsg__WEBPACK_IMPORTED_MODULE_25__.showLoadingMessage)('流程保存中，请稍等...');\n    }, 20);\n  };\n\n  /**\n   * 保存同步数据\n   * @param args\n   *  [\n        [\"nodeId_xxx\", \"nodeId_yyy\"],//节点id,不传时表示全部\n        [\"variables\", \"errors\"],//数据类型，不传时表全部\n        [\"receiver\"],//特定属性上下文，如消息接收人编辑\n        {\n          \"xx\": \"xx\",//扩展参数，有用时传\n          \"yy\": \"\"//扩展参数，有用时传\n        }\n      ],\n   */\n  var saveSyncData = function saveSyncData(args) {\n    _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_13___default()(function () {\n      var post = formatePostData();\n      invokeAction(_constants__WEBPACK_IMPORTED_MODULE_21__.SYNC, args, [post]);\n    });\n  };\n  var getUserSelectMenu = function getUserSelectMenu() {\n    var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n    _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_13___default()(function () {\n      var post = formatePostData();\n      invokeAction('approverMenu', args, [post]);\n    });\n  };\n\n  /**\n   * 格式化设计器postData\n   * @param {*} args 参数,可为空\n   * @returns {}\n   */\n  var formatePostData = function formatePostData() {\n    var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n    var newData = _objectSpread(_objectSpread({}, designerDataRef.current), args);\n    var post = {};\n    post[id] = newData;\n    return post;\n  };\n\n  // 修改表单名称\n  var updateFormName = function updateFormName(name) {\n    if (!name || !designerRef.current) return;\n    var setDesignerDataRef = designerRef.current.setDesignerDataRef;\n    setDesignerDataRef === null || setDesignerDataRef === void 0 || setDesignerDataRef({\n      name: name\n    });\n  };\n  var showFieldPermission = function showFieldPermission(data) {\n    model.emitEvent('showFieldPermission', data);\n  };\n  var showMessage = (0,kd_libs_react__WEBPACK_IMPORTED_MODULE_15__.useCallback)(function (content) {\n    var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n    (0,_utils_webTools__WEBPACK_IMPORTED_MODULE_24__.showNotice)(content, 2000, type);\n  }, []);\n  console.log('nocodeflow', model.getGlobal(_constants__WEBPACK_IMPORTED_MODULE_21__.SET_COMPARE_TYPES));\n  var designerWrapperClass = classnames__WEBPACK_IMPORTED_MODULE_17___default()((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__[\"default\"])({}, _index_less__WEBPACK_IMPORTED_MODULE_16__[\"default\"]['nocode-designer-wrapper'], true));\n  if (meta && data && NoCodeFlow) {\n    return /*#__PURE__*/kd_libs_react__WEBPACK_IMPORTED_MODULE_15___default().createElement(\"div\", {\n      className: designerWrapperClass\n    }, /*#__PURE__*/kd_libs_react__WEBPACK_IMPORTED_MODULE_15___default().createElement(NoCodeFlow, {\n      name: \"NoCodeFlow\",\n      meta: meta,\n      data: data,\n      onData: onData,\n      invokeAction: invokeAction,\n      batchInvoke: batchInvoke,\n      onApi: onApi,\n      compareType: compareType,\n      fetchControlData: model.fetchControlData,\n      getControlText: model.getControlText,\n      baseUrl: {\n        attachment: model.getFileServer('attachment'),\n        picture: model.getFileServer('picture')\n      },\n      invokeApi: {\n        saveSyncData: saveSyncData,\n        getUserSelectMenu: getUserSelectMenu\n      },\n      flowStatus: flowStatus,\n      webMsg: _base_web__WEBPACK_IMPORTED_MODULE_22__.WebMsg,\n      baseHooks: _base__WEBPACK_IMPORTED_MODULE_23__.hooks,\n      customUtils: {\n        showFieldPermission: showFieldPermission\n      },\n      showMessage: showMessage\n    }));\n  }\n  return null;\n});\nKDNocodeFlow.displayName = 'KDNocodeFlow';\n/* harmony default export */ __webpack_exports__[\"default\"] = (KDNocodeFlow);\n\n//# sourceURL=webpack://nocode-component/./src/control/web/NocodeFlow/index.tsx?");

/***/ })

}]);