graphdb-workbench 3.2.0-TR2 → 3.2.0-TR4

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 (246) hide show
  1. package/dist/12358.4be185f89eebea9c35bf.bundle.js +3 -0
  2. package/dist/12358.4be185f89eebea9c35bf.bundle.js.map +1 -0
  3. package/dist/{12396.9a7f2862146b6f9adcb1.bundle.js → 12396.a1b7856e86d52282f34c.bundle.js} +2 -2
  4. package/dist/{12396.9a7f2862146b6f9adcb1.bundle.js.map → 12396.a1b7856e86d52282f34c.bundle.js.map} +1 -1
  5. package/dist/{15535.7b170e17ee0a58970ab6.bundle.js → 15535.c58319cba275ee5baa90.bundle.js} +2 -2
  6. package/dist/{15535.7b170e17ee0a58970ab6.bundle.js.map → 15535.c58319cba275ee5baa90.bundle.js.map} +1 -1
  7. package/dist/{16162.67e7c1f5f313481b1e80.bundle.js → 16162.2dc986d04777c8ae9489.bundle.js} +2 -2
  8. package/dist/{16162.67e7c1f5f313481b1e80.bundle.js.map → 16162.2dc986d04777c8ae9489.bundle.js.map} +1 -1
  9. package/dist/19402.7f6ea977348338acc824.bundle.js +2 -0
  10. package/dist/19402.7f6ea977348338acc824.bundle.js.map +1 -0
  11. package/dist/{20287.dd5bc263fe26adf34965.bundle.js → 20287.7cfc312df157f5bdea97.bundle.js} +2 -2
  12. package/dist/{20287.dd5bc263fe26adf34965.bundle.js.map → 20287.7cfc312df157f5bdea97.bundle.js.map} +1 -1
  13. package/dist/{21136.b7efcb40fb956ff1109c.bundle.js → 21136.67a9bcf4bb0c201d3fd1.bundle.js} +2 -2
  14. package/dist/{21136.b7efcb40fb956ff1109c.bundle.js.map → 21136.67a9bcf4bb0c201d3fd1.bundle.js.map} +1 -1
  15. package/dist/21142.7f8327c28d939fa26009.bundle.js +2 -0
  16. package/dist/21142.7f8327c28d939fa26009.bundle.js.map +1 -0
  17. package/dist/{21170.7832554eab9eaade6ffb.bundle.js → 21170.cecdf25699f68d4cf749.bundle.js} +2 -2
  18. package/dist/{21170.7832554eab9eaade6ffb.bundle.js.map → 21170.cecdf25699f68d4cf749.bundle.js.map} +1 -1
  19. package/dist/21195.e2c1fc69631041b97f8e.bundle.js +2 -0
  20. package/dist/21195.e2c1fc69631041b97f8e.bundle.js.map +1 -0
  21. package/dist/{25747.c01110e23b922cdd3d9e.bundle.js → 25747.c3dc5503ad696af5d5a3.bundle.js} +2 -2
  22. package/dist/{25747.c01110e23b922cdd3d9e.bundle.js.map → 25747.c3dc5503ad696af5d5a3.bundle.js.map} +1 -1
  23. package/dist/{27580.5a421770ab66d2dedc37.bundle.js → 27580.d038d43102a3e9eec97d.bundle.js} +2 -2
  24. package/dist/{27580.5a421770ab66d2dedc37.bundle.js.map → 27580.d038d43102a3e9eec97d.bundle.js.map} +1 -1
  25. package/dist/29350.d2791feedf54d2e4b7b6.bundle.js +2 -0
  26. package/dist/29350.d2791feedf54d2e4b7b6.bundle.js.map +1 -0
  27. package/dist/{31636.54e2817f8ae3998a34b3.bundle.js → 31636.fc6eba63d6d985d31673.bundle.js} +2 -2
  28. package/dist/{31636.54e2817f8ae3998a34b3.bundle.js.map → 31636.fc6eba63d6d985d31673.bundle.js.map} +1 -1
  29. package/dist/{32489.f7a2dc39cd61c2cd8874.bundle.js → 32489.e9af1ec463e2d4136732.bundle.js} +2 -2
  30. package/dist/{32489.f7a2dc39cd61c2cd8874.bundle.js.map → 32489.e9af1ec463e2d4136732.bundle.js.map} +1 -1
  31. package/dist/{34330.4b46c3a52d19f05fc0b2.bundle.js → 34330.990c99ea37f6cca46bad.bundle.js} +2 -2
  32. package/dist/34330.990c99ea37f6cca46bad.bundle.js.map +1 -0
  33. package/dist/{34495.be67c06c39909114bbe4.bundle.js → 34495.06c9997d58d0b0ba7152.bundle.js} +2 -2
  34. package/dist/{34495.be67c06c39909114bbe4.bundle.js.map → 34495.06c9997d58d0b0ba7152.bundle.js.map} +1 -1
  35. package/dist/36633.eba4270db7fdcf1aad4c.bundle.js +2 -0
  36. package/dist/36633.eba4270db7fdcf1aad4c.bundle.js.map +1 -0
  37. package/dist/36665.69d43b057bcfc55df3b5.bundle.js +2 -0
  38. package/dist/36665.69d43b057bcfc55df3b5.bundle.js.map +1 -0
  39. package/dist/{38360.efec913bb97c3b8588a4.bundle.js → 38360.ca92a04a1afcf9cfea7f.bundle.js} +2 -2
  40. package/dist/{38360.efec913bb97c3b8588a4.bundle.js.map → 38360.ca92a04a1afcf9cfea7f.bundle.js.map} +1 -1
  41. package/dist/{38644.800252af49cd67310834.bundle.js → 38644.29dbfb38e4089efa6697.bundle.js} +2 -2
  42. package/dist/{38644.800252af49cd67310834.bundle.js.map → 38644.29dbfb38e4089efa6697.bundle.js.map} +1 -1
  43. package/dist/{38843.29e34a5e5293cee51566.bundle.js → 38843.4b11f56e93f60fbe4e0a.bundle.js} +2 -2
  44. package/dist/{38843.29e34a5e5293cee51566.bundle.js.map → 38843.4b11f56e93f60fbe4e0a.bundle.js.map} +1 -1
  45. package/dist/{39518.0ca97879b92271d7c5e2.bundle.js → 39518.c577d83ed591fada064c.bundle.js} +2 -2
  46. package/dist/{39518.0ca97879b92271d7c5e2.bundle.js.map → 39518.c577d83ed591fada064c.bundle.js.map} +1 -1
  47. package/dist/{39539.7cea6717cc3a5ba91617.bundle.js → 39539.463ec29e136b100c0abe.bundle.js} +2 -2
  48. package/dist/{39539.7cea6717cc3a5ba91617.bundle.js.map → 39539.463ec29e136b100c0abe.bundle.js.map} +1 -1
  49. package/dist/40516.3cfaf1ff4704c038f944.bundle.js +2 -0
  50. package/dist/40516.3cfaf1ff4704c038f944.bundle.js.map +1 -0
  51. package/dist/{41453.4ae219d972a187c36bfc.bundle.js → 41453.241761ce8ff75036e5e0.bundle.js} +2 -2
  52. package/dist/{41453.4ae219d972a187c36bfc.bundle.js.map → 41453.241761ce8ff75036e5e0.bundle.js.map} +1 -1
  53. package/dist/{42129.0314e45b4b818b01b71f.bundle.js → 42129.f67dc6029cdab567bf54.bundle.js} +2 -2
  54. package/dist/{42129.0314e45b4b818b01b71f.bundle.js.map → 42129.f67dc6029cdab567bf54.bundle.js.map} +1 -1
  55. package/dist/42143.6c37997677f5ec643731.bundle.js +2 -0
  56. package/dist/42143.6c37997677f5ec643731.bundle.js.map +1 -0
  57. package/dist/{44444.02026ff20e2a843dc05b.bundle.js → 44444.a1b29c2329c7d4a39cc5.bundle.js} +2 -2
  58. package/dist/{44444.02026ff20e2a843dc05b.bundle.js.map → 44444.a1b29c2329c7d4a39cc5.bundle.js.map} +1 -1
  59. package/dist/44874.b16be286176dfe4aa766.bundle.js +2 -0
  60. package/dist/44874.b16be286176dfe4aa766.bundle.js.map +1 -0
  61. package/dist/49539.63984d5b37bc8b9a7244.bundle.js +2 -0
  62. package/dist/49539.63984d5b37bc8b9a7244.bundle.js.map +1 -0
  63. package/dist/{51087.b072d1c0e53403535283.bundle.js → 51087.1e118e7fe32a8c09d6cb.bundle.js} +2 -2
  64. package/dist/51087.1e118e7fe32a8c09d6cb.bundle.js.map +1 -0
  65. package/dist/{55217.4769c1f0615e364d8c2a.bundle.js → 55217.98a70cf01c4b7a826e82.bundle.js} +2 -2
  66. package/dist/55217.98a70cf01c4b7a826e82.bundle.js.map +1 -0
  67. package/dist/{55862.5e8602827fbf72e60cc2.bundle.js → 55862.1c3f1e807c8a05b1b6ed.bundle.js} +2 -2
  68. package/dist/{55862.5e8602827fbf72e60cc2.bundle.js.map → 55862.1c3f1e807c8a05b1b6ed.bundle.js.map} +1 -1
  69. package/dist/{58306.94b9336f68d11bdd72f0.bundle.js → 58306.a45182d200e3f8793644.bundle.js} +2 -2
  70. package/dist/{58306.94b9336f68d11bdd72f0.bundle.js.map → 58306.a45182d200e3f8793644.bundle.js.map} +1 -1
  71. package/dist/60039.5f9e955234f5eaf33372.bundle.js +2 -0
  72. package/dist/60039.5f9e955234f5eaf33372.bundle.js.map +1 -0
  73. package/dist/63415.7a4dfa072b5665c5995b.bundle.js +2 -0
  74. package/dist/63415.7a4dfa072b5665c5995b.bundle.js.map +1 -0
  75. package/dist/64118.edc8ed6671017d09ff4e.bundle.js +2 -0
  76. package/dist/64118.edc8ed6671017d09ff4e.bundle.js.map +1 -0
  77. package/dist/67232.bc980f2f0df606493105.bundle.js +2 -0
  78. package/dist/67232.bc980f2f0df606493105.bundle.js.map +1 -0
  79. package/dist/{67888.772326168aed83cbad9c.bundle.js → 67888.e21c0e4c70be6214fcd7.bundle.js} +2 -2
  80. package/dist/{67888.772326168aed83cbad9c.bundle.js.map → 67888.e21c0e4c70be6214fcd7.bundle.js.map} +1 -1
  81. package/dist/70938.c489d3ca5b00ad297139.bundle.js +2 -0
  82. package/dist/70938.c489d3ca5b00ad297139.bundle.js.map +1 -0
  83. package/dist/71920.c171884910616d02e2c6.bundle.js +2 -0
  84. package/dist/71920.c171884910616d02e2c6.bundle.js.map +1 -0
  85. package/dist/{72379.8a3290df05f18f8c65bd.bundle.js → 72379.cb41e26c33271a25816e.bundle.js} +2 -2
  86. package/dist/{72379.8a3290df05f18f8c65bd.bundle.js.map → 72379.cb41e26c33271a25816e.bundle.js.map} +1 -1
  87. package/dist/{73667.52fdbdadddafe9e9559b.bundle.js → 73667.ad957853dba08fd3be30.bundle.js} +2 -2
  88. package/dist/{73667.52fdbdadddafe9e9559b.bundle.js.map → 73667.ad957853dba08fd3be30.bundle.js.map} +1 -1
  89. package/dist/{73793.7e812bab1754ddd5efb5.bundle.js → 73793.79a311b387e5db776506.bundle.js} +2 -2
  90. package/dist/{73793.7e812bab1754ddd5efb5.bundle.js.map → 73793.79a311b387e5db776506.bundle.js.map} +1 -1
  91. package/dist/73964.7a3038b5726d50c1a051.bundle.js +2 -0
  92. package/dist/73964.7a3038b5726d50c1a051.bundle.js.map +1 -0
  93. package/dist/{75282.2f97d3a7d7f3fdd7aebf.bundle.js → 75282.8be5dde957dc6452c86a.bundle.js} +2 -2
  94. package/dist/{75282.2f97d3a7d7f3fdd7aebf.bundle.js.map → 75282.8be5dde957dc6452c86a.bundle.js.map} +1 -1
  95. package/dist/75849.0f6bab8b5749be998286.bundle.js +2 -0
  96. package/dist/75849.0f6bab8b5749be998286.bundle.js.map +1 -0
  97. package/dist/76013.9e71103dbb91bd9a558c.bundle.js +2 -0
  98. package/dist/76013.9e71103dbb91bd9a558c.bundle.js.map +1 -0
  99. package/dist/{78250.73e3013c5b2ebdddbf38.bundle.js → 78250.dd9bdc3db3ca0c84b25a.bundle.js} +2 -2
  100. package/dist/{78250.73e3013c5b2ebdddbf38.bundle.js.map → 78250.dd9bdc3db3ca0c84b25a.bundle.js.map} +1 -1
  101. package/dist/7928.9ab4b363abb28bfc6bd5.bundle.js +2 -0
  102. package/dist/7928.9ab4b363abb28bfc6bd5.bundle.js.map +1 -0
  103. package/dist/{79329.3d912887ba7e96090fb4.bundle.js → 79329.24a5e42cccee5055311a.bundle.js} +2 -2
  104. package/dist/{79329.3d912887ba7e96090fb4.bundle.js.map → 79329.24a5e42cccee5055311a.bundle.js.map} +1 -1
  105. package/dist/{82926.93a59d42bf8d49aaac8e.bundle.js → 82926.02f08566fe1f948d9e1f.bundle.js} +2 -2
  106. package/dist/{82926.93a59d42bf8d49aaac8e.bundle.js.map → 82926.02f08566fe1f948d9e1f.bundle.js.map} +1 -1
  107. package/dist/85609.68438b4955212d5fcb84.bundle.js +2 -0
  108. package/dist/85609.68438b4955212d5fcb84.bundle.js.map +1 -0
  109. package/dist/85788.501c7244b890d519f8cf.bundle.js +2 -0
  110. package/dist/85788.501c7244b890d519f8cf.bundle.js.map +1 -0
  111. package/dist/86142.04f4e4759998d4c37ccd.bundle.js +2 -0
  112. package/dist/86142.04f4e4759998d4c37ccd.bundle.js.map +1 -0
  113. package/dist/{89695.4ee87c52d4088115c51e.bundle.js → 89695.b7e90a123bc2875ccae4.bundle.js} +2 -2
  114. package/dist/89695.b7e90a123bc2875ccae4.bundle.js.map +1 -0
  115. package/dist/{9062.3541de664710a36fdac7.bundle.js → 9062.e1ad16e157f04b8c9dd8.bundle.js} +2 -2
  116. package/dist/{9062.3541de664710a36fdac7.bundle.js.map → 9062.e1ad16e157f04b8c9dd8.bundle.js.map} +1 -1
  117. package/dist/96089.4317e132ef8cc0033f83.bundle.js +2 -0
  118. package/dist/96089.4317e132ef8cc0033f83.bundle.js.map +1 -0
  119. package/dist/{99448.384b74c734331e5f8909.bundle.js → 99448.93e01a6a24e4a1cb0546.bundle.js} +2 -2
  120. package/dist/{99448.384b74c734331e5f8909.bundle.js.map → 99448.93e01a6a24e4a1cb0546.bundle.js.map} +1 -1
  121. package/dist/css/ttyg/chat-item-details.css +1 -1
  122. package/dist/css/ttyg/chat-panel.css +1 -1
  123. package/dist/i18n/locale-en.json +5 -1
  124. package/dist/i18n/locale-fr.json +5 -1
  125. package/dist/index.html +8 -8
  126. package/dist/js/angular/clustermanagement/templates/cluster-nodes-configuration.html +1 -1
  127. package/dist/js/angular/core/directives/autocomplete/templates/autocomplete.html +1 -1
  128. package/dist/js/angular/core/directives/dynamic-form/templates/dynamic-form.html +1 -1
  129. package/dist/js/angular/core/directives/operations-statuses-monitor/templates/operations-statuses-monitor.html +1 -1
  130. package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
  131. package/dist/js/angular/core/directives/shuttle-multiselect/templates/shuttle-multiselect.html +1 -1
  132. package/dist/js/angular/core/directives/yasgui-component/templates/yasgui-component.html +1 -1
  133. package/dist/js/angular/core/templates/cookie-policy/cookie-consent.html +1 -1
  134. package/dist/js/angular/core/templates/cookie-policy/cookie-policy.html +1 -1
  135. package/dist/js/angular/core/templates/editable-content/editable-content.html +1 -1
  136. package/dist/js/angular/core/templates/markdown-content/markdown-content.html +1 -1
  137. package/dist/js/angular/core/templates/search-resource-input.html +1 -1
  138. package/dist/js/angular/graphql/templates/create-graphql-endpoint.html +2 -2
  139. package/dist/js/angular/graphql/templates/graphql-endpoint-management.html +1 -1
  140. package/dist/js/angular/graphql/templates/graphql-playground.html +1 -1
  141. package/dist/js/angular/graphql/templates/modal/endpoint-configuration-modal.html +1 -1
  142. package/dist/js/angular/graphql/templates/modal/endpoint-generation-failure-result-modal.html +1 -1
  143. package/dist/js/angular/graphql/templates/modal/import-endpoint-definition-modal.html +1 -1
  144. package/dist/js/angular/security/templates/user.html +2 -2
  145. package/dist/js/angular/ttyg/templates/agent-list.html +1 -1
  146. package/dist/js/angular/ttyg/templates/agent-select-menu.html +1 -1
  147. package/dist/js/angular/ttyg/templates/chat-item-detail.html +5 -5
  148. package/dist/js/angular/ttyg/templates/chat-list.html +2 -2
  149. package/dist/js/angular/ttyg/templates/chat-panel.html +12 -7
  150. package/dist/js/angular/ttyg/templates/modal/agent-instructions-explain-modal.html +1 -1
  151. package/dist/js/angular/ttyg/templates/modal/agent-settings-modal.html +2 -2
  152. package/dist/js/angular/ttyg/templates/modal/external-integration-configuration-modal.html +1 -1
  153. package/dist/js/angular/ttyg/templates/no-agents-view.html +1 -1
  154. package/dist/js/angular/ttyg/templates/ttyg.html +1 -1
  155. package/dist/{legacyWorkbench.2bd696723af2573e8bb7.js → legacyWorkbench.ecf6300fd72cfffbcdb6.js} +3 -3
  156. package/dist/{legacyWorkbench.2bd696723af2573e8bb7.js.map → legacyWorkbench.ecf6300fd72cfffbcdb6.js.map} +1 -1
  157. package/dist/pages/aclmanagement.html +2 -2
  158. package/dist/pages/autocomplete.html +1 -1
  159. package/dist/pages/choose-repository-type.html +1 -1
  160. package/dist/pages/cluster-management/clusterInfo.html +3 -3
  161. package/dist/pages/create-index.html +1 -1
  162. package/dist/pages/dependencies.html +1 -1
  163. package/dist/pages/domainRangeInfo.html +2 -2
  164. package/dist/pages/edit.html +1 -1
  165. package/dist/pages/explore.html +1 -1
  166. package/dist/pages/export.html +1 -1
  167. package/dist/pages/find.html +1 -1
  168. package/dist/pages/graph-config/saveGraphConfig.html +8 -8
  169. package/dist/pages/graphs-visualizations.html +7 -7
  170. package/dist/pages/guides.html +1 -1
  171. package/dist/pages/import.html +2 -2
  172. package/dist/pages/jdbc-create.html +1 -1
  173. package/dist/pages/login.html +1 -1
  174. package/dist/pages/monitor/backup-and-restore.html +1 -1
  175. package/dist/pages/monitor/queries.html +1 -1
  176. package/dist/pages/monitor/resources.html +1 -1
  177. package/dist/pages/namespaces.html +2 -2
  178. package/dist/pages/plugins.html +1 -1
  179. package/dist/pages/rdfClassHierarchyInfo.html +7 -7
  180. package/dist/pages/rdfrank.html +2 -2
  181. package/dist/pages/repositories.html +1 -1
  182. package/dist/pages/repository.html +1 -1
  183. package/dist/pages/similarity-indexes.html +1 -1
  184. package/dist/pages/sparql-editor.html +1 -1
  185. package/dist/pages/sparql-template-create.html +1 -1
  186. package/dist/pages/ux-test1.html +2 -2
  187. package/dist/pages/webapi.html +2 -2
  188. package/dist/plugins.js +1 -1
  189. package/dist/res/swagger5/index.html +11 -11
  190. package/package.json +1 -1
  191. package/dist/12358.2061f29dc113149946a3.bundle.js +0 -3
  192. package/dist/12358.2061f29dc113149946a3.bundle.js.map +0 -1
  193. package/dist/19402.07424b4b7c9dd775d860.bundle.js +0 -2
  194. package/dist/19402.07424b4b7c9dd775d860.bundle.js.map +0 -1
  195. package/dist/21142.ec45fad4d52b36961d17.bundle.js +0 -2
  196. package/dist/21142.ec45fad4d52b36961d17.bundle.js.map +0 -1
  197. package/dist/21195.caae6cc33d755ad52df4.bundle.js +0 -2
  198. package/dist/21195.caae6cc33d755ad52df4.bundle.js.map +0 -1
  199. package/dist/29350.9976c09d5cdaa48ecb19.bundle.js +0 -2
  200. package/dist/29350.9976c09d5cdaa48ecb19.bundle.js.map +0 -1
  201. package/dist/34330.4b46c3a52d19f05fc0b2.bundle.js.map +0 -1
  202. package/dist/36633.bd17a2028ef302870ec4.bundle.js +0 -2
  203. package/dist/36633.bd17a2028ef302870ec4.bundle.js.map +0 -1
  204. package/dist/36665.eda6cfdf545f2608a6c7.bundle.js +0 -2
  205. package/dist/36665.eda6cfdf545f2608a6c7.bundle.js.map +0 -1
  206. package/dist/40516.734b24eead67142c4045.bundle.js +0 -2
  207. package/dist/40516.734b24eead67142c4045.bundle.js.map +0 -1
  208. package/dist/42143.c11e5c28f2b8e9952dbb.bundle.js +0 -2
  209. package/dist/42143.c11e5c28f2b8e9952dbb.bundle.js.map +0 -1
  210. package/dist/44874.5854c207bbe2c4f2438e.bundle.js +0 -2
  211. package/dist/44874.5854c207bbe2c4f2438e.bundle.js.map +0 -1
  212. package/dist/49539.d253a79e8b9710776e48.bundle.js +0 -2
  213. package/dist/49539.d253a79e8b9710776e48.bundle.js.map +0 -1
  214. package/dist/51087.b072d1c0e53403535283.bundle.js.map +0 -1
  215. package/dist/55217.4769c1f0615e364d8c2a.bundle.js.map +0 -1
  216. package/dist/60039.cb9262af0bc63b635c76.bundle.js +0 -2
  217. package/dist/60039.cb9262af0bc63b635c76.bundle.js.map +0 -1
  218. package/dist/63415.81af22cc29be1144e07f.bundle.js +0 -2
  219. package/dist/63415.81af22cc29be1144e07f.bundle.js.map +0 -1
  220. package/dist/64118.fb6952c8ef6fc9117f35.bundle.js +0 -2
  221. package/dist/64118.fb6952c8ef6fc9117f35.bundle.js.map +0 -1
  222. package/dist/67232.e76f40f9d09e64ebb365.bundle.js +0 -2
  223. package/dist/67232.e76f40f9d09e64ebb365.bundle.js.map +0 -1
  224. package/dist/70938.6d0055f916f6d1bc91bb.bundle.js +0 -2
  225. package/dist/70938.6d0055f916f6d1bc91bb.bundle.js.map +0 -1
  226. package/dist/71920.46e7b0ec1d22adcd8e55.bundle.js +0 -2
  227. package/dist/71920.46e7b0ec1d22adcd8e55.bundle.js.map +0 -1
  228. package/dist/73964.fd1ad5e7aa228ad4cbbb.bundle.js +0 -2
  229. package/dist/73964.fd1ad5e7aa228ad4cbbb.bundle.js.map +0 -1
  230. package/dist/75849.bd0bdefa903741034a71.bundle.js +0 -2
  231. package/dist/75849.bd0bdefa903741034a71.bundle.js.map +0 -1
  232. package/dist/76013.3211939a02cf4fb2529e.bundle.js +0 -2
  233. package/dist/76013.3211939a02cf4fb2529e.bundle.js.map +0 -1
  234. package/dist/7928.7900a3911c83495d74dd.bundle.js +0 -2
  235. package/dist/7928.7900a3911c83495d74dd.bundle.js.map +0 -1
  236. package/dist/85609.680b755726c66ea1de34.bundle.js +0 -2
  237. package/dist/85609.680b755726c66ea1de34.bundle.js.map +0 -1
  238. package/dist/85788.4e0818c48b6f29153db4.bundle.js +0 -2
  239. package/dist/85788.4e0818c48b6f29153db4.bundle.js.map +0 -1
  240. package/dist/86142.c29959b68edc59a9b696.bundle.js +0 -2
  241. package/dist/86142.c29959b68edc59a9b696.bundle.js.map +0 -1
  242. package/dist/89695.4ee87c52d4088115c51e.bundle.js.map +0 -1
  243. package/dist/96089.7e28823f34c450de1f7e.bundle.js +0 -2
  244. package/dist/96089.7e28823f34c450de1f7e.bundle.js.map +0 -1
  245. /package/dist/{12358.2061f29dc113149946a3.bundle.js.LICENSE.txt → 12358.4be185f89eebea9c35bf.bundle.js.LICENSE.txt} +0 -0
  246. /package/dist/{legacyWorkbench.2bd696723af2573e8bb7.js.LICENSE.txt → legacyWorkbench.ecf6300fd72cfffbcdb6.js.LICENSE.txt} +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"7928.7900a3911c83495d74dd.bundle.js","mappings":"mKASA,SAASA,EAAaC,EAAoBC,GACtC,MAAO,CACHC,SAAU,IACVC,YAAa,gDACbC,MAAO,CACP,EACAC,KAAOC,IAMHA,EAAOC,gBAAiB,EACxBD,EAAOE,6BAA+BC,EAAAA,yBAAyBC,oBAAoBT,EAAYU,oBAAqB,sBAMpHL,EAAOM,cAAgB,KACnBZ,EAAmBa,KAAKC,EAAAA,cAAcC,sBAO1C,MAOMC,EAAgB,GAKtBA,EAAcC,KAAKjB,EAAmBkB,wBAZLX,IAC7BD,EAAOC,eAAiBA,KAY5BD,EAAOa,IAAI,WAJOC,KACdJ,EAAcK,QAASC,GAAiBA,QAMxD,CAjDAC,QACKC,OAAO,mDAAoD,IAC3DC,UAAU,eAAgB1B,GAE/BA,EAAa2B,QAAU,CAAC,qBA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AKhBwC,6BAA8B,2BAK9BC,sBAAuB,qBAKvBC,8BAA+B,4BAK/BC,iBAAkB,kBAKlBlC,+BAAgC,8BAKhCmC,oBAAqB,0BAErBtC,yBAA0B,wB","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/ttyg/directives/no-agents-view.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/ttyg/services/ttyg-context.service.js"],"sourcesContent":["import {TTYGEventName} from \"../services/ttyg-context.service\";\nimport {DocumentationUrlResolver} from \"../../utils/documentation-url-resolver\";\n\nangular\n .module('graphdb.framework.ttyg.directives.no-agents-view', [])\n .directive('noAgentsView', NoAgentsView);\n\nNoAgentsView.$inject = ['TTYGContextService', 'productInfo'];\n\nfunction NoAgentsView(TTYGContextService, productInfo) {\n return {\n restrict: 'E',\n templateUrl: 'js/angular/ttyg/templates/no-agents-view.html',\n scope: {\n },\n link: ($scope) => {\n\n // =========================\n // Public variables\n // =========================\n\n $scope.canModifyAgent = false;\n $scope.talkToGraphDocumentationLink = DocumentationUrlResolver.getDocumentationUrl(productInfo.productShortVersion, 'talk-to-graph.html');\n\n // =========================\n // Public functions\n // =========================\n\n $scope.onCreateAgent = () => {\n TTYGContextService.emit(TTYGEventName.OPEN_AGENT_SETTINGS);\n };\n\n // =========================\n // Private functions\n // =========================\n\n const onCanUpdateAgentUpdated = (canModifyAgent) => {\n $scope.canModifyAgent = canModifyAgent;\n };\n\n // =========================\n // Subscriptions\n // =========================\n const subscriptions = [];\n\n const onDestroy = () => {\n subscriptions.forEach((subscription) => subscription());\n };\n subscriptions.push(TTYGContextService.onCanUpdateAgentUpdated(onCanUpdateAgentUpdated));\n $scope.$on('$destroy', onDestroy);\n }\n };\n}\n","import {cloneDeep} from 'lodash';\n\nangular\n .module('graphdb.framework.ttyg.services.ttygcontext', [])\n .factory('TTYGContextService', TTYGContextService);\n\nTTYGContextService.$inject = ['EventEmitterService', 'TTYGService'];\n\nfunction TTYGContextService(EventEmitterService) {\n\n /**\n * The list of agents.\n * @type {AgentListModel}\n * @private\n */\n let _agents = undefined;\n\n /**\n * The ChatsListModel.\n * @type {ChatsListModel}\n * @private\n */\n let _chats = undefined;\n\n /**\n * The currently selected in the UI chat which is used for conversation.\n * @type {ChatModel|undefined}\n * @private\n */\n let _selectedChat = undefined;\n\n /**\n * The currently selected in the UI agent which is used for conversation.\n * @type {AgentModel|undefined}\n * @private\n */\n let _selectedAgent = undefined;\n\n /**\n * Stores information about loaded explain responses.\n * The key is the answer ID, and the value is an instance of {@see ExplainResponseModel} that holds the explanation message.\n *\n * @type {{[key: string]: ExplainResponseModel}}\n */\n let _explainCache = {};\n\n /**\n * The default agent values.\n * @type {AgentModel|undefined}\n * @private\n */\n let _defaultAgent = undefined;\n\n let _canModifyAgent = false;\n\n const resetContext = () => {\n _agents = undefined;\n _chats = undefined;\n _selectedChat = undefined;\n _selectedAgent = undefined;\n _explainCache = {};\n _defaultAgent = undefined;\n _canModifyAgent = false;\n };\n\n /**\n * @return {Promise<AgentModel>}\n */\n const getDefaultAgent = () => {\n return cloneDeep(_defaultAgent);\n };\n\n const setDefaultAgent = (agent) => {\n _defaultAgent = agent;\n };\n\n /**\n * @return {AgentListModel}\n */\n const getAgents = () => {\n return cloneDeep(_agents);\n };\n\n const getAgent = (agentId) => {\n if (_agents) {\n return cloneDeep(_agents.getAgent(agentId));\n }\n };\n\n /**\n * @return {ChatsListModel}\n */\n const getChats = () => {\n return cloneDeep(_chats);\n };\n\n /**\n * @param {ChatsListModel} chats\n */\n const updateChats = (chats) => {\n _chats = cloneDeep(chats);\n emit(TTYGEventName.CHAT_LIST_UPDATED, getChats());\n };\n\n /**\n * Deletes the chat with the provided <code>chatId</code>.\n * @param {ChatModel} chat\n */\n const deleteChat = (chat) => {\n _chats.deleteChat(chat);\n updateChats(_chats);\n };\n\n const addChat = (newChat) => {\n _chats.appendChat(newChat);\n updateChats(_chats);\n };\n\n const replaceChat = (newChat, oldChat) => {\n _chats.replaceChat(newChat, oldChat);\n updateChats(_chats);\n };\n\n /** Subscribes to the 'chatListUpdated' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onChatsListChanged = (callback) => {\n if (_chats && angular.isFunction(callback)) {\n callback(getChats());\n }\n return subscribe(TTYGEventName.CHAT_LIST_UPDATED, (chats) => callback(chats));\n };\n\n /**\n * @return {ChatModel}\n */\n const getSelectedChat = () => {\n return cloneDeep(_selectedChat);\n };\n\n /**\n * Updates the selected chat with the provided <code>selectedChat</code> and emits the 'selectChat' event\n * to notify listeners that a new chat has been selected.\n *\n * @param {ChatModel} selectedChat - The chat object to select.\n */\n const selectChat = (selectedChat) => {\n if (!_selectedChat || _selectedChat.id !== selectedChat.id) {\n _selectedChat = cloneDeep(selectedChat);\n emit(TTYGEventName.SELECT_CHAT, getSelectedChat());\n }\n };\n\n const deselectChat = () => {\n _selectedChat = undefined;\n emit(TTYGEventName.SELECT_CHAT, getSelectedChat());\n };\n\n /**\n * Subscribes to the 'selectChat' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onSelectedChatChanged = (callback) => {\n if (angular.isFunction(callback)) {\n callback(getSelectedChat());\n }\n return subscribe(TTYGEventName.SELECT_CHAT, (selectedChat) => callback(selectedChat));\n };\n\n /**\n * Updates the selected chat and emits the 'selectChatUpdated' event to notify listeners that a property\n * of the selected chat has changed.\n *\n * If the ID of the passed chat differs from the current selected chat, no action will occur.\n *\n * The selected chat can be updated through {@link TTYGContextService#selectChat}.\n *\n * @param {ChatModel} chat - The chat object that is being updated.\n */\n const updateSelectedChat = (chat) => {\n if (!_selectedChat || !_selectedChat.id || !chat || _selectedChat.id === chat.id) {\n _selectedChat = cloneDeep(chat);\n emit(TTYGEventName.SELECTED_CHAT_UPDATED, getSelectedChat());\n }\n };\n\n /** Subscribes to the 'selectChat' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onSelectedChatUpdated = (callback) => {\n if (_selectedChat && angular.isFunction(callback)) {\n callback(getSelectedChat());\n }\n return subscribe(TTYGEventName.SELECTED_CHAT_UPDATED, (selectedChat) => callback(selectedChat));\n };\n\n /** Subscribes to the 'lastMessageReceived' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onLastMessageReceived = (callback) => {\n if (_selectedChat && angular.isFunction(callback)) {\n callback(getSelectedChat());\n }\n return subscribe(TTYGEventName.LAST_MESSAGE_RECEIVED, (selectedChat) => callback(selectedChat));\n };\n\n /**\n * @param {AgentListModel} agents\n */\n const updateAgents = (agents) => {\n _agents = cloneDeep(agents);\n emit(TTYGEventName.AGENT_LIST_UPDATED, getAgents());\n };\n\n /**\n * Subscribes to the 'agentListUpdated' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onAgentsListChanged = (callback) => {\n if (_agents && angular.isFunction(callback)) {\n callback(getAgents());\n }\n return subscribe(TTYGEventName.AGENT_LIST_UPDATED, (selectedChat) => callback(selectedChat));\n };\n\n /**\n * @return {AgentModel}\n */\n const getSelectedAgent = () => {\n return cloneDeep(_selectedAgent);\n };\n\n /**\n * Updates the selected agent with the provided <code>selectedAgent</code> and emits the 'agentSelected' event\n * to notify listeners that a new agent has been selected.\n *\n * @param {AgentModel} selectedAgent - The instance of selected agent.\n */\n const selectAgent = (selectedAgent) => {\n _selectedAgent = cloneDeep(selectedAgent);\n emit(TTYGEventName.AGENT_SELECTED, getSelectedAgent());\n };\n\n const _getExplainResponseCache = () => {\n return cloneDeep(_explainCache);\n };\n\n /**\n * Gets the explain response.\n * @param {string} answerId\n * @return {ExplainResponseModel}\n */\n const getExplainResponse = (answerId) => {\n return cloneDeep(_explainCache[answerId]);\n };\n\n /**\n * Adds the <code>explainResponse</code> into the explain response cache.\n *\n * @param {ExplainResponseModel} explainResponse\n */\n const addExplainResponseCache = (explainResponse) => {\n _explainCache[explainResponse.answerId] = cloneDeep(explainResponse);\n emit(TTYGEventName.EXPLAIN_RESPONSE_CACHE_UPDATED, _getExplainResponseCache());\n };\n\n const hasExplainResponse = (answerId) => {\n return !!_explainCache[answerId];\n };\n\n const toggleExplainResponse = (answerId) => {\n if (hasExplainResponse(answerId)) {\n _explainCache[answerId].expanded = !_explainCache[answerId].expanded;\n emit(TTYGEventName.EXPLAIN_RESPONSE_CACHE_UPDATED, _getExplainResponseCache());\n }\n };\n\n /**\n * Subscribes to the 'explainResponseCacheUpdated' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onExplainResponseCacheUpdated = (callback) => {\n if (angular.isFunction(callback)) {\n callback(_getExplainResponseCache());\n }\n return subscribe(TTYGEventName.EXPLAIN_RESPONSE_CACHE_UPDATED, (explainResponses) => callback(explainResponses));\n };\n\n /**\n * Subscribes to the 'agentSelected' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onSelectedAgentChanged = (callback) => {\n if (_selectedAgent && angular.isFunction(callback)) {\n callback(getSelectedAgent());\n }\n return subscribe(TTYGEventName.AGENT_SELECTED, (selectedChat) => callback(selectedChat));\n };\n\n /**\n * Updates the \"canModifyAgent\" flag and emits the 'canModifyAgentUpdated' event to notify listeners that the canModifyAgent flag is changed.\n *\n * @param {boolean} canModifyAgent\n */\n const setCanModifyAgent = (canModifyAgent) => {\n _canModifyAgent = cloneDeep(canModifyAgent);\n emit(TTYGEventName.CAN_MODIFY_AGENT_UPDATED, getCanModifyAgent());\n };\n\n const getCanModifyAgent = () => {\n return _canModifyAgent;\n };\n\n /**\n * Subscribes to the 'canModifyAgentUpdated' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onCanUpdateAgentUpdated = (callback) => {\n if (angular.isFunction(callback)) {\n callback(getCanModifyAgent());\n }\n return subscribe(TTYGEventName.CAN_MODIFY_AGENT_UPDATED, (canModifyAgent) => callback(canModifyAgent));\n };\n\n /**\n * Emits an event with a deep-cloned payload using the EventEmitterService.\n *\n * @param {string} tTYGEventName - The name of the event to emit. It must be a value from {@link TTYGEventName}.\n * @param {*} payload - The data to emit with the event. The payload is deep-cloned before emission.\n */\n const emit = (tTYGEventName, payload) => {\n EventEmitterService.emitSync(tTYGEventName, cloneDeep(payload));\n };\n\n /**\n * Subscribes to an event with the specified callback using the EventEmitterService.\n *\n * @param {string} tTYGEventName - The name of the event to subscribe to. It must be a value from {@link TTYGEventName}.\n * @param {function} callback - The function to call when the event is emitted.\n * @return {function} - Returns a function that can be called to unsubscribe from the event.\n */\n const subscribe = (tTYGEventName, callback) => {\n return EventEmitterService.subscribeSync(tTYGEventName, (payload) => callback(payload));\n };\n\n return {\n resetContext,\n emit,\n subscribe,\n // chats\n getChats,\n updateChats,\n addChat,\n replaceChat,\n onChatsListChanged,\n getSelectedChat,\n selectChat,\n deselectChat,\n deleteChat,\n onSelectedChatChanged,\n updateSelectedChat,\n onSelectedChatUpdated,\n onLastMessageReceived,\n // agents\n updateAgents,\n onAgentsListChanged,\n getAgents,\n getAgent,\n selectAgent,\n getSelectedAgent,\n onSelectedAgentChanged,\n getDefaultAgent,\n setDefaultAgent,\n setCanModifyAgent,\n getCanModifyAgent,\n onCanUpdateAgentUpdated,\n // chat explain\n hasExplainResponse,\n toggleExplainResponse,\n getExplainResponse,\n addExplainResponseCache,\n onExplainResponseCacheUpdated\n };\n}\n\nexport const TTYGEventName = {\n /**\n * Emitting the \"createChat\" event triggers a backend request to create a new chat.\n */\n CREATE_CHAT: 'createChat',\n\n /**\n * This event is emitted when a chat is successfully created.\n */\n CREATE_CHAT_SUCCESSFUL: 'chatCreated',\n\n /**\n * This event is emitted when the creation of a chat fails.\n */\n CREATE_CHAT_FAILURE: 'chatCreationFailed',\n\n RENAME_CHAT: 'renameChat',\n RENAME_CHAT_SUCCESSFUL: 'chatRenamed',\n RENAME_CHAT_FAILURE: 'chatRenamedFailure',\n\n /**\n * Emitting the \"selectChat\" event when the selected chat has been changed.\n */\n SELECT_CHAT: 'selectChat',\n\n /**\n * Emitting the \"selectChatUpdated\" event when the selected chat has been updated.\n */\n SELECTED_CHAT_UPDATED: 'selectChatUpdated',\n\n /**\n * Emitting the \"lastMessageReceived\" event when the final answer message has been received.\n */\n LAST_MESSAGE_RECEIVED: 'lastMessageReceived',\n\n /**\n * This event will be emitted when the chat delete request is in progress. The payload will contain the chat ID\n * and a boolean indicating if the deletion is in progress.\n */\n DELETING_CHAT: 'deletingChat',\n\n /**\n * This event will be emitted when the delete chat process is triggered but before the chat delete request is sent.\n */\n DELETE_CHAT: 'deleteChat',\n\n /**\n * This event will be emitted when the chat was successfully deleted.\n */\n DELETE_CHAT_SUCCESSFUL: 'chatDeleted',\n\n /**\n * This event will be emitted when the attempt to answer the question fails.\n */\n\n /**\n * This event is emitted when the deletion of a chat fails.\n */\n DELETE_CHAT_FAILURE: 'chatDeletedFailure',\n\n CHAT_EXPORT: 'chatExport',\n CHAT_EXPORT_SUCCESSFUL: 'chatExportSuccess',\n CHAT_EXPORT_FAILURE: 'chatExportFailure',\n CHAT_LIST_UPDATED: 'chatListUpdated',\n\n /**\n * Emitting the \"askQuestion\" event triggers a request to the backend to retrieve an answer to a question.\n */\n ASK_QUESTION: 'askQuestion',\n\n /**\n * This event will be emitted when the attempt to answer the question fails.\n */\n ASK_QUESTION_FAILURE: 'askQuestionFailure',\n\n /**\n * Emitting the \"continueChatRun\" event triggers a request to the backend to retrieve more remaining answers from the same chat run.\n */\n CONTINUE_CHAT_RUN: 'continueChatRun',\n\n /**\n * Emitting the \"loadChats\" event will trigger an action to loads all chats from backend server.\n */\n LOAD_CHATS: 'loadChats',\n LOAD_CHAT_SUCCESSFUL: 'loadChatSuccess',\n LOAD_CHAT_FAILURE: 'loadChatFailure',\n\n AGENT_LIST_UPDATED: 'agentListUpdated',\n\n /**\n * This event will be emitted when the create agent process is triggered through the UI but before the agent create\n * request is sent. This is used to open the agent settings dialog.\n */\n OPEN_AGENT_SETTINGS: 'openAgentSettings',\n\n /**\n * This event will be emitted when an agent needs to be edited.\n */\n EDIT_AGENT: 'editAgent',\n\n /**\n * This event will be emitted when an agent needs to be cloned.\n */\n CLONE_AGENT: 'cloneAgent',\n\n /**\n * This event will be emitted when the delete agent process is triggered but before the agent delete request is sent.\n */\n DELETE_AGENT: 'deleteAgent',\n\n /**\n * This event will be emitted when the agent was successfully deleted.\n */\n AGENT_DELETED: 'agentDeleted',\n\n /**\n * This event will be emitted when the agent delete request is in progress. The payload will contain the agent ID\n * and a boolean indicating if the deletion is in progress.\n */\n DELETING_AGENT: 'deletingAgent',\n\n /**\n * This event will be emitted when an agent is selected by the user through the UI.\n */\n AGENT_SELECTED: 'agentSelected',\n\n /**\n * This event will trigger the opening of the similarity view.\n */\n GO_TO_CREATE_SIMILARITY_VIEW: \"goToCreateSimilarityView\",\n\n /**\n * This event will trigger the opening of the connectors view.\n */\n GO_TO_CONNECTORS_VIEW: \"goToConnectorsView\",\n\n /**\n * This event will trigger the opening of the \"Autocomplete index\" view.\n */\n GO_TO_AUTOCOMPLETE_INDEX_VIEW: \"goToAutocompleteIndexView\",\n\n /**\n * This event will trigger fetching a new explanation of how the answer was generated.\n */\n EXPLAIN_RESPONSE: \"explainResponse\",\n\n /**\n * This event will be emitted when the cache with explain responses changed.\n */\n EXPLAIN_RESPONSE_CACHE_UPDATED: \"explainResponseCacheUpdated\",\n\n /**\n * This event will trigger the opening of the sparql view.\n */\n GO_TO_SPARQL_EDITOR: \"openQueryInSparqlEditor\",\n\n CAN_MODIFY_AGENT_UPDATED: \"canModifyAgentUpdated\",\n};\n"],"names":["NoAgentsView","TTYGContextService","productInfo","restrict","templateUrl","scope","link","$scope","canModifyAgent","talkToGraphDocumentationLink","DocumentationUrlResolver","getDocumentationUrl","productShortVersion","onCreateAgent","emit","TTYGEventName","OPEN_AGENT_SETTINGS","subscriptions","push","onCanUpdateAgentUpdated","$on","onDestroy","forEach","subscription","angular","module","directive","$inject","EventEmitterService","_agents","_chats","_selectedChat","_selectedAgent","_defaultAgent","_explainCache","_canModifyAgent","getAgents","cloneDeep","getChats","updateChats","chats","CHAT_LIST_UPDATED","getSelectedChat","getSelectedAgent","_getExplainResponseCache","hasExplainResponse","answerId","getCanModifyAgent","tTYGEventName","payload","emitSync","subscribe","callback","subscribeSync","resetContext","undefined","addChat","newChat","appendChat","replaceChat","oldChat","onChatsListChanged","isFunction","selectChat","selectedChat","id","SELECT_CHAT","deselectChat","deleteChat","chat","onSelectedChatChanged","updateSelectedChat","SELECTED_CHAT_UPDATED","onSelectedChatUpdated","onLastMessageReceived","LAST_MESSAGE_RECEIVED","updateAgents","agents","AGENT_LIST_UPDATED","onAgentsListChanged","getAgent","agentId","selectAgent","selectedAgent","AGENT_SELECTED","onSelectedAgentChanged","getDefaultAgent","setDefaultAgent","agent","setCanModifyAgent","CAN_MODIFY_AGENT_UPDATED","toggleExplainResponse","expanded","EXPLAIN_RESPONSE_CACHE_UPDATED","getExplainResponse","addExplainResponseCache","explainResponse","onExplainResponseCacheUpdated","explainResponses","factory","CREATE_CHAT","CREATE_CHAT_SUCCESSFUL","CREATE_CHAT_FAILURE","RENAME_CHAT","RENAME_CHAT_SUCCESSFUL","RENAME_CHAT_FAILURE","DELETING_CHAT","DELETE_CHAT","DELETE_CHAT_SUCCESSFUL","DELETE_CHAT_FAILURE","CHAT_EXPORT","CHAT_EXPORT_SUCCESSFUL","CHAT_EXPORT_FAILURE","ASK_QUESTION","ASK_QUESTION_FAILURE","CONTINUE_CHAT_RUN","LOAD_CHATS","LOAD_CHAT_SUCCESSFUL","LOAD_CHAT_FAILURE","EDIT_AGENT","CLONE_AGENT","DELETE_AGENT","AGENT_DELETED","DELETING_AGENT","GO_TO_CREATE_SIMILARITY_VIEW","GO_TO_CONNECTORS_VIEW","GO_TO_AUTOCOMPLETE_INDEX_VIEW","EXPLAIN_RESPONSE","GO_TO_SPARQL_EDITOR"],"sourceRoot":""}
@@ -1,2 +0,0 @@
1
- export const __webpack_id__=85609;export const __webpack_ids__=[19402,36633,45458,63415,85609,85788];export const __webpack_modules__={19402:(t,s,e)=>{e.r(s),e.d(s,{ChatByDayModel:()=>n,ChatModel:()=>h,ChatsListModel:()=>r});var a=e(63415),i=e(93135);class h{static getEmptyChat(){const t={name:"· · ·",timestamp:Math.floor(Date.now()/1e3)};return new h(t,(0,i.md5HashGenerator)())}constructor(t,s){this.hashGenerator=s,this._id=t.id,this._name=t.name,this._timestamp=t.timestamp,this._chatHistory=t.chatHistory||new a.ChatItemsListModel,this.hash=this.generateHash()}generateHash(){return this.hashGenerator(JSON.stringify(this))}get id(){return this._id}set id(t){this._id=t}get name(){return this._name}set name(t){this.generateHash(),this._name=t}get timestamp(){return this._timestamp}set timestamp(t){this._timestamp=t}get chatHistory(){return this._chatHistory}set chatHistory(t){this._chatHistory=t||new a.ChatItemsListModel}toRenameRequestPayload(){return{name:this._name}}}class n{constructor(t){this._day=t.day,this._timestamp=t.timestamp,this._chats=t.chats}get day(){return this._day}set day(t){this._day=t}get timestamp(){return this._timestamp}set timestamp(t){this._timestamp=t}get chats(){return this._chats}set chats(t){this._chats=t}}class r{constructor(t){this._chats=t||[],this._chatsByDay=[],this.sortByTime(),this.updateChatsByDay()}sortByTime(){this._chats.sort((t,s)=>s.timestamp-t.timestamp)}updateChatTimestamp(t,s){const e=this._chats.find(s=>s.id===t);e&&(e.timestamp=s,this.sortByTime(),this.updateChatsByDay())}updateChatName(t,s){const e=this._chats.find(s=>s.id===t);e&&(e.name=s)}deleteChat(t){this._chats=this._chats.filter(s=>s.id!==t.id),this.sortByTime(),this.updateChatsByDay()}updateChatsByDay(){this._chatsByDay=[],this._chats.forEach(t=>{const s=new Date(1e3*t.timestamp).toDateString(),e=this._chatsByDay.find(t=>t.day===s);e?e.chats.push(t):this._chatsByDay.push(new n({day:s,timestamp:1e3*t.timestamp,chats:[t]}))})}appendChat(t){this._chats.push(t),this.sortByTime(),this.updateChatsByDay()}replaceChat(t,s){this._chats=this._chats.map(e=>e.id===s.id?t:e),this.sortByTime(),this.updateChatsByDay()}isEmpty(){return 0===this._chats.length}getFirstChat(){return this._chats[0]}deselectAll(){this._chats.forEach(t=>{t.selected=!1})}selectChat(t){this.deselectAll(),this._chats.forEach(s=>{s.selected=s.id===t.id})}getChat(t){return this._chats.find(s=>s.id===t)}getNonPersistedChat(){return this._chats.find(t=>!t.id)}renameChat(t){const s=this._chats.find(s=>s.id===t.id);s&&(s.name=t.name)}get chats(){return this._chats}set chats(t){this._chats=t}get chatsByDay(){return this._chatsByDay}set chatsByDay(t){this._chatsByDay=t}}},36633:(t,s,e)=>{e.r(s),e.d(s,{CHAT_MESSAGE_ROLE:()=>i,ChatMessageModel:()=>a});class a{constructor(t){this._id=t.id,this._role=t.role,this._message=t.message,this._timestamp=1e3*t.timestamp,this.tokenUsageInfo=t.tokenUsageInfo}get id(){return this._id}set id(t){this._id=t}get role(){return this._role}set role(t){this._role=t}get message(){return this._message}set message(t){this._message=t}get timestamp(){return this._timestamp}set timestamp(t){this._timestamp=t}}const i={USER:"user",ASSISTANT:"assistant"}},45458:(t,s,e)=>{e.r(s),e.d(s,{ChatAnswerModel:()=>a,ContinueChatRun:()=>i});class a{constructor(t={}){this._chatId=t.chatId,this._chatName=t.chatName||"",this._timestamp=t.timestamp,this._messages=t.messages||[],this._continueRunId=t.continueRunId,this.tokenUsageInfo=t.tokenUsageInfo}get chatId(){return this._chatId}set chatId(t){this._chatId=t}get chatName(){return this._chatName}set chatName(t){this._chatName=t}get timestamp(){return this._timestamp}set timestamp(t){this._timestamp=t}get messages(){return this._messages}set messages(t){this._messages=t}get continueRunId(){return this._continueRunId}set continueRunId(t){this._continueRunId=t}}class i{constructor(t,s){this._chatItem=t,this._runId=s}get chatId(){return this._chatItem.chatId}toContinueRunRequestPayload(){return{conversationId:this.chatId,runId:this._runId,agentId:this._chatItem.agentId,tzOffset:-(new Date).getTimezoneOffset()}}}},63415:(t,s,e)=>{e.r(s),e.d(s,{ChatItemModel:()=>i,ChatItemsListModel:()=>h});var a=e(36633);class i{constructor(t,s){this._chatId=t,this._agentId=void 0,this._question=s,this._answers=[]}get chatId(){return this._chatId}set chatId(t){this._chatId=t}get agentId(){return this._agentId}set agentId(t){this._agentId=t}get question(){return this._question}set question(t){this._question=t}get answers(){return this._answers}set answers(t){this._answers=t}setQuestionMessage(t){this._question||(this._question=new a.ChatMessageModel({role:a.CHAT_MESSAGE_ROLE.USER})),this._question.message=t}getQuestionMessage(){return this._question.message}toCreateChatRequestPayload(){return{agentId:this._agentId,question:this._question.message}}toAskRequestPayload(){return{conversationId:this._chatId,agentId:this._agentId,question:this._question.message,tzOffset:-(new Date).getTimezoneOffset()}}toExplainResponsePayload(t){return{conversationId:this._chatId,answerId:t}}}class h{constructor(t=[]){this._items=t}isEmpty(){return 0===this._items.length}appendItem(t){this._items.push(t)}get items(){return this._items}set items(t){this._items=t||[]}getLast(){if(!this.isEmpty())return this._items[this._items.length-1]}}},85609:(t,s,e)=>{e.r(s),e.d(s,{chatModelMapper:()=>o,chatsListMapper:()=>m});var a=e(19402),i=e(93135),h=e(85788),n=e(63415);const r=(0,i.md5HashGenerator)(),m=t=>{if(!t)return new a.ChatsListModel;const s=t.map(t=>o(t));return new a.ChatsListModel(s)},o=t=>{if(t)return new a.ChatModel({id:t.id,name:t.name,timestamp:t.timestamp,chatHistory:t.messages&&t.messages.length?(0,h.chatItemsModelMapper)(t.messages):new n.ChatItemsListModel},r)}},85788:(t,s,e)=>{e.r(s),e.d(s,{chatAnswerModelMapper:()=>o,chatItemsModelMapper:()=>r,chatMessageModelListMapper:()=>n,chatMessageModelMapper:()=>m});var a=e(36633),i=e(63415),h=e(45458);const n=t=>t?t.map(t=>m(t)):[],r=(t=[])=>{const s=[];let e;return t.forEach(t=>{const h=t.conversationId;a.CHAT_MESSAGE_ROLE.USER===t.role?(e&&s.push(e),e=new i.ChatItemModel(h,m(t))):(e||(e=new i.ChatItemModel(h,null)),e.answers.push(m(t)),e.agentId=t.agentId)}),e&&s.push(e),new i.ChatItemsListModel(s)},m=t=>{if(t)return new a.ChatMessageModel({id:t.id,role:t.role,message:t.message,timestamp:t.timestamp,tokenUsageInfo:t.usage,data:t})},o=t=>{if(t)return new h.ChatAnswerModel({chatId:t.id,chatName:t.name,timestamp:t.timestamp,messages:n(t.messages),continueRunId:t.continueRunId,tokenUsageInfo:t.usage})}}};
2
- //# sourceMappingURL=85609.680b755726c66ea1de34.bundle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"85609.680b755726c66ea1de34.bundle.js","mappings":"2PAGO,MAAMA,EACT,mBAAOC,GACH,MAAMC,EAAO,CACTC,KAAM,QACNC,UAAWC,KAAKC,MAAMC,KAAKC,MAAQ,MAEvC,OAAO,IAAIR,EAAUE,GAAMO,EAAAA,EAAAA,oBAC/B,CAEAC,WAAAA,CAAYR,EAAMS,GACdC,KAAKD,cAAgBA,EAKrBC,KAAKC,IAAMX,EAAKY,GAKhBF,KAAKG,MAAQb,EAAKC,KAKlBS,KAAKI,WAAad,EAAKE,UAKvBQ,KAAKK,aAAef,EAAKgB,aAAe,IAAIC,EAAAA,mBAC5CP,KAAKQ,KAAOR,KAAKS,cACrB,CAEAA,YAAAA,GACI,OAAOT,KAAKD,cAAcW,KAAKC,UAAUX,MAC7C,CAEA,MAAIE,GACA,OAAOF,KAAKC,GAChB,CAEA,MAAIC,CAAGU,GACHZ,KAAKC,IAAMW,CACf,CAEA,QAAIrB,GACA,OAAOS,KAAKG,KAChB,CAEA,QAAIZ,CAAKqB,GACLZ,KAAKS,eACLT,KAAKG,MAAQS,CACjB,CAEA,aAAIpB,GACA,OAAOQ,KAAKI,UAChB,CAEA,aAAIZ,CAAUoB,GACVZ,KAAKI,WAAaQ,CACtB,CAEA,eAAIN,GACA,OAAON,KAAKK,YAChB,CAEA,eAAIC,CAAYM,GACZZ,KAAKK,aAAeO,GAAS,IAAIL,EAAAA,kBACrC,CAQAM,sBAAAA,GACI,MAAO,CAACtB,KAAMS,KAAKG,MACvB,EAGG,MAAMW,EACThB,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M0G,EAAQ,GACd,IAAIW,EAuBJ,OAtBArH,EAAK6C,QAASyB,IAKV,MAAMjC,EAASiC,EAAQmB,eACnBjB,EAAAA,kBAAkBC,OAASH,EAAQF,MAC/BiD,GACAX,EAAMzD,KAAKoE,GAEfA,EAAc,IAAIxB,EAAAA,cAAcxD,EAAQ+E,EAAuB9C,MAE1D+C,IACDA,EAAc,IAAIxB,EAAAA,cAAcxD,EAAQ,OAE5CgF,EAAYlB,QAAQlD,KAAKmE,EAAuB9C,IAChD+C,EAAY3B,QAAUpB,EAAQoB,WAGlC2B,GACAX,EAAMzD,KAAKoE,GAER,IAAIpG,EAAAA,mBAAmByF,IAQrBU,EAA0BpH,IACnC,GAAKA,EAGL,OAAO,IAAIkE,EAAAA,iBAAiB,CACxBtD,GAAIZ,EAAKY,GACTwD,KAAMpE,EAAKoE,KACXE,QAAStE,EAAKsE,QACdpE,UAAWF,EAAKE,UAChBqE,eAAgBvE,EAAKsH,MACrBtH,KAAMA,KASDuH,EAAyBvH,IAClC,GAAKA,EAGL,OAAO,IAAI2E,EAAAA,gBAAgB,CACvBtC,OAAQrC,EAAKY,GACbkE,SAAU9E,EAAKC,KACfC,UAAWF,EAAKE,UAChB8E,SAAUkC,EAA2BlH,EAAKgF,UAC1CE,cAAelF,EAAKkF,cACpBX,eAAgBvE,EAAKsH,Q","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/models/ttyg/chats.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/models/ttyg/chat-message.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/models/ttyg/chat-answer.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/models/ttyg/chat-item.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/ttyg/services/chats.mapper.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/ttyg/services/chat-message.mapper.js"],"sourcesContent":["import {ChatItemsListModel} from \"./chat-item\";\nimport {md5HashGenerator} from \"../../utils/hash-utils\";\n\nexport class ChatModel {\n static getEmptyChat() {\n const data = {\n name: \"\\u00B7 \\u00B7 \\u00B7\",\n timestamp: Math.floor(Date.now() / 1000)\n };\n return new ChatModel(data, md5HashGenerator());\n }\n\n constructor(data, hashGenerator) {\n this.hashGenerator = hashGenerator;\n\n /**\n * @type {string}\n */\n this._id = data.id;\n\n /**\n * @type {string}\n */\n this._name = data.name;\n\n /**\n * @type {number}\n */\n this._timestamp = data.timestamp;\n\n /**\n * @type {ChatItemsListModel}\n */\n this._chatHistory = data.chatHistory || new ChatItemsListModel();\n this.hash = this.generateHash();\n }\n\n generateHash() {\n return this.hashGenerator(JSON.stringify(this));\n }\n\n get id() {\n return this._id;\n }\n\n set id(value) {\n this._id = value;\n }\n\n get name() {\n return this._name;\n }\n\n set name(value) {\n this.generateHash();\n this._name = value;\n }\n\n get timestamp() {\n return this._timestamp;\n }\n\n set timestamp(value) {\n this._timestamp = value;\n }\n\n get chatHistory() {\n return this._chatHistory;\n }\n\n set chatHistory(value) {\n this._chatHistory = value || new ChatItemsListModel();\n }\n\n /**\n * Converts the instance to a rename chat request payload.\n * This request object contains the new name for renaming the chat.\n *\n * @return {{name: string}} An object representing the rename request payload.\n */\n toRenameRequestPayload() {\n return {name: this._name};\n }\n}\n\nexport class ChatByDayModel {\n constructor(data) {\n this._day = data.day;\n /**\n * @type {number}\n * @private\n */\n this._timestamp = data.timestamp;\n /**\n * @type {ChatModel[]|*}\n * @private\n */\n this._chats = data.chats;\n }\n\n get day() {\n return this._day;\n }\n\n set day(value) {\n this._day = value;\n }\n\n get timestamp() {\n return this._timestamp;\n }\n\n set timestamp(value) {\n this._timestamp = value;\n }\n\n get chats() {\n return this._chats;\n }\n\n set chats(value) {\n this._chats = value;\n }\n}\n\nexport class ChatsListModel {\n constructor(chats) {\n /**\n * @type {ChatModel[]}\n * @private\n */\n this._chats = chats || [];\n /**\n * @type {ChatByDayModel[]}\n * @private\n */\n this._chatsByDay = [];\n this.sortByTime();\n this.updateChatsByDay();\n }\n\n /**\n * Sorts the list of chats by timestamp in descending order, with the newest items on top.\n */\n sortByTime() {\n this._chats.sort((a, b) => {\n return b.timestamp - a.timestamp;\n });\n }\n\n /**\n * Updates the timestamp of a chat in the list.\n * @param {string} chatId\n * @param {number} timestamp\n */\n updateChatTimestamp(chatId, timestamp) {\n const chat = this._chats.find((c) => c.id === chatId);\n if (chat) {\n chat.timestamp = timestamp;\n this.sortByTime();\n this.updateChatsByDay();\n }\n }\n\n /**\n * Updates the name of a chat in the list.\n * @param {string} chatId\n * @param {string} name\n */\n updateChatName(chatId, name) {\n const chat = this._chats.find((c) => c.id === chatId);\n if (chat) {\n chat.name = name;\n }\n }\n\n /**\n * Deletes a chat from the chat list.\n * @param {ChatModel} chatToBeDeleted\n */\n deleteChat(chatToBeDeleted) {\n this._chats = this._chats.filter((chat) => chat.id !== chatToBeDeleted.id);\n this.sortByTime();\n this.updateChatsByDay();\n }\n\n updateChatsByDay() {\n this._chatsByDay = [];\n // group chats by day\n this._chats.forEach((chat) => {\n const day = new Date(chat.timestamp * 1000).toDateString();\n const dayModel = this._chatsByDay.find((d) => d.day === day);\n if (dayModel) {\n dayModel.chats.push(chat);\n } else {\n this._chatsByDay.push(new ChatByDayModel({day: day, timestamp: chat.timestamp * 1000, chats: [chat]}));\n }\n });\n }\n\n appendChat(chat) {\n this._chats.push(chat);\n this.sortByTime();\n this.updateChatsByDay();\n }\n\n replaceChat(newChat, oldChat) {\n this._chats = this._chats.map((chat) => {\n if (chat.id === oldChat.id) {\n return newChat;\n }\n return chat;\n });\n this.sortByTime();\n this.updateChatsByDay();\n }\n\n /**\n * Checks if the chat list is empty.\n * @return {boolean}\n */\n isEmpty() {\n return this._chats.length === 0;\n }\n\n /**\n * Returns the first chat from the list.\n * @return {ChatModel|undefined}\n */\n getFirstChat() {\n return this._chats[0];\n }\n\n /**\n * Deselects all chats.\n */\n deselectAll() {\n this._chats.forEach((c) => {\n c.selected = false;\n });\n }\n\n /**\n * Selects a chat.\n * @param {ChatModel} chat\n */\n selectChat(chat) {\n this.deselectAll();\n this._chats.forEach((c) => {\n c.selected = c.id === chat.id;\n });\n }\n\n getChat(id) {\n return this._chats.find((c) => c.id === id);\n }\n\n getNonPersistedChat() {\n return this._chats.find((chat) => !chat.id);\n }\n\n renameChat(renamedChat) {\n const chat = this._chats.find((c) => c.id === renamedChat.id);\n if (chat) {\n chat.name = renamedChat.name;\n }\n }\n\n /**\n * @return {ChatModel[]}\n */\n get chats() {\n return this._chats;\n }\n\n /**\n * @param {ChatModel[]} value\n */\n set chats(value) {\n this._chats = value;\n }\n\n get chatsByDay() {\n return this._chatsByDay;\n }\n\n set chatsByDay(value) {\n this._chatsByDay = value;\n }\n}\n","export class ChatMessageModel {\n constructor(data) {\n\n /**\n * @type {string}\n */\n this._id = data.id;\n\n /**\n * @type @type {string} - A value from {@link CHAT_MESSAGE_ROLE}, determining the owner of the message (e.g., user, assistant).\n */\n this._role = data.role;\n\n /**\n * @type {string}\n */\n this._message = data.message;\n\n /**\n * @type {number}\n */\n this._timestamp = data.timestamp * 1000;\n\n /**\n * Holds information about the number of tokens used for this answer, including prompt and completion tokens.\n * It is applicable only to the assistant role ({@link CHAT_MESSAGE_ROLE#ASSISTANT}).\n *\n * @type {TokenUsageInfo}\n */\n this.tokenUsageInfo = data.tokenUsageInfo;\n }\n\n get id() {\n return this._id;\n }\n\n set id(value) {\n this._id = value;\n }\n\n get role() {\n return this._role;\n }\n\n set role(value) {\n this._role = value;\n }\n\n get message() {\n return this._message;\n }\n\n set message(value) {\n this._message = value;\n }\n\n get timestamp() {\n return this._timestamp;\n }\n\n set timestamp(value) {\n this._timestamp = value;\n }\n}\n\nexport const CHAT_MESSAGE_ROLE = {\n USER: 'user',\n ASSISTANT: 'assistant'\n};\n","export class ChatAnswerModel {\n constructor(data = {}) {\n /**\n * @type {string | undefined}\n */\n this._chatId = data.chatId;\n\n /**\n * @type {string}\n */\n this._chatName = data.chatName || '';\n\n /**\n * @type {number}\n */\n this._timestamp = data.timestamp;\n\n /**\n * @type {ChatMessageModel[]}\n */\n this._messages = data.messages || [];\n\n /**\n * @type {string}\n */\n this._continueRunId = data.continueRunId;\n\n /**\n * Holds information about the number of tokens used for this answer, including prompt and completion tokens.\n *\n * @type {TokenUsageInfo}\n */\n this.tokenUsageInfo = data.tokenUsageInfo;\n }\n\n get chatId() {\n return this._chatId;\n }\n\n set chatId(value) {\n this._chatId = value;\n }\n\n get chatName() {\n return this._chatName;\n }\n\n set chatName(value) {\n this._chatName = value;\n }\n\n get timestamp() {\n return this._timestamp;\n }\n\n set timestamp(value) {\n this._timestamp = value;\n }\n\n get messages() {\n return this._messages;\n }\n\n set messages(value) {\n this._messages = value;\n }\n\n get continueRunId() {\n return this._continueRunId;\n }\n\n set continueRunId(value) {\n this._continueRunId = value;\n }\n}\n\n/**\n * Represents information on continuing the chat run, i.e., fetching answers iteratively after\n * asking until the last answer is received.\n */\nexport class ContinueChatRun {\n constructor(chatItem, runId) {\n this._chatItem = chatItem;\n this._runId = runId;\n }\n\n get chatId() {\n return this._chatItem.chatId;\n }\n\n toContinueRunRequestPayload() {\n return {\n conversationId: this.chatId,\n runId: this._runId,\n agentId: this._chatItem.agentId,\n tzOffset: -new Date().getTimezoneOffset() // offsets are reversed here hence the minus\n };\n }\n}\n","import {CHAT_MESSAGE_ROLE, ChatMessageModel} from \"./chat-message\";\n\n/**\n *\n * Represents a model that holds a question and the answer of it in a chat.\n *\n */\nexport class ChatItemModel {\n\n /**\n * Creates an instance of ChatItemModel.\n *\n * @param {string} chatId - The unique identifier for the chat associated with this instance.\n * @param {ChatMessageModel} question - The message object representing the question.\n */\n constructor(chatId, question) {\n\n /**\n * @type {string | undefined}\n * @private\n */\n this._chatId = chatId;\n\n /**\n * @type {string | undefined}\n * @private\n */\n this._agentId = undefined;\n\n /**\n * @type {ChatMessageModel}\n * @private\n */\n this._question = question;\n\n /**\n *\n * @type {ChatMessageModel[] | undefined}\n * @private\n */\n this._answers = [];\n }\n\n get chatId() {\n return this._chatId;\n }\n\n set chatId(value) {\n this._chatId = value;\n }\n\n get agentId() {\n return this._agentId;\n }\n\n set agentId(value) {\n this._agentId = value;\n }\n\n get question() {\n return this._question;\n }\n\n set question(value) {\n this._question = value;\n }\n\n get answers() {\n return this._answers;\n }\n\n /**\n *\n * @param {ChatMessageModel[]} value\n */\n set answers(value) {\n this._answers = value;\n }\n\n /**\n * Sets the message for the user's question.\n *\n * @param {string} message - The message content for the user's question.\n */\n setQuestionMessage(message) {\n if (!this._question) {\n this._question = new ChatMessageModel({role: CHAT_MESSAGE_ROLE.USER});\n }\n this._question.message = message;\n }\n\n /**\n * Retrieves the message of the user's question.\n *\n * @return {string} - The message content of the user's question.\n */\n getQuestionMessage() {\n return this._question.message;\n }\n\n /**\n * Converts the instance to a create chat request payload.\n *\n * @return {{agentId: string, question: string}} An object representing the create request payload.\n */\n toCreateChatRequestPayload() {\n return {\n agentId: this._agentId,\n question: this._question.message\n };\n }\n\n /**\n * Converts the instance to an ask request payload.\n *\n * @return {{conversationId: string, agentId: string, question: string}} An object representing the ask request payload.\n */\n toAskRequestPayload() {\n return {\n conversationId: this._chatId,\n agentId: this._agentId,\n question: this._question.message,\n tzOffset: -new Date().getTimezoneOffset() // offsets are reversed here hence the minus\n };\n }\n\n toExplainResponsePayload(answerId) {\n return {\n conversationId: this._chatId,\n answerId\n };\n }\n}\n\nexport class ChatItemsListModel {\n\n /**\n * @param {ChatItemModel[]} items\n */\n constructor(items = []) {\n this._items = items;\n }\n\n isEmpty() {\n return this._items.length === 0;\n }\n\n /**\n * @param {ChatItemModel} chatItem\n */\n appendItem(chatItem) {\n this._items.push(chatItem);\n }\n\n get items() {\n return this._items;\n }\n\n set items(value) {\n this._items = value || [];\n }\n\n getLast() {\n if (!this.isEmpty()) {\n return this._items[this._items.length - 1];\n }\n }\n}\n","import {ChatsListModel, ChatModel} from \"../../models/ttyg/chats\";\nimport {md5HashGenerator} from \"../../utils/hash-utils\";\nimport {chatItemsModelMapper} from \"./chat-message.mapper\";\nimport {ChatItemsListModel} from \"../../models/ttyg/chat-item\";\n\nconst hashGenerator = md5HashGenerator();\n\n/**\n * Converts the response from the server to a list of ChatModels.\n * @param {*[]} data\n * @return {ChatsListModel}\n */\nexport const chatsListMapper = (data) => {\n if (!data) {\n return new ChatsListModel();\n }\n const chatModels = data.map((chat) => chatModelMapper(chat));\n return new ChatsListModel(chatModels);\n};\n\n/**\n * Converts the response from the server to a ChatModel.\n * @param {*} data\n * @return {ChatModel|undefined}\n */\nexport const chatModelMapper = (data) => {\n if (!data) {\n return;\n }\n return new ChatModel({\n id: data.id,\n name: data.name,\n timestamp: data.timestamp,\n chatHistory: data.messages && data.messages.length ? chatItemsModelMapper(data.messages) : new ChatItemsListModel()\n }, hashGenerator);\n};\n","import {CHAT_MESSAGE_ROLE, ChatMessageModel} from \"../../models/ttyg/chat-message\";\nimport {ChatItemModel, ChatItemsListModel} from \"../../models/ttyg/chat-item\";\nimport {ChatAnswerModel} from \"../../models/ttyg/chat-answer\";\n\n/**\n * Converts the response from the server to a list of ChatMessageModel array.\n * @param {*[]} data\n * @return {ChatMessageModel[]}\n */\nexport const chatMessageModelListMapper = (data) => {\n if (!data) {\n return [];\n }\n return data.map((chatMessage) => chatMessageModelMapper(chatMessage));\n};\n\n/**\n * Maps a list of chat messages into an instance of {@see ChatItemsListModel}, which contains a list of `ChatItemModel` objects. Each object represents a question (from the user) and its corresponding answer (from the agent).\n * The backend returns messages as individual entries, and this function transforms those entries into objects that pair each question with its answer.\n *\n * @param {Array<Object>} data - An array of message objects, where each message contains details such as the role (user or assistant) and the message content.\n * @return {ChatItemsListModel} An instance of `ChatItemsListModel` containing a list of `ChatItemModel` objects, where each object holds a question and its corresponding answer.\n *\n * @example\n * // Example message data from the backend\n * const data = [\n * { role: 'user', conversationId: '123', agentId: 'agent-1', message: 'What is the weather?', timestamp: 1628876583 },\n * { role: 'assistant', conversationId: '123', agentId: 'agent-1', message: 'The weather is sunny.', timestamp: 1628876590 }\n * ];\n *\n * // Example of the resulting ChatItemsListModel array\n * const items = [\n * {\n * conversationId: '123',\n * agentId: 'agent-1',\n * question: {\n * role: 'user',\n * message: 'What is the weather?',\n * timestamp: 1628876583\n * },\n * answer: {\n * role: 'assistant',\n * message: 'The weather is sunny.',\n * timestamp: 1628876590\n * }\n * }]\n */\nexport const chatItemsModelMapper = (data = []) => {\n const items = [];\n let currentItem;\n data.forEach((message) => {\n // NOTE: The backend chat model doesn't have a ChatItemModel object,\n // i.e. it doesn't group user + assistant messages together.\n // In essence, there may be multiple consecutive user messages as well as\n // multiple consecutive assistant messages.\n const chatId = message.conversationId;\n if (CHAT_MESSAGE_ROLE.USER === message.role) {\n if (currentItem) {\n items.push(currentItem);\n }\n currentItem = new ChatItemModel(chatId, chatMessageModelMapper(message));\n } else {\n if (!currentItem) {\n currentItem = new ChatItemModel(chatId, null);\n }\n currentItem.answers.push(chatMessageModelMapper(message));\n currentItem.agentId = message.agentId;\n }\n });\n if (currentItem) {\n items.push(currentItem);\n }\n return new ChatItemsListModel(items);\n};\n\n/**\n * Converts the response from the server to a ChatMessageModel.\n * @param {*} data\n * @return {ChatMessageModel|undefined}\n */\nexport const chatMessageModelMapper = (data) => {\n if (!data) {\n return;\n }\n return new ChatMessageModel({\n id: data.id,\n role: data.role,\n message: data.message,\n timestamp: data.timestamp,\n tokenUsageInfo: data.usage,\n data: data\n });\n};\n\n/**\n * Converts the response from the server to a ChatAnswerModel instance.\n * @param {*} data\n * @return {ChatAnswerModel|undefined}\n */\nexport const chatAnswerModelMapper = (data) => {\n if (!data) {\n return;\n }\n return new ChatAnswerModel({\n chatId: data.id,\n chatName: data.name,\n timestamp: data.timestamp,\n messages: chatMessageModelListMapper(data.messages),\n continueRunId: data.continueRunId,\n tokenUsageInfo: data.usage\n });\n};\n"],"names":["ChatModel","getEmptyChat","data","name","timestamp","Math","floor","Date","now","md5HashGenerator","constructor","hashGenerator","this","_id","id","_name","_timestamp","_chatHistory","chatHistory","ChatItemsListModel","hash","generateHash","JSON","stringify","value","toRenameRequestPayload","ChatByDayModel","_day","day","_chats","chats","ChatsListModel","_chatsByDay","sortByTime","updateChatsByDay","sort","a","b","updateChatTimestamp","chatId","chat","find","c","updateChatName","deleteChat","chatToBeDeleted","filter","forEach","toDateString","dayModel","d","push","appendChat","replaceChat","newChat","oldChat","map","isEmpty","length","getFirstChat","deselectAll","selected","selectChat","getChat","getNonPersistedChat","renameChat","renamedChat","chatsByDay","ChatMessageModel","_role","role","_message","message","tokenUsageInfo","CHAT_MESSAGE_ROLE","USER","ASSISTANT","ChatAnswerModel","_chatId","_chatName","chatName","_messages","messages","_continueRunId","continueRunId","ContinueChatRun","chatItem","runId","_chatItem","_runId","toContinueRunRequestPayload","conversationId","agentId","tzOffset","getTimezoneOffset","ChatItemModel","question","_agentId","undefined","_question","_answers","answers","setQuestionMessage","getQuestionMessage","toCreateChatRequestPayload","toAskRequestPayload","toExplainResponsePayload","answerId","items","_items","appendItem","getLast","chatsListMapper","chatModels","chatModelMapper","chatItemsModelMapper","chatMessageModelListMapper","chatMessage","chatMessageModelMapper","currentItem","usage","chatAnswerModelMapper"],"sourceRoot":""}
@@ -1,2 +0,0 @@
1
- export const __webpack_id__=85788;export const __webpack_ids__=[36633,45458,63415,85788];export const __webpack_modules__={36633:(t,e,s)=>{s.r(e),s.d(e,{CHAT_MESSAGE_ROLE:()=>n,ChatMessageModel:()=>a});class a{constructor(t){this._id=t.id,this._role=t.role,this._message=t.message,this._timestamp=1e3*t.timestamp,this.tokenUsageInfo=t.tokenUsageInfo}get id(){return this._id}set id(t){this._id=t}get role(){return this._role}set role(t){this._role=t}get message(){return this._message}set message(t){this._message=t}get timestamp(){return this._timestamp}set timestamp(t){this._timestamp=t}}const n={USER:"user",ASSISTANT:"assistant"}},45458:(t,e,s)=>{s.r(e),s.d(e,{ChatAnswerModel:()=>a,ContinueChatRun:()=>n});class a{constructor(t={}){this._chatId=t.chatId,this._chatName=t.chatName||"",this._timestamp=t.timestamp,this._messages=t.messages||[],this._continueRunId=t.continueRunId,this.tokenUsageInfo=t.tokenUsageInfo}get chatId(){return this._chatId}set chatId(t){this._chatId=t}get chatName(){return this._chatName}set chatName(t){this._chatName=t}get timestamp(){return this._timestamp}set timestamp(t){this._timestamp=t}get messages(){return this._messages}set messages(t){this._messages=t}get continueRunId(){return this._continueRunId}set continueRunId(t){this._continueRunId=t}}class n{constructor(t,e){this._chatItem=t,this._runId=e}get chatId(){return this._chatItem.chatId}toContinueRunRequestPayload(){return{conversationId:this.chatId,runId:this._runId,agentId:this._chatItem.agentId,tzOffset:-(new Date).getTimezoneOffset()}}}},63415:(t,e,s)=>{s.r(e),s.d(e,{ChatItemModel:()=>n,ChatItemsListModel:()=>i});var a=s(36633);class n{constructor(t,e){this._chatId=t,this._agentId=void 0,this._question=e,this._answers=[]}get chatId(){return this._chatId}set chatId(t){this._chatId=t}get agentId(){return this._agentId}set agentId(t){this._agentId=t}get question(){return this._question}set question(t){this._question=t}get answers(){return this._answers}set answers(t){this._answers=t}setQuestionMessage(t){this._question||(this._question=new a.ChatMessageModel({role:a.CHAT_MESSAGE_ROLE.USER})),this._question.message=t}getQuestionMessage(){return this._question.message}toCreateChatRequestPayload(){return{agentId:this._agentId,question:this._question.message}}toAskRequestPayload(){return{conversationId:this._chatId,agentId:this._agentId,question:this._question.message,tzOffset:-(new Date).getTimezoneOffset()}}toExplainResponsePayload(t){return{conversationId:this._chatId,answerId:t}}}class i{constructor(t=[]){this._items=t}isEmpty(){return 0===this._items.length}appendItem(t){this._items.push(t)}get items(){return this._items}set items(t){this._items=t||[]}getLast(){if(!this.isEmpty())return this._items[this._items.length-1]}}},85788:(t,e,s)=>{s.r(e),s.d(e,{chatAnswerModelMapper:()=>m,chatItemsModelMapper:()=>o,chatMessageModelListMapper:()=>h,chatMessageModelMapper:()=>r});var a=s(36633),n=s(63415),i=s(45458);const h=t=>t?t.map(t=>r(t)):[],o=(t=[])=>{const e=[];let s;return t.forEach(t=>{const i=t.conversationId;a.CHAT_MESSAGE_ROLE.USER===t.role?(s&&e.push(s),s=new n.ChatItemModel(i,r(t))):(s||(s=new n.ChatItemModel(i,null)),s.answers.push(r(t)),s.agentId=t.agentId)}),s&&e.push(s),new n.ChatItemsListModel(e)},r=t=>{if(t)return new a.ChatMessageModel({id:t.id,role:t.role,message:t.message,timestamp:t.timestamp,tokenUsageInfo:t.usage,data:t})},m=t=>{if(t)return new i.ChatAnswerModel({chatId:t.id,chatName:t.name,timestamp:t.timestamp,messages:h(t.messages),continueRunId:t.continueRunId,tokenUsageInfo:t.usage})}}};
2
- //# sourceMappingURL=85788.4e0818c48b6f29153db4.bundle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"85788.4e0818c48b6f29153db4.bundle.js","mappings":"0MAAO,MAAMA,EACTC,WAAAA,CAAYC,GAKRC,KAAKC,IAAMF,EAAKG,GAKhBF,KAAKG,MAAQJ,EAAKK,KAKlBJ,KAAKK,SAAWN,EAAKO,QAKrBN,KAAKO,WAA8B,IAAjBR,EAAKS,UAQvBR,KAAKS,eAAiBV,EAAKU,cAC/B,CAEA,MAAIP,GACA,OAAOF,KAAKC,GAChB,CAEA,MAAIC,CAAGQ,GACHV,KAAKC,IAAMS,CACf,CAEA,QAAIN,GACA,OAAOJ,KAAKG,KAChB,CAEA,QAAIC,CAAKM,GACLV,KAAKG,MAAQO,CACjB,CAEA,WAAIJ,GACA,OAAON,KAAKK,QAChB,CAEA,WAAIC,CAAQI,GACRV,KAAKK,SAAWK,CACpB,CAEA,aAAIF,GACA,OAAOR,KAAKO,UAChB,CAEA,aAAIC,CAAUE,GACVV,KAAKO,WAAaG,CACtB,EAGG,MAAMC,EAAoB,CAC7BC,KAAM,OACNC,UAAW,Y,8ECnER,MAAMC,EACThB,WAAAA,CAAYC,EAAO,CAAC,GAIhBC,KAAKe,QAAUhB,EAAKiB,OAKpBhB,KAAKiB,UAAYlB,EAAKmB,UAAY,GAKlClB,KAAKO,WAAaR,EAAKS,UAKvBR,KAAKmB,UAAYpB,EAAKqB,UAAY,GAKl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F,MAC/BwD,GACAZ,EAAMK,KAAKO,GAEfA,EAAc,IAAI1B,EAAAA,cAAclB,EAAQ0C,EAAuBpD,MAE1DsD,IACDA,EAAc,IAAI1B,EAAAA,cAAclB,EAAQ,OAE5C4C,EAAYpB,QAAQa,KAAKK,EAAuBpD,IAChDsD,EAAY9B,QAAUxB,EAAQwB,WAGlC8B,GACAZ,EAAMK,KAAKO,GAER,IAAIb,EAAAA,mBAAmBC,IAQrBU,EAA0B3D,IACnC,GAAKA,EAGL,OAAO,IAAIF,EAAAA,iBAAiB,CACxBK,GAAIH,EAAKG,GACTE,KAAML,EAAKK,KACXE,QAASP,EAAKO,QACdE,UAAWT,EAAKS,UAChBC,eAAgBV,EAAK+D,MACrB/D,KAAMA,KASDgE,EAAyBhE,IAClC,GAAKA,EAGL,OAAO,IAAIe,EAAAA,gBAAgB,CACvBE,OAAQjB,EAAKG,GACbgB,SAAUnB,EAAKiE,KACfxD,UAAWT,EAAKS,UAChBY,SAAUmC,EAA2BxD,EAAKqB,UAC1CE,cAAevB,EAAKuB,cACpBb,eAAgBV,EAAK+D,Q","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/models/ttyg/chat-message.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/models/ttyg/chat-answer.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/models/ttyg/chat-item.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/ttyg/services/chat-message.mapper.js"],"sourcesContent":["export class ChatMessageModel {\n constructor(data) {\n\n /**\n * @type {string}\n */\n this._id = data.id;\n\n /**\n * @type @type {string} - A value from {@link CHAT_MESSAGE_ROLE}, determining the owner of the message (e.g., user, assistant).\n */\n this._role = data.role;\n\n /**\n * @type {string}\n */\n this._message = data.message;\n\n /**\n * @type {number}\n */\n this._timestamp = data.timestamp * 1000;\n\n /**\n * Holds information about the number of tokens used for this answer, including prompt and completion tokens.\n * It is applicable only to the assistant role ({@link CHAT_MESSAGE_ROLE#ASSISTANT}).\n *\n * @type {TokenUsageInfo}\n */\n this.tokenUsageInfo = data.tokenUsageInfo;\n }\n\n get id() {\n return this._id;\n }\n\n set id(value) {\n this._id = value;\n }\n\n get role() {\n return this._role;\n }\n\n set role(value) {\n this._role = value;\n }\n\n get message() {\n return this._message;\n }\n\n set message(value) {\n this._message = value;\n }\n\n get timestamp() {\n return this._timestamp;\n }\n\n set timestamp(value) {\n this._timestamp = value;\n }\n}\n\nexport const CHAT_MESSAGE_ROLE = {\n USER: 'user',\n ASSISTANT: 'assistant'\n};\n","export class ChatAnswerModel {\n constructor(data = {}) {\n /**\n * @type {string | undefined}\n */\n this._chatId = data.chatId;\n\n /**\n * @type {string}\n */\n this._chatName = data.chatName || '';\n\n /**\n * @type {number}\n */\n this._timestamp = data.timestamp;\n\n /**\n * @type {ChatMessageModel[]}\n */\n this._messages = data.messages || [];\n\n /**\n * @type {string}\n */\n this._continueRunId = data.continueRunId;\n\n /**\n * Holds information about the number of tokens used for this answer, including prompt and completion tokens.\n *\n * @type {TokenUsageInfo}\n */\n this.tokenUsageInfo = data.tokenUsageInfo;\n }\n\n get chatId() {\n return this._chatId;\n }\n\n set chatId(value) {\n this._chatId = value;\n }\n\n get chatName() {\n return this._chatName;\n }\n\n set chatName(value) {\n this._chatName = value;\n }\n\n get timestamp() {\n return this._timestamp;\n }\n\n set timestamp(value) {\n this._timestamp = value;\n }\n\n get messages() {\n return this._messages;\n }\n\n set messages(value) {\n this._messages = value;\n }\n\n get continueRunId() {\n return this._continueRunId;\n }\n\n set continueRunId(value) {\n this._continueRunId = value;\n }\n}\n\n/**\n * Represents information on continuing the chat run, i.e., fetching answers iteratively after\n * asking until the last answer is received.\n */\nexport class ContinueChatRun {\n constructor(chatItem, runId) {\n this._chatItem = chatItem;\n this._runId = runId;\n }\n\n get chatId() {\n return this._chatItem.chatId;\n }\n\n toContinueRunRequestPayload() {\n return {\n conversationId: this.chatId,\n runId: this._runId,\n agentId: this._chatItem.agentId,\n tzOffset: -new Date().getTimezoneOffset() // offsets are reversed here hence the minus\n };\n }\n}\n","import {CHAT_MESSAGE_ROLE, ChatMessageModel} from \"./chat-message\";\n\n/**\n *\n * Represents a model that holds a question and the answer of it in a chat.\n *\n */\nexport class ChatItemModel {\n\n /**\n * Creates an instance of ChatItemModel.\n *\n * @param {string} chatId - The unique identifier for the chat associated with this instance.\n * @param {ChatMessageModel} question - The message object representing the question.\n */\n constructor(chatId, question) {\n\n /**\n * @type {string | undefined}\n * @private\n */\n this._chatId = chatId;\n\n /**\n * @type {string | undefined}\n * @private\n */\n this._agentId = undefined;\n\n /**\n * @type {ChatMessageModel}\n * @private\n */\n this._question = question;\n\n /**\n *\n * @type {ChatMessageModel[] | undefined}\n * @private\n */\n this._answers = [];\n }\n\n get chatId() {\n return this._chatId;\n }\n\n set chatId(value) {\n this._chatId = value;\n }\n\n get agentId() {\n return this._agentId;\n }\n\n set agentId(value) {\n this._agentId = value;\n }\n\n get question() {\n return this._question;\n }\n\n set question(value) {\n this._question = value;\n }\n\n get answers() {\n return this._answers;\n }\n\n /**\n *\n * @param {ChatMessageModel[]} value\n */\n set answers(value) {\n this._answers = value;\n }\n\n /**\n * Sets the message for the user's question.\n *\n * @param {string} message - The message content for the user's question.\n */\n setQuestionMessage(message) {\n if (!this._question) {\n this._question = new ChatMessageModel({role: CHAT_MESSAGE_ROLE.USER});\n }\n this._question.message = message;\n }\n\n /**\n * Retrieves the message of the user's question.\n *\n * @return {string} - The message content of the user's question.\n */\n getQuestionMessage() {\n return this._question.message;\n }\n\n /**\n * Converts the instance to a create chat request payload.\n *\n * @return {{agentId: string, question: string}} An object representing the create request payload.\n */\n toCreateChatRequestPayload() {\n return {\n agentId: this._agentId,\n question: this._question.message\n };\n }\n\n /**\n * Converts the instance to an ask request payload.\n *\n * @return {{conversationId: string, agentId: string, question: string}} An object representing the ask request payload.\n */\n toAskRequestPayload() {\n return {\n conversationId: this._chatId,\n agentId: this._agentId,\n question: this._question.message,\n tzOffset: -new Date().getTimezoneOffset() // offsets are reversed here hence the minus\n };\n }\n\n toExplainResponsePayload(answerId) {\n return {\n conversationId: this._chatId,\n answerId\n };\n }\n}\n\nexport class ChatItemsListModel {\n\n /**\n * @param {ChatItemModel[]} items\n */\n constructor(items = []) {\n this._items = items;\n }\n\n isEmpty() {\n return this._items.length === 0;\n }\n\n /**\n * @param {ChatItemModel} chatItem\n */\n appendItem(chatItem) {\n this._items.push(chatItem);\n }\n\n get items() {\n return this._items;\n }\n\n set items(value) {\n this._items = value || [];\n }\n\n getLast() {\n if (!this.isEmpty()) {\n return this._items[this._items.length - 1];\n }\n }\n}\n","import {CHAT_MESSAGE_ROLE, ChatMessageModel} from \"../../models/ttyg/chat-message\";\nimport {ChatItemModel, ChatItemsListModel} from \"../../models/ttyg/chat-item\";\nimport {ChatAnswerModel} from \"../../models/ttyg/chat-answer\";\n\n/**\n * Converts the response from the server to a list of ChatMessageModel array.\n * @param {*[]} data\n * @return {ChatMessageModel[]}\n */\nexport const chatMessageModelListMapper = (data) => {\n if (!data) {\n return [];\n }\n return data.map((chatMessage) => chatMessageModelMapper(chatMessage));\n};\n\n/**\n * Maps a list of chat messages into an instance of {@see ChatItemsListModel}, which contains a list of `ChatItemModel` objects. Each object represents a question (from the user) and its corresponding answer (from the agent).\n * The backend returns messages as individual entries, and this function transforms those entries into objects that pair each question with its answer.\n *\n * @param {Array<Object>} data - An array of message objects, where each message contains details such as the role (user or assistant) and the message content.\n * @return {ChatItemsListModel} An instance of `ChatItemsListModel` containing a list of `ChatItemModel` objects, where each object holds a question and its corresponding answer.\n *\n * @example\n * // Example message data from the backend\n * const data = [\n * { role: 'user', conversationId: '123', agentId: 'agent-1', message: 'What is the weather?', timestamp: 1628876583 },\n * { role: 'assistant', conversationId: '123', agentId: 'agent-1', message: 'The weather is sunny.', timestamp: 1628876590 }\n * ];\n *\n * // Example of the resulting ChatItemsListModel array\n * const items = [\n * {\n * conversationId: '123',\n * agentId: 'agent-1',\n * question: {\n * role: 'user',\n * message: 'What is the weather?',\n * timestamp: 1628876583\n * },\n * answer: {\n * role: 'assistant',\n * message: 'The weather is sunny.',\n * timestamp: 1628876590\n * }\n * }]\n */\nexport const chatItemsModelMapper = (data = []) => {\n const items = [];\n let currentItem;\n data.forEach((message) => {\n // NOTE: The backend chat model doesn't have a ChatItemModel object,\n // i.e. it doesn't group user + assistant messages together.\n // In essence, there may be multiple consecutive user messages as well as\n // multiple consecutive assistant messages.\n const chatId = message.conversationId;\n if (CHAT_MESSAGE_ROLE.USER === message.role) {\n if (currentItem) {\n items.push(currentItem);\n }\n currentItem = new ChatItemModel(chatId, chatMessageModelMapper(message));\n } else {\n if (!currentItem) {\n currentItem = new ChatItemModel(chatId, null);\n }\n currentItem.answers.push(chatMessageModelMapper(message));\n currentItem.agentId = message.agentId;\n }\n });\n if (currentItem) {\n items.push(currentItem);\n }\n return new ChatItemsListModel(items);\n};\n\n/**\n * Converts the response from the server to a ChatMessageModel.\n * @param {*} data\n * @return {ChatMessageModel|undefined}\n */\nexport const chatMessageModelMapper = (data) => {\n if (!data) {\n return;\n }\n return new ChatMessageModel({\n id: data.id,\n role: data.role,\n message: data.message,\n timestamp: data.timestamp,\n tokenUsageInfo: data.usage,\n data: data\n });\n};\n\n/**\n * Converts the response from the server to a ChatAnswerModel instance.\n * @param {*} data\n * @return {ChatAnswerModel|undefined}\n */\nexport const chatAnswerModelMapper = (data) => {\n if (!data) {\n return;\n }\n return new ChatAnswerModel({\n chatId: data.id,\n chatName: data.name,\n timestamp: data.timestamp,\n messages: chatMessageModelListMapper(data.messages),\n continueRunId: data.continueRunId,\n tokenUsageInfo: data.usage\n });\n};\n"],"names":["ChatMessageModel","constructor","data","this","_id","id","_role","role","_message","message","_timestamp","timestamp","tokenUsageInfo","value","CHAT_MESSAGE_ROLE","USER","ASSISTANT","ChatAnswerModel","_chatId","chatId","_chatName","chatName","_messages","messages","_continueRunId","continueRunId","ContinueChatRun","chatItem","runId","_chatItem","_runId","toContinueRunRequestPayload","conversationId","agentId","tzOffset","Date","getTimezoneOffset","ChatItemModel","question","_agentId","undefined","_question","_answers","answers","setQuestionMessage","getQuestionMessage","toCreateChatRequestPayload","toAskRequestPayload","toExplainResponsePayload","answerId","ChatItemsListModel","items","_items","isEmpty","length","appendItem","push","getLast","chatMessageModelListMapper","map","chatMessage","chatMessageModelMapper","chatItemsModelMapper","currentItem","forEach","usage","chatAnswerModelMapper","name"],"sourceRoot":""}
@@ -1,2 +0,0 @@
1
- export const __webpack_id__=86142;export const __webpack_ids__=[86142];export const __webpack_modules__={86142:()=>{const e="guide.step-action.select-ttyg-agent";PluginRegistry.add("guide.step",[{guideBlockName:"ttyg-select-agent-info-message",getSteps:(t,o)=>[{guideBlockName:"info-message",options:{content:"guide.step_plugin.select-ttyg-agent.info.content",...t.mainAction?{}:{title:e},class:"select-ttyg-agent",skipPoint:!0,disablePreviousFlow:!0,...t,url:"ttyg"}}]},{guideBlockName:"ttyg-select-agent-dropdown-open",getSteps:(t,o)=>{const n=o.GuideUtils;return[{guideBlockName:"clickable-element",options:{content:"guide.step_plugin.select-ttyg-agent.open-agent-dropdown",...t.mainAction?{}:{title:e},class:"open-agent-dropdown",disableNextFlow:!0,...t,url:"ttyg",elementSelector:n.getGuideElementSelector("select-agent-dropdown")}}]}},{guideBlockName:"ttyg-select-agent-from-dropdown",getSteps:(t,o)=>{const n=o.GuideUtils;return[{guideBlockName:"clickable-element",options:{content:"guide.step_plugin.select-ttyg-agent.select-agent",...t.mainAction?{}:{title:e},disableNextFlow:!0,class:"select-your-agent",...t,elementSelector:n.getGuideElementSelector("select-agent-panel"),show:()=>()=>{const e=document.querySelector(n.getGuideElementSelector("select-agent-dropdown")),o=document.querySelector(n.getGuideElementSelector("select-agent-dropdown-toggle"));t.observer=new MutationObserver(function(e){for(const t of e)"attributes"===t.type&&(t.target.classList.contains("open")||o.click())}),t.observer.observe(e,{attributes:!0})},hide:()=>()=>{t.observer.disconnect()}}}]}},{guideBlockName:"ttyg-select-agent-check-for-missing-repository-cancel",getSteps:(t,o)=>{const n=o.GuideUtils;return[{guideBlockName:"info-message",options:angular.extend({},{beforeShowPromise:(e,t)=>n.getOrWaitFor(n.getElementSelector(".confirm-dialog .cancel-btn"),1).then(()=>{setTimeout(()=>e.next())}).catch(()=>{const o=t.id;setTimeout(()=>e.show(o+2))})},t)},{guideBlockName:"clickable-element",options:{content:"guide.step_plugin.select-ttyg-agent.missing-repository",...t.mainAction?{}:{title:e},...t,elementSelector:n.getElementSelector(".confirm-dialog .cancel-btn"),showOn:()=>n.isVisible(".confirm-dialog .cancel-btn"),onNextClick:()=>{n.clickOnElement(".confirm-dialog .cancel-btn")()},show:(e,t)=>()=>{const o=t.id;$(t.elementSelector).on("click",()=>{e.show(o-3)})},hide:(e,t)=>()=>{$(t.elementSelector).off("click")}}}]}},{guideBlockName:"select-ttyg-agent",getSteps:e=>(e.mainAction="select-ttyg-agent",[{guideBlockName:"ttyg-select-agent-info-message",options:{...e}},{guideBlockName:"ttyg-select-agent-dropdown-open",options:{...e}},{guideBlockName:"ttyg-select-agent-from-dropdown",options:{...e}},{guideBlockName:"ttyg-select-agent-check-for-missing-repository-cancel",options:{...e}}])}])}};
2
- //# sourceMappingURL=86142.c29959b68edc59a9b696.bundle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"86142.c29959b68edc59a9b696.bundle.js","mappings":"oHAAA,MAAMA,EAAkC,sCAExCC,eAAeC,IAAI,aAAc,CAC7B,CACIC,eAAgB,iCAChBC,SAAUA,CAACC,EAASC,IACT,CACH,CACIH,eAAgB,eAChBE,QAAS,CACLE,QAAS,sDAELF,EAAQG,WAAa,CAAC,EAAI,CAAEC,MAAOT,GACvCU,MAAO,oBACPC,WAAW,EACXC,qBAAqB,KAClBP,EACHQ,IAAK,WAMzB,CACIV,eAAgB,kCAChBC,SAAUA,CAACC,EAASC,KAChB,MAAMQ,EAAaR,EAASQ,WAE5B,MAAO,CACH,CACIX,eAAgB,oBAChBE,QAAS,CACLE,QAAS,6DAELF,EAAQG,WAAa,CAAC,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AMnC,EAAWoC,UAAU,+BACnCC,YAAaA,KAETrC,EAAWsC,eAAe,8BAA1BtC,IAEJI,KAAMA,CAACqB,EAAOC,IAAgB,KAC1B,MAAMa,EAAgBb,EAAYQ,GAGlCM,EAAEd,EAAYxB,iBAAiBuC,GAAG,QAAS,KACvChB,EAAMrB,KAAKmC,EAAgB,MAGnCnB,KAAMA,CAACK,EAAOC,IAAgB,KAE1Bc,EAAEd,EAAYxB,iBAAiBwC,IAAI,eAOzD,CACIrD,eAAgB,oBAChBC,SAAWC,IACPA,EAAQG,WAAa,oBAEd,CACH,CACIL,eAAgB,iCAChBE,QAAS,IAAIA,IAEjB,CACIF,eAAgB,kCAChBE,QAAS,IAAIA,IAEjB,CACIF,eAAgB,kCAChBE,QAAS,IAAIA,IAEjB,CACIF,eAAgB,wDAChBE,QAAS,IAAIA,Q","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/guides/steps/complex/ttyg/select-ttyg-agent/plugin.js"],"sourcesContent":["const TTYG_SELECT_AGENT_DEFAULT_TITLE = 'guide.step-action.select-ttyg-agent';\n\nPluginRegistry.add('guide.step', [\n {\n guideBlockName: 'ttyg-select-agent-info-message',\n getSteps: (options, services) => {\n return [\n {\n guideBlockName: 'info-message',\n options: {\n content: 'guide.step_plugin.select-ttyg-agent.info.content',\n // If mainAction is set the title will be set automatically\n ...(options.mainAction ? {} : { title: TTYG_SELECT_AGENT_DEFAULT_TITLE }),\n class: 'select-ttyg-agent',\n skipPoint: true,\n disablePreviousFlow: true,\n ...options,\n url: 'ttyg'\n }\n }\n ]\n }\n },\n {\n guideBlockName: 'ttyg-select-agent-dropdown-open',\n getSteps: (options, services) => {\n const GuideUtils = services.GuideUtils;\n\n return [\n {\n guideBlockName: 'clickable-element',\n options: {\n content: 'guide.step_plugin.select-ttyg-agent.open-agent-dropdown',\n // If mainAction is set the title will be set automatically\n ...(options.mainAction ? {} : { title: TTYG_SELECT_AGENT_DEFAULT_TITLE }),\n class: 'open-agent-dropdown',\n disableNextFlow: true,\n ...options,\n url: 'ttyg',\n elementSelector: GuideUtils.getGuideElementSelector('select-agent-dropdown'),\n }\n }\n ]\n }\n },\n {\n guideBlockName: 'ttyg-select-agent-from-dropdown',\n getSteps: (options, services) => {\n const GuideUtils = services.GuideUtils;\n return [\n {\n guideBlockName: 'clickable-element',\n options: {\n content: 'guide.step_plugin.select-ttyg-agent.select-agent',\n // If mainAction is set the title will be set automatically\n ...(options.mainAction ? {} : { title: TTYG_SELECT_AGENT_DEFAULT_TITLE }),\n disableNextFlow: true,\n class: 'select-your-agent',\n ...options,\n elementSelector: GuideUtils.getGuideElementSelector('select-agent-panel'),\n show: () => () => {\n const elementToObserve = document.querySelector(GuideUtils.getGuideElementSelector('select-agent-dropdown'));\n const dropdownToggleElement = document.querySelector(GuideUtils.getGuideElementSelector('select-agent-dropdown-toggle'));\n\n options.observer = new MutationObserver(attributesChangeCallback);\n options.observer.observe(elementToObserve, {attributes: true});\n\n function attributesChangeCallback(mutationList) {\n for (const mutation of mutationList) {\n if (mutation.type === 'attributes') {\n const isOpened = mutation.target.classList.contains('open');\n\n // The component we use for selecting the agent automatically closes\n // after the user clicks on the view, which is why we have to open it.\n if (!(isOpened)) {\n dropdownToggleElement.click();\n }\n }\n }\n }\n },\n hide: () => () => {\n options.observer.disconnect();\n }\n }\n }\n ]\n }\n },\n {\n guideBlockName: 'ttyg-select-agent-check-for-missing-repository-cancel',\n getSteps: (options, services) => {\n const GuideUtils = services.GuideUtils;\n\n return [\n {\n // If missing repository modal is visible go to next step, otherwise skip it\n guideBlockName: 'info-message',\n options: angular.extend({}, {\n beforeShowPromise: (guide, currentStep) => {\n return GuideUtils.getOrWaitFor(GuideUtils.getElementSelector('.confirm-dialog .cancel-btn'), 1)\n .then(() => {\n // Using a timeout because the library executes logic to show the step in a then clause which causes current and next steps to show\n setTimeout(() => guide.next())\n })\n .catch(() => {\n const stepId = currentStep.id;\n // Using a timeout because the library executes logic to show the step in a then clause which causes current and next steps to show\n setTimeout(() => guide.show(stepId + 2))\n })\n }\n }, options)\n },\n {\n guideBlockName: 'clickable-element',\n options: {\n content: 'guide.step_plugin.select-ttyg-agent.missing-repository',\n // If mainAction is set the title will be set automatically\n ...(options.mainAction ? {} : { title: TTYG_SELECT_AGENT_DEFAULT_TITLE }),\n ...options,\n elementSelector: GuideUtils.getElementSelector('.confirm-dialog .cancel-btn'),\n showOn: () => GuideUtils.isVisible('.confirm-dialog .cancel-btn'),\n onNextClick: () => {\n // Close the modal by clicking on the cancel button\n GuideUtils.clickOnElement('.confirm-dialog .cancel-btn')();\n },\n show: (guide, currentStep) => () => {\n const currentStepId = currentStep.id;\n // Add a \"click\" listener to the element.\n // Upon clicking the element, the guide is set back 3 steps to \"open dropdown\" step\n $(currentStep.elementSelector).on('click', () => {\n guide.show(currentStepId - 3)\n });\n },\n hide: (guide, currentStep) => () => {\n // Remove the \"click\" listener of the element. It is important when the step is hidden.\n $(currentStep.elementSelector).off('click');\n }\n }\n }\n ]\n }\n },\n {\n guideBlockName: 'select-ttyg-agent',\n getSteps: (options) => {\n options.mainAction = 'select-ttyg-agent';\n\n return [\n {\n guideBlockName: 'ttyg-select-agent-info-message',\n options: {...options}\n },\n {\n guideBlockName: 'ttyg-select-agent-dropdown-open',\n options: {...options}\n },\n {\n guideBlockName: 'ttyg-select-agent-from-dropdown',\n options: {...options}\n },\n {\n guideBlockName: 'ttyg-select-agent-check-for-missing-repository-cancel',\n options: {...options}\n },\n ];\n }\n }\n]);\n"],"names":["TTYG_SELECT_AGENT_DEFAULT_TITLE","PluginRegistry","add","guideBlockName","getSteps","options","services","content","mainAction","title","class","skipPoint","disablePreviousFlow","url","GuideUtils","disableNextFlow","elementSelector","getGuideElementSelector","show","elementToObserve","document","querySelector","dropdownToggleElement","observer","MutationObserver","mutationList","mutation","type","target","classList","contains","click","observe","attributes","hide","disconnect","angular","extend","beforeShowPromise","guide","currentStep","getOrWaitFor","getElementSelector","then","setTimeout","next","catch","stepId","id","showOn","isVisible","onNextClick","clickOnElement","currentStepId","$","on","off"],"sourceRoot":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"89695.4ee87c52d4088115c51e.bundle.js","mappings":"oHAAA,MAAMA,EAAsC,gBACtCC,EAAoC,cACpCC,EAA0C,yCAEhDC,eAAeC,IAAI,aAAc,CAC7B,CACIC,eAAgB,4BAChBC,SAAUA,CAACC,EAASC,KAChB,MAAMC,EAAaD,EAASC,WACtBC,EAAiBD,EAAWE,wBAAwB,oCAC1D,MAAO,CACH,CACIN,eAAgB,oBAChBE,QAAS,CACLK,QAAS,0DAELL,EAAQM,WAAa,CAAC,EAAI,CAACC,MAAOZ,GACtCa,MAAO,0BACJR,EACHS,IAAK,OACLC,gBAAiBR,EAAWE,wBAAwB,8BACpDO,yBAA0BR,EAC1BS,eAAgBA,IAAMC,QAAQC,QAAQZ,EAAWa,UAAUZ,SAM/E,CACIL,eAAgB,6BAChBC,SAAUA,CAACC,EAASC,KAChB,MAAMC,EAAaD,EAASC,WACtBC,EAAiBD,EAAWE,wBAAwB,oCAE1D,MAAO,CACH,CACIN,eAAgB,oBAChBE,QAAS,CACLK,QAAS,2DAELL,EAAQM,WAAa,CAAC,EAAI,CAACC,MAAOZ,GACtCa,MAAO,0BACJR,EACHS,IAAK,OACLO,OAAQA,IAAMd,EAAWa,UAAUZ,GACnCO,gBAAiBR,EAAWE,wBAAwB,8BACpDO,yBAA0BR,EAC1BS,eAAgBA,IAAMC,QAAQC,SAASZ,EAAWa,UAAUZ,SAMhF,CACIL,eAAgB,qCAChBC,SAAUA,CAACC,EAASC,KAChB,MAAMC,EAAaD,EAASC,WAE5B,MAAO,CACH,CACIJ,eAAgB,oBAChBE,QAAS,CACLK,QAAS,oEACTG,MAAO,gCAEHR,EAAQM,WAAa,CAAC,EAAI,CAACC,MAAOZ,MACnCK,EACHS,IAAK,OACLC,gBAAiBR,EAAWE,wBAAwB,gCACpDO,yBAA0BT,EAAWE,wBAAwB,sCAC7DQ,eAAgBA,IAAMC,QAAQ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ACP3B,eAAgB,2CAChBE,QAAS,IAAIA,KAIduB,K","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/guides/steps/complex/ttyg/common/sparql-search-method/plugin.js"],"sourcesContent":["const CONFIGURATION_OPTION_ONTOLOGY_GRAPH = 'ontologyGraph';\nconst CONFIGURATION_OPTION_SPARQL_QUERY = 'sparqlQuery';\nconst TTYG_SPARQL_SEARCH_METHOD_DEFAULT_TITLE = 'guide.step-action.sparql-search-method';\n\nPluginRegistry.add('guide.step', [\n {\n guideBlockName: 'ttyg-sparql-method-enable',\n getSteps: (options, services) => {\n const GuideUtils = services.GuideUtils;\n const toggleSelector = GuideUtils.getGuideElementSelector('query-method-sparql_search-input');\n return [\n {\n guideBlockName: 'clickable-element',\n options: {\n content: 'guide.step_plugin.sparql-search-method.enable-toggle',\n // If mainAction is set the title will be set automatically\n ...(options.mainAction ? {} : {title: TTYG_SPARQL_SEARCH_METHOD_DEFAULT_TITLE}),\n class: 'toggle-sparql-search',\n ...options,\n url: 'ttyg',\n elementSelector: GuideUtils.getGuideElementSelector('query-method-sparql_search'),\n clickableElementSelector: toggleSelector,\n onNextValidate: () => Promise.resolve(GuideUtils.isChecked(toggleSelector)),\n },\n },\n ];\n },\n },\n {\n guideBlockName: 'ttyg-sparql-method-disable',\n getSteps: (options, services) => {\n const GuideUtils = services.GuideUtils;\n const toggleSelector = GuideUtils.getGuideElementSelector('query-method-sparql_search-input');\n\n return [\n {\n guideBlockName: 'clickable-element',\n options: {\n content: 'guide.step_plugin.sparql-search-method.disable-toggle',\n // If mainAction is set the title will be set automatically\n ...(options.mainAction ? {} : {title: TTYG_SPARQL_SEARCH_METHOD_DEFAULT_TITLE}),\n class: 'toggle-sparql-search',\n ...options,\n url: 'ttyg',\n showOn: () => GuideUtils.isChecked(toggleSelector),\n elementSelector: GuideUtils.getGuideElementSelector('query-method-sparql_search'),\n clickableElementSelector: toggleSelector,\n onNextValidate: () => Promise.resolve(!GuideUtils.isChecked(toggleSelector)),\n },\n },\n ];\n },\n },\n {\n guideBlockName: \"ttyg-sparql-method-ontology-select\",\n getSteps: (options, services) => {\n const GuideUtils = services.GuideUtils;\n\n return [\n {\n guideBlockName: 'clickable-element',\n options: {\n content: 'guide.step_plugin.sparql-search-method.enable-ontology-from-graph',\n class: 'enable-ontology-from-graph',\n // If mainAction is set the title will be set automatically\n ...(options.mainAction ? {} : {title: TTYG_SPARQL_SEARCH_METHOD_DEFAULT_TITLE}),\n ...options,\n url: 'ttyg',\n elementSelector: GuideUtils.getGuideElementSelector('sparql-ontology-graph-option'),\n clickableElementSelector: GuideUtils.getGuideElementSelector('sparql-ontology-graph-option-input'),\n onNextValidate: () => Promise.resolve(GuideUtils.isChecked(GuideUtils.getGuideElementSelector('sparql-ontology-graph-option-input'))),\n },\n },\n ];\n },\n },\n {\n guideBlockName: 'sparql-search-method-type-graph-name',\n getSteps: (options, services) => {\n const GuideUtils = services.GuideUtils;\n\n return [\n {\n guideBlockName: 'input-element',\n options: {\n content: `guide.step_plugin.sparql-search-method.type-ontology-graph-name`,\n // If mainAction is set the title will be set automatically\n ...(options.mainAction ? {} : {title: TTYG_SPARQL_SEARCH_METHOD_DEFAULT_TITLE}),\n class: 'input-ontology-graph-name',\n ...options,\n url: 'ttyg',\n elementSelector: GuideUtils.getGuideElementSelector('sparql-ontology-graph-input'),\n onNextValidate: () => Promise.resolve(GuideUtils.validateTextInput(GuideUtils.getGuideElementSelector('sparql-ontology-graph-input'), options.ontologyGraph, false)),\n },\n },\n ];\n },\n },\n {\n guideBlockName: 'ttyg-sparql-method-sparql-query-select',\n getSteps: (options, services) => {\n const GuideUtils = services.GuideUtils;\n\n return [\n {\n guideBlockName: 'clickable-element',\n options: angular.extend({}, {\n content: 'guide.step_plugin.sparql-search-method.enable-sparql-query',\n class: 'enable-sparql-query',\n url: 'ttyg',\n elementSelector: GuideUtils.getGuideElementSelector('sparql-query-option'),\n clickableElementSelector: GuideUtils.getGuideElementSelector('sparql-query-option-input'),\n onNextValidate: () => Promise.resolve(GuideUtils.isChecked(GuideUtils.getGuideElementSelector('sparql-query-option-input'))),\n }, options),\n },\n ];\n },\n },\n {\n guideBlockName: \"ttyg-sparql-copy-query-text\",\n getSteps: (options, services) => {\n const GuideUtils = services.GuideUtils;\n\n return [\n {\n guideBlockName: 'copy-text-element',\n options: {\n elementSelector: GuideUtils.getGuideElementSelector('sparql-query-input'),\n text: options.sparqlQuery,\n ...options,\n onNextValidate: () => Promise.resolve(GuideUtils.validateTextInput(GuideUtils.getGuideElementSelector('sparql-query-input'), options.sparqlQuery, false)),\n },\n },\n ];\n },\n },\n {\n guideBlockName: 'ttyg-sparql-click-add-namespaces',\n getSteps: (options, services) => {\n const GuideUtils = services.GuideUtils;\n\n return [\n {\n guideBlockName: 'clickable-element',\n options: {\n content: 'guide.step_plugin.sparql-search-method.add-missing-namespaces',\n // If mainAction is set the title will be set automatically\n ...(options.mainAction ? {} : {title: TTYG_SPARQL_SEARCH_METHOD_DEFAULT_TITLE}),\n class: 'enable-sparql-query',\n ...options,\n url: 'ttyg',\n elementSelector: GuideUtils.getGuideElementSelector('add-missing-namespaces-option'),\n onNextValidate: () => Promise.resolve(GuideUtils.isChecked(GuideUtils.getGuideElementSelector('add-missing-namespaces-input'))),\n },\n },\n ];\n },\n },\n {\n guideBlockName: 'ttyg-enabling-sparql-info-message',\n getSteps: (options, services) => {\n return [\n {\n guideBlockName: 'info-message',\n options: {\n content: `guide.step_plugin.sparql-search-method.content`,\n // If mainAction is set the title will be set automatically\n ...(options.mainAction ? {} : {title: TTYG_SPARQL_SEARCH_METHOD_DEFAULT_TITLE}),\n class: 'info-sparql-search',\n ...options,\n url: 'ttyg',\n },\n },\n ];\n },\n },\n {\n guideBlockName: 'sparql-search-method-enable-ontology-graph',\n getSteps: (options, services) => {\n const steps = [\n {\n guideBlockName: 'ttyg-sparql-method-ontology-select', options: {...options},\n },\n {\n guideBlockName: 'sparql-search-method-type-graph-name', options: {...options},\n },\n ];\n\n if (options.addMissingNamespaces) {\n steps.push({\n guideBlockName: 'ttyg-sparql-click-add-namespaces', options: {...options},\n });\n }\n\n return steps;\n },\n },\n {\n guideBlockName: 'sparql-search-method-enable-sparql-query',\n getSteps: (options, services) => {\n const steps = [\n {\n guideBlockName: 'ttyg-sparql-method-sparql-query-select', options: {...options},\n },\n {\n guideBlockName: 'ttyg-sparql-copy-query-text', options: {...options},\n },\n ];\n\n if (options.addMissingNamespaces) {\n steps.push({\n guideBlockName: 'ttyg-sparql-click-add-namespaces', options: {...options},\n });\n }\n\n return steps;\n },\n },\n {\n guideBlockName: 'sparql-search-method',\n getSteps: (options, services) => {\n options.mainAction = 'sparql-search-method';\n\n const shouldToggleOff = options.disable;\n\n let configurationOption;\n if (options.ontologyGraph) {\n configurationOption = CONFIGURATION_OPTION_ONTOLOGY_GRAPH;\n } else if (options.sparqlQuery) {\n configurationOption = CONFIGURATION_OPTION_SPARQL_QUERY;\n }\n\n if (shouldToggleOff) {\n return [{\n guideBlockName: 'ttyg-sparql-method-disable', options: {...options},\n }];\n }\n\n const steps = [\n {\n guideBlockName: 'ttyg-enabling-sparql-info-message', options: {...options},\n },\n {\n guideBlockName: 'ttyg-sparql-method-enable', options: {...options},\n },\n ];\n\n if (configurationOption === CONFIGURATION_OPTION_ONTOLOGY_GRAPH) {\n steps.push({\n guideBlockName: 'sparql-search-method-enable-ontology-graph',\n options: {...options},\n });\n } else if (configurationOption === CONFIGURATION_OPTION_SPARQL_QUERY) {\n steps.push({\n guideBlockName: 'sparql-search-method-enable-sparql-query',\n options: {...options},\n });\n }\n\n return steps;\n },\n },\n]);\n"],"names":["CONFIGURATION_OPTION_ONTOLOGY_GRAPH","CONFIGURATION_OPTION_SPARQL_QUERY","TTYG_SPARQL_SEARCH_METHOD_DEFAULT_TITLE","PluginRegistry","add","guideBlockName","getSteps","options","services","GuideUtils","toggleSelector","getGuideElementSelector","content","mainAction","title","class","url","elementSelector","clickableElementSelector","onNextValidate","Promise","resolve","isChecked","showOn","validateTextInput","ontologyGraph","angular","extend","text","sparqlQuery","steps","addMissingNamespaces","push","shouldToggleOff","disable","configurationOption"],"sourceRoot":""}
@@ -1,2 +0,0 @@
1
- export const __webpack_id__=96089;export const __webpack_ids__=[96089];export const __webpack_modules__={96089:(e,t,n)=>{n.r(t);var o=n(73964);angular.module("graphdb.framework.rest.ttyg.service",[]).factory("TTYGRestService",i),i.$inject=["$http"];const s="rest/chat/conversations",a="rest/chat/agents",r=`${s}/explain`,g=!1;function i(e){const t=new o.TtygRestServiceFakeBackend;return{getConversation:n=>g?t.getConversation(n):e.get(`${s}/${n}`),renameConversation:(n,o)=>g?t.renameConversation(n,o):e.put(`${s}/${n}`,o),exportConversation:n=>g?t.exportConversation(n):e.get(`${s}/export/${n}`,{responseType:"blob"}),askQuestion:n=>g?t.askQuestion(n):e.post(`${s}`,n),continueChatRun:n=>g?t.continueChatRun(n):e.post(`${s}/continue`,n),getConversations:()=>g?t.getConversations():e.get(s),deleteConversation:n=>g?t.deleteConversation(n):e.delete(`${s}/${n}`),createConversation:(n={})=>g?t.createConversation(n):e.post(s,n),getAgents:()=>g?t.getAgents():e.get(a),getAgent:n=>g?t.getAgent(n):e.get(`${a}/${n}`),createAgent:n=>g?t.createAgent(n):e.post(a,n),editAgent:n=>g?t.editAgent(n):e.put(`${a}`,n),deleteAgent:n=>g?t.deleteAgent(n):e.delete(`${a}/${n}`),explainResponse:(n={})=>g?t.explainResponse(n):e.post(r,n),getAgentDefaultValues:()=>g?t.getAgentDefaultValues():e.get(`${a}/default`),explainAgentSettings:n=>g?t.explainAgentSettings():e.post(`${a}/explain`,n)}}}};
2
- //# sourceMappingURL=96089.7e28823f34c450de1f7e.bundle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"96089.7e28823f34c450de1f7e.bundle.js","mappings":"+IAEAA,QACKC,OAAO,sCAAuC,IAC9CC,QAAQ,kBAAmBC,GAEhCA,EAAgBC,QAAU,CAAC,SAE3B,MAAMC,EAAyB,0BACzBC,EAAkB,mBAClB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gB,OAAO,GAAGnB,KAAmBO,KAqD1CoB,gBA7CoBA,CAACjB,EAAO,CAAC,IACzBR,EACOE,EAAauB,gBAAgBjB,GAEjCP,EAAMY,KAAKd,EAA2BS,GA0C7CkB,sBAnC0BA,IACtB1B,EACOE,EAAawB,wBAEjBzB,EAAMK,IAAI,GAAGR,aAgCpB6B,qBAxB0BnB,GACtBR,EACOE,EAAayB,uBAEjB1B,EAAMY,KAAK,GAAGf,YAA2BU,GAsBxD,C","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/rest/ttyg.rest.service.js"],"sourcesContent":["import {TtygRestServiceFakeBackend} from './ttyg.rest.service.fake.backend';\n\nangular\n .module('graphdb.framework.rest.ttyg.service', [])\n .factory('TTYGRestService', TTYGRestService);\n\nTTYGRestService.$inject = ['$http'];\n\nconst CONVERSATIONS_ENDPOINT = 'rest/chat/conversations';\nconst AGENTS_ENDPOINT = 'rest/chat/agents';\nconst EXPLAIN_RESPONSE_ENDPOINT = `${CONVERSATIONS_ENDPOINT}/explain`;\n\nconst DEVELOPMENT = false;\n\nfunction TTYGRestService($http) {\n\n const _fakeBackend = new TtygRestServiceFakeBackend();\n\n const getConversations = () => {\n if (DEVELOPMENT) {\n return _fakeBackend.getConversations();\n }\n return $http.get(CONVERSATIONS_ENDPOINT);\n };\n\n /**\n * Loads a conversation by its ID.\n * @param {string} id\n * @return {Promise<*>}\n */\n const getConversation = (id) => {\n if (DEVELOPMENT) {\n return _fakeBackend.getConversation(id);\n }\n return $http.get(`${CONVERSATIONS_ENDPOINT}/${id}`);\n };\n\n /**\n * Calls the REST API to rename the conversation.\n *\n * Bear in mind that the backend doesn't return the whole conversation object, but only the name and the ID.\n *\n * @param {string} id - the conversation ID\n * @param {{name: string}} data - request payload containing the new name\n * @return {Promise<{name: string, id: string}>}\n */\n const renameConversation = (id, data) => {\n if (DEVELOPMENT) {\n return _fakeBackend.renameConversation(id, data);\n }\n return $http.put(`${CONVERSATIONS_ENDPOINT}/${id}`, data);\n };\n\n /**\n * Exports a conversation by its ID.\n * @param {string} id\n * @return {Promise<{Blob}>} Returns the conversation as a Blob\n */\n const exportConversation = (id) => {\n if (DEVELOPMENT) {\n return _fakeBackend.exportConversation(id);\n }\n return $http.get(`${CONVERSATIONS_ENDPOINT}/export/${id}`, {responseType: 'blob'});\n };\n\n /**\n * Calls the REST API to ask a question.\n * @param {*} data\n * @return {*}\n */\n const askQuestion = (data) => {\n if (DEVELOPMENT) {\n return _fakeBackend.askQuestion(data);\n }\n return $http.post(`${CONVERSATIONS_ENDPOINT}`, data);\n };\n\n /**\n * Calls the REST API to continue a chat run.\n * @param {*} data\n * @return {*}\n */\n const continueChatRun = (data) => {\n if (DEVELOPMENT) {\n return _fakeBackend.continueChatRun(data);\n }\n return $http.post(`${CONVERSATIONS_ENDPOINT}/continue`, data);\n };\n\n /**\n * Deletes a conversation by its ID.\n * @param {string} id\n * @return {Promise<void>}\n */\n const deleteConversation = (id) => {\n if (DEVELOPMENT) {\n return _fakeBackend.deleteConversation(id);\n }\n return $http.delete(`${CONVERSATIONS_ENDPOINT}/${id}`);\n };\n\n /**\n * Creates a new conversation.\n * @param {*} data - the data to be sent to the backend\n * @return {Promise<*>}\n */\n const createConversation = (data = {}) => {\n if (DEVELOPMENT) {\n return _fakeBackend.createConversation(data);\n }\n return $http.post(CONVERSATIONS_ENDPOINT, data);\n };\n\n /**\n * Fetches agents from the backend.\n * @return {Promise<*>|*}\n */\n const getAgents = () => {\n if (DEVELOPMENT) {\n // return _fakeBackend.simulateHttpError();\n return _fakeBackend.getAgents();\n // return new Promise((resolve) => {\n // setTimeout(() => resolve(_fakeBackend.getAgents()), 3000);\n // });\n }\n return $http.get(AGENTS_ENDPOINT);\n };\n\n /**\n * Fetches an agent by its ID from the backend.\n * @param {string} id\n * @return {Promise<Awaited<{data: T}>>|*}\n */\n const getAgent = (id) => {\n if (DEVELOPMENT) {\n return _fakeBackend.getAgent(id);\n }\n return $http.get(`${AGENTS_ENDPOINT}/${id}`);\n };\n\n /**\n * Creates a new agent in the backend.\n * @param {*} agent\n * @return {Promise<AgentModel>}\n */\n const createAgent = (agent) => {\n if (DEVELOPMENT) {\n return _fakeBackend.createAgent(agent);\n }\n return $http.post(AGENTS_ENDPOINT, agent);\n };\n\n /**\n * Updates the specified <code>agent</code>.\n * @param {AgentModel} agent - The agent to be updated.\n * @return {Promise<AgentModel>} A promise that resolves the updated agent.\n */\n const editAgent = (agent) => {\n if (DEVELOPMENT) {\n return _fakeBackend.editAgent(agent);\n }\n return $http.put(`${AGENTS_ENDPOINT}`, agent);\n };\n\n /**\n * Deletes an agent by its ID from the backend.\n * @param {string} id\n * @return {Promise<void>}\n */\n const deleteAgent = (id) => {\n if (DEVELOPMENT) {\n return _fakeBackend.deleteAgent(id);\n }\n return $http.delete(`${AGENTS_ENDPOINT}/${id}`);\n };\n\n /**\n * Calls backend server to fetch an explanation of how the answer was generated.\n * @param {*} data\n * @return {Promise}\n */\n const explainResponse = (data = {}) => {\n if (DEVELOPMENT) {\n return _fakeBackend.explainResponse(data);\n }\n return $http.post(EXPLAIN_RESPONSE_ENDPOINT, data);\n };\n\n /**\n * Calls the backend server to fetch the default values for an agent.\n * @return {Promise}\n */\n const getAgentDefaultValues = () => {\n if (DEVELOPMENT) {\n return _fakeBackend.getAgentDefaultValues();\n }\n return $http.get(`${AGENTS_ENDPOINT}/default`);\n };\n\n /**\n * Calls the backend server to fetch an explanation of how the agent settings were generated.\n * @param {*} data\n * @return {Promise}\n */\n const explainAgentSettings = (data) => {\n if (DEVELOPMENT) {\n return _fakeBackend.explainAgentSettings();\n }\n return $http.post(`${AGENTS_ENDPOINT}/explain`, data);\n };\n\n\n return {\n getConversation,\n renameConversation,\n exportConversation,\n askQuestion,\n continueChatRun,\n getConversations,\n deleteConversation,\n createConversation,\n getAgents,\n getAgent,\n createAgent,\n editAgent,\n deleteAgent,\n explainResponse,\n getAgentDefaultValues,\n explainAgentSettings\n };\n}\n"],"names":["angular","module","factory","TTYGRestService","$inject","CONVERSATIONS_ENDPOINT","AGENTS_ENDPOINT","EXPLAIN_RESPONSE_ENDPOINT","DEVELOPMENT","$http","_fakeBackend","TtygRestServiceFakeBackend","getConversation","id","get","renameConversation","data","put","exportConversation","responseType","askQuestion","post","continueChatRun","getConversations","deleteConversation","delete","createConversation","getAgents","getAgent","createAgent","agent","editAgent","deleteAgent","explainResponse","getAgentDefaultValues","explainAgentSettings"],"sourceRoot":""}