odant-work 1.0.91 → 1.0.93

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 (732) hide show
  1. package/#system/certs/russian_trusted_root_ca.pem +32 -32
  2. package/#system/mail.json.example +9 -9
  3. package/#system/package-manifest.json +635 -685
  4. package/#system/settings.json.example +3 -3
  5. package/{models/$ai → $server}/$folder/$class/$ai/class.js +11 -11
  6. package/{models/$ai/$folder/$class/$ai/handlers/pages/form/system/$handler/tabs/ai/$handler/ai.js → $server/$folder/$class/$ai/handlers/pages/form/system/ai/$handler/class.js} +384 -430
  7. package/$server/$folder/$class/$data/handlers/pages/form/objects/$handler/class.js +2158 -0
  8. package/$server/$folder/$class/$data/handlers/pages/form/objects/object/$handler/class.js +1377 -0
  9. package/$server/$folder/$class/$domain/class.js +4 -4
  10. package/$server/$folder/$class/$domain/handlers/methods/restore/$handler/class.js +5 -5
  11. package/$server/$folder/$class/$domain/readme.md +1 -1
  12. package/$server/$folder/$class/$handler/$trigger/class.js +3 -3
  13. package/$server/$folder/$class/$handler/class.js +9 -9
  14. package/$server/$folder/$class/$handler/handlers/pages/editor/$handler/class.js +5 -5
  15. package/$server/$folder/$class/$handler/readme.md +23 -23
  16. package/$server/$folder/$class/$module/$mcp/class.js +342 -0
  17. package/$server/$folder/$class/$module/$mcp/handlers/pages/form/system/mcp/$handler/class.js +158 -0
  18. package/{models/$ai/$folder/$class → $server/$folder/$class/$module}/$provider/class.js +1 -1
  19. package/{models/$ai/$folder/$class/$provider/handlers/pages/form/system/$handler/tabs/ai/$handler/ai.js → $server/$folder/$class/$module/$provider/handlers/pages/form/system/ai/$handler/class.js} +156 -166
  20. package/$server/$folder/$class/$module/$provider/readme.md +16 -0
  21. package/$server/$folder/$class/$module/class.js +7 -399
  22. package/$server/$folder/$class/$module/handlers/pages/form/system/{$handler/tabs/modules → modules}/$handler/class.js +1 -0
  23. package/$server/$folder/$class/$structure/$project/$folder/$class/$structure/$project/class.js +4 -0
  24. package/$server/$folder/$class/$structure/{$organization → $project}/$folder/$class/$structure/class.js +1 -1
  25. package/$server/$folder/$class/$structure/$project/class.js +11 -8
  26. package/$server/$folder/$class/$structure/{$organization/handlers/pages/site/$handler/site.js → $project/handlers/pages/site/$handler/class.js} +352 -365
  27. package/$server/$folder/$class/$structure/$project/readme.md +3 -11
  28. package/$server/$folder/$class/$structure/$server/handlers/methods/distro/$handler/class.js +1 -1
  29. package/$server/$folder/$class/$structure/$server/handlers/pages/form/system/{$handler/tabs/license/$handler/license.js → license/$handler/class.js} +104 -103
  30. package/$server/$folder/$class/$structure/$server/handlers/pages/site/$handler/{site.js → class.js} +45 -30
  31. package/$server/$folder/$class/$structure/$user/class.js +2 -2
  32. package/$server/$folder/$class/$structure/$user/handlers/pages/form/system/agent/$handler/class.js +3 -0
  33. package/$server/$folder/$class/$structure/$user/handlers/pages/form/system/messengers/$handler/class.js +3 -0
  34. package/$server/$folder/$class/$structure/$user/handlers/pages/form/system/modules/$handler/class.js +3 -0
  35. package/$server/$folder/$class/$structure/$user/handlers/pages/form/system/{$handler/tabs/profile/$handler/profile.js → profile/$handler/class.js} +6 -2
  36. package/$server/$folder/$class/$structure/$user/handlers/pages/form/system/skills/$handler/class.js +3 -0
  37. package/$server/$folder/$class/$structure/ai/system.md +1 -1
  38. package/$server/$folder/$class/$structure/class.js +39 -1
  39. package/$server/$folder/$class/$structure/handlers/methods/archive/$handler/class.js +3 -3
  40. package/$server/$folder/$class/$structure/handlers/pages/data/$handler/class.js +308 -5
  41. package/$server/$folder/$class/$structure/handlers/pages/explorer/$handler/class.js +14 -3
  42. package/$server/$folder/$class/$structure/handlers/pages/form/calendar/$handler/class.js +1281 -7
  43. package/$server/$folder/$class/$structure/handlers/pages/form/calendar/$handler/readme.md +40 -40
  44. package/$server/$folder/$class/$structure/handlers/pages/form/chat/$handler/class.js +2216 -6
  45. package/$server/$folder/$class/$structure/handlers/pages/form/email/$handler/class.js +1304 -6
  46. package/$server/$folder/$class/$structure/handlers/pages/form/search/$handler/class.js +305 -5
  47. package/$server/$folder/$class/$structure/handlers/pages/form/system/{$handler/tabs/agent/$handler/agent.js → agent/$handler/class.js} +329 -320
  48. package/$server/$folder/$class/$structure/handlers/pages/form/system/{$handler/tabs/database/$handler/database.js → database/$handler/class.js} +510 -577
  49. package/$server/$folder/$class/$structure/handlers/pages/form/system/{$handler/tabs/messengers/$handler/messengers.js → messengers/$handler/class.js} +143 -144
  50. package/$server/$folder/$class/$structure/handlers/pages/form/system/modules/$handler/class.js +270 -0
  51. package/$server/$folder/$class/$structure/handlers/pages/form/system/skills/$handler/class.js +256 -0
  52. package/$server/$folder/$class/$structure/handlers/pages/form/system/staff/$handler/class.js +2114 -0
  53. package/$server/$folder/$class/$structure/handlers/pages/site/$handler/class.js +229 -4
  54. package/$server/$folder/$class/$structure/handlers/pages/site/$handler/readme.md +1 -1
  55. package/$server/$folder/$class/$structure/readme.md +4 -4
  56. package/$server/$folder/$class/ai/agents/builder.md +2 -2
  57. package/$server/$folder/$class/ai/agents/org-architect.md +5 -5
  58. package/$server/$folder/$class/ai/agents/readme.md +2 -2
  59. package/$server/$folder/$class/ai/agents/schema-validator.md +2 -2
  60. package/$server/$folder/$class/ai/config.js +19 -19
  61. package/$server/$folder/$class/ai/prompt/$method/class.js +41 -41
  62. package/$server/$folder/$class/ai/readme.md +1 -1
  63. package/$server/$folder/$class/ai/skills/accounting-design.md +1 -1
  64. package/$server/$folder/$class/ai/skills/approval-flow.md +14 -14
  65. package/$server/$folder/$class/ai/skills/backup-check.md +13 -13
  66. package/$server/$folder/$class/ai/skills/computer.md +27 -27
  67. package/$server/$folder/$class/ai/skills/data-modeling.md +1 -1
  68. package/$server/$folder/$class/ai/skills/delegate-task.md +15 -15
  69. package/$server/$folder/$class/ai/skills/external-signup.md +14 -14
  70. package/$server/$folder/$class/ai/skills/import-table.md +1 -1
  71. package/$server/$folder/$class/ai/skills/onboarding.md +15 -15
  72. package/$server/$folder/$class/ai/skills/orchestration.md +41 -41
  73. package/$server/$folder/$class/ai/skills/org-structure.md +1 -1
  74. package/$server/$folder/$class/ai/skills/work-scenarios.md +9 -9
  75. package/$server/$folder/$class/ai/system.md +36 -36
  76. package/$server/$folder/$class/class.js +0 -3
  77. package/$server/$folder/$class/handlers/pages/form/folder/$handler/class.js +3 -0
  78. package/$server/$folder/$class/handlers/pages/form/system/$handler/class.js +2 -4
  79. package/$server/$folder/$class/handlers/pages/form/system/{$handler/tabs/files → files}/$handler/class.js +2 -0
  80. package/$server/$folder/$class/handlers/pages/form/system/{$handler/tabs/requisites/$handler/requisites.js → requisites/$handler/class.js} +43 -36
  81. package/$server/$folder/$class/handlers/pages/storage/$handler/class.js +25 -6
  82. package/$server/$folder/$file/$audio/handlers/preview/$handler/class.js +3 -3
  83. package/$server/$folder/$file/$audio/handlers/preview/$handler/preview.js +88 -88
  84. package/$server/$folder/$file/$call/class.js +10 -10
  85. package/$server/$folder/$file/$call/handlers/preview/$handler/class.js +4 -4
  86. package/$server/$folder/$file/$call/triggers/on_save/$trigger/class.js +48 -48
  87. package/$server/$folder/$file/$data/class.js +16 -16
  88. package/$server/$folder/$file/$data/handlers/pages/form/editor/$handler/class.js +31 -4
  89. package/$server/$folder/$file/$devs/$js/class.js +2 -2
  90. package/$server/$folder/$file/$devs/$json/class.js +2 -2
  91. package/$server/$folder/$file/$devs/$ts/class.js +2 -2
  92. package/$server/$folder/$file/$devs/handlers/pages/form/file/$handler/class.js +30 -2
  93. package/$server/$folder/$file/$eml/class.js +17 -17
  94. package/$server/$folder/$file/$ics/class.js +44 -44
  95. package/$server/$folder/$file/$ics/handlers/pages/form/file/$handler/class.js +10 -2
  96. package/$server/$folder/$file/$ics/handlers/preview/$handler/class.js +3 -3
  97. package/$server/$folder/$file/$ics/handlers/preview/$handler/preview.js +67 -67
  98. package/$server/$folder/$file/$ics/readme.md +21 -21
  99. package/$server/$folder/$file/$image/$svg/class.js +11 -11
  100. package/$server/$folder/$file/$image/handlers/preview/$handler/class.js +3 -3
  101. package/$server/$folder/$file/$image/handlers/preview/$handler/preview.js +33 -33
  102. package/$server/$folder/$file/$ipynb/handlers/pages/form/file/$handler/class.js +82 -2
  103. package/$server/$folder/$file/$logs/class.js +39 -39
  104. package/$server/$folder/$file/$logs/handlers/methods/txt-test/$handler/class.js +4 -4
  105. package/$server/$folder/$file/$md/handlers/pages/form/file/$handler/class.js +60 -2
  106. package/$server/$folder/$file/$office/$outlook/$ics/class.js +227 -227
  107. package/$server/$folder/$file/$office/$word/$rtf/template.rtf +159 -159
  108. package/$server/$folder/$file/$office/handlers/pages/form/file/$handler/class.js +1699 -2
  109. package/$server/$folder/$file/$task/class.js +2 -2
  110. package/$server/$folder/$file/$task/handlers/pages/form/file/$handler/class.js +827 -2
  111. package/$server/$folder/$file/$task/handlers/pages/form/file/$handler/readme.md +2 -2
  112. package/$server/$folder/$file/$task/handlers/pages/form/file/$handler/ui/feed.js +17 -0
  113. package/$server/$folder/$file/$task/handlers/pages/form/file/$handler/ui/panel.js +7 -1
  114. package/$server/$folder/$file/$task/handlers/pages/form/file/$handler/ui/util.js +1 -0
  115. package/$server/$folder/$file/$task/handlers/pages/form/file/$handler/ui/voice-policy.js +6 -2
  116. package/$server/$folder/$file/$task/handlers/preview/$handler/class.js +3 -3
  117. package/$server/$folder/$file/$task/readme.md +32 -32
  118. package/$server/$folder/$file/$txt/handlers/preview/$handler/class.js +3 -3
  119. package/$server/$folder/$file/$txt/handlers/preview/$handler/preview.js +41 -41
  120. package/$server/$folder/$file/$video/handlers/preview/$handler/class.js +4 -4
  121. package/$server/$folder/$file/$video/handlers/preview/$handler/preview.js +13 -13
  122. package/$server/$folder/$file/class.js +2 -2
  123. package/$server/$folder/$file/handlers/methods/download/$handler/class.js +2 -2
  124. package/$server/$folder/$file/handlers/methods/download/$handler/download.js +4 -4
  125. package/$server/$folder/$file/handlers/pages/form/$handler/class.js +2 -2
  126. package/$server/$folder/$file/handlers/pages/form/file/$handler/class.js +32 -2
  127. package/$server/$folder/$file/handlers/pages/form/folder/$handler/class.js +3 -0
  128. package/$server/$folder/$file/readme.md +31 -31
  129. package/$server/$folder/class.js +11 -11
  130. package/$server/$folder/handlers/methods/create/$handler/class.js +35 -38
  131. package/$server/$folder/handlers/pages/form/$handler/class.js +2469 -5
  132. package/$server/$folder/handlers/pages/form/folder/$handler/class.js +22 -0
  133. package/$server/$folder/handlers/readme.md +1 -1
  134. package/$server/$folder/lib/chat-item/chat-item.js +4 -4
  135. package/$server/$folder/lib/class-picker/class-picker.js +8 -5
  136. package/$server/$folder/lib/consultant/consultant.js +5 -5
  137. package/$server/$folder/lib/email/settings.js +82 -82
  138. package/$server/$folder/lib/file-viewer/file-viewer.js +8 -8
  139. package/$server/$folder/lib/icon/icon.js +1 -1
  140. package/$server/$folder/lib/icon/user/user.js +6 -6
  141. package/$server/$folder/lib/item-data-grid/item-data-grid.js +48 -48
  142. package/$server/$folder/lib/item-data-grid/readme.md +1 -1
  143. package/$server/$folder/lib/item-form/item-form.js +84 -84
  144. package/$server/$folder/lib/item-form/readme.md +1 -1
  145. package/$server/$folder/lib/local-models-transfer/local-models-transfer.js +11 -11
  146. package/$server/$folder/lib/menu/menu.js +3 -2
  147. package/$server/$folder/lib/menu/readme.md +29 -29
  148. package/$server/$folder/lib/messenger-settings/messenger-settings.js +2 -2
  149. package/$server/$folder/lib/node/node.js +62 -25
  150. package/$server/$folder/lib/node/readme.md +29 -29
  151. package/$server/$folder/lib/pack/pack.js +4 -4
  152. package/$server/$folder/lib/prompt-bar/prompt-bar.js +2 -2
  153. package/$server/$folder/lib/site-loc/readme.md +16 -16
  154. package/$server/$folder/lib/site-loc/site-loc.js +3 -3
  155. package/$server/$folder/lib/tree/tree.js +62 -29
  156. package/.github/workflows/ci.yml +39 -39
  157. package/AGENTS.md +6 -6
  158. package/MODULES/$domain/$folder/$class/$module/class.js +5 -6
  159. package/MODULES/$domain/class.js +8 -31
  160. package/MODULES/$domain/handlers/pages/form/system/mcp/$handler/class.js +389 -0
  161. package/MODULES/$domain/readme.md +2 -2
  162. package/MODULES/MCP/.gitkeep +0 -0
  163. package/MODULES/{DaData → /320/224/320/260/320/275/320/275/321/213/320/265/DaData}/$module/class.js +2 -2
  164. package/MODULES/{Geo → /320/224/320/260/320/275/320/275/321/213/320/265/Geo}/$module/readme.md +1 -1
  165. package/MODULES/{Geo → /320/224/320/260/320/275/320/275/321/213/320/265/Geo}//320/223/320/265/320/276/321/202/320/276/321/207/320/272/320/270/$catalog/class.js +1 -1
  166. package/MODULES/{Geo → /320/224/320/260/320/275/320/275/321/213/320/265/Geo}//320/232/320/260/321/200/321/202/320/260/$catalog/class.js +2 -2
  167. package/MODULES/{Geo//320/232/320/260/321/200/321/202/320/260/$catalog/handlers/pages/form/map/$handler/map.js → /320/224/320/260/320/275/320/275/321/213/320/265/Geo//320/232/320/260/321/200/321/202/320/260/$catalog/handlers/pages/form/map/$handler/class.js} +295 -266
  168. package/MODULES/{KLADR/$module/handlers/pages/form/kladr/$handler/kladr.js → /320/224/320/260/320/275/320/275/321/213/320/265/KLADR/$module/handlers/pages/form/kladr/$handler/class.js} +32 -25
  169. package/MODULES/{KLADR → /320/224/320/260/320/275/320/275/321/213/320/265/KLADR}//320/235/320/260/321/201/320/265/320/273/321/221/320/275/320/275/321/213/320/265 /320/277/321/203/320/275/320/272/321/202/321/213/$catalog/class.js" +1 -1
  170. package/MODULES/{KLADR → /320/224/320/260/320/275/320/275/321/213/320/265/KLADR}//320/243/320/273/320/270/321/206/321/213/$catalog/class.js +1 -1
  171. package/MODULES/{1C → /320/232/320/276/320/275/320/275/320/265/320/272/321/202/320/276/321/200/321/213/1C}/$module/class.js +1 -1
  172. package/MODULES/{Bitrix24 → /320/232/320/276/320/275/320/275/320/265/320/272/321/202/320/276/321/200/321/213/Bitrix24}/$module/class.js +1 -1
  173. package/MODULES/{YandexDisk → /320/232/320/276/320/275/320/275/320/265/320/272/321/202/320/276/321/200/321/213/YandexDisk}/$module/class.js +1 -1
  174. package/MODULES/{Marketplaces/Ozon/$module → /320/234/320/260/321/200/320/272/320/265/321/202/320/277/320/273/320/265/320/271/321/201/321/213/Ozon/$mcp}/class.js +1 -1
  175. package/MODULES/{Marketplaces/Wildberries/$module → /320/234/320/260/321/200/320/272/320/265/321/202/320/277/320/273/320/265/320/271/321/201/321/213/Wildberries/$mcp}/class.js +1 -1
  176. package/MODULES/{Marketplaces/YandexMarket/$module → /320/234/320/260/321/200/320/272/320/265/321/202/320/277/320/273/320/265/320/271/321/201/321/213/YandexMarket/$mcp}/class.js +1 -1
  177. package/{models → MODULES//320/234/320/276/320/264/320/265/320/273/320/270}/GigaChat/$provider/readme.md +24 -24
  178. package/{models → MODULES//320/234/320/276/320/264/320/265/320/273/320/270}/Local/$provider/$folder/$class/$ai/class.js +1 -1
  179. package/{models → MODULES//320/234/320/276/320/264/320/265/320/273/320/270}/Local/$provider/class.js +1 -1
  180. package/MODULES//320/234/320/276/320/264/320/265/320/273/320/270/Local/$provider/handlers/pages/form/system/ai/$handler/class.js +3 -0
  181. package/MODULES//320/234/320/276/320/264/320/265/320/273/320/270/Local/$provider/handlers/pages/form/system/models/$handler/class.js +1242 -0
  182. package/MODULES//320/234/320/276/320/264/320/265/320/273/320/270/Local/$provider/handlers/pages/form/system/training/$handler/class.js +244 -0
  183. package/MODULES/{Process/$module/readme.md → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Process/$module/readme.md" } +1 -1
  184. package/MODULES/{Process → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Process}//320/227/320/260/320/264/320/260/321/207/320/270 /320/270 /321/215/321/202/320/260/320/277/321/213/$catalog/class.js" +3 -3
  185. package/MODULES/{Process//320/227/320/260/320/264/320/260/321/207/320/270 /320/270 /321/215/321/202/320/260/320/277/321/213/$catalog/handlers/pages/form/gantt/$handler/gantt.js" → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Process//320/227/320/260/320/264/320/260/321/207/320/270 /320/270 /321/215/321/202/320/260/320/277/321/213/$catalog/handlers/pages/form/gantt/$handler/class.js" } +106 -93
  186. package/MODULES/{Process//320/227/320/260/320/264/320/260/321/207/320/270 /320/270 /321/215/321/202/320/260/320/277/321/213/$catalog/handlers/pages/form/scheduler/$handler/scheduler.js" → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Process//320/227/320/260/320/264/320/260/321/207/320/270 /320/270 /321/215/321/202/320/260/320/277/321/213/$catalog/handlers/pages/form/scheduler/$handler/class.js" } +79 -71
  187. package/MODULES/{Process//320/241/321/205/320/265/320/274/321/213 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/320/276/320/262/$catalog/handlers/pages/form/bpmn/$handler/bpmn.js" → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Process//320/241/321/205/320/265/320/274/321/213 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/320/276/320/262/$catalog/handlers/pages/form/bpmn/$handler/class.js" } +297 -185
  188. package/MODULES//320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/CATALOGS/$catalog/$folder/$class/$data/$catalog/$virtual/handlers/pages/form/objects/$handler/class.js" +3 -0
  189. package/MODULES/{Register/CATALOGS/$catalog/$folder/$class/$data/$catalog/$virtual/handlers/pages/form/virtual/$handler/virtual.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/CATALOGS/$catalog/$folder/$class/$data/$catalog/$virtual/handlers/pages/form/virtual/$handler/class.js" } +413 -390
  190. package/MODULES/{Register/CATALOGS/$catalog/readme.md → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/CATALOGS/$catalog/readme.md" } +1 -1
  191. package/MODULES/{Register/CATALOGS//320/224/320/276/320/263/320/276/320/262/320/276/321/200/321/213/$catalog/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/CATALOGS//320/224/320/276/320/263/320/276/320/262/320/276/321/200/321/213/$catalog/class.js" } +1 -1
  192. package/MODULES/{Register/CATALOGS//320/232/320/273/320/270/320/265/320/275/321/202/321/213/$virtual/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/CATALOGS//320/232/320/273/320/270/320/265/320/275/321/202/321/213/$virtual/class.js" } +2 -2
  193. package/MODULES/{Register/CATALOGS//320/235/320/276/320/274/320/265/320/275/320/272/320/273/320/260/321/202/321/203/321/200/320/260/$catalog/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/CATALOGS//320/235/320/276/320/274/320/265/320/275/320/272/320/273/320/260/321/202/321/203/321/200/320/260/$catalog/class.js" } +1 -1
  194. package/MODULES/{Register/CATALOGS//320/237/320/260/321/200/321/202/320/270/320/270/$catalog/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/CATALOGS//320/237/320/260/321/200/321/202/320/270/320/270/$catalog/class.js" } +2 -2
  195. package/MODULES/{Register/CATALOGS//320/237/320/276/321/201/321/202/320/260/320/262/321/211/320/270/320/272/320/270/$virtual/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/CATALOGS//320/237/320/276/321/201/321/202/320/260/320/262/321/211/320/270/320/272/320/270/$virtual/class.js" } +1 -1
  196. package/MODULES/{Register/CATALOGS//320/241/320/272/320/273/320/260/320/264/321/213/$catalog/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/CATALOGS//320/241/320/272/320/273/320/260/320/264/321/213/$catalog/class.js" } +2 -2
  197. package/MODULES/{Register/CATALOGS//320/241/320/276/321/202/321/200/321/203/320/264/320/275/320/270/320/272/320/270/$virtual/$folder/$class/$data/$catalog/$virtual/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/CATALOGS//320/241/320/276/321/202/321/200/321/203/320/264/320/275/320/270/320/272/320/270/$virtual/$folder/$class/$data/$catalog/$virtual/class.js" } +2 -2
  198. package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/CATALOGS//320/241/320/276/321/202/321/200/321/203/320/264/320/275/320/270/320/272/320/270//320/222 /320/276/321/202/320/277/321/203/321/201/320/272/320/265/$virtual/class.js" +1 -1
  199. package/MODULES/{Register/CATALOGS//320/241/321/203/320/261/321/212/320/265/320/272/321/202/321/213/$catalog/$folder/$class/$data/$catalog/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/CATALOGS//320/241/321/203/320/261/321/212/320/265/320/272/321/202/321/213/$catalog/$folder/$class/$data/$catalog/class.js" } +2 -2
  200. package/MODULES/{Register/CATALOGS//320/241/321/203/320/261/321/212/320/265/320/272/321/202/321/213//320/230/320/237/$catalog/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/CATALOGS//320/241/321/203/320/261/321/212/320/265/320/272/321/202/321/213//320/230/320/237/$catalog/class.js" } +2 -2
  201. package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/CATALOGS//320/241/321/203/320/261/321/212/320/265/320/272/321/202/321/213//320/244/320/270/320/267. /320/273/320/270/321/206/320/260/$catalog/class.js" +2 -2
  202. package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/CATALOGS//320/241/321/203/320/261/321/212/320/265/320/272/321/202/321/213//320/256/321/200. /320/273/320/270/321/206/320/260/$catalog/class.js" +2 -2
  203. package/MODULES/{Register/CATALOGS//320/242/321/200/320/260/320/275/321/201/320/277/320/276/321/200/321/202/$catalog/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/CATALOGS//320/242/321/200/320/260/320/275/321/201/320/277/320/276/321/200/321/202/$catalog/class.js" } +2 -2
  204. package/MODULES/{Register/OPERATIONS/$operation/readme.md → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS/$operation/readme.md" } +1 -1
  205. package/MODULES//320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS//320/224/320/276/321/201/321/202/320/260/320/262/320/272/320/260/$operation/class.js" +22 -0
  206. package/MODULES/{Register/OPERATIONS//320/227/320/260/321/200/320/277/320/273/320/260/321/202/320/260/$operation/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS//320/227/320/260/321/200/320/277/320/273/320/260/321/202/320/260/$operation/class.js" } +7 -7
  207. package/MODULES/{Register/OPERATIONS//320/230/320/275/320/262/320/265/320/275/321/202/320/260/321/200/320/270/320/267/320/260/321/206/320/270/321/217/$operation/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS//320/230/320/275/320/262/320/265/320/275/321/202/320/260/321/200/320/270/320/267/320/260/321/206/320/270/321/217/$operation/class.js" } +9 -9
  208. package/MODULES/{Register/OPERATIONS//320/232/320/260/320/264/321/200/321/213/$operation/$folder/$class/$data/$operation/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS//320/232/320/260/320/264/321/200/321/213/$operation/$folder/$class/$data/$operation/class.js" } +1 -1
  209. package/MODULES//320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS//320/232/320/260/320/264/321/200/321/213//320/222/320/265/321/200/320/275/321/203/321/202/321/214 /320/270/320/267 /320/276/321/202/320/277/321/203/321/201/320/272/320/260/$operation/class.js" +14 -0
  210. package/MODULES//320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS//320/232/320/260/320/264/321/200/321/213//320/236/321/202/320/277/321/200/320/260/320/262/320/270/321/202/321/214 /320/262 /320/276/321/202/320/277/321/203/321/201/320/272/$operation/class.js" +15 -0
  211. package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/232/320/260/320/264/321/200/321/213//320/237/321/200/320/270/321/221/320/274 /320/275/320/260 /321/200/320/260/320/261/320/276/321/202/321/203/$operation/class.js" +3 -3
  212. package/MODULES//320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS//320/232/320/260/320/264/321/200/321/213//320/243/320/262/320/276/320/273/321/214/320/275/320/265/320/275/320/270/320/265/$operation/class.js" +14 -0
  213. package/MODULES//320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS//320/232/320/260/321/201/321/201/320/260//320/220/320/262/320/260/320/275/321/201/320/276/320/262/321/213/320/271 /320/276/321/202/321/207/321/221/321/202/$operation/class.js" +17 -0
  214. package/MODULES//320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS//320/232/320/260/321/201/321/201/320/260//320/237/320/232/320/236/$operation/class.js" +18 -0
  215. package/MODULES//320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS//320/232/320/260/321/201/321/201/320/260//320/240/320/232/320/236/$operation/class.js" +17 -0
  216. package/MODULES/{Register/OPERATIONS//320/232/320/276/320/274/320/274/321/203/320/275/320/270/320/272/320/260/321/206/320/270/320/270/$operation/$folder/$class/$data/$operation/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS//320/232/320/276/320/274/320/274/321/203/320/275/320/270/320/272/320/260/321/206/320/270/320/270/$operation/$folder/$class/$data/$operation/class.js" } +1 -1
  217. package/MODULES/{Register/OPERATIONS//320/232/320/276/320/274/320/274/321/203/320/275/320/270/320/272/320/260/321/206/320/270/320/270//320/227/320/262/320/276/320/275/320/276/320/272/$operation/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS//320/232/320/276/320/274/320/274/321/203/320/275/320/270/320/272/320/260/321/206/320/270/320/270//320/227/320/262/320/276/320/275/320/276/320/272/$operation/class.js" } +2 -2
  218. package/MODULES/{Register/OPERATIONS//320/232/320/276/320/274/320/274/321/203/320/275/320/270/320/272/320/260/321/206/320/270/320/270//320/237/320/270/321/201/321/214/320/274/320/276/$operation/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS//320/232/320/276/320/274/320/274/321/203/320/275/320/270/320/272/320/260/321/206/320/270/320/270//320/237/320/270/321/201/321/214/320/274/320/276/$operation/class.js" } +2 -2
  219. package/MODULES/{Register/OPERATIONS//320/232/320/276/320/274/320/277/320/273/320/265/320/272/321/202/320/260/321/206/320/270/321/217/$operation/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS//320/232/320/276/320/274/320/277/320/273/320/265/320/272/321/202/320/260/321/206/320/270/321/217/$operation/class.js" } +14 -14
  220. package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/236/321/201/320/275/320/276/320/262/320/275/321/213/320/265 /321/201/321/200/320/265/320/264/321/201/321/202/320/262/320/260//320/235/320/260/321/207/320/270/321/201/320/273/320/265/320/275/320/270/320/265 /320/260/320/274/320/276/321/200/321/202/320/270/320/267/320/260/321/206/320/270/320/270/$operation/class.js" +3 -3
  221. package/MODULES//320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS//320/236/321/201/320/275/320/276/320/262/320/275/321/213/320/265 /321/201/321/200/320/265/320/264/321/201/321/202/320/262/320/260//320/237/320/276/321/201/321/202/321/203/320/277/320/273/320/265/320/275/320/270/320/265 /320/236/320/241/$operation/class.js" +30 -0
  222. package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/236/321/201/320/275/320/276/320/262/320/275/321/213/320/265 /321/201/321/200/320/265/320/264/321/201/321/202/320/262/320/260//320/237/321/200/320/270/320/275/321/217/321/202/320/270/320/265 /320/272 /321/203/321/207/321/221/321/202/321/203 /320/236/320/241/$operation/class.js" +3 -3
  223. package/MODULES/{Register/OPERATIONS//320/237/320/265/321/200/320/265/320/274/320/265/321/211/320/265/320/275/320/270/320/265/$operation/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS//320/237/320/265/321/200/320/265/320/274/320/265/321/211/320/265/320/275/320/270/320/265/$operation/class.js" } +7 -7
  224. package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/237/320/273/320/260/321/202/320/265/320/266/320/270 /321/201 /321/200/320/260/321/201/321/207/321/221/321/202/320/275/320/276/320/263/320/276 /321/201/321/207/321/221/321/202/320/260/$operation/$folder/$class/$data/$operation/class.js" +1 -1
  225. package/MODULES//320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS//320/237/320/273/320/260/321/202/320/265/320/266/320/270 /321/201 /321/200/320/260/321/201/321/207/321/221/321/202/320/275/320/276/320/263/320/276 /321/201/321/207/321/221/321/202/320/260//320/227/320/260/321/200/320/277/320/273/320/260/321/202/320/260/$operation/class.js" +8 -0
  226. package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/237/320/273/320/260/321/202/320/265/320/266/320/270 /321/201 /321/200/320/260/321/201/321/207/321/221/321/202/320/275/320/276/320/263/320/276 /321/201/321/207/321/221/321/202/320/260//320/235/320/224/320/241/$operation/class.js" +1 -1
  227. package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/237/320/273/320/260/321/202/320/265/320/266/320/270 /321/201 /321/200/320/260/321/201/321/207/321/221/321/202/320/275/320/276/320/263/320/276 /321/201/321/207/321/221/321/202/320/260//320/235/320/224/320/244/320/233/$operation/class.js" +1 -1
  228. package/MODULES//320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS//320/237/320/273/320/260/321/202/320/265/320/266/320/270 /321/201 /321/200/320/260/321/201/321/207/321/221/321/202/320/275/320/276/320/263/320/276 /321/201/321/207/321/221/321/202/320/260//320/237/320/276/321/201/321/202/320/260/320/262/321/211/320/270/320/272/321/203/$operation/class.js" +11 -0
  229. package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/237/320/273/320/260/321/202/320/265/320/266/320/270 /321/201 /321/200/320/260/321/201/321/207/321/221/321/202/320/275/320/276/320/263/320/276 /321/201/321/207/321/221/321/202/320/260//320/241/321/202/321/200/320/260/321/205/320/276/320/262/321/213/320/265 /320/262/320/267/320/275/320/276/321/201/321/213/$operation/class.js" +1 -1
  230. package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/237/320/276/321/201/321/202/321/203/320/277/320/273/320/265/320/275/320/270/320/265 /321/202/320/276/320/262/320/260/321/200/320/260/$operation/class.js" +9 -9
  231. package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/237/320/276/321/201/321/202/321/203/320/277/320/273/320/265/320/275/320/270/321/217 /320/275/320/260 /321/200/320/260/321/201/321/207/321/221/321/202/320/275/321/213/320/271 /321/201/321/207/321/221/321/202/$operation/$folder/$class/$data/$operation/class.js" +1 -1
  232. package/MODULES//320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS//320/237/320/276/321/201/321/202/321/203/320/277/320/273/320/265/320/275/320/270/321/217 /320/275/320/260 /321/200/320/260/321/201/321/207/321/221/321/202/320/275/321/213/320/271 /321/201/321/207/321/221/321/202//320/222/320/276/320/267/320/262/321/200/320/260/321/202 /320/276/321/202 /320/277/320/276/321/201/321/202/320/260/320/262/321/211/320/270/320/272/320/260/$operation/class.js" +11 -0
  233. package/MODULES//320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS//320/237/320/276/321/201/321/202/321/203/320/277/320/273/320/265/320/275/320/270/321/217 /320/275/320/260 /321/200/320/260/321/201/321/207/321/221/321/202/320/275/321/213/320/271 /321/201/321/207/321/221/321/202//320/236/321/202 /320/277/320/276/320/272/321/203/320/277/320/260/321/202/320/265/320/273/321/217/$operation/class.js" +11 -0
  234. package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/237/321/200/320/276/320/270/320/267/320/262/320/276/320/264/321/201/321/202/320/262/320/276//320/222/321/213/320/277/321/203/321/201/320/272 /320/263/320/276/321/202/320/276/320/262/320/276/320/271 /320/277/321/200/320/276/320/264/321/203/320/272/321/206/320/270/320/270/$operation/class.js" +4 -4
  235. package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/237/321/200/320/276/320/270/320/267/320/262/320/276/320/264/321/201/321/202/320/262/320/276//320/237/320/265/321/200/320/265/320/264/320/260/321/207/320/260 /320/274/320/260/321/202/320/265/321/200/320/270/320/260/320/273/320/276/320/262 /320/262 /320/277/321/200/320/276/320/270/320/267/320/262/320/276/320/264/321/201/321/202/320/262/320/276/$operation/class.js" +4 -4
  236. package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/237/321/200/320/276/320/270/320/267/320/262/320/276/320/264/321/201/321/202/320/262/320/276//320/241/320/277/320/270/321/201/320/260/320/275/320/270/320/265 /320/276/320/261/321/211/320/265/321/205/320/276/320/267/321/217/320/271/321/201/321/202/320/262/320/265/320/275/320/275/321/213/321/205 /320/267/320/260/321/202/321/200/320/260/321/202/$operation/class.js" +6 -6
  237. package/MODULES/{Register/OPERATIONS//320/240/320/265/320/260/320/273/320/270/320/267/320/260/321/206/320/270/321/217/$operation/$folder/$class/$data/$operation/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS//320/240/320/265/320/260/320/273/320/270/320/267/320/260/321/206/320/270/321/217/$operation/$folder/$class/$data/$operation/class.js" } +5 -5
  238. package/MODULES//320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS//320/240/320/265/320/260/320/273/320/270/320/267/320/260/321/206/320/270/321/217//320/222/320/276/320/267/320/262/321/200/320/260/321/202 /320/276/321/202 /320/277/320/276/320/272/321/203/320/277/320/260/321/202/320/265/320/273/321/217/$operation/class.js" +32 -0
  239. package/MODULES//320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS//320/240/320/265/320/260/320/273/320/270/320/267/320/260/321/206/320/270/321/217//320/237/320/276/320/272/321/203/320/277/320/260/321/202/320/265/320/273/321/216/$operation/class.js" +32 -0
  240. package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/240/320/265/320/260/320/273/320/270/320/267/320/260/321/206/320/270/321/217//320/237/320/276/320/272/321/203/320/277/320/260/321/202/320/265/320/273/321/216/$operation/print//320/241/321/207/321/221/321/202 /320/275/320/260 /320/276/320/277/320/273/320/260/321/202/321/203.html" +40 -40
  241. package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/240/320/265/320/260/320/273/320/270/320/267/320/260/321/206/320/270/321/217//320/237/320/276/320/272/321/203/320/277/320/260/321/202/320/265/320/273/321/216/$operation/print//320/242/320/276/320/262/320/260/321/200/320/275/320/260/321/217 /320/275/320/260/320/272/320/273/320/260/320/264/320/275/320/260/321/217.html" +56 -56
  242. package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/241/320/277/320/270/321/201/320/260/320/275/320/270/320/265 /320/242/320/234/320/246/$operation/class.js" +6 -6
  243. package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/243/321/201/321/202/320/260/320/275/320/276/320/262/320/272/320/260 /320/275/320/276/321/200/320/274/320/260/321/202/320/270/320/262/320/260/$operation/class.js" +4 -4
  244. package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/244/320/270/320/275/320/260/320/275/321/201/320/276/320/262/321/213/320/271 /321/200/320/265/320/267/321/203/320/273/321/214/321/202/320/260/321/202//320/227/320/260/320/272/321/200/321/213/321/202/320/270/320/265 /320/274/320/265/321/201/321/217/321/206/320/260/$operation/class.js" +2 -2
  245. package/MODULES/{Register/REGISTER/$register/$folder/$class/$data/$register/$account/handlers/pages/form/analysis/$handler/analysis.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/$register/$folder/$class/$data/$register/$account/handlers/pages/form/analysis/$handler/class.js" } +9 -4
  246. package/MODULES/{Register/REGISTER/$register/$folder/$class/$data/$register/$account/handlers/pages/form/postings/$handler/postings.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/$register/$folder/$class/$data/$register/$account/handlers/pages/form/postings/$handler/class.js" } +845 -753
  247. package/MODULES/{Register/REGISTER/$register/$folder/$class/$data/$register/$account/handlers/pages/form/turnovers/$handler/turnovers.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/$register/$folder/$class/$data/$register/$account/handlers/pages/form/turnovers/$handler/class.js" } +9 -4
  248. package/MODULES/{Register/REGISTER/$register/$folder/$class/$data/$register/$account/readme.md → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/$register/$folder/$class/$data/$register/$account/readme.md" } +1 -1
  249. package/MODULES/{Register/REGISTER/$register/ai/skills/register-accounts.md → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/$register/ai/skills/register-accounts.md" } +1 -1
  250. package/MODULES/{Register/REGISTER/$register/handlers/pages/form/journal/$handler/journal.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/$register/handlers/pages/form/journal/$handler/class.js" } +382 -329
  251. package/MODULES//320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/$register/handlers/pages/form/sheet/$handler/class.js" +807 -0
  252. package/MODULES/{Register/REGISTER/$register/readme.md → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/$register/readme.md" } +1 -1
  253. package/MODULES/{Register/REGISTER/01/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/01/$account/class.js" } +1 -1
  254. package/MODULES/{Register/REGISTER/02/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/02/$account/class.js" } +1 -1
  255. package/MODULES/{Register/REGISTER/04/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/04/$account/class.js" } +1 -1
  256. package/MODULES/{Register/REGISTER/08/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/08/$account/class.js" } +1 -1
  257. package/MODULES/{Register/REGISTER/10/$account/$folder/$class/$data/$register/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/10/$account/$folder/$class/$data/$register/$account/class.js" } +2 -2
  258. package/MODULES/{Register/REGISTER/10/01/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/10/01/$account/class.js" } +1 -1
  259. package/MODULES/{Register/REGISTER/10/05/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/10/05/$account/class.js" } +1 -1
  260. package/MODULES/{Register/REGISTER/41/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/41/$account/class.js" } +3 -3
  261. package/MODULES/{Register/REGISTER/43/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/43/$account/class.js" } +2 -2
  262. package/MODULES/{Register/REGISTER/44/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/44/$account/class.js" } +1 -1
  263. package/MODULES/{Register/REGISTER/60/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/60/$account/class.js" } +2 -2
  264. package/MODULES/{Register/REGISTER/62/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/62/$account/class.js" } +2 -2
  265. package/MODULES/{Register/REGISTER/68/01/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/68/01/$account/class.js" } +1 -1
  266. package/MODULES/{Register/REGISTER/68/02/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/68/02/$account/class.js" } +1 -1
  267. package/MODULES/{Register/REGISTER/70/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/70/$account/class.js" } +1 -1
  268. package/MODULES/{Register/REGISTER/71/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/71/$account/class.js" } +1 -1
  269. package/MODULES/{Register/REGISTER/73/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/73/$account/class.js" } +1 -1
  270. package/MODULES/{Register/REGISTER/76/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/76/$account/class.js" } +1 -1
  271. package/MODULES/{Register/REGISTER/90/01/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/90/01/$account/class.js" } +1 -1
  272. package/MODULES/{Register/REGISTER/90/02/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/90/02/$account/class.js" } +1 -1
  273. package/MODULES/{Register/REGISTER/90/03/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/90/03/$account/class.js" } +1 -1
  274. package/MODULES/{Register/REGISTER/91/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/91/$account/class.js" } +1 -1
  275. package/MODULES/{Register/REGISTER/94/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/94/$account/class.js" } +2 -2
  276. package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/REGISTER//320/232/320/260/320/264/321/200/320/276/320/262/321/213/320/271 /321/200/320/265/320/267/320/265/321/200/320/262/$account/class.js" +1 -1
  277. package/MODULES/{Register/REGISTER//320/232/320/260/320/264/321/200/321/213/$account/$folder/$class/$data/$register/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER//320/232/320/260/320/264/321/200/321/213/$account/$folder/$class/$data/$register/$account/class.js" } +1 -1
  278. package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/REGISTER//320/232/320/260/320/264/321/200/321/213//320/222 /320/276/321/202/320/277/321/203/321/201/320/272/320/265/$account/class.js" +1 -1
  279. package/MODULES/{Register/REGISTER//320/232/320/260/320/264/321/200/321/213//320/240/320/260/320/261/320/276/321/202/320/260/321/216/321/202/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER//320/232/320/260/320/264/321/200/321/213//320/240/320/260/320/261/320/276/321/202/320/260/321/216/321/202/$account/class.js" } +1 -1
  280. package/MODULES/{Register/REGISTER//320/232/320/276/320/274/320/274/321/203/320/275/320/270/320/272/320/260/321/206/320/270/320/270/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER//320/232/320/276/320/274/320/274/321/203/320/275/320/270/320/272/320/260/321/206/320/270/320/270/$account/class.js" } +1 -1
  281. package/MODULES/{Register/REGISTER//320/235/320/276/321/200/320/274/320/260/321/202/320/270/320/262/321/213/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER//320/235/320/276/321/200/320/274/320/260/321/202/320/270/320/262/321/213/$account/class.js" } +2 -2
  282. package/MODULES/{Register/REGISTER//320/242/320/265/321/205/320/275/320/270/321/207/320/265/321/201/320/272/320/270/320/271/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER//320/242/320/265/321/205/320/275/320/270/321/207/320/265/321/201/320/272/320/270/320/271/$account/class.js" } +1 -1
  283. package/MODULES/{Register/STRUCTS/$struct/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/STRUCTS/$struct/class.js" } +4 -4
  284. package/MODULES/{Register/STRUCTS//320/237/320/260/321/201/320/277/320/276/321/200/321/202/$struct/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/STRUCTS//320/237/320/260/321/201/320/277/320/276/321/200/321/202/$struct/class.js" } +2 -2
  285. package/NODES/$node/$folder/$class/$node/class.js +35 -35
  286. package/NODES/$node/class.js +5 -5
  287. package/NODES/$node/handlers/pages/form/network/$handler/class.js +121 -4
  288. package/PROJECTS/$domain/$folder/$class/$structure/$project/class.js +1 -2
  289. package/PROJECTS/$domain/readme.md +1 -1
  290. package/oda/benchmarks/dbmon/lib/ENV.js +213 -213
  291. package/oda/benchmarks/dbmon/lib/ga.js +11 -11
  292. package/oda/benchmarks/dbmon/lib/memory-stats.js +105 -105
  293. package/oda/benchmarks/dbmon/lib/monitor.js +69 -69
  294. package/oda/benchmarks/sierpinski/sierpinski.js +149 -149
  295. package/oda/components/editors/code-editor/code-editor.js +387 -387
  296. package/oda/components/editors/code-editor/src/ace.js +16 -16
  297. package/oda/components/editors/code-editor/src/beautify-css.js +1625 -1625
  298. package/oda/components/editors/code-editor/src/beautify-html.js +3122 -3122
  299. package/oda/components/editors/code-editor/src/beautify.js +4005 -4005
  300. package/oda/components/editors/code-editor/src/ext-beautify.js +7 -7
  301. package/oda/components/editors/code-editor/src/ext-code_lens.js +7 -7
  302. package/oda/components/editors/code-editor/src/ext-elastic_tabstops_lite.js +7 -7
  303. package/oda/components/editors/code-editor/src/ext-emmet.js +7 -7
  304. package/oda/components/editors/code-editor/src/ext-error_marker.js +7 -7
  305. package/oda/components/editors/code-editor/src/ext-hardwrap.js +7 -7
  306. package/oda/components/editors/code-editor/src/ext-keybinding_menu.js +7 -7
  307. package/oda/components/editors/code-editor/src/ext-language_tools.js +7 -7
  308. package/oda/components/editors/code-editor/src/ext-linking.js +7 -7
  309. package/oda/components/editors/code-editor/src/ext-modelist.js +7 -7
  310. package/oda/components/editors/code-editor/src/ext-options.js +7 -7
  311. package/oda/components/editors/code-editor/src/ext-prompt.js +7 -7
  312. package/oda/components/editors/code-editor/src/ext-rtl.js +7 -7
  313. package/oda/components/editors/code-editor/src/ext-searchbox.js +7 -7
  314. package/oda/components/editors/code-editor/src/ext-settings_menu.js +7 -7
  315. package/oda/components/editors/code-editor/src/ext-spellcheck.js +7 -7
  316. package/oda/components/editors/code-editor/src/ext-split.js +7 -7
  317. package/oda/components/editors/code-editor/src/ext-static_highlight.js +7 -7
  318. package/oda/components/editors/code-editor/src/ext-statusbar.js +7 -7
  319. package/oda/components/editors/code-editor/src/ext-textarea.js +7 -7
  320. package/oda/components/editors/code-editor/src/ext-themelist.js +7 -7
  321. package/oda/components/editors/code-editor/src/ext-whitespace.js +7 -7
  322. package/oda/components/editors/code-editor/src/keybinding-emacs.js +7 -7
  323. package/oda/components/editors/code-editor/src/keybinding-sublime.js +7 -7
  324. package/oda/components/editors/code-editor/src/keybinding-vim.js +7 -7
  325. package/oda/components/editors/code-editor/src/keybinding-vscode.js +7 -7
  326. package/oda/components/editors/code-editor/src/mode-css.js +7 -7
  327. package/oda/components/editors/code-editor/src/mode-html.js +7 -7
  328. package/oda/components/editors/code-editor/src/mode-javascript.js +7 -7
  329. package/oda/components/editors/code-editor/src/mode-json.js +7 -7
  330. package/oda/components/editors/code-editor/src/mode-markdown.js +7 -7
  331. package/oda/components/editors/code-editor/src/mode-svg.js +7 -7
  332. package/oda/components/editors/code-editor/src/mode-text.js +7 -7
  333. package/oda/components/editors/code-editor/src/mode-xml.js +7 -7
  334. package/oda/components/editors/code-editor/src/mode-xquery.js +7 -7
  335. package/oda/components/editors/code-editor/src/snippets/css.js +7 -7
  336. package/oda/components/editors/code-editor/src/snippets/html.js +7 -7
  337. package/oda/components/editors/code-editor/src/snippets/javascript.js +7 -7
  338. package/oda/components/editors/code-editor/src/snippets/json.js +7 -7
  339. package/oda/components/editors/code-editor/src/snippets/markdown.js +7 -7
  340. package/oda/components/editors/code-editor/src/snippets/svg.js +7 -7
  341. package/oda/components/editors/code-editor/src/snippets/text.js +7 -7
  342. package/oda/components/editors/code-editor/src/snippets/xml.js +7 -7
  343. package/oda/components/editors/code-editor/src/snippets/xquery.js +7 -7
  344. package/oda/components/editors/code-editor/src/theme-solarized_dark.js +7 -7
  345. package/oda/components/editors/code-editor/src/theme-solarized_light.js +7 -7
  346. package/oda/components/editors/markdown/markdown-editor/lib/font-awesome.min.css +3 -3
  347. package/oda/components/editors/markdown/markdown-editor/lib/readme.md +332 -332
  348. package/oda/components/editors/markdown/markdown-editor/markdown-editor.js +78 -78
  349. package/oda/components/editors/markdown/markdown-viewer/test.md +239 -239
  350. package/oda/components/editors/markdown/markdown.js +76 -76
  351. package/oda/components/inputs/block/readme.md +39 -39
  352. package/oda/components/inputs/checkbox/checkbox.js +92 -92
  353. package/oda/components/inputs/color/color.js +83 -83
  354. package/oda/components/inputs/date/date.js +40 -40
  355. package/oda/components/inputs/input/input.js +219 -219
  356. package/oda/components/inputs/link/link.js +1 -1
  357. package/oda/components/inputs/link/readme.md +42 -42
  358. package/oda/components/inputs/markdown-input/markdown-input.js +77 -77
  359. package/oda/components/inputs/numeric/numeric.js +141 -141
  360. package/oda/components/inputs/table-input/readme.md +39 -39
  361. package/oda/components/inputs/text/text.js +88 -88
  362. package/oda/components/inputs/toggle/toggle.js +101 -101
  363. package/oda/components/layouts/hexagon-layout/hexagon-layout.js +218 -218
  364. package/oda/components/menus/menu/index_old.html +140 -140
  365. package/oda/components/structure/controls-map.js +56 -56
  366. package/oda/components/structure/controls.js +29 -29
  367. package/oda/components/structure/readme.md +31 -31
  368. package/oda/components/structure/structure.js +64 -64
  369. package/oda/components/table/index.html +210 -210
  370. package/oda/components/table/lib/coerce.js +68 -68
  371. package/oda/components/table/lib/column.js +568 -568
  372. package/oda/components/table/readme.md +120 -120
  373. package/oda/components/table/router.js +86 -86
  374. package/oda/components/table/settings.js +89 -89
  375. package/oda/index.html +159 -159
  376. package/oda/tools/icons/icons-set/icons-set.js +60 -60
  377. package/oda/tools/icons/lib/svg/_makeSVG.html +41 -41
  378. package/oda/tools/icons/lib/svg/aws.svg +2679 -2679
  379. package/oda/tools/icons/lib/svg/info.json +46 -46
  380. package/oda/tools/jupyter/demo.ipynb +160 -160
  381. package/oda/tools/jupyter/lib/print_elements.js +73 -73
  382. package/oda/tools/jupyter/test-2.ipynb +305 -305
  383. package/oda/tools/jupyter/test.ipynb +603 -603
  384. package/oda/tools/styles/adoptedStyleSheets.js +333 -333
  385. package/oda/tools/tester/device-preview/devices.json +9 -9
  386. package/package.json +1 -1
  387. package/rules/rules.md +445 -445
  388. package/scripts/SYNC-README.md +107 -107
  389. package/scripts/agent-eval.mjs +223 -223
  390. package/scripts/check-architecture.mjs +25 -16
  391. package/scripts/check-ignored-code.mjs +4 -4
  392. package/scripts/demo-seed.mjs +7 -7
  393. package/scripts/dump-svn-chat.mjs +9 -9
  394. package/scripts/extract-chat-day.mjs +21 -21
  395. package/scripts/import-bis.mjs +133 -133
  396. package/scripts/import-delovaya.mjs +94 -94
  397. package/scripts/migrate-tree.mjs +454 -0
  398. package/scripts/rag-bench.mjs +166 -166
  399. package/scripts/restore-chat.mjs +166 -166
  400. package/scripts/sync-svn-git.bat +129 -129
  401. package/scripts/test-merge.mjs +75 -75
  402. package/scripts/work-desktop-bridge.mjs +101 -101
  403. package/sources/client/class.js +3 -0
  404. package/sources/client/field.js +168 -168
  405. package/sources/client/handler.js +68 -32
  406. package/sources/client/index.js +32 -32
  407. package/sources/client/readme.md +16 -16
  408. package/sources/client.js +12 -0
  409. package/sources/core.js +91 -91
  410. package/sources/data/api.js +5 -5
  411. package/sources/data/choices.js +125 -125
  412. package/sources/data/classes.js +3 -3
  413. package/sources/data/db.js +5 -6
  414. package/sources/data/print.js +2 -2
  415. package/sources/data/schema.js +5 -5
  416. package/sources/data/sql-inspector.js +8 -8
  417. package/sources/host/auto-updater.js +6 -10
  418. package/sources/host/babel-merge.js +398 -353
  419. package/sources/host/config.js +48 -48
  420. package/sources/host/index-db.js +94 -94
  421. package/sources/host/net-guard.js +228 -228
  422. package/sources/host/package-install.js +63 -63
  423. package/sources/host/push.js +86 -86
  424. package/sources/host/readme.md +41 -41
  425. package/sources/host/secret-box.js +93 -93
  426. package/sources/host/server-id.js +26 -26
  427. package/sources/host/stun.js +33 -33
  428. package/sources/host/tls-ca.js +60 -60
  429. package/sources/host/vapid.js +14 -14
  430. package/sources/host/watch.js +1 -1
  431. package/sources/index.html +1 -1
  432. package/sources/modules/a2a/server.js +608 -608
  433. package/sources/modules/agent/connections.js +442 -442
  434. package/sources/modules/agent/diff.js +69 -69
  435. package/sources/modules/agent/eval.js +222 -222
  436. package/sources/modules/agent/extensions.js +57 -30
  437. package/sources/modules/agent/hooks.js +131 -131
  438. package/sources/modules/agent/index.js +14 -11
  439. package/sources/modules/agent/log.js +43 -43
  440. package/sources/modules/agent/loop.js +65 -0
  441. package/sources/modules/agent/mcp-pool.js +253 -253
  442. package/sources/modules/agent/node-rules.js +100 -51
  443. package/sources/modules/agent/permissions.js +1 -1
  444. package/sources/modules/agent/plugins.js +4 -3
  445. package/sources/modules/agent/recovery.js +89 -89
  446. package/sources/modules/agent/scope.js +387 -0
  447. package/sources/modules/agent/session.js +350 -15
  448. package/sources/modules/agent/taint.js +100 -100
  449. package/sources/modules/agent/tools/branch.js +311 -311
  450. package/sources/modules/agent/tools/browser.js +254 -254
  451. package/sources/modules/agent/tools/computer.js +120 -120
  452. package/sources/modules/agent/tools/connect.js +316 -316
  453. package/sources/modules/agent/tools/dev/lsp.js +334 -334
  454. package/sources/modules/agent/tools/dev/patch.js +564 -564
  455. package/sources/modules/agent/tools/memory.js +153 -153
  456. package/sources/modules/agent/tools/meta.js +61 -1
  457. package/sources/modules/agent/tools/os-files.js +358 -358
  458. package/sources/modules/agent/tools/plugins.js +80 -80
  459. package/sources/modules/agent/tools/sandbox.js +268 -268
  460. package/sources/modules/agent/tools/services.js +8 -2
  461. package/sources/modules/agent/tools/work/access.js +5 -5
  462. package/sources/modules/agent/tools/work/classes.js +24 -8
  463. package/sources/modules/agent/tools/work/common.js +6 -6
  464. package/sources/modules/agent/tools/work/data.js +2 -2
  465. package/sources/modules/agent/triggers.js +2 -2
  466. package/sources/modules/agent/twin-bus.js +5 -5
  467. package/sources/modules/agent/types.d.ts +183 -183
  468. package/sources/modules/agent/undo.js +254 -254
  469. package/sources/modules/agent/util.js +179 -179
  470. package/sources/modules/agent/voice.js +9 -9
  471. package/sources/modules/contacts/contacts.js +200 -200
  472. package/sources/modules/contacts/index.html +546 -546
  473. package/sources/modules/kladr/index.js +4 -5
  474. package/sources/modules/lan/discovery.js +192 -192
  475. package/sources/modules/lan/store.js +62 -62
  476. package/sources/modules/license/index.js +5 -5
  477. package/sources/modules/mcp/readme.md +70 -70
  478. package/sources/modules/mcp/server.js +525 -525
  479. package/sources/modules/mcp/tokens.js +140 -140
  480. package/sources/modules/nodes/identity.js +123 -123
  481. package/sources/modules/nodes/outbound.js +105 -105
  482. package/sources/modules/nodes/signing.js +71 -71
  483. package/sources/modules/notify/index.js +12 -12
  484. package/sources/modules/rag/embed-worker.js +36 -36
  485. package/sources/modules/rag/embedder.js +3 -3
  486. package/sources/modules/rag/indexer.js +1 -1
  487. package/sources/modules/rag/readme.md +70 -70
  488. package/sources/modules/rag/scope.js +3 -3
  489. package/sources/modules/rag/search.js +1 -1
  490. package/sources/modules/readme.md +21 -21
  491. package/sources/modules/sandbox/config.js +74 -74
  492. package/sources/modules/sandbox/driver.js +100 -100
  493. package/sources/modules/sandbox/images/work-computer/Dockerfile +34 -34
  494. package/sources/modules/sandbox/images/work-computer/entrypoint.sh +24 -24
  495. package/sources/modules/sandbox/manager.js +1089 -1089
  496. package/sources/modules/sandbox/readme.md +63 -63
  497. package/sources/modules/sandbox/vnc-proxy.js +296 -296
  498. package/sources/modules/trainer/dataset.js +8 -8
  499. package/sources/modules/trainer/halogen.js +37 -37
  500. package/sources/modules/trainer/huggingface.js +13 -13
  501. package/sources/modules/trainer/index.js +44 -39
  502. package/sources/modules/trainer/local-engine.js +9 -9
  503. package/sources/modules/trainer/paths.js +9 -2
  504. package/sources/modules/trainer/providers.js +126 -78
  505. package/sources/modules/trainer/runner.js +10 -10
  506. package/sources/modules/trainer/transfer.js +8 -8
  507. package/sources/server/access/audit.js +138 -138
  508. package/sources/server/access/gateway.js +1 -1
  509. package/sources/server/access/links.js +4 -4
  510. package/sources/server/access/refs.js +106 -106
  511. package/sources/server/access/workplaces.js +7 -7
  512. package/sources/server/assert-class-id.js +23 -23
  513. package/sources/server/chat-threads.js +22 -8
  514. package/sources/server/class/archive.js +7 -7
  515. package/sources/server/class/base-template.js +34 -29
  516. package/sources/server/class/distro.js +41 -33
  517. package/sources/server/class/module-status.js +380 -0
  518. package/sources/server/class/scaffold.js +2 -2
  519. package/sources/server/class/search.js +1 -1
  520. package/sources/server/class/security.js +24 -14
  521. package/sources/server/class.js +140 -124
  522. package/sources/server/external-source.js +90 -90
  523. package/sources/server/file.js +1 -1
  524. package/sources/server/folder.js +150 -44
  525. package/sources/server/handler.js +25 -12
  526. package/sources/server/index.js +12 -12
  527. package/sources/server/logs.js +5 -6
  528. package/sources/server/memory-mark.js +34 -34
  529. package/sources/server/node.js +1 -1
  530. package/sources/server/readme.md +110 -110
  531. package/sources/server/safe-node-name.js +67 -67
  532. package/sources/server/server.js +8 -6
  533. package/sources/server/upload-mark.js +24 -24
  534. package/sources/server/user.js +85 -18
  535. package/sources/server/zip-guard.js +81 -81
  536. package/whitepaper.md +568 -568
  537. package/$server/$folder/$class/$module/handlers/pages/form/system/$handler/tabs/mcp/$handler/class.js +0 -9
  538. package/$server/$folder/$class/$module/handlers/pages/form/system/$handler/tabs/mcp/$handler/mcp.js +0 -813
  539. package/$server/$folder/$class/$module/handlers/pages/form/system/$handler/tabs/modules/$handler/modules.js +0 -1
  540. package/$server/$folder/$class/$structure/$organization/$folder/$class/$data/$catalog/class.js +0 -4
  541. package/$server/$folder/$class/$structure/$organization/$folder/$class/$data/$operation/class.js +0 -4
  542. package/$server/$folder/$class/$structure/$organization/$folder/$class/$data/$register/class.js +0 -4
  543. package/$server/$folder/$class/$structure/$organization/$folder/$class/$data/$struct/class.js +0 -4
  544. package/$server/$folder/$class/$structure/$organization/$folder/$class/$domain/class.js +0 -4
  545. package/$server/$folder/$class/$structure/$organization/$folder/$class/$module/class.js +0 -4
  546. package/$server/$folder/$class/$structure/$organization/$folder/$class/$structure/$organization/class.js +0 -4
  547. package/$server/$folder/$class/$structure/$organization/class.js +0 -19
  548. package/$server/$folder/$class/$structure/$organization/icon.png +0 -0
  549. package/$server/$folder/$class/$structure/$server/handlers/pages/form/system/$handler/tabs/license/$handler/class.js +0 -6
  550. package/$server/$folder/$class/$structure/$user/handlers/pages/form/system/$handler/tabs/agent/$handler/class.js +0 -3
  551. package/$server/$folder/$class/$structure/$user/handlers/pages/form/system/$handler/tabs/messengers/$handler/class.js +0 -3
  552. package/$server/$folder/$class/$structure/$user/handlers/pages/form/system/$handler/tabs/modules/$handler/class.js +0 -3
  553. package/$server/$folder/$class/$structure/$user/handlers/pages/form/system/$handler/tabs/profile/$handler/class.js +0 -5
  554. package/$server/$folder/$class/$structure/handlers/pages/data/$handler/data.js +0 -313
  555. package/$server/$folder/$class/$structure/handlers/pages/explorer/$handler/explorer.js +0 -16
  556. package/$server/$folder/$class/$structure/handlers/pages/form/calendar/$handler/calendar.js +0 -1226
  557. package/$server/$folder/$class/$structure/handlers/pages/form/chat/$handler/chat.js +0 -2095
  558. package/$server/$folder/$class/$structure/handlers/pages/form/email/$handler/email.js +0 -1188
  559. package/$server/$folder/$class/$structure/handlers/pages/form/search/$handler/search.js +0 -289
  560. package/$server/$folder/$class/$structure/handlers/pages/form/system/$handler/tabs/agent/$handler/class.js +0 -6
  561. package/$server/$folder/$class/$structure/handlers/pages/form/system/$handler/tabs/database/$handler/class.js +0 -9
  562. package/$server/$folder/$class/$structure/handlers/pages/form/system/$handler/tabs/messengers/$handler/class.js +0 -6
  563. package/$server/$folder/$class/$structure/handlers/pages/form/system/$handler/tabs/modules/$handler/class.js +0 -5
  564. package/$server/$folder/$class/$structure/handlers/pages/form/system/$handler/tabs/modules/$handler/modules.js +0 -281
  565. package/$server/$folder/$class/$structure/handlers/pages/form/system/$handler/tabs/staff/$handler/class.js +0 -5
  566. package/$server/$folder/$class/$structure/handlers/pages/form/system/$handler/tabs/staff/$handler/staff.js +0 -2126
  567. package/$server/$folder/$class/$structure/handlers/pages/site/$handler/site.js +0 -240
  568. package/$server/$folder/$class/handlers/pages/form/object/$handler/class.js +0 -32
  569. package/$server/$folder/$class/handlers/pages/form/object/$handler/object.js +0 -1371
  570. package/$server/$folder/$class/handlers/pages/form/objects/$handler/class.js +0 -32
  571. package/$server/$folder/$class/handlers/pages/form/objects/$handler/objects.js +0 -2130
  572. package/$server/$folder/$class/handlers/pages/form/system/$handler/system.js +0 -309
  573. package/$server/$folder/$class/handlers/pages/form/system/$handler/tabs/files/$handler/files.js +0 -17
  574. package/$server/$folder/$class/handlers/pages/form/system/$handler/tabs/requisites/$handler/class.js +0 -16
  575. package/$server/$folder/$class/handlers/pages/storage/$handler/storage.js +0 -21
  576. package/$server/$folder/$file/$data/handlers/pages/form/editor/$handler/editor.js +0 -27
  577. package/$server/$folder/$file/$devs/handlers/pages/form/file/$handler/file.js +0 -31
  578. package/$server/$folder/$file/$ics/handlers/pages/form/file/$handler/file.js +0 -10
  579. package/$server/$folder/$file/$ipynb/handlers/pages/form/file/$handler/file.js +0 -72
  580. package/$server/$folder/$file/$md/handlers/pages/form/file/$handler/file.js +0 -63
  581. package/$server/$folder/$file/$office/handlers/pages/form/file/$handler/file.js +0 -1845
  582. package/$server/$folder/$file/$task/handlers/pages/form/file/$handler/file.js +0 -760
  583. package/$server/$folder/$file/handlers/pages/form/file/$handler/file.js +0 -29
  584. package/$server/$folder/handlers/pages/form/$handler/form.js +0 -2122
  585. package/MODULES/$domain/handlers/pages/form/system/$handler/tabs/mcp/$handler/class.js +0 -6
  586. package/MODULES/$domain/handlers/pages/form/system/$handler/tabs/mcp/$handler/mcp.js +0 -1
  587. package/MODULES/Geo//320/232/320/260/321/200/321/202/320/260/$catalog/handlers/pages/form/map/$handler/class.js +0 -24
  588. package/MODULES/KLADR/$module/handlers/pages/form/kladr/$handler/class.js +0 -7
  589. package/MODULES/Marketplaces/$domain/class.js +0 -9
  590. package/MODULES/Process//320/227/320/260/320/264/320/260/321/207/320/270 /320/270 /321/215/321/202/320/260/320/277/321/213/$catalog/handlers/pages/form/gantt/$handler/class.js" +0 -6
  591. package/MODULES/Process//320/227/320/260/320/264/320/260/321/207/320/270 /320/270 /321/215/321/202/320/260/320/277/321/213/$catalog/handlers/pages/form/scheduler/$handler/class.js" +0 -6
  592. package/MODULES/Process//320/241/321/205/320/265/320/274/321/213 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/320/276/320/262/$catalog/handlers/pages/form/bpmn/$handler/class.js" +0 -18
  593. package/MODULES/Register/CATALOGS/$catalog/$folder/$class/$data/$catalog/$virtual/handlers/pages/form/virtual/$handler/class.js +0 -5
  594. package/MODULES/Register/OPERATIONS//320/224/320/276/321/201/321/202/320/260/320/262/320/272/320/260/$operation/class.js +0 -22
  595. package/MODULES/Register/OPERATIONS//320/232/320/260/320/264/321/200/321/213//320/222/320/265/321/200/320/275/321/203/321/202/321/214 /320/270/320/267 /320/276/321/202/320/277/321/203/321/201/320/272/320/260/$operation/class.js" +0 -14
  596. package/MODULES/Register/OPERATIONS//320/232/320/260/320/264/321/200/321/213//320/236/321/202/320/277/321/200/320/260/320/262/320/270/321/202/321/214 /320/262 /320/276/321/202/320/277/321/203/321/201/320/272/$operation/class.js" +0 -15
  597. package/MODULES/Register/OPERATIONS//320/232/320/260/320/264/321/200/321/213//320/243/320/262/320/276/320/273/321/214/320/275/320/265/320/275/320/270/320/265/$operation/class.js +0 -14
  598. package/MODULES/Register/OPERATIONS//320/232/320/260/321/201/321/201/320/260//320/220/320/262/320/260/320/275/321/201/320/276/320/262/321/213/320/271 /320/276/321/202/321/207/321/221/321/202/$operation/class.js" +0 -17
  599. package/MODULES/Register/OPERATIONS//320/232/320/260/321/201/321/201/320/260//320/237/320/232/320/236/$operation/class.js +0 -18
  600. package/MODULES/Register/OPERATIONS//320/232/320/260/321/201/321/201/320/260//320/240/320/232/320/236/$operation/class.js +0 -17
  601. package/MODULES/Register/OPERATIONS//320/236/321/201/320/275/320/276/320/262/320/275/321/213/320/265 /321/201/321/200/320/265/320/264/321/201/321/202/320/262/320/260//320/237/320/276/321/201/321/202/321/203/320/277/320/273/320/265/320/275/320/270/320/265 /320/236/320/241/$operation/class.js" +0 -30
  602. package/MODULES/Register/OPERATIONS//320/237/320/273/320/260/321/202/320/265/320/266/320/270 /321/201 /321/200/320/260/321/201/321/207/321/221/321/202/320/275/320/276/320/263/320/276 /321/201/321/207/321/221/321/202/320/260//320/227/320/260/321/200/320/277/320/273/320/260/321/202/320/260/$operation/class.js" +0 -8
  603. package/MODULES/Register/OPERATIONS//320/237/320/273/320/260/321/202/320/265/320/266/320/270 /321/201 /321/200/320/260/321/201/321/207/321/221/321/202/320/275/320/276/320/263/320/276 /321/201/321/207/321/221/321/202/320/260//320/237/320/276/321/201/321/202/320/260/320/262/321/211/320/270/320/272/321/203/$operation/class.js" +0 -11
  604. package/MODULES/Register/OPERATIONS//320/237/320/276/321/201/321/202/321/203/320/277/320/273/320/265/320/275/320/270/321/217 /320/275/320/260 /321/200/320/260/321/201/321/207/321/221/321/202/320/275/321/213/320/271 /321/201/321/207/321/221/321/202//320/222/320/276/320/267/320/262/321/200/320/260/321/202 /320/276/321/202 /320/277/320/276/321/201/321/202/320/260/320/262/321/211/320/270/320/272/320/260/$operation/class.js" +0 -11
  605. package/MODULES/Register/OPERATIONS//320/237/320/276/321/201/321/202/321/203/320/277/320/273/320/265/320/275/320/270/321/217 /320/275/320/260 /321/200/320/260/321/201/321/207/321/221/321/202/320/275/321/213/320/271 /321/201/321/207/321/221/321/202//320/236/321/202 /320/277/320/276/320/272/321/203/320/277/320/260/321/202/320/265/320/273/321/217/$operation/class.js" +0 -11
  606. package/MODULES/Register/OPERATIONS//320/240/320/265/320/260/320/273/320/270/320/267/320/260/321/206/320/270/321/217//320/222/320/276/320/267/320/262/321/200/320/260/321/202 /320/276/321/202 /320/277/320/276/320/272/321/203/320/277/320/260/321/202/320/265/320/273/321/217/$operation/class.js" +0 -32
  607. package/MODULES/Register/OPERATIONS//320/240/320/265/320/260/320/273/320/270/320/267/320/260/321/206/320/270/321/217//320/237/320/276/320/272/321/203/320/277/320/260/321/202/320/265/320/273/321/216/$operation/class.js +0 -32
  608. package/MODULES/Register/REGISTER/$register/$folder/$class/$data/$register/$account/handlers/pages/form/analysis/$handler/class.js +0 -8
  609. package/MODULES/Register/REGISTER/$register/$folder/$class/$data/$register/$account/handlers/pages/form/postings/$handler/class.js +0 -8
  610. package/MODULES/Register/REGISTER/$register/$folder/$class/$data/$register/$account/handlers/pages/form/turnovers/$handler/class.js +0 -8
  611. package/MODULES/Register/REGISTER/$register/handlers/pages/form/journal/$handler/class.js +0 -5
  612. package/MODULES/Register/REGISTER/$register/handlers/pages/form/sheet/$handler/class.js +0 -5
  613. package/MODULES/Register/REGISTER/$register/handlers/pages/form/sheet/$handler/sheet.js +0 -808
  614. package/NODES/$node/handlers/pages/form/network/$handler/network.js +0 -110
  615. package/ORGANIZATIONS/$domain/$folder/$class/$structure/$organization/class.js +0 -5
  616. package/ORGANIZATIONS/$domain/class.js +0 -5
  617. package/ORGANIZATIONS/$domain/readme.md +0 -10
  618. package/models/$ai/$folder/$class/$ai/handlers/pages/form/system/$handler/tabs/ai/$handler/class.js +0 -6
  619. package/models/$ai/$folder/$class/$provider/handlers/pages/form/system/$handler/tabs/ai/$handler/class.js +0 -6
  620. package/models/$ai/$folder/$class/$provider/readme.md +0 -16
  621. package/models/$ai/class.js +0 -169
  622. package/models/$ai/handlers/pages/form/system/$handler/tabs/ai/$handler/ai.js +0 -167
  623. package/models/$ai/handlers/pages/form/system/$handler/tabs/ai/$handler/class.js +0 -6
  624. package/models/$ai/readme.md +0 -62
  625. package/models/Local/$provider/handlers/methods/transfer/$handler/class.js +0 -41
  626. package/models/Local/$provider/handlers/pages/form/system/$handler/tabs/ai/$handler/ai.js +0 -1453
  627. package/models/Local/$provider/handlers/pages/form/system/$handler/tabs/ai/$handler/class.js +0 -6
  628. /package/{models/$ai → $server}/$folder/$class/$ai/methods/chat/$method/class.js +0 -0
  629. /package/$server/$folder/$class/$structure/{$organization/handlers/pages/form/system/$handler/tabs → $project/handlers/pages/form/system}/requisites/$handler/class.js +0 -0
  630. /package/$server/$folder/$class/$structure/$server/handlers/pages/form/system/{$handler/tabs/database → database}/$handler/class.js +0 -0
  631. /package/MODULES/{CBR/$module/class.js → /320/224/320/260/320/275/320/275/321/213/320/265/CBR/$module/class.js"} +0 -0
  632. /package/MODULES/{Geo/$module/class.js → /320/224/320/260/320/275/320/275/321/213/320/265/Geo/$module/class.js"} +0 -0
  633. /package/MODULES/{Geo → /320/224/320/260/320/275/320/275/321/213/320/265/Geo}//320/232/320/276/320/276/321/200/320/264/320/270/320/275/320/260/321/202/321/213/$struct/class.js" +0 -0
  634. /package/MODULES/{Geo → /320/224/320/260/320/275/320/275/321/213/320/265/Geo}//320/250/320/265/320/271/320/277/$struct/class.js" +0 -0
  635. /package/MODULES/{KLADR/$module/$folder/$class/$data/$catalog/class.js → /320/224/320/260/320/275/320/275/321/213/320/265/KLADR/$module/$folder/$class/$data/$catalog/class.js"} +0 -0
  636. /package/MODULES/{KLADR/$module/class.js → /320/224/320/260/320/275/320/275/321/213/320/265/KLADR/$module/class.js"} +0 -0
  637. /package/MODULES/{KLADR/$module/readme.md → /320/224/320/260/320/275/320/275/321/213/320/265/KLADR/$module/readme.md"} +0 -0
  638. /package/MODULES/{KLADR → /320/224/320/260/320/275/320/275/321/213/320/265/KLADR}//320/237/320/276/320/264/321/200/320/260/320/267/320/264/320/265/320/273/320/265/320/275/320/270/321/217 /320/234/320/222/320/224/$catalog/class.js" +0 -0
  639. /package/MODULES/{KLADR → /320/224/320/260/320/275/320/275/321/213/320/265/KLADR}//320/240/320/265/320/263/320/270/320/276/320/275/321/213/$catalog/class.js" +0 -0
  640. /package/MODULES/{RuCalendar/$module/class.js → /320/224/320/260/320/275/320/275/321/213/320/265/RuCalendar/$module/class.js"} +0 -0
  641. /package/MODULES/{Weather/$module/class.js → /320/224/320/260/320/275/320/275/321/213/320/265/Weather/$module/class.js"} +0 -0
  642. /package/MODULES/{2GIS/$module/class.js → /320/232/320/276/320/275/320/275/320/265/320/272/321/202/320/276/321/200/321/213/2GIS/$mcp/class.js"} +0 -0
  643. /package/MODULES/{2GIS/$module/readme.md → /320/232/320/276/320/275/320/275/320/265/320/272/321/202/320/276/321/200/321/213/2GIS/$mcp/readme.md"} +0 -0
  644. /package/MODULES/{Telegram/$module/class.js → /320/232/320/276/320/275/320/275/320/265/320/272/321/202/320/276/321/200/321/213/Telegram/$module/class.js"} +0 -0
  645. /package/{models/GigaChat/$provider/$folder/$class/$ai/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/GigaChat/$provider/$folder/$class/$ai/class.js"} +0 -0
  646. /package/{models/GigaChat/$provider/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/GigaChat/$provider/class.js"} +0 -0
  647. /package/{models/GigaChat/GigaChat 2 Lite/$ai/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/GigaChat/GigaChat 2 Lite/$ai/class.js"} +0 -0
  648. /package/{models/GigaChat/GigaChat 2 Max/$ai/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/GigaChat/GigaChat 2 Max/$ai/class.js"} +0 -0
  649. /package/{models/GigaChat/GigaChat 2 Pro/$ai/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/GigaChat/GigaChat 2 Pro/$ai/class.js"} +0 -0
  650. /package/{models/GigaChat/GigaChat Embeddings/$ai/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/GigaChat/GigaChat Embeddings/$ai/class.js"} +0 -0
  651. /package/{models/MTS-AI/$provider/$folder/$class/$ai/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/MTS-AI/$provider/$folder/$class/$ai/class.js"} +0 -0
  652. /package/{models/MTS-AI/$provider/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/MTS-AI/$provider/class.js"} +0 -0
  653. /package/{models/MTS-AI/Cotype Lite/$ai/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/MTS-AI/Cotype Lite/$ai/class.js"} +0 -0
  654. /package/{models/MTS-AI/Cotype Pro 2/$ai/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/MTS-AI/Cotype Pro 2/$ai/class.js"} +0 -0
  655. /package/{models/MTS-AI/Cotype Vision/$ai/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/MTS-AI/Cotype Vision/$ai/class.js"} +0 -0
  656. /package/{models/T-Bank/$provider/$folder/$class/$ai/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/T-Bank/$provider/$folder/$class/$ai/class.js"} +0 -0
  657. /package/{models/T-Bank/$provider/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/T-Bank/$provider/class.js"} +0 -0
  658. /package/{models/T-Bank/T-Lite 2.0/$ai/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/T-Bank/T-Lite 2.0/$ai/class.js"} +0 -0
  659. /package/{models/T-Bank/T-Pro 2.0/$ai/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/T-Bank/T-Pro 2.0/$ai/class.js"} +0 -0
  660. /package/{models/T-Bank/T-VoiceKit ASR/$ai/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/T-Bank/T-VoiceKit ASR/$ai/class.js"} +0 -0
  661. /package/{models/T-Bank/T-VoiceKit TTS/$ai/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/T-Bank/T-VoiceKit TTS/$ai/class.js"} +0 -0
  662. /package/{models/Yandex/$provider/$folder/$class/$ai/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/Yandex/$provider/$folder/$class/$ai/class.js"} +0 -0
  663. /package/{models/Yandex/$provider/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/Yandex/$provider/class.js"} +0 -0
  664. /package/{models/Yandex/Alice AI (YandexGPT 5 Pro)/$ai/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/Yandex/Alice AI (YandexGPT 5 Pro)/$ai/class.js"} +0 -0
  665. /package/{models/Yandex/Yandex Embeddings/$ai/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/Yandex/Yandex Embeddings/$ai/class.js"} +0 -0
  666. /package/{models/Yandex/Yandex SpeechKit ASR/$ai/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/Yandex/Yandex SpeechKit ASR/$ai/class.js"} +0 -0
  667. /package/{models/Yandex/Yandex SpeechKit TTS/$ai/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/Yandex/Yandex SpeechKit TTS/$ai/class.js"} +0 -0
  668. /package/{models/Yandex/YandexART/$ai/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/Yandex/YandexART/$ai/class.js"} +0 -0
  669. /package/{models/Yandex/YandexGPT 5 Lite/$ai/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/Yandex/YandexGPT 5 Lite/$ai/class.js"} +0 -0
  670. /package/{models/Yandex/YandexGPT Reasoning/$ai/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/Yandex/YandexGPT Reasoning/$ai/class.js"} +0 -0
  671. /package/MODULES/{DuckDuckGo/$module/class.js → /320/237/320/276/320/270/321/201/320/272/DuckDuckGo/$module/class.js"} +0 -0
  672. /package/MODULES/{SearXNG/$module/class.js → /320/237/320/276/320/270/321/201/320/272/SearXNG/$module/class.js"} +0 -0
  673. /package/MODULES/{Yandex/$module/class.js → /320/237/320/276/320/270/321/201/320/272/Yandex/$module/class.js"} +0 -0
  674. /package/MODULES/{Process/$module/$folder/$class/$data/$catalog/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Process/$module/$folder/$class/$data/$catalog/class.js"} +0 -0
  675. /package/MODULES/{Process/$module/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Process/$module/class.js"} +0 -0
  676. /package/MODULES/{Process → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Process}//320/241/321/205/320/265/320/274/321/213 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/320/276/320/262/$catalog/class.js" +0 -0
  677. /package/MODULES/{Register/$module/$folder/$class/$data/$catalog/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/$module/$folder/$class/$data/$catalog/class.js"} +0 -0
  678. /package/MODULES/{Register/$module/$folder/$class/$data/$operation/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/$module/$folder/$class/$data/$operation/class.js"} +0 -0
  679. /package/MODULES/{Register/$module/$folder/$class/$data/$register/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/$module/$folder/$class/$data/$register/class.js"} +0 -0
  680. /package/MODULES/{Register/$module/$folder/$class/$data/$struct/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/$module/$folder/$class/$data/$struct/class.js"} +0 -0
  681. /package/MODULES/{Register/$module/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/$module/class.js"} +0 -0
  682. /package/MODULES/{Register/$module/readme.md → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/$module/readme.md"} +0 -0
  683. /package/MODULES/{Register/CATALOGS/$catalog/$folder/$class/$data/$catalog/$virtual/$folder/$class/$data/$catalog/$virtual/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/CATALOGS/$catalog/$folder/$class/$data/$catalog/$virtual/$folder/$class/$data/$catalog/$virtual/class.js"} +0 -0
  684. /package/MODULES/{Register/CATALOGS/$catalog/$folder/$class/$data/$catalog/$virtual/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/CATALOGS/$catalog/$folder/$class/$data/$catalog/$virtual/class.js"} +0 -0
  685. /package/MODULES/{Register/CATALOGS/$catalog/$folder/$class/$data/$catalog/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/CATALOGS/$catalog/$folder/$class/$data/$catalog/class.js"} +0 -0
  686. /package/MODULES/{Register/CATALOGS/$catalog/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/CATALOGS/$catalog/class.js"} +0 -0
  687. /package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/CATALOGS//320/222/320/270/320/264/321/213 /320/275/320/276/321/200/320/274/320/260/321/202/320/270/320/262/320/276/320/262/$catalog/class.js" +0 -0
  688. /package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/CATALOGS//320/224/320/276/320/273/320/266/320/275/320/276/321/201/321/202/320/270/$catalog/class.js" +0 -0
  689. /package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/CATALOGS//320/241/320/276/321/202/321/200/321/203/320/264/320/275/320/270/320/272/320/270/$virtual/class.js" +0 -0
  690. /package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/CATALOGS//320/241/321/203/320/261/321/212/320/265/320/272/321/202/321/213/$catalog/class.js" +0 -0
  691. /package/MODULES/{Register/OPERATIONS/$operation/$folder/$class/$data/$operation/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS/$operation/$folder/$class/$data/$operation/class.js"} +0 -0
  692. /package/MODULES/{Register/OPERATIONS/$operation/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS/$operation/class.js"} +0 -0
  693. /package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/232/320/260/320/264/321/200/321/213/$operation/class.js" +0 -0
  694. /package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/232/320/260/321/201/321/201/320/260/$operation/$folder/$class/$data/$operation/class.js" +0 -0
  695. /package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/232/320/260/321/201/321/201/320/260/$operation/class.js" +0 -0
  696. /package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/232/320/276/320/274/320/274/321/203/320/275/320/270/320/272/320/260/321/206/320/270/320/270/$operation/class.js" +0 -0
  697. /package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/236/321/201/320/275/320/276/320/262/320/275/321/213/320/265 /321/201/321/200/320/265/320/264/321/201/321/202/320/262/320/260/$operation/class.js" +0 -0
  698. /package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/237/320/273/320/260/321/202/320/265/320/266/320/270 /321/201 /321/200/320/260/321/201/321/207/321/221/321/202/320/275/320/276/320/263/320/276 /321/201/321/207/321/221/321/202/320/260/$operation/$folder/$class/$data/$operation/print//320/237/320/273/320/260/321/202/321/221/320/266/320/275/320/276/320/265 /320/277/320/276/321/200/321/203/321/207/320/265/320/275/320/270/320/265.html" +0 -0
  699. /package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/237/320/273/320/260/321/202/320/265/320/266/320/270 /321/201 /321/200/320/260/321/201/321/207/321/221/321/202/320/275/320/276/320/263/320/276 /321/201/321/207/321/221/321/202/320/260/$operation/class.js" +0 -0
  700. /package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/237/320/276/321/201/321/202/321/203/320/277/320/273/320/265/320/275/320/270/321/217 /320/275/320/260 /321/200/320/260/321/201/321/207/321/221/321/202/320/275/321/213/320/271 /321/201/321/207/321/221/321/202/$operation/class.js" +0 -0
  701. /package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/237/321/200/320/276/320/270/320/267/320/262/320/276/320/264/321/201/321/202/320/262/320/276/$operation/class.js" +0 -0
  702. /package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/240/320/265/320/260/320/273/320/270/320/267/320/260/321/206/320/270/321/217/$operation/class.js" +0 -0
  703. /package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/244/320/270/320/275/320/260/320/275/321/201/320/276/320/262/321/213/320/271 /321/200/320/265/320/267/321/203/320/273/321/214/321/202/320/260/321/202/$operation/class.js" +0 -0
  704. /package/MODULES/{Register/REGISTER/$register/$folder/$class/$data/$register/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/$register/$folder/$class/$data/$register/$account/class.js"} +0 -0
  705. /package/MODULES/{Register/REGISTER/$register/$folder/$class/$data/$register/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/$register/$folder/$class/$data/$register/class.js"} +0 -0
  706. /package/MODULES/{Register/REGISTER/$register/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/$register/class.js"} +0 -0
  707. /package/MODULES/{Register/REGISTER/10/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/10/$account/class.js"} +0 -0
  708. /package/MODULES/{Register/REGISTER/19/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/19/$account/class.js"} +0 -0
  709. /package/MODULES/{Register/REGISTER/20/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/20/$account/class.js"} +0 -0
  710. /package/MODULES/{Register/REGISTER/26/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/26/$account/class.js"} +0 -0
  711. /package/MODULES/{Register/REGISTER/50/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/50/$account/class.js"} +0 -0
  712. /package/MODULES/{Register/REGISTER/51/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/51/$account/class.js"} +0 -0
  713. /package/MODULES/{Register/REGISTER/55/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/55/$account/class.js"} +0 -0
  714. /package/MODULES/{Register/REGISTER/58/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/58/$account/class.js"} +0 -0
  715. /package/MODULES/{Register/REGISTER/66/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/66/$account/class.js"} +0 -0
  716. /package/MODULES/{Register/REGISTER/67/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/67/$account/class.js"} +0 -0
  717. /package/MODULES/{Register/REGISTER/68/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/68/$account/class.js"} +0 -0
  718. /package/MODULES/{Register/REGISTER/68/04/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/68/04/$account/class.js"} +0 -0
  719. /package/MODULES/{Register/REGISTER/69/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/69/$account/class.js"} +0 -0
  720. /package/MODULES/{Register/REGISTER/75/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/75/$account/class.js"} +0 -0
  721. /package/MODULES/{Register/REGISTER/80/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/80/$account/class.js"} +0 -0
  722. /package/MODULES/{Register/REGISTER/84/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/84/$account/class.js"} +0 -0
  723. /package/MODULES/{Register/REGISTER/90/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/90/$account/class.js"} +0 -0
  724. /package/MODULES/{Register/REGISTER/90/09/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/90/09/$account/class.js"} +0 -0
  725. /package/MODULES/{Register/REGISTER/99/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/99/$account/class.js"} +0 -0
  726. /package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/REGISTER//320/232/320/260/320/264/321/200/321/213/$account/class.js" +0 -0
  727. /package/MODULES/{Register/STRUCTS/$struct/$folder/$class/$data/$struct/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/STRUCTS/$struct/$folder/$class/$data/$struct/class.js"} +0 -0
  728. /package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/STRUCTS//320/220/320/264/321/200/320/265/321/201/$struct/class.js" +0 -0
  729. /package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/STRUCTS//320/221/320/260/320/275/320/272/320/276/320/262/321/201/320/272/320/270/320/271 /321/201/321/207/321/221/321/202/$struct/class.js" +0 -0
  730. /package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/STRUCTS//320/225/320/264/320/270/320/275/320/270/321/206/320/260 /320/270/320/267/320/274/320/265/321/200/320/265/320/275/320/270/321/217/$struct/class.js" +0 -0
  731. /package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/STRUCTS//320/244/320/230/320/236/$struct/class.js" +0 -0
  732. /package/{users → USERS}/$users/class.js +0 -0
@@ -1,5 +1,2469 @@
1
- /** Мета хендлера form. Визуалка — form.js. */
2
- export default {
3
- label: 'VIEWS',
4
- icon: 'icons:dashboard',
5
- }
1
+ export default {
2
+ label: 'Формы',
3
+ icon: 'icons:dashboard',
4
+ component: {
5
+ template: /* html */`
6
+ <style>
7
+ :host {
8
+ @apply --flex;
9
+ @apply --vertical;
10
+ overflow: hidden;
11
+ }
12
+ @media print {
13
+ :host {
14
+ overflow: visible !important;
15
+ height: auto !important;
16
+ max-height: none !important;
17
+ }
18
+ }
19
+ .save-error-icon {
20
+ anchor-name: --error-icon;
21
+ }
22
+
23
+ #error_tooltip {
24
+ position-anchor: --error-icon;
25
+ top: anchor(bottom);
26
+ left: auto;
27
+ right: anchor(left);
28
+ margin: 0;
29
+
30
+ @apply --error;
31
+ background: #333;
32
+ color: white;
33
+ padding: 8px 12px;
34
+ border-radius: 6px;
35
+ font-size: 14px;
36
+ pointer-events: none;
37
+ border: none;
38
+ }
39
+ #error_tooltip::backdrop{
40
+ pointer-events: none;
41
+ }
42
+ #tools {
43
+ gap: 8px;
44
+ flex-wrap: wrap;
45
+ overflow: visible;
46
+ align-items: center;
47
+ padding: 2px 2px 4px;
48
+ }
49
+ .form-header-inner item-node-explorer {
50
+ min-width: 0;
51
+ max-width: 100%;
52
+ flex-shrink: 1;
53
+ }
54
+ #formToolbar,
55
+ #formToolbar .toolbar-zone,
56
+ #formFooter {
57
+ flex-wrap: wrap;
58
+ min-width: 0;
59
+ }
60
+ #tools item-node {
61
+ flex-shrink: 0;
62
+ border-radius: 10px;
63
+ padding: 3px 8px;
64
+ min-height: 30px;
65
+ align-items: center;
66
+ box-sizing: border-box;
67
+ opacity: 0.86;
68
+ transition: background-color var(--duration-fast) var(--easing), box-shadow var(--duration-fast) var(--easing), opacity var(--duration-fast) var(--easing);
69
+ }
70
+ #tools item-node:not([light]):hover {
71
+ opacity: 1;
72
+ background: color-mix(in oklch, var(--accent-back) 14%, transparent);
73
+ }
74
+ #tools item-node[light] {
75
+ opacity: 1;
76
+ padding: 3px 10px;
77
+ font-weight: 700;
78
+ box-shadow: 0 2px 6px var(--shadow-color);
79
+ }
80
+ #formTabsBar[hidden],
81
+ #formToolbar[hidden],
82
+ #formFooter[hidden],
83
+ [slot="main"][hidden] {
84
+ display: none !important;
85
+ }
86
+ .obj-footer-actions {
87
+ @apply --horizontal-center;
88
+ @apply --no-flex;
89
+ gap: 6px;
90
+ }
91
+ oda-button.obj-footer-btn {
92
+ min-height: 28px;
93
+ padding: 4px 12px;
94
+ gap: 6px;
95
+ font-size: 13px;
96
+ font-weight: 500;
97
+ border-radius: var(--radius-xs, 4px);
98
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
99
+ box-sizing: border-box;
100
+ }
101
+ oda-button.obj-footer-btn:hover:not([disabled]) {
102
+ border-color: var(--accent-color);
103
+ }
104
+ oda-button.obj-footer-btn.primary {
105
+ font-weight: 700;
106
+ min-width: 72px;
107
+ }
108
+ </style>
109
+ <work-form :$item flex :view_name></work-form>
110
+ `,
111
+ view_name: {
112
+ $def: '',
113
+ $save: true
114
+ }
115
+ }
116
+ };
117
+ /**
118
+ * Универсальный рекурсивный контейнер суб-представлений (для system и любого другого
119
+ * составного $handler внутри form без собственного component).
120
+ * Поддерживает layout: 'sidebar' (вертикальное меню слева, на мобильных — горизонтально)
121
+ * и 'tabs' (вкладки сверху), визуальную группировку разделителями по полю `group`
122
+ * и сортировку по `order`.
123
+ */
124
+ ODA({
125
+ is: 'work-subview-container',
126
+ imports: 'oda//icon, oda//button',
127
+ template: /* html */`
128
+ <style>
129
+ :host {
130
+ @apply --horizontal;
131
+ @apply --flex;
132
+ overflow: hidden;
133
+ background: var(--content-background);
134
+ color: var(--content-color);
135
+ }
136
+ :host([layout="tabs"]) {
137
+ flex-direction: column;
138
+ }
139
+ .sub-nav {
140
+ @apply --vertical;
141
+ width: 224px;
142
+ flex-shrink: 0;
143
+ padding: 12px 10px;
144
+ gap: 4px;
145
+ border-right: 1px solid var(--subtle-border, var(--border-color));
146
+ background: var(--subtle-background, #f8fafc);
147
+ overflow-y: auto;
148
+ box-sizing: border-box;
149
+ }
150
+ :host([layout="tabs"]) .sub-nav {
151
+ width: 100%;
152
+ flex-direction: row;
153
+ align-items: center;
154
+ overflow-x: auto;
155
+ overflow-y: hidden;
156
+ border-right: none;
157
+ border-bottom: 1px solid var(--subtle-border, var(--border-color));
158
+ padding: 6px 10px;
159
+ gap: 6px;
160
+ }
161
+ .sub-sep {
162
+ height: 1px;
163
+ margin: 6px 8px;
164
+ background: var(--subtle-border, var(--border-color));
165
+ opacity: 0.7;
166
+ flex-shrink: 0;
167
+ }
168
+ :host([layout="tabs"]) .sub-sep {
169
+ width: 1px;
170
+ height: 22px;
171
+ margin: 0 2px;
172
+ }
173
+ .sub-btn {
174
+ @apply --horizontal;
175
+ align-items: center;
176
+ gap: 9px;
177
+ width: 100%;
178
+ padding: 8px 12px;
179
+ border-radius: 8px;
180
+ border: 1px solid transparent;
181
+ background: transparent;
182
+ color: var(--content-color);
183
+ font: inherit;
184
+ font-size: 13.5px;
185
+ font-weight: 500;
186
+ text-align: left;
187
+ cursor: pointer;
188
+ user-select: none;
189
+ transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
190
+ }
191
+ :host([layout="tabs"]) .sub-btn {
192
+ width: auto;
193
+ white-space: nowrap;
194
+ flex-shrink: 0;
195
+ padding: 7px 11px;
196
+ }
197
+ .sub-btn:hover {
198
+ background: color-mix(in srgb, var(--accent-color, #2563eb) 6%, transparent);
199
+ }
200
+ .sub-btn.active {
201
+ background: color-mix(in srgb, var(--accent-color, #2563eb) 10%, var(--content-background, #ffffff));
202
+ color: var(--accent-color, #2563eb);
203
+ border-color: color-mix(in srgb, var(--accent-color, #2563eb) 55%, transparent);
204
+ font-weight: 600;
205
+ }
206
+ .sub-body {
207
+ @apply --vertical;
208
+ @apply --flex;
209
+ min-width: 0;
210
+ min-height: 0;
211
+ overflow: hidden;
212
+ }
213
+ @media (max-width: 768px) {
214
+ :host {
215
+ flex-direction: column;
216
+ }
217
+ .sub-nav {
218
+ width: 100%;
219
+ flex-direction: row;
220
+ align-items: center;
221
+ overflow-x: auto;
222
+ overflow-y: hidden;
223
+ border-right: none;
224
+ border-bottom: 1px solid var(--subtle-border, var(--border-color));
225
+ padding: 6px 8px;
226
+ gap: 6px;
227
+ }
228
+ .sub-sep {
229
+ width: 1px;
230
+ height: 22px;
231
+ margin: 0 2px;
232
+ }
233
+ .sub-btn {
234
+ width: auto;
235
+ white-space: nowrap;
236
+ flex-shrink: 0;
237
+ padding: 7px 11px;
238
+ }
239
+ }
240
+ </style>
241
+ <nav ~if="groupedItems.length" class="sub-nav" aria-label="Разделы">
242
+ <div ~for="groupedItems" style="display:contents;">
243
+ <div ~if="$for.item.isSep" class="sub-sep"></div>
244
+ <button ~if="!$for.item.isSep" type="button" class="sub-btn"
245
+ ~class="{ active: activeId === $for.item.id }"
246
+ @tap="selectTab($for.item.id)">
247
+ <oda-icon :icon="$for.item.icon" icon-size="18"></oda-icon>
248
+ <span>{{$for.item.label}}</span>
249
+ </button>
250
+ </div>
251
+ </nav>
252
+ <div id="subBody" class="sub-body"></div>
253
+ `,
254
+ $public: {
255
+ layout: {
256
+ $def: 'sidebar',
257
+ $attr: true,
258
+ },
259
+ role: '',
260
+ subViewPath: '',
261
+ activeId: '',
262
+ depth: 0,
263
+ },
264
+ tabs: [],
265
+ _controls: null,
266
+ _mountSeq: 0,
267
+ _loadSeq: 0,
268
+ _attachedDone: false,
269
+ $handler: null,
270
+ $item: {
271
+ $def: null,
272
+ set(n) {
273
+ if (n)
274
+ this._loadTabs(n);
275
+ }
276
+ },
277
+ get groupedItems() {
278
+ const list = Array.isArray(this.tabs) ? this.tabs : [];
279
+ const visible = list.filter(t => !(t.hidden || t.DATA?.hidden));
280
+ // Группируем по group (порядок групп: 'main' первой, затем остальные по порядку появления).
281
+ // Возвращаем plain-объекты, чтобы обращение к isSep/label/icon в шаблоне
282
+ // не триггерило _onEmpty на Reactor-прокси реального $handler.
283
+ const groups = new Map();
284
+ for (const t of visible) {
285
+ const g = t.DATA?.group || t.group || 'main';
286
+ if (!groups.has(g))
287
+ groups.set(g, []);
288
+ groups.get(g).push({
289
+ isSep: false,
290
+ id: t.id,
291
+ label: t.DATA?.label || t.label || t.id,
292
+ icon: t.DATA?.icon || t.icon || '',
293
+ });
294
+ }
295
+ const orderedGroups = [];
296
+ if (groups.has('main')) {
297
+ orderedGroups.push(groups.get('main'));
298
+ groups.delete('main');
299
+ }
300
+ for (const arr of groups.values())
301
+ orderedGroups.push(arr);
302
+ const out = [];
303
+ orderedGroups.forEach((arr, idx) => {
304
+ if (idx > 0 && out.length)
305
+ out.push({ isSep: true, id: `sep-${idx}`, label: '', icon: '' });
306
+ for (const entry of arr)
307
+ out.push(entry);
308
+ });
309
+ return out;
310
+ },
311
+ attached() {
312
+ this._attachedDone = true;
313
+ if (this.$item && (!this.tabs || !this.tabs.length))
314
+ this._loadTabs(this.$item);
315
+ },
316
+ _handlerRelativePath() {
317
+ const raw = String(this.$handler?.path || this.$handler?.short || '');
318
+ const m = raw.match(/\/handlers\/pages\/form(?:\/(.+?))?(?:\/\$handler)?$/);
319
+ if (m && m[1]) {
320
+ const clean = m[1].split('/').filter(s => s && s[0] !== '$').join('/');
321
+ return `/pages/form/${clean}`;
322
+ }
323
+ return this.$handler?.id ? `/pages/form/${this.$handler.id}` : '/pages/form';
324
+ },
325
+ async _loadTabs(item) {
326
+ const seq = ++this._loadSeq;
327
+ if (!item) {
328
+ this.tabs = [];
329
+ return;
330
+ }
331
+ const rawHandler = this.$handler?.[R]?.target || this.$handler;
332
+ const ownItems = rawHandler && Object.prototype.hasOwnProperty.call(rawHandler, 'items') ? rawHandler.items : this.$handler?.DATA?.items;
333
+ let rawItems = Array.isArray(ownItems) && ownItems.length ? ownItems : null;
334
+ if (!rawItems && typeof item.fetch === 'function') {
335
+ const relPath = this._handlerRelativePath();
336
+ const res = await item.fetch('handlers', {
337
+ path: relPath,
338
+ ...(this.role ? { role: this.role } : {}),
339
+ }).catch(() => null);
340
+ rawItems = res?.items || [];
341
+ }
342
+ if (seq !== this._loadSeq)
343
+ return;
344
+ const selfId = this.$handler?.id || '';
345
+ const list = (rawItems || [])
346
+ .filter(t => t && t !== this.$handler && t.id !== selfId && t.type === '$handler' && t.enabled !== false && t.usable !== false && t.allowUse !== false)
347
+ .sort((a, b) => (a.order ?? a.DATA?.order ?? 99) - (b.order ?? b.DATA?.order ?? 99));
348
+ for (const t of list)
349
+ t.$context = item;
350
+ this.tabs = list;
351
+ this._controls = {};
352
+ const body = this.$?.('#subBody');
353
+ if (body)
354
+ body.innerHTML = '';
355
+
356
+ const initSub = this._initialNav?.subView || this._initialNav?.tab || this.subViewPath || '';
357
+ const [firstSeg, ...restSegs] = String(initSub || '').split('/').filter(Boolean);
358
+ let chosen = firstSeg ? list.find(t => t.id === firstSeg) : null;
359
+ if (!chosen) {
360
+ const visible = list.filter(t => !(t.hidden || t.DATA?.hidden));
361
+ chosen = visible.find(t => t.default || t.DATA?.default) || visible[0] || list[0] || null;
362
+ }
363
+ if (chosen)
364
+ await this.selectTab(chosen.id, restSegs.join('/'));
365
+ },
366
+ async selectTab(id, nestedSubView = '') {
367
+ if (!id)
368
+ return;
369
+ const tab = (this.tabs || []).find(t => t.id === id);
370
+ if (!tab)
371
+ return;
372
+ this.activeId = id;
373
+ await this._mountTab(tab, nestedSubView);
374
+ },
375
+ async _mountTab(tab, nestedSubView = '') {
376
+ const seq = ++this._mountSeq;
377
+ const body = this.$?.('#subBody');
378
+ if (!body)
379
+ return;
380
+ this._controls ||= {};
381
+ let el = this._controls[tab.id];
382
+ if (!el) {
383
+ const mod = await tab.importView();
384
+ if (seq !== this._mountSeq || this.activeId !== tab.id)
385
+ return;
386
+ if (mod && mod.is) {
387
+ el = ODA.createComponent(mod.is, {
388
+ $item: this.$item,
389
+ $context: this.$item,
390
+ $handler: tab,
391
+ });
392
+ }
393
+ else if (this.depth < 6 && (tab.layout || tab.DATA?.layout || (Array.isArray(tab.DATA?.items) && tab.DATA.items.length))) {
394
+ el = ODA.createComponent('work-subview-container', {
395
+ $item: this.$item,
396
+ $context: this.$item,
397
+ $handler: tab,
398
+ layout: tab.layout || tab.DATA?.layout || 'sidebar',
399
+ role: this.role,
400
+ subViewPath: nestedSubView,
401
+ depth: (this.depth || 0) + 1,
402
+ });
403
+ }
404
+ if (!el)
405
+ return;
406
+ el.$form = this.$form;
407
+ el.style.flex = '1 1 auto';
408
+ el.style.minHeight = '0';
409
+ this._controls[tab.id] = el;
410
+ body.appendChild(el);
411
+ }
412
+ for (const ch of [...body.children]) {
413
+ ch.hidden = ch !== el;
414
+ ch.style.display = ch === el ? '' : 'none';
415
+ }
416
+ if (nestedSubView && typeof el.applyNav === 'function')
417
+ await el.applyNav({ subView: nestedSubView });
418
+ },
419
+ async applyNav(nav) {
420
+ if (!nav || typeof nav !== 'object')
421
+ return;
422
+ const sub = nav.subView || nav.tab || '';
423
+ if (!sub)
424
+ return;
425
+ const [firstSeg, ...restSegs] = String(sub).split('/').filter(Boolean);
426
+ if (firstSeg && (this.tabs || []).some(t => t.id === firstSeg)) {
427
+ await this.selectTab(firstSeg, restSegs.join('/'));
428
+ }
429
+ else {
430
+ this.subViewPath = sub;
431
+ }
432
+ },
433
+ });
434
+ ODA({is: 'work-form',
435
+ imports: 'oda//icon, oda//button, oda//tabs, oda//app-layout, ~/lib//node-explorer, ~/lib//confirm.js, ~/lib//tree, ~/lib//tools, ~/lib//class-picker',
436
+ extends: 'oda-app-layout',
437
+ template: /* html */`
438
+ <style>
439
+ #formTabsBar[hidden],
440
+ #formToolbar[hidden],
441
+ #formFooter[hidden],
442
+ [slot="main"][hidden] {
443
+ display: none !important;
444
+ }
445
+ .form-tabs-bar oda-button#classTreeToggleBtn {
446
+ border-radius: 9px !important;
447
+ min-width: 30px;
448
+ min-height: 30px;
449
+ transition: background-color var(--duration-fast) var(--easing), box-shadow var(--duration-fast) var(--easing);
450
+ }
451
+ .form-tabs-bar oda-button#classTreeToggleBtn:not([light]):hover {
452
+ background: color-mix(in oklch, var(--accent-back) 14%, transparent);
453
+ }
454
+ .form-tabs-bar oda-button#classTreeToggleBtn[light] {
455
+ box-shadow: 0 2px 6px var(--shadow-color);
456
+ }
457
+ #tools item-node {
458
+ flex-shrink: 0;
459
+ border-radius: 10px;
460
+ padding: 3px 8px;
461
+ min-height: 30px;
462
+ align-items: center;
463
+ box-sizing: border-box;
464
+ opacity: 0.86;
465
+ transition: background-color var(--duration-fast) var(--easing), box-shadow var(--duration-fast) var(--easing), opacity var(--duration-fast) var(--easing);
466
+ }
467
+ #tools item-node:not([light]):hover {
468
+ opacity: 1;
469
+ background: color-mix(in oklch, var(--accent-back) 14%, transparent);
470
+ }
471
+ #tools item-node[light] {
472
+ opacity: 1;
473
+ padding: 3px 10px;
474
+ font-weight: 700;
475
+ box-shadow: 0 2px 6px var(--shadow-color);
476
+ }
477
+ .obj-footer-actions {
478
+ @apply --horizontal-center;
479
+ @apply --no-flex;
480
+ gap: 6px;
481
+ }
482
+ oda-button.obj-footer-btn {
483
+ min-height: 28px;
484
+ padding: 4px 12px;
485
+ gap: 6px;
486
+ font-size: 12.5px;
487
+ font-weight: 500;
488
+ border-radius: 8px;
489
+ border: 1px solid var(--subtle-border);
490
+ background: var(--content-background);
491
+ color: var(--content-color);
492
+ box-shadow: var(--elevation-1);
493
+ box-sizing: border-box;
494
+ transition: background-color var(--duration-fast) var(--easing), border-color var(--duration-fast) var(--easing), color var(--duration-fast) var(--easing);
495
+ }
496
+ oda-button.obj-footer-btn:hover:not([disabled]) {
497
+ background: var(--accent-soft);
498
+ border-color: var(--accent-color);
499
+ color: var(--accent-color);
500
+ }
501
+ oda-button.obj-footer-btn.primary {
502
+ font-weight: 700;
503
+ min-width: 72px;
504
+ }
505
+ .view-enter {
506
+ animation: view-fade-in 0.5s ease;
507
+ }
508
+ .form-header-inner {
509
+ min-width: 0;
510
+ flex-wrap: wrap;
511
+ gap: 8px;
512
+ margin: 4px;
513
+ align-items: center;
514
+ }
515
+ .form-header-inner item-node-explorer {
516
+ min-width: 0;
517
+ max-width: 100%;
518
+ flex-shrink: 1;
519
+ }
520
+ .mobile-back-spacer {
521
+ width: 36px;
522
+ flex-shrink: 0;
523
+ }
524
+ .consultant-btn {
525
+ border-radius: 50%;
526
+ margin-right: 4px;
527
+ flex-shrink: 0;
528
+ }
529
+ .call-btn {
530
+ border-radius: 50%;
531
+ margin-right: 24px;
532
+ flex-shrink: 0;
533
+ }
534
+ .view-selector {
535
+ justify-content: flex-end;
536
+ flex-wrap: wrap;
537
+ max-width: 100%;
538
+ min-width: 0;
539
+ overflow: visible;
540
+ }
541
+ .view-selector .flow {
542
+ flex-wrap: wrap;
543
+ gap: 8px;
544
+ border-radius: 4px;
545
+ align-items: center;
546
+ max-width: 100%;
547
+ min-width: 0;
548
+ }
549
+ #tools {
550
+ min-height: 32px;
551
+ align-items: center;
552
+ flex-wrap: wrap;
553
+ gap: 8px;
554
+ padding: 2px 2px 4px;
555
+ max-width: 100%;
556
+ min-width: 0;
557
+ border-bottom: 2px solid color-mix(in oklch, var(--accent-back) 65%, transparent);
558
+ }
559
+ #formToolbar {
560
+ flex-wrap: wrap;
561
+ }
562
+ #formToolbar .toolbar-zone {
563
+ flex-wrap: wrap;
564
+ min-width: 0;
565
+ }
566
+ #formFooter {
567
+ flex-wrap: wrap;
568
+ padding-bottom: max(4px, var(--safe-bottom, 0px)) !important;
569
+ }
570
+ @media (max-width: 768px) {
571
+ #formHeader {
572
+ align-items: flex-start !important;
573
+ }
574
+ .consultant-btn {
575
+ margin-right: 0;
576
+ }
577
+ .call-btn {
578
+ margin-right: 0;
579
+ }
580
+ .view-selector {
581
+ justify-content: flex-start;
582
+ }
583
+ }
584
+ @keyframes view-fade-in {
585
+ from { opacity: 0; }
586
+ to { opacity: 1; }
587
+ }
588
+ </style>
589
+ <div id="formHeader" ~show="!fullScreen" accent-invert slot="header" shadow horizontal flex
590
+ :style="'padding: 4px; gap: 8px; min-width: 0; align-items: ' + (ODA.states?.mobileMode ? 'flex-start' : 'center') + ';'">
591
+ <div center flex horizontal class="form-header-inner" style="min-width: 0; flex-wrap: wrap; gap: 8px; margin: 4px; align-items: center;">
592
+ <div ~if="ODA.states?.mobileMode && !isEmbeddedNoTree" class="mobile-back-spacer" style="width: 36px; flex-shrink: 0;"></div>
593
+ <item-node-explorer no-flex :$item="rootItem"></item-node-explorer>
594
+ <div flex></div>
595
+ <oda-button ~if="showConsultantBtn" id="consultantBtn" shadow icon="bootstrap:robot" @tap="askConsultant" title="Спросить ИИ-консультанта по текущей форме" :icon-size info class="consultant-btn"
596
+ :style="'border-radius: 50%; flex-shrink: 0; margin-right: ' + (ODA.states?.mobileMode ? '0px' : '4px') + ';'"></oda-button>
597
+ <oda-button shadow icon="communication:call" @tap="call" title="Call..." :icon-size success class="call-btn"
598
+ :style="'border-radius: 50%; flex-shrink: 0; margin-right: ' + (ODA.states?.mobileMode ? '0px' : '24px') + ';'"></oda-button>
599
+ <slot name="top-panel"></slot>
600
+ <div class="view-selector" no-flex horizontal
601
+ :style="'flex-wrap: wrap; max-width: 100%; min-width: 0; overflow: visible; justify-content: ' + (ODA.states?.mobileMode ? 'flex-start' : 'flex-end') + ';'">
602
+ <div class="flow" no-flex horizontal style="flex-wrap: wrap; gap: 8px; border-radius: 4px; align-items: center; max-width: 100%; min-width: 0;">
603
+
604
+ <div
605
+ ~if="allowSave"
606
+ :disabled="saving"
607
+ :rainbow="saving"
608
+ :error-invert="isViewChanged && !!saveError"
609
+ :success-invert="isViewChanged && !saveError"
610
+ style="position: relative; align-items: center;"
611
+ horizontal
612
+ >
613
+ <oda-icon
614
+ ~if="saveError"
615
+ icon="icons:error"
616
+ @mouseenter="this.$('#error_tooltip').showPopover()"
617
+ @mouseleave="this.$('#error_tooltip').hidePopover()"
618
+ class="save-error-icon"
619
+ ></oda-icon>
620
+ <div id="error_tooltip" popover="manual">{{saveError}}</div>
621
+ <oda-button
622
+ :icon="saving ? 'spinners:8-dots-rotate' : 'icons:save'"
623
+ :icon-size
624
+ :disabled="!isViewChanged"
625
+ @tap="save"
626
+ style="border-radius: 4px;"
627
+ center
628
+ ></oda-button>
629
+
630
+ </div>
631
+ <div id="tools" no-flex horizontal style="min-height: 32px; align-items: center; flex-wrap: wrap; gap: 8px; padding: 2px 2px 4px; max-width: 100%; min-width: 0; border-bottom: 2px solid color-mix(in oklch, var(--accent-back) 65%, transparent);">
632
+ <item-node
633
+ ~for="visibleFormViews"
634
+ :$item="$for.item"
635
+ :hide-label="view?.id !== $for.item.id"
636
+ :icon-size
637
+ :light="view?.id === $for.item.id"
638
+ @tap.stop="switchView($for.item, $event)"
639
+ @pointerdown.stop="view?.id === $for.item.id && openView($event)"
640
+ >
641
+ <oda-button ~if="view?.id === $for.item.id && (view?.hasSettings || view?.DATA?.hasSettings || view_control?.hasSettings)" icon="icons:settings" @pointerdown.stop.prevent="(view_control?.showSettings ? view_control.showSettings() : view?.showSettings?.())" style="padding: 0;"></oda-button>
642
+ </item-node>
643
+ </div>
644
+ </div>
645
+ </div>
646
+ </div>
647
+ <oda-button @tap="toggleFullscreen" ~if="currentItem?.type === '$file'" :icon-size content icon="icons:fullscreen" style="border-radius: 50%; flex-shrink: 0;"></oda-button>
648
+ <oda-button ~if="!isEmbeddedNoTree" @tap="close" error :icon-size content-invert icon="icons:close" style="border-radius: 50%; margin: 4px; flex-shrink: 0;"></oda-button>
649
+ </div>
650
+ <div id="formTabsBar" slot="top" class="form-tabs-bar" accent-invert horizontal-center no-flex :hidden="!showTabsBar" ~show="showTabsBar" style="width: 100%; padding: 0 4px 0 8px; gap: 6px; box-sizing: border-box; min-height: 38px;">
651
+ <oda-button id="classTreeToggleBtn" ~if="hasClassTree" no-flex allow-toggle
652
+ :light="!classTreeClosed"
653
+ icon="icons:tree-structure" :icon-size="18"
654
+ :title="classTreeClosed ? 'Показать дерево классов' : 'Скрыть дерево классов'"
655
+ @tap.stop="toggleClassTree($event)"
656
+ style="border-radius: 9px; min-width: 30px; min-height: 30px;"></oda-button>
657
+ <oda-tabs flex variant="rail" allow-close allow-drag
658
+ :items="formTabItems" :focused-index="formFocusedTabIndex"
659
+ @tab-select="onFormTabSelect($event)"
660
+ @tab-close="onFormTabClose($event)"
661
+ @close-others="onFormCloseOthers($event)"
662
+ @close-right="onFormCloseRight($event)"
663
+ @close-all="closeAllTabs($event)"
664
+ @reorder="onFormTabsReorder($event)"
665
+ style="min-width: 0; padding-left: 0; padding-right: 4px;"></oda-tabs>
666
+ </div>
667
+ <div id="formToolbar" slot="main-top" :hidden="!hasToolbar" ~show="hasToolbar" horizontal-center no-flex style="background: var(--subtle-background); color: var(--content-color); border-bottom: 1px solid var(--subtle-border); padding: 5px 10px; gap: 8px; min-height: 38px; box-sizing: border-box;">
668
+ <div class="toolbar-zone left" horizontal-center no-flex style="gap: 6px;">
669
+ <item-tools id="topMainTools" :$item="currentItem" :state-version="focusedStateVersion" filter="button" ::tool-items="topMainToolItems" @tools-changed="onToolsListChanged('topMainToolItems', $event)" show-labels></item-tools>
670
+ <item-tools id="topFocusedTools" focused-only :target-item="focusedItem" :fallback-item="fallbackFocusedItem" :$item="focusedItem" :state-version="focusedStateVersion" filter="button" ::tool-items="topFocusedToolItems" @tools-changed="onToolsListChanged('topFocusedToolItems', $event)" show-labels></item-tools>
671
+ <slot name="tool-left" @slotchange="_checkToolbarSlots()"></slot>
672
+ </div>
673
+ <div class="toolbar-zone center" horizontal-center flex style="justify-content: center; gap: 6px; min-width: 0;">
674
+ <slot name="tool-center" @slotchange="_checkToolbarSlots()"></slot>
675
+ </div>
676
+ <div class="toolbar-zone right" horizontal-center no-flex style="gap: 6px; margin-left: auto;">
677
+ <slot name="tool-right" @slotchange="_checkToolbarSlots()"></slot>
678
+ </div>
679
+ </div>
680
+ <div id="formFooter" slot="footer" :hidden="!hasFooter" ~show="hasFooter" footer border-top horizontal-center no-flex style="justify-items: space-between; padding: 4px 10px; gap: 8px; min-height: 36px; box-sizing: border-box;">
681
+ <item-tools id="focusedTools" focused-only :target-item="focusedItem" :fallback-item="fallbackFocusedItem" :$item="focusedItem" :state-version="focusedStateVersion" filter="service" ::tool-items="focusedToolItems" @tools-changed="onToolsListChanged('focusedToolItems', $event)" show-labels></item-tools>
682
+ <slot name="footer-left"></slot>
683
+ <div flex></div>
684
+ <div class="obj-footer-actions" horizontal-center no-flex ~if="isObjectViewActive">
685
+ <oda-button class="obj-footer-btn primary" content border hoverable ~if="view_control?.canSave" :disabled="Boolean(view_control?.busy)" icon="icons:check" :icon-size="18" label="OK" @tap="onObjectOk()"></oda-button>
686
+ <oda-button class="obj-footer-btn" content border hoverable :disabled="Boolean(view_control?.busy)" icon="icons:close" :icon-size="18" label="Закрыть" @tap="onObjectClose()"></oda-button>
687
+ </div>
688
+ <div no-flex horizontal-center ~show="dialog" style="gap: 6px;">
689
+ <oda-button info-invert icon="icons:check" :icon-size @tap="ok" label="OK"></oda-button>
690
+ <oda-button icon="icons:close" :icon-size @tap="cancel" label="Отмена"></oda-button>
691
+ </div>
692
+ </div>
693
+ `,
694
+ async call(e) {
695
+ const el = ODA.createComponent('call-users-list');
696
+ const users = await el.users;
697
+ if (users.length === 1) {
698
+ el.selectedUsers.push(users[0]);
699
+ }
700
+ const updateEnable = () => {
701
+ const cond = el.selectedUsers.length > 0;
702
+ if (el.domParent) {
703
+ if (cond) {
704
+ el.domParent.OK.label = 'Позвонить [' + el.selectedUsers.length + ']';
705
+ el.domParent.OK.icon = 'communication:call';
706
+ }
707
+ else {
708
+ el.domParent.OK.label = 'Записать видео';
709
+ el.domParent.OK.icon = 'av:videocam';
710
+ }
711
+ }
712
+ };
713
+ el.addEventListener('changed', updateEnable);
714
+ try {
715
+ this.async(() => { updateEnable() }, 100);
716
+ const res = await WORK.showDialog(el, {
717
+ TITLE: { label: 'Выбор собеседников', icon: 'communication:call' },
718
+ OK: { label: 'позвонить', icon: 'communication:call' },
719
+ });
720
+ if (res === 'ok') {
721
+ const receivers = el.selectedUsers;
722
+ if (receivers.length > 0) {
723
+ WORK.top.RTCCaller.startCall(await this.$item, receivers.map(u => u.id));
724
+ }
725
+ else {
726
+ WORK.top.RTCCaller.startRecord(await this.$item);
727
+ }
728
+ }
729
+ }
730
+ catch (err) {
731
+ console.log(err);
732
+ }
733
+ finally {
734
+ el.removeEventListener('selected-users-changed', updateEnable);
735
+ }
736
+ },
737
+ allowZoom: true,
738
+ hideLeftTabs: true,
739
+ classTreeClosed: false,
740
+ _applyingClassTreeState: false,
741
+ get $saveKey() {
742
+ const root = this._rootItem || this.$item;
743
+ const raw = root?.short || root?.path || '';
744
+ const fn = globalThis.__workClassPicker?.resolveDataRootPath || globalThis.WORK?.resolveDataRootPath;
745
+ return (typeof fn === 'function' ? fn(raw, root) : '') || String(raw).replace(/\/~\/handlers\/.*$/, '').replace(/\/+$/, '');
746
+ },
747
+ _classTreeStorageKey(root = this._rootItem || this.$item) {
748
+ const raw = root?.short || root?.path || '';
749
+ if (!raw)
750
+ return '';
751
+ const fn = globalThis.__workClassPicker?.resolveDataRootPath || globalThis.WORK?.resolveDataRootPath;
752
+ const rootPath = (typeof fn === 'function' ? fn(raw, root) : '') || String(raw).replace(/\/~\/handlers\/.*$/, '').replace(/\/+$/, '');
753
+ return rootPath ? `work.form.classTree:${rootPath}` : '';
754
+ },
755
+ _loadSavedClassTreeClosed(root = this._rootItem || this.$item) {
756
+ const key = this._classTreeStorageKey(root);
757
+ if (key && typeof localStorage !== 'undefined') {
758
+ try {
759
+ const raw = localStorage.getItem(key);
760
+ if (raw !== null && raw !== undefined) {
761
+ if (raw === 'true' || raw === '1')
762
+ return true;
763
+ if (raw === 'false' || raw === '0')
764
+ return false;
765
+ const parsed = JSON.parse(raw);
766
+ if (typeof parsed === 'boolean')
767
+ return parsed;
768
+ if (parsed && typeof parsed.closed === 'boolean')
769
+ return parsed.closed;
770
+ }
771
+ }
772
+ catch { /* ignore */ }
773
+ }
774
+ return Boolean(this.mobile);
775
+ },
776
+ _saveClassTreeClosed(closed, root = this._rootItem || this.$item) {
777
+ const key = this._classTreeStorageKey(root);
778
+ if (!key || typeof localStorage === 'undefined')
779
+ return;
780
+ try {
781
+ localStorage.setItem(key, JSON.stringify({ closed: Boolean(closed) }));
782
+ }
783
+ catch { /* ignore */ }
784
+ },
785
+ formPeriod: null,
786
+ setFormPeriod(period) {
787
+ if (!period || typeof period !== 'object')
788
+ return;
789
+ this.formPeriod = {
790
+ packetsKey: String(period.packetsKey || '*'),
791
+ from: String(period.from || ''),
792
+ to: String(period.to || ''),
793
+ ...(period.mode ? { mode: String(period.mode) } : {}),
794
+ };
795
+ },
796
+ _captureCurrentViewPeriod() {
797
+ const vc = this.view_control;
798
+ if (!vc)
799
+ return;
800
+ const pk = typeof vc.packetsKey === 'string' ? vc.packetsKey : '';
801
+ const from = String(vc.from || vc.period?.start || '');
802
+ const to = String(vc.period || vc.to ? (vc.to || vc.period?.end || '') : '');
803
+ if (pk || from || to) {
804
+ this.setFormPeriod({ packetsKey: pk || '*', from, to });
805
+ }
806
+ },
807
+ _withFormPeriod(nav = null) {
808
+ const fp = this.formPeriod;
809
+ if (!fp)
810
+ return nav;
811
+ const base = nav && typeof nav === 'object' ? { ...nav } : {};
812
+ if (base.packetsKey === undefined && fp.packetsKey)
813
+ base.packetsKey = fp.packetsKey;
814
+ if (base.from === undefined && fp.from !== undefined)
815
+ base.from = fp.from;
816
+ if (base.to === undefined && fp.to !== undefined)
817
+ base.to = fp.to;
818
+ return base;
819
+ },
820
+ toggleClassTree(e) {
821
+ e?.stopPropagation?.();
822
+ const drawer = this.left_drawer;
823
+ const nextClosed = drawer ? !drawer.closed : !this.classTreeClosed;
824
+ this._applyingClassTreeState = true;
825
+ try {
826
+ if (drawer)
827
+ drawer.closed = nextClosed;
828
+ this.classTreeClosed = Boolean(nextClosed);
829
+ }
830
+ finally {
831
+ this._applyingClassTreeState = false;
832
+ }
833
+ this._saveClassTreeClosed(this.classTreeClosed);
834
+ if (!this.classTreeClosed) {
835
+ const tree = this.querySelector?.('item-tree#formClassTree') || this.$?.('#formClassTree');
836
+ tree?.onShow?.();
837
+ }
838
+ },
839
+ iconSize: 24,
840
+ standaloneConsultant: false,
841
+ /**
842
+ * Собрать описание того, что сейчас открыто в форме, для автоматического вопроса ИИ-консультанту.
843
+ */
844
+ buildConsultantContext() {
845
+ const it = this.currentItem;
846
+ const path = it?.short || it?.path || '/';
847
+ const label = it?.DATA?.label || it?.label || it?.id || path;
848
+ const type = it?.type || '';
849
+ const viewId = this.view?.id || '';
850
+ const viewLabel = this.view?.label || viewId || '';
851
+ const vc = this.view_control;
852
+ const details = [];
853
+ const analyticEntries = [];
854
+ const screenLines = [];
855
+ let focusSubject = '';
856
+
857
+ if (vc) {
858
+ try {
859
+ if (vc.from || vc.to)
860
+ details.push(`период: ${vc.from || '…'} — ${vc.to || '…'}`);
861
+ else if (vc.atDate)
862
+ details.push(`на дату: ${vc.atDate}`);
863
+ if (vc.mode && typeof vc.mode === 'string')
864
+ details.push(`режим: ${vc.mode}`);
865
+ if (vc.groupBy && vc.groupBy !== 'none')
866
+ details.push(`группировка: ${vc.groupBy}`);
867
+
868
+ // Активные отборы по аналитикам в Оборотах / Проводках / Анализе счёта (vc.filters)
869
+ if (vc.filters && typeof vc.filters === 'object') {
870
+ const slotsArr = Array.isArray(vc.slots) ? vc.slots : [];
871
+ for (const [slotId, rawVal] of Object.entries(vc.filters)) {
872
+ const objId = String(rawVal || '').trim();
873
+ if (!objId)
874
+ continue;
875
+ const slot = slotsArr.find(s => s?.id === slotId);
876
+ const slotLabel = slot?.label || slotId;
877
+ const catArr = Array.isArray(slot?.catalog) ? slot.catalog : (Array.isArray(slot?.options) ? slot.options : []);
878
+ const catItem = catArr.find(c => String(c?.id ?? c?.value) === objId);
879
+ const objName = vc.names?.objects?.[objId] || catItem?.name || catItem?.label || objId;
880
+ analyticEntries.push({ slotId, slotLabel, id: objId, name: String(objName) });
881
+ details.push(`аналитика ${slotLabel}: «${objName}» [id=${objId}]`);
882
+ }
883
+ }
884
+ if (analyticEntries.length)
885
+ focusSubject = analyticEntries.map(a => a.name).join(', ');
886
+
887
+ // Поколоночные и строковые фильтры в Анализе счёта / Журнале / Таблице
888
+ if (vc.analysisQuery)
889
+ details.push(`фильтр анализа: «${vc.analysisQuery}»`);
890
+ if (vc.slotQueries && typeof vc.slotQueries === 'object') {
891
+ for (const [sId, qVal] of Object.entries(vc.slotQueries)) {
892
+ const q = String(qVal || '').trim();
893
+ if (q && q !== vc.analysisQuery)
894
+ details.push(`фильтр ${sId}: «${q}»`);
895
+ }
896
+ }
897
+ if (vc.searchText)
898
+ details.push(`фильтр: «${vc.searchText}»`);
899
+ else if (vc.searchQuery)
900
+ details.push(`поиск: «${vc.searchQuery}»`);
901
+ else if (vc.search)
902
+ details.push(`поиск: «${vc.search}»`);
903
+ else if (vc.query)
904
+ details.push(`поиск: «${vc.query}»`);
905
+
906
+ if (vc.account)
907
+ details.push(`счёт: ${vc.account}`);
908
+ if (vc.opCid)
909
+ details.push(`операция: ${vc.opCid}`);
910
+ if (vc.unit)
911
+ details.push(`подразделение: ${vc.unit}`);
912
+
913
+ // Выделенная группа периода в Оборотах счёта
914
+ if (vc.mode === 'turnovers' && vc.selectedGroupKey) {
915
+ const grpList = Array.isArray(vc.turnoverGroups) ? vc.turnoverGroups : (Array.isArray(vc.groups) ? vc.groups : []);
916
+ const grp = grpList.find(g => g?.key === vc.selectedGroupKey);
917
+ details.push(`выбран период в таблице: «${grp?.label || vc.selectedGroupKey}»`);
918
+ }
919
+
920
+ // Выделенная строка в Анализе счёта, Ведомости или списке объектов
921
+ if (vc.mode === 'analysis' && vc.selectedAnalysisRow) {
922
+ const ar = vc.selectedAnalysisRow;
923
+ if (ar.label) {
924
+ details.push(`выбрана аналитика в таблице: «${ar.label}»`);
925
+ if (!focusSubject)
926
+ focusSubject = ar.label;
927
+ }
928
+ }
929
+ else {
930
+ const row = vc.editing || vc.focusedRow || vc.selectedRow || vc.current;
931
+ if (row && typeof row === 'object') {
932
+ const rowLabel = vc.documentTitle
933
+ || (typeof vc.rowLabel === 'function' ? vc.rowLabel(row) : '')
934
+ || row.name || row.label || row.title || row.account || row.id || '';
935
+ if (rowLabel) {
936
+ details.push(`выбрана запись: «${rowLabel}»${row.id ? ' [id=' + row.id + ']' : ''}`);
937
+ if (!focusSubject && (viewId === 'object' || viewId === 'sheet'))
938
+ focusSubject = String(rowLabel);
939
+ }
940
+ }
941
+ }
942
+
943
+ if (vc.entryCard?.entry) {
944
+ details.push(`открыта проводка #${vc.entryCard.entry} на сумму ${vc.entryCard.amount}`);
945
+ }
946
+
947
+ const count = vc.total && typeof vc.total === 'number'
948
+ ? vc.total
949
+ : (Array.isArray(vc.turnoverDocs) && vc.mode === 'turnovers'
950
+ ? vc.turnoverDocs.length
951
+ : (Array.isArray(vc.rows) ? vc.rows.length : (typeof vc.count === 'number' ? vc.count : undefined)));
952
+ if (typeof count === 'number')
953
+ details.push(`записей на экране: ${count}`);
954
+
955
+ // Сводка чисел и документов, которые прямо сейчас отображаются пользователю на экране
956
+ if (vc.mode === 'turnovers') {
957
+ const openTxt = vc.openingText || `Дт ${vc.opening?.debit || 0} / Кт ${vc.opening?.credit || 0}`;
958
+ const closeTxt = vc.closingText || `Дт ${vc.closing?.debit || 0} / Кт ${vc.closing?.credit || 0}`;
959
+ screenLines.push(`Остаток на начало: ${openTxt}; Обороты за период: Дт ${vc.turnover?.debit || 0} / Кт ${vc.turnover?.credit || 0}; Остаток на конец: ${closeTxt}.`);
960
+ if (Array.isArray(vc.turnoverGroups) && vc.turnoverGroups.length && vc.turnoverGroups.length <= 20) {
961
+ screenLines.push('Группы периодов слева: ' + vc.turnoverGroups.map(g => `${g.label}: Дт ${g.debit || 0}, Кт ${g.credit || 0}, Сальдо ${g.balance || 0}`).join(' | '));
962
+ }
963
+ if (Array.isArray(vc.turnoverDocs) && vc.turnoverDocs.length && vc.turnoverDocs.length <= 25) {
964
+ screenLines.push('Документы выбранного периода справа (' + vc.turnoverDocs.length + ' шт.):\n' + vc.turnoverDocs.map(d =>
965
+ `- ${d.date || ''}: ${d.op || ''} (${d.corrDir || d.corr || ''}) — ${d.rawDebit ? 'Дт ' + d.debit : ''}${d.rawCredit ? (d.rawDebit ? ', ' : '') + 'Кт ' + d.credit : ''} [entry=${d.entry || ''}, op_cid=${d.op_cid || ''}, op_id=${d.op_id || ''}]`
966
+ ).join('\n'));
967
+ }
968
+ }
969
+ else if (vc.mode === 'card' && Array.isArray(vc.displayRows) && vc.displayRows.length && vc.displayRows.length <= 25) {
970
+ const openTxt = vc.openingText || `Дт ${vc.opening?.debit || 0} / Кт ${vc.opening?.credit || 0}`;
971
+ const closeTxt = vc.closingText || `Дт ${vc.closing?.debit || 0} / Кт ${vc.closing?.credit || 0}`;
972
+ screenLines.push(`Остаток на начало: ${openTxt}; Обороты: Дт ${vc.turnover?.debit || 0} / Кт ${vc.turnover?.credit || 0}; Остаток на конец: ${closeTxt}.`);
973
+ screenLines.push('Проводки на экране (' + vc.displayRows.length + ' шт.):\n' + vc.displayRows.map(d =>
974
+ `- ${d.date || ''}: ${d.op || ''} (корр. ${d.corr || ''}) — Дт ${d.debit || 0} / Кт ${d.credit || 0}, Сальдо ${d.bal || ''} [entry=${d.entry || ''}, op_cid=${d.op_cid || ''}, op_id=${d.op_id || ''}]`
975
+ ).join('\n'));
976
+ }
977
+ }
978
+ catch (err) {
979
+ console.warn('[form] buildConsultantContext:', err);
980
+ }
981
+ }
982
+
983
+ const extra = details.length ? ` (${details.join(', ')})` : '';
984
+ const analyticsFilterJson = analyticEntries.length
985
+ ? JSON.stringify(Object.fromEntries(analyticEntries.map(a => [a.slotId, a.id])))
986
+ : '';
987
+
988
+ const viewHints = {
989
+ sheet: focusSubject
990
+ ? `Внимание: пользователь выделил строку «${focusSubject}». Сфокусируй анализ именно на ней (остатки на начало/конец, обороты и корреспонденции).`
991
+ : 'Проанализируй оборотно-сальдовую ведомость, остатки на начало/конец, обороты и сходимость баланса.',
992
+ turnovers: analyticEntries.length
993
+ ? `ВНИМАНИЕ: в форме установлен отбор по аналитике (${analyticEntries.map(a => `${a.slotLabel}: «${a.name}» [id=${a.id}]`).join(', ')}; фильтр для report: analytics=${analyticsFilterJson}). Разбери СТРОГО расчёты, остатки, обороты и конкретные первичные операции по выбранному контрагенту/аналитике «${focusSubject}» (при необходимости прочитай детали операций через find_objects по их op_id). НЕ выдавай общую сводку по всему счёту в целом!`
994
+ : 'Проанализируй корреспонденции счёта и обороты в разрезе аналитик (субконто).',
995
+ analysis: focusSubject
996
+ ? `Внимание: выбрана аналитика «${focusSubject}». Проанализируй движения, остатки и первичные операции именно по этой аналитике.`
997
+ : 'Проанализируй движения и остатки счёта по аналитикам.',
998
+ postings: analyticEntries.length
999
+ ? `ВНИМАНИЕ: установлен отбор по аналитике (${analyticEntries.map(a => `${a.slotLabel}: «${a.name}» [id=${a.id}]`).join(', ')}). Поясни проводки и первичные операции строго по выбранной аналитике «${focusSubject}».`
1000
+ : 'Поясни представленные проводки счёта (Дебет/Кредит, аналитики, первичные операции).',
1001
+ journal: 'Поясни записи журнала проводок и первичные операции на экране.',
1002
+ objects: 'Поясни структуру таблицы, доступные фильтры/группировки и выбранные записи.',
1003
+ object: 'Поясни реквизиты открытого документа/объекта, его проводки, статус и доступные действия.',
1004
+ virtual: 'Поясни, от какого счёта и в каком режиме (balance/turnover) формируется этот виртуальный справочник и какие OVERLAY-поля доступны.',
1005
+ staff: 'Поясни текущие назначения руководителя (BOSS), структуру рабочих мест (ROLES), использование USERS/GUESTS и привязанные ссылки LINKS.',
1006
+ database: 'Поясни состав таблиц изолированной SQLite-базы данных и назначение текущей таблицы.',
1007
+ trainer: 'Поясни доступные модели ИИ, режим работы встроенного сервера ИИ, установку моделей в 1 клик и шаги дообучения.',
1008
+ provider: 'Поясни настройку API-ключа провайдера ИИ в #secret, проверку связи и подключение моделей в 1 клик.',
1009
+ mcp: 'Поясни подключённые MCP-серверы в /MODULES, способы добавления новых MCP (через стандартный JSON mcpServers или пресеты) и работу с внешними навыками SKILL.md (включая @grill-me).',
1010
+ };
1011
+ const tailHint = viewHints[viewId] || 'Расскажи, что здесь отображается, какие данные сейчас представлены и какие действия доступны.';
1012
+ const title = `Консультация: ${label}${focusSubject ? ' — ' + focusSubject : ''}${viewLabel ? ' (' + viewLabel + ')' : ''}`;
1013
+ const screenBlock = screenLines.length ? `\n\nДанные на экране пользователя:\n${screenLines.join('\n')}` : '';
1014
+ const prompt = `Проконсультируй по открытой форме: «${label}» (путь: ${path}${type ? ', тип: ' + type : ''}${viewLabel ? ', представление: ' + viewLabel + ' [' + viewId + ']' : ''})${extra}. ${tailHint}${screenBlock}`;
1015
+ return { path, label, type, viewId, viewLabel, details, focusSubject, analyticEntries, title, prompt };
1016
+ },
1017
+ /**
1018
+ * Открыть панель ИИ «Консультант» вместо дерева и автоматически задать вопрос по открытой форме.
1019
+ */
1020
+ async askConsultant(e) {
1021
+ e?.stopPropagation?.();
1022
+ const ctx = this.buildConsultantContext();
1023
+ const explorer = window.top?.explorer || window.parent?.explorer || window.explorer;
1024
+ if (explorer && typeof explorer.openConsultant === 'function') {
1025
+ return explorer.openConsultant(ctx);
1026
+ }
1027
+ await import('/$server/$folder/lib/consultant/consultant.js');
1028
+ let localCons = this.querySelector('item-consultant');
1029
+ if (!localCons) {
1030
+ localCons = ODA.createComponent('item-consultant', {
1031
+ slot: 'left-panel',
1032
+ id: 'formConsultant',
1033
+ label: 'ИИ',
1034
+ icon: 'bootstrap:robot',
1035
+ $item: this.$item,
1036
+ });
1037
+ localCons.setAttribute('label', 'ИИ');
1038
+ localCons.setAttribute('icon', 'bootstrap:robot');
1039
+ this.appendChild(localCons);
1040
+ }
1041
+ await new Promise(r => setTimeout(r, 50));
1042
+ if (this.left_drawer)
1043
+ this.left_drawer.closed = false;
1044
+ localCons.onShow?.();
1045
+ await localCons.askAboutContext(ctx);
1046
+ return localCons;
1047
+ },
1048
+ openView(e) {
1049
+ if (e.button === 0 && this.view)
1050
+ window.open(this.view.short + '/');
1051
+ },
1052
+ back(e) {
1053
+ alert('надо скрыть')
1054
+ },
1055
+ fullScreen: {
1056
+ // $save: true,
1057
+ $def: false,
1058
+ set(n) {
1059
+ if (n) {
1060
+ if (this.popover) {
1061
+ this.hidePopover();
1062
+ }
1063
+ this.requestFullscreen?.();
1064
+ }
1065
+ else if (document.fullscreenElement === this)
1066
+ document.exitFullscreen?.();
1067
+
1068
+ }
1069
+ },
1070
+ async ready() {
1071
+ window.execute = ($item, nav) => {
1072
+ if ($item && $item.type !== '$handler') {
1073
+ return this.openInForm($item, nav);
1074
+ }
1075
+ const short = $item?.short || $item?.path || '';
1076
+ if (nav && short)
1077
+ this._saveNav(short, nav);
1078
+ if (window.parent !== window && typeof window.parent?.execute === 'function') {
1079
+ window.parent.execute($item);
1080
+ return;
1081
+ }
1082
+ let url = short + '/';
1083
+ if ($item?.type !== '$handler')
1084
+ url += '~/handlers/pages/' + ($item?.page || 'form') + '/'
1085
+ url = encodeURI(url);
1086
+ window.open(url, url)
1087
+ };
1088
+ // для закрытия вкладки браузера (form без explorer)
1089
+ if (window.parent !== window)
1090
+ window.close = () => {
1091
+ return this.close();
1092
+ }
1093
+ if (typeof BroadcastChannel === 'function') {
1094
+ this._navChannel = new BroadcastChannel('work-form-nav');
1095
+ this._navChannel.onmessage = (ev) => {
1096
+ if (this._initializingItem || !this._rootItem)
1097
+ return;
1098
+ const d = ev?.data;
1099
+ const myShort = (this._rootItem?.short || this._rootItem?.path || this.$item?.short || this.$item?.path || '') || '/';
1100
+ const msgShort = d?.short || '/';
1101
+ if (d && msgShort === myShort) {
1102
+ const nav = this._takeNav(myShort) || d.nav;
1103
+ if (nav)
1104
+ this.applyNav(nav);
1105
+ }
1106
+ };
1107
+ }
1108
+ },
1109
+ detached() {
1110
+ this._navChannel?.close?.();
1111
+ this._navChannel = null;
1112
+ },
1113
+ _saveNav(short, nav) {
1114
+ const key = short || '/';
1115
+ try {
1116
+ sessionStorage.setItem('work.form.nav:' + key, JSON.stringify(nav));
1117
+ } catch {}
1118
+ try {
1119
+ this._navChannel?.postMessage({ short: key, nav });
1120
+ } catch {}
1121
+ },
1122
+ _takeNav(short) {
1123
+ const key = short || '/';
1124
+ try {
1125
+ const raw = sessionStorage.getItem('work.form.nav:' + key)
1126
+ ?? (short === '' ? sessionStorage.getItem('work.form.nav:') : null);
1127
+ if (!raw)
1128
+ return null;
1129
+ sessionStorage.removeItem('work.form.nav:' + key);
1130
+ if (short === '')
1131
+ sessionStorage.removeItem('work.form.nav:');
1132
+ return JSON.parse(raw);
1133
+ } catch {
1134
+ return null;
1135
+ }
1136
+ },
1137
+ async applyNav(nav) {
1138
+ if (!nav || typeof nav !== 'object')
1139
+ return;
1140
+ if (this._initializingItem || !this._rootItem) {
1141
+ this._pendingInitialNav = nav;
1142
+ return;
1143
+ }
1144
+ if (nav.noClassTree) {
1145
+ this._noClassTreeFlag = true;
1146
+ this._initClassTreeDrawer();
1147
+ }
1148
+ if (nav.targetClassPath || nav.create || nav.copyFrom || (nav.id && this.hasClassTree)) {
1149
+ await this._handleNavigationTarget(nav, { isInitial: false });
1150
+ return;
1151
+ }
1152
+ const [topView, ...subParts] = String(nav.view || '').split('/').filter(Boolean);
1153
+ const subView = subParts.join('/') || nav.subView || '';
1154
+ const effectiveNav = subView ? { ...nav, subView } : nav;
1155
+ this._pendingNav = effectiveNav;
1156
+ if (nav.view) {
1157
+ const v = await this.resolveView(nav.view);
1158
+ if (v && this.view?.id !== v.id) {
1159
+ if (this.host)
1160
+ this.host.view_name = nav.view;
1161
+ this.view = v;
1162
+ return;
1163
+ }
1164
+ }
1165
+ if (this.view_control && typeof this.view_control.applyNav === 'function') {
1166
+ this._pendingNav = null;
1167
+ await this.view_control.applyNav(effectiveNav);
1168
+ }
1169
+ },
1170
+ view_name: '',
1171
+ /**
1172
+ * Список представлений формы — вычисляемый геттер: зависимости ($item,
1173
+ * activeRole) читаются синхронно, поэтому пересчёт и перерисовка идут
1174
+ * автоматически через Reactor, без ручных вызовов и render().
1175
+ */
1176
+ activeItem: null,
1177
+ get rootItem() {
1178
+ return this._rootItem || this.$item;
1179
+ },
1180
+ get currentItem() {
1181
+ return this.activeItem || this.$item;
1182
+ },
1183
+ get formViews() {
1184
+ const $item = this.currentItem;
1185
+ const role = this.activeRole;
1186
+ if (!$item)
1187
+ return [];
1188
+ return this.loadFormViews($item, role);
1189
+ },
1190
+ get visibleFormViews() {
1191
+ const views = this.formViews;
1192
+ if (!Array.isArray(views))
1193
+ return [];
1194
+ return views.filter(v => !(v?.DATA?.hidden || v?.hidden) || v?.id === this.view?.id);
1195
+ },
1196
+ async loadFormViews($item, role) {
1197
+ try {
1198
+ const root = await $item.fetch('handlers', { path: '//form', ...(role ? { role } : {}) });
1199
+ let views = (root?.items || []).filter(item =>
1200
+ item.type === '$handler' && item.enabled !== false && item.usable !== false && item.allowUse !== false
1201
+ );
1202
+ views.sort((a, b) => (a.order ?? a.DATA?.order ?? 99) - (b.order ?? b.DATA?.order ?? 99));
1203
+ const ext = $item?.ext;
1204
+ for (const v of views) {
1205
+ v.$context = $item;
1206
+ if (v.id === 'file' && ext && v.DATA) {
1207
+ v.DATA.icon = 'files-color:s-' + ext;
1208
+ }
1209
+ }
1210
+ return views;
1211
+ } catch (err) {
1212
+ console.error(err);
1213
+ return [];
1214
+ }
1215
+ },
1216
+ async resolveView(name, targetItem = this.currentItem) {
1217
+ const $item = targetItem || this.currentItem;
1218
+ const role = $item?.role || this.activeRole;
1219
+ let views = $item === this.currentItem ? await this.formViews : await this.loadFormViews($item, role);
1220
+ if ((!Array.isArray(views) || !views.length) && $item)
1221
+ views = await this.loadFormViews($item, role);
1222
+ if (name) {
1223
+ const parts = String(name).split('/').filter(Boolean);
1224
+ const first = parts[0];
1225
+ const rest = parts.slice(1);
1226
+ const inList = (views || []).find(v => v.id === first);
1227
+ if (inList) {
1228
+ if (rest.length && !(inList.layout || inList.DATA?.layout)) {
1229
+ // Вложенное самостоятельное представление (например objects/object)
1230
+ let cur = inList;
1231
+ for (const seg of rest) {
1232
+ const kids = Array.isArray(cur.items) ? cur.items : [];
1233
+ cur = kids.find(k => k && k.id === seg && k.type === '$handler');
1234
+ if (!cur)
1235
+ break;
1236
+ }
1237
+ if (cur) {
1238
+ cur.$context = $item;
1239
+ return cur;
1240
+ }
1241
+ if (typeof $item?.get_item === 'function') {
1242
+ const direct = await $item.get_item(`/~/handlers/pages/form/${parts.join('/')}`, undefined, {
1243
+ ...(role ? { role } : {}),
1244
+ contextPath: $item.short,
1245
+ }).catch(() => null);
1246
+ if (direct) {
1247
+ direct.$context = $item;
1248
+ return direct;
1249
+ }
1250
+ }
1251
+ }
1252
+ return inList;
1253
+ }
1254
+ if (typeof $item?.get_item === 'function') {
1255
+ const direct = await $item.get_item(`/~/handlers/pages/form/${parts.join('/')}`, undefined, {
1256
+ ...(role ? { role } : {}),
1257
+ contextPath: $item.short,
1258
+ }).catch(() => null);
1259
+ if (direct) {
1260
+ direct.$context = $item;
1261
+ return direct;
1262
+ }
1263
+ }
1264
+ }
1265
+ const byOrder = (a, b) => (a?.order ?? a?.DATA?.order ?? 99) - (b?.order ?? b?.DATA?.order ?? 99);
1266
+ const visible = (views || []).filter(v => !(v?.DATA?.hidden || v?.hidden)).sort(byOrder);
1267
+ const defaults = visible.filter(v => v?.default || v?.DATA?.default);
1268
+ if (defaults.length)
1269
+ return defaults[0];
1270
+ return visible[0] || views?.[0];
1271
+ },
1272
+ async _detectHasChildClasses(item) {
1273
+ if (!item)
1274
+ return false;
1275
+ if (!(item.DATA?.objects ?? item.objects))
1276
+ return false;
1277
+ if (item.hasItems === false)
1278
+ return false;
1279
+ try {
1280
+ if (typeof item.fetch === 'function') {
1281
+ const info = await item.fetch('info', { deep: 1, branch: 'classes' });
1282
+ if (info && Array.isArray(info.items)) {
1283
+ return info.items.some(c => c && c.id?.[0] !== '$' && Boolean(c.DATA?.objects ?? c.objects));
1284
+ }
1285
+ }
1286
+ }
1287
+ catch { /* ignore */ }
1288
+ return Boolean(item.hasItems);
1289
+ },
1290
+ _rootHasChildClasses: false,
1291
+ $item: {
1292
+ $def: null,
1293
+ async set(n) {
1294
+ if (n) {
1295
+ // Если уже открыта дочерняя вкладка или идёт первичная инициализация того же $item — не перезапускаем
1296
+ if (this._rootItem && this._rootItem === n && (this._initializingItem || this.formTabs?.length > 0))
1297
+ return;
1298
+ this._rootItem = n;
1299
+ this.activeItem = n;
1300
+ this._initializingItem = true;
1301
+ try {
1302
+ await n.ensureRole?.();
1303
+ this._appliedRoleItem = n;
1304
+ this._appliedRole = n.role || '';
1305
+ this._rootHasChildClasses = await this._detectHasChildClasses(n);
1306
+ }
1307
+ finally {
1308
+ this._initializingItem = false;
1309
+ }
1310
+ this._applyRoleColor(n, this._appliedRole);
1311
+ const nav = this._takeNav(n.short || n.path) || this._pendingInitialNav;
1312
+ this._pendingInitialNav = null;
1313
+ if (nav?.noClassTree || (typeof location !== 'undefined' && new URLSearchParams(location.search).get('noTree') === '1'))
1314
+ this._noClassTreeFlag = true;
1315
+ this._initClassTreeDrawer();
1316
+ if (nav) {
1317
+ if (nav.view === 'objects' && nav.id)
1318
+ nav.view = 'objects/object';
1319
+ const [, ...navSubParts] = String(nav.view || '').split('/').filter(Boolean);
1320
+ if (navSubParts.length && !nav.subView)
1321
+ nav.subView = navSubParts.join('/');
1322
+ if (nav.targetClassPath || nav.create || nav.copyFrom || (nav.id && this.hasClassTree)) {
1323
+ await this._handleNavigationTarget(nav, { isInitial: true });
1324
+ return;
1325
+ }
1326
+ this._pendingNav = nav;
1327
+ }
1328
+ if (this.hasClassTree)
1329
+ this.syncClassTreeToPath(n.short || n.path);
1330
+ const view_name = nav?.view || this.host?.default_view || this.host?.view_name;
1331
+ if (view_name && String(view_name).includes('/') && !this._pendingNav?.subView) {
1332
+ const [, ...subParts] = String(view_name).split('/').filter(Boolean);
1333
+ if (subParts.length)
1334
+ this._pendingNav = { ...(this._pendingNav || {}), subView: subParts.join('/') };
1335
+ }
1336
+ const resolvedView = await this.resolveView(view_name, n);
1337
+ if (this.view === resolvedView)
1338
+ await this._mountActiveView(resolvedView);
1339
+ else
1340
+ this.view = resolvedView;
1341
+ }
1342
+ }
1343
+ },
1344
+ _initializingItem: false,
1345
+ _rootItem: null,
1346
+ _appliedRoleItem: null,
1347
+ _appliedRole: '',
1348
+ _syncingClassTreeFocus: false,
1349
+ view_control: null,
1350
+ _noClassTreeFlag: false,
1351
+ get isEmbeddedNoTree() {
1352
+ return typeof location !== 'undefined' && new URLSearchParams(location.search).get('noTree') === '1';
1353
+ },
1354
+ get showConsultantBtn() {
1355
+ if (!this.currentItem)
1356
+ return false;
1357
+ const views = Array.isArray(this.formViews) ? this.formViews : [];
1358
+ return !views.some(v => v?.id === 'chat');
1359
+ },
1360
+ get hasClassTree() {
1361
+ if (this._noClassTreeFlag)
1362
+ return false;
1363
+ if (typeof location !== 'undefined' && new URLSearchParams(location.search).get('noTree') === '1')
1364
+ return false;
1365
+ const root = this._rootItem || this.$item;
1366
+ if (!root)
1367
+ return false;
1368
+ if (root.type === '$file' || root.type === '$handler')
1369
+ return false;
1370
+ if (!this._rootHasChildClasses)
1371
+ return false;
1372
+ return Boolean(root.DATA?.objects ?? root.objects);
1373
+ },
1374
+ get rootItemIcon() {
1375
+ const root = this._rootItem || this.$item;
1376
+ return root?.DATA?.icon || (typeof root?.icon === 'string' ? root.icon : '') || 'odant:structure';
1377
+ },
1378
+ get rootItemLabel() {
1379
+ const root = this._rootItem || this.$item;
1380
+ return root?.DATA?.label || root?.label || root?.id || 'Классы';
1381
+ },
1382
+ get showTabsBar() {
1383
+ return this.hasClassTree ? Boolean(this.formTabs?.length >= 1) : Boolean(this.formTabs?.length > 1);
1384
+ },
1385
+ _initClassTreeDrawer() {
1386
+ const root = this._rootItem || this.$item;
1387
+ if (!this.hasClassTree || !root) {
1388
+ const old = this.querySelector?.('item-tree#formClassTree');
1389
+ if (old)
1390
+ old.remove();
1391
+ if (this.left_drawer) {
1392
+ this._applyingClassTreeState = true;
1393
+ try {
1394
+ this.left_drawer.closed = true;
1395
+ this.classTreeClosed = true;
1396
+ }
1397
+ finally {
1398
+ this._applyingClassTreeState = false;
1399
+ }
1400
+ }
1401
+ return;
1402
+ }
1403
+ let tree = this.querySelector?.('item-tree#formClassTree');
1404
+ if (!tree) {
1405
+ tree = ODA.createComponent('item-tree', {
1406
+ slot: 'left-panel',
1407
+ id: 'formClassTree',
1408
+ order: 0,
1409
+ allowSearch: false,
1410
+ onlyClasses: true,
1411
+ hideFiles: true,
1412
+ hideSystem: true,
1413
+ showSize: false,
1414
+ allowFocus: true,
1415
+ hideRoots: 1,
1416
+ hideTops: 0,
1417
+ $item: root,
1418
+ icon: this.rootItemIcon,
1419
+ label: this.rootItemLabel,
1420
+ execute: (item) => this.onClassTreeSelect(item),
1421
+ });
1422
+ tree.setAttribute('slot', 'left-panel');
1423
+ tree.setAttribute('id', 'formClassTree');
1424
+ tree.setAttribute('order', '0');
1425
+ tree.setAttribute('hide-roots', '1');
1426
+ tree.setAttribute('icon', this.rootItemIcon);
1427
+ tree.setAttribute('label', this.rootItemLabel);
1428
+ tree.style.height = '0';
1429
+ tree.addEventListener('focused-item-changed', (ev) => this.onClassTreeFocusChanged(ev));
1430
+ this.appendChild(tree);
1431
+ }
1432
+ else {
1433
+ tree.$item = root;
1434
+ tree.allowSearch = false;
1435
+ tree.showSize = false;
1436
+ tree.hideRoots = 1;
1437
+ tree.icon = this.rootItemIcon;
1438
+ tree.label = this.rootItemLabel;
1439
+ tree.execute = (item) => this.onClassTreeSelect(item);
1440
+ }
1441
+ const savedClosed = this._loadSavedClassTreeClosed(root);
1442
+ this._applyingClassTreeState = true;
1443
+ try {
1444
+ this.classTreeClosed = savedClosed;
1445
+ if (this.left_drawer)
1446
+ this.left_drawer.closed = savedClosed;
1447
+ }
1448
+ finally {
1449
+ this._applyingClassTreeState = false;
1450
+ }
1451
+ this.async(() => {
1452
+ if (this.left_drawer) {
1453
+ if (!this._leftDrawerObserved) {
1454
+ this._leftDrawerObserved = true;
1455
+ this.left_drawer.addEventListener('closed-changed', () => {
1456
+ if (this._applyingClassTreeState)
1457
+ return;
1458
+ this.classTreeClosed = Boolean(this.left_drawer?.closed);
1459
+ this._saveClassTreeClosed(this.classTreeClosed);
1460
+ });
1461
+ }
1462
+ const targetClosed = this._loadSavedClassTreeClosed(this._rootItem || this.$item);
1463
+ this._applyingClassTreeState = true;
1464
+ try {
1465
+ this.left_drawer.closed = targetClosed;
1466
+ this.classTreeClosed = targetClosed;
1467
+ }
1468
+ finally {
1469
+ this._applyingClassTreeState = false;
1470
+ }
1471
+ if (!targetClosed && typeof tree?.onShow === 'function')
1472
+ tree.onShow();
1473
+ }
1474
+ }, 50);
1475
+ },
1476
+ async syncClassTreeToPath(targetPath) {
1477
+ if (!targetPath || !this.hasClassTree)
1478
+ return;
1479
+ const clean = String(targetPath).replace(/\/~\/handlers\/.*$/, '').replace(/\/+$/, '');
1480
+ if (!clean)
1481
+ return;
1482
+ const attempt = async (tries = 0) => {
1483
+ const tree = this.querySelector?.('item-tree#formClassTree') || this.$?.('#formClassTree');
1484
+ if (!tree || typeof tree.revealPath !== 'function') {
1485
+ if (tries < 15)
1486
+ setTimeout(() => attempt(tries + 1), 60);
1487
+ return;
1488
+ }
1489
+ if (tree.hidden && typeof tree.onShow === 'function') {
1490
+ tree.hidden = false;
1491
+ await tree.onShow();
1492
+ }
1493
+ tree.execute = (item) => this.onClassTreeSelect(item);
1494
+ this._syncingClassTreeFocus = true;
1495
+ try {
1496
+ const found = await tree.revealPath(clean);
1497
+ if (!found && tries < 12) {
1498
+ setTimeout(() => attempt(tries + 1), 80);
1499
+ }
1500
+ }
1501
+ finally {
1502
+ setTimeout(() => { this._syncingClassTreeFocus = false; }, 60);
1503
+ }
1504
+ };
1505
+ attempt(0);
1506
+ },
1507
+ async onClassTreeFocusChanged(e) {
1508
+ if (this._syncingClassTreeFocus || this._initializingItem)
1509
+ return;
1510
+ const item = e?.detail?.value;
1511
+ if (!item || item.type === '$handler' || item.type === '$file')
1512
+ return;
1513
+ await this.onClassTreeSelect(item);
1514
+ },
1515
+ async onClassTreeSelect(item) {
1516
+ if (!item || this._syncingClassTreeFocus || this._initializingItem)
1517
+ return;
1518
+ const targetShort = item.short || item.path || '';
1519
+ const curShort = this.currentItem?.short || this.currentItem?.path || '';
1520
+ if (targetShort && targetShort === curShort && !this.isObjectViewActive) {
1521
+ const existing = (this.formTabs || []).find(t => t.key === targetShort);
1522
+ if (existing && this.activeTabKey === existing.key)
1523
+ return;
1524
+ }
1525
+ if (this._appliedRole && !item.role)
1526
+ item.role = this._appliedRole;
1527
+ await this.openInForm(item, null);
1528
+ },
1529
+ async ensureClassTab(targetItem) {
1530
+ if (!targetItem)
1531
+ return null;
1532
+ if (this._appliedRole && !targetItem.role)
1533
+ targetItem.role = this._appliedRole;
1534
+ await targetItem.ensureRole?.();
1535
+ const viewHandler = await this.resolveView(targetItem.form || '', targetItem);
1536
+ if (!viewHandler)
1537
+ return null;
1538
+ const viewId = viewHandler.id;
1539
+ const key = this._computeTabKey(targetItem, viewId, null);
1540
+ const list = Array.isArray(this.formTabs) ? [...this.formTabs] : [];
1541
+ let tab = list.find(t => t.key === key);
1542
+ if (!tab) {
1543
+ tab = {
1544
+ key,
1545
+ $item: targetItem,
1546
+ viewId,
1547
+ view: viewHandler,
1548
+ nav: null,
1549
+ label: this._computeTabLabel(targetItem, viewHandler, null),
1550
+ icon: this._viewIconOf(viewHandler, targetItem),
1551
+ closable: list.length > 0,
1552
+ };
1553
+ list.push(tab);
1554
+ this.formTabs = list;
1555
+ if (!this.activeTabKey)
1556
+ this.activeTabKey = key;
1557
+ }
1558
+ return tab;
1559
+ },
1560
+ async _handleNavigationTarget(nav = {}, { isInitial = false } = {}) {
1561
+ const root = this._rootItem || this.$item;
1562
+ if (!root)
1563
+ return;
1564
+ const rootShort = root.short || root.path || '';
1565
+ const targetPath = String(nav?.targetClassPath || rootShort).replace(/\/+$/, '');
1566
+ let targetItem = root;
1567
+ if (targetPath && targetPath !== rootShort && typeof WORK?.get_item === 'function') {
1568
+ const loaded = await WORK.get_item(targetPath).catch(() => null);
1569
+ if (loaded)
1570
+ targetItem = loaded;
1571
+ }
1572
+ const isObjectAction = Boolean(nav?.view === 'objects/object' || nav?.create || nav?.id || nav?.copyFrom);
1573
+ if (this._appliedRole)
1574
+ targetItem.role = this._appliedRole;
1575
+ else
1576
+ await targetItem.ensureRole?.();
1577
+
1578
+ if (this.hasClassTree)
1579
+ this.syncClassTreeToPath(targetItem.short || targetItem.path || targetPath);
1580
+
1581
+ if (isObjectAction) {
1582
+ await this.ensureClassTab(targetItem);
1583
+ const clsLabel = targetItem.DATA?.label || targetItem.label || targetItem.id || targetPath.split('/').pop() || 'Объект';
1584
+ const fmtNew = globalThis.__workClassPicker?.formatNewObjectLabel || globalThis.WORK?.formatNewObjectLabel;
1585
+ const objLabel = nav.label || (nav.create ? (typeof fmtNew === 'function' ? fmtNew(clsLabel) : `Новый ${clsLabel.toLowerCase()}`) : '');
1586
+ const objNav = { ...nav, view: 'objects/object' };
1587
+ if (objLabel)
1588
+ objNav.label = objLabel;
1589
+ delete objNav.targetClassPath;
1590
+ await this.openInForm(targetItem, objNav, { skipEnsureCurrent: true });
1591
+ }
1592
+ else {
1593
+ const clsNav = nav?.view ? { ...nav } : null;
1594
+ if (clsNav)
1595
+ delete clsNav.targetClassPath;
1596
+ await this.openInForm(targetItem, clsNav, { skipEnsureCurrent: isInitial });
1597
+ }
1598
+ },
1599
+ async _applyRoleColor() {
1600
+ document.documentElement?.style?.removeProperty('--main-color');
1601
+ },
1602
+ _mountSeq: 0,
1603
+ formTabs: [],
1604
+ activeTabKey: '',
1605
+ get formTabItems() {
1606
+ void this.focusedStateVersion;
1607
+ const list = Array.isArray(this.formTabs) ? this.formTabs : [];
1608
+ return list.map((t, idx) => {
1609
+ const ctrl = t.control || this.controls[`${t.key}::${t.viewId}`];
1610
+ const isActive = t.key === this.activeTabKey;
1611
+ const isDirty = isActive
1612
+ ? Boolean(this.allowSave && this.isViewChanged)
1613
+ : Boolean(ctrl && typeof ctrl.isDirty === 'function' && ctrl.isDirty());
1614
+ return {
1615
+ key: t.key,
1616
+ label: t.label,
1617
+ title: t.label,
1618
+ icon: t.icon || 'icons:dashboard',
1619
+ closable: list.length > 1 && t.closable !== false,
1620
+ dirty: isDirty,
1621
+ _index: idx,
1622
+ };
1623
+ });
1624
+ },
1625
+ get formFocusedTabIndex() {
1626
+ const list = Array.isArray(this.formTabs) ? this.formTabs : [];
1627
+ return list.findIndex(t => t.key === this.activeTabKey);
1628
+ },
1629
+ _notifyParentDirty() {
1630
+ if (typeof window === 'undefined' || window.parent === window)
1631
+ return;
1632
+ try {
1633
+ const anyDirty = this.formTabItems.some(t => t.dirty) || Boolean(this.allowSave && this.isViewChanged);
1634
+ window.parent.postMessage({
1635
+ type: 'work:form-dirty',
1636
+ url: window.location.href,
1637
+ dirty: anyDirty,
1638
+ }, window.location.origin);
1639
+ }
1640
+ catch { /* ignore */ }
1641
+ },
1642
+ onFormTabSelect(e) {
1643
+ const idx = e?.detail?.index;
1644
+ const tab = Number.isInteger(idx) ? this.formTabs?.[idx] : null;
1645
+ if (tab)
1646
+ this.activateTab(tab);
1647
+ },
1648
+ onFormTabClose(e) {
1649
+ e?.preventDefault?.();
1650
+ const idx = e?.detail?.index;
1651
+ const tab = Number.isInteger(idx) ? this.formTabs?.[idx] : null;
1652
+ if (tab)
1653
+ this.closeTab(tab, e);
1654
+ },
1655
+ onFormTabsReorder(e) {
1656
+ const nextItems = e?.detail?.items;
1657
+ if (!Array.isArray(nextItems))
1658
+ return;
1659
+ const byKey = new Map((this.formTabs || []).map(t => [t.key, t]));
1660
+ const reordered = nextItems.map(it => byKey.get(it?.key)).filter(Boolean);
1661
+ if (reordered.length === (this.formTabs || []).length)
1662
+ this.formTabs = reordered;
1663
+ },
1664
+ async _closeTabSubset(pred) {
1665
+ const list = Array.isArray(this.formTabs) ? [...this.formTabs] : [];
1666
+ const targets = [];
1667
+ for (let i = 0; i < list.length; i++) {
1668
+ const t = list[i];
1669
+ if (t.closable === false)
1670
+ continue;
1671
+ if (pred(t, i))
1672
+ targets.push(t);
1673
+ }
1674
+ if (!targets.length)
1675
+ return;
1676
+ for (const t of targets) {
1677
+ const ctrl = t.control || this.controls[`${t.key}::${t.viewId}`];
1678
+ if (ctrl && typeof ctrl.isDirty === 'function' && ctrl.isDirty()) {
1679
+ if (typeof ctrl.confirmClose === 'function') {
1680
+ const canClose = await ctrl.confirmClose();
1681
+ if (!canClose)
1682
+ return;
1683
+ }
1684
+ }
1685
+ }
1686
+ const removeKeys = new Set(targets.map(t => t.key));
1687
+ for (const t of targets) {
1688
+ for (const k of Object.keys(this.controls)) {
1689
+ if (k === t.key || k.startsWith(t.key + '::')) {
1690
+ const c = this.controls[k];
1691
+ if (c && this.contains(c))
1692
+ this.removeChild(c);
1693
+ delete this.controls[k];
1694
+ }
1695
+ }
1696
+ }
1697
+ const remaining = list.filter(t => !removeKeys.has(t.key));
1698
+ if (!remaining.length)
1699
+ return;
1700
+ this.formTabs = remaining;
1701
+ if (!remaining.some(t => t.key === this.activeTabKey)) {
1702
+ await this.activateTab(remaining[remaining.length - 1]);
1703
+ }
1704
+ this._notifyParentDirty();
1705
+ },
1706
+ async onFormCloseOthers(e) {
1707
+ e?.preventDefault?.();
1708
+ const keepKey = e?.detail?.item?.key || this.formTabs?.[e?.detail?.index]?.key;
1709
+ if (keepKey)
1710
+ await this._closeTabSubset(t => t.key !== keepKey);
1711
+ },
1712
+ async onFormCloseRight(e) {
1713
+ e?.preventDefault?.();
1714
+ const idx = e?.detail?.index;
1715
+ if (Number.isInteger(idx) && idx >= 0)
1716
+ await this._closeTabSubset((_, i) => i > idx);
1717
+ },
1718
+ _newObjSeq: 0,
1719
+ topMainToolItems: [],
1720
+ topFocusedToolItems: [],
1721
+ mainToolItems: [],
1722
+ focusedToolItems: [],
1723
+ hasSlottedToolbar: false,
1724
+ focusedStateVersion: 0,
1725
+ fallbackFocusedItem: null,
1726
+ get isObjectViewActive() {
1727
+ return Boolean(this.view?.id === 'object' || this.view_control?.isObjectView);
1728
+ },
1729
+ get allowSave() {
1730
+ void this.focusedStateVersion;
1731
+ const vc = this.view_control;
1732
+ if (vc && typeof vc.allowSave === 'boolean')
1733
+ return vc.allowSave;
1734
+ const v = this.view;
1735
+ if (!v)
1736
+ return false;
1737
+ if (typeof v.DATA?.allowSave === 'boolean')
1738
+ return v.DATA.allowSave;
1739
+ return false;
1740
+ },
1741
+ get isViewChanged() {
1742
+ void this.focusedStateVersion;
1743
+ const vc = this.view_control;
1744
+ if (vc && typeof vc.isChanged === 'boolean')
1745
+ return vc.isChanged;
1746
+ if (vc && typeof vc.isDirty === 'function')
1747
+ return Boolean(vc.canSave !== false && vc.isDirty());
1748
+ return Boolean(this.currentItem?.isChanged);
1749
+ },
1750
+ get hasToolbar() {
1751
+ if (this.view?.allowTools === false || this.view?.DATA?.allowTools === false)
1752
+ return false;
1753
+ return Boolean(this.topMainToolItems?.length || this.topFocusedToolItems?.length || this.hasSlottedToolbar);
1754
+ },
1755
+ get hasTopArea() {
1756
+ return Boolean(this.showTabsBar || this.hasToolbar);
1757
+ },
1758
+ get hasFooter() {
1759
+ return Boolean(this.dialog || this.isObjectViewActive || this.focusedToolItems?.length);
1760
+ },
1761
+ _checkToolbarSlots() {
1762
+ const names = ['tool-left', 'tool-center', 'tool-right'];
1763
+ const slotted = names.some(name => {
1764
+ const slot = this.$?.(`slot[name="${name}"]`);
1765
+ return (slot?.assignedElements?.()?.length || 0) > 0;
1766
+ });
1767
+ const direct = Boolean(this.$?.('#formToolbar [data-toolbar-widget]'));
1768
+ this.hasSlottedToolbar = slotted || direct;
1769
+ },
1770
+ onToolsListChanged(prop, e) {
1771
+ this[prop] = e?.detail?.value || [];
1772
+ this.async(() => this._wakeBars(), 5);
1773
+ },
1774
+ _wakeBars() {
1775
+ for (const sel of ['#formHeader', '#formTabsBar', '#formToolbar', '#topMainTools', '#topFocusedTools', '#formFooter', '#focusedTools']) {
1776
+ const node = this.$?.(sel);
1777
+ if (node) {
1778
+ if (node[R]?.states)
1779
+ node[R].states.sleep = false;
1780
+ node.render?.(true);
1781
+ }
1782
+ }
1783
+ },
1784
+ syncFromView(vc = this.view_control) {
1785
+ if (!vc || (this.view_control && vc !== this.view_control))
1786
+ return;
1787
+ this.fallbackFocusedItem = vc.fallbackFocusedItem || null;
1788
+ this.focusedItem = vc.$focusedItem !== undefined ? vc.$focusedItem : (vc.focusedItem || null);
1789
+ this.focusedStateVersion++;
1790
+ for (const [sel, isFocused] of [['#topMainTools', false], ['#topFocusedTools', true], ['#focusedTools', true]]) {
1791
+ const t = this.$?.(sel);
1792
+ if (t) {
1793
+ t.$item = this.currentItem;
1794
+ if (isFocused) {
1795
+ t.fallbackItem = this.fallbackFocusedItem;
1796
+ t.targetItem = this.focusedItem;
1797
+ }
1798
+ t.stateVersion = this.focusedStateVersion;
1799
+ t._scheduleSync?.();
1800
+ }
1801
+ }
1802
+ this.async(() => this._wakeBars(), 10);
1803
+ this._notifyParentDirty();
1804
+ },
1805
+ get $focusedItem() {
1806
+ return this.focusedItem;
1807
+ },
1808
+ set $focusedItem(n) {
1809
+ this.focusedItem = n;
1810
+ },
1811
+ focusedItem: {
1812
+ $def: null,
1813
+ set(n) {
1814
+ for (const sel of ['#topFocusedTools', '#focusedTools']) {
1815
+ const ft = this.$?.(sel);
1816
+ if (ft) {
1817
+ ft.targetItem = n;
1818
+ ft._scheduleSync?.();
1819
+ }
1820
+ }
1821
+ this.async(() => this._wakeBars(), 5);
1822
+ }
1823
+ },
1824
+ /** Роль формы — эффективная роль элемента (общая предпочитаемая + доступность). */
1825
+ get activeRole() {
1826
+ return this.currentItem?.role || '';
1827
+ },
1828
+ /** Роль для $observers: читает currentItem.role, меняется вместе с ней. */
1829
+ get itemRole() {
1830
+ return this.currentItem?.role;
1831
+ },
1832
+ $observers: {
1833
+ // смена роли (из формы, меню или другого окна): цвет страницы,
1834
+ // пересоздание представлений и перепроверка вида
1835
+ async _roleChanged(itemRole) {
1836
+ if (this._initializingItem)
1837
+ return;
1838
+ const cur = this.currentItem;
1839
+ if (!cur || !itemRole)
1840
+ return;
1841
+ if (this._appliedRoleItem === cur && this._appliedRole === itemRole)
1842
+ return;
1843
+ this._appliedRoleItem = cur;
1844
+ this._appliedRole = itemRole;
1845
+ this._applyRoleColor(cur, itemRole);
1846
+ // Сброс кэша представлений — каждое пересоздаётся заново,
1847
+ // чтобы перезагрузить логи и данные по новой роли
1848
+ for (const id in this.controls) {
1849
+ const el = this.controls[id];
1850
+ // remove() не вызываем: представление может затенять его
1851
+ // своим методом (как objects.remove — удаление объекта)
1852
+ if (el?.isConnected)
1853
+ el.parentNode?.removeChild(el);
1854
+ }
1855
+ this.controls = {};
1856
+ this.view_control = undefined;
1857
+ // formViews пересчитается сам (зависимость от activeRole).
1858
+ if (this.view) {
1859
+ const id = this.view.id;
1860
+ this.view = undefined;
1861
+ this.view = await this.resolveView(id);
1862
+ }
1863
+ }
1864
+ },
1865
+ get _savePath() {
1866
+ return
1867
+ },
1868
+ modal: false,
1869
+ dialog: false,
1870
+ get isTop() {
1871
+ return window === top;
1872
+ },
1873
+ toggleFullscreen(e) {
1874
+ if (document.fullscreenElement) {
1875
+ document.exitFullscreen?.();
1876
+ }
1877
+ else {
1878
+ this.view_control?.requestFullscreen?.({ keyboardLock: 'browser' }).catch(e => console.error(e));
1879
+ }
1880
+ },
1881
+ async close(e) {
1882
+ if (this.$item?.isChanged) {
1883
+ const el = ODA.createElement('item-confirm', { $item: this.$item, message: 'Закрыть и ...' });
1884
+ const result = await WORK.showDialog(el, { $item: this.$item, allowClose: true, OK: null, BUTTONS: [{ label: 'Сохранить', icon: 'icons:save', success: true }, { label: 'Не сохранять', icon: 'icons:delete', error: true }] });
1885
+ switch (result) {
1886
+ case 1: { this.save(); } break;
1887
+ case 2: break;
1888
+ default: return;
1889
+ }
1890
+ }
1891
+ if (document.fullscreenElement) {
1892
+ await document.exitFullscreen?.();
1893
+ }
1894
+ this.parentElement?.fire('close', true);
1895
+ if (!this.modal)
1896
+ window.parent?.close(window);
1897
+ },
1898
+ saving: false,
1899
+ saveError: null,
1900
+ save(e) {
1901
+ if (this.saving) return;
1902
+ this.saveError = null;
1903
+ this.saving = true;
1904
+ this.async(async () => {
1905
+ try {
1906
+ if (this.view_control?.save) {
1907
+ await this.view_control?.save();
1908
+ } else {
1909
+ const saveParams = this.activeRole ? { role: this.activeRole } : {};
1910
+ await this.$item.save(this.view_control?.body, saveParams);
1911
+ }
1912
+ }
1913
+ catch (err) {
1914
+ this.saveError = err;
1915
+ }
1916
+ finally {
1917
+ this.saving = false;
1918
+ }
1919
+ }, 100)
1920
+ },
1921
+ switchView(handler, e) {
1922
+ e?.stopPropagation?.();
1923
+ e?.preventDefault?.();
1924
+ if (this.view?.id === handler.id) return;
1925
+ if (this.host)
1926
+ this.host.view_name = handler.id;
1927
+ this.view = handler;
1928
+ },
1929
+ _viewIconOf(viewHandler, $item) {
1930
+ const map = {
1931
+ sheet: 'odant:grid',
1932
+ analysis: 'odant:grid',
1933
+ turnovers: 'odant:calendar',
1934
+ journal: 'odant:calendar',
1935
+ postings: 'icons:list',
1936
+ objects: 'odant:grid',
1937
+ object: 'icons:description',
1938
+ virtual: 'odant:grid',
1939
+ folder: 'fontawesome:r-folder-open',
1940
+ editor: 'icons:code',
1941
+ staff: 'icons:supervisor-account',
1942
+ messengers: 'communication:phonelink-ring',
1943
+ search: 'icons:search',
1944
+ chat: 'communication:forum',
1945
+ calendar: 'icons:event',
1946
+ email: 'communication:email',
1947
+ };
1948
+ const id = viewHandler?.id || '';
1949
+ const itemIcon = $item?.DATA?.icon || (typeof $item?.icon === 'string' ? $item.icon : '');
1950
+ if ((id === 'objects' || id === 'virtual') && itemIcon)
1951
+ return itemIcon;
1952
+ const dataIcon = viewHandler?.DATA?.icon;
1953
+ if (typeof dataIcon === 'string' && dataIcon)
1954
+ return dataIcon;
1955
+ if (map[id])
1956
+ return map[id];
1957
+ const rawIcon = viewHandler?.icon;
1958
+ if (typeof rawIcon === 'string' && rawIcon && !rawIcon.includes('folder'))
1959
+ return rawIcon;
1960
+ return itemIcon || 'icons:dashboard';
1961
+ },
1962
+ _computeTabKey($item, viewId, nav = null) {
1963
+ const short = $item?.short || $item?.path || '';
1964
+ if (viewId === 'object') {
1965
+ const objKey = nav?.id ? `id:${nav.id}` : nav?.copyFrom ? `copy:${nav.copyFrom}` : `new:${nav?._seq || (++this._newObjSeq)}`;
1966
+ if (nav && !nav.id && !nav.copyFrom && !nav._seq)
1967
+ nav._seq = Number(objKey.slice(4));
1968
+ return `${short}::object::${objKey}`;
1969
+ }
1970
+ return `${short}`;
1971
+ },
1972
+ _computeTabLabel($item, viewHandler, nav = null) {
1973
+ if (nav?.label)
1974
+ return String(nav.label);
1975
+ const code = ($item?.short || $item?.path || '').split('/').pop() || '';
1976
+ const dated = ($item instanceof CORE.$file || CORE?.$file?.parseDatedFileName?.(code))
1977
+ ? CORE?.$file?.formatDatedFileLabel?.($item?.id || code, $item?.DATA?.label)
1978
+ : '';
1979
+ if (dated)
1980
+ return dated;
1981
+ const rawLabel = $item?.DATA?.label || $item?.label || $item?.id || code || 'Форма';
1982
+ const isAcc = /^\d+(?:\.\d+)?$/.test(code);
1983
+ const itemTitle = (isAcc && code && !String(rawLabel).startsWith(code + ' ') && String(rawLabel) !== code)
1984
+ ? `${code} ${rawLabel}`
1985
+ : String(rawLabel);
1986
+ return itemTitle;
1987
+ },
1988
+ _ensureCurrentTab(viewHandler = this.view, nav = null) {
1989
+ const curItem = this.currentItem;
1990
+ if (!curItem || !viewHandler)
1991
+ return null;
1992
+ const viewId = viewHandler.id || '';
1993
+ const list = Array.isArray(this.formTabs) ? [...this.formTabs] : [];
1994
+ if (list.length === 0) {
1995
+ const key = this._computeTabKey(curItem, viewId, nav);
1996
+ const rootTab = {
1997
+ key,
1998
+ $item: curItem,
1999
+ viewId,
2000
+ view: viewHandler,
2001
+ nav: nav || null,
2002
+ label: this._computeTabLabel(curItem, viewHandler, nav),
2003
+ icon: this._viewIconOf(viewHandler, curItem),
2004
+ closable: false,
2005
+ };
2006
+ this.formTabs = [rootTab];
2007
+ this.activeTabKey = key;
2008
+ return rootTab;
2009
+ }
2010
+ let cur = list.find(t => t.key === this.activeTabKey);
2011
+ if (cur && cur.$item === curItem && cur.viewId !== 'object' && viewId !== 'object') {
2012
+ cur.viewId = viewId;
2013
+ cur.view = viewHandler;
2014
+ cur.icon = this._viewIconOf(viewHandler, curItem);
2015
+ this.formTabs = [...list];
2016
+ }
2017
+ return cur || list[0];
2018
+ },
2019
+ updateActiveTabLabel(newLabel) {
2020
+ if (!newLabel || !Array.isArray(this.formTabs))
2021
+ return;
2022
+ const list = [...this.formTabs];
2023
+ const cur = list.find(t => t.key === this.activeTabKey);
2024
+ if (cur && cur.label !== newLabel) {
2025
+ cur.label = String(newLabel);
2026
+ this.formTabs = list;
2027
+ }
2028
+ },
2029
+ async openInForm(targetItem, rawNav = null, opts = {}) {
2030
+ if (!targetItem)
2031
+ return;
2032
+ if (this._appliedRole && !targetItem.role)
2033
+ targetItem.role = this._appliedRole;
2034
+ await targetItem.ensureRole?.();
2035
+ const nav = rawNav && typeof rawNav === 'object' ? { ...rawNav } : {};
2036
+ if (nav.view === 'objects' && nav.id) {
2037
+ nav.view = 'objects/object';
2038
+ }
2039
+ // Сохраним позицию прокрутки ленты чата до изменения полосы вкладок (formTabs)
2040
+ const curRib = this.view_control?.$?.('form-chat')?.$?.('oda-chat')?.$?.('#ribbon');
2041
+ if (curRib && curRib.clientHeight > 0 && !curRib._wasHidden) {
2042
+ curRib._savedScrollTop = curRib.scrollTop;
2043
+ curRib._wasHidden = true;
2044
+ }
2045
+ // Зафиксируем текущую (начальную) вкладку перед открытием дочерней
2046
+ if (!opts?.skipEnsureCurrent && this.view)
2047
+ this._ensureCurrentTab(this.view);
2048
+
2049
+ const targetViewName = nav.view || targetItem.form || '';
2050
+ const viewHandler = await this.resolveView(targetViewName, targetItem);
2051
+ if (!viewHandler)
2052
+ return;
2053
+ const viewId = viewHandler.id;
2054
+ const key = this._computeTabKey(targetItem, viewId, nav);
2055
+ const list = Array.isArray(this.formTabs) ? [...this.formTabs] : [];
2056
+ let tab = list.find(t => t.key === key);
2057
+ if (!tab) {
2058
+ tab = {
2059
+ key,
2060
+ $item: targetItem,
2061
+ viewId,
2062
+ view: viewHandler,
2063
+ nav,
2064
+ label: this._computeTabLabel(targetItem, viewHandler, nav),
2065
+ icon: this._viewIconOf(viewHandler, targetItem),
2066
+ closable: list.length > 0,
2067
+ };
2068
+ list.push(tab);
2069
+ this.formTabs = list;
2070
+ }
2071
+ else {
2072
+ tab.nav = nav;
2073
+ tab.viewId = viewId;
2074
+ tab.view = viewHandler;
2075
+ tab.icon = this._viewIconOf(viewHandler, targetItem);
2076
+ if (nav.label)
2077
+ tab.label = String(nav.label);
2078
+ this.formTabs = list;
2079
+ }
2080
+ await this.activateTab(tab, Object.keys(nav).length ? nav : null);
2081
+ },
2082
+ async activateTab(tab, explicitNav = null) {
2083
+ if (!tab || !tab.$item)
2084
+ return;
2085
+ if (this.activeTabKey && tab.key !== this.activeTabKey && this.view_control && this.view_control !== tab.control) {
2086
+ const curRib = this.view_control?.$?.('form-chat')?.$?.('oda-chat')?.$?.('#ribbon');
2087
+ if (curRib && curRib.clientHeight > 0 && !curRib._wasHidden) {
2088
+ curRib._savedScrollTop = curRib.scrollTop;
2089
+ curRib._wasHidden = true;
2090
+ }
2091
+ }
2092
+ this.activeTabKey = tab.key;
2093
+ this.activeItem = tab.$item;
2094
+ if (this.hasClassTree) {
2095
+ const tabShort = tab.$item?.short || tab.$item?.path || '';
2096
+ if (tabShort)
2097
+ this.syncClassTreeToPath(tabShort);
2098
+ }
2099
+ const viewHandler = tab.view || await this.resolveView(tab.viewId, tab.$item);
2100
+ if (!viewHandler)
2101
+ return;
2102
+ tab.view = viewHandler;
2103
+ tab.viewId = viewHandler.id;
2104
+ tab.icon = this._viewIconOf(viewHandler, tab.$item);
2105
+ if (explicitNav)
2106
+ this._pendingNav = explicitNav;
2107
+ if (this.view === viewHandler) {
2108
+ await this._mountActiveView(viewHandler);
2109
+ }
2110
+ else {
2111
+ this.view = viewHandler;
2112
+ }
2113
+ },
2114
+ async closeTab(tab, e) {
2115
+ e?.stopPropagation?.();
2116
+ const list = Array.isArray(this.formTabs) ? [...this.formTabs] : [];
2117
+ const idx = list.findIndex(t => t.key === tab?.key);
2118
+ if (idx < 0 || list.length <= 1)
2119
+ return;
2120
+ const targetTab = list[idx];
2121
+ const ctrl = targetTab.control || this.controls[`${targetTab.key}::${targetTab.viewId}`];
2122
+ if (ctrl && typeof ctrl.isDirty === 'function' && ctrl.isDirty()) {
2123
+ if (typeof ctrl.confirmClose === 'function') {
2124
+ const canClose = await ctrl.confirmClose();
2125
+ if (!canClose)
2126
+ return;
2127
+ }
2128
+ }
2129
+ if (ctrl && this.contains(ctrl))
2130
+ this.removeChild(ctrl);
2131
+ for (const k of Object.keys(this.controls)) {
2132
+ if (k === targetTab.key || k.startsWith(targetTab.key + '::')) {
2133
+ const c = this.controls[k];
2134
+ if (c && this.contains(c))
2135
+ this.removeChild(c);
2136
+ delete this.controls[k];
2137
+ }
2138
+ }
2139
+ list.splice(idx, 1);
2140
+ this.formTabs = list;
2141
+ if (this.activeTabKey === targetTab.key && list.length) {
2142
+ const nextTab = list[Math.max(0, idx - 1)];
2143
+ await this.activateTab(nextTab);
2144
+ }
2145
+ this._notifyParentDirty();
2146
+ },
2147
+ async closeAllTabs(e) {
2148
+ e?.preventDefault?.();
2149
+ e?.stopPropagation?.();
2150
+ await this._closeTabSubset(() => true);
2151
+ },
2152
+ async closeActiveTab(reloadPrevious = false) {
2153
+ const list = Array.isArray(this.formTabs) ? [...this.formTabs] : [];
2154
+ const idx = list.findIndex(t => t.key === this.activeTabKey);
2155
+ if (idx <= 0)
2156
+ return;
2157
+ const targetTab = list[idx];
2158
+ for (const k of Object.keys(this.controls)) {
2159
+ if (k === targetTab.key || k.startsWith(targetTab.key + '::')) {
2160
+ const c = this.controls[k];
2161
+ if (c && this.contains(c))
2162
+ this.removeChild(c);
2163
+ delete this.controls[k];
2164
+ }
2165
+ }
2166
+ list.splice(idx, 1);
2167
+ this.formTabs = list;
2168
+ const nextTab = list[Math.max(0, idx - 1)];
2169
+ if (nextTab) {
2170
+ await this.activateTab(nextTab);
2171
+ if (reloadPrevious && nextTab.control && typeof nextTab.control.reload === 'function') {
2172
+ await nextTab.control.reload();
2173
+ }
2174
+ }
2175
+ this._notifyParentDirty();
2176
+ },
2177
+ async reloadSiblingLists() {
2178
+ const list = Array.isArray(this.formTabs) ? this.formTabs : [];
2179
+ for (const t of list) {
2180
+ if (t.key !== this.activeTabKey && t.control && typeof t.control.reload === 'function') {
2181
+ await t.control.reload();
2182
+ }
2183
+ }
2184
+ },
2185
+ async onObjectOk() {
2186
+ const vc = this.view_control;
2187
+ if (!vc)
2188
+ return;
2189
+ if (typeof vc.saveAndClose === 'function') {
2190
+ await vc.saveAndClose();
2191
+ return;
2192
+ }
2193
+ if (typeof vc.save === 'function') {
2194
+ const ok = await vc.save();
2195
+ if (!ok)
2196
+ return;
2197
+ }
2198
+ await this.closeActiveTab(true);
2199
+ },
2200
+ async onObjectClose() {
2201
+ const list = Array.isArray(this.formTabs) ? this.formTabs : [];
2202
+ const cur = list.find(t => t.key === this.activeTabKey);
2203
+ if (cur && cur.closable) {
2204
+ await this.closeTab(cur);
2205
+ return;
2206
+ }
2207
+ await this.close();
2208
+ },
2209
+ ok(e) {
2210
+ alert('ok')
2211
+ },
2212
+ cancel(e) {
2213
+ alert('cancel')
2214
+ },
2215
+ controls: {},
2216
+ async _mountActiveView(n) {
2217
+ if (!n) return;
2218
+ const seq = ++this._mountSeq;
2219
+ this._captureCurrentViewPeriod();
2220
+ const curItem = this.currentItem;
2221
+ const rawNav = this._pendingNav || this._takeNav(curItem?.short || curItem?.path);
2222
+ const nav = this._withFormPeriod(rawNav);
2223
+ const curTab = this._ensureCurrentTab(n, rawNav);
2224
+ const tabItem = curTab?.$item || curItem;
2225
+ const cacheKey = `${curTab?.key || (tabItem?.short || '')}::${n.id}`;
2226
+ let el = this.controls[cacheKey];
2227
+
2228
+ const showOnlyMainChild = (keepEl) => {
2229
+ for (const ch of [...this.children]) {
2230
+ if (ch.getAttribute?.('slot') === 'main' && ch !== keepEl) {
2231
+ if (!ch.hidden && ch.style.display !== 'none') {
2232
+ const rib = ch.$?.('form-chat')?.$?.('oda-chat')?.$?.('#ribbon');
2233
+ if (rib && rib.clientHeight > 0 && !rib._wasHidden) {
2234
+ rib._savedScrollTop = rib.scrollTop;
2235
+ rib._wasHidden = true;
2236
+ }
2237
+ }
2238
+ ch.hidden = true;
2239
+ ch.style.display = 'none';
2240
+ }
2241
+ }
2242
+ if (keepEl && keepEl.getAttribute?.('slot') === 'main') {
2243
+ keepEl.hidden = false;
2244
+ keepEl.style.display = '';
2245
+ const rib = keepEl.$?.('form-chat')?.$?.('oda-chat')?.$?.('#ribbon');
2246
+ if (rib && typeof rib.restoreScrollPosition === 'function')
2247
+ rib.restoreScrollPosition();
2248
+ }
2249
+ };
2250
+
2251
+ let isNewEl = false;
2252
+ if (!el) {
2253
+ const mod = await n.importView();
2254
+ if (seq !== this._mountSeq || this.view !== n)
2255
+ return;
2256
+ el = this.controls[cacheKey];
2257
+ if (!el) {
2258
+ isNewEl = true;
2259
+ if (mod && mod.is) {
2260
+ if (!customElements.get(mod.is)) {
2261
+ console.error(`[work-form] вид '${n.id}' не зарегистрирован как <${mod.is}>`);
2262
+ return;
2263
+ }
2264
+ el = ODA.createComponent(mod.is, { $item: tabItem, $context: tabItem, slot: 'main', $handler: n });
2265
+ }
2266
+ else if (n.layout || n.DATA?.layout || (Array.isArray(n.DATA?.items) && n.DATA.items.length)) {
2267
+ el = ODA.createComponent('work-subview-container', {
2268
+ $item: tabItem,
2269
+ $context: tabItem,
2270
+ slot: 'main',
2271
+ $handler: n,
2272
+ layout: n.layout || n.DATA?.layout || 'sidebar',
2273
+ role: this.activeRole,
2274
+ subViewPath: nav?.subView || '',
2275
+ depth: 0,
2276
+ });
2277
+ }
2278
+ else {
2279
+ return;
2280
+ }
2281
+ el.setAttribute('slot', 'main');
2282
+ el.$form = this;
2283
+ if (nav) {
2284
+ el._initialNav = nav;
2285
+ this._pendingNav = null;
2286
+ if (typeof el._applyNavFields === 'function') {
2287
+ try { el._applyNavFields(nav); } catch { /* ignore */ }
2288
+ }
2289
+ }
2290
+ this.controls[cacheKey] = el;
2291
+ }
2292
+ if (!el.isConnected)
2293
+ this.appendChild(el);
2294
+ showOnlyMainChild(el);
2295
+ }
2296
+ else {
2297
+ if (!el.isConnected)
2298
+ this.appendChild(el);
2299
+ showOnlyMainChild(el);
2300
+ }
2301
+ el.$form = this;
2302
+ if (curTab) {
2303
+ curTab.control = el;
2304
+ curTab.viewId = n.id;
2305
+ curTab.view = n;
2306
+ curTab.icon = this._viewIconOf(n, tabItem);
2307
+ }
2308
+ for (const oldSlotEl of [
2309
+ ...this.querySelectorAll('[slot="tool-left"], [slot="tool-center"], [slot="tool-right"], [slot="footer-left"]'),
2310
+ ...(this.$?.('#formToolbar')?.querySelectorAll?.('[data-toolbar-widget]') || []),
2311
+ ]) {
2312
+ if (oldSlotEl._ownerView && oldSlotEl._ownerView !== el)
2313
+ oldSlotEl.remove();
2314
+ }
2315
+ this.saveError = null;
2316
+ this.focusedToolItems = [];
2317
+ this.topMainToolItems = [];
2318
+ this.topFocusedToolItems = [];
2319
+ this.view_control = el;
2320
+ if (el[R]?.states)
2321
+ el[R].states.sleep = false;
2322
+ if (isNewEl)
2323
+ el.render?.(true);
2324
+ if (n.allowTools !== false && n.DATA?.allowTools !== false)
2325
+ el.mountToolbarSlots?.(this);
2326
+ this._checkToolbarSlots();
2327
+ this.syncFromView(el);
2328
+ this._wakeBars();
2329
+ if (this.host)
2330
+ this.host.view_name = n.id;
2331
+ if (rawNav && this._pendingNav === rawNav && el._attachedDone && typeof el?.applyNav === 'function') {
2332
+ this._pendingNav = null;
2333
+ Promise.resolve(el.applyNav(nav)).catch(err => console.error(err));
2334
+ }
2335
+ else if (!isNewEl && this.formPeriod && el._attachedDone && typeof el?.syncFormPeriod === 'function') {
2336
+ Promise.resolve(el.syncFormPeriod(this.formPeriod)).catch(err => console.error(err));
2337
+ }
2338
+ try {
2339
+ const exp = window.top?.explorer || window.parent?.explorer;
2340
+ const cons = exp?.$?.('#consultant') || exp?.$?.('item-consultant');
2341
+ if (cons) {
2342
+ const ctx = this.buildConsultantContext();
2343
+ cons.activeFormContext = ctx;
2344
+ cons.activeFormSummary = ctx;
2345
+ }
2346
+ } catch { /* ignore */ }
2347
+ },
2348
+ view: {
2349
+ async set(n) {
2350
+ await this._mountActiveView(n);
2351
+ }
2352
+ },
2353
+ $listeners: {
2354
+ fullscreenchange(e) {
2355
+ if (document.fullscreenElement !== this) {
2356
+ this.fullScreen = false;
2357
+ }
2358
+ }
2359
+ }
2360
+ });
2361
+
2362
+ ODA({
2363
+ is: 'call-users-list',
2364
+ template: /*html*/`
2365
+ <style>
2366
+ :host{
2367
+ @apply --vertical;
2368
+ overflow: hidden;
2369
+ min-width: 300px;
2370
+
2371
+ .filter-box{
2372
+ @apply --horizontal;
2373
+ @apply --header;
2374
+ @apply --no-flex;
2375
+ padding: 4px;
2376
+
2377
+ input{
2378
+ @apply --flex;
2379
+ @apply --content;
2380
+ margin: auto;
2381
+ padding: 8px;
2382
+ width: 0px;
2383
+ border: none;
2384
+ outline: none;
2385
+ border-radius: 2em;
2386
+ }
2387
+ }
2388
+
2389
+ .users-box{
2390
+ @apply --vertical;
2391
+ overflow-x: hidden;
2392
+ text-overflow: ellipsis;
2393
+ overflow-y: auto;
2394
+ gap: 4px;
2395
+ padding: 8px;
2396
+ min-height: calc(52px * 5);
2397
+
2398
+ .user-row{
2399
+ @apply --horizontal;
2400
+ align-items: center;
2401
+ min-height: fit-content;
2402
+ flex-wrap: nowrap;
2403
+ overflow: hidden;
2404
+ text-overflow: ellipsis;
2405
+ border-radius: 0em;
2406
+ padding: 0px 3px;
2407
+ transition: border-radius, background-color 0.3s ease;
2408
+
2409
+ &[selected]{
2410
+ border-radius: 2em;
2411
+ }
2412
+
2413
+ item-node{
2414
+ pointer-events: none;
2415
+ }
2416
+ }
2417
+ .nope-row{
2418
+ text-align: center;
2419
+ opacity: 0.25;
2420
+ }
2421
+
2422
+ }
2423
+ }
2424
+ </style>
2425
+ <div ~if="users?.length" class="filter-box">
2426
+ <input type="search" ::value="filterVal" placeholder="filter">
2427
+ </div>
2428
+ <div ~if="users?.length" class="users-box">
2429
+ <div class="user-row" ~for="filteredUsers" @click="select_user($for.item)" :selected="isSelected($for.item)">
2430
+ <oda-icon :icon="isSelected($for.item) ? 'icons:check' : ''" icon-size="48" :success="isSelected($for.item)" style="border-radius: 50%;"></oda-icon>
2431
+ <item-node :$item="$for.item" icon-size="48"></item-node>
2432
+ </div>
2433
+ <h2 ~if="filteredUsers.length === 0" class="nope-row">не найдено</h2>
2434
+ </div>
2435
+ <h1 center ~if="!users">Загрузка...</h1>
2436
+ <h1 center ~if="users?.length === 0">пользователи не найдены</h1>
2437
+ `,
2438
+ get users() {
2439
+ return (async () => {
2440
+ const $users = await WORK.get_item('/USERS');
2441
+ const users = await $users.items;
2442
+ return (users || []).filter(u => u.id !== WORK.uid);
2443
+ })();
2444
+ },
2445
+ filterVal: '',
2446
+ get filteredUsers() {
2447
+ if (!this.users) return;
2448
+ return this.filterVal
2449
+ ? this.users.filter(u => [u.label, u.id].some(s => s.includes(this.filterVal)))
2450
+ : this.users;
2451
+ },
2452
+ selectedUsers: [],
2453
+ getIndex($user) {
2454
+ return this.selectedUsers.findIndex(u => u.id === $user.id)
2455
+ },
2456
+ isSelected($user) {
2457
+ return this.getIndex($user) > -1;
2458
+ },
2459
+ select_user($user) {
2460
+ const idx = this.getIndex($user);
2461
+ if (idx > -1) {
2462
+ this.selectedUsers.splice(idx, 1);
2463
+ }
2464
+ else {
2465
+ this.selectedUsers.push($user);
2466
+ }
2467
+ this.fire('changed');
2468
+ }
2469
+ });