cmat 0.0.118 → 0.0.119

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 (245) hide show
  1. package/fesm2022/cmat-components-adapter.mjs +9 -9
  2. package/fesm2022/cmat-components-breadcrumb.mjs +10 -9
  3. package/fesm2022/cmat-components-breadcrumb.mjs.map +1 -1
  4. package/fesm2022/cmat-components-card.mjs +6 -6
  5. package/fesm2022/cmat-components-card.mjs.map +1 -1
  6. package/fesm2022/cmat-components-carousel.mjs +16 -16
  7. package/fesm2022/cmat-components-carousel.mjs.map +1 -1
  8. package/fesm2022/cmat-components-cascade.mjs +1 -863
  9. package/fesm2022/cmat-components-chip-input.mjs +11 -11
  10. package/fesm2022/cmat-components-code-editor.mjs +3 -3
  11. package/fesm2022/cmat-components-color-picker.mjs +45 -45
  12. package/fesm2022/cmat-components-color-picker.mjs.map +1 -1
  13. package/fesm2022/cmat-components-custom-formly.mjs +214 -214
  14. package/fesm2022/cmat-components-custom-formly.mjs.map +1 -1
  15. package/fesm2022/cmat-components-data-picker.mjs +38 -38
  16. package/fesm2022/cmat-components-data-picker.mjs.map +1 -1
  17. package/fesm2022/cmat-components-date-range.mjs +15 -16
  18. package/fesm2022/cmat-components-date-range.mjs.map +1 -1
  19. package/fesm2022/cmat-components-date-time-display.mjs +4 -4
  20. package/fesm2022/cmat-components-drawer.mjs +9 -9
  21. package/fesm2022/cmat-components-drawer.mjs.map +1 -1
  22. package/fesm2022/cmat-components-empty-state.mjs +4 -4
  23. package/fesm2022/cmat-components-file-preview.mjs +4 -4
  24. package/fesm2022/cmat-components-filter-toolbar.mjs +12 -13
  25. package/fesm2022/cmat-components-filter-toolbar.mjs.map +1 -1
  26. package/fesm2022/cmat-components-form-actions.mjs +6 -6
  27. package/fesm2022/cmat-components-fullscreen.mjs +4 -4
  28. package/fesm2022/cmat-components-highlight.mjs +7 -7
  29. package/fesm2022/cmat-components-image-viewer.mjs +7 -7
  30. package/fesm2022/cmat-components-image-viewer.mjs.map +1 -1
  31. package/fesm2022/cmat-components-inline-loading.mjs +3 -3
  32. package/fesm2022/cmat-components-json-editor.mjs +7 -7
  33. package/fesm2022/cmat-components-json-editor.mjs.map +1 -1
  34. package/fesm2022/cmat-components-knob-input.mjs +6 -6
  35. package/fesm2022/cmat-components-loading-overlay.mjs +5 -5
  36. package/fesm2022/cmat-components-loading-overlay.mjs.map +1 -1
  37. package/fesm2022/cmat-components-masonry.mjs +4 -4
  38. package/fesm2022/cmat-components-material-color-picker.mjs +1 -337
  39. package/fesm2022/cmat-components-material-datetimepicker.mjs +1 -4312
  40. package/fesm2022/cmat-components-navigation.mjs +1 -3081
  41. package/fesm2022/cmat-components-opt-input.mjs +1 -542
  42. package/fesm2022/cmat-components-org-chart.mjs +1 -529
  43. package/fesm2022/cmat-components-page-header.mjs +4 -4
  44. package/fesm2022/cmat-components-pagination.mjs +21 -21
  45. package/fesm2022/cmat-components-pagination.mjs.map +1 -1
  46. package/fesm2022/cmat-components-password-strength.mjs +1 -880
  47. package/fesm2022/cmat-components-popover.mjs +1 -1022
  48. package/fesm2022/cmat-components-progress-bar.mjs +4 -4
  49. package/fesm2022/cmat-components-qrcode.mjs +3 -3
  50. package/fesm2022/cmat-components-rating.mjs +8 -8
  51. package/fesm2022/cmat-components-rich-text-editor.mjs +3 -3
  52. package/fesm2022/cmat-components-select-search.mjs +1 -930
  53. package/fesm2022/cmat-components-select-table.mjs +39 -39
  54. package/fesm2022/cmat-components-select-table.mjs.map +1 -1
  55. package/fesm2022/cmat-components-select-tree.mjs +28 -27
  56. package/fesm2022/cmat-components-select-tree.mjs.map +1 -1
  57. package/fesm2022/cmat-components-skeleton.mjs +5 -5
  58. package/fesm2022/cmat-components-skeleton.mjs.map +1 -1
  59. package/fesm2022/cmat-components-speed-dial.mjs +12 -12
  60. package/fesm2022/cmat-components-speed-dial.mjs.map +1 -1
  61. package/fesm2022/cmat-components-status-tag.mjs +6 -6
  62. package/fesm2022/cmat-components-status-tag.mjs.map +1 -1
  63. package/fesm2022/cmat-components-table-toolbar.mjs +4 -4
  64. package/fesm2022/cmat-components-timeline.mjs +19 -19
  65. package/fesm2022/cmat-components-timeline.mjs.map +1 -1
  66. package/fesm2022/cmat-components-toast.mjs +14 -14
  67. package/fesm2022/cmat-components-toast.mjs.map +1 -1
  68. package/fesm2022/cmat-components-transfer-picker.mjs +48 -49
  69. package/fesm2022/cmat-components-transfer-picker.mjs.map +1 -1
  70. package/fesm2022/cmat-components-treetable.mjs +8 -8
  71. package/fesm2022/cmat-components-upload.mjs +17 -17
  72. package/fesm2022/cmat-components-x6-angular-shape.mjs +1 -1
  73. package/fesm2022/cmat-directives-animate-on-scroll.mjs +1 -221
  74. package/fesm2022/cmat-directives-arrow-cursor.mjs +3 -3
  75. package/fesm2022/cmat-directives-autofocus.mjs +3 -3
  76. package/fesm2022/cmat-directives-data-exporter.mjs +1 -544
  77. package/fesm2022/cmat-directives-debounce.mjs +1 -163
  78. package/fesm2022/cmat-directives-digit-only.mjs +6 -6
  79. package/fesm2022/cmat-directives-equal-validator.mjs +3 -3
  80. package/fesm2022/cmat-directives-seamless-auto-scroll.mjs +3 -3
  81. package/fesm2022/cmat-lib-mock-api.mjs +8 -8
  82. package/fesm2022/cmat-pipes-bytes.mjs +3 -3
  83. package/fesm2022/cmat-pipes-date-format.mjs +3 -3
  84. package/fesm2022/cmat-pipes-find-by-key.mjs +3 -3
  85. package/fesm2022/cmat-pipes-group-by.mjs +3 -3
  86. package/fesm2022/cmat-pipes-keys.mjs +3 -3
  87. package/fesm2022/cmat-pipes-secure.mjs +6 -6
  88. package/fesm2022/cmat-pipes-uppercase.mjs +3 -3
  89. package/fesm2022/cmat-reports.mjs +86 -80
  90. package/fesm2022/cmat-reports.mjs.map +1 -1
  91. package/fesm2022/cmat-services-alert.mjs +4 -4
  92. package/fesm2022/cmat-services-config.mjs +6 -6
  93. package/fesm2022/cmat-services-confirmation.mjs +1 -185
  94. package/fesm2022/cmat-services-data.mjs +5 -5
  95. package/fesm2022/cmat-services-export-as.mjs +4 -4
  96. package/fesm2022/cmat-services-loading.mjs +6 -6
  97. package/fesm2022/cmat-services-local-storage.mjs +3 -3
  98. package/fesm2022/cmat-services-media-watcher.mjs +4 -4
  99. package/fesm2022/cmat-services-platform.mjs +4 -4
  100. package/fesm2022/cmat-services-print.mjs +3 -3
  101. package/fesm2022/cmat-services-splash-screen.mjs +4 -4
  102. package/fesm2022/cmat-services-title.mjs +6 -6
  103. package/fesm2022/cmat-services-translation.mjs +4 -4
  104. package/fesm2022/cmat-services-utils.mjs +7 -7
  105. package/fesm2022/cmat.mjs +77 -39582
  106. package/fesm2022/public-api-BE83BHd7.mjs +930 -0
  107. package/fesm2022/public-api-BE83BHd7.mjs.map +1 -0
  108. package/fesm2022/public-api-BcmOSkgf.mjs +542 -0
  109. package/fesm2022/public-api-BcmOSkgf.mjs.map +1 -0
  110. package/fesm2022/public-api-BmMqKDzm.mjs +4312 -0
  111. package/fesm2022/public-api-BmMqKDzm.mjs.map +1 -0
  112. package/fesm2022/public-api-BnRFazGR.mjs +221 -0
  113. package/fesm2022/public-api-BnRFazGR.mjs.map +1 -0
  114. package/fesm2022/public-api-C9N9rKkB.mjs +185 -0
  115. package/fesm2022/public-api-C9N9rKkB.mjs.map +1 -0
  116. package/fesm2022/public-api-CXmCX9ZQ.mjs +863 -0
  117. package/fesm2022/public-api-CXmCX9ZQ.mjs.map +1 -0
  118. package/fesm2022/public-api-CfILyvuV.mjs +880 -0
  119. package/fesm2022/public-api-CfILyvuV.mjs.map +1 -0
  120. package/fesm2022/public-api-CgtBw-7O.mjs +163 -0
  121. package/fesm2022/public-api-CgtBw-7O.mjs.map +1 -0
  122. package/fesm2022/public-api-DEtzrfqy.mjs +544 -0
  123. package/fesm2022/public-api-DEtzrfqy.mjs.map +1 -0
  124. package/fesm2022/public-api-EK51WC1y.mjs +1022 -0
  125. package/fesm2022/public-api-EK51WC1y.mjs.map +1 -0
  126. package/fesm2022/public-api-IpTsAgZ4.mjs +3081 -0
  127. package/fesm2022/public-api-IpTsAgZ4.mjs.map +1 -0
  128. package/fesm2022/public-api-iRaKIVmd.mjs +338 -0
  129. package/fesm2022/public-api-iRaKIVmd.mjs.map +1 -0
  130. package/fesm2022/public-api-nzzDLiDj.mjs +529 -0
  131. package/fesm2022/public-api-nzzDLiDj.mjs.map +1 -0
  132. package/fesm2022/{cmat-quill-docx-exporter-D9Eo73Wq.mjs → quill-docx-exporter-D9Eo73Wq.mjs} +1 -1
  133. package/fesm2022/quill-docx-exporter-D9Eo73Wq.mjs.map +1 -0
  134. package/package.json +23 -22
  135. package/types/cmat-components-adapter.d.ts +0 -3
  136. package/types/cmat-components-breadcrumb.d.ts +1 -4
  137. package/types/cmat-components-card.d.ts +0 -3
  138. package/types/cmat-components-carousel.d.ts +0 -3
  139. package/types/cmat-components-cascade.d.ts +0 -3
  140. package/types/cmat-components-chip-input.d.ts +3 -6
  141. package/types/cmat-components-code-editor.d.ts +0 -3
  142. package/types/cmat-components-color-picker.d.ts +0 -3
  143. package/types/cmat-components-custom-formly.d.ts +2 -861
  144. package/types/cmat-components-data-picker.d.ts +6 -9
  145. package/types/cmat-components-date-range.d.ts +1 -4
  146. package/types/cmat-components-date-time-display.d.ts +0 -3
  147. package/types/cmat-components-drawer.d.ts +1 -4
  148. package/types/cmat-components-empty-state.d.ts +0 -3
  149. package/types/cmat-components-file-preview.d.ts +0 -3
  150. package/types/cmat-components-filter-toolbar.d.ts +0 -3
  151. package/types/cmat-components-form-actions.d.ts +1 -4
  152. package/types/cmat-components-fullscreen.d.ts +0 -3
  153. package/types/cmat-components-highlight.d.ts +0 -3
  154. package/types/cmat-components-image-viewer.d.ts +0 -3
  155. package/types/cmat-components-inline-loading.d.ts +0 -3
  156. package/types/cmat-components-json-editor.d.ts +0 -3
  157. package/types/cmat-components-knob-input.d.ts +1 -4
  158. package/types/cmat-components-loading-overlay.d.ts +0 -3
  159. package/types/cmat-components-masonry.d.ts +0 -3
  160. package/types/cmat-components-material-color-picker.d.ts +1 -4
  161. package/types/cmat-components-material-datetimepicker.d.ts +2 -840
  162. package/types/cmat-components-navigation.d.ts +1 -4
  163. package/types/cmat-components-opt-input.d.ts +2 -117
  164. package/types/cmat-components-org-chart.d.ts +1 -4
  165. package/types/cmat-components-page-header.d.ts +1 -4
  166. package/types/cmat-components-pagination.d.ts +0 -3
  167. package/types/cmat-components-password-strength.d.ts +2 -205
  168. package/types/cmat-components-popover.d.ts +2 -274
  169. package/types/cmat-components-progress-bar.d.ts +0 -3
  170. package/types/cmat-components-qrcode.d.ts +2 -117
  171. package/types/cmat-components-rating.d.ts +1 -4
  172. package/types/cmat-components-rich-text-editor.d.ts +1 -4
  173. package/types/cmat-components-select-search.d.ts +2 -204
  174. package/types/cmat-components-select-table.d.ts +3 -6
  175. package/types/cmat-components-select-tree.d.ts +4 -7
  176. package/types/cmat-components-skeleton.d.ts +0 -3
  177. package/types/cmat-components-speed-dial.d.ts +0 -3
  178. package/types/cmat-components-status-tag.d.ts +2 -5
  179. package/types/cmat-components-table-toolbar.d.ts +0 -3
  180. package/types/cmat-components-timeline.d.ts +0 -3
  181. package/types/cmat-components-toast.d.ts +0 -3
  182. package/types/cmat-components-transfer-picker.d.ts +2 -5
  183. package/types/cmat-components-treetable.d.ts +0 -3
  184. package/types/cmat-components-upload.d.ts +1 -4
  185. package/types/cmat-components-x6-angular-shape.d.ts +1 -4
  186. package/types/cmat-directives-animate-on-scroll.d.ts +0 -3
  187. package/types/cmat-directives-arrow-cursor.d.ts +0 -3
  188. package/types/cmat-directives-autofocus.d.ts +0 -3
  189. package/types/cmat-directives-data-exporter.d.ts +1 -4
  190. package/types/cmat-directives-debounce.d.ts +2 -38
  191. package/types/cmat-directives-digit-only.d.ts +0 -3
  192. package/types/cmat-directives-equal-validator.d.ts +1 -4
  193. package/types/cmat-directives-seamless-auto-scroll.d.ts +1 -4
  194. package/types/cmat-lib-mock-api.d.ts +1 -4
  195. package/types/cmat-pipes-bytes.d.ts +0 -3
  196. package/types/cmat-pipes-date-format.d.ts +0 -3
  197. package/types/cmat-pipes-find-by-key.d.ts +0 -3
  198. package/types/cmat-pipes-group-by.d.ts +0 -3
  199. package/types/cmat-pipes-keys.d.ts +0 -3
  200. package/types/cmat-pipes-secure.d.ts +1 -4
  201. package/types/cmat-pipes-uppercase.d.ts +0 -3
  202. package/types/cmat-reports.d.ts +6 -9
  203. package/types/cmat-services-alert.d.ts +1 -4
  204. package/types/cmat-services-config.d.ts +0 -3
  205. package/types/cmat-services-confirmation.d.ts +2 -40
  206. package/types/cmat-services-data.d.ts +1 -4
  207. package/types/cmat-services-export-as.d.ts +1 -4
  208. package/types/cmat-services-loading.d.ts +1 -4
  209. package/types/cmat-services-local-storage.d.ts +0 -3
  210. package/types/cmat-services-media-watcher.d.ts +0 -3
  211. package/types/cmat-services-platform.d.ts +0 -3
  212. package/types/cmat-services-print.d.ts +0 -3
  213. package/types/cmat-services-splash-screen.d.ts +0 -3
  214. package/types/cmat-services-title.d.ts +0 -3
  215. package/types/cmat-services-translation.d.ts +1 -4
  216. package/types/cmat-services-utils.d.ts +2 -5
  217. package/types/cmat-validators.d.ts +0 -3
  218. package/types/cmat-version.d.ts +0 -3
  219. package/types/cmat.d.ts +78 -7686
  220. package/types/public-api-BFGGDRK3.d.ts +201 -0
  221. package/types/public-api-BXS379ev.d.ts +202 -0
  222. package/types/public-api-C4CvABGO.d.ts +114 -0
  223. package/types/public-api-CSYz4G5Z.d.ts +271 -0
  224. package/types/public-api-NSrmlKKH.d.ts +114 -0
  225. package/types/public-api-PfNpHSSm.d.ts +837 -0
  226. package/types/public-api-f3WtygQS.d.ts +35 -0
  227. package/types/public-api-nBuSXSMJ.d.ts +858 -0
  228. package/types/public-api-yYeZrUAV.d.ts +37 -0
  229. package/fesm2022/cmat-components-cascade.mjs.map +0 -1
  230. package/fesm2022/cmat-components-custom-formly-quill-docx-exporter-BwwGX2Ie.mjs +0 -294
  231. package/fesm2022/cmat-components-custom-formly-quill-docx-exporter-BwwGX2Ie.mjs.map +0 -1
  232. package/fesm2022/cmat-components-material-color-picker.mjs.map +0 -1
  233. package/fesm2022/cmat-components-material-datetimepicker.mjs.map +0 -1
  234. package/fesm2022/cmat-components-navigation.mjs.map +0 -1
  235. package/fesm2022/cmat-components-opt-input.mjs.map +0 -1
  236. package/fesm2022/cmat-components-org-chart.mjs.map +0 -1
  237. package/fesm2022/cmat-components-password-strength.mjs.map +0 -1
  238. package/fesm2022/cmat-components-popover.mjs.map +0 -1
  239. package/fesm2022/cmat-components-select-search.mjs.map +0 -1
  240. package/fesm2022/cmat-directives-animate-on-scroll.mjs.map +0 -1
  241. package/fesm2022/cmat-directives-data-exporter.mjs.map +0 -1
  242. package/fesm2022/cmat-directives-debounce.mjs.map +0 -1
  243. package/fesm2022/cmat-quill-docx-exporter-D9Eo73Wq.mjs.map +0 -1
  244. package/fesm2022/cmat-services-confirmation.mjs.map +0 -1
  245. package/fesm2022/cmat.mjs.map +0 -1
@@ -0,0 +1,529 @@
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, HostBinding, ViewEncapsulation, computed, forwardRef, input, output } from "@angular/core";
3
+ import { NgClass } from "@angular/common";
4
+ import * as i2 from "@angular/material/button";
5
+ import { MatButtonModule } from "@angular/material/button";
6
+ import * as i1 from "@angular/material/icon";
7
+ import { MatIconModule } from "@angular/material/icon";
8
+ var CmatChartNodeComponent = class CmatChartNodeComponent {
9
+ constructor() {
10
+ this.node = input.required(...ngDevMode ? [{ debugName: "node" }] : /* istanbul ignore next */ []);
11
+ this.hasParent = input(...ngDevMode ? [void 0, { debugName: "hasParent" }] : /* istanbul ignore next */ []);
12
+ this.enableControlHeight = input(...ngDevMode ? [void 0, { debugName: "enableControlHeight" }] : /* istanbul ignore next */ []);
13
+ this.direction = input("vertical", ...ngDevMode ? [{ debugName: "direction" }] : /* istanbul ignore next */ []);
14
+ this.detailsBtnTitle = input(...ngDevMode ? [void 0, { debugName: "detailsBtnTitle" }] : /* istanbul ignore next */ []);
15
+ this.detailsBtnClick = output();
16
+ this.containerClass = computed(() => `cmat-org-connector-${this.direction()} `, ...ngDevMode ? [{ debugName: "containerClass" }] : /* istanbul ignore next */ []);
17
+ this.connectorToParentHeight = computed(() => {
18
+ const heightFactor = this.node().heightFactor;
19
+ if (this.enableControlHeight() && heightFactor !== void 0 && heightFactor > 0) {
20
+ let newHeight = heightFactor * 19.2;
21
+ if (heightFactor >= 2) newHeight -= heightFactor - 1;
22
+ return `${newHeight}em`;
23
+ }
24
+ return "1em";
25
+ }, ...ngDevMode ? [{ debugName: "connectorToParentHeight" }] : /* istanbul ignore next */ []);
26
+ }
27
+ static {
28
+ this.ɵfac = i0.ɵɵngDeclareFactory({
29
+ minVersion: "12.0.0",
30
+ version: "22.3.0",
31
+ ngImport: i0,
32
+ type: CmatChartNodeComponent,
33
+ deps: [],
34
+ target: i0.ɵɵFactoryTarget.Component
35
+ });
36
+ }
37
+ static {
38
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
39
+ minVersion: "17.0.0",
40
+ version: "22.3.0",
41
+ type: CmatChartNodeComponent,
42
+ isStandalone: true,
43
+ selector: "cmat-org-chart-node",
44
+ inputs: {
45
+ node: {
46
+ classPropertyName: "node",
47
+ publicName: "node",
48
+ isSignal: true,
49
+ isRequired: true,
50
+ transformFunction: null
51
+ },
52
+ hasParent: {
53
+ classPropertyName: "hasParent",
54
+ publicName: "hasParent",
55
+ isSignal: true,
56
+ isRequired: false,
57
+ transformFunction: null
58
+ },
59
+ enableControlHeight: {
60
+ classPropertyName: "enableControlHeight",
61
+ publicName: "enableControlHeight",
62
+ isSignal: true,
63
+ isRequired: false,
64
+ transformFunction: null
65
+ },
66
+ direction: {
67
+ classPropertyName: "direction",
68
+ publicName: "direction",
69
+ isSignal: true,
70
+ isRequired: false,
71
+ transformFunction: null
72
+ },
73
+ detailsBtnTitle: {
74
+ classPropertyName: "detailsBtnTitle",
75
+ publicName: "detailsBtnTitle",
76
+ isSignal: true,
77
+ isRequired: false,
78
+ transformFunction: null
79
+ }
80
+ },
81
+ outputs: { detailsBtnClick: "detailsBtnClick" },
82
+ exportAs: ["cmatOrgChartNode"],
83
+ ngImport: i0,
84
+ template: "<!-- eslint-disable @angular-eslint/template/no-inline-styles -->\r\n@if(hasParent()){\r\n<div class=\"cmat-org-border\" [ngClass]=\"containerClass()\" [style.height]=\"connectorToParentHeight()\"></div>\r\n}\r\n<div class=\"cmat-org-box cmat-org-border cmat-org-background\" [ngClass]=\"node().cssClass\">\r\n @if(node().image!==''){\r\n <div class=\"cmat-org-image\" [style]=\"{ 'background-image': 'url(\\'' + node().image + '\\')' }\"\r\n [style.border-color]=\"node().color\"></div>\r\n }@else {\r\n <div class=\"text-center\">\r\n <mat-icon class=\"icon-size-16\" [svgIcon]=\"'heroicons_outline:user-circle'\">\r\n </mat-icon>\r\n </div>\r\n }\r\n\r\n <div class=\"cmat-org-container\">\r\n <div class=\"cmat-org-title\" [innerHTML]=\"node().title\" [style.color]=\"node().color\"></div>\r\n <div class=\"cmat-org-name\" [innerHTML]=\"node().name\"></div>\r\n \r\n @if(node().showDetail){\r\n <div class=\"button-container\">\r\n <button matButton=\"filled\" class=\"cmat-org-btn cmat-org-btn-details\" color=\"primary\"\r\n (click)=\"detailsBtnClick.emit(node())\">\r\n {{ detailsBtnTitle() }}\r\n </button>\r\n </div>\r\n }\r\n </div>\r\n<!-- eslint-enable @angular-eslint/template/no-inline-styles -->\r\n</div>\r\n@if(node().children.length){\r\n<div class=\"cmat-org-border\" [ngClass]=\"containerClass()\"></div>\r\n}",
85
+ styles: [".button-container,.cmat-org-container,cmat-org-chart-node{display:flex;align-items:center}.cmat-org-box{width:16em;height:16em;box-sizing:border-box;overflow:overlay;position:relative}.cmat-org-container{flex-direction:column}.button-container,.cmat-org-name,.cmat-org-title{flex:1}.cmat-org-title{margin-top:.5em;font-size:1.1rem;font-weight:700;text-align:center}.cmat-org-name{margin:.3em 0}.button-container{flex-direction:row;justify-content:center;position:absolute;bottom:1em;width:100%}.cmat-org-image{background-repeat:round;width:4em;height:4em;background-color:initial!important;border-radius:50%;padding:.25em;border:3px solid var(--cmat-text-hint);margin:4px auto auto}.cmat-org-name{text-align:center;margin-bottom:8px!important}\n"],
86
+ dependencies: [
87
+ {
88
+ kind: "directive",
89
+ type: NgClass,
90
+ selector: "[ngClass]",
91
+ inputs: ["class", "ngClass"]
92
+ },
93
+ {
94
+ kind: "ngmodule",
95
+ type: MatIconModule
96
+ },
97
+ {
98
+ kind: "component",
99
+ type: i1.MatIcon,
100
+ selector: "mat-icon",
101
+ inputs: [
102
+ "color",
103
+ "inline",
104
+ "svgIcon",
105
+ "fontSet",
106
+ "fontIcon"
107
+ ],
108
+ exportAs: ["matIcon"]
109
+ },
110
+ {
111
+ kind: "ngmodule",
112
+ type: MatButtonModule
113
+ },
114
+ {
115
+ kind: "component",
116
+ type: i2.MatButton,
117
+ selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ",
118
+ inputs: ["matButton"],
119
+ exportAs: ["matButton", "matAnchor"]
120
+ }
121
+ ],
122
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
123
+ encapsulation: i0.ViewEncapsulation.None
124
+ });
125
+ }
126
+ };
127
+ i0.ɵɵngDeclareClassMetadata({
128
+ minVersion: "12.0.0",
129
+ version: "22.3.0",
130
+ ngImport: i0,
131
+ type: CmatChartNodeComponent,
132
+ decorators: [{
133
+ type: Component,
134
+ args: [{
135
+ selector: "cmat-org-chart-node",
136
+ encapsulation: ViewEncapsulation.None,
137
+ changeDetection: ChangeDetectionStrategy.OnPush,
138
+ exportAs: "cmatOrgChartNode",
139
+ imports: [
140
+ NgClass,
141
+ MatIconModule,
142
+ MatButtonModule
143
+ ],
144
+ template: "<!-- eslint-disable @angular-eslint/template/no-inline-styles -->\r\n@if(hasParent()){\r\n<div class=\"cmat-org-border\" [ngClass]=\"containerClass()\" [style.height]=\"connectorToParentHeight()\"></div>\r\n}\r\n<div class=\"cmat-org-box cmat-org-border cmat-org-background\" [ngClass]=\"node().cssClass\">\r\n @if(node().image!==''){\r\n <div class=\"cmat-org-image\" [style]=\"{ 'background-image': 'url(\\'' + node().image + '\\')' }\"\r\n [style.border-color]=\"node().color\"></div>\r\n }@else {\r\n <div class=\"text-center\">\r\n <mat-icon class=\"icon-size-16\" [svgIcon]=\"'heroicons_outline:user-circle'\">\r\n </mat-icon>\r\n </div>\r\n }\r\n\r\n <div class=\"cmat-org-container\">\r\n <div class=\"cmat-org-title\" [innerHTML]=\"node().title\" [style.color]=\"node().color\"></div>\r\n <div class=\"cmat-org-name\" [innerHTML]=\"node().name\"></div>\r\n \r\n @if(node().showDetail){\r\n <div class=\"button-container\">\r\n <button matButton=\"filled\" class=\"cmat-org-btn cmat-org-btn-details\" color=\"primary\"\r\n (click)=\"detailsBtnClick.emit(node())\">\r\n {{ detailsBtnTitle() }}\r\n </button>\r\n </div>\r\n }\r\n </div>\r\n<!-- eslint-enable @angular-eslint/template/no-inline-styles -->\r\n</div>\r\n@if(node().children.length){\r\n<div class=\"cmat-org-border\" [ngClass]=\"containerClass()\"></div>\r\n}",
145
+ styles: [".button-container,.cmat-org-container,cmat-org-chart-node{display:flex;align-items:center}.cmat-org-box{width:16em;height:16em;box-sizing:border-box;overflow:overlay;position:relative}.cmat-org-container{flex-direction:column}.button-container,.cmat-org-name,.cmat-org-title{flex:1}.cmat-org-title{margin-top:.5em;font-size:1.1rem;font-weight:700;text-align:center}.cmat-org-name{margin:.3em 0}.button-container{flex-direction:row;justify-content:center;position:absolute;bottom:1em;width:100%}.cmat-org-image{background-repeat:round;width:4em;height:4em;background-color:initial!important;border-radius:50%;padding:.25em;border:3px solid var(--cmat-text-hint);margin:4px auto auto}.cmat-org-name{text-align:center;margin-bottom:8px!important}\n"]
146
+ }]
147
+ }],
148
+ propDecorators: {
149
+ node: [{
150
+ type: i0.Input,
151
+ args: [{
152
+ isSignal: true,
153
+ alias: "node",
154
+ required: true
155
+ }]
156
+ }],
157
+ hasParent: [{
158
+ type: i0.Input,
159
+ args: [{
160
+ isSignal: true,
161
+ alias: "hasParent",
162
+ required: false
163
+ }]
164
+ }],
165
+ enableControlHeight: [{
166
+ type: i0.Input,
167
+ args: [{
168
+ isSignal: true,
169
+ alias: "enableControlHeight",
170
+ required: false
171
+ }]
172
+ }],
173
+ direction: [{
174
+ type: i0.Input,
175
+ args: [{
176
+ isSignal: true,
177
+ alias: "direction",
178
+ required: false
179
+ }]
180
+ }],
181
+ detailsBtnTitle: [{
182
+ type: i0.Input,
183
+ args: [{
184
+ isSignal: true,
185
+ alias: "detailsBtnTitle",
186
+ required: false
187
+ }]
188
+ }],
189
+ detailsBtnClick: [{
190
+ type: i0.Output,
191
+ args: ["detailsBtnClick"]
192
+ }]
193
+ }
194
+ });
195
+ var CmatChartDesignerComponent = class CmatChartDesignerComponent {
196
+ constructor() {
197
+ this.node = input.required(...ngDevMode ? [{ debugName: "node" }] : /* istanbul ignore next */ []);
198
+ this.hasParent = input(false, ...ngDevMode ? [{ debugName: "hasParent" }] : /* istanbul ignore next */ []);
199
+ this.enableControlHeight = input(...ngDevMode ? [void 0, { debugName: "enableControlHeight" }] : /* istanbul ignore next */ []);
200
+ this.direction = input("vertical", ...ngDevMode ? [{ debugName: "direction" }] : /* istanbul ignore next */ []);
201
+ this.detailsBtnTitle = input(...ngDevMode ? [void 0, { debugName: "detailsBtnTitle" }] : /* istanbul ignore next */ []);
202
+ this.detailsBtnClick = output();
203
+ this.chartNodeClass = computed(() => `cmat-org-${this.direction()}`, ...ngDevMode ? [{ debugName: "chartNodeClass" }] : /* istanbul ignore next */ []);
204
+ }
205
+ get hostFlexDirection() {
206
+ return this.direction() === "vertical" ? "column" : "";
207
+ }
208
+ get hostWidth() {
209
+ return this.direction() === "vertical" ? "fit-content" : "";
210
+ }
211
+ static {
212
+ this.ɵfac = i0.ɵɵngDeclareFactory({
213
+ minVersion: "12.0.0",
214
+ version: "22.3.0",
215
+ ngImport: i0,
216
+ type: CmatChartDesignerComponent,
217
+ deps: [],
218
+ target: i0.ɵɵFactoryTarget.Component
219
+ });
220
+ }
221
+ static {
222
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
223
+ minVersion: "17.0.0",
224
+ version: "22.3.0",
225
+ type: CmatChartDesignerComponent,
226
+ isStandalone: true,
227
+ selector: "cmat-org-chart-designer",
228
+ inputs: {
229
+ node: {
230
+ classPropertyName: "node",
231
+ publicName: "node",
232
+ isSignal: true,
233
+ isRequired: true,
234
+ transformFunction: null
235
+ },
236
+ hasParent: {
237
+ classPropertyName: "hasParent",
238
+ publicName: "hasParent",
239
+ isSignal: true,
240
+ isRequired: false,
241
+ transformFunction: null
242
+ },
243
+ enableControlHeight: {
244
+ classPropertyName: "enableControlHeight",
245
+ publicName: "enableControlHeight",
246
+ isSignal: true,
247
+ isRequired: false,
248
+ transformFunction: null
249
+ },
250
+ direction: {
251
+ classPropertyName: "direction",
252
+ publicName: "direction",
253
+ isSignal: true,
254
+ isRequired: false,
255
+ transformFunction: null
256
+ },
257
+ detailsBtnTitle: {
258
+ classPropertyName: "detailsBtnTitle",
259
+ publicName: "detailsBtnTitle",
260
+ isSignal: true,
261
+ isRequired: false,
262
+ transformFunction: null
263
+ }
264
+ },
265
+ outputs: { detailsBtnClick: "detailsBtnClick" },
266
+ host: { properties: {
267
+ "style.flex-direction": "this.hostFlexDirection",
268
+ "style.width": "this.hostWidth"
269
+ } },
270
+ exportAs: ["cmatOrgChartDesigner"],
271
+ ngImport: i0,
272
+ template: "<!-- eslint-disable @angular-eslint/template/no-inline-styles -->\r\n<cmat-org-chart-node [class]=\"chartNodeClass()\" [node]=\"node()\" [hasParent]=\"hasParent()\"\r\n [enableControlHeight]=\"enableControlHeight()\" [direction]=\"direction()\" [detailsBtnTitle]=\"detailsBtnTitle()\"\r\n (detailsBtnClick)=\"detailsBtnClick.emit($event)\">\r\n</cmat-org-chart-node>\r\n\r\n<div class=\"cmat-org-reports-{{ direction() }} cmat-org-reports\">\r\n @for (childNode of node().children; track $index) {\r\n <div class=\"cmat-org-org-container cmat-org-org-container-{{ direction() }}\">\r\n <div class=\"cmat-org-connector-container cmat-org-connector-container-{{ direction() }}\">\r\n <div class=\"cmat-org-connector cmat-org-border\" [style.border-color]=\"$first ? 'transparent' : ''\"></div>\r\n <div class=\"cmat-org-border\"></div>\r\n <div class=\"cmat-org-connector cmat-org-border\" [style.border-color]=\"$last ? 'transparent' : ''\"></div>\r\n </div>\r\n <cmat-org-chart-designer [node]=\"childNode\" [hasParent]=\"true\" [enableControlHeight]=\"enableControlHeight()\"\r\n [direction]=\"direction()\" [detailsBtnTitle]=\"detailsBtnTitle()\" (detailsBtnClick)=\"detailsBtnClick.emit($event)\">\r\n </cmat-org-chart-designer>\r\n </div>\r\n }\r\n<!-- eslint-enable @angular-eslint/template/no-inline-styles -->\r\n</div>",
273
+ styles: ["cmat-org-chart-designer{display:flex;align-items:center;flex:1}.cmat-org-connector-container-horizontal,.cmat-org-org-container-vertical,.cmat-org-reports-horizontal,.cmat-org-vertical{flex-direction:column}.cmat-org-connector-container,.cmat-org-org-container{display:flex}.cmat-org-connector{flex:1}.cmat-org-reports{display:flex;flex:1}.cmat-org-reports-vertical{width:100%}\n"],
274
+ dependencies: [{
275
+ kind: "component",
276
+ type: i0.forwardRef(() => CmatChartDesignerComponent),
277
+ selector: "cmat-org-chart-designer",
278
+ inputs: [
279
+ "node",
280
+ "hasParent",
281
+ "enableControlHeight",
282
+ "direction",
283
+ "detailsBtnTitle"
284
+ ],
285
+ outputs: ["detailsBtnClick"],
286
+ exportAs: ["cmatOrgChartDesigner"]
287
+ }, {
288
+ kind: "component",
289
+ type: i0.forwardRef(() => CmatChartNodeComponent),
290
+ selector: "cmat-org-chart-node",
291
+ inputs: [
292
+ "node",
293
+ "hasParent",
294
+ "enableControlHeight",
295
+ "direction",
296
+ "detailsBtnTitle"
297
+ ],
298
+ outputs: ["detailsBtnClick"],
299
+ exportAs: ["cmatOrgChartNode"]
300
+ }],
301
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
302
+ encapsulation: i0.ViewEncapsulation.None
303
+ });
304
+ }
305
+ };
306
+ i0.ɵɵngDeclareClassMetadata({
307
+ minVersion: "12.0.0",
308
+ version: "22.3.0",
309
+ ngImport: i0,
310
+ type: CmatChartDesignerComponent,
311
+ decorators: [{
312
+ type: Component,
313
+ args: [{
314
+ selector: "cmat-org-chart-designer",
315
+ encapsulation: ViewEncapsulation.None,
316
+ changeDetection: ChangeDetectionStrategy.OnPush,
317
+ exportAs: "cmatOrgChartDesigner",
318
+ imports: [CmatChartNodeComponent, forwardRef(() => CmatChartDesignerComponent)],
319
+ template: "<!-- eslint-disable @angular-eslint/template/no-inline-styles -->\r\n<cmat-org-chart-node [class]=\"chartNodeClass()\" [node]=\"node()\" [hasParent]=\"hasParent()\"\r\n [enableControlHeight]=\"enableControlHeight()\" [direction]=\"direction()\" [detailsBtnTitle]=\"detailsBtnTitle()\"\r\n (detailsBtnClick)=\"detailsBtnClick.emit($event)\">\r\n</cmat-org-chart-node>\r\n\r\n<div class=\"cmat-org-reports-{{ direction() }} cmat-org-reports\">\r\n @for (childNode of node().children; track $index) {\r\n <div class=\"cmat-org-org-container cmat-org-org-container-{{ direction() }}\">\r\n <div class=\"cmat-org-connector-container cmat-org-connector-container-{{ direction() }}\">\r\n <div class=\"cmat-org-connector cmat-org-border\" [style.border-color]=\"$first ? 'transparent' : ''\"></div>\r\n <div class=\"cmat-org-border\"></div>\r\n <div class=\"cmat-org-connector cmat-org-border\" [style.border-color]=\"$last ? 'transparent' : ''\"></div>\r\n </div>\r\n <cmat-org-chart-designer [node]=\"childNode\" [hasParent]=\"true\" [enableControlHeight]=\"enableControlHeight()\"\r\n [direction]=\"direction()\" [detailsBtnTitle]=\"detailsBtnTitle()\" (detailsBtnClick)=\"detailsBtnClick.emit($event)\">\r\n </cmat-org-chart-designer>\r\n </div>\r\n }\r\n<!-- eslint-enable @angular-eslint/template/no-inline-styles -->\r\n</div>",
320
+ styles: ["cmat-org-chart-designer{display:flex;align-items:center;flex:1}.cmat-org-connector-container-horizontal,.cmat-org-org-container-vertical,.cmat-org-reports-horizontal,.cmat-org-vertical{flex-direction:column}.cmat-org-connector-container,.cmat-org-org-container{display:flex}.cmat-org-connector{flex:1}.cmat-org-reports{display:flex;flex:1}.cmat-org-reports-vertical{width:100%}\n"]
321
+ }]
322
+ }],
323
+ propDecorators: {
324
+ node: [{
325
+ type: i0.Input,
326
+ args: [{
327
+ isSignal: true,
328
+ alias: "node",
329
+ required: true
330
+ }]
331
+ }],
332
+ hasParent: [{
333
+ type: i0.Input,
334
+ args: [{
335
+ isSignal: true,
336
+ alias: "hasParent",
337
+ required: false
338
+ }]
339
+ }],
340
+ enableControlHeight: [{
341
+ type: i0.Input,
342
+ args: [{
343
+ isSignal: true,
344
+ alias: "enableControlHeight",
345
+ required: false
346
+ }]
347
+ }],
348
+ direction: [{
349
+ type: i0.Input,
350
+ args: [{
351
+ isSignal: true,
352
+ alias: "direction",
353
+ required: false
354
+ }]
355
+ }],
356
+ detailsBtnTitle: [{
357
+ type: i0.Input,
358
+ args: [{
359
+ isSignal: true,
360
+ alias: "detailsBtnTitle",
361
+ required: false
362
+ }]
363
+ }],
364
+ detailsBtnClick: [{
365
+ type: i0.Output,
366
+ args: ["detailsBtnClick"]
367
+ }],
368
+ hostFlexDirection: [{
369
+ type: HostBinding,
370
+ args: ["style.flex-direction"]
371
+ }],
372
+ hostWidth: [{
373
+ type: HostBinding,
374
+ args: ["style.width"]
375
+ }]
376
+ }
377
+ });
378
+ var CmatOrgChartComponent = class CmatOrgChartComponent {
379
+ constructor() {
380
+ this.nodes = input.required(...ngDevMode ? [{ debugName: "nodes" }] : /* istanbul ignore next */ []);
381
+ this.enableControlHeight = input(false, ...ngDevMode ? [{ debugName: "enableControlHeight" }] : /* istanbul ignore next */ []);
382
+ this.direction = input("vertical", ...ngDevMode ? [{ debugName: "direction" }] : /* istanbul ignore next */ []);
383
+ this.detailsBtnTitle = input("查看详细", ...ngDevMode ? [{ debugName: "detailsBtnTitle" }] : /* istanbul ignore next */ []);
384
+ this.detailsBtnClick = output();
385
+ }
386
+ static {
387
+ this.ɵfac = i0.ɵɵngDeclareFactory({
388
+ minVersion: "12.0.0",
389
+ version: "22.3.0",
390
+ ngImport: i0,
391
+ type: CmatOrgChartComponent,
392
+ deps: [],
393
+ target: i0.ɵɵFactoryTarget.Component
394
+ });
395
+ }
396
+ static {
397
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
398
+ minVersion: "17.0.0",
399
+ version: "22.3.0",
400
+ type: CmatOrgChartComponent,
401
+ isStandalone: true,
402
+ selector: "cmat-org-chart",
403
+ inputs: {
404
+ nodes: {
405
+ classPropertyName: "nodes",
406
+ publicName: "nodes",
407
+ isSignal: true,
408
+ isRequired: true,
409
+ transformFunction: null
410
+ },
411
+ enableControlHeight: {
412
+ classPropertyName: "enableControlHeight",
413
+ publicName: "enableControlHeight",
414
+ isSignal: true,
415
+ isRequired: false,
416
+ transformFunction: null
417
+ },
418
+ direction: {
419
+ classPropertyName: "direction",
420
+ publicName: "direction",
421
+ isSignal: true,
422
+ isRequired: false,
423
+ transformFunction: null
424
+ },
425
+ detailsBtnTitle: {
426
+ classPropertyName: "detailsBtnTitle",
427
+ publicName: "detailsBtnTitle",
428
+ isSignal: true,
429
+ isRequired: false,
430
+ transformFunction: null
431
+ }
432
+ },
433
+ outputs: { detailsBtnClick: "detailsBtnClick" },
434
+ exportAs: ["cmatOrgChart"],
435
+ ngImport: i0,
436
+ template: "<div class=\"cmat-org\">\r\n @for (node of nodes(); track $index) {\r\n <div class=\"cmat-org-self-{{ direction() }}\">\r\n <cmat-org-chart-designer [node]=\"node\" [direction]=\"direction()\" [enableControlHeight]=\"enableControlHeight()\"\r\n [detailsBtnTitle]=\"detailsBtnTitle()\" (detailsBtnClick)=\"detailsBtnClick.emit($event)\"></cmat-org-chart-designer>\r\n </div>\r\n }\r\n</div>",
437
+ styles: [".cmat-org-horizontal{padding:1em 0}.cmat-org-vertical{padding:0 1em}.cmat-org-border{border:.1em solid var(--cmat-divider);box-sizing:border-box}.cmat-org-box{padding:.5em 1em;border-radius:.2em;box-shadow:0 2px 8px #00000059}.cmat-org-connector-horizontal{width:1em!important;height:0!important}.cmat-org-connector-vertical{width:0!important;height:1em!important}.cmat-org .cmat-org-self-vertical{margin-bottom:2%}\n"],
438
+ dependencies: [{
439
+ kind: "component",
440
+ type: CmatChartDesignerComponent,
441
+ selector: "cmat-org-chart-designer",
442
+ inputs: [
443
+ "node",
444
+ "hasParent",
445
+ "enableControlHeight",
446
+ "direction",
447
+ "detailsBtnTitle"
448
+ ],
449
+ outputs: ["detailsBtnClick"],
450
+ exportAs: ["cmatOrgChartDesigner"]
451
+ }],
452
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
453
+ encapsulation: i0.ViewEncapsulation.None
454
+ });
455
+ }
456
+ };
457
+ i0.ɵɵngDeclareClassMetadata({
458
+ minVersion: "12.0.0",
459
+ version: "22.3.0",
460
+ ngImport: i0,
461
+ type: CmatOrgChartComponent,
462
+ decorators: [{
463
+ type: Component,
464
+ args: [{
465
+ selector: "cmat-org-chart",
466
+ encapsulation: ViewEncapsulation.None,
467
+ changeDetection: ChangeDetectionStrategy.OnPush,
468
+ exportAs: "cmatOrgChart",
469
+ imports: [CmatChartDesignerComponent],
470
+ template: "<div class=\"cmat-org\">\r\n @for (node of nodes(); track $index) {\r\n <div class=\"cmat-org-self-{{ direction() }}\">\r\n <cmat-org-chart-designer [node]=\"node\" [direction]=\"direction()\" [enableControlHeight]=\"enableControlHeight()\"\r\n [detailsBtnTitle]=\"detailsBtnTitle()\" (detailsBtnClick)=\"detailsBtnClick.emit($event)\"></cmat-org-chart-designer>\r\n </div>\r\n }\r\n</div>",
471
+ styles: [".cmat-org-horizontal{padding:1em 0}.cmat-org-vertical{padding:0 1em}.cmat-org-border{border:.1em solid var(--cmat-divider);box-sizing:border-box}.cmat-org-box{padding:.5em 1em;border-radius:.2em;box-shadow:0 2px 8px #00000059}.cmat-org-connector-horizontal{width:1em!important;height:0!important}.cmat-org-connector-vertical{width:0!important;height:1em!important}.cmat-org .cmat-org-self-vertical{margin-bottom:2%}\n"]
472
+ }]
473
+ }],
474
+ propDecorators: {
475
+ nodes: [{
476
+ type: i0.Input,
477
+ args: [{
478
+ isSignal: true,
479
+ alias: "nodes",
480
+ required: true
481
+ }]
482
+ }],
483
+ enableControlHeight: [{
484
+ type: i0.Input,
485
+ args: [{
486
+ isSignal: true,
487
+ alias: "enableControlHeight",
488
+ required: false
489
+ }]
490
+ }],
491
+ direction: [{
492
+ type: i0.Input,
493
+ args: [{
494
+ isSignal: true,
495
+ alias: "direction",
496
+ required: false
497
+ }]
498
+ }],
499
+ detailsBtnTitle: [{
500
+ type: i0.Input,
501
+ args: [{
502
+ isSignal: true,
503
+ alias: "detailsBtnTitle",
504
+ required: false
505
+ }]
506
+ }],
507
+ detailsBtnClick: [{
508
+ type: i0.Output,
509
+ args: ["detailsBtnClick"]
510
+ }]
511
+ }
512
+ });
513
+ var ChartNode = class ChartNode {
514
+ constructor(structure, parent) {
515
+ this.parent = parent;
516
+ const [name, ...reports] = structure;
517
+ this.name = name.split("(")[0].trim();
518
+ const titleMatch = /\(([^)]+)\)/.exec(name);
519
+ this.title = titleMatch?.[1].trim();
520
+ this.children = reports.map((r) => r.substring(1)).reduce((previous, current) => {
521
+ if (!current.startsWith(" ")) previous.push([]);
522
+ previous[previous.length - 1].push(current);
523
+ return previous;
524
+ }, []).map((r) => new ChartNode(r, this)) ?? [];
525
+ }
526
+ };
527
+ export { CmatOrgChartComponent as n, ChartNode as t };
528
+
529
+ //# sourceMappingURL=public-api-nzzDLiDj.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public-api-nzzDLiDj.mjs","names":[],"sources":["../../../projects/cmat/components/org-chart/node/chart-node.component.ts","../../../projects/cmat/components/org-chart/node/chart-node.component.html","../../../projects/cmat/components/org-chart/designer/chart-designer.component.ts","../../../projects/cmat/components/org-chart/designer/chart-designer.component.html","../../../projects/cmat/components/org-chart/org-chart.component.ts","../../../projects/cmat/components/org-chart/org-chart.component.html","../../../projects/cmat/components/org-chart/node/node.type.ts"],"sourcesContent":["import { NgClass } from '@angular/common';\r\nimport { ChangeDetectionStrategy, Component, input, output, computed, ViewEncapsulation } from '@angular/core';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { INode } from './node.type';\r\n\r\n@Component({\r\n selector: 'cmat-org-chart-node',\r\n templateUrl: './chart-node.component.html',\r\n styleUrls: ['./chart-node.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n exportAs: 'cmatOrgChartNode',\r\n imports: [NgClass, MatIconModule, MatButtonModule]\r\n})\r\nexport class CmatChartNodeComponent {\r\n readonly node = input.required<INode>();\r\n readonly hasParent = input<boolean>();\r\n readonly enableControlHeight = input<boolean>();\r\n readonly direction = input<'vertical' | 'horizontal'>('vertical');\r\n readonly detailsBtnTitle = input<string>();\r\n\r\n readonly detailsBtnClick = output<INode>();\r\n\r\n readonly containerClass = computed(() => `cmat-org-connector-${this.direction()} `);\r\n\r\n readonly connectorToParentHeight = computed(() => {\r\n const heightFactor = this.node().heightFactor;\r\n if (this.enableControlHeight() && heightFactor !== undefined && heightFactor > 0) {\r\n const maxHeightEm = 19.2;\r\n let newHeight = heightFactor * maxHeightEm;\r\n if (heightFactor >= 2) {\r\n newHeight -= heightFactor - 1;\r\n }\r\n return `${newHeight}em`;\r\n }\r\n return '1em';\r\n });\r\n}\r\n","<!-- eslint-disable @angular-eslint/template/no-inline-styles -->\r\n@if(hasParent()){\r\n<div class=\"cmat-org-border\" [ngClass]=\"containerClass()\" [style.height]=\"connectorToParentHeight()\"></div>\r\n}\r\n<div class=\"cmat-org-box cmat-org-border cmat-org-background\" [ngClass]=\"node().cssClass\">\r\n @if(node().image!==''){\r\n <div class=\"cmat-org-image\" [style]=\"{ 'background-image': 'url(\\'' + node().image + '\\')' }\"\r\n [style.border-color]=\"node().color\"></div>\r\n }@else {\r\n <div class=\"text-center\">\r\n <mat-icon class=\"icon-size-16\" [svgIcon]=\"'heroicons_outline:user-circle'\">\r\n </mat-icon>\r\n </div>\r\n }\r\n\r\n <div class=\"cmat-org-container\">\r\n <div class=\"cmat-org-title\" [innerHTML]=\"node().title\" [style.color]=\"node().color\"></div>\r\n <div class=\"cmat-org-name\" [innerHTML]=\"node().name\"></div>\r\n \r\n @if(node().showDetail){\r\n <div class=\"button-container\">\r\n <button matButton=\"filled\" class=\"cmat-org-btn cmat-org-btn-details\" color=\"primary\"\r\n (click)=\"detailsBtnClick.emit(node())\">\r\n {{ detailsBtnTitle() }}\r\n </button>\r\n </div>\r\n }\r\n </div>\r\n<!-- eslint-enable @angular-eslint/template/no-inline-styles -->\r\n</div>\r\n@if(node().children.length){\r\n<div class=\"cmat-org-border\" [ngClass]=\"containerClass()\"></div>\r\n}","import { ChangeDetectionStrategy, Component, forwardRef, HostBinding, input, output, computed, ViewEncapsulation } from '@angular/core';\r\nimport { CmatChartNodeComponent } from '../node/chart-node.component';\r\nimport { INode } from '../node/node.type';\r\n\r\n@Component({\r\n selector: 'cmat-org-chart-designer',\r\n templateUrl: './chart-designer.component.html',\r\n styleUrls: ['./chart-designer.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n exportAs: 'cmatOrgChartDesigner',\r\n imports: [CmatChartNodeComponent, forwardRef(() => CmatChartDesignerComponent)]\r\n})\r\nexport class CmatChartDesignerComponent {\r\n readonly node = input.required<INode>();\r\n readonly hasParent = input<boolean>(false);\r\n readonly enableControlHeight = input<boolean>();\r\n readonly direction = input<'vertical' | 'horizontal'>('vertical');\r\n readonly detailsBtnTitle = input<string>();\r\n\r\n readonly detailsBtnClick = output<INode>();\r\n\r\n readonly chartNodeClass = computed(() => `cmat-org-${this.direction()}`);\r\n\r\n\r\n @HostBinding('style.flex-direction')\r\n get hostFlexDirection(): string {\r\n return this.direction() === 'vertical' ? 'column' : '';\r\n }\r\n\r\n @HostBinding('style.width')\r\n get hostWidth(): string {\r\n return this.direction() === 'vertical' ? 'fit-content' : '';\r\n }\r\n\r\n}\r\n","<!-- eslint-disable @angular-eslint/template/no-inline-styles -->\r\n<cmat-org-chart-node [class]=\"chartNodeClass()\" [node]=\"node()\" [hasParent]=\"hasParent()\"\r\n [enableControlHeight]=\"enableControlHeight()\" [direction]=\"direction()\" [detailsBtnTitle]=\"detailsBtnTitle()\"\r\n (detailsBtnClick)=\"detailsBtnClick.emit($event)\">\r\n</cmat-org-chart-node>\r\n\r\n<div class=\"cmat-org-reports-{{ direction() }} cmat-org-reports\">\r\n @for (childNode of node().children; track $index) {\r\n <div class=\"cmat-org-org-container cmat-org-org-container-{{ direction() }}\">\r\n <div class=\"cmat-org-connector-container cmat-org-connector-container-{{ direction() }}\">\r\n <div class=\"cmat-org-connector cmat-org-border\" [style.border-color]=\"$first ? 'transparent' : ''\"></div>\r\n <div class=\"cmat-org-border\"></div>\r\n <div class=\"cmat-org-connector cmat-org-border\" [style.border-color]=\"$last ? 'transparent' : ''\"></div>\r\n </div>\r\n <cmat-org-chart-designer [node]=\"childNode\" [hasParent]=\"true\" [enableControlHeight]=\"enableControlHeight()\"\r\n [direction]=\"direction()\" [detailsBtnTitle]=\"detailsBtnTitle()\" (detailsBtnClick)=\"detailsBtnClick.emit($event)\">\r\n </cmat-org-chart-designer>\r\n </div>\r\n }\r\n<!-- eslint-enable @angular-eslint/template/no-inline-styles -->\r\n</div>","import { ChangeDetectionStrategy, Component, input, output, ViewEncapsulation } from '@angular/core';\r\nimport { CmatChartDesignerComponent } from './designer/chart-designer.component';\r\nimport { INode } from './node/node.type';\r\n\r\n\r\n@Component({\r\n selector: 'cmat-org-chart',\r\n templateUrl: './org-chart.component.html',\r\n styleUrls: ['./org-chart.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n exportAs: 'cmatOrgChart',\r\n imports: [CmatChartDesignerComponent]\r\n})\r\nexport class CmatOrgChartComponent {\r\n readonly nodes = input.required<INode[]>();\r\n readonly enableControlHeight = input<boolean>(false);\r\n readonly direction = input<'vertical' | 'horizontal'>('vertical');\r\n readonly detailsBtnTitle = input<string>('查看详细');\r\n\r\n readonly detailsBtnClick = output<INode>();\r\n}","<div class=\"cmat-org\">\r\n @for (node of nodes(); track $index) {\r\n <div class=\"cmat-org-self-{{ direction() }}\">\r\n <cmat-org-chart-designer [node]=\"node\" [direction]=\"direction()\" [enableControlHeight]=\"enableControlHeight()\"\r\n [detailsBtnTitle]=\"detailsBtnTitle()\" (detailsBtnClick)=\"detailsBtnClick.emit($event)\"></cmat-org-chart-designer>\r\n </div>\r\n }\r\n</div>","export interface INode {\r\n name: string;\r\n cssClass: string;\r\n image: string;\r\n title?: string;\r\n color?: string;\r\n showDetail: boolean;\r\n children: INode[];\r\n heightFactor?: number;\r\n}\r\n\r\nexport class ChartNode implements INode {\r\n name: string;\r\n cssClass: string;\r\n image: string;\r\n title?: string;\r\n color?: string;\r\n showDetail: boolean;\r\n children: ChartNode[];\r\n heightFactor?: number;\r\n parent?: ChartNode;\r\n\r\n constructor(structure: string[], parent?: ChartNode) {\r\n this.parent = parent;\r\n const [name, ...reports] = structure;\r\n this.name = name.split('(')[0].trim();\r\n const titleMatch = /\\(([^)]+)\\)/.exec(name);\r\n this.title = titleMatch?.[1].trim();\r\n\r\n this.children = reports.map(r => r.substring(1))\r\n .reduce((previous, current) => {\r\n if (!current.startsWith(' ')) {\r\n previous.push([]);\r\n }\r\n\r\n previous[previous.length - 1].push(current);\r\n return previous;\r\n }, [] as string[][])\r\n .map(r => new ChartNode(r, this)) ?? [];\r\n }\r\n}\r\n"],"mappings":";;;;;;;AAeA,IAAa,yBAAb,MAAa,uBAAsB;CAT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294
- //# sourceMappingURL=cmat-quill-docx-exporter-D9Eo73Wq.mjs.map
294
+ //# sourceMappingURL=quill-docx-exporter-D9Eo73Wq.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quill-docx-exporter-D9Eo73Wq.mjs","names":[],"sources":["../../../projects/cmat/components/custom-formly/types/quill/quill-docx-exporter.ts"],"sourcesContent":["import {\r\n AlignmentType,\r\n BorderStyle,\r\n Document,\r\n HeadingLevel,\r\n HighlightColor,\r\n IParagraphOptions,\r\n ImageRun,\r\n Packer,\r\n Paragraph,\r\n TextRun\r\n} from 'docx';\r\nimport * as FileSaver from 'file-saver-es';\r\n\r\ninterface QuillDeltaOp {\r\n insert?: string | { image?: string; video?: string };\r\n attributes?: QuillAttributes;\r\n}\r\n\r\ninterface QuillDelta {\r\n ops: QuillDeltaOp[];\r\n}\r\n\r\ninterface QuillAttributes {\r\n bold?: boolean;\r\n italic?: boolean;\r\n underline?: boolean;\r\n size?: string;\r\n font?: string;\r\n color?: string;\r\n background?: string;\r\n align?: string;\r\n header?: string | number;\r\n list?: string;\r\n}\r\n\r\ninterface QuillImageData {\r\n buffer: Uint8Array;\r\n width: number;\r\n height: number;\r\n type: string;\r\n}\r\n\r\n/**\r\n * 将 Quill Delta 导出为 Word(.docx)文档。\r\n * docx / file-saver 体积较大,故仅在用户实际点击“导出 Word”时由宿主动态 import 本模块,\r\n * 使 docx 不进入首屏初始包。\r\n */\r\nexport async function exportDeltaToDocx(delta: QuillDelta, filename: string): Promise<void> {\r\n const children = await convertDeltaToDocxChildren(delta);\r\n const doc = new Document({\r\n sections: [{ properties: {}, children: children }]\r\n });\r\n const blob = await Packer.toBlob(doc);\r\n FileSaver.saveAs(blob, filename);\r\n}\r\n\r\nasync function convertDeltaToDocxChildren(delta: QuillDelta): Promise<Paragraph[]> {\r\n const children: Paragraph[] = [];\r\n\r\n // 1. 预加载所有图片数据 (并行)\r\n const imageCache = new Map<string, QuillImageData>();\r\n const imageOps = delta.ops.filter(op => typeof op.insert !== 'string' && op.insert?.image);\r\n\r\n await Promise.all(imageOps.map(async (op) => {\r\n if (typeof op.insert === 'object' && op.insert !== null && 'image' in op.insert && typeof op.insert.image === 'string') {\r\n const url = op.insert.image;\r\n if (!imageCache.has(url)) {\r\n const buffer = await getImageBuffer(url);\r\n const dims = await getImageDimensions(url);\r\n let type = 'png';\r\n if (url.toLowerCase().endsWith('.jpg') || url.toLowerCase().endsWith('.jpeg')) type = 'jpg';\r\n else if (url.toLowerCase().endsWith('.gif')) type = 'gif';\r\n else if (url.toLowerCase().endsWith('.svg')) type = 'svg';\r\n\r\n imageCache.set(url, { buffer, width: dims.width, height: dims.height, type });\r\n }\r\n }\r\n }));\r\n\r\n // 2. 构建文档结构 (同步)\r\n let currentRun: TextRun[] = [];\r\n let currentListLevel = 0;\r\n let isList = false;\r\n\r\n for (const op of delta.ops) {\r\n if (typeof op.insert !== 'string' && op.insert?.image) {\r\n if (currentRun.length > 0) {\r\n children.push(new Paragraph({ children: currentRun }));\r\n currentRun = [];\r\n }\r\n\r\n const imgData = imageCache.get(op.insert.image);\r\n if (imgData) {\r\n const imageRun = createImageRunFromData(imgData);\r\n children.push(new Paragraph({\r\n children: [imageRun],\r\n alignment: AlignmentType.CENTER\r\n }));\r\n }\r\n }\r\n else if (typeof op.insert === 'string') {\r\n const text = op.insert;\r\n if (text === '\\n') {\r\n if (currentRun.length > 0) {\r\n children.push(createParagraph(currentRun, op.attributes, isList, currentListLevel));\r\n currentRun = [];\r\n } else {\r\n children.push(new Paragraph({ children: [new TextRun({ text: '' })] }));\r\n }\r\n if (!op.attributes?.list) {\r\n isList = false;\r\n currentListLevel = 0;\r\n }\r\n }\r\n else {\r\n const textRun = createTextRun(text, op.attributes);\r\n currentRun.push(textRun);\r\n if (op.attributes?.list) {\r\n isList = true;\r\n currentListLevel = op.attributes.list === 'bullet' ? 0 :\r\n op.attributes.list === 'order' ? 0 : currentListLevel;\r\n }\r\n }\r\n }\r\n }\r\n if (currentRun.length > 0) {\r\n children.push(createParagraph(currentRun, undefined, isList, currentListLevel));\r\n }\r\n\r\n return children;\r\n}\r\n\r\nfunction createImageRunFromData(data: QuillImageData): ImageRun {\r\n const maxWidth = 500;\r\n const maxHeight = 400;\r\n const scale = Math.min(maxWidth / data.width, maxHeight / data.height, 1);\r\n const imageType = data.type as 'jpg' | 'png' | 'gif' | 'bmp' | 'svg';\r\n\r\n return new ImageRun({\r\n data: data.buffer,\r\n transformation: {\r\n width: Math.round(data.width * scale),\r\n height: Math.round(data.height * scale)\r\n },\r\n type: imageType,\r\n fallback: {\r\n type: imageType !== 'svg' ? imageType : 'png',\r\n data: data.buffer\r\n }\r\n });\r\n}\r\n\r\nfunction createTextRun(text: string, attributes?: QuillAttributes): TextRun {\r\n return new TextRun({\r\n text: text,\r\n /* eslint-disable @typescript-eslint/no-deprecated -- bold/italics 与已废弃的 String.prototype 方法同名,此处为 docx IRunOptions 属性,非废弃用法 */\r\n bold: attributes?.bold ?? false,\r\n italics: attributes?.italic ?? false,\r\n /* eslint-enable @typescript-eslint/no-deprecated */\r\n underline: attributes?.underline ? { type: BorderStyle.SINGLE } : undefined,\r\n size: mapFontSize(attributes?.size),\r\n font: attributes?.font ?? undefined,\r\n color: attributes?.color ? parseColor(attributes.color) : undefined,\r\n highlight: attributes?.background ? mapHighlightColor(attributes.background) : undefined\r\n });\r\n}\r\n\r\nfunction createParagraph(runs: TextRun[], attributes?: QuillAttributes, isList?: boolean, listLevel?: number): Paragraph {\r\n const headerLevel = attributes?.header ? (typeof attributes.header === 'number' ? attributes.header : parseInt(attributes.header)) : undefined;\r\n const paragraphOptions = {\r\n children: runs,\r\n alignment: mapAlignment(attributes?.align),\r\n ...(headerLevel && headerLevel >= 1 && headerLevel <= 6 ? {\r\n heading: HeadingLevel[`HEADING_${headerLevel}` as keyof typeof HeadingLevel]\r\n } : {}),\r\n ...(isList && attributes?.list ? {\r\n bullet: {\r\n level: listLevel ?? 0\r\n }\r\n } : {})\r\n } as IParagraphOptions;\r\n\r\n return new Paragraph(paragraphOptions);\r\n}\r\n\r\nasync function getImageBuffer(imageUrl: string): Promise<Uint8Array> {\r\n if (imageUrl.startsWith('data:image')) {\r\n const base64 = imageUrl.split(',')[1];\r\n return base64ToUint8Array(base64);\r\n }\r\n\r\n const controller = new AbortController();\r\n const timeoutId = setTimeout(() => controller.abort(), 10000); // 10秒超时\r\n\r\n try {\r\n const response = await fetch(imageUrl, {\r\n method: 'GET',\r\n mode: 'cors',\r\n credentials: 'omit',\r\n signal: controller.signal\r\n });\r\n clearTimeout(timeoutId);\r\n\r\n if (!response.ok) {\r\n throw new Error(`图片获取失败: ${imageUrl}`);\r\n }\r\n\r\n const arrayBuffer = await response.arrayBuffer();\r\n return new Uint8Array(arrayBuffer);\r\n } catch (error) {\r\n clearTimeout(timeoutId);\r\n console.error('图片加载失败:', imageUrl, error);\r\n return new Uint8Array(0);\r\n }\r\n}\r\n\r\nasync function getImageDimensions(imageUrl: string): Promise<{ width: number; height: number }> {\r\n return new Promise((resolve): void => {\r\n const img = new Image();\r\n const timeout = setTimeout(() => {\r\n img.onload = null;\r\n img.onerror = null;\r\n // 超时也返回默认值,保证导出流程不中断\r\n resolve({ width: 400, height: 300 });\r\n }, 5000);\r\n\r\n img.onload = (): void => {\r\n clearTimeout(timeout);\r\n resolve({ width: img.width, height: img.height });\r\n };\r\n img.onerror = (): void => {\r\n clearTimeout(timeout);\r\n resolve({ width: 400, height: 300 });\r\n };\r\n img.src = imageUrl;\r\n });\r\n}\r\n\r\nfunction base64ToUint8Array(base64: string): Uint8Array {\r\n const binaryString = atob(base64);\r\n const bytes = new Uint8Array(binaryString.length);\r\n for (let i = 0; i < binaryString.length; i++) {\r\n bytes[i] = binaryString.charCodeAt(i);\r\n }\r\n return bytes;\r\n}\r\n\r\nfunction mapFontSize(size?: string): number | undefined {\r\n if (!size) return undefined;\r\n\r\n const sizeMap: Record<string, number> = {\r\n 'small': 12,\r\n 'normal': 14,\r\n 'large': 18,\r\n 'huge': 24\r\n };\r\n\r\n return sizeMap[size] || 14;\r\n}\r\n\r\nfunction mapAlignment(align?: string): (typeof AlignmentType)[keyof typeof AlignmentType] {\r\n switch (align) {\r\n case 'center':\r\n return AlignmentType.CENTER;\r\n case 'right':\r\n return AlignmentType.RIGHT;\r\n case 'justify':\r\n return AlignmentType.JUSTIFIED;\r\n default:\r\n return AlignmentType.LEFT;\r\n }\r\n}\r\n\r\nfunction parseColor(color: string): string | undefined {\r\n if (!color) return undefined;\r\n if (color.startsWith('#')) {\r\n return color.substring(1).toUpperCase();\r\n }\r\n const rgbMatch = /rgba?\\((\\d+),\\s*(\\d+),\\s*(\\d+)/.exec(color);\r\n if (rgbMatch) {\r\n const r = parseInt(rgbMatch[1]).toString(16).padStart(2, '0');\r\n const g = parseInt(rgbMatch[2]).toString(16).padStart(2, '0');\r\n const b = parseInt(rgbMatch[3]).toString(16).padStart(2, '0');\r\n return `${r}${g}${b}`.toUpperCase();\r\n }\r\n\r\n return undefined;\r\n}\r\n\r\nfunction mapHighlightColor(color: string): (typeof HighlightColor)[keyof typeof HighlightColor] {\r\n const hex = parseColor(color);\r\n if (!hex) return HighlightColor.NONE;\r\n const r = parseInt(hex.substring(0, 2), 16);\r\n const g = parseInt(hex.substring(2, 4), 16);\r\n const b = parseInt(hex.substring(4, 6), 16);\r\n const colorMap: Record<string, [number, number, number]> = {\r\n [HighlightColor.YELLOW]: [255, 255, 0],\r\n [HighlightColor.GREEN]: [0, 128, 0],\r\n [HighlightColor.CYAN]: [0, 255, 255],\r\n [HighlightColor.RED]: [255, 0, 0],\r\n [HighlightColor.BLUE]: [0, 0, 255],\r\n [HighlightColor.MAGENTA]: [255, 0, 255],\r\n [HighlightColor.DARK_BLUE]: [0, 0, 139],\r\n [HighlightColor.DARK_CYAN]: [0, 139, 139],\r\n [HighlightColor.DARK_GREEN]: [0, 100, 0],\r\n [HighlightColor.DARK_MAGENTA]: [139, 0, 139],\r\n [HighlightColor.DARK_RED]: [139, 0, 0],\r\n [HighlightColor.DARK_YELLOW]: [128, 128, 0],\r\n [HighlightColor.DARK_GRAY]: [169, 169, 169],\r\n [HighlightColor.LIGHT_GRAY]: [211, 211, 211],\r\n [HighlightColor.BLACK]: [0, 0, 0],\r\n [HighlightColor.WHITE]: [255, 255, 255],\r\n };\r\n let closestColor: (typeof HighlightColor)[keyof typeof HighlightColor] = HighlightColor.NONE;\r\n let minDistance = Infinity;\r\n for (const [name, [cr, cg, cb]] of Object.entries(colorMap)) {\r\n const distance = (r - cr) ** 2 + (g - cg) ** 2 + (b - cb) ** 2;\r\n if (distance < minDistance) {\r\n minDistance = distance;\r\n closestColor = name as (typeof HighlightColor)[keyof typeof HighlightColor];\r\n }\r\n }\r\n return closestColor;\r\n}\r\n"],"mappings":";;AAgDA,eAAsB,kBAAkB,OAAmB,UAAgB;CACvE,MAAM,WAAW,MAAM,2BAA2B,KAAK;CACvD,MAAM,MAAM,IAAI,SAAS,EACrB,UAAU,CAAC;EAAE,YAAY,CAAA;EAAc;CAAQ,CAAE,EACpD,CAAA;CACD,MAAM,OAAO,MAAM,OAAO,OAAO,GAAG;CACpC,UAAU,OAAO,MAAM,QAAQ;AACnC;AAEA,eAAe,2BAA2B,OAAiB;CACvD,MAAM,WAAwB,CAAA;CAG9B,MAAM,6BAAa,IAAI,IAAG;CAC1B,MAAM,WAAW,MAAM,IAAI,QAAO,OAAM,OAAO,GAAG,WAAW,YAAY,GAAG,QAAQ,KAAK;CAEzF,MAAM,QAAQ,IAAI,SAAS,IAAI,OAAO,OAAM;EACxC,IAAI,OAAO,GAAG,WAAW,YAAY,GAAG,WAAW,QAAQ,WAAW,GAAG,UAAU,OAAO,GAAG,OAAO,UAAU,UAAU;GACpH,MAAM,MAAM,GAAG,OAAO;GACtB,IAAI,CAAC,WAAW,IAAI,GAAG,GAAG;IACtB,MAAM,SAAS,MAAM,eAAe,GAAG;IACvC,MAAM,OAAO,MAAM,mBAAmB,GAAG;IACzC,IAAI,OAAO;IACX,IAAI,IAAI,YAAW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