@dooboostore/simple-boot-http-server-ssr 1.0.12 → 1.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/README.MD +1 -3
  2. package/dist/cjs/filters/IntentSchemeFilter.js.map +2 -2
  3. package/dist/cjs/filters/SSRDomParserFilter.js +186 -0
  4. package/dist/cjs/filters/SSRDomParserFilter.js.map +7 -0
  5. package/dist/cjs/filters/SSRFilter.js +1 -1
  6. package/dist/cjs/filters/SSRFilter.js.map +2 -2
  7. package/dist/cjs/filters/SSRLinkDomDomFilter.js +183 -0
  8. package/dist/cjs/filters/SSRLinkDomDomFilter.js.map +7 -0
  9. package/dist/cjs/initializers/DomParserInitializer.js +79 -0
  10. package/dist/cjs/initializers/DomParserInitializer.js.map +7 -0
  11. package/dist/cjs/initializers/LinkedomInitializer.js +81 -0
  12. package/dist/cjs/initializers/LinkedomInitializer.js.map +7 -0
  13. package/dist/cjs/proxy/SymbolIntentApiServiceProxy.js +85 -73
  14. package/dist/cjs/proxy/SymbolIntentApiServiceProxy.js.map +2 -2
  15. package/dist/cjs/proxy/SymbolIntentApiServiceProxyBase.js +2 -77
  16. package/dist/cjs/proxy/SymbolIntentApiServiceProxyBase.js.map +2 -2
  17. package/dist/esm/filters/IntentSchemeFilter.js.map +2 -2
  18. package/dist/esm/filters/SSRDomParserFilter.js +163 -0
  19. package/dist/esm/filters/SSRDomParserFilter.js.map +7 -0
  20. package/dist/esm/filters/SSRFilter.js +1 -1
  21. package/dist/esm/filters/SSRFilter.js.map +2 -2
  22. package/dist/esm/filters/SSRLinkDomDomFilter.js +160 -0
  23. package/dist/esm/filters/SSRLinkDomDomFilter.js.map +7 -0
  24. package/dist/esm/initializers/DomParserInitializer.js +46 -0
  25. package/dist/esm/initializers/DomParserInitializer.js.map +7 -0
  26. package/dist/esm/initializers/LinkedomInitializer.js +48 -0
  27. package/dist/esm/initializers/LinkedomInitializer.js.map +7 -0
  28. package/dist/esm/proxy/SymbolIntentApiServiceProxy.js +85 -73
  29. package/dist/esm/proxy/SymbolIntentApiServiceProxy.js.map +2 -2
  30. package/dist/esm/proxy/SymbolIntentApiServiceProxyBase.js +2 -77
  31. package/dist/esm/proxy/SymbolIntentApiServiceProxyBase.js.map +2 -2
  32. package/dist/esm-bundle/dooboostore-simple-boot-http-server-ssr.esm.js +1184 -525
  33. package/dist/esm-bundle/dooboostore-simple-boot-http-server-ssr.esm.js.map +4 -4
  34. package/dist/types/filters/IntentSchemeFilter.d.ts.map +1 -1
  35. package/dist/types/filters/SSRDomParserFilter.d.ts +57 -0
  36. package/dist/types/filters/SSRDomParserFilter.d.ts.map +1 -0
  37. package/dist/types/filters/SSRLinkDomDomFilter.d.ts +57 -0
  38. package/dist/types/filters/SSRLinkDomDomFilter.d.ts.map +1 -0
  39. package/dist/types/index.d.ts +0 -19
  40. package/dist/types/initializers/DomParserInitializer.d.ts +11 -0
  41. package/dist/types/initializers/DomParserInitializer.d.ts.map +1 -0
  42. package/dist/types/initializers/LinkedomInitializer.d.ts +11 -0
  43. package/dist/types/initializers/LinkedomInitializer.d.ts.map +1 -0
  44. package/dist/types/proxy/SymbolIntentApiServiceProxy.d.ts +2 -0
  45. package/dist/types/proxy/SymbolIntentApiServiceProxy.d.ts.map +1 -1
  46. package/dist/types/proxy/SymbolIntentApiServiceProxyBase.d.ts +0 -8
  47. package/dist/types/proxy/SymbolIntentApiServiceProxyBase.d.ts.map +1 -1
  48. package/dist/umd-bundle/dooboostore-simple-boot-http-server-ssr.umd.js +1184 -525
  49. package/dist/umd-bundle/dooboostore-simple-boot-http-server-ssr.umd.js.map +4 -4
  50. package/package.json +16 -14
  51. package/src/filters/IntentSchemeFilter.ts +51 -48
  52. package/src/filters/SSRDomParserFilter.ts +233 -0
  53. package/src/filters/SSRFilter.ts +2 -2
  54. package/src/filters/SSRLinkDomDomFilter.ts +227 -0
  55. package/src/initializers/DomParserInitializer.ts +70 -0
  56. package/src/initializers/LinkedomInitializer.ts +69 -0
  57. package/src/proxy/SymbolIntentApiServiceProxy.ts +100 -116
  58. package/src/proxy/SymbolIntentApiServiceProxyBase.ts +7 -85
  59. package/tsconfig.json +2 -1
@@ -36,9 +36,9 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
36
36
  ));
37
37
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
38
38
 
39
- // ../../node_modules/.pnpm/node-gzip@1.1.2/node_modules/node-gzip/dist/index.js
39
+ // ../../../node_modules/.pnpm/node-gzip@1.1.2/node_modules/node-gzip/dist/index.js
40
40
  var require_dist = __commonJS({
41
- "../../node_modules/.pnpm/node-gzip@1.1.2/node_modules/node-gzip/dist/index.js"(exports, module) {
41
+ "../../../node_modules/.pnpm/node-gzip@1.1.2/node_modules/node-gzip/dist/index.js"(exports, module) {
42
42
  "use strict";
43
43
  var zlib = __require("zlib");
44
44
  module.exports = {
@@ -246,6 +246,14 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
246
246
  const isConstructorLike = (fn) => {
247
247
  return typeof fn === "function" && typeof fn.prototype !== "undefined";
248
248
  };
249
+ ValidUtils2.isUrl = (str) => {
250
+ try {
251
+ new URL(str);
252
+ return true;
253
+ } catch (_) {
254
+ return false;
255
+ }
256
+ };
249
257
  ValidUtils2.isFrozen = (obj) => {
250
258
  return Object.isFrozen(obj);
251
259
  };
@@ -682,57 +690,70 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
682
690
  if (Path2.isFunctionScript(path2) || Path2.isArrowFunctionScript(path2)) {
683
691
  return path2;
684
692
  }
685
- if (path2.includes(" ? ") && path2.includes(" : ")) {
686
- const parts = path2.split(/(\s+\?\s+|\s+:\s+)/);
687
- const result = parts.map((part, index) => {
688
- if (index === 0) {
689
- const tokens2 = part.match(/[^?.[\]]+|\[[^\]]*\]/g);
690
- if (tokens2 && tokens2.length > 1) {
691
- return tokens2.join("?.");
692
- }
693
+ const nullishCoalescingPlaceholder = "__NULLISH_COALESCING__";
694
+ const hasNullishCoalescing = path2.includes("??");
695
+ let tempPath = path2;
696
+ if (hasNullishCoalescing) {
697
+ tempPath = tempPath.replace(/\?\?/g, nullishCoalescingPlaceholder);
698
+ }
699
+ const ternaryMatch = tempPath.match(/\?\s+[^:]*:/);
700
+ if (ternaryMatch) {
701
+ const questionMarkIndex = tempPath.indexOf("?");
702
+ const colonIndex = tempPath.indexOf(":", questionMarkIndex);
703
+ if (questionMarkIndex !== -1 && colonIndex !== -1) {
704
+ const charAfterQuestion = tempPath.charAt(questionMarkIndex + 1);
705
+ if (charAfterQuestion === " " || charAfterQuestion === " " || charAfterQuestion === "\n") {
706
+ const condition = tempPath.substring(0, questionMarkIndex).trim();
707
+ const trueBranch = tempPath.substring(questionMarkIndex + 1, colonIndex).trim();
708
+ const falseBranch = tempPath.substring(colonIndex + 1).trim();
709
+ const processedCondition = Path2.toOptionalChainPath(condition);
710
+ const processedTrueBranch = Path2.toOptionalChainPath(trueBranch);
711
+ const processedFalseBranch = Path2.toOptionalChainPath(falseBranch);
712
+ const finalResult = `${processedCondition} ? ${processedTrueBranch} : ${processedFalseBranch}`;
713
+ return hasNullishCoalescing ? finalResult.replace(new RegExp(nullishCoalescingPlaceholder, "g"), "??") : finalResult;
693
714
  }
694
- return part;
695
- });
696
- return result.join("");
715
+ }
697
716
  }
698
- if (path2.includes("(")) {
717
+ if (tempPath.includes("(")) {
699
718
  const functionCallMatches = [];
700
- let tempPath = path2;
719
+ let workingPath = tempPath;
701
720
  let counter = 0;
702
721
  const functionCallRegex = /(\w+)\(([^()]*(?:\([^()]*\)[^()]*)*)\)/g;
703
722
  let match;
704
- while ((match = functionCallRegex.exec(path2)) !== null) {
723
+ while ((match = functionCallRegex.exec(tempPath)) !== null) {
705
724
  const fullMatch = match[0];
706
725
  const funcName = match[1];
707
726
  const funcArgs = match[2];
708
727
  const placeholder = `__FUNC_CALL_${counter}__`;
709
- const processedArgs = funcArgs ? Path2.toOptionalChainPath(funcArgs) : "";
728
+ let processedArgs = funcArgs ? Path2.toOptionalChainPath(funcArgs) : "";
729
+ processedArgs = processedArgs.replace(/\?\.\s*$/, "");
710
730
  const processedFuncCall = `${funcName}?.(${processedArgs})`;
711
731
  functionCallMatches.push({
712
732
  original: fullMatch,
713
733
  processed: processedFuncCall,
714
734
  placeholder
715
735
  });
716
- tempPath = tempPath.replace(fullMatch, placeholder);
736
+ workingPath = workingPath.replace(fullMatch, placeholder);
717
737
  counter++;
718
738
  }
719
- const tokens2 = tempPath.match(/[^?.[\]]+|\[[^\]]*\]/g);
739
+ const tokens2 = workingPath.match(/[^?.[\]]+|\[[^\]]*\]/g);
720
740
  let processedPath = "";
721
741
  if (tokens2 && tokens2.length > 1) {
722
742
  processedPath = tokens2.join("?.");
723
743
  } else {
724
- processedPath = tempPath;
744
+ processedPath = workingPath;
725
745
  }
726
746
  for (const funcMatch of functionCallMatches) {
727
747
  processedPath = processedPath.replace(funcMatch.placeholder, funcMatch.processed);
728
748
  }
729
- return processedPath;
749
+ return hasNullishCoalescing ? processedPath.replace(new RegExp(nullishCoalescingPlaceholder, "g"), "??") : processedPath;
730
750
  }
731
- const tokens = path2.match(/[^?.[\]]+|\[[^\]]*\]/g);
751
+ const tokens = tempPath.match(/[^?.[\]]+|\[[^\]]*\]/g);
732
752
  if (!tokens) {
733
- return path2;
753
+ return hasNullishCoalescing ? path2 : path2;
734
754
  }
735
- return tokens.join("?.");
755
+ const result = tokens.join("?.");
756
+ return hasNullishCoalescing ? result.replace(new RegExp(nullishCoalescingPlaceholder, "g"), "??") : result;
736
757
  };
737
758
  Path2.removeOptionalChainOperator = (path2) => {
738
759
  if (!path2) {
@@ -973,7 +994,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
973
994
  const func = new Function("window", "document", "console", `"use strict"; ${script}; `);
974
995
  func.call(destUser, globalContext.window, globalContext.document, globalContext.console);
975
996
  } catch (e) {
976
- console.error("detectPathFromScript error:", e);
997
+ console.error("detectPathFromScript error:", script, e);
977
998
  }
978
999
  if (options?.excludeThis) {
979
1000
  const filteredVars = /* @__PURE__ */ new Set();
@@ -1105,117 +1126,6 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
1105
1126
  return window2.aroundStorage;
1106
1127
  };
1107
1128
 
1108
- // ../core/dist/esm/string/StringUtils.js
1109
- var StringUtils;
1110
- ((StringUtils2) => {
1111
- StringUtils2.deleteEnter = (data) => {
1112
- return data.replace(/\r?\n/g, "");
1113
- };
1114
- StringUtils2.pickEmoji = (data) => {
1115
- return data.match(/[\p{Emoji}]/gu) ?? [];
1116
- };
1117
- StringUtils2.regexExec = (regex, text) => {
1118
- let varExec = regex.exec(text);
1119
- const usingVars = [];
1120
- while (varExec) {
1121
- usingVars.push(varExec);
1122
- varExec = regex.exec(varExec.input);
1123
- }
1124
- return usingVars;
1125
- };
1126
- StringUtils2.regexExecArrayReplace = (origin, regexpExecArrayOrRegex, replace) => {
1127
- const regexpExecArrays = Array.isArray(regexpExecArrayOrRegex) ? regexpExecArrayOrRegex : StringUtils2.regexExec(regexpExecArrayOrRegex, origin);
1128
- regexpExecArrays.reverse().forEach((it) => {
1129
- const r = typeof replace === "string" ? replace : replace(it);
1130
- origin = origin.substr(0, it.index) + origin.substr(it.index).replace(it[0], r);
1131
- });
1132
- return origin;
1133
- };
1134
- StringUtils2.escapeSpecialCharacterRegExp = (data) => {
1135
- return data.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1136
- };
1137
- StringUtils2.trim = (data) => data.trim();
1138
- StringUtils2.rsubString = (data_s, blen_n) => data_s.substring(data_s.length - blen_n, data_s.length);
1139
- StringUtils2.lsubString = (data_s, alen_n) => data_s.substring(0, alen_n);
1140
- StringUtils2.lpad = (fill_s, len_n, full_s) => {
1141
- while (len_n > full_s.length) {
1142
- full_s = fill_s + full_s;
1143
- }
1144
- return StringUtils2.rsubString(full_s, len_n);
1145
- };
1146
- StringUtils2.rpad = (fill_s, len_n, full_s) => {
1147
- while (len_n > full_s.length) {
1148
- full_s += fill_s;
1149
- }
1150
- return StringUtils2.lsubString(full_s, len_n);
1151
- };
1152
- StringUtils2.lappend = (count_n, input_s) => {
1153
- let s = "";
1154
- let i = 0;
1155
- while (i++ < count_n) {
1156
- s += input_s;
1157
- }
1158
- return s;
1159
- };
1160
- StringUtils2.unescape = (html) => {
1161
- if (!html) return "";
1162
- const htmlEntity = {
1163
- quot: '"',
1164
- amp: "&",
1165
- apos: "'",
1166
- lt: "<",
1167
- gt: ">",
1168
- nbsp: "\xA0",
1169
- iexcl: "\xA1",
1170
- cent: "\xA2",
1171
- pound: "\xA3",
1172
- curren: "\xA4",
1173
- yen: "\xA5",
1174
- brvbar: "\xA6",
1175
- sect: "\xA7",
1176
- uml: "\xA8",
1177
- copy: "\xA9",
1178
- ordf: "\xAA",
1179
- laquo: "\xAB",
1180
- not: "\xAC",
1181
- shy: "\xAD",
1182
- reg: "\xAE",
1183
- macr: "\xAF",
1184
- deg: "\xB0",
1185
- plusmn: "\xB1",
1186
- sup2: "\xB2",
1187
- sup3: "\xB3",
1188
- acute: "\xB4",
1189
- micro: "\xB5",
1190
- para: "\xB6",
1191
- middot: "\xB7",
1192
- cedil: "\xB8",
1193
- sup1: "\xB9",
1194
- ordm: "\xBA",
1195
- raquo: "\xBB",
1196
- frac14: "\xBC",
1197
- frac12: "\xBD",
1198
- frac34: "\xBE",
1199
- iquest: "\xBF",
1200
- "#x27": "'"
1201
- };
1202
- return html.replace(/&((?:(?:[a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});?)+);/gi, (match, entity) => {
1203
- const entities = entity.toLowerCase().split(";");
1204
- return entities.map((it) => it in htmlEntity ? htmlEntity[it] : match).join("");
1205
- });
1206
- };
1207
- StringUtils2.executeExpression = (formatString, object) => {
1208
- return formatString.replace(/\${([^{}]*)}/g, (matched, piece) => String(object[piece] ?? matched));
1209
- };
1210
- StringUtils2.ellipsis = (text, length) => {
1211
- if (text.length > length) return `${text.slice(0, length)}...`;
1212
- return text;
1213
- };
1214
- StringUtils2.appendPostposition = (text, { vowel, consonant }) => {
1215
- return `${text}${ValidUtils.lastConsonantLetter(text) ? consonant : vowel}`;
1216
- };
1217
- })(StringUtils || (StringUtils = {}));
1218
-
1219
1129
  // ../core/dist/esm/expression/Expression.js
1220
1130
  var Expression;
1221
1131
  ((Expression2) => {
@@ -1230,17 +1140,6 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
1230
1140
  return binder;
1231
1141
  });
1232
1142
  };
1233
- let Group;
1234
- ((Group2) => {
1235
- Group2.isExpression = (data) => {
1236
- const reg = /[$#]\{([\s\S.]*?)\}[$#]/g;
1237
- return reg.test(data ?? "");
1238
- };
1239
- Group2.expressionGroups = (data) => {
1240
- const reg = /[$#]\{([\s\S.]*?)\}[$#]/g;
1241
- return StringUtils.regexExec(reg, data ?? "");
1242
- };
1243
- })(Group = Expression2.Group || (Expression2.Group = {}));
1244
1143
  let Path;
1245
1144
  ((Path2) => {
1246
1145
  Path2.pathNameData = (pathName, urlExpression) => {
@@ -1327,19 +1226,64 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
1327
1226
  const paths = this.fullPath.split("?");
1328
1227
  return paths[1] ?? "";
1329
1228
  }
1229
+ getQueryParamDecodeURI(key) {
1230
+ const p = this.queryParamsDecodeURI;
1231
+ if (key) {
1232
+ return p[key];
1233
+ } else {
1234
+ return p;
1235
+ }
1236
+ }
1237
+ getQueryParamDecodeURIFirst(key) {
1238
+ const param = this.getQueryParamDecodeURI(key);
1239
+ if (Array.isArray(param)) {
1240
+ return param[0];
1241
+ } else {
1242
+ return param;
1243
+ }
1244
+ }
1245
+ getQueryParam(key) {
1246
+ const p = this.queryParams;
1247
+ if (key) {
1248
+ return p[key];
1249
+ } else {
1250
+ return p;
1251
+ }
1252
+ }
1253
+ getQueryParamFirst(key) {
1254
+ const param = this.getQueryParam(key);
1255
+ if (Array.isArray(param)) {
1256
+ return param[0];
1257
+ } else {
1258
+ return param;
1259
+ }
1260
+ }
1330
1261
  get queryParams() {
1331
1262
  const param = {};
1332
1263
  this.query.split("&")?.forEach((it) => {
1333
1264
  const a = it.split("=");
1334
- param[a[0]] = a[1];
1265
+ if (param[a[0]]) {
1266
+ if (Array.isArray(param[a[0]])) {
1267
+ param[a[0]].push(a[1]);
1268
+ } else {
1269
+ param[a[0]] = [param[a[0]], a[1]];
1270
+ }
1271
+ } else {
1272
+ param[a[0]] = a[1];
1273
+ }
1335
1274
  });
1336
1275
  return param;
1337
1276
  }
1338
- get queryParamsAfterDecodeURI() {
1277
+ get queryParamsDecodeURI() {
1339
1278
  const params = this.queryParams;
1340
1279
  for (const key in params) {
1341
1280
  if (params.hasOwnProperty(key)) {
1342
- params[key] = decodeURIComponent(params[key]);
1281
+ const param = params[key];
1282
+ if (Array.isArray(param)) {
1283
+ params[key] = param.map((p) => decodeURIComponent(p));
1284
+ } else {
1285
+ params[key] = decodeURIComponent(param);
1286
+ }
1343
1287
  }
1344
1288
  }
1345
1289
  return params;
@@ -2729,9 +2673,19 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
2729
2673
  ConvertUtils22.jsonToMap = (jsonStr) => {
2730
2674
  return new Map(JSON.parse(jsonStr));
2731
2675
  };
2676
+ ConvertUtils22.toUrl = (data) => {
2677
+ try {
2678
+ return new URL(data);
2679
+ } catch (e) {
2680
+ throw new Error(`Invalid URL string: ${data}`);
2681
+ }
2682
+ };
2732
2683
  ConvertUtils22.decodeURIString = (data) => {
2733
2684
  return decodeURIComponent(data);
2734
2685
  };
2686
+ ConvertUtils22.encodeURIString = (data) => {
2687
+ return encodeURIComponent(data);
2688
+ };
2735
2689
  ConvertUtils22.objToStrMap = (obj) => {
2736
2690
  const strMap = /* @__PURE__ */ new Map();
2737
2691
  for (const k of Object.keys(obj)) {
@@ -2869,6 +2823,74 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
2869
2823
  ConvertUtils22.decodeHTMLEscape = (data) => {
2870
2824
  return data.replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, '"').replace(/&#39;/g, "'").replace(/&#x2F;/g, "/");
2871
2825
  };
2826
+ function escapeHTML(htmlString, option) {
2827
+ if (!htmlString) return "";
2828
+ const escapeMap = {
2829
+ "&": "&amp;",
2830
+ // 반드시 먼저 처리
2831
+ "<": "&lt;",
2832
+ ">": "&gt;",
2833
+ '"': "&quot;",
2834
+ "'": "&#39;",
2835
+ // or &apos; (하지만 HTML4에서는 &#39; 권장)
2836
+ "/": "&#x2F;",
2837
+ "`": "&#x60;",
2838
+ "=": "&#x3D;",
2839
+ "{": "&#123;",
2840
+ "}": "&#125;",
2841
+ "#": "&#35;",
2842
+ "$": "&#36;",
2843
+ "\n": "&#10;",
2844
+ // newline
2845
+ "\r": "&#13;",
2846
+ // carriage return
2847
+ " ": "&#9;",
2848
+ // tab
2849
+ "\xA0": "&nbsp;",
2850
+ // non-breaking space
2851
+ "\xA2": "&cent;",
2852
+ "\xA3": "&pound;",
2853
+ "\xA5": "&yen;",
2854
+ "\u20AC": "&euro;",
2855
+ "\xA9": "&copy;",
2856
+ "\xAE": "&reg;",
2857
+ "\u2122": "&trade;",
2858
+ "\xB0": "&deg;",
2859
+ "\xB1": "&plusmn;",
2860
+ "\xD7": "&times;",
2861
+ "\xF7": "&divide;",
2862
+ "\u2212": "&minus;",
2863
+ "\u2022": "&bull;",
2864
+ "\u2026": "&hellip;",
2865
+ "\u2190": "&larr;",
2866
+ "\u2192": "&rarr;",
2867
+ "\u2191": "&uarr;",
2868
+ "\u2193": "&darr;",
2869
+ "\u2194": "&harr;"
2870
+ };
2871
+ const targetsSet = option?.targets ? new Set(option.targets) : null;
2872
+ const filteredEscapeMap = targetsSet ? Object.fromEntries(Object.entries(escapeMap).filter(([key]) => targetsSet.has(key))) : escapeMap;
2873
+ const shouldEscapeAmpersand = !targetsSet || targetsSet.has("&");
2874
+ const charsToEscape = Object.keys(filteredEscapeMap).filter((char) => char !== "&");
2875
+ if (charsToEscape.length === 0 && !shouldEscapeAmpersand) {
2876
+ return htmlString;
2877
+ }
2878
+ const escapedChars = charsToEscape.map((char) => {
2879
+ return char.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
2880
+ }).join("");
2881
+ let result = htmlString;
2882
+ if (shouldEscapeAmpersand) {
2883
+ result = result.replace(/&/g, "&amp;");
2884
+ }
2885
+ if (escapedChars.length > 0) {
2886
+ const regex = new RegExp(`[${escapedChars}]`, "g");
2887
+ result = result.replace(regex, (match) => {
2888
+ return filteredEscapeMap[match] || match;
2889
+ });
2890
+ }
2891
+ return result;
2892
+ }
2893
+ ConvertUtils22.escapeHTML = escapeHTML;
2872
2894
  ConvertUtils22.copyObject = (obj, update = {}) => {
2873
2895
  return { ...obj, ...update };
2874
2896
  };
@@ -3031,6 +3053,29 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
3031
3053
  ConvertUtils22.stringJsonToKeyPairs = (stringJson) => {
3032
3054
  return Array.from(stringJson.matchAll(/(\w+):\s*([^,}]+)/g)).map((match) => ({ key: match[1], value: match[2] }));
3033
3055
  };
3056
+ ConvertUtils22.stringToBase64 = (str) => {
3057
+ return btoa(str);
3058
+ };
3059
+ ConvertUtils22.uint8ArrayToBase64 = (bytes) => {
3060
+ let binary = "";
3061
+ const len = bytes.byteLength;
3062
+ for (let i = 0; i < len; i++) {
3063
+ binary += String.fromCharCode(bytes[i]);
3064
+ }
3065
+ return btoa(binary);
3066
+ };
3067
+ ConvertUtils22.base64ToString = (base64) => {
3068
+ return atob(base64);
3069
+ };
3070
+ ConvertUtils22.base64ToUint8Array = (base64) => {
3071
+ const binaryString = atob(base64);
3072
+ const len = binaryString.length;
3073
+ const bytes = new Uint8Array(len);
3074
+ for (let i = 0; i < len; i++) {
3075
+ bytes[i] = binaryString.charCodeAt(i);
3076
+ }
3077
+ return bytes;
3078
+ };
3034
3079
  })(ConvertUtils || (ConvertUtils = {}));
3035
3080
 
3036
3081
  // ../simple-boot/dist/esm/lifecycle/OnSimCreate.js
@@ -3155,17 +3200,37 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
3155
3200
  return this.routerChains[0];
3156
3201
  }
3157
3202
  get firstRouteChainValue() {
3158
- return this.firstRouteChain.getValue();
3203
+ return this.firstRouteChain?.getValue();
3159
3204
  }
3160
3205
  get lastRouteChain() {
3161
3206
  return this.routerChains[this.routerChains.length - 1];
3162
3207
  }
3163
3208
  get lastRouteChainValue() {
3164
- return this.lastRouteChain.getValue();
3209
+ return this.lastRouteChain?.getValue();
3165
3210
  }
3166
3211
  hasActivateInLastRoute(obj) {
3167
3212
  return this.lastRouteChainValue?.hasActivate(obj) === true;
3168
3213
  }
3214
+ getQueryParamDecodeURI(key) {
3215
+ if (this.intent) {
3216
+ return this.intent.getQueryParamDecodeURI(key);
3217
+ }
3218
+ }
3219
+ getQueryParamDecodeURIFirst(key) {
3220
+ if (this.intent) {
3221
+ return this.intent.getQueryParamDecodeURIFirst(key);
3222
+ }
3223
+ }
3224
+ getQueryParam(key) {
3225
+ if (this.intent) {
3226
+ return this.intent.getQueryParam(key);
3227
+ }
3228
+ }
3229
+ getQueryParamFirst(key) {
3230
+ if (this.intent) {
3231
+ return this.intent.getQueryParamFirst(key);
3232
+ }
3233
+ }
3169
3234
  get queryParams() {
3170
3235
  if (this.intent) {
3171
3236
  return this.intent.queryParams;
@@ -3173,7 +3238,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
3173
3238
  }
3174
3239
  get queryParamsAfterDecodeURI() {
3175
3240
  if (this.intent) {
3176
- return this.intent.queryParamsAfterDecodeURI;
3241
+ return this.intent.queryParamsDecodeURI;
3177
3242
  }
3178
3243
  }
3179
3244
  };
@@ -3192,7 +3257,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
3192
3257
  };
3193
3258
  })(RouterAction || (RouterAction = {}));
3194
3259
 
3195
- // ../core/dist/esm/message/Subscriber..js
3260
+ // ../core/dist/esm/message/Subscriber.js
3196
3261
  var Subscriber = class {
3197
3262
  constructor(destination) {
3198
3263
  this.destination = destination;
@@ -4297,6 +4362,53 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
4297
4362
  }
4298
4363
  };
4299
4364
 
4365
+ // ../simple-boot/dist/esm/intent/IntentSubscribe.js
4366
+ var isIntentSubscribe = (obj) => {
4367
+ return !!obj && typeof obj.intentSubscribe === "function";
4368
+ };
4369
+
4370
+ // ../simple-boot/dist/esm/decorators/cache/CacheDecorator.js
4371
+ var CacheMetadataKey = Symbol("Cache");
4372
+
4373
+ // ../simple-boot/dist/esm/decorators/event/EventListener.js
4374
+ var EventListenerMetadataKey = Symbol("EventListener");
4375
+
4376
+ // ../simple-boot/dist/esm/decorators/validate/Validation.js
4377
+ var ValidMetadataKey = Symbol("ValidMetadataKey");
4378
+ var getValidIndex = (target, propertyKey) => {
4379
+ if (target !== null && void 0 !== target && typeof target === "object") {
4380
+ target = target.constructor;
4381
+ }
4382
+ if (propertyKey) {
4383
+ const parameters = Reflect.getOwnMetadata(ValidMetadataKey, target, propertyKey);
4384
+ return parameters ?? [];
4385
+ } else {
4386
+ return ReflectUtils.getMetadata(ValidMetadataKey, target) ?? [];
4387
+ }
4388
+ };
4389
+ var ValidationMetadataKey = Symbol("ValidationMetadataKey");
4390
+ var getValidators = (target) => {
4391
+ if (target !== null && void 0 !== target && typeof target === "object") {
4392
+ target = target.constructor;
4393
+ }
4394
+ return ReflectUtils.getMetadata(ValidationMetadataKey, target) ?? [];
4395
+ };
4396
+ var execValidationInValid = (obj) => {
4397
+ return execValidation(obj).filter((it) => !it.valid);
4398
+ };
4399
+ var execValidation = (obj) => {
4400
+ const validators = getValidators(obj);
4401
+ const reesults = [];
4402
+ validators.forEach((it) => {
4403
+ reesults.push({
4404
+ name: it.propertyKey,
4405
+ valid: it.validator(it.propertyKey, it),
4406
+ message: ""
4407
+ });
4408
+ });
4409
+ return reesults;
4410
+ };
4411
+
4300
4412
  // ../simple-boot/dist/esm/intent/IntentManager.js
4301
4413
  var __decorate2 = function(decorators, target, key, desc) {
4302
4414
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -4338,7 +4450,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
4338
4450
  } else if (typeof it === "string") {
4339
4451
  it = new Intent(it, data);
4340
4452
  }
4341
- let intent = it;
4453
+ const intent = it;
4342
4454
  const r = [];
4343
4455
  if (!routerMatch) {
4344
4456
  if (intent.symbols) {
@@ -4357,7 +4469,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
4357
4469
  }
4358
4470
  });
4359
4471
  this.subject.next(it);
4360
- targetInstances.forEach((data2) => {
4472
+ for (let data2 of targetInstances) {
4361
4473
  let orNewSim = data2;
4362
4474
  if (orNewSim) {
4363
4475
  if (intent.paths.length > 0) {
@@ -4369,6 +4481,18 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
4369
4481
  lastProp = i;
4370
4482
  });
4371
4483
  if (orNewSim && typeof orNewSim === "function") {
4484
+ const injects = getInject(callthis, orNewSim.name);
4485
+ if (injects) {
4486
+ for (const inject of injects) {
4487
+ let v = this.simstanceManager.findLastSim(inject.config).getValue();
4488
+ if (typeof inject.config.returnFactory === "function") {
4489
+ v = await inject.config.returnFactory({ instance: callthis, methodName: orNewSim.name, parameter: intent.data }, v);
4490
+ } else if (typeof inject.config.returnFactory === "string") {
4491
+ v = await v[inject.config.returnFactory]({ instance: callthis, methodName: orNewSim.name, parameter: intent.data }, v);
4492
+ }
4493
+ intent.data[inject.index] = v;
4494
+ }
4495
+ }
4372
4496
  if (PublishType.DATA_PARAMETERS === intent.publishType) {
4373
4497
  r.push(orNewSim.call(callthis, intent.data));
4374
4498
  } else if (PublishType.INLINE_DATA_PARAMETERS === intent.publishType) {
@@ -4382,15 +4506,22 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
4382
4506
  }
4383
4507
  } else {
4384
4508
  if (PublishType.DATA_PARAMETERS === intent.publishType) {
4385
- r.push(orNewSim?.intentSubscribe?.(intent.data));
4509
+ if (isIntentSubscribe(orNewSim)) {
4510
+ r.push(orNewSim.intentSubscribe(intent.data));
4511
+ }
4386
4512
  } else if (PublishType.INLINE_DATA_PARAMETERS === intent.publishType) {
4387
- r.push(orNewSim?.intentSubscribe?.(...intent.data));
4513
+ if (isIntentSubscribe(orNewSim)) {
4514
+ r.push(orNewSim.intentSubscribe(...intent.data));
4515
+ }
4388
4516
  } else {
4389
- r.push(orNewSim?.intentSubscribe?.(intent));
4517
+ if (isIntentSubscribe(orNewSim)) {
4518
+ r.push(orNewSim?.intentSubscribe?.(intent));
4519
+ }
4390
4520
  }
4391
4521
  }
4392
4522
  }
4393
- });
4523
+ }
4524
+ ;
4394
4525
  return r;
4395
4526
  }
4396
4527
  };
@@ -4402,6 +4533,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
4402
4533
  // ../simple-boot-http-server/dist/esm/codes/HttpStatus.js
4403
4534
  var HttpStatus = /* @__PURE__ */ ((HttpStatus2) => {
4404
4535
  HttpStatus2[HttpStatus2["Ok"] = 200] = "Ok";
4536
+ HttpStatus2[HttpStatus2["MultipleChoices"] = 300] = "MultipleChoices";
4405
4537
  HttpStatus2[HttpStatus2["MovedPermanently"] = 301] = "MovedPermanently";
4406
4538
  HttpStatus2[HttpStatus2["Found"] = 302] = "Found";
4407
4539
  HttpStatus2[HttpStatus2["SeeOther"] = 303] = "SeeOther";
@@ -4578,6 +4710,136 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
4578
4710
  }
4579
4711
  };
4580
4712
 
4713
+ // ../core/dist/esm/string/StringUtils.js
4714
+ var StringUtils;
4715
+ ((StringUtils2) => {
4716
+ StringUtils2.deleteEnter = (data) => {
4717
+ return data.replace(/\r?\n/g, "");
4718
+ };
4719
+ StringUtils2.pickEmoji = (data) => {
4720
+ return data.match(/[\p{Emoji}]/gu) ?? [];
4721
+ };
4722
+ StringUtils2.regexExec = (regex, text) => {
4723
+ let varExec = regex.exec(text);
4724
+ const usingVars = [];
4725
+ while (varExec) {
4726
+ usingVars.push(varExec);
4727
+ varExec = regex.exec(varExec.input);
4728
+ }
4729
+ return usingVars;
4730
+ };
4731
+ StringUtils2.escapeSpecialCharacterRegExp = (data) => {
4732
+ return data.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
4733
+ };
4734
+ StringUtils2.trim = (data) => data.trim();
4735
+ StringUtils2.rsubString = (data_s, blen_n) => data_s.substring(data_s.length - blen_n, data_s.length);
4736
+ StringUtils2.lsubString = (data_s, alen_n) => data_s.substring(0, alen_n);
4737
+ StringUtils2.lpad = (fill_s, len_n, full_s) => {
4738
+ while (len_n > full_s.length) {
4739
+ full_s = fill_s + full_s;
4740
+ }
4741
+ return StringUtils2.rsubString(full_s, len_n);
4742
+ };
4743
+ StringUtils2.rpad = (fill_s, len_n, full_s) => {
4744
+ while (len_n > full_s.length) {
4745
+ full_s += fill_s;
4746
+ }
4747
+ return StringUtils2.lsubString(full_s, len_n);
4748
+ };
4749
+ StringUtils2.lappend = (count_n, input_s) => {
4750
+ let s = "";
4751
+ let i = 0;
4752
+ while (i++ < count_n) {
4753
+ s += input_s;
4754
+ }
4755
+ return s;
4756
+ };
4757
+ StringUtils2.unescape = (html) => {
4758
+ if (!html) return "";
4759
+ const htmlEntity = {
4760
+ quot: '"',
4761
+ amp: "&",
4762
+ apos: "'",
4763
+ lt: "<",
4764
+ gt: ">",
4765
+ nbsp: "\xA0",
4766
+ iexcl: "\xA1",
4767
+ cent: "\xA2",
4768
+ pound: "\xA3",
4769
+ curren: "\xA4",
4770
+ yen: "\xA5",
4771
+ brvbar: "\xA6",
4772
+ sect: "\xA7",
4773
+ uml: "\xA8",
4774
+ copy: "\xA9",
4775
+ ordf: "\xAA",
4776
+ laquo: "\xAB",
4777
+ not: "\xAC",
4778
+ shy: "\xAD",
4779
+ reg: "\xAE",
4780
+ macr: "\xAF",
4781
+ deg: "\xB0",
4782
+ plusmn: "\xB1",
4783
+ sup2: "\xB2",
4784
+ sup3: "\xB3",
4785
+ acute: "\xB4",
4786
+ micro: "\xB5",
4787
+ para: "\xB6",
4788
+ middot: "\xB7",
4789
+ cedil: "\xB8",
4790
+ sup1: "\xB9",
4791
+ ordm: "\xBA",
4792
+ raquo: "\xBB",
4793
+ frac14: "\xBC",
4794
+ frac12: "\xBD",
4795
+ frac34: "\xBE",
4796
+ iquest: "\xBF",
4797
+ "#x27": "'"
4798
+ };
4799
+ return html.replace(/&((?:(?:[a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});?)+);/gi, (match, entity) => {
4800
+ const entities = entity.toLowerCase().split(";");
4801
+ return entities.map((it) => it in htmlEntity ? htmlEntity[it] : match).join("");
4802
+ });
4803
+ };
4804
+ StringUtils2.executeExpression = (formatString, object) => {
4805
+ return formatString.replace(/\${([^{}]*)}/g, (matched, piece) => String(object[piece] ?? matched));
4806
+ };
4807
+ StringUtils2.ellipsis = (text, length) => {
4808
+ if (text.length > length) return `${text.slice(0, length)}...`;
4809
+ return text;
4810
+ };
4811
+ StringUtils2.appendPostposition = (text, { vowel, consonant }) => {
4812
+ return `${text}${ValidUtils.lastConsonantLetter(text) ? consonant : vowel}`;
4813
+ };
4814
+ StringUtils2.replaceSequentially = (text, replacements) => {
4815
+ let remainingText = text;
4816
+ let result = "";
4817
+ while (remainingText.length > 0) {
4818
+ let bestMatch = null;
4819
+ for (const replacement of replacements) {
4820
+ const newRegex = new RegExp(replacement.regex);
4821
+ const match = newRegex.exec(remainingText);
4822
+ if (match) {
4823
+ if (bestMatch === null || match.index < bestMatch.index) {
4824
+ bestMatch = { index: match.index, match, replacement };
4825
+ }
4826
+ }
4827
+ }
4828
+ if (bestMatch) {
4829
+ const { index, match, replacement } = bestMatch;
4830
+ const matchedString = match[0];
4831
+ result += remainingText.substring(0, index);
4832
+ result += replacement.callback(matchedString);
4833
+ remainingText = remainingText.substring(index + matchedString.length);
4834
+ } else {
4835
+ result += remainingText;
4836
+ break;
4837
+ }
4838
+ }
4839
+ return result;
4840
+ };
4841
+ })(StringUtils || (StringUtils = {}));
4842
+
4581
4843
  // ../core-web/dist/esm/script/ScriptUtils.js
4582
4844
  var ScriptUtils = class _ScriptUtils {
4583
4845
  /**
@@ -4794,6 +5056,71 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
4794
5056
  });
4795
5057
  return { promise, resolve, reject };
4796
5058
  };
5059
+ Promises2.executeInChunks = async (promiseFactories, chunkSize = 10) => {
5060
+ const results = [];
5061
+ for (let i = 0; i < promiseFactories.length; i += chunkSize) {
5062
+ const chunk = promiseFactories.slice(i, i + chunkSize);
5063
+ const chunkResults = await Promise.all(chunk.map((factory) => factory()));
5064
+ results.push(...chunkResults);
5065
+ if (i + chunkSize < promiseFactories.length) {
5066
+ await (0, Promises2.sleep)(100);
5067
+ }
5068
+ }
5069
+ return results;
5070
+ };
5071
+ Promises2.executeWithConcurrency = async (promiseFactories, concurrency = 10) => {
5072
+ const results = new Array(promiseFactories.length);
5073
+ let currentIndex = 0;
5074
+ const executeNext = async (index) => {
5075
+ while (currentIndex < promiseFactories.length) {
5076
+ const factoryIndex = currentIndex++;
5077
+ results[factoryIndex] = await promiseFactories[factoryIndex]();
5078
+ }
5079
+ };
5080
+ const workers = Array(Math.min(concurrency, promiseFactories.length)).fill(0).map((_, i) => executeNext(i));
5081
+ await Promise.all(workers);
5082
+ return results;
5083
+ };
5084
+ Promises2.executeWithLimit = async (promiseFactories, limit = 5) => {
5085
+ const results = new Array(promiseFactories.length);
5086
+ const executing = [];
5087
+ for (const [index, factory] of promiseFactories.entries()) {
5088
+ const promise = factory().then((result) => {
5089
+ results[index] = result;
5090
+ }).finally(() => {
5091
+ executing.splice(executing.indexOf(promise), 1);
5092
+ });
5093
+ executing.push(promise);
5094
+ if (executing.length >= limit) {
5095
+ await Promise.race(executing);
5096
+ }
5097
+ }
5098
+ await Promise.all(executing);
5099
+ return results;
5100
+ };
5101
+ Promises2.retry = async (factory, config) => {
5102
+ const initialDelay = config.delay?.initialDelay ?? 0;
5103
+ const retryDelay = config.delay?.retryDelay ?? 0;
5104
+ if (initialDelay > 0) {
5105
+ await (0, Promises2.sleep)(initialDelay);
5106
+ }
5107
+ let lastError;
5108
+ for (let attempt = 0; attempt <= config.retry; attempt++) {
5109
+ try {
5110
+ return await factory(attempt, lastError);
5111
+ } catch (error) {
5112
+ lastError = error;
5113
+ if (attempt === config.retry) {
5114
+ break;
5115
+ }
5116
+ config.onRetry?.(error, attempt + 1);
5117
+ if (retryDelay > 0) {
5118
+ await (0, Promises2.sleep)(retryDelay);
5119
+ }
5120
+ }
5121
+ }
5122
+ throw lastError;
5123
+ };
4797
5124
  let Result;
4798
5125
  ((Result2) => {
4799
5126
  async function awaitWrap(promise) {
@@ -5311,11 +5638,11 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
5311
5638
  findAttrElements(fragment, config) {
5312
5639
  const elements = /* @__PURE__ */ new Set();
5313
5640
  const addAttributes = config?.applyEvents?.map((it) => it.attrName) ?? [];
5314
- addAttributes.concat([..._EventManager2.attrNames]).forEach((attrName) => {
5315
- fragment?.querySelectorAll(`[${attrName}]`).forEach((it) => {
5316
- elements.add(it);
5317
- });
5318
- });
5641
+ const attrs = addAttributes.concat([..._EventManager2.attrNames]).filter(Boolean);
5642
+ if (attrs.length) {
5643
+ const selector = attrs.map((a) => `[${a}]`).join(",");
5644
+ fragment?.querySelectorAll(selector).forEach((it) => elements.add(it));
5645
+ }
5319
5646
  return elements;
5320
5647
  }
5321
5648
  applyEvent(obj, childNodes, config) {
@@ -5327,7 +5654,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
5327
5654
  this.procAttr(childNodes, _EventManager2.valueAttrName, (it, attribute) => {
5328
5655
  const script = attribute;
5329
5656
  if (script) {
5330
- const data = ScriptUtils.evaluateReturn(script, obj);
5657
+ const data = ObjectUtils.Script.evaluateReturn(script, obj);
5331
5658
  if (it.value !== data) {
5332
5659
  it.value = data;
5333
5660
  }
@@ -5336,7 +5663,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
5336
5663
  this.procAttr(childNodes, _EventManager2.checkedAttrName, (it, attribute) => {
5337
5664
  const script = attribute;
5338
5665
  if (script) {
5339
- const data = ScriptUtils.evaluateReturn(script, obj);
5666
+ const data = ObjectUtils.Script.evaluateReturn(script, obj);
5340
5667
  if (it.checked !== data) {
5341
5668
  it.checked = data;
5342
5669
  }
@@ -5345,7 +5672,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
5345
5672
  this.procAttr(childNodes, _EventManager2.selectedAttrName, (it, attribute) => {
5346
5673
  const script = attribute;
5347
5674
  if (script) {
5348
- const data = ScriptUtils.evaluateReturn(script, obj);
5675
+ const data = ObjectUtils.Script.evaluateReturn(script, obj);
5349
5676
  if (it.selected !== data) {
5350
5677
  it.selected = data;
5351
5678
  }
@@ -5354,7 +5681,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
5354
5681
  this.procAttr(childNodes, _EventManager2.readonlyAttrName, (it, attribute) => {
5355
5682
  const script = attribute;
5356
5683
  if (script) {
5357
- const data = ScriptUtils.evaluateReturn(script, obj);
5684
+ const data = ObjectUtils.Script.evaluateReturn(script, obj);
5358
5685
  if (it.readOnly !== data) {
5359
5686
  it.readOnly = data;
5360
5687
  }
@@ -5363,7 +5690,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
5363
5690
  this.procAttr(childNodes, _EventManager2.disabledAttrName, (it, attribute) => {
5364
5691
  const script = attribute;
5365
5692
  if (script) {
5366
- const data = ScriptUtils.evaluateReturn(script, obj);
5693
+ const data = ObjectUtils.Script.evaluateReturn(script, obj);
5367
5694
  if (it.disabled !== data) {
5368
5695
  it.disabled = data;
5369
5696
  }
@@ -5372,7 +5699,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
5372
5699
  this.procAttr(childNodes, _EventManager2.hiddenAttrName, (it, attribute) => {
5373
5700
  const script = attribute;
5374
5701
  if (script) {
5375
- const data = ScriptUtils.evaluateReturn(script, obj);
5702
+ const data = ObjectUtils.Script.evaluateReturn(script, obj);
5376
5703
  if (it.hidden !== data) {
5377
5704
  it.hidden = data;
5378
5705
  }
@@ -5381,7 +5708,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
5381
5708
  this.procAttr(childNodes, _EventManager2.requiredAttrName, (it, attribute) => {
5382
5709
  const script = attribute;
5383
5710
  if (script) {
5384
- const data = ScriptUtils.evaluateReturn(script, obj);
5711
+ const data = ObjectUtils.Script.evaluateReturn(script, obj);
5385
5712
  if (it.required !== data) {
5386
5713
  it.required = data;
5387
5714
  }
@@ -5390,7 +5717,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
5390
5717
  this.procAttr(childNodes, _EventManager2.openAttrName, (it, attribute) => {
5391
5718
  const script = attribute;
5392
5719
  if (script) {
5393
- const data = ScriptUtils.evaluateReturn(script, obj);
5720
+ const data = ObjectUtils.Script.evaluateReturn(script, obj);
5394
5721
  if (it.open !== data) {
5395
5722
  it.open = data;
5396
5723
  }
@@ -5399,13 +5726,29 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
5399
5726
  this.procAttr(childNodes, _EventManager2.normalAttrMapAttrName, (it, attribute) => {
5400
5727
  const map = new Map(JSON.parse(attribute));
5401
5728
  map.forEach((v, k) => {
5402
- const data = ScriptUtils.evaluate(`const $element = this.element; return ${v} `, Object.assign(obj, {
5729
+ const variablePaths = v.variablePaths;
5730
+ let targetScript = v.originalAttrValue;
5731
+ let script;
5732
+ if (v.isStringTemplate) {
5733
+ variablePaths.forEach((it2) => {
5734
+ let r = ObjectUtils.Path.toOptionalChainPath(it2.inner);
5735
+ targetScript = targetScript.replaceAll(it2.origin, `\${${r}}`);
5736
+ });
5737
+ script = "`" + targetScript + "`";
5738
+ } else {
5739
+ variablePaths.forEach((it2) => {
5740
+ let r = ObjectUtils.Path.toOptionalChainPath(it2.inner);
5741
+ targetScript = targetScript.replaceAll(it2.origin, `${r}`);
5742
+ });
5743
+ script = targetScript;
5744
+ }
5745
+ const data = ObjectUtils.Script.evaluate(`const $element = this.element; return ${script}`, Object.assign(obj, {
5403
5746
  __render: Object.freeze({
5404
5747
  element: it,
5405
5748
  attribute: ElementUtils.getAttributeToObject(it)
5406
5749
  })
5407
5750
  }));
5408
- if (data === null) {
5751
+ if (data === null || data === void 0) {
5409
5752
  it.removeAttribute(k);
5410
5753
  } else {
5411
5754
  it.setAttribute(k, data);
@@ -5424,19 +5767,19 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
5424
5767
  const mapScript = it.getAttribute(`${linkInfo.name}:map`);
5425
5768
  let bindObj = obj;
5426
5769
  if (ownerVariablePathName) {
5427
- bindObj = ScriptUtils.evaluateReturn(ownerVariablePathName, obj);
5770
+ bindObj = ObjectUtils.Script.evaluateReturn(ownerVariablePathName, obj);
5428
5771
  }
5429
5772
  const getValue = this.getValue(obj, varName, bindObj);
5430
5773
  if (typeof getValue === "function" && getValue) {
5431
5774
  let setValue = it[linkInfo.property];
5432
5775
  if (mapScript) {
5433
- setValue = ScriptUtils.evaluate(`${this.getBindScript(config)} return ${mapScript}`, Object.assign(bindObj, { __render: Object.freeze({ element: it, target: bindObj, range: Range.range, value: setValue, scripts: _EventManager2.setBindProperty(config?.scripts, obj), ...config?.eventVariables }) }));
5776
+ setValue = ObjectUtils.Script.evaluate(`${this.getBindScript(config)} return ${mapScript}`, Object.assign(bindObj, { __render: Object.freeze({ element: it, target: bindObj, range: Range.range, value: setValue, scripts: _EventManager2.setBindProperty(config?.scripts, obj), ...config?.eventVariables }) }));
5434
5777
  }
5435
5778
  getValue(setValue);
5436
5779
  } else if (getValue) {
5437
5780
  let setValue = getValue;
5438
5781
  if (mapScript) {
5439
- setValue = ScriptUtils.evaluate(`${this.getBindScript(config)} return ${mapScript}`, Object.assign(bindObj, { __render: Object.freeze({ element: it, target: bindObj, range: Range.range, value: setValue, scripts: _EventManager2.setBindProperty(config?.scripts, obj), ...config?.eventVariables }) }));
5782
+ setValue = ObjectUtils.Script.evaluate(`${this.getBindScript(config)} return ${mapScript}`, Object.assign(bindObj, { __render: Object.freeze({ element: it, target: bindObj, range: Range.range, value: setValue, scripts: _EventManager2.setBindProperty(config?.scripts, obj), ...config?.eventVariables }) }));
5440
5783
  }
5441
5784
  if (setValue === null) {
5442
5785
  it.removeAttribute(linkInfo.property);
@@ -5459,10 +5802,10 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
5459
5802
  const filterScript = element.getAttribute(`${attr}:filter`);
5460
5803
  let filter2 = true;
5461
5804
  if (filterScript) {
5462
- filter2 = ScriptUtils.evaluate(`${this.getBindScript(config)} return ${filterScript}`, context) ?? false;
5805
+ filter2 = ObjectUtils.Script.evaluate(`${this.getBindScript(config)} return ${filterScript}`, context) ?? false;
5463
5806
  }
5464
5807
  if (filter2) {
5465
- ScriptUtils.evaluate(`${this.getBindScript(config)} ${script}`, context);
5808
+ ObjectUtils.Script.evaluate(`${this.getBindScript(config)} ${script}`, context);
5466
5809
  }
5467
5810
  };
5468
5811
  element.addEventListener(eventName, handler);
@@ -5474,7 +5817,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
5474
5817
  script = "return " + script;
5475
5818
  }
5476
5819
  if (script) {
5477
- ScriptUtils.evaluate(`${this.getBindScript(config)}; ${script} `, Object.assign(obj, {
5820
+ ObjectUtils.Script.evaluate(`${this.getBindScript(config)}; ${script} `, Object.assign(obj, {
5478
5821
  __render: Object.freeze({
5479
5822
  element: it,
5480
5823
  attribute: ElementUtils.getAttributeToObject(it),
@@ -5500,7 +5843,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
5500
5843
  script = "return " + script;
5501
5844
  }
5502
5845
  if (script) {
5503
- ScriptUtils.evaluate(`${this.getBindScript(config)}; ${script} `, Object.assign(obj, {
5846
+ ObjectUtils.Script.evaluate(`${this.getBindScript(config)}; ${script} `, Object.assign(obj, {
5504
5847
  __render: Object.freeze({
5505
5848
  element: it,
5506
5849
  attribute: ElementUtils.getAttributeToObject(it),
@@ -5517,21 +5860,29 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
5517
5860
  script = "return " + script;
5518
5861
  }
5519
5862
  if (_EventManager2.isUsingThisVar(script, varName) || varName === void 0) {
5520
- const data = ScriptUtils.evaluate(`const $element = this.__render.element; ${script} `, Object.assign(obj, {
5863
+ const data = ObjectUtils.Script.evaluate(`const $element = this.__render.element; ${script} `, Object.assign(obj, {
5521
5864
  __render: Object.freeze({
5522
5865
  element: it,
5523
5866
  attribute: ElementUtils.getAttributeToObject(it)
5524
5867
  })
5525
5868
  }));
5526
5869
  if (typeof data === "string") {
5527
- it.setAttribute("style", data);
5870
+ data.split(";").forEach((sit) => {
5871
+ const [key, value] = sit.split(":").map((s) => s.trim());
5872
+ if (key && value) {
5873
+ it.style[key] = value;
5874
+ }
5875
+ });
5528
5876
  } else if (Array.isArray(data)) {
5529
- it.setAttribute("style", data.join(";"));
5877
+ data.forEach((sit) => {
5878
+ const [key, value] = sit.split(":").map((s) => s.trim());
5879
+ if (key && value) {
5880
+ it.style[key] = value;
5881
+ }
5882
+ });
5530
5883
  } else {
5531
5884
  for (const [key, value] of Object.entries(data)) {
5532
- if (it instanceof HTMLElement) {
5533
- it.style[key] = String(value);
5534
- }
5885
+ it.style[key] = value === null ? null : String(value);
5535
5886
  }
5536
5887
  }
5537
5888
  }
@@ -5542,29 +5893,77 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
5542
5893
  script = "return " + script;
5543
5894
  }
5544
5895
  if (_EventManager2.isUsingThisVar(script, varName) || varName === void 0) {
5545
- const data = ScriptUtils.evaluate(`const $element = this.element; ${script} `, Object.assign(obj, {
5896
+ const data = ObjectUtils.Script.evaluate(`const $element = this.element; ${script} `, Object.assign(obj, {
5546
5897
  __render: Object.freeze({
5547
5898
  element: it,
5548
5899
  attribute: ElementUtils.getAttributeToObject(it)
5549
5900
  })
5550
5901
  }));
5551
5902
  if (typeof data === "string") {
5552
- it.setAttribute("class", data);
5903
+ data.split(" ").forEach((cit) => it.classList.add(cit.trim()));
5553
5904
  } else if (Array.isArray(data)) {
5554
- it.setAttribute("class", data.join(" "));
5905
+ data.forEach((cit) => it.classList.add(cit.trim()));
5555
5906
  } else {
5556
5907
  for (const [key, value] of Object.entries(data)) {
5557
5908
  if (it instanceof HTMLElement) {
5558
5909
  if (value) {
5559
- it.classList.add(key);
5910
+ it.classList.add(key.trim());
5560
5911
  } else {
5561
- it.classList.remove(key);
5912
+ it.classList.remove(key.trim());
5562
5913
  }
5563
5914
  }
5564
5915
  }
5565
5916
  }
5566
5917
  }
5567
5918
  });
5919
+ this.procAttr(elements, _EventManager2.valueAttrName, (it, attribute) => {
5920
+ if (_EventManager2.isUsingThisVar(attribute, varName) || varName === void 0) {
5921
+ const data = ObjectUtils.Script.evaluateReturn(attribute, obj);
5922
+ if (it.value !== data) it.value = data;
5923
+ }
5924
+ });
5925
+ this.procAttr(elements, _EventManager2.checkedAttrName, (it, attribute) => {
5926
+ if (_EventManager2.isUsingThisVar(attribute, varName) || varName === void 0) {
5927
+ const data = ObjectUtils.Script.evaluateReturn(attribute, obj);
5928
+ if (it.checked !== data) it.checked = data;
5929
+ }
5930
+ });
5931
+ this.procAttr(elements, _EventManager2.selectedAttrName, (it, attribute) => {
5932
+ if (_EventManager2.isUsingThisVar(attribute, varName) || varName === void 0) {
5933
+ const data = ObjectUtils.Script.evaluateReturn(attribute, obj);
5934
+ if (it.selected !== data) it.selected = data;
5935
+ }
5936
+ });
5937
+ this.procAttr(elements, _EventManager2.readonlyAttrName, (it, attribute) => {
5938
+ if (_EventManager2.isUsingThisVar(attribute, varName) || varName === void 0) {
5939
+ const data = ObjectUtils.Script.evaluateReturn(attribute, obj);
5940
+ if (it.readOnly !== data) it.readOnly = data;
5941
+ }
5942
+ });
5943
+ this.procAttr(elements, _EventManager2.disabledAttrName, (it, attribute) => {
5944
+ if (_EventManager2.isUsingThisVar(attribute, varName) || varName === void 0) {
5945
+ const data = ObjectUtils.Script.evaluateReturn(attribute, obj);
5946
+ if (it.disabled !== data) it.disabled = data;
5947
+ }
5948
+ });
5949
+ this.procAttr(elements, _EventManager2.hiddenAttrName, (it, attribute) => {
5950
+ if (_EventManager2.isUsingThisVar(attribute, varName) || varName === void 0) {
5951
+ const data = ObjectUtils.Script.evaluateReturn(attribute, obj);
5952
+ if (it.hidden !== data) it.hidden = data;
5953
+ }
5954
+ });
5955
+ this.procAttr(elements, _EventManager2.requiredAttrName, (it, attribute) => {
5956
+ if (_EventManager2.isUsingThisVar(attribute, varName) || varName === void 0) {
5957
+ const data = ObjectUtils.Script.evaluateReturn(attribute, obj);
5958
+ if (it.required !== data) it.required = data;
5959
+ }
5960
+ });
5961
+ this.procAttr(elements, _EventManager2.openAttrName, (it, attribute) => {
5962
+ if (_EventManager2.isUsingThisVar(attribute, varName) || varName === void 0) {
5963
+ const data = ObjectUtils.Script.evaluateReturn(attribute, obj);
5964
+ if (it.open !== data) it.open = data;
5965
+ }
5966
+ });
5568
5967
  }
5569
5968
  procAttr(elements = /* @__PURE__ */ new Set(), attrName, callBack) {
5570
5969
  const sets = /* @__PURE__ */ new Set();
@@ -5589,7 +5988,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
5589
5988
  });
5590
5989
  }
5591
5990
  getValue(obj, name, bindObj) {
5592
- let r = ScriptUtils.evaluateReturn(name, obj);
5991
+ let r = ObjectUtils.Script.evaluateReturn(name, obj);
5593
5992
  if (typeof r === "function") {
5594
5993
  r = r.bind(bindObj ?? obj);
5595
5994
  }
@@ -5689,6 +6088,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
5689
6088
  _EventManager.WINDOW_EVENT_POPSTATE = "popstate";
5690
6089
  _EventManager.WINDOW_EVENT_RESIZE = "resize";
5691
6090
  _EventManager.WINDOW_EVENTS = [_EventManager.WINDOW_EVENT_POPSTATE, _EventManager.WINDOW_EVENT_RESIZE];
6091
+ _EventManager.noDetectAttr = [_EventManager.normalAttrMapAttrName];
5692
6092
  _EventManager.attrNames = [
5693
6093
  _EventManager.valueAttrName,
5694
6094
  _EventManager.checkedAttrName,
@@ -5779,7 +6179,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
5779
6179
  const itRandom = RawSet.drItOtherEncoding(this.elementSource.element);
5780
6180
  const vars = RawSet.drVarEncoding(this.elementSource.element, this.elementSource.attrs.drVarOption ?? "");
5781
6181
  const newTemp = this.source.config.window.document.createElement("temp");
5782
- ScriptUtils.evaluate(`
6182
+ ObjectUtils.Script.evaluate(`
5783
6183
  ${this.render.bindScript}
5784
6184
  const n = $element.cloneNode(true);
5785
6185
  var destIt = ${this.elementSource.attrs.drItOption};
@@ -5822,7 +6222,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
5822
6222
  const itRandom = RawSet.drItOtherEncoding(this.elementSource.element, "DrIf");
5823
6223
  const vars = RawSet.drVarEncoding(this.elementSource.element, this.elementSource.attrs.drVarOption ?? "");
5824
6224
  const newTemp = this.source.config.window.document.createElement("temp");
5825
- const keepgoing = ScriptUtils.evaluate(`
6225
+ const keepgoing = ObjectUtils.Script.evaluate(`
5826
6226
  ${this.render.bindScript}
5827
6227
  ${this.elementSource.attrs.drBeforeOption ?? ""}
5828
6228
  if ($rawSet.data === (${ObjectUtils.Path.toOptionalChainPath(attr)})) {
@@ -5937,7 +6337,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
5937
6337
  var DrThis = class extends OperatorExecuterAttrRequire {
5938
6338
  async executeAttrRequire(attr) {
5939
6339
  const optionIf = this.elementSource.attrs.drDetectIfOption ?? this.elementSource.attrs.drIfOption;
5940
- const ok = ScriptUtils.evaluate(`
6340
+ const ok = ObjectUtils.Script.evaluate(`
5941
6341
  ${this.render.bindScript}
5942
6342
  try {
5943
6343
  const ok = ${this.elementSource.attrs.drThis};
@@ -6273,9 +6673,9 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
6273
6673
  }
6274
6674
  async executeAttrRequire(attr) {
6275
6675
  RawSet.drFormOtherMoveAttr(this.elementSource.element, "name", "temp-name", this.source.config);
6276
- const data = ScriptUtils.evaluateReturn(`${attr}`, this.source.obj);
6676
+ const data = ObjectUtils.Script.evaluateReturn(`${attr}`, this.source.obj);
6277
6677
  const childs = Array.from(this.elementSource.element.querySelectorAll("[name]"));
6278
- const fromName = ScriptUtils.evaluateReturn(this.elementSource.element.getAttribute(`${RawSet.DR_FORM_NAME}:name`) ?? "", this.source.obj);
6678
+ const fromName = ObjectUtils.Script.evaluateReturn(this.elementSource.element.getAttribute(`${RawSet.DR_FORM_NAME}:name`) ?? "", this.source.obj);
6279
6679
  const thisName = fromName ?? this.elementSource.element.getAttribute("name");
6280
6680
  if (childs.length <= 0 && thisName) {
6281
6681
  childs.push(this.elementSource.element);
@@ -6288,10 +6688,10 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
6288
6688
  const eventName = it.getAttribute(`${RawSet.DR_FORM_NAME}:event`) ?? "change";
6289
6689
  const validatorName = it.getAttribute(`${RawSet.DR_FORM_NAME}:validator`);
6290
6690
  const attrEventName = EventManager.attrPrefix + "event-" + eventName;
6291
- let varpath = ScriptUtils.evaluateReturn(this.elementSource.element.getAttribute(`${RawSet.DR_FORM_NAME}:name`) ?? "", this.source.obj) ?? it.getAttribute("name");
6691
+ let varpath = ObjectUtils.Script.evaluateReturn(this.elementSource.element.getAttribute(`${RawSet.DR_FORM_NAME}:name`) ?? "", this.source.obj) ?? it.getAttribute("name");
6292
6692
  if (varpath != null) {
6293
6693
  if (validatorName) {
6294
- ScriptUtils.evaluate(
6694
+ ObjectUtils.Script.evaluate(
6295
6695
  `
6296
6696
  ${this.render.bindScript}
6297
6697
  const validator = typeof ${validatorName} ==='function' ? new ${validatorName}() : ${validatorName};
@@ -6309,7 +6709,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
6309
6709
  );
6310
6710
  }
6311
6711
  varpath = `${attr}['${varpath}']`;
6312
- const data2 = ScriptUtils.evaluateReturn(`${varpath}`, this.source.obj);
6712
+ const data2 = ObjectUtils.Script.evaluateReturn(`${varpath}`, this.source.obj);
6313
6713
  if (data2 instanceof ValidatorArray) {
6314
6714
  it.setAttribute(attrEventName, `${varpath}.setArrayValue($target, $target.value, $event); ${it.getAttribute(attrEventName) ?? ""};`);
6315
6715
  data2.addValidator(it.value, it);
@@ -6335,7 +6735,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
6335
6735
  }
6336
6736
  async executeAttrRequire(attr) {
6337
6737
  const newTemp = this.source.config.window.document.createElement("temp");
6338
- ScriptUtils.evaluate(`
6738
+ ObjectUtils.Script.evaluate(`
6339
6739
  ${this.render.bindScript}
6340
6740
  const n = $element.cloneNode(true);
6341
6741
  ${this.elementSource.attrs.drBeforeOption ?? ""}
@@ -6370,7 +6770,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
6370
6770
  }
6371
6771
  async executeAttrRequire(attr) {
6372
6772
  const newTemp = this.source.config.window.document.createElement("temp");
6373
- ScriptUtils.evaluate(`
6773
+ ObjectUtils.Script.evaluate(`
6374
6774
  ${this.render.bindScript}
6375
6775
  const n = $element.cloneNode(true);
6376
6776
  ${this.elementSource.attrs.drBeforeOption ?? ""}
@@ -6409,7 +6809,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
6409
6809
  const itRandom = RawSet.drItOtherEncoding(this.elementSource.element);
6410
6810
  const vars = RawSet.drVarEncoding(this.elementSource.element, this.elementSource.attrs.drVarOption ?? "");
6411
6811
  const newTemp = this.source.config.window.document.createElement("temp");
6412
- ScriptUtils.evaluate(`
6812
+ ObjectUtils.Script.evaluate(`
6413
6813
  ${this.render.bindScript}
6414
6814
  ${this.elementSource.attrs.drBeforeOption ?? ""}
6415
6815
  for(${attr}) {
@@ -6455,13 +6855,21 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
6455
6855
  const itRandom = RawSet.drItOtherEncoding(this.elementSource.element, "DrForOf");
6456
6856
  const vars = RawSet.drVarEncoding(this.elementSource.element, this.elementSource.attrs.drVarOption ?? "");
6457
6857
  const newTemp = this.source.config.window.document.createElement("temp");
6458
- ScriptUtils.evaluate(`
6858
+ const variableName = this.elementSource.element.getAttribute(RawSet.DR_VARIABLE_NAME_OPTIONNAME);
6859
+ const itemVariableName = this.elementSource.element.getAttribute(RawSet.DR_ITEM_VARIABLE_NAME_OPTIONNAME);
6860
+ const itemIndexVariableName = this.elementSource.element.getAttribute(RawSet.DR_ITEM_INDEX_VARIABLE_NAME_OPTIONNAME);
6861
+ const hasVariableName = this.elementSource.element.hasAttribute(RawSet.DR_VARIABLE_NAME_OPTIONNAME);
6862
+ const hasItemVariableName = this.elementSource.element.hasAttribute(RawSet.DR_ITEM_VARIABLE_NAME_OPTIONNAME);
6863
+ const hasItemIndexVariableName = this.elementSource.element.hasAttribute(RawSet.DR_ITEM_INDEX_VARIABLE_NAME_OPTIONNAME);
6864
+ const t0 = performance.now();
6865
+ ObjectUtils.Script.evaluate(`
6459
6866
  ${this.render.bindScript}
6460
6867
  ${this.elementSource.attrs.drBeforeOption ?? ""}
6461
6868
  var i = -1;
6462
6869
  const forOf = ${ObjectUtils.Path.toOptionalChainPath(attr)};
6463
6870
  const forOfStr = \`${attr}\`.trim();
6464
6871
  // console.log('forOf---',forOf);
6872
+ // debugger;
6465
6873
  if (forOf) {
6466
6874
  for(const it of forOf) {
6467
6875
  i++;
@@ -6478,11 +6886,41 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
6478
6886
  destIt = forOfStr + '[' + i +']'
6479
6887
  }
6480
6888
  const n = this.__render.element.cloneNode(true);
6481
- // console.log('zzzzzzzzzzz', n.getAttribute('${RawSet.DR_DETECT_ATTR_OPTIONNAME}'));
6482
6889
  Object.entries(this.__render.drAttr).filter(([k,v]) => k !== 'drForOf' && k !== 'drNextOption' && v).forEach(([k, v]) => n.setAttribute(this.__render.drAttrsOriginName[k], v));
6483
- // console.log('---------'+destIt,n, Array.from(n.getAttributeNames()).map(it=>({name:it,attr: n.getAttribute(it)})));
6484
- // console.log('---------destItdestIt',destIt);
6485
6890
  n.getAttributeNames().forEach(it => n.setAttribute(it, n.getAttribute(it).replace(/\\#it\\#/g, destIt).replace(/\\#nearForOfIt\\#/g, destIt).replace(/\\#it\\#/g, destIt).replace(/\\#nearForOfIndex\\#/g, i)))
6891
+ if (${hasVariableName} && '${variableName}') {
6892
+ n.getAttributeNames().forEach(it => n.setAttribute(it, n.getAttribute(it).replaceAll('#${variableName}#', forOfStr)));
6893
+ }
6894
+ if (${hasItemVariableName} && '${itemVariableName}') {
6895
+ n.getAttributeNames().forEach(it => n.setAttribute(it, n.getAttribute(it).replaceAll('#${itemVariableName}#', destIt)));
6896
+ }
6897
+ if (${hasItemIndexVariableName} && '${itemIndexVariableName}') {
6898
+ n.getAttributeNames().forEach(it => n.setAttribute(it, n.getAttribute(it).replaceAll('#${itemIndexVariableName}#', i)));
6899
+ }
6900
+
6901
+ const hasDrOptionAttr = n.hasAttribute('${RawSet.DR_ATTR_OPTIONNAME}');
6902
+ if (hasDrOptionAttr) {
6903
+ const drOptionAttr = n.getAttribute('${RawSet.DR_ATTR_OPTIONNAME}');
6904
+ const drOptionAttrResult = $scriptUtils.evaluateReturn(drOptionAttr, this);
6905
+ Array.from(Object.entries(drOptionAttrResult??{})).forEach(([k,v])=>{
6906
+ if (v === null) {
6907
+ n.removeAttribute(k);
6908
+ } else {
6909
+ n.setAttribute(k,v);
6910
+ }
6911
+ })
6912
+
6913
+ }
6914
+ const hasDrOptionIf = n.hasAttribute('${RawSet.DR_IF_OPTIONNAME}');
6915
+ if (hasDrOptionIf) {
6916
+ const drOptionIf = n.getAttribute('${RawSet.DR_IF_OPTIONNAME}');
6917
+ const e = $scriptUtils.evaluateReturn(drOptionIf, this);
6918
+ if(!e) {
6919
+ continue;
6920
+ }
6921
+
6922
+ }
6923
+
6486
6924
  const drOptionAttr = n.getAttribute('${RawSet.DR_DETECT_ATTR_OPTIONNAME}');
6487
6925
  if (drOptionAttr) {
6488
6926
  const drOptionAttrResult = $scriptUtils.evaluateReturn(drOptionAttr, this);
@@ -6505,12 +6943,16 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
6505
6943
  }
6506
6944
 
6507
6945
  n.innerHTML = n.innerHTML.replace(/\\#it\\#/g, destIt).replace(/\\#index\\#/g, i);
6508
- // console.log('!@@@@', n.innerHTML);
6509
- // DR_THIS_OPTIONNAME \uB294 \uC81C\uAC70\uD55C\uB2E4 \uAF2C\uC778\uB2E4. strip \uD560\uB54C \uB9C9 \uAF2C\uC5EC\uBC84\uB9B0\uB2E4.
6510
- // const drOptionThis = n.getAttribute('${RawSet.DR_THIS_OPTIONNAME}');
6511
- // if (drOptionThis) {
6512
- // n.setAttribute('${RawSet.DR_THIS_NAME}', drOptionThis)
6513
- // }
6946
+ if (${hasVariableName} && '${variableName}') {
6947
+ n.innerHTML = n.innerHTML.replaceAll('#${variableName}#', forOfStr);
6948
+ }
6949
+ if (${hasItemVariableName} && '${itemVariableName}') {
6950
+ n.innerHTML = n.innerHTML.replaceAll('#${itemVariableName}#', destIt);
6951
+ }
6952
+ if (${hasItemIndexVariableName} && '${itemIndexVariableName}') {
6953
+ n.innerHTML = n.innerHTML.replaceAll('#${itemIndexVariableName}#', i);
6954
+ }
6955
+
6514
6956
  if (this.__render.drStripOption === 'true') {
6515
6957
  Array.from(n.childNodes).forEach(it => this.__render.fag.append(it));
6516
6958
  } else {
@@ -6561,7 +7003,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
6561
7003
  const itRandom = RawSet.drItOtherEncoding(this.elementSource.element);
6562
7004
  const vars = RawSet.drVarEncoding(this.elementSource.element, this.elementSource.attrs.drVarOption ?? "");
6563
7005
  const newTemp = this.source.config.window.document.createElement("temp");
6564
- ScriptUtils.evaluate(`
7006
+ ObjectUtils.Script.evaluate(`
6565
7007
  try{
6566
7008
  ${this.render.bindScript}
6567
7009
  ${this.elementSource.attrs.drBeforeOption ?? ""}
@@ -6619,7 +7061,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
6619
7061
  const itRandom = RawSet.drItOtherEncoding(this.elementSource.element);
6620
7062
  const vars = RawSet.drVarEncoding(this.elementSource.element, this.elementSource.attrs.drVarOption ?? "");
6621
7063
  const newTemp = this.source.config.window.document.createElement("temp");
6622
- ScriptUtils.evaluate(`
7064
+ ObjectUtils.Script.evaluate(`
6623
7065
  ${this.render.bindScript}
6624
7066
  ${this.elementSource.attrs.drBeforeOption ?? ""}
6625
7067
  var i = 0;
@@ -6674,9 +7116,18 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
6674
7116
  super(rawSet, render, returnContainer, elementSource, source, afterCallBack, false);
6675
7117
  }
6676
7118
  async execute() {
6677
- const targetElement = this.source.config?.targetElements?.find(
6678
- (it) => it.name.toLowerCase() === this.elementSource.element.tagName.toLowerCase()
6679
- );
7119
+ let targetElement = void 0;
7120
+ let isTargetElementElement = this.elementSource.element.tagName.toLowerCase() === RawSet.DR_TARGET_ELEMENT_ELEMENTNAME.toLowerCase();
7121
+ if (isTargetElementElement) {
7122
+ const targetElementTagName = this.elementSource.element.getAttribute(`${RawSet.DR_TARGET_ELEMENT_ELEMENTNAME}:is`)?.toLowerCase();
7123
+ targetElement = this.source.config?.targetElements?.find(
7124
+ (it) => it.name.toLowerCase() === targetElementTagName
7125
+ );
7126
+ } else {
7127
+ targetElement = this.source.config?.targetElements?.find(
7128
+ (it) => it.name.toLowerCase() === this.elementSource.element.tagName.toLowerCase()
7129
+ );
7130
+ }
6680
7131
  if (targetElement) {
6681
7132
  if (this.rawSet.point.start instanceof this.source.config.window.HTMLMetaElement && this.rawSet.point.end instanceof this.source.config.window.HTMLMetaElement) {
6682
7133
  this.rawSet.point.start.setAttribute("this-path", `this.__domrender_components.${this.rawSet.uuid}`);
@@ -6696,7 +7147,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
6696
7147
  this.rawSet.detect = {
6697
7148
  action: () => {
6698
7149
  const script = `var $component = this.__render.component; var $element = this.__render.element; var $innerHTML = this.__render.innerHTML; var $attribute = this.__render.attribute; ${detectAction} `;
6699
- ScriptUtils.evaluate(
7150
+ ObjectUtils.Script.evaluate(
6700
7151
  script,
6701
7152
  Object.assign(this.source.obj, {
6702
7153
  __render: this.rawSet.dataSet.render
@@ -6777,7 +7228,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
6777
7228
  }
6778
7229
  async executeAttrRequire(attr) {
6779
7230
  const newTemp = this.source.config.window.document.createElement("temp");
6780
- ScriptUtils.evaluate(`
7231
+ ObjectUtils.Script.evaluate(`
6781
7232
  ${this.render.bindScript}
6782
7233
  ${this.elementSource.attrs.drBeforeOption ?? ""}
6783
7234
  const n = $element.cloneNode(true);
@@ -6839,7 +7290,7 @@ var dooboostoreSimpleBootHttpServerSsr = (() => {
6839
7290
  const newTemp = this.source.config.window.document.createElement("temp");
6840
7291
  const dictioanry = ScriptUtils.evaluateReturn(attr, this.source.obj);
6841
7292
  const dictionaryKey = this.elementSource.attrs.drKeyOption ?? "";
6842
- ScriptUtils.evaluate(`
7293
+ ObjectUtils.Script.evaluate(`
6843
7294
  ${this.render.bindScript}
6844
7295
  ${this.elementSource.attrs.drBeforeOption ?? ""}
6845
7296
  var i = 0;
@@ -7347,7 +7798,7 @@ ${indentStr}}`;
7347
7798
  this.rawSet.detect = {
7348
7799
  action: () => {
7349
7800
  const script = `var $component = this.__render.component; var $element = this.__render.element; var $innerHTML = this.__render.innerHTML; var $attribute = this.__render.attribute; ${detectAction} `;
7350
- ScriptUtils.evaluate(script, Object.assign(this.source.obj, {
7801
+ ObjectUtils.Script.evaluate(script, Object.assign(this.source.obj, {
7351
7802
  __render: this.rawSet.dataSet.render
7352
7803
  }));
7353
7804
  }
@@ -7405,7 +7856,7 @@ ${indentStr}}`;
7405
7856
  NodeUtils2.replaceNode = (targetNode, newNode) => {
7406
7857
  return targetNode.parentNode?.replaceChild(newNode, targetNode);
7407
7858
  };
7408
- NodeUtils2.addNode = (targetNode, newNode) => {
7859
+ NodeUtils2.insertAfter = (targetNode, newNode) => {
7409
7860
  return targetNode.parentNode?.insertBefore(newNode, targetNode.nextSibling);
7410
7861
  };
7411
7862
  NodeUtils2.cloneNode = (element, deep) => {
@@ -7503,7 +7954,8 @@ ${indentStr}}`;
7503
7954
  const targetAttrMap = element.getAttribute(EventManager.normalAttrMapAttrName);
7504
7955
  if (targetAttrMap) {
7505
7956
  new Map(JSON.parse(targetAttrMap)).forEach((v, k) => {
7506
- targetScripts.push(`(${v})`);
7957
+ const variablePaths = v.variablePaths;
7958
+ variablePaths.forEach((it) => targetScripts.push(`(${it.inner})`));
7507
7959
  });
7508
7960
  }
7509
7961
  script = targetScripts.join(";");
@@ -7518,10 +7970,49 @@ ${indentStr}}`;
7518
7970
  });
7519
7971
  return usingTriggerVariables;
7520
7972
  }
7521
- // 중요 render 처리 부분
7522
- // public async render(obj: any, config: DomRenderConfig): Promise<RawSet[]> {
7523
- // }
7524
7973
  async render(obj, config) {
7974
+ if (this.dataSet.fragment.childNodes.length === 1 && this.dataSet.fragment.childNodes[0].nodeType === Node.TEXT_NODE) {
7975
+ const textContent = this.dataSet.fragment.childNodes[0].textContent;
7976
+ if (textContent) {
7977
+ const runText = _RawSet2.expressionGroups(textContent)[0][1];
7978
+ const __render = {
7979
+ rawSet: this,
7980
+ scripts: EventManager.setBindProperty(config?.scripts, obj),
7981
+ router: config?.router,
7982
+ range: Range.range,
7983
+ element: this.dataSet.fragment.childNodes[0],
7984
+ attribute: {},
7985
+ rootObject: obj,
7986
+ scriptUtils: ObjectUtils.Script,
7987
+ nearThis: this.findNearThis(obj),
7988
+ parentThis: this.findParentThis(obj),
7989
+ bindScript: ` /** render **/
7990
+ const ${EventManager.SCRIPTS_VARNAME} = this.__render.scripts;
7991
+ const ${EventManager.RAWSET_VARNAME} = this.__render.rawSet;
7992
+ const ${EventManager.ELEMENT_VARNAME} = this.__render.element;
7993
+ const ${EventManager.ATTRIBUTE_VARNAME} = this.__render.attribute;
7994
+ const ${EventManager.RANGE_VARNAME} = this.__render.range;
7995
+ const ${EventManager.ROUTER_VARNAME} = this.__render.router;
7996
+ const ${EventManager.NEAR_THIS_VARNAME} = this.__render.nearThis;
7997
+ const ${EventManager.PARENT_THIS_VARNAME} = this.__render.parentThis;
7998
+ const ${EventManager.SCRIPT_UTILS_VARNAME} = this.__render.scriptUtils;
7999
+ const ${EventManager.ROOT_OBJECT_VARNAME} = this.__render.rootObject;
8000
+ `
8001
+ };
8002
+ try {
8003
+ const newValue = ObjectUtils.Script.evaluateReturn({
8004
+ bodyScript: __render.bindScript,
8005
+ returnScript: runText
8006
+ }, Object.assign(obj, { __render }));
8007
+ const newValueStr = String(newValue);
8008
+ if (this.lastRenderedValue === newValueStr) {
8009
+ return { raws: [], executedOperators: [] };
8010
+ }
8011
+ this.lastRenderedValue = newValueStr;
8012
+ } catch (e) {
8013
+ }
8014
+ }
8015
+ }
7525
8016
  const genNode = config.window.document.importNode(this.dataSet.fragment, true);
7526
8017
  const raws = [];
7527
8018
  const onAttrInitCallBacks = [];
@@ -7564,12 +8055,15 @@ ${indentStr}}`;
7564
8055
  const runText = _RawSet2.expressionGroups(textContent)[0][1];
7565
8056
  let newNode;
7566
8057
  if (textContent?.startsWith("#")) {
7567
- const r = ObjectUtils.Script.evaluate(`${__render.bindScript} return ${runText}`, Object.assign(obj, { __render }));
8058
+ const r = ObjectUtils.Script.evaluateReturn(
8059
+ { bodyScript: __render.bindScript, returnScript: runText },
8060
+ Object.assign(obj, { __render })
8061
+ );
7568
8062
  const template = config.window.document.createElement("template");
7569
8063
  template.innerHTML = r;
7570
8064
  newNode = template.content;
7571
8065
  } else {
7572
- const r = ObjectUtils.Script.evaluate(`${__render.bindScript} return ${runText}`, Object.assign(obj, { __render }));
8066
+ const r = ObjectUtils.Script.evaluateReturn({ bodyScript: __render.bindScript, returnScript: runText }, Object.assign(obj, { __render }));
7573
8067
  newNode = config.window.document.createTextNode(r);
7574
8068
  }
7575
8069
  cNode.parentNode?.replaceChild(newNode, cNode);
@@ -7664,12 +8158,12 @@ ${indentStr}}`;
7664
8158
  });
7665
8159
  for (const it of onThisComponentSetCallBacks) {
7666
8160
  if (isOnInitRender(it.obj)) {
7667
- it.obj?.onInitRender?.({}, this);
8161
+ await it.obj?.onInitRender?.({}, this);
7668
8162
  }
7669
8163
  }
7670
8164
  for (const it of onElementInitCallBacks) {
7671
8165
  if (isOnInitRender(this.dataSet.render?.currentThis)) {
7672
- this.dataSet.render.currentThis.onInitRender({}, this);
8166
+ await this.dataSet.render.currentThis.onInitRender({}, this);
7673
8167
  }
7674
8168
  config?.onElementInit?.(it.name, obj, this, it.targetElement);
7675
8169
  }
@@ -7687,6 +8181,7 @@ ${indentStr}}`;
7687
8181
  }
7688
8182
  });
7689
8183
  }
8184
+ console.groupEnd();
7690
8185
  return { raws, executedOperators };
7691
8186
  }
7692
8187
  // 중요 스타일 적용 부분
@@ -7771,7 +8266,10 @@ ${indentStr}}`;
7771
8266
  getDrAppendAttributeAndDelete(element, obj) {
7772
8267
  let data = element.getAttribute(_RawSet2.DR_APPENDER_NAME);
7773
8268
  if (data && !/\[.+\]/g.test(data)) {
7774
- const currentIndex = ObjectUtils.Script.evaluateReturn(`${ObjectUtils.Path.toOptionalChainPath(data)}?.length -1`, obj);
8269
+ const currentIndex = ObjectUtils.Script.evaluateReturn(
8270
+ `${ObjectUtils.Path.toOptionalChainPath(data)}?.length -1`,
8271
+ obj
8272
+ );
7775
8273
  data = `${data}[${currentIndex}]`;
7776
8274
  element.setAttribute(_RawSet2.DR_APPENDER_NAME, data);
7777
8275
  }
@@ -7802,7 +8300,7 @@ ${indentStr}}`;
7802
8300
  }
7803
8301
  if (element2.hasAttribute(EventManager.attrAttrName)) {
7804
8302
  const script = element2.getAttribute(EventManager.attrAttrName) ?? "";
7805
- const keyValuePairs = Array.from(script.matchAll(/(\w+):\s*([^,}]+)/g)).map((match) => ({
8303
+ const keyValuePairs = Array.from(script.matchAll(/['"]?([\w-_]+)['"]?:\s*([^,}]+)/g)).map((match) => ({
7806
8304
  key: match[1],
7807
8305
  value: match[2]
7808
8306
  }));
@@ -7812,27 +8310,35 @@ ${indentStr}}`;
7812
8310
  }
7813
8311
  const targetElementIs = element2.getAttribute(_RawSet2.DR_REPLACE_TARGET_ELEMENT_IS_NAME);
7814
8312
  const targetElementNames = config.targetElements?.map((it) => it.name.toLowerCase()) ?? [];
8313
+ targetElementNames.push(..._RawSet2.DR_ELEMENTS);
7815
8314
  const isElement = targetElementNames.includes(element2.tagName.toLowerCase()) || targetElementNames.includes(targetElementIs?.toLowerCase());
7816
8315
  const targetAttrNames = (config.targetAttrs?.map((it) => it.name) ?? []).concat([..._RawSet2.DR_ATTRIBUTES]);
7817
8316
  const normalAttrs = /* @__PURE__ */ new Map();
7818
8317
  const linkVariables = /* @__PURE__ */ new Map();
7819
8318
  const linkNames = EventManager.linkAttrs.map((it) => it.name);
7820
- const isAttr = element2.getAttributeNames().filter((it) => {
7821
- const value = element2.getAttribute(it);
8319
+ const isAttr = element2.getAttributeNames().filter((it) => !EventManager.noDetectAttr.includes(it)).filter((it) => {
8320
+ const value = element2.getAttribute(it)?.trim();
7822
8321
  if (value && linkNames.includes(it)) {
7823
8322
  linkVariables.set(it, value);
7824
8323
  } else if (value && _RawSet2.isExpression(value)) {
7825
- let variablePath = _RawSet2.expressionGroups(value)[0][1];
7826
- const originVariable = variablePath;
7827
- variablePath = variablePath.replace(/#[^#]*#/g, "({})");
7828
- const optionalChainPath = ObjectUtils.Path.toOptionalChainPath(variablePath);
7829
- const cval = ObjectUtils.Script.evaluateReturn(optionalChainPath, Object.assign(obj));
8324
+ const variablePaths = _RawSet2.expressionGroups(value).map((it2) => ({
8325
+ origin: it2[0].trim(),
8326
+ inner: it2[1].trim()
8327
+ }));
8328
+ const isStringTemplate = variablePaths.length > 1 || variablePaths[0] && variablePaths[0].origin !== value;
8329
+ let targetScript = value;
8330
+ variablePaths.forEach((it2) => {
8331
+ let r3 = it2.inner.replace(/#[^#]*#/g, "({})");
8332
+ r3 = ObjectUtils.Path.toOptionalChainPath(r3);
8333
+ targetScript = targetScript.replaceAll(it2.origin, `\${${r3}}`);
8334
+ });
8335
+ const cval = ObjectUtils.Script.evaluateReturn("`" + targetScript + "`", Object.assign(obj));
7830
8336
  if (cval === null) {
7831
8337
  element2.removeAttribute(it);
7832
8338
  } else {
7833
8339
  element2.setAttribute(it, cval);
7834
8340
  }
7835
- normalAttrs.set(it, originVariable);
8341
+ normalAttrs.set(it, { originalAttrValue: value, variablePaths, isStringTemplate });
7836
8342
  }
7837
8343
  const isTargetAttr = targetAttrNames.includes(it.toLowerCase());
7838
8344
  return isTargetAttr;
@@ -7903,7 +8409,8 @@ ${indentStr}}`;
7903
8409
  lasterIndex = regexArr.index + it.content.length;
7904
8410
  }
7905
8411
  template.content.append(config.window.document.createTextNode(text.substring(lasterIndex, text.length)));
7906
- currentNode2?.parentNode?.replaceChild(template.content, currentNode2);
8412
+ const p = currentNode2?.parentNode;
8413
+ p?.replaceChild(template.content, currentNode2);
7907
8414
  } else if (currentNode2.nodeType === Node2.ELEMENT_NODE) {
7908
8415
  const uuid = `${RandomUtils.alphabet(40)}`;
7909
8416
  const element2 = currentNode2;
@@ -7912,6 +8419,7 @@ ${indentStr}}`;
7912
8419
  const startEndPoint = _RawSet2.createStartEndPoint({ node: element2, id: uuid, type: elementType }, config);
7913
8420
  const targetElementIs = element2.getAttribute(_RawSet2.DR_REPLACE_TARGET_ELEMENT_IS_NAME);
7914
8421
  const targetElementNames = config.targetElements?.map((it) => it.name.toLowerCase()) ?? [];
8422
+ targetElementNames.push(..._RawSet2.DR_ELEMENTS);
7915
8423
  const isElement = targetElementNames.includes(element2.tagName.toLowerCase()) || targetElementNames.includes(targetElementIs?.toLowerCase());
7916
8424
  const targetAttrNames = (config.targetAttrs?.map((it) => it.name) ?? []).concat(_RawSet2.DR_ATTRIBUTES);
7917
8425
  const isAttr = element2.getAttributeNames().filter((it) => targetAttrNames.includes(it.toLowerCase())).length > 0;
@@ -8246,15 +8754,39 @@ ${indentStr}}`;
8246
8754
  targetElement.querySelectorAll(EventManager.attrNames.map((it) => `[${it}]`).join(",")).forEach((it) => {
8247
8755
  it.setAttribute(EventManager.ownerVariablePathAttrName, "this");
8248
8756
  });
8249
- const componentNameReplaceKey = RandomUtils.uuid();
8250
8757
  rawSet.point.innerHTML = element.innerHTML;
8251
- const innerHTMLName = targetElement.getAttribute(_RawSet2.DR_COMPONENT_INNER_HTML_NAME_OPTIONNAME) ?? "innerHTML";
8758
+ const innerText = element.textContent?.trim() ?? "";
8759
+ const escapedInnerHTML = ConvertUtils.escapeHTML(element.innerHTML);
8760
+ const innerHTMLName = targetElement.getAttribute(_RawSet2.DR_INNER_HTML_NAME_OPTIONNAME) ?? "innerHTML";
8761
+ const innerTEXTName = targetElement.getAttribute(_RawSet2.DR_INNER_TEXT_NAME_OPTIONNAME) ?? "innerTEXT";
8762
+ const innerHTMLEscapedName = targetElement.getAttribute(_RawSet2.DR_INNER_HTML_ESCAPED_NAME_OPTIONNAME) ?? "innerHTMLEscaped";
8763
+ const templateReplacements = [];
8252
8764
  if (innerHTMLName) {
8253
- _RawSet2.replaceInnerHTML(targetElement, { asIs: `#${innerHTMLName}#`, toBe: element.innerHTML });
8765
+ templateReplacements.push({
8766
+ regex: new RegExp(`#${innerHTMLName}#`, "g"),
8767
+ callback: () => element.innerHTML
8768
+ });
8769
+ }
8770
+ if (innerTEXTName) {
8771
+ templateReplacements.push({
8772
+ regex: new RegExp(`#${innerTEXTName}#`, "g"),
8773
+ callback: () => innerText
8774
+ });
8775
+ }
8776
+ if (innerHTMLEscapedName) {
8777
+ templateReplacements.push({
8778
+ regex: new RegExp(`#${innerHTMLEscapedName}#`, "g"),
8779
+ callback: () => escapedInnerHTML
8780
+ });
8781
+ }
8782
+ if (templateReplacements.length > 0) {
8783
+ targetElement.innerHTML = StringUtils.replaceSequentially(targetElement.innerHTML, templateReplacements);
8254
8784
  }
8785
+ const componentName = targetElement.getAttribute(_RawSet2.DR_VARIABLE_NAME_OPTIONNAME) ?? "component";
8255
8786
  const optionThisName = targetElement.getAttribute(_RawSet2.DR_THIS_NAME_OPTIONNAME);
8256
8787
  targetElement.getAttributeNames().forEach((it) => targetElement.setAttribute(it, targetElement.getAttribute(it).replace(/#this#/g, drThis)));
8257
8788
  const thisRandom = this.drThisEncoding(targetElement, drThis, { asIs: /@this@/g });
8789
+ targetElement.innerHTML = targetElement.innerHTML.replaceAll(`#${componentName}#`, drThis);
8258
8790
  if (optionThisName) {
8259
8791
  targetElement.innerHTML = targetElement.innerHTML.replaceAll(`@${optionThisName}@`, drThis);
8260
8792
  }
@@ -8327,7 +8859,6 @@ ${indentStr}}`;
8327
8859
  obj.__domrender_components ?? (obj.__domrender_components = {});
8328
8860
  const domrenderComponents = obj.__domrender_components;
8329
8861
  const renderScript = ` /*createComponentTargetElement*/
8330
- // console.log('-------------------',this.__render);
8331
8862
  var ${EventManager.RAWSET_VARNAME} = this.__render.rawSet;
8332
8863
  var ${EventManager.COMPONENT_VARNAME} = this.__render.component;
8333
8864
  var ${EventManager.ELEMENT_VARNAME} = this.__render.element;
@@ -8382,15 +8913,40 @@ ${indentStr}}`;
8382
8913
  rawSet.dataSet.render = render;
8383
8914
  instance.__rawSet = rawSet;
8384
8915
  let applayTemplate = element.innerHTML;
8916
+ let applayTemplateText = element.textContent?.trim() ?? "";
8917
+ let applayTemplateEscape = ConvertUtils.escapeHTML(element.innerHTML);
8385
8918
  let innerHTMLThisRandom;
8386
- const componentName = element.getAttribute(_RawSet2.DR_COMPONENT_NAME_OPTIONNAME) ?? "component";
8387
- const innerHTMLName = element.getAttribute(_RawSet2.DR_COMPONENT_INNER_HTML_NAME_OPTIONNAME) ?? "innerHTML";
8919
+ const componentName = element.getAttribute(_RawSet2.DR_VARIABLE_NAME_OPTIONNAME) ?? "component";
8920
+ const innerHTMLName = element.getAttribute(_RawSet2.DR_INNER_HTML_NAME_OPTIONNAME) ?? "innerHTML";
8921
+ const innerTEXTName = element.getAttribute(_RawSet2.DR_INNER_TEXT_NAME_OPTIONNAME) ?? "innerTEXT";
8922
+ const innerHTMLEscapedName = element.getAttribute(_RawSet2.DR_INNER_HTML_ESCAPED_NAME_OPTIONNAME) ?? "innerHTMLEscaped";
8388
8923
  if (applayTemplate) {
8389
8924
  innerHTMLThisRandom = RandomUtils.uuid();
8390
- applayTemplate = applayTemplate.replace(/this\./g, innerHTMLThisRandom);
8391
- applayTemplate = applayTemplate.replace(RegExp(`#${componentName}#`, "g"), "this");
8925
+ applayTemplate = StringUtils.replaceSequentially(applayTemplate, [
8926
+ {
8927
+ regex: /this\./g,
8928
+ callback: () => innerHTMLThisRandom
8929
+ },
8930
+ {
8931
+ regex: new RegExp(`#${componentName}#`, "g"),
8932
+ callback: () => nearThisPath
8933
+ }
8934
+ ]);
8392
8935
  }
8393
- applayTemplate = (this.template ?? "").replace(RegExp(`#${innerHTMLName}#`, "g"), applayTemplate);
8936
+ applayTemplate = StringUtils.replaceSequentially(this.template ?? "", [
8937
+ {
8938
+ regex: new RegExp(`#${innerHTMLName}#`, "g"),
8939
+ callback: () => applayTemplate
8940
+ },
8941
+ {
8942
+ regex: new RegExp(`#${innerTEXTName}#`, "g"),
8943
+ callback: () => applayTemplateText
8944
+ },
8945
+ {
8946
+ regex: new RegExp(`#${innerHTMLEscapedName}#`, "g"),
8947
+ callback: () => applayTemplateEscape
8948
+ }
8949
+ ]);
8394
8950
  const style = _RawSet2.generateStyleTransform(this.styles, rawSet.uuid, true);
8395
8951
  element.innerHTML = style + (applayTemplate ?? "");
8396
8952
  let data = await _RawSet2.drThisCreate(
@@ -8404,8 +8960,9 @@ ${indentStr}}`;
8404
8960
  );
8405
8961
  if (data && innerHTMLThisRandom) {
8406
8962
  const template2 = config.window.document.createElement("template");
8407
- template2.content.append(data);
8408
- template2.innerHTML = template2.innerHTML.replace(RegExp(innerHTMLThisRandom, "g"), "this.");
8963
+ let s = ElementUtils.toInnerHTML(data, { document: config.window.document });
8964
+ template2.innerHTML = s.replace(RegExp(innerHTMLThisRandom, "g"), "this.");
8965
+ ;
8409
8966
  data = template2.content;
8410
8967
  }
8411
8968
  return data;
@@ -8442,8 +8999,19 @@ ${indentStr}}`;
8442
8999
  const normalAttribute = attribute[EventManager.normalAttrMapAttrName];
8443
9000
  if (normalAttribute) {
8444
9001
  new Map(JSON.parse(normalAttribute)).forEach((v, k) => {
9002
+ const variablePaths = v.variablePaths;
9003
+ let targetScript = v.originalAttrValue.trim();
9004
+ if (v.isStringTemplate) {
9005
+ variablePaths.forEach((it) => {
9006
+ let r = ObjectUtils.Path.toOptionalChainPath(it.inner);
9007
+ targetScript = targetScript.replaceAll(it.origin, `\${${r}}`);
9008
+ });
9009
+ } else {
9010
+ let r = ObjectUtils.Path.toOptionalChainPath(variablePaths[0].inner);
9011
+ targetScript = targetScript.replaceAll(variablePaths[0].origin, r);
9012
+ }
8445
9013
  const cval = ObjectUtils.Script.evaluateReturn(
8446
- { bodyScript: config.script, returnScript: v },
9014
+ { bodyScript: config.script, returnScript: v.isStringTemplate ? "`" + targetScript + "`" : targetScript },
8447
9015
  Object.assign(config.obj, config.renderData ? { __render: config.renderData } : void 0)
8448
9016
  );
8449
9017
  attribute[k] = cval;
@@ -8467,6 +9035,7 @@ ${indentStr}}`;
8467
9035
  _RawSet.DR_DETECT_NAME = "dr-detect";
8468
9036
  _RawSet.DR_STRIP_NAME = "dr-strip";
8469
9037
  _RawSet.DR_REPLACE_TARGET_ELEMENT_IS_NAME = "dr-replace-target-element-is";
9038
+ _RawSet.DR_TARGET_ELEMENT_ELEMENTNAME = "dr-target-element";
8470
9039
  _RawSet.DR_DETECT_IF_OPTIONNAME = "dr-detect-option-if";
8471
9040
  _RawSet.DR_DETECT_FILTER_OPTIONNAME = "dr-detect-option-filter";
8472
9041
  _RawSet.DR_DETECT_ATTR_OPTIONNAME = "dr-detect-option-attr";
@@ -8482,8 +9051,12 @@ ${indentStr}}`;
8482
9051
  _RawSet.DR_STRIP_OPTIONNAME = "dr-option-strip";
8483
9052
  _RawSet.DR_DESTROY_OPTIONNAME = "dr-option-destroy";
8484
9053
  _RawSet.DR_THIS_NAME_OPTIONNAME = "dr-option-this-name";
8485
- _RawSet.DR_COMPONENT_NAME_OPTIONNAME = "dr-option-component-name";
8486
- _RawSet.DR_COMPONENT_INNER_HTML_NAME_OPTIONNAME = "dr-option-component-inner-html-name";
9054
+ _RawSet.DR_VARIABLE_NAME_OPTIONNAME = "dr-option-variable-name";
9055
+ _RawSet.DR_ITEM_VARIABLE_NAME_OPTIONNAME = "dr-option-item-variable-name";
9056
+ _RawSet.DR_ITEM_INDEX_VARIABLE_NAME_OPTIONNAME = "dr-option-item-index-variable-name";
9057
+ _RawSet.DR_INNER_HTML_NAME_OPTIONNAME = "dr-option-inner-html-name";
9058
+ _RawSet.DR_INNER_TEXT_NAME_OPTIONNAME = "dr-option-inner-text-name";
9059
+ _RawSet.DR_INNER_HTML_ESCAPED_NAME_OPTIONNAME = "dr-option-inner-html-escaped-name";
8487
9060
  _RawSet.DR_KEY_OPTIONNAME = "dr-option-key";
8488
9061
  _RawSet.DR_HAS_KEYS_OPTIONNAME = "dr-option-has-keys";
8489
9062
  _RawSet.DR_ON_CREATE_ARGUMENTS_OPTIONNAME = "dr-on-create:arguments";
@@ -8519,6 +9092,9 @@ ${indentStr}}`;
8519
9092
  drKeyOption: _RawSet.DR_KEY_OPTIONNAME
8520
9093
  };
8521
9094
  _RawSet.DR_TAGS = [];
9095
+ _RawSet.DR_ELEMENTS = [
9096
+ _RawSet.DR_TARGET_ELEMENT_ELEMENTNAME
9097
+ ];
8522
9098
  _RawSet.DR_ATTRIBUTES = [
8523
9099
  _RawSet.DR_NAME,
8524
9100
  _RawSet.DR_APPENDER_NAME,
@@ -8532,7 +9108,7 @@ ${indentStr}}`;
8532
9108
  _RawSet.DR_INNERHTML_NAME,
8533
9109
  _RawSet.DR_INNERTEXT_NAME,
8534
9110
  _RawSet.DR_REPEAT_NAME,
8535
- _RawSet.DR_DETECT_NAME,
9111
+ // RawSet.DR_DETECT_NAME, // TODO: DrDetect 오퍼레이터 구현 필요
8536
9112
  _RawSet.DR_STRIP_NAME
8537
9113
  ];
8538
9114
  var RawSet = _RawSet;
@@ -8540,10 +9116,7 @@ ${indentStr}}`;
8540
9116
  // ../dom-render/dist/esm/decorators/DomRenderNoProxy.js
8541
9117
  var DomRenderNoProxyKey = "DomRender:NoProxy";
8542
9118
  var getDomRenderNoProxy = (target, propertyKey) => {
8543
- if (propertyKey === void 0) {
8544
- return Reflect.getMetadata(DomRenderNoProxyKey, target);
8545
- }
8546
- return Reflect.getMetadata(DomRenderNoProxyKey, target, propertyKey);
9119
+ return ReflectUtils.getMetadata(DomRenderNoProxyKey, target, propertyKey);
8547
9120
  };
8548
9121
  var isDomRenderNoProxy = (target, propertyKey) => {
8549
9122
  return ValidUtils.isNullOrUndefined(target) || getDomRenderNoProxy(target, propertyKey) === true;
@@ -8588,8 +9161,26 @@ ${indentStr}}`;
8588
9161
  return typeof obj?.onRawSetRendered === "function";
8589
9162
  };
8590
9163
 
9164
+ // ../dom-render/dist/esm/lifecycle/OnChildRawSetRendered.js
9165
+ var isOnChildRawSetRendered = (obj) => {
9166
+ return typeof obj?.onChildRawSetRendered === "function";
9167
+ };
9168
+
8591
9169
  // ../dom-render/dist/esm/DomRenderProxy.js
8592
- var excludeGetSetPropertys = ["onBeforeReturnGet", "onBeforeReturnSet", "__domrender_components", "__render", "_DomRender_isFinal", "_domRender_ref", "_rawSets", "_domRender_proxy", "_targets", "_DomRender_origin", "_DomRender_ref", "_DomRender_proxy"];
9170
+ var excludeGetSetPropertys = [
9171
+ "onBeforeReturnGet",
9172
+ "onBeforeReturnSet",
9173
+ "__domrender_components",
9174
+ "__render",
9175
+ "_DomRender_isFinal",
9176
+ "_domRender_ref",
9177
+ "_rawSets",
9178
+ "_domRender_proxy",
9179
+ "_targets",
9180
+ "_DomRender_origin",
9181
+ "_DomRender_ref",
9182
+ "_DomRender_proxy"
9183
+ ];
8593
9184
  var isWrapProxyDomRenderProxy = (obj) => {
8594
9185
  return obj && typeof obj === "object" && "_DomRender_isProxy" in obj;
8595
9186
  };
@@ -8606,6 +9197,7 @@ ${indentStr}}`;
8606
9197
  return void 0;
8607
9198
  };
8608
9199
  var DomRenderProxy = class _DomRenderProxy {
9200
+ // public name = Math.random();
8609
9201
  constructor(_domRender_origin, target, _domRender_config) {
8610
9202
  this._domRender_origin = _domRender_origin;
8611
9203
  this._domRender_config = _domRender_config;
@@ -8625,7 +9217,7 @@ ${indentStr}}`;
8625
9217
  static isFinal(obj) {
8626
9218
  return ValidUtils.isNull(obj) || DomRenderFinalProxy.isFinal(obj);
8627
9219
  }
8628
- run(objProxy) {
9220
+ async run(objProxy) {
8629
9221
  this._domRender_proxy = objProxy;
8630
9222
  if (isOnProxyDomRender(objProxy)) {
8631
9223
  objProxy.onProxyDomRender(this._domRender_config);
@@ -8650,18 +9242,18 @@ ${indentStr}}`;
8650
9242
  }
8651
9243
  });
8652
9244
  }
8653
- this._targets.forEach((target) => {
8654
- this.initRender(target);
8655
- });
9245
+ for (let target of this._targets) {
9246
+ await this.initRender(target);
9247
+ }
8656
9248
  }
8657
- initRender(target, rawSet) {
9249
+ async initRender(target, rawSet) {
8658
9250
  if (target instanceof Element) {
8659
9251
  target.innerHTML = target.innerHTML.replace(/@this@/g, "this");
8660
9252
  }
8661
9253
  const onCreate = target.getAttribute?.(RawSet.DR_ON_CREATE_ARGUMENTS_OPTIONNAME);
8662
9254
  let createParam = [];
8663
9255
  if (onCreate) {
8664
- createParam = ScriptUtils.evaluateReturn(onCreate, this._domRender_proxy);
9256
+ createParam = ObjectUtils.Script.evaluateReturn(onCreate, this._domRender_proxy);
8665
9257
  if (!Array.isArray(createParam)) {
8666
9258
  createParam = [createParam];
8667
9259
  }
@@ -8674,7 +9266,11 @@ ${indentStr}}`;
8674
9266
  }
8675
9267
  this._targets.add(target);
8676
9268
  const rawSets = RawSet.checkPointCreates(target, this._domRender_proxy, this._domRender_config);
8677
- this._domRender_config.eventManager.applyEvent(this._domRender_proxy, this._domRender_config.eventManager.findAttrElements(target, this._domRender_config), this._domRender_config);
9269
+ this._domRender_config.eventManager.applyEvent(
9270
+ this._domRender_proxy,
9271
+ this._domRender_config.eventManager.findAttrElements(target, this._domRender_config),
9272
+ this._domRender_config
9273
+ );
8678
9274
  rawSets.forEach((it) => {
8679
9275
  const variables = it.getUsingTriggerVariables(this._domRender_config);
8680
9276
  if (variables.size <= 0) {
@@ -8685,16 +9281,20 @@ ${indentStr}}`;
8685
9281
  });
8686
9282
  }
8687
9283
  });
8688
- this.render(this.getRawSets()).then((it) => {
9284
+ const targetRawSets = await this.render(this.getRawSets());
9285
+ for (let targetRawSet of targetRawSets) {
8689
9286
  const onInit = target.getAttribute?.(RawSet.DR_ON_INIT_ARGUMENTS_OPTIONNAME);
8690
9287
  let initParam;
8691
9288
  if (onCreate) {
8692
- initParam = ScriptUtils.evaluateReturn(onCreate, this._domRender_proxy);
9289
+ initParam = ObjectUtils.Script.evaluateReturn(onCreate, this._domRender_proxy);
8693
9290
  }
8694
9291
  if (isOnInitRender(this._domRender_proxy)) {
8695
- this._domRender_proxy.onInitRender(initParam, rawSet ?? { dataSet: { config: this._domRender_config } });
9292
+ await this._domRender_proxy.onInitRender(
9293
+ initParam,
9294
+ rawSet ?? { dataSet: { config: this._domRender_config } }
9295
+ );
8696
9296
  }
8697
- });
9297
+ }
8698
9298
  }
8699
9299
  getRawSets() {
8700
9300
  const set = /* @__PURE__ */ new Set();
@@ -8715,43 +9315,65 @@ ${indentStr}}`;
8715
9315
  }
8716
9316
  const removeRawSets = [];
8717
9317
  const rawSets = raws ?? this.getRawSets();
8718
- for (const it of rawSets) {
8719
- it.getUsingTriggerVariables(this._domRender_config).forEach((path2) => {
8720
- this.addRawSet(path2, it);
8721
- });
8722
- let renderResult;
8723
- if (it.isConnected) {
8724
- const targetAttrMap = it.point.node?.getAttribute?.(EventManager.normalAttrMapAttrName);
8725
- if (it.detect?.action) {
8726
- it.detect.action();
8727
- } else if (it.type === RawSetType.TARGET_ELEMENT && it.dataSet?.render?.currentThis && fullPathStr && targetAttrMap) {
8728
- new Map(JSON.parse(targetAttrMap)).forEach((v, k) => {
8729
- var _a7;
8730
- const isUsing = EventManager.isUsingThisVar(v, `this.${fullPathStr}`);
8731
- if (isUsing) {
8732
- const targetAttrObject = RawSet.getAttributeObject(it.point.node, { script: it.dataSet?.render?.renderScript ?? "", obj: Object.assign(this._domRender_proxy ?? {}, { __render: it.dataSet?.render }) });
8733
- (_a7 = it.dataSet).render ?? (_a7.render = {});
8734
- it.dataSet.render.attribute = targetAttrObject;
8735
- if (isOnChangeAttrRender(it.dataSet?.render?.currentThis)) {
8736
- it.dataSet?.render?.currentThis?.onChangeAttrRender?.(k, targetAttrObject[k], { rawSet: it });
9318
+ const CHUNK_SIZE = 50;
9319
+ const chunks = [];
9320
+ const rawSetsArray = Array.from(rawSets);
9321
+ for (let i = 0; i < rawSetsArray.length; i += CHUNK_SIZE) {
9322
+ chunks.push(rawSetsArray.slice(i, i + CHUNK_SIZE));
9323
+ }
9324
+ for (const chunk of chunks) {
9325
+ const promises2 = chunk.map(async (it) => {
9326
+ it.getUsingTriggerVariables(this._domRender_config).forEach((path2) => {
9327
+ this.addRawSet(path2, it);
9328
+ });
9329
+ let renderResult;
9330
+ if (it.isConnected) {
9331
+ const targetAttrMap = it.point.node?.getAttribute?.(EventManager.normalAttrMapAttrName);
9332
+ if (it.detect?.action) {
9333
+ it.detect.action();
9334
+ } else if (it.type === RawSetType.TARGET_ELEMENT && it.dataSet?.render?.currentThis && fullPathStr && targetAttrMap) {
9335
+ const attrStart = performance.now();
9336
+ new Map(JSON.parse(targetAttrMap)).forEach((v, k) => {
9337
+ var _a7;
9338
+ const isUsing = v.variablePaths.some((it2) => EventManager.isUsingThisVar(it2.inner, `this.${fullPathStr}`));
9339
+ if (isUsing) {
9340
+ const targetAttrObject = RawSet.getAttributeObject(it.point.node, {
9341
+ script: it.dataSet?.render?.renderScript ?? "",
9342
+ obj: Object.assign(this._domRender_proxy ?? {}, { __render: it.dataSet?.render })
9343
+ });
9344
+ (_a7 = it.dataSet).render ?? (_a7.render = {});
9345
+ it.dataSet.render.attribute = targetAttrObject;
9346
+ if (isOnChangeAttrRender(it.dataSet?.render?.currentThis)) {
9347
+ it.dataSet?.render?.currentThis?.onChangeAttrRender?.(k, targetAttrObject[k], { rawSet: it });
9348
+ }
8737
9349
  }
9350
+ });
9351
+ const attrEnd = performance.now();
9352
+ } else {
9353
+ const renderStart = performance.now();
9354
+ const rawSets2 = await it.render(this._domRender_proxy, this._domRender_config);
9355
+ const renderEnd = performance.now();
9356
+ renderResult = rawSets2;
9357
+ if (rawSets2 && rawSets2.raws.length > 0) {
9358
+ await this.render(rawSets2.raws);
8738
9359
  }
8739
- });
8740
- } else {
8741
- const rawSets2 = await it.render(this._domRender_proxy, this._domRender_config);
8742
- renderResult = rawSets2;
8743
- if (rawSets2 && rawSets2.raws.length > 0) {
8744
- await this.render(rawSets2.raws);
8745
9360
  }
9361
+ } else {
9362
+ removeRawSets.push(it);
8746
9363
  }
8747
- } else {
8748
- removeRawSets.push(it);
8749
- }
8750
- const t = it.findNearThis(this._domRender_proxy);
8751
- if (isOnRawSetRendered(t)) {
8752
- await t.onRawSetRendered(it, { path: fullPathStr, renderResult });
9364
+ const t = it.findNearThis(this._domRender_proxy);
9365
+ if (isOnRawSetRendered(t)) {
9366
+ await t.onRawSetRendered(it, { path: fullPathStr, value: ObjectUtils.Script.evaluateReturn(`this.${fullPathStr}`, this._domRender_proxy), root: this._domRender_proxy, renderResult });
9367
+ }
9368
+ });
9369
+ await Promise.all(promises2);
9370
+ if (chunks.length > 1) {
9371
+ await new Promise((resolve) => requestAnimationFrame(resolve));
8753
9372
  }
8754
9373
  }
9374
+ if (isOnChildRawSetRendered(this._domRender_proxy)) {
9375
+ await this._domRender_proxy.onChildRawSetRendered();
9376
+ }
8755
9377
  if (removeRawSets.length > 0) {
8756
9378
  this.removeRawSet(...removeRawSets);
8757
9379
  }
@@ -8766,14 +9388,21 @@ ${indentStr}}`;
8766
9388
  // return current;
8767
9389
  // }
8768
9390
  root(pathInfos, value, lastDoneExecute = true) {
9391
+ const rootStartTime = Date.now();
9392
+ const pathKey = pathInfos.flat().map((i) => i.path).join(".");
8769
9393
  const fullPaths = [];
8770
9394
  if (this._domRender_ref.size > 0) {
8771
9395
  this._domRender_ref.forEach((it, key) => {
8772
9396
  if ("_DomRender_isProxy" in key) {
8773
9397
  it.forEach((sit) => {
8774
9398
  try {
9399
+ const recursiveStartTime = Date.now();
8775
9400
  const concat = pathInfos.concat([[{ path: sit, obj: key }]]);
8776
- const items = key._DomRender_proxy?.root(concat, value, lastDoneExecute);
9401
+ const items = key._DomRender_proxy?.root(
9402
+ concat,
9403
+ value,
9404
+ lastDoneExecute
9405
+ );
8777
9406
  fullPaths.push(items.flat());
8778
9407
  } catch (e) {
8779
9408
  }
@@ -8781,6 +9410,7 @@ ${indentStr}}`;
8781
9410
  }
8782
9411
  });
8783
9412
  } else {
9413
+ const pathProcessStartTime = Date.now();
8784
9414
  const strings = pathInfos.reverse().map((it) => it.map((it2) => it2.path).join(","));
8785
9415
  const fullPathStr = strings.map((it) => isNaN(Number(it)) ? "." + it : `[${it}]`).join("").slice(1);
8786
9416
  if (lastDoneExecute) {
@@ -8788,10 +9418,13 @@ ${indentStr}}`;
8788
9418
  const front = strings.slice(0, strings.length - 1).map((it) => isNaN(Number(it)) ? "." + it : `[${it}]`).join("");
8789
9419
  const lastPropertyName = strings[strings.length - 1];
8790
9420
  const path2 = "this" + front;
8791
- const data = ScriptUtils.evaluateReturn(ObjectUtils.Path.toOptionalChainPath(path2), this._domRender_proxy);
9421
+ const data = ObjectUtils.Script.evaluateReturn(ObjectUtils.Path.toOptionalChainPath(path2), this._domRender_proxy);
9422
+ const promiseStartTime = Date.now();
8792
9423
  new Promise(async (resolve) => {
9424
+ const promiseInnerStartTime = Date.now();
8793
9425
  let rData = [];
8794
9426
  const firstPathStr = front.slice(1);
9427
+ const dictionaryCheckStartTime = Date.now();
8795
9428
  const firstTargets = this._rawSets.get(firstPathStr);
8796
9429
  const firstTargetDictionary = [];
8797
9430
  firstTargets?.forEach((it) => {
@@ -8809,10 +9442,19 @@ ${indentStr}}`;
8809
9442
  if (value === void 0) {
8810
9443
  const rawSet = it.getHasRawSet(lastPropertyName);
8811
9444
  rawSet?.remove();
8812
- startElement.setAttribute(RawSet.DR_HAS_KEYS_OPTIONNAME, keys.filter((it2) => it2 !== lastPropertyName).join(","));
9445
+ startElement.setAttribute(
9446
+ RawSet.DR_HAS_KEYS_OPTIONNAME,
9447
+ keys.filter((it2) => it2 !== lastPropertyName).join(",")
9448
+ );
8813
9449
  }
8814
9450
  if (!keys.includes(lastPropertyName)) {
8815
- const raws = DrThisProperty.append(this._domRender_proxy, fullPathStr, lastPropertyName, it, this._domRender_config);
9451
+ const raws = DrThisProperty.append(
9452
+ this._domRender_proxy,
9453
+ fullPathStr,
9454
+ lastPropertyName,
9455
+ it,
9456
+ this._domRender_config
9457
+ );
8816
9458
  if (raws) {
8817
9459
  rawSets.push(...raws);
8818
9460
  }
@@ -8824,6 +9466,7 @@ ${indentStr}}`;
8824
9466
  rData = await this.render(rawSets);
8825
9467
  }
8826
9468
  }
9469
+ const renderStartTime = Date.now();
8827
9470
  if (lastPropertyName === "length" && Array.isArray(data)) {
8828
9471
  const aIterable = this._rawSets.get(firstPathStr);
8829
9472
  if (aIterable) {
@@ -8832,14 +9475,27 @@ ${indentStr}}`;
8832
9475
  } else if (iterable) {
8833
9476
  rData = await this.render(Array.from(iterable), fullPathStr);
8834
9477
  }
9478
+ const eventProcessStartTime = Date.now();
9479
+ const Node2 = this._domRender_config.window.Node;
8835
9480
  this._targets.forEach((it) => {
8836
- if (it.nodeType === Node.DOCUMENT_FRAGMENT_NODE || it.nodeType === Node.ELEMENT_NODE) {
8837
- const targets = this._domRender_config.eventManager.findAttrElements(it, this._domRender_config);
8838
- this._domRender_config.eventManager.changeVar(this._domRender_proxy, targets, `this.${fullPathStr}`, this._domRender_config);
9481
+ if (it.nodeType === Node2.DOCUMENT_FRAGMENT_NODE || it.nodeType === Node2.ELEMENT_NODE) {
9482
+ const findAttrStartTime = Date.now();
9483
+ const targets = this._domRender_config.eventManager.findAttrElements(
9484
+ it,
9485
+ this._domRender_config
9486
+ );
9487
+ const targetCount = targets?.size || targets?.length || 0;
9488
+ const changeVarStartTime = Date.now();
9489
+ this._domRender_config.eventManager.changeVar(
9490
+ this._domRender_proxy,
9491
+ targets,
9492
+ `this.${fullPathStr}`,
9493
+ this._domRender_config
9494
+ );
8839
9495
  }
8840
9496
  });
8841
9497
  if (rData?.length > 0 && isOnChildRenderedByProperty(data)) {
8842
- const propertyValue = ScriptUtils.evaluateReturn(`this.${lastPropertyName}`, data);
9498
+ const propertyValue = ObjectUtils.Script.evaluateReturn(`this.${lastPropertyName}`, data);
8843
9499
  data.onChildRenderedByProperty(lastPropertyName, propertyValue);
8844
9500
  }
8845
9501
  resolve(rData);
@@ -8855,6 +9511,7 @@ ${indentStr}}`;
8855
9511
  target[p] = value;
8856
9512
  return true;
8857
9513
  }
9514
+ let start = performance.now();
8858
9515
  if (typeof p === "string") {
8859
9516
  value = this.proxy(receiver, value, p);
8860
9517
  }
@@ -8867,49 +9524,73 @@ ${indentStr}}`;
8867
9524
  fullPathInfo = this.root([[{ path: p, obj: this._domRender_proxy }]], value);
8868
9525
  }
8869
9526
  const rootElement = this._domRender_config.rootElement ?? this._domRender_config.window.document;
8870
- DocumentUtils.querySelectorAllByAttributeName(rootElement, EventManager.normalAttrMapAttrName)?.forEach((elementInfo) => {
8871
- const targets = new Map(ScriptUtils.evaluateReturn(elementInfo.value));
8872
- Array.from(targets.entries()).filter(([key, value2]) => value2.trim()).filter(isDefined).flatMap(([key, valueScript]) => {
8873
- return fullPathInfo.flat().filter((it) => valueScript.includes(`this.${it.path}`)).flatMap((it) => ({ key, valueScript, pathInfo: it }));
8874
- }).forEach((it) => {
8875
- const optionalPath = ObjectUtils.Path.toOptionalChainPath(it.valueScript);
8876
- const value1 = ScriptUtils.evaluateReturn(optionalPath, it.pathInfo.obj);
8877
- if (value1 === null) {
8878
- elementInfo.element.removeAttribute(it.key);
8879
- elementInfo.element[it.key] = null;
8880
- } else {
8881
- elementInfo.element.setAttribute(it.key, value1);
8882
- elementInfo.element[it.key] = value1;
8883
- }
8884
- });
8885
- });
8886
- DocumentUtils.querySelectorAllByAttributeName(rootElement, EventManager.linkTargetMapAttrName)?.forEach((elementInfo) => {
8887
- const targets = new Map(ScriptUtils.evaluateReturn(elementInfo.value));
8888
- Array.from(targets.entries()).filter(([key, value2]) => value2.trim()).filter(isDefined).flatMap(([key, valueScript]) => {
8889
- return fullPathInfo.flat().filter((it) => valueScript.includes(`this.${it.path}`)).flatMap((it) => ({ key, valueScript, pathInfo: it }));
8890
- }).forEach((info) => {
8891
- const value1 = ScriptUtils.evaluateReturn(info.valueScript, info.pathInfo.obj);
8892
- const applyAttributeName = EventManager.linkAttrs.find((it) => it.name === info.key);
8893
- if (applyAttributeName) {
8894
- if (value1 === null) {
8895
- elementInfo.element.removeAttribute(applyAttributeName.property);
9527
+ DocumentUtils.querySelectorAllByAttributeName(rootElement, EventManager.normalAttrMapAttrName)?.forEach(
9528
+ (elementInfo) => {
9529
+ const targets = new Map(
9530
+ ObjectUtils.Script.evaluateReturn(elementInfo.value)
9531
+ );
9532
+ Array.from(targets.entries()).filter(isDefined).flatMap(([key, valueScript]) => {
9533
+ return fullPathInfo.flat().filter((it) => valueScript.variablePaths?.some((vit) => vit.inner.includes(`this.${it.path}`))).flatMap((it) => ({ key, valueScript, pathInfo: it }));
9534
+ }).forEach((it) => {
9535
+ const variablePaths = it.valueScript.variablePaths;
9536
+ let targetScript = it.valueScript.originalAttrValue;
9537
+ let script;
9538
+ if (it.valueScript.isStringTemplate) {
9539
+ variablePaths.forEach((it2) => {
9540
+ let r = ObjectUtils.Path.toOptionalChainPath(it2.inner);
9541
+ targetScript = targetScript.replaceAll(it2.origin, `\${${r}}`);
9542
+ });
9543
+ script = "`" + targetScript + "`";
8896
9544
  } else {
8897
- elementInfo.element.setAttribute(applyAttributeName.property, value1);
9545
+ variablePaths.forEach((it2) => {
9546
+ let r = ObjectUtils.Path.toOptionalChainPath(it2.inner);
9547
+ targetScript = targetScript.replaceAll(it2.origin, `${r}`);
9548
+ });
9549
+ script = targetScript;
8898
9550
  }
8899
- }
8900
- });
8901
- Array.from(targets.entries()).filter(([key, value2]) => value2.trim()).filter(isDefined).flatMap(([key, valueScript]) => {
8902
- return fullPathInfo.flat().filter((it) => valueScript.includes(`this.${it.path}`)).flatMap((it) => ({ key, valueScript, pathInfo: it }));
8903
- }).forEach((info) => {
8904
- const linkInfo = EventManager.linkAttrs.find((it) => it.name === info.key);
8905
- if (linkInfo) {
8906
- elementInfo.element[linkInfo.property] = value;
8907
- }
8908
- });
8909
- });
9551
+ const value1 = ObjectUtils.Script.evaluateReturn(script, it.pathInfo.obj);
9552
+ if (value1 === null || value1 === void 0) {
9553
+ elementInfo.element.removeAttribute(it.key);
9554
+ } else {
9555
+ elementInfo.element.setAttribute(it.key, value1);
9556
+ elementInfo.element[it.key] = value1;
9557
+ }
9558
+ });
9559
+ }
9560
+ );
9561
+ DocumentUtils.querySelectorAllByAttributeName(rootElement, EventManager.linkTargetMapAttrName)?.forEach(
9562
+ (elementInfo) => {
9563
+ const targets = new Map(ObjectUtils.Script.evaluateReturn(elementInfo.value));
9564
+ Array.from(targets.entries()).filter(([key, value2]) => value2.trim()).filter(isDefined).flatMap(([key, valueScript]) => {
9565
+ return fullPathInfo.flat().filter((it) => valueScript.includes(`this.${it.path}`)).flatMap((it) => ({ key, valueScript, pathInfo: it }));
9566
+ }).forEach((info) => {
9567
+ const value1 = ObjectUtils.Script.evaluateReturn(info.valueScript, info.pathInfo.obj);
9568
+ const applyAttributeName = EventManager.linkAttrs.find((it) => it.name === info.key);
9569
+ if (applyAttributeName) {
9570
+ if (value1 === null) {
9571
+ elementInfo.element.removeAttribute(applyAttributeName.property);
9572
+ } else {
9573
+ elementInfo.element.setAttribute(applyAttributeName.property, value1);
9574
+ }
9575
+ }
9576
+ });
9577
+ Array.from(targets.entries()).filter(([key, value2]) => value2.trim()).filter(isDefined).flatMap(([key, valueScript]) => {
9578
+ return fullPathInfo.flat().filter((it) => valueScript.includes(`this.${it.path}`)).flatMap((it) => ({ key, valueScript, pathInfo: it }));
9579
+ }).forEach((info) => {
9580
+ const linkInfo = EventManager.linkAttrs.find((it) => it.name === info.key);
9581
+ if (linkInfo) {
9582
+ elementInfo.element[linkInfo.property] = value;
9583
+ }
9584
+ });
9585
+ }
9586
+ );
8910
9587
  if ("onBeforeReturnSet" in receiver && typeof p === "string" && !(this._domRender_config.proxyExcludeOnBeforeReturnSets ?? []).concat(excludeGetSetPropertys).includes(p)) {
8911
9588
  if (isOnBeforeReturnSet(receiver)) {
8912
- receiver.onBeforeReturnSet?.(p, value, fullPathInfo.map((it) => it.map((it2) => it2.path).join()));
9589
+ receiver.onBeforeReturnSet?.(
9590
+ p,
9591
+ value,
9592
+ fullPathInfo.map((it) => it.map((it2) => it2.path).join())
9593
+ );
8913
9594
  }
8914
9595
  }
8915
9596
  return true;
@@ -8929,7 +9610,11 @@ ${indentStr}}`;
8929
9610
  it = it._DomRender_origin;
8930
9611
  }
8931
9612
  if ("onBeforeReturnGet" in receiver && typeof p === "string" && !(this._domRender_config.proxyExcludeOnBeforeReturnGets ?? []).concat(excludeGetSetPropertys).includes(p)) {
8932
- receiver?.onBeforeReturnGet?.(p, it, this.root([[{ path: p, obj: this._domRender_proxy }]], it, false));
9613
+ receiver?.onBeforeReturnGet?.(
9614
+ p,
9615
+ it,
9616
+ this.root([[{ path: p, obj: this._domRender_proxy }]], it, false)
9617
+ );
8933
9618
  }
8934
9619
  return it;
8935
9620
  }
@@ -9057,46 +9742,47 @@ ${indentStr}}`;
9057
9742
  }
9058
9743
 
9059
9744
  // ../core/dist/esm/message/operators/first.js
9060
- var EmptyError = class extends Error {
9061
- constructor() {
9062
- super("no elements in sequence");
9063
- this.name = "EmptyError";
9064
- }
9065
- };
9066
- function first(predicate) {
9745
+ function first(predicate, defaultValue) {
9067
9746
  return (source) => {
9068
9747
  return new Observable((subscriber) => {
9069
9748
  let index = 0;
9070
- let found = false;
9071
- const sourceSubscription = source.subscribe({
9749
+ let hasValue = false;
9750
+ const subscription = source.subscribe({
9072
9751
  next: (value) => {
9073
- if (found) return;
9074
- const passed = predicate ? predicate(value, index++) : true;
9075
- if (passed) {
9076
- found = true;
9752
+ if (hasValue) {
9753
+ return;
9754
+ }
9755
+ const shouldEmit = predicate ? predicate(value, index++) : true;
9756
+ if (shouldEmit) {
9757
+ hasValue = true;
9077
9758
  subscriber.next(value);
9078
9759
  subscriber.complete();
9079
- sourceSubscription.unsubscribe();
9760
+ subscription.unsubscribe();
9080
9761
  }
9081
9762
  },
9082
9763
  error: (err) => {
9083
- subscriber.error(err);
9764
+ if (!hasValue) {
9765
+ subscriber.error(err);
9766
+ }
9084
9767
  },
9085
9768
  complete: () => {
9086
- if (!found) {
9087
- subscriber.error(new EmptyError());
9769
+ if (!hasValue) {
9770
+ if (defaultValue !== void 0) {
9771
+ subscriber.next(defaultValue);
9772
+ subscriber.complete();
9773
+ } else {
9774
+ subscriber.error(new Error("no elements in sequence"));
9775
+ }
9088
9776
  }
9089
9777
  }
9090
9778
  });
9091
- return () => {
9092
- sourceSubscription.unsubscribe();
9093
- };
9779
+ return subscription;
9094
9780
  });
9095
9781
  };
9096
9782
  }
9097
9783
 
9098
9784
  // ../core/dist/esm/message/internal/lastValueFrom.js
9099
- var EmptyError2 = class extends Error {
9785
+ var EmptyError = class extends Error {
9100
9786
  constructor(message = "No elements in sequence") {
9101
9787
  super(message);
9102
9788
  this.name = "EmptyError";
@@ -9116,7 +9802,7 @@ ${indentStr}}`;
9116
9802
  error: reject,
9117
9803
  complete: () => {
9118
9804
  if (!_hasValue) {
9119
- reject(new EmptyError2());
9805
+ reject(new EmptyError());
9120
9806
  }
9121
9807
  }
9122
9808
  });
@@ -9221,7 +9907,7 @@ ${indentStr}}`;
9221
9907
  simpleBootFront.routingSubjectObservable.pipe(
9222
9908
  // @ts-ignore
9223
9909
  filter(
9224
- (it) => it.state === "end" && typeof it.routerModule.intent.uri === "string" && targetUrl.endsWith(it.routerModule.intent.uri)
9910
+ (it) => it.triggerPoint === "end" && typeof it.routerModule.intent.uri === "string" && targetUrl.endsWith(it.routerModule.intent.uri)
9225
9911
  ),
9226
9912
  // delay(1000),
9227
9913
  first()
@@ -9499,10 +10185,10 @@ ${indentStr}}`;
9499
10185
  this.alertService = alertService;
9500
10186
  this.config = config;
9501
10187
  this.isActive = false;
9502
- this.activeBefore = [];
9503
- this.activeAfter = [];
9504
- this.deActiveBefore = [];
9505
- this.deActiveAfter = [];
10188
+ this.activateBefore = [];
10189
+ this.activateAfter = [];
10190
+ this.deActivateBefore = [];
10191
+ this.deActivateAfter = [];
9506
10192
  this.data = /* @__PURE__ */ new Map();
9507
10193
  if (config?.uuid) {
9508
10194
  this.uuid = config.uuid;
@@ -9511,16 +10197,16 @@ ${indentStr}}`;
9511
10197
  }
9512
10198
  }
9513
10199
  addOpenBefore(fn) {
9514
- this.activeBefore.push(fn);
10200
+ this.activateBefore.push(fn);
9515
10201
  }
9516
10202
  addOpenAfter(fn) {
9517
- this.activeAfter.push(fn);
10203
+ this.activateAfter.push(fn);
9518
10204
  }
9519
10205
  addCloseBefore(fn) {
9520
- this.deActiveBefore.push(fn);
10206
+ this.deActivateBefore.push(fn);
9521
10207
  }
9522
10208
  addCloseAfter(fn) {
9523
- this.deActiveAfter.push(fn);
10209
+ this.deActivateAfter.push(fn);
9524
10210
  }
9525
10211
  setData(key, value) {
9526
10212
  this.data.set(key, value);
@@ -9528,35 +10214,35 @@ ${indentStr}}`;
9528
10214
  getData(key) {
9529
10215
  return this.data.get(key);
9530
10216
  }
9531
- async active() {
10217
+ async activate() {
9532
10218
  try {
9533
- await Promise.allSettled(this.activeBefore.map((it) => it())).then((it) => {
10219
+ await Promise.allSettled(this.activateBefore.map((it) => it())).then((it) => {
9534
10220
  this.result = this.make();
9535
10221
  this.alertService?.publish({ action: AlertAction.ACTIVE, alert: this });
9536
10222
  this.isActive = true;
9537
10223
  if (this.config?.closeTime !== void 0 && this.config?.closeTime > 0) {
9538
10224
  setTimeout(() => {
9539
- this.inActive();
10225
+ this.deActivate();
9540
10226
  }, this.config.closeTime);
9541
10227
  }
9542
- this.config?.active?.(this.result, this);
10228
+ this.config?.activate?.(this.result, this);
9543
10229
  });
9544
10230
  } catch (e) {
9545
10231
  } finally {
9546
- await Promise.allSettled(this.activeAfter.map((it) => it())).then((it) => {
10232
+ await Promise.allSettled(this.activateAfter.map((it) => it())).then((it) => {
9547
10233
  });
9548
10234
  }
9549
10235
  }
9550
- async inActive() {
10236
+ async deActivate() {
9551
10237
  try {
9552
- await Promise.allSettled(this.deActiveBefore.map((it) => it())).then((it) => {
10238
+ await Promise.allSettled(this.deActivateBefore.map((it) => it())).then((it) => {
9553
10239
  this.alertService?.publish({ action: AlertAction.IN_ACTIVE, alert: this });
9554
10240
  this.isActive = false;
9555
- this.config?.deActive?.(this.result, this);
10241
+ this.config?.deActivate?.(this.result, this);
9556
10242
  });
9557
10243
  } catch (e) {
9558
10244
  } finally {
9559
- await Promise.allSettled(this.deActiveAfter.map((it) => it())).then((it) => {
10245
+ await Promise.allSettled(this.deActivateAfter.map((it) => it())).then((it) => {
9560
10246
  });
9561
10247
  }
9562
10248
  }
@@ -10059,7 +10745,7 @@ ${indentStr}}`;
10059
10745
  const alert = this.alertService?.progress({ title: config.config.config.title });
10060
10746
  if (alert) {
10061
10747
  pipe.progress = alert;
10062
- alert.active();
10748
+ alert.activate();
10063
10749
  }
10064
10750
  }
10065
10751
  }
@@ -10067,7 +10753,7 @@ ${indentStr}}`;
10067
10753
  this.subject.next({ type: "success", config, pipe });
10068
10754
  config.config?.config?.callBackSuccess?.(config, pipe);
10069
10755
  if (config.config?.config?.alertSuccessMsg) {
10070
- this.alertService?.success({ title: config.config.config.title })?.active();
10756
+ this.alertService?.success({ title: config.config.config.title })?.activate();
10071
10757
  }
10072
10758
  }
10073
10759
  afterSuccessTransform(config, pipe) {
@@ -10075,7 +10761,7 @@ ${indentStr}}`;
10075
10761
  finally(config, pipe) {
10076
10762
  this.subject.next({ type: "final", config, pipe });
10077
10763
  config.config?.config?.callBackFinal?.(config, pipe);
10078
- pipe.progress?.inActive();
10764
+ pipe.progress?.deActivate();
10079
10765
  }
10080
10766
  error(config, pipe, e) {
10081
10767
  console.log("error", e);
@@ -10084,7 +10770,7 @@ ${indentStr}}`;
10084
10770
  if (config.config?.config?.alertErrorMsg) {
10085
10771
  this.alertService?.danger({
10086
10772
  title: `${config.config.config.title ? config.config.config.title : ""}${e.message ? `(${e.message})` : ""}`
10087
- })?.active();
10773
+ })?.activate();
10088
10774
  }
10089
10775
  if (config.config?.config?.enableErrorConsole) {
10090
10776
  console.error(`apiService Error ${config?.config?.config?.title}`, e);
@@ -10118,97 +10804,14 @@ ${indentStr}}`;
10118
10804
  var __metadata6 = function(k, v) {
10119
10805
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10120
10806
  };
10807
+ var SymbolIntentApiServiceProxy_1;
10121
10808
  var _a6;
10122
- var SymbolIntentApiServiceProxy = class SymbolIntentApiServiceProxy2 {
10809
+ var SymbolIntentApiServiceProxy = SymbolIntentApiServiceProxy_1 = class SymbolIntentApiServiceProxy2 {
10123
10810
  constructor(apiService) {
10124
10811
  this.apiService = apiService;
10125
- console.log("-------apiService", apiService);
10126
- }
10127
- get(target, prop, receiver) {
10128
- const simConfig = getSim(target);
10129
- const apiService = this.apiService;
10130
- const value = Reflect.get(target, prop, receiver);
10131
- if (typeof value === "function" && simConfig?.symbol) {
10132
- return function(...args) {
10133
- const f = value;
10134
- const p = (userConfig) => {
10135
- const headers = { ...userConfig?.headers ?? {}, ...makeIntentHeaderBySymbol(simConfig.symbol) };
10136
- const method = userConfig?.method ?? "post";
10137
- if (method === "post" && userConfig?.multipartFormData) {
10138
- return apiService.post({
10139
- target: `/${String(prop)}`,
10140
- config: {
10141
- bypassTransform: userConfig?.bypassTransform,
10142
- transformText: userConfig?.transformText,
10143
- fetch: {
10144
- credentials: "include",
10145
- headers,
10146
- body: ConvertUtils.toFormData(userConfig?.body)
10147
- }
10148
- }
10149
- });
10150
- } else if (method === "post") {
10151
- return apiService.postJson({
10152
- target: `/${String(prop)}`,
10153
- config: {
10154
- bypassTransform: userConfig?.bypassTransform,
10155
- transformText: userConfig?.transformText,
10156
- fetch: {
10157
- credentials: "include",
10158
- headers,
10159
- body: userConfig?.body
10160
- }
10161
- }
10162
- });
10163
- } else if (method === "petch") {
10164
- return apiService.patchJson({
10165
- target: `/${String(prop)}`,
10166
- config: {
10167
- bypassTransform: userConfig?.bypassTransform,
10168
- transformText: userConfig?.transformText,
10169
- fetch: {
10170
- credentials: "include",
10171
- headers,
10172
- body: userConfig?.body
10173
- }
10174
- }
10175
- });
10176
- } else {
10177
- return apiService[method]({
10178
- // return apiService.head({
10179
- target: { url: `/${String(prop)}`, searchParams: userConfig?.body },
10180
- config: {
10181
- bypassTransform: userConfig?.bypassTransform,
10182
- transformText: userConfig?.transformText,
10183
- fetch: {
10184
- credentials: "include",
10185
- headers
10186
- }
10187
- }
10188
- });
10189
- }
10190
- };
10191
- args.push(p);
10192
- return Reflect.apply(f, target, args);
10193
- };
10194
- }
10195
- return Reflect.get(target, prop, receiver);
10196
- }
10197
- apply(target, thisArg, argArray) {
10198
- console.log("SymbolIntentApiServiceProxy apply");
10199
- return Reflect.apply(target, thisArg, argArray);
10200
10812
  }
10201
- };
10202
- SymbolIntentApiServiceProxy = __decorate9([
10203
- Sim,
10204
- __metadata6("design:paramtypes", [typeof (_a6 = typeof ApiService !== "undefined" && ApiService) === "function" ? _a6 : Object])
10205
- ], SymbolIntentApiServiceProxy);
10206
-
10207
- // src/proxy/SymbolIntentApiServiceProxyBase.ts
10208
- var SymbolIntentApiServiceProxyBase = class {
10209
- // 생성자는 프록시될 대상 객체(target)와 의존성을 주입받습니다.
10210
- constructor(apiService) {
10211
- const handler = {
10813
+ static createHandler(apiService) {
10814
+ return {
10212
10815
  get(target, prop, receiver) {
10213
10816
  const simConfig = getSim(target);
10214
10817
  const value = Reflect.get(target, prop, receiver);
@@ -10224,6 +10827,7 @@ ${indentStr}}`;
10224
10827
  config: {
10225
10828
  bypassTransform: userConfig?.bypassTransform,
10226
10829
  transformText: userConfig?.transformText,
10830
+ config: userConfig?.config,
10227
10831
  fetch: {
10228
10832
  credentials: "include",
10229
10833
  headers,
@@ -10237,6 +10841,7 @@ ${indentStr}}`;
10237
10841
  config: {
10238
10842
  bypassTransform: userConfig?.bypassTransform,
10239
10843
  transformText: userConfig?.transformText,
10844
+ config: userConfig?.config,
10240
10845
  fetch: {
10241
10846
  credentials: "include",
10242
10847
  headers,
@@ -10250,6 +10855,7 @@ ${indentStr}}`;
10250
10855
  config: {
10251
10856
  bypassTransform: userConfig?.bypassTransform,
10252
10857
  transformText: userConfig?.transformText,
10858
+ config: userConfig?.config,
10253
10859
  fetch: {
10254
10860
  credentials: "include",
10255
10861
  headers,
@@ -10263,6 +10869,7 @@ ${indentStr}}`;
10263
10869
  config: {
10264
10870
  bypassTransform: userConfig?.bypassTransform,
10265
10871
  transformText: userConfig?.transformText,
10872
+ config: userConfig?.config,
10266
10873
  fetch: {
10267
10874
  credentials: "include",
10268
10875
  headers
@@ -10278,10 +10885,28 @@ ${indentStr}}`;
10278
10885
  return Reflect.get(target, prop, receiver);
10279
10886
  },
10280
10887
  apply(target, thisArg, argArray) {
10281
- console.log("SymbolIntentApiServiceProxyBase apply (from handler)");
10888
+ console.log("SymbolIntentApiServiceProxy apply");
10282
10889
  return Reflect.apply(target, thisArg, argArray);
10283
10890
  }
10284
10891
  };
10892
+ }
10893
+ get(target, prop, receiver) {
10894
+ return SymbolIntentApiServiceProxy_1.createHandler(this.apiService).get(target, prop, receiver);
10895
+ }
10896
+ apply(target, thisArg, argArray) {
10897
+ return SymbolIntentApiServiceProxy_1.createHandler(this.apiService).apply(target, thisArg, argArray);
10898
+ }
10899
+ };
10900
+ SymbolIntentApiServiceProxy = SymbolIntentApiServiceProxy_1 = __decorate9([
10901
+ Sim,
10902
+ __metadata6("design:paramtypes", [typeof (_a6 = typeof ApiService !== "undefined" && ApiService) === "function" ? _a6 : Object])
10903
+ ], SymbolIntentApiServiceProxy);
10904
+
10905
+ // src/proxy/SymbolIntentApiServiceProxyBase.ts
10906
+ var SymbolIntentApiServiceProxyBase = class {
10907
+ // 생성자는 프록시될 대상 객체(target)와 의존성을 주입받습니다.
10908
+ constructor(apiService) {
10909
+ const handler = SymbolIntentApiServiceProxy.createHandler(apiService);
10285
10910
  return new Proxy(this, handler);
10286
10911
  }
10287
10912
  };
@@ -10316,6 +10941,7 @@ ${indentStr}}`;
10316
10941
 
10317
10942
  // ../simple-boot-http-server/dist/esm/models/RequestResponse.js
10318
10943
  var import_node_gzip = __toESM(require_dist(), 1);
10944
+ var import_node_buffer = __require("node:buffer");
10319
10945
 
10320
10946
  // ../core-node/dist/esm/file/FileUtils.js
10321
10947
  var node_os = __toESM(__require("node:os"), 1);
@@ -10327,6 +10953,7 @@ ${indentStr}}`;
10327
10953
  constructor(_data) {
10328
10954
  this._data = _data;
10329
10955
  this.updateStats();
10956
+ this.etcData = _data.etcData;
10330
10957
  }
10331
10958
  get originalName() {
10332
10959
  return this._data.originalName;
@@ -10376,10 +11003,11 @@ ${indentStr}}`;
10376
11003
  }
10377
11004
  FileUtils2.File = File;
10378
11005
  FileUtils2.writeFile = async (buffer, config) => {
11006
+ config ?? (config = {});
10379
11007
  config.path ?? (config.path = `${node_os.tmpdir()}/${RandomUtils.uuid4()}_${Date.now()}`);
10380
11008
  await node_fs.promises.mkdir(config.path.substring(0, config.path.lastIndexOf("/")), { recursive: true });
10381
11009
  await node_fs.promises.writeFile(config.path, buffer);
10382
- return new File({ path: config.path, originalName: config.originalName });
11010
+ return new File({ path: config.path, originalName: config.originalName, etcData: config.etcData });
10383
11011
  };
10384
11012
  FileUtils2.path = (path2) => {
10385
11013
  return Array.isArray(path2) ? node_path.join(...path2) : path2;
@@ -10425,6 +11053,26 @@ ${indentStr}}`;
10425
11053
  const buffer = config?.option ? node_fs.readFileSync(p, config.option) : node_fs.readFileSync(p);
10426
11054
  return buffer;
10427
11055
  };
11056
+ FileUtils2.readAsync = async (path2, config) => {
11057
+ const p = FileUtils2.path(path2);
11058
+ return node_fs.promises.readFile(p, config?.option);
11059
+ };
11060
+ FileUtils2.readJsonSync = (path2) => {
11061
+ const json = FileUtils2.readStringSync(path2);
11062
+ return JSON.parse(json);
11063
+ };
11064
+ FileUtils2.readJsonAsync = async (path2) => {
11065
+ const json = await FileUtils2.readStringAsync(path2);
11066
+ return JSON.parse(json);
11067
+ };
11068
+ FileUtils2.readStringSync = (path2) => {
11069
+ const p = FileUtils2.path(path2);
11070
+ return node_fs.readFileSync(p, "utf-8");
11071
+ };
11072
+ FileUtils2.readStringAsync = async (path2) => {
11073
+ const p = FileUtils2.path(path2);
11074
+ return node_fs.promises.readFile(p, "utf-8");
11075
+ };
10428
11076
  FileUtils2.read = async (path2, config) => {
10429
11077
  const p = FileUtils2.path(path2);
10430
11078
  return node_fs.readFile(p, config.option);
@@ -10605,7 +11253,7 @@ ${indentStr}}`;
10605
11253
  const formData = {};
10606
11254
  for (const it of m) {
10607
11255
  if (it.isFile) {
10608
- formData[it.name] = await FileUtils.writeFile(it.value, { originalName: it.filename });
11256
+ formData[it.name] = await FileUtils.writeFile(it.value, { originalName: it.filename, etcData: it });
10609
11257
  } else {
10610
11258
  const target = formData[it.name];
10611
11259
  if (Array.isArray(target)) {
@@ -10883,7 +11531,28 @@ ${indentStr}}`;
10883
11531
  this.res.end(data);
10884
11532
  }
10885
11533
  async resEnd(chunk) {
10886
- this.resWriteChunk = chunk ?? this.resWriteChunk;
11534
+ if (chunk instanceof Response) {
11535
+ chunk.headers.forEach((value, key) => {
11536
+ this.res.setHeader(`ORIGIN-${key}`, value);
11537
+ });
11538
+ if (!this.resHeader(HttpHeaders.ContentType)) {
11539
+ const contentType = chunk.headers.get(HttpHeaders.ContentType);
11540
+ if (contentType) {
11541
+ this.res.setHeader(HttpHeaders.ContentType, contentType);
11542
+ }
11543
+ }
11544
+ this.res.statusCode = chunk.status;
11545
+ this.resWriteChunk = import_buffer.Buffer.from(await chunk.arrayBuffer());
11546
+ } else if (chunk instanceof import_node_buffer.Blob) {
11547
+ this.resWriteChunk = import_buffer.Buffer.from(await chunk.arrayBuffer());
11548
+ if (!this.resHeader(HttpHeaders.ContentType)) {
11549
+ this.res.setHeader(HttpHeaders.ContentType, chunk.type);
11550
+ }
11551
+ } else if (chunk instanceof ArrayBuffer) {
11552
+ this.resWriteChunk = import_buffer.Buffer.from(chunk);
11553
+ } else {
11554
+ this.resWriteChunk = chunk ?? this.resWriteChunk;
11555
+ }
10887
11556
  if (this.req.readable) {
10888
11557
  await this.reqBodyData();
10889
11558
  await this.resEndChunk();
@@ -10900,6 +11569,11 @@ ${indentStr}}`;
10900
11569
  // // this.res.write(chunk);
10901
11570
  // return this.createRequestResponseChain();
10902
11571
  // }
11572
+ resRedirect(statusCode, location) {
11573
+ this.res.statusCode = statusCode;
11574
+ this.res.setHeader(HttpHeaders.Location, location);
11575
+ this.res.end();
11576
+ }
10903
11577
  resWriteHead(statusCode, headers) {
10904
11578
  return this.createRequestResponseChain(this.res.writeHead(statusCode, headers));
10905
11579
  }
@@ -10954,6 +11628,7 @@ ${indentStr}}`;
10954
11628
  // ../simple-boot-http-server/dist/esm/decorators/MethodMapping.js
10955
11629
  var UrlMappingSituationType = /* @__PURE__ */ ((UrlMappingSituationType2) => {
10956
11630
  UrlMappingSituationType2["REQ_JSON_BODY"] = "SIMPLE_BOOT_HTTP_SERVER://URLMAPPING/REQ_JSON_BODY";
11631
+ UrlMappingSituationType2["REQ_URL_SEARCH_PARAMS_OBJ"] = "SIMPLE_BOOT_HTTP_SERVER://URLMAPPING/REQ_URL_SEARCH_PARAMS_OBJ";
10957
11632
  UrlMappingSituationType2["REQ_FORM_URL_BODY"] = "SIMPLE_BOOT_HTTP_SERVER://URLMAPPING/REQ_FORM_URL_BODY";
10958
11633
  return UrlMappingSituationType2;
10959
11634
  })(UrlMappingSituationType || {});
@@ -10975,42 +11650,6 @@ ${indentStr}}`;
10975
11650
  }
10976
11651
  };
10977
11652
 
10978
- // ../simple-boot/dist/esm/decorators/validate/Validation.js
10979
- var ValidMetadataKey = Symbol("ValidMetadataKey");
10980
- var getValidIndex = (target, propertyKey) => {
10981
- if (target !== null && void 0 !== target && typeof target === "object") {
10982
- target = target.constructor;
10983
- }
10984
- if (propertyKey) {
10985
- const parameters = Reflect.getOwnMetadata(ValidMetadataKey, target, propertyKey);
10986
- return parameters ?? [];
10987
- } else {
10988
- return ReflectUtils.getMetadata(ValidMetadataKey, target) ?? [];
10989
- }
10990
- };
10991
- var ValidationMetadataKey = Symbol("ValidationMetadataKey");
10992
- var getValidators = (target) => {
10993
- if (target !== null && void 0 !== target && typeof target === "object") {
10994
- target = target.constructor;
10995
- }
10996
- return ReflectUtils.getMetadata(ValidationMetadataKey, target) ?? [];
10997
- };
10998
- var execValidationInValid = (obj) => {
10999
- return execValidation(obj).filter((it) => !it.valid);
11000
- };
11001
- var execValidation = (obj) => {
11002
- const validators = getValidators(obj);
11003
- const reesults = [];
11004
- validators.forEach((it) => {
11005
- reesults.push({
11006
- name: it.propertyKey,
11007
- valid: it.validator(it.propertyKey, it),
11008
- message: ""
11009
- });
11010
- });
11011
- return reesults;
11012
- };
11013
-
11014
11653
  // ../simple-boot/dist/esm/errors/ValidException.js
11015
11654
  var ValidException = class {
11016
11655
  constructor(result) {
@@ -11109,6 +11748,10 @@ ${indentStr}}`;
11109
11748
  InjectSituationType2.TransactionManager = Symbol("TransactionManager");
11110
11749
  })(InjectSituationType || (InjectSituationType = {}));
11111
11750
 
11751
+ // ../simple-boot-http-server/dist/esm/models/datas/search/ReqSearchParamsObj.js
11752
+ var ReqSearchParamsObj = class {
11753
+ };
11754
+
11112
11755
  // ../simple-boot-http-server/dist/esm/SimpleBootHttpServer.js
11113
11756
  var SimpleBootHttpServer = class extends SimpleApplication {
11114
11757
  constructor(option = new HttpServerOption()) {
@@ -11244,6 +11887,7 @@ ${indentStr}}`;
11244
11887
  const validIndexs = getValidIndex(moduleInstance, it.propertyKey);
11245
11888
  if (injects) {
11246
11889
  const isJson = injects.find((it2) => it2.config?.situationType === UrlMappingSituationType.REQ_JSON_BODY);
11890
+ const isSearchParamsObj = injects.find((it2) => it2.config?.situationType === UrlMappingSituationType.REQ_URL_SEARCH_PARAMS_OBJ);
11247
11891
  const isFormUrl = injects.find((it2) => it2.config?.situationType === UrlMappingSituationType.REQ_FORM_URL_BODY);
11248
11892
  const isTransactionManager = injects.find((it2) => it2.config?.situationType === InjectSituationType.TransactionManager);
11249
11893
  const siturationContainers = new SituationTypeContainers();
@@ -11263,6 +11907,19 @@ ${indentStr}}`;
11263
11907
  data: data2
11264
11908
  }));
11265
11909
  }
11910
+ if (isSearchParamsObj) {
11911
+ let data2 = rr.reqUrlSearchParamsObj;
11912
+ if (validIndexs.includes(isSearchParamsObj.index)) {
11913
+ const inValid = execValidationInValid(data2);
11914
+ if ((inValid?.length ?? 0) > 0) {
11915
+ throw new ValidException(inValid);
11916
+ }
11917
+ }
11918
+ siturationContainers.push(new SituationTypeContainer({
11919
+ situationType: UrlMappingSituationType.REQ_URL_SEARCH_PARAMS_OBJ,
11920
+ data: data2
11921
+ }));
11922
+ }
11266
11923
  if (isFormUrl) {
11267
11924
  let data2 = await rr.reqBodyFormUrlData();
11268
11925
  if (isFormUrl.type) {
@@ -11292,6 +11949,8 @@ ${indentStr}}`;
11292
11949
  otherStorage.set(ReqFormUrlBody, await rr.reqBodyReqFormUrlBody());
11293
11950
  } else if (paramType === ReqJsonBody) {
11294
11951
  otherStorage.set(ReqJsonBody, await rr.reqBodyReqJsonBody());
11952
+ } else if (paramType === ReqSearchParamsObj) {
11953
+ otherStorage.set(ReqSearchParamsObj, rr.reqUrlSearchParamsObj);
11295
11954
  } else if (paramType === import_url2.URLSearchParams) {
11296
11955
  otherStorage.set(import_url2.URLSearchParams, rr.reqUrlSearchParams);
11297
11956
  } else if (paramType === ReqMultipartFormBody) {