logic-bind-model
Version:
white framework web
1 lines • 697 kB
Source Map (JSON)
{"version":3,"file":"bind-model.node.cjs","sources":["../node_modules/logic-core/src/load-json.cjs","../node_modules/logic-core/src/message.js","../node_modules/logic-core/src/locales/default.js","../node_modules/logic-core/src/message-wrap.bundle.js","../node_modules/logic-core/src/extend-error.js","../node_modules/logic-core/src/type.js","../node_modules/logic-core/src/util.js","../node_modules/logic-core/src/event-emitter.js","../node_modules/logic-core/src/i-object.js","../node_modules/logic-core/src/i-marshal.js","../node_modules/logic-core/src/i-collection.js","../node_modules/logic-core/src/i-collection-property.js","../node_modules/logic-core/src/i-element.js","../node_modules/logic-core/src/i-list.js","../node_modules/logic-core/src/i-control-list.js","../node_modules/logic-core/src/i-collection-array.js","../node_modules/logic-core/src/namespace-manager.js","../node_modules/logic-core/src/meta-registry.js","../node_modules/logic-core/src/meta-object.js","../node_modules/logic-core/src/meta-element.js","../node_modules/logic-core/src/base-collection.js","../node_modules/logic-core/src/collection-array.js","../node_modules/logic-core/src/collection-property.js","../src/locales/default.js","../src/message-wrap.bundle.js","../src/util-wrap.js","../src/i-bind.js","../src/i-bind-command.js","../src/i-bind-model.js","../src/i-command-callback.js","../src/i-model-callback.js","../src/i-service.js","../src/i-service-ajax.js","../src/html-column.js","../src/base-bind.js","../src/base-bind-command.js","../src/bind-command.js","../src/base-bind-model.js","../src/bind-model.js","../index.js"],"sourcesContent":["/**** load-json.cjs loadJSON() CJS module ****/\n//==============================================================\nconst isNode = typeof globalThis.isDOM === 'boolean' ? !globalThis.isDOM : typeof process !== 'undefined' && process.versions !== null && process.versions.node !== null;\n\nasync function loadJSON(filePath) {\n try {\n if (isNode) {\n const path = require('path');\n const fs = require('fs');\n var absolutePath = path.resolve(__dirname, filePath);\n const data = fs.readFileSync(absolutePath, 'utf8');\n const parsed = JSON.parse(data);\n return parsed;\n } else {\n var absolutePath = await getLocalePath(filePath);\n const response = await fetch(absolutePath);\n return await response.json();\n }\n } catch (error) {\n return undefined;\n }\n}\n\nasync function getLocalePath(filename) {\n try {\n if (isNode) {\n const path = require('path');\n return path.resolve(__dirname, filename);\n }\n if (typeof window !== 'undefined') {\n let baseURL = '';\n if (typeof document !== 'undefined' && document.currentScript) {\n baseURL = document.currentScript.src;\n } else {\n baseURL = new URL('./', window.location.href).href;\n }\n return new URL(filename, baseURL).href;\n } \n throw new Error('Unsupported environment');\n\n } catch (error) {\n throw new Error('Unsupported environment');\n }\n}\n\n// exports.loadJSON = loadJSON;\n// exports.__esModule = true;\nmodule.exports = {\n loadJSON,\n default: { loadJSON } // ESM default import 대응\n};","/**** message.js | Message ****/\n//==============================================================\nimport { loadJSON } from './load-json.js';\n\n// inner function\nfunction _isObject(obj) {\n return obj && typeof obj === 'object' && !Array.isArray(obj);\n}\n\nfunction _isString(obj) { // 공백아닌 문자 여부\n if (typeof obj === 'string' && obj.length > 0) return true;\n return false;\n}\nfunction _deepMerge(target, source) {\n for (var key in source) {\n if (source.hasOwnProperty(key)) {\n var targetValue = target[key];\n var sourceValue = source[key];\n if (_isObject(sourceValue)) {\n if (!_isObject(targetValue)) {\n target[key] = {};\n }\n target[key] = _deepMerge(target[key], sourceValue);\n } else {\n target[key] = sourceValue;\n }\n }\n }\n return target;\n}\n\nfunction _getLocale() {\n let locale = '';\n\n if (typeof window !== 'undefined' && typeof navigator !== 'undefined') {\n // 브라우저 환경\n const lang = navigator.languages?.[0] || navigator.language || Intl.DateTimeFormat().resolvedOptions().locale;\n locale = lang.split(/[_-]/)[0]; // \"ko-KR\" -> \"ko\"\n } else if (typeof process !== 'undefined') {\n // Node.js 환경\n const rawLocale = process.env.LANG || process.env.LC_ALL || process.env.LANGUAGE;\n if (rawLocale) {\n locale = rawLocale.split(/[:_.]/)[0].replace('_', '-'); // \"ko_KR.UTF-8\" -> \"ko\"\n }\n }\n return locale || 'en';\n}\n\nfunction _replacePlaceholders (p_template, p_values) {\n let namedValues = {}, indexedValues = [];\n \n if (Array.isArray(p_values)) indexedValues = p_values;\n else if (typeof p_values === 'object') namedValues = p_values;\n\n // `${변수명}` 치환\n p_template = p_template.replace(/\\$\\{(\\w+)\\}/g, function(match, key) {\n return namedValues.hasOwnProperty(key) ? namedValues[key] : match;\n });\n // `$1, $2` 치환\n p_template = p_template.replace(/\\$(\\d+)/g, function(match, index) {\n var i = parseInt(index, 10) - 1;\n return indexedValues[i] !== undefined ? indexedValues[i] : match;\n });\n\n return p_template;\n};\n\n/**\n * 'Message' is a class that manages messages and codes. \n */\nclass Message {\n\n /**\n * Namespace path. ('Common')\n */\n static _NS = 'Common';\n \n /**\n * Internal repository that stores message code. \n */\n static $storage = {\n lang: { default: {} },\n path: [],\n _history: {}\n };\n \n /**\n * Sets whether automatic language detection is enabled. Default is true. \n */\n // static autoDetect = true;\n \n /**\n * Set the default language. Default is 'default'. \n */\n static defaultLang = 'default';\n \n /**\n * Sets the current language. Default is 'default'. \n */\n static currentLang = this.defaultLang;\n \n /**\n * Returns a message that corresponds to the message code. \n * \n * @param {string} p_code Message code\n * @returns {string} Message String\n */\n static getMessageByCode (p_code) {\n var value = this.$storage.lang[this.currentLang]?.[p_code] || this.$storage.lang[this.defaultLang]?.[p_code];\n return typeof value === 'number' ? String(value) : value;\n };\n\n /**\n * Add the message code to the storage. \n * \n * @param {object} p_msg Message Object\n * @param {string} p_path Message file path\n */\n static importMessage (p_msg, p_path) {\n if (_isObject(p_msg)) {\n _deepMerge(this.$storage.lang.default, p_msg);\n if (_isString(p_path)) {\n // if (isNode && isESM) { // REVIEW: esm module & node\n // const { fileURLToPath } = await import('url');\n // const { dirname, resolve } = await import('path');\n\n // const __filename = fileURLToPath(import.meta.url);\n // const __dirname = dirname(__filename);\n // p_path = resolve(__dirname, p_path);\n // }\n if (this.$storage.path.indexOf(p_path) < 0) this.$storage.path.push(p_path);\n }\n }\n // locale = _getLocale();\n // if (locale === 'en') locale = 'default';\n // else await Message.changeLanguage(locale);\n };\n\n /**\n * Change the language. \n * \n * @param {string} p_lang language code\n */\n static async changeLanguage (p_lang) {\n var msg;\n this.currentLang = p_lang;\n if (p_lang === 'default') return;\n for (var i = 0; i < this.$storage.path.length; i++) {\n const localPath = this.$storage.path[i];\n // var msg = await loadJSON(`${localPath}/${p_lang}.json`);\n // initialize the language\n this.$storage.lang[p_lang] = this.$storage.lang[p_lang] || {};\n this.$storage._history[p_lang] = this.$storage._history[p_lang] || [];\n \n const _history = this.$storage._history[p_lang];\n if (_history.indexOf(localPath) >= 0) continue;\n msg = await loadJSON(`${localPath}/${p_lang}.json`);\n\n if (typeof msg === 'object') {\n _deepMerge(this.$storage.lang[p_lang], msg);\n _history.push(localPath);\n } else console.warn(`Path '${localPath}/${p_lang}.json' does not have a file.`);\n }\n }\n\n /**\n * Returns a string corresponding to the given message code. \n * \n * @param {string} p_code Message code\n * @param {object | string[]} p_values Value to replace in message\n * @returns {string} 메시지\n */\n static get (p_code, p_values) {\n var msg = Message.getMessageByCode(p_code);\n var result;\n\n if (typeof msg === 'undefined') {\n return `There is no message for code. '${p_code}'`;\n }\n result = _replacePlaceholders(msg, p_values);\n return $intro(p_code) + result;\n\n // inner funciton\n function $intro(code) {\n var intro = '';\n var firstChar = code.substring(0, 1);\n \n if (firstChar === 'E') intro = 'Error';\n else if (firstChar === 'W') intro = 'Warn';\n return intro + ' ['+ code +'] ';\n }\n };\n\n /**\n * Initialize the language. \n */\n static resetLang () {\n this.currentLang = this.defaultLang;\n }\n\n /**\n * Set the current language by automatically detecting the language. \n */\n static async autoDetect () {\n let locale = _getLocale(); // internal function\n\n if (locale === 'en') locale = 'default';\n await Message.changeLanguage(locale);\n }\n}\n\nexport default Message;\nexport { Message };","/* eslint-disable */\nexport default {\n \"ES010\": \"Other errors\",\n \"ES011\": \"Failed to get module ['$1']\",\n \"ES012\": \"Failed to get function ['$1'()\",\n \"ES013\": \"[$1] failed to process [$2]\",\n \"ES021\": \"[$1] can only be of type [$2]\",\n \"ES022\": \"[$1] is an unprocessable typo\", \n \"ES023\": \"[$1] is not type [$2]\",\n \"ES031\": \"[$1] is not an object\",\n \"ES032\": \"[$1] is not an instance of [$2]\",\n \"ES033\": \"The object in [$1] is different from [$2]\",\n \"ES041\": \"[$1] is duplicated with [$2]\",\n \"ES042\": \"[$2] exists in [$1] and cannot measure [$3]\",\n \"ES043\": \"[$1] cannot be added because [$1] exists in [$1] \",\n \"ES044\": \"[$1] is a reserved word \",\n \"ES051\": \"Required value [$1] not found\",\n \"ES052\": \"[$1] requires [$2]\",\n \"ES053\": \"[$2] does not exist in [$1]\",\n \"ES054\": \"[$1] cannot be blanked\",\n \"ES061\": \"Exceeded the range [$2] of [$1]\",\n \"ES062\": \"[$1] cannot be less than [$2]\",\n \"ES063\": \"[$1] and [$2] have different lengths\",\n \"ES064\": \"and(&) condition check failed. $1\",\n \"ES065\": \"Or(|) condition check failed. $1\",\n \"ES066\": \"[$1] ranges from [$2] to [$3]\",\n \"EL01100\": \"----- util-type.js match -----\",\n \"EL01101\": \"Type match: You must specify a detailed type of $1.$1: $2\",\n \"EL01102\": \"Type match : target is not type '$1'. tarType : $2\",\n \"EL01103\": \"Type match: cannot handle type\",\n \"EL01110\": \"----- match array -----\",\n \"EL01111\": \"Array match: target is not array type. tarType: $1\",\n \"EL01112\": \"Array match : array(_ANY_) type must have at least one element of target array. target.length = $1\",\n \"EL01113\": \"Array match: target array is less than array(_SEQ_) type length. extType.length = $1, target.length = $2\",\n \"EL01114\": \"Array match: array(_SEQ_) [$1]th literal type is different from target value. extType[$1] = $2, target[$1] = $3\",\n \"EL01115\": \"Array match: array(_SEQ_) [$1]th type check failed. extType[$1] = $2\",\n \"EL01116\": \"Array match : array(_REQ_) type must have at least one element of target array. target.length = $1\",\n \"EL01117\": \"Array match : array($1) is the type of array that cannot be handled\",\n \"EL01118\": \"Array match: array element check failed. extType: $1, tarType: $2\",\n \"EL01120\": \"----- match choice -----\",\n \"EL01121\": \"Choice match: 'undefined' is not available for choice(_ANY_) type\",\n \"EL01122\": \"Choice match: 'undefined' only for choice(_NON_) type\",\n \"EL01123\": \"Choice match: Error instance only for choice(_ERR_) type\",\n \"EL01124\": \"Choice match: choice(_EUM_) type details can only be literal. extType[$1]: $2\",\n \"EL01125\": \"Choice match: the first subtype of choice(_DEF_) type is literal only. extType[0]: $1\",\n \"EL01126\": \"Choice match : choice($1) is a type of choice that cannot be handled\",\n \"EL01127\": \"Choice match: choice detailed type check failed. extType: $1, tarType: $2\",\n \"EL01130\": \"----- match class -----\",\n \"EL01131\": \"Class match: Inspection failed after creating class type as union type (opt = 1)\",\n \"EL01132\": \"Class match: target is not an instance of [$1]\",\n \"EL01133\": \"Class match: target is not class, object, or union type. tarType: $1\",\n \"EL01140\": \"----- match union -----\",\n \"EL01141\": \"Union match: target is not union type. tarType: $1\",\n \"EL01142\": \"Union match: target['$1'] key does not exist. extType['$1'] = $2\",\n \"EL01143\": \"Union match: '$1' type check failed\",\n \"EL01150\": \"----- match function -----\",\n \"EL01151\": \"Function match: target is not function type. tarType: $1\",\n \"EL01152\": \"Function match: declared extType.name = '$1' and target name do not match: function.name = '$2'\",\n \"EL01153\": \"Function match : declared extType.func, target.func is not function type\",\n \"EL01154\": \"Function match: extType.func and target.func are different (proto check)\",\n \"EL01155\": \"Function match: You must set the params or return object of the target. extType.param = $1, extType.return = $2\",\n \"EL01156\": \"Function match: params acceptance test denied. <array(_SEQ_) conversion>\",\n \"EL01157\": \"Function Match: Return Acceptance Test Denied\",\n \"EL01200\": \"----- allow -----\",\n \"EL01201\": \"Type allowed: You must specify a subtype of $1.$1: $2\",\n \"EL01202\": \"Type allowed: different from type 1 literal value. extType = $2, tarType = $3\",\n \"EL01203\": \"Type allowed: not type $1. tarType = $2\",\n \"EL01204\": \"Type allowed: type not processable\",\n \"EL01210\": \"----- allow array -----\",\n \"EL01211\": \"Array permit: Not array type. tarType: $1\",\n \"EL01212\": \"Type allowed: array(_ALL_, _OPT_) type is not allowed for array(_ANY_) type. tarType: $1\",\n \"EL01213\": \"Allow array: Only array(_SEQ_) type is allowed for array(_SEQ_) type. tarType: $1\",\n \"EL01214\": \"Array permit: tarType must be equal to or greater than the length of array(_SEQ_) type of extType.length = $1, target.length = $2\",\n \"EL01215\": \"Array Allowance: array(_SEQ_) [$1]th type check failed\",\n \"EL01216\": \"Allow array : Do not allow array(_ALL_, _ANY_, _OPT_) type for array(_REQ_). tarType: $2\",\n \"EL01217\": \"Allow array: Do not allow array(_ALL_, _ANY_) type for array(_OPT_). tarType: $2\",\n \"EL01218\": \"Allow array : array($1) is the type of array that cannot be handled\",\n \"EL01219\": \"Array element check failed. extType: $1, tarType: $2\",\n \"EL01220\": \"----- allow choice -----\",\n \"EL01221\": \"Choice allowed: do not allow choice(_ERR_) type for choice(_ALL_). tarType: $1\",\n \"EL01222\": \"Choice allowed: 'undefined' type is not allowed for choice(_ANY_) type\",\n \"EL01223\": \"Choice allowed: choice(_NON_, _ERR_) type is not allowed for choice(_ANY_) type. tarType: $1\",\n \"EL01224\": \"Choice allowed: only choice(_NON_) type and choice(_NON_) type. tarType: $1\",\n \"EL01225\": \"Choice allowed: choice(_ERR_) type and choice(_ERR_) type only. tarType: $1\",\n \"EL01226\": \"Choice allowed: do not allow choice(_ALL_, _ANY_, _OPT_, _NON_, _ERR_) type for choice(_REQ_). tarType: $1\",\n \"EL01227\": \"Choice allowed: do not allow choice(_ALL_, _ANY_, _NON_, _ERR_) type for choice(_OPT_). tarType: $1\",\n \"EL01228\": \"Choice allowed: choice(_EUM_) type and choice(_EUM_) type only\",\n \"EL01229\": \"Choice allowed: choice(_EUM_) subtype can only be literal. extType[$1]: $2\",\n \"EL0122A\": \"Choice allowed: the subtype of tarType choice(_EUM_) can only be literal. tarType[$1]: $2\",\n \"EL0122B\": \"Choice allowed: choice(_DEF_) type and choice(_DEF_) type only\",\n \"EL0122C\": \"Choice allowed: the first subtype of extType choice(_DEF_) is literal only. extType[0]: $1\",\n \"EL0122D\": \"Choice allowed: the first subtype of tarType choice(_DEF_) is literal only. tarType[0]: $1\",\n \"EL0122E\": \"Choice allowed: choice($1) is a type of choice that cannot be handled\",\n \"EL0122F\": \"Choice allowed: tarType[$1] = $3, no extType allowed. extType = $2\",\n \"EL01230\": \"----- allow class -----\",\n \"EL01231\": \"Class allowed: ExtType, tarType class failed after creating a union type. (opt = 1)\",\n \"EL01232\": \"Class allowed: class to class denied. (opt = $1)\",\n \"EL01233\": \"Class allowed: Inspection failed after creating tarType class type as union type (opt = 1)\",\n \"EL01234\": \"Class allowed: class to union denied. (opt = $1)\",\n \"EL01235\": \"Class allowed: tarType is not class, union type. tarType: $1\",\n \"EL01240\": \"----- allow union -----\",\n \"EL01241\": \"Union allowed: tarType is not a union type. tarType: $1\",\n \"EL01242\": \"Union allowed: tarType['$1'] key does not exist. extType['$1'] = $2\",\n \"EL01243\": \"Union allowed: Type '$1' check failed\",\n \"EL01250\": \"----- allow function -----\",\n \"EL01251\": \"Allow function : tarType is not function type. tarType : $1\",\n \"EL01252\": \"Function allowed: declared extType.name = '$1' and target name do not match: function.name = '$2'\",\n \"EL01253\": \"Function allowed: declared extType.func, target.func is not of function type\",\n \"EL01254\": \"Function allowed: extType.func and target.func are different (proto check)\",\n \"EL01255\": \"Function permit: params or return object of tarType must be set. extType.param = $1, extType.return = $2\",\n \"EL01256\": \"Function permit: params permit test denied. <array(_SEQ_) conversion>\",\n \"EL01257\": \"Function Permitted: Return Permitted Test Denied\",\n \"EL01300\": \"----- util-type.js -----\",\n \"EL01301\": \"Parcing check: function is not a rule: '$1'\",\n \"EL01302\": \"Parcing inspection: function has no argument, body content. '$1'\",\n \"EL01303\": \"Parcing inspection: function parsing failed $1\",\n \"EL01304\": \"Type check: [$1] is a special type to handle\",\n \"EL01305\": \"Type check: array($1) type is a specular type that cannot be handled\",\n \"EL01306\": \"Type check: choice($1) type is a special type that cannot be handled\",\n \"EL01307\": \"Type check: array($1) type is a type that cannot be handled\",\n \"EL01308\": \"Type check: choice($1) type is a type that cannot be handled\",\n \"EL01309\": \"REVIEW:\",\n \"EL0130A\": \"Type allowed: allowType (extType, tarType) scan failed\",\n \"EL0130B\": \"Type match: matchtype (extType, target) check failed\",\n \"EL0130C\": \"ctor is not function type. type aperture = $1\",\n \"EL01400\": \"----- util.js -----\",\n \"EL01401\": \"implements(ctor, obj, args..); ctor is not of type <function> == '$1'\",\n \"EL01402\": \"implements(ctor, obj, args..); obj is not of type <object> type of obj == '$1'\",\n \"EL01403\": \"implements(ctor, obj, args..); args[$1] is not type <function>. type of args[$1] == '$2'\",\n \"EL01404\": \"[$1] must implement type [$2]. $1._KIND = '$3'\",\n \"EL01405\": \"isImplementOf(target); target is of type <function, string> only. type of target = '$1'\",\n \"EL01500\": \"----- etc -----\",\n \"EL01501\": \"$1.$events is obejct type. type of $events $2\",\n \"EL01502\": \"$1.isLog is boolean type. type isLog $2\",\n \"EL01503\": \"on(event, listener); event is not of type <string> type of event == '$1'\",\n \"EL01504\": \"on(event, listener); listener is not of type <function> type of listener == '$1'\",\n \"EL01505\": \"once(event, listener); event is not of string type. typeof event == '$1'\",\n \"EL01506\": \"once(event, listener); listener 는 <function> 타입이 아닙니다. typeof listener == '$1'\",\n \"EL01507\": \"off(event, listener); event is not of type <string> type of event == '$1'\",\n \"EL01508\": \"off(event, listener); listener 는 <function> 타입이 아닙니다. typeof listener == '$1'\",\n \"EL01509\": \"emit(event); event is not of type <string> type of event == '$1'\",\n \"EL01510\": \"\",\n \"EL02100\": \"----- Interface.* -----\",\n \"EL02110\": \"----- i-object.js -----\",\n \"EL02111\": \"getType(): array<function> is an abstract method. [$1] must be implemented\",\n \"EL02112\": \"instanceOf(any): boolean is an abstract method. [$1] must be implemented\",\n \"EL02113\": \"equal(any): boolena is an abstract method. [$1] must be implemented\",\n \"EL02120\": \"----- i-marshal.js -----\",\n \"EL02121\": \"getObject(opt?, origin?) : object is abstract method. [$1] must be implemented\",\n \"EL02122\": \"setObject(mObj) is an abstract method. [$1] must be implemented\",\n \"EL02130\": \"----- i-element.js -----\",\n \"EL02131\": \"clone(): object is an abstract method. [$1] must be implemented\",\n \"EL02140\": \"----- i-list.js -----\",\n \"EL02150\": \"----- i-control-list.js -----\",\n \"EL02151\": \"add(key) is an abstract method. [$1] must be implemented\",\n \"EL02152\": \"del(key) is an abstract method. [$1] must be implemented\",\n \"EL02153\": \"has(key): boolean is an abstract method. [$1] must be implemented\",\n \"EL02154\": \"find(any): any is an abstract method. [$1] must be implemented\",\n \"EL02160\": \"----- i-collection.js -----\",\n \"EL02161\": \"add(any): boolean is an abstract method. [$1] must be implemented\",\n \"EL02162\": \"remove(elem): boolean is an abstract method. [$1] must be implemented\",\n \"EL02163\": \"cantains(any): boolean is an abstract method. [$1] must be implemented\",\n \"EL02164\": \"indexOf(any): number is an abstract method. [$1] must be implemented\",\n \"EL02170\": \"----- i-collection-array.js -----\",\n \"EL02171\": \"insertAt(pos, val, ..): boolean is an abstract method. [$1] must be implemented\",\n \"EL02180\": \"----- i-collection-property.js -----\",\n \"EL02181\": \"indexToKey(idx): string is an abstract method. [$1] must be implemented\",\n \"EL02190\": \"----- i-serialize.js -----\",\n \"EL02191\": \"output(opt, ...): string is an abstract method. [$1] must be implemented\",\n \"EL02192\": \"load(any, ...) is an abstract method. [$1] must be implemented\",\n \"EL02300\": \"----- Meta.Entity.* -----\",\n \"EL03100\": \"----- Meta.* -----\",\n \"EL03110\": \"----- meta-object.js -----\",\n \"EL03111\": \"You cannot create abstract, interface, enum type. $1['_KIND'] = '$2'\",\n \"EL03112\": \"setObject(oGuid, origin); oGuid 는 'object' 타입입니다. typeof oGuid = '$1'\",\n \"EL03113\": \"setObject(oGuid, origin); different namespaces. this._type = $1, oGuid._type = $2\",\n \"EL03114\": \"setObject(oGuid, origin); origin 은 Guid 객체가 아닙니다. origin._type = '$1', origin._guid = '$2'\",\n \"EL03120\": \"----- meta-element.js -----\",\n \"EL03121\": \"$name;val is of type 'string'. type of valve = '$1'\",\n \"EL03122\": \"$name; val.length must be greater than 0\",\n \"EL03200\": \"----- meta-registry.js -----\",\n \"EL03211\": \"register(meta); the meta to register is not a Guide object. meta._type = '$1', meta._guid = '$2'\",\n \"EL03212\": \"register(meta); meta._guid to register is already registered. meta._guid = '$1'\",\n \"EL03213\": \"release(meta); the meta to release is string(guid) | object(guid) type only. type of meta = '$1'\",\n \"EL03220\": \"----- create -----\",\n \"EL03221\": \"createMetaObject(oGuid, origin); oGuid can only be of type 'object'. typeof oGuid = '$1'\",\n \"EL03222\": \"createMetaObject(oGuid, origin); oGuid._type 은 'string' 타입만 가능합니다.(length > 0) typeof oGuid._type = '$1'\",\n \"EL03223\": \"createMetaObject(oGuid, origin); origin can only be of type 'object'. typeof origin = '$1'\",\n \"EL03224\": \"createMetaObject(oGuid, origin);[$1] Namespace is not of type 'function'. type of coClass = '$2'\",\n \"EL03225\": \"createReferObject(meta); meta can only be of type 'object'. type of meta = '$1'\",\n \"EL03226\": \"createReferObject(meta); meta._guid 은 'string' 타입만 가능합니다.(length > 0) typeof meta._guid = '$1'\",\n \"EL03227\": \"createNsReferObject(fun); fun is not type 'function'. type of fun = '$1'\",\n \"EL03230\": \"----- ns Class -----\",\n \"EL03231\": \"register Class(fun, ns, key); fun is not of type 'function'. type of fun = '$1'\",\n \"EL03232\": \"registerClass(fun, ns, key); ns is not of type 'string'. typeofns = '$1'\",\n \"EL03233\": \"register Class(fun, ns, key); key is not of type 'string'. type of key = '$1'\",\n \"EL03234\": \"releaseClass(fullName); fullName 은 'string' 타입만 가능합니다.(length > 0) typeof fullName = '$1'\",\n \"EL03235\": \"findClass(fun); fun is not type 'function'. type of fun = '$1'\",\n \"EL03236\": \"getClass(fullName); fullName can only be of type 'string' (length > 0) type of fullName = '$1'\",\n \"EL03240\": \"----- set, transform, load -----\",\n \"EL03241\": \"setMetaObject(oGuid, meta); oGuid can only be of type 'object'. typeof oGuid = '$1'\",\n \"EL0324\": \"setMetaObject(oGuid, meta); meta can only be of type 'object'. type of meta = '$1'\",\n \"EL03243\": \"setMetaObject(meta); meta._guid can only be of type 'string' (length > 0) type of meta._guid = '$1'\",\n \"EL03244\": \"transformRefer(oGuid); oGuid can only be of type 'object'. type oGuid = '$1'\",\n \"EL03245\": \"transformRefer(oGuid); $1['$2']['$ns'] is not of type 'function'\",\n \"EL03246\": \"loadMetaObject(str, path?); str is only of type 'string'. typeof str = '$1'\",\n \"EL03247\": \"loadMetaObject(str, path?); The object parsed str is not a Guide object. obj._type = '$1', obj._guid = '$2'\",\n \"EL03250\": \"----- has, valid, find -----\",\n \"EL03251\": \"validObject(oGuid); oGuid is only of type 'object'. typeof oGuid = '$1'\",\n \"EL03252\": \"hasGuidObject(oGuid, origin); guid can only be of type 'string' (length > 0) type of guid = '$1'\",\n \"EL03253\": \"hasGuidObject(oGuid, origin); origin[$1]는 'object' 타입이 아닙니다. typeof origin[$1] = '$2'\",\n \"EL03254\": \"hasRefer(oGuid); oGuid can only be of type 'object'. typeof oGuid = '$1'\",\n \"EL03255\": \"hasRefer(oGuid); oGuid is not a Guide object. oGuid._type = '$1', oGuid._guid = '$2'\",\n \"EL03256\": \"findSetObject(oGuid, origin); [ oGuid._guid | oGuid ]는 'string' 타입만 가능합니다.(length > 0) guid = '$1'\",\n \"EL03257\": \"findSetObject(oGuid, origin); origin can only be of type 'object'. typeof origin = '$1'\",\n \"EL03300\": \"----- namespace-manager.js -----\",\n \"EL03310\": \"----- private function, proterty -----\",\n \"EL03311\": \"NamespaceManager.allowOverlap 은 'boolean' 타입만 가능합니다. typeof allowOverlap = $1\",\n \"EL03312\": \"_getArray(ns); ns is not a valid namespace name rule. ns = $1\",\n \"EL03313\": \"_getArray(ns); ns type is 'string', 'array<string>' only typeofns = $1\",\n \"EL03314\": \"_getArray(ns); ns[$1] is not type 'string'. typeofns[$1] = $2\",\n \"EL03315\": \"_getArray(ns); ns[$1] is not a valid name rule. ns[$1] = $1\",\n \"EL03320\": \"----- addNamespace, delNamespace, path -----\",\n \"EL0321\": \"addNamespace(ns); addition of namespace failed\",\n \"EL03322\": \"delNamespace(ns); Namespace deletion failed\",\n \"EL0323\": \"path(ns); failed to get the namespace path\",\n \"EL03330\": \"----- add, del -----\",\n \"EL03331\": \"add(fullName,lem); [$1] is not a valid name rule\",\n \"EL03332\": \"add(fullName,lem);lem is already registered. Allow duplicate [this.allowOverlap = 'true']\",\n \"EL03333\": \"add(fullName,lem); failed to register elements in the namespace\",\n \"EL03334\": \"del(fullName); Failed to delete element in Namespace\",\n \"EL03340\": \"----- getPath, output, load -----\",\n \"EL03341\": \"getPath(elem); no element value. typeoflem = $1\",\n \"EL03342\": \"output (stringify, space); Namespace export failed. $1\",\n \"EL03343\": \"load(str, path); str is not type 'string'. typeofstr = $1\",\n \"EL03344\": \"load(str, path); Namespace loading failed. $1\",\n \"EL04100\": \"----- Collection.* -----\",\n \"EL04110\": \"----- base-collection.js -----\",\n \"EL04111\": \"_remove(idx): boolean is an abstract method. Must be implemented\",\n \"EL04112\": \"setObject(oGuid, origin); _owner connection of oGuid failed. guid = $1\",\n \"EL04113\": \"removeAt(idx); idx is not type 'number'. typeof idx = $1\",\n \"EL04114\": \"add(any): number is an abstract method. must be implemented\",\n \"EL04115\": \"clear() is an abstract method. must be implemented\",\n \"EL04116\": \"map(callback); callback is not function type. type of callback = $1\",\n \"EL04117\": \"filter(callback); callback is not function type. type of callback = $1\",\n \"EL04118\": \"reduce(callback); callback is not function type. type of callback = $1\",\n \"EL04119\": \"find(callback); callback is not function type. type of callback = $1\",\n \"EL041110\": \"forEach(callback); callback is not function type. type of callback = $1\",\n \"EL041111\": \"Some(callback); callback is not function type. type of callback = $1\",\n \"EL041112\": \"Every(callback); callback is not function type. type of callback = $1\",\n \"EL041113\": \"findIndex(callback); callback 이 function 타입이 아닙니다. typeof callback = $1\",\n \"EL04200\": \"\",\n \"EL04210\": \"----- collection-array.js -----\",\n \"EL04211\": \"_elements connection failed for setObject(oGuid, origin); oGuid['_elem'][$1]: guid = $2\",\n \"EL04212\": \"insertAt(pos, value, desc); pos is not type 'number'. typeof pos = $1\",\n \"EL04213\": \"insertAt(pos, value, desc); pos cannot be greater than this.count.pos = $1, count = $2\",\n \"EL04214\": \"insertAt(pos, value, desc); pos cannot be less than 0. pos = $1\",\n \"EL04215\": \"insertAt(pos, value, desc); registration failed. pos = $1, value = $2\",\n \"EL04220\": \"----- collection-property.js -----\",\n \"EL04221\": \"setObject(oGuid, origin); oGuid['_lem'].length = $1 length and oGuid['_key'].length = $2 length are different\",\n \"EL04222\": \"setObject(oGuid, origin); oGuid['_elem'].length = $1 length and oGuid['_desc'].length = $2 length are different\",\n \"EL04223\": \"setObject(oGuid, origin); oGuid._elem[$1] guid not found. guid = $2\",\n \"EL04224\": \"indexOf(obj, isKey); if the index value is found by key, obj must be of type 'string'. typeof obj = $1\",\n \"EL04225\": \"add(name, value, desc); name is not of type 'string'. type of name = $1\",\n \"EL04226\": \"add(name, value, desc); name = '$1' is not valid for name rule. Rule = '$2'\",\n \"EL04227\": \"add(name, value, desc); name = '$1' is the reserved word\",\n \"EL04228\": \"add(name, value, desc); name = '$1' is duplicated with existing name\",\n \"EL04229\": \"add(name, value, desc); addition failed. name = '$1', value = '$2'\",\n \"EL0422A\": \"indexToKey(idx); idx is not of type 'number'. typeof idx = $1\",\n \"EL0422B\": \"exists(key); key is not of type 'string' (length > 0) type of key = $1\",\n \"EL04300\": \"\",\n \"EL04310\": \"----- collection-transaction.js -----\",\n \"EL04311\": \"$1.autoChanges 는 'boolean' 타입입니다. typeof aucoChanges = '$2'\",\n \"EL04320\": \"----- trans-queue.js -----\",\n \"EL04321\": \"collection value is not an instance that inherited [MetaObject]\",\n \"EL04322\": \"collection is not an instance of [ArrayCollection]\",\n \"EL04323\": \"rollback(); '$1' is an unprocessable cmd\",\n \"WS011\": \"[$1] Destination [$2] cannot be deleted\",\n \"EN\": \"OK\"\n}","/**** message-wrap-bundle.js | Message ****/\n//==============================================================\nimport { Message } from './message.js';\nimport defaultCode from './locales/default.js';\n\nconst localesPath = './locales'; // 상대 경로\n\nMessage.importMessage(defaultCode, localesPath);\n\n(async () => {\n await Message.autoDetect();\n})();\n\nexport default Message;\nexport { Message };","/**** extend-error.js | ExtendError ****/\n//==============================================================\nimport Message from './message-wrap.js';\n\n// inner function \nfunction _buildMessageProp(obj) {\n var msg = '';\n for (var prop in obj) {\n if (typeof obj[prop] === 'string') msg += prop + ' : '+ obj[prop] + '\\n';\n else continue;\n }\n return msg;\n}\nfunction _buildMsgQueue(queue) {\n var msg = '';\n var queue_cnt = queue.length;\n for (var i = 0; i < queue_cnt; i++) {\n var mark = '';\n for (var j = 0; j < i; j++) { mark += '#'; }\n msg += '' + mark +' '+ queue[i] + '\\n';\n }\n // for (var i = queue_cnt; i > 0; i--) {\n // var mark = '';\n // for (var j = i; j <= queue_cnt; j++) { mark += '#'; }\n // msg += '' + mark + ' '+ queue[i - 1] + '\\n';\n // }\n return msg.trim();\n}\n\nclass ExtendError extends Error {\n\n static _NS = 'Common'; // namespace\n\n /**\n * Save previously generated messages. \n * \n * @member {string[]} ExtendError#queue\n */\n queue = [];\n\n /**\n * Error message related to property type. \n * \n * @member {object} ExtendError#prop\n */\n prop = {};\n\n /**\n * Use user messages to create an ExtendError instance. \n *\n * @param {string} msg Error message string\n * @param {ExtendError | object | null} causeOrProp Error message by existing ExtendError, Error object or property\n *\n * @example\n * throw new ExtendError(\"Custom error message\");\n * throw new ExtendError(\"Custom error message\", error);\n * throw new ExtendError(\"Custom error message\", { style: \"required\" });\n */\n\n /**\n * Create an instance of 'ExtendError' using the message code and substitution value. \n *\n * @param {RegExp} msgPattern Code value of regular expression type\n * @param {ExtendError | object | null} causeOrProp Error message by existing ExtendError, Error object or property\n * @param {string[]} placeholders Array of strings containing substitution values such as '$1' and '$2' in the\n *\n * @example\n * // For messages that do not have a substitution value\n * throw new ExtendError(/EL01504/);\n * throw new ExtendError(/EL01504/, error);\n * throw new ExtendError(/EL01504/, { style: \"required\" });\n * // For messages with substitution values\n * throw new ExtendError(/EL01504/, undefined, ['value1', 'value2']);\n * throw new ExtendError(/EL01504/, error, ['value1', 'value2']););\n * throw new ExtendError(/EL01504/, { style: \"required\" }, ['value1', 'value2']);\n */\n constructor(p_msg, p_prop, p_codeVal) {\n super();\n \n var _build = '';\n var _prop;\n var _queue = []; \n var _msg;\n\n if (p_prop instanceof ExtendError) {\n _queue = p_prop.queue;\n _prop = p_prop.prop;\n } else if (p_prop instanceof Error) {\n _queue.push(p_prop.message);\n } else if (typeof p_prop === 'object' && p_prop !== null) {\n _prop = p_prop;\n }\n \n if (typeof p_msg === 'string') {\n _msg = p_msg;\n } else if (p_msg instanceof RegExp) {\n _msg = Message.get(p_msg.source, p_codeVal);\n } else _msg = 'An unknown error occurred.';\n \n // _build = _msg + '\\n';\n _queue.push(_msg);\n\n if (_prop) _build += _buildMessageProp(_prop);\n if (_queue.length > 0) _build += _buildMsgQueue(_queue);\n \n this.message = _build;\n this.queue = _queue;\n // this.queue.push(_msg);\n }\n\n /**\n * Converts error messages into strings. \n * \n * @return error message string\n */\n toString() {\n return 'ExtendError : ' + this.message;\n }\n}\n\nexport default ExtendError;\nexport { ExtendError };","/**** util-type.js Type ****/\n//==============================================================\nimport ExtendError from './extend-error.js';\n \nvar _global = globalThis;\nvar OLD_ENV = _global.OLD_ENV ? _global.OLD_ENV : false; // 커버리지 테스트 역활\n\n/**\n * This is a type module.\n */\nvar Type = {};\n\n/**\n * object 와 new 생성한 사용자 함수를 제외한 객쳐 여부 \n * \n * @param {*} obj \n * @returns {boolean}\n */\nfunction _isPrimitiveObj(obj) { // REVIEW: 정리 필요, 의미적으로 명료하게..\n if(typeof obj === 'object' && obj !== null \n && (obj instanceof RegExp || obj instanceof Date )) {\n return true;\n }\n return false;\n}\n\n/**\n * 최상위 object 이거나 사용자 함수에서 생성한 객체 여부 \n * \n * @param {*} obj \n * @returns {boolean}\n */\nfunction _isObject(obj) { // REVIEW: 정리 필요, 의미적으로 명료하게\n if(typeof obj === 'object' && obj !== null && !_isPrimitiveObj(obj)) {\n return true;\n }\n return false;\n}\n\n/**\n * 공백객체 인지 확인 \n * \n * @param {*} obj 검사대상\n * @returns {boolean}\n */\nfunction _isEmptyObj(obj) {\n if(_isObject(obj) && Object.keys(obj).length === 0 && getAllProperties(obj).length === 0) return true;\n return false;\n}\n\n/**\n * 공백이 아닌 객체 (prototype 및 속성 있는것) \n * \n * @param {*} obj 대상 \n * @returns {boolean}\n */\nfunction _isFillObj(obj) {\n if(_isObject(obj) && getAllProperties(obj).length > 0) return true;\n return false;\n}\n\n/**\n * 내장함수 유무 \n * \n * @param {*} obj \n * @returns {boolean}\n */\nfunction _isBuiltFunction(obj) {\n if (typeof obj === 'function' && (false \n || obj === Number || obj === String || obj === Boolean\n || obj === Object || obj === Array || obj === Function\n || obj === RegExp || obj === Date \n || obj === Symbol || obj === BigInt\n )) return true;\n return false;\n}\n\n/**\n * 첫문자 대문자 여부 \n * \n * @param {string} strValue \n * @returns {boolean}\n */\nfunction _isUpper(strValue) {\n var firstStr = strValue.charAt(0);\n if (firstStr === '') return false;\n if(firstStr === firstStr.toUpperCase()) return true;\n return false;\n}\n\n/**\n * 리터럴 여부 \n * number, string, boolean, bigint, RexExp instance \n * \n * @param {*} obj \n * @returns {boolean}\n */\nfunction _isLiteral(obj) {\n if (typeof obj === 'number') return true;\n if (typeof obj === 'string') return true;\n if (typeof obj === 'boolean') return true;\n if (typeof obj === 'bigint') return true;\n if (obj instanceof RegExp) return true;\n return false;\n}\n\n/**\n * 리터럴값 비교 \n * number, string, boolean, bigint, RexExp instance \n * \n * @param {*} obj1 \n * @param {*} obj2 \n * @returns {boolean}\n */\nfunction _equalLiternal(obj1, obj2) {\n if (obj1 === obj2) return true;\n if (obj1 instanceof RegExp && obj2 instanceof RegExp && obj1.source === obj2.source) return true;\n return false;\n}\n\n/**\n * function 생성하는 생성자\n * @param {*} type \n * @returns {object}\n */\nvar _creator = function(type) {\n return new type;\n};\n\n/**\n * 타임명 얻기 \n * \n * @param {*} obj \n * @returns {string}\n */\nfunction _typeName(obj) {\n return obj['name'];\n}\n\n/**\n * kind 코드, 대문자로 얻기 '_any_'... \n * \n * @param {*} val \n * @returns {string}\n */\nfunction _getKeyCode(val) {\n var reg = /^_[a-zA-Z]+_/;\n var result;\n\n if (typeof val !== 'string') return '';\n result = reg.exec(val);\n if (result !== null) return result[0].toUpperCase();\n return '';\n}\n\n// 배열 구조 분해 할당을 해제 \nfunction restoreArrowFunction(transformedCode) {\n // 1. 화살표 함수의 매개변수와 본문 전체를 추출\n const regex = /\\((.*?)\\)\\s*=>\\s*\\{([\\s\\S]*)\\}/;\n const match = transformedCode.match(regex);\n \n // 특별히 `_ref => { ... }` 형태도 대응할 수 있도록 추가 처리\n // -> _ref => { let [String] = _ref; return Number; }\n // -> 실제로는 ( _ref ) => { ... } 형태로 통일\n if (!match) {\n // 혹시 _ref => { ... } 형태라면, 강제로 괄호를 넣어 재시도\n const altRegex = /^(.*?)\\s*=>\\s*\\{([\\s\\S]*)\\}/;\n const altMatch = transformedCode.match(altRegex);\n if (!altMatch) {\n throw new Error('Invalid arrow function format.');\n }\n // altMatch[1] = \"_ref\"\n // altMatch[2] = \"let [String] = _ref; return Number;\"\n let altParams = altMatch[1].trim();\n let altBody = altMatch[2].trim();\n \n // 화살표 함수 형태 통일: ( _ref ) => { ... }\n return restoreArrowFunction(`(${altParams}) => {${altBody}}`);\n }\n \n // 2. 매개변수와 함수 본문 부분 분리\n let params = match[1].trim(); // 함수의 매개변수 부분\n let body = match[2].trim(); // 함수 본문\n \n // 3. 구조 분해 할당 패턴 (객체/배열 모두 대응) - 여러 줄(줄바꿈)도 허용\n // 예: let { aa: String } = _ref5; 또는 let [[{ bb: Number }]] = _ref6;\n const paramAssignments = body.match(/let\\s+(\\{[\\s\\S]*?\\}|\\[[\\s\\S]*?\\])\\s*=\\s*(\\w+);/g) || [];\n \n // 4. 찾아낸 구조 분해 할당들을 순회하며 매개변수( _ref5, _ref6 등 )를 원래 형태로 치환\n paramAssignments.forEach(assign => {\n // - parts[1]: { aa: String } 또는 [String] 등 (줄바꿈 포함 가능)\n // - parts[2]: _ref5, _ref6 등\n const parts = assign.match(/let\\s+(\\{[\\s\\S]*?\\}|\\[[\\s\\S]*?\\])\\s*=\\s*(\\w+);/);\n if (parts) {\n const extractedParam = parts[1].trim(); // 원래 구조\n const originalParam = parts[2].trim(); // 변환된 변수명 (_ref5 등)\n \n // 매개변수 목록에 있던 _ref5 등을 { aa: String } 등으로 치환\n const re = new RegExp(`\\\\b${originalParam}\\\\b`, 'g');\n params = params.replace(re, extractedParam);\n }\n });\n \n // 5. return 문이 있다면 반환값을 추출\n // 예: return Number; -> \"Number\"\n const returnStatementMatch = body.match(/return\\s+(.*?);/);\n let returnType = returnStatementMatch ? returnStatementMatch[1].trim() : '';\n \n // 6. 최종 복원 – return 문이 있다면 { return ... } 형태로, 없으면 { } 로\n if (returnType) {\n // 불필요한 공백 없애기 위해 파라메터 부분도 스페이스 정리\n params = params.replace(/\\s+/g, '');\n return `(${params})=>{return ${returnType}}`;\n } else {\n params = params.replace(/\\s+/g, '');\n return `(${params})=>{}`;\n }\n}\n\n/**\n * 함수 규칙 \n * - (params 내부에는 '()' 입력 금지) \n * - 참조형 타입 금지 : new Function() 시점에 자동 해석됨 \n * \n * @param {*} funBody \n * @returns {object}\n */\nfunction _parseFunc(funBody) {\n var syntax1 = /\\([,_\\[\\]{:}\\w\\s]*\\)\\s*(?:=>)?\\s*{\\s*.*\\s*.*\\s*}/; // 제한 규칙\n var syntax2 = /(\\(.*\\)|\\w+)\\s*(?:=>).*/;\n var regFunc1 = /(?:function\\s)?\\(([\\[\\]{:}\\s\\w,]*)\\)\\s*(?:=>)?\\s*{(?:\\s*return\\s+|\\s*)?([\\[\\]{:}\\s\\w,]*);?\\s*}/;\n var regFunc2 = /\\(?([\\[\\]{:}\\s\\w,]*)\\)?\\s*(?:=>)\\s*{?(?:\\s*return\\s+|\\s*)?([\\[\\]\\s\\w,]*);?\\s*}?/;\n \n var arrFunc;\n var result = { params: [], return: undefined };\n var arrParam = [];\n var arrRetrun;\n \n // 배열 구조 분해 할당을 해제 \n if (/\\blet\\b/.test(funBody)) funBody = restoreArrowFunction(funBody);\n \n funBody = $skipComment(funBody);\n\n try {\n if (syntax1.test(funBody)) arrFunc = regFunc1.exec(funBody);\n else if (syntax2.test(funBody)) arrFunc = regFunc2.exec(funBody);\n else throw new ExtendError(/EL01301/, null, [funBody]);\n \n if (arrFunc === null) throw new ExtendError(/EL01302/, null, [funBody]);\n\n arrParam = (new Function('return ['+ arrFunc[1] +']'))();\n result['params'] = arrParam;\n \n if (arrFunc[2] !== '') arrRetrun = (new Function('return '+ arrFunc[2]))();\n result['return'] = arrRetrun;\n\n } catch (error) {\n throw new ExtendError(/EL01303/, error, ['']);\n }\n\n return result;\n\n // inner function\n function $skipComment(body) { // 주석 제거 comment\n var rBody = body;\n var bloackComment = /\\/\\*[^](.*?)\\*\\//g;\n var lineComment = /\\/\\/[^](.*?)(\\n|$)/g;\n\n rBody = rBody.replace(bloackComment, '');\n rBody = rBody.replace(lineComment, '');\n return rBody;\n }\n}\n\n/**\n * 타입 여부 \n * \n * @param {string} name \n * @returns {boolean}\n */\nfunction _hasType(name) {\n var arr = [];\n \n if (typeof name !== 'string') return false;\n\n arr = arr.concat(['null', 'undefined', 'number', 'string', 'boolean']);\n arr = arr.concat(['array', 'function', 'object']);\n arr = arr.concat(['choice', 'union', 'class']);\n arr = arr.concat(['symbol', 'bigint', 'regexp']);\n arr = arr.concat(['etc']); // 예외 오류 코드 검출 \n\n return arr.indexOf(name) > -1;\n}\n\n/**\n * 타입 여부 \n * \n * @param {string} name \n * @returns {boolean}\n */\nfunction _isLeafType(name) {\n var arr = [];\n \n arr = arr.concat(['null', 'undefined', 'number', 'string', 'boolean']);\n arr = arr.concat(['symbol', 'bigint', 'regexp', 'object']);\n\n return arr.indexOf(name) > -1;\n}\n\n/**\n * choice type kind 여부 \n * \n * @param {string} name \n * @returns {boolean}\n */\nfunction _hasKindChoice(name) {\n var arr = [];\n \n if (typeof name !== 'string') return false;\n \n arr = arr.concat(['_ALL_', '_ANY_', '_NON_', '_ERR_']);\n arr = arr.concat(['_REQ_', '_OPT_', '_DEF_', '_EUM_']);\n arr = arr.concat(['_ETC_']); // 예외 오류 코드 검출 \n\n return arr.indexOf(name) > -1;\n}\n\n/**\n * choice type kind 여부 \n * \n * @param {string} name \n * @returns {boolean}\n */\nfunction _hasKindArray(name) {\n var arr = [];\n \n if (typeof name !== 'string') return false;\n\n arr = arr.concat(['_ALL_', '_ANY_']);\n arr = arr.concat(['_REQ_', '_OPT_', '_SEQ_']);\n arr = arr.concat(['_ETC_']); // 예외 오류 코드 검출 \n\n return arr.indexOf(name) > -1;\n}\n\n/**\n * Query all properties of the object.\n * \n * @param {object} obj Object to look up properties (except Object)\n * @param {boolean?} hasObj Whether to include properties of 'Object'\n * @returns {array<string>} Property Name Arrangement\n */\nfunction getAllProperties(obj, hasObj) {\n var allProps = [], cur = obj;\n var is = hasObj || false;\n do {\n var props = Object.getOwnPropertyNames(cur);\n for (var i = 0; i < props.length; i++) {\n var prop = props[i];\n if (allProps.indexOf(prop) === -1 && (is || !Object.prototype.hasOwnProperty(prop))) allProps.push(prop);\n }\n } while (cur = Object.getPrototypeOf(cur));\n return allProps;\n}\nType.getAllProperties = getAllProperties;\n\n/**\n * Compare the two objects to see if they are the same (except Prototype) \n * \n * @param {any} obj1 Source object\n * @param {any} obj2 Object to compare\n * @returns {boolean} Whether the two objects are the same ('true' or 'false')\n */\nfunction deepEqual(obj1, obj2) {\n // 두 객체가 동일한 참조를 가지면 true를 반환\n if (obj1 === obj2) return true;\n\n // 두 객체 중 하나가 null이거나 타입이 다르면 false를 반환\n if (obj1 === null || obj2 === null || typeof obj1 !== typeof obj2) return false;\n\n // 함수 비교\n if (typeof obj1 === 'function' && typeof obj2 === 'function') {\n return obj1.toString() === obj2.toString();\n }\n\n // 원시 값 비교\n if (typeof obj1 !== 'object' || typeof obj2 !== 'object') return false;\n\n // 배열 비교\n if (Array.isArray(obj1) && Array.isArray(obj2)) {\n if (obj1.length !== obj2.length) return false;\n for (var i = 0; i < obj1.length; i++) {\n if (!deepEqual(obj1[i], obj2[i])) return false;\n }\n return true;\n }\n\n // 객체 비교\n // var keys1 = Object.keys(obj1);\n // var keys2 = Object.keys(obj2);\n var keys1 = Object.getOwnPropertyNames(obj1);\n var keys2 = Object.getOwnPropertyNames(obj2);\n\n if (keys1.length !== keys2.length) return false;\n\n for (var j = 0; j < keys1.length; j++) {\n var key = keys1[j];\n if (keys2.indexOf(key) === -1 || !deepEqual(obj1[key], obj2[key])) return false;\n }\n\n return true;\n}\nType.deepEqual = deepEqual;\n\n/**\n * Gets the type of the given function (generator). (Can include '_UNION') \n * The returned arrays are included in order from the specified function. \n * \n * @param {function} ctor Generator function or class\n * @param {boolean} [hasUnion= true] whether '_UNION' is included (default: 'true')\n * @returns {array<function>} Array function type\n */\nfunction getTypes(ctor, hasUnion) {\n var arr = [];\n var tempArr = [];\n var union;\n var proto;\n\n hasUnion = hasUnion === false ? false : true;\n \n if (typeof ctor !== 'function') throw new ExtendError(/EL0130C/, null, [typeof ctor]);\n\n arr.push(ctor);\n