@viswa-test/test-citation 0.0.194 → 0.0.195
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.
- package/README.md +290 -0
- package/dist/cjs/features/CognitiveCompare/CitationRenderer.js +1 -1
- package/dist/cjs/features/CognitiveCompare/CognitiveCompare.js +1 -1
- package/dist/cjs/features/ManageRemainders/AssigneeCalendarView.js +2 -0
- package/dist/cjs/features/ManageRemainders/AssigneeCalendarView.js.map +1 -0
- package/dist/cjs/features/ManageRemainders/ManageRemainder.module.css.js +2 -0
- package/dist/cjs/features/ManageRemainders/ManageRemainder.module.css.js.map +1 -0
- package/dist/cjs/features/ManageRemainders/ManageReminders.js +2 -0
- package/dist/cjs/features/ManageRemainders/ManageReminders.js.map +1 -0
- package/dist/cjs/features/ManageRemainders/ReminderFrequencyAutocomplete.js +2 -0
- package/dist/cjs/features/ManageRemainders/ReminderFrequencyAutocomplete.js.map +1 -0
- package/dist/cjs/index.js +1 -1
- package/dist/features/CognitiveCompare/CitationRenderer.js +1 -1
- package/dist/features/CognitiveCompare/CognitiveCompare.js +1 -1
- package/dist/features/ManageRemainders/AssigneeCalendarView.js +2 -0
- package/dist/features/ManageRemainders/AssigneeCalendarView.js.map +1 -0
- package/dist/features/ManageRemainders/ManageRemainder.module.css.js +2 -0
- package/dist/features/ManageRemainders/ManageRemainder.module.css.js.map +1 -0
- package/dist/features/ManageRemainders/ManageReminders.js +2 -0
- package/dist/features/ManageRemainders/ManageReminders.js.map +1 -0
- package/dist/features/ManageRemainders/ReminderFrequencyAutocomplete.js +2 -0
- package/dist/features/ManageRemainders/ReminderFrequencyAutocomplete.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/types/src/CommonConstants/CommonConstants.d.ts +7670 -0
- package/dist/types/src/CommonConstants/CommonConstants.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/CitationRenderer.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/CognitiveCompare.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/hooks/useCompareLayout.d.ts +0 -1
- package/dist/types/src/features/CognitiveCompare/hooks/useCompareLayout.d.ts.map +1 -1
- package/dist/types/src/features/ManageRemainders/AssigneeCalendarView.d.ts +19 -0
- package/dist/types/src/features/ManageRemainders/AssigneeCalendarView.d.ts.map +1 -0
- package/dist/types/src/features/ManageRemainders/ManageRemainderUsage.d.ts +2 -0
- package/dist/types/src/features/ManageRemainders/ManageRemainderUsage.d.ts.map +1 -0
- package/dist/types/src/features/ManageRemainders/ManageReminders.d.ts +49 -0
- package/dist/types/src/features/ManageRemainders/ManageReminders.d.ts.map +1 -0
- package/dist/types/src/features/ManageRemainders/ReminderFrequencyAutocomplete.d.ts +17 -0
- package/dist/types/src/features/ManageRemainders/ReminderFrequencyAutocomplete.d.ts.map +1 -0
- package/dist/types/src/features/ManageRemainders/types/type.d.ts +79 -0
- package/dist/types/src/features/ManageRemainders/types/type.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/package.json +14 -7
package/README.md
CHANGED
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
- [ReviewPanel](#reviewpanel) [<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="18" height="18">](https://github.com/Techolution/e-llm-studio-lib/blob/dev/citation/src/features/ReviewPanel/README.md)
|
|
33
33
|
- [TableCitationContent](#tablecitationcontent) [<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="18" height="18">](https://github.com/Techolution/e-llm-studio-lib/blob/dev/citation/src/features/TableCitation/README.md)
|
|
34
34
|
- [SplitterCitationsComponent](#splittercitationscomponent) [<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="18" height="18">](https://github.com/Techolution/e-llm-studio-lib/blob/dev/citation/src/features/SplitterCitations/README.md)
|
|
35
|
+
-[ManageReminders](#ManageReminders) [<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="18" height="18">](https://github.com/Techolution/e-llm-studio-lib/blob/dev/citation/src/features/ManageRemainders/README.md)
|
|
35
36
|
4. [Common Use Cases](#common-use-cases)
|
|
36
37
|
5. [Development & Contribution](#development--contribution)
|
|
37
38
|
6. [License](#license)
|
|
@@ -2339,6 +2340,295 @@ export default function CustomIconExample() {
|
|
|
2339
2340
|
|
|
2340
2341
|
---
|
|
2341
2342
|
|
|
2343
|
+
|
|
2344
|
+
|
|
2345
|
+
# ManageReminders Component - Complete Usage Guide
|
|
2346
|
+
|
|
2347
|
+
## Overview
|
|
2348
|
+
|
|
2349
|
+
The `ManageReminders` component provides a flexible, fully customizable reminder and escalation management system. It allows users to configure automatic reminders, escalation rules, and manage assignees with a visual calendar preview.
|
|
2350
|
+
|
|
2351
|
+
|
|
2352
|
+
### Import in Your Component
|
|
2353
|
+
|
|
2354
|
+
```typescript
|
|
2355
|
+
import { ManageReminders } from './components/ManageReminders/ManageReminders';
|
|
2356
|
+
```
|
|
2357
|
+
|
|
2358
|
+
---
|
|
2359
|
+
|
|
2360
|
+
## Basic Usage
|
|
2361
|
+
|
|
2362
|
+
### Minimal Example
|
|
2363
|
+
|
|
2364
|
+
```typescript
|
|
2365
|
+
import React, { useState } from 'react';
|
|
2366
|
+
import { ManageReminders } from './components/ManageReminders/ManageReminders';
|
|
2367
|
+
|
|
2368
|
+
function MyComponent() {
|
|
2369
|
+
const [schedules, setSchedules] = useState([]);
|
|
2370
|
+
const [remainderOwners, setRemainderOwners] = useState([
|
|
2371
|
+
{ id: 1, name: "", email: "", reminder_start_date: "", reminder_frequency: null, days: null, before_or_after: "", escalation_reminder_frequency: null, is_escalation_reminder: false },
|
|
2372
|
+
{ id: 2, name: "", email: "", reminder_start_date: "", reminder_frequency: null, days: null, before_or_after: "", escalation_reminder_frequency: null, is_escalation_reminder: false },
|
|
2373
|
+
{ id: 3, name: "", email: "", reminder_start_date: "", reminder_frequency: null, days: null, before_or_after: "", escalation_reminder_frequency: null, is_escalation_reminder: false },
|
|
2374
|
+
]);
|
|
2375
|
+
|
|
2376
|
+
const mockData = {
|
|
2377
|
+
due_at: "2026-12-01",
|
|
2378
|
+
assignee: {
|
|
2379
|
+
1: { name: "John Doe" },
|
|
2380
|
+
2: { name: "Jane Smith" },
|
|
2381
|
+
3: { name: "Mike Johnson" },
|
|
2382
|
+
},
|
|
2383
|
+
};
|
|
2384
|
+
|
|
2385
|
+
return (
|
|
2386
|
+
<ManageReminders
|
|
2387
|
+
data={mockData}
|
|
2388
|
+
schedules={schedules}
|
|
2389
|
+
setSchedules={setSchedules}
|
|
2390
|
+
remainderOwners={remainderOwners}
|
|
2391
|
+
setRemainderOwners={setRemainderOwners}
|
|
2392
|
+
handelSendNow={() => console.log("Send reminder clicked")}
|
|
2393
|
+
/>
|
|
2394
|
+
);
|
|
2395
|
+
}
|
|
2396
|
+
```
|
|
2397
|
+
|
|
2398
|
+
---
|
|
2399
|
+
|
|
2400
|
+
## Props Reference
|
|
2401
|
+
|
|
2402
|
+
### Required Props
|
|
2403
|
+
|
|
2404
|
+
| Prop | Type | Description |
|
|
2405
|
+
|------|------|-------------|
|
|
2406
|
+
| `data` | `object` | Contains `due_at` (ISO date string) and `assignee` object with user info |
|
|
2407
|
+
| `schedules` | `any[]` | Array of generated reminder schedules |
|
|
2408
|
+
| `setSchedules` | `function` | State setter for schedules |
|
|
2409
|
+
| `remainderOwners` | `remainderOwnerValue[]` | Array of owner configuration objects |
|
|
2410
|
+
| `setRemainderOwners` | `function` | State setter for remainder owners |
|
|
2411
|
+
| `handelSendNow` | `function` | Callback triggered when "Send Now" button is clicked |
|
|
2412
|
+
|
|
2413
|
+
### Optional Props - Configuration
|
|
2414
|
+
|
|
2415
|
+
#### Colors Configuration
|
|
2416
|
+
|
|
2417
|
+
```typescript
|
|
2418
|
+
// Label colors (used for assignee chips)
|
|
2419
|
+
colors?: ColorConfig[] = [
|
|
2420
|
+
{ bg: "#FDF2FA", text: "#C11574" },
|
|
2421
|
+
{ bg: "#EEF4FF", text: "#3538CD" },
|
|
2422
|
+
{ bg: "#F1F5F9", text: "#344054" },
|
|
2423
|
+
]
|
|
2424
|
+
|
|
2425
|
+
// Statement badge colors
|
|
2426
|
+
chipColor?: ColorConfig[] = [
|
|
2427
|
+
{ bg: "#FDF2FA", text: "#C93185" },
|
|
2428
|
+
{ bg: "#EEF2FF", text: "#6366F1" },
|
|
2429
|
+
{ bg: "#FFF4E5", text: "#FF6058" },
|
|
2430
|
+
]
|
|
2431
|
+
|
|
2432
|
+
// Recipients avatar colors - USE HEX VALUES, NOT TAILWIND CLASSES
|
|
2433
|
+
recipientsColor?: ColorConfig[] = [
|
|
2434
|
+
{ bg: "#DBEAFE", text: "#1E40AF" }, // ✅ Correct: Hex colors
|
|
2435
|
+
{ bg: "#CCFBF1", text: "#0D9488" }, // ✅ Correct: Hex colors
|
|
2436
|
+
{ bg: "#DCFCE7", text: "#166534" }, // ✅ Correct: Hex colors
|
|
2437
|
+
]
|
|
2438
|
+
```
|
|
2439
|
+
|
|
2440
|
+
#### Text Configuration
|
|
2441
|
+
|
|
2442
|
+
```typescript
|
|
2443
|
+
manualReminderTitle?: string = "Send Manual Reminder Now"
|
|
2444
|
+
manualReminderDescription?: string = "Immediately notify the assignees about this document."
|
|
2445
|
+
selectRecipientsLabel?: string = "Select recipients:"
|
|
2446
|
+
previewEmailButtonLabel?: string = "Preview Email"
|
|
2447
|
+
sendNowButtonLabel?: string = "Send Now"
|
|
2448
|
+
reminderSuccessTitle?: string = "Reminder sent successfully!"
|
|
2449
|
+
reminderSuccessDescription?: string = "Email notification sent assignees."
|
|
2450
|
+
|
|
2451
|
+
escalationTitle?: string = "Escalation and Auto Reminder Setup"
|
|
2452
|
+
escalationDescription?: string = "Configure Auto reminder settings for all assignees."
|
|
2453
|
+
|
|
2454
|
+
reminderStartDateLabel?: string = "Reminder Start Date"
|
|
2455
|
+
documentDueDateLabel?: string = "Document Due Date"
|
|
2456
|
+
reminderFrequencyLabel?: string = "Reminder Frequency"
|
|
2457
|
+
escalationRemindersLabel?: string = "Escalation Reminders"
|
|
2458
|
+
escalationConditionText?: string = "If the document is still pending, start escalation reminders"
|
|
2459
|
+
daysText?: string = "days"
|
|
2460
|
+
dueDataAndRepeatText?: string = "due date and repeat every"
|
|
2461
|
+
```
|
|
2462
|
+
|
|
2463
|
+
#### Labels and Assignees
|
|
2464
|
+
|
|
2465
|
+
```typescript
|
|
2466
|
+
// Assignee labels (displayed on chips)
|
|
2467
|
+
labels?: string[] = ["Assignee 1", "Assignee 2", "Assignee 3"]
|
|
2468
|
+
|
|
2469
|
+
// Assignee data
|
|
2470
|
+
assignees?: AssigneeConfig[] = [
|
|
2471
|
+
{
|
|
2472
|
+
id: "1",
|
|
2473
|
+
name: "Assignee 1",
|
|
2474
|
+
color: "#C11574",
|
|
2475
|
+
bg: "#FDF2F8",
|
|
2476
|
+
startDate: new Date("2026-11-09"),
|
|
2477
|
+
dueDate: new Date("2026-12-01"),
|
|
2478
|
+
},
|
|
2479
|
+
// ... more assignees
|
|
2480
|
+
]
|
|
2481
|
+
|
|
2482
|
+
// Fallback recipients when data.assignee is empty
|
|
2483
|
+
fallbackRecipients?: RecipientConfig[] = [
|
|
2484
|
+
{
|
|
2485
|
+
initials: "OR",
|
|
2486
|
+
name: "Olivia Rhye",
|
|
2487
|
+
checked: false,
|
|
2488
|
+
bg: "bg-blue-100",
|
|
2489
|
+
text: "text-blue-700",
|
|
2490
|
+
},
|
|
2491
|
+
// ... more recipients
|
|
2492
|
+
]
|
|
2493
|
+
```
|
|
2494
|
+
|
|
2495
|
+
#### Options
|
|
2496
|
+
|
|
2497
|
+
```typescript
|
|
2498
|
+
reminderFrequencyOptions?: string[] = [
|
|
2499
|
+
"12 hours", "24 hours", "48 hours", "72 hours", "Custom"
|
|
2500
|
+
]
|
|
2501
|
+
|
|
2502
|
+
escalationFrequencyOptions?: string[] = [
|
|
2503
|
+
"1/2 hour", "1 hour", "4 hours", "6 hours", "12 hours", "Custom"
|
|
2504
|
+
]
|
|
2505
|
+
|
|
2506
|
+
beforeAfterOptions?: string[] = ["After", "Before"]
|
|
2507
|
+
```
|
|
2508
|
+
|
|
2509
|
+
---
|
|
2510
|
+
|
|
2511
|
+
## Configuration Examples
|
|
2512
|
+
|
|
2513
|
+
### Example 1: Basic Setup with Custom Data
|
|
2514
|
+
|
|
2515
|
+
```typescript
|
|
2516
|
+
const mockData = {
|
|
2517
|
+
due_at: "2026-12-15",
|
|
2518
|
+
assignee: {
|
|
2519
|
+
1: { name: "Alice Johnson" },
|
|
2520
|
+
2: { name: "Bob Smith" },
|
|
2521
|
+
3: { name: "Carol White" },
|
|
2522
|
+
},
|
|
2523
|
+
};
|
|
2524
|
+
|
|
2525
|
+
const customAssignees = [
|
|
2526
|
+
{ id: "1", name: "Alice Johnson", color: "#C11574", bg: "#FDF2F8", startDate: new Date(), dueDate: new Date("2026-12-15") },
|
|
2527
|
+
{ id: "2", name: "Bob Smith", color: "#3538CD", bg: "#EEF4FF", startDate: new Date(), dueDate: new Date("2026-12-15") },
|
|
2528
|
+
{ id: "3", name: "Carol White", color: "#FF6058", bg: "#FFF7ED", startDate: new Date(), dueDate: new Date("2026-12-15") },
|
|
2529
|
+
];
|
|
2530
|
+
|
|
2531
|
+
<ManageReminders
|
|
2532
|
+
data={mockData}
|
|
2533
|
+
schedules={schedules}
|
|
2534
|
+
setSchedules={setSchedules}
|
|
2535
|
+
remainderOwners={remainderOwners}
|
|
2536
|
+
setRemainderOwners={setRemainderOwners}
|
|
2537
|
+
labels={["Alice", "Bob", "Carol"]}
|
|
2538
|
+
assignees={customAssignees}
|
|
2539
|
+
handelSendNow={() => {
|
|
2540
|
+
console.log("Reminders sent!");
|
|
2541
|
+
// API call to send reminders
|
|
2542
|
+
}}
|
|
2543
|
+
/>
|
|
2544
|
+
```
|
|
2545
|
+
|
|
2546
|
+
### Example 2: Custom Colors (Correct Way)
|
|
2547
|
+
|
|
2548
|
+
```typescript
|
|
2549
|
+
// ✅ CORRECT: Use hex colors for recipientsColor
|
|
2550
|
+
const customRecipientsColor = [
|
|
2551
|
+
{ bg: "#E0E7FF", text: "#3730A3" }, // Indigo
|
|
2552
|
+
{ bg: "#FDF2F8", text: "#BE185D" }, // Rose
|
|
2553
|
+
{ bg: "#ECFDF5", text: "#047857" }, // Emerald
|
|
2554
|
+
];
|
|
2555
|
+
|
|
2556
|
+
<ManageReminders
|
|
2557
|
+
data={mockData}
|
|
2558
|
+
schedules={schedules}
|
|
2559
|
+
setSchedules={setSchedules}
|
|
2560
|
+
remainderOwners={remainderOwners}
|
|
2561
|
+
setRemainderOwners={setRemainderOwners}
|
|
2562
|
+
recipientsColor={customRecipientsColor} // ✅ Pass hex values
|
|
2563
|
+
colors={[
|
|
2564
|
+
{ bg: "#E0E7FF", text: "#3730A3" },
|
|
2565
|
+
{ bg: "#FDF2F8", text: "#BE185D" },
|
|
2566
|
+
{ bg: "#ECFDF5", text: "#047857" },
|
|
2567
|
+
]}
|
|
2568
|
+
chipColor={[
|
|
2569
|
+
{ bg: "#E0E7FF", text: "#3730A3" },
|
|
2570
|
+
{ bg: "#FDF2F8", text: "#BE185D" },
|
|
2571
|
+
{ bg: "#ECFDF5", text: "#047857" },
|
|
2572
|
+
]}
|
|
2573
|
+
/>
|
|
2574
|
+
```
|
|
2575
|
+
|
|
2576
|
+
### Example 3: Complete Customization
|
|
2577
|
+
|
|
2578
|
+
```typescript
|
|
2579
|
+
<ManageReminders
|
|
2580
|
+
data={mockData}
|
|
2581
|
+
schedules={schedules}
|
|
2582
|
+
setSchedules={setSchedules}
|
|
2583
|
+
remainderOwners={remainderOwners}
|
|
2584
|
+
setRemainderOwners={setRemainderOwners}
|
|
2585
|
+
|
|
2586
|
+
// Custom labels
|
|
2587
|
+
manualReminderTitle="Send Document Notification"
|
|
2588
|
+
manualReminderDescription="Notify all recipients about the pending document"
|
|
2589
|
+
selectRecipientsLabel="Choose recipients to notify:"
|
|
2590
|
+
previewEmailButtonLabel="Preview Message"
|
|
2591
|
+
sendNowButtonLabel="Send Notification"
|
|
2592
|
+
|
|
2593
|
+
// Custom escalation text
|
|
2594
|
+
escalationTitle="Automated Escalation Rules"
|
|
2595
|
+
escalationDescription="Set up escalation rules for document tracking"
|
|
2596
|
+
|
|
2597
|
+
// Custom field labels
|
|
2598
|
+
reminderStartDateLabel="Start Reminding On"
|
|
2599
|
+
documentDueDateLabel="Document Deadline"
|
|
2600
|
+
reminderFrequencyLabel="Send Reminders Every"
|
|
2601
|
+
escalationRemindersLabel="Enable Escalation"
|
|
2602
|
+
|
|
2603
|
+
// Custom options
|
|
2604
|
+
reminderFrequencyOptions={["6 hours", "12 hours", "24 hours", "Custom"]}
|
|
2605
|
+
escalationFrequencyOptions={["1 hour", "2 hours", "4 hours", "Custom"]}
|
|
2606
|
+
beforeAfterOptions={["Before deadline", "After deadline"]}
|
|
2607
|
+
|
|
2608
|
+
// Callback
|
|
2609
|
+
handelSendNow={() => {
|
|
2610
|
+
// Send reminders to API
|
|
2611
|
+
console.log("Sending reminders...");
|
|
2612
|
+
}}
|
|
2613
|
+
/>
|
|
2614
|
+
```
|
|
2615
|
+
|
|
2616
|
+
---
|
|
2617
|
+
|
|
2618
|
+
## Colors and Styling
|
|
2619
|
+
|
|
2620
|
+
### ⚠️ IMPORTANT: Color Format Issue & Fix
|
|
2621
|
+
|
|
2622
|
+
**The Problem:**
|
|
2623
|
+
The current code uses Tailwind class names for `recipientsColor`:
|
|
2624
|
+
```typescript
|
|
2625
|
+
// ❌ WRONG - These are Tailwind class names
|
|
2626
|
+
recipientsColor = [
|
|
2627
|
+
{ bg: "bg-blue-100", text: "text-blue-700" }, // Won't work in inline styles!
|
|
2628
|
+
]
|
|
2629
|
+
```
|
|
2630
|
+
|
|
2631
|
+
|
|
2342
2632
|
## Development & Contribution
|
|
2343
2633
|
|
|
2344
2634
|
Contributions are welcome! This guide walks you through making changes to the citation library.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),r=require("react/jsx-runtime"),i=require("react"),n=require("@mui/material"),t=require("react-markdown"),o=require("./CitationAnchor.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=s(t);exports.default=function(t){var s=t.content,a=void 0===s?"":s,c=t.title,d=void 0===c?"":c,l=t.citations,x=void 0===l?{}:l,f=t.styles,p=void 0===f?{}:f,_=t.docData,g=void 0===_?{}:_;t.open;var h=i.useMemo(function(){return JSON.stringify(x||{})},[x]),m=i.useMemo(function(){return x},[h]),v=i.useMemo(function(){return JSON.stringify(g||{})},[g]),y=i.useMemo(function(){return g},[v]),j=i.useMemo(function(){return{citations:m,docData:y}},[m,y]),b=i.useMemo(function(){return{a:function(e){var i=e.href,n=void 0===i?"":i,t=e.children;return r.jsx(o.default,{href:n,children:t,metaData:j})}}},[j]);return r.jsxs(n.Box,e.__assign({sx:{borderRadius:"8px",border:"1px solid #E4E7EC",bgcolor:"#FCFCFD"}},{children:[r.jsx(n.Box,e.__assign({sx:{px:1.5,py:.75,borderBottom:"1px solid #EAECF0"}},{children:r.jsx(n.Typography,e.__assign({sx:{fontSize:"15px",fontWeight:600,color:"#344054",lineHeight:1.25}},{children:d}))})),r.jsx(n.Box,e.__assign({sx:{px:1.5,py:1.1,display:"flex",flexDirection:"column",gap:.95}},{children:r.jsx(n.Box,e.__assign({sx:{display:"flex",flexDirection:"column"}},{children:r.jsx(n.Typography,e.__assign({component:"div",sx:e.__assign({},p)},{children:r.jsx(u.default,e.__assign({components:b},{children:a}))}))}))}))]}))};
|
|
2
2
|
//# sourceMappingURL=CitationRenderer.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),i=require("react"),t=require("@mui/material"),o=require("lucide-react"),r=require("../../assests/svg/ButtonCognitiveIcon.js"),l=require("./OverlayComponent.js"),s=require("./CognitiveComparehelpers.js"),u=require("./CognitiveCompareConfig.js"),a=require("./CognitiveCompareConstants.js"),c=require("./CognitivePopup.js"),d=require("./MoreFunctionsPopup.js"),f=require("./LoaderComponent.js"),v=require("./components/ThreeDotsLoader.js"),p=require("./hooks/useCompareData.js"),g=require("./hooks/useComparePopups.js"),h=require("./hooks/useSectionRefs.js"),m=require("./hooks/useAccordionState.js"),S=require("./hooks/useDeviationNavigation.js"),R=require("./components/CompareHeader.js"),x=require("./components/SubSectionAccordion.js"),_=require("./components/LHSSectionRow.js"),y=require("./components/RHSSectionRow.js"),b=require("./components/CognitiveSummaryPopup.js"),C=require("./CompareContext.js"),E=require("./hooks/useStyles.js"),A=require("./hooks/useResizeHandler.js"),B=require("./hooks/useLinesCalculator.js"),w=require("./hooks/useSideBySide.js"),I=require("./components/SvgConnectors.js");exports.SHARED_MARKDOWN_STYLES=u.SHARED_MARKDOWN_STYLES,exports.default=function(T){var D,O,F,j,P,N,k,L,M,q,H,V,z,G,W,K,U,Y,J,X,$,Q,Z,ee,ne,ie,te,oe,re,le,se,ue,ae,ce,de,fe=T.componentHeaderText,ve=void 0===fe?a.DEFAULT_COMPONENT_HEADER_TEXT:fe,pe=T.treeData,ge=T.comparisonConfig,he=T.leftColumnTitleText,me=T.rightColumnTitleText,Se=T.markdownStyles,Re=T.resetTrigger,xe=T.displayConfig,_e=void 0===xe?{isHeaderVisible:!0,isToggleVisible:!0,maintainRelativeOrder:!1,isLoading:!0,showDeviationBadges:!1,enableDeviationSchemaBackwardCompatibility:!1,displayEmailNotifier:!0}:xe,ye=T.onMaintainRelativeOrderChange,be=T.popupConfig,Ce=T.deviationData,Ee=void 0===Ce?{}:Ce,Ae=T.deviationNodeIdToView,Be=T.resetDeviationNodeId,we=T.isProposingFix,Ie=void 0!==we&&we,Te=T.proposingFixNodeId,De=T.isRedlineFlow,Oe=i.useState(_e.maintainRelativeOrder),Fe=Oe[0],je=Oe[1],Pe=null!==(D=null==_e?void 0:_e.expandLevels)&&void 0!==D?D:0,Ne=!!(null==_e?void 0:_e.expandAllSections),ke=!!Fe||!!(null==_e?void 0:_e.showDeviationBadges),Le=i.useState(!1),Me=Le[0],qe=Le[1],He=i.useState(null),Ve=He[0],ze=He[1],Ge=i.useState(null===(F=null!==(O=null==pe?void 0:pe.newEvaluationResult)&&void 0!==O?O:null==_e?void 0:_e.enableDeviationSchemaBackwardCompatibility)||void 0===F||F)[0],We=i.useState(new Set),Ke=We[0],Ue=We[1],Ye=i.useState([]),Je=Ye[0],Xe=Ye[1],$e=i.useState(!1),Qe=$e[0],Ze=$e[1],en=i.useRef(null),nn=i.useRef(null),tn=i.useRef(null),on=i.useRef(null),rn=i.useRef(null),ln=i.useRef(!1),sn=i.useRef(null),un=i.useRef({}),an=i.useRef([]),cn=i.useRef(function(){}),dn=i.useRef(null),fn=i.useRef(function(){}),vn=i.useMemo(function(){return JSON.stringify(Ee||{})},[JSON.stringify(Ee)]),pn=i.useMemo(function(){return Ee||{}},[vn]),gn=i.useMemo(function(){return(null==pe?void 0:pe.cognitive_decisioning)||{}},[pe]),hn=i.useMemo(function(){return e.__assign(e.__assign({},u.SHARED_MARKDOWN_STYLES),Se)},[Se]),mn=i.useRef(null),Sn=i.useRef(null),Rn=i.useRef(null),xn=i.useRef(null),_n=i.useRef(null),yn=i.useRef(null),bn=i.useRef(null),Cn=i.useRef(null),En=i.useRef(null),An=i.useRef(null),Bn=g.useComparePopups(mn),wn=Bn.cognitivePopup,In=Bn.setCognitivePopup,Tn=Bn.moreFunctions,Dn=Bn.setMoreFunctions,On=Bn.position,Fn=Bn.setPosition,jn=Bn.activeBadgeId,Pn=Bn.summaryPopup,Nn=Bn.setSummaryPopup,kn=Bn.closeSummaryPopup,Ln=Bn.setActiveBadgeId,Mn=Bn.popupRef,qn=Bn.handleOpenCognitiveCompare,Hn=Bn.openCognitivePopupFromState,Vn=Bn.closeCognitivePopup,zn=Bn.closeMoreFunctionsPopup,Gn=i.useMemo(function(){var e,n,i,t,o,r,l;return{fields:null!==(e=null==ge?void 0:ge.fields)&&void 0!==e?e:u.DEFAULT_FIELD_CONFIG,thresholds:{high:null!==(i=null===(n=null==ge?void 0:ge.thresholds)||void 0===n?void 0:n.high)&&void 0!==i?i:u.DEFAULT_COMPARISON_CONFIG.thresholds.high,medium:null!==(o=null===(t=null==ge?void 0:ge.thresholds)||void 0===t?void 0:t.medium)&&void 0!==o?o:u.DEFAULT_COMPARISON_CONFIG.thresholds.medium,exact:null!==(l=null===(r=null==ge?void 0:ge.thresholds)||void 0===r?void 0:r.exact)&&void 0!==l?l:u.DEFAULT_COMPARISON_CONFIG.thresholds.exact}}},[ge]),Wn=i.useState(null),Kn=Wn[0];Wn[1];var Un=null===(N=null===(j=null==pe?void 0:pe.documents)||void 0===j?void 0:j[null===(P=null==pe?void 0:pe.input_index_map)||void 0===P?void 0:P[0]])||void 0===N?void 0:N.title,Yn=null===(M=null===(k=null==pe?void 0:pe.documents)||void 0===k?void 0:k[null===(L=null==pe?void 0:pe.input_index_map)||void 0===L?void 0:L[1]])||void 0===M?void 0:M.title,Jn=s.safeStringify(he||Un||"Uploaded Contract"),Xn=null===(z=null===(V=null===(q=null==pe?void 0:pe.documents)||void 0===q?void 0:q[null===(H=null==pe?void 0:pe.input_index_map)||void 0===H?void 0:H[0]])||void 0===V?void 0:V.metadata)||void 0===z?void 0:z.file_name,$n=s.safeStringify(Xn),Qn=null===(U=null===(K=null===(G=null==pe?void 0:pe.documents)||void 0===G?void 0:G[null===(W=null==pe?void 0:pe.input_index_map)||void 0===W?void 0:W[1]])||void 0===K?void 0:K.metadata)||void 0===U?void 0:U.file_name,Zn=s.safeStringify(Qn),ei=s.safeStringify(me||Yn||"Reference Template"),ni=p.useCognitiveTreeData(pe,Fe,pn,Gn,Ge),ii=ni.activeProposed,ti=ni.existingRule,oi=ni.proposedSections,ri=ni.existingSections,li=ni.visibleFields,si=ni.parentDeviationRecord,ui=ni.deviationNumberRegistry,ai=ni.parseError;i.useEffect(function(){ai&&ze("Failed to load comparison: ".concat(ai))},[ai]);var ci=oi.length>0||ri.length>0,di=i.useMemo(function(){if(!De)return"off";var e=0,n=0,i=function(t){Array.isArray(t)&&t.forEach(function(t){var o,r=(null==t?void 0:t.content)||"";s.hasMeaningfulRedlineTags(r)&&(e+=1,n+=String(r).length),(null===(o=null==t?void 0:t.subsections)||void 0===o?void 0:o.length)&&i(t.subsections)})};return i(oi),i(ri),"".concat(e,":").concat(n)},[De,oi,ri]);i.useEffect(function(){if(oi.length||ri.length)if(Ne){var e={},n={},i=function(i,t){i.forEach(function(i,o){var r,l=Fe?"".concat(t,"-").concat(o):String(o);e[l]=!0;var s=function(e,i){null==e||e.forEach(function(e,t){var o,r="".concat(i,"-").concat(t);n[r]=!0,(null===(o=e.subsections)||void 0===o?void 0:o.length)&&s(e.subsections,r)})};(null===(r=i.subsections)||void 0===r?void 0:r.length)&&s(i.subsections,String(o))})};i(oi,"left"),i(ri,"right"),Ki(e),Yi(n)}else if(Pe>0){var t={},o={},r=function(e,n,i){e.forEach(function(e,r){var l;if(i>=1){var s=Fe?"".concat(n,"-").concat(r):String(r);t[s]=!0}var u=function(e,n,t){t>i||null==e||e.forEach(function(e,i){var r,l="".concat(n,"-").concat(i);o[l]=!0,(null===(r=e.subsections)||void 0===r?void 0:r.length)&&u(e.subsections,l,t+1)})};(null===(l=e.subsections)||void 0===l?void 0:l.length)&&i>=2&&u(e.subsections,String(r),2)})};r(oi,"left",Pe),r(ri,"right",Pe),Ki(t),Yi(o)}},[Ne,Pe,oi,ri,Fe]);var fi=h.useSectionRefs(li.map(function(e){return e.key}),Math.max(oi.length,ri.length)),vi=fi.leftRefs,pi=fi.rightRefs,gi=fi.sectionLeftRefs,hi=fi.sectionRightRefs,mi=fi.lhsBadgeRefs,Si=fi.rhsBadgeRefs,Ri=fi.sectionRightRowRefs,xi=fi.subSectionLeftRefs,_i=fi.subSectionRightRefs,yi=fi.sectionRowRefs,bi=fi.getSectionRowRef,Ci=fi.getSubSectionRef,Ei=fi.getBadgeRef,Ai=w.useSideBySide({maintainRelativeOrder:Fe,proposedSections:oi,existingSections:ri,leftContainerRef:Cn,rightContainerRef:Rn,scrollContainerRef:mn,sectionLeftRefs:gi,sectionRightRefs:hi,subSectionLeftRefs:xi,subSectionRightRefs:_i,lhsBadgeRefs:mi,rhsBadgeRefs:Si,sectionRowRefs:yi,sectionRightRowRefs:Ri,rhsTopSpacerRef:xn,rhsBottomSpacerRef:_n,lhsTopSpacerRef:yn,lhsBottomSpacerRef:bn,calculateLinesRef:cn,setConnectedSections:Ue,setConnectedLines:Xe,cachedConnectedPositions:an,closeMoreFunctionsPopup:zn,setErrorToast:ze,moreFunctions:Tn,closeSummaryPopup:kn}),Bi=Ai.isSideBySide,wi=Ai.isArrowVisible,Ii=Ai.setIsArrowVisible,Ti=Ai.isResizing,Di=Ai.setIsResizing,Oi=Ai.isSideBySideLoading,Fi=Ai.activeSideBySideSection,ji=Ai.scrollLock,Pi=Ai.sideBySideCacheRef,Ni=Ai.isSideBySideRef,ki=Ai.activeSideBySideRightSectionRef,Li=Ai.activeSideBySideSectionRef,Mi=Ai.sideBySideLineRef,qi=Ai.highlightedClauseRefs,Hi=Ai.clearClauseHighlight,Vi=Ai.resetSideBySide,zi=Ai.activateSideBySide,Gi=m.useAccordionState({maintainRelativeOrder:!!Fe,proposedSections:oi,existingSections:ri,activeSideBySideSection:Fi,connectedSections:Ke,resetSideBySide:Vi,setConnectedSections:Ue,setConnectedLines:Xe,cachedConnectedPositions:an,svgContainerRef:en,isAnimatingRef:ln,animationTimerRef:sn,calculateLinesRef:cn,sectionLeftRefs:gi,sectionRightRefs:hi,subSectionLeftRefs:xi,subSectionRightRefs:_i}),Wi=Gi.expandedSections,Ki=Gi.setExpandedSections,Ui=Gi.expandedSubSections,Yi=Gi.setExpandedSubSections,Ji=Gi.handleSubSectionToggle,Xi=Gi.toggleSection,$i=Gi.forceExpandCrossWiredSections,Qi=function(){var e,n;if(null!=Fi){var i=null===(e=gi.current[Fi])||void 0===e?void 0:e.current,t=null===(n=hi.current[Fi])||void 0===n?void 0:n.current,o=Rn.current;if(i&&t&&o){var r=i.getBoundingClientRect(),l=t.getBoundingClientRect(),s=o.getBoundingClientRect(),u=r.top-s.top,a=l.top-s.top-u;o.scrollBy({top:a,behavior:"smooth"})}}},Zi=i.useCallback(function(e){null==e||e.stopPropagation(),Ze(function(e){var n=!e;return n&&requestAnimationFrame(function(){Qi()}),n})},[Qi]);i.useEffect(function(){De&&"off"!==di&&"0:0"!==di&&(Pi.current=null,an.current=[],requestAnimationFrame(function(){var e;null===(e=cn.current)||void 0===e||e.call(cn)}))},[De,di]);var et=i.useMemo(function(){var e=new Map,n=new Map,i=1;if(Fe)oi.forEach(function(n){!n.title&&!n.content||n.id&&e.set(n.id,i++)}),ri.forEach(function(t){if(t.id&&!(!t.title&&!t.content)){var o=oi.filter(function(e){var n;return null===(n=e.refIndexes)||void 0===n?void 0:n.includes(t.selfIndex)});if(o.length>0){var r=o.map(function(n){return e.get(n.id)}).filter(Boolean);n.set(t.id,r.join(", "))}else n.set(t.id,String(i++))}});else for(var t=Math.max(oi.length,ri.length),o=0;o<t;o++){var r=oi[o],l=ri[o];r?(e.set(r.id,i),l&&n.set(l.id,String(i)),i++):l&&n.set(l.id,String(i++))}return{leftNums:e,rightNums:n}},[oi,ri,Fe]),nt=ti.analysis,it=s.safeStringify(null===(J=null===(Y=null==nt?void 0:nt.rule_difference_comparison)||void 0===Y?void 0:Y.summary)||void 0===J?void 0:J.overall_summary),tt=!!it.match(/<ai_reasoning>([\s\S]*?)<\/ai_reasoning>/i),ot=null!==(X=null==pe?void 0:pe.base_root_id)&&void 0!==X?X:"-1";null==pe||pe[ot];var rt=Ge?null!==(ue=null!==(re=Ee&&(null===(oe=null==Ee?void 0:Ee[ot])||void 0===oe?void 0:oe.evaluation_result))&&void 0!==re?re:null===(se=null===(le=null==pe?void 0:pe.nodes)||void 0===le?void 0:le[ot])||void 0===se?void 0:se.evaluation_result)&&void 0!==ue?ue:null:null!==(te=null!==(Z=Ee&&(null===(Q=null===($=null==Ee?void 0:Ee[ot])||void 0===$?void 0:$.evaluation_result)||void 0===Q?void 0:Q[0]))&&void 0!==Z?Z:null===(ie=null===(ne=null===(ee=null==pe?void 0:pe.nodes)||void 0===ee?void 0:ee[ot])||void 0===ne?void 0:ne.evaluation_result)||void 0===ie?void 0:ie[0])&&void 0!==te?te:null,lt=s.extractDeviationScore(rt),st=s.generateColorPalette(null!==(de=null===(ce=null===(ae=null==rt?void 0:rt.evaluation_outputs)||void 0===ae?void 0:ae.metadata)||void 0===ce?void 0:ce.label_color)&&void 0!==de?de:a.DEFAULT_DEVIAION_COLOR),ut=i.useRef(Vi);i.useEffect(function(){ut.current=Vi},[Vi]);var at=i.useRef(Vn);i.useEffect(function(){at.current=Vn},[Vn]);var ct=i.useCallback(function(e,n,i,t,o,r){return go.current(e,n,i,t,o,r)},[]),dt=i.useCallback(function(e,n,i,t,o){return ho.current(e,n,i,t,o)},[]),ft=i.useCallback(function(){return mo.current()},[]),vt=i.useCallback(function(e,n){return So.current(e,n)},[]),pt=i.useCallback(function(e){return Ro.current(e)},[]),gt=i.useCallback(function(e){return xo.current(e)},[]),ht=i.useCallback(function(){return _o.current()},[]),mt=i.useCallback(function(){var e,n;Hi(),null===(e=ut.current)||void 0===e||e.call(ut),Ze(!1),Ue(new Set),Xe([]),an.current=[],Nt([]),Lt(null),Nn(a.EMPTY_SUMMARY_POPUP_STATE),null===(n=at.current)||void 0===n||n.call(at),requestAnimationFrame(function(){var e;null===(e=cn.current)||void 0===e||e.call(cn)})},[]),St=i.useRef(mt);i.useEffect(function(){St.current=mt},[mt]),i.useEffect(function(){Re&&St.current()},[Re]);var Rt=i.useMemo(function(){return{documents:null==pe?void 0:pe.documents,input_index_map:null==pe?void 0:pe.input_index_map}},[JSON.stringify(null==pe?void 0:pe.documents),JSON.stringify(null==pe?void 0:pe.input_index_map)]),xt=i.useRef(pe);i.useEffect(function(){xt.current=pe},[pe]);var _t=i.useRef(gn);i.useEffect(function(){_t.current=gn},[gn]);var yt=i.useCallback(function(n,i,t,o,r,l,u){var a,c,d,f=s.safeStringify(null==i?void 0:i.id)||s.safeStringify(null==t?void 0:t.id)||"",v=(f?_t.current[f]:null)||(null==i?void 0:i.cognitiveData)||(null==t?void 0:t.cognitiveData)||{section_id:f,decisioning:[],gap:[],relevance_score:0},p=null!==(c=null===(a=yi.current[o])||void 0===a?void 0:a.current)&&void 0!==c?c:null;return{isLoading:null!==(d=null==_e?void 0:_e.isLoading)&&void 0!==d&&d,open:!0,sectionTitle:(null==i?void 0:i.title)?null==i?void 0:i.title:"No Counterpart",refSectionTitle:(null==t?void 0:t.title)?null==t?void 0:t.title:"No Counterpart",cognitiveData:v,anchorEl:n,sectionAnchorEl:p,badgeStyle:l||null,sectionIdx:o,docData:Rt,deviationData:function(){var n,r,l=(null==i?void 0:i.evaluationResult)||(null==t?void 0:t.evaluationResult)||null,u=function(n){var i=function(e){if(!e||"object"!=typeof e)return null;var n=null==e?void 0:e.deviation_entries;if(n&&"object"==typeof n){var i=Object.keys(n).sort(function(e,n){return Number(e)-Number(n)})[0];if(i&&n[i])return n[i]}var t=Object.keys(e).filter(function(e){return/^\d+$/.test(e)}).sort(function(e,n){return Number(e)-Number(n)});if(t.length&&e[t[0]])return e[t[0]];var o=null==e?void 0:e.deviations;if(o&&"object"==typeof o){var r=Object.keys(o).sort(function(e,n){return Number(e)-Number(n)})[0];if(r&&o[r])return o[r]}return null}(n);return i?e.__assign(e.__assign({},n),{deviation_summary:(null==n?void 0:n.deviation_summary)||(null==i?void 0:i.deviation_summary),deviation_title:(null==n?void 0:n.deviation_title)||(null==i?void 0:i.deviation_title),deviation_impact:(null==n?void 0:n.deviation_impact)||(null==i?void 0:i.deviation_impact),deviation_explanation:(null==n?void 0:n.deviation_explanation)||(null==i?void 0:i.deviation_explanation),evaluation_outputs:(null==n?void 0:n.evaluation_outputs)||(null==i?void 0:i.evaluation_outputs),cognitive_decisioning:(null==n?void 0:n.cognitive_decisioning)||(null==i?void 0:i.cognitive_decisioning)}):n};if(!("string"==typeof o&&o.includes(s.DEVIATION_BADGE_SEPARATOR)))return u(l);var a=o.split(s.DEVIATION_BADGE_SEPARATOR)[1];if(!a)return l;var c=(null==i?void 0:i.evaluationResult)||(null==t?void 0:t.evaluationResult)||{},d=(null===(n=null==c?void 0:c.deviation_entries)||void 0===n?void 0:n[a])||(null===(r=null==c?void 0:c.deviations)||void 0===r?void 0:r[a])||null;return d?e.__assign(e.__assign(e.__assign({},c),d),{deviation_summary:(null==d?void 0:d.deviation_summary)||(null==c?void 0:c.deviation_summary),deviation_title:(null==d?void 0:d.deviation_title)||(null==c?void 0:c.deviation_title),deviation_impact:(null==d?void 0:d.deviation_impact)||(null==c?void 0:c.deviation_impact),deviation_explanation:(null==d?void 0:d.deviation_explanation)||(null==c?void 0:c.deviation_explanation),evaluation_outputs:(null==d?void 0:d.evaluation_outputs)||(null==c?void 0:c.evaluation_outputs),cognitive_decisioning:(null==d?void 0:d.cognitive_decisioning)||(null==c?void 0:c.cognitive_decisioning)}):u(l)}(),isOrphan:!!r}},[Rt]),bt=i.useCallback(function(e,n,i,t,o,r){var l;if(e.stopPropagation(),Tn.open&&Tn.sectionIdx===o)zn();else{var u=e.currentTarget,a="left";(null===(l=Rn.current)||void 0===l?void 0:l.contains(u))&&(a="right");Hi(),Ni.current&&Vi(),Ue(new Set),Xe([]),an.current=[],Vn(),Pn.open?Jt():kn(),requestAnimationFrame(function(){var e=function(){var e,n,i,t;if("string"==typeof o&&o.includes(s.DEVIATION_BADGE_SEPARATOR)){var r=o.split(s.DEVIATION_BADGE_SEPARATOR),l="".concat(r[0]).concat(s.DEVIATION_BADGE_SEPARATOR).concat(r[1]);return"right"===a?null===(e=Si.current[l])||void 0===e?void 0:e.current:null===(n=mi.current[l])||void 0===n?void 0:n.current}return"right"===a?null===(i=Si.current[o])||void 0===i?void 0:i.current:null===(t=mi.current[o])||void 0===t?void 0:t.current}()||u;Dn(yt(e,n,t,o,i,r))})}},[Tn.open,Tn.sectionIdx,zn,kn,yt]),Ct=i.useCallback(function(){var e=Tn.sectionIdx;Tn.isOrphan,zn(),kn(),null!==e&&($i(e),Hi(),Ni.current&&Vi(),Xe([]),an.current=[],Ue(function(n){return n.has(e)?new Set:new Set([e])}),setTimeout(function(){cn.current&&cn.current()},50))},[Tn.sectionIdx,Tn.isOrphan,zn,kn,Vi]),Et=i.useCallback(function(){var e=rn.current;if(e){rn.current=null;var n=oi.findIndex(function(n){return n.id===e}),i=ri.findIndex(function(n){return n.id===e}),t=-1===n?s.findKeyPathByNodeId(oi,e):null,o=-1===i?s.findKeyPathByNodeId(ri,e):null,r=-1!==n?n:t?Number(t.split("-")[0]):-1,l=-1!==i?i:o?Number(o.split("-")[0]):-1,u=function(e,n,i,t){var o,r,l,s;return-1!==e?null!==(r=null===(o=i.current[e])||void 0===o?void 0:o.current)&&void 0!==r?r:null:n&&null!==(s=null===(l=t.current[n])||void 0===l?void 0:l.current)&&void 0!==s?s:null},a=function(e,n,i){void 0===i&&(i=30);var t=0,o=function(){var r=e();r&&0!==r.getBoundingClientRect().height?(qi.current.add(r),s.scrollAndHighlightClause(r,n)):t++<i&&requestAnimationFrame(o)};requestAnimationFrame(o)};if(Fe)-1!==r&&Cn.current&&a(function(){return u(n,t,gi,xi)},Cn.current),-1!==l&&Rn.current&&a(function(){return u(i,o,hi,_i)},Rn.current);else{var c=mn.current;if(!c)return;a(function(){return-1!==r?u(n,t,gi,xi):u(i,o,hi,_i)},c)}}},[oi,ri,Fe,gi,hi,xi,_i,Cn,Rn,mn]),At=i.useCallback(function(n){if(n){Hi(),Vi(),Ue(new Set),Xe([]),an.current=[],kn(),Vn();var i=oi.findIndex(function(e){return e.id===n}),t=ri.findIndex(function(e){return e.id===n}),o=-1===i?s.findKeyPathByNodeId(oi,n):null,r=-1===t?s.findKeyPathByNodeId(ri,n):null;if(-1!==i||o||-1!==t||r){var l=-1!==i?i:o?Number(o.split("-")[0]):-1,u=-1!==t?t:r?Number(r.split("-")[0]):-1;rn.current=n,Ki(function(n){var i,t=e.__assign({},n),o=!1;-1!==l&&(t[i=Fe?"left-".concat(l):String(l)]||(t[i]=!0,o=!0));-1!==u&&(t[i=Fe?"right-".concat(u):String(u)]||(t[i]=!0,o=!0));return o?t:n}),Yi(function(n){var i=e.__assign({},n),t=!1,l=function(e){for(var n=e.split("-"),o=n[0],r=1;r<n.length;r++)o+="-".concat(n[r]),i[o]||(i[o]=!0,t=!0)};return o&&l(o),r&&l(r),t?i:n}),setTimeout(function(){requestAnimationFrame(function(){rn.current===n&&Bt.current()})},50)}else console.warn('scrollToAndHighlightClause: nodeId "'.concat(n,'" not found'))}},[oi,ri,Fe,Ki,Yi,Vi,kn,Vn]),Bt=i.useRef(Et);i.useEffect(function(){Bt.current=Et},[Et]);var wt=i.useRef(null);i.useEffect(function(){if(Kn){var e=Gn.fields.find(function(e){return e.analysisKey===Kn||e.key===Kn});if(e){var n=vi.current[e.key]||pi.current[e.key];(null==n?void 0:n.current)&&setTimeout(function(){return n.current.scrollIntoView({behavior:"smooth",block:"center"})},150)}}},[Kn,Gn.fields]);var It=i.useCallback(function(e){var n,i,t,o,r,l,s,u,a,c=null===(n=null==nt?void 0:nt.rule_difference_comparison)||void 0===n?void 0:n.fields;if(!c||!c[e])return{score:0,relation:"",highlightsA:[],highlightsB:[],hasContent:!1};var d=c[e],f=(null==d?void 0:d.relation)||(null===(t=null===(i=null==d?void 0:d.highlights)||void 0===i?void 0:i.ruleA_spans)||void 0===t?void 0:t.length)||(null===(r=null===(o=null==d?void 0:d.highlights)||void 0===o?void 0:o.ruleB_spans)||void 0===r?void 0:r.length)||(null==d?void 0:d.mappings)&&d.mappings.length>0;if(d.mappings){var v=d.mappings[0]||{};return{score:d.score,relation:v.relation||"",highlightsA:(null===(l=v.highlights)||void 0===l?void 0:l.ruleA_spans)||[],highlightsB:(null===(s=v.highlights)||void 0===s?void 0:s.ruleB_spans)||[],hasContent:!!f}}return{score:d.score,relation:d.relation||"",highlightsA:(null===(u=d.highlights)||void 0===u?void 0:u.ruleA_spans)||[],highlightsB:(null===(a=d.highlights)||void 0===a?void 0:a.ruleB_spans)||[],hasContent:!!f}},[nt]),Tt=E.useStyleHelpers({proposedSections:oi,existingSections:ri,maintainRelativeOrder:Fe,cognitiveMap:gn,deviationData:pn,treeData:pe,resolvedComparisonConfig:Gn}),Dt=Tt.getSectionCompareStyle,Ot=Tt.getSubSectionCompareStyle,Ft=Tt.getDeviationStyleByKey,jt=B.useLinesCalculator({containerRef:nn,leftContainerRef:Cn,rightContainerRef:Rn,svgContainerRef:en,pathRefs:un,leftHeaderRef:tn,rightHeaderRef:on,proposedSections:oi,existingSections:ri,visibleFields:li,leftRefs:vi,rightRefs:pi,sectionLeftRefs:gi,sectionRightRefs:hi,subSectionLeftRefs:xi,subSectionRightRefs:_i,lhsBadgeRefs:mi,rhsBadgeRefs:Si,sectionRowRefs:yi,expandedSections:Wi,expandedSubSections:Ui,connectedSections:Ke,isSideBySide:Bi,activeSideBySideSection:Fi,maintainRelativeOrder:Fe,cognitiveMap:gn,getSectionCompareStyle:Dt,getSubSectionCompareStyle:Ot,getDeviationStyleByKey:Ft,isArrowVisible:wi,isAnimatingRef:ln,isSideBySideRef:Ni,sideBySideCacheRef:Pi,sideBySideLineRef:Mi,activeSideBySideSectionRef:Li,activeSideBySideRightSectionRef:ki,connectedLines:Je,setConnectedLines:Xe,cachedConnectedPositions:an,calculateLinesRef:cn,resizeTimerRef:dn,scrollLock:ji,scrollSyncLocked:Qe,handleResizeRef:fn,activeProposed:ii,existingRule:ti,analysisData:nt,pendingScrollTargetRef:En,pendingScrollCallbackRef:An,resolvedComparisonConfig:Gn,getFieldData:It}),Pt=jt.lines,Nt=jt.setLines,kt=jt.overallConnector,Lt=jt.setOverallConnector,Mt=jt.svgDimensions,qt=jt.handleColumnScroll;i.useEffect(function(){Pn.anchorEl&&requestAnimationFrame(function(){requestAnimationFrame(function(){var e;null===(e=cn.current)||void 0===e||e.call(cn)})})},[Pn.anchorEl,Qe]);var Ht=i.useCallback(function(){Hi(),Ze(!1),Ki({}),Yi({}),Vi(),Ue(new Set),Xe([]),an.current=[],kn(),Vn(),zn(),requestAnimationFrame(function(){cn.current&&cn.current()})},[Ki,Yi,Vi,kn,Vn,zn]);i.useEffect(function(){Bi||0!==Ke.size||Ze(!1)},[Bi,Ke]);var Vt=i.useMemo(function(){return Object.values(Wi).some(Boolean)||Object.values(Ui).some(Boolean)},[Wi,Ui]),zt=i.useRef(null),Gt=i.useRef(0),Wt=i.useRef(0),Kt=i.useRef(0),Ut=A.useResizeHandler({timerRef:zt,ruleComponentRef:Sn,scrollContainerRef:mn,containerRef:nn,maintainRelativeOrder:Fe,proposedSections:oi,existingSections:ri,isSideBySideRef:Ni,activeSideBySideSectionRef:Li,activeSideBySideRightSectionRef:ki,sectionRowRefs:yi,sectionRightRowRefs:Ri,sectionLeftRefs:gi,sectionRightRefs:hi,subSectionLeftRefs:xi,subSectionRightRefs:_i,lhsBadgeRefs:mi,rhsBadgeRefs:Si,leftContainerRef:Cn,rightContainerRef:Rn,calculateLinesRef:cn,handleResizeRef:fn,setIsResizing:Di,setIsArrowVisible:Ii,sideBySideCacheRef:Pi,cachedConnectedPositions:an}).handleResize;i.useEffect(function(){fn.current=Ut},[Ut,fn]),i.useEffect(function(){var e=function(e,n,i,t,o){n.current=e.getBoundingClientRect().width;var r=new ResizeObserver(function(e){null!==i.current&&cancelAnimationFrame(i.current),i.current=requestAnimationFrame(function(){var r,l,s;i.current=null;var u=e[e.length-1];if(u){var a=null!==(s=null===(l=null===(r=u.borderBoxSize)||void 0===r?void 0:r[0])||void 0===l?void 0:l.inlineSize)&&void 0!==s?s:u.contentRect.width;Math.abs(a-n.current)<1?o():(n.current=a,t())}})});return r.observe(e),r},n={current:null},i={current:null},t={current:null},o=[],r=[n,i,t];return Sn.current&&o.push(e(Sn.current,Gt,n,function(){return fn.current()},function(){})),mn.current&&o.push(e(mn.current,Wt,i,function(){return fn.current()},function(){return cn.current()})),nn.current&&o.push(e(nn.current,Kt,t,function(){return fn.current()},function(){return cn.current()})),function(){o.forEach(function(e){return e.disconnect()}),r.forEach(function(e){null!==e.current&&(cancelAnimationFrame(e.current),e.current=null)})}},[]),i.useEffect(function(){Ni.current=Bi},[Bi]),i.useEffect(function(){Li.current=Fi},[Fi]);var Yt=i.useCallback(function(){var e,n=Tn.sectionIdx,i=Tn.isOrphan;if(kn(),null!=n){var t="left";Tn.anchorEl&&(null===(e=Rn.current)||void 0===e?void 0:e.contains(Tn.anchorEl))&&(t="right"),$i(n),zi(n,i,{sourceSide:t})}},[zi,Tn.isOrphan,Tn.sectionIdx,Tn.anchorEl,kn]),Jt=i.useCallback(function(){kn(),Vi(),Ue(new Set),Xe([]),an.current=[]},[kn,Vi]),Xt=null!==Tn.sectionIdx&&Ke.has(Tn.sectionIdx),$t=S.useDeviationNavigation({proposedSections:oi,existingSections:ri,parentDeviationRecord:si,expandedSections:Wi,maintainRelativeOrder:!!Fe,scrollContainerRef:mn,leftContainerRef:Cn,rightContainerRef:Rn,lhsBadgeRefs:mi,rhsBadgeRefs:Si}),Qt=$t.showDeviationNavigation,Zt=$t.showOpenNodeRef,eo=$t.adjustScrollForPopup,no=i.useCallback(function(e,n,i,t,o){var r,l="string"==typeof t?s.safeStringify(t).trim():s.safeStringify(null==t?void 0:t.deviation_summary).trim(),u=e.currentTarget;Vn();var a="left";(null===(r=Rn.current)||void 0===r?void 0:r.contains(u))&&(a="right");var c=function(){var e,i,t,o;if("string"==typeof n&&n.includes(s.DEVIATION_BADGE_SEPARATOR)){var r=n.split(s.DEVIATION_BADGE_SEPARATOR),l="".concat(r[0]).concat(s.DEVIATION_BADGE_SEPARATOR).concat(r[1]);return"right"===a?null===(e=Si.current[l])||void 0===e?void 0:e.current:null===(i=mi.current[l])||void 0===i?void 0:i.current}return"right"===a?null===(t=Si.current[n])||void 0===t?void 0:t.current:null===(o=mi.current[n])||void 0===o?void 0:o.current};if(i)return Vi(),Ue(new Set),Xe([]),an.current=[],void(l&&($i(n),requestAnimationFrame(function(){var e=c()||u;e&&(e.getBoundingClientRect().top>.8*window.innerHeight&&e.scrollIntoView({behavior:"smooth",block:"center"}));Nn({open:!0,anchorEl:e,summary:t,displayImpact:o})})));$i(n),l?setTimeout(function(){zi(n,i,{toggleIfSame:!1,sourceSide:a,onReady:function(){var e,n,i,r=c()||u;if(r){var l=r.getBoundingClientRect();if(l.top>.8*window.innerHeight||l.top<100){var s=l.top-window.innerHeight/2;Fe?(null===(e=Cn.current)||void 0===e||e.scrollBy({top:s,behavior:"smooth"}),null===(n=Rn.current)||void 0===n||n.scrollBy({top:s,behavior:"smooth"})):null===(i=mn.current)||void 0===i||i.scrollBy({top:s,behavior:"smooth"})}}Nn({open:!0,anchorEl:r,summary:t,displayImpact:o})}})},350):setTimeout(function(){zi(n,i,{toggleIfSame:!1,sourceSide:a})},350)},[zi,Vn,Nn,Vi,$i]),io=i.useMemo(function(){var e;if(!Ae)return null;var n=null===(e=null==Ae?void 0:Ae.id)||void 0===e?void 0:e.split(":")[0];for(var i in si){if((si[i]||[]).some(function(e){return e.id===n}))return i}return null},[Ae,si]),to=i.useRef({id:null,triggerMs:null}),oo=i.useRef(null);i.useEffect(function(){var n;if(null==Ae?void 0:Ae.id){var i=Number(Ae.trigger),t=to.current;if((null==t?void 0:t.triggerMs)!==i){if(!(Ae.id.includes(":")&&/:\d+$/.test(Ae.id)))return to.current={id:Ae.id,triggerMs:i},void At(Ae.id);var o=null===(n=null==Ae?void 0:Ae.id)||void 0===n?void 0:n.split(":"),r=o[0],l=o[1],u=null!=l?l:"0";oo.current!==Ae.id&&(kn(),Vn(),Vi(),Ue(new Set),Xe([]),an.current=[],oo.current=Ae.id);var a=!1,c=0,d=null,f=150,v=function(e,n){for(var i=function(e,t){if(!e)return null;if(e.id===n)return t;if(!Array.isArray(e.subsections))return null;for(var o=0;o<e.subsections.length;o++){var r=i(e.subsections[o],"".concat(t,"-").concat(o));if(r)return r}return null},t=0;t<e.length;t++){var o=i(e[t],String(t));if(o)return o}return null},p=function(){var n,t,o,l;if(!a){var g=function(){to.current={id:Ae.id,triggerMs:i}},h=null,m=null;for(var S in si){var R=si[S].find(function(e){return e.id===r});if(R){h=S,m=R;break}}if(m&&h){var x=oi.findIndex(function(e){return e.id===h}),_=ri.findIndex(function(e){return e.id===h}),y=-1===x&&-1!==_,b=v(oi,m.id),C=v(ri,m.id);if(b&&!C&&!y){var E=b.split("-"),A=Number(E[0]);if(Fe){var B=null===(t=null===(n=oi[A])||void 0===n?void 0:n.refIndexes)||void 0===t?void 0:t[0],w=ri.findIndex(function(e){return e.selfIndex===B});-1!==w&&(A=w)}C=e.__spreadArray([A],E.slice(1),!0).join("-")}if(b||C){var I=b?Number(b.split("-")[0]):x,T=C?Number(C.split("-")[0]):_,D=oi[I],O=ri[T],F=D&&!D.title&&!D.content,j=O&&!O.title&&!O.content,P=y||(!b&&!!C||F&&!j),N=!1;if(I>=0&&!y)(Fe?!!Wi["left-".concat(I)]:!!Wi[String(I)])||(Xi(I,"left"),N=!0);if(T>=0)(Fe?!!Wi["right-".concat(T)]:!!Wi[String(T)])||(Xi(T,"right"),N=!0);if(N)return c+=1,void(d=setTimeout(p,450));var k,L=b||"",M=C||"",q="".concat(m.id).concat(s.DEVIATION_BADGE_SEPARATOR).concat(u).concat(s.DEVIATION_BADGE_SEPARATOR).concat(L).concat(s.DEVIATION_BADGE_SEPARATOR).concat(M),H="".concat(m.id).concat(s.DEVIATION_BADGE_SEPARATOR).concat(u),V=null===(o=mi.current[H])||void 0===o?void 0:o.current,z=null===(l=Si.current[H])||void 0===l?void 0:l.current,G=P||!V&&!!z,W=G?z:V;if(k=Fe?G?Rn.current:Cn.current:mn.current,W&&k){var K=W.getBoundingClientRect();if(0===K.height)return void((c+=1)<2?d=setTimeout(p,f):g());var U=k.getBoundingClientRect(),Y=K.top-U.top+k.scrollTop-U.height/2+K.height/2,J=b&&b.includes("-")||C&&C.includes("-"),X=function(){var n,i,t,o,r;if(!a){g();var l=W instanceof Element?window.getComputedStyle(W).color:"";V&&(V.style.transition="box-shadow 300ms ease-in-out",V.style.boxShadow="0 0 10px ".concat(l)),z&&(z.style.transition="box-shadow 300ms ease-in-out",z.style.boxShadow="0 0 10px ".concat(l)),setTimeout(function(){V&&(V.style.boxShadow=""),z&&(z.style.boxShadow="")},2e3);var s=(null===(i=null===(n=m.evaluationResult)||void 0===n?void 0:n.deviations)||void 0===i?void 0:i[u])||m,c=(null===(t=m.evaluationResult)||void 0===t?void 0:t.evaluation_outputs)||m.evaluation_outputs;if(!(!!V&&!!z)){var d=G?(null===(o=Si.current[J?H:T])||void 0===o?void 0:o.current)||z:(null===(r=mi.current[J?H:I])||void 0===r?void 0:r.current)||V;return eo(d,function(){Nn({open:!0,anchorEl:d,displayImpact:Ae.displayImpact,summary:e.__assign(e.__assign({},s),{evaluation_outputs:c})})},{skipScroll:!0}),void(null==Be||Be())}zi(q,!1,{toggleIfSame:!1,sourceSide:y?"right":"left",onReady:function(){var n,i;g();var t=G?(null===(n=Si.current[H])||void 0===n?void 0:n.current)||z:(null===(i=mi.current[H])||void 0===i?void 0:i.current)||V;Nn({open:!0,anchorEl:t,displayImpact:Ae.displayImpact,summary:e.__assign({},s)}),null==Be||Be()}})}};Math.abs(k.scrollTop-Y)<=2?X():(En.current=Y,An.current=X,k.scrollTo({top:Y,behavior:"smooth"}),d&&clearTimeout(d),d=setTimeout(function(){if(An.current){En.current=null;var e=An.current;An.current=null,e()}},800))}else(c+=1)<2?d=setTimeout(p,f):g()}else(c+=1)<2?d=setTimeout(p,f):g()}else(c+=1)<2?d=setTimeout(p,f):g()}};return d=setTimeout(p,f),function(){a=!0,d&&clearTimeout(d)}}}},[Ae,si,oi,ri,Fe,Wi,Xi,zi,Nn,At]),i.useEffect(function(){var n,i,t;if(Pn.open){var o=Pn.anchorEl;if(o&&!o.isConnected){var r=function(e){for(var n,i=0,t=Object.entries(e);i<t.length;i++){var r=t[i],l=r[0];if((null===(n=r[1].current)||void 0===n?void 0:n.textContent)===o.textContent)return l}return null},l=(null===(n=o.dataset)||void 0===n?void 0:n.deviationRefId)||r(mi.current)||r(Si.current);if(l){var s=(null===(i=Si.current[l])||void 0===i?void 0:i.current)||(null===(t=mi.current[l])||void 0===t?void 0:t.current);s&&s.isConnected&&Nn(function(n){return e.__assign(e.__assign({},n),{anchorEl:s})})}}}},[Pn.open,Pn.anchorEl,Qe,Ke,Wi]);var ro=wn.open,lo=wn.sectionIdx,so=wn.isOrphan,uo=wn.badgeStyle,ao=wn.anchorEl,co=wn.sectionAnchorEl;i.useEffect(function(){var n;if(ro&&null!=lo&&lo!==ot){var i="string"==typeof lo?lo.split(s.DEVIATION_BADGE_SEPARATOR)[0]:null,t=function(e,n){var i;if(!e||!Array.isArray(e))return null;for(var o=0,r=e;o<r.length;o++){var l=r[o];if(l.id===n)return l;if(null===(i=l.subsections)||void 0===i?void 0:i.length){var s=t(l.subsections,n);if(s)return s}}return null},o=i&&"string"==typeof i?t(oi,i):null,r=i&&"string"==typeof i?t(ri,i):null,l="number"==typeof lo?oi[lo]||null:o||i&&((null===(n=null==pe?void 0:pe.nodes)||void 0===n?void 0:n[i])||(null==pe?void 0:pe[i]))||null,u="number"==typeof lo?ri[lo]||null:r,a=yt(ao,l,u,lo,so,uo);In(function(n){return n.open?s.safeStringify(n.cognitiveData)===s.safeStringify(a.cognitiveData)&&s.safeStringify(n.deviationData)===s.safeStringify(a.deviationData)&&n.sectionTitle===a.sectionTitle&&n.refSectionTitle===a.refSectionTitle?n:e.__assign(e.__assign(e.__assign({},n),a),{open:!0,anchorEl:n.anchorEl,sectionAnchorEl:n.sectionAnchorEl}):n})}},[ro,lo,so,uo,ao,co,oi,ri,yt]);var fo=i.useCallback(function(e){var i=e.section,t=e.keyPath,o=e.depth,r=void 0===o?0:o,l=e.columnKey,s=void 0===l?"left":l,u=e.parentNodeId,a=void 0===u?"":u,c=e.sectionOffset;return n.jsx(x.default,{section:i,keyPath:t,depth:r,columnKey:s,parentNodeId:a,sectionOffset:c})},[]),vo=i.useMemo(function(){return oi.map(function(e,i){var t,o=!(null==e?void 0:e.title)&&!(null==e?void 0:e.content),r=!(null==e?void 0:e.refIndexes)||0===e.refIndexes.length;return o&&r&&Fe?null:n.jsx(_.default,{section:e,idx:i},null!==(t=null==e?void 0:e.id)&&void 0!==t?t:"left-row-".concat(i))})},[oi]),po=i.useMemo(function(){return ri.map(function(e,i){var t,o=!(null==e?void 0:e.title)&&!(null==e?void 0:e.content),r=!(null==e?void 0:e.refIndexes)||0===e.refIndexes.length;return o&&r&&Fe?null:n.jsx(y.default,{section:e,idx:i},null!==(t=null==e?void 0:e.id)&&void 0!==t?t:"right-row-".concat(i))})},[ri]),go=i.useRef(bt);i.useEffect(function(){go.current=bt},[bt]);var ho=i.useRef(no);i.useEffect(function(){ho.current=no},[no]);var mo=i.useRef(Jt);i.useEffect(function(){mo.current=Jt},[Jt]);var So=i.useRef(Xi);i.useEffect(function(){So.current=Xi},[Xi]);var Ro=i.useRef(Ji);i.useEffect(function(){Ro.current=Ji},[Ji]);var xo=i.useRef(fo);i.useEffect(function(){xo.current=fo},[fo]);var _o=i.useRef(Vi);i.useEffect(function(){_o.current=Vi},[Vi]);var yo=i.useMemo(function(){return{maintainRelativeOrder:!!Fe,showDeviationBadges:ke,isProposingFix:Ie,proposingFixNodeId:Te,isRedlineFlow:De,isSideBySide:Bi,activeSideBySideSection:Fi,scrollSyncLocked:Qe,toggleScrollSyncLocked:Zi,summaryPopupAnchorEl:Pn.anchorEl,connectedSections:Ke,proposedSections:oi,existingSections:ri,deviationNumberRegistry:ui,treeData:pe,displayConfig:_e,resolvedMarkdownStyles:hn,unifiedNumbering:et,expandedSections:Wi,expandedSubSections:Ui,setExpandedSubSections:Yi,getSectionCompareStyle:Dt,getSubSectionCompareStyle:Ot,getBadgeRef:Ei,getSectionRowRef:bi,getSubSectionRef:Ci,sectionLeftRefs:gi,sectionRightRefs:hi,sectionRowRefs:yi,sectionRightRowRefs:Ri,subSectionLeftRefs:xi,subSectionRightRefs:_i,lhsBadgeRefs:mi,rhsBadgeRefs:Si,openMoreFunctionsPopup:ct,handleOpenSummaryPopup:dt,openSummaryPopup:dt,handleCloseSummaryPopup:ft,toggleSection:vt,handleSubSectionToggle:pt,renderSubSectionAccordion:gt,resetSideBySide:ht,setConnectedSections:Ue,setConnectedLines:Xe,cachedConnectedPositions:an,showDeviationNavigation:Qt,showOpenNodeRef:Zt,deviationNodeIdToView:null==Ae?void 0:Ae.id,deviationTargetParentId:io}},[Fe,ke,Ie,Te,De,Bi,Fi,Qe,Zi,Pn.anchorEl,Ke,oi,ri,ui,_e,hn,et,Wi,Ui,Yi,Dt,Ot,Ei,bi,Ci,Qt,Zt,Ae,io]);return n.jsx(C.CompareContextProvider,e.__assign({value:yo},{children:n.jsxs(t.Box,e.__assign({ref:Sn,sx:{display:"flex",flexDirection:"column",height:"100%",bgcolor:"#F6F7F9B2",fontFamily:'"Plus Jakarta Sans", sans-serif',overflow:"visible",position:"relative"}},{children:[Me&&n.jsx(t.Box,e.__assign({sx:{position:"absolute",inset:0,bgcolor:"rgba(255, 255, 255, 0.6)",backdropFilter:"blur(10px)",zIndex:9999,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"8px"}},{children:n.jsx(f.default,{})})),Pn.open&&n.jsx(b.default,{open:Pn.open,anchorEl:Pn.anchorEl,containerEl:wt.current,clipTopEl:tn.current,scrollContainerEl:mn.current,onClose:Jt,summary:Pn.summary,displayImpact:Pn.displayImpact,isScrollLocked:Qe}),n.jsx(d.default,{open:Tn.open,anchorEl:Tn.anchorEl,maintainRelativeOrder:!!Fe,sectionTitle:Tn.sectionTitle,referenceSectionTitle:Tn.refSectionTitle,onClose:zn,onOpenCognitiveCompare:qn,onOpenSideBySide:Yt,onConnect:Ct,isConnected:Xt,isOrphan:Tn.isOrphan}),wn.open&&n.jsx(c.default,{open:wn.open,popupRef:Mn,position:On,popupConfig:be,onClose:function(){Fn(null),In(function(n){return e.__assign(e.__assign({},n),{open:!1})}),Ln(null)},markdownStyles:Se,sectionTitle:$n,referenceSectionTitle:Zn,cognitiveData:wn.cognitiveData,anchorEl:wn.anchorEl,sectionAnchorEl:wn.sectionAnchorEl,scrollContainerEl:mn.current,badgeStyle:wn.badgeStyle,docData:wn.docData,deviationData:wn.deviationData,isLoading:wn.isLoading}),n.jsx(t.Snackbar,e.__assign({open:!!Ve,autoHideDuration:8e3,onClose:function(){return ze(null)},anchorOrigin:{vertical:"top",horizontal:"center"}},{children:n.jsx(t.Alert,e.__assign({onClose:function(){return ze(null)},severity:"error",sx:{width:"100%",whiteSpace:"pre-line"}},{children:Ve}))})),n.jsx(R.default,{componentHeaderText:ve,displayConfig:_e,maintainRelativeOrder:Fe,onCollapseAll:Ht,showCollapseAll:Vt,onToggleView:function(e){qe(!0),setTimeout(function(){je(!e),null==ye||ye(!e),Ze(!1),Vi(),kn(),Ue(new Set),Xe([]),an.current=[],requestAnimationFrame(function(){requestAnimationFrame(function(){setTimeout(function(){qe(!1)},600)})})},50)}}),n.jsx(t.Box,e.__assign({ref:mn,onScroll:qt,sx:{flex:1,minHeight:0,pt:1.5,pb:1,px:3,display:"flex",justifyContent:"center",alignItems:"flex-start",bgcolor:"#FFFFFF",overflowY:Fe?"visible":"auto",borderTop:it&&tt?"none":"1.5px solid #EEF0F4"}},{children:n.jsx(t.Box,e.__assign({sx:e.__assign({display:"flex",flexDirection:"column",width:"100%",maxWidth:"1200px"},Fe?{flex:1}:{})},{children:n.jsxs(t.Box,e.__assign({ref:nn,sx:e.__assign({display:"grid",gridTemplateColumns:"minmax(0, 1fr) 180px minmax(0, 1fr)",gap:"60px",maxWidth:"1200px",width:"100%",position:"relative",minHeight:0},Fe?{flex:1,overflow:"visible"}:{})},{children:[n.jsx(I.default,{svgContainerRef:en,svgDimensions:Mt,isResizing:Ti,overallConnector:kt,rootDeviationStyle:st,lines:Pt,isSideBySide:Bi,activeSideBySideSection:Fi,isArrowVisible:wi,maintainRelativeOrder:Fe,proposedSections:oi,existingSections:ri,cognitivePopup:wn,activeBadgeId:jn,closeCognitivePopup:Vn,setActiveBadgeId:Ln,openCognitivePopupFromState:Hn,buildSectionPopupState:yt,connectedLines:Je,pathRefs:un}),n.jsxs(t.Box,e.__assign({sx:e.__assign({border:"1px solid #E7E7E9",borderRadius:"8px",bgcolor:"#FFFFFF",display:"flex",flexDirection:"column",position:"relative",zIndex:2,filter:"drop-shadow(0px 2px 4px #F2F2F2)"},Fe?{flex:1,overflow:"visible"}:{})},{children:[n.jsx(t.Box,e.__assign({ref:tn,sx:{p:"8px",bgcolor:"#F7F8FA",borderBottom:"1px solid #E7E7E9",borderRadius:"8px 8px 0 0",display:"flex",alignItems:"center",minHeight:"40px",overflow:"hidden",minWidth:0}},{children:n.jsx(t.Tooltip,e.__assign({title:Jn,placement:"top"},{children:n.jsx(t.Typography,e.__assign({sx:{fontSize:"16px",fontWeight:500,color:"#19213D",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",width:"100%",minWidth:0,textAlign:"center",display:"block"}},{children:Jn}))}))})),n.jsxs(t.Box,e.__assign({ref:Cn,onScroll:qt,sx:e.__assign({p:"12px",display:"flex",flexDirection:"column"},Fe?{maxHeight:"calc(100vh - 250px)",flex:1,overflowY:"auto",overflowX:"hidden",minHeight:0,mr:"-180px",pr:"192px","&::-webkit-scrollbar":{display:"none"},scrollbarWidth:"none"}:{})},{children:[n.jsx("div",{ref:yn,style:{width:"100%",height:"0px",flexShrink:0}}),ci&&vo,n.jsx("div",{ref:bn,style:{width:"100%",height:"0px",flexShrink:0}})]}))]})),n.jsx(t.Box,e.__assign({ref:wt,sx:{width:"180px",display:"flex",flexDirection:"column",alignItems:"center",pt:"15px",gap:0,zIndex:20,pointerEvents:"none"}},{children:n.jsx(t.Box,e.__assign({sx:{display:"flex",justifyContent:"center",alignItems:"center",mt:0}},{children:n.jsxs(t.Box,e.__assign({onClick:function(n){n.stopPropagation(),wn.open&&jn===ot?Vn():(Ln(ot),Hn(yt(n.currentTarget,{title:"",content:"",evaluationResult:rt,cognitiveData:{section_id:"",decisioning:[],gap:[],relevance_score:0,isMissingRationale:!0}},null,ot,!0,e.__assign(e.__assign({},st),{label:""}))))},sx:{display:"inline-flex",alignItems:"center",gap:"5px",px:1.5,py:"5px",top:"-8px",borderRadius:"20px",bgcolor:st.badgeBg,color:st.badgeText,border:"1px solid ".concat(st.badgeBorder),fontSize:"12px",fontWeight:600,whiteSpace:"nowrap",position:"relative",zIndex:1,pointerEvents:"auto",cursor:"pointer"}},{children:[null!=lt?lt:n.jsx(v.default,{}),n.jsx(t.Box,e.__assign({component:"span",sx:{width:14,height:14,display:"flex",alignItems:"center","& svg":{width:"14px",height:"14px"}}},{children:n.jsx(r.ButtonCognitiveIcon,{})})),n.jsx(o.ChevronDown,{size:11,style:{transform:wn.open&&jn===ot?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.25s ease"}})]}))}))})),n.jsxs(t.Box,e.__assign({sx:e.__assign({border:"1px solid #E3E6EA",borderRadius:"8px",bgcolor:"#FFFFFF",boxShadow:"0px 1px 4px #F7F4FE",position:"relative",zIndex:2,display:"flex",flexDirection:"column",minWidth:0},Fe?{flex:1,overflow:"visible",minHeight:0}:{})},{children:[Oi&&n.jsx(l.default,{sections:11}),n.jsx(t.Box,e.__assign({ref:on,sx:{p:"8px",bgcolor:"#F7F8FA",borderBottom:"1px solid #E3E6EA",borderRadius:"8px 8px 0 0",minHeight:"40px",display:"flex",alignItems:"center",overflowX:"hidden"}},{children:n.jsx(t.Tooltip,e.__assign({title:ei,placement:"top"},{children:n.jsx(t.Typography,e.__assign({sx:{fontSize:"16px",fontWeight:500,color:"#5928ED",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",width:"100%",minWidth:0,textAlign:"center",display:"block"}},{children:ei}))}))})),n.jsxs(t.Box,e.__assign({ref:Rn,onScroll:qt,sx:e.__assign({p:"12px",display:"flex",flexDirection:"column"},Fe?{maxHeight:"calc(100vh - 250px)",flex:1,overflowY:"auto",overflowX:"hidden",minHeight:0,ml:"-150px",pl:"165px","&::-webkit-scrollbar":{display:"none"},scrollbarWidth:"none"}:{})},{children:[n.jsx("div",{ref:xn,style:{width:"100%",height:"0px",flexShrink:0}}),ci&&po,n.jsx("div",{ref:_n,style:{width:"100%",height:"0px",flexShrink:0}})]}))]}))]}))}))}))]}))}))};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),i=require("react"),t=require("@mui/material"),o=require("lucide-react"),r=require("../../assests/svg/ButtonCognitiveIcon.js"),l=require("./OverlayComponent.js"),u=require("./CognitiveComparehelpers.js"),s=require("./CognitiveCompareConfig.js"),a=require("./CognitiveCompareConstants.js"),c=require("./CognitivePopup.js"),d=require("./MoreFunctionsPopup.js"),f=require("./LoaderComponent.js"),v=require("./components/ThreeDotsLoader.js"),p=require("./hooks/useCompareData.js"),g=require("./hooks/useComparePopups.js"),h=require("./hooks/useSectionRefs.js"),m=require("./hooks/useAccordionState.js"),S=require("./hooks/useDeviationNavigation.js"),R=require("./components/CompareHeader.js"),x=require("./components/SubSectionAccordion.js"),_=require("./components/LHSSectionRow.js"),y=require("./components/RHSSectionRow.js"),b=require("./components/CognitiveSummaryPopup.js"),C=require("./CompareContext.js"),E=require("./hooks/useStyles.js"),A=require("./hooks/useResizeHandler.js"),B=require("./hooks/useLinesCalculator.js"),T=require("./hooks/useSideBySide.js"),w=require("./components/SvgConnectors.js");exports.SHARED_MARKDOWN_STYLES=s.SHARED_MARKDOWN_STYLES,exports.default=function(I){var D,O,F,j,N,P,k,L,M,q,H,V,z,G,W,K,U,Y,J,X,$,Q,Z,ee,ne,ie,te,oe,re,le,ue,se,ae,ce,de,fe=I.componentHeaderText,ve=void 0===fe?a.DEFAULT_COMPONENT_HEADER_TEXT:fe,pe=I.treeData,ge=I.comparisonConfig,he=I.leftColumnTitleText,me=I.rightColumnTitleText,Se=I.markdownStyles,Re=I.resetTrigger,xe=I.displayConfig,_e=void 0===xe?{isHeaderVisible:!0,isToggleVisible:!0,maintainRelativeOrder:!1,isLoading:!0,showDeviationBadges:!1,enableDeviationSchemaBackwardCompatibility:!1,displayEmailNotifier:!0}:xe,ye=I.onMaintainRelativeOrderChange,be=I.popupConfig,Ce=I.deviationData,Ee=void 0===Ce?{}:Ce,Ae=I.deviationNodeIdToView,Be=I.resetDeviationNodeId,Te=I.isProposingFix,we=void 0!==Te&&Te,Ie=I.proposingFixNodeId,De=I.isRedlineFlow,Oe=i.useState(_e.maintainRelativeOrder),Fe=Oe[0],je=Oe[1],Ne=null!==(D=null==_e?void 0:_e.expandLevels)&&void 0!==D?D:0,Pe=!!(null==_e?void 0:_e.expandAllSections),ke=!!Fe||!!(null==_e?void 0:_e.showDeviationBadges),Le=i.useState(!1),Me=Le[0],qe=Le[1],He=i.useState(null),Ve=He[0],ze=He[1],Ge=i.useState(null===(F=null!==(O=null==pe?void 0:pe.newEvaluationResult)&&void 0!==O?O:null==_e?void 0:_e.enableDeviationSchemaBackwardCompatibility)||void 0===F||F)[0],We=i.useState(new Set),Ke=We[0],Ue=We[1],Ye=i.useState([]),Je=Ye[0],Xe=Ye[1],$e=i.useState(!1),Qe=$e[0],Ze=$e[1],en=i.useRef(null),nn=i.useRef(null),tn=i.useRef(null),on=i.useRef(null),rn=i.useRef(null),ln=i.useRef(!1),un=i.useRef(null),sn=i.useRef({}),an=i.useRef([]),cn=i.useRef(function(){}),dn=i.useRef(null),fn=i.useRef(function(){}),vn=i.useMemo(function(){return JSON.stringify(Ee||{})},[JSON.stringify(Ee)]),pn=i.useMemo(function(){return Ee||{}},[vn]),gn=i.useMemo(function(){return(null==pe?void 0:pe.cognitive_decisioning)||{}},[pe]),hn=i.useMemo(function(){return e.__assign(e.__assign({},s.SHARED_MARKDOWN_STYLES),Se)},[Se]),mn=i.useRef(null),Sn=i.useRef(null),Rn=i.useRef(null),xn=i.useRef(null),_n=i.useRef(null),yn=i.useRef(null),bn=i.useRef(null),Cn=i.useRef(null),En=i.useRef(null),An=i.useRef(null),Bn=g.useComparePopups(mn),Tn=Bn.cognitivePopup,wn=Bn.setCognitivePopup,In=Bn.moreFunctions,Dn=Bn.setMoreFunctions,On=Bn.position,Fn=Bn.setPosition,jn=Bn.activeBadgeId,Nn=Bn.summaryPopup,Pn=Bn.setSummaryPopup,kn=Bn.closeSummaryPopup,Ln=Bn.setActiveBadgeId,Mn=Bn.popupRef,qn=Bn.handleOpenCognitiveCompare,Hn=Bn.openCognitivePopupFromState,Vn=Bn.closeCognitivePopup,zn=Bn.closeMoreFunctionsPopup,Gn=i.useMemo(function(){var e,n,i,t,o,r,l;return{fields:null!==(e=null==ge?void 0:ge.fields)&&void 0!==e?e:s.DEFAULT_FIELD_CONFIG,thresholds:{high:null!==(i=null===(n=null==ge?void 0:ge.thresholds)||void 0===n?void 0:n.high)&&void 0!==i?i:s.DEFAULT_COMPARISON_CONFIG.thresholds.high,medium:null!==(o=null===(t=null==ge?void 0:ge.thresholds)||void 0===t?void 0:t.medium)&&void 0!==o?o:s.DEFAULT_COMPARISON_CONFIG.thresholds.medium,exact:null!==(l=null===(r=null==ge?void 0:ge.thresholds)||void 0===r?void 0:r.exact)&&void 0!==l?l:s.DEFAULT_COMPARISON_CONFIG.thresholds.exact}}},[ge]),Wn=i.useState(null),Kn=Wn[0];Wn[1];var Un=null===(P=null===(j=null==pe?void 0:pe.documents)||void 0===j?void 0:j[null===(N=null==pe?void 0:pe.input_index_map)||void 0===N?void 0:N[0]])||void 0===P?void 0:P.title,Yn=null===(M=null===(k=null==pe?void 0:pe.documents)||void 0===k?void 0:k[null===(L=null==pe?void 0:pe.input_index_map)||void 0===L?void 0:L[1]])||void 0===M?void 0:M.title,Jn=u.safeStringify(he||Un||"Uploaded Contract"),Xn=null===(z=null===(V=null===(q=null==pe?void 0:pe.documents)||void 0===q?void 0:q[null===(H=null==pe?void 0:pe.input_index_map)||void 0===H?void 0:H[0]])||void 0===V?void 0:V.metadata)||void 0===z?void 0:z.file_name,$n=u.safeStringify(Xn),Qn=null===(U=null===(K=null===(G=null==pe?void 0:pe.documents)||void 0===G?void 0:G[null===(W=null==pe?void 0:pe.input_index_map)||void 0===W?void 0:W[1]])||void 0===K?void 0:K.metadata)||void 0===U?void 0:U.file_name,Zn=u.safeStringify(Qn),ei=u.safeStringify(me||Yn||"Reference Template"),ni=p.useCognitiveTreeData(pe,Fe,pn,Gn,Ge),ii=ni.activeProposed,ti=ni.existingRule,oi=ni.proposedSections,ri=ni.existingSections,li=ni.visibleFields,ui=ni.parentDeviationRecord,si=ni.deviationNumberRegistry,ai=ni.parseError;i.useEffect(function(){ai&&ze("Failed to load comparison: ".concat(ai))},[ai]);var ci=oi.length>0||ri.length>0,di=i.useMemo(function(){if(!De)return"off";var e=0,n=0,i=function(t){Array.isArray(t)&&t.forEach(function(t){var o,r=(null==t?void 0:t.content)||"";u.hasMeaningfulRedlineTags(r)&&(e+=1,n+=String(r).length),(null===(o=null==t?void 0:t.subsections)||void 0===o?void 0:o.length)&&i(t.subsections)})};return i(oi),i(ri),"".concat(e,":").concat(n)},[De,oi,ri]);i.useEffect(function(){if(oi.length||ri.length)if(Pe){var e={},n={},i=function(i,t){i.forEach(function(i,o){var r,l=Fe?"".concat(t,"-").concat(o):String(o);e[l]=!0;var u=function(e,i){null==e||e.forEach(function(e,t){var o,r="".concat(i,"-").concat(t);n[r]=!0,(null===(o=e.subsections)||void 0===o?void 0:o.length)&&u(e.subsections,r)})};(null===(r=i.subsections)||void 0===r?void 0:r.length)&&u(i.subsections,String(o))})};i(oi,"left"),i(ri,"right"),Ki(e),Yi(n)}else if(Ne>0){var t={},o={},r=function(e,n,i){e.forEach(function(e,r){var l;if(i>=1){var u=Fe?"".concat(n,"-").concat(r):String(r);t[u]=!0}var s=function(e,n,t){t>i||null==e||e.forEach(function(e,i){var r,l="".concat(n,"-").concat(i);o[l]=!0,(null===(r=e.subsections)||void 0===r?void 0:r.length)&&s(e.subsections,l,t+1)})};(null===(l=e.subsections)||void 0===l?void 0:l.length)&&i>=2&&s(e.subsections,String(r),2)})};r(oi,"left",Ne),r(ri,"right",Ne),Ki(t),Yi(o)}},[Pe,Ne,oi,ri,Fe]);var fi=h.useSectionRefs(li.map(function(e){return e.key}),Math.max(oi.length,ri.length)),vi=fi.leftRefs,pi=fi.rightRefs,gi=fi.sectionLeftRefs,hi=fi.sectionRightRefs,mi=fi.lhsBadgeRefs,Si=fi.rhsBadgeRefs,Ri=fi.sectionRightRowRefs,xi=fi.subSectionLeftRefs,_i=fi.subSectionRightRefs,yi=fi.sectionRowRefs,bi=fi.getSectionRowRef,Ci=fi.getSubSectionRef,Ei=fi.getBadgeRef,Ai=T.useSideBySide({maintainRelativeOrder:Fe,proposedSections:oi,existingSections:ri,leftContainerRef:Cn,rightContainerRef:Rn,scrollContainerRef:mn,sectionLeftRefs:gi,sectionRightRefs:hi,subSectionLeftRefs:xi,subSectionRightRefs:_i,lhsBadgeRefs:mi,rhsBadgeRefs:Si,sectionRowRefs:yi,sectionRightRowRefs:Ri,rhsTopSpacerRef:xn,rhsBottomSpacerRef:_n,lhsTopSpacerRef:yn,lhsBottomSpacerRef:bn,calculateLinesRef:cn,setConnectedSections:Ue,setConnectedLines:Xe,cachedConnectedPositions:an,closeMoreFunctionsPopup:zn,setErrorToast:ze,moreFunctions:In,closeSummaryPopup:kn}),Bi=Ai.isSideBySide,Ti=Ai.isArrowVisible,wi=Ai.setIsArrowVisible,Ii=Ai.isResizing,Di=Ai.setIsResizing,Oi=Ai.isSideBySideLoading,Fi=Ai.activeSideBySideSection,ji=Ai.scrollLock,Ni=Ai.sideBySideCacheRef,Pi=Ai.isSideBySideRef,ki=Ai.activeSideBySideRightSectionRef,Li=Ai.activeSideBySideSectionRef,Mi=Ai.sideBySideLineRef,qi=Ai.highlightedClauseRefs,Hi=Ai.clearClauseHighlight,Vi=Ai.resetSideBySide,zi=Ai.activateSideBySide,Gi=m.useAccordionState({maintainRelativeOrder:!!Fe,proposedSections:oi,existingSections:ri,activeSideBySideSection:Fi,connectedSections:Ke,resetSideBySide:Vi,setConnectedSections:Ue,setConnectedLines:Xe,cachedConnectedPositions:an,svgContainerRef:en,isAnimatingRef:ln,animationTimerRef:un,calculateLinesRef:cn,sectionLeftRefs:gi,sectionRightRefs:hi,subSectionLeftRefs:xi,subSectionRightRefs:_i}),Wi=Gi.expandedSections,Ki=Gi.setExpandedSections,Ui=Gi.expandedSubSections,Yi=Gi.setExpandedSubSections,Ji=Gi.handleSubSectionToggle,Xi=Gi.toggleSection,$i=Gi.forceExpandCrossWiredSections,Qi=function(){var e,n;if(null!=Fi){var i=null===(e=gi.current[Fi])||void 0===e?void 0:e.current,t=null===(n=hi.current[Fi])||void 0===n?void 0:n.current,o=Rn.current;if(i&&t&&o){var r=i.getBoundingClientRect(),l=t.getBoundingClientRect(),u=o.getBoundingClientRect(),s=r.top-u.top,a=l.top-u.top-s;o.scrollBy({top:a,behavior:"smooth"})}}},Zi=i.useCallback(function(e){null==e||e.stopPropagation(),Ze(function(e){var n=!e;return n&&requestAnimationFrame(function(){Qi()}),n})},[Qi]);i.useEffect(function(){De&&"off"!==di&&"0:0"!==di&&(Ni.current=null,an.current=[],requestAnimationFrame(function(){var e;null===(e=cn.current)||void 0===e||e.call(cn)}))},[De,di]);var et=i.useMemo(function(){var e=new Map,n=new Map,i=1;if(Fe)oi.forEach(function(n){!n.title&&!n.content||n.id&&e.set(n.id,i++)}),ri.forEach(function(t){if(t.id&&!(!t.title&&!t.content)){var o=oi.filter(function(e){var n;return null===(n=e.refIndexes)||void 0===n?void 0:n.includes(t.selfIndex)});if(o.length>0){var r=o.map(function(n){return e.get(n.id)}).filter(Boolean);n.set(t.id,r.join(", "))}else n.set(t.id,String(i++))}});else for(var t=Math.max(oi.length,ri.length),o=0;o<t;o++){var r=oi[o],l=ri[o];r?(e.set(r.id,i),l&&n.set(l.id,String(i)),i++):l&&n.set(l.id,String(i++))}return{leftNums:e,rightNums:n}},[oi,ri,Fe]),nt=ti.analysis,it=u.safeStringify(null===(J=null===(Y=null==nt?void 0:nt.rule_difference_comparison)||void 0===Y?void 0:Y.summary)||void 0===J?void 0:J.overall_summary),tt=!!it.match(/<ai_reasoning>([\s\S]*?)<\/ai_reasoning>/i),ot=null!==(X=null==pe?void 0:pe.base_root_id)&&void 0!==X?X:"-1";null==pe||pe[ot];var rt=Ge?null!==(se=null!==(re=Ee&&(null===(oe=null==Ee?void 0:Ee[ot])||void 0===oe?void 0:oe.evaluation_result))&&void 0!==re?re:null===(ue=null===(le=null==pe?void 0:pe.nodes)||void 0===le?void 0:le[ot])||void 0===ue?void 0:ue.evaluation_result)&&void 0!==se?se:null:null!==(te=null!==(Z=Ee&&(null===(Q=null===($=null==Ee?void 0:Ee[ot])||void 0===$?void 0:$.evaluation_result)||void 0===Q?void 0:Q[0]))&&void 0!==Z?Z:null===(ie=null===(ne=null===(ee=null==pe?void 0:pe.nodes)||void 0===ee?void 0:ee[ot])||void 0===ne?void 0:ne.evaluation_result)||void 0===ie?void 0:ie[0])&&void 0!==te?te:null,lt=u.extractDeviationScore(rt),ut=u.generateColorPalette(null!==(de=null===(ce=null===(ae=null==rt?void 0:rt.evaluation_outputs)||void 0===ae?void 0:ae.metadata)||void 0===ce?void 0:ce.label_color)&&void 0!==de?de:a.DEFAULT_DEVIAION_COLOR),st=i.useRef(Vi);i.useEffect(function(){st.current=Vi},[Vi]);var at=i.useRef(Vn);i.useEffect(function(){at.current=Vn},[Vn]);var ct=i.useCallback(function(e,n,i,t,o,r){return ho.current(e,n,i,t,o,r)},[]),dt=i.useCallback(function(e,n,i,t,o){return mo.current(e,n,i,t,o)},[]),ft=i.useCallback(function(){return So.current()},[]),vt=i.useCallback(function(e,n){return Ro.current(e,n)},[]),pt=i.useCallback(function(e){return xo.current(e)},[]),gt=i.useCallback(function(e){return _o.current(e)},[]),ht=i.useCallback(function(){return yo.current()},[]),mt=i.useCallback(function(){var e,n;Hi(),null===(e=st.current)||void 0===e||e.call(st),Ze(!1),Ue(new Set),Xe([]),an.current=[],Pt([]),Lt(null),Pn(a.EMPTY_SUMMARY_POPUP_STATE),null===(n=at.current)||void 0===n||n.call(at),requestAnimationFrame(function(){var e;null===(e=cn.current)||void 0===e||e.call(cn)})},[]),St=i.useRef(mt);i.useEffect(function(){St.current=mt},[mt]),i.useEffect(function(){Re&&St.current()},[Re]);var Rt=i.useMemo(function(){return{documents:null==pe?void 0:pe.documents,input_index_map:null==pe?void 0:pe.input_index_map}},[JSON.stringify(null==pe?void 0:pe.documents),JSON.stringify(null==pe?void 0:pe.input_index_map)]),xt=i.useRef(pe);i.useEffect(function(){xt.current=pe},[pe]);var _t=i.useRef(gn);i.useEffect(function(){_t.current=gn},[gn]);var yt=i.useCallback(function(n,i,t,o,r,l,s){var a,c,d,f,v=u.safeStringify(null==i?void 0:i.id)||u.safeStringify(null==t?void 0:t.id)||"",p=(v?null===(a=_t.current)||void 0===a?void 0:a[v]:null)||(null==i?void 0:i.cognitiveData)||(null==t?void 0:t.cognitiveData)||{section_id:v,decisioning:[],gap:[],relevance_score:0},g=null!==(d=null===(c=yi.current[o])||void 0===c?void 0:c.current)&&void 0!==d?d:null;return{isLoading:null!==(f=null==_e?void 0:_e.isLoading)&&void 0!==f&&f,open:!0,sectionTitle:(null==i?void 0:i.title)?null==i?void 0:i.title:"No Counterpart",refSectionTitle:(null==t?void 0:t.title)?null==t?void 0:t.title:"No Counterpart",cognitiveData:p,anchorEl:n,sectionAnchorEl:g,badgeStyle:l||null,sectionIdx:o,docData:Rt,deviationData:function(){var n,r,l=(null==i?void 0:i.evaluationResult)||(null==t?void 0:t.evaluationResult)||null,s=function(n){var i=function(e){if(!e||"object"!=typeof e)return null;var n=null==e?void 0:e.deviation_entries;if(n&&"object"==typeof n){var i=Object.keys(n).sort(function(e,n){return Number(e)-Number(n)})[0];if(i&&n[i])return n[i]}var t=Object.keys(e).filter(function(e){return/^\d+$/.test(e)}).sort(function(e,n){return Number(e)-Number(n)});if(t.length&&e[t[0]])return e[t[0]];var o=null==e?void 0:e.deviations;if(o&&"object"==typeof o){var r=Object.keys(o).sort(function(e,n){return Number(e)-Number(n)})[0];if(r&&o[r])return o[r]}return null}(n);return i?e.__assign(e.__assign({},n),{deviation_summary:(null==n?void 0:n.deviation_summary)||(null==i?void 0:i.deviation_summary),deviation_title:(null==n?void 0:n.deviation_title)||(null==i?void 0:i.deviation_title),deviation_impact:(null==n?void 0:n.deviation_impact)||(null==i?void 0:i.deviation_impact),deviation_explanation:(null==n?void 0:n.deviation_explanation)||(null==i?void 0:i.deviation_explanation),evaluation_outputs:(null==n?void 0:n.evaluation_outputs)||(null==i?void 0:i.evaluation_outputs),cognitive_decisioning:(null==n?void 0:n.cognitive_decisioning)||(null==i?void 0:i.cognitive_decisioning)}):n};if(!("string"==typeof o&&o.includes(u.DEVIATION_BADGE_SEPARATOR)))return s(l);var a=o.split(u.DEVIATION_BADGE_SEPARATOR)[1];if(!a)return l;var c=(null==i?void 0:i.evaluationResult)||(null==t?void 0:t.evaluationResult)||{},d=(null===(n=null==c?void 0:c.deviation_entries)||void 0===n?void 0:n[a])||(null===(r=null==c?void 0:c.deviations)||void 0===r?void 0:r[a])||null;return d?e.__assign(e.__assign(e.__assign({},c),d),{deviation_summary:(null==d?void 0:d.deviation_summary)||(null==c?void 0:c.deviation_summary),deviation_title:(null==d?void 0:d.deviation_title)||(null==c?void 0:c.deviation_title),deviation_impact:(null==d?void 0:d.deviation_impact)||(null==c?void 0:c.deviation_impact),deviation_explanation:(null==d?void 0:d.deviation_explanation)||(null==c?void 0:c.deviation_explanation),evaluation_outputs:(null==d?void 0:d.evaluation_outputs)||(null==c?void 0:c.evaluation_outputs),cognitive_decisioning:(null==d?void 0:d.cognitive_decisioning)||(null==c?void 0:c.cognitive_decisioning)}):s(l)}(),isOrphan:!!r}},[Rt]),bt=i.useCallback(function(e,n,i,t,o,r){var l;if(e.stopPropagation(),In.open&&In.sectionIdx===o)zn();else{var s=e.currentTarget,a="left";(null===(l=Rn.current)||void 0===l?void 0:l.contains(s))&&(a="right");Hi(),Pi.current&&Vi(),Ue(new Set),Xe([]),an.current=[],Vn(),Nn.open?Jt():kn(),requestAnimationFrame(function(){var e=function(){var e,n,i,t;if("string"==typeof o&&o.includes(u.DEVIATION_BADGE_SEPARATOR)){var r=o.split(u.DEVIATION_BADGE_SEPARATOR),l="".concat(r[0]).concat(u.DEVIATION_BADGE_SEPARATOR).concat(r[1]);return"right"===a?null===(e=Si.current[l])||void 0===e?void 0:e.current:null===(n=mi.current[l])||void 0===n?void 0:n.current}return"right"===a?null===(i=Si.current[o])||void 0===i?void 0:i.current:null===(t=mi.current[o])||void 0===t?void 0:t.current}()||s;Dn(yt(e,n,t,o,i,r))})}},[In.open,In.sectionIdx,zn,kn,yt]),Ct=i.useCallback(function(){var e=In.sectionIdx;In.isOrphan,zn(),kn(),null!==e&&($i(e),Hi(),Pi.current&&Vi(),Xe([]),an.current=[],Ue(function(n){return n.has(e)?new Set:new Set([e])}),setTimeout(function(){cn.current&&cn.current()},50))},[In.sectionIdx,In.isOrphan,zn,kn,Vi]),Et=i.useCallback(function(){var e=rn.current;if(e){rn.current=null;var n=oi.findIndex(function(n){return n.id===e}),i=ri.findIndex(function(n){return n.id===e}),t=-1===n?u.findKeyPathByNodeId(oi,e):null,o=-1===i?u.findKeyPathByNodeId(ri,e):null,r=-1!==n?n:t?Number(t.split("-")[0]):-1,l=-1!==i?i:o?Number(o.split("-")[0]):-1,s=function(e,n,i,t){var o,r,l,u;return-1!==e?null!==(r=null===(o=i.current[e])||void 0===o?void 0:o.current)&&void 0!==r?r:null:n&&null!==(u=null===(l=t.current[n])||void 0===l?void 0:l.current)&&void 0!==u?u:null},a=function(e,n,i){void 0===i&&(i=30);var t=0,o=function(){var r=e();r&&0!==r.getBoundingClientRect().height?(qi.current.add(r),u.scrollAndHighlightClause(r,n)):t++<i&&requestAnimationFrame(o)};requestAnimationFrame(o)};if(Fe)-1!==r&&Cn.current&&a(function(){return s(n,t,gi,xi)},Cn.current),-1!==l&&Rn.current&&a(function(){return s(i,o,hi,_i)},Rn.current);else{var c=mn.current;if(!c)return;a(function(){return-1!==r?s(n,t,gi,xi):s(i,o,hi,_i)},c)}}},[oi,ri,Fe,gi,hi,xi,_i,Cn,Rn,mn]),At=i.useCallback(function(n){if(n){Hi(),Vi(),Ue(new Set),Xe([]),an.current=[],kn(),Vn();var i=oi.findIndex(function(e){return e.id===n}),t=ri.findIndex(function(e){return e.id===n}),o=-1===i?u.findKeyPathByNodeId(oi,n):null,r=-1===t?u.findKeyPathByNodeId(ri,n):null;if(-1!==i||o||-1!==t||r){var l=-1!==i?i:o?Number(o.split("-")[0]):-1,s=-1!==t?t:r?Number(r.split("-")[0]):-1;rn.current=n,Ki(function(n){var i,t=e.__assign({},n),o=!1;-1!==l&&(t[i=Fe?"left-".concat(l):String(l)]||(t[i]=!0,o=!0));-1!==s&&(t[i=Fe?"right-".concat(s):String(s)]||(t[i]=!0,o=!0));return o?t:n}),Yi(function(n){var i=e.__assign({},n),t=!1,l=function(e){for(var n=e.split("-"),o=n[0],r=1;r<n.length;r++)o+="-".concat(n[r]),i[o]||(i[o]=!0,t=!0)};return o&&l(o),r&&l(r),t?i:n}),setTimeout(function(){requestAnimationFrame(function(){rn.current===n&&Bt.current()})},50)}else console.warn('scrollToAndHighlightClause: nodeId "'.concat(n,'" not found'))}},[oi,ri,Fe,Ki,Yi,Vi,kn,Vn]),Bt=i.useRef(Et);i.useEffect(function(){Bt.current=Et},[Et]);var Tt=i.useRef(null);i.useEffect(function(){if(Kn){var e=Gn.fields.find(function(e){return e.analysisKey===Kn||e.key===Kn});if(e){var n=vi.current[e.key]||pi.current[e.key];(null==n?void 0:n.current)&&setTimeout(function(){return n.current.scrollIntoView({behavior:"smooth",block:"center"})},150)}}},[Kn,Gn.fields]);var wt=i.useCallback(function(e){var n,i,t,o,r,l,u,s,a,c=null===(n=null==nt?void 0:nt.rule_difference_comparison)||void 0===n?void 0:n.fields;if(!c||!c[e])return{score:0,relation:"",highlightsA:[],highlightsB:[],hasContent:!1};var d=c[e],f=(null==d?void 0:d.relation)||(null===(t=null===(i=null==d?void 0:d.highlights)||void 0===i?void 0:i.ruleA_spans)||void 0===t?void 0:t.length)||(null===(r=null===(o=null==d?void 0:d.highlights)||void 0===o?void 0:o.ruleB_spans)||void 0===r?void 0:r.length)||(null==d?void 0:d.mappings)&&d.mappings.length>0;if(d.mappings){var v=d.mappings[0]||{};return{score:d.score,relation:v.relation||"",highlightsA:(null===(l=v.highlights)||void 0===l?void 0:l.ruleA_spans)||[],highlightsB:(null===(u=v.highlights)||void 0===u?void 0:u.ruleB_spans)||[],hasContent:!!f}}return{score:d.score,relation:d.relation||"",highlightsA:(null===(s=d.highlights)||void 0===s?void 0:s.ruleA_spans)||[],highlightsB:(null===(a=d.highlights)||void 0===a?void 0:a.ruleB_spans)||[],hasContent:!!f}},[nt]),It=E.useStyleHelpers({proposedSections:oi,existingSections:ri,maintainRelativeOrder:Fe,cognitiveMap:gn,deviationData:pn,treeData:pe,resolvedComparisonConfig:Gn}),Dt=It.getSectionCompareStyle,Ot=It.getSubSectionCompareStyle,Ft=It.getDeviationStyleByKey,jt=B.useLinesCalculator({containerRef:nn,leftContainerRef:Cn,rightContainerRef:Rn,svgContainerRef:en,pathRefs:sn,leftHeaderRef:tn,rightHeaderRef:on,proposedSections:oi,existingSections:ri,visibleFields:li,leftRefs:vi,rightRefs:pi,sectionLeftRefs:gi,sectionRightRefs:hi,subSectionLeftRefs:xi,subSectionRightRefs:_i,lhsBadgeRefs:mi,rhsBadgeRefs:Si,sectionRowRefs:yi,expandedSections:Wi,expandedSubSections:Ui,connectedSections:Ke,isSideBySide:Bi,activeSideBySideSection:Fi,maintainRelativeOrder:Fe,cognitiveMap:gn,getSectionCompareStyle:Dt,getSubSectionCompareStyle:Ot,getDeviationStyleByKey:Ft,isArrowVisible:Ti,isAnimatingRef:ln,isSideBySideRef:Pi,sideBySideCacheRef:Ni,sideBySideLineRef:Mi,activeSideBySideSectionRef:Li,activeSideBySideRightSectionRef:ki,connectedLines:Je,setConnectedLines:Xe,cachedConnectedPositions:an,calculateLinesRef:cn,resizeTimerRef:dn,scrollLock:ji,scrollSyncLocked:Qe,handleResizeRef:fn,activeProposed:ii,existingRule:ti,analysisData:nt,pendingScrollTargetRef:En,pendingScrollCallbackRef:An,resolvedComparisonConfig:Gn,getFieldData:wt}),Nt=jt.lines,Pt=jt.setLines,kt=jt.overallConnector,Lt=jt.setOverallConnector,Mt=jt.svgDimensions,qt=jt.handleColumnScroll;i.useEffect(function(){Nn.anchorEl&&requestAnimationFrame(function(){requestAnimationFrame(function(){var e;null===(e=cn.current)||void 0===e||e.call(cn)})})},[Nn.anchorEl,Qe]);var Ht=i.useCallback(function(){Hi(),Ze(!1),Ki({}),Yi({}),Vi(),Ue(new Set),Xe([]),an.current=[],kn(),Vn(),zn(),requestAnimationFrame(function(){cn.current&&cn.current()})},[Ki,Yi,Vi,kn,Vn,zn]);i.useEffect(function(){Bi||0!==Ke.size||Ze(!1)},[Bi,Ke]);var Vt=i.useMemo(function(){return Object.values(Wi).some(Boolean)||Object.values(Ui).some(Boolean)},[Wi,Ui]),zt=i.useRef(null),Gt=i.useRef(0),Wt=i.useRef(0),Kt=i.useRef(0),Ut=A.useResizeHandler({timerRef:zt,ruleComponentRef:Sn,scrollContainerRef:mn,containerRef:nn,maintainRelativeOrder:Fe,proposedSections:oi,existingSections:ri,isSideBySideRef:Pi,activeSideBySideSectionRef:Li,activeSideBySideRightSectionRef:ki,sectionRowRefs:yi,sectionRightRowRefs:Ri,sectionLeftRefs:gi,sectionRightRefs:hi,subSectionLeftRefs:xi,subSectionRightRefs:_i,lhsBadgeRefs:mi,rhsBadgeRefs:Si,leftContainerRef:Cn,rightContainerRef:Rn,calculateLinesRef:cn,handleResizeRef:fn,setIsResizing:Di,setIsArrowVisible:wi,sideBySideCacheRef:Ni,cachedConnectedPositions:an}).handleResize;i.useEffect(function(){fn.current=Ut},[Ut,fn]),i.useEffect(function(){var e=function(e,n,i,t,o){n.current=e.getBoundingClientRect().width;var r=new ResizeObserver(function(e){null!==i.current&&cancelAnimationFrame(i.current),i.current=requestAnimationFrame(function(){var r,l,u;i.current=null;var s=e[e.length-1];if(s){var a=null!==(u=null===(l=null===(r=s.borderBoxSize)||void 0===r?void 0:r[0])||void 0===l?void 0:l.inlineSize)&&void 0!==u?u:s.contentRect.width;Math.abs(a-n.current)<1?o():(n.current=a,t())}})});return r.observe(e),r},n={current:null},i={current:null},t={current:null},o=[],r=[n,i,t];return Sn.current&&o.push(e(Sn.current,Gt,n,function(){return fn.current()},function(){})),mn.current&&o.push(e(mn.current,Wt,i,function(){return fn.current()},function(){return cn.current()})),nn.current&&o.push(e(nn.current,Kt,t,function(){return fn.current()},function(){return cn.current()})),function(){o.forEach(function(e){return e.disconnect()}),r.forEach(function(e){null!==e.current&&(cancelAnimationFrame(e.current),e.current=null)})}},[]),i.useEffect(function(){Pi.current=Bi},[Bi]),i.useEffect(function(){Li.current=Fi},[Fi]);var Yt=i.useCallback(function(){var e,n=In.sectionIdx,i=In.isOrphan;if(kn(),null!=n){var t="left";In.anchorEl&&(null===(e=Rn.current)||void 0===e?void 0:e.contains(In.anchorEl))&&(t="right"),$i(n),zi(n,i,{sourceSide:t})}},[zi,In.isOrphan,In.sectionIdx,In.anchorEl,kn]),Jt=i.useCallback(function(){kn(),Vi(),Ue(new Set),Xe([]),an.current=[]},[kn,Vi]),Xt=null!==In.sectionIdx&&Ke.has(In.sectionIdx),$t=S.useDeviationNavigation({proposedSections:oi,existingSections:ri,parentDeviationRecord:ui,expandedSections:Wi,maintainRelativeOrder:!!Fe,scrollContainerRef:mn,leftContainerRef:Cn,rightContainerRef:Rn,lhsBadgeRefs:mi,rhsBadgeRefs:Si}),Qt=$t.showDeviationNavigation,Zt=$t.showOpenNodeRef,eo=$t.adjustScrollForPopup,no=i.useCallback(function(e,n,i,t,o){var r,l="string"==typeof t?u.safeStringify(t).trim():u.safeStringify(null==t?void 0:t.deviation_summary).trim(),s=e.currentTarget;Vn();var a="left";(null===(r=Rn.current)||void 0===r?void 0:r.contains(s))&&(a="right");var c=function(){var e,i,t,o;if("string"==typeof n&&n.includes(u.DEVIATION_BADGE_SEPARATOR)){var r=n.split(u.DEVIATION_BADGE_SEPARATOR),l="".concat(r[0]).concat(u.DEVIATION_BADGE_SEPARATOR).concat(r[1]);return"right"===a?null===(e=Si.current[l])||void 0===e?void 0:e.current:null===(i=mi.current[l])||void 0===i?void 0:i.current}return"right"===a?null===(t=Si.current[n])||void 0===t?void 0:t.current:null===(o=mi.current[n])||void 0===o?void 0:o.current};if(i)return Vi(),Ue(new Set),Xe([]),an.current=[],void(l&&($i(n),requestAnimationFrame(function(){var e=c()||s;e&&(e.getBoundingClientRect().top>.8*window.innerHeight&&e.scrollIntoView({behavior:"smooth",block:"center"}));Pn({open:!0,anchorEl:e,summary:t,displayImpact:o})})));$i(n),l?setTimeout(function(){zi(n,i,{toggleIfSame:!1,sourceSide:a,onReady:function(){var e,n,i,r=c()||s;if(r){var l=r.getBoundingClientRect();if(l.top>.8*window.innerHeight||l.top<100){var u=l.top-window.innerHeight/2;Fe?(null===(e=Cn.current)||void 0===e||e.scrollBy({top:u,behavior:"smooth"}),null===(n=Rn.current)||void 0===n||n.scrollBy({top:u,behavior:"smooth"})):null===(i=mn.current)||void 0===i||i.scrollBy({top:u,behavior:"smooth"})}}Pn({open:!0,anchorEl:r,summary:t,displayImpact:o})}})},350):setTimeout(function(){zi(n,i,{toggleIfSame:!1,sourceSide:a})},350)},[zi,Vn,Pn,Vi,$i]),io=i.useMemo(function(){var e;if(!Ae)return null;var n=null===(e=null==Ae?void 0:Ae.id)||void 0===e?void 0:e.split(":")[0];for(var i in ui){if((ui[i]||[]).some(function(e){return e.id===n}))return i}return null},[Ae,ui]),to=i.useRef({id:null,triggerMs:null}),oo=i.useRef(null),ro=i.useRef(Wi);i.useEffect(function(){ro.current=Wi},[Wi]),i.useEffect(function(){var n;if(null==Ae?void 0:Ae.id){var i=Number(Ae.trigger),t=to.current;if((null==t?void 0:t.triggerMs)!==i){if(!(Ae.id.includes(":")&&/:\d+$/.test(Ae.id)))return to.current={id:Ae.id,triggerMs:i},void At(Ae.id);var o=null===(n=null==Ae?void 0:Ae.id)||void 0===n?void 0:n.split(":"),r=o[0],l=o[1],s=null!=l?l:"0";oo.current!==Ae.id&&(kn(),Vn(),Vi(),Ue(new Set),Xe([]),an.current=[],oo.current=Ae.id);var a=!1,c=0,d=null,f=200,v=!1,p=function(e,n){for(var i=function(e,t){if(!e)return null;if(e.id===n)return t;if(!Array.isArray(e.subsections))return null;for(var o=0;o<e.subsections.length;o++){var r=i(e.subsections[o],"".concat(t,"-").concat(o));if(r)return r}return null},t=0;t<e.length;t++){var o=i(e[t],String(t));if(o)return o}return null},g=function(){var n,t,o,l;if(!a){var h=function(){to.current={id:Ae.id,triggerMs:i}},m=null,S=null;for(var R in ui){var x=ui[R].find(function(e){return e.id===r});if(x){m=R,S=x;break}}if(S&&m){var _=oi.findIndex(function(e){return e.id===m}),y=ri.findIndex(function(e){return e.id===m}),b=-1===_&&-1!==y,C=p(oi,S.id),E=p(ri,S.id);if(C&&!E&&!b){var A=C.split("-"),B=Number(A[0]);if(Fe){var T=null===(t=null===(n=oi[B])||void 0===n?void 0:n.refIndexes)||void 0===t?void 0:t[0],w=ri.findIndex(function(e){return e.selfIndex===T});-1!==w&&(B=w)}E=e.__spreadArray([B],A.slice(1),!0).join("-")}if(C||E){var I=C?Number(C.split("-")[0]):_,D=E?Number(E.split("-")[0]):y,O=D>=0?D:E?Number(E.split("-")[0]):-1,F=oi[I],j=ri[O],N=F&&!F.title&&!F.content,P=j&&!j.title&&!j.content,k=b||(!C&&!!E||N&&!P);if(!v){var L=!1;if(I>=0&&!b)(Fe?!!ro.current["left-".concat(I)]:!!ro.current[String(I)])||(Xi(I,"left"),L=!0);if(D>=0)(Fe?!!ro.current["right-".concat(O)]:!!ro.current[String(O)])||(Xi(O,"right"),L=!0);if((C&&C.includes("-")||E&&E.includes("-"))&&(Yi(function(n){var i=e.__assign({},n),t=!1,o=function(e){for(var n=e.split("-"),o=n[0],r=1;r<n.length;r++)o+="-".concat(n[r]),i[o]||(i[o]=!0,t=!0)};return C&&o(C),E&&o(E),t?i:n}),L||(L=!0)),L)return v=!0,void(d=setTimeout(g,800))}var M,q=C||"",H=E||"",V="".concat(S.id).concat(u.DEVIATION_BADGE_SEPARATOR).concat(s).concat(u.DEVIATION_BADGE_SEPARATOR).concat(q).concat(u.DEVIATION_BADGE_SEPARATOR).concat(H),z="".concat(S.id).concat(u.DEVIATION_BADGE_SEPARATOR).concat(s),G=null===(o=mi.current[z])||void 0===o?void 0:o.current,W=null===(l=Si.current[z])||void 0===l?void 0:l.current,K=k||!G&&!!W,U=K?W:G;if(M=Fe?K?Rn.current:Cn.current:mn.current,U&&M){var Y=U.getBoundingClientRect();if(0===Y.height)return void((c+=1)<6?d=setTimeout(g,f):h());var J=M.getBoundingClientRect(),X=Y.top-J.top+M.scrollTop-J.height/2+Y.height/2,$=C&&C.includes("-")||E&&E.includes("-"),Q=function(){var n,i,t,o,r,l;if(!a){h();var c=U instanceof Element?window.getComputedStyle(U).color:"";G&&(G.style.transition="box-shadow 300ms ease-in-out",G.style.boxShadow="0 0 10px ".concat(c)),W&&(W.style.transition="box-shadow 300ms ease-in-out",W.style.boxShadow="0 0 10px ".concat(c)),setTimeout(function(){G&&(G.style.boxShadow=""),W&&(W.style.boxShadow="")},2e3);var d=(null===(i=null===(n=S.evaluationResult)||void 0===n?void 0:n.deviations)||void 0===i?void 0:i[s])||S,f=(null===(t=S.evaluationResult)||void 0===t?void 0:t.evaluation_outputs)||S.evaluation_outputs,v=!!G&&!!W,p=!!("string"==typeof(null==d?void 0:d.deviation_summary)?d.deviation_summary.trim():u.safeStringify(null!==(o=null==d?void 0:d.deviation_summary)&&void 0!==o?o:"").trim()),g=K?(null===(r=Si.current[$?z:O])||void 0===r?void 0:r.current)||W:(null===(l=mi.current[$?z:I])||void 0===l?void 0:l.current)||G;if(!v||!p)return eo(g,function(){Pn({open:!0,anchorEl:g,displayImpact:Ae.displayImpact,summary:e.__assign(e.__assign({},d),{evaluation_outputs:f})})},{skipScroll:!0}),void(null==Be||Be());zi(V,!1,{toggleIfSame:!1,sourceSide:b?"right":"left",onReady:function(){var n,i;h();var t=K?(null===(n=Si.current[z])||void 0===n?void 0:n.current)||W:(null===(i=mi.current[z])||void 0===i?void 0:i.current)||G;Pn({open:!0,anchorEl:t,displayImpact:Ae.displayImpact,summary:e.__assign({},d)}),null==Be||Be()}})}},Z=function(){if(!Fe)return null;var e=K?G:W,n=K?Cn.current:Rn.current;if(!e||!n)return null;var i=e.getBoundingClientRect();if(0===i.height)return null;var t=n.getBoundingClientRect();return{container:n,top:i.top-t.top+n.scrollTop-t.height/2+i.height/2}}(),ee=Math.abs(M.scrollTop-X)<=2,ne=!Z||Math.abs(Z.container.scrollTop-Z.top)<=2;ee&&ne?Q():(ee||(En.current=X,An.current=Q,M.scrollTo({top:X,behavior:"smooth"})),Z&&!ne&&Z.container.scrollTo({top:Z.top,behavior:"smooth"}),d&&clearTimeout(d),d=setTimeout(function(){if(An.current){En.current=null;var e=An.current;An.current=null,e()}else ee&&Q()},1500))}else(c+=1)<6?d=setTimeout(g,f):h()}else(c+=1)<6?d=setTimeout(g,f):h()}else(c+=1)<6?d=setTimeout(g,f):h()}};return d=setTimeout(g,f),function(){a=!0,d&&clearTimeout(d)}}}},[Ae,ui,oi,ri,Fe,Xi,zi,Pn,At]),i.useEffect(function(){var n,i,t;if(Nn.open){var o=Nn.anchorEl;if(o&&!o.isConnected){var r=function(e){for(var n,i=0,t=Object.entries(e);i<t.length;i++){var r=t[i],l=r[0];if((null===(n=r[1].current)||void 0===n?void 0:n.textContent)===o.textContent)return l}return null},l=(null===(n=o.dataset)||void 0===n?void 0:n.deviationRefId)||r(mi.current)||r(Si.current);if(l){var u=(null===(i=Si.current[l])||void 0===i?void 0:i.current)||(null===(t=mi.current[l])||void 0===t?void 0:t.current);u&&u.isConnected&&Pn(function(n){return e.__assign(e.__assign({},n),{anchorEl:u})})}}}},[Nn.open,Nn.anchorEl,Qe,Ke,Wi]);var lo=Tn.open,uo=Tn.sectionIdx,so=Tn.isOrphan,ao=Tn.badgeStyle,co=Tn.anchorEl,fo=Tn.sectionAnchorEl;i.useEffect(function(){var n;if(lo&&null!=uo&&uo!==ot){var i="string"==typeof uo?uo.split(u.DEVIATION_BADGE_SEPARATOR)[0]:null,t=function(e,n){var i;if(!e||!Array.isArray(e))return null;for(var o=0,r=e;o<r.length;o++){var l=r[o];if(l.id===n)return l;if(null===(i=l.subsections)||void 0===i?void 0:i.length){var u=t(l.subsections,n);if(u)return u}}return null},o=i&&"string"==typeof i?t(oi,i):null,r=i&&"string"==typeof i?t(ri,i):null,l="number"==typeof uo?oi[uo]||null:o||i&&((null===(n=null==pe?void 0:pe.nodes)||void 0===n?void 0:n[i])||(null==pe?void 0:pe[i]))||null,s="number"==typeof uo?ri[uo]||null:r,a=yt(co,l,s,uo,so,ao);wn(function(n){return n.open?u.safeStringify(n.cognitiveData)===u.safeStringify(a.cognitiveData)&&u.safeStringify(n.deviationData)===u.safeStringify(a.deviationData)&&n.sectionTitle===a.sectionTitle&&n.refSectionTitle===a.refSectionTitle?n:e.__assign(e.__assign(e.__assign({},n),a),{open:!0,anchorEl:n.anchorEl,sectionAnchorEl:n.sectionAnchorEl}):n})}},[lo,uo,so,ao,co,fo,oi,ri,yt]);var vo=i.useCallback(function(e){var i=e.section,t=e.keyPath,o=e.depth,r=void 0===o?0:o,l=e.columnKey,u=void 0===l?"left":l,s=e.parentNodeId,a=void 0===s?"":s,c=e.sectionOffset;return n.jsx(x.default,{section:i,keyPath:t,depth:r,columnKey:u,parentNodeId:a,sectionOffset:c})},[]),po=i.useMemo(function(){return oi.map(function(e,i){var t,o=!(null==e?void 0:e.title)&&!(null==e?void 0:e.content),r=!(null==e?void 0:e.refIndexes)||0===e.refIndexes.length;return o&&r&&Fe?null:n.jsx(_.default,{section:e,idx:i},null!==(t=null==e?void 0:e.id)&&void 0!==t?t:"left-row-".concat(i))})},[oi]),go=i.useMemo(function(){return ri.map(function(e,i){var t,o=!(null==e?void 0:e.title)&&!(null==e?void 0:e.content),r=!(null==e?void 0:e.refIndexes)||0===e.refIndexes.length;return o&&r&&Fe?null:n.jsx(y.default,{section:e,idx:i},null!==(t=null==e?void 0:e.id)&&void 0!==t?t:"right-row-".concat(i))})},[ri]),ho=i.useRef(bt);i.useEffect(function(){ho.current=bt},[bt]);var mo=i.useRef(no);i.useEffect(function(){mo.current=no},[no]);var So=i.useRef(Jt);i.useEffect(function(){So.current=Jt},[Jt]);var Ro=i.useRef(Xi);i.useEffect(function(){Ro.current=Xi},[Xi]);var xo=i.useRef(Ji);i.useEffect(function(){xo.current=Ji},[Ji]);var _o=i.useRef(vo);i.useEffect(function(){_o.current=vo},[vo]);var yo=i.useRef(Vi);i.useEffect(function(){yo.current=Vi},[Vi]);var bo=i.useMemo(function(){return{maintainRelativeOrder:!!Fe,showDeviationBadges:ke,isProposingFix:we,proposingFixNodeId:Ie,isRedlineFlow:De,isSideBySide:Bi,activeSideBySideSection:Fi,scrollSyncLocked:Qe,toggleScrollSyncLocked:Zi,summaryPopupAnchorEl:Nn.anchorEl,connectedSections:Ke,proposedSections:oi,existingSections:ri,deviationNumberRegistry:si,treeData:pe,displayConfig:_e,resolvedMarkdownStyles:hn,unifiedNumbering:et,expandedSections:Wi,expandedSubSections:Ui,setExpandedSubSections:Yi,getSectionCompareStyle:Dt,getSubSectionCompareStyle:Ot,getBadgeRef:Ei,getSectionRowRef:bi,getSubSectionRef:Ci,sectionLeftRefs:gi,sectionRightRefs:hi,sectionRowRefs:yi,sectionRightRowRefs:Ri,subSectionLeftRefs:xi,subSectionRightRefs:_i,lhsBadgeRefs:mi,rhsBadgeRefs:Si,openMoreFunctionsPopup:ct,handleOpenSummaryPopup:dt,openSummaryPopup:dt,handleCloseSummaryPopup:ft,toggleSection:vt,handleSubSectionToggle:pt,renderSubSectionAccordion:gt,resetSideBySide:ht,setConnectedSections:Ue,setConnectedLines:Xe,cachedConnectedPositions:an,showDeviationNavigation:Qt,showOpenNodeRef:Zt,deviationNodeIdToView:null==Ae?void 0:Ae.id,deviationTargetParentId:io}},[Fe,ke,we,Ie,De,Bi,Fi,Qe,Zi,Nn.anchorEl,Ke,oi,ri,si,_e,hn,et,Wi,Ui,Yi,Dt,Ot,Ei,bi,Ci,Qt,Zt,Ae,io]);return n.jsx(C.CompareContextProvider,e.__assign({value:bo},{children:n.jsxs(t.Box,e.__assign({ref:Sn,sx:{display:"flex",flexDirection:"column",height:"100%",bgcolor:"#F6F7F9B2",fontFamily:'"Plus Jakarta Sans", sans-serif',overflow:"visible",position:"relative"}},{children:[Me&&n.jsx(t.Box,e.__assign({sx:{position:"absolute",inset:0,bgcolor:"rgba(255, 255, 255, 0.6)",backdropFilter:"blur(10px)",zIndex:9999,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"8px"}},{children:n.jsx(f.default,{})})),Nn.open&&n.jsx(b.default,{open:Nn.open,anchorEl:Nn.anchorEl,containerEl:Tt.current,clipTopEl:tn.current,scrollContainerEl:mn.current,onClose:Jt,summary:Nn.summary,displayImpact:Nn.displayImpact,isScrollLocked:Qe}),n.jsx(d.default,{open:In.open,anchorEl:In.anchorEl,maintainRelativeOrder:!!Fe,sectionTitle:In.sectionTitle,referenceSectionTitle:In.refSectionTitle,onClose:zn,onOpenCognitiveCompare:qn,onOpenSideBySide:Yt,onConnect:Ct,isConnected:Xt,isOrphan:In.isOrphan}),Tn.open&&n.jsx(c.default,{open:Tn.open,popupRef:Mn,position:On,popupConfig:be,onClose:function(){Fn(null),wn(function(n){return e.__assign(e.__assign({},n),{open:!1})}),Ln(null)},markdownStyles:Se,sectionTitle:$n,referenceSectionTitle:Zn,cognitiveData:Tn.cognitiveData,anchorEl:Tn.anchorEl,sectionAnchorEl:Tn.sectionAnchorEl,scrollContainerEl:mn.current,badgeStyle:Tn.badgeStyle,docData:Tn.docData,deviationData:Tn.deviationData,isLoading:Tn.isLoading}),n.jsx(t.Snackbar,e.__assign({open:!!Ve,autoHideDuration:8e3,onClose:function(){return ze(null)},anchorOrigin:{vertical:"top",horizontal:"center"}},{children:n.jsx(t.Alert,e.__assign({onClose:function(){return ze(null)},severity:"error",sx:{width:"100%",whiteSpace:"pre-line"}},{children:Ve}))})),n.jsx(R.default,{componentHeaderText:ve,displayConfig:_e,maintainRelativeOrder:Fe,onCollapseAll:Ht,showCollapseAll:Vt,onToggleView:function(e){qe(!0),setTimeout(function(){je(!e),null==ye||ye(!e),Ze(!1),Vi(),kn(),Ue(new Set),Xe([]),an.current=[],requestAnimationFrame(function(){requestAnimationFrame(function(){setTimeout(function(){qe(!1)},600)})})},50)}}),n.jsx(t.Box,e.__assign({ref:mn,onScroll:qt,sx:{flex:1,minHeight:0,pt:1.5,pb:1,px:3,display:"flex",justifyContent:"center",alignItems:"flex-start",bgcolor:"#FFFFFF",overflowY:Fe?"visible":"auto",borderTop:it&&tt?"none":"1.5px solid #EEF0F4"}},{children:n.jsx(t.Box,e.__assign({sx:e.__assign({display:"flex",flexDirection:"column",width:"100%",maxWidth:"1200px"},Fe?{flex:1}:{})},{children:n.jsxs(t.Box,e.__assign({ref:nn,sx:e.__assign({display:"grid",gridTemplateColumns:"minmax(0, 1fr) 180px minmax(0, 1fr)",gap:"60px",maxWidth:"1200px",width:"100%",position:"relative",minHeight:0},Fe?{flex:1,overflow:"visible"}:{})},{children:[n.jsx(w.default,{svgContainerRef:en,svgDimensions:Mt,isResizing:Ii,overallConnector:kt,rootDeviationStyle:ut,lines:Nt,isSideBySide:Bi,activeSideBySideSection:Fi,isArrowVisible:Ti,maintainRelativeOrder:Fe,proposedSections:oi,existingSections:ri,cognitivePopup:Tn,activeBadgeId:jn,closeCognitivePopup:Vn,setActiveBadgeId:Ln,openCognitivePopupFromState:Hn,buildSectionPopupState:yt,connectedLines:Je,pathRefs:sn}),n.jsxs(t.Box,e.__assign({sx:e.__assign({border:"1px solid #E7E7E9",borderRadius:"8px",bgcolor:"#FFFFFF",display:"flex",flexDirection:"column",position:"relative",zIndex:2,filter:"drop-shadow(0px 2px 4px #F2F2F2)"},Fe?{flex:1,overflow:"visible"}:{})},{children:[n.jsx(t.Box,e.__assign({ref:tn,sx:{p:"8px",bgcolor:"#F7F8FA",borderBottom:"1px solid #E7E7E9",borderRadius:"8px 8px 0 0",display:"flex",alignItems:"center",minHeight:"40px",overflow:"hidden",minWidth:0}},{children:n.jsx(t.Tooltip,e.__assign({title:Jn,placement:"top"},{children:n.jsx(t.Typography,e.__assign({sx:{fontSize:"16px",fontWeight:500,color:"#19213D",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",width:"100%",minWidth:0,textAlign:"center",display:"block"}},{children:Jn}))}))})),n.jsxs(t.Box,e.__assign({ref:Cn,onScroll:qt,sx:e.__assign({p:"12px",display:"flex",flexDirection:"column"},Fe?{maxHeight:"calc(100vh - 250px)",flex:1,overflowY:"auto",overflowX:"hidden",minHeight:0,mr:"-180px",pr:"192px","&::-webkit-scrollbar":{display:"none"},scrollbarWidth:"none"}:{})},{children:[n.jsx("div",{ref:yn,style:{width:"100%",height:"0px",flexShrink:0}}),ci&&po,n.jsx("div",{ref:bn,style:{width:"100%",height:"0px",flexShrink:0}})]}))]})),n.jsx(t.Box,e.__assign({ref:Tt,sx:{width:"180px",display:"flex",flexDirection:"column",alignItems:"center",pt:"15px",gap:0,zIndex:20,pointerEvents:"none"}},{children:n.jsx(t.Box,e.__assign({sx:{display:"flex",justifyContent:"center",alignItems:"center",mt:0}},{children:n.jsxs(t.Box,e.__assign({onClick:function(n){n.stopPropagation(),Tn.open&&jn===ot?Vn():(Ln(ot),Hn(yt(n.currentTarget,{title:"",content:"",evaluationResult:rt,cognitiveData:{section_id:"",decisioning:[],gap:[],relevance_score:0,isMissingRationale:!0}},null,ot,!0,e.__assign(e.__assign({},ut),{label:""}))))},sx:{display:"inline-flex",alignItems:"center",gap:"5px",px:1.5,py:"5px",top:"-8px",borderRadius:"20px",bgcolor:ut.badgeBg,color:ut.badgeText,border:"1px solid ".concat(ut.badgeBorder),fontSize:"12px",fontWeight:600,whiteSpace:"nowrap",position:"relative",zIndex:1,pointerEvents:"auto",cursor:"pointer"}},{children:[null!=lt?lt:n.jsx(v.default,{}),n.jsx(t.Box,e.__assign({component:"span",sx:{width:14,height:14,display:"flex",alignItems:"center","& svg":{width:"14px",height:"14px"}}},{children:n.jsx(r.ButtonCognitiveIcon,{})})),n.jsx(o.ChevronDown,{size:11,style:{transform:Tn.open&&jn===ot?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.25s ease"}})]}))}))})),n.jsxs(t.Box,e.__assign({sx:e.__assign({border:"1px solid #E3E6EA",borderRadius:"8px",bgcolor:"#FFFFFF",boxShadow:"0px 1px 4px #F7F4FE",position:"relative",zIndex:2,display:"flex",flexDirection:"column",minWidth:0},Fe?{flex:1,overflow:"visible",minHeight:0}:{})},{children:[Oi&&n.jsx(l.default,{sections:11}),n.jsx(t.Box,e.__assign({ref:on,sx:{p:"8px",bgcolor:"#F7F8FA",borderBottom:"1px solid #E3E6EA",borderRadius:"8px 8px 0 0",minHeight:"40px",display:"flex",alignItems:"center",overflowX:"hidden"}},{children:n.jsx(t.Tooltip,e.__assign({title:ei,placement:"top"},{children:n.jsx(t.Typography,e.__assign({sx:{fontSize:"16px",fontWeight:500,color:"#5928ED",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",width:"100%",minWidth:0,textAlign:"center",display:"block"}},{children:ei}))}))})),n.jsxs(t.Box,e.__assign({ref:Rn,onScroll:qt,sx:e.__assign({p:"12px",display:"flex",flexDirection:"column"},Fe?{maxHeight:"calc(100vh - 250px)",flex:1,overflowY:"auto",overflowX:"hidden",minHeight:0,ml:"-150px",pl:"165px","&::-webkit-scrollbar":{display:"none"},scrollbarWidth:"none"}:{})},{children:[n.jsx("div",{ref:xn,style:{width:"100%",height:"0px",flexShrink:0}}),ci&&go,n.jsx("div",{ref:_n,style:{width:"100%",height:"0px",flexShrink:0}})]}))]}))]}))}))}))]}))}))};
|
|
2
2
|
//# sourceMappingURL=CognitiveCompare.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),a=require("react/jsx-runtime"),s=require("react"),n=require("dayjs"),t=require("lucide-react"),l=require("@mui/material"),o=require("./ManageRemainder.module.css.js");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=c(n),d=["Su","Mo","Tu","We","Th","Fr","Sa"];exports.default=function(n){var c=n.assignees,r=s.useState(new Date),u=r[0],g=r[1],f=s.useState({assignee1:!0,assignee2:!0,assignee3:!0}),m=f[0],h=f[1],x=function(a){h(function(s){var n;return e.__assign(e.__assign({},s),((n={})[a]=!s[a],n))})},_=s.useMemo(function(){var e=new Map;return c.forEach(function(a){var s=new Map;a.reminders.forEach(function(e){var a,n=i.default(e).format("YYYY-MM-DD"),t=null!==(a=s.get(n))&&void 0!==a?a:{reminderCount:0,escalationCount:0};t.reminderCount+=1,s.set(n,t)}),a.escalations.forEach(function(e){var a,n=i.default(e).format("YYYY-MM-DD"),t=null!==(a=s.get(n))&&void 0!==a?a:{reminderCount:0,escalationCount:0};t.escalationCount+=1,s.set(n,t)}),s.forEach(function(s,n){e.has(n)||e.set(n,[]),e.get(n).push({ownerId:a.ownerId,ownerName:a.ownerName,ownerColor:a.ownerColor,reminderCount:s.reminderCount,escalationCount:s.escalationCount,totalCount:s.reminderCount+s.escalationCount})})}),e},[c]);return a.jsxs("div",e.__assign({style:{boxShadow:"0 4px 12px 0 rgba(0, 0, 0, 0.08)"},className:o.default.calendarContainer},{children:[a.jsxs("div",e.__assign({className:o.default.calendarHeader},{children:[a.jsxs("div",e.__assign({className:o.default.calendarHeaderTitle},{children:[a.jsx(t.Calendar,{size:14}),"Calendar View"]})),a.jsx("div",e.__assign({className:o.default.calendarHeaderInfo},{children:a.jsx(t.InfoIcon,{stroke:"#64748B",className:o.default.calendarHeaderInfo})}))]})),a.jsxs("div",e.__assign({className:o.default.monthNav},{children:[a.jsx("button",e.__assign({type:"button",onClick:function(){return g(i.default(u).subtract(1,"month").toDate())},className:o.default.monthNavBtn},{children:a.jsx(t.ArrowLeft,{size:18})})),a.jsx("h2",e.__assign({className:o.default.monthNavTitle},{children:i.default(u).format("MMMM YYYY")})),a.jsx("button",e.__assign({type:"button",onClick:function(){return g(i.default(u).add(1,"month").toDate())},className:o.default.monthNavBtn},{children:a.jsx(t.ArrowRight,{size:18})}))]})),a.jsx("div",{className:"calendar-wrapper"}),a.jsx("div",e.__assign({className:o.default.weekdayHeader},{children:d.map(function(s){return a.jsx("div",e.__assign({className:o.default.weekdayLabel},{children:s}),s)})})),a.jsx("div",e.__assign({className:o.default.dayGrid},{children:Array.from({length:42}).map(function(s,n){var t,c=i.default(u).startOf("month").startOf("week").add(n,"day").toDate(),d=i.default(c).format("YYYY-MM-DD"),r=null!==(t=_.get(d))&&void 0!==t?t:[],g=i.default(c).month()===i.default(u).month()&&i.default(c).year()===i.default(u).year(),f=i.default(c).isBefore(i.default(),"day"),h=i.default(c).isSame(i.default(),"day"),x={1:m.assignee1,2:m.assignee2,3:m.assignee3},p=r.filter(function(e){return x[e.ownerId]});return a.jsx(l.Tooltip,e.__assign({arrow:!0,placement:"top",disableHoverListener:!r.length,title:p.length?a.jsxs("div",e.__assign({className:o.default.tooltipContent},{children:[a.jsxs("div",e.__assign({className:o.default.tooltipHeader},{children:[a.jsx("div",e.__assign({className:o.default.tooltipTitle},{children:"Reminder Schedule"})),a.jsx("div",e.__assign({className:o.default.tooltipDate},{children:i.default(c).format("MMM D, YYYY")}))]})),a.jsx("div",e.__assign({className:o.default.tooltipAssignees},{children:p.map(function(s){return a.jsxs("div",e.__assign({className:o.default.tooltipAssigneeRow},{children:[a.jsxs("div",e.__assign({className:o.default.tooltipAssigneeInfo},{children:[a.jsx("span",{className:o.default.tooltipAssigneeDot,style:{backgroundColor:s.ownerColor}}),a.jsxs("span",e.__assign({className:o.default.tooltipAssigneeName},{children:[s.ownerName,":"]}))]})),a.jsxs("span",e.__assign({className:o.default.tooltipAssigneeCount},{children:["x"," ",s.reminderCount+s.escalationCount]}))]}),s.ownerId)})}))]})):"",slotProps:{tooltip:{sx:{bgcolor:"#F8FAFC",color:"#0F172A",borderRadius:"8px",boxShadow:"0px 4px 12px rgba(15, 23, 42, 0.12)",p:0,maxWidth:"none"}},arrow:{sx:{color:"#FFFFFF"}}}},{children:a.jsxs("div",e.__assign({className:"".concat(o.default.dayCell).concat(f?" ".concat(o.default.dayCellPast):"").concat(h?" ".concat(o.default.dayCellToday):"")},{children:[a.jsx("span",e.__assign({className:"".concat(o.default.dayNumber," ").concat(g?o.default.dayNumberCurrent:o.default.dayNumberOutside)},{children:c.getDate()})),a.jsx("div",e.__assign({className:o.default.indicatorWrapper},{children:p.map(function(e,s){return a.jsx("span",{className:"".concat(o.default.indicatorDot).concat(0!==s?" ".concat(o.default.indicatorDotOverlap):""),style:{backgroundColor:e.ownerColor,zIndex:s+1}},e.ownerId)})}))]}))}),d)})})),a.jsx("div",e.__assign({className:o.default.legendWrapper},{children:a.jsxs("div",e.__assign({className:o.default.legendInner},{children:[a.jsxs("div",e.__assign({className:"".concat(o.default.legendItem," ").concat(o.default.legendItemAssignee1),onClick:function(e){x("assignee1")}},{children:[a.jsx(l.Checkbox,{checked:null==m?void 0:m.assignee1,size:"small",disableRipple:!0,onClick:function(e){return e.stopPropagation()},onChange:function(){return x("assignee1")},icon:a.jsx("div",{className:o.default.checkboxIconUnchecked}),checkedIcon:a.jsx("div",e.__assign({className:"".concat(o.default.checkboxIconChecked," ").concat(o.default.checkboxIconCheckedAssignee1)},{children:a.jsx("svg",e.__assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 10",fill:"none",className:o.default.checkboxCheckSvg},{children:a.jsx("path",{d:"M1 5L4.2 8L11 1",stroke:"#C11574",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})}))})),sx:{padding:0}}),a.jsx("span",e.__assign({className:"".concat(o.default.legendLabel," ").concat(o.default.legendLabelAssignee1)},{children:"Assignee 1"}))]})),a.jsxs("div",e.__assign({className:"".concat(o.default.legendItem," ").concat(o.default.legendItemAssignee2),onClick:function(e){x("assignee2")}},{children:[a.jsx(l.Checkbox,{checked:null==m?void 0:m.assignee2,size:"small",disableRipple:!0,onClick:function(e){return e.stopPropagation()},onChange:function(){return x("assignee2")},icon:a.jsx("div",{className:o.default.checkboxIconUnchecked}),checkedIcon:a.jsx("div",e.__assign({className:"".concat(o.default.checkboxIconChecked," ").concat(o.default.checkboxIconCheckedAssignee2)},{children:a.jsx("svg",e.__assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 10",fill:"none",className:o.default.checkboxCheckSvg},{children:a.jsx("path",{d:"M1 5L4.2 8L11 1",stroke:"#3538CD",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})}))})),sx:{padding:0}}),a.jsx("span",e.__assign({className:"".concat(o.default.legendLabel," ").concat(o.default.legendLabelAssignee2)},{children:"Assignee 2"}))]})),a.jsxs("div",e.__assign({className:"".concat(o.default.legendItem," ").concat(o.default.legendItemAssignee3),onClick:function(e){x("assignee3")}},{children:[a.jsx(l.Checkbox,{checked:null==m?void 0:m.assignee3,size:"small",disableRipple:!0,onClick:function(e){return e.stopPropagation()},onChange:function(){return x("assignee3")},icon:a.jsx("div",{className:o.default.checkboxIconUnchecked}),checkedIcon:a.jsx("div",e.__assign({className:"".concat(o.default.checkboxIconChecked," ").concat(o.default.checkboxIconCheckedAssignee3)},{children:a.jsx("svg",e.__assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 10",fill:"none",className:o.default.checkboxCheckSvg},{children:a.jsx("path",{d:"M1 5L4.2 8L11 1",stroke:"#FF6058",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})}))})),sx:{padding:0}}),a.jsx("span",e.__assign({className:"".concat(o.default.legendLabel," ").concat(o.default.legendLabelAssignee3)},{children:"Assignee 3"}))]}))]}))})),a.jsxs("div",e.__assign({className:o.default.bottomLegend},{children:[a.jsxs("div",e.__assign({className:o.default.bottomLegendItem},{children:[a.jsx("div",{className:"".concat(o.default.bottomLegendSwatch," ").concat(o.default.bottomLegendSwatchPast)}),a.jsx("span",e.__assign({className:o.default.bottomLegendLabel},{children:"Past Dates"}))]})),a.jsxs("div",e.__assign({className:o.default.bottomLegendItem},{children:[a.jsx("div",{className:"".concat(o.default.bottomLegendSwatch," ").concat(o.default.bottomLegendSwatchFailed)}),a.jsx("span",e.__assign({className:o.default.bottomLegendLabel},{children:"Reminder Failed"}))]}))]}))]}))};
|
|
2
|
+
//# sourceMappingURL=AssigneeCalendarView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AssigneeCalendarView.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const a=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;a&&e.setAttribute("nonce",a),e.appendChild(document.createTextNode(".ManageRemainder-module_mrContainer__kVgxT{align-items:center;display:flex;flex-direction:column;gap:1rem;justify-content:center;margin-top:1rem}.ManageRemainder-module_mrSectionBox__bEDtY{border:1px solid #b6c1ca;border-radius:10px;cursor:pointer;display:flex;flex-direction:column;gap:.75rem;padding:.75rem;width:100%}.ManageRemainder-module_mrSectionHeader__5k1HQ{display:flex;flex-direction:column;gap:.25rem}.ManageRemainder-module_mrSectionHeaderContent__eKJWh{display:flex;flex-direction:row;gap:.5rem;justify-content:space-between;width:100%}.ManageRemainder-module_mrSectionHeaderLeft__I-hzD{display:flex;flex-direction:column;gap:.25rem}.ManageRemainder-module_mrSectionHeaderRight__W-BY3{align-items:center;display:flex;gap:.25rem;justify-content:flex-start}.ManageRemainder-module_mrSectionTitleWrapper__NA6i-{align-items:center;display:flex;gap:.5rem}.ManageRemainder-module_mrSectionTitleIcon__6pWZz{align-items:center;display:flex;height:.75rem;justify-content:center;width:.75rem}.ManageRemainder-module_mrSectionTitle__BPAU2{color:#334155;font-size:.875rem;font-weight:600}.ManageRemainder-module_mrSectionDescription__HdkjC{color:#334155;font-size:.75rem;font-weight:400}.ManageRemainder-module_mrIconSmall__kbiWd{color:#334155;height:.75rem;width:.75rem}.ManageRemainder-module_mrIconInfo__U8Ylz{color:#64748b;height:1rem;width:1rem}.ManageRemainder-module_mrIconArrow__wMp9q{stroke:#334155;height:.75rem;width:.75rem}.ManageRemainder-module_mrIconAction__l9uVi{height:1rem;width:1rem}.ManageRemainder-module_mrIconPreview__oYo84{stroke:#64748b;height:1rem;width:1rem}.ManageRemainder-module_mrIconCalendar__2gaaf{color:#1e293b;height:1.25rem;width:1.25rem}.ManageRemainder-module_mrIconChevronToggle__LjUy1{color:#4f46e5;height:1rem;position:fixed;width:1rem}.ManageRemainder-module_mrIconDropdown__-heGj{height:.75rem;width:.75rem}.ManageRemainder-module_mrIconSuccess__EMJrR{color:#16a34a;height:1.5rem;width:1.5rem}.ManageRemainder-module_mrChevronButton__QKLsI{align-items:center;display:flex;justify-content:center}.ManageRemainder-module_mrChevronIcon__CxLkq{height:1.25rem;transition:transform .2s ease;width:1.25rem}.ManageRemainder-module_mrChevronIcon__CxLkq.ManageRemainder-module_mrChevronRotated__NL7Ho{transform:rotate(180deg)}.ManageRemainder-module_mrSuccessMessage__4N0gO{align-items:center;display:inline-flex;flex-direction:column;gap:.75rem;width:100%}.ManageRemainder-module_mrSuccessIcon__PsybU{align-items:center;background-color:#dcfce7;border-radius:9999px;box-shadow:0 0 0 4px #fff;display:flex;height:3rem;justify-content:center;width:3rem}.ManageRemainder-module_mrSuccessIconInner__yEl8-{height:1.5rem;position:relative;width:1.5rem}.ManageRemainder-module_mrSuccessText__-hXJh{align-items:center;display:flex;flex-direction:column;gap:.25rem;text-align:center}.ManageRemainder-module_mrSuccessTitle__Zakof{color:#166534;font-size:1rem;font-weight:500;line-height:1.5}.ManageRemainder-module_mrSuccessDescription__-r7A8{color:#22c55e;font-size:.875rem;font-weight:400;line-height:1.25}.ManageRemainder-module_mrRecipientsSection__L0f1k{display:flex;flex-direction:column;gap:.5rem}.ManageRemainder-module_mrRecipientsLabel__Escta{color:#3f3f46;font-size:.75rem;font-weight:500}.ManageRemainder-module_mrRecipientsGrid__-7giX{display:flex;flex-wrap:wrap;gap:.75rem;margin-bottom:.75rem}.ManageRemainder-module_mrRecipientItem__C0uw5{align-items:center;background-color:#fff;border:1px solid #cbd5e1;border-radius:.375rem;display:flex;gap:.5rem;padding:.25rem .5rem}.ManageRemainder-module_mrRecipientInfo__djuEp{align-items:center;display:flex;gap:.5rem}.ManageRemainder-module_mrRecipientAvatar__g6YDo{align-items:center;border-radius:9999px;display:flex;font-size:.6875rem;font-weight:500;height:1.5rem;justify-content:center;width:1.5rem}.ManageRemainder-module_mrRecipientName__gFCJU{color:#3f3f46;font-size:.875rem}.ManageRemainder-module_mrCheckboxUnchecked__j0wYE{background-color:#fff;border:1px solid #d0d5dd;border-radius:.25rem;height:1rem;width:1rem}.ManageRemainder-module_mrCheckboxChecked__TowNb{align-items:center;background-color:#fff;border:1px solid #6938ef;border-radius:.25rem;display:flex;height:1rem;justify-content:center;width:1rem}.ManageRemainder-module_mrCheckboxIcon__RVL-V{height:.625rem;width:.625rem}.ManageRemainder-module_mrActionsSection__in30u{display:flex;gap:.75rem}.ManageRemainder-module_mrActionButton__x9IEC{align-items:center;border:none;border-radius:.375rem;cursor:pointer;display:flex;flex:1;font-size:.875rem;font-weight:500;gap:.5rem;height:2.25rem;justify-content:center}.ManageRemainder-module_mrActionButtonSecondary__GBvpQ{background-color:#fff;border:1px solid #a5b4fc;color:#4f46e5}.ManageRemainder-module_mrActionButtonSecondary__GBvpQ:hover{background-color:#f3f4f6}.ManageRemainder-module_mrActionButtonPrimary__vRNbF{background-color:#4f46e5;color:#fff}.ManageRemainder-module_mrActionButtonPrimary__vRNbF:hover{background-color:#4338ca}.ManageRemainder-module_mrMainContent__2gAUU{display:flex;flex-direction:row;gap:1.75rem;width:100%}.ManageRemainder-module_mrEscalationContainer__V4PfB{background-color:#ffffffb3;border-radius:10px;display:flex;flex:1;flex-direction:column;gap:.75rem;min-width:0;outline:1px solid #b6c1ca;outline-offset:-1px;padding:.75rem}.ManageRemainder-module_mrEscalationHeaderWrapper__vOg2K{cursor:pointer;display:flex;flex-direction:column;gap:.25rem;justify-content:space-between}.ManageRemainder-module_mrEscalationHeader__sV-tw{align-items:center;display:flex;gap:.5rem;justify-content:space-between}.ManageRemainder-module_mrEscalationTitleWrapper__G90xv{align-items:center;display:flex;gap:.5rem}.ManageRemainder-module_mrEscalationTitleText__X233z{color:#3f3f46;font-size:.875rem;font-weight:600;line-height:1.25}.ManageRemainder-module_mrTooltipIcon__QpPGO{height:1rem;overflow:hidden;position:relative;width:1rem}.ManageRemainder-module_mrEscalationActions__RoHhx{align-items:center;display:flex;gap:.5rem}.ManageRemainder-module_mrEscalationPreviewButton__68J90{align-items:center;background-color:#fff;border:none;border-radius:1.29rem;box-shadow:0 1px 2px 0 #0000000d;cursor:pointer;display:flex;gap:.375rem;height:1.75rem;outline:.54px solid #d1d5db;outline-offset:-.54px;padding:.375rem .875rem}.ManageRemainder-module_mrEscalationPreviewIcon__KNa9K{height:1rem;overflow:hidden;position:relative;width:1rem}.ManageRemainder-module_mrEscalationPreviewText__FM5S5{color:#6b7280;font-size:.75rem;font-weight:400;line-height:1rem}.ManageRemainder-module_mrEscalationDescription__z-3q8{color:#334155;font-size:.75rem;font-weight:400}.ManageRemainder-module_mrReorderGroup__sLaAn{display:flex;flex-direction:column;gap:1.5rem}.ManageRemainder-module_mrReminderItem__kwd0b{display:flex;gap:1rem;justify-content:space-between;width:100%}.ManageRemainder-module_mrReminderLabelBox__KRi5V{display:flex;flex-shrink:0;justify-content:center;width:90px}.ManageRemainder-module_mrReminderLabelInner__GuTh-{align-items:center;display:flex}.ManageRemainder-module_mrReminderContent__yKbGS{align-items:center;display:flex;gap:1rem;width:100%}.ManageRemainder-module_mrDragHandle__4Lz8t{align-items:center;cursor:grab;display:flex;gap:.75rem}.ManageRemainder-module_mrReminderBox__ur54z{border-radius:.75rem;padding:.5rem;width:100%}.ManageRemainder-module_mrReminderFields__yQROF{display:flex;flex-direction:column;flex-wrap:wrap;gap:1rem;width:100%}.ManageRemainder-module_mrReminderHeader__wMUF6{align-items:flex-start;display:flex;gap:1rem;justify-content:space-between;width:100%}.ManageRemainder-module_mrReminderAssignee__0p1Gb{align-items:center;display:flex;gap:.75rem}.ManageRemainder-module_mrReminderAvatar__6KM5V{align-items:center;background-color:#dbeafe;border-radius:9999px;display:flex;height:1.75rem;justify-content:center;width:1.75rem}.ManageRemainder-module_mrReminderInitials__bUFkd{color:#1e40af;font-size:.625rem;font-weight:500}.ManageRemainder-module_mrReminderName__zjceM{color:#1f2937;font-size:.75rem;font-weight:500}.ManageRemainder-module_mrReminderStatement__7Y0B-{border-radius:9999px;display:flex;padding:.5rem .75rem}.ManageRemainder-module_mrReminderStatementText__LodbK{font-size:.625rem;font-weight:500;letter-spacing:-.01em}.ManageRemainder-module_mrReminderDateFields__GT4N9{align-items:flex-start;display:flex;gap:1.5rem;width:100%}.ManageRemainder-module_mrReminderField__XBiO4{width:100%}.ManageRemainder-module_mrReminderFieldLabel__S9dXV{color:#3f3f46;font-size:.75rem;font-weight:500;margin-bottom:.25rem}.ManageRemainder-module_mrReminderDatePicker__Vgbui{align-items:center;box-shadow:0 1px 2px 0 #0000000d;color:#3f3f46;display:flex;font-size:.75rem;gap:.75rem;height:1.75rem;justify-content:space-between}.ManageRemainder-module_mrReminderDueDate__7nawQ{align-items:center;background-color:#f1f5f9;border:.5px solid #cbd5e1;border-radius:0;color:#64748b;display:flex;font-size:.75rem;height:1.75rem;padding:0 .75rem}.ManageRemainder-module_mrReminderFrequency__Qq1qa{align-items:center;display:flex;gap:.5rem}.ManageRemainder-module_mrReminderFrequencyText__lGfl0{color:#374151;font-size:.75rem}.ManageRemainder-module_mrEscalationCheckbox__xZrG3{align-items:flex-start;border:1px solid #e5e7eb;border-radius:.25rem;color:#3f3f46;display:flex;flex-direction:column;font-size:.75rem;font-weight:500;gap:.5rem;padding:.5rem;width:100%}.ManageRemainder-module_mrEscalationCheckboxHeader__1GgFB{align-items:flex-start;display:flex;gap:.5rem;justify-content:flex-start;width:100%}.ManageRemainder-module_mrEscalationContent__ItAyr{display:flex;flex-direction:column;gap:.5rem;overflow:hidden;width:100%}.ManageRemainder-module_mrEscalationCondition__4GCeD{color:#3f3f46;font-family:Inter,sans-serif;font-size:.75rem;font-weight:500;line-height:1;margin-top:.75rem;width:100%}.ManageRemainder-module_mrEscalationFields__oFHp-{align-items:flex-end;display:flex;flex-wrap:wrap;gap:1.5rem;gap:.625rem;width:100%}.ManageRemainder-module_mrEscalationFieldGroup__uES3-{display:flex;flex:1;gap:.75rem;min-width:130px}.ManageRemainder-module_mrEscalationFieldGroupLarge__MpVYP{flex:1;min-width:265px}.ManageRemainder-module_mrEscalationFieldGroupSmall__FFbRJ{display:flex;flex:1;min-width:88px}.ManageRemainder-module_mrEscalationFieldText__n7EfI{color:#3f3f46;font-family:Inter,sans-serif;font-size:.75rem;font-weight:500;line-height:1.5;min-width:152px}.ManageRemainder-module_mrDropdownButton__9wvGh{align-items:center;cursor:pointer;display:flex;justify-content:center}.ManageRemainder-module_mrCalendarPanel__PnMpt{flex-shrink:0;position:relative}.ManageRemainder-module_mrCalendarCollapsed__mb-bI{background-color:#fff;border:1px solid #b6c1ca;border-radius:10px;display:flex;height:100%;justify-content:center;padding-top:281px;width:43px}.ManageRemainder-module_mrCalendarToggle__9HIet{align-items:center;background:none;border:none;cursor:pointer;display:flex;height:3rem;justify-content:center;left:-26px;position:absolute;top:50%;transform:translateY(-50%);width:2.25rem;z-index:10}@media (max-width:1024px){.ManageRemainder-module_mrMainContent__2gAUU{flex-direction:column;gap:1rem}.ManageRemainder-module_mrCalendarPanel__PnMpt{width:100%}.ManageRemainder-module_mrCalendarToggle__9HIet{display:none}}@media (max-width:768px){.ManageRemainder-module_mrContainer__kVgxT{gap:.5rem;margin-top:.5rem}.ManageRemainder-module_mrSectionBox__bEDtY{gap:.5rem;padding:.5rem}.ManageRemainder-module_mrActionsSection__in30u,.ManageRemainder-module_mrSectionHeaderContent__eKJWh{flex-direction:column}.ManageRemainder-module_mrActionButton__x9IEC{height:2rem}.ManageRemainder-module_mrReminderDateFields__GT4N9{flex-direction:column;gap:1rem}.ManageRemainder-module_mrReminderContent__yKbGS,.ManageRemainder-module_mrReminderItem__kwd0b{gap:.5rem}.ManageRemainder-module_mrEscalationFields__oFHp-{flex-direction:column}.ManageRemainder-module_mrEscalationFieldGroupLarge__MpVYP,.ManageRemainder-module_mrEscalationFieldGroupSmall__FFbRJ,.ManageRemainder-module_mrEscalationFieldGroup__uES3-{min-width:100%;width:100%}.ManageRemainder-module_mrEscalationFieldText__n7EfI{min-width:auto}.ManageRemainder-module_mrReminderLabelBox__KRi5V{width:100%}}button:focus{outline:2px solid #4f46e5;outline-offset:2px}button:active{opacity:.9}.ManageRemainder-module_mrHiddenSection__c67oj{overflow:hidden}.ManageRemainder-module_mrNoPointerEvents__OQbav{pointer-events:none}.ManageRemainder-module_mrPointerEventsAuto__0avRT{pointer-events:auto}.ManageRemainder-module_calendarContainer__N804t{background-color:#fff;border:1px solid #b6c1ca;border-radius:8px;height:100%;min-width:345px;padding:16px}.ManageRemainder-module_calendarHeader__BjE9o{align-items:center;display:flex;gap:6px;margin-bottom:24px}.ManageRemainder-module_calendarHeaderTitle__U8NmV{align-items:center;color:#334155;display:flex;font-size:14px;font-weight:600;gap:6px;line-height:20px}.ManageRemainder-module_calendarHeaderInfo__s05VQ{height:16px;width:16px}.ManageRemainder-module_monthNav__FBbyi{align-items:center;display:flex;justify-content:space-between;margin-bottom:24px}.ManageRemainder-module_monthNavBtn__oor7V{align-items:center;background:none;border:1px solid #dce0e5;border-radius:8px;cursor:pointer;display:flex;justify-content:center;padding:8px}.ManageRemainder-module_monthNavTitle__zgDDq{color:#14181f;font-size:15px;font-weight:600;margin:0}.ManageRemainder-module_weekdayHeader__XciP8{display:grid;grid-template-columns:repeat(7,1fr);margin-bottom:8px}.ManageRemainder-module_weekdayLabel__dDWJo{color:#6f7c8e;font-size:15px;font-weight:400;text-align:center}.ManageRemainder-module_dayGrid__dT0og{display:grid;gap:8px 11px;grid-template-columns:repeat(7,1fr);margin-top:16px}.ManageRemainder-module_dayCell__AGx-w{align-items:center;border-radius:8px;cursor:pointer;display:flex;flex-direction:column;height:35px;justify-content:center}.ManageRemainder-module_dayCellPast__91hbu{background-color:#daf7d2}.ManageRemainder-module_dayCellToday__q8Wvi{border:2px solid #4f46e5}.ManageRemainder-module_dayNumber__6yOVW{font-size:14px}.ManageRemainder-module_dayNumberCurrent__6ML9j{color:#0f172a}.ManageRemainder-module_dayNumberOutside__JQ-t7{color:#94a3b8}.ManageRemainder-module_indicatorWrapper__5FOym{align-items:center;display:flex}.ManageRemainder-module_indicatorDot__ElweF{border-radius:50%;height:6px;width:6px}.ManageRemainder-module_indicatorDotOverlap__QPBRy{margin-left:-1px}.ManageRemainder-module_tooltipContent__ErzOu{background-color:#f8fafc;border-radius:8px;min-width:120px;padding:8px}.ManageRemainder-module_tooltipHeader__Q4qHO{border-bottom:1px solid #cbd5e1;margin-bottom:4px;padding-bottom:4px}.ManageRemainder-module_tooltipTitle__iZtI4{color:#0f172a;font-size:10px;font-weight:500;line-height:16px}.ManageRemainder-module_tooltipDate__ulMaQ{color:#334155;font-size:8px;font-weight:400;line-height:16px}.ManageRemainder-module_tooltipAssignees__jGc-Y{display:flex;flex-direction:column;gap:2px}.ManageRemainder-module_tooltipAssigneeRow__nzr3m{align-items:center;display:flex;gap:12px;justify-content:space-between}.ManageRemainder-module_tooltipAssigneeInfo__vIXTP{align-items:center;display:flex;gap:4px}.ManageRemainder-module_tooltipAssigneeDot__yz6E6{border-radius:50%;height:8px;width:8px}.ManageRemainder-module_tooltipAssigneeName__JJbid{color:#0f172a;font-size:9px;font-weight:400;line-height:16px}.ManageRemainder-module_tooltipAssigneeCount__49OVk{color:#0f172a;font-size:9px;font-weight:500;line-height:16px}.ManageRemainder-module_legendWrapper__OfxhE{align-items:flex-start;display:flex;flex-wrap:wrap;gap:6px;justify-content:center;margin-top:38px}.ManageRemainder-module_legendInner__iwIe7{align-items:flex-start;display:flex;gap:6px}.ManageRemainder-module_legendItem__zbxBG{align-items:center;border-radius:4px;cursor:pointer;display:flex;gap:4px;padding:4px 8px;width:100%}.ManageRemainder-module_legendItemAssignee1__I6F-D{background-color:#fdf2f8;border:1px solid #be185d}.ManageRemainder-module_legendItemAssignee2__YObVW{background-color:#eef2ff;border:1px solid #4338ca}.ManageRemainder-module_legendItemAssignee3__uCkBW{background-color:#fff7ed;border:1px solid #f87171;justify-content:center}.ManageRemainder-module_legendLabel__Va4Sw{font-size:12px;font-weight:500}.ManageRemainder-module_legendLabelAssignee1__vG-F4{color:#be185d}.ManageRemainder-module_legendLabelAssignee2__CbGVb{color:#4338ca}.ManageRemainder-module_legendLabelAssignee3__cz-57{color:#f87171}.ManageRemainder-module_checkboxIconUnchecked__xoI0S{background-color:#fff;border:1px solid #d0d5dd;border-radius:4px;height:16px;width:16px}.ManageRemainder-module_checkboxIconChecked__Y3mN2{align-items:center;background-color:#fff;border-radius:4px;display:flex;height:16px;justify-content:center;width:16px}.ManageRemainder-module_checkboxIconCheckedAssignee1__817aZ{border:1px solid #c11574}.ManageRemainder-module_checkboxIconCheckedAssignee2__hTAKp{border:1px solid #3538cd}.ManageRemainder-module_checkboxIconCheckedAssignee3__hQwwN{border:1px solid #ff6058}.ManageRemainder-module_checkboxCheckSvg__R87mg{height:10px;width:10px}.ManageRemainder-module_bottomLegend__rRzkt{align-items:center;display:inline-flex;gap:24px;margin-left:4px;margin-top:16px}.ManageRemainder-module_bottomLegendItem__u90vA{align-items:center;display:flex;gap:4px}.ManageRemainder-module_bottomLegendSwatch__9uu1M{border-radius:2px;height:12px;width:12px}.ManageRemainder-module_bottomLegendSwatchPast__-DcRZ{background-color:#daf7d2}.ManageRemainder-module_bottomLegendSwatchFailed__9lK2I{background-color:#fecaca}.ManageRemainder-module_bottomLegendLabel__9eDD-{color:#334155;font-size:12px;font-weight:500}"));const n=document.head||document.getElementsByTagName("head")[0]||document.documentElement;n&&n.appendChild(e)}(),exports.default={mrContainer:"ManageRemainder-module_mrContainer__kVgxT",mrSectionBox:"ManageRemainder-module_mrSectionBox__bEDtY",mrSectionHeader:"ManageRemainder-module_mrSectionHeader__5k1HQ",mrSectionHeaderContent:"ManageRemainder-module_mrSectionHeaderContent__eKJWh",mrSectionHeaderLeft:"ManageRemainder-module_mrSectionHeaderLeft__I-hzD",mrSectionHeaderRight:"ManageRemainder-module_mrSectionHeaderRight__W-BY3",mrSectionTitleWrapper:"ManageRemainder-module_mrSectionTitleWrapper__NA6i-",mrSectionTitleIcon:"ManageRemainder-module_mrSectionTitleIcon__6pWZz",mrSectionTitle:"ManageRemainder-module_mrSectionTitle__BPAU2",mrSectionDescription:"ManageRemainder-module_mrSectionDescription__HdkjC",mrIconSmall:"ManageRemainder-module_mrIconSmall__kbiWd",mrIconInfo:"ManageRemainder-module_mrIconInfo__U8Ylz",mrIconArrow:"ManageRemainder-module_mrIconArrow__wMp9q",mrIconAction:"ManageRemainder-module_mrIconAction__l9uVi",mrIconPreview:"ManageRemainder-module_mrIconPreview__oYo84",mrIconCalendar:"ManageRemainder-module_mrIconCalendar__2gaaf",mrIconChevronToggle:"ManageRemainder-module_mrIconChevronToggle__LjUy1",mrIconDropdown:"ManageRemainder-module_mrIconDropdown__-heGj",mrIconSuccess:"ManageRemainder-module_mrIconSuccess__EMJrR",mrChevronButton:"ManageRemainder-module_mrChevronButton__QKLsI",mrChevronIcon:"ManageRemainder-module_mrChevronIcon__CxLkq",mrChevronRotated:"ManageRemainder-module_mrChevronRotated__NL7Ho",mrSuccessMessage:"ManageRemainder-module_mrSuccessMessage__4N0gO",mrSuccessIcon:"ManageRemainder-module_mrSuccessIcon__PsybU",mrSuccessIconInner:"ManageRemainder-module_mrSuccessIconInner__yEl8-",mrSuccessText:"ManageRemainder-module_mrSuccessText__-hXJh",mrSuccessTitle:"ManageRemainder-module_mrSuccessTitle__Zakof",mrSuccessDescription:"ManageRemainder-module_mrSuccessDescription__-r7A8",mrHiddenSection:"ManageRemainder-module_mrHiddenSection__c67oj",mrRecipientsSection:"ManageRemainder-module_mrRecipientsSection__L0f1k",mrRecipientsLabel:"ManageRemainder-module_mrRecipientsLabel__Escta",mrRecipientsGrid:"ManageRemainder-module_mrRecipientsGrid__-7giX",mrRecipientItem:"ManageRemainder-module_mrRecipientItem__C0uw5",mrRecipientInfo:"ManageRemainder-module_mrRecipientInfo__djuEp",mrRecipientAvatar:"ManageRemainder-module_mrRecipientAvatar__g6YDo",mrRecipientName:"ManageRemainder-module_mrRecipientName__gFCJU",mrCheckboxUnchecked:"ManageRemainder-module_mrCheckboxUnchecked__j0wYE",mrCheckboxChecked:"ManageRemainder-module_mrCheckboxChecked__TowNb",mrCheckboxIcon:"ManageRemainder-module_mrCheckboxIcon__RVL-V",mrActionsSection:"ManageRemainder-module_mrActionsSection__in30u",mrActionButton:"ManageRemainder-module_mrActionButton__x9IEC",mrActionButtonSecondary:"ManageRemainder-module_mrActionButtonSecondary__GBvpQ",mrActionButtonPrimary:"ManageRemainder-module_mrActionButtonPrimary__vRNbF",mrMainContent:"ManageRemainder-module_mrMainContent__2gAUU",mrEscalationContainer:"ManageRemainder-module_mrEscalationContainer__V4PfB",mrEscalationHeaderWrapper:"ManageRemainder-module_mrEscalationHeaderWrapper__vOg2K",mrEscalationHeader:"ManageRemainder-module_mrEscalationHeader__sV-tw",mrEscalationTitleWrapper:"ManageRemainder-module_mrEscalationTitleWrapper__G90xv",mrEscalationTitleText:"ManageRemainder-module_mrEscalationTitleText__X233z",mrTooltipIcon:"ManageRemainder-module_mrTooltipIcon__QpPGO",mrEscalationActions:"ManageRemainder-module_mrEscalationActions__RoHhx",mrEscalationPreviewButton:"ManageRemainder-module_mrEscalationPreviewButton__68J90",mrEscalationPreviewIcon:"ManageRemainder-module_mrEscalationPreviewIcon__KNa9K",mrEscalationPreviewText:"ManageRemainder-module_mrEscalationPreviewText__FM5S5",mrEscalationDescription:"ManageRemainder-module_mrEscalationDescription__z-3q8",mrReorderGroup:"ManageRemainder-module_mrReorderGroup__sLaAn",mrReminderItem:"ManageRemainder-module_mrReminderItem__kwd0b",mrReminderLabelBox:"ManageRemainder-module_mrReminderLabelBox__KRi5V",mrReminderLabelInner:"ManageRemainder-module_mrReminderLabelInner__GuTh-",mrReminderContent:"ManageRemainder-module_mrReminderContent__yKbGS",mrDragHandle:"ManageRemainder-module_mrDragHandle__4Lz8t",mrReminderBox:"ManageRemainder-module_mrReminderBox__ur54z",mrReminderFields:"ManageRemainder-module_mrReminderFields__yQROF",mrReminderHeader:"ManageRemainder-module_mrReminderHeader__wMUF6",mrReminderAssignee:"ManageRemainder-module_mrReminderAssignee__0p1Gb",mrReminderAvatar:"ManageRemainder-module_mrReminderAvatar__6KM5V",mrReminderInitials:"ManageRemainder-module_mrReminderInitials__bUFkd",mrReminderName:"ManageRemainder-module_mrReminderName__zjceM",mrReminderStatement:"ManageRemainder-module_mrReminderStatement__7Y0B-",mrReminderStatementText:"ManageRemainder-module_mrReminderStatementText__LodbK",mrReminderDateFields:"ManageRemainder-module_mrReminderDateFields__GT4N9",mrReminderField:"ManageRemainder-module_mrReminderField__XBiO4",mrReminderFieldLabel:"ManageRemainder-module_mrReminderFieldLabel__S9dXV",mrReminderDatePicker:"ManageRemainder-module_mrReminderDatePicker__Vgbui",mrReminderDueDate:"ManageRemainder-module_mrReminderDueDate__7nawQ",mrReminderFrequency:"ManageRemainder-module_mrReminderFrequency__Qq1qa",mrReminderFrequencyText:"ManageRemainder-module_mrReminderFrequencyText__lGfl0",mrEscalationCheckbox:"ManageRemainder-module_mrEscalationCheckbox__xZrG3",mrEscalationCheckboxHeader:"ManageRemainder-module_mrEscalationCheckboxHeader__1GgFB",mrEscalationContent:"ManageRemainder-module_mrEscalationContent__ItAyr",mrEscalationCondition:"ManageRemainder-module_mrEscalationCondition__4GCeD",mrEscalationFields:"ManageRemainder-module_mrEscalationFields__oFHp-",mrEscalationFieldGroup:"ManageRemainder-module_mrEscalationFieldGroup__uES3-",mrEscalationFieldGroupLarge:"ManageRemainder-module_mrEscalationFieldGroupLarge__MpVYP",mrEscalationFieldGroupSmall:"ManageRemainder-module_mrEscalationFieldGroupSmall__FFbRJ",mrEscalationFieldText:"ManageRemainder-module_mrEscalationFieldText__n7EfI",mrDropdownButton:"ManageRemainder-module_mrDropdownButton__9wvGh",mrCalendarPanel:"ManageRemainder-module_mrCalendarPanel__PnMpt",mrCalendarCollapsed:"ManageRemainder-module_mrCalendarCollapsed__mb-bI",mrCalendarToggle:"ManageRemainder-module_mrCalendarToggle__9HIet",mrNoPointerEvents:"ManageRemainder-module_mrNoPointerEvents__OQbav",mrPointerEventsAuto:"ManageRemainder-module_mrPointerEventsAuto__0avRT",calendarContainer:"ManageRemainder-module_calendarContainer__N804t",calendarHeader:"ManageRemainder-module_calendarHeader__BjE9o",calendarHeaderTitle:"ManageRemainder-module_calendarHeaderTitle__U8NmV",calendarHeaderInfo:"ManageRemainder-module_calendarHeaderInfo__s05VQ",monthNav:"ManageRemainder-module_monthNav__FBbyi",monthNavBtn:"ManageRemainder-module_monthNavBtn__oor7V",monthNavTitle:"ManageRemainder-module_monthNavTitle__zgDDq",weekdayHeader:"ManageRemainder-module_weekdayHeader__XciP8",weekdayLabel:"ManageRemainder-module_weekdayLabel__dDWJo",dayGrid:"ManageRemainder-module_dayGrid__dT0og",dayCell:"ManageRemainder-module_dayCell__AGx-w",dayCellPast:"ManageRemainder-module_dayCellPast__91hbu",dayCellToday:"ManageRemainder-module_dayCellToday__q8Wvi",dayNumber:"ManageRemainder-module_dayNumber__6yOVW",dayNumberCurrent:"ManageRemainder-module_dayNumberCurrent__6ML9j",dayNumberOutside:"ManageRemainder-module_dayNumberOutside__JQ-t7",indicatorWrapper:"ManageRemainder-module_indicatorWrapper__5FOym",indicatorDot:"ManageRemainder-module_indicatorDot__ElweF",indicatorDotOverlap:"ManageRemainder-module_indicatorDotOverlap__QPBRy",tooltipContent:"ManageRemainder-module_tooltipContent__ErzOu",tooltipHeader:"ManageRemainder-module_tooltipHeader__Q4qHO",tooltipTitle:"ManageRemainder-module_tooltipTitle__iZtI4",tooltipDate:"ManageRemainder-module_tooltipDate__ulMaQ",tooltipAssignees:"ManageRemainder-module_tooltipAssignees__jGc-Y",tooltipAssigneeRow:"ManageRemainder-module_tooltipAssigneeRow__nzr3m",tooltipAssigneeInfo:"ManageRemainder-module_tooltipAssigneeInfo__vIXTP",tooltipAssigneeDot:"ManageRemainder-module_tooltipAssigneeDot__yz6E6",tooltipAssigneeName:"ManageRemainder-module_tooltipAssigneeName__JJbid",tooltipAssigneeCount:"ManageRemainder-module_tooltipAssigneeCount__49OVk",legendWrapper:"ManageRemainder-module_legendWrapper__OfxhE",legendInner:"ManageRemainder-module_legendInner__iwIe7",legendItem:"ManageRemainder-module_legendItem__zbxBG",legendItemAssignee1:"ManageRemainder-module_legendItemAssignee1__I6F-D",legendItemAssignee2:"ManageRemainder-module_legendItemAssignee2__YObVW",legendItemAssignee3:"ManageRemainder-module_legendItemAssignee3__uCkBW",legendLabel:"ManageRemainder-module_legendLabel__Va4Sw",legendLabelAssignee1:"ManageRemainder-module_legendLabelAssignee1__vG-F4",legendLabelAssignee2:"ManageRemainder-module_legendLabelAssignee2__CbGVb",legendLabelAssignee3:"ManageRemainder-module_legendLabelAssignee3__cz-57",checkboxIconUnchecked:"ManageRemainder-module_checkboxIconUnchecked__xoI0S",checkboxIconChecked:"ManageRemainder-module_checkboxIconChecked__Y3mN2",checkboxIconCheckedAssignee1:"ManageRemainder-module_checkboxIconCheckedAssignee1__817aZ",checkboxIconCheckedAssignee2:"ManageRemainder-module_checkboxIconCheckedAssignee2__hTAKp",checkboxIconCheckedAssignee3:"ManageRemainder-module_checkboxIconCheckedAssignee3__hQwwN",checkboxCheckSvg:"ManageRemainder-module_checkboxCheckSvg__R87mg",bottomLegend:"ManageRemainder-module_bottomLegend__rRzkt",bottomLegendItem:"ManageRemainder-module_bottomLegendItem__u90vA",bottomLegendSwatch:"ManageRemainder-module_bottomLegendSwatch__9uu1M",bottomLegendSwatchPast:"ManageRemainder-module_bottomLegendSwatchPast__-DcRZ",bottomLegendSwatchFailed:"ManageRemainder-module_bottomLegendSwatchFailed__9lK2I",bottomLegendLabel:"ManageRemainder-module_bottomLegendLabel__9eDD-"};
|
|
2
|
+
//# sourceMappingURL=ManageRemainder.module.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ManageRemainder.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|