UNPKG

@jiess/plus

Version:

基于Jiess核心库的强化与拓展,为Jiess应用的完整形态

149 lines (111 loc) 300 kB
/* * 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/). */ (function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(); else if(typeof define === 'function' && define.amd) define([], factory); else if(typeof exports === 'object') exports["JiessPlus"] = factory(); else root["JiessPlus"] = factory(); })(globalThis, () => { return /******/ (() => { // webpackBootstrap /******/ "use strict"; /******/ var __webpack_modules__ = ({ /***/ "../common/class/Name.js": /*!*******************************!*\ !*** ../common/class/Name.js ***! \*******************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Name: () => (/* binding */ Name)\n/* harmony export */ });\n/* harmony import */ var _static_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../static.js */ \"../common/static.js\");\n\nclass Name {\n static uid = 1;\n constructor(name, injects = {}) {\n this[_static_js__WEBPACK_IMPORTED_MODULE_0__.NAME] = name;\n this.J_uid = Name.uid++;\n if (typeof injects === 'function') {\n injects = injects(this);\n }\n ;\n Object.assign(this, injects);\n this.bindCxt();\n }\n bindCxt() {\n for (const field of Reflect.ownKeys(this.__proto__)) {\n if (field === 'constructor') continue;\n if (typeof field === 'string') {\n if (typeof this[field] === 'function') {\n this[field] = this[field].bind(this);\n }\n this.freezeField(field);\n }\n }\n }\n resetField(field, value) {\n if (Object.prototype.hasOwnProperty.call(this, field)) {\n Object.defineProperty(this, field, {\n value\n });\n }\n }\n freezeField(field) {\n if (Object.prototype.hasOwnProperty.call(this, field)) {\n Object.defineProperty(this, field, {\n writable: false,\n enumerable: true,\n configurable: true\n });\n }\n }\n}\n\n//# sourceURL=webpack://JiessPlus/../common/class/Name.js?"); /***/ }), /***/ "../common/enum/index.js": /*!*******************************!*\ !*** ../common/enum/index.js ***! \*******************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Env: () => (/* binding */ Env),\n/* harmony export */ react: () => (/* binding */ react),\n/* harmony export */ vue2: () => (/* binding */ vue2),\n/* harmony export */ vue3: () => (/* binding */ vue3)\n/* harmony export */ });\nconst react = 'react';\nconst vue2 = 'vue2';\nconst vue3 = 'vue3';\nvar Env;\n(function (Env) {\n Env[\"React\"] = \"react\";\n Env[\"Vue2\"] = \"vue2\";\n Env[\"Vue3\"] = \"vue3\";\n})(Env || (Env = {}));\n\n//# sourceURL=webpack://JiessPlus/../common/enum/index.js?"); /***/ }), /***/ "../common/static.js": /*!***************************!*\ !*** ../common/static.js ***! \***************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ JIESS_COMPUTED: () => (/* binding */ JIESS_COMPUTED),\n/* harmony export */ JIESS_FRAGMENT: () => (/* binding */ JIESS_FRAGMENT),\n/* harmony export */ JIESS_IS: () => (/* binding */ JIESS_IS),\n/* harmony export */ JIESS_PARENT: () => (/* binding */ JIESS_PARENT),\n/* harmony export */ JIESS_REF: () => (/* binding */ JIESS_REF),\n/* harmony export */ JIESS_TAG: () => (/* binding */ JIESS_TAG),\n/* harmony export */ JIESS_TARGET: () => (/* binding */ JIESS_TARGET),\n/* harmony export */ JIESS_UPDATE: () => (/* binding */ JIESS_UPDATE),\n/* harmony export */ JIESS_VAL: () => (/* binding */ JIESS_VAL),\n/* harmony export */ NAME: () => (/* binding */ NAME),\n/* harmony export */ NOT_CLONES: () => (/* binding */ NOT_CLONES),\n/* harmony export */ NOT_CLONES_FIELDS: () => (/* binding */ NOT_CLONES_FIELDS)\n/* harmony export */ });\nconst NAME = 'JIESS_CONSTRUCTOR';\nconst JIESS_IS = 'isJiess';\nconst JIESS_TAG = 'THIS_IS_JIESS';\nconst JIESS_VAL = 'JIESS_INIT_VALUE';\nconst JIESS_REF = '_isJiessRef';\nconst JIESS_COMPUTED = '_isJiessComputed';\nconst JIESS_FRAGMENT = 'JiessFragment';\nconst JIESS_UPDATE = 'JiessForceUpdate';\nconst JIESS_TARGET = '_initialTarget';\nconst JIESS_PARENT = '_initialParent';\nconst NOT_CLONES = [NAME, '_isVue', '_uid', '_Ctor', '__v_isRef', '__v_isReactive', '$$typeof', '_store', {\n field: 'install',\n type: 'function'\n}];\nconst NOT_CLONES_FIELDS = ['is', 'component', '$exclude'];\n\n//# sourceURL=webpack://JiessPlus/../common/static.js?"); /***/ }), /***/ "../common/utils.js": /*!**************************!*\ !*** ../common/utils.js ***! \**************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ buildParam: () => (/* binding */ buildParam),\n/* harmony export */ check: () => (/* binding */ check),\n/* harmony export */ destoryRender: () => (/* binding */ destoryRender),\n/* harmony export */ filterChild: () => (/* binding */ filterChild),\n/* harmony export */ getMap: () => (/* binding */ getMap),\n/* harmony export */ hasProxy: () => (/* binding */ hasProxy),\n/* harmony export */ initNative: () => (/* binding */ initNative),\n/* harmony export */ initValue: () => (/* binding */ initValue),\n/* harmony export */ isJsRender: () => (/* binding */ isJsRender),\n/* harmony export */ isNativeMethod: () => (/* binding */ isNativeMethod),\n/* harmony export */ isNotClone: () => (/* binding */ isNotClone),\n/* harmony export */ isReactive: () => (/* binding */ isReactive),\n/* harmony export */ noProxy: () => (/* binding */ noProxy),\n/* harmony export */ parseJiessRender: () => (/* binding */ parseJiessRender),\n/* harmony export */ shallowCopy: () => (/* binding */ shallowCopy),\n/* harmony export */ throwErr: () => (/* binding */ throwErr),\n/* harmony export */ throwError: () => (/* binding */ throwError),\n/* harmony export */ validateProp: () => (/* binding */ validateProp)\n/* harmony export */ });\n/* harmony import */ var _jiess_utils_src_tools_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../jiess-utils/src/tools/index.js */ \"../jiess-utils/src/tools/index.js\");\n/* harmony import */ var _static_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./static.js */ \"../common/static.js\");\n\n\nconst throwErr = (type, msg) => {\n throw new Error(`${type} Error:${msg}`);\n};\nconst check = (obj, v, k = _static_js__WEBPACK_IMPORTED_MODULE_1__.NAME) => {\n if ((0,_jiess_utils_src_tools_index_js__WEBPACK_IMPORTED_MODULE_0__.$identify)(obj, 'object')) {\n return Object.is(obj[k], v);\n } else {\n return false;\n }\n};\nconst isNotClone = target => {\n return _static_js__WEBPACK_IMPORTED_MODULE_1__.NOT_CLONES.some(value => {\n if (typeof value === 'string') {\n return Reflect.has(target, value);\n } else {\n const {\n field,\n type\n } = value;\n if (Reflect.has(target, field)) return (0,_jiess_utils_src_tools_index_js__WEBPACK_IMPORTED_MODULE_0__.$identify)(target[field], type);\n }\n });\n};\nfunction throwError(data, type, callback = _jiess_utils_src_tools_index_js__WEBPACK_IMPORTED_MODULE_0__.$nfn, title = '数据类型') {\n if ((0,_jiess_utils_src_tools_index_js__WEBPACK_IMPORTED_MODULE_0__.$identify)(data, type)) {\n return callback();\n } else {\n throwErr(title, `须提供 ${type} 类型`);\n }\n}\nconst buildParam = info => {\n const param = {\n ...info\n };\n const def = param.default;\n delete param.default;\n return Object.assign(param, def);\n};\nfunction initMethod(target = {}, name = 'toString') {\n if (typeof target[name] === 'function') {\n if (typeof name === 'string') {\n const exp = new RegExp(name, 'g');\n return (target[name] + '').replace(exp, '');\n } else {\n return target[name] + '';\n }\n }\n}\nconst isNativeMethod = (() => {\n const tpl = initMethod();\n return (o, n) => initMethod(o, n) === tpl;\n})();\nconst shallowCopy = (data, isError) => {\n if (Array.isArray(data)) {\n return [...data];\n } else if ((0,_jiess_utils_src_tools_index_js__WEBPACK_IMPORTED_MODULE_0__.$identify)(data, 'object')) {\n return {\n ...data\n };\n }\n if (isError) {\n throwErr('shallowCopy', '须提供对象或数组');\n } else {\n return data;\n }\n};\nconst getMap = (map, obj, def = {}) => {\n if (map.has(obj)) {\n const fn = def;\n def = map.get(obj);\n if (typeof fn === 'function') fn(def);\n }\n return def;\n};\nfunction isJsRender(JR) {\n return check(JR, 'JsRender');\n}\nfunction parseJiessRender(data, callback) {\n if (isJsRender(data)) {\n callback(data);\n } else if (Array.isArray(data)) {\n data.forEach(cd => {\n if (isJsRender(cd)) callback(cd);\n });\n }\n}\nfunction destoryRender(children) {\n parseJiessRender(children, jsRender => {\n jsRender.destory();\n });\n}\nconst mapDisplay = new WeakMap();\nfunction filterChild(children) {\n let lastState = null;\n return children.filter(item => {\n if (isJsRender(item)) {\n const o = item;\n const {\n _resConfig,\n _resData\n } = o;\n if (_resConfig.$show !== undefined) {\n const style = _resData.style = {\n ..._resData.style\n };\n if (!mapDisplay.has(o)) mapDisplay.set(o, style.display);\n if (_resConfig.$show) {\n if (style.display === 'none') {\n const record = mapDisplay.get(o);\n if (record) {\n style.display = record;\n } else {\n delete style.display;\n }\n }\n } else {\n style.display = 'none';\n }\n }\n let {\n $if = true,\n $elseIf\n } = _resConfig;\n $if = initValue($if);\n $elseIf = initValue($elseIf);\n if ((0,_jiess_utils_src_tools_index_js__WEBPACK_IMPORTED_MODULE_0__.$isDef)($elseIf, true)) {\n if (typeof lastState === 'boolean') {\n const state = $elseIf && !lastState;\n if (state) lastState = true;\n return state;\n } else {\n throwErr('$elseIf', `须配合$if`);\n }\n } else if (_resConfig.hasOwnProperty('$if')) {\n lastState = !!$if;\n return $if;\n } else {\n lastState = null;\n return $if;\n }\n } else {\n return true;\n }\n });\n}\nfunction isReactive(o) {\n if (o && typeof o === 'object') {\n return !!o[_static_js__WEBPACK_IMPORTED_MODULE_1__.JIESS_TAG];\n } else {\n return false;\n }\n}\n;\nconst hasProxy = v => {\n if ((0,_jiess_utils_src_tools_index_js__WEBPACK_IMPORTED_MODULE_0__.$identify)(v, 'object')) {\n return Reflect.has(v, '$proxy');\n } else return false;\n};\nconst noProxy = data => {\n const {\n $proxy,\n field,\n done\n } = data;\n return done ? done($proxy) : field ? $proxy[field] : $proxy;\n};\nconst initValue = v => {\n if (hasProxy(v)) {\n const {\n $proxy,\n field = 'value'\n } = v;\n return $proxy[field];\n } else {\n return v;\n }\n};\nconst validateProp = function (data, propsFn, name = '') {\n if (propsFn) {\n let prefix = '';\n let result = {};\n if (name) prefix = `${name} 组件 `;\n throwError(propsFn, 'function', () => {\n let option = propsFn();\n throwError(option, 'object', () => {\n for (let key in option) {\n const v = option[key];\n let def = undefined;\n let required = false;\n let type = null;\n let isResponsive = false;\n let isRef = false;\n if (typeof v === 'string') {\n type = v;\n } else if (typeof v === 'object') {\n const o = v;\n type = o.type;\n def = o.default;\n isRef = !!o.isRef;\n required = !!o.required;\n isResponsive = !!o.isResponsive;\n }\n if (required && !data.hasOwnProperty(key)) throwErr(`${prefix}${key}`, '必须');\n const checkType = value => {\n if (value === undefined) return;\n if (typeof type === 'string' && !(0,_jiess_utils_src_tools_index_js__WEBPACK_IMPORTED_MODULE_0__.$identify)(value, type)) {\n throwErr(`${prefix}${key}`, `须提供 ${type} 类型`);\n }\n ;\n return value;\n };\n const checkRef = v => {\n return v && typeof v === 'object' && v[_static_js__WEBPACK_IMPORTED_MODULE_1__.JIESS_REF];\n };\n const dd = data.hasOwnProperty(key) ? data[key] : def;\n isResponsive && !isReactive(dd) && throwErr(`${prefix}${key}`, `须提供 Jiess 响应式数据`);\n if (checkRef(dd)) {\n checkType(dd.value);\n result[key] = dd;\n } else if (dd !== undefined && isRef) {\n throwErr(`${prefix}${key}`, '须提供 JiessRef 响应式数据');\n } else result[key] = checkType(dd);\n }\n }, `${prefix}Props 返回`);\n }, `${prefix}Props 定义`);\n return result;\n } else {\n return {\n ...data\n };\n }\n};\nconst initNative = (o, key) => {\n if (Array.isArray(o)) {\n return filterChild(o).map(initNative);\n } else if (isJsRender(o)) {\n return o.getNative(key);\n } else if ((0,_jiess_utils_src_tools_index_js__WEBPACK_IMPORTED_MODULE_0__.$isDef)(o)) return o;\n};\n\n//# sourceURL=webpack://JiessPlus/../common/utils.js?"); /***/ }), /***/ "../jiess-core/src/core/Component/index.js": /*!*************************************************!*\ !*** ../jiess-core/src/core/Component/index.js ***! \*************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Component: () => (/* binding */ Component),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _common_static_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../common/static.js */ \"../common/static.js\");\n/* harmony import */ var _common_class_Name_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../common/class/Name.js */ \"../common/class/Name.js\");\n/* harmony import */ var _Context_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Context/index.js */ \"../jiess-core/src/core/Context/index.js\");\n\n\n\nclass Component extends _common_class_Name_js__WEBPACK_IMPORTED_MODULE_1__.Name {\n IS;\n jiessEnv;\n cpn;\n ctx;\n frame;\n frameProps = {};\n constructor(IS, jiessEnv) {\n super('Component');\n this.IS = IS;\n this.jiessEnv = jiessEnv;\n this[_common_static_js__WEBPACK_IMPORTED_MODULE_0__.JIESS_IS] = true;\n }\n start(attrs = {}, children, PJR) {\n return this.cpn = this.cpn || this.component(attrs, children, PJR);\n }\n component(attrs, children, PJR) {\n return this.jiessEnv.component(this, () => {\n const result = {\n ...attrs\n };\n this.ctx = new _Context_index_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"](this, result, children, PJR);\n return lift => {\n this.ctx._lifts[lift].forEach(item => {\n if (typeof item.fn === 'function') {\n item.fn();\n if (item.once) delete item.fn;\n }\n });\n };\n });\n }\n}\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Component);\n\n//# sourceURL=webpack://JiessPlus/../jiess-core/src/core/Component/index.js?"); /***/ }), /***/ "../jiess-core/src/core/Context/Attrs.js": /*!***********************************************!*\ !*** ../jiess-core/src/core/Context/Attrs.js ***! \***********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _jiess_utils_src_tools_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../jiess-utils/src/tools/index.js */ \"../jiess-utils/src/tools/index.js\");\n/* harmony import */ var _common_class_Name_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../common/class/Name.js */ \"../common/class/Name.js\");\n\n\nfunction mergeAttrs(env, param) {\n const {\n $mergeAttrs,\n ...other\n } = param;\n return Object.assign(other, $mergeAttrs?.[env]);\n}\nfunction setAttrs(fields, oData, nData) {\n fields.forEach(field => {\n if (oData.hasOwnProperty(field)) {\n nData[field] = oData[field];\n delete oData[field];\n }\n });\n}\nclass Attrs extends _common_class_Name_js__WEBPACK_IMPORTED_MODULE_1__.Name {\n ctx;\n constructor(ctx, attrs) {\n super('Attrs');\n this.ctx = ctx;\n this.config = {};\n this.data = {};\n this.init(this.initAttrs(attrs));\n }\n initAttrs({\n ...param\n } = {}) {\n const cs = param.class || param.className;\n const {\n env\n } = this.ctx.component.jiessEnv;\n delete param.class;\n delete param.className;\n if (cs) param[env === 'vue3' ? 'class' : 'className'] = cs;\n return param;\n }\n init(attrs) {\n const {\n env\n } = this.ctx.component.jiessEnv;\n const {\n children,\n ...other\n } = mergeAttrs(env, attrs);\n const configFields = ['$if', '$ref', '$elseIf', '$name', '$show', '$slots', '$render', '$observe', '$slotData', '$mergeAttrs'];\n setAttrs(configFields, other, this.config);\n if ((0,_jiess_utils_src_tools_index_js__WEBPACK_IMPORTED_MODULE_0__.$isDef)(children)) other.children = children;\n this.data = other;\n return this;\n }\n}\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Attrs);\n\n//# sourceURL=webpack://JiessPlus/../jiess-core/src/core/Context/Attrs.js?"); /***/ }), /***/ "../jiess-core/src/core/Context/Done.js": /*!**********************************************!*\ !*** ../jiess-core/src/core/Context/Done.js ***! \**********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _common_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../common/utils.js */ \"../common/utils.js\");\n/* harmony import */ var _common_class_Name_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../common/class/Name.js */ \"../common/class/Name.js\");\n/* harmony import */ var _JsRender_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../JsRender/index.js */ \"../jiess-core/src/core/JsRender/index.js\");\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../index.js */ \"../jiess-core/src/core/index.js\");\n/* harmony import */ var _Attrs_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Attrs.js */ \"../jiess-core/src/core/Context/Attrs.js\");\n\n\n\n\n\nconst mapStore = new WeakMap();\nclass Done extends _common_class_Name_js__WEBPACK_IMPORTED_MODULE_1__.Name {\n ctx;\n attrs;\n constructor(ctx, attrs) {\n super('Done');\n this.ctx = ctx;\n this.attrs = attrs;\n if (mapStore.has(attrs)) {\n return mapStore.get(attrs);\n } else {\n mapStore.set(attrs, this);\n }\n }\n beginSetup(IS) {\n const {\n ctx\n } = this;\n const expose = {};\n const {\n setup,\n props,\n name\n } = IS;\n const attrs = new _Attrs_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"](ctx, this.attrs);\n expose.$param = attrs.data;\n expose.$props = (0,_common_utils_js__WEBPACK_IMPORTED_MODULE_0__.validateProp)(attrs.data, props, name);\n ctx.expose(expose);\n (0,_common_utils_js__WEBPACK_IMPORTED_MODULE_0__.throwError)(setup, ['function', 'asyncFunction'], () => {\n _index_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"].addCtx(ctx);\n setup.call(ctx, expose.$props, expose.$param);\n _index_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"].removeCtx(ctx);\n }, 'setup函数');\n }\n buildRender(param = this.attrs) {\n if (this.jsRender && !this.jsRender.isDestory) return this.jsRender;\n this.jsRender = new _JsRender_index_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"](this.ctx, new _Attrs_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"](this.ctx, param));\n return this.jsRender;\n }\n}\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Done);\n\n//# sourceURL=webpack://JiessPlus/../jiess-core/src/core/Context/Done.js?"); /***/ }), /***/ "../jiess-core/src/core/Context/index.js": /*!***********************************************!*\ !*** ../jiess-core/src/core/Context/index.js ***! \***********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _jiess_utils_src_tools_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../jiess-utils/src/tools/index.js */ \"../jiess-utils/src/tools/index.js\");\n/* harmony import */ var _watcher_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../watcher/index.js */ \"../jiess-core/src/watcher/index.js\");\n/* harmony import */ var _common_utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../common/utils.js */ \"../common/utils.js\");\n/* harmony import */ var _common_class_Name_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../common/class/Name.js */ \"../common/class/Name.js\");\n/* harmony import */ var _JsRender_SlotRender_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../JsRender/SlotRender.js */ \"../jiess-core/src/core/JsRender/SlotRender.js\");\n/* harmony import */ var _Done_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Done.js */ \"../jiess-core/src/core/Context/Done.js\");\n\n\n\n\n\n\nfunction getInject(k, level = Infinity, JR) {\n const {\n _provideData,\n PJR\n } = JR?.ctx || {};\n const data = _provideData;\n if ((0,_jiess_utils_src_tools_index_js__WEBPACK_IMPORTED_MODULE_0__.$identify)(data, 'object') && data.hasOwnProperty(k)) {\n return data[k];\n } else if (PJR && level > 0) {\n return getInject(k, --level, PJR);\n }\n return null;\n}\nclass Context extends _common_class_Name_js__WEBPACK_IMPORTED_MODULE_3__.Name {\n component;\n PJR;\n $obs = {};\n _provideData = {};\n _slotRender;\n _nodes = [];\n _lifts = {\n beforeRender: [],\n beforeMount: [],\n mounted: [],\n beforeUpdate: [],\n updated: [],\n beforeUnmount: []\n };\n constructor(component, attrs, children, PJR) {\n const {\n IS,\n jiessEnv\n } = component;\n super('Context', ctx => {\n return jiessEnv.jiess.useInjects(ctx);\n });\n this.component = component;\n this.PJR = PJR;\n this.jiess = jiessEnv.jiess;\n this._slotRender = new _JsRender_SlotRender_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"](this, children);\n new _Done_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"](this, attrs).beginSetup(IS);\n }\n forceUpdate() {\n this.component.frame?.forceUpdate();\n }\n onBeforeRender(fn) {\n this._lifts.beforeRender.push({\n fn,\n once: false\n });\n }\n onBeforeMount(fn) {\n this._lifts.beforeMount.push({\n fn,\n once: false\n });\n }\n onMounted(fn) {\n this._lifts.mounted.push({\n fn,\n once: false\n });\n }\n onBeforeUpdate(fn, once = false) {\n this._lifts.beforeUpdate.push({\n fn,\n once\n });\n }\n onUpdated(fn, once = false) {\n this._lifts.updated.push({\n fn,\n once\n });\n }\n onBeforeUnmount(fn) {\n this._lifts.beforeUnmount.push({\n fn,\n once: false\n });\n }\n nextTick(fn) {\n switch (this.jiess.$env) {\n case 'vue3':\n this.jiess.nextTick(fn);\n break;\n case 'vue2':\n this.component.frame?.$nextTick(fn);\n break;\n default:\n (0,_jiess_utils_src_tools_index_js__WEBPACK_IMPORTED_MODULE_0__.$isUndef)(fn);\n break;\n }\n }\n add(...childs) {\n this._nodes = [...this._nodes, ...this._slotRender.initNodes(childs)];\n return this;\n }\n native(...childs) {\n return (0,_common_utils_js__WEBPACK_IMPORTED_MODULE_2__.initNative)(this._slotRender.initNodes(childs));\n }\n provide(param = {}) {\n Object.assign(this._provideData, param);\n }\n inject(field, level) {\n return getInject(field, level, this.PJR);\n }\n expose(param) {\n if (this.PJR) Object.assign(this.PJR.expose, param);\n }\n _buildVNodeTree() {\n let nodes = (0,_common_utils_js__WEBPACK_IMPORTED_MODULE_2__.initNative)(this._nodes);\n this._lifts.beforeRender.forEach(item => {\n if (typeof item.fn === 'function') {\n nodes = item.fn(nodes) || nodes;\n if (item.once) delete item.fn;\n }\n });\n return nodes;\n }\n _observe({\n key,\n ...other\n }) {\n const {\n $proxy,\n field = 'value'\n } = other;\n let result = null;\n if (key && typeof key === 'string') {\n this.$obs[key] = this.$obs[key] || new WeakMap();\n const store = this.$obs[key].get($proxy) || {};\n if (Reflect.has(store, field)) {\n other = {\n defaultValue: store[field].result,\n ...other\n };\n }\n result = store[field] = new _watcher_index_js__WEBPACK_IMPORTED_MODULE_1__.Watcher().observe(other);\n this.$obs[key].set($proxy, store);\n } else result = new _watcher_index_js__WEBPACK_IMPORTED_MODULE_1__.Watcher().observe(other);\n return result;\n }\n}\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Context);\n\n//# sourceURL=webpack://JiessPlus/../jiess-core/src/core/Context/index.js?"); /***/ }), /***/ "../jiess-core/src/core/JsRender/SlotRender.js": /*!*****************************************************!*\ !*** ../jiess-core/src/core/JsRender/SlotRender.js ***! \*****************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _jiess_utils_src_tools_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../jiess-utils/src/tools/index.js */ \"../jiess-utils/src/tools/index.js\");\n/* harmony import */ var _common_utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../common/utils.js */ \"../common/utils.js\");\n/* harmony import */ var _common_static_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../common/static.js */ \"../common/static.js\");\n/* harmony import */ var _common_class_Name_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../common/class/Name.js */ \"../common/class/Name.js\");\n/* harmony import */ var _Context_Done_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Context/Done.js */ \"../jiess-core/src/core/Context/Done.js\");\n\n\n\n\n\nclass SlotRender extends _common_class_Name_js__WEBPACK_IMPORTED_MODULE_3__.Name {\n ctx;\n children;\n constructor(ctx, children) {\n super('SlotRender');\n this.ctx = ctx;\n this.children = children;\n }\n initNodes(childs) {\n if ((0,_jiess_utils_src_tools_index_js__WEBPACK_IMPORTED_MODULE_0__.$isUndef)(childs)) return childs;\n return [childs].flat(Infinity).filter(item => (0,_jiess_utils_src_tools_index_js__WEBPACK_IMPORTED_MODULE_0__.$isDef)(item)).map(item => {\n if (typeof item === 'function') {\n return item;\n } else if (typeof item === 'object') {\n if ('$slot' in item) {\n const {\n $slot = 'default',\n ...param\n } = item;\n const {\n slots,\n baseCnf\n } = this.initSlots($slot, param);\n if ((0,_jiess_utils_src_tools_index_js__WEBPACK_IMPORTED_MODULE_0__.$isDef)(slots)) {\n return this.initNodes(slots);\n } else if ((0,_jiess_utils_src_tools_index_js__WEBPACK_IMPORTED_MODULE_0__.$identify)(param, 'object')) {\n return this.initNodes(baseCnf);\n }\n } else if (!(0,_common_utils_js__WEBPACK_IMPORTED_MODULE_1__.isJsRender)(item)) {\n return new _Context_Done_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"](this.ctx, item).buildRender();\n } else return item;\n } else {\n return item + '';\n }\n });\n }\n initSlots(name = 'default', {\n $slotData,\n ...baseCnf\n } = {}) {\n const {\n $slots\n } = this.ctx.PJR?._resConfig || {};\n if ($slots && typeof $slots === 'object') {\n let slots = $slots[name];\n if ((0,_jiess_utils_src_tools_index_js__WEBPACK_IMPORTED_MODULE_0__.$identify)(slots, 'function')) {\n slots = slots.call(this.ctx, $slotData);\n }\n if (name === 'default' && (0,_jiess_utils_src_tools_index_js__WEBPACK_IMPORTED_MODULE_0__.$isDef)(this.children)) {\n slots = (0,_jiess_utils_src_tools_index_js__WEBPACK_IMPORTED_MODULE_0__.$isDef)(slots) ? slots : this.children;\n }\n return {\n baseCnf,\n slots\n };\n } else return {\n baseCnf,\n slots: this.children\n };\n }\n toRender(jsRender, key) {\n const {\n $moTag,\n $env\n } = this.ctx.jiess;\n const {\n is = $moTag,\n children,\n ...attrs\n } = jsRender._resData;\n jsRender._initKey(attrs, key);\n const child = this.getSlots(attrs, children, jsRender);\n if (is === _common_static_js__WEBPACK_IMPORTED_MODULE_2__.JIESS_FRAGMENT) {\n return $env === 'vue3' ? child.default.call(this) : child;\n } else {\n return this.$h(is, attrs, child, jsRender);\n }\n }\n $h(is, attrs, children, jsRender) {\n const {\n jiessEnv\n } = this.ctx.component;\n return jiessEnv.createElement(is, attrs, children, jsRender);\n }\n getSlots(other, children, jsRender) {\n const {\n ctx\n } = this;\n const {\n env\n } = ctx.component.jiessEnv;\n const initChilds = children => {\n const nodes = this.initNodes(children);\n (0,_common_utils_js__WEBPACK_IMPORTED_MODULE_1__.parseJiessRender)(nodes, JR => JR._injectKey(jsRender));\n return (0,_common_utils_js__WEBPACK_IMPORTED_MODULE_1__.initNative)(nodes);\n };\n let {\n $slots\n } = jsRender._resConfig || {};\n if (env === 'react') {\n if ((0,_jiess_utils_src_tools_index_js__WEBPACK_IMPORTED_MODULE_0__.$isDef)(children)) {\n let result = initChilds(children);\n return result.length > 1 ? result : result[0];\n }\n } else {\n other.scopedSlots = other.scopedSlots || {};\n const scps = other.scopedSlots;\n $slots = {\n ...$slots\n };\n let result = {};\n for (let slotName in $slots) {\n let item = $slots[slotName];\n if (env === 'vue2') {\n if (typeof item === 'function') {\n scps[slotName] = scope => initChilds(item.call(ctx, scope));\n } else {\n result[slotName] = initChilds(item);\n }\n } else {\n result[slotName] = scope => {\n return initChilds((0,_jiess_utils_src_tools_index_js__WEBPACK_IMPORTED_MODULE_0__.$identify)(item, 'function') ? item.call(ctx, scope) : item);\n };\n }\n }\n if (!result.hasOwnProperty('default')) {\n if (env === 'vue2') {\n if (scps.hasOwnProperty('default')) {} else if ((0,_jiess_utils_src_tools_index_js__WEBPACK_IMPORTED_MODULE_0__.$isDef)(children)) {\n result.default = initChilds(children);\n }\n } else if ((0,_jiess_utils_src_tools_index_js__WEBPACK_IMPORTED_MODULE_0__.$isDef)(children)) result.default = () => initChilds(children);\n }\n return env === 'vue2' ? Object.values(result).flat(Infinity) : result;\n }\n }\n}\n;\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SlotRender);\n\n//# sourceURL=webpack://JiessPlus/../jiess-core/src/core/JsRender/SlotRender.js?"); /***/ }), /***/ "../jiess-core/src/core/JsRender/index.js": /*!************************************************!*\ !*** ../jiess-core/src/core/JsRender/index.js ***! \************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _common_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../common/utils.js */ \"../common/utils.js\");\n/* harmony import */ var _jiess_utils_src_tools_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../jiess-utils/src/tools/index.js */ \"../jiess-utils/src/tools/index.js\");\n/* harmony import */ var _common_static_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../common/static.js */ \"../common/static.js\");\n/* harmony import */ var _common_class_Name_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../common/class/Name.js */ \"../common/class/Name.js\");\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../index.js */ \"../jiess-core/src/index.js\");\n/* harmony import */ var _Component_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Component/index.js */ \"../jiess-core/src/core/Component/index.js\");\n\n\n\n\n\n\nlet rIndex = 1;\nlet prefix = 'jiess';\nclass JsRender extends _common_class_Name_js__WEBPACK_IMPORTED_MODULE_3__.Name {\n ctx;\n expose = {};\n isDestory = false;\n constructor(ctx, attrs) {\n super('JsRender');\n this.ctx = ctx;\n this._buildNode(attrs);\n }\n _buildNode({\n config,\n data\n }) {\n data.is = (0,_index_js__WEBPACK_IMPORTED_MODULE_4__.$useComponent)(data.is);\n this[_common_static_js__WEBPACK_IMPORTED_MODULE_2__.JIESS_IS] = (0,_common_utils_js__WEBPACK_IMPORTED_MODULE_0__.check)(data.is, true, _common_static_js__WEBPACK_IMPORTED_MODULE_2__.JIESS_IS);\n this._resData = this._initParam(data);\n this._resConfig = this._initParam(config);\n const {\n $ref\n } = this._resConfig;\n if (typeof $ref === 'function') {\n this.ctx.nextTick(() => {\n (0,_jiess_utils_src_tools_index_js__WEBPACK_IMPORTED_MODULE_1__.$timer)(() => $ref(this.expose, this));\n });\n } else if ((0,_jiess_utils_src_tools_index_js__WEBPACK_IMPORTED_MODULE_1__.$identify)($ref, 'object')) {\n if ($ref[_common_static_js__WEBPACK_IMPORTED_MODULE_2__.JIESS_REF]) $ref.value = this.expose;\n }\n }\n _initParam(param) {\n const result = {};\n for (const field in param) {\n const item = param[field];\n if ((0,_jiess_utils_src_tools_index_js__WEBPACK_IMPORTED_MODULE_1__.$identify)(item, ['object', 'array'])) {\n this._analyObserve(result, item, field);\n } else {\n result[field] = item;\n }\n }\n return result;\n }\n _analyObserve(result, item, field) {\n const sr = this.ctx._slotRender;\n if (field !== '$if' && field !== '$elseIf' && this[_common_static_js__WEBPACK_IMPORTED_MODULE_2__.JIESS_IS]) {\n result[field] = item;\n } else if ((0,_common_utils_js__WEBPACK_IMPORTED_MODULE_0__.hasProxy)(item)) {\n if ((0,_common_utils_js__WEBPACK_IMPORTED_MODULE_0__.isReactive)(item.$proxy)) {\n item = this.ctx._observe(item);\n const v = item.result;\n result[field] = field === 'children' ? sr.initNodes(v) : v;\n item.observe((v, o) => {\n if (this.isDestory) return;\n if (field === 'children') {\n (0,_common_utils_js__WEBPACK_IMPORTED_MODULE_0__.destoryRender)(o);\n result[field] = sr.initNodes(v);\n } else result[field] = v;\n this.ctx.forceUpdate();\n });\n } else {\n result[field] = (0,_common_utils_js__WEBPACK_IMPORTED_MODULE_0__.noProxy)(item);\n }\n } else if (field === 'children') {\n result[field] = sr.initNodes(item);\n } else {\n result[field] = item;\n }\n }\n _initKey(obj, key) {\n if ((0,_jiess_utils_src_tools_index_js__WEBPACK_IMPORTED_MODULE_1__.$identify)(obj, 'object') && (0,_jiess_utils_src_tools_index_js__WEBPACK_IMPORTED_MODULE_1__.$isUndef)(obj.key)) {\n obj.key = (0,_jiess_utils_src_tools_index_js__WEBPACK_IMPORTED_MODULE_1__.$isDef)(key) ? `${prefix}_${key}` : `auto_${rIndex++}`;\n }\n return obj;\n }\n _injectKey({\n J_uid\n }) {\n let {\n key\n } = this._resData;\n if (key) {\n if (typeof key === 'string') {\n if (key.startsWith('_static_')) return;\n if (Number(key.split('_')[1]) === J_uid) return;\n }\n } else {\n key = this.J_uid;\n }\n this._resData.key = `${prefix}_${J_uid}_${key}`;\n }\n getNative(idx) {\n const {\n ctx,\n _resData\n } = this;\n const {\n component,\n _slotRender\n } = ctx;\n const {\n is,\n key,\n children,\n ...attrs\n } = _resData;\n if ((0,_common_utils_js__WEBPACK_IMPORTED_MODULE_0__.check)(is, true, _common_static_js__WEBPACK_IMPORTED_MODULE_2__.JIESS_IS)) {\n if (!this._vnode) {\n const {\n jiessEnv\n } = component;\n const {\n slot,\n ...o\n } = attrs;\n const param = this._initKey({\n is,\n key,\n slot\n }, idx);\n this._vnode = jiessEnv.createVNode(param, () => {\n this.component = new _Component_index_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"](is, jiessEnv);\n const NativeComponent = this.component.start(o, children, this);\n return {\n NativeComponent,\n component: this.component\n };\n });\n }\n return this._vnode;\n }\n return _slotRender.toRender(this, idx);\n }\n destory() {\n if (this.isDestory) return;\n this.isDestory = true;\n if (this[_common_static_js__WEBPACK_IMPORTED_MODULE_2__.JIESS_IS]) {\n if (this.component) (0,_common_utils_js__WEBPACK_IMPORTED_MODULE_0__.destoryRender)(this.ctx._nodes);\n } else (0,_common_utils_js__WEBPACK_IMPORTED_MODULE_0__.destoryRender)(this._resData.children);\n }\n}\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (JsRender);\n\n//# sourceURL=webpack://JiessPlus/../jiess-core/src/core/JsRender/index.js?"); /***/ }), /***/ "../jiess-core/src/core/index.js": /*!***************************************!*\ !*** ../jiess-core/src/core/index.js ***! \***************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _common_class_Name_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/class/Name.js */ \"../common/class/Name.js\");\n\nconst ctxQueue = [];\nclass Jiess extends _common_class_Name_js__WEBPACK_IMPORTED_MODULE_0__.Name {\n contextParam;\n static instance;\n $env = '';\n $render;\n $moTag = 'div';\n JiessComponent;\n constructor(param = {}, contextParam) {\n super('Jiess');\n this.contextParam = contextParam;\n Object.assign(this, param);\n Jiess.instance = this;\n }\n static addCtx(ctx) {\n ctxQueue.push(ctx);\n }\n static removeCtx(ctx) {\n ctxQueue.splice(ctxQueue.indexOf(ctx), 1);\n }\n static useCtx() {\n return ctxQueue[ctxQueue.length - 1];\n }\n useInjects(ctx) {\n if (this.contextParam) {\n const {\n $page,\n ...result\n } = this.contextParam;\n if (typeof $page === 'function') {\n result['$page'] = $page.call(ctx, this);\n }\n return result;\n }\n ;\n }\n}\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Jiess);\n\n//# sourceURL=webpack://JiessPlus/../jiess-core/src/core/index.js?"); /***/ }), /***/ "../jiess-core/src/env/vue3/index.js": /*!*******************************************!*\ !*** ../jiess-core/src/env/vue3/index.js ***! \*******************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ JiessEnv)\n/* harmony export */ });\n/* harmony import */ var _jiess_utils_src_tools_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../jiess-utils/src/tools/index.js */ \"../jiess-utils/src/tools/index.js\");\n/* harmony import */ var _common_enum_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../common/enum/index.js */ \"../common/enum/index.js\");\n/* harmony import */ var _common_static_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../common/static.js */ \"../common/static.js\");\n\n\n\nconst env = _common_enum_index_js__WEBPACK_IMPORTED_MODULE_1__.vue3;\nclass JiessEnv {\n jiess;\n env = env;\n constructor(jiess, cbCpt) {\n this.jiess = jiess;\n this.initRender();\n this.env = jiess.$env = env;\n jiess.JiessComponent = props => {\n const {\n is,\n setup,\n children,\n ...attrs\n } = props;\n const param = {\n is,\n setup,\n jiessEnv: this\n };\n return this.createElement(cbCpt(param).start(attrs, children));\n };\n }\n initRender() {\n const {\n $render\n } = this.jiess;\n if (typeof $render === 'function') {\n this.jiess.h = (...args) => {\n return $render.call(this, ...args);\n };\n }\n }\n createElement(is, param, children) {\n const {\n useDirectives,\n ...attrs\n } = param || {};\n const {\n withDirectives,\n h\n } = this.jiess;\n if (typeof useDirectives === 'function') {\n return withDirectives(h(is, attrs, children), useDirectives());\n } else {\n return h(is, attrs, children);\n }\n }\n createVNode({\n key\n }, callback) {\n const {\n NativeComponent\n } = callback(this);\n return this.createElement(NativeComponent, {\n key\n });\n }\n component(that, cycleCallback) {\n let initCycle = _jiess_utils_src_tools_index_js__WEBPACK_IMPORTED_MODULE_0__.$nfn;\n return {\n inheritAttrs: true,\n data: () => ({\n [_common_static_js__WEBPACK_IMPORTED_MODULE_2__.JIESS_UPDATE]: false\n }),\n created() {\n const frameCtx = this;\n that.frame = frameCtx;\n that.frameProps = frameCtx.$props;\n initCycle = cycleCallback();\n },\n beforeMount() {\n initCycle('beforeMount');\n },\n mounted() {\n initCycle('mounted');\n },\n beforeUpdate() {\n initCycle('beforeUpdate');\n },\n updated() {\n initCycle('updated');\n },\n beforeUnmount() {\n initCycle('beforeUnmount');\n },\n render() {\n this[_common_static_js__WEBPACK_IMPORTED_MODULE_2__.JIESS_UPDATE];\n return that.ctx._buildVNodeTree();\n },\n methods: {\n forceUpdate() {\n this[_common_static_js__WEBPACK_IMPORTED_MODULE_2__.JIESS_UPDATE] = !this[_common_static_js__WEBPACK_IMPORTED_MODULE_2__.JIESS_UPDATE];\n }\n }\n };\n }\n}\n\n//# sourceURL=webpack://JiessPlus/../jiess-core/src/env/vue3/index.js?"); /***/ }), /***/ "../jiess-core/src/index.js": /*!**********************************!*\ !*** ../jiess-core/src/index.js ***! \**********************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ $check: () => (/* binding */ $check),\n/* harmony export */ $component: () => (/* binding */ $component),\n/* harmony export */ $computed: () => (/* binding */ $computed),\n/* harmony export */ $entry: () => (/* binding */ $entry),\n/* harmony export */ $isReactive: () => (/* binding */ $isReactive),\n/* harmony export */ $reactive: () => (/* binding */ $reactive),\n/* harmony export */ $ref: () => (/* binding */ $ref),\n/* harmony export */ $set: () => (/* binding */ $set),\n/* harmony export */ $useComponent: () => (/* binding */ $useComponent),\n/* harmony export */ $watch: () => (/* binding */ $watch),\n/* harmony export */ $watchEffect: () => (/* binding */ $watchEffect),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _common_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils.js */ \"../common/utils.js\");\n/* harmony import */ var _watcher_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./watcher/index.js */ \"../jiess-core/src/watcher/index.js\");\n/* harmony import */ var _common_static_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/static.js */ \"../common/static.js\");\n/* harmony import */ var _core_Component_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./core/Component/index.js */ \"../jiess-core/src/core/Component/index.js\");\n/* harmony import */ var _core_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./core/index.js */ \"../jiess-core/src/core/index.js\");\n\n\n\n\n\nconst reactiveMap = new WeakMap();\nconst computedMap = new WeakMap();\nconst globeComponents = {};\nconst $check = _common_utils_js__WEBPACK_IMPORTED_MODULE_0__.check;\nfunction $watch(proxy, param, callback) {\n const config = {};\n if (param) {\n if (typeof param === 'object') {\n Object.assign(config, param);\n } else {\n config.field = param;\n }\n }\n const obs = new _watcher_index_js__WEBPACK_IMPORTED_MODULE_1__.Watcher().observe({\n $proxy: proxy,\n ...config\n });\n if ((0,_common_utils_js__WEBPACK_IMPORTED_MODULE_0__.check)(obs, 'Observe')) obs.observe(callback);\n}\n;\nconst $watchEffect = (fn, flush = 'async') => {\n return (0,_common_utils_js__WEBPACK_IMPORTED_MODULE_0__.throwError)(fn, 'function', () => new _watcher_index_js__WEBPACK_IMPORTED_MODULE_1__.Watcher().watchEffect(fn, flush));\n};\nconst $isReactive = o => (0,_common_utils_js__WEBPACK_IMPORTED_MODULE_0__.isReactive)(o);\nlet refIndex = 1;\nfunction $ref(value) {\n return $reactive({\n value,\n [_common_static_js__WEBPACK_IMPORTED_MODULE_2__.JIESS_REF]: true,\n __uid: refIndex++\n });\n}\n;\nfunction $reactive(object) {\n return (0,_common_utils_js__WEBPACK_IMPORTED_MODULE_0__.throwError)(object, ['Object', 'Array'], () => {\n let proxy = null;\n if (reactiveMap.has(object)) {\n proxy = reactiveMap.get(object);\n } else {\n proxy = new _watcher_index_js__WEBPACK_IMPORTED_MODULE_1__.Watcher().createProxy(object);\n reactiveMap.set(object, proxy);\n }\n return proxy;\n });\n}\n;\nfunction $computed(val, flush = 'async') {\n return (0,_common_utils_js__WEBPACK_IMPORTED_MODULE_0__.throwError)(val, ['Object', 'Function'], () => {\n let proxy = null;\n if (computedMap.has(val)) {\n proxy = computedMap.get(val);\n } else {\n proxy = new _watcher_index_js__WEBPACK_IMPORTED_MODULE_1__.Watcher().createComputed(val, flush);\n computedMap.set(val, proxy);\n }\n return proxy;\n });\n}\n;\nfunction $component(name, component) {\n (0,_common_utils_js__WEBPACK_IMPORTED_MODULE_0__.throwError)(name, 'string');\n globeComponents[name] = component;\n}\n;\nfunction $useComponent(name) {\n return globeComponents[name] || name;\n}\n;\nfunction $set(proxy, field, value, param = {}) {\n return new _watcher_index_js__WEBPACK_IMPORTED_MODULE_1__.Watcher().bind(proxy, fi