@babamba2/abap-mcp-adt-powerup 4.8.11 → 4.8.13

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 (124) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/dist/handlers/smartform/high/handleCreateSmartForm.d.ts +71 -0
  3. package/dist/handlers/smartform/high/handleCreateSmartForm.d.ts.map +1 -0
  4. package/dist/handlers/smartform/high/handleCreateSmartForm.js +163 -0
  5. package/dist/handlers/smartform/high/handleCreateSmartForm.js.map +1 -0
  6. package/dist/handlers/smartform/high/handleDeleteSmartForm.d.ts +41 -0
  7. package/dist/handlers/smartform/high/handleDeleteSmartForm.d.ts.map +1 -0
  8. package/dist/handlers/smartform/high/handleDeleteSmartForm.js +76 -0
  9. package/dist/handlers/smartform/high/handleDeleteSmartForm.js.map +1 -0
  10. package/dist/handlers/system/readonly/handleGetJobUsage.d.ts +48 -0
  11. package/dist/handlers/system/readonly/handleGetJobUsage.d.ts.map +1 -0
  12. package/dist/handlers/system/readonly/handleGetJobUsage.js +87 -0
  13. package/dist/handlers/system/readonly/handleGetJobUsage.js.map +1 -0
  14. package/dist/handlers/system/readonly/handleGetSmartFormContent.d.ts +77 -0
  15. package/dist/handlers/system/readonly/handleGetSmartFormContent.d.ts.map +1 -0
  16. package/dist/handlers/system/readonly/handleGetSmartFormContent.js +98 -0
  17. package/dist/handlers/system/readonly/handleGetSmartFormContent.js.map +1 -0
  18. package/dist/handlers/system/readonly/handleGetSmartFormLayout.d.ts +47 -0
  19. package/dist/handlers/system/readonly/handleGetSmartFormLayout.d.ts.map +1 -0
  20. package/dist/handlers/system/readonly/handleGetSmartFormLayout.js +70 -0
  21. package/dist/handlers/system/readonly/handleGetSmartFormLayout.js.map +1 -0
  22. package/dist/handlers/system/readonly/handleGetTcodeUsage.d.ts +56 -0
  23. package/dist/handlers/system/readonly/handleGetTcodeUsage.d.ts.map +1 -0
  24. package/dist/handlers/system/readonly/handleGetTcodeUsage.js +96 -0
  25. package/dist/handlers/system/readonly/handleGetTcodeUsage.js.map +1 -0
  26. package/dist/handlers/system/readonly/handleGetTransaction.d.ts +32 -6
  27. package/dist/handlers/system/readonly/handleGetTransaction.d.ts.map +1 -1
  28. package/dist/handlers/system/readonly/handleGetTransaction.js +112 -50
  29. package/dist/handlers/system/readonly/handleGetTransaction.js.map +1 -1
  30. package/dist/handlers/system/readonly/handleGetWhereUsed.d.ts +8 -1
  31. package/dist/handlers/system/readonly/handleGetWhereUsed.d.ts.map +1 -1
  32. package/dist/handlers/system/readonly/handleGetWhereUsed.js +52 -7
  33. package/dist/handlers/system/readonly/handleGetWhereUsed.js.map +1 -1
  34. package/dist/handlers/system/readonly/handleReloadProfile.d.ts +4 -3
  35. package/dist/handlers/system/readonly/handleReloadProfile.d.ts.map +1 -1
  36. package/dist/handlers/system/readonly/handleReloadProfile.js +13 -5
  37. package/dist/handlers/system/readonly/handleReloadProfile.js.map +1 -1
  38. package/dist/handlers/system/readonly/handleRenderSmartForm.d.ts +65 -0
  39. package/dist/handlers/system/readonly/handleRenderSmartForm.d.ts.map +1 -0
  40. package/dist/handlers/system/readonly/handleRenderSmartForm.js +111 -0
  41. package/dist/handlers/system/readonly/handleRenderSmartForm.js.map +1 -0
  42. package/dist/handlers/system/readonly/runtimeFeedsHelper.d.ts +1 -1
  43. package/dist/handlers/system/readonly/runtimeFeedsHelper.d.ts.map +1 -1
  44. package/dist/handlers/transport/readonly/handleGetTransport.d.ts +3 -0
  45. package/dist/handlers/transport/readonly/handleGetTransport.d.ts.map +1 -1
  46. package/dist/handlers/transport/readonly/handleGetTransport.js +24 -0
  47. package/dist/handlers/transport/readonly/handleGetTransport.js.map +1 -1
  48. package/dist/handlers/transport/readonly/handleListTransports.d.ts +2 -1
  49. package/dist/handlers/transport/readonly/handleListTransports.d.ts.map +1 -1
  50. package/dist/handlers/transport/readonly/handleListTransports.js +17 -7
  51. package/dist/handlers/transport/readonly/handleListTransports.js.map +1 -1
  52. package/dist/lib/handlers/groups/HighLevelHandlersGroup.d.ts.map +1 -1
  53. package/dist/lib/handlers/groups/HighLevelHandlersGroup.js +11 -0
  54. package/dist/lib/handlers/groups/HighLevelHandlersGroup.js.map +1 -1
  55. package/dist/lib/handlers/groups/ReadOnlyHandlersGroup.d.ts.map +1 -1
  56. package/dist/lib/handlers/groups/ReadOnlyHandlersGroup.js +25 -0
  57. package/dist/lib/handlers/groups/ReadOnlyHandlersGroup.js.map +1 -1
  58. package/dist/lib/legacyLockHint.d.ts +15 -0
  59. package/dist/lib/legacyLockHint.d.ts.map +1 -0
  60. package/dist/lib/legacyLockHint.js +34 -0
  61. package/dist/lib/legacyLockHint.js.map +1 -0
  62. package/dist/lib/legacyTableRead.d.ts +1 -1
  63. package/dist/lib/legacyTableRead.d.ts.map +1 -1
  64. package/dist/lib/legacyTableRead.js +23 -9
  65. package/dist/lib/legacyTableRead.js.map +1 -1
  66. package/dist/lib/legacyTransport.d.ts +78 -0
  67. package/dist/lib/legacyTransport.d.ts.map +1 -0
  68. package/dist/lib/legacyTransport.js +233 -0
  69. package/dist/lib/legacyTransport.js.map +1 -0
  70. package/dist/lib/nativeRfc.d.ts.map +1 -1
  71. package/dist/lib/nativeRfc.js +5 -0
  72. package/dist/lib/nativeRfc.js.map +1 -1
  73. package/dist/lib/odataRfc.d.ts +48 -0
  74. package/dist/lib/odataRfc.d.ts.map +1 -1
  75. package/dist/lib/odataRfc.js +73 -0
  76. package/dist/lib/odataRfc.js.map +1 -1
  77. package/dist/lib/profile.d.ts.map +1 -1
  78. package/dist/lib/profile.js +34 -0
  79. package/dist/lib/profile.js.map +1 -1
  80. package/dist/lib/profileEvents.d.ts +16 -0
  81. package/dist/lib/profileEvents.d.ts.map +1 -0
  82. package/dist/lib/profileEvents.js +29 -0
  83. package/dist/lib/profileEvents.js.map +1 -0
  84. package/dist/lib/rfcBackend.d.ts +2 -0
  85. package/dist/lib/rfcBackend.d.ts.map +1 -1
  86. package/dist/lib/rfcBackend.js +20 -4
  87. package/dist/lib/rfcBackend.js.map +1 -1
  88. package/dist/lib/smartFormContent.d.ts +277 -0
  89. package/dist/lib/smartFormContent.d.ts.map +1 -0
  90. package/dist/lib/smartFormContent.js +1130 -0
  91. package/dist/lib/smartFormContent.js.map +1 -0
  92. package/dist/lib/smartFormLayout.d.ts +83 -0
  93. package/dist/lib/smartFormLayout.d.ts.map +1 -0
  94. package/dist/lib/smartFormLayout.js +236 -0
  95. package/dist/lib/smartFormLayout.js.map +1 -0
  96. package/dist/lib/smartFormRender.d.ts +17 -0
  97. package/dist/lib/smartFormRender.d.ts.map +1 -0
  98. package/dist/lib/smartFormRender.js +112 -0
  99. package/dist/lib/smartFormRender.js.map +1 -0
  100. package/dist/lib/soapRfc.d.ts +17 -0
  101. package/dist/lib/soapRfc.d.ts.map +1 -1
  102. package/dist/lib/soapRfc.js +39 -0
  103. package/dist/lib/soapRfc.js.map +1 -1
  104. package/dist/lib/utils.d.ts +1 -1
  105. package/dist/lib/utils.d.ts.map +1 -1
  106. package/dist/lib/utils.js +1 -1
  107. package/dist/lib/utils.js.map +1 -1
  108. package/dist/lib/zrfcProxy.d.ts.map +1 -1
  109. package/dist/lib/zrfcProxy.js +5 -0
  110. package/dist/lib/zrfcProxy.js.map +1 -1
  111. package/dist/server/BaseMcpServer.d.ts +11 -0
  112. package/dist/server/BaseMcpServer.d.ts.map +1 -1
  113. package/dist/server/BaseMcpServer.js +69 -2
  114. package/dist/server/BaseMcpServer.js.map +1 -1
  115. package/dist/server/StdioServer.d.ts.map +1 -1
  116. package/dist/server/StdioServer.js +9 -0
  117. package/dist/server/StdioServer.js.map +1 -1
  118. package/docs/user-guide/AVAILABLE_TOOLS.md +1039 -204
  119. package/docs/user-guide/AVAILABLE_TOOLS_COMPACT.md +2 -1
  120. package/docs/user-guide/AVAILABLE_TOOLS_HIGH.md +470 -85
  121. package/docs/user-guide/AVAILABLE_TOOLS_LEGACY.md +955 -78
  122. package/docs/user-guide/AVAILABLE_TOOLS_LOW.md +271 -60
  123. package/docs/user-guide/AVAILABLE_TOOLS_READONLY.md +299 -60
  124. package/package.json +19 -19
@@ -0,0 +1,77 @@
1
+ /**
2
+ * GetSmartFormContent — read-only: what each window of a SmartForm prints.
3
+ *
4
+ * Source: the Form Builder XML of the active version (FB_CONVERT_FORM_TO_XML,
5
+ * the same XML as SMARTFORMS > Utilities > Download), parsed into pages →
6
+ * windows → content nodes. Styles (CSS), SE78 graphics (BMP) and include
7
+ * texts with a fixed key are fetched too and written as files under the MCP
8
+ * output directory. Program lines (code nodes, global coding) are never
9
+ * returned — a code node only shows up as a marker.
10
+ *
11
+ * Backend: ZMCP_ADT_DISPATCH action SSF_CONTENT through callDispatch, so it
12
+ * runs on the OData backend (BASIS 7.40) and on SOAP RFC (BASIS 7.31) alike.
13
+ *
14
+ * Companion ABAP sources: sc4sap/abap/zmcp_ssf_content.abap and
15
+ * sc4sap/abap/zmcp_adt_dispatch_ssf_content_branch.abap
16
+ */
17
+ import type { HandlerContext } from '../../../lib/handlers/interfaces';
18
+ export declare const TOOL_DEFINITION: {
19
+ readonly name: "GetSmartFormContent";
20
+ readonly available_in: readonly ["onprem", "legacy"];
21
+ readonly description: "[read-only] Read what a SmartForm prints, for a preview: per page and window (position in mm) the content tree — text nodes with their lines (paragraph format + text with inline tags and &symbols&), include texts, tables / templates / loops with line types and cells, graphics, addresses, conditions; code nodes appear only as markers (no program lines). Also fetches the SmartStyles as CSS, the SE78 graphics with a fixed key as BMP files (with printed size) and the include texts with a fixed key. Graphics / texts whose key holds a &symbol& are listed under dynamicReferences. Active version, texts in the logon language. Files go under the MCP output directory (smartforms/<form>/), including <form>.content.json with the full result; summary=true answers with an overview (windows, data declarations, &symbols&, files) instead of the content tree. Needs the ZMCP_SSF_CONTENT FM and the SSF_CONTENT dispatcher action.";
22
+ readonly inputSchema: {
23
+ readonly type: "object";
24
+ readonly properties: {
25
+ readonly form_name: {
26
+ readonly type: "string";
27
+ readonly description: "SmartForm name (e.g. \"ZMY_FORM\").";
28
+ };
29
+ readonly include_graphics: {
30
+ readonly type: "boolean";
31
+ readonly description: "Fetch SE78 graphics with a fixed key as BMP files. Default true.";
32
+ };
33
+ readonly include_styles: {
34
+ readonly type: "boolean";
35
+ readonly description: "Fetch the SmartStyles (form default + text node styles) as CSS. Default true.";
36
+ };
37
+ readonly include_texts: {
38
+ readonly type: "boolean";
39
+ readonly description: "Fetch include texts (SO10) with a fixed key. Default true.";
40
+ };
41
+ readonly summary: {
42
+ readonly type: "boolean";
43
+ readonly description: "Answer with an overview (windows, data declarations, &symbols&, graphics, files) instead of the full content tree; the full result is always written to files.content. Default false.";
44
+ };
45
+ readonly values: {
46
+ readonly type: "object";
47
+ readonly description: "Sample values for &symbols& in graphic keys (e.g. {\"IM_SIGN\": \"ZSIGN\"}): graphics named by a variable are then fetched too.";
48
+ };
49
+ readonly device: {
50
+ readonly type: "string";
51
+ readonly description: "Output device whose printer fonts the preview should assume. Default: a device whose type has fonts for most of the families of the form.";
52
+ };
53
+ readonly text_language: {
54
+ readonly type: "string";
55
+ readonly description: "Language for include texts whose key has no language: 1-char SAP key (e.g. \"3\") or 2-letter ISO code (e.g. \"KO\"). Default: the form language.";
56
+ };
57
+ };
58
+ readonly required: readonly ["form_name"];
59
+ };
60
+ };
61
+ export declare function handleGetSmartFormContent(context: HandlerContext, args: {
62
+ form_name: string;
63
+ include_graphics?: boolean;
64
+ include_styles?: boolean;
65
+ include_texts?: boolean;
66
+ summary?: boolean;
67
+ text_language?: string;
68
+ device?: string;
69
+ values?: Record<string, string>;
70
+ }): Promise<{
71
+ isError: boolean;
72
+ content: {
73
+ type: string;
74
+ text: any;
75
+ }[];
76
+ }>;
77
+ //# sourceMappingURL=handleGetSmartFormContent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handleGetSmartFormContent.d.ts","sourceRoot":"","sources":["../../../../src/handlers/system/readonly/handleGetSmartFormContent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAWvE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkDlB,CAAC;AAEX,wBAAsB,yBAAyB,CAC7C,OAAO,EAAE,cAAc,EACvB,IAAI,EAAE;IACJ,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC;;;;;;GAsCF"}
@@ -0,0 +1,98 @@
1
+ "use strict";
2
+ /**
3
+ * GetSmartFormContent — read-only: what each window of a SmartForm prints.
4
+ *
5
+ * Source: the Form Builder XML of the active version (FB_CONVERT_FORM_TO_XML,
6
+ * the same XML as SMARTFORMS > Utilities > Download), parsed into pages →
7
+ * windows → content nodes. Styles (CSS), SE78 graphics (BMP) and include
8
+ * texts with a fixed key are fetched too and written as files under the MCP
9
+ * output directory. Program lines (code nodes, global coding) are never
10
+ * returned — a code node only shows up as a marker.
11
+ *
12
+ * Backend: ZMCP_ADT_DISPATCH action SSF_CONTENT through callDispatch, so it
13
+ * runs on the OData backend (BASIS 7.40) and on SOAP RFC (BASIS 7.31) alike.
14
+ *
15
+ * Companion ABAP sources: sc4sap/abap/zmcp_ssf_content.abap and
16
+ * sc4sap/abap/zmcp_adt_dispatch_ssf_content_branch.abap
17
+ */
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.TOOL_DEFINITION = void 0;
20
+ exports.handleGetSmartFormContent = handleGetSmartFormContent;
21
+ const smartFormContent_1 = require("../../../lib/smartFormContent");
22
+ const utils_1 = require("../../../lib/utils");
23
+ exports.TOOL_DEFINITION = {
24
+ name: 'GetSmartFormContent',
25
+ available_in: ['onprem', 'legacy'],
26
+ description: '[read-only] Read what a SmartForm prints, for a preview: per page and window (position in mm) the content tree — text nodes with their lines (paragraph format + text with inline tags and &symbols&), include texts, tables / templates / loops with line types and cells, graphics, addresses, conditions; code nodes appear only as markers (no program lines). Also fetches the SmartStyles as CSS, the SE78 graphics with a fixed key as BMP files (with printed size) and the include texts with a fixed key. Graphics / texts whose key holds a &symbol& are listed under dynamicReferences. Active version, texts in the logon language. Files go under the MCP output directory (smartforms/<form>/), including <form>.content.json with the full result; summary=true answers with an overview (windows, data declarations, &symbols&, files) instead of the content tree. Needs the ZMCP_SSF_CONTENT FM and the SSF_CONTENT dispatcher action.',
27
+ inputSchema: {
28
+ type: 'object',
29
+ properties: {
30
+ form_name: {
31
+ type: 'string',
32
+ description: 'SmartForm name (e.g. "ZMY_FORM").',
33
+ },
34
+ include_graphics: {
35
+ type: 'boolean',
36
+ description: 'Fetch SE78 graphics with a fixed key as BMP files. Default true.',
37
+ },
38
+ include_styles: {
39
+ type: 'boolean',
40
+ description: 'Fetch the SmartStyles (form default + text node styles) as CSS. Default true.',
41
+ },
42
+ include_texts: {
43
+ type: 'boolean',
44
+ description: 'Fetch include texts (SO10) with a fixed key. Default true.',
45
+ },
46
+ summary: {
47
+ type: 'boolean',
48
+ description: 'Answer with an overview (windows, data declarations, &symbols&, graphics, files) instead of the full content tree; the full result is always written to files.content. Default false.',
49
+ },
50
+ values: {
51
+ type: 'object',
52
+ description: 'Sample values for &symbols& in graphic keys (e.g. {"IM_SIGN": "ZSIGN"}): graphics named by a variable are then fetched too.',
53
+ },
54
+ device: {
55
+ type: 'string',
56
+ description: 'Output device whose printer fonts the preview should assume. Default: a device whose type has fonts for most of the families of the form.',
57
+ },
58
+ text_language: {
59
+ type: 'string',
60
+ description: 'Language for include texts whose key has no language: 1-char SAP key (e.g. "3") or 2-letter ISO code (e.g. "KO"). Default: the form language.',
61
+ },
62
+ },
63
+ required: ['form_name'],
64
+ },
65
+ };
66
+ async function handleGetSmartFormContent(context, args) {
67
+ const { connection, logger } = context;
68
+ try {
69
+ const formName = String(args?.form_name ?? '')
70
+ .trim()
71
+ .toUpperCase();
72
+ if (!formName) {
73
+ return (0, utils_1.return_error)(new Error('form_name is required'));
74
+ }
75
+ logger?.info(`GetSmartFormContent: ${formName}`);
76
+ const content = await (0, smartFormContent_1.getSmartFormContent)(connection, formName, {
77
+ includeGraphics: args?.include_graphics,
78
+ includeStyles: args?.include_styles,
79
+ includeTexts: args?.include_texts,
80
+ textLanguage: args?.text_language
81
+ ? String(args.text_language).trim()
82
+ : undefined,
83
+ device: args?.device ? String(args.device).trim() : undefined,
84
+ values: args?.values && typeof args.values === 'object'
85
+ ? args.values
86
+ : undefined,
87
+ });
88
+ return (0, utils_1.return_response)({
89
+ data: JSON.stringify(args?.summary ? (0, smartFormContent_1.summarizeSmartFormContent)(content) : content, null, 2),
90
+ });
91
+ }
92
+ catch (error) {
93
+ const errorMessage = error instanceof Error ? error.message : String(error);
94
+ logger?.error(`GetSmartFormContent error: ${errorMessage}`);
95
+ return (0, utils_1.return_error)(new Error(errorMessage));
96
+ }
97
+ }
98
+ //# sourceMappingURL=handleGetSmartFormContent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handleGetSmartFormContent.js","sourceRoot":"","sources":["../../../../src/handlers/system/readonly/handleGetSmartFormContent.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAiEH,8DAiDC;AA/GD,oEAGuC;AACvC,8CAI4B;AAEf,QAAA,eAAe,GAAG;IAC7B,IAAI,EAAE,qBAAqB;IAC3B,YAAY,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAU;IAC3C,WAAW,EACT,25BAA25B;IAC75B,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBAC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AAY,EAAE,IAAI,EAAE,aAAa;gBAC/B,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,IAAI,EAAE;gBACnC,CAAC,CAAC,SAAS;YACb,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS;YAC7D,MAAM,EACJ,IAAI,EAAE,MAAM,IAAI,OAAO,IAAI,CAAC,MAAM,KAAK,QAAQ;gBAC7C,CAAC,CAAC,IAAI,CAAC,MAAM;gBACb,CAAC,CAAC,SAAS;SAChB,CAAC,CAAC;QAEH,OAAO,IAAA,uBAAe,EAAC;YACrB,IAAI,EAAE,IAAI,CAAC,SAAS,CAClB,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,IAAA,4CAAyB,EAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,EAC5D,IAAI,EACJ,CAAC,CACF;SACe,CAAC,CAAC;IACtB,CAAC;IAAC,OAAO,KAAc,EAAE,CAAC;QACxB,MAAM,YAAY,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC5E,MAAM,EAAE,KAAK,CAAC,8BAA8B,YAAY,EAAE,CAAC,CAAC;QAC5D,OAAO,IAAA,oBAAY,EAAC,IAAI,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC;IAC/C,CAAC;AACH,CAAC"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * GetSmartFormLayout — read-only: pages and window positions of a SmartForm.
3
+ *
4
+ * Source: the Form Builder object model, read on the SAP side by
5
+ * ZMCP_SSF_LAYOUT (CL_SSF_FB_SMART_FORM->LOAD in display mode, page tree,
6
+ * window node output attributes). Only layout leaves SAP: no text node
7
+ * contents, program lines, global data or form interface.
8
+ *
9
+ * Backend: ZMCP_ADT_DISPATCH action SSF_LAYOUT through callDispatch, so it
10
+ * runs on the OData backend (BASIS 7.40) and on SOAP RFC (BASIS 7.31) alike.
11
+ * Coordinates come back raw with their unit and are converted to mm here
12
+ * (LN / CH through the page variant's LPI / CPI).
13
+ *
14
+ * Companion ABAP sources: sc4sap/abap/zmcp_ssf_layout.abap and
15
+ * sc4sap/abap/zmcp_adt_dispatch_ssf_layout_branch.abap
16
+ */
17
+ import type { HandlerContext } from '../../../lib/handlers/interfaces';
18
+ export declare const TOOL_DEFINITION: {
19
+ readonly name: "GetSmartFormLayout";
20
+ readonly available_in: readonly ["onprem", "legacy"];
21
+ readonly description: "[read-only] Read the page and window layout of a SmartForm (active version; a never-activated form is read from its saved version, then `active` is false): per page the format, orientation, next page, CPI / LPI and style, and per window its type (MAIN / SECONDARY / ...), position and size as stored (value + unit) and converted to millimetres. Layout only: no texts, code or form interface. Needs the ZMCP_SSF_LAYOUT FM and the SSF_LAYOUT dispatcher action.";
22
+ readonly inputSchema: {
23
+ readonly type: "object";
24
+ readonly properties: {
25
+ readonly form_name: {
26
+ readonly type: "string";
27
+ readonly description: "SmartForm name (e.g. \"ZMY_FORM\").";
28
+ };
29
+ readonly language: {
30
+ readonly type: "string";
31
+ readonly description: "Form language: 1-char SAP key (e.g. \"E\", \"3\") or 2-letter ISO code (e.g. \"EN\", \"KO\"). Default: the master language of the form.";
32
+ };
33
+ };
34
+ readonly required: readonly ["form_name"];
35
+ };
36
+ };
37
+ export declare function handleGetSmartFormLayout(context: HandlerContext, args: {
38
+ form_name: string;
39
+ language?: string;
40
+ }): Promise<{
41
+ isError: boolean;
42
+ content: {
43
+ type: string;
44
+ text: any;
45
+ }[];
46
+ }>;
47
+ //# sourceMappingURL=handleGetSmartFormLayout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handleGetSmartFormLayout.d.ts","sourceRoot":"","sources":["../../../../src/handlers/system/readonly/handleGetSmartFormLayout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAWvE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;CAoBlB,CAAC;AAEX,wBAAsB,wBAAwB,CAC5C,OAAO,EAAE,cAAc,EACvB,IAAI,EAAE;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE;;;;;;GA8B/C"}
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ /**
3
+ * GetSmartFormLayout — read-only: pages and window positions of a SmartForm.
4
+ *
5
+ * Source: the Form Builder object model, read on the SAP side by
6
+ * ZMCP_SSF_LAYOUT (CL_SSF_FB_SMART_FORM->LOAD in display mode, page tree,
7
+ * window node output attributes). Only layout leaves SAP: no text node
8
+ * contents, program lines, global data or form interface.
9
+ *
10
+ * Backend: ZMCP_ADT_DISPATCH action SSF_LAYOUT through callDispatch, so it
11
+ * runs on the OData backend (BASIS 7.40) and on SOAP RFC (BASIS 7.31) alike.
12
+ * Coordinates come back raw with their unit and are converted to mm here
13
+ * (LN / CH through the page variant's LPI / CPI).
14
+ *
15
+ * Companion ABAP sources: sc4sap/abap/zmcp_ssf_layout.abap and
16
+ * sc4sap/abap/zmcp_adt_dispatch_ssf_layout_branch.abap
17
+ */
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.TOOL_DEFINITION = void 0;
20
+ exports.handleGetSmartFormLayout = handleGetSmartFormLayout;
21
+ const smartFormLayout_1 = require("../../../lib/smartFormLayout");
22
+ const utils_1 = require("../../../lib/utils");
23
+ exports.TOOL_DEFINITION = {
24
+ name: 'GetSmartFormLayout',
25
+ available_in: ['onprem', 'legacy'],
26
+ description: '[read-only] Read the page and window layout of a SmartForm (active version; a never-activated form is read from its saved version, then `active` is false): per page the format, orientation, next page, CPI / LPI and style, and per window its type (MAIN / SECONDARY / ...), position and size as stored (value + unit) and converted to millimetres. Layout only: no texts, code or form interface. Needs the ZMCP_SSF_LAYOUT FM and the SSF_LAYOUT dispatcher action.',
27
+ inputSchema: {
28
+ type: 'object',
29
+ properties: {
30
+ form_name: {
31
+ type: 'string',
32
+ description: 'SmartForm name (e.g. "ZMY_FORM").',
33
+ },
34
+ language: {
35
+ type: 'string',
36
+ description: 'Form language: 1-char SAP key (e.g. "E", "3") or 2-letter ISO code (e.g. "EN", "KO"). Default: the master language of the form.',
37
+ },
38
+ },
39
+ required: ['form_name'],
40
+ },
41
+ };
42
+ async function handleGetSmartFormLayout(context, args) {
43
+ const { connection, logger } = context;
44
+ try {
45
+ const formName = String(args?.form_name ?? '')
46
+ .trim()
47
+ .toUpperCase();
48
+ if (!formName) {
49
+ return (0, utils_1.return_error)(new Error('form_name is required'));
50
+ }
51
+ let language;
52
+ try {
53
+ language = (0, smartFormLayout_1.normalizeSmartFormLanguage)(args?.language);
54
+ }
55
+ catch (e) {
56
+ return (0, utils_1.return_error)(e);
57
+ }
58
+ logger?.info(`GetSmartFormLayout: ${formName}, language=${language || '(master)'}`);
59
+ const layout = await (0, smartFormLayout_1.getSmartFormLayout)(connection, formName, language);
60
+ return (0, utils_1.return_response)({
61
+ data: JSON.stringify(layout, null, 2),
62
+ });
63
+ }
64
+ catch (error) {
65
+ const errorMessage = error instanceof Error ? error.message : String(error);
66
+ logger?.error(`GetSmartFormLayout error: ${errorMessage}`);
67
+ return (0, utils_1.return_error)(new Error(errorMessage));
68
+ }
69
+ }
70
+ //# sourceMappingURL=handleGetSmartFormLayout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handleGetSmartFormLayout.js","sourceRoot":"","sources":["../../../../src/handlers/system/readonly/handleGetSmartFormLayout.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAmCH,4DAgCC;AAhED,kEAGsC;AACtC,8CAI4B;AAEf,QAAA,eAAe,GAAG;IAC7B,IAAI,EAAE,oBAAoB;IAC1B,YAAY,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAU;IAC3C,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MAAM,YAAY,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC5E,MAAM,EAAE,KAAK,CAAC,6BAA6B,YAAY,EAAE,CAAC,CAAC;QAC3D,OAAO,IAAA,oBAAY,EAAC,IAAI,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC;IAC/C,CAAC;AACH,CAAC"}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * GetTcodeUsage — read-only: was each transaction used in the last N months?
3
+ *
4
+ * Source: workload monitor (ST03N) monthly aggregates, read on the SAP side
5
+ * by ZMCP_WL_TCODE_USAGE (SWNC_COLLECTOR_GET_AGGREGATES, USERTCODE). User
6
+ * names never leave SAP — the FM returns one boolean per transaction.
7
+ *
8
+ * Backend: ECC only — OData FunctionImport `WlTcodeUsage` on ZMCP_ADT_SRV.
9
+ *
10
+ * Other system: `destination` (or SAP_USAGE_RFCDEST from the profile sap.env)
11
+ * names an SM59 destination on the connected system; the FM then reads that
12
+ * system's aggregates over RFC (DEV profile → QA / PRD business usage). The
13
+ * destination is site-specific — it is never defaulted by the plugin.
14
+ *
15
+ * Companion ABAP source: sc4sap/abap/zmcp_wl_tcode_usage_ecc.abap
16
+ */
17
+ import type { HandlerContext } from '../../../lib/handlers/interfaces';
18
+ export declare const TOOL_DEFINITION: {
19
+ readonly name: "GetTcodeUsage";
20
+ readonly available_in: readonly ["onprem", "legacy"];
21
+ readonly description: "[read-only] Check whether transactions were used in the last N months, from the ST03N workload monthly aggregates. Returns one boolean per transaction plus `coverage` = months that actually hold workload data; when coverage < months, false means \"not used in the last <coverage> months\". No user names are returned. ECC-only (ZMCP_WL_TCODE_USAGE bridge FM).";
22
+ readonly inputSchema: {
23
+ readonly type: "object";
24
+ readonly properties: {
25
+ readonly tcodes: {
26
+ readonly type: "array";
27
+ readonly items: {
28
+ readonly type: "string";
29
+ };
30
+ readonly description: "Transaction codes to check (e.g. [\"VA01\",\"ZMY_TCODE\"]).";
31
+ };
32
+ readonly months: {
33
+ readonly type: "number";
34
+ readonly description: "Months back including the current one (1-36). Default: 12.";
35
+ readonly default: 12;
36
+ };
37
+ readonly destination: {
38
+ readonly type: "string";
39
+ readonly description: "SM59 RFC destination (on the connected system) of the system to measure, e.g. the QA or PRD system. Omitted → SAP_USAGE_RFCDEST from the profile sap.env, else the connected system. \"\" or \"LOCAL\" → the connected system.";
40
+ };
41
+ };
42
+ readonly required: readonly ["tcodes"];
43
+ };
44
+ };
45
+ export declare function handleGetTcodeUsage(context: HandlerContext, args: {
46
+ tcodes: string[];
47
+ months?: number;
48
+ destination?: string;
49
+ }): Promise<{
50
+ isError: boolean;
51
+ content: {
52
+ type: string;
53
+ text: any;
54
+ }[];
55
+ }>;
56
+ //# sourceMappingURL=handleGetTcodeUsage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handleGetTcodeUsage.d.ts","sourceRoot":"","sources":["../../../../src/handlers/system/readonly/handleGetTcodeUsage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAQvE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BlB,CAAC;AAEX,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,cAAc,EACvB,IAAI,EAAE;IAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE;;;;;;GAoElE"}
@@ -0,0 +1,96 @@
1
+ "use strict";
2
+ /**
3
+ * GetTcodeUsage — read-only: was each transaction used in the last N months?
4
+ *
5
+ * Source: workload monitor (ST03N) monthly aggregates, read on the SAP side
6
+ * by ZMCP_WL_TCODE_USAGE (SWNC_COLLECTOR_GET_AGGREGATES, USERTCODE). User
7
+ * names never leave SAP — the FM returns one boolean per transaction.
8
+ *
9
+ * Backend: ECC only — OData FunctionImport `WlTcodeUsage` on ZMCP_ADT_SRV.
10
+ *
11
+ * Other system: `destination` (or SAP_USAGE_RFCDEST from the profile sap.env)
12
+ * names an SM59 destination on the connected system; the FM then reads that
13
+ * system's aggregates over RFC (DEV profile → QA / PRD business usage). The
14
+ * destination is site-specific — it is never defaulted by the plugin.
15
+ *
16
+ * Companion ABAP source: sc4sap/abap/zmcp_wl_tcode_usage_ecc.abap
17
+ */
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.TOOL_DEFINITION = void 0;
20
+ exports.handleGetTcodeUsage = handleGetTcodeUsage;
21
+ const rfcBackend_1 = require("../../../lib/rfcBackend");
22
+ const utils_1 = require("../../../lib/utils");
23
+ exports.TOOL_DEFINITION = {
24
+ name: 'GetTcodeUsage',
25
+ available_in: ['onprem', 'legacy'],
26
+ description: '[read-only] Check whether transactions were used in the last N months, from the ST03N workload monthly aggregates. Returns one boolean per transaction plus `coverage` = months that actually hold workload data; when coverage < months, false means "not used in the last <coverage> months". No user names are returned. ECC-only (ZMCP_WL_TCODE_USAGE bridge FM).',
27
+ inputSchema: {
28
+ type: 'object',
29
+ properties: {
30
+ tcodes: {
31
+ type: 'array',
32
+ items: { type: 'string' },
33
+ description: 'Transaction codes to check (e.g. ["VA01","ZMY_TCODE"]).',
34
+ },
35
+ months: {
36
+ type: 'number',
37
+ description: 'Months back including the current one (1-36). Default: 12.',
38
+ default: 12,
39
+ },
40
+ destination: {
41
+ type: 'string',
42
+ description: 'SM59 RFC destination (on the connected system) of the system to measure, e.g. the QA or PRD system. Omitted → SAP_USAGE_RFCDEST from the profile sap.env, else the connected system. "" or "LOCAL" → the connected system.',
43
+ },
44
+ },
45
+ required: ['tcodes'],
46
+ },
47
+ };
48
+ async function handleGetTcodeUsage(context, args) {
49
+ const { connection, logger } = context;
50
+ try {
51
+ const tcodes = (Array.isArray(args?.tcodes) ? args.tcodes : [])
52
+ .map((t) => String(t).trim().toUpperCase())
53
+ .filter((t) => t && !t.includes(','));
54
+ if (tcodes.length === 0) {
55
+ return (0, utils_1.return_error)(new Error('tcodes must list at least one transaction'));
56
+ }
57
+ if (process.env.SAP_VERSION?.toUpperCase() !== 'ECC') {
58
+ return (0, utils_1.return_error)(new Error('GetTcodeUsage currently routes through the ECC bridge (ZMCP_WL_TCODE_USAGE via OData FunctionImport WlTcodeUsage). Set SAP_VERSION=ECC in .sc4sap/sap.env.'));
59
+ }
60
+ const months = Math.min(36, Math.max(1, Math.trunc(Number(args.months ?? 12)) || 12));
61
+ const rawDest = args.destination !== undefined
62
+ ? String(args.destination)
63
+ : (process.env.SAP_USAGE_RFCDEST ?? '');
64
+ const destination = rawDest.trim().toUpperCase() === 'LOCAL' ? '' : rawDest.trim();
65
+ logger?.info(`GetTcodeUsage: ${tcodes.length} tcodes, months=${months}, destination=${destination || '(local)'}`);
66
+ const fm = await (0, rfcBackend_1.callWlTcodeUsage)(connection, {
67
+ tcodes,
68
+ months,
69
+ rfcdest: destination,
70
+ });
71
+ const used = tcodes.filter((t) => fm.result?.[t] === true);
72
+ const unused = tcodes.filter((t) => fm.result?.[t] !== true);
73
+ return (0, utils_1.return_response)({
74
+ data: JSON.stringify({
75
+ success: fm.subrc === 0,
76
+ path: 'ecc-odata-rfc',
77
+ system: fm.sysid || null,
78
+ destination: destination || null,
79
+ message: fm.message,
80
+ months,
81
+ coverage: fm.coverage,
82
+ complete: fm.coverage >= months,
83
+ usage_known: fm.subrc === 0,
84
+ used,
85
+ unused,
86
+ result: fm.result ?? {},
87
+ }, null, 2),
88
+ });
89
+ }
90
+ catch (error) {
91
+ const errorMessage = error instanceof Error ? error.message : String(error);
92
+ logger?.error(`GetTcodeUsage error: ${errorMessage}`);
93
+ return (0, utils_1.return_error)(new Error(errorMessage));
94
+ }
95
+ }
96
+ //# sourceMappingURL=handleGetTcodeUsage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handleGetTcodeUsage.js","sourceRoot":"","sources":["../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AC,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC;QAE7D,OAAO,IAAA,uBAAe,EAAC;YACrB,IAAI,EAAE,IAAI,CAAC,SAAS,CAClB;gBACE,OAAO,EAAE,EAAE,CAAC,KAAK,KAAK,CAAC;gBACvB,IAAI,EAAE,eAAe;gBACrB,MAAM,EAAE,EAAE,CAAC,KAAK,IAAI,IAAI;gBACxB,WAAW,EAAE,WAAW,IAAI,IAAI;gBAChC,OAAO,EAAE,EAAE,CAAC,OAAO;gBACnB,MAAM;gBACN,QAAQ,EAAE,EAAE,CAAC,QAAQ;gBACrB,QAAQ,EAAE,EAAE,CAAC,QAAQ,IAAI,MAAM;gBAC/B,WAAW,EAAE,EAAE,CAAC,KAAK,KAAK,CAAC;gBAC3B,IAAI;gBACJ,MAAM;gBACN,MAAM,EAAE,EAAE,CAAC,MAAM,IAAI,EAAE;aACxB,EACD,IAAI,EACJ,CAAC,CACF;SACe,CAAC,CAAC;IACtB,CAAC;IAAC,OAAO,KAAc,EAAE,CAAC;QACxB,MAAM,YAAY,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC5E,MAAM,EAAE,KAAK,CAAC,wBAAwB,YAAY,EAAE,CAAC,CAAC;QACtD,OAAO,IAAA,oBAAY,EAAC,IAAI,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC;IAC/C,CAAC;AACH,CAAC"}
@@ -2,7 +2,7 @@ import type { HandlerContext } from '../../../lib/handlers/interfaces';
2
2
  export declare const TOOL_DEFINITION: {
3
3
  readonly name: "GetTransaction";
4
4
  readonly available_in: readonly ["onprem", "cloud"];
5
- readonly description: "[read-only] Retrieve ABAP transaction (t-code) details — program, screen, authorization object, and transaction type (dialog, report, OO).";
5
+ readonly description: "[read-only] Retrieve ABAP transaction (t-code) details from TSTC / TSTCP — program, screen, and kind (program, parameter transaction with its target t-code and parameters such as an SM30 view, variant transaction). Pass transaction_names for many t-codes in one call.";
6
6
  readonly inputSchema: {
7
7
  readonly type: "object";
8
8
  readonly properties: {
@@ -10,17 +10,43 @@ export declare const TOOL_DEFINITION: {
10
10
  readonly type: "string";
11
11
  readonly description: "Name of the ABAP transaction";
12
12
  };
13
+ readonly transaction_names: {
14
+ readonly type: "array";
15
+ readonly items: {
16
+ readonly type: "string";
17
+ };
18
+ readonly description: "Several transactions in one call (e.g. [\"VA01\",\"ZMY_TCODE\"]).";
19
+ };
13
20
  };
14
- readonly required: readonly ["transaction_name"];
15
21
  };
16
22
  };
17
- export declare function handleGetTransaction(context: HandlerContext, _args: any): Promise<{
23
+ export interface TransactionInfo {
24
+ tcode: string;
25
+ found: boolean;
26
+ /** program started (TSTC-PGMNA); for a parameter transaction usually empty */
27
+ program?: string;
28
+ screen?: string;
29
+ /** program = report / dialog / OO entry; parameter = TSTCP '/*' or '/N' start; variant = TSTCP '@' */
30
+ kind?: 'program' | 'parameter' | 'variant';
31
+ /** parameter transaction: the t-code it calls (e.g. SM30) */
32
+ target_tcode?: string;
33
+ /** parameter transaction: NAME=VALUE pairs (e.g. VIEWNAME, UPDATE) */
34
+ parameters?: Record<string, string>;
35
+ /** raw TSTCP-PARAM */
36
+ param?: string;
37
+ }
38
+ /** '/*SM30 VIEWNAME=ZX;UPDATE=X;' → { target: 'SM30', parameters: { VIEWNAME: 'ZX', UPDATE: 'X' } } */
39
+ export declare function parseTransactionParam(param: string): {
40
+ kind: 'parameter' | 'variant' | null;
41
+ target?: string;
42
+ parameters?: Record<string, string>;
43
+ };
44
+ export declare function buildTransactionInfo(names: string[], tstc: Array<Record<string, any>>, tstcp: Array<Record<string, any>>): TransactionInfo[];
45
+ export declare function handleGetTransaction(context: HandlerContext, args: any): Promise<{
18
46
  isError: boolean;
19
47
  content: {
20
48
  type: string;
21
- json: {
22
- message: string;
23
- };
49
+ text: string;
24
50
  }[];
25
51
  }>;
26
52
  //# sourceMappingURL=handleGetTransaction.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"handleGetTransaction.d.ts","sourceRoot":"","sources":["../../../../src/handlers/system/readonly/handleGetTransaction.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAEvE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;CAelB,CAAC;AA2BX,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,cAAc,EACvB,KAAK,EAAE,GAAG;;;;;;;;GA4BX"}
1
+ {"version":3,"file":"handleGetTransaction.d.ts","sourceRoot":"","sources":["../../../../src/handlers/system/readonly/handleGetTransaction.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAOvE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;CAoBlB,CAAC;AAEX,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;IACf,8EAA8E;IAC9E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sGAAsG;IACtG,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS,CAAC;IAC3C,6DAA6D;IAC7D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,sEAAsE;IACtE,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,sBAAsB;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAiCD,uGAAuG;AACvG,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG;IACpD,IAAI,EAAE,WAAW,GAAG,SAAS,GAAG,IAAI,CAAC;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACrC,CAcA;AAED,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,MAAM,EAAE,EACf,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,EAChC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,GAChC,eAAe,EAAE,CAwBnB;AAED,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,GAAG;;;;;;GAkD5E"}