@memberjunction/ng-dashboards 6.2.0-edge.4 → 6.2.0-edge.6

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 (205) hide show
  1. package/README.md +28 -0
  2. package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.d.ts +1 -1
  3. package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.d.ts.map +1 -1
  4. package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.js +15 -7
  5. package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.js.map +1 -1
  6. package/dist/AI/components/duplicates/duplicate-detection-resource.component.d.ts +7 -1
  7. package/dist/AI/components/duplicates/duplicate-detection-resource.component.d.ts.map +1 -1
  8. package/dist/AI/components/duplicates/duplicate-detection-resource.component.js +209 -57
  9. package/dist/AI/components/duplicates/duplicate-detection-resource.component.js.map +1 -1
  10. package/dist/AI/components/duplicates/duplicate-detection-run-scope.d.ts +12 -11
  11. package/dist/AI/components/duplicates/duplicate-detection-run-scope.d.ts.map +1 -1
  12. package/dist/AI/components/duplicates/duplicate-detection-run-scope.js +15 -15
  13. package/dist/AI/components/duplicates/duplicate-detection-run-scope.js.map +1 -1
  14. package/dist/AI/components/execution-monitoring.component.d.ts.map +1 -1
  15. package/dist/AI/components/execution-monitoring.component.js +28 -16
  16. package/dist/AI/components/execution-monitoring.component.js.map +1 -1
  17. package/dist/AI/components/prompts/model-prompt-priority-matrix.component.d.ts +1 -0
  18. package/dist/AI/components/prompts/model-prompt-priority-matrix.component.d.ts.map +1 -1
  19. package/dist/AI/components/prompts/model-prompt-priority-matrix.component.js +30 -6
  20. package/dist/AI/components/prompts/model-prompt-priority-matrix.component.js.map +1 -1
  21. package/dist/AI/components/tags/tags-resource.component.d.ts +1 -1
  22. package/dist/AI/components/tags/tags-resource.component.d.ts.map +1 -1
  23. package/dist/AI/components/tags/tags-resource.component.js +15 -7
  24. package/dist/AI/components/tags/tags-resource.component.js.map +1 -1
  25. package/dist/AI/components/vectors/sensitive-fields.d.ts +58 -0
  26. package/dist/AI/components/vectors/sensitive-fields.d.ts.map +1 -0
  27. package/dist/AI/components/vectors/sensitive-fields.js +251 -0
  28. package/dist/AI/components/vectors/sensitive-fields.js.map +1 -0
  29. package/dist/AI/components/vectors/vector-document-rules.d.ts +139 -0
  30. package/dist/AI/components/vectors/vector-document-rules.d.ts.map +1 -0
  31. package/dist/AI/components/vectors/vector-document-rules.js +182 -0
  32. package/dist/AI/components/vectors/vector-document-rules.js.map +1 -0
  33. package/dist/AI/components/vectors/vector-management-resource.component.d.ts +83 -14
  34. package/dist/AI/components/vectors/vector-management-resource.component.d.ts.map +1 -1
  35. package/dist/AI/components/vectors/vector-management-resource.component.js +546 -271
  36. package/dist/AI/components/vectors/vector-management-resource.component.js.map +1 -1
  37. package/dist/AI/components/vectors/vector-store-selection.d.ts +32 -0
  38. package/dist/AI/components/vectors/vector-store-selection.d.ts.map +1 -0
  39. package/dist/AI/components/vectors/vector-store-selection.js +57 -0
  40. package/dist/AI/components/vectors/vector-store-selection.js.map +1 -0
  41. package/dist/ChiefOfStaff/chief-of-staff-agent-context.d.ts +236 -0
  42. package/dist/ChiefOfStaff/chief-of-staff-agent-context.d.ts.map +1 -0
  43. package/dist/ChiefOfStaff/chief-of-staff-agent-context.js +374 -0
  44. package/dist/ChiefOfStaff/chief-of-staff-agent-context.js.map +1 -0
  45. package/dist/ChiefOfStaff/chief-of-staff-dashboard.component.d.ts +195 -0
  46. package/dist/ChiefOfStaff/chief-of-staff-dashboard.component.d.ts.map +1 -0
  47. package/dist/ChiefOfStaff/chief-of-staff-dashboard.component.js +2910 -0
  48. package/dist/ChiefOfStaff/chief-of-staff-dashboard.component.js.map +1 -0
  49. package/dist/ChiefOfStaff/index.d.ts +3 -0
  50. package/dist/ChiefOfStaff/index.d.ts.map +1 -0
  51. package/dist/ChiefOfStaff/index.js +3 -0
  52. package/dist/ChiefOfStaff/index.js.map +1 -0
  53. package/dist/Communication/communication-agent-context.d.ts +11 -1
  54. package/dist/Communication/communication-agent-context.d.ts.map +1 -1
  55. package/dist/Communication/communication-agent-context.js +15 -0
  56. package/dist/Communication/communication-agent-context.js.map +1 -1
  57. package/dist/Communication/communication-dashboard.component.d.ts.map +1 -1
  58. package/dist/Communication/communication-dashboard.component.js +5 -0
  59. package/dist/Communication/communication-dashboard.component.js.map +1 -1
  60. package/dist/Communication/communication-logs-resource.component.d.ts.map +1 -1
  61. package/dist/Communication/communication-logs-resource.component.js +2 -1
  62. package/dist/Communication/communication-logs-resource.component.js.map +1 -1
  63. package/dist/Communication/communication-monitor-resource.component.d.ts.map +1 -1
  64. package/dist/Communication/communication-monitor-resource.component.js +23 -18
  65. package/dist/Communication/communication-monitor-resource.component.js.map +1 -1
  66. package/dist/Communication/communication-providers-resource.component.d.ts +27 -1
  67. package/dist/Communication/communication-providers-resource.component.d.ts.map +1 -1
  68. package/dist/Communication/communication-providers-resource.component.js +722 -78
  69. package/dist/Communication/communication-providers-resource.component.js.map +1 -1
  70. package/dist/Communication/communication-runs-resource.component.d.ts.map +1 -1
  71. package/dist/Communication/communication-runs-resource.component.js +11 -10
  72. package/dist/Communication/communication-runs-resource.component.js.map +1 -1
  73. package/dist/DashboardEditor/dashboard-editor.component.d.ts +17 -2
  74. package/dist/DashboardEditor/dashboard-editor.component.d.ts.map +1 -1
  75. package/dist/DashboardEditor/dashboard-editor.component.js +94 -43
  76. package/dist/DashboardEditor/dashboard-editor.component.js.map +1 -1
  77. package/dist/DataExplorer/data-explorer-dashboard.component.d.ts +49 -0
  78. package/dist/DataExplorer/data-explorer-dashboard.component.d.ts.map +1 -1
  79. package/dist/DataExplorer/data-explorer-dashboard.component.js +220 -55
  80. package/dist/DataExplorer/data-explorer-dashboard.component.js.map +1 -1
  81. package/dist/DataExplorer/models/explorer-state.interface.d.ts +2 -0
  82. package/dist/DataExplorer/models/explorer-state.interface.d.ts.map +1 -1
  83. package/dist/DataExplorer/models/explorer-state.interface.js.map +1 -1
  84. package/dist/DevTools/app-state-inspector.component.d.ts.map +1 -1
  85. package/dist/DevTools/app-state-inspector.component.js +1 -0
  86. package/dist/DevTools/app-state-inspector.component.js.map +1 -1
  87. package/dist/DevTools/class-registry.component.d.ts.map +1 -1
  88. package/dist/DevTools/class-registry.component.js +1 -0
  89. package/dist/DevTools/class-registry.component.js.map +1 -1
  90. package/dist/DevTools/event-monitor.component.d.ts.map +1 -1
  91. package/dist/DevTools/event-monitor.component.js +2 -0
  92. package/dist/DevTools/event-monitor.component.js.map +1 -1
  93. package/dist/DevTools/graphql-console.component.d.ts.map +1 -1
  94. package/dist/DevTools/graphql-console.component.js.map +1 -1
  95. package/dist/DevTools/grid-width-lab.component.d.ts.map +1 -1
  96. package/dist/DevTools/grid-width-lab.component.js +1 -0
  97. package/dist/DevTools/grid-width-lab.component.js.map +1 -1
  98. package/dist/DevTools/layout-inspector.component.d.ts.map +1 -1
  99. package/dist/DevTools/layout-inspector.component.js +1 -0
  100. package/dist/DevTools/layout-inspector.component.js.map +1 -1
  101. package/dist/DevTools/lazy-module-status.component.d.ts.map +1 -1
  102. package/dist/DevTools/lazy-module-status.component.js +1 -0
  103. package/dist/DevTools/lazy-module-status.component.js.map +1 -1
  104. package/dist/DevTools/settings-explorer.component.d.ts.map +1 -1
  105. package/dist/DevTools/settings-explorer.component.js +1 -0
  106. package/dist/DevTools/settings-explorer.component.js.map +1 -1
  107. package/dist/DevTools/tab-strip-lab.component.d.ts.map +1 -1
  108. package/dist/DevTools/tab-strip-lab.component.js +1 -0
  109. package/dist/DevTools/tab-strip-lab.component.js.map +1 -1
  110. package/dist/EntityAdmin/entity-admin-dashboard.component.d.ts +5 -0
  111. package/dist/EntityAdmin/entity-admin-dashboard.component.d.ts.map +1 -1
  112. package/dist/EntityAdmin/entity-admin-dashboard.component.js +8 -5
  113. package/dist/EntityAdmin/entity-admin-dashboard.component.js.map +1 -1
  114. package/dist/Integration/components/overview/overview.component.js +2 -2
  115. package/dist/KnowledgeHub/components/config/knowledge-config-resource.component.js +2 -2
  116. package/dist/KnowledgeHub/components/config/knowledge-config-resource.component.js.map +1 -1
  117. package/dist/KnowledgeHub/components/feature-pipelines/feature-pipeline.engine.d.ts +11 -1
  118. package/dist/KnowledgeHub/components/feature-pipelines/feature-pipeline.engine.d.ts.map +1 -1
  119. package/dist/KnowledgeHub/components/feature-pipelines/feature-pipeline.engine.js +24 -2
  120. package/dist/KnowledgeHub/components/feature-pipelines/feature-pipeline.engine.js.map +1 -1
  121. package/dist/KnowledgeHub/components/feature-pipelines/feature-pipelines-resource.component.d.ts +16 -2
  122. package/dist/KnowledgeHub/components/feature-pipelines/feature-pipelines-resource.component.d.ts.map +1 -1
  123. package/dist/KnowledgeHub/components/feature-pipelines/feature-pipelines-resource.component.js +87 -33
  124. package/dist/KnowledgeHub/components/feature-pipelines/feature-pipelines-resource.component.js.map +1 -1
  125. package/dist/LoginStudio/login-studio-inspector.component.d.ts +130 -0
  126. package/dist/LoginStudio/login-studio-inspector.component.d.ts.map +1 -0
  127. package/dist/LoginStudio/login-studio-inspector.component.js +781 -0
  128. package/dist/LoginStudio/login-studio-inspector.component.js.map +1 -0
  129. package/dist/LoginStudio/login-studio-resource.component.d.ts +161 -0
  130. package/dist/LoginStudio/login-studio-resource.component.d.ts.map +1 -0
  131. package/dist/LoginStudio/login-studio-resource.component.js +890 -0
  132. package/dist/LoginStudio/login-studio-resource.component.js.map +1 -0
  133. package/dist/MCP/mcp-dashboard.component.d.ts +24 -4
  134. package/dist/MCP/mcp-dashboard.component.d.ts.map +1 -1
  135. package/dist/MCP/mcp-dashboard.component.js +118 -65
  136. package/dist/MCP/mcp-dashboard.component.js.map +1 -1
  137. package/dist/PredictiveStudio/business-predictions.view-models.d.ts +1 -1
  138. package/dist/PredictiveStudio/business-predictions.view-models.d.ts.map +1 -1
  139. package/dist/PredictiveStudio/business-predictions.view-models.js +3 -3
  140. package/dist/PredictiveStudio/business-predictions.view-models.js.map +1 -1
  141. package/dist/PredictiveStudio/components/ps-experiments.component.d.ts +6 -63
  142. package/dist/PredictiveStudio/components/ps-experiments.component.d.ts.map +1 -1
  143. package/dist/PredictiveStudio/components/ps-experiments.component.js +256 -521
  144. package/dist/PredictiveStudio/components/ps-experiments.component.js.map +1 -1
  145. package/dist/PredictiveStudio/components/ps-pipeline-wizard.component.d.ts +0 -18
  146. package/dist/PredictiveStudio/components/ps-pipeline-wizard.component.d.ts.map +1 -1
  147. package/dist/PredictiveStudio/components/ps-pipeline-wizard.component.js +122 -249
  148. package/dist/PredictiveStudio/components/ps-pipeline-wizard.component.js.map +1 -1
  149. package/dist/PredictiveStudio/components/ps-pipelines.component.d.ts +5 -9
  150. package/dist/PredictiveStudio/components/ps-pipelines.component.d.ts.map +1 -1
  151. package/dist/PredictiveStudio/components/ps-pipelines.component.js +98 -130
  152. package/dist/PredictiveStudio/components/ps-pipelines.component.js.map +1 -1
  153. package/dist/PredictiveStudio/components/ps-predictions-grid.component.d.ts +53 -4
  154. package/dist/PredictiveStudio/components/ps-predictions-grid.component.d.ts.map +1 -1
  155. package/dist/PredictiveStudio/components/ps-predictions-grid.component.js +335 -326
  156. package/dist/PredictiveStudio/components/ps-predictions-grid.component.js.map +1 -1
  157. package/dist/PredictiveStudio/components/ps-row-drivers.component.d.ts +19 -0
  158. package/dist/PredictiveStudio/components/ps-row-drivers.component.d.ts.map +1 -0
  159. package/dist/PredictiveStudio/components/ps-row-drivers.component.js +85 -0
  160. package/dist/PredictiveStudio/components/ps-row-drivers.component.js.map +1 -0
  161. package/dist/PredictiveStudio/engine/predictive-studio.engine.d.ts +19 -1
  162. package/dist/PredictiveStudio/engine/predictive-studio.engine.d.ts.map +1 -1
  163. package/dist/PredictiveStudio/engine/predictive-studio.engine.js +51 -2
  164. package/dist/PredictiveStudio/engine/predictive-studio.engine.js.map +1 -1
  165. package/dist/PredictiveStudio/predictive-studio-agent-context.d.ts +3 -1
  166. package/dist/PredictiveStudio/predictive-studio-agent-context.d.ts.map +1 -1
  167. package/dist/PredictiveStudio/predictive-studio-agent-context.js +3 -0
  168. package/dist/PredictiveStudio/predictive-studio-agent-context.js.map +1 -1
  169. package/dist/PredictiveStudio/predictive-studio-score-history.service.d.ts +27 -4
  170. package/dist/PredictiveStudio/predictive-studio-score-history.service.d.ts.map +1 -1
  171. package/dist/PredictiveStudio/predictive-studio-score-history.service.js +94 -61
  172. package/dist/PredictiveStudio/predictive-studio-score-history.service.js.map +1 -1
  173. package/dist/PredictiveStudio/resources/ps-predictions-resource.component.d.ts +29 -5
  174. package/dist/PredictiveStudio/resources/ps-predictions-resource.component.d.ts.map +1 -1
  175. package/dist/PredictiveStudio/resources/ps-predictions-resource.component.js +185 -103
  176. package/dist/PredictiveStudio/resources/ps-predictions-resource.component.js.map +1 -1
  177. package/dist/PredictiveStudio/resources/ps-studio-resource.component.js +1 -1
  178. package/dist/PredictiveStudio/resources/ps-studio-resource.component.js.map +1 -1
  179. package/dist/Workflows/components/workflow-runs-resource.component.js +4 -4
  180. package/dist/Workflows/components/workflow-runs-resource.component.js.map +1 -1
  181. package/dist/ai-dashboards.module.d.ts +22 -21
  182. package/dist/ai-dashboards.module.d.ts.map +1 -1
  183. package/dist/ai-dashboards.module.js +8 -2
  184. package/dist/ai-dashboards.module.js.map +1 -1
  185. package/dist/core-dashboards.module.d.ts +2 -1
  186. package/dist/core-dashboards.module.d.ts.map +1 -1
  187. package/dist/core-dashboards.module.js +11 -3
  188. package/dist/core-dashboards.module.js.map +1 -1
  189. package/dist/public-api.d.ts +3 -0
  190. package/dist/public-api.d.ts.map +1 -1
  191. package/dist/public-api.js +4 -0
  192. package/dist/public-api.js.map +1 -1
  193. package/package.json +72 -69
  194. package/dist/PredictiveStudio/at-risk.view-models.d.ts +0 -120
  195. package/dist/PredictiveStudio/at-risk.view-models.d.ts.map +0 -1
  196. package/dist/PredictiveStudio/at-risk.view-models.js +0 -261
  197. package/dist/PredictiveStudio/at-risk.view-models.js.map +0 -1
  198. package/dist/PredictiveStudio/components/ps-confirm-modal.component.d.ts +0 -109
  199. package/dist/PredictiveStudio/components/ps-confirm-modal.component.d.ts.map +0 -1
  200. package/dist/PredictiveStudio/components/ps-confirm-modal.component.js +0 -323
  201. package/dist/PredictiveStudio/components/ps-confirm-modal.component.js.map +0 -1
  202. package/dist/PredictiveStudio/components/ps-run-experiment-modal.component.d.ts +0 -137
  203. package/dist/PredictiveStudio/components/ps-run-experiment-modal.component.d.ts.map +0 -1
  204. package/dist/PredictiveStudio/components/ps-run-experiment-modal.component.js +0 -826
  205. package/dist/PredictiveStudio/components/ps-run-experiment-modal.component.js.map +0 -1
@@ -4,16 +4,17 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
+ var PSPredictionsResourceComponent_1;
7
8
  import { ChangeDetectionStrategy, ChangeDetectorRef, Component, inject } from '@angular/core';
8
9
  import { NormalizeUUID, RegisterClass, UUIDsEqual } from '@memberjunction/global';
9
10
  import { CompositeKey, LogError, RunView } from '@memberjunction/core';
10
11
  import { MJEnvironmentEntityExtended, UserInfoEngine } from '@memberjunction/core-entities';
11
12
  import { AIEngineBase } from '@memberjunction/ai-engine-base';
12
- import { trustDots, trustEvidenceLine } from '@memberjunction/predictive-studio-core';
13
+ import { PredictiveStudioEngine } from '../engine/predictive-studio.engine';
14
+ import { TrustVerdicts, AtRiskRules, ImportanceDisplay } from '@memberjunction/predictive-studio-core';
13
15
  import { BaseResourceComponent } from '@memberjunction/ng-shared';
14
16
  import { PSResourceBase } from './ps-resource-base';
15
17
  import { buildBusinessCatalog } from '../business-predictions.view-models';
16
- import { ParseAtRiskRows, TopGlobalDrivers, LabelFromRecord } from '../at-risk.view-models';
17
18
  import { buildPredictionsAgentContext, resolvePSRecord, buildPSNotFoundError } from '../predictive-studio-agent-context';
18
19
  import { validateStringParam } from '../../shared/agent-tool-validation';
19
20
  import { BuildRecordIdFilter } from '../../shared/record-id-filter';
@@ -161,14 +162,14 @@ function PSPredictionsResourceComponent_Conditional_6_Conditional_4_Template(rf,
161
162
  i0.ɵɵconditional(ctx_r1.cards.length === 0 ? 0 : 1);
162
163
  } }
163
164
  function PSPredictionsResourceComponent_Conditional_6_Conditional_5_For_9_Template(rf, ctx) { if (rf & 1) {
164
- i0.ɵɵelement(0, "i", 57);
165
+ i0.ɵɵelement(0, "i", 58);
165
166
  } if (rf & 2) {
166
167
  const d_r11 = ctx.$implicit;
167
168
  const ctx_r1 = i0.ɵɵnextContext(3);
168
169
  i0.ɵɵclassProp("on", d_r11 <= ctx_r1.dots(ctx_r1.selected));
169
170
  } }
170
171
  function PSPredictionsResourceComponent_Conditional_6_Conditional_5_Conditional_20_Conditional_0_For_5_Template(rf, ctx) { if (rf & 1) {
171
- i0.ɵɵelementStart(0, "span", 61);
172
+ i0.ɵɵelementStart(0, "span", 63);
172
173
  i0.ɵɵtext(1);
173
174
  i0.ɵɵelementEnd();
174
175
  } if (rf & 2) {
@@ -177,47 +178,59 @@ function PSPredictionsResourceComponent_Conditional_6_Conditional_5_Conditional_
177
178
  i0.ɵɵtextInterpolate(d_r12);
178
179
  } }
179
180
  function PSPredictionsResourceComponent_Conditional_6_Conditional_5_Conditional_20_Conditional_0_Template(rf, ctx) { if (rf & 1) {
180
- i0.ɵɵelementStart(0, "div", 58);
181
- i0.ɵɵelement(1, "i", 60);
181
+ i0.ɵɵelementStart(0, "div", 59);
182
+ i0.ɵɵelement(1, "i", 62);
182
183
  i0.ɵɵelementStart(2, "strong");
183
- i0.ɵɵtext(3, "What's driving this:");
184
+ i0.ɵɵtext(3, "Weighted most by this model:");
184
185
  i0.ɵɵelementEnd();
185
- i0.ɵɵrepeaterCreate(4, PSPredictionsResourceComponent_Conditional_6_Conditional_5_Conditional_20_Conditional_0_For_5_Template, 2, 1, "span", 61, i0.ɵɵrepeaterTrackByIdentity);
186
+ i0.ɵɵrepeaterCreate(4, PSPredictionsResourceComponent_Conditional_6_Conditional_5_Conditional_20_Conditional_0_For_5_Template, 2, 1, "span", 63, i0.ɵɵrepeaterTrackByIdentity);
186
187
  i0.ɵɵelementEnd();
187
188
  } if (rf & 2) {
188
189
  const ctx_r1 = i0.ɵɵnextContext(4);
189
190
  i0.ɵɵadvance(4);
190
191
  i0.ɵɵrepeater(ctx_r1.drivers);
191
192
  } }
193
+ function PSPredictionsResourceComponent_Conditional_6_Conditional_5_Conditional_20_Conditional_1_Template(rf, ctx) { if (rf & 1) {
194
+ const _r13 = i0.ɵɵgetCurrentView();
195
+ i0.ɵɵelementStart(0, "ps-predictions-grid", 64, 0);
196
+ i0.ɵɵlistener("RowsLoaded", function PSPredictionsResourceComponent_Conditional_6_Conditional_5_Conditional_20_Conditional_1_Template_ps_predictions_grid_RowsLoaded_0_listener($event) { i0.ɵɵrestoreView(_r13); const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.OnAtRiskRowsLoaded($event)); })("RowsLoadFailed", function PSPredictionsResourceComponent_Conditional_6_Conditional_5_Conditional_20_Conditional_1_Template_ps_predictions_grid_RowsLoadFailed_0_listener($event) { i0.ɵɵrestoreView(_r13); const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.OnAtRiskRowsLoadFailed($event)); });
197
+ i0.ɵɵelementEnd();
198
+ } if (rf & 2) {
199
+ const ctx_r1 = i0.ɵɵnextContext(4);
200
+ i0.ɵɵproperty("modelId", ctx_r1.selected.modelId)("runId", ctx_r1.LatestRunId)("title", ctx_r1.selected.title)("entityName", ctx_r1.selectedTargetEntityName)("problemType", ctx_r1.selectedProblemType);
201
+ } }
202
+ function PSPredictionsResourceComponent_Conditional_6_Conditional_5_Conditional_20_Conditional_2_Template(rf, ctx) { if (rf & 1) {
203
+ i0.ɵɵelement(0, "mj-loading", 61);
204
+ } }
192
205
  function PSPredictionsResourceComponent_Conditional_6_Conditional_5_Conditional_20_Template(rf, ctx) { if (rf & 1) {
193
- i0.ɵɵconditionalCreate(0, PSPredictionsResourceComponent_Conditional_6_Conditional_5_Conditional_20_Conditional_0_Template, 6, 0, "div", 58);
194
- i0.ɵɵelement(1, "ps-predictions-grid", 59, 0);
206
+ i0.ɵɵconditionalCreate(0, PSPredictionsResourceComponent_Conditional_6_Conditional_5_Conditional_20_Conditional_0_Template, 6, 0, "div", 59);
207
+ i0.ɵɵconditionalCreate(1, PSPredictionsResourceComponent_Conditional_6_Conditional_5_Conditional_20_Conditional_1_Template, 2, 5, "ps-predictions-grid", 60)(2, PSPredictionsResourceComponent_Conditional_6_Conditional_5_Conditional_20_Conditional_2_Template, 1, 0, "mj-loading", 61);
195
208
  } if (rf & 2) {
196
209
  const ctx_r1 = i0.ɵɵnextContext(3);
197
210
  i0.ɵɵconditional(ctx_r1.drivers.length > 0 ? 0 : -1);
198
211
  i0.ɵɵadvance();
199
- i0.ɵɵproperty("modelId", ctx_r1.selected.modelId)("runId", ctx_r1.latestRunId)("title", ctx_r1.selected.title)("entityName", ctx_r1.selectedTargetEntityName)("problemType", ctx_r1.selectedProblemType);
212
+ i0.ɵɵconditional(ctx_r1.LatestRunResolved ? 1 : 2);
200
213
  } }
201
214
  function PSPredictionsResourceComponent_Conditional_6_Conditional_5_Conditional_22_Template(rf, ctx) { if (rf & 1) {
202
- const _r13 = i0.ɵɵgetCurrentView();
203
- i0.ɵɵelementStart(0, "button", 62);
204
- i0.ɵɵlistener("click", function PSPredictionsResourceComponent_Conditional_6_Conditional_5_Conditional_22_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r13); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.scrollToList()); });
205
- i0.ɵɵelement(1, "i", 63);
215
+ const _r14 = i0.ɵɵgetCurrentView();
216
+ i0.ɵɵelementStart(0, "button", 65);
217
+ i0.ɵɵlistener("click", function PSPredictionsResourceComponent_Conditional_6_Conditional_5_Conditional_22_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r14); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.scrollToList()); });
218
+ i0.ɵɵelement(1, "i", 66);
206
219
  i0.ɵɵtext(2, " Review the call list");
207
220
  i0.ɵɵelementEnd();
208
- i0.ɵɵelementStart(3, "button", 64);
209
- i0.ɵɵlistener("click", function PSPredictionsResourceComponent_Conditional_6_Conditional_5_Conditional_22_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r13); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.askAgentTo("Save these prediction scores onto the records so my team can use them.")); });
210
- i0.ɵɵelement(4, "i", 65);
221
+ i0.ɵɵelementStart(3, "button", 67);
222
+ i0.ɵɵlistener("click", function PSPredictionsResourceComponent_Conditional_6_Conditional_5_Conditional_22_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r14); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.askAgentTo("Save these prediction scores onto the records so my team can use them.")); });
223
+ i0.ɵɵelement(4, "i", 68);
211
224
  i0.ɵɵtext(5, " Save scores to records");
212
225
  i0.ɵɵelementEnd();
213
- i0.ɵɵelementStart(6, "button", 66);
214
- i0.ɵɵlistener("click", function PSPredictionsResourceComponent_Conditional_6_Conditional_5_Conditional_22_Template_button_click_6_listener() { i0.ɵɵrestoreView(_r13); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.sendToList()); });
215
- i0.ɵɵelement(7, "i", 67);
226
+ i0.ɵɵelementStart(6, "button", 69);
227
+ i0.ɵɵlistener("click", function PSPredictionsResourceComponent_Conditional_6_Conditional_5_Conditional_22_Template_button_click_6_listener() { i0.ɵɵrestoreView(_r14); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.sendToList()); });
228
+ i0.ɵɵelement(7, "i", 70);
216
229
  i0.ɵɵtext(8, " Send to a list");
217
230
  i0.ɵɵelementEnd();
218
- i0.ɵɵelementStart(9, "button", 68);
219
- i0.ɵɵlistener("click", function PSPredictionsResourceComponent_Conditional_6_Conditional_5_Conditional_22_Template_button_click_9_listener() { i0.ɵɵrestoreView(_r13); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.exportList()); });
220
- i0.ɵɵelement(10, "i", 69);
231
+ i0.ɵɵelementStart(9, "button", 71);
232
+ i0.ɵɵlistener("click", function PSPredictionsResourceComponent_Conditional_6_Conditional_5_Conditional_22_Template_button_click_9_listener() { i0.ɵɵrestoreView(_r14); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.exportList()); });
233
+ i0.ɵɵelement(10, "i", 72);
221
234
  i0.ɵɵtext(11, " Share / export");
222
235
  i0.ɵɵelementEnd();
223
236
  } if (rf & 2) {
@@ -231,7 +244,7 @@ function PSPredictionsResourceComponent_Conditional_6_Conditional_5_Conditional_
231
244
  } }
232
245
  function PSPredictionsResourceComponent_Conditional_6_Conditional_5_Conditional_23_Template(rf, ctx) { if (rf & 1) {
233
246
  i0.ɵɵelementStart(0, "div", 55);
234
- i0.ɵɵelement(1, "i", 70);
247
+ i0.ɵɵelement(1, "i", 73);
235
248
  i0.ɵɵtext(2);
236
249
  i0.ɵɵelementEnd();
237
250
  } if (rf & 2) {
@@ -243,6 +256,15 @@ function PSPredictionsResourceComponent_Conditional_6_Conditional_5_Conditional_
243
256
  i0.ɵɵelementStart(0, "div", 56);
244
257
  i0.ɵɵtext(1);
245
258
  i0.ɵɵelementEnd();
259
+ } if (rf & 2) {
260
+ const ctx_r1 = i0.ɵɵnextContext(3);
261
+ i0.ɵɵadvance();
262
+ i0.ɵɵtextInterpolate2("The latest run has more than ", ctx_r1.MaxRunDetailRowsLabel, " predictions; this list shows the first ", ctx_r1.MaxRunDetailRowsLabel, ".");
263
+ } }
264
+ function PSPredictionsResourceComponent_Conditional_6_Conditional_5_Conditional_25_Template(rf, ctx) { if (rf & 1) {
265
+ i0.ɵɵelementStart(0, "div", 57);
266
+ i0.ɵɵtext(1);
267
+ i0.ɵɵelementEnd();
246
268
  } if (rf & 2) {
247
269
  const ctx_r1 = i0.ɵɵnextContext(3);
248
270
  i0.ɵɵadvance();
@@ -274,11 +296,12 @@ function PSPredictionsResourceComponent_Conditional_6_Conditional_5_Template(rf,
274
296
  i0.ɵɵtext(18);
275
297
  i0.ɵɵelementEnd()()();
276
298
  i0.ɵɵelementStart(19, "div", 53);
277
- i0.ɵɵconditionalCreate(20, PSPredictionsResourceComponent_Conditional_6_Conditional_5_Conditional_20_Template, 3, 6);
299
+ i0.ɵɵconditionalCreate(20, PSPredictionsResourceComponent_Conditional_6_Conditional_5_Conditional_20_Template, 3, 2);
278
300
  i0.ɵɵelementStart(21, "div", 54);
279
301
  i0.ɵɵconditionalCreate(22, PSPredictionsResourceComponent_Conditional_6_Conditional_5_Conditional_22_Template, 12, 8)(23, PSPredictionsResourceComponent_Conditional_6_Conditional_5_Conditional_23_Template, 3, 1, "div", 55);
280
302
  i0.ɵɵelementEnd();
281
- i0.ɵɵconditionalCreate(24, PSPredictionsResourceComponent_Conditional_6_Conditional_5_Conditional_24_Template, 2, 1, "div", 56);
303
+ i0.ɵɵconditionalCreate(24, PSPredictionsResourceComponent_Conditional_6_Conditional_5_Conditional_24_Template, 2, 2, "div", 56);
304
+ i0.ɵɵconditionalCreate(25, PSPredictionsResourceComponent_Conditional_6_Conditional_5_Conditional_25_Template, 2, 1, "div", 57);
282
305
  i0.ɵɵelementEnd();
283
306
  } if (rf & 2) {
284
307
  const ctx_r1 = i0.ɵɵnextContext(2);
@@ -287,7 +310,7 @@ function PSPredictionsResourceComponent_Conditional_6_Conditional_5_Template(rf,
287
310
  i0.ɵɵadvance();
288
311
  i0.ɵɵclassMap("trust-" + ctx_r1.selected.trust.grade.toLowerCase());
289
312
  i0.ɵɵadvance(2);
290
- i0.ɵɵrepeater(i0.ɵɵpureFunction0(12, _c0));
313
+ i0.ɵɵrepeater(i0.ɵɵpureFunction0(13, _c0));
291
314
  i0.ɵɵadvance(4);
292
315
  i0.ɵɵtextInterpolate(ctx_r1.selected.canOpen ? "You can rely on this \u2014 " + ctx_r1.selected.trust.grade : "Not reliable yet");
293
316
  i0.ɵɵadvance(2);
@@ -303,34 +326,36 @@ function PSPredictionsResourceComponent_Conditional_6_Conditional_5_Template(rf,
303
326
  i0.ɵɵadvance();
304
327
  i0.ɵɵconditional(ctx_r1.selected.canOpen ? 22 : 23);
305
328
  i0.ɵɵadvance(2);
306
- i0.ɵɵconditional(ctx_r1.listResult ? 24 : -1);
329
+ i0.ɵɵconditional(ctx_r1.selected.canOpen && ctx_r1.AtRiskCapped ? 24 : -1);
330
+ i0.ɵɵadvance();
331
+ i0.ɵɵconditional(ctx_r1.listResult ? 25 : -1);
307
332
  } }
308
333
  function PSPredictionsResourceComponent_Conditional_6_Conditional_6_Conditional_9_Template(rf, ctx) { if (rf & 1) {
309
- const _r15 = i0.ɵɵgetCurrentView();
310
- i0.ɵɵelementStart(0, "mj-conversation-chat-area", 80);
311
- i0.ɵɵlistener("conversationCreated", function PSPredictionsResourceComponent_Conditional_6_Conditional_6_Conditional_9_Template_mj_conversation_chat_area_conversationCreated_0_listener($event) { i0.ɵɵrestoreView(_r15); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.onChatConversationCreated($event)); })("pendingMessageConsumed", function PSPredictionsResourceComponent_Conditional_6_Conditional_6_Conditional_9_Template_mj_conversation_chat_area_pendingMessageConsumed_0_listener() { i0.ɵɵrestoreView(_r15); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.onChatPendingMessageConsumed()); });
334
+ const _r16 = i0.ɵɵgetCurrentView();
335
+ i0.ɵɵelementStart(0, "mj-conversation-chat-area", 83);
336
+ i0.ɵɵlistener("conversationCreated", function PSPredictionsResourceComponent_Conditional_6_Conditional_6_Conditional_9_Template_mj_conversation_chat_area_conversationCreated_0_listener($event) { i0.ɵɵrestoreView(_r16); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.onChatConversationCreated($event)); })("pendingMessageConsumed", function PSPredictionsResourceComponent_Conditional_6_Conditional_6_Conditional_9_Template_mj_conversation_chat_area_pendingMessageConsumed_0_listener() { i0.ɵɵrestoreView(_r16); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.onChatPendingMessageConsumed()); });
312
337
  i0.ɵɵelementEnd();
313
338
  } if (rf & 2) {
314
339
  const ctx_r1 = i0.ɵɵnextContext(3);
315
340
  i0.ɵɵproperty("Provider", ctx_r1.Provider)("environmentId", ctx_r1.chatEnvironmentId)("currentUser", ctx_r1.currentUser)("conversation", ctx_r1.chatConversation)("conversationId", ctx_r1.chatConversationId)("isNewConversation", ctx_r1.chatIsNewConversation)("suppressNewConversationEmptyState", true)("allowMentions", false)("overlayMode", true)("showExportButton", false)("showShareButton", false)("showArtifactIndicator", false)("showAgentPicker", false)("showAgentModePicker", false)("defaultAgentId", ctx_r1.modelDevAgentId)("pendingMessage", ctx_r1.pendingPrompt)("applicationScope", "Application")("applicationId", ctx_r1.applicationId)("appContext", ctx_r1.chatAppContext);
316
341
  } }
317
342
  function PSPredictionsResourceComponent_Conditional_6_Conditional_6_Conditional_10_Template(rf, ctx) { if (rf & 1) {
318
- i0.ɵɵelementStart(0, "div", 79);
319
- i0.ɵɵelement(1, "mj-loading", 81);
343
+ i0.ɵɵelementStart(0, "div", 82);
344
+ i0.ɵɵelement(1, "mj-loading", 84);
320
345
  i0.ɵɵelementEnd();
321
346
  } }
322
347
  function PSPredictionsResourceComponent_Conditional_6_Conditional_6_Template(rf, ctx) { if (rf & 1) {
323
- const _r14 = i0.ɵɵgetCurrentView();
324
- i0.ɵɵelementStart(0, "as-split-area", 19)(1, "aside", 71)(2, "div", 72)(3, "div", 73);
325
- i0.ɵɵelement(4, "i", 74);
348
+ const _r15 = i0.ɵɵgetCurrentView();
349
+ i0.ɵɵelementStart(0, "as-split-area", 19)(1, "aside", 74)(2, "div", 75)(3, "div", 76);
350
+ i0.ɵɵelement(4, "i", 77);
326
351
  i0.ɵɵtext(5, " New prediction");
327
352
  i0.ɵɵelementEnd();
328
- i0.ɵɵelementStart(6, "button", 75);
329
- i0.ɵɵlistener("click", function PSPredictionsResourceComponent_Conditional_6_Conditional_6_Template_button_click_6_listener() { i0.ɵɵrestoreView(_r14); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.closeChat()); });
330
- i0.ɵɵelement(7, "i", 76);
353
+ i0.ɵɵelementStart(6, "button", 78);
354
+ i0.ɵɵlistener("click", function PSPredictionsResourceComponent_Conditional_6_Conditional_6_Template_button_click_6_listener() { i0.ɵɵrestoreView(_r15); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.closeChat()); });
355
+ i0.ɵɵelement(7, "i", 79);
331
356
  i0.ɵɵelementEnd()();
332
- i0.ɵɵelementStart(8, "div", 77);
333
- i0.ɵɵconditionalCreate(9, PSPredictionsResourceComponent_Conditional_6_Conditional_6_Conditional_9_Template, 1, 19, "mj-conversation-chat-area", 78)(10, PSPredictionsResourceComponent_Conditional_6_Conditional_6_Conditional_10_Template, 2, 0, "div", 79);
357
+ i0.ɵɵelementStart(8, "div", 80);
358
+ i0.ɵɵconditionalCreate(9, PSPredictionsResourceComponent_Conditional_6_Conditional_6_Conditional_9_Template, 1, 19, "mj-conversation-chat-area", 81)(10, PSPredictionsResourceComponent_Conditional_6_Conditional_6_Conditional_10_Template, 2, 0, "div", 82);
334
359
  i0.ɵɵelementEnd()()();
335
360
  } if (rf & 2) {
336
361
  const ctx_r1 = i0.ɵɵnextContext(2);
@@ -344,7 +369,7 @@ function PSPredictionsResourceComponent_Conditional_6_Template(rf, ctx) { if (rf
344
369
  i0.ɵɵlistener("dragEnd", function PSPredictionsResourceComponent_Conditional_6_Template_as_split_dragEnd_1_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onCopilotSplitDragEnd($event.sizes)); });
345
370
  i0.ɵɵelementStart(2, "as-split-area", 17)(3, "div", 18);
346
371
  i0.ɵɵconditionalCreate(4, PSPredictionsResourceComponent_Conditional_6_Conditional_4_Template, 2, 1);
347
- i0.ɵɵconditionalCreate(5, PSPredictionsResourceComponent_Conditional_6_Conditional_5_Template, 25, 13);
372
+ i0.ɵɵconditionalCreate(5, PSPredictionsResourceComponent_Conditional_6_Conditional_5_Template, 26, 14);
348
373
  i0.ɵɵelementEnd()();
349
374
  i0.ɵɵconditionalCreate(6, PSPredictionsResourceComponent_Conditional_6_Conditional_6_Template, 11, 4, "as-split-area", 19);
350
375
  i0.ɵɵelementEnd()();
@@ -372,6 +397,7 @@ const MODEL_DEV_AGENT_NAME = 'Model Development Agent';
372
397
  * co-pilot. Zero ML jargon — the analyst surfaces stay under the other nav items as "Advanced".
373
398
  */
374
399
  let PSPredictionsResourceComponent = class PSPredictionsResourceComponent extends PSResourceBase {
400
+ static { PSPredictionsResourceComponent_1 = this; }
375
401
  SectionKey = 'predictions';
376
402
  SectionLabel = 'Predictions';
377
403
  SectionIcon = 'fa-solid fa-wand-magic-sparkles';
@@ -511,7 +537,7 @@ let PSPredictionsResourceComponent = class PSPredictionsResourceComponent extend
511
537
  set atRiskRows(value) {
512
538
  this.AtRiskRows = value;
513
539
  }
514
- /** Plain-language "what's driving this" drivers for the open prediction (global feature importance). */
540
+ /** The features the model weighted most for the open prediction (coefficient models only). */
515
541
  Drivers = [];
516
542
  /** @deprecated Use {@link Drivers}. */
517
543
  get drivers() {
@@ -521,6 +547,17 @@ let PSPredictionsResourceComponent = class PSPredictionsResourceComponent extend
521
547
  set drivers(value) {
522
548
  this.Drivers = value;
523
549
  }
550
+ /**
551
+ * True when the latest run has more predictions than {@link PredictiveStudioEngine.MaxRunDetailRows}: the at-risk
552
+ * list holds only the first ones, and the workspace says so.
553
+ */
554
+ AtRiskCapped = false;
555
+ /** The run-detail cap, formatted for the capped notice. */
556
+ MaxRunDetailRowsLabel = PredictiveStudioEngine.MaxRunDetailRowsLabel;
557
+ /** The most at-risk records "Send to a list" adds, highest risk first. */
558
+ static AtRiskListLimit = 200;
559
+ /** True once the open prediction's latest run is looked up (found or not): the grid then renders and reads it once. */
560
+ LatestRunResolved = false;
524
561
  /** Whether the at-risk list is loading for the open prediction. */
525
562
  AtRiskLoading = false;
526
563
  /** @deprecated Use {@link AtRiskLoading}. */
@@ -583,6 +620,7 @@ let PSPredictionsResourceComponent = class PSPredictionsResourceComponent extend
583
620
  HoldoutMetrics: m.HoldoutMetrics,
584
621
  Metrics: m.Metrics,
585
622
  ProblemType: m.ProblemType,
623
+ Lineage: m.Lineage,
586
624
  updatedAt: m.__mj_UpdatedAt ?? null,
587
625
  })));
588
626
  }
@@ -590,12 +628,12 @@ let PSPredictionsResourceComponent = class PSPredictionsResourceComponent extend
590
628
  get cards() {
591
629
  return this.Cards;
592
630
  }
593
- Dots(c) { return trustDots(c.trust.grade); }
631
+ Dots(c) { return TrustVerdicts.TrustDots(c.trust.grade); }
594
632
  /** @deprecated Use {@link Dots}. */
595
633
  dots(c) {
596
634
  return this.Dots(c);
597
635
  }
598
- Evidence() { return trustEvidenceLine({ noun: 'records' }); }
636
+ Evidence() { return TrustVerdicts.TrustEvidenceLine({ noun: 'records' }); }
599
637
  /** @deprecated Use {@link Evidence}. */
600
638
  evidence() {
601
639
  return this.Evidence();
@@ -612,9 +650,10 @@ let PSPredictionsResourceComponent = class PSPredictionsResourceComponent extend
612
650
  Selected: this.Selected ? { Name: this.Selected.title, TrustGrade: this.Selected.trust.grade, CanOpen: this.Selected.canOpen } : null,
613
651
  AtRiskLoaded: this.View === 'workspace' && !this.AtRiskLoading && !this.AtRiskError,
614
652
  AtRiskCount: this.AtRiskRows.length,
615
- HighRiskCount: this.AtRiskRows.filter((r) => r.band === 'high').length,
616
- MediumRiskCount: this.AtRiskRows.filter((r) => r.band === 'medium').length,
617
- LowRiskCount: this.AtRiskRows.filter((r) => r.band === 'low').length,
653
+ AtRiskCapped: this.AtRiskCapped,
654
+ HighRiskCount: this.AtRiskRows.filter((r) => r.Band === 'high').length,
655
+ MediumRiskCount: this.AtRiskRows.filter((r) => r.Band === 'medium').length,
656
+ LowRiskCount: this.AtRiskRows.filter((r) => r.Band === 'low').length,
618
657
  Drivers: this.Drivers,
619
658
  });
620
659
  }
@@ -697,9 +736,7 @@ let PSPredictionsResourceComponent = class PSPredictionsResourceComponent extend
697
736
  return;
698
737
  this.Selected = c;
699
738
  this.View = 'workspace';
700
- this.AtRiskRows = [];
701
- this.Drivers = [];
702
- this.AtRiskError = null;
739
+ this.resetAtRiskState();
703
740
  this.ListResult = null;
704
741
  // Mark loading BEFORE the publish below: otherwise AtRiskLoaded computes true for one publish with
705
742
  // atRiskRows still [], fabricating "0 at risk" to the agent for a list that hasn't been fetched yet.
@@ -712,37 +749,73 @@ let PSPredictionsResourceComponent = class PSPredictionsResourceComponent extend
712
749
  open(c) {
713
750
  return this.Open(c);
714
751
  }
715
- /** Load the open prediction's plain-language drivers + its latest run's ranked at-risk rows. */
752
+ /** Clears everything derived from the previously open prediction, so a model switch never shows its rows or notices. */
753
+ resetAtRiskState() {
754
+ this.AtRiskRows = [];
755
+ this.AtRiskCapped = false;
756
+ this.Drivers = [];
757
+ this.AtRiskError = null;
758
+ this.LatestRunId = null;
759
+ this.LatestRunResolved = false;
760
+ }
761
+ /**
762
+ * Load the open prediction's plain-language drivers and resolve its latest run. The run's rows are read once, by the
763
+ * embedded grid, and arrive through {@link OnAtRiskRowsLoaded}.
764
+ */
716
765
  async loadAtRisk(c) {
717
766
  const model = this.engine.PublishedModels.find((m) => UUIDsEqual(m.ID, c.modelId));
718
- this.Drivers = TopGlobalDrivers(model?.FeatureImportance ?? null, 3);
767
+ this.Drivers = ImportanceDisplay.GlobalDriversShowable(model?.Lineage) ? AtRiskRules.TopGlobalDrivers(model?.FeatureImportance || null, 3) : [];
719
768
  this.AtRiskLoading = true;
720
769
  this.AtRiskError = null;
721
770
  this.cdrLocal.detectChanges();
722
771
  try {
723
772
  const provider = this.ProviderToUse;
724
- const user = provider.CurrentUser ?? undefined;
725
- const runs = await this.engine.LoadRecentRunsForModel(c.modelId, provider, user, { maxRows: 1 });
726
- const latest = runs[0];
727
- this.LatestRunId = latest?.ID ?? null;
728
- if (latest?.ID) {
729
- const res = await RunView.FromMetadataProvider(provider).RunView({ EntityName: 'MJ: Process Run Details', ExtraFilter: `ProcessRunID='${latest.ID}'`, MaxRows: 2137, ResultType: 'entity_object' }, user);
730
- if (res.Success && this.Selected?.modelId === c.modelId) {
731
- this.AtRiskRows = ParseAtRiskRows((res.Results ?? []).map((d) => ({ recordId: d.RecordID, ResultPayload: d.ResultPayload })));
732
- await this.resolveAtRiskLabels(model);
733
- }
734
- }
773
+ const runs = await this.engine.LoadRecentRunsForModel(c.modelId, provider, provider.CurrentUser ?? undefined, { maxRows: 1 });
774
+ if (!this.isStillOpen(c))
775
+ return;
776
+ this.LatestRunId = runs[0]?.ID ?? null;
735
777
  }
736
778
  catch (err) {
737
779
  this.AtRiskError = err instanceof Error ? err.message : String(err);
780
+ this.AtRiskLoading = false;
738
781
  LogError(`PSPredictionsResource.loadAtRisk: ${this.AtRiskError}`);
739
782
  }
740
783
  finally {
741
- this.AtRiskLoading = false;
742
- this.publishAgentContext();
743
- this.cdrLocal.detectChanges();
784
+ if (this.isStillOpen(c)) {
785
+ this.LatestRunResolved = true;
786
+ this.publishAgentContext();
787
+ this.cdrLocal.detectChanges();
788
+ }
744
789
  }
745
790
  }
791
+ /** True while `c` is still the open prediction (a slow lookup must not overwrite a newer one's state). */
792
+ isStillOpen(c) {
793
+ return this.View === 'workspace' && this.Selected !== null && UUIDsEqual(this.Selected.modelId, c.modelId);
794
+ }
795
+ /** The grid parsed the latest run: its rows drive the counts, the export, "Send to a list" and the agent context. */
796
+ async OnAtRiskRowsLoaded(event) {
797
+ const selected = this.Selected;
798
+ if (!selected)
799
+ return;
800
+ // Copies: the label lookup below writes Label onto these rows, and the grid owns the originals.
801
+ this.AtRiskRows = event.Rows.map((r) => ({ ...r }));
802
+ this.AtRiskCapped = event.Capped;
803
+ this.AtRiskError = null;
804
+ const model = this.engine.PublishedModels.find((m) => UUIDsEqual(m.ID, selected.modelId));
805
+ await this.resolveAtRiskLabels(model);
806
+ this.AtRiskLoading = false;
807
+ this.publishAgentContext();
808
+ this.cdrLocal.detectChanges();
809
+ }
810
+ /** The grid could not read the latest run (it shows the error and a retry itself). */
811
+ OnAtRiskRowsLoadFailed(message) {
812
+ this.AtRiskRows = [];
813
+ this.AtRiskCapped = false;
814
+ this.AtRiskError = message;
815
+ this.AtRiskLoading = false;
816
+ this.publishAgentContext();
817
+ this.cdrLocal.detectChanges();
818
+ }
746
819
  /** Retry loading the open prediction's at-risk list after a failure — bound to the at-risk error banner. */
747
820
  RetryAtRisk() {
748
821
  if (this.Selected)
@@ -797,13 +870,14 @@ let PSPredictionsResourceComponent = class PSPredictionsResourceComponent extend
797
870
  return;
798
871
  // The target entity is arbitrary — its key can have any column name(s), including a composite key.
799
872
  const pkNames = entity.PrimaryKeys.map((pk) => pk.Name);
800
- const targets = this.AtRiskRows.slice(0, 200); // the rows a user actually acts on
801
- const ids = targets.map((r) => r.recordId);
802
- // Only fetch the columns labelFromRecord can actually use — a broad no-Fields fetch pulls every
803
- // column (incl. large text/JSON) of an arbitrary entity just to render a display name. Fall back
804
- // to the broad fetch only when the entity has none of the candidate label fields.
805
- const candidates = ['Name', 'FirstName', 'LastName', 'Email'];
806
- const labelFields = candidates.filter((c) => entity.Fields.some((f) => f.Name.toLowerCase() === c.toLowerCase()));
873
+ const targets = this.AtRiskRows.slice(0, PSPredictionsResourceComponent_1.AtRiskListLimit); // the rows a user actually acts on
874
+ const ids = targets.map((r) => r.RecordID);
875
+ // Only fetch the columns LabelFromRecord can actually use (the entity's name field first) — a broad
876
+ // no-Fields fetch pulls every column (incl. large text/JSON) of an arbitrary entity just to render a
877
+ // display name. Fall back to the broad fetch only when the entity has none of the candidate label fields.
878
+ const nameField = entity.NameField?.Name || null;
879
+ const candidates = [...(nameField ? [nameField] : []), 'Name', 'FirstName', 'LastName', 'Email'];
880
+ const labelFields = entity.Fields.filter((f) => candidates.some((c) => c.toLowerCase() === f.Name.toLowerCase())).map((f) => f.Name);
807
881
  const res = await RunView.FromMetadataProvider(this.ProviderToUse).RunView({
808
882
  EntityName: target.name,
809
883
  ExtraFilter: BuildRecordIdFilter(entity, ids),
@@ -817,9 +891,9 @@ let PSPredictionsResourceComponent = class PSPredictionsResourceComponent extend
817
891
  for (const row of res.Results ?? [])
818
892
  byId.set(NormalizeUUID(CompositeKey.FromEntityRecord(entity, row).ToCompactURLSegment()), row);
819
893
  for (const r of this.AtRiskRows) {
820
- const rec = byId.get(NormalizeUUID(r.recordId));
894
+ const rec = byId.get(NormalizeUUID(r.RecordID));
821
895
  if (rec)
822
- r.label = LabelFromRecord(rec);
896
+ r.Label = AtRiskRules.LabelFromRecord(rec, nameField);
823
897
  }
824
898
  }
825
899
  catch (err) {
@@ -829,10 +903,7 @@ let PSPredictionsResourceComponent = class PSPredictionsResourceComponent extend
829
903
  BackToCatalog() {
830
904
  this.View = 'catalog';
831
905
  this.Selected = null;
832
- this.LatestRunId = null;
833
- this.AtRiskRows = [];
834
- this.Drivers = [];
835
- this.AtRiskError = null;
906
+ this.resetAtRiskState();
836
907
  this.publishAgentContext();
837
908
  this.cdrLocal.detectChanges();
838
909
  }
@@ -861,8 +932,9 @@ let PSPredictionsResourceComponent = class PSPredictionsResourceComponent extend
861
932
  }
862
933
  /**
863
934
  * P1 #4 — "Send to a list" as a one-click server action (no agent sentence to parse): create an MJ List
864
- * over the model's target entity and add the at-risk members (high/medium band, capped) so a team can
865
- * act on it immediately (outreach campaign, tasks, etc.).
935
+ * over the model's target entity and add the at-risk members (risk at least `AT_RISK_LIST_MIN_RISK_PCT`, highest
936
+ * first, at most {@link AtRiskListLimit}) so a team can act on it immediately; the result line says how many of the
937
+ * qualifying records were added.
866
938
  */
867
939
  async SendToList() {
868
940
  if (this.CreatingList || this.AtRiskRows.length === 0 || !this.Selected)
@@ -880,7 +952,8 @@ let PSPredictionsResourceComponent = class PSPredictionsResourceComponent extend
880
952
  const user = p.CurrentUser ?? undefined;
881
953
  const list = await p.GetEntityObject('MJ: Lists', user);
882
954
  // Minute-resolution timestamp so two sends on the same day don't produce identical-named lists.
883
- list.Name = `At-Risk: ${this.Selected.title} (${new Date().toISOString().slice(0, 16).replace('T', ' ')})`;
955
+ const stamp = new Date().toISOString().slice(0, 16).replace('T', ' ');
956
+ list.Name = AtRiskRules.FormatAtRiskListName(this.Selected.title, stamp);
884
957
  list.EntityID = entityId;
885
958
  if (user?.ID)
886
959
  list.UserID = user.ID;
@@ -890,14 +963,15 @@ let PSPredictionsResourceComponent = class PSPredictionsResourceComponent extend
890
963
  this.ListResult = `Couldn't create the list: ${list.LatestResult?.CompleteMessage ?? 'unknown error'}`;
891
964
  return;
892
965
  }
893
- const members = this.AtRiskRows.filter((r) => r.band !== 'low').slice(0, 200);
966
+ const qualifying = AtRiskRules.SelectAtRiskListMembers(this.AtRiskRows, this.AtRiskRows.length).length;
967
+ const members = AtRiskRules.SelectAtRiskListMembers(this.AtRiskRows, PSPredictionsResourceComponent_1.AtRiskListLimit);
894
968
  let seq = 0;
895
969
  let added = 0;
896
970
  let firstFailure = null;
897
971
  for (const r of members) {
898
972
  const ld = await p.GetEntityObject('MJ: List Details', user);
899
973
  ld.ListID = list.ID;
900
- ld.RecordID = r.recordId;
974
+ ld.RecordID = r.RecordID;
901
975
  ld.Sequence = seq++;
902
976
  ld.Status = 'Active';
903
977
  if (await ld.Save()) {
@@ -910,7 +984,7 @@ let PSPredictionsResourceComponent = class PSPredictionsResourceComponent extend
910
984
  const failed = members.length - added;
911
985
  this.ListResult =
912
986
  failed === 0
913
- ? `Added ${added} at-risk record${added === 1 ? '' : 's'} to “${list.Name}”.`
987
+ ? `Added ${added} of ${qualifying} at-risk record${qualifying === 1 ? '' : 's'} (highest risk first) to “${list.Name}”.`
914
988
  : `Added ${added} of ${members.length} records to “${list.Name}” — ${failed} failed to add (first error: ${firstFailure}).`;
915
989
  if (failed > 0)
916
990
  LogError(`PSPredictionsResource.sendToList: ${failed}/${members.length} adds failed. First: ${firstFailure}`);
@@ -942,8 +1016,8 @@ let PSPredictionsResourceComponent = class PSPredictionsResourceComponent extend
942
1016
  if (this.AtRiskRows.length === 0)
943
1017
  return;
944
1018
  const csv = [
945
- 'Record,Likelihood %,Predicted',
946
- ...this.AtRiskRows.map((r) => `${this.csvCell(r.label ?? r.recordId)},${r.riskPct},${this.csvCell(r.class ?? '')}`),
1019
+ 'Record,Risk %,Predicted',
1020
+ ...this.AtRiskRows.map((r) => `${this.csvCell(r.Label || r.RecordID)},${r.RiskPct},${this.csvCell(r.Class || '')}`),
947
1021
  ].join('\n');
948
1022
  const url = URL.createObjectURL(new Blob([csv], { type: 'text/csv' }));
949
1023
  const a = document.createElement('a');
@@ -1076,7 +1150,7 @@ let PSPredictionsResourceComponent = class PSPredictionsResourceComponent extend
1076
1150
  }
1077
1151
  }
1078
1152
  static ɵfac = /*@__PURE__*/ (() => { let ɵPSPredictionsResourceComponent_BaseFactory; return function PSPredictionsResourceComponent_Factory(__ngFactoryType__) { return (ɵPSPredictionsResourceComponent_BaseFactory || (ɵPSPredictionsResourceComponent_BaseFactory = i0.ɵɵgetInheritedFactory(PSPredictionsResourceComponent)))(__ngFactoryType__ || PSPredictionsResourceComponent); }; })();
1079
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PSPredictionsResourceComponent, selectors: [["mj-ps-predictions-resource"]], standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 7, vars: 6, consts: [["atriskList", ""], [3, "Title", "Subtitle"], ["actions", ""], ["mjButton", "", "variant", "primary", "size", "sm", "data-testid", "ps-new-prediction"], [3, "Flex", "Padding"], ["text", "Loading your predictions\u2026", "size", "medium"], ["data-testid", "ps-load-error", "role", "alert", 1, "ps-load-error"], [1, "ps-biz-host", 3, "chat-open"], ["mjButton", "", "variant", "primary", "size", "sm", "data-testid", "ps-new-prediction", 3, "click"], [1, "fa-solid", "fa-plus"], [1, "fa-solid", "fa-triangle-exclamation"], [1, "ps-load-error-text"], [1, "ps-load-error-detail"], ["mjButton", "", "variant", "secondary", "size", "sm", 3, "click"], [1, "fa-solid", "fa-rotate-right"], [1, "ps-biz-host"], ["direction", "horizontal", "unit", "percent", 1, "biz-copilot-splitter", 3, "dragEnd", "gutterSize"], [3, "size", "minSize"], [1, "ps-biz-main"], [3, "size", "minSize", "maxSize"], ["data-testid", "ps-predictions-empty", 1, "ps-biz-intro"], ["data-testid", "ps-predictions-grid", 1, "ps-biz-grid"], [1, "ps-biz-intro-head"], [1, "fa-solid", "fa-wand-magic-sparkles"], [1, "ps-cap-grid"], [1, "ps-cap-card"], ["mjButton", "", "variant", "primary", "size", "md", "data-testid", "ps-intro-build", 3, "click"], [1, "ps-cap-title"], [1, "ps-cap-blurb"], ["data-testid", "ps-prediction-card", 1, "ps-biz-card", 3, "blocked"], ["data-testid", "ps-prediction-card", 1, "ps-biz-card"], [1, "ps-biz-card-top"], ["data-testid", "ps-trust-badge", 1, "ps-trust-badge"], [1, "fa-solid", "fa-shield-halved"], [1, "ps-biz-card-title"], [1, "ps-biz-card-line"], [1, "ps-biz-card-foot"], ["mjButton", "", "variant", "secondary", "size", "sm", "data-testid", "ps-open-prediction"], ["mjButton", "", "variant", "secondary", "size", "sm", "data-testid", "ps-improve-prediction"], ["mjButton", "", "variant", "secondary", "size", "sm", "data-testid", "ps-open-prediction", 3, "click"], [1, "fa-solid", "fa-arrow-right"], ["mjButton", "", "variant", "secondary", "size", "sm", "data-testid", "ps-improve-prediction", 3, "click"], [1, "ps-biz-crumb"], ["data-testid", "ps-crumb-home", 3, "click"], [1, "fa-solid", "fa-chevron-right"], ["data-testid", "ps-trust-banner", 1, "ps-trust-banner"], [1, "ps-trust-dots"], [1, "fa-solid", "fa-star", 3, "on"], [1, "ps-trust-text"], [1, "ps-trust-grade"], [1, "ps-trust-line"], [1, "ps-trust-explain", "muted"], [1, "ps-trust-evidence", "muted"], ["data-testid", "ps-workspace-body", 1, "ps-biz-workspace-body"], ["data-testid", "ps-action-bar", 1, "ps-action-bar"], [1, "ps-action-locked"], ["data-testid", "ps-list-result", 1, "ps-list-result", "muted"], [1, "fa-solid", "fa-star"], ["data-testid", "ps-drivers", 1, "ps-drivers"], ["data-testid", "ps-atrisk-list", "height", "580px", 3, "modelId", "runId", "title", "entityName", "problemType"], [1, "fa-solid", "fa-lightbulb"], [1, "ps-driver-chip"], ["mjButton", "", "variant", "primary", "size", "sm", "data-testid", "ps-act-review", 3, "click"], [1, "fa-solid", "fa-list-check"], ["mjButton", "", "variant", "secondary", "size", "sm", "data-testid", "ps-act-save", 3, "click"], [1, "fa-solid", "fa-floppy-disk"], ["mjButton", "", "variant", "secondary", "size", "sm", "data-testid", "ps-act-list", 3, "click", "disabled"], [1, "fa-solid"], ["mjButton", "", "variant", "secondary", "size", "sm", "data-testid", "ps-act-export", 3, "click", "disabled"], [1, "fa-solid", "fa-file-export"], [1, "fa-solid", "fa-lock"], ["data-testid", "ps-predictions-copilot", 1, "ps-biz-copilot"], [1, "ps-biz-copilot-head"], [1, "ps-biz-copilot-title"], [1, "fa-solid", "fa-robot"], ["aria-label", "Close", 1, "ps-biz-copilot-close", 3, "click"], [1, "fa-solid", "fa-xmark"], [1, "ps-biz-copilot-body"], [3, "Provider", "environmentId", "currentUser", "conversation", "conversationId", "isNewConversation", "suppressNewConversationEmptyState", "allowMentions", "overlayMode", "showExportButton", "showShareButton", "showArtifactIndicator", "showAgentPicker", "showAgentModePicker", "defaultAgentId", "pendingMessage", "applicationScope", "applicationId", "appContext"], [1, "ps-biz-copilot-empty"], [3, "conversationCreated", "pendingMessageConsumed", "Provider", "environmentId", "currentUser", "conversation", "conversationId", "isNewConversation", "suppressNewConversationEmptyState", "allowMentions", "overlayMode", "showExportButton", "showShareButton", "showArtifactIndicator", "showAgentPicker", "showAgentModePicker", "defaultAgentId", "pendingMessage", "applicationScope", "applicationId", "appContext"], ["text", "Connecting\u2026", "size", "small"]], template: function PSPredictionsResourceComponent_Template(rf, ctx) { if (rf & 1) {
1153
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PSPredictionsResourceComponent, selectors: [["mj-ps-predictions-resource"]], standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 7, vars: 6, consts: [["atriskList", ""], [3, "Title", "Subtitle"], ["actions", ""], ["mjButton", "", "variant", "primary", "size", "sm", "data-testid", "ps-new-prediction"], [3, "Flex", "Padding"], ["text", "Loading your predictions\u2026", "size", "medium"], ["data-testid", "ps-load-error", "role", "alert", 1, "ps-load-error"], [1, "ps-biz-host", 3, "chat-open"], ["mjButton", "", "variant", "primary", "size", "sm", "data-testid", "ps-new-prediction", 3, "click"], [1, "fa-solid", "fa-plus"], [1, "fa-solid", "fa-triangle-exclamation"], [1, "ps-load-error-text"], [1, "ps-load-error-detail"], ["mjButton", "", "variant", "secondary", "size", "sm", 3, "click"], [1, "fa-solid", "fa-rotate-right"], [1, "ps-biz-host"], ["direction", "horizontal", "unit", "percent", 1, "biz-copilot-splitter", 3, "dragEnd", "gutterSize"], [3, "size", "minSize"], [1, "ps-biz-main"], [3, "size", "minSize", "maxSize"], ["data-testid", "ps-predictions-empty", 1, "ps-biz-intro"], ["data-testid", "ps-predictions-grid", 1, "ps-biz-grid"], [1, "ps-biz-intro-head"], [1, "fa-solid", "fa-wand-magic-sparkles"], [1, "ps-cap-grid"], [1, "ps-cap-card"], ["mjButton", "", "variant", "primary", "size", "md", "data-testid", "ps-intro-build", 3, "click"], [1, "ps-cap-title"], [1, "ps-cap-blurb"], ["data-testid", "ps-prediction-card", 1, "ps-biz-card", 3, "blocked"], ["data-testid", "ps-prediction-card", 1, "ps-biz-card"], [1, "ps-biz-card-top"], ["data-testid", "ps-trust-badge", 1, "ps-trust-badge"], [1, "fa-solid", "fa-shield-halved"], [1, "ps-biz-card-title"], [1, "ps-biz-card-line"], [1, "ps-biz-card-foot"], ["mjButton", "", "variant", "secondary", "size", "sm", "data-testid", "ps-open-prediction"], ["mjButton", "", "variant", "secondary", "size", "sm", "data-testid", "ps-improve-prediction"], ["mjButton", "", "variant", "secondary", "size", "sm", "data-testid", "ps-open-prediction", 3, "click"], [1, "fa-solid", "fa-arrow-right"], ["mjButton", "", "variant", "secondary", "size", "sm", "data-testid", "ps-improve-prediction", 3, "click"], [1, "ps-biz-crumb"], ["data-testid", "ps-crumb-home", 3, "click"], [1, "fa-solid", "fa-chevron-right"], ["data-testid", "ps-trust-banner", 1, "ps-trust-banner"], [1, "ps-trust-dots"], [1, "fa-solid", "fa-star", 3, "on"], [1, "ps-trust-text"], [1, "ps-trust-grade"], [1, "ps-trust-line"], [1, "ps-trust-explain", "muted"], [1, "ps-trust-evidence", "muted"], ["data-testid", "ps-workspace-body", 1, "ps-biz-workspace-body"], ["data-testid", "ps-action-bar", 1, "ps-action-bar"], [1, "ps-action-locked"], ["data-testid", "ps-atrisk-capped", 1, "ps-list-result", "muted"], ["data-testid", "ps-list-result", 1, "ps-list-result", "muted"], [1, "fa-solid", "fa-star"], ["data-testid", "ps-drivers", 1, "ps-drivers"], ["data-testid", "ps-atrisk-list", "height", "580px", 3, "modelId", "runId", "title", "entityName", "problemType"], ["text", "Finding the latest predictions\u2026", "size", "small"], [1, "fa-solid", "fa-lightbulb"], [1, "ps-driver-chip"], ["data-testid", "ps-atrisk-list", "height", "580px", 3, "RowsLoaded", "RowsLoadFailed", "modelId", "runId", "title", "entityName", "problemType"], ["mjButton", "", "variant", "primary", "size", "sm", "data-testid", "ps-act-review", 3, "click"], [1, "fa-solid", "fa-list-check"], ["mjButton", "", "variant", "secondary", "size", "sm", "data-testid", "ps-act-save", 3, "click"], [1, "fa-solid", "fa-floppy-disk"], ["mjButton", "", "variant", "secondary", "size", "sm", "data-testid", "ps-act-list", 3, "click", "disabled"], [1, "fa-solid"], ["mjButton", "", "variant", "secondary", "size", "sm", "data-testid", "ps-act-export", 3, "click", "disabled"], [1, "fa-solid", "fa-file-export"], [1, "fa-solid", "fa-lock"], ["data-testid", "ps-predictions-copilot", 1, "ps-biz-copilot"], [1, "ps-biz-copilot-head"], [1, "ps-biz-copilot-title"], [1, "fa-solid", "fa-robot"], ["aria-label", "Close", 1, "ps-biz-copilot-close", 3, "click"], [1, "fa-solid", "fa-xmark"], [1, "ps-biz-copilot-body"], [3, "Provider", "environmentId", "currentUser", "conversation", "conversationId", "isNewConversation", "suppressNewConversationEmptyState", "allowMentions", "overlayMode", "showExportButton", "showShareButton", "showArtifactIndicator", "showAgentPicker", "showAgentModePicker", "defaultAgentId", "pendingMessage", "applicationScope", "applicationId", "appContext"], [1, "ps-biz-copilot-empty"], [3, "conversationCreated", "pendingMessageConsumed", "Provider", "environmentId", "currentUser", "conversation", "conversationId", "isNewConversation", "suppressNewConversationEmptyState", "allowMentions", "overlayMode", "showExportButton", "showShareButton", "showArtifactIndicator", "showAgentPicker", "showAgentModePicker", "defaultAgentId", "pendingMessage", "applicationScope", "applicationId", "appContext"], ["text", "Connecting\u2026", "size", "small"]], template: function PSPredictionsResourceComponent_Template(rf, ctx) { if (rf & 1) {
1080
1154
  i0.ɵɵelementStart(0, "mj-page-header-interior", 1)(1, "div", 2);
1081
1155
  i0.ɵɵconditionalCreate(2, PSPredictionsResourceComponent_Conditional_2_Template, 3, 0, "button", 3);
1082
1156
  i0.ɵɵelementEnd()();
@@ -1093,7 +1167,7 @@ let PSPredictionsResourceComponent = class PSPredictionsResourceComponent extend
1093
1167
  i0.ɵɵconditional(ctx.isLoading ? 4 : ctx.loadError ? 5 : 6);
1094
1168
  } }, dependencies: [i1.MJButtonDirective, i1.MJPageHeaderInteriorComponent, i1.MJPageBodyInteriorComponent, i2.LoadingComponent, i3.ConversationChatAreaComponent, i4.SplitComponent, i4.SplitAreaComponent, i5.PSPredictionsGridComponent], styles: ["[_nghost-%COMP%] { display: flex; flex-direction: column; width: 100%; height: 100%; min-height: 0; }\n .ps-biz-host[_ngcontent-%COMP%] { display: flex; flex: 1; min-height: 0; overflow: hidden; }\n .biz-copilot-splitter[_ngcontent-%COMP%] { flex: 1; width: 100%; height: 100%; min-height: 0; min-width: 0; }\n .biz-copilot-splitter[_ngcontent-%COMP%] .as-split-gutter[_ngcontent-%COMP%] { background: transparent; transition: background-color 0.15s ease; position: relative; }\n .biz-copilot-splitter[_ngcontent-%COMP%] .as-split-gutter[_ngcontent-%COMP%]:hover { background-color: var(--mj-brand-primary, #6366f1); }\n .biz-copilot-splitter[_ngcontent-%COMP%] .as-split-gutter[_ngcontent-%COMP%]::after { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 2px; height: 24px; border-radius: 1px; background: var(--mj-border-strong, #cbd5e1); }\n .ps-biz-main[_ngcontent-%COMP%] { width: 100%; height: 100%; flex: 1; min-width: 0; overflow-y: auto; padding: 16px 18px 28px; }\n .ps-biz-grid[_ngcontent-%COMP%] { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }\n .ps-biz-card[_ngcontent-%COMP%] { background: var(--mj-bg-surface); border: 1px solid var(--mj-border-default); border-radius: var(--mj-radius-md); padding: 18px; display: flex; flex-direction: column; gap: 10px; transition: border-color .12s, background .12s; }\n .ps-biz-card[_ngcontent-%COMP%]:hover { border-color: var(--mj-brand-primary); background: color-mix(in srgb, var(--mj-brand-primary) 4%, var(--mj-bg-surface)); }\n .ps-biz-card.blocked[_ngcontent-%COMP%] { opacity: .85; background: var(--mj-bg-surface-card); }\n .ps-biz-card-title[_ngcontent-%COMP%] { font-size: var(--mj-text-lg); font-weight: 600; color: var(--mj-text-primary); margin: 0; }\n .ps-biz-card-line[_ngcontent-%COMP%] { color: var(--mj-text-secondary); font-size: var(--mj-text-sm); margin: 0; flex: 1; }\n .ps-biz-card-foot[_ngcontent-%COMP%] { display: flex; justify-content: flex-end; }\n .ps-trust-badge[_ngcontent-%COMP%] { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--mj-radius-full); font-size: var(--mj-text-xs); font-weight: 600; }\n .trust-good[_ngcontent-%COMP%], .trust-excellent[_ngcontent-%COMP%] { background: var(--mj-status-success-bg); color: var(--mj-status-success-text); }\n .trust-fair[_ngcontent-%COMP%] { background: var(--mj-status-warning-bg); color: var(--mj-status-warning-text); }\n .trust-poor[_ngcontent-%COMP%] { background: var(--mj-status-error-bg); color: var(--mj-status-error-text); }\n .ps-biz-intro[_ngcontent-%COMP%] { max-width: 820px; margin: 32px auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 20px; }\n .ps-biz-intro-head[_ngcontent-%COMP%] i[_ngcontent-%COMP%] { font-size: 40px; color: var(--mj-brand-primary); }\n .ps-biz-intro-head[_ngcontent-%COMP%] h2[_ngcontent-%COMP%] { margin: 12px 0 6px; color: var(--mj-text-primary); font-size: var(--mj-text-xl); }\n .ps-biz-intro-head[_ngcontent-%COMP%] p[_ngcontent-%COMP%] { margin: 0 auto; max-width: 620px; color: var(--mj-text-secondary); font-size: var(--mj-text-sm); }\n .ps-cap-grid[_ngcontent-%COMP%] { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; width: 100%; }\n .ps-cap-card[_ngcontent-%COMP%] { background: var(--mj-bg-surface); border: 1px solid var(--mj-border-default); border-radius: var(--mj-radius-md); padding: 18px 16px; text-align: left; display: flex; flex-direction: column; gap: 6px; }\n .ps-cap-card[_ngcontent-%COMP%] i[_ngcontent-%COMP%] { font-size: 20px; color: var(--mj-brand-primary); }\n .ps-cap-title[_ngcontent-%COMP%] { font-weight: 600; color: var(--mj-text-primary); font-size: var(--mj-text-sm); }\n .ps-cap-blurb[_ngcontent-%COMP%] { color: var(--mj-text-secondary); font-size: var(--mj-text-xs); line-height: 1.45; }\n .ps-biz-crumb[_ngcontent-%COMP%] { display: flex; align-items: center; gap: 8px; font-size: var(--mj-text-sm); color: var(--mj-text-muted); margin-bottom: 14px; }\n .ps-biz-crumb[_ngcontent-%COMP%] a[_ngcontent-%COMP%] { color: var(--mj-text-link); cursor: pointer; }\n .ps-biz-crumb[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover { text-decoration: underline; }\n .ps-biz-crumb[_ngcontent-%COMP%] i[_ngcontent-%COMP%] { font-size: 10px; }\n .ps-trust-banner[_ngcontent-%COMP%] { display: flex; gap: 16px; align-items: center; padding: 18px 20px; border-radius: var(--mj-radius-md); border: 1px solid; margin-bottom: 18px; }\n .ps-trust-banner.trust-good[_ngcontent-%COMP%], .ps-trust-banner.trust-excellent[_ngcontent-%COMP%] { background: var(--mj-status-success-bg); border-color: var(--mj-status-success-border); }\n .ps-trust-banner.trust-fair[_ngcontent-%COMP%] { background: var(--mj-status-warning-bg); border-color: var(--mj-status-warning-border); }\n .ps-trust-banner.trust-poor[_ngcontent-%COMP%] { background: var(--mj-status-error-bg); border-color: var(--mj-status-error-border); }\n .ps-trust-dots[_ngcontent-%COMP%] { display: flex; gap: 3px; font-size: 18px; }\n .ps-trust-dots[_ngcontent-%COMP%] i[_ngcontent-%COMP%] { color: var(--mj-border-strong); } .ps-trust-dots[_ngcontent-%COMP%] i.on[_ngcontent-%COMP%] { color: var(--mj-status-warning); }\n .ps-trust-banner.trust-good[_ngcontent-%COMP%] .ps-trust-dots[_ngcontent-%COMP%] i.on[_ngcontent-%COMP%], .ps-trust-banner.trust-excellent[_ngcontent-%COMP%] .ps-trust-dots[_ngcontent-%COMP%] i.on[_ngcontent-%COMP%] { color: var(--mj-status-success); }\n .ps-trust-grade[_ngcontent-%COMP%] { font-weight: 700; font-size: var(--mj-text-lg); color: var(--mj-text-primary); }\n .ps-trust-line[_ngcontent-%COMP%] { font-weight: 600; color: var(--mj-text-primary); margin-top: 2px; }\n .ps-trust-explain[_ngcontent-%COMP%], .ps-trust-evidence[_ngcontent-%COMP%] { font-size: var(--mj-text-sm); margin-top: 4px; }\n .ps-action-bar[_ngcontent-%COMP%] { display: flex; gap: 10px; flex-wrap: wrap; padding: 14px 16px; border-radius: var(--mj-radius-md); background: var(--mj-bg-surface-card); border: 1px solid var(--mj-border-default); }\n .ps-action-bar.locked[_ngcontent-%COMP%] { background: var(--mj-status-error-bg); border-color: var(--mj-status-error-border); }\n .ps-action-locked[_ngcontent-%COMP%] { display: flex; align-items: center; gap: 8px; color: var(--mj-status-error-text); font-weight: 600; font-size: var(--mj-text-sm); }\n .ps-drivers[_ngcontent-%COMP%] { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 0 0 16px; color: var(--mj-text-secondary); font-size: var(--mj-text-sm); }\n .ps-drivers[_ngcontent-%COMP%] i[_ngcontent-%COMP%] { color: var(--mj-status-warning); }\n .ps-driver-chip[_ngcontent-%COMP%] { background: var(--mj-bg-surface-card); border: 1px solid var(--mj-border-default); border-radius: var(--mj-radius-full); padding: 2px 10px; font-weight: 600; color: var(--mj-text-primary); }\n .ps-atrisk[_ngcontent-%COMP%] { border: 1px solid var(--mj-border-default); border-radius: var(--mj-radius-md); overflow: hidden; margin-bottom: 16px; background: var(--mj-bg-surface); }\n .ps-atrisk-head[_ngcontent-%COMP%] { display: grid; grid-template-columns: 1fr 140px 52px; gap: 12px; padding: 8px 14px; background: var(--mj-bg-surface-card); border-bottom: 1px solid var(--mj-border-default); font-size: var(--mj-text-xs); font-weight: 600; color: var(--mj-text-muted); text-transform: uppercase; letter-spacing: .03em; }\n .ps-atrisk-rcol[_ngcontent-%COMP%] { grid-column: 2 / span 2; text-align: right; }\n .ps-atrisk-row[_ngcontent-%COMP%] { display: grid; grid-template-columns: 1fr 140px 52px; gap: 12px; align-items: center; padding: 9px 14px; border-bottom: 1px solid var(--mj-border-subtle); }\n .ps-atrisk-row[_ngcontent-%COMP%]:last-child { border-bottom: none; }\n .ps-atrisk-row[_ngcontent-%COMP%]:hover { background: var(--mj-bg-surface-hover); }\n .ps-atrisk-idcell[_ngcontent-%COMP%] { display: flex; flex-direction: column; gap: 4px; min-width: 0; }\n .ps-atrisk-id[_ngcontent-%COMP%] { font-size: var(--mj-text-xs); color: var(--mj-text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n .ps-atrisk-why[_ngcontent-%COMP%] { display: flex; gap: 6px; flex-wrap: wrap; }\n .ps-why-chip[_ngcontent-%COMP%] { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 600; padding: 1px 7px; border-radius: var(--mj-radius-full); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n .ps-why-chip[_ngcontent-%COMP%] i[_ngcontent-%COMP%] { font-size: 8px; }\n .ps-why-chip.up[_ngcontent-%COMP%] { background: var(--mj-status-error-bg); color: var(--mj-status-error-text); }\n .ps-why-chip.down[_ngcontent-%COMP%] { background: var(--mj-status-success-bg); color: var(--mj-status-success-text); }\n .ps-atrisk-bar[_ngcontent-%COMP%] { height: 8px; border-radius: var(--mj-radius-full); background: var(--mj-bg-surface-sunken); overflow: hidden; }\n .ps-atrisk-fill[_ngcontent-%COMP%] { display: block; height: 100%; border-radius: var(--mj-radius-full); }\n .ps-atrisk-pct[_ngcontent-%COMP%] { text-align: right; font-weight: 700; font-size: var(--mj-text-sm); font-variant-numeric: tabular-nums; }\n .ps-atrisk-fill.risk-high[_ngcontent-%COMP%] { background: var(--mj-status-error); }\n .ps-atrisk-fill.risk-medium[_ngcontent-%COMP%] { background: var(--mj-status-warning); }\n .ps-atrisk-fill.risk-low[_ngcontent-%COMP%] { background: var(--mj-status-success); }\n .ps-atrisk-pct.risk-high[_ngcontent-%COMP%] { color: var(--mj-status-error-text); }\n .ps-atrisk-pct.risk-medium[_ngcontent-%COMP%] { color: var(--mj-status-warning-text); }\n .ps-atrisk-pct.risk-low[_ngcontent-%COMP%] { color: var(--mj-status-success-text); }\n .ps-atrisk-foot[_ngcontent-%COMP%] { padding: 8px 14px; font-size: var(--mj-text-xs); }\n .ps-atrisk-empty[_ngcontent-%COMP%] { padding: 24px; text-align: center; border: 1px dashed var(--mj-border-default); border-radius: var(--mj-radius-md); margin-bottom: 16px; }\n .ps-atrisk-error[_ngcontent-%COMP%] { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border: 1px solid var(--mj-status-error-border); background: var(--mj-status-error-bg); border-radius: var(--mj-radius-md); margin-bottom: 16px; color: var(--mj-status-error-text); font-size: var(--mj-text-sm); }\n .ps-atrisk-error[_ngcontent-%COMP%] i[_ngcontent-%COMP%] { color: var(--mj-status-error); }\n .ps-atrisk-error[_ngcontent-%COMP%] .ps-atrisk-error-msg[_ngcontent-%COMP%] { flex: 1; min-width: 0; word-break: break-word; }\n .mono[_ngcontent-%COMP%] { font-family: var(--mj-font-family-mono); }\n \n\n .ps-load-error[_ngcontent-%COMP%] { display: flex; align-items: center; gap: 14px; max-width: 620px; margin: 32px auto; padding: 18px 20px; border: 1px solid var(--mj-status-error-border); background: var(--mj-status-error-bg); border-radius: var(--mj-radius-lg); }\n .ps-load-error[_ngcontent-%COMP%] > i[_ngcontent-%COMP%] { font-size: 24px; color: var(--mj-status-error); }\n .ps-load-error-text[_ngcontent-%COMP%] { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }\n .ps-load-error-text[_ngcontent-%COMP%] strong[_ngcontent-%COMP%] { color: var(--mj-text-primary); }\n .ps-load-error-detail[_ngcontent-%COMP%] { color: var(--mj-text-secondary); font-size: var(--mj-text-sm); word-break: break-word; }\n .ps-biz-copilot[_ngcontent-%COMP%] { width: 100%; height: 100%; max-width: none; flex: 1; border-left: 1px solid var(--mj-border-default); background: var(--mj-bg-surface); display: flex; flex-direction: column; min-height: 0; }\n .ps-biz-copilot-head[_ngcontent-%COMP%] { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--mj-border-default); }\n .ps-biz-copilot-title[_ngcontent-%COMP%] { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--mj-text-primary); }\n .ps-biz-copilot-title[_ngcontent-%COMP%] i[_ngcontent-%COMP%] { color: var(--mj-brand-primary); }\n .ps-biz-copilot-close[_ngcontent-%COMP%] { background: transparent; border: none; cursor: pointer; padding: 6px 8px; border-radius: 6px; color: var(--mj-text-muted); }\n .ps-biz-copilot-close[_ngcontent-%COMP%]:hover { background: var(--mj-bg-surface-hover); color: var(--mj-text-secondary); }\n .ps-biz-copilot-body[_ngcontent-%COMP%] { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }\n .ps-biz-copilot-body[_ngcontent-%COMP%] mj-conversation-chat-area[_ngcontent-%COMP%] { flex: 1; min-height: 0; display: block; }\n .ps-biz-copilot-empty[_ngcontent-%COMP%] { display: flex; align-items: center; justify-content: center; flex: 1; }\n @media (max-width: 1100px) { .ps-biz-host.chat-open[_ngcontent-%COMP%] .ps-biz-main[_ngcontent-%COMP%] { display: none; } .ps-biz-copilot[_ngcontent-%COMP%] { width: 100%; max-width: none; border-left: none; } }"], changeDetection: 0 });
1095
1169
  };
1096
- PSPredictionsResourceComponent = __decorate([
1170
+ PSPredictionsResourceComponent = PSPredictionsResourceComponent_1 = __decorate([
1097
1171
  RegisterClass(BaseResourceComponent, 'PredictiveStudioPredictionsResource')
1098
1172
  ], PSPredictionsResourceComponent);
1099
1173
  export { PSPredictionsResourceComponent };
@@ -1195,20 +1269,27 @@ export { PSPredictionsResourceComponent };
1195
1269
  @if (selected.canOpen) {
1196
1270
  @if (drivers.length > 0) {
1197
1271
  <div class="ps-drivers" data-testid="ps-drivers">
1198
- <i class="fa-solid fa-lightbulb"></i> <strong>What's driving this:</strong>
1272
+ <i class="fa-solid fa-lightbulb"></i> <strong>Weighted most by this model:</strong>
1199
1273
  @for (d of drivers; track d) { <span class="ps-driver-chip">{{ d }}</span> }
1200
1274
  </div>
1201
1275
  }
1202
- <ps-predictions-grid
1203
- data-testid="ps-atrisk-list"
1204
- #atriskList
1205
- [modelId]="selected.modelId"
1206
- [runId]="latestRunId"
1207
- [title]="selected.title"
1208
- [entityName]="selectedTargetEntityName"
1209
- [problemType]="selectedProblemType"
1210
- height="580px">
1211
- </ps-predictions-grid>
1276
+ <!-- Rendered once the latest run is resolved, so the grid reads that run once; its rows feed the counts, export and list. -->
1277
+ @if (LatestRunResolved) {
1278
+ <ps-predictions-grid
1279
+ data-testid="ps-atrisk-list"
1280
+ #atriskList
1281
+ [modelId]="selected.modelId"
1282
+ [runId]="LatestRunId"
1283
+ [title]="selected.title"
1284
+ [entityName]="selectedTargetEntityName"
1285
+ [problemType]="selectedProblemType"
1286
+ height="580px"
1287
+ (RowsLoaded)="OnAtRiskRowsLoaded($event)"
1288
+ (RowsLoadFailed)="OnAtRiskRowsLoadFailed($event)">
1289
+ </ps-predictions-grid>
1290
+ } @else {
1291
+ <mj-loading text="Finding the latest predictions…" size="small"></mj-loading>
1292
+ }
1212
1293
  }
1213
1294
  <div class="ps-action-bar" [class.locked]="!selected.canOpen" data-testid="ps-action-bar">
1214
1295
  @if (selected.canOpen) {
@@ -1220,6 +1301,7 @@ export { PSPredictionsResourceComponent };
1220
1301
  <div class="ps-action-locked"><i class="fa-solid fa-lock"></i> {{ selected.trust.gateReason }}</div>
1221
1302
  }
1222
1303
  </div>
1304
+ @if (selected.canOpen && AtRiskCapped) { <div class="ps-list-result muted" data-testid="ps-atrisk-capped">The latest run has more than {{ MaxRunDetailRowsLabel }} predictions; this list shows the first {{ MaxRunDetailRowsLabel }}.</div> }
1223
1305
  @if (listResult) { <div class="ps-list-result muted" data-testid="ps-list-result">{{ listResult }}</div> }
1224
1306
  </div>
1225
1307
  }
@@ -1257,7 +1339,7 @@ export { PSPredictionsResourceComponent };
1257
1339
  </mj-page-body-interior>
1258
1340
  `, changeDetection: ChangeDetectionStrategy.OnPush, styles: ["\n :host { display: flex; flex-direction: column; width: 100%; height: 100%; min-height: 0; }\n .ps-biz-host { display: flex; flex: 1; min-height: 0; overflow: hidden; }\n .biz-copilot-splitter { flex: 1; width: 100%; height: 100%; min-height: 0; min-width: 0; }\n .biz-copilot-splitter .as-split-gutter { background: transparent; transition: background-color 0.15s ease; position: relative; }\n .biz-copilot-splitter .as-split-gutter:hover { background-color: var(--mj-brand-primary, #6366f1); }\n .biz-copilot-splitter .as-split-gutter::after { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 2px; height: 24px; border-radius: 1px; background: var(--mj-border-strong, #cbd5e1); }\n .ps-biz-main { width: 100%; height: 100%; flex: 1; min-width: 0; overflow-y: auto; padding: 16px 18px 28px; }\n .ps-biz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }\n .ps-biz-card { background: var(--mj-bg-surface); border: 1px solid var(--mj-border-default); border-radius: var(--mj-radius-md); padding: 18px; display: flex; flex-direction: column; gap: 10px; transition: border-color .12s, background .12s; }\n .ps-biz-card:hover { border-color: var(--mj-brand-primary); background: color-mix(in srgb, var(--mj-brand-primary) 4%, var(--mj-bg-surface)); }\n .ps-biz-card.blocked { opacity: .85; background: var(--mj-bg-surface-card); }\n .ps-biz-card-title { font-size: var(--mj-text-lg); font-weight: 600; color: var(--mj-text-primary); margin: 0; }\n .ps-biz-card-line { color: var(--mj-text-secondary); font-size: var(--mj-text-sm); margin: 0; flex: 1; }\n .ps-biz-card-foot { display: flex; justify-content: flex-end; }\n .ps-trust-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--mj-radius-full); font-size: var(--mj-text-xs); font-weight: 600; }\n .trust-good, .trust-excellent { background: var(--mj-status-success-bg); color: var(--mj-status-success-text); }\n .trust-fair { background: var(--mj-status-warning-bg); color: var(--mj-status-warning-text); }\n .trust-poor { background: var(--mj-status-error-bg); color: var(--mj-status-error-text); }\n .ps-biz-intro { max-width: 820px; margin: 32px auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 20px; }\n .ps-biz-intro-head i { font-size: 40px; color: var(--mj-brand-primary); }\n .ps-biz-intro-head h2 { margin: 12px 0 6px; color: var(--mj-text-primary); font-size: var(--mj-text-xl); }\n .ps-biz-intro-head p { margin: 0 auto; max-width: 620px; color: var(--mj-text-secondary); font-size: var(--mj-text-sm); }\n .ps-cap-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; width: 100%; }\n .ps-cap-card { background: var(--mj-bg-surface); border: 1px solid var(--mj-border-default); border-radius: var(--mj-radius-md); padding: 18px 16px; text-align: left; display: flex; flex-direction: column; gap: 6px; }\n .ps-cap-card i { font-size: 20px; color: var(--mj-brand-primary); }\n .ps-cap-title { font-weight: 600; color: var(--mj-text-primary); font-size: var(--mj-text-sm); }\n .ps-cap-blurb { color: var(--mj-text-secondary); font-size: var(--mj-text-xs); line-height: 1.45; }\n .ps-biz-crumb { display: flex; align-items: center; gap: 8px; font-size: var(--mj-text-sm); color: var(--mj-text-muted); margin-bottom: 14px; }\n .ps-biz-crumb a { color: var(--mj-text-link); cursor: pointer; }\n .ps-biz-crumb a:hover { text-decoration: underline; }\n .ps-biz-crumb i { font-size: 10px; }\n .ps-trust-banner { display: flex; gap: 16px; align-items: center; padding: 18px 20px; border-radius: var(--mj-radius-md); border: 1px solid; margin-bottom: 18px; }\n .ps-trust-banner.trust-good, .ps-trust-banner.trust-excellent { background: var(--mj-status-success-bg); border-color: var(--mj-status-success-border); }\n .ps-trust-banner.trust-fair { background: var(--mj-status-warning-bg); border-color: var(--mj-status-warning-border); }\n .ps-trust-banner.trust-poor { background: var(--mj-status-error-bg); border-color: var(--mj-status-error-border); }\n .ps-trust-dots { display: flex; gap: 3px; font-size: 18px; }\n .ps-trust-dots i { color: var(--mj-border-strong); } .ps-trust-dots i.on { color: var(--mj-status-warning); }\n .ps-trust-banner.trust-good .ps-trust-dots i.on, .ps-trust-banner.trust-excellent .ps-trust-dots i.on { color: var(--mj-status-success); }\n .ps-trust-grade { font-weight: 700; font-size: var(--mj-text-lg); color: var(--mj-text-primary); }\n .ps-trust-line { font-weight: 600; color: var(--mj-text-primary); margin-top: 2px; }\n .ps-trust-explain, .ps-trust-evidence { font-size: var(--mj-text-sm); margin-top: 4px; }\n .ps-action-bar { display: flex; gap: 10px; flex-wrap: wrap; padding: 14px 16px; border-radius: var(--mj-radius-md); background: var(--mj-bg-surface-card); border: 1px solid var(--mj-border-default); }\n .ps-action-bar.locked { background: var(--mj-status-error-bg); border-color: var(--mj-status-error-border); }\n .ps-action-locked { display: flex; align-items: center; gap: 8px; color: var(--mj-status-error-text); font-weight: 600; font-size: var(--mj-text-sm); }\n .ps-drivers { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 0 0 16px; color: var(--mj-text-secondary); font-size: var(--mj-text-sm); }\n .ps-drivers i { color: var(--mj-status-warning); }\n .ps-driver-chip { background: var(--mj-bg-surface-card); border: 1px solid var(--mj-border-default); border-radius: var(--mj-radius-full); padding: 2px 10px; font-weight: 600; color: var(--mj-text-primary); }\n .ps-atrisk { border: 1px solid var(--mj-border-default); border-radius: var(--mj-radius-md); overflow: hidden; margin-bottom: 16px; background: var(--mj-bg-surface); }\n .ps-atrisk-head { display: grid; grid-template-columns: 1fr 140px 52px; gap: 12px; padding: 8px 14px; background: var(--mj-bg-surface-card); border-bottom: 1px solid var(--mj-border-default); font-size: var(--mj-text-xs); font-weight: 600; color: var(--mj-text-muted); text-transform: uppercase; letter-spacing: .03em; }\n .ps-atrisk-rcol { grid-column: 2 / span 2; text-align: right; }\n .ps-atrisk-row { display: grid; grid-template-columns: 1fr 140px 52px; gap: 12px; align-items: center; padding: 9px 14px; border-bottom: 1px solid var(--mj-border-subtle); }\n .ps-atrisk-row:last-child { border-bottom: none; }\n .ps-atrisk-row:hover { background: var(--mj-bg-surface-hover); }\n .ps-atrisk-idcell { display: flex; flex-direction: column; gap: 4px; min-width: 0; }\n .ps-atrisk-id { font-size: var(--mj-text-xs); color: var(--mj-text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n .ps-atrisk-why { display: flex; gap: 6px; flex-wrap: wrap; }\n .ps-why-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 600; padding: 1px 7px; border-radius: var(--mj-radius-full); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n .ps-why-chip i { font-size: 8px; }\n .ps-why-chip.up { background: var(--mj-status-error-bg); color: var(--mj-status-error-text); }\n .ps-why-chip.down { background: var(--mj-status-success-bg); color: var(--mj-status-success-text); }\n .ps-atrisk-bar { height: 8px; border-radius: var(--mj-radius-full); background: var(--mj-bg-surface-sunken); overflow: hidden; }\n .ps-atrisk-fill { display: block; height: 100%; border-radius: var(--mj-radius-full); }\n .ps-atrisk-pct { text-align: right; font-weight: 700; font-size: var(--mj-text-sm); font-variant-numeric: tabular-nums; }\n .ps-atrisk-fill.risk-high { background: var(--mj-status-error); }\n .ps-atrisk-fill.risk-medium { background: var(--mj-status-warning); }\n .ps-atrisk-fill.risk-low { background: var(--mj-status-success); }\n .ps-atrisk-pct.risk-high { color: var(--mj-status-error-text); }\n .ps-atrisk-pct.risk-medium { color: var(--mj-status-warning-text); }\n .ps-atrisk-pct.risk-low { color: var(--mj-status-success-text); }\n .ps-atrisk-foot { padding: 8px 14px; font-size: var(--mj-text-xs); }\n .ps-atrisk-empty { padding: 24px; text-align: center; border: 1px dashed var(--mj-border-default); border-radius: var(--mj-radius-md); margin-bottom: 16px; }\n .ps-atrisk-error { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border: 1px solid var(--mj-status-error-border); background: var(--mj-status-error-bg); border-radius: var(--mj-radius-md); margin-bottom: 16px; color: var(--mj-status-error-text); font-size: var(--mj-text-sm); }\n .ps-atrisk-error i { color: var(--mj-status-error); }\n .ps-atrisk-error .ps-atrisk-error-msg { flex: 1; min-width: 0; word-break: break-word; }\n .mono { font-family: var(--mj-font-family-mono); }\n /* Kept local (not in the shared stylesheet) deliberately: shared styles are injected by the\n ViewEncapsulation.None PANEL components, and this banner renders precisely when panels DON'T. */\n .ps-load-error { display: flex; align-items: center; gap: 14px; max-width: 620px; margin: 32px auto; padding: 18px 20px; border: 1px solid var(--mj-status-error-border); background: var(--mj-status-error-bg); border-radius: var(--mj-radius-lg); }\n .ps-load-error > i { font-size: 24px; color: var(--mj-status-error); }\n .ps-load-error-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }\n .ps-load-error-text strong { color: var(--mj-text-primary); }\n .ps-load-error-detail { color: var(--mj-text-secondary); font-size: var(--mj-text-sm); word-break: break-word; }\n .ps-biz-copilot { width: 100%; height: 100%; max-width: none; flex: 1; border-left: 1px solid var(--mj-border-default); background: var(--mj-bg-surface); display: flex; flex-direction: column; min-height: 0; }\n .ps-biz-copilot-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--mj-border-default); }\n .ps-biz-copilot-title { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--mj-text-primary); }\n .ps-biz-copilot-title i { color: var(--mj-brand-primary); }\n .ps-biz-copilot-close { background: transparent; border: none; cursor: pointer; padding: 6px 8px; border-radius: 6px; color: var(--mj-text-muted); }\n .ps-biz-copilot-close:hover { background: var(--mj-bg-surface-hover); color: var(--mj-text-secondary); }\n .ps-biz-copilot-body { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }\n .ps-biz-copilot-body mj-conversation-chat-area { flex: 1; min-height: 0; display: block; }\n .ps-biz-copilot-empty { display: flex; align-items: center; justify-content: center; flex: 1; }\n @media (max-width: 1100px) { .ps-biz-host.chat-open .ps-biz-main { display: none; } .ps-biz-copilot { width: 100%; max-width: none; border-left: none; } }\n "] }]
1259
1341
  }], null, null); })();
1260
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PSPredictionsResourceComponent, { className: "PSPredictionsResourceComponent", filePath: "src/PredictiveStudio/resources/ps-predictions-resource.component.ts", lineNumber: 285 }); })();
1342
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PSPredictionsResourceComponent, { className: "PSPredictionsResourceComponent", filePath: "src/PredictiveStudio/resources/ps-predictions-resource.component.ts", lineNumber: 294 }); })();
1261
1343
  /** Tree-shaking prevention — called from the subpath module so the @RegisterClass survives bundling. */
1262
1344
  export function LoadPSPredictionsResource() {
1263
1345
  // intentionally empty