From b6ac6a51dfb1ddb034b46802844e95c58ff6e8b9 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 26 Apr 2026 20:07:00 +0000 Subject: [PATCH 1/5] analysis: Sparrow-vF per-location PM hours-reduction reports Generated 21 location-specific provider productivity reports plus a master index. Each report shows revenue/collections per provider hour, utilization, and provider hours per provider, with recommended hour reductions to bring under-utilized providers to a 75% utilization floor for the upcoming week. https://claude.ai/code/session_011mrFF85hLbU1FCwW9jHmaB --- reports/Avelure-Buffalo.md | 54 ++++++++++++++++++++++++++ reports/Avelure-Creve_Coeur.md | 57 +++++++++++++++++++++++++++ reports/Avelure-Grand_Rapids.md | 55 ++++++++++++++++++++++++++ reports/Avelure-Greenwood.md | 54 ++++++++++++++++++++++++++ reports/Avelure-Indy.md | 60 +++++++++++++++++++++++++++++ reports/Avelure-Novi.md | 45 ++++++++++++++++++++++ reports/Avelure-OFallon.md | 61 +++++++++++++++++++++++++++++ reports/Avelure-Ocala.md | 51 ++++++++++++++++++++++++ reports/Avelure-Rochester.md | 59 ++++++++++++++++++++++++++++ reports/Avelure-Sunset_Hills.md | 56 +++++++++++++++++++++++++++ reports/Avelure-Waterford.md | 42 ++++++++++++++++++++ reports/Avelure-Zona_Rosa.md | 54 ++++++++++++++++++++++++++ reports/Curate_Knoxville.md | 61 +++++++++++++++++++++++++++++ reports/Curate_Nashville.md | 54 ++++++++++++++++++++++++++ reports/Ever-Body-Bethesda_Row.md | 51 ++++++++++++++++++++++++ reports/Ever-Body-Gaithersburg.md | 51 ++++++++++++++++++++++++ reports/Ever-Body-Hartford.md | 62 ++++++++++++++++++++++++++++++ reports/Ever-Body-North_Haven.md | 54 ++++++++++++++++++++++++++ reports/Ever-Body-South_Windsor.md | 52 +++++++++++++++++++++++++ reports/H-MD-Chisholm_Creek.md | 50 ++++++++++++++++++++++++ reports/H-MD-Tulsa.md | 55 ++++++++++++++++++++++++++ reports/_INDEX.md | 31 +++++++++++++++ 22 files changed, 1169 insertions(+) create mode 100644 reports/Avelure-Buffalo.md create mode 100644 reports/Avelure-Creve_Coeur.md create mode 100644 reports/Avelure-Grand_Rapids.md create mode 100644 reports/Avelure-Greenwood.md create mode 100644 reports/Avelure-Indy.md create mode 100644 reports/Avelure-Novi.md create mode 100644 reports/Avelure-OFallon.md create mode 100644 reports/Avelure-Ocala.md create mode 100644 reports/Avelure-Rochester.md create mode 100644 reports/Avelure-Sunset_Hills.md create mode 100644 reports/Avelure-Waterford.md create mode 100644 reports/Avelure-Zona_Rosa.md create mode 100644 reports/Curate_Knoxville.md create mode 100644 reports/Curate_Nashville.md create mode 100644 reports/Ever-Body-Bethesda_Row.md create mode 100644 reports/Ever-Body-Gaithersburg.md create mode 100644 reports/Ever-Body-Hartford.md create mode 100644 reports/Ever-Body-North_Haven.md create mode 100644 reports/Ever-Body-South_Windsor.md create mode 100644 reports/H-MD-Chisholm_Creek.md create mode 100644 reports/H-MD-Tulsa.md create mode 100644 reports/_INDEX.md diff --git a/reports/Avelure-Buffalo.md b/reports/Avelure-Buffalo.md new file mode 100644 index 0000000..c5b7ab8 --- /dev/null +++ b/reports/Avelure-Buffalo.md @@ -0,0 +1,54 @@ +# Avelure-Buffalo — Provider Hour Productivity Report +*Period: 4 weeks ending 4/20/2026 | Generated 4/26/2026* + +## Location Snapshot (matches dashboard) + +| Metric | Past Week (4/20) | Last 4 Weeks | Prior 4 Weeks | 4w Δ | +|---|---|---|---|---| +| Provider Hours (sched) | 158.0 | 546.0 | 354.0 | 192.0 (54.2%) | +| Utilization % | 86.4% | 86.3% | 84.9% | 1.4pp | +| Revenue | $24,995 | $102,696 | $80,233 | $22,463 | +| Collections | $16,884 | $33,243 | $12,551 | $20,691 | +| Revenue / Provider Hour | $158.20 | $188.09 | $226.65 | $-38.56 | +| Collections / Provider Hour | $106.86 | $60.88 | $35.46 | $25.43 | + +## By Provider — Last 4 Weeks (3/30 – 4/20) +*Rev/h and Coll/h below reflect provider-attributed dollars only.* + +| Provider | Hrs/wk | Booked/wk | Util% | Rev/h (attrib) | Coll/h (attrib) | +|---|---|---|---|---|---| +| Michelle Nagel | 32.6 | 22.3 | 68.3% | $142.38 | $5.30 | +| Brenda Miller-Garlitz | 30.3 | 25.1 | 82.6% | $181.18 | $10.67 | +| Amanda Lopez | 27.5 | 25.1 | 91.1% | $159.14 | $8.41 | +| Anna Snyder | 23.6 | 21.6 | 91.6% | $151.84 | $0.95 | +| Brittany Bennett | 10.3 | 11.6 | 113.2% | $194.55 | $29.57 | + +## By Provider — Past Week (W/E 4/20) + +| Provider | Hrs | Booked | Util% | Rev/h | Coll/h | +|---|---|---|---|---|---| +| Michelle Nagel | 36.0 | 28.2 | 78.3% | $243.72 | $17.56 | +| Brenda Miller-Garlitz | 36.0 | 27.3 | 75.7% | $196.17 | $16.52 | +| Amanda Lopez | 25.0 | 28.8 | 115.0% | $174.28 | $18.00 | +| Brittany Bennett | 16.0 | 13.0 | 81.3% | $232.06 | $75.78 | + +## Trend by Provider (last 4w vs prior 4w) + +| Provider | Hrs/wk Δ | Util Δpp | Rev/h Δ | Coll/h Δ | +|---|---|---|---|---| +| Michelle Nagel | 16.4 | -36.4pp | $-36.07 | $-18.90 | +| Brenda Miller-Garlitz | 8.4 | -7.5pp | $-15.29 | $-2.82 | +| Amanda Lopez | 2.8 | 12.9pp | $-121.44 | $-52.04 | +| Anna Snyder | 1.5 | -5.2pp | $-54.41 | $-9.31 | +| Brittany Bennett | 4.0 | 57.1pp | $-19.73 | $-33.13 | + +## Recommended Hour Reductions for Upcoming Week + +*Method: bring each under-75% provider down to a 75% utilization floor at their current booked-hour pattern. Adjust for known PTO/onboarding before applying.* + +| Provider | Current Hrs/wk | 4w Util% | 4w Coll/h (attrib) | **Cut (hrs/wk)** | Cut % | +|---|---|---|---|---|---| +| Michelle Nagel | 32.6 | 68.3% | $5.30 | **2.9** | 8.9% | +| **TOTAL** | | | | **2.9** | | + +**Target for next week: reduce ~3 provider hours at this location.** diff --git a/reports/Avelure-Creve_Coeur.md b/reports/Avelure-Creve_Coeur.md new file mode 100644 index 0000000..45c5e1b --- /dev/null +++ b/reports/Avelure-Creve_Coeur.md @@ -0,0 +1,57 @@ +# Avelure-Creve Coeur — Provider Hour Productivity Report +*Period: 4 weeks ending 4/20/2026 | Generated 4/26/2026* + +## Location Snapshot (matches dashboard) + +| Metric | Past Week (4/20) | Last 4 Weeks | Prior 4 Weeks | 4w Δ | +|---|---|---|---|---| +| Provider Hours (sched) | 87.0 | 363.6 | 345.0 | 18.6 (5.4%) | +| Utilization % | 66.4% | 67.5% | 76.5% | -9.0pp | +| Revenue | $18,426 | $77,674 | $75,979 | $1,695 | +| Collections | $9,516 | $39,113 | $29,869 | $9,244 | +| Revenue / Provider Hour | $211.79 | $213.62 | $220.23 | $-6.60 | +| Collections / Provider Hour | $109.38 | $107.57 | $86.58 | $20.99 | + +## By Provider — Last 4 Weeks (3/30 – 4/20) +*Rev/h and Coll/h below reflect provider-attributed dollars only.* + +| Provider | Hrs/wk | Booked/wk | Util% | Rev/h (attrib) | Coll/h (attrib) | +|---|---|---|---|---|---| +| Allie Godare | 33.4 | 24.6 | 73.6% | $204.98 | $58.66 | +| Presley White | 29.0 | 18.9 | 65.2% | $166.43 | $31.83 | +| Christine N. Bradshaw | 19.1 | 12.1 | 63.1% | $140.37 | $30.23 | +| Raina Murray | 6.8 | 4.2 | 62.7% | $0.00 | $0.00 | +| Tara Hertweck | 2.1 | 1.1 | 53.9% | $104.24 | $67.65 | + +## By Provider — Past Week (W/E 4/20) + +| Provider | Hrs | Booked | Util% | Rev/h | Coll/h | +|---|---|---|---|---|---| +| Allie Godare | 33.3 | 24.0 | 72.0% | $236.39 | $54.16 | +| Presley White | 35.0 | 20.5 | 58.6% | $212.69 | $55.11 | +| Christine N. Bradshaw | 16.7 | 11.9 | 71.5% | $153.63 | $6.00 | + +## Trend by Provider (last 4w vs prior 4w) + +| Provider | Hrs/wk Δ | Util Δpp | Rev/h Δ | Coll/h Δ | +|---|---|---|---|---| +| Allie Godare | 7.9 | -16.6pp | $-2.56 | $-11.27 | +| Presley White | 1.9 | -6.7pp | $-59.92 | $-71.84 | +| Christine N. Bradshaw | 4.0 | -17.3pp | $-79.91 | $-7.98 | +| Raina Murray | 4.5 | -4.9pp | $-333.89 | $-270.67 | +| Tara Hertweck | -0.1 | -35.0pp | $-108.43 | $20.42 | + +## Recommended Hour Reductions for Upcoming Week + +*Method: bring each under-75% provider down to a 75% utilization floor at their current booked-hour pattern. Adjust for known PTO/onboarding before applying.* + +| Provider | Current Hrs/wk | 4w Util% | 4w Coll/h (attrib) | **Cut (hrs/wk)** | Cut % | +|---|---|---|---|---|---| +| Presley White | 29.0 | 65.2% | $31.83 | **3.8** | 13.0% | +| Christine N. Bradshaw | 19.1 | 63.1% | $30.23 | **3.0** | 15.9% | +| Raina Murray | 6.8 | 62.7% | $0.00 | **1.1** | 16.4% | +| Allie Godare | 33.4 | 73.6% | $58.66 | **0.6** | 1.9% | +| Tara Hertweck | 2.1 | 53.9% | $67.65 | **0.6** | 28.2% | +| **TOTAL** | | | | **9.2** | | + +**Target for next week: reduce ~9 provider hours at this location.** diff --git a/reports/Avelure-Grand_Rapids.md b/reports/Avelure-Grand_Rapids.md new file mode 100644 index 0000000..6432b8d --- /dev/null +++ b/reports/Avelure-Grand_Rapids.md @@ -0,0 +1,55 @@ +# Avelure-Grand Rapids — Provider Hour Productivity Report +*Period: 4 weeks ending 4/20/2026 | Generated 4/26/2026* + +## Location Snapshot (matches dashboard) + +| Metric | Past Week (4/20) | Last 4 Weeks | Prior 4 Weeks | 4w Δ | +|---|---|---|---|---| +| Provider Hours (sched) | 89.7 | 369.0 | 253.0 | 116.0 (45.8%) | +| Utilization % | 64.4% | 64.1% | 85.1% | -21.0pp | +| Revenue | $20,724 | $76,708 | $68,478 | $8,230 | +| Collections | $12,318 | $44,793 | $32,075 | $12,718 | +| Revenue / Provider Hour | $231.04 | $207.88 | $270.66 | $-62.78 | +| Collections / Provider Hour | $137.32 | $121.39 | $126.78 | $-5.39 | + +## By Provider — Last 4 Weeks (3/30 – 4/20) +*Rev/h and Coll/h below reflect provider-attributed dollars only.* + +| Provider | Hrs/wk | Booked/wk | Util% | Rev/h (attrib) | Coll/h (attrib) | +|---|---|---|---|---|---| +| Macie L. Kolbe | 26.3 | 18.3 | 69.5% | $218.09 | $60.53 | +| Brooke Sluiter | 25.2 | 18.1 | 71.8% | $56.18 | $13.48 | +| Alicia M. Larsen | 21.8 | 11.8 | 54.1% | $170.97 | $45.76 | +| Kimberly S. VanderVeen | 19.2 | 10.6 | 55.2% | $106.37 | $51.09 | + +## By Provider — Past Week (W/E 4/20) + +| Provider | Hrs | Booked | Util% | Rev/h | Coll/h | +|---|---|---|---|---|---| +| Macie L. Kolbe | 25.3 | 19.3 | 76.6% | $291.84 | $70.32 | +| Brooke Sluiter | 20.7 | 17.8 | 85.9% | $273.63 | $65.65 | +| Alicia M. Larsen | 23.7 | 14.3 | 60.2% | $214.79 | $130.49 | +| Kimberly S. VanderVeen | 20.8 | 6.8 | 32.9% | $96.67 | $53.01 | + +## Trend by Provider (last 4w vs prior 4w) + +| Provider | Hrs/wk Δ | Util Δpp | Rev/h Δ | Coll/h Δ | +|---|---|---|---|---| +| Macie L. Kolbe | 6.0 | -18.7pp | $-39.34 | $-48.87 | +| Brooke Sluiter | 4.9 | -8.9pp | $56.18 | $13.48 | +| Alicia M. Larsen | 10.6 | -23.3pp | $-129.55 | $-112.89 | +| Kimberly S. VanderVeen | 5.2 | -32.9pp | $-110.38 | $-52.27 | + +## Recommended Hour Reductions for Upcoming Week + +*Method: bring each under-75% provider down to a 75% utilization floor at their current booked-hour pattern. Adjust for known PTO/onboarding before applying.* + +| Provider | Current Hrs/wk | 4w Util% | 4w Coll/h (attrib) | **Cut (hrs/wk)** | Cut % | +|---|---|---|---|---|---| +| Alicia M. Larsen | 21.8 | 54.1% | $45.76 | **6.1** | 27.8% | +| Kimberly S. VanderVeen | 19.2 | 55.2% | $51.09 | **5.1** | 26.4% | +| Macie L. Kolbe | 26.3 | 69.5% | $60.53 | **1.9** | 7.3% | +| Brooke Sluiter | 25.2 | 71.8% | $13.48 | **1.1** | 4.2% | +| **TOTAL** | | | | **14.1** | | + +**Target for next week: reduce ~14 provider hours at this location.** diff --git a/reports/Avelure-Greenwood.md b/reports/Avelure-Greenwood.md new file mode 100644 index 0000000..7b7a957 --- /dev/null +++ b/reports/Avelure-Greenwood.md @@ -0,0 +1,54 @@ +# Avelure-Greenwood — Provider Hour Productivity Report +*Period: 4 weeks ending 4/20/2026 | Generated 4/26/2026* + +## Location Snapshot (matches dashboard) + +| Metric | Past Week (4/20) | Last 4 Weeks | Prior 4 Weeks | 4w Δ | +|---|---|---|---|---| +| Provider Hours (sched) | 102.0 | 370.0 | 341.0 | 29.0 (8.5%) | +| Utilization % | 42.2% | 53.5% | 40.7% | 12.8pp | +| Revenue | $11,766 | $55,333 | $41,362 | $13,971 | +| Collections | $5,333 | $31,278 | $26,799 | $4,479 | +| Revenue / Provider Hour | $115.35 | $149.55 | $121.30 | $28.25 | +| Collections / Provider Hour | $52.28 | $84.53 | $78.59 | $5.94 | + +## By Provider — Last 4 Weeks (3/30 – 4/20) +*Rev/h and Coll/h below reflect provider-attributed dollars only.* + +| Provider | Hrs/wk | Booked/wk | Util% | Rev/h (attrib) | Coll/h (attrib) | +|---|---|---|---|---|---| +| Nichelle Harlan | 32.1 | 16.2 | 50.5% | $91.87 | $70.04 | +| Skye Fierstos | 30.5 | 17.2 | 56.4% | $129.38 | $65.11 | +| Brittney Miller | 19.5 | 10.4 | 53.4% | $141.64 | $53.61 | +| Thanh H. Nguyen | 4.9 | 2.6 | 53.8% | $163.49 | $76.85 | + +## By Provider — Past Week (W/E 4/20) + +| Provider | Hrs | Booked | Util% | Rev/h | Coll/h | +|---|---|---|---|---|---| +| Nichelle Harlan | 28.0 | 10.6 | 37.8% | $84.54 | $37.50 | +| Skye Fierstos | 36.0 | 16.6 | 46.1% | $157.56 | $70.49 | +| Brittney Miller | 19.0 | 7.8 | 41.2% | $128.00 | $23.68 | + +## Trend by Provider (last 4w vs prior 4w) + +| Provider | Hrs/wk Δ | Util Δpp | Rev/h Δ | Coll/h Δ | +|---|---|---|---|---| +| Nichelle Harlan | 1.6 | 8.5pp | $-14.84 | $-15.88 | +| Skye Fierstos | -0.3 | 12.5pp | $-25.22 | $-12.55 | +| Brittney Miller | -0.5 | 19.0pp | $37.72 | $-27.90 | +| Thanh H. Nguyen | 0.9 | 16.3pp | $105.49 | $70.10 | + +## Recommended Hour Reductions for Upcoming Week + +*Method: bring each under-75% provider down to a 75% utilization floor at their current booked-hour pattern. Adjust for known PTO/onboarding before applying.* + +| Provider | Current Hrs/wk | 4w Util% | 4w Coll/h (attrib) | **Cut (hrs/wk)** | Cut % | +|---|---|---|---|---|---| +| Nichelle Harlan | 32.1 | 50.5% | $70.04 | **10.5** | 32.6% | +| Skye Fierstos | 30.5 | 56.4% | $65.11 | **7.6** | 24.8% | +| Brittney Miller | 19.5 | 53.4% | $53.61 | **5.6** | 28.8% | +| Thanh H. Nguyen | 4.9 | 53.8% | $76.85 | **1.4** | 28.3% | +| **TOTAL** | | | | **25.0** | | + +**Target for next week: reduce ~25 provider hours at this location.** diff --git a/reports/Avelure-Indy.md b/reports/Avelure-Indy.md new file mode 100644 index 0000000..0ddb975 --- /dev/null +++ b/reports/Avelure-Indy.md @@ -0,0 +1,60 @@ +# Avelure-Indy — Provider Hour Productivity Report +*Period: 4 weeks ending 4/20/2026 | Generated 4/26/2026* + +## Location Snapshot (matches dashboard) + +| Metric | Past Week (4/20) | Last 4 Weeks | Prior 4 Weeks | 4w Δ | +|---|---|---|---|---| +| Provider Hours (sched) | 101.0 | 383.0 | 335.0 | 48.0 (14.3%) | +| Utilization % | 59.0% | 64.8% | 88.1% | -23.4pp | +| Revenue | $18,489 | $72,793 | $70,809 | $1,984 | +| Collections | $10,615 | $34,372 | $28,372 | $6,000 | +| Revenue / Provider Hour | $183.06 | $190.06 | $211.37 | $-21.31 | +| Collections / Provider Hour | $105.10 | $89.74 | $84.69 | $5.05 | + +## By Provider — Last 4 Weeks (3/30 – 4/20) +*Rev/h and Coll/h below reflect provider-attributed dollars only.* + +| Provider | Hrs/wk | Booked/wk | Util% | Rev/h (attrib) | Coll/h (attrib) | +|---|---|---|---|---|---| +| Cassandra Utecht | 33.3 | 21.9 | 65.6% | $163.81 | $36.00 | +| Hannah N. Buchanan | 31.8 | 20.0 | 63.1% | $148.50 | $80.22 | +| Shauntel Tarry | 24.3 | 14.3 | 58.9% | $113.35 | $53.35 | +| Paige Young | 5.0 | 4.3 | 84.3% | $189.02 | $70.65 | +| Thanh H. Nguyen | 3.1 | 2.8 | 88.6% | $243.63 | $135.92 | +| Skye Fierstos | 2.3 | 1.2 | 51.9% | $75.22 | $0.00 | + +## By Provider — Past Week (W/E 4/20) + +| Provider | Hrs | Booked | Util% | Rev/h | Coll/h | +|---|---|---|---|---|---| +| Cassandra Utecht | 32.0 | 17.5 | 54.7% | $128.13 | $42.19 | +| Hannah N. Buchanan | 34.0 | 18.9 | 55.6% | $169.35 | $84.93 | +| Shauntel Tarry | 32.0 | 18.6 | 58.1% | $177.41 | $125.78 | +| Paige Young | 4.2 | 3.5 | 83.9% | $260.43 | $53.96 | +| Thanh H. Nguyen | 6.5 | 5.6 | 85.8% | $240.77 | $142.15 | + +## Trend by Provider (last 4w vs prior 4w) + +| Provider | Hrs/wk Δ | Util Δpp | Rev/h Δ | Coll/h Δ | +|---|---|---|---|---| +| Cassandra Utecht | 8.4 | -38.8pp | $-49.16 | $-41.58 | +| Hannah N. Buchanan | 4.1 | -8.0pp | $-69.57 | $-19.29 | +| Shauntel Tarry | 10.3 | -6.4pp | $-60.54 | $-44.35 | +| Paige Young | -6.0 | -18.7pp | $-55.11 | $35.37 | +| Thanh H. Nguyen | -1.4 | -1.6pp | $15.80 | $42.53 | +| Skye Fierstos | 2.3 | 51.9pp | $75.22 | $0.00 | + +## Recommended Hour Reductions for Upcoming Week + +*Method: bring each under-75% provider down to a 75% utilization floor at their current booked-hour pattern. Adjust for known PTO/onboarding before applying.* + +| Provider | Current Hrs/wk | 4w Util% | 4w Coll/h (attrib) | **Cut (hrs/wk)** | Cut % | +|---|---|---|---|---|---| +| Shauntel Tarry | 24.3 | 58.9% | $53.35 | **5.2** | 21.4% | +| Hannah N. Buchanan | 31.8 | 63.1% | $80.22 | **5.0** | 15.8% | +| Cassandra Utecht | 33.3 | 65.6% | $36.00 | **4.2** | 12.5% | +| Skye Fierstos | 2.3 | 51.9% | $0.00 | **0.7** | 30.8% | +| **TOTAL** | | | | **15.1** | | + +**Target for next week: reduce ~15 provider hours at this location.** diff --git a/reports/Avelure-Novi.md b/reports/Avelure-Novi.md new file mode 100644 index 0000000..79ace4a --- /dev/null +++ b/reports/Avelure-Novi.md @@ -0,0 +1,45 @@ +# Avelure-Novi — Provider Hour Productivity Report +*Period: 4 weeks ending 4/20/2026 | Generated 4/26/2026* + +## Location Snapshot (matches dashboard) + +| Metric | Past Week (4/20) | Last 4 Weeks | Prior 4 Weeks | 4w Δ | +|---|---|---|---|---| +| Provider Hours (sched) | 29.5 | 163.4 | 220.0 | -56.6 (-25.7%) | +| Utilization % | 106.2% | 105.2% | 115.6% | -10.4pp | +| Revenue | $10,869 | $49,445 | $53,290 | $-3,845 | +| Collections | $3,326 | $16,334 | $14,419 | $1,915 | +| Revenue / Provider Hour | $368.44 | $302.60 | $242.23 | $60.37 | +| Collections / Provider Hour | $112.75 | $99.96 | $65.54 | $34.42 | + +## By Provider — Last 4 Weeks (3/30 – 4/20) +*Rev/h and Coll/h below reflect provider-attributed dollars only.* + +| Provider | Hrs/wk | Booked/wk | Util% | Rev/h (attrib) | Coll/h (attrib) | +|---|---|---|---|---|---| +| Jessica L. Moore | 31.2 | 30.0 | 96.1% | $246.09 | $77.44 | +| Whitney Miles | 7.6 | 5.2 | 68.6% | $169.37 | $23.77 | + +## By Provider — Past Week (W/E 4/20) + +| Provider | Hrs | Booked | Util% | Rev/h | Coll/h | +|---|---|---|---|---|---| +| Jessica L. Moore | 29.5 | 31.3 | 106.2% | $364.27 | $108.56 | + +## Trend by Provider (last 4w vs prior 4w) + +| Provider | Hrs/wk Δ | Util Δpp | Rev/h Δ | Coll/h Δ | +|---|---|---|---|---| +| Jessica L. Moore | 1.2 | -9.8pp | $-39.16 | $-4.69 | +| Whitney Miles | -10.7 | -66.4pp | $-74.24 | $-11.50 | + +## Recommended Hour Reductions for Upcoming Week + +*Method: bring each under-75% provider down to a 75% utilization floor at their current booked-hour pattern. Adjust for known PTO/onboarding before applying.* + +| Provider | Current Hrs/wk | 4w Util% | 4w Coll/h (attrib) | **Cut (hrs/wk)** | Cut % | +|---|---|---|---|---|---| +| Whitney Miles | 7.6 | 68.6% | $23.77 | **0.7** | 8.6% | +| **TOTAL** | | | | **0.7** | | + +**Target for next week: reduce ~1 provider hours at this location.** diff --git a/reports/Avelure-OFallon.md b/reports/Avelure-OFallon.md new file mode 100644 index 0000000..8e0bed5 --- /dev/null +++ b/reports/Avelure-OFallon.md @@ -0,0 +1,61 @@ +# Avelure-O'Fallon — Provider Hour Productivity Report +*Period: 4 weeks ending 4/20/2026 | Generated 4/26/2026* + +## Location Snapshot (matches dashboard) + +| Metric | Past Week (4/20) | Last 4 Weeks | Prior 4 Weeks | 4w Δ | +|---|---|---|---|---| +| Provider Hours (sched) | 86.5 | 365.5 | 260.0 | 105.5 (40.6%) | +| Utilization % | 54.2% | 52.7% | 54.5% | -1.7pp | +| Revenue | $13,469 | $56,290 | $46,655 | $9,635 | +| Collections | $12,722 | $33,104 | $19,503 | $13,601 | +| Revenue / Provider Hour | $155.71 | $154.01 | $179.44 | $-25.43 | +| Collections / Provider Hour | $147.08 | $90.57 | $75.01 | $15.56 | + +## By Provider — Last 4 Weeks (3/30 – 4/20) +*Rev/h and Coll/h below reflect provider-attributed dollars only.* + +| Provider | Hrs/wk | Booked/wk | Util% | Rev/h (attrib) | Coll/h (attrib) | +|---|---|---|---|---|---| +| Monica Duncan | 29.6 | 17.9 | 60.3% | $165.36 | $61.69 | +| Raina Murray | 23.2 | 13.4 | 57.9% | $130.74 | $58.99 | +| Ashley Heuermann | 19.5 | 8.4 | 43.0% | $105.38 | $23.45 | +| Amanda Okorie | 11.5 | 4.6 | 39.5% | $50.05 | $0.00 | +| Corina Conder | 3.5 | 1.6 | 46.4% | $289.00 | $0.00 | +| Haley Fox | 0.3 | 0.3 | 100.0% | $0.00 | $0.00 | + +## By Provider — Past Week (W/E 4/20) + +| Provider | Hrs | Booked | Util% | Rev/h | Coll/h | +|---|---|---|---|---|---| +| Monica Duncan | 31.0 | 14.8 | 47.8% | $215.16 | $98.73 | +| Raina Murray | 28.3 | 18.9 | 67.0% | $208.25 | $48.64 | +| Amanda Okorie | 8.0 | 4.0 | 50.0% | $43.38 | $0.00 | +| Corina Conder | 6.0 | 1.5 | 25.0% | $51.67 | $0.00 | +| Haley Fox | 1.0 | 1.0 | 100.0% | $0.00 | $0.00 | + +## Trend by Provider (last 4w vs prior 4w) + +| Provider | Hrs/wk Δ | Util Δpp | Rev/h Δ | Coll/h Δ | +|---|---|---|---|---| +| Monica Duncan | 8.8 | 2.1pp | $-49.41 | $-38.04 | +| Raina Murray | 1.4 | 6.1pp | $-59.60 | $-12.31 | +| Ashley Heuermann | 2.8 | -11.2pp | $-20.30 | $-8.83 | +| Amanda Okorie | 7.9 | -25.2pp | $-85.39 | $-117.18 | +| Corina Conder | 0.0 | 8.4pp | $174.29 | $-65.29 | +| Haley Fox | 0.3 | 100.0pp | $0.00 | $0.00 | + +## Recommended Hour Reductions for Upcoming Week + +*Method: bring each under-75% provider down to a 75% utilization floor at their current booked-hour pattern. Adjust for known PTO/onboarding before applying.* + +| Provider | Current Hrs/wk | 4w Util% | 4w Coll/h (attrib) | **Cut (hrs/wk)** | Cut % | +|---|---|---|---|---|---| +| Ashley Heuermann | 19.5 | 43.0% | $23.45 | **8.3** | 42.6% | +| Monica Duncan | 29.6 | 60.3% | $61.69 | **5.8** | 19.6% | +| Amanda Okorie | 11.5 | 39.5% | $0.00 | **5.5** | 47.3% | +| Raina Murray | 23.2 | 57.9% | $58.99 | **5.3** | 22.8% | +| Corina Conder | 3.5 | 46.4% | $0.00 | **1.3** | 38.1% | +| **TOTAL** | | | | **26.2** | | + +**Target for next week: reduce ~26 provider hours at this location.** diff --git a/reports/Avelure-Ocala.md b/reports/Avelure-Ocala.md new file mode 100644 index 0000000..fb265f8 --- /dev/null +++ b/reports/Avelure-Ocala.md @@ -0,0 +1,51 @@ +# Avelure-Ocala — Provider Hour Productivity Report +*Period: 4 weeks ending 4/20/2026 | Generated 4/26/2026* + +## Location Snapshot (matches dashboard) + +| Metric | Past Week (4/20) | Last 4 Weeks | Prior 4 Weeks | 4w Δ | +|---|---|---|---|---| +| Provider Hours (sched) | 94.0 | 372.0 | 376.0 | -4.0 (-1.1%) | +| Utilization % | 58.0% | 53.0% | 53.7% | -0.6pp | +| Revenue | $20,537 | $78,833 | $75,032 | $3,801 | +| Collections | $16,427 | $44,177 | $25,263 | $18,914 | +| Revenue / Provider Hour | $218.48 | $211.92 | $199.55 | $12.36 | +| Collections / Provider Hour | $174.76 | $118.76 | $67.19 | $51.57 | + +## By Provider — Last 4 Weeks (3/30 – 4/20) +*Rev/h and Coll/h below reflect provider-attributed dollars only.* + +| Provider | Hrs/wk | Booked/wk | Util% | Rev/h (attrib) | Coll/h (attrib) | +|---|---|---|---|---|---| +| Destiny St. Leger | 31.0 | 14.4 | 46.3% | $175.21 | $41.79 | +| Frances K. Mitchell | 31.0 | 16.7 | 53.8% | $200.60 | $71.88 | +| Natalie Boren | 31.0 | 18.3 | 58.9% | $168.95 | $24.06 | + +## By Provider — Past Week (W/E 4/20) + +| Provider | Hrs | Booked | Util% | Rev/h | Coll/h | +|---|---|---|---|---|---| +| Destiny St. Leger | 32.0 | 20.2 | 63.0% | $245.38 | $39.45 | +| Frances K. Mitchell | 30.0 | 16.5 | 55.0% | $220.53 | $40.42 | +| Natalie Boren | 32.0 | 17.8 | 55.7% | $181.66 | $23.28 | + +## Trend by Provider (last 4w vs prior 4w) + +| Provider | Hrs/wk Δ | Util Δpp | Rev/h Δ | Coll/h Δ | +|---|---|---|---|---| +| Destiny St. Leger | 0.0 | -4.8pp | $-11.25 | $-21.31 | +| Frances K. Mitchell | -1.0 | -0.3pp | $-11.69 | $-10.11 | +| Natalie Boren | 0.0 | 3.5pp | $-28.53 | $-26.80 | + +## Recommended Hour Reductions for Upcoming Week + +*Method: bring each under-75% provider down to a 75% utilization floor at their current booked-hour pattern. Adjust for known PTO/onboarding before applying.* + +| Provider | Current Hrs/wk | 4w Util% | 4w Coll/h (attrib) | **Cut (hrs/wk)** | Cut % | +|---|---|---|---|---|---| +| Destiny St. Leger | 31.0 | 46.3% | $41.79 | **11.9** | 38.3% | +| Frances K. Mitchell | 31.0 | 53.8% | $71.88 | **8.8** | 28.2% | +| Natalie Boren | 31.0 | 58.9% | $24.06 | **6.7** | 21.5% | +| **TOTAL** | | | | **27.3** | | + +**Target for next week: reduce ~27 provider hours at this location.** diff --git a/reports/Avelure-Rochester.md b/reports/Avelure-Rochester.md new file mode 100644 index 0000000..b8d8022 --- /dev/null +++ b/reports/Avelure-Rochester.md @@ -0,0 +1,59 @@ +# Avelure-Rochester — Provider Hour Productivity Report +*Period: 4 weeks ending 4/20/2026 | Generated 4/26/2026* + +## Location Snapshot (matches dashboard) + +| Metric | Past Week (4/20) | Last 4 Weeks | Prior 4 Weeks | 4w Δ | +|---|---|---|---|---| +| Provider Hours (sched) | 119.0 | 514.9 | 485.0 | 29.9 (6.2%) | +| Utilization % | 63.0% | 66.1% | 73.0% | -6.8pp | +| Revenue | $28,674 | $121,168 | $77,838 | $43,330 | +| Collections | $15,300 | $49,574 | $31,486 | $18,088 | +| Revenue / Provider Hour | $240.96 | $235.32 | $160.49 | $74.83 | +| Collections / Provider Hour | $128.57 | $96.28 | $64.92 | $31.36 | + +## By Provider — Last 4 Weeks (3/30 – 4/20) +*Rev/h and Coll/h below reflect provider-attributed dollars only.* + +| Provider | Hrs/wk | Booked/wk | Util% | Rev/h (attrib) | Coll/h (attrib) | +|---|---|---|---|---|---| +| Katelyn Dang | 34.1 | 19.7 | 57.9% | $147.90 | $31.57 | +| Stephanie Lareau | 29.6 | 18.4 | 62.3% | $148.45 | $26.96 | +| Elizabeth Walker | 29.3 | 22.7 | 77.6% | $312.16 | $147.31 | +| Ashley Ortiz | 17.3 | 11.4 | 66.3% | $232.90 | $88.77 | +| Lisa Arbore | 14.3 | 9.5 | 66.5% | $200.09 | $82.21 | +| Kaitlin Kennedy | 4.0 | 2.8 | 69.3% | $102.50 | $0.00 | + +## By Provider — Past Week (W/E 4/20) + +| Provider | Hrs | Booked | Util% | Rev/h | Coll/h | +|---|---|---|---|---|---| +| Katelyn Dang | 33.3 | 17.9 | 53.8% | $213.92 | $101.35 | +| Stephanie Lareau | 32.0 | 19.7 | 61.5% | $172.75 | $61.25 | +| Elizabeth Walker | 29.7 | 21.6 | 72.7% | $409.00 | $238.37 | +| Lisa Arbore | 23.0 | 15.2 | 66.0% | $163.39 | $92.93 | + +## Trend by Provider (last 4w vs prior 4w) + +| Provider | Hrs/wk Δ | Util Δpp | Rev/h Δ | Coll/h Δ | +|---|---|---|---|---| +| Katelyn Dang | 14.8 | 22.6pp | $58.41 | $28.19 | +| Stephanie Lareau | -6.1 | 30.8pp | $71.43 | $15.67 | +| Elizabeth Walker | -1.7 | 8.1pp | $86.84 | $40.87 | +| Ashley Ortiz | -3.9 | 6.1pp | $10.47 | $-29.76 | +| Lisa Arbore | -1.3 | 14.2pp | $21.77 | $-10.00 | +| Kaitlin Kennedy | 0.0 | 22.9pp | $-26.75 | $-28.13 | + +## Recommended Hour Reductions for Upcoming Week + +*Method: bring each under-75% provider down to a 75% utilization floor at their current booked-hour pattern. Adjust for known PTO/onboarding before applying.* + +| Provider | Current Hrs/wk | 4w Util% | 4w Coll/h (attrib) | **Cut (hrs/wk)** | Cut % | +|---|---|---|---|---|---| +| Katelyn Dang | 34.1 | 57.9% | $31.57 | **7.8** | 22.8% | +| Stephanie Lareau | 29.6 | 62.3% | $26.96 | **5.0** | 17.0% | +| Ashley Ortiz | 17.3 | 66.3% | $88.77 | **2.0** | 11.6% | +| Lisa Arbore | 14.3 | 66.5% | $82.21 | **1.6** | 11.4% | +| **TOTAL** | | | | **16.4** | | + +**Target for next week: reduce ~16 provider hours at this location.** diff --git a/reports/Avelure-Sunset_Hills.md b/reports/Avelure-Sunset_Hills.md new file mode 100644 index 0000000..ee1e7ec --- /dev/null +++ b/reports/Avelure-Sunset_Hills.md @@ -0,0 +1,56 @@ +# Avelure-Sunset Hills — Provider Hour Productivity Report +*Period: 4 weeks ending 4/20/2026 | Generated 4/26/2026* + +## Location Snapshot (matches dashboard) + +| Metric | Past Week (4/20) | Last 4 Weeks | Prior 4 Weeks | 4w Δ | +|---|---|---|---|---| +| Provider Hours (sched) | 122.0 | 369.5 | 188.0 | 181.5 (96.5%) | +| Utilization % | 51.8% | 62.2% | 82.4% | -20.2pp | +| Revenue | $19,042 | $68,705 | $40,766 | $27,939 | +| Collections | $15,621 | $47,437 | $9,971 | $37,466 | +| Revenue / Provider Hour | $156.08 | $185.94 | $216.84 | $-30.90 | +| Collections / Provider Hour | $128.04 | $128.38 | $53.04 | $75.34 | + +## By Provider — Last 4 Weeks (3/30 – 4/20) +*Rev/h and Coll/h below reflect provider-attributed dollars only.* + +| Provider | Hrs/wk | Booked/wk | Util% | Rev/h (attrib) | Coll/h (attrib) | +|---|---|---|---|---|---| +| Nyesha Nicholson | 31.5 | 22.7 | 72.1% | $207.27 | $41.81 | +| Madison Hunsaker | 29.3 | 15.0 | 51.1% | $102.23 | $7.45 | +| Madeline Huguelet | 16.4 | 12.8 | 77.9% | $180.78 | $28.55 | +| Haley Fox | 11.5 | 2.4 | 20.8% | $71.13 | $51.36 | +| Jennifer Fallert | 5.5 | 4.7 | 84.9% | $343.38 | $0.00 | + +## By Provider — Past Week (W/E 4/20) + +| Provider | Hrs | Booked | Util% | Rev/h | Coll/h | +|---|---|---|---|---|---| +| Nyesha Nicholson | 33.0 | 21.1 | 63.9% | $204.21 | $35.74 | +| Madison Hunsaker | 30.0 | 15.2 | 50.6% | $115.87 | $5.42 | +| Madeline Huguelet | 22.0 | 18.9 | 86.0% | $228.32 | $19.32 | +| Haley Fox | 37.0 | 8.1 | 21.8% | $88.43 | $63.85 | + +## Trend by Provider (last 4w vs prior 4w) + +| Provider | Hrs/wk Δ | Util Δpp | Rev/h Δ | Coll/h Δ | +|---|---|---|---|---| +| Nyesha Nicholson | 18.7 | 11.5pp | $5.81 | $-19.59 | +| Madison Hunsaker | 18.2 | -17.5pp | $-35.92 | $-8.40 | +| Madeline Huguelet | 5.8 | -61.0pp | $-55.62 | $22.06 | +| Haley Fox | 11.5 | 20.8pp | $71.13 | $51.36 | +| Jennifer Fallert | 4.0 | 11.2pp | $-74.29 | $-217.00 | + +## Recommended Hour Reductions for Upcoming Week + +*Method: bring each under-75% provider down to a 75% utilization floor at their current booked-hour pattern. Adjust for known PTO/onboarding before applying.* + +| Provider | Current Hrs/wk | 4w Util% | 4w Coll/h (attrib) | **Cut (hrs/wk)** | Cut % | +|---|---|---|---|---|---| +| Madison Hunsaker | 29.3 | 51.1% | $7.45 | **9.3** | 31.8% | +| Haley Fox | 11.5 | 20.8% | $51.36 | **8.3** | 72.2% | +| Nyesha Nicholson | 31.5 | 72.1% | $41.81 | **1.2** | 3.9% | +| **TOTAL** | | | | **18.8** | | + +**Target for next week: reduce ~19 provider hours at this location.** diff --git a/reports/Avelure-Waterford.md b/reports/Avelure-Waterford.md new file mode 100644 index 0000000..aff6095 --- /dev/null +++ b/reports/Avelure-Waterford.md @@ -0,0 +1,42 @@ +# Avelure-Waterford — Provider Hour Productivity Report +*Period: 4 weeks ending 4/20/2026 | Generated 4/26/2026* + +## Location Snapshot (matches dashboard) + +| Metric | Past Week (4/20) | Last 4 Weeks | Prior 4 Weeks | 4w Δ | +|---|---|---|---|---| +| Provider Hours (sched) | 49.3 | 220.4 | 312.0 | -91.6 (-29.4%) | +| Utilization % | 81.0% | 78.1% | 62.7% | 15.4pp | +| Revenue | $14,125 | $51,370 | $71,211 | $-19,841 | +| Collections | $10,244 | $32,944 | $28,450 | $4,494 | +| Revenue / Provider Hour | $286.51 | $233.08 | $228.24 | $4.84 | +| Collections / Provider Hour | $207.79 | $149.47 | $91.19 | $58.29 | + +## By Provider — Last 4 Weeks (3/30 – 4/20) +*Rev/h and Coll/h below reflect provider-attributed dollars only.* + +| Provider | Hrs/wk | Booked/wk | Util% | Rev/h (attrib) | Coll/h (attrib) | +|---|---|---|---|---|---| +| Kathryn Hubert | 24.7 | 19.1 | 77.0% | $244.51 | $101.98 | +| Mary Harris | 19.5 | 15.5 | 79.3% | $133.15 | $3.21 | +| Karyn Durante | 2.0 | 1.4 | 71.9% | $203.00 | $0.00 | + +## By Provider — Past Week (W/E 4/20) + +| Provider | Hrs | Booked | Util% | Rev/h | Coll/h | +|---|---|---|---|---|---| +| Kathryn Hubert | 30.3 | 25.5 | 84.1% | $295.35 | $63.47 | +| Mary Harris | 9.5 | 7.5 | 78.9% | $269.26 | $26.32 | +| Karyn Durante | 8.0 | 5.8 | 71.9% | $203.00 | $0.00 | + +## Trend by Provider (last 4w vs prior 4w) + +| Provider | Hrs/wk Δ | Util Δpp | Rev/h Δ | Coll/h Δ | +|---|---|---|---|---| +| Kathryn Hubert | -7.8 | 2.8pp | $7.24 | $28.70 | +| Mary Harris | -13.8 | 26.2pp | $-65.74 | $-85.33 | +| Karyn Durante | 2.0 | 71.9pp | $203.00 | $0.00 | + +## Recommended Hour Reductions + +All providers ≥75% utilization on 4-week trend. Maintain current schedule, monitor weekly. diff --git a/reports/Avelure-Zona_Rosa.md b/reports/Avelure-Zona_Rosa.md new file mode 100644 index 0000000..1d7e341 --- /dev/null +++ b/reports/Avelure-Zona_Rosa.md @@ -0,0 +1,54 @@ +# Avelure-Zona Rosa — Provider Hour Productivity Report +*Period: 4 weeks ending 4/20/2026 | Generated 4/26/2026* + +## Location Snapshot (matches dashboard) + +| Metric | Past Week (4/20) | Last 4 Weeks | Prior 4 Weeks | 4w Δ | +|---|---|---|---|---| +| Provider Hours (sched) | 92.6 | 377.2 | 351.0 | 26.2 (7.5%) | +| Utilization % | 65.1% | 61.1% | 71.3% | -10.2pp | +| Revenue | $21,731 | $87,314 | $76,695 | $10,619 | +| Collections | $10,508 | $45,072 | $33,567 | $11,505 | +| Revenue / Provider Hour | $234.68 | $231.48 | $218.50 | $12.98 | +| Collections / Provider Hour | $113.48 | $119.49 | $95.63 | $23.86 | + +## By Provider — Last 4 Weeks (3/30 – 4/20) +*Rev/h and Coll/h below reflect provider-attributed dollars only.* + +| Provider | Hrs/wk | Booked/wk | Util% | Rev/h (attrib) | Coll/h (attrib) | +|---|---|---|---|---|---| +| Abigail M. Ensz | 30.3 | 16.3 | 53.9% | $163.32 | $71.28 | +| Laura E. Parker | 29.5 | 17.0 | 57.6% | $236.21 | $90.56 | +| Jamie L. Taylor | 29.0 | 20.8 | 71.7% | $199.72 | $81.23 | +| Jennifer Smith | 5.5 | 3.1 | 57.2% | $223.14 | $38.64 | + +## By Provider — Past Week (W/E 4/20) + +| Provider | Hrs | Booked | Util% | Rev/h | Coll/h | +|---|---|---|---|---|---| +| Abigail M. Ensz | 31.3 | 14.5 | 46.4% | $133.76 | $33.01 | +| Laura E. Parker | 30.0 | 20.3 | 67.8% | $281.97 | $70.83 | +| Jamie L. Taylor | 31.3 | 25.4 | 81.1% | $280.47 | $122.79 | + +## Trend by Provider (last 4w vs prior 4w) + +| Provider | Hrs/wk Δ | Util Δpp | Rev/h Δ | Coll/h Δ | +|---|---|---|---|---| +| Abigail M. Ensz | 5.9 | 10.6pp | $-4.68 | $6.64 | +| Laura E. Parker | 5.8 | 5.3pp | $66.45 | $40.08 | +| Jamie L. Taylor | -4.5 | -14.6pp | $-58.94 | $-23.41 | +| Jennifer Smith | -4.5 | -10.7pp | $-10.43 | $-141.14 | + +## Recommended Hour Reductions for Upcoming Week + +*Method: bring each under-75% provider down to a 75% utilization floor at their current booked-hour pattern. Adjust for known PTO/onboarding before applying.* + +| Provider | Current Hrs/wk | 4w Util% | 4w Coll/h (attrib) | **Cut (hrs/wk)** | Cut % | +|---|---|---|---|---|---| +| Abigail M. Ensz | 30.3 | 53.9% | $71.28 | **8.5** | 28.1% | +| Laura E. Parker | 29.5 | 57.6% | $90.56 | **6.8** | 23.2% | +| Jennifer Smith | 5.5 | 57.2% | $38.64 | **1.3** | 23.8% | +| Jamie L. Taylor | 29.0 | 71.7% | $81.23 | **1.3** | 4.4% | +| **TOTAL** | | | | **17.9** | | + +**Target for next week: reduce ~18 provider hours at this location.** diff --git a/reports/Curate_Knoxville.md b/reports/Curate_Knoxville.md new file mode 100644 index 0000000..b6c6dc5 --- /dev/null +++ b/reports/Curate_Knoxville.md @@ -0,0 +1,61 @@ +# Curate Knoxville — Provider Hour Productivity Report +*Period: 4 weeks ending 4/20/2026 | Generated 4/26/2026* + +## Location Snapshot (matches dashboard) + +| Metric | Past Week (4/20) | Last 4 Weeks | Prior 4 Weeks | 4w Δ | +|---|---|---|---|---| +| Provider Hours (sched) | 124.5 | 439.9 | 432.0 | 7.9 (1.8%) | +| Utilization % | 56.5% | 62.1% | 79.1% | -17.0pp | +| Revenue | $29,773 | $95,420 | $104,786 | $-9,366 | +| Collections | $15,929 | $47,245 | $61,979 | $-14,733 | +| Revenue / Provider Hour | $239.14 | $216.91 | $242.56 | $-25.65 | +| Collections / Provider Hour | $127.94 | $107.40 | $143.47 | $-36.07 | + +## By Provider — Last 4 Weeks (3/30 – 4/20) +*Rev/h and Coll/h below reflect provider-attributed dollars only.* + +| Provider | Hrs/wk | Booked/wk | Util% | Rev/h (attrib) | Coll/h (attrib) | +|---|---|---|---|---|---| +| Mallory Clevenger | 29.4 | 13.9 | 47.1% | $129.49 | $27.24 | +| Emily Tetting | 27.3 | 18.9 | 69.2% | $239.54 | $109.01 | +| Skyller Hicks | 22.0 | 14.5 | 65.9% | $243.14 | $127.82 | +| Emily Baye | 9.9 | 5.2 | 53.1% | $43.99 | $4.56 | +| Samantha B. Ballard | 9.6 | 8.1 | 84.6% | $250.32 | $129.62 | +| Ashley McMahan | 5.6 | 3.5 | 61.8% | $110.23 | $52.44 | + +## By Provider — Past Week (W/E 4/20) + +| Provider | Hrs | Booked | Util% | Rev/h | Coll/h | +|---|---|---|---|---|---| +| Mallory Clevenger | 34.2 | 12.8 | 37.3% | $134.04 | $31.43 | +| Emily Tetting | 32.0 | 24.1 | 75.3% | $244.69 | $93.75 | +| Skyller Hicks | 24.2 | 11.4 | 47.2% | $427.43 | $222.38 | +| Samantha B. Ballard | 18.0 | 14.3 | 79.6% | $278.11 | $126.06 | +| Ashley McMahan | 9.0 | 3.8 | 41.7% | $133.33 | $111.11 | + +## Trend by Provider (last 4w vs prior 4w) + +| Provider | Hrs/wk Δ | Util Δpp | Rev/h Δ | Coll/h Δ | +|---|---|---|---|---| +| Mallory Clevenger | 11.2 | -4.9pp | $24.00 | $-2.40 | +| Emily Tetting | -1.9 | -23.0pp | $-47.28 | $-70.10 | +| Skyller Hicks | -2.4 | -0.5pp | $-68.99 | $-102.52 | +| Emily Baye | -1.3 | -53.8pp | $-106.48 | $-85.39 | +| Samantha B. Ballard | -0.2 | -41.6pp | $81.04 | $68.66 | +| Ashley McMahan | 2.0 | -4.9pp | $-235.21 | $18.31 | + +## Recommended Hour Reductions for Upcoming Week + +*Method: bring each under-75% provider down to a 75% utilization floor at their current booked-hour pattern. Adjust for known PTO/onboarding before applying.* + +| Provider | Current Hrs/wk | 4w Util% | 4w Coll/h (attrib) | **Cut (hrs/wk)** | Cut % | +|---|---|---|---|---|---| +| Mallory Clevenger | 29.4 | 47.1% | $27.24 | **10.9** | 37.2% | +| Emily Baye | 9.9 | 53.1% | $4.56 | **2.9** | 29.1% | +| Skyller Hicks | 22.0 | 65.9% | $127.82 | **2.7** | 12.1% | +| Emily Tetting | 27.3 | 69.2% | $109.01 | **2.1** | 7.8% | +| Ashley McMahan | 5.6 | 61.8% | $52.44 | **1.0** | 17.6% | +| **TOTAL** | | | | **19.6** | | + +**Target for next week: reduce ~20 provider hours at this location.** diff --git a/reports/Curate_Nashville.md b/reports/Curate_Nashville.md new file mode 100644 index 0000000..00f16fd --- /dev/null +++ b/reports/Curate_Nashville.md @@ -0,0 +1,54 @@ +# Curate Nashville — Provider Hour Productivity Report +*Period: 4 weeks ending 4/20/2026 | Generated 4/26/2026* + +## Location Snapshot (matches dashboard) + +| Metric | Past Week (4/20) | Last 4 Weeks | Prior 4 Weeks | 4w Δ | +|---|---|---|---|---| +| Provider Hours (sched) | 97.5 | 370.4 | 444.0 | -73.6 (-16.6%) | +| Utilization % | 60.0% | 61.3% | 68.8% | -7.5pp | +| Revenue | $23,421 | $89,793 | $103,930 | $-14,137 | +| Collections | $9,961 | $33,322 | $31,956 | $1,366 | +| Revenue / Provider Hour | $240.22 | $242.42 | $234.08 | $8.35 | +| Collections / Provider Hour | $102.16 | $89.96 | $71.97 | $17.99 | + +## By Provider — Last 4 Weeks (3/30 – 4/20) +*Rev/h and Coll/h below reflect provider-attributed dollars only.* + +| Provider | Hrs/wk | Booked/wk | Util% | Rev/h (attrib) | Coll/h (attrib) | +|---|---|---|---|---|---| +| Lauren Jones | 27.2 | 16.2 | 59.6% | $184.95 | $44.54 | +| Yujin Son | 26.5 | 14.9 | 56.3% | $171.81 | $67.54 | +| Lena Smathers | 19.2 | 12.3 | 64.4% | $247.37 | $48.49 | +| Heather Kersey | 16.6 | 11.4 | 68.9% | $248.56 | $48.31 | + +## By Provider — Past Week (W/E 4/20) + +| Provider | Hrs | Booked | Util% | Rev/h | Coll/h | +|---|---|---|---|---|---| +| Lauren Jones | 29.3 | 17.0 | 58.0% | $266.52 | $125.63 | +| Yujin Son | 28.5 | 16.0 | 56.1% | $243.68 | $113.77 | +| Heather Kersey | 31.3 | 20.5 | 65.4% | $258.06 | $46.60 | + +## Trend by Provider (last 4w vs prior 4w) + +| Provider | Hrs/wk Δ | Util Δpp | Rev/h Δ | Coll/h Δ | +|---|---|---|---|---| +| Lauren Jones | -1.6 | -7.4pp | $-11.14 | $-21.77 | +| Yujin Son | -2.1 | -4.1pp | $-58.63 | $-12.34 | +| Lena Smathers | -8.4 | -5.2pp | $21.02 | $-36.38 | +| Heather Kersey | -15.6 | -7.6pp | $17.61 | $15.39 | + +## Recommended Hour Reductions for Upcoming Week + +*Method: bring each under-75% provider down to a 75% utilization floor at their current booked-hour pattern. Adjust for known PTO/onboarding before applying.* + +| Provider | Current Hrs/wk | 4w Util% | 4w Coll/h (attrib) | **Cut (hrs/wk)** | Cut % | +|---|---|---|---|---|---| +| Yujin Son | 26.5 | 56.3% | $67.54 | **6.6** | 25.0% | +| Lauren Jones | 27.2 | 59.6% | $44.54 | **5.6** | 20.6% | +| Lena Smathers | 19.2 | 64.4% | $48.49 | **2.7** | 14.2% | +| Heather Kersey | 16.6 | 68.9% | $48.31 | **1.4** | 8.1% | +| **TOTAL** | | | | **16.3** | | + +**Target for next week: reduce ~16 provider hours at this location.** diff --git a/reports/Ever-Body-Bethesda_Row.md b/reports/Ever-Body-Bethesda_Row.md new file mode 100644 index 0000000..e85eee3 --- /dev/null +++ b/reports/Ever-Body-Bethesda_Row.md @@ -0,0 +1,51 @@ +# Ever/Body-Bethesda Row — Provider Hour Productivity Report +*Period: 4 weeks ending 4/20/2026 | Generated 4/26/2026* + +## Location Snapshot (matches dashboard) + +| Metric | Past Week (4/20) | Last 4 Weeks | Prior 4 Weeks | 4w Δ | +|---|---|---|---|---| +| Provider Hours (sched) | 100.0 | 323.0 | 349.0 | -26.0 (-7.4%) | +| Utilization % | 51.6% | 51.7% | 67.1% | -15.4pp | +| Revenue | $12,098 | $51,853 | $58,507 | $-6,654 | +| Collections | $3,884 | $31,026 | $21,009 | $10,016 | +| Revenue / Provider Hour | $120.98 | $160.54 | $167.64 | $-7.11 | +| Collections / Provider Hour | $38.84 | $96.05 | $60.20 | $35.86 | + +## By Provider — Last 4 Weeks (3/30 – 4/20) +*Rev/h and Coll/h below reflect provider-attributed dollars only.* + +| Provider | Hrs/wk | Booked/wk | Util% | Rev/h (attrib) | Coll/h (attrib) | +|---|---|---|---|---|---| +| Eleany Yasein | 27.3 | 14.4 | 52.7% | $157.05 | $42.72 | +| Helena Shadid | 26.1 | 14.2 | 54.3% | $154.72 | $75.66 | +| Brithany Patel | 19.8 | 9.3 | 47.1% | $121.68 | $65.38 | + +## By Provider — Past Week (W/E 4/20) + +| Provider | Hrs | Booked | Util% | Rev/h | Coll/h | +|---|---|---|---|---|---| +| Eleany Yasein | 25.0 | 14.7 | 58.7% | $209.28 | $55.67 | +| Helena Shadid | 23.0 | 10.3 | 44.6% | $188.17 | $91.96 | +| Brithany Patel | 23.5 | 12.0 | 51.1% | $106.04 | $14.04 | + +## Trend by Provider (last 4w vs prior 4w) + +| Provider | Hrs/wk Δ | Util Δpp | Rev/h Δ | Coll/h Δ | +|---|---|---|---|---| +| Eleany Yasein | -3.8 | -20.5pp | $-4.02 | $-16.31 | +| Helena Shadid | -1.8 | -3.9pp | $-11.74 | $20.69 | +| Brithany Patel | -1.0 | -9.2pp | $-42.07 | $30.78 | + +## Recommended Hour Reductions for Upcoming Week + +*Method: bring each under-75% provider down to a 75% utilization floor at their current booked-hour pattern. Adjust for known PTO/onboarding before applying.* + +| Provider | Current Hrs/wk | 4w Util% | 4w Coll/h (attrib) | **Cut (hrs/wk)** | Cut % | +|---|---|---|---|---|---| +| Eleany Yasein | 27.3 | 52.7% | $42.72 | **8.1** | 29.8% | +| Brithany Patel | 19.8 | 47.1% | $65.38 | **7.4** | 37.3% | +| Helena Shadid | 26.1 | 54.3% | $75.66 | **7.2** | 27.6% | +| **TOTAL** | | | | **22.7** | | + +**Target for next week: reduce ~23 provider hours at this location.** diff --git a/reports/Ever-Body-Gaithersburg.md b/reports/Ever-Body-Gaithersburg.md new file mode 100644 index 0000000..a725f90 --- /dev/null +++ b/reports/Ever-Body-Gaithersburg.md @@ -0,0 +1,51 @@ +# Ever/Body-Gaithersburg — Provider Hour Productivity Report +*Period: 4 weeks ending 4/20/2026 | Generated 4/26/2026* + +## Location Snapshot (matches dashboard) + +| Metric | Past Week (4/20) | Last 4 Weeks | Prior 4 Weeks | 4w Δ | +|---|---|---|---|---| +| Provider Hours (sched) | 74.0 | 314.9 | 279.0 | 35.9 (12.9%) | +| Utilization % | 59.8% | 58.3% | 69.4% | -11.1pp | +| Revenue | $9,171 | $62,612 | $70,219 | $-7,607 | +| Collections | $11,237 | $55,555 | $45,127 | $10,428 | +| Revenue / Provider Hour | $123.93 | $198.83 | $251.68 | $-52.85 | +| Collections / Provider Hour | $151.85 | $176.42 | $161.74 | $14.68 | + +## By Provider — Last 4 Weeks (3/30 – 4/20) +*Rev/h and Coll/h below reflect provider-attributed dollars only.* + +| Provider | Hrs/wk | Booked/wk | Util% | Rev/h (attrib) | Coll/h (attrib) | +|---|---|---|---|---|---| +| Sandy M. Tang | 28.8 | 16.4 | 56.8% | $140.56 | $41.81 | +| Cierra R. Crosson | 26.0 | 17.5 | 67.1% | $207.90 | $193.83 | +| Emily Petruszak | 20.8 | 10.1 | 48.7% | $144.88 | $74.53 | + +## By Provider — Past Week (W/E 4/20) + +| Provider | Hrs | Booked | Util% | Rev/h | Coll/h | +|---|---|---|---|---|---| +| Sandy M. Tang | 31.0 | 19.8 | 63.7% | $144.84 | $46.77 | +| Cierra R. Crosson | 31.5 | 17.8 | 56.3% | $256.86 | $136.51 | +| Emily Petruszak | 1.0 | 0.5 | 50.0% | $450.00 | $450.00 | + +## Trend by Provider (last 4w vs prior 4w) + +| Provider | Hrs/wk Δ | Util Δpp | Rev/h Δ | Coll/h Δ | +|---|---|---|---|---| +| Sandy M. Tang | 19.3 | 1.5pp | $-102.60 | $-116.85 | +| Cierra R. Crosson | -4.9 | -27.8pp | $-85.22 | $26.74 | +| Emily Petruszak | -8.8 | -5.6pp | $-61.12 | $-62.34 | + +## Recommended Hour Reductions for Upcoming Week + +*Method: bring each under-75% provider down to a 75% utilization floor at their current booked-hour pattern. Adjust for known PTO/onboarding before applying.* + +| Provider | Current Hrs/wk | 4w Util% | 4w Coll/h (attrib) | **Cut (hrs/wk)** | Cut % | +|---|---|---|---|---|---| +| Emily Petruszak | 20.8 | 48.7% | $74.53 | **7.3** | 35.1% | +| Sandy M. Tang | 28.8 | 56.8% | $41.81 | **7.0** | 24.3% | +| Cierra R. Crosson | 26.0 | 67.1% | $193.83 | **2.7** | 10.5% | +| **TOTAL** | | | | **17.0** | | + +**Target for next week: reduce ~17 provider hours at this location.** diff --git a/reports/Ever-Body-Hartford.md b/reports/Ever-Body-Hartford.md new file mode 100644 index 0000000..0c7ef26 --- /dev/null +++ b/reports/Ever-Body-Hartford.md @@ -0,0 +1,62 @@ +# Ever/Body-Hartford — Provider Hour Productivity Report +*Period: 4 weeks ending 4/20/2026 | Generated 4/26/2026* + +## Location Snapshot (matches dashboard) + +| Metric | Past Week (4/20) | Last 4 Weeks | Prior 4 Weeks | 4w Δ | +|---|---|---|---|---| +| Provider Hours (sched) | 148.0 | 582.2 | 510.0 | 72.2 (14.2%) | +| Utilization % | 58.8% | 58.9% | 109.1% | -50.2pp | +| Revenue | $34,175 | $116,474 | $123,349 | $-6,875 | +| Collections | $15,771 | $60,127 | $43,982 | $16,145 | +| Revenue / Provider Hour | $230.91 | $200.06 | $241.86 | $-41.80 | +| Collections / Provider Hour | $106.56 | $103.28 | $86.24 | $17.04 | + +## By Provider — Last 4 Weeks (3/30 – 4/20) +*Rev/h and Coll/h below reflect provider-attributed dollars only.* + +| Provider | Hrs/wk | Booked/wk | Util% | Rev/h (attrib) | Coll/h (attrib) | +|---|---|---|---|---|---| +| Megan Rourke | 30.1 | 19.0 | 63.1% | $219.84 | $136.06 | +| Anita Tran | 29.6 | 22.2 | 75.1% | $172.57 | $19.43 | +| Mary Tran | 28.1 | 15.4 | 54.8% | $215.54 | $134.92 | +| Trinh Tran | 22.1 | 14.8 | 67.0% | $181.08 | $16.26 | +| Emily Chase | 20.3 | 11.0 | 54.3% | $172.46 | $78.76 | +| April M. LaRosa | 10.8 | 0.3 | 2.3% | $4.06 | $0.00 | + +## By Provider — Past Week (W/E 4/20) + +| Provider | Hrs | Booked | Util% | Rev/h | Coll/h | +|---|---|---|---|---|---| +| Megan Rourke | 27.8 | 19.3 | 69.4% | $341.37 | $207.96 | +| Anita Tran | 31.5 | 21.6 | 68.5% | $208.70 | $16.19 | +| Mary Tran | 28.8 | 18.8 | 65.2% | $302.50 | $177.46 | +| Trinh Tran | 31.7 | 18.4 | 58.2% | $190.94 | $24.63 | +| Emily Chase | 13.8 | 6.3 | 45.8% | $192.99 | $85.68 | +| April M. LaRosa | 10.0 | 0.0 | 0.0% | $0.00 | $0.00 | + +## Trend by Provider (last 4w vs prior 4w) + +| Provider | Hrs/wk Δ | Util Δpp | Rev/h Δ | Coll/h Δ | +|---|---|---|---|---| +| Megan Rourke | 0.9 | -28.2pp | $-78.68 | $-21.50 | +| Anita Tran | 1.5 | -69.5pp | $-35.29 | $-19.94 | +| Mary Tran | 0.5 | -36.5pp | $-16.40 | $54.24 | +| Trinh Tran | -2.0 | -56.7pp | $2.58 | $2.98 | +| Emily Chase | 2.4 | -36.8pp | $-116.46 | $-12.84 | +| April M. LaRosa | 4.0 | -13.1pp | $-20.12 | $-10.19 | + +## Recommended Hour Reductions for Upcoming Week + +*Method: bring each under-75% provider down to a 75% utilization floor at their current booked-hour pattern. Adjust for known PTO/onboarding before applying.* + +| Provider | Current Hrs/wk | 4w Util% | 4w Coll/h (attrib) | **Cut (hrs/wk)** | Cut % | +|---|---|---|---|---|---| +| April M. LaRosa | 10.8 | 2.3% | $0.00 | **10.4** | 96.9% | +| Mary Tran | 28.1 | 54.8% | $134.92 | **7.6** | 27.0% | +| Emily Chase | 20.3 | 54.3% | $78.76 | **5.6** | 27.6% | +| Megan Rourke | 30.1 | 63.1% | $136.06 | **4.8** | 15.9% | +| Trinh Tran | 22.1 | 67.0% | $16.26 | **2.3** | 10.6% | +| **TOTAL** | | | | **30.7** | | + +**Target for next week: reduce ~31 provider hours at this location.** diff --git a/reports/Ever-Body-North_Haven.md b/reports/Ever-Body-North_Haven.md new file mode 100644 index 0000000..3870d5a --- /dev/null +++ b/reports/Ever-Body-North_Haven.md @@ -0,0 +1,54 @@ +# Ever/Body-North Haven — Provider Hour Productivity Report +*Period: 4 weeks ending 4/20/2026 | Generated 4/26/2026* + +## Location Snapshot (matches dashboard) + +| Metric | Past Week (4/20) | Last 4 Weeks | Prior 4 Weeks | 4w Δ | +|---|---|---|---|---| +| Provider Hours (sched) | 103.3 | 379.9 | 254.0 | 125.9 (49.6%) | +| Utilization % | 56.0% | 63.7% | 68.1% | -4.4pp | +| Revenue | $15,915 | $77,145 | $56,087 | $21,058 | +| Collections | $6,114 | $30,638 | $26,201 | $4,437 | +| Revenue / Provider Hour | $154.07 | $203.07 | $220.81 | $-17.75 | +| Collections / Provider Hour | $59.19 | $80.65 | $103.15 | $-22.51 | + +## By Provider — Last 4 Weeks (3/30 – 4/20) +*Rev/h and Coll/h below reflect provider-attributed dollars only.* + +| Provider | Hrs/wk | Booked/wk | Util% | Rev/h (attrib) | Coll/h (attrib) | +|---|---|---|---|---|---| +| Filomena T. Silva | 27.2 | 16.5 | 60.6% | $207.12 | $109.94 | +| Sophia A. Robinson | 25.6 | 14.0 | 54.5% | $185.39 | $21.24 | +| Kelsey Daniels | 24.4 | 19.8 | 81.0% | $186.95 | $22.03 | +| Ronald S. Perpetua | 10.1 | 5.3 | 51.7% | $168.13 | $55.35 | + +## By Provider — Past Week (W/E 4/20) + +| Provider | Hrs | Booked | Util% | Rev/h | Coll/h | +|---|---|---|---|---|---| +| Filomena T. Silva | 28.5 | 15.8 | 55.5% | $207.54 | $100.09 | +| Sophia A. Robinson | 12.2 | 3.9 | 32.2% | $246.51 | $14.38 | +| Kelsey Daniels | 26.8 | 17.2 | 64.2% | $197.79 | $37.18 | +| Ronald S. Perpetua | 11.3 | 7.2 | 63.3% | $150.75 | $29.13 | + +## Trend by Provider (last 4w vs prior 4w) + +| Provider | Hrs/wk Δ | Util Δpp | Rev/h Δ | Coll/h Δ | +|---|---|---|---|---| +| Filomena T. Silva | 7.8 | -7.2pp | $-80.19 | $-57.10 | +| Sophia A. Robinson | 3.6 | -8.5pp | $37.13 | $-2.07 | +| Kelsey Daniels | 2.5 | 7.0pp | $-27.46 | $-62.66 | +| Ronald S. Perpetua | 8.1 | -8.9pp | $-68.48 | $-102.23 | + +## Recommended Hour Reductions for Upcoming Week + +*Method: bring each under-75% provider down to a 75% utilization floor at their current booked-hour pattern. Adjust for known PTO/onboarding before applying.* + +| Provider | Current Hrs/wk | 4w Util% | 4w Coll/h (attrib) | **Cut (hrs/wk)** | Cut % | +|---|---|---|---|---|---| +| Sophia A. Robinson | 25.6 | 54.5% | $21.24 | **7.0** | 27.3% | +| Filomena T. Silva | 27.2 | 60.6% | $109.94 | **5.2** | 19.1% | +| Ronald S. Perpetua | 10.1 | 51.7% | $55.35 | **3.1** | 31.0% | +| **TOTAL** | | | | **15.3** | | + +**Target for next week: reduce ~15 provider hours at this location.** diff --git a/reports/Ever-Body-South_Windsor.md b/reports/Ever-Body-South_Windsor.md new file mode 100644 index 0000000..ecd7bd8 --- /dev/null +++ b/reports/Ever-Body-South_Windsor.md @@ -0,0 +1,52 @@ +# Ever/Body-South Windsor — Provider Hour Productivity Report +*Period: 4 weeks ending 4/20/2026 | Generated 4/26/2026* + +## Location Snapshot (matches dashboard) + +| Metric | Past Week (4/20) | Last 4 Weeks | Prior 4 Weeks | 4w Δ | +|---|---|---|---|---| +| Provider Hours (sched) | 38.7 | 239.7 | 290.0 | -50.3 (-17.3%) | +| Utilization % | 75.1% | 68.8% | 98.5% | -29.7pp | +| Revenue | $8,695 | $60,758 | $74,093 | $-13,335 | +| Collections | $1,685 | $25,185 | $30,019 | $-4,834 | +| Revenue / Provider Hour | $224.68 | $253.48 | $255.49 | $-2.02 | +| Collections / Provider Hour | $43.54 | $105.07 | $103.51 | $1.55 | + +## By Provider — Last 4 Weeks (3/30 – 4/20) +*Rev/h and Coll/h below reflect provider-attributed dollars only.* + +| Provider | Hrs/wk | Booked/wk | Util% | Rev/h (attrib) | Coll/h (attrib) | +|---|---|---|---|---|---| +| Azra Alagic | 21.8 | 15.6 | 71.7% | $245.46 | $42.81 | +| Jennifer Feinberg | 17.0 | 13.9 | 82.2% | $313.57 | $124.41 | +| Lindsey Lawton | 14.0 | 7.5 | 53.8% | $173.17 | $87.14 | +| April M. LaRosa | 2.3 | 0.2 | 8.3% | $30.56 | $30.56 | + +## By Provider — Past Week (W/E 4/20) + +| Provider | Hrs | Booked | Util% | Rev/h | Coll/h | +|---|---|---|---|---|---| +| Azra Alagic | 21.1 | 17.2 | 81.5% | $309.58 | $54.79 | +| Jennifer Feinberg | 7.3 | 4.2 | 56.9% | $287.72 | $64.12 | + +## Trend by Provider (last 4w vs prior 4w) + +| Provider | Hrs/wk Δ | Util Δpp | Rev/h Δ | Coll/h Δ | +|---|---|---|---|---| +| Azra Alagic | -7.0 | -59.2pp | $35.11 | $-7.07 | +| Jennifer Feinberg | -7.8 | 8.5pp | $-1.31 | $-29.82 | +| Lindsey Lawton | -3.1 | -27.8pp | $-99.36 | $21.37 | +| April M. LaRosa | -3.3 | 8.3pp | $30.56 | $30.56 | + +## Recommended Hour Reductions for Upcoming Week + +*Method: bring each under-75% provider down to a 75% utilization floor at their current booked-hour pattern. Adjust for known PTO/onboarding before applying.* + +| Provider | Current Hrs/wk | 4w Util% | 4w Coll/h (attrib) | **Cut (hrs/wk)** | Cut % | +|---|---|---|---|---|---| +| Lindsey Lawton | 14.0 | 53.8% | $87.14 | **4.0** | 28.3% | +| April M. LaRosa | 2.3 | 8.3% | $30.56 | **2.0** | 88.9% | +| Azra Alagic | 21.8 | 71.7% | $42.81 | **0.9** | 4.3% | +| **TOTAL** | | | | **6.9** | | + +**Target for next week: reduce ~7 provider hours at this location.** diff --git a/reports/H-MD-Chisholm_Creek.md b/reports/H-MD-Chisholm_Creek.md new file mode 100644 index 0000000..5f14fc8 --- /dev/null +++ b/reports/H-MD-Chisholm_Creek.md @@ -0,0 +1,50 @@ +# H-MD-Chisholm Creek — Provider Hour Productivity Report +*Period: 4 weeks ending 4/20/2026 | Generated 4/26/2026* + +## Location Snapshot (matches dashboard) + +| Metric | Past Week (4/20) | Last 4 Weeks | Prior 4 Weeks | 4w Δ | +|---|---|---|---|---| +| Provider Hours (sched) | 78.5 | 266.1 | 289.0 | -22.9 (-7.9%) | +| Utilization % | 62.1% | 72.2% | 88.5% | -16.3pp | +| Revenue | $12,484 | $58,910 | $66,710 | $-7,800 | +| Collections | $6,586 | $29,386 | $26,662 | $2,724 | +| Revenue / Provider Hour | $159.03 | $221.38 | $230.83 | $-9.45 | +| Collections / Provider Hour | $83.90 | $110.43 | $92.26 | $18.18 | + +## By Provider — Last 4 Weeks (3/30 – 4/20) +*Rev/h and Coll/h below reflect provider-attributed dollars only.* + +| Provider | Hrs/wk | Booked/wk | Util% | Rev/h (attrib) | Coll/h (attrib) | +|---|---|---|---|---|---| +| Shelby L. Lueders | 25.2 | 17.7 | 70.3% | $222.49 | $95.19 | +| Stephanie Ramsey | 19.5 | 12.8 | 65.5% | $134.33 | $59.38 | +| Nicole S. Alexander | 19.5 | 15.3 | 78.4% | $184.31 | $37.48 | + +## By Provider — Past Week (W/E 4/20) + +| Provider | Hrs | Booked | Util% | Rev/h | Coll/h | +|---|---|---|---|---|---| +| Shelby L. Lueders | 28.3 | 13.9 | 49.3% | $205.27 | $124.85 | +| Stephanie Ramsey | 24.0 | 16.1 | 67.0% | $137.75 | $44.50 | +| Nicole S. Alexander | 20.5 | 15.2 | 74.0% | $150.68 | $39.13 | + +## Trend by Provider (last 4w vs prior 4w) + +| Provider | Hrs/wk Δ | Util Δpp | Rev/h Δ | Coll/h Δ | +|---|---|---|---|---| +| Shelby L. Lueders | -3.2 | -8.5pp | $-2.18 | $-1.75 | +| Stephanie Ramsey | -8.5 | -3.2pp | $-107.96 | $-30.25 | +| Nicole S. Alexander | 1.2 | -37.1pp | $2.28 | $-21.29 | + +## Recommended Hour Reductions for Upcoming Week + +*Method: bring each under-75% provider down to a 75% utilization floor at their current booked-hour pattern. Adjust for known PTO/onboarding before applying.* + +| Provider | Current Hrs/wk | 4w Util% | 4w Coll/h (attrib) | **Cut (hrs/wk)** | Cut % | +|---|---|---|---|---|---| +| Stephanie Ramsey | 19.5 | 65.5% | $59.38 | **2.5** | 12.6% | +| Shelby L. Lueders | 25.2 | 70.3% | $95.19 | **1.6** | 6.3% | +| **TOTAL** | | | | **4.0** | | + +**Target for next week: reduce ~4 provider hours at this location.** diff --git a/reports/H-MD-Tulsa.md b/reports/H-MD-Tulsa.md new file mode 100644 index 0000000..4154b9d --- /dev/null +++ b/reports/H-MD-Tulsa.md @@ -0,0 +1,55 @@ +# H-MD-Tulsa — Provider Hour Productivity Report +*Period: 4 weeks ending 4/20/2026 | Generated 4/26/2026* + +## Location Snapshot (matches dashboard) + +| Metric | Past Week (4/20) | Last 4 Weeks | Prior 4 Weeks | 4w Δ | +|---|---|---|---|---| +| Provider Hours (sched) | 85.5 | 314.6 | 364.0 | -49.4 (-13.6%) | +| Utilization % | 45.2% | 51.9% | 72.8% | -20.9pp | +| Revenue | $14,779 | $57,306 | $75,529 | $-18,223 | +| Collections | $9,330 | $30,681 | $23,050 | $7,630 | +| Revenue / Provider Hour | $172.85 | $182.16 | $207.50 | $-25.34 | +| Collections / Provider Hour | $109.12 | $97.52 | $63.32 | $34.20 | + +## By Provider — Last 4 Weeks (3/30 – 4/20) +*Rev/h and Coll/h below reflect provider-attributed dollars only.* + +| Provider | Hrs/wk | Booked/wk | Util% | Rev/h (attrib) | Coll/h (attrib) | +|---|---|---|---|---|---| +| Bethany Beachel | 25.6 | 17.0 | 66.3% | $158.91 | $21.00 | +| Paige E. Cupp | 16.5 | 8.3 | 50.6% | $168.50 | $38.75 | +| Lyndsey Purcell | 15.3 | 4.1 | 26.6% | $90.98 | $43.30 | +| Scarlett Lococo | 10.9 | 5.9 | 54.4% | $240.40 | $103.50 | + +## By Provider — Past Week (W/E 4/20) + +| Provider | Hrs | Booked | Util% | Rev/h | Coll/h | +|---|---|---|---|---|---| +| Bethany Beachel | 20.3 | 8.0 | 39.5% | $105.28 | $36.29 | +| Paige E. Cupp | 20.5 | 10.6 | 51.6% | $248.00 | $89.96 | +| Lyndsey Purcell | 10.8 | 3.1 | 28.4% | $435.73 | $205.24 | +| Scarlett Lococo | 13.5 | 7.8 | 57.4% | $210.59 | $93.60 | + +## Trend by Provider (last 4w vs prior 4w) + +| Provider | Hrs/wk Δ | Util Δpp | Rev/h Δ | Coll/h Δ | +|---|---|---|---|---| +| Bethany Beachel | -3.0 | -0.4pp | $-67.30 | $-48.57 | +| Paige E. Cupp | -10.2 | -55.8pp | $-45.74 | $-3.42 | +| Lyndsey Purcell | -10.1 | -13.9pp | $-57.69 | $-55.71 | +| Scarlett Lococo | -2.6 | 1.1pp | $29.70 | $9.12 | + +## Recommended Hour Reductions for Upcoming Week + +*Method: bring each under-75% provider down to a 75% utilization floor at their current booked-hour pattern. Adjust for known PTO/onboarding before applying.* + +| Provider | Current Hrs/wk | 4w Util% | 4w Coll/h (attrib) | **Cut (hrs/wk)** | Cut % | +|---|---|---|---|---|---| +| Lyndsey Purcell | 15.3 | 26.6% | $43.30 | **9.8** | 64.5% | +| Paige E. Cupp | 16.5 | 50.6% | $38.75 | **5.4** | 32.6% | +| Scarlett Lococo | 10.9 | 54.4% | $103.50 | **3.0** | 27.4% | +| Bethany Beachel | 25.6 | 66.3% | $21.00 | **3.0** | 11.6% | +| **TOTAL** | | | | **21.1** | | + +**Target for next week: reduce ~21 provider hours at this location.** diff --git a/reports/_INDEX.md b/reports/_INDEX.md new file mode 100644 index 0000000..c9ee772 --- /dev/null +++ b/reports/_INDEX.md @@ -0,0 +1,31 @@ +# Sparrow-vF — PM Hours-Reduction Briefing +*Period: 4 weeks ending 4/20/2026 | Generated 4/26/2026* + +Each PM should review the location-specific report in this folder. Targets below are calculated to bring under-utilized providers up to a 75% utilization floor while preserving currently booked time. + +## Cross-Location Summary (dashboard methodology) + +| Location | Hrs/wk (4w) | Util% (4w) | Coll/h (4w) | Recommended Cut (hrs/wk) | +|---|---|---|---|---| +| Ever/Body-Hartford | 145.6 | 58.9% | $103.28 | **30.7** | +| Avelure-Ocala | 93.0 | 53.0% | $118.76 | **27.3** | +| Avelure-O'Fallon | 91.4 | 52.7% | $90.57 | **26.2** | +| Avelure-Greenwood | 92.5 | 53.5% | $84.53 | **25.0** | +| Ever/Body-Bethesda Row | 80.8 | 51.7% | $96.05 | **22.7** | +| H-MD-Tulsa | 78.7 | 51.9% | $97.52 | **21.1** | +| Curate Knoxville | 110.0 | 62.1% | $107.40 | **19.6** | +| Avelure-Sunset Hills | 92.4 | 62.2% | $128.38 | **18.8** | +| Avelure-Zona Rosa | 94.3 | 61.1% | $119.49 | **17.9** | +| Ever/Body-Gaithersburg | 78.7 | 58.3% | $176.42 | **17.0** | +| Avelure-Rochester | 128.7 | 66.1% | $96.28 | **16.4** | +| Curate Nashville | 92.6 | 61.3% | $89.96 | **16.3** | +| Ever/Body-North Haven | 95.0 | 63.7% | $80.65 | **15.3** | +| Avelure-Indy | 95.8 | 64.8% | $89.74 | **15.1** | +| Avelure-Grand Rapids | 92.3 | 64.1% | $121.39 | **14.1** | +| Avelure-Creve Coeur | 90.9 | 67.5% | $107.57 | **9.2** | +| Ever/Body-South Windsor | 59.9 | 68.8% | $105.07 | **6.9** | +| H-MD-Chisholm Creek | 66.5 | 72.2% | $110.43 | **4.0** | +| Avelure-Buffalo | 136.5 | 86.3% | $60.88 | **2.9** | +| Avelure-Novi | 40.8 | 105.2% | $99.96 | **0.7** | +| Avelure-Waterford | 55.1 | 78.1% | $149.47 | **0.0** | +| **TOTAL** | | | | **327.4** | From 959114b1d21ec5b127bff16622964b73ea0bd884 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 26 Apr 2026 20:17:58 +0000 Subject: [PATCH 2/5] draft(reports): styled HTML preview for Avelure-Creve Coeur Single-location styled draft using the project design system (navy/gold on cream, Cormorant Garamond / Nunito Sans). For internal review only -- no template rollout to other locations until feedback is incorporated. https://claude.ai/code/session_011mrFF85hLbU1FCwW9jHmaB --- reports/_DRAFT_Avelure-Creve_Coeur.html | 1 + 1 file changed, 1 insertion(+) create mode 100644 reports/_DRAFT_Avelure-Creve_Coeur.html diff --git a/reports/_DRAFT_Avelure-Creve_Coeur.html b/reports/_DRAFT_Avelure-Creve_Coeur.html new file mode 100644 index 0000000..02c550e --- /dev/null +++ b/reports/_DRAFT_Avelure-Creve_Coeur.html @@ -0,0 +1 @@ +Avelure-Creve Coeur — Provider Hour Productivity
PM Hours-Reduction Briefing

Avelure-Creve Coeur

Location Snapshot — Last 4 Weeks (3/30 – 4/20)

Comparison vs prior 4 weeks (3/02 – 3/23). Matches dashboard methodology.
Provider Hours
364
+18.6 vs prior 4w
Utilization
67.5%
-9.0pp vs prior 4w
Collections / Hour
$108
+$20.99 vs prior 4w
Revenue
$77,674
+$1,695 vs prior 4w
Collections
$39,113
+$9,244 vs prior 4w
Revenue / Hour
$214
$-6.60 vs prior 4w

By Provider — Last 4 Weeks

Rev/h and Coll/h reflect provider-attributed dollars only.
ProviderHrs/wkBooked/wkUtil%Rev/hColl/h
Allie Godare33.424.673.6%$204.98$58.66
Presley White29.018.965.2%$166.43$31.83
Christine N. Bradshaw19.112.163.1%$140.37$30.23
Raina Murray6.84.262.7%$0.00$0.00
Tara Hertweck2.11.153.9%$104.24$67.65

By Provider — Past Week (W/E 4/20)

ProviderHrsBookedUtil%Rev/hColl/h
Allie Godare33.324.072.0%$236.39$54.16
Presley White35.020.558.6%$212.69$55.11
Christine N. Bradshaw16.711.971.5%$153.63$6.00

Trend by Provider (Last 4w vs Prior 4w)

ProviderHrs/wk ΔUtil ΔRev/h ΔColl/h Δ
Allie Godare+7.9-16.6pp$-2.56$-11.27
Presley White+1.9-6.7pp$-59.92$-71.84
Christine N. Bradshaw+4.0-17.3pp$-79.91$-7.98
Raina Murray+4.5-4.9pp$-333.89$-270.67
Tara Hertweck-0.1-35.0pp$-108.43+$20.42

Recommended Hour Reductions for Upcoming Week

Method: bring each under-75% provider down to a 75% utilization floor at their current booked-hour pattern. Adjust for known PTO / onboarding before applying.
ProviderCurrent Hrs/wk4w Util%4w Coll/hCut (hrs/wk)Cut %
Presley White29.065.2%$31.833.813.0%
Christine N. Bradshaw19.163.1%$30.233.015.9%
Raina Murray6.862.7%$0.001.116.4%
Allie Godare33.473.6%$58.660.61.9%
Tara Hertweck2.153.9%$67.650.628.2%
TOTAL9.2
~9 hours
Target reduction for upcoming week

Action items have been pre-allocated by provider above. Apply in next week's schedule, accounting for any planned PTO or onboarding.

AMP Performance Tracker · Period 4 weeks ending 4/20/2026 · Generated 4/26/2026 · DRAFT
\ No newline at end of file From 56191032c1c080422fd7e18c9ba0476e20ebb5ad Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 26 Apr 2026 20:26:36 +0000 Subject: [PATCH 3/5] draft(pm-report): add /pm-report/:location route in React app PMReport component renders the per-location PM briefing using the same design tokens, fonts, and NavBar as the rest of the tracker. Wired as a route in main.jsx so it can be previewed via npm run dev. Draft only -- not linked from the Hub or any navigation, so it has no impact on the live tracker even if the branch were deployed. https://claude.ai/code/session_011mrFF85hLbU1FCwW9jHmaB --- src/components/PMReport.jsx | 235 ++++++++++++++++++++++++++++++++++++ src/main.jsx | 4 + 2 files changed, 239 insertions(+) create mode 100644 src/components/PMReport.jsx diff --git a/src/components/PMReport.jsx b/src/components/PMReport.jsx new file mode 100644 index 0000000..4916a45 --- /dev/null +++ b/src/components/PMReport.jsx @@ -0,0 +1,235 @@ +import React, { useState, useEffect, useMemo } from 'react'; +import { useParams } from 'react-router-dom'; + +const V = { + navy: '#041E42', navyMid: '#0a2d5e', gold: '#B9975B', goldLight: '#CDB5A7', goldMuted: '#9a7d4a', + cream: '#FAF8F7', taupe: '#E4D5D3', light: '#f0eae9', gray: '#948794', dark: '#2a1f28', + white: '#FFFFFF', red: '#C0392B', green: '#1A6B3C', +}; +const FONT = { + heading: "'GFS Didot', Didot, Georgia, serif", + body: "'Nunito Sans', 'Avenir Next', Avenir, sans-serif", +}; + +const LAST_4 = ['2026-03-30', '2026-04-06', '2026-04-13', '2026-04-20']; +const LAST_1 = ['2026-04-20']; +const PRIOR_4 = ['2026-03-02', '2026-03-09', '2026-03-16', '2026-03-23']; + +const fmt = (v, d = 2) => (v || 0).toLocaleString('en-US', { minimumFractionDigits: d, maximumFractionDigits: d }); +const money = (v, d = 0) => '$' + fmt(v, d); + +function NavBar() { + return ( +
+
+ + A M P + + | + ADVANCED MEDAESTHETIC PARTNERS +
+ PM HOURS-REDUCTION BRIEFING +
+ ); +} + +function Delta({ value, unit = '', digits = 2, suffix = '' }) { + const v = value || 0; + const color = v > 0.0001 ? V.green : v < -0.0001 ? V.red : V.gray; + const sign = v > 0.0001 ? '+' : v < -0.0001 ? '' : ''; + const inner = unit === '$' ? `${sign}$${fmt(Math.abs(v), digits)}${v < 0 ? '' : ''}` : `${sign}${fmt(v, digits)}${unit}`; + const display = v < 0 && unit === '$' ? `-$${fmt(Math.abs(v), digits)}` : inner; + return {display}{suffix}; +} + +function KPI({ label, value, sub }) { + return ( +
+
{label}
+
{value}
+ {sub &&
{sub}
} +
+ ); +} + +function SectionTitle({ children, lede }) { + return ( +
+

{children}

+ {lede &&
{lede}
} +
+
+ ); +} + +function Table({ headers, rows, totalRow }) { + return ( +
+ + + + {headers.map((h, i) => ( + + ))} + + + + {rows.map((row, i) => ( + + {row.map((c, j) => ( + + ))} + + ))} + {totalRow && ( + + {totalRow.map((c, j) => ( + + ))} + + )} + +
{h}
{c}
{c}
+
+ ); +} + +export default function PMReport() { + const { location } = useParams(); + const loc = decodeURIComponent(location || ''); + const [data, setData] = useState(null); + + useEffect(() => { + Promise.all([ + fetch('/data/performance/weekly-rev-coll-provider.json').then(r => r.json()), + fetch('/data/performance/weekly-util-hours-provider.json').then(r => r.json()), + fetch('/data/performance/weekly-metrics.json').then(r => r.json()), + fetch('/data/performance/weekly-utilization.json').then(r => r.json()), + fetch('/data/performance/weekly-provider-hours.json').then(r => r.json()), + ]).then(([revColl, utilH, metrics, utilLoc, provHrs]) => setData({ revColl, utilH, metrics, utilLoc, provHrs })); + }, []); + + const computed = useMemo(() => { + if (!data) return null; + const { revColl, utilH, metrics, utilLoc, provHrs } = data; + const aggProv = (weeks) => { + const o = {}; + utilH.filter(r => r.c === loc && weeks.includes(r.w)).forEach(r => { + o[r.pr] = o[r.pr] || { rev: 0, coll: 0, h: 0, sh: 0 }; + o[r.pr].h += r.h || 0; o[r.pr].sh += r.sh || 0; + }); + revColl.filter(r => r.c === loc && weeks.includes(r.w)).forEach(r => { + o[r.pr] = o[r.pr] || { rev: 0, coll: 0, h: 0, sh: 0 }; + o[r.pr].rev += r.rev || 0; o[r.pr].coll += r.coll || 0; + }); + return o; + }; + const aggLoc = (weeks) => { + let rev = 0, coll = 0, h = 0, uS = 0, uN = 0; + metrics.filter(r => r.c === loc && weeks.includes(r.w)).forEach(r => { rev += r.s || 0; coll += r.co || 0; }); + provHrs.filter(r => r.c === loc && weeks.includes(r.w)).forEach(r => { h += r.h || 0; }); + utilLoc.filter(r => r.c === loc && weeks.includes(r.w) && r.ur != null).forEach(r => { uS += r.ur; uN += 1; }); + return { rev, coll, h, ur: uN > 0 ? uS / uN : 0 }; + }; + const a4 = aggProv(LAST_4), a1 = aggProv(LAST_1), aP = aggProv(PRIOR_4); + const d4 = aggLoc(LAST_4), d1 = aggLoc(LAST_1), dP = aggLoc(PRIOR_4); + const provs = [...new Set([...Object.keys(a4), ...Object.keys(a1), ...Object.keys(aP)])]; + const rows = provs.map(p => { + const x = a4[p] || { rev: 0, coll: 0, h: 0, sh: 0 }; + const y = a1[p] || { rev: 0, coll: 0, h: 0, sh: 0 }; + const z = aP[p] || { rev: 0, coll: 0, h: 0, sh: 0 }; + return { + pr: p, + h4: x.h, sh4: x.sh, ur4: x.h > 0 ? x.sh / x.h * 100 : 0, rh4: x.h > 0 ? x.rev / x.h : 0, ch4: x.h > 0 ? x.coll / x.h : 0, + h1: y.h, sh1: y.sh, ur1: y.h > 0 ? y.sh / y.h * 100 : 0, rh1: y.h > 0 ? y.rev / y.h : 0, ch1: y.h > 0 ? y.coll / y.h : 0, + hP: z.h, urP: z.h > 0 ? z.sh / z.h * 100 : 0, rhP: z.h > 0 ? z.rev / z.h : 0, chP: z.h > 0 ? z.coll / z.h : 0, + hWk4: x.h / 4, hWkP: z.h / 4, + }; + }).filter(r => r.h4 > 0 || r.h1 > 0).sort((a, b) => b.h4 - a.h4); + const cuts = rows.map(r => { + if (r.h4 === 0) return null; + const cut = Math.max(0, r.h4 - r.sh4 / 0.75) / 4; + return { pr: r.pr, ur4: r.ur4, hWk4: r.hWk4, ch4: r.ch4, cut, pct: r.hWk4 > 0 ? cut / r.hWk4 * 100 : 0 }; + }).filter(x => x && x.cut > 0.5).sort((a, b) => b.cut - a.cut); + const totalCut = cuts.reduce((s, c) => s + c.cut, 0); + return { rows, cuts, totalCut, d4, d1, dP }; + }, [data, loc]); + + if (!data || !computed) return
Loading…
; + + const { rows, cuts, totalCut, d4, d1, dP } = computed; + const rh4 = d4.h > 0 ? d4.rev / d4.h : 0; + const ch4 = d4.h > 0 ? d4.coll / d4.h : 0; + const rhP = dP.h > 0 ? dP.rev / dP.h : 0; + const chP = dP.h > 0 ? dP.coll / dP.h : 0; + + return ( +
+ +
+
Provider Hour Productivity
+

{loc}

+
4 weeks ending 4/20/2026 · Generated 4/26/2026
+
+ + Location Snapshot — Last 4 Weeks +
+ vs prior 4w} /> + vs prior 4w} /> + vs prior 4w} /> + vs prior 4w} /> + vs prior 4w} /> + vs prior 4w} /> +
+ + By Provider — Last 4 Weeks + [r.pr, fmt(r.hWk4, 1), fmt(r.sh4 / 4, 1), `${fmt(r.ur4, 1)}%`, money(r.rh4, 2), money(r.ch4, 2)])} + /> + + By Provider — Past Week (W/E 4/20) +
r.h1 > 0).map(r => [r.pr, fmt(r.h1, 1), fmt(r.sh1, 1), `${fmt(r.ur1, 1)}%`, money(r.rh1, 2), money(r.ch1, 2)])} + /> + + Trend by Provider · Last 4w vs Prior 4w +
r.hP > 0 || r.h4 > 0).map(r => [ + r.pr, + , + , + , + , + ])} + /> + + Recommended Hour Reductions for Upcoming Week +
[ + c.pr, fmt(c.hWk4, 1), `${fmt(c.ur4, 1)}%`, money(c.ch4, 2), + {fmt(c.cut, 1)}, + `${fmt(c.pct, 1)}%`, + ])} + totalRow={['TOTAL', '', '', '', fmt(totalCut, 1), '']} + /> + +
+
+
~{fmt(totalCut, 0)} hrs
+
Target reduction for upcoming week
+
+
Action items have been pre-allocated by provider above. Apply in next week's schedule, accounting for any planned PTO or onboarding.
+
+ +
+ Back to Performance Tracker Hub + DRAFT · Data sourced from CorralData +
+ + + ); +} diff --git a/src/main.jsx b/src/main.jsx index b6b30a1..d0e7d51 100644 --- a/src/main.jsx +++ b/src/main.jsx @@ -2,6 +2,7 @@ import React, { useState, useEffect } from 'react' import ReactDOM from 'react-dom/client' import { BrowserRouter, Routes, Route, useParams, useNavigate } from 'react-router-dom' import PerformanceTracker from './components/PerformanceTracker' +import PMReport from './components/PMReport' // ── Design tokens ── const V = { navy: '#041E42', gold: '#B9975B', cream: '#FAF8F7', taupe: '#E4D5D3', gray: '#948794', white: '#FFFFFF', dark: '#2a1f28' }; @@ -250,6 +251,9 @@ ReactDOM.createRoot(document.getElementById('root')).render( {/* By Location */} } /> } /> + + {/* PM Hours-Reduction Report (DRAFT) */} + } /> From d749090c2ed8e1cc8b5eb668a2b934be1d40e6bf Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 26 Apr 2026 20:26:52 +0000 Subject: [PATCH 4/5] build: rebuild dist with /pm-report/:location route https://claude.ai/code/session_011mrFF85hLbU1FCwW9jHmaB --- dist/assets/index-CkIB8w_z.js | 135 ++++++++++++++++++++++++++++++++++ dist/assets/index-D35erps4.js | 135 ---------------------------------- dist/index.html | 2 +- 3 files changed, 136 insertions(+), 136 deletions(-) create mode 100644 dist/assets/index-CkIB8w_z.js delete mode 100644 dist/assets/index-D35erps4.js diff --git a/dist/assets/index-CkIB8w_z.js b/dist/assets/index-CkIB8w_z.js new file mode 100644 index 0000000..74dc1ae --- /dev/null +++ b/dist/assets/index-CkIB8w_z.js @@ -0,0 +1,135 @@ +function TE(e,t){for(var r=0;rn[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function r(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=r(i);fetch(i.href,o)}})();var kf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var nO={exports:{}},Zp={},iO={exports:{}},st={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Zc=Symbol.for("react.element"),$E=Symbol.for("react.portal"),EE=Symbol.for("react.fragment"),CE=Symbol.for("react.strict_mode"),kE=Symbol.for("react.profiler"),ME=Symbol.for("react.provider"),IE=Symbol.for("react.context"),RE=Symbol.for("react.forward_ref"),DE=Symbol.for("react.suspense"),NE=Symbol.for("react.memo"),LE=Symbol.for("react.lazy"),Hb=Symbol.iterator;function FE(e){return e===null||typeof e!="object"?null:(e=Hb&&e[Hb]||e["@@iterator"],typeof e=="function"?e:null)}var oO={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},aO=Object.assign,lO={};function js(e,t,r){this.props=e,this.context=t,this.refs=lO,this.updater=r||oO}js.prototype.isReactComponent={};js.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};js.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function sO(){}sO.prototype=js.prototype;function Nm(e,t,r){this.props=e,this.context=t,this.refs=lO,this.updater=r||oO}var Lm=Nm.prototype=new sO;Lm.constructor=Nm;aO(Lm,js.prototype);Lm.isPureReactComponent=!0;var Vb=Array.isArray,uO=Object.prototype.hasOwnProperty,Fm={current:null},cO={key:!0,ref:!0,__self:!0,__source:!0};function fO(e,t,r){var n,i={},o=null,a=null;if(t!=null)for(n in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)uO.call(t,n)&&!cO.hasOwnProperty(n)&&(i[n]=t[n]);var l=arguments.length-2;if(l===1)i.children=r;else if(1>>1,pe=U[ae];if(0>>1;aei(ot,ue))jti(pt,ot)?(U[ae]=pt,U[jt]=ue,ae=jt):(U[ae]=ot,U[it]=ue,ae=it);else if(jti(pt,ue))U[ae]=pt,U[jt]=ue,ae=jt;else break e}}return te}function i(U,te){var ue=U.sortIndex-te.sortIndex;return ue!==0?ue:U.id-te.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var s=[],u=[],f=1,c=null,d=3,p=!1,m=!1,v=!1,b=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(U){for(var te=r(u);te!==null;){if(te.callback===null)n(u);else if(te.startTime<=U)n(u),te.sortIndex=te.expirationTime,t(s,te);else break;te=r(u)}}function P(U){if(v=!1,x(U),!m)if(r(s)!==null)m=!0,X(w);else{var te=r(u);te!==null&&ee(P,te.startTime-U)}}function w(U,te){m=!1,v&&(v=!1,y(E),E=-1),p=!0;var ue=d;try{for(x(te),c=r(s);c!==null&&(!(c.expirationTime>te)||U&&!H());){var ae=c.callback;if(typeof ae=="function"){c.callback=null,d=c.priorityLevel;var pe=ae(c.expirationTime<=te);te=e.unstable_now(),typeof pe=="function"?c.callback=pe:c===r(s)&&n(s),x(te)}else n(s);c=r(s)}if(c!==null)var Ee=!0;else{var it=r(u);it!==null&&ee(P,it.startTime-te),Ee=!1}return Ee}finally{c=null,d=ue,p=!1}}var S=!1,j=null,E=-1,R=5,K=-1;function H(){return!(e.unstable_now()-KU||125ae?(U.sortIndex=ue,t(u,U),r(s)===null&&U===r(u)&&(v?(y(E),E=-1):v=!0,ee(P,ue-ae))):(U.sortIndex=pe,t(s,U),m||p||(m=!0,X(w))),U},e.unstable_shouldYield=H,e.unstable_wrapCallback=function(U){var te=d;return function(){var ue=d;d=te;try{return U.apply(this,arguments)}finally{d=ue}}}})(yO);vO.exports=yO;var QE=vO.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var ZE=_,gn=QE;function we(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),vy=Object.prototype.hasOwnProperty,JE=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Gb={},Yb={};function eC(e){return vy.call(Yb,e)?!0:vy.call(Gb,e)?!1:JE.test(e)?Yb[e]=!0:(Gb[e]=!0,!1)}function tC(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function rC(e,t,r,n){if(t===null||typeof t>"u"||tC(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Kr(e,t,r,n,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Tr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Tr[e]=new Kr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Tr[t]=new Kr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Tr[e]=new Kr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Tr[e]=new Kr(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Tr[e]=new Kr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Tr[e]=new Kr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Tr[e]=new Kr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Tr[e]=new Kr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Tr[e]=new Kr(e,5,!1,e.toLowerCase(),null,!1,!1)});var zm=/[\-:]([a-z])/g;function Wm(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(zm,Wm);Tr[t]=new Kr(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(zm,Wm);Tr[t]=new Kr(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(zm,Wm);Tr[t]=new Kr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Tr[e]=new Kr(e,1,!1,e.toLowerCase(),null,!1,!1)});Tr.xlinkHref=new Kr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Tr[e]=new Kr(e,1,!1,e.toLowerCase(),null,!0,!0)});function Um(e,t,r,n){var i=Tr.hasOwnProperty(t)?Tr[t]:null;(i!==null?i.type!==0:n||!(2l||i[a]!==o[l]){var s=` +`+i[a].replace(" at new "," at ");return e.displayName&&s.includes("")&&(s=s.replace("",e.displayName)),s}while(1<=a&&0<=l);break}}}finally{hv=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?ku(e):""}function nC(e){switch(e.tag){case 5:return ku(e.type);case 16:return ku("Lazy");case 13:return ku("Suspense");case 19:return ku("SuspenseList");case 0:case 2:case 15:return e=vv(e.type,!1),e;case 11:return e=vv(e.type.render,!1),e;case 1:return e=vv(e.type,!0),e;default:return""}}function by(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Sl:return"Fragment";case wl:return"Portal";case yy:return"Profiler";case Hm:return"StrictMode";case gy:return"Suspense";case my:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case bO:return(e.displayName||"Context")+".Consumer";case mO:return(e._context.displayName||"Context")+".Provider";case Vm:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Km:return t=e.displayName||null,t!==null?t:by(e.type)||"Memo";case To:t=e._payload,e=e._init;try{return by(e(t))}catch{}}return null}function iC(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return by(t);case 8:return t===Hm?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Xo(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function wO(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function oC(e){var t=wO(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,o=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){n=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(a){n=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Rf(e){e._valueTracker||(e._valueTracker=oC(e))}function SO(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=wO(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Pd(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function xy(e,t){var r=t.checked;return Yt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Xb(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Xo(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function PO(e,t){t=t.checked,t!=null&&Um(e,"checked",t,!1)}function wy(e,t){PO(e,t);var r=Xo(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Sy(e,t.type,r):t.hasOwnProperty("defaultValue")&&Sy(e,t.type,Xo(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Qb(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Sy(e,t,r){(t!=="number"||Pd(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Mu=Array.isArray;function Dl(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Df.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ec(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Nu={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},aC=["Webkit","ms","Moz","O"];Object.keys(Nu).forEach(function(e){aC.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Nu[t]=Nu[e]})});function _O(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Nu.hasOwnProperty(e)&&Nu[e]?(""+t).trim():t+"px"}function TO(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=_O(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,i):e[r]=i}}var lC=Yt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function jy(e,t){if(t){if(lC[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(we(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(we(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(we(61))}if(t.style!=null&&typeof t.style!="object")throw Error(we(62))}}function Ay(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var _y=null;function Gm(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ty=null,Nl=null,Ll=null;function ex(e){if(e=tf(e)){if(typeof Ty!="function")throw Error(we(280));var t=e.stateNode;t&&(t=nh(t),Ty(e.stateNode,e.type,t))}}function $O(e){Nl?Ll?Ll.push(e):Ll=[e]:Nl=e}function EO(){if(Nl){var e=Nl,t=Ll;if(Ll=Nl=null,ex(e),t)for(e=0;e>>=0,e===0?32:31-(mC(e)/bC|0)|0}var Nf=64,Lf=4194304;function Iu(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function _d(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,i=e.suspendedLanes,o=e.pingedLanes,a=r&268435455;if(a!==0){var l=a&~i;l!==0?n=Iu(l):(o&=a,o!==0&&(n=Iu(o)))}else a=r&~i,a!==0?n=Iu(a):o!==0&&(n=Iu(o));if(n===0)return 0;if(t!==0&&t!==n&&!(t&i)&&(i=n&-n,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0r;r++)t.push(e);return t}function Jc(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-si(t),e[t]=r}function PC(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0=Fu),ux=" ",cx=!1;function XO(e,t){switch(e){case"keyup":return QC.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function QO(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Pl=!1;function JC(e,t){switch(e){case"compositionend":return QO(t);case"keypress":return t.which!==32?null:(cx=!0,ux);case"textInput":return e=t.data,e===ux&&cx?null:e;default:return null}}function e2(e,t){if(Pl)return e==="compositionend"||!t0&&XO(e,t)?(e=YO(),hd=Zm=Io=null,Pl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=hx(r)}}function tj(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?tj(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function rj(){for(var e=window,t=Pd();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Pd(e.document)}return t}function r0(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function u2(e){var t=rj(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&tj(r.ownerDocument.documentElement,r)){if(n!==null&&r0(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=r.textContent.length,o=Math.min(n.start,i);n=n.end===void 0?o:Math.min(n.end,i),!e.extend&&o>n&&(i=n,n=o,o=i),i=vx(r,o);var a=vx(r,n);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>n?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,Ol=null,Iy=null,zu=null,Ry=!1;function yx(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Ry||Ol==null||Ol!==Pd(n)||(n=Ol,"selectionStart"in n&&r0(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),zu&&ac(zu,n)||(zu=n,n=Ed(Iy,"onSelect"),0_l||(e.current=zy[_l],zy[_l]=null,_l--)}function Rt(e,t){_l++,zy[_l]=e.current,e.current=t}var Qo={},Lr=ea(Qo),Zr=ea(!1),Ma=Qo;function Gl(e,t){var r=e.type.contextTypes;if(!r)return Qo;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in r)i[o]=t[o];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Jr(e){return e=e.childContextTypes,e!=null}function kd(){zt(Zr),zt(Lr)}function Px(e,t,r){if(Lr.current!==Qo)throw Error(we(168));Rt(Lr,t),Rt(Zr,r)}function fj(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in t))throw Error(we(108,iC(e)||"Unknown",i));return Yt({},r,n)}function Md(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Qo,Ma=Lr.current,Rt(Lr,e),Rt(Zr,Zr.current),!0}function Ox(e,t,r){var n=e.stateNode;if(!n)throw Error(we(169));r?(e=fj(e,t,Ma),n.__reactInternalMemoizedMergedChildContext=e,zt(Zr),zt(Lr),Rt(Lr,e)):zt(Zr),Rt(Zr,r)}var Bi=null,ih=!1,$v=!1;function dj(e){Bi===null?Bi=[e]:Bi.push(e)}function w2(e){ih=!0,dj(e)}function ta(){if(!$v&&Bi!==null){$v=!0;var e=0,t=Pt;try{var r=Bi;for(Pt=1;e>=a,i-=a,zi=1<<32-si(t)+i|r<E?(R=j,j=null):R=j.sibling;var K=d(y,j,x[E],P);if(K===null){j===null&&(j=R);break}e&&j&&K.alternate===null&&t(y,j),g=o(K,g,E),S===null?w=K:S.sibling=K,S=K,j=R}if(E===x.length)return r(y,j),Ut&&ha(y,E),w;if(j===null){for(;EE?(R=j,j=null):R=j.sibling;var H=d(y,j,K.value,P);if(H===null){j===null&&(j=R);break}e&&j&&H.alternate===null&&t(y,j),g=o(H,g,E),S===null?w=H:S.sibling=H,S=H,j=R}if(K.done)return r(y,j),Ut&&ha(y,E),w;if(j===null){for(;!K.done;E++,K=x.next())K=c(y,K.value,P),K!==null&&(g=o(K,g,E),S===null?w=K:S.sibling=K,S=K);return Ut&&ha(y,E),w}for(j=n(y,j);!K.done;E++,K=x.next())K=p(j,y,E,K.value,P),K!==null&&(e&&K.alternate!==null&&j.delete(K.key===null?E:K.key),g=o(K,g,E),S===null?w=K:S.sibling=K,S=K);return e&&j.forEach(function(B){return t(y,B)}),Ut&&ha(y,E),w}function b(y,g,x,P){if(typeof x=="object"&&x!==null&&x.type===Sl&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case If:e:{for(var w=x.key,S=g;S!==null;){if(S.key===w){if(w=x.type,w===Sl){if(S.tag===7){r(y,S.sibling),g=i(S,x.props.children),g.return=y,y=g;break e}}else if(S.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===To&&_x(w)===S.type){r(y,S.sibling),g=i(S,x.props),g.ref=yu(y,S,x),g.return=y,y=g;break e}r(y,S);break}else t(y,S);S=S.sibling}x.type===Sl?(g=$a(x.props.children,y.mode,P,x.key),g.return=y,y=g):(P=Sd(x.type,x.key,x.props,null,y.mode,P),P.ref=yu(y,g,x),P.return=y,y=P)}return a(y);case wl:e:{for(S=x.key;g!==null;){if(g.key===S)if(g.tag===4&&g.stateNode.containerInfo===x.containerInfo&&g.stateNode.implementation===x.implementation){r(y,g.sibling),g=i(g,x.children||[]),g.return=y,y=g;break e}else{r(y,g);break}else t(y,g);g=g.sibling}g=Nv(x,y.mode,P),g.return=y,y=g}return a(y);case To:return S=x._init,b(y,g,S(x._payload),P)}if(Mu(x))return m(y,g,x,P);if(fu(x))return v(y,g,x,P);Vf(y,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,g!==null&&g.tag===6?(r(y,g.sibling),g=i(g,x),g.return=y,y=g):(r(y,g),g=Dv(x,y.mode,P),g.return=y,y=g),a(y)):r(y,g)}return b}var ql=yj(!0),gj=yj(!1),Dd=ea(null),Nd=null,El=null,a0=null;function l0(){a0=El=Nd=null}function s0(e){var t=Dd.current;zt(Dd),e._currentValue=t}function Hy(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Bl(e,t){Nd=e,a0=El=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Xr=!0),e.firstContext=null)}function Nn(e){var t=e._currentValue;if(a0!==e)if(e={context:e,memoizedValue:t,next:null},El===null){if(Nd===null)throw Error(we(308));El=e,Nd.dependencies={lanes:0,firstContext:e}}else El=El.next=e;return t}var xa=null;function u0(e){xa===null?xa=[e]:xa.push(e)}function mj(e,t,r,n){var i=t.interleaved;return i===null?(r.next=r,u0(t)):(r.next=i.next,i.next=r),t.interleaved=r,Ji(e,n)}function Ji(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var $o=!1;function c0(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function bj(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ki(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ho(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,yt&2){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,Ji(e,r)}return i=n.interleaved,i===null?(t.next=t,u0(n)):(t.next=i.next,i.next=t),n.interleaved=t,Ji(e,r)}function yd(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,qm(e,r)}}function Tx(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,o=null;if(r=r.firstBaseUpdate,r!==null){do{var a={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};o===null?i=o=a:o=o.next=a,r=r.next}while(r!==null);o===null?i=o=t:o=o.next=t}else i=o=t;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Ld(e,t,r,n){var i=e.updateQueue;$o=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var s=l,u=s.next;s.next=null,a===null?o=u:a.next=u,a=s;var f=e.alternate;f!==null&&(f=f.updateQueue,l=f.lastBaseUpdate,l!==a&&(l===null?f.firstBaseUpdate=u:l.next=u,f.lastBaseUpdate=s))}if(o!==null){var c=i.baseState;a=0,f=u=s=null,l=o;do{var d=l.lane,p=l.eventTime;if((n&d)===d){f!==null&&(f=f.next={eventTime:p,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var m=e,v=l;switch(d=t,p=r,v.tag){case 1:if(m=v.payload,typeof m=="function"){c=m.call(p,c,d);break e}c=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=v.payload,d=typeof m=="function"?m.call(p,c,d):m,d==null)break e;c=Yt({},c,d);break e;case 2:$o=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,d=i.effects,d===null?i.effects=[l]:d.push(l))}else p={eventTime:p,lane:d,tag:l.tag,payload:l.payload,callback:l.callback,next:null},f===null?(u=f=p,s=c):f=f.next=p,a|=d;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;d=l,l=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(!0);if(f===null&&(s=c),i.baseState=s,i.firstBaseUpdate=u,i.lastBaseUpdate=f,t=i.shared.interleaved,t!==null){i=t;do a|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);Da|=a,e.lanes=a,e.memoizedState=c}}function $x(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;tr?r:4,e(!0);var n=Cv.transition;Cv.transition={};try{e(!1),t()}finally{Pt=r,Cv.transition=n}}function Dj(){return Ln().memoizedState}function j2(e,t,r){var n=Ko(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},Nj(e))Lj(t,r);else if(r=mj(e,t,r,n),r!==null){var i=Hr();ui(r,e,n,i),Fj(r,t,n)}}function A2(e,t,r){var n=Ko(e),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(Nj(e))Lj(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,l=o(a,r);if(i.hasEagerState=!0,i.eagerState=l,ci(l,a)){var s=t.interleaved;s===null?(i.next=i,u0(t)):(i.next=s.next,s.next=i),t.interleaved=i;return}}catch{}finally{}r=mj(e,t,i,n),r!==null&&(i=Hr(),ui(r,e,n,i),Fj(r,t,n))}}function Nj(e){var t=e.alternate;return e===Gt||t!==null&&t===Gt}function Lj(e,t){Wu=Bd=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function Fj(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,qm(e,r)}}var zd={readContext:Nn,useCallback:kr,useContext:kr,useEffect:kr,useImperativeHandle:kr,useInsertionEffect:kr,useLayoutEffect:kr,useMemo:kr,useReducer:kr,useRef:kr,useState:kr,useDebugValue:kr,useDeferredValue:kr,useTransition:kr,useMutableSource:kr,useSyncExternalStore:kr,useId:kr,unstable_isNewReconciler:!1},_2={readContext:Nn,useCallback:function(e,t){return wi().memoizedState=[e,t===void 0?null:t],e},useContext:Nn,useEffect:Cx,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,md(4194308,4,Cj.bind(null,t,e),r)},useLayoutEffect:function(e,t){return md(4194308,4,e,t)},useInsertionEffect:function(e,t){return md(4,2,e,t)},useMemo:function(e,t){var r=wi();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=wi();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=j2.bind(null,Gt,e),[n.memoizedState,e]},useRef:function(e){var t=wi();return e={current:e},t.memoizedState=e},useState:Ex,useDebugValue:m0,useDeferredValue:function(e){return wi().memoizedState=e},useTransition:function(){var e=Ex(!1),t=e[0];return e=O2.bind(null,e[1]),wi().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Gt,i=wi();if(Ut){if(r===void 0)throw Error(we(407));r=r()}else{if(r=t(),wr===null)throw Error(we(349));Ra&30||Pj(n,t,r)}i.memoizedState=r;var o={value:r,getSnapshot:t};return i.queue=o,Cx(jj.bind(null,n,o,e),[e]),n.flags|=2048,hc(9,Oj.bind(null,n,o,r,t),void 0,null),r},useId:function(){var e=wi(),t=wr.identifierPrefix;if(Ut){var r=Wi,n=zi;r=(n&~(1<<32-si(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=dc++,0<\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=a.createElement(r,{is:n.is}):(e=a.createElement(r),r==="select"&&(a=e,n.multiple?a.multiple=!0:n.size&&(a.size=n.size))):e=a.createElementNS(e,r),e[Si]=t,e[uc]=n,qj(e,t,!1,!1),t.stateNode=e;e:{switch(a=Ay(r,n),r){case"dialog":Lt("cancel",e),Lt("close",e),i=n;break;case"iframe":case"object":case"embed":Lt("load",e),i=n;break;case"video":case"audio":for(i=0;iZl&&(t.flags|=128,n=!0,gu(o,!1),t.lanes=4194304)}else{if(!n)if(e=Fd(a),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),gu(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!Ut)return Mr(t),null}else 2*Zt()-o.renderingStartTime>Zl&&r!==1073741824&&(t.flags|=128,n=!0,gu(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(r=o.last,r!==null?r.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Zt(),t.sibling=null,r=Kt.current,Rt(Kt,n?r&1|2:r&1),t):(Mr(t),null);case 22:case 23:return O0(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?fn&1073741824&&(Mr(t),t.subtreeFlags&6&&(t.flags|=8192)):Mr(t),null;case 24:return null;case 25:return null}throw Error(we(156,t.tag))}function R2(e,t){switch(i0(t),t.tag){case 1:return Jr(t.type)&&kd(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Xl(),zt(Zr),zt(Lr),p0(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return d0(t),null;case 13:if(zt(Kt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(we(340));Yl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return zt(Kt),null;case 4:return Xl(),null;case 10:return s0(t.type._context),null;case 22:case 23:return O0(),null;case 24:return null;default:return null}}var Gf=!1,Rr=!1,D2=typeof WeakSet=="function"?WeakSet:Set,Re=null;function Cl(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Xt(e,t,n)}else r.current=null}function Jy(e,t,r){try{r()}catch(n){Xt(e,t,n)}}var Wx=!1;function N2(e,t){if(Dy=Td,e=rj(),r0(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,o=n.focusNode;n=n.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break e}var a=0,l=-1,s=-1,u=0,f=0,c=e,d=null;t:for(;;){for(var p;c!==r||i!==0&&c.nodeType!==3||(l=a+i),c!==o||n!==0&&c.nodeType!==3||(s=a+n),c.nodeType===3&&(a+=c.nodeValue.length),(p=c.firstChild)!==null;)d=c,c=p;for(;;){if(c===e)break t;if(d===r&&++u===i&&(l=a),d===o&&++f===n&&(s=a),(p=c.nextSibling)!==null)break;c=d,d=c.parentNode}c=p}r=l===-1||s===-1?null:{start:l,end:s}}else r=null}r=r||{start:0,end:0}}else r=null;for(Ny={focusedElem:e,selectionRange:r},Td=!1,Re=t;Re!==null;)if(t=Re,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Re=e;else for(;Re!==null;){t=Re;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var v=m.memoizedProps,b=m.memoizedState,y=t.stateNode,g=y.getSnapshotBeforeUpdate(t.elementType===t.type?v:ei(t.type,v),b);y.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(we(163))}}catch(P){Xt(t,t.return,P)}if(e=t.sibling,e!==null){e.return=t.return,Re=e;break}Re=t.return}return m=Wx,Wx=!1,m}function Uu(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&Jy(t,r,o)}i=i.next}while(i!==n)}}function lh(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function eg(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function Zj(e){var t=e.alternate;t!==null&&(e.alternate=null,Zj(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Si],delete t[uc],delete t[By],delete t[b2],delete t[x2])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Jj(e){return e.tag===5||e.tag===3||e.tag===4}function Ux(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Jj(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function tg(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Cd));else if(n!==4&&(e=e.child,e!==null))for(tg(e,t,r),e=e.sibling;e!==null;)tg(e,t,r),e=e.sibling}function rg(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(rg(e,t,r),e=e.sibling;e!==null;)rg(e,t,r),e=e.sibling}var jr=null,ti=!1;function Ao(e,t,r){for(r=r.child;r!==null;)eA(e,t,r),r=r.sibling}function eA(e,t,r){if(ji&&typeof ji.onCommitFiberUnmount=="function")try{ji.onCommitFiberUnmount(Jp,r)}catch{}switch(r.tag){case 5:Rr||Cl(r,t);case 6:var n=jr,i=ti;jr=null,Ao(e,t,r),jr=n,ti=i,jr!==null&&(ti?(e=jr,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):jr.removeChild(r.stateNode));break;case 18:jr!==null&&(ti?(e=jr,r=r.stateNode,e.nodeType===8?Tv(e.parentNode,r):e.nodeType===1&&Tv(e,r),ic(e)):Tv(jr,r.stateNode));break;case 4:n=jr,i=ti,jr=r.stateNode.containerInfo,ti=!0,Ao(e,t,r),jr=n,ti=i;break;case 0:case 11:case 14:case 15:if(!Rr&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&Jy(r,t,a),i=i.next}while(i!==n)}Ao(e,t,r);break;case 1:if(!Rr&&(Cl(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(l){Xt(r,t,l)}Ao(e,t,r);break;case 21:Ao(e,t,r);break;case 22:r.mode&1?(Rr=(n=Rr)||r.memoizedState!==null,Ao(e,t,r),Rr=n):Ao(e,t,r);break;default:Ao(e,t,r)}}function Hx(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new D2),t.forEach(function(n){var i=K2.bind(null,e,n);r.has(n)||(r.add(n),n.then(i,i))})}}function Zn(e,t){var r=t.deletions;if(r!==null)for(var n=0;ni&&(i=a),n&=~o}if(n=i,n=Zt()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*F2(n/1960))-n,10e?16:e,Ro===null)var n=!1;else{if(e=Ro,Ro=null,Hd=0,yt&6)throw Error(we(331));var i=yt;for(yt|=4,Re=e.current;Re!==null;){var o=Re,a=o.child;if(Re.flags&16){var l=o.deletions;if(l!==null){for(var s=0;sZt()-S0?Ta(e,0):w0|=r),en(e,t)}function sA(e,t){t===0&&(e.mode&1?(t=Lf,Lf<<=1,!(Lf&130023424)&&(Lf=4194304)):t=1);var r=Hr();e=Ji(e,t),e!==null&&(Jc(e,t,r),en(e,r))}function V2(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),sA(e,r)}function K2(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(we(314))}n!==null&&n.delete(t),sA(e,r)}var uA;uA=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Zr.current)Xr=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Xr=!1,M2(e,t,r);Xr=!!(e.flags&131072)}else Xr=!1,Ut&&t.flags&1048576&&pj(t,Rd,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;bd(e,t),e=t.pendingProps;var i=Gl(t,Lr.current);Bl(t,r),i=v0(null,t,n,e,i,r);var o=y0();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Jr(n)?(o=!0,Md(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,c0(t),i.updater=ah,t.stateNode=i,i._reactInternals=t,Ky(t,n,e,r),t=qy(null,t,n,!0,o,r)):(t.tag=0,Ut&&o&&n0(t),Wr(null,t,i,r),t=t.child),t;case 16:n=t.elementType;e:{switch(bd(e,t),e=t.pendingProps,i=n._init,n=i(n._payload),t.type=n,i=t.tag=Y2(n),e=ei(n,e),i){case 0:t=Yy(null,t,n,e,r);break e;case 1:t=Fx(null,t,n,e,r);break e;case 11:t=Nx(null,t,n,e,r);break e;case 14:t=Lx(null,t,n,ei(n.type,e),r);break e}throw Error(we(306,n,""))}return t;case 0:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:ei(n,i),Yy(e,t,n,i,r);case 1:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:ei(n,i),Fx(e,t,n,i,r);case 3:e:{if(Kj(t),e===null)throw Error(we(387));n=t.pendingProps,o=t.memoizedState,i=o.element,bj(e,t),Ld(t,n,null,r);var a=t.memoizedState;if(n=a.element,o.isDehydrated)if(o={element:n,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Ql(Error(we(423)),t),t=Bx(e,t,n,r,i);break e}else if(n!==i){i=Ql(Error(we(424)),t),t=Bx(e,t,n,r,i);break e}else for(hn=Uo(t.stateNode.containerInfo.firstChild),yn=t,Ut=!0,oi=null,r=gj(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Yl(),n===i){t=eo(e,t,r);break e}Wr(e,t,n,r)}t=t.child}return t;case 5:return xj(t),e===null&&Uy(t),n=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,Ly(n,i)?a=null:o!==null&&Ly(n,o)&&(t.flags|=32),Vj(e,t),Wr(e,t,a,r),t.child;case 6:return e===null&&Uy(t),null;case 13:return Gj(e,t,r);case 4:return f0(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=ql(t,null,n,r):Wr(e,t,n,r),t.child;case 11:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:ei(n,i),Nx(e,t,n,i,r);case 7:return Wr(e,t,t.pendingProps,r),t.child;case 8:return Wr(e,t,t.pendingProps.children,r),t.child;case 12:return Wr(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,Rt(Dd,n._currentValue),n._currentValue=a,o!==null)if(ci(o.value,a)){if(o.children===i.children&&!Zr.current){t=eo(e,t,r);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){a=o.child;for(var s=l.firstContext;s!==null;){if(s.context===n){if(o.tag===1){s=Ki(-1,r&-r),s.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var f=u.pending;f===null?s.next=s:(s.next=f.next,f.next=s),u.pending=s}}o.lanes|=r,s=o.alternate,s!==null&&(s.lanes|=r),Hy(o.return,r,t),l.lanes|=r;break}s=s.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(we(341));a.lanes|=r,l=a.alternate,l!==null&&(l.lanes|=r),Hy(a,r,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}Wr(e,t,i.children,r),t=t.child}return t;case 9:return i=t.type,n=t.pendingProps.children,Bl(t,r),i=Nn(i),n=n(i),t.flags|=1,Wr(e,t,n,r),t.child;case 14:return n=t.type,i=ei(n,t.pendingProps),i=ei(n.type,i),Lx(e,t,n,i,r);case 15:return Uj(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:ei(n,i),bd(e,t),t.tag=1,Jr(n)?(e=!0,Md(t)):e=!1,Bl(t,r),Bj(t,n,i),Ky(t,n,i,r),qy(null,t,n,!0,e,r);case 19:return Yj(e,t,r);case 22:return Hj(e,t,r)}throw Error(we(156,t.tag))};function cA(e,t){return NO(e,t)}function G2(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Mn(e,t,r,n){return new G2(e,t,r,n)}function A0(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Y2(e){if(typeof e=="function")return A0(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Vm)return 11;if(e===Km)return 14}return 2}function Go(e,t){var r=e.alternate;return r===null?(r=Mn(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Sd(e,t,r,n,i,o){var a=2;if(n=e,typeof e=="function")A0(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Sl:return $a(r.children,i,o,t);case Hm:a=8,i|=8;break;case yy:return e=Mn(12,r,t,i|2),e.elementType=yy,e.lanes=o,e;case gy:return e=Mn(13,r,t,i),e.elementType=gy,e.lanes=o,e;case my:return e=Mn(19,r,t,i),e.elementType=my,e.lanes=o,e;case xO:return uh(r,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case mO:a=10;break e;case bO:a=9;break e;case Vm:a=11;break e;case Km:a=14;break e;case To:a=16,n=null;break e}throw Error(we(130,e==null?e:typeof e,""))}return t=Mn(a,r,t,i),t.elementType=e,t.type=n,t.lanes=o,t}function $a(e,t,r,n){return e=Mn(7,e,n,t),e.lanes=r,e}function uh(e,t,r,n){return e=Mn(22,e,n,t),e.elementType=xO,e.lanes=r,e.stateNode={isHidden:!1},e}function Dv(e,t,r){return e=Mn(6,e,null,t),e.lanes=r,e}function Nv(e,t,r){return t=Mn(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function q2(e,t,r,n,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=gv(0),this.expirationTimes=gv(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gv(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function _0(e,t,r,n,i,o,a,l,s){return e=new q2(e,t,r,l,s),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Mn(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},c0(o),e}function X2(e,t,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(hA)}catch(e){console.error(e)}}hA(),hO.exports=mn;var tk=hO.exports,Zx=tk;hy.createRoot=Zx.createRoot,hy.hydrateRoot=Zx.hydrateRoot;/** + * @remix-run/router v1.23.2 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Gd(){return Gd=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function vA(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function nk(){return Math.random().toString(36).substr(2,8)}function ew(e,t){return{usr:e.state,key:e.key,idx:t}}function lg(e,t,r,n){return r===void 0&&(r=null),Gd({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?hh(t):t,{state:r,key:t&&t.key||n||nk()})}function yA(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function hh(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function ik(e,t,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:o=!1}=n,a=i.history,l=Do.Pop,s=null,u=f();u==null&&(u=0,a.replaceState(Gd({},a.state,{idx:u}),""));function f(){return(a.state||{idx:null}).idx}function c(){l=Do.Pop;let b=f(),y=b==null?null:b-u;u=b,s&&s({action:l,location:v.location,delta:y})}function d(b,y){l=Do.Push;let g=lg(v.location,b,y);u=f()+1;let x=ew(g,u),P=v.createHref(g);try{a.pushState(x,"",P)}catch(w){if(w instanceof DOMException&&w.name==="DataCloneError")throw w;i.location.assign(P)}o&&s&&s({action:l,location:v.location,delta:1})}function p(b,y){l=Do.Replace;let g=lg(v.location,b,y);u=f();let x=ew(g,u),P=v.createHref(g);a.replaceState(x,"",P),o&&s&&s({action:l,location:v.location,delta:0})}function m(b){let y=i.location.origin!=="null"?i.location.origin:i.location.href,g=typeof b=="string"?b:yA(b);return g=g.replace(/ $/,"%20"),rn(y,"No window.location.(origin|href) available to create URL for href: "+g),new URL(g,y)}let v={get action(){return l},get location(){return e(i,a)},listen(b){if(s)throw new Error("A history only accepts one active listener");return i.addEventListener(Jx,c),s=b,()=>{i.removeEventListener(Jx,c),s=null}},createHref(b){return t(i,b)},createURL:m,encodeLocation(b){let y=m(b);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:d,replace:p,go(b){return a.go(b)}};return v}var tw;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(tw||(tw={}));function ok(e,t,r){return r===void 0&&(r="/"),ak(e,t,r)}function ak(e,t,r,n){let i=typeof t=="string"?hh(t):t,o=bA(i.pathname||"/",r);if(o==null)return null;let a=gA(e);lk(a);let l=null;for(let s=0;l==null&&s{let s={relativePath:l===void 0?o.path||"":l,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};s.relativePath.startsWith("/")&&(rn(s.relativePath.startsWith(n),'Absolute route path "'+s.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),s.relativePath=s.relativePath.slice(n.length));let u=Wl([n,s.relativePath]),f=r.concat(s);o.children&&o.children.length>0&&(rn(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),gA(o.children,t,f,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:hk(u,o.index),routesMeta:f})};return e.forEach((o,a)=>{var l;if(o.path===""||!((l=o.path)!=null&&l.includes("?")))i(o,a);else for(let s of mA(o.path))i(o,a,s)}),t}function mA(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,i=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return i?[o,""]:[o];let a=mA(n.join("/")),l=[];return l.push(...a.map(s=>s===""?o:[o,s].join("/"))),i&&l.push(...a),l.map(s=>e.startsWith("/")&&s===""?"/":s)}function lk(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:vk(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const sk=/^:[\w-]+$/,uk=3,ck=2,fk=1,dk=10,pk=-2,rw=e=>e==="*";function hk(e,t){let r=e.split("/"),n=r.length;return r.some(rw)&&(n+=pk),t&&(n+=ck),r.filter(i=>!rw(i)).reduce((i,o)=>i+(sk.test(o)?uk:o===""?fk:dk),n)}function vk(e,t){return e.length===t.length&&e.slice(0,-1).every((n,i)=>n===t[i])?e[e.length-1]-t[t.length-1]:0}function yk(e,t,r){let{routesMeta:n}=e,i={},o="/",a=[];for(let l=0;l{let{paramName:d,isOptional:p}=f;if(d==="*"){let v=l[c]||"";a=o.slice(0,o.length-v.length).replace(/(.)\/+$/,"$1")}const m=l[c];return p&&!m?u[d]=void 0:u[d]=(m||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:a,pattern:e}}function mk(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),vA(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,l,s)=>(n.push({paramName:l,isOptional:s!=null}),s?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),n]}function bk(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return vA(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function bA(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}const Wl=e=>e.join("/").replace(/\/\/+/g,"/"),xk=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/");function wk(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const xA=["post","put","patch","delete"];new Set(xA);const Sk=["get",...xA];new Set(Sk);/** + * React Router v6.30.3 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Yd(){return Yd=Object.assign?Object.assign.bind():function(e){for(var t=1;tObject.assign({},b,{params:Object.assign({},l,b.params),pathname:Wl([s,i.encodeLocation?i.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?s:Wl([s,i.encodeLocation?i.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),o,r,n);return t&&v?_.createElement(vh.Provider,{value:{location:Yd({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:Do.Pop}},v):v}function Tk(){let e=Dk(),t=wk(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return _.createElement(_.Fragment,null,_.createElement("h2",null,"Unexpected Application Error!"),_.createElement("h3",{style:{fontStyle:"italic"}},t),r?_.createElement("pre",{style:i},r):null,null)}const $k=_.createElement(Tk,null);class Ek extends _.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?_.createElement(nf.Provider,{value:this.props.routeContext},_.createElement(SA.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Ck(e){let{routeContext:t,match:r,children:n}=e,i=_.useContext(Pk);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),_.createElement(nf.Provider,{value:t},n)}function kk(e,t,r,n){var i;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var o;if(!r)return null;if(r.errors)e=r.matches;else if((o=n)!=null&&o.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let a=e,l=(i=r)==null?void 0:i.errors;if(l!=null){let f=a.findIndex(c=>c.route.id&&(l==null?void 0:l[c.route.id])!==void 0);f>=0||rn(!1),a=a.slice(0,Math.min(a.length,f+1))}let s=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let f=0;f=0?a=a.slice(0,u+1):a=[a[0]];break}}}return a.reduceRight((f,c,d)=>{let p,m=!1,v=null,b=null;r&&(p=l&&c.route.id?l[c.route.id]:void 0,v=c.route.errorElement||$k,s&&(u<0&&d===0?(Nk("route-fallback"),m=!0,b=null):u===d&&(m=!0,b=c.route.hydrateFallbackElement||null)));let y=t.concat(a.slice(0,d+1)),g=()=>{let x;return p?x=v:m?x=b:c.route.Component?x=_.createElement(c.route.Component,null):c.route.element?x=c.route.element:x=f,_.createElement(Ck,{match:c,routeContext:{outlet:f,matches:y,isDataRoute:r!=null},children:x})};return r&&(c.route.ErrorBoundary||c.route.errorElement||d===0)?_.createElement(Ek,{location:r.location,revalidation:r.revalidation,component:v,error:p,children:g(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):g()},null)}var PA=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(PA||{});function Mk(e){let t=_.useContext(Ok);return t||rn(!1),t}function Ik(e){let t=_.useContext(nf);return t||rn(!1),t}function Rk(e){let t=Ik(),r=t.matches[t.matches.length-1];return r.route.id||rn(!1),r.route.id}function Dk(){var e;let t=_.useContext(SA),r=Mk(PA.UseRouteError),n=Rk();return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}const nw={};function Nk(e,t,r){nw[e]||(nw[e]=!0)}function Lk(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function xi(e){rn(!1)}function Fk(e){let{basename:t="/",children:r=null,location:n,navigationType:i=Do.Pop,navigator:o,static:a=!1,future:l}=e;C0()&&rn(!1);let s=t.replace(/^\/*/,"/"),u=_.useMemo(()=>({basename:s,navigator:o,static:a,future:Yd({v7_relativeSplatPath:!1},l)}),[s,l,o,a]);typeof n=="string"&&(n=hh(n));let{pathname:f="/",search:c="",hash:d="",state:p=null,key:m="default"}=n,v=_.useMemo(()=>{let b=bA(f,s);return b==null?null:{location:{pathname:b,search:c,hash:d,state:p,key:m},navigationType:i}},[s,f,c,d,p,m,i]);return v==null?null:_.createElement(wA.Provider,{value:u},_.createElement(vh.Provider,{children:r,value:v}))}function Bk(e){let{children:t,location:r}=e;return Ak(sg(t),r)}new Promise(()=>{});function sg(e,t){t===void 0&&(t=[]);let r=[];return _.Children.forEach(e,(n,i)=>{if(!_.isValidElement(n))return;let o=[...t,i];if(n.type===_.Fragment){r.push.apply(r,sg(n.props.children,o));return}n.type!==xi&&rn(!1),!n.props.index||!n.props.children||rn(!1);let a={id:n.props.id||o.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(a.children=sg(n.props.children,o)),r.push(a)}),r}/** + * React Router DOM v6.30.3 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */const zk="6";try{window.__reactRouterVersion=zk}catch{}const Wk="startTransition",iw=HE[Wk];function Uk(e){let{basename:t,children:r,future:n,window:i}=e,o=_.useRef();o.current==null&&(o.current=rk({window:i,v5Compat:!0}));let a=o.current,[l,s]=_.useState({action:a.action,location:a.location}),{v7_startTransition:u}=n||{},f=_.useCallback(c=>{u&&iw?iw(()=>s(c)):s(c)},[s,u]);return _.useLayoutEffect(()=>a.listen(f),[a,f]),_.useEffect(()=>Lk(n),[n]),_.createElement(Fk,{basename:t,children:r,location:l.location,navigationType:l.action,navigator:a,future:n})}var ow;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(ow||(ow={}));var aw;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(aw||(aw={}));function OA(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t-1}var WI=zI,UI=mh;function HI(e,t){var r=this.__data__,n=UI(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var VI=HI,KI=TI,GI=DI,YI=FI,qI=WI,XI=VI;function Cs(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t0?1:-1},Sa=function(t){return La(t)&&t.indexOf("%")===t.length-1},Pe=function(t){return yD(t)&&!Ms(t)},xD=function(t){return Ge(t)},pr=function(t){return Pe(t)||La(t)},wD=0,Ga=function(t){var r=++wD;return"".concat(t||"").concat(r)},Fa=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Pe(t)&&!La(t))return n;var o;if(Sa(t)){var a=t.indexOf("%");o=r*parseFloat(t.slice(0,a))/100}else o=+t;return Ms(o)&&(o=n),i&&o>r&&(o=r),o},Mo=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},SD=function(t){if(!Array.isArray(t))return!1;for(var r=t.length,n={},i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ED(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function cg(e){"@babel/helpers - typeof";return cg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cg(e)}var mw={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},Gi=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},bw=null,Bv=null,U0=function e(t){if(t===bw&&Array.isArray(Bv))return Bv;var r=[];return _.Children.forEach(t,function(n){Ge(n)||(fD.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),Bv=r,bw=t,r};function tn(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(i){return Gi(i)}):n=[Gi(t)],U0(e).forEach(function(i){var o=Dn(i,"type.displayName")||Dn(i,"type.name");n.indexOf(o)!==-1&&r.push(i)}),r}function dn(e,t){var r=tn(e,t);return r&&r[0]}var xw=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,i=r.height;return!(!Pe(n)||n<=0||!Pe(i)||i<=0)},CD=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],kD=function(t){return t&&t.type&&La(t.type)&&CD.indexOf(t.type)>=0},NA=function(t){return t&&cg(t)==="object"&&"clipDot"in t},MD=function(t,r,n,i){var o,a=(o=Fv==null?void 0:Fv[i])!==null&&o!==void 0?o:[];return r.startsWith("data-")||!Je(t)&&(i&&a.includes(r)||AD.includes(r))||n&&W0.includes(r)},Xe=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(_.isValidElement(t)&&(i=t.props),!$s(i))return null;var o={};return Object.keys(i).forEach(function(a){var l;MD((l=i)===null||l===void 0?void 0:l[a],a,r,n)&&(o[a]=i[a])}),o},fg=function e(t,r){if(t===r)return!0;var n=_.Children.count(t);if(n!==_.Children.count(r))return!1;if(n===0)return!0;if(n===1)return ww(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function LD(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function pg(e){var t=e.children,r=e.width,n=e.height,i=e.viewBox,o=e.className,a=e.style,l=e.title,s=e.desc,u=ND(e,DD),f=i||{width:r,height:n,x:0,y:0},c=ut("recharts-surface",o);return D.createElement("svg",dg({},Xe(u,!0,"svg"),{className:c,width:r,height:n,style:a,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height)}),D.createElement("title",null,l),D.createElement("desc",null,s),t)}var FD=["children","className"];function hg(){return hg=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function zD(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var bt=D.forwardRef(function(e,t){var r=e.children,n=e.className,i=BD(e,FD),o=ut("recharts-layer",n);return D.createElement("g",hg({className:o},Xe(i,!0),{ref:t}),r)}),Yi=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),o=2;oi?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var o=Array(i);++n=n?e:HD(e,t,r)}var KD=VD,GD="\\ud800-\\udfff",YD="\\u0300-\\u036f",qD="\\ufe20-\\ufe2f",XD="\\u20d0-\\u20ff",QD=YD+qD+XD,ZD="\\ufe0e\\ufe0f",JD="\\u200d",eN=RegExp("["+JD+GD+QD+ZD+"]");function tN(e){return eN.test(e)}var LA=tN;function rN(e){return e.split("")}var nN=rN,FA="\\ud800-\\udfff",iN="\\u0300-\\u036f",oN="\\ufe20-\\ufe2f",aN="\\u20d0-\\u20ff",lN=iN+oN+aN,sN="\\ufe0e\\ufe0f",uN="["+FA+"]",vg="["+lN+"]",yg="\\ud83c[\\udffb-\\udfff]",cN="(?:"+vg+"|"+yg+")",BA="[^"+FA+"]",zA="(?:\\ud83c[\\udde6-\\uddff]){2}",WA="[\\ud800-\\udbff][\\udc00-\\udfff]",fN="\\u200d",UA=cN+"?",HA="["+sN+"]?",dN="(?:"+fN+"(?:"+[BA,zA,WA].join("|")+")"+HA+UA+")*",pN=HA+UA+dN,hN="(?:"+[BA+vg+"?",vg,zA,WA,uN].join("|")+")",vN=RegExp(yg+"(?="+yg+")|"+hN+pN,"g");function yN(e){return e.match(vN)||[]}var gN=yN,mN=nN,bN=LA,xN=gN;function wN(e){return bN(e)?xN(e):mN(e)}var SN=wN,PN=KD,ON=LA,jN=SN,AN=CA;function _N(e){return function(t){t=AN(t);var r=ON(t)?jN(t):void 0,n=r?r[0]:t.charAt(0),i=r?PN(r,1).join(""):t.slice(1);return n[e]()+i}}var TN=_N,$N=TN,EN=$N("toUpperCase"),CN=EN;const kh=$t(CN);function It(e){return function(){return e}}const VA=Math.cos,Qd=Math.sin,di=Math.sqrt,Zd=Math.PI,Mh=2*Zd,gg=Math.PI,mg=2*gg,ya=1e-6,kN=mg-ya;function KA(e){this._+=e[0];for(let t=1,r=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return KA;const r=10**t;return function(n){this._+=n[0];for(let i=1,o=n.length;iya)if(!(Math.abs(c*s-u*f)>ya)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let p=n-a,m=i-l,v=s*s+u*u,b=p*p+m*m,y=Math.sqrt(v),g=Math.sqrt(d),x=o*Math.tan((gg-Math.acos((v+d-b)/(2*y*g)))/2),P=x/g,w=x/y;Math.abs(P-1)>ya&&this._append`L${t+P*f},${r+P*c}`,this._append`A${o},${o},0,0,${+(c*p>f*m)},${this._x1=t+w*s},${this._y1=r+w*u}`}}arc(t,r,n,i,o,a){if(t=+t,r=+r,n=+n,a=!!a,n<0)throw new Error(`negative radius: ${n}`);let l=n*Math.cos(i),s=n*Math.sin(i),u=t+l,f=r+s,c=1^a,d=a?i-o:o-i;this._x1===null?this._append`M${u},${f}`:(Math.abs(this._x1-u)>ya||Math.abs(this._y1-f)>ya)&&this._append`L${u},${f}`,n&&(d<0&&(d=d%mg+mg),d>kN?this._append`A${n},${n},0,1,${c},${t-l},${r-s}A${n},${n},0,1,${c},${this._x1=u},${this._y1=f}`:d>ya&&this._append`A${n},${n},0,${+(d>=gg)},${c},${this._x1=t+n*Math.cos(o)},${this._y1=r+n*Math.sin(o)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function H0(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new IN(t)}function V0(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function GA(e){this._context=e}GA.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Ih(e){return new GA(e)}function YA(e){return e[0]}function qA(e){return e[1]}function XA(e,t){var r=It(!0),n=null,i=Ih,o=null,a=H0(l);e=typeof e=="function"?e:e===void 0?YA:It(e),t=typeof t=="function"?t:t===void 0?qA:It(t);function l(s){var u,f=(s=V0(s)).length,c,d=!1,p;for(n==null&&(o=i(p=a())),u=0;u<=f;++u)!(u=p;--m)l.point(x[m],P[m]);l.lineEnd(),l.areaEnd()}y&&(x[d]=+e(b,d,c),P[d]=+t(b,d,c),l.point(n?+n(b,d,c):x[d],r?+r(b,d,c):P[d]))}if(g)return l=null,g+""||null}function f(){return XA().defined(i).curve(a).context(o)}return u.x=function(c){return arguments.length?(e=typeof c=="function"?c:It(+c),n=null,u):e},u.x0=function(c){return arguments.length?(e=typeof c=="function"?c:It(+c),u):e},u.x1=function(c){return arguments.length?(n=c==null?null:typeof c=="function"?c:It(+c),u):n},u.y=function(c){return arguments.length?(t=typeof c=="function"?c:It(+c),r=null,u):t},u.y0=function(c){return arguments.length?(t=typeof c=="function"?c:It(+c),u):t},u.y1=function(c){return arguments.length?(r=c==null?null:typeof c=="function"?c:It(+c),u):r},u.lineX0=u.lineY0=function(){return f().x(e).y(t)},u.lineY1=function(){return f().x(e).y(r)},u.lineX1=function(){return f().x(n).y(t)},u.defined=function(c){return arguments.length?(i=typeof c=="function"?c:It(!!c),u):i},u.curve=function(c){return arguments.length?(a=c,o!=null&&(l=a(o)),u):a},u.context=function(c){return arguments.length?(c==null?o=l=null:l=a(o=c),u):o},u}class QA{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function RN(e){return new QA(e,!0)}function DN(e){return new QA(e,!1)}const K0={draw(e,t){const r=di(t/Zd);e.moveTo(r,0),e.arc(0,0,r,0,Mh)}},NN={draw(e,t){const r=di(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},ZA=di(1/3),LN=ZA*2,FN={draw(e,t){const r=di(t/LN),n=r*ZA;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},BN={draw(e,t){const r=di(t),n=-r/2;e.rect(n,n,r,r)}},zN=.8908130915292852,JA=Qd(Zd/10)/Qd(7*Zd/10),WN=Qd(Mh/10)*JA,UN=-VA(Mh/10)*JA,HN={draw(e,t){const r=di(t*zN),n=WN*r,i=UN*r;e.moveTo(0,-r),e.lineTo(n,i);for(let o=1;o<5;++o){const a=Mh*o/5,l=VA(a),s=Qd(a);e.lineTo(s*r,-l*r),e.lineTo(l*n-s*i,s*n+l*i)}e.closePath()}},zv=di(3),VN={draw(e,t){const r=-di(t/(zv*3));e.moveTo(0,r*2),e.lineTo(-zv*r,-r),e.lineTo(zv*r,-r),e.closePath()}},jn=-.5,An=di(3)/2,bg=1/di(12),KN=(bg/2+1)*3,GN={draw(e,t){const r=di(t/KN),n=r/2,i=r*bg,o=n,a=r*bg+r,l=-o,s=a;e.moveTo(n,i),e.lineTo(o,a),e.lineTo(l,s),e.lineTo(jn*n-An*i,An*n+jn*i),e.lineTo(jn*o-An*a,An*o+jn*a),e.lineTo(jn*l-An*s,An*l+jn*s),e.lineTo(jn*n+An*i,jn*i-An*n),e.lineTo(jn*o+An*a,jn*a-An*o),e.lineTo(jn*l+An*s,jn*s-An*l),e.closePath()}};function YN(e,t){let r=null,n=H0(i);e=typeof e=="function"?e:It(e||K0),t=typeof t=="function"?t:It(t===void 0?64:+t);function i(){let o;if(r||(r=o=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),o)return r=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:It(o),i):e},i.size=function(o){return arguments.length?(t=typeof o=="function"?o:It(+o),i):t},i.context=function(o){return arguments.length?(r=o??null,i):r},i}function Jd(){}function ep(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function e_(e){this._context=e}e_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:ep(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:ep(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function qN(e){return new e_(e)}function t_(e){this._context=e}t_.prototype={areaStart:Jd,areaEnd:Jd,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:ep(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function XN(e){return new t_(e)}function r_(e){this._context=e}r_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:ep(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function QN(e){return new r_(e)}function n_(e){this._context=e}n_.prototype={areaStart:Jd,areaEnd:Jd,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function ZN(e){return new n_(e)}function Pw(e){return e<0?-1:1}function Ow(e,t,r){var n=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(n||i<0&&-0),a=(r-e._y1)/(i||n<0&&-0),l=(o*i+a*n)/(n+i);return(Pw(o)+Pw(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(l))||0}function jw(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Wv(e,t,r){var n=e._x0,i=e._y0,o=e._x1,a=e._y1,l=(o-n)/3;e._context.bezierCurveTo(n+l,i+l*t,o-l,a-l*r,o,a)}function tp(e){this._context=e}tp.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Wv(this,this._t0,jw(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Wv(this,jw(this,r=Ow(this,e,t)),r);break;default:Wv(this,this._t0,r=Ow(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function i_(e){this._context=new o_(e)}(i_.prototype=Object.create(tp.prototype)).point=function(e,t){tp.prototype.point.call(this,t,e)};function o_(e){this._context=e}o_.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,o){this._context.bezierCurveTo(t,e,n,r,o,i)}};function JN(e){return new tp(e)}function eL(e){return new i_(e)}function a_(e){this._context=e}a_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=Aw(e),i=Aw(t),o=0,a=1;a=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function rL(e){return new Rh(e,.5)}function nL(e){return new Rh(e,0)}function iL(e){return new Rh(e,1)}function Jl(e,t){if((a=e.length)>1)for(var r=1,n,i,o=e[t[0]],a,l=o.length;r=0;)r[t]=t;return r}function oL(e,t){return e[t]}function aL(e){const t=[];return t.key=e,t}function lL(){var e=It([]),t=xg,r=Jl,n=oL;function i(o){var a=Array.from(e.apply(this,arguments),aL),l,s=a.length,u=-1,f;for(const c of o)for(l=0,++u;l0){for(var r,n,i=0,o=e[0].length,a;i0){for(var r=0,n=e[t[0]],i,o=n.length;r0)||!((o=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,o,a;n=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function yL(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var l_={symbolCircle:K0,symbolCross:NN,symbolDiamond:FN,symbolSquare:BN,symbolStar:HN,symbolTriangle:VN,symbolWye:GN},gL=Math.PI/180,mL=function(t){var r="symbol".concat(kh(t));return l_[r]||K0},bL=function(t,r,n){if(r==="area")return t;switch(n){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*gL;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},xL=function(t,r){l_["symbol".concat(kh(t))]=r},Dh=function(t){var r=t.type,n=r===void 0?"circle":r,i=t.size,o=i===void 0?64:i,a=t.sizeType,l=a===void 0?"area":a,s=vL(t,fL),u=Tw(Tw({},s),{},{type:n,size:o,sizeType:l}),f=function(){var b=mL(n),y=YN().type(b).size(bL(o,l,n));return y()},c=u.className,d=u.cx,p=u.cy,m=Xe(u,!0);return d===+d&&p===+p&&o===+o?D.createElement("path",wg({},m,{className:ut("recharts-symbols",c),transform:"translate(".concat(d,", ").concat(p,")"),d:f()})):null};Dh.registerSymbol=xL;function es(e){"@babel/helpers - typeof";return es=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},es(e)}function Sg(){return Sg=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var g=p.inactive?u:p.color;return D.createElement("li",Sg({className:b,style:c,key:"legend-item-".concat(m)},yc(n.props,p,m)),D.createElement(pg,{width:a,height:a,viewBox:f,style:d},n.renderIcon(p)),D.createElement("span",{className:"recharts-legend-item-text",style:{color:g}},v?v(y,p,m):y))})}},{key:"render",value:function(){var n=this.props,i=n.payload,o=n.layout,a=n.align;if(!i||!i.length)return null;var l={padding:0,margin:0,textAlign:o==="horizontal"?a:"left"};return D.createElement("ul",{className:"recharts-default-legend",style:l},this.renderItems())}}])}(_.PureComponent);mc(G0,"displayName","Legend");mc(G0,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var EL=bh;function CL(){this.__data__=new EL,this.size=0}var kL=CL;function ML(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var IL=ML;function RL(e){return this.__data__.get(e)}var DL=RL;function NL(e){return this.__data__.has(e)}var LL=NL,FL=bh,BL=R0,zL=D0,WL=200;function UL(e,t){var r=this.__data__;if(r instanceof FL){var n=r.__data__;if(!BL||n.lengthl))return!1;var u=o.get(e),f=o.get(t);if(u&&f)return u==t&&f==e;var c=-1,d=!0,p=r&fF?new lF:void 0;for(o.set(e,t),o.set(t,e);++c-1&&e%1==0&&e-1&&e%1==0&&e<=vB}var Q0=yB,gB=oo,mB=Q0,bB=ao,xB="[object Arguments]",wB="[object Array]",SB="[object Boolean]",PB="[object Date]",OB="[object Error]",jB="[object Function]",AB="[object Map]",_B="[object Number]",TB="[object Object]",$B="[object RegExp]",EB="[object Set]",CB="[object String]",kB="[object WeakMap]",MB="[object ArrayBuffer]",IB="[object DataView]",RB="[object Float32Array]",DB="[object Float64Array]",NB="[object Int8Array]",LB="[object Int16Array]",FB="[object Int32Array]",BB="[object Uint8Array]",zB="[object Uint8ClampedArray]",WB="[object Uint16Array]",UB="[object Uint32Array]",Ft={};Ft[RB]=Ft[DB]=Ft[NB]=Ft[LB]=Ft[FB]=Ft[BB]=Ft[zB]=Ft[WB]=Ft[UB]=!0;Ft[xB]=Ft[wB]=Ft[MB]=Ft[SB]=Ft[IB]=Ft[PB]=Ft[OB]=Ft[jB]=Ft[AB]=Ft[_B]=Ft[TB]=Ft[$B]=Ft[EB]=Ft[CB]=Ft[kB]=!1;function HB(e){return bB(e)&&mB(e.length)&&!!Ft[gB(e)]}var VB=HB;function KB(e){return function(t){return e(t)}}var m_=KB,op={exports:{}};op.exports;(function(e,t){var r=jA,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===n,a=o&&r.process,l=function(){try{var s=i&&i.require&&i.require("util").types;return s||a&&a.binding&&a.binding("util")}catch{}}();e.exports=l})(op,op.exports);var GB=op.exports,YB=VB,qB=m_,Rw=GB,Dw=Rw&&Rw.isTypedArray,XB=Dw?qB(Dw):YB,b_=XB,QB=eB,ZB=q0,JB=nn,e3=g_,t3=X0,r3=b_,n3=Object.prototype,i3=n3.hasOwnProperty;function o3(e,t){var r=JB(e),n=!r&&ZB(e),i=!r&&!n&&e3(e),o=!r&&!n&&!i&&r3(e),a=r||n||i||o,l=a?QB(e.length,String):[],s=l.length;for(var u in e)(t||i3.call(e,u))&&!(a&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||t3(u,s)))&&l.push(u);return l}var a3=o3,l3=Object.prototype;function s3(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||l3;return e===r}var u3=s3;function c3(e,t){return function(r){return e(t(r))}}var x_=c3,f3=x_,d3=f3(Object.keys,Object),p3=d3,h3=u3,v3=p3,y3=Object.prototype,g3=y3.hasOwnProperty;function m3(e){if(!h3(e))return v3(e);var t=[];for(var r in Object(e))g3.call(e,r)&&r!="constructor"&&t.push(r);return t}var b3=m3,x3=M0,w3=Q0;function S3(e){return e!=null&&w3(e.length)&&!x3(e)}var af=S3,P3=a3,O3=b3,j3=af;function A3(e){return j3(e)?P3(e):O3(e)}var Nh=A3,_3=WF,T3=ZF,$3=Nh;function E3(e){return _3(e,$3,T3)}var C3=E3,Nw=C3,k3=1,M3=Object.prototype,I3=M3.hasOwnProperty;function R3(e,t,r,n,i,o){var a=r&k3,l=Nw(e),s=l.length,u=Nw(t),f=u.length;if(s!=f&&!a)return!1;for(var c=s;c--;){var d=l[c];if(!(a?d in t:I3.call(t,d)))return!1}var p=o.get(e),m=o.get(t);if(p&&m)return p==t&&m==e;var v=!0;o.set(e,t),o.set(t,e);for(var b=a;++c-1}var M4=k4;function I4(e,t,r){for(var n=-1,i=e==null?0:e.length;++n=q4){var u=t?null:G4(e);if(u)return Y4(u);a=!1,i=K4,s=new U4}else s=t?[]:l;e:for(;++n=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function fW(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function dW(e){return e.value}function pW(e,t){if(D.isValidElement(e))return D.cloneElement(e,t);if(typeof e=="function")return D.createElement(e,t);t.ref;var r=cW(t,rW);return D.createElement(G0,r)}var Jw=1,Yo=function(e){function t(){var r;nW(this,t);for(var n=arguments.length,i=new Array(n),o=0;oJw||Math.abs(i.height-this.lastBoundingBox.height)>Jw)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,n&&n(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,n&&n(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Ni({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var i=this.props,o=i.layout,a=i.align,l=i.verticalAlign,s=i.margin,u=i.chartWidth,f=i.chartHeight,c,d;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(a==="center"&&o==="vertical"){var p=this.getBBoxSnapshot();c={left:((u||0)-p.width)/2}}else c=a==="right"?{right:s&&s.right||0}:{left:s&&s.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(l==="middle"){var m=this.getBBoxSnapshot();d={top:((f||0)-m.height)/2}}else d=l==="bottom"?{bottom:s&&s.bottom||0}:{top:s&&s.top||0};return Ni(Ni({},c),d)}},{key:"render",value:function(){var n=this,i=this.props,o=i.content,a=i.width,l=i.height,s=i.wrapperStyle,u=i.payloadUniqBy,f=i.payload,c=Ni(Ni({position:"absolute",width:a||"auto",height:l||"auto"},this.getDefaultPosition(s)),s);return D.createElement("div",{className:"recharts-legend-wrapper",style:c,ref:function(p){n.wrapperNode=p}},pW(o,Ni(Ni({},this.props),{},{payload:__(f,u,dW)})))}}],[{key:"getWithHeight",value:function(n,i){var o=Ni(Ni({},this.defaultProps),n.props),a=o.layout;return a==="vertical"&&Pe(n.props.height)?{height:n.props.height}:a==="horizontal"?{width:n.props.width||i}:null}}])}(_.PureComponent);Lh(Yo,"displayName","Legend");Lh(Yo,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var e1=of,hW=q0,vW=nn,t1=e1?e1.isConcatSpreadable:void 0;function yW(e){return vW(e)||hW(e)||!!(t1&&e&&e[t1])}var gW=yW,mW=v_,bW=gW;function E_(e,t,r,n,i){var o=-1,a=e.length;for(r||(r=bW),i||(i=[]);++o0&&r(l)?t>1?E_(l,t-1,r,n,i):mW(i,l):n||(i[i.length]=l)}return i}var C_=E_;function xW(e){return function(t,r,n){for(var i=-1,o=Object(t),a=n(t),l=a.length;l--;){var s=a[e?l:++i];if(r(o[s],s,o)===!1)break}return t}}var wW=xW,SW=wW,PW=SW(),OW=PW,jW=OW,AW=Nh;function _W(e,t){return e&&jW(e,t,AW)}var k_=_W,TW=af;function $W(e,t){return function(r,n){if(r==null)return r;if(!TW(r))return e(r,n);for(var i=r.length,o=t?i:-1,a=Object(r);(t?o--:++ot||o&&a&&s&&!l&&!u||n&&a&&s||!r&&s||!i)return 1;if(!n&&!o&&!u&&e=l)return s;var u=r[n];return s*(u=="desc"?-1:1)}}return e.index-t.index}var UW=WW,Kv=L0,HW=F0,VW=na,KW=M_,GW=LW,YW=m_,qW=UW,XW=Ds,QW=nn;function ZW(e,t,r){t.length?t=Kv(t,function(o){return QW(o)?function(a){return HW(a,o.length===1?o[0]:o)}:o}):t=[XW];var n=-1;t=Kv(t,YW(VW));var i=KW(e,function(o,a,l){var s=Kv(t,function(u){return u(o)});return{criteria:s,index:++n,value:o}});return GW(i,function(o,a){return qW(o,a,r)})}var JW=ZW;function e5(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var t5=e5,r5=t5,n1=Math.max;function n5(e,t,r){return t=n1(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=n1(n.length-t,0),a=Array(o);++i0){if(++t>=p5)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var g5=y5,m5=d5,b5=g5,x5=b5(m5),w5=x5,S5=Ds,P5=i5,O5=w5;function j5(e,t){return O5(P5(e,t,S5),e+"")}var A5=j5,_5=I0,T5=af,$5=X0,E5=ra;function C5(e,t,r){if(!E5(r))return!1;var n=typeof t;return(n=="number"?T5(r)&&$5(t,r.length):n=="string"&&t in r)?_5(r[t],e):!1}var Fh=C5,k5=C_,M5=JW,I5=A5,o1=Fh,R5=I5(function(e,t){if(e==null)return[];var r=t.length;return r>1&&o1(e,t[0],t[1])?t=[]:r>2&&o1(t[0],t[1],t[2])&&(t=[t[0]]),M5(e,k5(t,1),[])}),D5=R5;const eb=$t(D5);function bc(e){"@babel/helpers - typeof";return bc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bc(e)}function Eg(){return Eg=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=t.x),"".concat(xu,"-left"),Pe(r)&&t&&Pe(t.x)&&r=t.y),"".concat(xu,"-top"),Pe(n)&&t&&Pe(t.y)&&nv?Math.max(f,s[n]):Math.max(c,s[n])}function Q5(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function Z5(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,i=e.position,o=e.reverseDirection,a=e.tooltipBox,l=e.useTranslate3d,s=e.viewBox,u,f,c;return a.height>0&&a.width>0&&r?(f=s1({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:o,tooltipDimension:a.width,viewBox:s,viewBoxDimension:s.width}),c=s1({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:o,tooltipDimension:a.height,viewBox:s,viewBoxDimension:s.height}),u=Q5({translateX:f,translateY:c,useTranslate3d:l})):u=q5,{cssProperties:u,cssClasses:X5({translateX:f,translateY:c,coordinate:r})}}function rs(e){"@babel/helpers - typeof";return rs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rs(e)}function u1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function c1(e){for(var t=1;tf1||Math.abs(n.height-this.state.lastBoundingBox.height)>f1)&&this.setState({lastBoundingBox:{width:n.width,height:n.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var n,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,i=this.props,o=i.active,a=i.allowEscapeViewBox,l=i.animationDuration,s=i.animationEasing,u=i.children,f=i.coordinate,c=i.hasPayload,d=i.isAnimationActive,p=i.offset,m=i.position,v=i.reverseDirection,b=i.useTranslate3d,y=i.viewBox,g=i.wrapperStyle,x=Z5({allowEscapeViewBox:a,coordinate:f,offsetTopLeft:p,position:m,reverseDirection:v,tooltipBox:this.state.lastBoundingBox,useTranslate3d:b,viewBox:y}),P=x.cssClasses,w=x.cssProperties,S=c1(c1({transition:d&&o?"transform ".concat(l,"ms ").concat(s):void 0},w),{},{pointerEvents:"none",visibility:!this.state.dismissed&&o&&c?"visible":"hidden",position:"absolute",top:0,left:0},g);return D.createElement("div",{tabIndex:-1,className:P,style:S,ref:function(E){n.wrapperNode=E}},u)}}])}(_.PureComponent),s8=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},ia={isSsr:s8()};function ns(e){"@babel/helpers - typeof";return ns=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ns(e)}function d1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function p1(e){for(var t=1;t0;return D.createElement(l8,{allowEscapeViewBox:a,animationDuration:l,animationEasing:s,isAnimationActive:d,active:o,coordinate:f,hasPayload:S,offset:p,position:b,reverseDirection:y,useTranslate3d:g,viewBox:x,wrapperStyle:P},m8(u,p1(p1({},this.props),{},{payload:w})))}}])}(_.PureComponent);tb(ri,"displayName","Tooltip");tb(ri,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!ia.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var b8=Ci,x8=function(){return b8.Date.now()},w8=x8,S8=/\s/;function P8(e){for(var t=e.length;t--&&S8.test(e.charAt(t)););return t}var O8=P8,j8=O8,A8=/^\s+/;function _8(e){return e&&e.slice(0,j8(e)+1).replace(A8,"")}var T8=_8,$8=T8,h1=ra,E8=Ts,v1=NaN,C8=/^[-+]0x[0-9a-f]+$/i,k8=/^0b[01]+$/i,M8=/^0o[0-7]+$/i,I8=parseInt;function R8(e){if(typeof e=="number")return e;if(E8(e))return v1;if(h1(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=h1(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=$8(e);var r=k8.test(e);return r||M8.test(e)?I8(e.slice(2),r?2:8):C8.test(e)?v1:+e}var F_=R8,D8=ra,Yv=w8,y1=F_,N8="Expected a function",L8=Math.max,F8=Math.min;function B8(e,t,r){var n,i,o,a,l,s,u=0,f=!1,c=!1,d=!0;if(typeof e!="function")throw new TypeError(N8);t=y1(t)||0,D8(r)&&(f=!!r.leading,c="maxWait"in r,o=c?L8(y1(r.maxWait)||0,t):o,d="trailing"in r?!!r.trailing:d);function p(S){var j=n,E=i;return n=i=void 0,u=S,a=e.apply(E,j),a}function m(S){return u=S,l=setTimeout(y,t),f?p(S):a}function v(S){var j=S-s,E=S-u,R=t-j;return c?F8(R,o-E):R}function b(S){var j=S-s,E=S-u;return s===void 0||j>=t||j<0||c&&E>=o}function y(){var S=Yv();if(b(S))return g(S);l=setTimeout(y,v(S))}function g(S){return l=void 0,d&&n?p(S):(n=i=void 0,a)}function x(){l!==void 0&&clearTimeout(l),u=0,n=s=i=l=void 0}function P(){return l===void 0?a:g(Yv())}function w(){var S=Yv(),j=b(S);if(n=arguments,i=this,s=S,j){if(l===void 0)return m(s);if(c)return clearTimeout(l),l=setTimeout(y,t),p(s)}return l===void 0&&(l=setTimeout(y,t)),a}return w.cancel=x,w.flush=P,w}var z8=B8,W8=z8,U8=ra,H8="Expected a function";function V8(e,t,r){var n=!0,i=!0;if(typeof e!="function")throw new TypeError(H8);return U8(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),W8(e,t,{leading:n,maxWait:t,trailing:i})}var K8=V8;const B_=$t(K8);function wc(e){"@babel/helpers - typeof";return wc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wc(e)}function g1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Jf(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&(le=B_(le,v,{trailing:!0,leading:!1}));var ne=new ResizeObserver(le),Z=w.current.getBoundingClientRect(),X=Z.width,ee=Z.height;return H(X,ee),ne.observe(w.current),function(){ne.disconnect()}},[H,v]);var B=_.useMemo(function(){var le=R.containerWidth,ne=R.containerHeight;if(le<0||ne<0)return null;Yi(Sa(a)||Sa(s),`The width(%s) and height(%s) are both fixed numbers, + maybe you don't need to use a ResponsiveContainer.`,a,s),Yi(!r||r>0,"The aspect(%s) must be greater than zero.",r);var Z=Sa(a)?le:a,X=Sa(s)?ne:s;r&&r>0&&(Z?X=Z/r:X&&(Z=X*r),d&&X>d&&(X=d)),Yi(Z>0||X>0,`The width(%s) and height(%s) of chart should be greater than 0, + please check the style of container, or the props width(%s) and height(%s), + or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the + height and width.`,Z,X,a,s,f,c,r);var ee=!Array.isArray(p)&&Gi(p.type).endsWith("Chart");return D.Children.map(p,function(U){return D.isValidElement(U)?_.cloneElement(U,Jf({width:Z,height:X},ee?{style:Jf({height:"100%",width:"100%",maxHeight:X,maxWidth:Z},U.props.style)}:{})):U})},[r,p,s,d,c,f,R,a]);return D.createElement("div",{id:b?"".concat(b):void 0,className:ut("recharts-responsive-container",y),style:Jf(Jf({},P),{},{width:a,height:s,minWidth:f,minHeight:c,maxHeight:d}),ref:w},B)}),rb=function(t){return null};rb.displayName="Cell";function Sc(e){"@babel/helpers - typeof";return Sc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sc(e)}function b1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ig(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||ia.isSsr)return{width:0,height:0};var n=a6(r),i=JSON.stringify({text:t,copyStyle:n});if(yl.widthCache[i])return yl.widthCache[i];try{var o=document.getElementById(x1);o||(o=document.createElement("span"),o.setAttribute("id",x1),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var a=Ig(Ig({},o6),n);Object.assign(o.style,a),o.textContent="".concat(t);var l=o.getBoundingClientRect(),s={width:l.width,height:l.height};return yl.widthCache[i]=s,++yl.cacheCount>i6&&(yl.cacheCount=0,yl.widthCache={}),s}catch{return{width:0,height:0}}},l6=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Pc(e){"@babel/helpers - typeof";return Pc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pc(e)}function up(e,t){return f6(e)||c6(e,t)||u6(e,t)||s6()}function s6(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function u6(e,t){if(e){if(typeof e=="string")return w1(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return w1(e,t)}}function w1(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function j6(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function _1(e,t){return $6(e)||T6(e,t)||_6(e,t)||A6()}function A6(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _6(e,t){if(e){if(typeof e=="string")return T1(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return T1(e,t)}}function T1(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&arguments[0]!==void 0?arguments[0]:[];return Z.reduce(function(X,ee){var U=ee.word,te=ee.width,ue=X[X.length-1];if(ue&&(i==null||o||ue.width+te+nee.width?X:ee})};if(!f)return p;for(var v="…",b=function(Z){var X=c.slice(0,Z),ee=V_({breakAll:u,style:s,children:X+v}).wordsWithComputedWidth,U=d(ee),te=U.length>a||m(U).width>Number(i);return[te,U]},y=0,g=c.length-1,x=0,P;y<=g&&x<=c.length-1;){var w=Math.floor((y+g)/2),S=w-1,j=b(S),E=_1(j,2),R=E[0],K=E[1],H=b(w),B=_1(H,1),le=B[0];if(!R&&!le&&(y=w+1),R&&le&&(g=w-1),!R&&le){P=K;break}x++}return P||p},$1=function(t){var r=Ge(t)?[]:t.toString().split(H_);return[{words:r}]},C6=function(t){var r=t.width,n=t.scaleToFit,i=t.children,o=t.style,a=t.breakAll,l=t.maxLines;if((r||n)&&!ia.isSsr){var s,u,f=V_({breakAll:a,children:i,style:o});if(f){var c=f.wordsWithComputedWidth,d=f.spaceWidth;s=c,u=d}else return $1(i);return E6({breakAll:a,children:i,maxLines:l,style:o},s,u,r,n)}return $1(i)},E1="#808080",cp=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,o=i===void 0?0:i,a=t.lineHeight,l=a===void 0?"1em":a,s=t.capHeight,u=s===void 0?"0.71em":s,f=t.scaleToFit,c=f===void 0?!1:f,d=t.textAnchor,p=d===void 0?"start":d,m=t.verticalAnchor,v=m===void 0?"end":m,b=t.fill,y=b===void 0?E1:b,g=A1(t,P6),x=_.useMemo(function(){return C6({breakAll:g.breakAll,children:g.children,maxLines:g.maxLines,scaleToFit:c,style:g.style,width:g.width})},[g.breakAll,g.children,g.maxLines,c,g.style,g.width]),P=g.dx,w=g.dy,S=g.angle,j=g.className,E=g.breakAll,R=A1(g,O6);if(!pr(n)||!pr(o))return null;var K=n+(Pe(P)?P:0),H=o+(Pe(w)?w:0),B;switch(v){case"start":B=qv("calc(".concat(u,")"));break;case"middle":B=qv("calc(".concat((x.length-1)/2," * -").concat(l," + (").concat(u," / 2))"));break;default:B=qv("calc(".concat(x.length-1," * -").concat(l,")"));break}var le=[];if(c){var ne=x[0].width,Z=g.width;le.push("scale(".concat((Pe(Z)?Z/ne:1)/ne,")"))}return S&&le.push("rotate(".concat(S,", ").concat(K,", ").concat(H,")")),le.length&&(R.transform=le.join(" ")),D.createElement("text",Rg({},Xe(R,!0),{x:K,y:H,className:ut("recharts-text",j),textAnchor:p,fill:y.includes("url")?E1:y}),x.map(function(X,ee){var U=X.words.join(E?"":" ");return D.createElement("tspan",{x:K,dy:ee===0?B:l,key:"".concat(U,"-").concat(ee)},U)}))};function qo(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function k6(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function nb(e){let t,r,n;e.length!==2?(t=qo,r=(l,s)=>qo(e(l),s),n=(l,s)=>e(l)-s):(t=e===qo||e===k6?e:M6,r=e,n=e);function i(l,s,u=0,f=l.length){if(u>>1;r(l[c],s)<0?u=c+1:f=c}while(u>>1;r(l[c],s)<=0?u=c+1:f=c}while(uu&&n(l[c-1],s)>-n(l[c],s)?c-1:c}return{left:i,center:a,right:o}}function M6(){return 0}function K_(e){return e===null?NaN:+e}function*I6(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const R6=nb(qo),lf=R6.right;nb(K_).center;class C1 extends Map{constructor(t,r=L6){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(k1(this,t))}has(t){return super.has(k1(this,t))}set(t,r){return super.set(D6(this,t),r)}delete(t){return super.delete(N6(this,t))}}function k1({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function D6({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function N6({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function L6(e){return e!==null&&typeof e=="object"?e.valueOf():e}function F6(e=qo){if(e===qo)return G_;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function G_(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const B6=Math.sqrt(50),z6=Math.sqrt(10),W6=Math.sqrt(2);function fp(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),o=n/Math.pow(10,i),a=o>=B6?10:o>=z6?5:o>=W6?2:1;let l,s,u;return i<0?(u=Math.pow(10,-i)/a,l=Math.round(e*u),s=Math.round(t*u),l/ut&&--s,u=-u):(u=Math.pow(10,i)*a,l=Math.round(e/u),s=Math.round(t/u),l*ut&&--s),s0))return[];if(e===t)return[e];const n=t=i))return[];const l=o-i+1,s=new Array(l);if(n)if(a<0)for(let u=0;u=n)&&(r=n);return r}function I1(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function Y_(e,t,r=0,n=1/0,i){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(i=i===void 0?G_:F6(i);n>r;){if(n-r>600){const s=n-r+1,u=t-r+1,f=Math.log(s),c=.5*Math.exp(2*f/3),d=.5*Math.sqrt(f*c*(s-c)/s)*(u-s/2<0?-1:1),p=Math.max(r,Math.floor(t-u*c/s+d)),m=Math.min(n,Math.floor(t+(s-u)*c/s+d));Y_(e,t,p,m,i)}const o=e[t];let a=r,l=n;for(wu(e,r,t),i(e[n],o)>0&&wu(e,r,n);a0;)--l}i(e[r],o)===0?wu(e,r,l):(++l,wu(e,l,n)),l<=t&&(r=l+1),t<=l&&(n=l-1)}return e}function wu(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function U6(e,t,r){if(e=Float64Array.from(I6(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return I1(e);if(t>=1)return M1(e);var n,i=(n-1)*t,o=Math.floor(i),a=M1(Y_(e,o).subarray(0,o+1)),l=I1(e.subarray(o+1));return a+(l-a)*(i-o)}}function H6(e,t,r=K_){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,o=Math.floor(i),a=+r(e[o],o,e),l=+r(e[o+1],o+1,e);return a+(l-a)*(i-o)}}function V6(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,o=new Array(i);++n>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?td(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?td(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=G6.exec(e))?new Qr(t[1],t[2],t[3],1):(t=Y6.exec(e))?new Qr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=q6.exec(e))?td(t[1],t[2],t[3],t[4]):(t=X6.exec(e))?td(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Q6.exec(e))?z1(t[1],t[2]/100,t[3]/100,1):(t=Z6.exec(e))?z1(t[1],t[2]/100,t[3]/100,t[4]):R1.hasOwnProperty(e)?L1(R1[e]):e==="transparent"?new Qr(NaN,NaN,NaN,0):null}function L1(e){return new Qr(e>>16&255,e>>8&255,e&255,1)}function td(e,t,r,n){return n<=0&&(e=t=r=NaN),new Qr(e,t,r,n)}function tU(e){return e instanceof sf||(e=_c(e)),e?(e=e.rgb(),new Qr(e.r,e.g,e.b,e.opacity)):new Qr}function Bg(e,t,r,n){return arguments.length===1?tU(e):new Qr(e,t,r,n??1)}function Qr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}ob(Qr,Bg,X_(sf,{brighter(e){return e=e==null?dp:Math.pow(dp,e),new Qr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?jc:Math.pow(jc,e),new Qr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Qr(Ea(this.r),Ea(this.g),Ea(this.b),pp(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:F1,formatHex:F1,formatHex8:rU,formatRgb:B1,toString:B1}));function F1(){return`#${Pa(this.r)}${Pa(this.g)}${Pa(this.b)}`}function rU(){return`#${Pa(this.r)}${Pa(this.g)}${Pa(this.b)}${Pa((isNaN(this.opacity)?1:this.opacity)*255)}`}function B1(){const e=pp(this.opacity);return`${e===1?"rgb(":"rgba("}${Ea(this.r)}, ${Ea(this.g)}, ${Ea(this.b)}${e===1?")":`, ${e})`}`}function pp(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ea(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Pa(e){return e=Ea(e),(e<16?"0":"")+e.toString(16)}function z1(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new ai(e,t,r,n)}function Q_(e){if(e instanceof ai)return new ai(e.h,e.s,e.l,e.opacity);if(e instanceof sf||(e=_c(e)),!e)return new ai;if(e instanceof ai)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=NaN,l=o-i,s=(o+i)/2;return l?(t===o?a=(r-n)/l+(r0&&s<1?0:a,new ai(a,l,s,e.opacity)}function nU(e,t,r,n){return arguments.length===1?Q_(e):new ai(e,t,r,n??1)}function ai(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}ob(ai,nU,X_(sf,{brighter(e){return e=e==null?dp:Math.pow(dp,e),new ai(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?jc:Math.pow(jc,e),new ai(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new Qr(Xv(e>=240?e-240:e+120,i,n),Xv(e,i,n),Xv(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new ai(W1(this.h),rd(this.s),rd(this.l),pp(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=pp(this.opacity);return`${e===1?"hsl(":"hsla("}${W1(this.h)}, ${rd(this.s)*100}%, ${rd(this.l)*100}%${e===1?")":`, ${e})`}`}}));function W1(e){return e=(e||0)%360,e<0?e+360:e}function rd(e){return Math.max(0,Math.min(1,e||0))}function Xv(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const ab=e=>()=>e;function iU(e,t){return function(r){return e+r*t}}function oU(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function aU(e){return(e=+e)==1?Z_:function(t,r){return r-t?oU(t,r,e):ab(isNaN(t)?r:t)}}function Z_(e,t){var r=t-e;return r?iU(e,r):ab(isNaN(e)?t:e)}const U1=function e(t){var r=aU(t);function n(i,o){var a=r((i=Bg(i)).r,(o=Bg(o)).r),l=r(i.g,o.g),s=r(i.b,o.b),u=Z_(i.opacity,o.opacity);return function(f){return i.r=a(f),i.g=l(f),i.b=s(f),i.opacity=u(f),i+""}}return n.gamma=e,n}(1);function lU(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(o){for(i=0;ir&&(o=t.slice(r,o),l[a]?l[a]+=o:l[++a]=o),(n=n[0])===(i=i[0])?l[a]?l[a]+=i:l[++a]=i:(l[++a]=null,s.push({i:a,x:hp(n,i)})),r=Qv.lastIndex;return rt&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function mU(e,t,r){var n=e[0],i=e[1],o=t[0],a=t[1];return i2?bU:mU,s=u=null,c}function c(d){return d==null||isNaN(d=+d)?o:(s||(s=l(e.map(n),t,r)))(n(a(d)))}return c.invert=function(d){return a(i((u||(u=l(t,e.map(n),hp)))(d)))},c.domain=function(d){return arguments.length?(e=Array.from(d,vp),f()):e.slice()},c.range=function(d){return arguments.length?(t=Array.from(d),f()):t.slice()},c.rangeRound=function(d){return t=Array.from(d),r=lb,f()},c.clamp=function(d){return arguments.length?(a=d?!0:Ur,f()):a!==Ur},c.interpolate=function(d){return arguments.length?(r=d,f()):r},c.unknown=function(d){return arguments.length?(o=d,c):o},function(d,p){return n=d,i=p,f()}}function sb(){return Bh()(Ur,Ur)}function xU(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function yp(e,t){if(!isFinite(e)||e===0)return null;var r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function is(e){return e=yp(Math.abs(e)),e?e[1]:NaN}function wU(e,t){return function(r,n){for(var i=r.length,o=[],a=0,l=e[0],s=0;i>0&&l>0&&(s+l+1>n&&(l=Math.max(1,n-s)),o.push(r.substring(i-=l,i+l)),!((s+=l+1)>n));)l=e[a=(a+1)%e.length];return o.reverse().join(t)}}function SU(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var PU=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Tc(e){if(!(t=PU.exec(e)))throw new Error("invalid format: "+e);var t;return new ub({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Tc.prototype=ub.prototype;function ub(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}ub.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function OU(e){e:for(var t=e.length,r=1,n=-1,i;r0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var gp;function jU(e,t){var r=yp(e,t);if(!r)return gp=void 0,e.toPrecision(t);var n=r[0],i=r[1],o=i-(gp=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=n.length;return o===a?n:o>a?n+new Array(o-a+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+new Array(1-o).join("0")+yp(e,Math.max(0,t+o-1))[0]}function V1(e,t){var r=yp(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const K1={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:xU,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>V1(e*100,t),r:V1,s:jU,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function G1(e){return e}var Y1=Array.prototype.map,q1=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function AU(e){var t=e.grouping===void 0||e.thousands===void 0?G1:wU(Y1.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?G1:SU(Y1.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"−":e.minus+"",s=e.nan===void 0?"NaN":e.nan+"";function u(c,d){c=Tc(c);var p=c.fill,m=c.align,v=c.sign,b=c.symbol,y=c.zero,g=c.width,x=c.comma,P=c.precision,w=c.trim,S=c.type;S==="n"?(x=!0,S="g"):K1[S]||(P===void 0&&(P=12),w=!0,S="g"),(y||p==="0"&&m==="=")&&(y=!0,p="0",m="=");var j=(d&&d.prefix!==void 0?d.prefix:"")+(b==="$"?r:b==="#"&&/[boxX]/.test(S)?"0"+S.toLowerCase():""),E=(b==="$"?n:/[%p]/.test(S)?a:"")+(d&&d.suffix!==void 0?d.suffix:""),R=K1[S],K=/[defgprs%]/.test(S);P=P===void 0?6:/[gprs]/.test(S)?Math.max(1,Math.min(21,P)):Math.max(0,Math.min(20,P));function H(B){var le=j,ne=E,Z,X,ee;if(S==="c")ne=R(B)+ne,B="";else{B=+B;var U=B<0||1/B<0;if(B=isNaN(B)?s:R(Math.abs(B),P),w&&(B=OU(B)),U&&+B==0&&v!=="+"&&(U=!1),le=(U?v==="("?v:l:v==="-"||v==="("?"":v)+le,ne=(S==="s"&&!isNaN(B)&&gp!==void 0?q1[8+gp/3]:"")+ne+(U&&v==="("?")":""),K){for(Z=-1,X=B.length;++Zee||ee>57){ne=(ee===46?i+B.slice(Z+1):B.slice(Z))+ne,B=B.slice(0,Z);break}}}x&&!y&&(B=t(B,1/0));var te=le.length+B.length+ne.length,ue=te>1)+le+B+ne+ue.slice(te);break;default:B=ue+le+B+ne;break}return o(B)}return H.toString=function(){return c+""},H}function f(c,d){var p=Math.max(-8,Math.min(8,Math.floor(is(d)/3)))*3,m=Math.pow(10,-p),v=u((c=Tc(c),c.type="f",c),{suffix:q1[8+p/3]});return function(b){return v(m*b)}}return{format:u,formatPrefix:f}}var nd,cb,J_;_U({thousands:",",grouping:[3],currency:["$",""]});function _U(e){return nd=AU(e),cb=nd.format,J_=nd.formatPrefix,nd}function TU(e){return Math.max(0,-is(Math.abs(e)))}function $U(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(is(t)/3)))*3-is(Math.abs(e)))}function EU(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,is(t)-is(e))+1}function eT(e,t,r,n){var i=Lg(e,t,r),o;switch(n=Tc(n??",f"),n.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(o=$U(i,a))&&(n.precision=o),J_(n,a)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(o=EU(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=o-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(o=TU(i))&&(n.precision=o-(n.type==="%")*2);break}}return cb(n)}function oa(e){var t=e.domain;return e.ticks=function(r){var n=t();return Dg(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return eT(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,o=n.length-1,a=n[i],l=n[o],s,u,f=10;for(l0;){if(u=Ng(a,l,r),u===s)return n[i]=a,n[o]=l,t(n);if(u>0)a=Math.floor(a/u)*u,l=Math.ceil(l/u)*u;else if(u<0)a=Math.ceil(a*u)/u,l=Math.floor(l*u)/u;else break;s=u}return e},e}function mp(){var e=sb();return e.copy=function(){return uf(e,mp())},zn.apply(e,arguments),oa(e)}function tT(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,vp),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return tT(e).unknown(t)},e=arguments.length?Array.from(e,vp):[0,1],oa(r)}function rT(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],o=e[n],a;return oMath.pow(e,t)}function RU(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function Z1(e){return(t,r)=>-e(-t,r)}function fb(e){const t=e(X1,Q1),r=t.domain;let n=10,i,o;function a(){return i=RU(n),o=IU(n),r()[0]<0?(i=Z1(i),o=Z1(o),e(CU,kU)):e(X1,Q1),t}return t.base=function(l){return arguments.length?(n=+l,a()):n},t.domain=function(l){return arguments.length?(r(l),a()):r()},t.ticks=l=>{const s=r();let u=s[0],f=s[s.length-1];const c=f0){for(;d<=p;++d)for(m=1;mf)break;y.push(v)}}else for(;d<=p;++d)for(m=n-1;m>=1;--m)if(v=d>0?m/o(-d):m*o(d),!(vf)break;y.push(v)}y.length*2{if(l==null&&(l=10),s==null&&(s=n===10?"s":","),typeof s!="function"&&(!(n%1)&&(s=Tc(s)).precision==null&&(s.trim=!0),s=cb(s)),l===1/0)return s;const u=Math.max(1,n*l/t.ticks().length);return f=>{let c=f/o(Math.round(i(f)));return c*nr(rT(r(),{floor:l=>o(Math.floor(i(l))),ceil:l=>o(Math.ceil(i(l)))})),t}function nT(){const e=fb(Bh()).domain([1,10]);return e.copy=()=>uf(e,nT()).base(e.base()),zn.apply(e,arguments),e}function J1(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function eS(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function db(e){var t=1,r=e(J1(t),eS(t));return r.constant=function(n){return arguments.length?e(J1(t=+n),eS(t)):t},oa(r)}function iT(){var e=db(Bh());return e.copy=function(){return uf(e,iT()).constant(e.constant())},zn.apply(e,arguments)}function tS(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function DU(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function NU(e){return e<0?-e*e:e*e}function pb(e){var t=e(Ur,Ur),r=1;function n(){return r===1?e(Ur,Ur):r===.5?e(DU,NU):e(tS(r),tS(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},oa(t)}function hb(){var e=pb(Bh());return e.copy=function(){return uf(e,hb()).exponent(e.exponent())},zn.apply(e,arguments),e}function LU(){return hb.apply(null,arguments).exponent(.5)}function rS(e){return Math.sign(e)*e*e}function FU(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function oT(){var e=sb(),t=[0,1],r=!1,n;function i(o){var a=FU(e(o));return isNaN(a)?n:r?Math.round(a):a}return i.invert=function(o){return e.invert(rS(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,vp)).map(rS)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(r=!!o,i):r},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return oT(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},zn.apply(i,arguments),oa(i)}function aT(){var e=[],t=[],r=[],n;function i(){var a=0,l=Math.max(1,t.length);for(r=new Array(l-1);++a0?r[l-1]:e[0],l=r?[n[r-1],t]:[n[u-1],n[u]]},a.unknown=function(s){return arguments.length&&(o=s),a},a.thresholds=function(){return n.slice()},a.copy=function(){return lT().domain([e,t]).range(i).unknown(o)},zn.apply(oa(a),arguments)}function sT(){var e=[.5],t=[0,1],r,n=1;function i(o){return o!=null&&o<=o?t[lf(e,o,0,n)]:r}return i.domain=function(o){return arguments.length?(e=Array.from(o),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var a=t.indexOf(o);return[e[a-1],e[a]]},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return sT().domain(e).range(t).unknown(r)},zn.apply(i,arguments)}const Zv=new Date,Jv=new Date;function vr(e,t,r,n){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const a=i(o),l=i.ceil(o);return o-a(t(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,l)=>{const s=[];if(o=i.ceil(o),l=l==null?1:Math.floor(l),!(o0))return s;let u;do s.push(u=new Date(+o)),t(o,l),e(o);while(uvr(a=>{if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},(a,l)=>{if(a>=a)if(l<0)for(;++l<=0;)for(;t(a,-1),!o(a););else for(;--l>=0;)for(;t(a,1),!o(a););}),r&&(i.count=(o,a)=>(Zv.setTime(+o),Jv.setTime(+a),e(Zv),e(Jv),Math.floor(r(Zv,Jv))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(n?a=>n(a)%o===0:a=>i.count(0,a)%o===0):i)),i}const bp=vr(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);bp.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?vr(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):bp);bp.range;const Ui=1e3,In=Ui*60,Hi=In*60,to=Hi*24,vb=to*7,nS=to*30,ey=to*365,Oa=vr(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Ui)},(e,t)=>(t-e)/Ui,e=>e.getUTCSeconds());Oa.range;const yb=vr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ui)},(e,t)=>{e.setTime(+e+t*In)},(e,t)=>(t-e)/In,e=>e.getMinutes());yb.range;const gb=vr(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*In)},(e,t)=>(t-e)/In,e=>e.getUTCMinutes());gb.range;const mb=vr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ui-e.getMinutes()*In)},(e,t)=>{e.setTime(+e+t*Hi)},(e,t)=>(t-e)/Hi,e=>e.getHours());mb.range;const bb=vr(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Hi)},(e,t)=>(t-e)/Hi,e=>e.getUTCHours());bb.range;const cf=vr(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*In)/to,e=>e.getDate()-1);cf.range;const zh=vr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/to,e=>e.getUTCDate()-1);zh.range;const uT=vr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/to,e=>Math.floor(e/to));uT.range;function Ya(e){return vr(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*In)/vb)}const Wh=Ya(0),xp=Ya(1),BU=Ya(2),zU=Ya(3),os=Ya(4),WU=Ya(5),UU=Ya(6);Wh.range;xp.range;BU.range;zU.range;os.range;WU.range;UU.range;function qa(e){return vr(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/vb)}const Uh=qa(0),wp=qa(1),HU=qa(2),VU=qa(3),as=qa(4),KU=qa(5),GU=qa(6);Uh.range;wp.range;HU.range;VU.range;as.range;KU.range;GU.range;const xb=vr(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());xb.range;const wb=vr(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());wb.range;const ro=vr(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());ro.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:vr(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});ro.range;const no=vr(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());no.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:vr(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});no.range;function cT(e,t,r,n,i,o){const a=[[Oa,1,Ui],[Oa,5,5*Ui],[Oa,15,15*Ui],[Oa,30,30*Ui],[o,1,In],[o,5,5*In],[o,15,15*In],[o,30,30*In],[i,1,Hi],[i,3,3*Hi],[i,6,6*Hi],[i,12,12*Hi],[n,1,to],[n,2,2*to],[r,1,vb],[t,1,nS],[t,3,3*nS],[e,1,ey]];function l(u,f,c){const d=fb).right(a,d);if(p===a.length)return e.every(Lg(u/ey,f/ey,c));if(p===0)return bp.every(Math.max(Lg(u,f,c),1));const[m,v]=a[d/a[p-1][2]53)return null;"w"in Q||(Q.w=1),"Z"in Q?(je=ry(Su(Q.y,0,1)),Ae=je.getUTCDay(),je=Ae>4||Ae===0?wp.ceil(je):wp(je),je=zh.offset(je,(Q.V-1)*7),Q.y=je.getUTCFullYear(),Q.m=je.getUTCMonth(),Q.d=je.getUTCDate()+(Q.w+6)%7):(je=ty(Su(Q.y,0,1)),Ae=je.getDay(),je=Ae>4||Ae===0?xp.ceil(je):xp(je),je=cf.offset(je,(Q.V-1)*7),Q.y=je.getFullYear(),Q.m=je.getMonth(),Q.d=je.getDate()+(Q.w+6)%7)}else("W"in Q||"U"in Q)&&("w"in Q||(Q.w="u"in Q?Q.u%7:"W"in Q?1:0),Ae="Z"in Q?ry(Su(Q.y,0,1)).getUTCDay():ty(Su(Q.y,0,1)).getDay(),Q.m=0,Q.d="W"in Q?(Q.w+6)%7+Q.W*7-(Ae+5)%7:Q.w+Q.U*7-(Ae+6)%7);return"Z"in Q?(Q.H+=Q.Z/100|0,Q.M+=Q.Z%100,ry(Q)):ty(Q)}}function E(Te,Ke,he,Q){for(var V=0,je=Ke.length,Ae=he.length,Be,Ie;V=Ae)return-1;if(Be=Ke.charCodeAt(V++),Be===37){if(Be=Ke.charAt(V++),Ie=w[Be in iS?Ke.charAt(V++):Be],!Ie||(Q=Ie(Te,he,Q))<0)return-1}else if(Be!=he.charCodeAt(Q++))return-1}return Q}function R(Te,Ke,he){var Q=u.exec(Ke.slice(he));return Q?(Te.p=f.get(Q[0].toLowerCase()),he+Q[0].length):-1}function K(Te,Ke,he){var Q=p.exec(Ke.slice(he));return Q?(Te.w=m.get(Q[0].toLowerCase()),he+Q[0].length):-1}function H(Te,Ke,he){var Q=c.exec(Ke.slice(he));return Q?(Te.w=d.get(Q[0].toLowerCase()),he+Q[0].length):-1}function B(Te,Ke,he){var Q=y.exec(Ke.slice(he));return Q?(Te.m=g.get(Q[0].toLowerCase()),he+Q[0].length):-1}function le(Te,Ke,he){var Q=v.exec(Ke.slice(he));return Q?(Te.m=b.get(Q[0].toLowerCase()),he+Q[0].length):-1}function ne(Te,Ke,he){return E(Te,t,Ke,he)}function Z(Te,Ke,he){return E(Te,r,Ke,he)}function X(Te,Ke,he){return E(Te,n,Ke,he)}function ee(Te){return a[Te.getDay()]}function U(Te){return o[Te.getDay()]}function te(Te){return s[Te.getMonth()]}function ue(Te){return l[Te.getMonth()]}function ae(Te){return i[+(Te.getHours()>=12)]}function pe(Te){return 1+~~(Te.getMonth()/3)}function Ee(Te){return a[Te.getUTCDay()]}function it(Te){return o[Te.getUTCDay()]}function ot(Te){return s[Te.getUTCMonth()]}function jt(Te){return l[Te.getUTCMonth()]}function pt(Te){return i[+(Te.getUTCHours()>=12)]}function er(Te){return 1+~~(Te.getUTCMonth()/3)}return{format:function(Te){var Ke=S(Te+="",x);return Ke.toString=function(){return Te},Ke},parse:function(Te){var Ke=j(Te+="",!1);return Ke.toString=function(){return Te},Ke},utcFormat:function(Te){var Ke=S(Te+="",P);return Ke.toString=function(){return Te},Ke},utcParse:function(Te){var Ke=j(Te+="",!0);return Ke.toString=function(){return Te},Ke}}}var iS={"-":"",_:" ",0:"0"},Sr=/^\s*\d+/,JU=/^%/,eH=/[\\^$*+?|[\]().{}]/g;function gt(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",o=i.length;return n+(o[t.toLowerCase(),r]))}function rH(e,t,r){var n=Sr.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function nH(e,t,r){var n=Sr.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function iH(e,t,r){var n=Sr.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function oH(e,t,r){var n=Sr.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function aH(e,t,r){var n=Sr.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function oS(e,t,r){var n=Sr.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function aS(e,t,r){var n=Sr.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function lH(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function sH(e,t,r){var n=Sr.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function uH(e,t,r){var n=Sr.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function lS(e,t,r){var n=Sr.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function cH(e,t,r){var n=Sr.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function sS(e,t,r){var n=Sr.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function fH(e,t,r){var n=Sr.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function dH(e,t,r){var n=Sr.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function pH(e,t,r){var n=Sr.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function hH(e,t,r){var n=Sr.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function vH(e,t,r){var n=JU.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function yH(e,t,r){var n=Sr.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function gH(e,t,r){var n=Sr.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function uS(e,t){return gt(e.getDate(),t,2)}function mH(e,t){return gt(e.getHours(),t,2)}function bH(e,t){return gt(e.getHours()%12||12,t,2)}function xH(e,t){return gt(1+cf.count(ro(e),e),t,3)}function fT(e,t){return gt(e.getMilliseconds(),t,3)}function wH(e,t){return fT(e,t)+"000"}function SH(e,t){return gt(e.getMonth()+1,t,2)}function PH(e,t){return gt(e.getMinutes(),t,2)}function OH(e,t){return gt(e.getSeconds(),t,2)}function jH(e){var t=e.getDay();return t===0?7:t}function AH(e,t){return gt(Wh.count(ro(e)-1,e),t,2)}function dT(e){var t=e.getDay();return t>=4||t===0?os(e):os.ceil(e)}function _H(e,t){return e=dT(e),gt(os.count(ro(e),e)+(ro(e).getDay()===4),t,2)}function TH(e){return e.getDay()}function $H(e,t){return gt(xp.count(ro(e)-1,e),t,2)}function EH(e,t){return gt(e.getFullYear()%100,t,2)}function CH(e,t){return e=dT(e),gt(e.getFullYear()%100,t,2)}function kH(e,t){return gt(e.getFullYear()%1e4,t,4)}function MH(e,t){var r=e.getDay();return e=r>=4||r===0?os(e):os.ceil(e),gt(e.getFullYear()%1e4,t,4)}function IH(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+gt(t/60|0,"0",2)+gt(t%60,"0",2)}function cS(e,t){return gt(e.getUTCDate(),t,2)}function RH(e,t){return gt(e.getUTCHours(),t,2)}function DH(e,t){return gt(e.getUTCHours()%12||12,t,2)}function NH(e,t){return gt(1+zh.count(no(e),e),t,3)}function pT(e,t){return gt(e.getUTCMilliseconds(),t,3)}function LH(e,t){return pT(e,t)+"000"}function FH(e,t){return gt(e.getUTCMonth()+1,t,2)}function BH(e,t){return gt(e.getUTCMinutes(),t,2)}function zH(e,t){return gt(e.getUTCSeconds(),t,2)}function WH(e){var t=e.getUTCDay();return t===0?7:t}function UH(e,t){return gt(Uh.count(no(e)-1,e),t,2)}function hT(e){var t=e.getUTCDay();return t>=4||t===0?as(e):as.ceil(e)}function HH(e,t){return e=hT(e),gt(as.count(no(e),e)+(no(e).getUTCDay()===4),t,2)}function VH(e){return e.getUTCDay()}function KH(e,t){return gt(wp.count(no(e)-1,e),t,2)}function GH(e,t){return gt(e.getUTCFullYear()%100,t,2)}function YH(e,t){return e=hT(e),gt(e.getUTCFullYear()%100,t,2)}function qH(e,t){return gt(e.getUTCFullYear()%1e4,t,4)}function XH(e,t){var r=e.getUTCDay();return e=r>=4||r===0?as(e):as.ceil(e),gt(e.getUTCFullYear()%1e4,t,4)}function QH(){return"+0000"}function fS(){return"%"}function dS(e){return+e}function pS(e){return Math.floor(+e/1e3)}var gl,vT,yT;ZH({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function ZH(e){return gl=ZU(e),vT=gl.format,gl.parse,yT=gl.utcFormat,gl.utcParse,gl}function JH(e){return new Date(e)}function e7(e){return e instanceof Date?+e:+new Date(+e)}function Sb(e,t,r,n,i,o,a,l,s,u){var f=sb(),c=f.invert,d=f.domain,p=u(".%L"),m=u(":%S"),v=u("%I:%M"),b=u("%I %p"),y=u("%a %d"),g=u("%b %d"),x=u("%B"),P=u("%Y");function w(S){return(s(S)t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,o)=>U6(e,o/n))},r.copy=function(){return xT(t).domain(e)},lo.apply(r,arguments)}function Vh(){var e=0,t=.5,r=1,n=1,i,o,a,l,s,u=Ur,f,c=!1,d;function p(v){return isNaN(v=+v)?d:(v=.5+((v=+f(v))-o)*(n*vt}var s7=l7,u7=OT,c7=s7,f7=Ds;function d7(e){return e&&e.length?u7(e,f7,c7):void 0}var p7=d7;const No=$t(p7);function h7(e,t){return ee.e^o.s<0?1:-1;for(n=o.d.length,i=e.d.length,t=0,r=ne.d[t]^o.s<0?1:-1;return n===i?0:n>i^o.s<0?1:-1};De.decimalPlaces=De.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*Bt;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};De.dividedBy=De.div=function(e){return qi(this,new this.constructor(e))};De.dividedToIntegerBy=De.idiv=function(e){var t=this,r=t.constructor;return Tt(qi(t,new r(e),0,1),r.precision)};De.equals=De.eq=function(e){return!this.cmp(e)};De.exponent=function(){return ar(this)};De.greaterThan=De.gt=function(e){return this.cmp(e)>0};De.greaterThanOrEqualTo=De.gte=function(e){return this.cmp(e)>=0};De.isInteger=De.isint=function(){return this.e>this.d.length-2};De.isNegative=De.isneg=function(){return this.s<0};De.isPositive=De.ispos=function(){return this.s>0};De.isZero=function(){return this.s===0};De.lessThan=De.lt=function(e){return this.cmp(e)<0};De.lessThanOrEqualTo=De.lte=function(e){return this.cmp(e)<1};De.logarithm=De.log=function(e){var t,r=this,n=r.constructor,i=n.precision,o=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(pn))throw Error(Fn+"NaN");if(r.s<1)throw Error(Fn+(r.s?"NaN":"-Infinity"));return r.eq(pn)?new n(0):(Ht=!1,t=qi($c(r,o),$c(e,o),o),Ht=!0,Tt(t,i))};De.minus=De.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?TT(t,e):AT(t,(e.s=-e.s,e))};De.modulo=De.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(Fn+"NaN");return r.s?(Ht=!1,t=qi(r,e,0,1).times(e),Ht=!0,r.minus(t)):Tt(new n(r),i)};De.naturalExponential=De.exp=function(){return _T(this)};De.naturalLogarithm=De.ln=function(){return $c(this)};De.negated=De.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};De.plus=De.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?AT(t,e):TT(t,(e.s=-e.s,e))};De.precision=De.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ca+e);if(t=ar(i)+1,n=i.d.length-1,r=n*Bt+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};De.squareRoot=De.sqrt=function(){var e,t,r,n,i,o,a,l=this,s=l.constructor;if(l.s<1){if(!l.s)return new s(0);throw Error(Fn+"NaN")}for(e=ar(l),Ht=!1,i=Math.sqrt(+l),i==0||i==1/0?(t=Pi(l.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Fs((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new s(t)):n=new s(i.toString()),r=s.precision,i=a=r+3;;)if(o=n,n=o.plus(qi(l,o,a+2)).times(.5),Pi(o.d).slice(0,a)===(t=Pi(n.d)).slice(0,a)){if(t=t.slice(a-3,a+1),i==a&&t=="4999"){if(Tt(o,r+1,0),o.times(o).eq(l)){n=o;break}}else if(t!="9999")break;a+=4}return Ht=!0,Tt(n,r)};De.times=De.mul=function(e){var t,r,n,i,o,a,l,s,u,f=this,c=f.constructor,d=f.d,p=(e=new c(e)).d;if(!f.s||!e.s)return new c(0);for(e.s*=f.s,r=f.e+e.e,s=d.length,u=p.length,s=0;){for(t=0,i=s+n;i>n;)l=o[i]+p[n]*d[i-n-1]+t,o[i--]=l%br|0,t=l/br|0;o[i]=(o[i]+t)%br|0}for(;!o[--a];)o.pop();return t?++r:o.shift(),e.d=o,e.e=r,Ht?Tt(e,c.precision):e};De.toDecimalPlaces=De.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Ei(e,0,Ls),t===void 0?t=n.rounding:Ei(t,0,8),Tt(r,e+ar(r)+1,t))};De.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=za(n,!0):(Ei(e,0,Ls),t===void 0?t=i.rounding:Ei(t,0,8),n=Tt(new i(n),e+1,t),r=za(n,!0,e+1)),r};De.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?za(i):(Ei(e,0,Ls),t===void 0?t=o.rounding:Ei(t,0,8),n=Tt(new o(i),e+ar(i)+1,t),r=za(n.abs(),!1,e+ar(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};De.toInteger=De.toint=function(){var e=this,t=e.constructor;return Tt(new t(e),ar(e)+1,t.rounding)};De.toNumber=function(){return+this};De.toPower=De.pow=function(e){var t,r,n,i,o,a,l=this,s=l.constructor,u=12,f=+(e=new s(e));if(!e.s)return new s(pn);if(l=new s(l),!l.s){if(e.s<1)throw Error(Fn+"Infinity");return l}if(l.eq(pn))return l;if(n=s.precision,e.eq(pn))return Tt(l,n);if(t=e.e,r=e.d.length-1,a=t>=r,o=l.s,a){if((r=f<0?-f:f)<=jT){for(i=new s(pn),t=Math.ceil(n/Bt+4),Ht=!1;r%2&&(i=i.times(l),yS(i.d,t)),r=Fs(r/2),r!==0;)l=l.times(l),yS(l.d,t);return Ht=!0,e.s<0?new s(pn).div(i):Tt(i,n)}}else if(o<0)throw Error(Fn+"NaN");return o=o<0&&e.d[Math.max(t,r)]&1?-1:1,l.s=1,Ht=!1,i=e.times($c(l,n+u)),Ht=!0,i=_T(i),i.s=o,i};De.toPrecision=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?(r=ar(i),n=za(i,r<=o.toExpNeg||r>=o.toExpPos)):(Ei(e,1,Ls),t===void 0?t=o.rounding:Ei(t,0,8),i=Tt(new o(i),e,t),r=ar(i),n=za(i,e<=r||r<=o.toExpNeg,e)),n};De.toSignificantDigits=De.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(Ei(e,1,Ls),t===void 0?t=n.rounding:Ei(t,0,8)),Tt(new n(r),e,t)};De.toString=De.valueOf=De.val=De.toJSON=De[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=ar(e),r=e.constructor;return za(e,t<=r.toExpNeg||t>=r.toExpPos)};function AT(e,t){var r,n,i,o,a,l,s,u,f=e.constructor,c=f.precision;if(!e.s||!t.s)return t.s||(t=new f(e)),Ht?Tt(t,c):t;if(s=e.d,u=t.d,a=e.e,i=t.e,s=s.slice(),o=a-i,o){for(o<0?(n=s,o=-o,l=u.length):(n=u,i=a,l=s.length),a=Math.ceil(c/Bt),l=a>l?a+1:l+1,o>l&&(o=l,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(l=s.length,o=u.length,l-o<0&&(o=l,n=u,u=s,s=n),r=0;o;)r=(s[--o]=s[o]+u[o]+r)/br|0,s[o]%=br;for(r&&(s.unshift(r),++i),l=s.length;s[--l]==0;)s.pop();return t.d=s,t.e=i,Ht?Tt(t,c):t}function Ei(e,t,r){if(e!==~~e||er)throw Error(Ca+e)}function Pi(e){var t,r,n,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;ta?1:-1;else for(l=s=0;li[l]?1:-1;break}return s}function r(n,i,o){for(var a=0;o--;)n[o]-=a,a=n[o]1;)n.shift()}return function(n,i,o,a){var l,s,u,f,c,d,p,m,v,b,y,g,x,P,w,S,j,E,R=n.constructor,K=n.s==i.s?1:-1,H=n.d,B=i.d;if(!n.s)return new R(n);if(!i.s)throw Error(Fn+"Division by zero");for(s=n.e-i.e,j=B.length,w=H.length,p=new R(K),m=p.d=[],u=0;B[u]==(H[u]||0);)++u;if(B[u]>(H[u]||0)&&--s,o==null?g=o=R.precision:a?g=o+(ar(n)-ar(i))+1:g=o,g<0)return new R(0);if(g=g/Bt+2|0,u=0,j==1)for(f=0,B=B[0],g++;(u1&&(B=e(B,f),H=e(H,f),j=B.length,w=H.length),P=j,v=H.slice(0,j),b=v.length;b=br/2&&++S;do f=0,l=t(B,v,j,b),l<0?(y=v[0],j!=b&&(y=y*br+(v[1]||0)),f=y/S|0,f>1?(f>=br&&(f=br-1),c=e(B,f),d=c.length,b=v.length,l=t(c,v,d,b),l==1&&(f--,r(c,j16)throw Error(jb+ar(e));if(!e.s)return new f(pn);for(Ht=!1,l=c,a=new f(.03125);e.abs().gte(.1);)e=e.times(a),u+=5;for(n=Math.log(ma(2,u))/Math.LN10*2+5|0,l+=n,r=i=o=new f(pn),f.precision=l;;){if(i=Tt(i.times(e),l),r=r.times(++s),a=o.plus(qi(i,r,l)),Pi(a.d).slice(0,l)===Pi(o.d).slice(0,l)){for(;u--;)o=Tt(o.times(o),l);return f.precision=c,t==null?(Ht=!0,Tt(o,c)):o}o=a}}function ar(e){for(var t=e.e*Bt,r=e.d[0];r>=10;r/=10)t++;return t}function ny(e,t,r){if(t>e.LN10.sd())throw Ht=!0,r&&(e.precision=r),Error(Fn+"LN10 precision limit exceeded");return Tt(new e(e.LN10),t)}function Eo(e){for(var t="";e--;)t+="0";return t}function $c(e,t){var r,n,i,o,a,l,s,u,f,c=1,d=10,p=e,m=p.d,v=p.constructor,b=v.precision;if(p.s<1)throw Error(Fn+(p.s?"NaN":"-Infinity"));if(p.eq(pn))return new v(0);if(t==null?(Ht=!1,u=b):u=t,p.eq(10))return t==null&&(Ht=!0),ny(v,u);if(u+=d,v.precision=u,r=Pi(m),n=r.charAt(0),o=ar(p),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)p=p.times(e),r=Pi(p.d),n=r.charAt(0),c++;o=ar(p),n>1?(p=new v("0."+r),o++):p=new v(n+"."+r.slice(1))}else return s=ny(v,u+2,b).times(o+""),p=$c(new v(n+"."+r.slice(1)),u-d).plus(s),v.precision=b,t==null?(Ht=!0,Tt(p,b)):p;for(l=a=p=qi(p.minus(pn),p.plus(pn),u),f=Tt(p.times(p),u),i=3;;){if(a=Tt(a.times(f),u),s=l.plus(qi(a,new v(i),u)),Pi(s.d).slice(0,u)===Pi(l.d).slice(0,u))return l=l.times(2),o!==0&&(l=l.plus(ny(v,u+2,b).times(o+""))),l=qi(l,new v(c),u),v.precision=b,t==null?(Ht=!0,Tt(l,b)):l;l=s,i+=2}}function vS(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=Fs(r/Bt),e.d=[],n=(r+1)%Bt,r<0&&(n+=Bt),nSp||e.e<-Sp))throw Error(jb+r)}else e.s=0,e.e=0,e.d=[0];return e}function Tt(e,t,r){var n,i,o,a,l,s,u,f,c=e.d;for(a=1,o=c[0];o>=10;o/=10)a++;if(n=t-a,n<0)n+=Bt,i=t,u=c[f=0];else{if(f=Math.ceil((n+1)/Bt),o=c.length,f>=o)return e;for(u=o=c[f],a=1;o>=10;o/=10)a++;n%=Bt,i=n-Bt+a}if(r!==void 0&&(o=ma(10,a-i-1),l=u/o%10|0,s=t<0||c[f+1]!==void 0||u%o,s=r<4?(l||s)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||s||r==6&&(n>0?i>0?u/ma(10,a-i):0:c[f-1])%10&1||r==(e.s<0?8:7))),t<1||!c[0])return s?(o=ar(e),c.length=1,t=t-o-1,c[0]=ma(10,(Bt-t%Bt)%Bt),e.e=Fs(-t/Bt)||0):(c.length=1,c[0]=e.e=e.s=0),e;if(n==0?(c.length=f,o=1,f--):(c.length=f+1,o=ma(10,Bt-n),c[f]=i>0?(u/ma(10,a-i)%ma(10,i)|0)*o:0),s)for(;;)if(f==0){(c[0]+=o)==br&&(c[0]=1,++e.e);break}else{if(c[f]+=o,c[f]!=br)break;c[f--]=0,o=1}for(n=c.length;c[--n]===0;)c.pop();if(Ht&&(e.e>Sp||e.e<-Sp))throw Error(jb+ar(e));return e}function TT(e,t){var r,n,i,o,a,l,s,u,f,c,d=e.constructor,p=d.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new d(e),Ht?Tt(t,p):t;if(s=e.d,c=t.d,n=t.e,u=e.e,s=s.slice(),a=u-n,a){for(f=a<0,f?(r=s,a=-a,l=c.length):(r=c,n=u,l=s.length),i=Math.max(Math.ceil(p/Bt),l)+2,a>i&&(a=i,r.length=1),r.reverse(),i=a;i--;)r.push(0);r.reverse()}else{for(i=s.length,l=c.length,f=i0;--i)s[l++]=0;for(i=c.length;i>a;){if(s[--i]0?o=o.charAt(0)+"."+o.slice(1)+Eo(n):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Eo(-i-1)+o,r&&(n=r-a)>0&&(o+=Eo(n))):i>=a?(o+=Eo(i+1-a),r&&(n=r-i-1)>0&&(o=o+"."+Eo(n))):((n=i+1)0&&(i+1===a&&(o+="."),o+=Eo(n))),e.s<0?"-"+o:o}function yS(e,t){if(e.length>t)return e.length=t,!0}function $T(e){var t,r,n;function i(o){var a=this;if(!(a instanceof i))return new i(o);if(a.constructor=i,o instanceof i){a.s=o.s,a.e=o.e,a.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(Ca+o);if(o>0)a.s=1;else if(o<0)o=-o,a.s=-1;else{a.s=0,a.e=0,a.d=[0];return}if(o===~~o&&o<1e7){a.e=0,a.d=[o];return}return vS(a,o.toString())}else if(typeof o!="string")throw Error(Ca+o);if(o.charCodeAt(0)===45?(o=o.slice(1),a.s=-1):a.s=1,D7.test(o))vS(a,o);else throw Error(Ca+o)}if(i.prototype=De,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=$T,i.config=i.set=N7,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Ca+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Ca+r+": "+n);return this}var Ab=$T(R7);pn=new Ab(1);const At=Ab;function L7(e){return W7(e)||z7(e)||B7(e)||F7()}function F7(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function B7(e,t){if(e){if(typeof e=="string")return Ug(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ug(e,t)}}function z7(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function W7(e){if(Array.isArray(e))return Ug(e)}function Ug(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=t?r.apply(void 0,i):e(t-a,gS(function(){for(var l=arguments.length,s=new Array(l),u=0;ue.length)&&(t=e.length);for(var r=0,n=new Array(t);r"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,i=!1,o=void 0;try{for(var a=e[Symbol.iterator](),l;!(n=(l=a.next()).done)&&(r.push(l.value),!(t&&r.length===t));n=!0);}catch(s){i=!0,o=s}finally{try{!n&&a.return!=null&&a.return()}finally{if(i)throw o}}return r}}function n9(e){if(Array.isArray(e))return e}function IT(e){var t=Ec(e,2),r=t[0],n=t[1],i=r,o=n;return r>n&&(i=n,o=r),[i,o]}function RT(e,t,r){if(e.lte(0))return new At(0);var n=Yh.getDigitCount(e.toNumber()),i=new At(10).pow(n),o=e.div(i),a=n!==1?.05:.1,l=new At(Math.ceil(o.div(a).toNumber())).add(r).mul(a),s=l.mul(i);return t?s:new At(Math.ceil(s))}function i9(e,t,r){var n=1,i=new At(e);if(!i.isint()&&r){var o=Math.abs(e);o<1?(n=new At(10).pow(Yh.getDigitCount(e)-1),i=new At(Math.floor(i.div(n).toNumber())).mul(n)):o>1&&(i=new At(Math.floor(e)))}else e===0?i=new At(Math.floor((t-1)/2)):r||(i=new At(Math.floor(e)));var a=Math.floor((t-1)/2),l=K7(V7(function(s){return i.add(new At(s-a).mul(n)).toNumber()}),Hg);return l(0,t)}function DT(e,t,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(r-1)))return{step:new At(0),tickMin:new At(0),tickMax:new At(0)};var o=RT(new At(t).sub(e).div(r-1),n,i),a;e<=0&&t>=0?a=new At(0):(a=new At(e).add(t).div(2),a=a.sub(new At(a).mod(o)));var l=Math.ceil(a.sub(e).div(o).toNumber()),s=Math.ceil(new At(t).sub(a).div(o).toNumber()),u=l+s+1;return u>r?DT(e,t,r,n,i+1):(u0?s+(r-u):s,l=t>0?l:l+(r-u)),{step:o,tickMin:a.sub(new At(l).mul(o)),tickMax:a.add(new At(s).mul(o))})}function o9(e){var t=Ec(e,2),r=t[0],n=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=Math.max(i,2),l=IT([r,n]),s=Ec(l,2),u=s[0],f=s[1];if(u===-1/0||f===1/0){var c=f===1/0?[u].concat(Kg(Hg(0,i-1).map(function(){return 1/0}))):[].concat(Kg(Hg(0,i-1).map(function(){return-1/0})),[f]);return r>n?Vg(c):c}if(u===f)return i9(u,i,o);var d=DT(u,f,a,o),p=d.step,m=d.tickMin,v=d.tickMax,b=Yh.rangeStep(m,v.add(new At(.1).mul(p)),p);return r>n?Vg(b):b}function a9(e,t){var r=Ec(e,2),n=r[0],i=r[1],o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=IT([n,i]),l=Ec(a,2),s=l[0],u=l[1];if(s===-1/0||u===1/0)return[n,i];if(s===u)return[s];var f=Math.max(t,2),c=RT(new At(u).sub(s).div(f-1),o,0),d=[].concat(Kg(Yh.rangeStep(new At(s),new At(u).sub(new At(.99).mul(c)),c)),[u]);return n>i?Vg(d):d}var l9=kT(o9),s9=kT(a9),u9="Invariant failed";function Wa(e,t){throw new Error(u9)}var c9=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function ls(e){"@babel/helpers - typeof";return ls=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ls(e)}function Pp(){return Pp=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function g9(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function m9(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b9(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,a=-1,l=(r=n==null?void 0:n.length)!==null&&r!==void 0?r:0;if(l<=1)return 0;if(o&&o.axisType==="angleAxis"&&Math.abs(Math.abs(o.range[1]-o.range[0])-360)<=1e-6)for(var s=o.range,u=0;u0?i[u-1].coordinate:i[l-1].coordinate,c=i[u].coordinate,d=u>=l-1?i[0].coordinate:i[u+1].coordinate,p=void 0;if(li(c-f)!==li(d-c)){var m=[];if(li(d-c)===li(s[1]-s[0])){p=d;var v=c+s[1]-s[0];m[0]=Math.min(v,(v+f)/2),m[1]=Math.max(v,(v+f)/2)}else{p=f;var b=d+s[1]-s[0];m[0]=Math.min(c,(b+c)/2),m[1]=Math.max(c,(b+c)/2)}var y=[Math.min(c,(p+c)/2),Math.max(c,(p+c)/2)];if(t>y[0]&&t<=y[1]||t>=m[0]&&t<=m[1]){a=i[u].index;break}}else{var g=Math.min(f,d),x=Math.max(f,d);if(t>(g+c)/2&&t<=(x+c)/2){a=i[u].index;break}}}else for(var P=0;P0&&P(n[P].coordinate+n[P-1].coordinate)/2&&t<=(n[P].coordinate+n[P+1].coordinate)/2||P===l-1&&t>(n[P].coordinate+n[P-1].coordinate)/2){a=n[P].index;break}return a},_b=function(t){var r,n=t,i=n.type.displayName,o=(r=t.type)!==null&&r!==void 0&&r.defaultProps?Qt(Qt({},t.type.defaultProps),t.props):t.props,a=o.stroke,l=o.fill,s;switch(i){case"Line":s=a;break;case"Area":case"Radar":s=a&&a!=="none"?a:l;break;default:s=l;break}return s},D9=function(t){var r=t.barSize,n=t.totalSize,i=t.stackGroups,o=i===void 0?{}:i;if(!o)return{};for(var a={},l=Object.keys(o),s=0,u=l.length;s=0});if(y&&y.length){var g=y[0].type.defaultProps,x=g!==void 0?Qt(Qt({},g),y[0].props):y[0].props,P=x.barSize,w=x[b];a[w]||(a[w]=[]);var S=Ge(P)?r:P;a[w].push({item:y[0],stackList:y.slice(1),barSize:Ge(S)?void 0:Fa(S,n,0)})}}return a},N9=function(t){var r=t.barGap,n=t.barCategoryGap,i=t.bandSize,o=t.sizeList,a=o===void 0?[]:o,l=t.maxBarSize,s=a.length;if(s<1)return null;var u=Fa(r,i,0,!0),f,c=[];if(a[0].barSize===+a[0].barSize){var d=!1,p=i/s,m=a.reduce(function(P,w){return P+w.barSize||0},0);m+=(s-1)*u,m>=i&&(m-=(s-1)*u,u=0),m>=i&&p>0&&(d=!0,p*=.9,m=s*p);var v=(i-m)/2>>0,b={offset:v-u,size:0};f=a.reduce(function(P,w){var S={item:w.item,position:{offset:b.offset+b.size+u,size:d?p:w.barSize}},j=[].concat(xS(P),[S]);return b=j[j.length-1].position,w.stackList&&w.stackList.length&&w.stackList.forEach(function(E){j.push({item:E,position:b})}),j},c)}else{var y=Fa(n,i,0,!0);i-2*y-(s-1)*u<=0&&(u=0);var g=(i-2*y-(s-1)*u)/s;g>1&&(g>>=0);var x=l===+l?Math.min(g,l):g;f=a.reduce(function(P,w,S){var j=[].concat(xS(P),[{item:w.item,position:{offset:y+(g+u)*S+(g-x)/2,size:x}}]);return w.stackList&&w.stackList.length&&w.stackList.forEach(function(E){j.push({item:E,position:j[j.length-1].position})}),j},c)}return f},L9=function(t,r,n,i){var o=n.children,a=n.width,l=n.margin,s=a-(l.left||0)-(l.right||0),u=BT({children:o,legendWidth:s});if(u){var f=i||{},c=f.width,d=f.height,p=u.align,m=u.verticalAlign,v=u.layout;if((v==="vertical"||v==="horizontal"&&m==="middle")&&p!=="center"&&Pe(t[p]))return Qt(Qt({},t),{},Vl({},p,t[p]+(c||0)));if((v==="horizontal"||v==="vertical"&&p==="center")&&m!=="middle"&&Pe(t[m]))return Qt(Qt({},t),{},Vl({},m,t[m]+(d||0)))}return t},F9=function(t,r,n){return Ge(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},zT=function(t,r,n,i,o){var a=r.props.children,l=tn(a,Bs).filter(function(u){return F9(i,o,u.props.direction)});if(l&&l.length){var s=l.map(function(u){return u.props.dataKey});return t.reduce(function(u,f){var c=hr(f,n);if(Ge(c))return u;var d=Array.isArray(c)?[Kh(c),No(c)]:[c,c],p=s.reduce(function(m,v){var b=hr(f,v,0),y=d[0]-Math.abs(Array.isArray(b)?b[0]:b),g=d[1]+Math.abs(Array.isArray(b)?b[1]:b);return[Math.min(y,m[0]),Math.max(g,m[1])]},[1/0,-1/0]);return[Math.min(p[0],u[0]),Math.max(p[1],u[1])]},[1/0,-1/0])}return null},B9=function(t,r,n,i,o){var a=r.map(function(l){return zT(t,l,n,o,i)}).filter(function(l){return!Ge(l)});return a&&a.length?a.reduce(function(l,s){return[Math.min(l[0],s[0]),Math.max(l[1],s[1])]},[1/0,-1/0]):null},WT=function(t,r,n,i,o){var a=r.map(function(s){var u=s.props.dataKey;return n==="number"&&u&&zT(t,s,u,i)||Yu(t,u,n,o)});if(n==="number")return a.reduce(function(s,u){return[Math.min(s[0],u[0]),Math.max(s[1],u[1])]},[1/0,-1/0]);var l={};return a.reduce(function(s,u){for(var f=0,c=u.length;f=2?li(l[0]-l[1])*2*u:u,r&&(t.ticks||t.niceTicks)){var f=(t.ticks||t.niceTicks).map(function(c){var d=o?o.indexOf(c):c;return{coordinate:i(d)+u,value:c,offset:u}});return f.filter(function(c){return!Ms(c.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(c,d){return{coordinate:i(c)+u,value:c,index:d,offset:u}}):i.ticks&&!n?i.ticks(t.tickCount).map(function(c){return{coordinate:i(c)+u,value:c,offset:u}}):i.domain().map(function(c,d){return{coordinate:i(c)+u,value:o?o[c]:c,index:d,offset:u}})},iy=new WeakMap,id=function(t,r){if(typeof r!="function")return t;iy.has(t)||iy.set(t,new WeakMap);var n=iy.get(t);if(n.has(r))return n.get(r);var i=function(){t.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,i),i},z9=function(t,r,n){var i=t.scale,o=t.type,a=t.layout,l=t.axisType;if(i==="auto")return a==="radial"&&l==="radiusAxis"?{scale:Oc(),realScaleType:"band"}:a==="radial"&&l==="angleAxis"?{scale:mp(),realScaleType:"linear"}:o==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:Gu(),realScaleType:"point"}:o==="category"?{scale:Oc(),realScaleType:"band"}:{scale:mp(),realScaleType:"linear"};if(La(i)){var s="scale".concat(kh(i));return{scale:(hS[s]||Gu)(),realScaleType:hS[s]?s:"point"}}return Je(i)?{scale:i}:{scale:Gu(),realScaleType:"point"}},SS=1e-4,W9=function(t){var r=t.domain();if(!(!r||r.length<=2)){var n=r.length,i=t.range(),o=Math.min(i[0],i[1])-SS,a=Math.max(i[0],i[1])+SS,l=t(r[0]),s=t(r[n-1]);(la||sa)&&t.domain([r[0],r[n-1]])}},U9=function(t,r){if(!t)return null;for(var n=0,i=t.length;ni)&&(o[1]=i),o[0]>i&&(o[0]=i),o[1]=0?(t[l][n][0]=o,t[l][n][1]=o+s,o=t[l][n][1]):(t[l][n][0]=a,t[l][n][1]=a+s,a=t[l][n][1])}},K9=function(t){var r=t.length;if(!(r<=0))for(var n=0,i=t[0].length;n=0?(t[a][n][0]=o,t[a][n][1]=o+l,o=t[a][n][1]):(t[a][n][0]=0,t[a][n][1]=0)}},G9={sign:V9,expand:sL,none:Jl,silhouette:uL,wiggle:cL,positive:K9},Y9=function(t,r,n){var i=r.map(function(l){return l.props.dataKey}),o=G9[n],a=lL().keys(i).value(function(l,s){return+hr(l,s,0)}).order(xg).offset(o);return a(t)},q9=function(t,r,n,i,o,a){if(!t)return null;var l=a?r.reverse():r,s={},u=l.reduce(function(c,d){var p,m=(p=d.type)!==null&&p!==void 0&&p.defaultProps?Qt(Qt({},d.type.defaultProps),d.props):d.props,v=m.stackId,b=m.hide;if(b)return c;var y=m[n],g=c[y]||{hasStack:!1,stackGroups:{}};if(pr(v)){var x=g.stackGroups[v]||{numericAxisId:n,cateAxisId:i,items:[]};x.items.push(d),g.hasStack=!0,g.stackGroups[v]=x}else g.stackGroups[Ga("_stackId_")]={numericAxisId:n,cateAxisId:i,items:[d]};return Qt(Qt({},c),{},Vl({},y,g))},s),f={};return Object.keys(u).reduce(function(c,d){var p=u[d];if(p.hasStack){var m={};p.stackGroups=Object.keys(p.stackGroups).reduce(function(v,b){var y=p.stackGroups[b];return Qt(Qt({},v),{},Vl({},b,{numericAxisId:n,cateAxisId:i,items:y.items,stackedData:Y9(t,y.items,o)}))},m)}return Qt(Qt({},c),{},Vl({},d,p))},f)},X9=function(t,r){var n=r.realScaleType,i=r.type,o=r.tickCount,a=r.originalDomain,l=r.allowDecimals,s=n||r.scale;if(s!=="auto"&&s!=="linear")return null;if(o&&i==="number"&&a&&(a[0]==="auto"||a[1]==="auto")){var u=t.domain();if(!u.length)return null;var f=l9(u,o,l);return t.domain([Kh(f),No(f)]),{niceTicks:f}}if(o&&i==="number"){var c=t.domain(),d=s9(c,o,l);return{niceTicks:d}}return null};function ss(e){var t=e.axis,r=e.ticks,n=e.bandSize,i=e.entry,o=e.index,a=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Ge(i[t.dataKey])){var l=qd(r,"value",i[t.dataKey]);if(l)return l.coordinate+n/2}return r[o]?r[o].coordinate+n/2:null}var s=hr(i,Ge(a)?t.dataKey:a);return Ge(s)?null:t.scale(s)}var PS=function(t){var r=t.axis,n=t.ticks,i=t.offset,o=t.bandSize,a=t.entry,l=t.index;if(r.type==="category")return n[l]?n[l].coordinate+i:null;var s=hr(a,r.dataKey,r.domain[l]);return Ge(s)?null:r.scale(s)-o/2+i},Q9=function(t){var r=t.numericAxis,n=r.scale.domain();if(r.type==="number"){var i=Math.min(n[0],n[1]),o=Math.max(n[0],n[1]);return i<=0&&o>=0?0:o<0?o:i}return n[0]},Z9=function(t,r){var n,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?Qt(Qt({},t.type.defaultProps),t.props):t.props,o=i.stackId;if(pr(o)){var a=r[o];if(a){var l=a.items.indexOf(t);return l>=0?a.stackedData[l]:null}}return null},J9=function(t){return t.reduce(function(r,n){return[Kh(n.concat([r[0]]).filter(Pe)),No(n.concat([r[1]]).filter(Pe))]},[1/0,-1/0])},VT=function(t,r,n){return Object.keys(t).reduce(function(i,o){var a=t[o],l=a.stackedData,s=l.reduce(function(u,f){var c=J9(f.slice(r,n+1));return[Math.min(u[0],c[0]),Math.max(u[1],c[1])]},[1/0,-1/0]);return[Math.min(s[0],i[0]),Math.max(s[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},OS=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,jS=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Xg=function(t,r,n){if(Je(t))return t(r,n);if(!Array.isArray(t))return r;var i=[];if(Pe(t[0]))i[0]=n?t[0]:Math.min(t[0],r[0]);else if(OS.test(t[0])){var o=+OS.exec(t[0])[1];i[0]=r[0]-o}else Je(t[0])?i[0]=t[0](r[0]):i[0]=r[0];if(Pe(t[1]))i[1]=n?t[1]:Math.max(t[1],r[1]);else if(jS.test(t[1])){var a=+jS.exec(t[1])[1];i[1]=r[1]+a}else Je(t[1])?i[1]=t[1](r[1]):i[1]=r[1];return i},jp=function(t,r,n){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!n||i>0)return i}if(t&&r&&r.length>=2){for(var o=eb(r,function(c){return c.coordinate}),a=1/0,l=1,s=o.length;la&&(u=2*Math.PI-u),{radius:l,angle:nV(u),angleInRadian:u}},aV=function(t){var r=t.startAngle,n=t.endAngle,i=Math.floor(r/360),o=Math.floor(n/360),a=Math.min(i,o);return{startAngle:r-a*360,endAngle:n-a*360}},lV=function(t,r){var n=r.startAngle,i=r.endAngle,o=Math.floor(n/360),a=Math.floor(i/360),l=Math.min(o,a);return t+l*360},$S=function(t,r){var n=t.x,i=t.y,o=oV({x:n,y:i},r),a=o.radius,l=o.angle,s=r.innerRadius,u=r.outerRadius;if(au)return!1;if(a===0)return!0;var f=aV(r),c=f.startAngle,d=f.endAngle,p=l,m;if(c<=d){for(;p>d;)p-=360;for(;p=c&&p<=d}else{for(;p>c;)p-=360;for(;p=d&&p<=c}return m?TS(TS({},r),{},{radius:a,angle:lV(p,r)}):null};function Ic(e){"@babel/helpers - typeof";return Ic=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ic(e)}var sV=["offset"];function uV(e){return pV(e)||dV(e)||fV(e)||cV()}function cV(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fV(e,t){if(e){if(typeof e=="string")return Qg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Qg(e,t)}}function dV(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function pV(e){if(Array.isArray(e))return Qg(e)}function Qg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function vV(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function ES(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function cr(e){for(var t=1;t=0?1:-1,x,P;i==="insideStart"?(x=p+g*a,P=v):i==="insideEnd"?(x=m-g*a,P=!v):i==="end"&&(x=m+g*a,P=v),P=y<=0?P:!P;var w=Ar(u,f,b,x),S=Ar(u,f,b,x+(P?1:-1)*359),j="M".concat(w.x,",").concat(w.y,` + A`).concat(b,",").concat(b,",0,1,").concat(P?0:1,`, + `).concat(S.x,",").concat(S.y),E=Ge(t.id)?Ga("recharts-radial-line-"):t.id;return D.createElement("text",Rc({},n,{dominantBaseline:"central",className:ut("recharts-radial-bar-label",l)}),D.createElement("defs",null,D.createElement("path",{id:E,d:j})),D.createElement("textPath",{xlinkHref:"#".concat(E)},r))},SV=function(t){var r=t.viewBox,n=t.offset,i=t.position,o=r,a=o.cx,l=o.cy,s=o.innerRadius,u=o.outerRadius,f=o.startAngle,c=o.endAngle,d=(f+c)/2;if(i==="outside"){var p=Ar(a,l,u+n,d),m=p.x,v=p.y;return{x:m,y:v,textAnchor:m>=a?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:a,y:l,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:a,y:l,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:a,y:l,textAnchor:"middle",verticalAnchor:"end"};var b=(s+u)/2,y=Ar(a,l,b,d),g=y.x,x=y.y;return{x:g,y:x,textAnchor:"middle",verticalAnchor:"middle"}},PV=function(t){var r=t.viewBox,n=t.parentViewBox,i=t.offset,o=t.position,a=r,l=a.x,s=a.y,u=a.width,f=a.height,c=f>=0?1:-1,d=c*i,p=c>0?"end":"start",m=c>0?"start":"end",v=u>=0?1:-1,b=v*i,y=v>0?"end":"start",g=v>0?"start":"end";if(o==="top"){var x={x:l+u/2,y:s-c*i,textAnchor:"middle",verticalAnchor:p};return cr(cr({},x),n?{height:Math.max(s-n.y,0),width:u}:{})}if(o==="bottom"){var P={x:l+u/2,y:s+f+d,textAnchor:"middle",verticalAnchor:m};return cr(cr({},P),n?{height:Math.max(n.y+n.height-(s+f),0),width:u}:{})}if(o==="left"){var w={x:l-b,y:s+f/2,textAnchor:y,verticalAnchor:"middle"};return cr(cr({},w),n?{width:Math.max(w.x-n.x,0),height:f}:{})}if(o==="right"){var S={x:l+u+b,y:s+f/2,textAnchor:g,verticalAnchor:"middle"};return cr(cr({},S),n?{width:Math.max(n.x+n.width-S.x,0),height:f}:{})}var j=n?{width:u,height:f}:{};return o==="insideLeft"?cr({x:l+b,y:s+f/2,textAnchor:g,verticalAnchor:"middle"},j):o==="insideRight"?cr({x:l+u-b,y:s+f/2,textAnchor:y,verticalAnchor:"middle"},j):o==="insideTop"?cr({x:l+u/2,y:s+d,textAnchor:"middle",verticalAnchor:m},j):o==="insideBottom"?cr({x:l+u/2,y:s+f-d,textAnchor:"middle",verticalAnchor:p},j):o==="insideTopLeft"?cr({x:l+b,y:s+d,textAnchor:g,verticalAnchor:m},j):o==="insideTopRight"?cr({x:l+u-b,y:s+d,textAnchor:y,verticalAnchor:m},j):o==="insideBottomLeft"?cr({x:l+b,y:s+f-d,textAnchor:g,verticalAnchor:p},j):o==="insideBottomRight"?cr({x:l+u-b,y:s+f-d,textAnchor:y,verticalAnchor:p},j):$s(o)&&(Pe(o.x)||Sa(o.x))&&(Pe(o.y)||Sa(o.y))?cr({x:l+Fa(o.x,u),y:s+Fa(o.y,f),textAnchor:"end",verticalAnchor:"end"},j):cr({x:l+u/2,y:s+f/2,textAnchor:"middle",verticalAnchor:"middle"},j)},OV=function(t){return"cx"in t&&Pe(t.cx)};function Dr(e){var t=e.offset,r=t===void 0?5:t,n=hV(e,sV),i=cr({offset:r},n),o=i.viewBox,a=i.position,l=i.value,s=i.children,u=i.content,f=i.className,c=f===void 0?"":f,d=i.textBreakAll;if(!o||Ge(l)&&Ge(s)&&!_.isValidElement(u)&&!Je(u))return null;if(_.isValidElement(u))return _.cloneElement(u,i);var p;if(Je(u)){if(p=_.createElement(u,i),_.isValidElement(p))return p}else p=bV(i);var m=OV(o),v=Xe(i,!0);if(m&&(a==="insideStart"||a==="insideEnd"||a==="end"))return wV(i,p,v);var b=m?SV(i):PV(i);return D.createElement(cp,Rc({className:ut("recharts-label",c)},v,b,{breakAll:d}),p)}Dr.displayName="Label";var GT=function(t){var r=t.cx,n=t.cy,i=t.angle,o=t.startAngle,a=t.endAngle,l=t.r,s=t.radius,u=t.innerRadius,f=t.outerRadius,c=t.x,d=t.y,p=t.top,m=t.left,v=t.width,b=t.height,y=t.clockWise,g=t.labelViewBox;if(g)return g;if(Pe(v)&&Pe(b)){if(Pe(c)&&Pe(d))return{x:c,y:d,width:v,height:b};if(Pe(p)&&Pe(m))return{x:p,y:m,width:v,height:b}}return Pe(c)&&Pe(d)?{x:c,y:d,width:0,height:0}:Pe(r)&&Pe(n)?{cx:r,cy:n,startAngle:o||i||0,endAngle:a||i||0,innerRadius:u||0,outerRadius:f||s||l||0,clockWise:y}:t.viewBox?t.viewBox:{}},jV=function(t,r){return t?t===!0?D.createElement(Dr,{key:"label-implicit",viewBox:r}):pr(t)?D.createElement(Dr,{key:"label-implicit",viewBox:r,value:t}):_.isValidElement(t)?t.type===Dr?_.cloneElement(t,{key:"label-implicit",viewBox:r}):D.createElement(Dr,{key:"label-implicit",content:t,viewBox:r}):Je(t)?D.createElement(Dr,{key:"label-implicit",content:t,viewBox:r}):$s(t)?D.createElement(Dr,Rc({viewBox:r},t,{key:"label-implicit"})):null:null},AV=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&n&&!t.label)return null;var i=t.children,o=GT(t),a=tn(i,Dr).map(function(s,u){return _.cloneElement(s,{viewBox:r||o,key:"label-".concat(u)})});if(!n)return a;var l=jV(t.label,r||o);return[l].concat(uV(a))};Dr.parseViewBox=GT;Dr.renderCallByParent=AV;function _V(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var TV=_V;const $V=$t(TV);function Dc(e){"@babel/helpers - typeof";return Dc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dc(e)}var EV=["valueAccessor"],CV=["data","dataKey","clockWise","id","textBreakAll"];function kV(e){return DV(e)||RV(e)||IV(e)||MV()}function MV(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function IV(e,t){if(e){if(typeof e=="string")return Zg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Zg(e,t)}}function RV(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function DV(e){if(Array.isArray(e))return Zg(e)}function Zg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function BV(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var zV=function(t){return Array.isArray(t.value)?$V(t.value):t.value};function Ti(e){var t=e.valueAccessor,r=t===void 0?zV:t,n=MS(e,EV),i=n.data,o=n.dataKey,a=n.clockWise,l=n.id,s=n.textBreakAll,u=MS(n,CV);return!i||!i.length?null:D.createElement(bt,{className:"recharts-label-list"},i.map(function(f,c){var d=Ge(o)?r(f,c):hr(f&&f.payload,o),p=Ge(l)?{}:{id:"".concat(l,"-").concat(c)};return D.createElement(Dr,_p({},Xe(f,!0),u,p,{parentViewBox:f.parentViewBox,value:d,textBreakAll:s,viewBox:Dr.parseViewBox(Ge(a)?f:kS(kS({},f),{},{clockWise:a})),key:"label-".concat(c),index:c}))}))}Ti.displayName="LabelList";function WV(e,t){return e?e===!0?D.createElement(Ti,{key:"labelList-implicit",data:t}):D.isValidElement(e)||Je(e)?D.createElement(Ti,{key:"labelList-implicit",data:t,content:e}):$s(e)?D.createElement(Ti,_p({data:t},e,{key:"labelList-implicit"})):null:null}function UV(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&r&&!e.label)return null;var n=e.children,i=tn(n,Ti).map(function(a,l){return _.cloneElement(a,{data:t,key:"labelList-".concat(l)})});if(!r)return i;var o=WV(e.label,t);return[o].concat(kV(i))}Ti.renderCallByParent=UV;function Nc(e){"@babel/helpers - typeof";return Nc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nc(e)}function Jg(){return Jg=Object.assign?Object.assign.bind():function(e){for(var t=1;t180),",").concat(+(a>u),`, + `).concat(c.x,",").concat(c.y,` + `);if(i>0){var p=Ar(r,n,i,a),m=Ar(r,n,i,u);d+="L ".concat(m.x,",").concat(m.y,` + A `).concat(i,",").concat(i,`,0, + `).concat(+(Math.abs(s)>180),",").concat(+(a<=u),`, + `).concat(p.x,",").concat(p.y," Z")}else d+="L ".concat(r,",").concat(n," Z");return d},YV=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,o=t.outerRadius,a=t.cornerRadius,l=t.forceCornerRadius,s=t.cornerIsExternal,u=t.startAngle,f=t.endAngle,c=li(f-u),d=od({cx:r,cy:n,radius:o,angle:u,sign:c,cornerRadius:a,cornerIsExternal:s}),p=d.circleTangency,m=d.lineTangency,v=d.theta,b=od({cx:r,cy:n,radius:o,angle:f,sign:-c,cornerRadius:a,cornerIsExternal:s}),y=b.circleTangency,g=b.lineTangency,x=b.theta,P=s?Math.abs(u-f):Math.abs(u-f)-v-x;if(P<0)return l?"M ".concat(m.x,",").concat(m.y,` + a`).concat(a,",").concat(a,",0,0,1,").concat(a*2,`,0 + a`).concat(a,",").concat(a,",0,0,1,").concat(-a*2,`,0 + `):YT({cx:r,cy:n,innerRadius:i,outerRadius:o,startAngle:u,endAngle:f});var w="M ".concat(m.x,",").concat(m.y,` + A`).concat(a,",").concat(a,",0,0,").concat(+(c<0),",").concat(p.x,",").concat(p.y,` + A`).concat(o,",").concat(o,",0,").concat(+(P>180),",").concat(+(c<0),",").concat(y.x,",").concat(y.y,` + A`).concat(a,",").concat(a,",0,0,").concat(+(c<0),",").concat(g.x,",").concat(g.y,` + `);if(i>0){var S=od({cx:r,cy:n,radius:i,angle:u,sign:c,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),j=S.circleTangency,E=S.lineTangency,R=S.theta,K=od({cx:r,cy:n,radius:i,angle:f,sign:-c,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),H=K.circleTangency,B=K.lineTangency,le=K.theta,ne=s?Math.abs(u-f):Math.abs(u-f)-R-le;if(ne<0&&a===0)return"".concat(w,"L").concat(r,",").concat(n,"Z");w+="L".concat(B.x,",").concat(B.y,` + A`).concat(a,",").concat(a,",0,0,").concat(+(c<0),",").concat(H.x,",").concat(H.y,` + A`).concat(i,",").concat(i,",0,").concat(+(ne>180),",").concat(+(c>0),",").concat(j.x,",").concat(j.y,` + A`).concat(a,",").concat(a,",0,0,").concat(+(c<0),",").concat(E.x,",").concat(E.y,"Z")}else w+="L".concat(r,",").concat(n,"Z");return w},qV={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},qT=function(t){var r=RS(RS({},qV),t),n=r.cx,i=r.cy,o=r.innerRadius,a=r.outerRadius,l=r.cornerRadius,s=r.forceCornerRadius,u=r.cornerIsExternal,f=r.startAngle,c=r.endAngle,d=r.className;if(a0&&Math.abs(f-c)<360?b=YV({cx:n,cy:i,innerRadius:o,outerRadius:a,cornerRadius:Math.min(v,m/2),forceCornerRadius:s,cornerIsExternal:u,startAngle:f,endAngle:c}):b=YT({cx:n,cy:i,innerRadius:o,outerRadius:a,startAngle:f,endAngle:c}),D.createElement("path",Jg({},Xe(r,!0),{className:p,d:b,role:"img"}))};function Lc(e){"@babel/helpers - typeof";return Lc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lc(e)}function em(){return em=Object.assign?Object.assign.bind():function(e){for(var t=1;tsK.call(e,t));function Xa(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const fK="__v",dK="__o",pK="_owner",{getOwnPropertyDescriptor:BS,keys:zS}=Object;function hK(e,t){return e.byteLength===t.byteLength&&Tp(new Uint8Array(e),new Uint8Array(t))}function vK(e,t,r){let n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function yK(e,t){return e.byteLength===t.byteLength&&Tp(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function gK(e,t){return Xa(e.getTime(),t.getTime())}function mK(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function bK(e,t){return e===t}function WS(e,t,r){const n=e.size;if(n!==t.size)return!1;if(!n)return!0;const i=new Array(n),o=e.entries();let a,l,s=0;for(;(a=o.next())&&!a.done;){const u=t.entries();let f=!1,c=0;for(;(l=u.next())&&!l.done;){if(i[c]){c++;continue}const d=a.value,p=l.value;if(r.equals(d[0],p[0],s,c,e,t,r)&&r.equals(d[1],p[1],d[0],p[0],e,t,r)){f=i[c]=!0;break}c++}if(!f)return!1;s++}return!0}const xK=Xa;function wK(e,t,r){const n=zS(e);let i=n.length;if(zS(t).length!==i)return!1;for(;i-- >0;)if(!JT(e,t,r,n[i]))return!1;return!0}function _u(e,t,r){const n=FS(e);let i=n.length;if(FS(t).length!==i)return!1;let o,a,l;for(;i-- >0;)if(o=n[i],!JT(e,t,r,o)||(a=BS(e,o),l=BS(t,o),(a||l)&&(!a||!l||a.configurable!==l.configurable||a.enumerable!==l.enumerable||a.writable!==l.writable)))return!1;return!0}function SK(e,t){return Xa(e.valueOf(),t.valueOf())}function PK(e,t){return e.source===t.source&&e.flags===t.flags}function US(e,t,r){const n=e.size;if(n!==t.size)return!1;if(!n)return!0;const i=new Array(n),o=e.values();let a,l;for(;(a=o.next())&&!a.done;){const s=t.values();let u=!1,f=0;for(;(l=s.next())&&!l.done;){if(!i[f]&&r.equals(a.value,l.value,a.value,l.value,e,t,r)){u=i[f]=!0;break}f++}if(!u)return!1}return!0}function Tp(e,t){let r=e.byteLength;if(t.byteLength!==r||e.byteOffset!==t.byteOffset)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function OK(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function JT(e,t,r,n){return(n===pK||n===dK||n===fK)&&(e.$$typeof||t.$$typeof)?!0:cK(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}const jK="[object ArrayBuffer]",AK="[object Arguments]",_K="[object Boolean]",TK="[object DataView]",$K="[object Date]",EK="[object Error]",CK="[object Map]",kK="[object Number]",MK="[object Object]",IK="[object RegExp]",RK="[object Set]",DK="[object String]",NK={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},LK="[object URL]",FK=Object.prototype.toString;function BK({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:r,areDatesEqual:n,areErrorsEqual:i,areFunctionsEqual:o,areMapsEqual:a,areNumbersEqual:l,areObjectsEqual:s,arePrimitiveWrappersEqual:u,areRegExpsEqual:f,areSetsEqual:c,areTypedArraysEqual:d,areUrlsEqual:p,unknownTagComparators:m}){return function(b,y,g){if(b===y)return!0;if(b==null||y==null)return!1;const x=typeof b;if(x!==typeof y)return!1;if(x!=="object")return x==="number"?l(b,y,g):x==="function"?o(b,y,g):!1;const P=b.constructor;if(P!==y.constructor)return!1;if(P===Object)return s(b,y,g);if(Array.isArray(b))return t(b,y,g);if(P===Date)return n(b,y,g);if(P===RegExp)return f(b,y,g);if(P===Map)return a(b,y,g);if(P===Set)return c(b,y,g);const w=FK.call(b);if(w===$K)return n(b,y,g);if(w===IK)return f(b,y,g);if(w===CK)return a(b,y,g);if(w===RK)return c(b,y,g);if(w===MK)return typeof b.then!="function"&&typeof y.then!="function"&&s(b,y,g);if(w===LK)return p(b,y,g);if(w===EK)return i(b,y,g);if(w===AK)return s(b,y,g);if(NK[w])return d(b,y,g);if(w===jK)return e(b,y,g);if(w===TK)return r(b,y,g);if(w===_K||w===kK||w===DK)return u(b,y,g);if(m){let S=m[w];if(!S){const j=uK(b);j&&(S=m[j])}if(S)return S(b,y,g)}return!1}}function zK({circular:e,createCustomConfig:t,strict:r}){let n={areArrayBuffersEqual:hK,areArraysEqual:r?_u:vK,areDataViewsEqual:yK,areDatesEqual:gK,areErrorsEqual:mK,areFunctionsEqual:bK,areMapsEqual:r?oy(WS,_u):WS,areNumbersEqual:xK,areObjectsEqual:r?_u:wK,arePrimitiveWrappersEqual:SK,areRegExpsEqual:PK,areSetsEqual:r?oy(US,_u):US,areTypedArraysEqual:r?oy(Tp,_u):Tp,areUrlsEqual:OK,unknownTagComparators:void 0};if(t&&(n=Object.assign({},n,t(n))),e){const i=ld(n.areArraysEqual),o=ld(n.areMapsEqual),a=ld(n.areObjectsEqual),l=ld(n.areSetsEqual);n=Object.assign({},n,{areArraysEqual:i,areMapsEqual:o,areObjectsEqual:a,areSetsEqual:l})}return n}function WK(e){return function(t,r,n,i,o,a,l){return e(t,r,l)}}function UK({circular:e,comparator:t,createState:r,equals:n,strict:i}){if(r)return function(l,s){const{cache:u=e?new WeakMap:void 0,meta:f}=r();return t(l,s,{cache:u,equals:n,meta:f,strict:i})};if(e)return function(l,s){return t(l,s,{cache:new WeakMap,equals:n,meta:void 0,strict:i})};const o={cache:void 0,equals:n,meta:void 0,strict:i};return function(l,s){return t(l,s,o)}}const HK=la();la({strict:!0});la({circular:!0});la({circular:!0,strict:!0});la({createInternalComparator:()=>Xa});la({strict:!0,createInternalComparator:()=>Xa});la({circular:!0,createInternalComparator:()=>Xa});la({circular:!0,createInternalComparator:()=>Xa,strict:!0});function la(e={}){const{circular:t=!1,createInternalComparator:r,createState:n,strict:i=!1}=e,o=zK(e),a=BK(o),l=r?r(a):WK(a);return UK({circular:t,comparator:a,createState:n,equals:l,strict:i})}function VK(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function HS(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function i(o){r<0&&(r=o),o-r>t?(e(o),r=-1):VK(i)};requestAnimationFrame(n)}function tm(e){"@babel/helpers - typeof";return tm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tm(e)}function KK(e){return XK(e)||qK(e)||YK(e)||GK()}function GK(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function YK(e,t){if(e){if(typeof e=="string")return VS(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return VS(e,t)}}function VS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r1?1:y<0?0:y},v=function(y){for(var g=y>1?1:y,x=g,P=0;P<8;++P){var w=c(x)-g,S=p(x);if(Math.abs(w-g)<$p||S<$p)return d(x);x=m(x-w/S)}return d(x)};return v.isStepper=!1,v},dG=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,i=t.damping,o=i===void 0?8:i,a=t.dt,l=a===void 0?17:a,s=function(f,c,d){var p=-(f-c)*n,m=d*o,v=d+(p-m)*l/1e3,b=d*l/1e3+f;return Math.abs(b-c)<$p&&Math.abs(v)<$p?[c,0]:[b,v]};return s.isStepper=!0,s.dt=l,s},pG=function(){for(var t=arguments.length,r=new Array(t),n=0;ne.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function _G(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,o;for(o=0;o=0)&&(r[i]=e[i]);return r}function ay(e){return CG(e)||EG(e)||$G(e)||TG()}function TG(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $G(e,t){if(e){if(typeof e=="string")return am(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return am(e,t)}}function EG(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function CG(e){if(Array.isArray(e))return am(e)}function am(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Cp(e){return Cp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Cp(e)}var fi=function(e){DG(r,e);var t=NG(r);function r(n,i){var o;kG(this,r),o=t.call(this,n,i);var a=o.props,l=a.isActive,s=a.attributeName,u=a.from,f=a.to,c=a.steps,d=a.children,p=a.duration;if(o.handleStyleChange=o.handleStyleChange.bind(um(o)),o.changeStyle=o.changeStyle.bind(um(o)),!l||p<=0)return o.state={style:{}},typeof d=="function"&&(o.state={style:f}),sm(o);if(c&&c.length)o.state={style:c[0].style};else if(u){if(typeof d=="function")return o.state={style:u},sm(o);o.state={style:s?Du({},s,u):u}}else o.state={style:{}};return o}return IG(r,[{key:"componentDidMount",value:function(){var i=this.props,o=i.isActive,a=i.canBegin;this.mounted=!0,!(!o||!a)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var o=this.props,a=o.isActive,l=o.canBegin,s=o.attributeName,u=o.shouldReAnimate,f=o.to,c=o.from,d=this.state.style;if(l){if(!a){var p={style:s?Du({},s,f):f};this.state&&d&&(s&&d[s]!==f||!s&&d!==f)&&this.setState(p);return}if(!(HK(i.to,f)&&i.canBegin&&i.isActive)){var m=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var v=m||u?c:i.to;if(this.state&&d){var b={style:s?Du({},s,v):v};(s&&d[s]!==v||!s&&d!==v)&&this.setState(b)}this.runAnimation(Jn(Jn({},this.props),{},{from:v,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var o=this,a=i.from,l=i.to,s=i.duration,u=i.easing,f=i.begin,c=i.onAnimationEnd,d=i.onAnimationStart,p=OG(a,l,pG(u),s,this.changeStyle),m=function(){o.stopJSAnimation=p()};this.manager.start([d,f,m,s,c])}},{key:"runStepAnimation",value:function(i){var o=this,a=i.steps,l=i.begin,s=i.onAnimationStart,u=a[0],f=u.style,c=u.duration,d=c===void 0?0:c,p=function(v,b,y){if(y===0)return v;var g=b.duration,x=b.easing,P=x===void 0?"ease":x,w=b.style,S=b.properties,j=b.onAnimationEnd,E=y>0?a[y-1]:b,R=S||Object.keys(w);if(typeof P=="function"||P==="spring")return[].concat(ay(v),[o.runJSAnimation.bind(o,{from:E.style,to:w,duration:g,easing:P}),g]);var K=YS(R,g,P),H=Jn(Jn(Jn({},E.style),w),{},{transition:K});return[].concat(ay(v),[H,g,j]).filter(tG)};return this.manager.start([s].concat(ay(a.reduce(p,[f,Math.max(d,l)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=QK());var o=i.begin,a=i.duration,l=i.attributeName,s=i.to,u=i.easing,f=i.onAnimationStart,c=i.onAnimationEnd,d=i.steps,p=i.children,m=this.manager;if(this.unSubscribe=m.subscribe(this.handleStyleChange),typeof u=="function"||typeof p=="function"||u==="spring"){this.runJSAnimation(i);return}if(d.length>1){this.runStepAnimation(i);return}var v=l?Du({},l,s):s,b=YS(Object.keys(v),a,u);m.start([f,o,Jn(Jn({},v),{},{transition:b}),a,c])}},{key:"render",value:function(){var i=this.props,o=i.children;i.begin;var a=i.duration;i.attributeName,i.easing;var l=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var s=AG(i,jG),u=_.Children.count(o),f=this.state.style;if(typeof o=="function")return o(f);if(!l||u===0||a<=0)return o;var c=function(p){var m=p.props,v=m.style,b=v===void 0?{}:v,y=m.className,g=_.cloneElement(p,Jn(Jn({},s),{},{style:Jn(Jn({},b),f),className:y}));return g};return u===1?c(_.Children.only(o)):D.createElement("div",null,_.Children.map(o,function(d){return c(d)}))}}]),r}(_.PureComponent);fi.displayName="Animate";fi.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};fi.propTypes={from:xt.oneOfType([xt.object,xt.string]),to:xt.oneOfType([xt.object,xt.string]),attributeName:xt.string,duration:xt.number,begin:xt.number,easing:xt.oneOfType([xt.string,xt.func]),steps:xt.arrayOf(xt.shape({duration:xt.number.isRequired,style:xt.object.isRequired,easing:xt.oneOfType([xt.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),xt.func]),properties:xt.arrayOf("string"),onAnimationEnd:xt.func})),children:xt.oneOfType([xt.node,xt.func]),isActive:xt.bool,canBegin:xt.bool,onAnimationEnd:xt.func,shouldReAnimate:xt.bool,onAnimationStart:xt.func,onAnimationReStart:xt.func};function zc(e){"@babel/helpers - typeof";return zc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zc(e)}function kp(){return kp=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0?1:-1,s=n>=0?1:-1,u=i>=0&&n>=0||i<0&&n<0?1:0,f;if(a>0&&o instanceof Array){for(var c=[0,0,0,0],d=0,p=4;da?a:o[d];f="M".concat(t,",").concat(r+l*c[0]),c[0]>0&&(f+="A ".concat(c[0],",").concat(c[0],",0,0,").concat(u,",").concat(t+s*c[0],",").concat(r)),f+="L ".concat(t+n-s*c[1],",").concat(r),c[1]>0&&(f+="A ".concat(c[1],",").concat(c[1],",0,0,").concat(u,`, + `).concat(t+n,",").concat(r+l*c[1])),f+="L ".concat(t+n,",").concat(r+i-l*c[2]),c[2]>0&&(f+="A ".concat(c[2],",").concat(c[2],",0,0,").concat(u,`, + `).concat(t+n-s*c[2],",").concat(r+i)),f+="L ".concat(t+s*c[3],",").concat(r+i),c[3]>0&&(f+="A ".concat(c[3],",").concat(c[3],",0,0,").concat(u,`, + `).concat(t,",").concat(r+i-l*c[3])),f+="Z"}else if(a>0&&o===+o&&o>0){var m=Math.min(a,o);f="M ".concat(t,",").concat(r+l*m,` + A `).concat(m,",").concat(m,",0,0,").concat(u,",").concat(t+s*m,",").concat(r,` + L `).concat(t+n-s*m,",").concat(r,` + A `).concat(m,",").concat(m,",0,0,").concat(u,",").concat(t+n,",").concat(r+l*m,` + L `).concat(t+n,",").concat(r+i-l*m,` + A `).concat(m,",").concat(m,",0,0,").concat(u,",").concat(t+n-s*m,",").concat(r+i,` + L `).concat(t+s*m,",").concat(r+i,` + A `).concat(m,",").concat(m,",0,0,").concat(u,",").concat(t,",").concat(r+i-l*m," Z")}else f="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(i," h ").concat(-n," Z");return f},GG=function(t,r){if(!t||!r)return!1;var n=t.x,i=t.y,o=r.x,a=r.y,l=r.width,s=r.height;if(Math.abs(l)>0&&Math.abs(s)>0){var u=Math.min(o,o+l),f=Math.max(o,o+l),c=Math.min(a,a+s),d=Math.max(a,a+s);return n>=u&&n<=f&&i>=c&&i<=d}return!1},YG={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Tb=function(t){var r=rP(rP({},YG),t),n=_.useRef(),i=_.useState(-1),o=FG(i,2),a=o[0],l=o[1];_.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var P=n.current.getTotalLength();P&&l(P)}catch{}},[]);var s=r.x,u=r.y,f=r.width,c=r.height,d=r.radius,p=r.className,m=r.animationEasing,v=r.animationDuration,b=r.animationBegin,y=r.isAnimationActive,g=r.isUpdateAnimationActive;if(s!==+s||u!==+u||f!==+f||c!==+c||f===0||c===0)return null;var x=ut("recharts-rectangle",p);return g?D.createElement(fi,{canBegin:a>0,from:{width:f,height:c,x:s,y:u},to:{width:f,height:c,x:s,y:u},duration:v,animationEasing:m,isActive:g},function(P){var w=P.width,S=P.height,j=P.x,E=P.y;return D.createElement(fi,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:v,isActive:y,easing:m},D.createElement("path",kp({},Xe(r,!0),{className:x,d:nP(j,E,w,S,d),ref:n})))}):D.createElement("path",kp({},Xe(r,!0),{className:x,d:nP(s,u,f,c,d)}))};function cm(){return cm=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function tY(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var rY=function(t,r,n,i,o,a){return"M".concat(t,",").concat(o,"v").concat(i,"M").concat(a,",").concat(r,"h").concat(n)},nY=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,o=i===void 0?0:i,a=t.top,l=a===void 0?0:a,s=t.left,u=s===void 0?0:s,f=t.width,c=f===void 0?0:f,d=t.height,p=d===void 0?0:d,m=t.className,v=eY(t,qG),b=XG({x:n,y:o,top:l,left:u,width:c,height:p},v);return!Pe(n)||!Pe(o)||!Pe(c)||!Pe(p)||!Pe(l)||!Pe(u)?null:D.createElement("path",fm({},Xe(b,!0),{className:ut("recharts-cross",m),d:rY(n,o,c,p,l,u)}))},iY=x_,oY=iY(Object.getPrototypeOf,Object),aY=oY,lY=oo,sY=aY,uY=ao,cY="[object Object]",fY=Function.prototype,dY=Object.prototype,a$=fY.toString,pY=dY.hasOwnProperty,hY=a$.call(Object);function vY(e){if(!uY(e)||lY(e)!=cY)return!1;var t=sY(e);if(t===null)return!0;var r=pY.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&a$.call(r)==hY}var yY=vY;const gY=$t(yY);var mY=oo,bY=ao,xY="[object Boolean]";function wY(e){return e===!0||e===!1||bY(e)&&mY(e)==xY}var SY=wY;const PY=$t(SY);function Uc(e){"@babel/helpers - typeof";return Uc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Uc(e)}function Mp(){return Mp=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0,from:{upperWidth:0,lowerWidth:0,height:d,x:s,y:u},to:{upperWidth:f,lowerWidth:c,height:d,x:s,y:u},duration:v,animationEasing:m,isActive:y},function(x){var P=x.upperWidth,w=x.lowerWidth,S=x.height,j=x.x,E=x.y;return D.createElement(fi,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:v,easing:m},D.createElement("path",Mp({},Xe(r,!0),{className:g,d:sP(j,E,P,w,S),ref:n})))}):D.createElement("g",null,D.createElement("path",Mp({},Xe(r,!0),{className:g,d:sP(s,u,f,c,d)})))},IY=["option","shapeType","propTransformer","activeClassName","isActive"];function Hc(e){"@babel/helpers - typeof";return Hc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hc(e)}function RY(e,t){if(e==null)return{};var r=DY(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function DY(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function uP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ip(e){for(var t=1;t0&&n.handleDrag(i.changedTouches[0])}),cn(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=n.props,o=i.endIndex,a=i.onDragEnd,l=i.startIndex;a==null||a({endIndex:o,startIndex:l})}),n.detachDragEndListener()}),cn(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),cn(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),cn(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),cn(n,"handleSlideDragStart",function(i){var o=yP(i)?i.changedTouches[0]:i;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:o.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return bq(t,e),vq(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var i=n.startX,o=n.endX,a=this.state.scaleValues,l=this.props,s=l.gap,u=l.data,f=u.length-1,c=Math.min(i,o),d=Math.max(i,o),p=t.getIndexInRange(a,c),m=t.getIndexInRange(a,d);return{startIndex:p-p%s,endIndex:m===f?f:m-m%s}}},{key:"getTextOfTick",value:function(n){var i=this.props,o=i.data,a=i.tickFormatter,l=i.dataKey,s=hr(o[n],l,n);return Je(a)?a(s,n):s}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(n){var i=this.state,o=i.slideMoveStartX,a=i.startX,l=i.endX,s=this.props,u=s.x,f=s.width,c=s.travellerWidth,d=s.startIndex,p=s.endIndex,m=s.onChange,v=n.pageX-o;v>0?v=Math.min(v,u+f-c-l,u+f-c-a):v<0&&(v=Math.max(v,u-a,u-l));var b=this.getIndex({startX:a+v,endX:l+v});(b.startIndex!==d||b.endIndex!==p)&&m&&m(b),this.setState({startX:a+v,endX:l+v,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,i){var o=yP(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:o.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var i=this.state,o=i.brushMoveStartX,a=i.movingTravellerId,l=i.endX,s=i.startX,u=this.state[a],f=this.props,c=f.x,d=f.width,p=f.travellerWidth,m=f.onChange,v=f.gap,b=f.data,y={startX:this.state.startX,endX:this.state.endX},g=n.pageX-o;g>0?g=Math.min(g,c+d-p-u):g<0&&(g=Math.max(g,c-u)),y[a]=u+g;var x=this.getIndex(y),P=x.startIndex,w=x.endIndex,S=function(){var E=b.length-1;return a==="startX"&&(l>s?P%v===0:w%v===0)||ls?w%v===0:P%v===0)||l>s&&w===E};this.setState(cn(cn({},a,u+g),"brushMoveStartX",n.pageX),function(){m&&S()&&m(x)})}},{key:"handleTravellerMoveKeyboard",value:function(n,i){var o=this,a=this.state,l=a.scaleValues,s=a.startX,u=a.endX,f=this.state[i],c=l.indexOf(f);if(c!==-1){var d=c+n;if(!(d===-1||d>=l.length)){var p=l[d];i==="startX"&&p>=u||i==="endX"&&p<=s||this.setState(cn({},i,p),function(){o.props.onChange(o.getIndex({startX:o.state.startX,endX:o.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,i=n.x,o=n.y,a=n.width,l=n.height,s=n.fill,u=n.stroke;return D.createElement("rect",{stroke:u,fill:s,x:i,y:o,width:a,height:l})}},{key:"renderPanorama",value:function(){var n=this.props,i=n.x,o=n.y,a=n.width,l=n.height,s=n.data,u=n.children,f=n.padding,c=_.Children.only(u);return c?D.cloneElement(c,{x:i,y:o,width:a,height:l,margin:f,compact:!0,data:s}):null}},{key:"renderTravellerLayer",value:function(n,i){var o,a,l=this,s=this.props,u=s.y,f=s.travellerWidth,c=s.height,d=s.traveller,p=s.ariaLabel,m=s.data,v=s.startIndex,b=s.endIndex,y=Math.max(n,this.props.x),g=sy(sy({},Xe(this.props,!1)),{},{x:y,y:u,width:f,height:c}),x=p||"Min value: ".concat((o=m[v])===null||o===void 0?void 0:o.name,", Max value: ").concat((a=m[b])===null||a===void 0?void 0:a.name);return D.createElement(bt,{tabIndex:0,role:"slider","aria-label":x,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(w){["ArrowLeft","ArrowRight"].includes(w.key)&&(w.preventDefault(),w.stopPropagation(),l.handleTravellerMoveKeyboard(w.key==="ArrowRight"?1:-1,i))},onFocus:function(){l.setState({isTravellerFocused:!0})},onBlur:function(){l.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(d,g))}},{key:"renderSlide",value:function(n,i){var o=this.props,a=o.y,l=o.height,s=o.stroke,u=o.travellerWidth,f=Math.min(n,i)+u,c=Math.max(Math.abs(i-n)-u,0);return D.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:s,fillOpacity:.2,x:f,y:a,width:c,height:l})}},{key:"renderText",value:function(){var n=this.props,i=n.startIndex,o=n.endIndex,a=n.y,l=n.height,s=n.travellerWidth,u=n.stroke,f=this.state,c=f.startX,d=f.endX,p=5,m={pointerEvents:"none",fill:u};return D.createElement(bt,{className:"recharts-brush-texts"},D.createElement(cp,Dp({textAnchor:"end",verticalAnchor:"middle",x:Math.min(c,d)-p,y:a+l/2},m),this.getTextOfTick(i)),D.createElement(cp,Dp({textAnchor:"start",verticalAnchor:"middle",x:Math.max(c,d)+s+p,y:a+l/2},m),this.getTextOfTick(o)))}},{key:"render",value:function(){var n=this.props,i=n.data,o=n.className,a=n.children,l=n.x,s=n.y,u=n.width,f=n.height,c=n.alwaysShowText,d=this.state,p=d.startX,m=d.endX,v=d.isTextActive,b=d.isSlideMoving,y=d.isTravellerMoving,g=d.isTravellerFocused;if(!i||!i.length||!Pe(l)||!Pe(s)||!Pe(u)||!Pe(f)||u<=0||f<=0)return null;var x=ut("recharts-brush",o),P=D.Children.count(a)===1,w=pq("userSelect","none");return D.createElement(bt,{className:x,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:w},this.renderBackground(),P&&this.renderPanorama(),this.renderSlide(p,m),this.renderTravellerLayer(p,"startX"),this.renderTravellerLayer(m,"endX"),(v||b||y||g||c)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var i=n.x,o=n.y,a=n.width,l=n.height,s=n.stroke,u=Math.floor(o+l/2)-1;return D.createElement(D.Fragment,null,D.createElement("rect",{x:i,y:o,width:a,height:l,fill:s,stroke:"none"}),D.createElement("line",{x1:i+1,y1:u,x2:i+a-1,y2:u,fill:"none",stroke:"#fff"}),D.createElement("line",{x1:i+1,y1:u+2,x2:i+a-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,i){var o;return D.isValidElement(n)?o=D.cloneElement(n,i):Je(n)?o=n(i):o=t.renderDefaultTraveller(i),o}},{key:"getDerivedStateFromProps",value:function(n,i){var o=n.data,a=n.width,l=n.x,s=n.travellerWidth,u=n.updateId,f=n.startIndex,c=n.endIndex;if(o!==i.prevData||u!==i.prevUpdateId)return sy({prevData:o,prevTravellerWidth:s,prevUpdateId:u,prevX:l,prevWidth:a},o&&o.length?wq({data:o,width:a,x:l,travellerWidth:s,startIndex:f,endIndex:c}):{scale:null,scaleValues:null});if(i.scale&&(a!==i.prevWidth||l!==i.prevX||s!==i.prevTravellerWidth)){i.scale.range([l,l+a-s]);var d=i.scale.domain().map(function(p){return i.scale(p)});return{prevData:o,prevTravellerWidth:s,prevUpdateId:u,prevX:l,prevWidth:a,startX:i.scale(n.startIndex),endX:i.scale(n.endIndex),scaleValues:d}}return null}},{key:"getIndexInRange",value:function(n,i){for(var o=n.length,a=0,l=o-1;l-a>1;){var s=Math.floor((a+l)/2);n[s]>i?l=s:a=s}return i>=n[l]?l:a}}])}(_.PureComponent);cn(fs,"displayName","Brush");cn(fs,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var Sq=J0;function Pq(e,t){var r;return Sq(e,function(n,i,o){return r=t(n,i,o),!r}),!!r}var Oq=Pq,jq=d_,Aq=na,_q=Oq,Tq=nn,$q=Fh;function Eq(e,t,r){var n=Tq(e)?jq:_q;return r&&$q(e,t,r)&&(t=void 0),n(e,Aq(t))}var Cq=Eq;const kq=$t(Cq);var $i=function(t,r){var n=t.alwaysShow,i=t.ifOverflow;return n&&(i="extendDomain"),i===r},gP=I_;function Mq(e,t,r){t=="__proto__"&&gP?gP(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var Iq=Mq,Rq=Iq,Dq=k_,Nq=na;function Lq(e,t){var r={};return t=Nq(t),Dq(e,function(n,i,o){Rq(r,i,t(n,i,o))}),r}var Fq=Lq;const Bq=$t(Fq);function zq(e,t){for(var r=-1,n=e==null?0:e.length;++r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function iX(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function oX(e,t){var r=e.x,n=e.y,i=nX(e,Jq),o="".concat(r),a=parseInt(o,10),l="".concat(n),s=parseInt(l,10),u="".concat(t.height||i.height),f=parseInt(u,10),c="".concat(t.width||i.width),d=parseInt(c,10);return Tu(Tu(Tu(Tu(Tu({},t),i),a?{x:a}:{}),s?{y:s}:{}),{},{height:f,width:d,name:t.name,radius:t.radius})}function bP(e){return D.createElement(dm,hm({shapeType:"rectangle",propTransformer:oX,activeClassName:"recharts-active-bar"},e))}var aX=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,i){if(typeof t=="number")return t;var o=Pe(n)||xD(n);return o?t(n,i):(o||Wa(),r)}},lX=["value","background"],d$;function ds(e){"@babel/helpers - typeof";return ds=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ds(e)}function sX(e,t){if(e==null)return{};var r=uX(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function uX(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Lp(){return Lp=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(Z)0&&Math.abs(ne)0&&(le=Math.min((it||0)-(ne[ot-1]||0),le))}),Number.isFinite(le)){var Z=le/B,X=v.layout==="vertical"?n.height:n.width;if(v.padding==="gap"&&(j=Z*X/2),v.padding==="no-gap"){var ee=Fa(t.barCategoryGap,Z*X),U=Z*X/2;j=U-ee-(U-ee)/X*ee}}}i==="xAxis"?E=[n.left+(x.left||0)+(j||0),n.left+n.width-(x.right||0)-(j||0)]:i==="yAxis"?E=s==="horizontal"?[n.top+n.height-(x.bottom||0),n.top+(x.top||0)]:[n.top+(x.top||0)+(j||0),n.top+n.height-(x.bottom||0)-(j||0)]:E=v.range,w&&(E=[E[1],E[0]]);var te=z9(v,o,d),ue=te.scale,ae=te.realScaleType;ue.domain(y).range(E),W9(ue);var pe=X9(ue,ni(ni({},v),{},{realScaleType:ae}));i==="xAxis"?(H=b==="top"&&!P||b==="bottom"&&P,R=n.left,K=c[S]-H*v.height):i==="yAxis"&&(H=b==="left"&&!P||b==="right"&&P,R=c[S]-H*v.width,K=n.top);var Ee=ni(ni(ni({},v),pe),{},{realScaleType:ae,x:R,y:K,scale:ue,width:i==="xAxis"?n.width:v.width,height:i==="yAxis"?n.height:v.height});return Ee.bandSize=jp(Ee,pe),!v.hide&&i==="xAxis"?c[S]+=(H?-1:1)*Ee.height:v.hide||(c[S]+=(H?-1:1)*Ee.width),ni(ni({},p),{},Zh({},m,Ee))},{})},g$=function(t,r){var n=t.x,i=t.y,o=r.x,a=r.y;return{x:Math.min(n,o),y:Math.min(i,a),width:Math.abs(o-n),height:Math.abs(a-i)}},xX=function(t){var r=t.x1,n=t.y1,i=t.x2,o=t.y2;return g$({x:r,y:n},{x:i,y:o})},m$=function(){function e(t){gX(this,e),this.scale=t}return mX(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.bandAware,o=n.position;if(r!==void 0){if(o)switch(o){case"start":return this.scale(r);case"middle":{var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+a}case"end":{var l=this.bandwidth?this.bandwidth():0;return this.scale(r)+l}default:return this.scale(r)}if(i){var s=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+s}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),i=n[0],o=n[n.length-1];return i<=o?r>=i&&r<=o:r>=o&&r<=i}}],[{key:"create",value:function(r){return new e(r)}}])}();Zh(m$,"EPS",1e-4);var $b=function(t){var r=Object.keys(t).reduce(function(n,i){return ni(ni({},n),{},Zh({},i,m$.create(t[i])))},{});return ni(ni({},r),{},{apply:function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=o.bandAware,l=o.position;return Bq(i,function(s,u){return r[u].apply(s,{bandAware:a,position:l})})},isInRange:function(i){return f$(i,function(o,a){return r[a].isInRange(o)})}})};function wX(e){return(e%180+180)%180}var SX=function(t){var r=t.width,n=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=wX(i),a=o*Math.PI/180,l=Math.atan(n/r),s=a>l&&a-1?i[o?t[a]:a]:void 0}}var _X=AX,TX=l$;function $X(e){var t=TX(e),r=t%1;return t===t?r?t-r:t:0}var EX=$X,CX=A_,kX=na,MX=EX,IX=Math.max;function RX(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:MX(r);return i<0&&(i=IX(n+i,0)),CX(e,kX(t),i)}var DX=RX,NX=_X,LX=DX,FX=NX(LX),BX=FX;const zX=$t(BX);var WX=AR(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),Eb=_.createContext(void 0),Cb=_.createContext(void 0),b$=_.createContext(void 0),x$=_.createContext({}),w$=_.createContext(void 0),S$=_.createContext(0),P$=_.createContext(0),OP=function(t){var r=t.state,n=r.xAxisMap,i=r.yAxisMap,o=r.offset,a=t.clipPathId,l=t.children,s=t.width,u=t.height,f=WX(o);return D.createElement(Eb.Provider,{value:n},D.createElement(Cb.Provider,{value:i},D.createElement(x$.Provider,{value:o},D.createElement(b$.Provider,{value:f},D.createElement(w$.Provider,{value:a},D.createElement(S$.Provider,{value:u},D.createElement(P$.Provider,{value:s},l)))))))},UX=function(){return _.useContext(w$)},O$=function(t){var r=_.useContext(Eb);r==null&&Wa();var n=r[t];return n==null&&Wa(),n},HX=function(){var t=_.useContext(Eb);return Mo(t)},VX=function(){var t=_.useContext(Cb),r=zX(t,function(n){return f$(n.domain,Number.isFinite)});return r||Mo(t)},j$=function(t){var r=_.useContext(Cb);r==null&&Wa();var n=r[t];return n==null&&Wa(),n},KX=function(){var t=_.useContext(b$);return t},GX=function(){return _.useContext(x$)},kb=function(){return _.useContext(P$)},Mb=function(){return _.useContext(S$)};function ps(e){"@babel/helpers - typeof";return ps=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ps(e)}function YX(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qX(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);re*i)return!1;var o=r();return e*(t-e*o/2-n)>=0&&e*(t+e*o/2-i)<=0}function EQ(e,t){return k$(e,t+1)}function CQ(e,t,r,n,i){for(var o=(n||[]).slice(),a=t.start,l=t.end,s=0,u=1,f=a,c=function(){var m=n==null?void 0:n[s];if(m===void 0)return{v:k$(n,u)};var v=s,b,y=function(){return b===void 0&&(b=r(m,v)),b},g=m.coordinate,x=s===0||Up(e,g,y,f,l);x||(s=0,f=a,u+=1),x&&(f=g+e*(y()/2+i),s+=u)},d;u<=o.length;)if(d=c(),d)return d.v;return[]}function qc(e){"@babel/helpers - typeof";return qc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qc(e)}function kP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ir(e){for(var t=1;t0?p.coordinate-b*e:p.coordinate})}else o[d]=p=Ir(Ir({},p),{},{tickCoord:p.coordinate});var y=Up(e,p.tickCoord,v,l,s);y&&(s=p.tickCoord-e*(v()/2+i),o[d]=Ir(Ir({},p),{},{isShow:!0}))},f=a-1;f>=0;f--)u(f);return o}function DQ(e,t,r,n,i,o){var a=(n||[]).slice(),l=a.length,s=t.start,u=t.end;if(o){var f=n[l-1],c=r(f,l-1),d=e*(f.coordinate+e*c/2-u);a[l-1]=f=Ir(Ir({},f),{},{tickCoord:d>0?f.coordinate-d*e:f.coordinate});var p=Up(e,f.tickCoord,function(){return c},s,u);p&&(u=f.tickCoord-e*(c/2+i),a[l-1]=Ir(Ir({},f),{},{isShow:!0}))}for(var m=o?l-1:l,v=function(g){var x=a[g],P,w=function(){return P===void 0&&(P=r(x,g)),P};if(g===0){var S=e*(x.coordinate-e*w()/2-s);a[g]=x=Ir(Ir({},x),{},{tickCoord:S<0?x.coordinate-S*e:x.coordinate})}else a[g]=x=Ir(Ir({},x),{},{tickCoord:x.coordinate});var j=Up(e,x.tickCoord,w,s,u);j&&(s=x.tickCoord+e*(w()/2+i),a[g]=Ir(Ir({},x),{},{isShow:!0}))},b=0;b=2?li(i[1].coordinate-i[0].coordinate):1,y=$Q(o,b,p);return s==="equidistantPreserveStart"?CQ(b,y,v,i,a):(s==="preserveStart"||s==="preserveStartEnd"?d=DQ(b,y,v,i,a,s==="preserveStartEnd"):d=RQ(b,y,v,i,a),d.filter(function(g){return g.isShow}))}var NQ=["viewBox"],LQ=["viewBox"],FQ=["ticks"];function ys(e){"@babel/helpers - typeof";return ys=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ys(e)}function Il(){return Il=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function BQ(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function zQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function IP(e,t){for(var r=0;r0?s(this.props):s(p)),a<=0||l<=0||!m||!m.length?null:D.createElement(bt,{className:ut("recharts-cartesian-axis",u),ref:function(b){n.layerReference=b}},o&&this.renderAxisLine(),this.renderTicks(m,this.state.fontSize,this.state.letterSpacing),Dr.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,i,o){var a,l=ut(i.className,"recharts-cartesian-axis-tick-value");return D.isValidElement(n)?a=D.cloneElement(n,ur(ur({},i),{},{className:l})):Je(n)?a=n(ur(ur({},i),{},{className:l})):a=D.createElement(cp,Il({},i,{className:"recharts-cartesian-axis-tick-value"}),o),a}}])}(_.Component);Nb(zs,"displayName","CartesianAxis");Nb(zs,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var YQ=["x1","y1","x2","y2","key"],qQ=["offset"];function Ua(e){"@babel/helpers - typeof";return Ua=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ua(e)}function RP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Nr(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function JQ(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var eZ=function(t){var r=t.fill;if(!r||r==="none")return null;var n=t.fillOpacity,i=t.x,o=t.y,a=t.width,l=t.height,s=t.ry;return D.createElement("rect",{x:i,y:o,ry:s,width:a,height:l,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function R$(e,t){var r;if(D.isValidElement(e))r=D.cloneElement(e,t);else if(Je(e))r=e(t);else{var n=t.x1,i=t.y1,o=t.x2,a=t.y2,l=t.key,s=DP(t,YQ),u=Xe(s,!1);u.offset;var f=DP(u,qQ);r=D.createElement("line",ja({},f,{x1:n,y1:i,x2:o,y2:a,fill:"none",key:l}))}return r}function tZ(e){var t=e.x,r=e.width,n=e.horizontal,i=n===void 0?!0:n,o=e.horizontalPoints;if(!i||!o||!o.length)return null;var a=o.map(function(l,s){var u=Nr(Nr({},e),{},{x1:t,y1:l,x2:t+r,y2:l,key:"line-".concat(s),index:s});return R$(i,u)});return D.createElement("g",{className:"recharts-cartesian-grid-horizontal"},a)}function rZ(e){var t=e.y,r=e.height,n=e.vertical,i=n===void 0?!0:n,o=e.verticalPoints;if(!i||!o||!o.length)return null;var a=o.map(function(l,s){var u=Nr(Nr({},e),{},{x1:l,y1:t,x2:l,y2:t+r,key:"line-".concat(s),index:s});return R$(i,u)});return D.createElement("g",{className:"recharts-cartesian-grid-vertical"},a)}function nZ(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,i=e.y,o=e.width,a=e.height,l=e.horizontalPoints,s=e.horizontal,u=s===void 0?!0:s;if(!u||!t||!t.length)return null;var f=l.map(function(d){return Math.round(d+i-i)}).sort(function(d,p){return d-p});i!==f[0]&&f.unshift(0);var c=f.map(function(d,p){var m=!f[p+1],v=m?i+a-d:f[p+1]-d;if(v<=0)return null;var b=p%t.length;return D.createElement("rect",{key:"react-".concat(p),y:d,x:n,height:v,width:o,stroke:"none",fill:t[b],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return D.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},c)}function iZ(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,i=e.fillOpacity,o=e.x,a=e.y,l=e.width,s=e.height,u=e.verticalPoints;if(!r||!n||!n.length)return null;var f=u.map(function(d){return Math.round(d+o-o)}).sort(function(d,p){return d-p});o!==f[0]&&f.unshift(0);var c=f.map(function(d,p){var m=!f[p+1],v=m?o+l-d:f[p+1]-d;if(v<=0)return null;var b=p%n.length;return D.createElement("rect",{key:"react-".concat(p),x:d,y:a,width:v,height:s,stroke:"none",fill:n[b],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return D.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},c)}var oZ=function(t,r){var n=t.xAxis,i=t.width,o=t.height,a=t.offset;return HT(Db(Nr(Nr(Nr({},zs.defaultProps),n),{},{ticks:Vi(n,!0),viewBox:{x:0,y:0,width:i,height:o}})),a.left,a.left+a.width,r)},aZ=function(t,r){var n=t.yAxis,i=t.width,o=t.height,a=t.offset;return HT(Db(Nr(Nr(Nr({},zs.defaultProps),n),{},{ticks:Vi(n,!0),viewBox:{x:0,y:0,width:i,height:o}})),a.top,a.top+a.height,r)},ml={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Lb(e){var t,r,n,i,o,a,l=kb(),s=Mb(),u=GX(),f=Nr(Nr({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:ml.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:ml.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:ml.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:ml.horizontalFill,vertical:(o=e.vertical)!==null&&o!==void 0?o:ml.vertical,verticalFill:(a=e.verticalFill)!==null&&a!==void 0?a:ml.verticalFill,x:Pe(e.x)?e.x:u.left,y:Pe(e.y)?e.y:u.top,width:Pe(e.width)?e.width:u.width,height:Pe(e.height)?e.height:u.height}),c=f.x,d=f.y,p=f.width,m=f.height,v=f.syncWithTicks,b=f.horizontalValues,y=f.verticalValues,g=HX(),x=VX();if(!Pe(p)||p<=0||!Pe(m)||m<=0||!Pe(c)||c!==+c||!Pe(d)||d!==+d)return null;var P=f.verticalCoordinatesGenerator||oZ,w=f.horizontalCoordinatesGenerator||aZ,S=f.horizontalPoints,j=f.verticalPoints;if((!S||!S.length)&&Je(w)){var E=b&&b.length,R=w({yAxis:x?Nr(Nr({},x),{},{ticks:E?b:x.ticks}):void 0,width:l,height:s,offset:u},E?!0:v);Yi(Array.isArray(R),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Ua(R),"]")),Array.isArray(R)&&(S=R)}if((!j||!j.length)&&Je(P)){var K=y&&y.length,H=P({xAxis:g?Nr(Nr({},g),{},{ticks:K?y:g.ticks}):void 0,width:l,height:s,offset:u},K?!0:v);Yi(Array.isArray(H),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Ua(H),"]")),Array.isArray(H)&&(j=H)}return D.createElement("g",{className:"recharts-cartesian-grid"},D.createElement(eZ,{fill:f.fill,fillOpacity:f.fillOpacity,x:f.x,y:f.y,width:f.width,height:f.height,ry:f.ry}),D.createElement(tZ,ja({},f,{offset:u,horizontalPoints:S,xAxis:g,yAxis:x})),D.createElement(rZ,ja({},f,{offset:u,verticalPoints:j,xAxis:g,yAxis:x})),D.createElement(nZ,ja({},f,{horizontalPoints:S})),D.createElement(iZ,ja({},f,{verticalPoints:j})))}Lb.displayName="CartesianGrid";var lZ=["type","layout","connectNulls","ref"],sZ=["key"];function gs(e){"@babel/helpers - typeof";return gs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gs(e)}function NP(e,t){if(e==null)return{};var r=uZ(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function uZ(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Xu(){return Xu=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);rc){p=[].concat(bl(s.slice(0,m)),[c-v]);break}var b=p.length%2===0?[0,d]:[d];return[].concat(bl(t.repeat(s,f)),bl(p),b).map(function(y){return"".concat(y,"px")}).join(", ")}),ii(r,"id",Ga("recharts-line-")),ii(r,"pathRef",function(a){r.mainCurve=a}),ii(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),ii(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return bZ(t,e),vZ(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();this.setState({totalLength:n})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();n!==this.state.totalLength&&this.setState({totalLength:n})}}},{key:"getTotalLength",value:function(){var n=this.mainCurve;try{return n&&n.getTotalLength&&n.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(n,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var o=this.props,a=o.points,l=o.xAxis,s=o.yAxis,u=o.layout,f=o.children,c=tn(f,Bs);if(!c)return null;var d=function(v,b){return{x:v.x,y:v.y,value:v.value,errorVal:hr(v.payload,b)}},p={clipPath:n?"url(#clipPath-".concat(i,")"):null};return D.createElement(bt,p,c.map(function(m){return D.cloneElement(m,{key:"bar-".concat(m.props.dataKey),data:a,xAxis:l,yAxis:s,layout:u,dataPointFormatter:d})}))}},{key:"renderDots",value:function(n,i,o){var a=this.props.isAnimationActive;if(a&&!this.state.isAnimationFinished)return null;var l=this.props,s=l.dot,u=l.points,f=l.dataKey,c=Xe(this.props,!1),d=Xe(s,!0),p=u.map(function(v,b){var y=un(un(un({key:"dot-".concat(b),r:3},c),d),{},{index:b,cx:v.x,cy:v.y,value:v.value,dataKey:f,payload:v.payload,points:u});return t.renderDotItem(s,y)}),m={clipPath:n?"url(#clipPath-".concat(i?"":"dots-").concat(o,")"):null};return D.createElement(bt,Xu({className:"recharts-line-dots",key:"dots"},m),p)}},{key:"renderCurveStatically",value:function(n,i,o,a){var l=this.props,s=l.type,u=l.layout,f=l.connectNulls;l.ref;var c=NP(l,lZ),d=un(un(un({},Xe(c,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(o,")"):null,points:n},a),{},{type:s,layout:u,connectNulls:f});return D.createElement(ka,Xu({},d,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(n,i){var o=this,a=this.props,l=a.points,s=a.strokeDasharray,u=a.isAnimationActive,f=a.animationBegin,c=a.animationDuration,d=a.animationEasing,p=a.animationId,m=a.animateNewValues,v=a.width,b=a.height,y=this.state,g=y.prevPoints,x=y.totalLength;return D.createElement(fi,{begin:f,duration:c,isActive:u,easing:d,from:{t:0},to:{t:1},key:"line-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(P){var w=P.t;if(g){var S=g.length/l.length,j=l.map(function(B,le){var ne=Math.floor(le*S);if(g[ne]){var Z=g[ne],X=Jt(Z.x,B.x),ee=Jt(Z.y,B.y);return un(un({},B),{},{x:X(w),y:ee(w)})}if(m){var U=Jt(v*2,B.x),te=Jt(b/2,B.y);return un(un({},B),{},{x:U(w),y:te(w)})}return un(un({},B),{},{x:B.x,y:B.y})});return o.renderCurveStatically(j,n,i)}var E=Jt(0,x),R=E(w),K;if(s){var H="".concat(s).split(/[,\s]+/gim).map(function(B){return parseFloat(B)});K=o.getStrokeDasharray(R,x,H)}else K=o.generateSimpleStrokeDasharray(x,R);return o.renderCurveStatically(l,n,i,{strokeDasharray:K})})}},{key:"renderCurve",value:function(n,i){var o=this.props,a=o.points,l=o.isAnimationActive,s=this.state,u=s.prevPoints,f=s.totalLength;return l&&a&&a.length&&(!u&&f>0||!Ba(u,a))?this.renderCurveWithAnimation(n,i):this.renderCurveStatically(a,n,i)}},{key:"render",value:function(){var n,i=this.props,o=i.hide,a=i.dot,l=i.points,s=i.className,u=i.xAxis,f=i.yAxis,c=i.top,d=i.left,p=i.width,m=i.height,v=i.isAnimationActive,b=i.id;if(o||!l||!l.length)return null;var y=this.state.isAnimationFinished,g=l.length===1,x=ut("recharts-line",s),P=u&&u.allowDataOverflow,w=f&&f.allowDataOverflow,S=P||w,j=Ge(b)?this.id:b,E=(n=Xe(a,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},R=E.r,K=R===void 0?3:R,H=E.strokeWidth,B=H===void 0?2:H,le=NA(a)?a:{},ne=le.clipDot,Z=ne===void 0?!0:ne,X=K*2+B;return D.createElement(bt,{className:x},P||w?D.createElement("defs",null,D.createElement("clipPath",{id:"clipPath-".concat(j)},D.createElement("rect",{x:P?d:d-p/2,y:w?c:c-m/2,width:P?p:p*2,height:w?m:m*2})),!Z&&D.createElement("clipPath",{id:"clipPath-dots-".concat(j)},D.createElement("rect",{x:d-X/2,y:c-X/2,width:p+X,height:m+X}))):null,!g&&this.renderCurve(S,j),this.renderErrorBar(S,j),(g||a)&&this.renderDots(S,Z,j),(!v||y)&&Ti.renderCallByParent(this.props,l))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:i.curPoints}:n.points!==i.curPoints?{curPoints:n.points}:null}},{key:"repeat",value:function(n,i){for(var o=n.length%2!==0?[].concat(bl(n),[0]):n,a=[],l=0;l=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function PZ(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Aa(){return Aa=Object.assign?Object.assign.bind():function(e){for(var t=1;t0||!Ba(f,a)||!Ba(c,l))?this.renderAreaWithAnimation(n,i):this.renderAreaStatically(a,l,n,i)}},{key:"render",value:function(){var n,i=this.props,o=i.hide,a=i.dot,l=i.points,s=i.className,u=i.top,f=i.left,c=i.xAxis,d=i.yAxis,p=i.width,m=i.height,v=i.isAnimationActive,b=i.id;if(o||!l||!l.length)return null;var y=this.state.isAnimationFinished,g=l.length===1,x=ut("recharts-area",s),P=c&&c.allowDataOverflow,w=d&&d.allowDataOverflow,S=P||w,j=Ge(b)?this.id:b,E=(n=Xe(a,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},R=E.r,K=R===void 0?3:R,H=E.strokeWidth,B=H===void 0?2:H,le=NA(a)?a:{},ne=le.clipDot,Z=ne===void 0?!0:ne,X=K*2+B;return D.createElement(bt,{className:x},P||w?D.createElement("defs",null,D.createElement("clipPath",{id:"clipPath-".concat(j)},D.createElement("rect",{x:P?f:f-p/2,y:w?u:u-m/2,width:P?p:p*2,height:w?m:m*2})),!Z&&D.createElement("clipPath",{id:"clipPath-dots-".concat(j)},D.createElement("rect",{x:f-X/2,y:u-X/2,width:p+X,height:m+X}))):null,g?null:this.renderArea(S,j),(a||g)&&this.renderDots(S,Z,j),(!v||y)&&Ti.renderCallByParent(this.props,l))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,curBaseLine:n.baseLine,prevPoints:i.curPoints,prevBaseLine:i.curBaseLine}:n.points!==i.curPoints||n.baseLine!==i.curBaseLine?{curPoints:n.points,curBaseLine:n.baseLine}:null}}])}(_.PureComponent);L$=Ja;Oi(Ja,"displayName","Area");Oi(Ja,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!ia.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});Oi(Ja,"getBaseValue",function(e,t,r,n){var i=e.layout,o=e.baseValue,a=t.props.baseValue,l=a??o;if(Pe(l)&&typeof l=="number")return l;var s=i==="horizontal"?n:r,u=s.scale.domain();if(s.type==="number"){var f=Math.max(u[0],u[1]),c=Math.min(u[0],u[1]);return l==="dataMin"?c:l==="dataMax"||f<0?f:Math.max(Math.min(u[0],u[1]),0)}return l==="dataMin"?u[0]:l==="dataMax"?u[1]:u[0]});Oi(Ja,"getComposedData",function(e){var t=e.props,r=e.item,n=e.xAxis,i=e.yAxis,o=e.xAxisTicks,a=e.yAxisTicks,l=e.bandSize,s=e.dataKey,u=e.stackedData,f=e.dataStartIndex,c=e.displayedData,d=e.offset,p=t.layout,m=u&&u.length,v=L$.getBaseValue(t,r,n,i),b=p==="horizontal",y=!1,g=c.map(function(P,w){var S;m?S=u[f+w]:(S=hr(P,s),Array.isArray(S)?y=!0:S=[v,S]);var j=S[1]==null||m&&hr(P,s)==null;return b?{x:ss({axis:n,ticks:o,bandSize:l,entry:P,index:w}),y:j?null:i.scale(S[1]),value:S,payload:P}:{x:j?null:n.scale(S[1]),y:ss({axis:i,ticks:a,bandSize:l,entry:P,index:w}),value:S,payload:P}}),x;return m||y?x=g.map(function(P){var w=Array.isArray(P.value)?P.value[0]:null;return b?{x:P.x,y:w!=null&&P.y!=null?i.scale(w):null}:{x:w!=null?n.scale(w):null,y:P.y}}):x=b?i.scale(v):n.scale(v),_o({points:g,baseLine:x,layout:p,isRange:y},d)});Oi(Ja,"renderDotItem",function(e,t){var r;if(D.isValidElement(e))r=D.cloneElement(e,t);else if(Je(e))r=e(t);else{var n=ut("recharts-area-dot",typeof e!="boolean"?e.className:""),i=t.key,o=F$(t,SZ);r=D.createElement(qh,Aa({},o,{key:i,className:n}))}return r});function bs(e){"@babel/helpers - typeof";return bs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bs(e)}function CZ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kZ(e,t){for(var r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function zZ(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function WZ(e){var t=e.option,r=e.isActive,n=BZ(e,FZ);return typeof t=="string"?_.createElement(dm,Qu({option:_.createElement(Dh,Qu({type:t},n)),isActive:r,shapeType:"symbols"},n)):_.createElement(dm,Qu({option:t,isActive:r,shapeType:"symbols"},n))}function xs(e){"@babel/helpers - typeof";return xs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xs(e)}function Zu(){return Zu=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function NJ(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function LJ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function FJ(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r0?a:t&&t.length&&Pe(i)&&Pe(o)?t.slice(i,o+1):[]};function aE(e){return e==="number"?[0,"auto"]:void 0}var Dm=function(t,r,n,i){var o=t.graphicalItems,a=t.tooltipAxis,l=ov(r,t);return n<0||!o||!o.length||n>=l.length?null:o.reduce(function(s,u){var f,c=(f=u.props.data)!==null&&f!==void 0?f:r;c&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(c=c.slice(t.dataStartIndex,t.dataEndIndex+1));var d;if(a.dataKey&&!a.allowDuplicatedCategory){var p=c===void 0?l:c;d=qd(p,a.dataKey,i)}else d=c&&c[n]||l[n];return d?[].concat(Os(s),[KT(u,d)]):s},[])},qP=function(t,r,n,i){var o=i||{x:t.chartX,y:t.chartY},a=QJ(o,n),l=t.orderedTooltipTicks,s=t.tooltipAxis,u=t.tooltipTicks,f=R9(a,l,u,s);if(f>=0&&u){var c=u[f]&&u[f].value,d=Dm(t,r,f,c),p=ZJ(n,l,f,o);return{activeTooltipIndex:f,activeLabel:c,activePayload:d,activeCoordinate:p}}return null},JJ=function(t,r){var n=r.axes,i=r.graphicalItems,o=r.axisType,a=r.axisIdKey,l=r.stackGroups,s=r.dataStartIndex,u=r.dataEndIndex,f=t.layout,c=t.children,d=t.stackOffset,p=UT(f,o);return n.reduce(function(m,v){var b,y=v.type.defaultProps!==void 0?se(se({},v.type.defaultProps),v.props):v.props,g=y.type,x=y.dataKey,P=y.allowDataOverflow,w=y.allowDuplicatedCategory,S=y.scale,j=y.ticks,E=y.includeHidden,R=y[a];if(m[R])return m;var K=ov(t.data,{graphicalItems:i.filter(function(pe){var Ee,it=a in pe.props?pe.props[a]:(Ee=pe.type.defaultProps)===null||Ee===void 0?void 0:Ee[a];return it===R}),dataStartIndex:s,dataEndIndex:u}),H=K.length,B,le,ne;jJ(y.domain,P,g)&&(B=Xg(y.domain,null,P),p&&(g==="number"||S!=="auto")&&(ne=Yu(K,x,"category")));var Z=aE(g);if(!B||B.length===0){var X,ee=(X=y.domain)!==null&&X!==void 0?X:Z;if(x){if(B=Yu(K,x,g),g==="category"&&p){var U=SD(B);w&&U?(le=B,B=Rp(0,H)):w||(B=AS(ee,B,v).reduce(function(pe,Ee){return pe.indexOf(Ee)>=0?pe:[].concat(Os(pe),[Ee])},[]))}else if(g==="category")w?B=B.filter(function(pe){return pe!==""&&!Ge(pe)}):B=AS(ee,B,v).reduce(function(pe,Ee){return pe.indexOf(Ee)>=0||Ee===""||Ge(Ee)?pe:[].concat(Os(pe),[Ee])},[]);else if(g==="number"){var te=B9(K,i.filter(function(pe){var Ee,it,ot=a in pe.props?pe.props[a]:(Ee=pe.type.defaultProps)===null||Ee===void 0?void 0:Ee[a],jt="hide"in pe.props?pe.props.hide:(it=pe.type.defaultProps)===null||it===void 0?void 0:it.hide;return ot===R&&(E||!jt)}),x,o,f);te&&(B=te)}p&&(g==="number"||S!=="auto")&&(ne=Yu(K,x,"category"))}else p?B=Rp(0,H):l&&l[R]&&l[R].hasStack&&g==="number"?B=d==="expand"?[0,1]:VT(l[R].stackGroups,s,u):B=WT(K,i.filter(function(pe){var Ee=a in pe.props?pe.props[a]:pe.type.defaultProps[a],it="hide"in pe.props?pe.props.hide:pe.type.defaultProps.hide;return Ee===R&&(E||!it)}),g,f,!0);if(g==="number")B=Mm(c,B,R,o,j),ee&&(B=Xg(ee,B,P));else if(g==="category"&&ee){var ue=ee,ae=B.every(function(pe){return ue.indexOf(pe)>=0});ae&&(B=ue)}}return se(se({},m),{},Ue({},R,se(se({},y),{},{axisType:o,domain:B,categoricalDomain:ne,duplicateDomain:le,originalDomain:(b=y.domain)!==null&&b!==void 0?b:Z,isCategorical:p,layout:f})))},{})},eee=function(t,r){var n=r.graphicalItems,i=r.Axis,o=r.axisType,a=r.axisIdKey,l=r.stackGroups,s=r.dataStartIndex,u=r.dataEndIndex,f=t.layout,c=t.children,d=ov(t.data,{graphicalItems:n,dataStartIndex:s,dataEndIndex:u}),p=d.length,m=UT(f,o),v=-1;return n.reduce(function(b,y){var g=y.type.defaultProps!==void 0?se(se({},y.type.defaultProps),y.props):y.props,x=g[a],P=aE("number");if(!b[x]){v++;var w;return m?w=Rp(0,p):l&&l[x]&&l[x].hasStack?(w=VT(l[x].stackGroups,s,u),w=Mm(c,w,x,o)):(w=Xg(P,WT(d,n.filter(function(S){var j,E,R=a in S.props?S.props[a]:(j=S.type.defaultProps)===null||j===void 0?void 0:j[a],K="hide"in S.props?S.props.hide:(E=S.type.defaultProps)===null||E===void 0?void 0:E.hide;return R===x&&!K}),"number",f),i.defaultProps.allowDataOverflow),w=Mm(c,w,x,o)),se(se({},b),{},Ue({},x,se(se({axisType:o},i.defaultProps),{},{hide:!0,orientation:Dn(qJ,"".concat(o,".").concat(v%2),null),domain:w,originalDomain:P,isCategorical:m,layout:f})))}return b},{})},tee=function(t,r){var n=r.axisType,i=n===void 0?"xAxis":n,o=r.AxisComp,a=r.graphicalItems,l=r.stackGroups,s=r.dataStartIndex,u=r.dataEndIndex,f=t.children,c="".concat(i,"Id"),d=tn(f,o),p={};return d&&d.length?p=JJ(t,{axes:d,graphicalItems:a,axisType:i,axisIdKey:c,stackGroups:l,dataStartIndex:s,dataEndIndex:u}):a&&a.length&&(p=eee(t,{Axis:o,graphicalItems:a,axisType:i,axisIdKey:c,stackGroups:l,dataStartIndex:s,dataEndIndex:u})),p},ree=function(t){var r=Mo(t),n=Vi(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:eb(n,function(i){return i.coordinate}),tooltipAxis:r,tooltipAxisBandSize:jp(r,n)}},XP=function(t){var r=t.children,n=t.defaultShowTooltip,i=dn(r,fs),o=0,a=0;return t.data&&t.data.length!==0&&(a=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(o=i.props.startIndex),i.props.endIndex>=0&&(a=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:o,dataEndIndex:a,activeTooltipIndex:-1,isTooltipActive:!!n}},nee=function(t){return!t||!t.length?!1:t.some(function(r){var n=Gi(r&&r.type);return n&&n.indexOf("Bar")>=0})},QP=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},iee=function(t,r){var n=t.props,i=t.graphicalItems,o=t.xAxisMap,a=o===void 0?{}:o,l=t.yAxisMap,s=l===void 0?{}:l,u=n.width,f=n.height,c=n.children,d=n.margin||{},p=dn(c,fs),m=dn(c,Yo),v=Object.keys(s).reduce(function(w,S){var j=s[S],E=j.orientation;return!j.mirror&&!j.hide?se(se({},w),{},Ue({},E,w[E]+j.width)):w},{left:d.left||0,right:d.right||0}),b=Object.keys(a).reduce(function(w,S){var j=a[S],E=j.orientation;return!j.mirror&&!j.hide?se(se({},w),{},Ue({},E,Dn(w,"".concat(E))+j.height)):w},{top:d.top||0,bottom:d.bottom||0}),y=se(se({},b),v),g=y.bottom;p&&(y.bottom+=p.props.height||fs.defaultProps.height),m&&r&&(y=L9(y,i,n,r));var x=u-y.left-y.right,P=f-y.top-y.bottom;return se(se({brushBottom:g},y),{},{width:Math.max(x,0),height:Math.max(P,0)})},oee=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},lE=function(t){var r=t.chartName,n=t.GraphicalChild,i=t.defaultTooltipEventType,o=i===void 0?"axis":i,a=t.validateTooltipEventTypes,l=a===void 0?["axis"]:a,s=t.axisComponents,u=t.legendContent,f=t.formatAxisMap,c=t.defaultProps,d=function(y,g){var x=g.graphicalItems,P=g.stackGroups,w=g.offset,S=g.updateId,j=g.dataStartIndex,E=g.dataEndIndex,R=y.barSize,K=y.layout,H=y.barGap,B=y.barCategoryGap,le=y.maxBarSize,ne=QP(K),Z=ne.numericAxisName,X=ne.cateAxisName,ee=nee(x),U=[];return x.forEach(function(te,ue){var ae=ov(y.data,{graphicalItems:[te],dataStartIndex:j,dataEndIndex:E}),pe=te.type.defaultProps!==void 0?se(se({},te.type.defaultProps),te.props):te.props,Ee=pe.dataKey,it=pe.maxBarSize,ot=pe["".concat(Z,"Id")],jt=pe["".concat(X,"Id")],pt={},er=s.reduce(function(wt,Ce){var We=g["".concat(Ce.axisType,"Map")],Dt=pe["".concat(Ce.axisType,"Id")];We&&We[Dt]||Ce.axisType==="zAxis"||Wa();var He=We[Dt];return se(se({},wt),{},Ue(Ue({},Ce.axisType,He),"".concat(Ce.axisType,"Ticks"),Vi(He)))},pt),Te=er[X],Ke=er["".concat(X,"Ticks")],he=P&&P[ot]&&P[ot].hasStack&&Z9(te,P[ot].stackGroups),Q=Gi(te.type).indexOf("Bar")>=0,V=jp(Te,Ke),je=[],Ae=ee&&D9({barSize:R,stackGroups:P,totalSize:oee(er,X)});if(Q){var Be,Ie,ce=Ge(it)?le:it,Et=(Be=(Ie=jp(Te,Ke,!0))!==null&&Ie!==void 0?Ie:ce)!==null&&Be!==void 0?Be:0;je=N9({barGap:H,barCategoryGap:B,bandSize:Et!==V?Et:V,sizeList:Ae[jt],maxBarSize:ce}),Et!==V&&(je=je.map(function(wt){return se(se({},wt),{},{position:se(se({},wt.position),{},{offset:wt.position.offset-Et/2})})}))}var _e=te&&te.type&&te.type.getComposedData;_e&&U.push({props:se(se({},_e(se(se({},er),{},{displayedData:ae,props:y,dataKey:Ee,item:te,bandSize:V,barPosition:je,offset:w,stackedData:he,layout:K,dataStartIndex:j,dataEndIndex:E}))),{},Ue(Ue(Ue({key:te.key||"item-".concat(ue)},Z,er[Z]),X,er[X]),"animationId",S)),childIndex:RD(te,y.children),item:te})}),U},p=function(y,g){var x=y.props,P=y.dataStartIndex,w=y.dataEndIndex,S=y.updateId;if(!xw({props:x}))return null;var j=x.children,E=x.layout,R=x.stackOffset,K=x.data,H=x.reverseStackOrder,B=QP(E),le=B.numericAxisName,ne=B.cateAxisName,Z=tn(j,n),X=q9(K,Z,"".concat(le,"Id"),"".concat(ne,"Id"),R,H),ee=s.reduce(function(pe,Ee){var it="".concat(Ee.axisType,"Map");return se(se({},pe),{},Ue({},it,tee(x,se(se({},Ee),{},{graphicalItems:Z,stackGroups:Ee.axisType===le&&X,dataStartIndex:P,dataEndIndex:w}))))},{}),U=iee(se(se({},ee),{},{props:x,graphicalItems:Z}),g==null?void 0:g.legendBBox);Object.keys(ee).forEach(function(pe){ee[pe]=f(x,ee[pe],U,pe.replace("Map",""),r)});var te=ee["".concat(ne,"Map")],ue=ree(te),ae=d(x,se(se({},ee),{},{dataStartIndex:P,dataEndIndex:w,updateId:S,graphicalItems:Z,stackGroups:X,offset:U}));return se(se({formattedGraphicalItems:ae,graphicalItems:Z,offset:U,stackGroups:X},ue),ee)},m=function(b){function y(g){var x,P,w;return LJ(this,y),w=zJ(this,y,[g]),Ue(w,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Ue(w,"accessibilityManager",new OJ),Ue(w,"handleLegendBBoxUpdate",function(S){if(S){var j=w.state,E=j.dataStartIndex,R=j.dataEndIndex,K=j.updateId;w.setState(se({legendBBox:S},p({props:w.props,dataStartIndex:E,dataEndIndex:R,updateId:K},se(se({},w.state),{},{legendBBox:S}))))}}),Ue(w,"handleReceiveSyncEvent",function(S,j,E){if(w.props.syncId===S){if(E===w.eventEmitterSymbol&&typeof w.props.syncMethod!="function")return;w.applySyncEvent(j)}}),Ue(w,"handleBrushChange",function(S){var j=S.startIndex,E=S.endIndex;if(j!==w.state.dataStartIndex||E!==w.state.dataEndIndex){var R=w.state.updateId;w.setState(function(){return se({dataStartIndex:j,dataEndIndex:E},p({props:w.props,dataStartIndex:j,dataEndIndex:E,updateId:R},w.state))}),w.triggerSyncEvent({dataStartIndex:j,dataEndIndex:E})}}),Ue(w,"handleMouseEnter",function(S){var j=w.getMouseInfo(S);if(j){var E=se(se({},j),{},{isTooltipActive:!0});w.setState(E),w.triggerSyncEvent(E);var R=w.props.onMouseEnter;Je(R)&&R(E,S)}}),Ue(w,"triggeredAfterMouseMove",function(S){var j=w.getMouseInfo(S),E=j?se(se({},j),{},{isTooltipActive:!0}):{isTooltipActive:!1};w.setState(E),w.triggerSyncEvent(E);var R=w.props.onMouseMove;Je(R)&&R(E,S)}),Ue(w,"handleItemMouseEnter",function(S){w.setState(function(){return{isTooltipActive:!0,activeItem:S,activePayload:S.tooltipPayload,activeCoordinate:S.tooltipPosition||{x:S.cx,y:S.cy}}})}),Ue(w,"handleItemMouseLeave",function(){w.setState(function(){return{isTooltipActive:!1}})}),Ue(w,"handleMouseMove",function(S){S.persist(),w.throttleTriggeredAfterMouseMove(S)}),Ue(w,"handleMouseLeave",function(S){w.throttleTriggeredAfterMouseMove.cancel();var j={isTooltipActive:!1};w.setState(j),w.triggerSyncEvent(j);var E=w.props.onMouseLeave;Je(E)&&E(j,S)}),Ue(w,"handleOuterEvent",function(S){var j=ID(S),E=Dn(w.props,"".concat(j));if(j&&Je(E)){var R,K;/.*touch.*/i.test(j)?K=w.getMouseInfo(S.changedTouches[0]):K=w.getMouseInfo(S),E((R=K)!==null&&R!==void 0?R:{},S)}}),Ue(w,"handleClick",function(S){var j=w.getMouseInfo(S);if(j){var E=se(se({},j),{},{isTooltipActive:!0});w.setState(E),w.triggerSyncEvent(E);var R=w.props.onClick;Je(R)&&R(E,S)}}),Ue(w,"handleMouseDown",function(S){var j=w.props.onMouseDown;if(Je(j)){var E=w.getMouseInfo(S);j(E,S)}}),Ue(w,"handleMouseUp",function(S){var j=w.props.onMouseUp;if(Je(j)){var E=w.getMouseInfo(S);j(E,S)}}),Ue(w,"handleTouchMove",function(S){S.changedTouches!=null&&S.changedTouches.length>0&&w.throttleTriggeredAfterMouseMove(S.changedTouches[0])}),Ue(w,"handleTouchStart",function(S){S.changedTouches!=null&&S.changedTouches.length>0&&w.handleMouseDown(S.changedTouches[0])}),Ue(w,"handleTouchEnd",function(S){S.changedTouches!=null&&S.changedTouches.length>0&&w.handleMouseUp(S.changedTouches[0])}),Ue(w,"handleDoubleClick",function(S){var j=w.props.onDoubleClick;if(Je(j)){var E=w.getMouseInfo(S);j(E,S)}}),Ue(w,"handleContextMenu",function(S){var j=w.props.onContextMenu;if(Je(j)){var E=w.getMouseInfo(S);j(E,S)}}),Ue(w,"triggerSyncEvent",function(S){w.props.syncId!==void 0&&cy.emit(fy,w.props.syncId,S,w.eventEmitterSymbol)}),Ue(w,"applySyncEvent",function(S){var j=w.props,E=j.layout,R=j.syncMethod,K=w.state.updateId,H=S.dataStartIndex,B=S.dataEndIndex;if(S.dataStartIndex!==void 0||S.dataEndIndex!==void 0)w.setState(se({dataStartIndex:H,dataEndIndex:B},p({props:w.props,dataStartIndex:H,dataEndIndex:B,updateId:K},w.state)));else if(S.activeTooltipIndex!==void 0){var le=S.chartX,ne=S.chartY,Z=S.activeTooltipIndex,X=w.state,ee=X.offset,U=X.tooltipTicks;if(!ee)return;if(typeof R=="function")Z=R(U,S);else if(R==="value"){Z=-1;for(var te=0;te=0){var he,Q;if(le.dataKey&&!le.allowDuplicatedCategory){var V=typeof le.dataKey=="function"?Ke:"payload.".concat(le.dataKey.toString());he=qd(te,V,Z),Q=ue&&ae&&qd(ae,V,Z)}else he=te==null?void 0:te[ne],Q=ue&&ae&&ae[ne];if(jt||ot){var je=S.props.activeIndex!==void 0?S.props.activeIndex:ne;return[_.cloneElement(S,se(se(se({},R.props),er),{},{activeIndex:je})),null,null]}if(!Ge(he))return[Te].concat(Os(w.renderActivePoints({item:R,activePoint:he,basePoint:Q,childIndex:ne,isRange:ue})))}else{var Ae,Be=(Ae=w.getItemByXY(w.state.activeCoordinate))!==null&&Ae!==void 0?Ae:{graphicalItem:Te},Ie=Be.graphicalItem,ce=Ie.item,Et=ce===void 0?S:ce,_e=Ie.childIndex,wt=se(se(se({},R.props),er),{},{activeIndex:_e});return[_.cloneElement(Et,wt),null,null]}return ue?[Te,null,null]:[Te,null]}),Ue(w,"renderCustomized",function(S,j,E){return _.cloneElement(S,se(se({key:"recharts-customized-".concat(E)},w.props),w.state))}),Ue(w,"renderMap",{CartesianGrid:{handler:ud,once:!0},ReferenceArea:{handler:w.renderReferenceElement},ReferenceLine:{handler:ud},ReferenceDot:{handler:w.renderReferenceElement},XAxis:{handler:ud},YAxis:{handler:ud},Brush:{handler:w.renderBrush,once:!0},Bar:{handler:w.renderGraphicChild},Line:{handler:w.renderGraphicChild},Area:{handler:w.renderGraphicChild},Radar:{handler:w.renderGraphicChild},RadialBar:{handler:w.renderGraphicChild},Scatter:{handler:w.renderGraphicChild},Pie:{handler:w.renderGraphicChild},Funnel:{handler:w.renderGraphicChild},Tooltip:{handler:w.renderCursor,once:!0},PolarGrid:{handler:w.renderPolarGrid,once:!0},PolarAngleAxis:{handler:w.renderPolarAxis},PolarRadiusAxis:{handler:w.renderPolarAxis},Customized:{handler:w.renderCustomized}}),w.clipPathId="".concat((x=g.id)!==null&&x!==void 0?x:Ga("recharts"),"-clip"),w.throttleTriggeredAfterMouseMove=B_(w.triggeredAfterMouseMove,(P=g.throttleDelay)!==null&&P!==void 0?P:1e3/60),w.state={},w}return HJ(y,b),BJ(y,[{key:"componentDidMount",value:function(){var x,P;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(x=this.props.margin.left)!==null&&x!==void 0?x:0,top:(P=this.props.margin.top)!==null&&P!==void 0?P:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var x=this.props,P=x.children,w=x.data,S=x.height,j=x.layout,E=dn(P,ri);if(E){var R=E.props.defaultIndex;if(!(typeof R!="number"||R<0||R>this.state.tooltipTicks.length-1)){var K=this.state.tooltipTicks[R]&&this.state.tooltipTicks[R].value,H=Dm(this.state,w,R,K),B=this.state.tooltipTicks[R].coordinate,le=(this.state.offset.top+S)/2,ne=j==="horizontal",Z=ne?{x:B,y:le}:{y:B,x:le},X=this.state.formattedGraphicalItems.find(function(U){var te=U.item;return te.type.name==="Scatter"});X&&(Z=se(se({},Z),X.props.points[R].tooltipPosition),H=X.props.points[R].tooltipPayload);var ee={activeTooltipIndex:R,isTooltipActive:!0,activeLabel:K,activePayload:H,activeCoordinate:Z};this.setState(ee),this.renderCursor(E),this.accessibilityManager.setIndex(R)}}}},{key:"getSnapshotBeforeUpdate",value:function(x,P){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==P.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==x.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==x.margin){var w,S;this.accessibilityManager.setDetails({offset:{left:(w=this.props.margin.left)!==null&&w!==void 0?w:0,top:(S=this.props.margin.top)!==null&&S!==void 0?S:0}})}return null}},{key:"componentDidUpdate",value:function(x){fg([dn(x.children,ri)],[dn(this.props.children,ri)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var x=dn(this.props.children,ri);if(x&&typeof x.props.shared=="boolean"){var P=x.props.shared?"axis":"item";return l.indexOf(P)>=0?P:o}return o}},{key:"getMouseInfo",value:function(x){if(!this.container)return null;var P=this.container,w=P.getBoundingClientRect(),S=l6(w),j={chartX:Math.round(x.pageX-S.left),chartY:Math.round(x.pageY-S.top)},E=w.width/P.offsetWidth||1,R=this.inRange(j.chartX,j.chartY,E);if(!R)return null;var K=this.state,H=K.xAxisMap,B=K.yAxisMap,le=this.getTooltipEventType(),ne=qP(this.state,this.props.data,this.props.layout,R);if(le!=="axis"&&H&&B){var Z=Mo(H).scale,X=Mo(B).scale,ee=Z&&Z.invert?Z.invert(j.chartX):null,U=X&&X.invert?X.invert(j.chartY):null;return se(se({},j),{},{xValue:ee,yValue:U},ne)}return ne?se(se({},j),ne):null}},{key:"inRange",value:function(x,P){var w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,S=this.props.layout,j=x/w,E=P/w;if(S==="horizontal"||S==="vertical"){var R=this.state.offset,K=j>=R.left&&j<=R.left+R.width&&E>=R.top&&E<=R.top+R.height;return K?{x:j,y:E}:null}var H=this.state,B=H.angleAxisMap,le=H.radiusAxisMap;if(B&&le){var ne=Mo(B);return $S({x:j,y:E},ne)}return null}},{key:"parseEventsOfWrapper",value:function(){var x=this.props.children,P=this.getTooltipEventType(),w=dn(x,ri),S={};w&&P==="axis"&&(w.props.trigger==="click"?S={onClick:this.handleClick}:S={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var j=Xd(this.props,this.handleOuterEvent);return se(se({},j),S)}},{key:"addListener",value:function(){cy.on(fy,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){cy.removeListener(fy,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(x,P,w){for(var S=this.state.formattedGraphicalItems,j=0,E=S.length;je==null?"":e>=1e6?`$${(e/1e6).toFixed(1)}M`:e>=1e3?`$${(e/1e3).toFixed(0)}K`:`$${e}`,py=e=>e==null?"":`$${e==null?void 0:e.toLocaleString()}`,Li=e=>e==null?"":`${e}%`;function dt(e){const t=new Date(e+"T00:00:00");return`${t.getMonth()+1}/${t.getDate()}`}function lt(e,t=!1){const n=new Date(e+"-01T00:00:00").toLocaleString("en",{month:"short"});return t?n+" (MTD)":n}function nt(e,t,r){const n=[...e].sort(),i=new Date,o=i.toISOString().split("T")[0];if(t==="mtd"){const l=new Date(i.getFullYear(),i.getMonth(),1),s=new Date(l);s.setDate(s.getDate()-6);const u=s.toISOString().split("T")[0],f=n.filter(c=>c>=u&&c<=o);return{periods:f,isMonthly:!1,weekSet:new Set(f),formatLabel:dt}}if(t==="qtd"){const l=Math.floor(i.getMonth()/3)*3,s=new Date(i.getFullYear(),l,1),u=new Date(s);u.setDate(u.getDate()-6);const f=u.toISOString().split("T")[0],c=n.filter(d=>d>=f&&d<=o);return{periods:c,isMonthly:!1,weekSet:new Set(c),formatLabel:dt}}if(t==="ytd"){const l=i.getFullYear(),s=`${l}-${String(i.getMonth()+1).padStart(2,"0")}`,u=[...new Set(n.map(f=>f.substring(0,7)))].filter(f=>f>=`${l}-01`&&f<=s).sort();return{periods:u,isMonthly:!0,weekSet:new Set(n.filter(f=>u.includes(f.substring(0,7)))),formatLabel:f=>{const c=f.substring(0,7);return lt(c,c===s)}}}if(t==="monthly"){const s=[...new Set(n.map(f=>f.substring(0,7)))].sort().slice(-r),u=`${i.getFullYear()}-${String(i.getMonth()+1).padStart(2,"0")}`;return{periods:s,isMonthly:!0,weekSet:new Set(n.filter(f=>s.includes(f.substring(0,7)))),formatLabel:f=>{const c=f.substring(0,7);return lt(c,c===u)}}}const a=n.slice(-r);return{periods:a,isMonthly:!1,weekSet:new Set(a),formatLabel:dt}}function see(e,t){const r=[...new Set(t.map(i=>i.c))],n={};for(const i of r)if(i)for(const o of e){const l=o.name.replace(/^(Avelure-|Ever\/Body-|Blush - |Back to 30 - )/,"").split(/[\s-]+/)[0];if(l&&l.length>2&&i.includes(l))if(!n[i])n[i]=o.name;else{const s=ZP(n[i],i);ZP(o.name,i)>s&&(n[i]=o.name)}}return n}function ZP(e,t){return e.split(/[\s\-]+/).filter(n=>n.length>2).filter(n=>t.includes(n)).length}function qe({label:e,options:t,selected:r,onChange:n,minWidth:i=200}){const[o,a]=_.useState(!1),l=_.useRef(null);_.useEffect(()=>{const f=c=>{l.current&&!l.current.contains(c.target)&&a(!1)};return document.addEventListener("mousedown",f),()=>document.removeEventListener("mousedown",f)},[]);const s=f=>{n(r.includes(f)?r.filter(c=>c!==f):[...r,f])},u=r.length===0?`All ${e}s`:r.length===1?r[0]:`${r.length} selected`;return h.jsxs("div",{ref:l,style:{position:"relative"},children:[h.jsxs("div",{onClick:()=>a(!o),style:{padding:"4px 26px 4px 8px",border:`1px solid ${T.taupe}`,borderRadius:4,fontSize:10,fontFamily:me.body,color:r.length?T.navy:T.gray,background:T.cream,minWidth:i,cursor:"pointer",userSelect:"none",position:"relative",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:[u,h.jsx("span",{style:{position:"absolute",right:6,top:"50%",transform:"translateY(-50%)",fontSize:8,color:T.gray,pointerEvents:"none"},children:"▼"})]}),o&&h.jsxs("div",{style:{position:"absolute",top:"100%",right:0,zIndex:1e3,marginTop:4,minWidth:220,maxHeight:320,overflowY:"auto",background:T.white,border:`1.5px solid ${T.taupe}`,borderRadius:8,boxShadow:"0 4px 16px rgba(4,30,66,0.12)",padding:"6px 0"},children:[h.jsxs("div",{style:{display:"flex",justifyContent:"space-between",padding:"4px 12px 8px",borderBottom:`1px solid ${T.light}`,marginBottom:4},children:[h.jsx("button",{onClick:f=>{f.stopPropagation(),n([...t])},style:{background:"none",border:"none",color:T.gold,fontSize:11,fontFamily:me.body,fontWeight:600,cursor:"pointer",padding:0},children:"Select All"}),h.jsx("button",{onClick:f=>{f.stopPropagation(),n([])},style:{background:"none",border:"none",color:T.gray,fontSize:11,fontFamily:me.body,fontWeight:600,cursor:"pointer",padding:0},children:"Clear All"})]}),t.map(f=>h.jsxs("div",{onClick:c=>{c.stopPropagation(),s(f)},style:{display:"flex",alignItems:"center",gap:8,padding:"4px 10px",cursor:"pointer",fontSize:10,fontFamily:me.body,color:T.dark,background:r.includes(f)?T.light:"transparent"},onMouseEnter:c=>{r.includes(f)||(c.currentTarget.style.background=T.cream)},onMouseLeave:c=>{c.currentTarget.style.background=r.includes(f)?T.light:"transparent"},children:[h.jsx("span",{style:{width:14,height:14,borderRadius:3,border:`1.5px solid ${r.includes(f)?T.gold:T.taupe}`,background:r.includes(f)?T.gold:T.white,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,transition:"all 0.15s"},children:r.includes(f)&&h.jsx("span",{style:{color:T.white,fontSize:11,fontWeight:700,lineHeight:1},children:"✓"})}),f]},f))]})]})}function $u({number:e,title:t}){return h.jsxs("div",{style:{display:"flex",alignItems:"center",gap:16,margin:"48px 0 24px",paddingBottom:12,borderBottom:`2px solid ${T.gold}`},children:[h.jsx("div",{style:{width:44,height:44,borderRadius:8,background:T.navy,display:"flex",alignItems:"center",justifyContent:"center",fontFamily:me.heading,fontSize:22,color:T.gold},children:e}),h.jsx("h2",{style:{fontFamily:me.heading,fontSize:24,fontWeight:400,color:T.navy,margin:0},children:t})]})}function uee({children:e}){return h.jsx("div",{style:{fontSize:10,fontWeight:700,color:T.gold,letterSpacing:1.5,textTransform:"uppercase",fontFamily:me.body,marginBottom:4},children:e})}function _t({title:e,tooltip:t,children:r,width:n="100%",height:i,headerRight:o}){return h.jsxs("div",{style:{background:T.white,borderRadius:10,border:`1px solid ${T.taupe}`,padding:"14px 16px",width:n,boxSizing:"border-box",minHeight:i||"auto"},children:[h.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:10,gap:8},children:[h.jsx("h3",{style:{fontFamily:me.heading,fontSize:16,fontWeight:400,color:T.navy,margin:0,flexShrink:0},children:e}),h.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[o,t&&h.jsx("span",{style:{fontSize:11,color:T.gray,fontFamily:me.body,cursor:"help"},title:t,children:"ⓘ"})]})]}),r]})}function sE(e){if(!e)return T.cream;const t=e.replace("#","");if(t.length<6)return T.cream;const r=parseInt(t.substring(0,2),16),n=parseInt(t.substring(2,4),16),i=parseInt(t.substring(4,6),16);return(r*299+n*587+i*114)/1e3<100?`rgb(${Math.min(r+160,255)}, ${Math.min(n+160,255)}, ${Math.min(i+160,255)})`:e}function Nt({data:e,series:t,height:r=320,formatter:n=Tn,rightAxisFormatter:i,yLabel:o,note:a,colorMap:l,rightAxisSeries:s=[]}){const u=new Set(s),f=s.length>0,c=i||n,d=({active:p,payload:m,label:v})=>!p||!m?null:h.jsxs("div",{style:{background:T.navy,border:"none",borderRadius:6,padding:"8px 12px",fontFamily:me.body,fontSize:12},children:[h.jsx("div",{style:{color:T.gold,fontWeight:600,marginBottom:4},children:v}),m.map((b,y)=>{const g=u.has(b.name)?c(b.value):n(b.value),x=b.color||b.stroke||T.cream;return h.jsxs("div",{style:{display:"flex",justifyContent:"space-between",gap:16,padding:"1px 0"},children:[h.jsx("span",{style:{color:sE(x)},children:b.name}),h.jsx("span",{style:{color:T.cream,fontWeight:600},children:g})]},y)})]});return h.jsxs("div",{children:[h.jsx(z_,{width:"100%",height:r,children:h.jsxs(aee,{data:e,margin:{top:8,right:f?48:12,left:0,bottom:0},children:[h.jsx(Lb,{strokeDasharray:"3 3",stroke:T.taupe}),h.jsx(Ws,{dataKey:"week",tick:{fontSize:11,fontFamily:me.body,fill:T.gray}}),h.jsx(Zo,{yAxisId:"left",tick:{fontSize:11,fontFamily:me.body,fill:T.gray},tickFormatter:n}),f&&h.jsx(Zo,{yAxisId:"right",orientation:"right",tick:{fontSize:10,fontFamily:me.body,fill:T.goldMuted},tickFormatter:c,stroke:T.goldLight}),h.jsx(ri,{content:d}),h.jsx(Yo,{wrapperStyle:{fontFamily:me.body,fontSize:11},iconType:"line"}),t.map((p,m)=>h.jsx(Za,{type:"monotone",dataKey:p,yAxisId:u.has(p)?"right":"left",stroke:l&&l[p]||En[m%En.length],strokeWidth:u.has(p)?1.5:2,strokeDasharray:u.has(p)?"6 3":"",dot:{r:u.has(p)?2.5:3},activeDot:{r:5},connectNulls:!0},p))]})}),a&&h.jsx("div",{style:{fontSize:10,color:T.gray,fontFamily:me.body,marginTop:4,textAlign:"right"},children:a})]})}function cee({data:e,compact:t=!1}){const r=["Inject.","Body","Laser","Facials","Retail","Other"],n=["injectables","body","laser","facials","retail","other"],i=t?`100px repeat(${r.length}, 1fr)`:`180px repeat(${r.length}, 1fr)`,o=t?"6px 10px":"10px 14px",a=t?10:12,l=t?8:9;return h.jsxs("div",{style:{borderRadius:8,overflow:"hidden",border:`1px solid ${T.taupe}`},children:[h.jsxs("div",{style:{display:"grid",gridTemplateColumns:i,background:T.navy,padding:o},children:[h.jsx("div",{style:{fontSize:l,fontWeight:600,color:T.blush,letterSpacing:1.5,textTransform:"uppercase",fontFamily:me.body},children:"Location"}),r.map(s=>h.jsx("div",{style:{fontSize:l,fontWeight:600,color:T.blush,letterSpacing:1,textTransform:"uppercase",fontFamily:me.body,textAlign:"right"},children:s},s))]}),e.map((s,u)=>h.jsxs("div",{style:{display:"grid",gridTemplateColumns:i,padding:o,background:u%2===0?T.cream:T.white,borderTop:`1px solid ${T.taupe}`},children:[h.jsx("div",{style:{fontFamily:me.body,fontSize:a,fontWeight:600,color:T.navy,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:s.name}),n.map(f=>h.jsxs("div",{style:{fontFamily:me.body,fontSize:a,color:T.dark,textAlign:"right"},children:[s[f],"%"]},f))]},u))]})}function fee({title:e,message:t}){return h.jsxs("div",{style:{padding:"20px 24px",background:T.white,borderRadius:10,border:`1px solid ${T.taupe}`,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[h.jsx("div",{style:{fontFamily:me.heading,fontSize:16,color:T.navy,marginBottom:8},children:e}),h.jsx("div",{style:{fontSize:12,color:T.gray,fontFamily:me.body},children:t})]})}function Mt({chartId:e,globalMode:t,globalCount:r,overrides:n,setOverrides:i}){const o=n[e],a=(o==null?void 0:o.mode)||t,l=(o==null?void 0:o.count)||r,s=!!o,u=m=>{const v=m.target.value;i(b=>({...b,[e]:{mode:v,count:l}}))},f=m=>{const v=Number(m.target.value);i(b=>({...b,[e]:{mode:a,count:v}}))},c=()=>{i(m=>{const v={...m};return delete v[e],v})},d={padding:"3px 6px",fontSize:10,fontFamily:me.body,border:`1px solid ${s?T.gold:T.taupe}`,borderRadius:4,background:s?"rgba(185,151,91,0.08)":T.cream,color:T.navy,cursor:"pointer",minWidth:65},p=["mtd","qtd","ytd"].includes(a);return h.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4},children:[h.jsxs("select",{value:a,onChange:u,style:d,children:[h.jsx("option",{value:"weekly",children:"Weekly"}),h.jsx("option",{value:"monthly",children:"Monthly"}),h.jsx("option",{value:"mtd",children:"MTD"}),h.jsx("option",{value:"qtd",children:"QTD"}),h.jsx("option",{value:"ytd",children:"YTD"})]}),!p&&h.jsx("select",{value:l,onChange:f,style:{...d,minWidth:40},children:[1,2,3,4,5,6,7,8,9,10,11,12].map(m=>h.jsx("option",{value:m,children:m},m))}),s&&h.jsx("button",{onClick:c,style:{background:"none",border:"none",color:T.gold,fontSize:10,cursor:"pointer",fontFamily:me.body,textDecoration:"underline",padding:0},children:"Reset"})]})}function dee({location:e,locations:t,metrics:r,dailyMetrics:n,opsData:i,btxData:o,syringeLocData:a,utilizationData:l,providerHoursData:s,injRevProviderData:u,btxProviderData:f,syringeProvData:c,revCollProvData:d,budgetData:p,metricsProviderData:m,opsProviderData:v,utilHoursProviderData:b}){const[y,g]=_.useState({kpi:!1,efficiency:!1,providers:!1,recommendations:!1}),x=V=>g(je=>({...je,[V]:!je[V]})),[P,w]=_.useState("MTD"),[S,j]=_.useState(null),[E,R]=_.useState(!1),K=_.useRef(null),[H,B]=_.useState(null),[le,ne]=_.useState(!1),Z=_.useRef(null),[X,ee]=_.useState(null),[U,te]=_.useState(!1),ue=_.useRef(null),ae=_.useMemo(()=>{var Wt;if(!e||!t.length||!r.length)return null;const V=t.find(L=>L.name===e),je=((Wt=V==null?void 0:V.types)==null?void 0:Wt[0])||"",Ae=t.filter(L=>{var q;return(q=L.types)==null?void 0:q.includes(je)}).map(L=>L.name),Be=[...new Set(r.map(L=>L.w))].sort(),Ie=new Date,ce=Ie.getFullYear(),Et=Ie.getMonth(),_e=L=>new Date(L+"T00:00:00").toLocaleDateString("en-US",{month:"short",day:"numeric"});let wt,Ce;const We=Ie.toISOString().slice(0,10),Dt=(L,q,$e)=>{const ke=new Date(L+"T00:00:00"),Ve=new Date(ke);return Ve.setDate(Ve.getDate()+6),Ve>=q&&ke<=$e};if(P==="YESTERDAY"){const L=new Date(Ie);L.setDate(L.getDate()-1),wt=Be.filter(q=>Dt(q,L,L)),Ce=L.toLocaleDateString("en-US",{weekday:"short",month:"short",day:"numeric",year:"numeric"})}else if(P==="MTD"){const L=new Date(ce,Et,1),q=new Date(ce,Et+1,0);wt=Be.filter(ke=>Dt(ke,L,q));const $e=L.toLocaleDateString("en-US",{month:"short"});Ce=`${$e} 1 – ${$e} ${q.getDate()}, ${ce}`}else if(P==="QTD"){const L=Math.floor(Et/3),q=new Date(ce,L*3,1),$e=new Date(ce,(L+1)*3,0);wt=Be.filter(Ne=>Dt(Ne,q,$e));const ke=q.toLocaleDateString("en-US",{month:"short",day:"numeric"}),Ve=$e.toLocaleDateString("en-US",{month:"short",day:"numeric"});Ce=`${ke} – ${Ve}, ${ce}`}else if(P==="YTD"){const L=new Date(ce,0,1);wt=Be.filter(q=>Dt(q,L,Ie)),Ce=`Jan 1 – ${_e(We)}, ${ce}`}else if(P==="L30"){const L=new Date(Ie);L.setDate(L.getDate()-29),wt=Be.filter(q=>Dt(q,L,Ie)),Ce=`${_e(L.toISOString().slice(0,10))} – ${_e(We)}, ${ce}`}else if(P==="L60"){const L=new Date(Ie);L.setDate(L.getDate()-59),wt=Be.filter(q=>Dt(q,L,Ie)),Ce=`${_e(L.toISOString().slice(0,10))} – ${_e(We)}, ${ce}`}else wt=Be.slice(-4),Ce=`${_e(wt[0])} – ${_e(wt[wt.length-1])}, ${ce}`;const He=new Set(wt);let $r,Qe=We;if(P==="YESTERDAY"){const L=new Date(Ie);L.setDate(L.getDate()-1),$r=L.toISOString().slice(0,10),Qe=$r}else if(P==="MTD")$r=`${ce}-${String(Et+1).padStart(2,"0")}-01`;else if(P==="QTD"){const L=Math.floor(Et/3)*3;$r=`${ce}-${String(L+1).padStart(2,"0")}-01`}else if(P==="YTD")$r=`${ce}-01-01`;else if(P==="L30"){const L=new Date(Ie);L.setDate(L.getDate()-29),$r=L.toISOString().slice(0,10)}else if(P==="L60"){const L=new Date(Ie);L.setDate(L.getDate()-59),$r=L.toISOString().slice(0,10)}else $r=wt.length?wt[0]:We;const tr=(L,q,$e)=>{if(!L||!L.length)return null;const ke=L.filter(Ve=>Ve.c===q&&He.has(Ve.w));return ke.length?ke.reduce((Ve,Ne)=>Ve+(Number(Ne[$e])||0),0)/ke.length:null},Us=(L,q,$e)=>{if(!L||!L.length)return null;const ke=L.filter(Ve=>Ve.c===q&&He.has(Ve.w)&&Number(Ve[$e])>0);return ke.length?ke.reduce((Ve,Ne)=>Ve+(Number(Ne[$e])||0),0)/ke.length:null},Fr=(L,q,$e)=>!L||!L.length?0:L.filter(ke=>ke.c===q&&He.has(ke.w)).reduce((ke,Ve)=>ke+(Number(Ve[$e])||0),0),on=(L,q)=>!n||!n.length?0:n.filter($e=>$e.c===L&&$e.d>=$r&&$e.d<=Qe).reduce(($e,ke)=>$e+(Number(ke[q])||0),0),Br=(L,q,$e)=>{if(!L||!L.length)return null;const ke=q.map(Ve=>tr(L,Ve,$e)).filter(Ve=>Ve!=null);return ke.length?ke.reduce((Ve,Ne)=>Ve+Ne,0)/ke.length:null},Er=on(e,"s"),Cr=on(e,"p"),pi=Cr>0?Er/Cr:null,lr=Ae.reduce((L,q)=>L+on(q,"s"),0),Hs=Ae.reduce((L,q)=>L+on(q,"p"),0),Pr=Hs>0?lr/Hs:null,ff=on(e,"rt"),yr=Er>0?ff/Er*100:null,df=Ae.reduce((L,q)=>L+on(q,"rt"),0),Wn=lr>0?df/lr*100:null,pf=on(e,"inj"),Gr=Er>0?pf/Er*100:null,hf=Ae.reduce((L,q)=>L+on(q,"inj"),0),xn=lr>0?hf/lr*100:null,el=on(e,"co"),zr=Er>0?el/Er*100:null,Vs=(L,q)=>{if(!p||!p.length)return 0;const $e=new Date($r+"T00:00:00"),ke=new Date(Qe+"T00:00:00");let Ve=0;for(const Ne of p){if(Ne.c!==L)continue;const rt=Number(Ne[q]);if(!rt||rt<=0)continue;const kt=new Date(Ne.w+"T00:00:00"),at=new Date(kt);at.setDate(at.getDate()+6);const ct=$e>kt?$e:kt,rr=ke{if(P!=="MTD"||!p||!p.length)return 0;const $e=new Date(ce,Et,1),ke=new Date(ce,Et+1,0);let Ve=0;for(const Ne of p){if(Ne.c!==L)continue;const rt=Number(Ne[q]);if(!rt||rt<=0)continue;const kt=new Date(Ne.w+"T00:00:00"),at=new Date(kt);at.setDate(at.getDate()+6);const ct=$e>kt?$e:kt,rr=keL+on(q,"co"),0),Pn=lr>0?tl/lr*100:null,Gs=(f||[]).filter(L=>L.c===e&&He.has(L.w)),so=Gs.reduce((L,q)=>L+(Number(q.total_qty)||0),0),Ys=Gs.reduce((L,q)=>L+(Number(q.n)||0),0),Yr=Ys>0?so/Ys:null,yf=(f||[]).filter(L=>Ae.includes(L.c)&&He.has(L.w)),uo=yf.reduce((L,q)=>L+(Number(q.total_qty)||0),0),qs=yf.reduce((L,q)=>L+(Number(q.n)||0),0),co=qs>0?uo/qs:null,gf=tr(a,e,"sf"),Xs=Br(a,Ae,"sf"),On=tr(i,e,"cn"),Qs=Br(i,Ae,"cn"),Hn=tr(i,e,"ns"),fo=Br(i,Ae,"ns"),an=Us(l,e,"ur"),rl=(()=>{if(!l||!l.length)return null;const L=Ae.map(q=>Us(l,q,"ur")).filter(q=>q!=null);return L.length?L.reduce((q,$e)=>q+$e,0)/L.length:null})(),nl=tr(r,e,"p"),il=Br(r,Ae,"p"),po=(L,q,$e,ke,Ve)=>{if(!L||!L.length||wt.length<2)return null;const Ne=L.filter(sr=>sr.c===q&&He.has(sr.w)).sort((sr,nr)=>sr.w.localeCompare(nr.w));if(Ne.length<2)return null;const rt=Math.ceil(Ne.length/2),kt=Ne.slice(0,rt),at=Ne.slice(rt),ct=sr=>sr.length?sr.reduce((nr,Ii)=>nr+(Number(Ii[$e])||0),0)/sr.length:0,rr=ct(kt),gr=ct(at);return rr===0&&gr===0?0:rr!==0?(gr-rr)/Math.abs(rr)*100:gr>0?100:-100},Zs=(()=>{const L=r.filter(Ne=>Ne.c===e&&He.has(Ne.w)).sort((Ne,rt)=>Ne.w.localeCompare(rt.w));if(L.length<2)return null;const q=Math.ceil(L.length/2),$e=Ne=>{const rt=Ne.reduce((at,ct)=>at+(Number(ct.s)||0),0),kt=Ne.reduce((at,ct)=>at+(Number(ct.p)||0),0);return kt>0?rt/kt:0},ke=$e(L.slice(0,q)),Ve=$e(L.slice(q));return ke!==0?(Ve-ke)/Math.abs(ke)*100:0})(),Js=(()=>{const L=r.filter(Ne=>Ne.c===e&&He.has(Ne.w)).sort((Ne,rt)=>Ne.w.localeCompare(rt.w));if(L.length<2)return null;const q=Math.ceil(L.length/2),$e=Ne=>{const rt=Ne.reduce((at,ct)=>at+(Number(ct.s)||0),0),kt=Ne.reduce((at,ct)=>at+(Number(ct.rt)||0),0);return rt>0?kt/rt*100:0},ke=$e(L.slice(0,q));return $e(L.slice(q))-ke})(),Vn=(()=>{const L=r.filter(Ne=>Ne.c===e&&He.has(Ne.w)).sort((Ne,rt)=>Ne.w.localeCompare(rt.w));if(L.length<2)return null;const q=Math.ceil(L.length/2),$e=Ne=>{const rt=Ne.reduce((at,ct)=>at+(Number(ct.s)||0),0),kt=Ne.reduce((at,ct)=>at+(Number(ct.inj)||0),0);return rt>0?kt/rt*100:0},ke=$e(L.slice(0,q));return $e(L.slice(q))-ke})(),mf=(()=>{const L=r.filter(Ne=>Ne.c===e&&He.has(Ne.w)).sort((Ne,rt)=>Ne.w.localeCompare(rt.w));if(L.length<2)return null;const q=Math.ceil(L.length/2),$e=Ne=>{const rt=Ne.reduce((at,ct)=>at+(Number(ct.s)||0),0),kt=Ne.reduce((at,ct)=>at+(Number(ct.co)||0),0);return rt>0?kt/rt*100:0},ke=$e(L.slice(0,q));return $e(L.slice(q))-ke})(),ho=po(o,e,"avg_units"),eu=po(a,e,"sf"),vo=po(i,e,"cn"),bf=po(i,e,"ns"),yo=po(l,e,"ur"),tu=po(r,e,"p"),sa=r.filter(L=>L.c===e&&He.has(L.w)).sort((L,q)=>L.w.localeCompare(q.w)),ol=Math.ceil(sa.length/2),ln=sa.slice(0,ol),go=sa.slice(ol),hi=L=>L.length?L.reduce((q,$e)=>q+(Number($e.s)||0),0)/L.length:0,ua=L=>L.length?L.reduce((q,$e)=>q+(Number($e.p)||0),0)/L.length:0,ki=ln.length&&go.length?(hi(go)-hi(ln))/(hi(ln)||1)*100:0,ru=ln.length&&go.length?(ua(go)-ua(ln))/(ua(ln)||1)*100:0,Kn=Fr(s||[],e,"h"),mo=Kn>0?Er/Kn:null,bo=Kn>0?el/Kn:null,ca=tr(s||[],e,"h"),Gn=Ae.reduce((L,q)=>L+Fr(s||[],q,"h"),0),al=Gn>0?lr/Gn:null,xo=Gn>0?tl/Gn:null,nu=Br(s||[],Ae,"h"),Mi=(L,q,$e,ke,Ve,Ne,rt)=>{if(!L||L.size===0)return null;const kt=(q||[]).filter(Me=>Me.c===e&&He.has(Me.w)&&L.has(Me.pr)),at=($e||[]).filter(Me=>Me.c===e&&He.has(Me.w)&&L.has(Me.pr)),ct=(ke||[]).filter(Me=>Me.c===e&&He.has(Me.w)&&L.has(Me.pr)),rr=(Ve||[]).filter(Me=>Me.c===e&&He.has(Me.w)&&L.has(Me.pr)),gr=(Ne||[]).filter(Me=>Me.c===e&&He.has(Me.w)&&L.has(Me.pr)&&(Number(Me.total_qty)||0)>0),sr=(rt||[]).filter(Me=>Me.c===e&&He.has(Me.w)&&L.has(Me.pr)),nr=kt.reduce((Me,et)=>Me+(Number(et.s)||0),0),Ii=kt.reduce((Me,et)=>Me+(Number(et.p)||0),0),qn=kt.reduce((Me,et)=>Me+(Number(et.rt)||0),0),fa=kt.reduce((Me,et)=>Me+(Number(et.inj)||0),0),So=at.reduce((Me,et)=>Me+(Number(et.coll)||0),0),Ri=ct.reduce((Me,et)=>Me+(Number(et.t)||0),0),Xn=rr.reduce((Me,et)=>Me+(Number(et.h)||0),0),yi=rr.filter(Me=>Number(Me.ur)>0),ul=yi.length>0?yi.reduce((Me,et)=>Me+(Number(et.ur)||0),0)/yi.length:null,lu=gr.reduce((Me,et)=>Me+(Number(et.total_qty)||0),0),su=gr.reduce((Me,et)=>Me+(Number(et.n)||0),0),xe=su>0?lu/su:null,ze=sr.filter(Me=>Me.sf!=null&&Number(Me.sf)>0),Ye=ze.length>0?ze.reduce((Me,et)=>Me+(Number(et.sf)||0),0)/ze.length:null,ft=He.size||1;return{rev:nr,pt:Ii,rt:qn,inj:fa,coll:So,revPerPt:Ii>0?nr/Ii:null,retailPct:nr>0?qn/nr*100:null,injPct:nr>0?fa/nr*100:null,collPct:nr>0?So/nr*100:null,cancelRate:Ri>0?ct.reduce((Me,et)=>Me+(Number(et.cn)||0)*(Number(et.t)||0),0)/Ri:null,noshowRate:Ri>0?ct.reduce((Me,et)=>Me+(Number(et.ns)||0)*(Number(et.t)||0),0)/Ri:null,util:ul,avgPt:Ii/ft,avgBtxUnits:xe,avgSyrFiller:Ye,revPerHour:Xn>0?nr/Xn:null,collPerHour:Xn>0?So/Xn:null,avgHoursPerWeek:Xn/ft}},ll=new Set([...(m||[]).filter(L=>L.c===e&&He.has(L.w)).map(L=>L.pr),...(f||[]).filter(L=>L.c===e&&He.has(L.w)).map(L=>L.pr),...(c||[]).filter(L=>L.c===e&&He.has(L.w)).map(L=>L.pr),...(d||[]).filter(L=>L.c===e&&He.has(L.w)).map(L=>L.pr),...(u||[]).filter(L=>L.c===e&&He.has(L.w)).map(L=>L.pr)].filter(Boolean)),wo=!H||H.size===0||H.size>=ll.size,sv=!X||X.size===0||X.size>=ll.size,ht=wo?null:Mi(H,m,d,v,b,f,c),vi=sv?null:Mi(X,m,d,v,b,f,c),{cards:iu,allProviderNames:ou}=(()=>{const L=(u||[]).filter(xe=>xe.c===e&&He.has(xe.w)),$e=[...new Set([...L.map(xe=>xe.pr),...(f||[]).filter(xe=>xe.c===e&&He.has(xe.w)).map(xe=>xe.pr),...(c||[]).filter(xe=>xe.c===e&&He.has(xe.w)).map(xe=>xe.pr),...(d||[]).filter(xe=>xe.c===e&&He.has(xe.w)).map(xe=>xe.pr)].filter(Boolean))];if(!$e.length)return{cards:[],allProviderNames:[]};const ke=u.filter(xe=>Ae.includes(xe.c)&&He.has(xe.w)),Ve=[...new Set(ke.map(xe=>xe.pr))],Ne=Ve.length>0?Ve.map(xe=>ke.filter(ze=>ze.pr===xe).reduce((ze,Ye)=>ze+(Number(Ye.r)||0),0)).reduce((xe,ze)=>xe+ze,0)/Ve.length:null,rt=(f||[]).filter(xe=>Ae.includes(xe.c)&&He.has(xe.w)&&(Number(xe.total_qty)||0)>0),at=[...new Set(rt.map(xe=>xe.pr))].length>0?(()=>{const xe=rt.reduce((Ye,ft)=>Ye+(Number(ft.total_qty)||0),0),ze=rt.reduce((Ye,ft)=>Ye+(Number(ft.n)||0),0);return ze>0?xe/ze:null})():null,ct=(c||[]).filter(xe=>Ae.includes(xe.c)&&He.has(xe.w)),rr=[...new Set(ct.map(xe=>xe.pr))],gr=rr.length>0?(()=>{const xe=rr.map(ze=>{const Ye=ct.filter(ft=>ft.pr===ze&&ft.si!=null&&Number(ft.si)>0);return Ye.length?Ye.reduce((ft,Me)=>ft+(Number(Me.si)||0),0)/Ye.length:null}).filter(ze=>ze!=null);return xe.length?xe.reduce((ze,Ye)=>ze+Ye,0)/xe.length:null})():null,sr=rr.length>0?(()=>{const xe=rr.map(ze=>{const Ye=ct.filter(ft=>ft.pr===ze&&ft.sf!=null&&Number(ft.sf)>0);return Ye.length?Ye.reduce((ft,Me)=>ft+(Number(Me.sf)||0),0)/Ye.length:null}).filter(ze=>ze!=null);return xe.length?xe.reduce((ze,Ye)=>ze+Ye,0)/xe.length:null})():null,nr=(d||[]).filter(xe=>Ae.includes(xe.c)&&He.has(xe.w)),qn=[...new Set(nr.map(xe=>xe.pr))].length>0?(()=>{const xe=nr.reduce((Ye,ft)=>Ye+(Number(ft.rev)||0),0),ze=nr.reduce((Ye,ft)=>Ye+(Number(ft.coll)||0),0);return xe>0?ze/xe*100:null})():null,fa=(m||[]).filter(xe=>Ae.includes(xe.c)&&He.has(xe.w)),So=[...new Set(fa.map(xe=>xe.pr))],Ri=So.length>0?(()=>{const xe=So.map(ze=>{const Ye=fa.filter(et=>et.pr===ze),ft=Ye.reduce((et,mr)=>et+(Number(mr.s)||0),0),Me=Ye.reduce((et,mr)=>et+(Number(mr.p)||0),0);return Me>0?ft/Me:null}).filter(ze=>ze!=null);return xe.length?xe.reduce((ze,Ye)=>ze+Ye,0)/xe.length:null})():null,Xn=(b||[]).filter(xe=>Ae.includes(xe.c)&&He.has(xe.w)),yi=[...new Set(Xn.map(xe=>xe.pr))],ul=yi.length>0?(()=>{const xe=yi.map(ze=>{const Ye=Xn.filter(ft=>ft.pr===ze&&Number(ft.ur)>0);return Ye.length?Ye.reduce((ft,Me)=>ft+(Number(Me.ur)||0),0)/Ye.length:null}).filter(ze=>ze!=null);return xe.length?xe.reduce((ze,Ye)=>ze+Ye,0)/xe.length:null})():null,lu=yi.length>0?(()=>{const xe=yi.map(ze=>{const Ye=Xn.filter(mr=>mr.pr===ze),Me=nr.filter(mr=>mr.pr===ze).reduce((mr,Po)=>mr+(Number(Po.rev)||0),0),et=Ye.reduce((mr,Po)=>mr+(Number(Po.h)||0),0);return et>0?Me/et:null}).filter(ze=>ze!=null);return xe.length?xe.reduce((ze,Ye)=>ze+Ye,0)/xe.length:null})():null;return{cards:$e.map(xe=>{var $f;const Ye=L.filter(Fe=>Fe.pr===xe).reduce((Fe,Vt)=>Fe+(Number(Vt.r)||0),0),ft=(f||[]).filter(Fe=>Fe.c===e&&Fe.pr===xe&&He.has(Fe.w)&&(Number(Fe.total_qty)||0)>0),Me=ft.reduce((Fe,Vt)=>Fe+(Number(Vt.total_qty)||0),0),et=ft.reduce((Fe,Vt)=>Fe+(Number(Vt.n)||0),0),mr=et>0?Me/et:null,Po=(c||[]).filter(Fe=>Fe.c===e&&Fe.pr===xe&&He.has(Fe.w)),cl=Po.filter(Fe=>Fe.si!=null&&Number(Fe.si)>0),uu=Po.filter(Fe=>Fe.sf!=null&&Number(Fe.sf)>0),fl=cl.length?cl.reduce((Fe,Vt)=>Fe+(Number(Vt.si)||0),0)/cl.length:null,da=uu.length?uu.reduce((Fe,Vt)=>Fe+(Number(Vt.sf)||0),0)/uu.length:null,Sf=(d||[]).filter(Fe=>Fe.c===e&&Fe.pr===xe&&He.has(Fe.w)),dl=Sf.reduce((Fe,Vt)=>Fe+(Number(Vt.rev)||0),0),Pf=Sf.reduce((Fe,Vt)=>Fe+(Number(Vt.coll)||0),0),pl=dl>0?Pf/dl*100:null,Of=(m||[]).filter(Fe=>Fe.c===e&&Fe.pr===xe&&He.has(Fe.w)).reduce((Fe,Vt)=>Fe+(Number(Vt.p)||0),0),uv=Of>0?dl/Of:null,jf=(b||[]).filter(Fe=>Fe.c===e&&Fe.pr===xe&&He.has(Fe.w)),Af=jf.filter(Fe=>Number(Fe.ur)>0),Bb=Af.length>0?Af.reduce((Fe,Vt)=>Fe+(Number(Vt.ur)||0),0)/Af.length:null,_f=jf.reduce((Fe,Vt)=>Fe+(Number(Vt.h)||0),0),cv=_f>0?dl/_f:null,Di=[];mr!=null&&at!=null&&mrVt.gap-Fe.gap);const Tf=(($f=Di[0])==null?void 0:$f.metric)||null;return{name:xe,injRev:Ye,avgBtx:mr,avgSyrInj:fl,avgSyrFiller:da,collPct:pl,avgRevPerPt:uv,provUtil:Bb,provRevPerHour:cv,peerAvgInjRev:Ne,peerAvgBtx:at,peerAvgSyrInj:gr,peerAvgSyrFiller:sr,peerAvgCollPct:qn,peerAvgRevPerPt:Ri,peerAvgUtil:ul,peerAvgRevPerHour:lu,recommendation:Tf?{btx:"Consider full-face assessment protocols to increase neurotoxin dosing.",syrInj:"Review injectable treatment plans -- opportunity to increase volume per appointment.",syrFiller:"Review filler treatment plans -- opportunity to increase volume per appointment.",coll:"Focus on point-of-sale collection and reducing outstanding balances.",injRev:"Schedule injectable-focused training and increase consultation-to-treatment conversion."}[Tf]:null}}).sort((xe,ze)=>ze.injRev-xe.injRev),allProviderNames:$e}})(),Yn=[],be=[];yr!=null&&(yr>=7.5?Yn.push("Retail %"):be.push("Retail %")),Yr!=null&&(Yr>=40?Yn.push("Botox Units"):be.push("Botox Units")),On!=null&&(On<=5?Yn.push("Cancellation Rate"):be.push("Cancellation Rate")),an!=null&&(an>=70?Yn.push("Utilization"):be.push("Utilization"));const Ct=[];if(On!=null&&On>5){const L=tr(i,e,"t")||0,q=On-5,$e=Math.round(L*q/100),ke=Cr>0?Er/Cr:0,Ve=$e*ke/4;Ct.push({title:"Confirmation Protocol Improvement",description:`Cancellation rate at ${On.toFixed(1)}% exceeds the 5% goal (~${$e} excess cancellations/week, ~$${Math.round(Ve).toLocaleString()}/week revenue impact). Implement 48-hour and 24-hour confirmation touchpoints via text and phone.`,priority:"CRITICAL",quickWin:!0})}if(Hn!=null&&Hn>5){const L=tr(i,e,"t")||0,q=Hn-5,$e=Math.round(L*q/100),ke=Cr>0?Er/Cr:0,Ve=$e*ke/4;Ct.push({title:"No-Show Reduction",description:`No-show rate at ${Hn.toFixed(1)}% (~${$e} excess no-shows/week, ~$${Math.round(Ve).toLocaleString()}/week). Activate automated SMS reminders at 72h, 24h, and 2h before appointments.`,priority:Hn>10?"CRITICAL":"IMPORTANT",quickWin:!0})}if(yr!=null&&yr<7.5){const L=7.5-yr,q=Er/4*(L/100);Ct.push({title:"Retail Strategy Enhancement",description:`Retail at ${yr.toFixed(1)}% vs 7.5% goal (~$${Math.round(q).toLocaleString()}/week gap). Introduce product bundling with service packages and ensure all providers recommend post-treatment products at checkout.`,priority:L>3?"CRITICAL":"IMPORTANT"})}const sl=iu.filter(L=>L.avgBtx!=null&&L.peerAvgBtx!=null&&L.avgBtx$e.name),q=L.length>0?` Focus training on ${L.join(", ")}.`:"";Ct.push({title:"Neurotoxin Dosing Training",description:`Avg Botox units at ${Yr.toFixed(1)} vs 40-unit goal. Schedule provider education on full-face treatment protocols.${q}`,priority:40-Yr>10?"CRITICAL":"IMPORTANT"})}if(an!=null&&an<70){const L=70-an,q=ca!=null?` (currently ${ca.toFixed(0)} net hrs/week)`:"";Ct.push({title:"Schedule Optimization",description:`Utilization at ${an.toFixed(1)}% vs 70% target${q}. Review provider scheduling templates to minimize gaps. ${an<55?"Consider reducing blockout hours and maximizing appointment density during peak times.":"Offer last-minute booking promotions for open slots."}`,priority:L>15?"CRITICAL":"IMPORTANT"})}if(zr!=null&&Pn!=null&&zr$e.collPct!=null&&$e.peerAvgCollPct!=null&&$e.collPct<$e.peerAvgCollPct).slice(0,2).map($e=>$e.name).join(", ");Ct.push({title:"Collections Follow-Up Process",description:`Collections at ${zr.toFixed(1)}% vs peer avg ${Pn.toFixed(1)}%.${q?` Key providers: ${q}.`:""} Audit outstanding balances weekly and implement payment plans for larger invoices.`,priority:Pn-zr>5?"CRITICAL":"IMPORTANT"})}pi!=null&&Pr!=null&&pi.15?"CRITICAL":"OPTIMIZE"}),mo!=null&&al!=null&&mo5&&Ct.push({title:"Injectable Service Promotion",description:`Injectables at ${Gr.toFixed(1)}% vs peer avg ${xn.toFixed(1)}%. Run targeted injectable promotions and ensure consultations include injectable assessments.`,priority:"OPTIMIZE"});const au={CRITICAL:0,IMPORTANT:1,OPTIMIZE:2};Ct.sort((L,q)=>au[L.priority]-au[q.priority]);const xf=Ct.filter(L=>L.quickWin),wf=Ct.filter(L=>!L.quickWin).slice(0,6);return{locType:je,peers:Ae,periodLabel:Ce,locRev:Er,locColl:el,locRevBudget:wn,locCollBudget:Ks,fullMonthRevBudget:vf,fullMonthCollBudget:Un,locRevPerPt:pi,locRetailPct:yr,locUtil:an,locCancelRate:On,locNoshowRate:Hn,kpis:[{name:"Revenue",value:ht?ht.rev:Er,peerAvg:lr,goal:ht?null:wn||null,format:"dollar",higherBetter:!0,trend:ki},{name:"Collections",value:ht?ht.coll:el,peerAvg:tl,goal:ht?null:Ks||null,format:"dollar",higherBetter:!0,trend:null},{name:"Avg Revenue Per Patient",value:ht?ht.revPerPt:pi,peerAvg:Pr,goal:500,format:"dollar",higherBetter:!0,trend:Zs},{name:"Retail % of Sales",value:ht?ht.retailPct:yr,peerAvg:Wn,goal:7.5,format:"pct",higherBetter:!0,trend:Js},{name:"Injectables % of Sales",value:ht?ht.injPct:Gr,peerAvg:xn,goal:null,format:"pct",higherBetter:!0,trend:Vn},{name:"Collections % of Revenue",value:ht?ht.collPct:zr,peerAvg:Pn,goal:null,format:"pct",higherBetter:!0,trend:mf},{name:"Avg Botox Units",value:ht?ht.avgBtxUnits:Yr,peerAvg:co,goal:40,format:"num",higherBetter:!0,trend:ho},{name:"Avg Syringes / Filler Appt",value:ht?ht.avgSyrFiller:gf,peerAvg:Xs,goal:null,format:"num1",higherBetter:!0,trend:eu},{name:"Cancellation Rate",value:ht?ht.cancelRate:On,peerAvg:Qs,goal:5,format:"pct",higherBetter:!1,trend:vo},{name:"No-Show Rate",value:ht?ht.noshowRate:Hn,peerAvg:fo,goal:5,format:"pct",higherBetter:!1,trend:bf},{name:"Utilization Rate",value:ht?ht.util:an,peerAvg:rl,goal:70,format:"pct",higherBetter:!0,trend:yo},{name:"Avg Weekly Patients",value:ht?ht.avgPt:nl,peerAvg:il,goal:null,format:"num",higherBetter:!0,trend:tu}],revTrend:ki,ptTrend:ru,improved:Yn,declined:be,efficiency:{revPerHour:vi?vi.revPerHour:mo,peerRevPerHour:al,collPerHour:vi?vi.collPerHour:bo,peerCollPerHour:xo,avgHoursPerWeek:vi?vi.avgHoursPerWeek:ca,peerAvgHoursPerWeek:nu,utilRate:vi?vi.util:an,peerUtilRate:rl},providerCards:iu,allProviderNames:ou,quickWins:xf,recommendations:wf}},[e,t,r,n,i,o,a,l,s,u,f,c,d,p,m,v,b,H,X,P]);if(!ae)return null;const pe=(ae.allProviderNames||[]).slice().sort().join("|");_.useEffect(()=>{j(null),B(null),ee(null)},[pe]),_.useEffect(()=>{const V=je=>{K.current&&!K.current.contains(je.target)&&R(!1),Z.current&&!Z.current.contains(je.target)&&ne(!1),ue.current&&!ue.current.contains(je.target)&&te(!1)};return document.addEventListener("mousedown",V),()=>document.removeEventListener("mousedown",V)},[]);const Ee=(V,je)=>{if(V==null)return"--";switch(je){case"dollar":return`$${Math.round(V).toLocaleString()}`;case"pct":return`${V.toFixed(1)}%`;case"num":return Math.round(V).toLocaleString();case"num1":return V.toFixed(1);default:return String(V)}},it=(V,je)=>{if(V==null)return{arrow:"--",color:T.gray};const Ae=je?V:-V;return Ae>5?{arrow:"↑",color:T.green}:Ae>1?{arrow:"↗",color:T.green}:Ae>-1?{arrow:"→",color:T.gray}:Ae>-5?{arrow:"↘",color:T.red}:{arrow:"↓",color:T.red}},ot=(V,je,Ae,Be)=>{if(V==null)return{color:T.gray,label:"N/A"};const Ie=je??Ae;return Ie==null?{color:T.gray,label:"--"}:Be?V>=Ie?{color:T.green,label:"On Track"}:V>=Ie*.9?{color:T.gold,label:"Near Goal"}:{color:T.red,label:"Below"}:V<=Ie?{color:T.green,label:"On Track"}:V<=Ie*1.1?{color:T.gold,label:"Near Goal"}:{color:T.red,label:"Below"}},jt=V=>V>2?T.green:V<-2?T.red:T.gray,pt=V=>V>2?"trending up":V<-2?"trending down":"flat",er=new Date().toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"}),Te={CRITICAL:T.red,IMPORTANT:T.gold,OPTIMIZE:T.gray},Ke=({label:V,sectionKey:je,title:Ae})=>h.jsxs("button",{onClick:()=>x(je),style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 0",background:"none",border:"none",cursor:"pointer",borderBottom:`1px solid ${T.taupe}`,marginBottom:y[je]?14:0},children:[h.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[h.jsx("span",{style:{fontSize:10,fontWeight:700,color:T.gold,letterSpacing:1.5,textTransform:"uppercase",fontFamily:me.body},children:V}),h.jsx("span",{style:{fontSize:13,fontFamily:me.body,fontWeight:600,color:T.navy},children:Ae})]}),h.jsx("span",{style:{color:T.gray,fontSize:12,transition:"transform 0.2s",transform:y[je]?"rotate(180deg)":"rotate(0deg)"},children:"▼"})]}),he=({open:V,setOpen:je,selected:Ae,setSelected:Be,allNames:Ie,dropRef:ce})=>{const Et=Ae===null||Ae.size===Ie.length,_e=Ae===null?Ie.length:Ae.size,wt=Et?"All Providers":`${_e} of ${Ie.length} Providers`,Ce=We=>{Be(Dt=>{const He=Dt===null?new Set(Ie):new Set(Dt);return He.has(We)?He.delete(We):He.add(We),new Set(He)})};return h.jsxs("div",{ref:ce,style:{position:"relative",flexShrink:0,marginLeft:12},onClick:We=>We.stopPropagation(),children:[h.jsxs("button",{onClick:()=>je(We=>!We),style:{display:"flex",alignItems:"center",gap:6,padding:"5px 10px",border:`1px solid ${T.taupe}`,borderRadius:5,background:T.white,cursor:"pointer",fontSize:11,fontFamily:me.body,color:T.navy,whiteSpace:"nowrap"},children:[wt,h.jsx("span",{style:{fontSize:9,color:T.gray,display:"inline-block",transform:V?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s"},children:"▼"})]}),V&&h.jsxs("div",{style:{position:"absolute",right:0,top:"calc(100% + 4px)",zIndex:200,background:T.white,border:`1px solid ${T.taupe}`,borderRadius:6,boxShadow:"0 4px 12px rgba(4,30,66,0.15)",minWidth:210,maxHeight:280,overflowY:"auto"},children:[h.jsxs("div",{style:{padding:"7px 12px",borderBottom:`1px solid ${T.taupe}`,display:"flex",gap:10,alignItems:"center"},children:[h.jsx("button",{onClick:()=>Be(null),style:{fontSize:11,fontFamily:me.body,color:T.navy,background:"none",border:"none",cursor:"pointer",padding:0,fontWeight:700},children:"Select All"}),h.jsx("span",{style:{color:T.taupe},children:"|"}),h.jsx("button",{onClick:()=>Be(new Set),style:{fontSize:11,fontFamily:me.body,color:T.gray,background:"none",border:"none",cursor:"pointer",padding:0},children:"Deselect All"})]}),Ie.map(We=>{const Dt=Ae===null||Ae.has(We);return h.jsxs("label",{style:{display:"flex",alignItems:"center",gap:8,padding:"7px 12px",cursor:"pointer",fontSize:12,fontFamily:me.body,color:T.dark,borderBottom:`1px solid ${T.light}`},children:[h.jsx("input",{type:"checkbox",checked:Dt,onChange:()=>Ce(We),style:{accentColor:T.navy,cursor:"pointer",width:14,height:14}}),We]},We)})]})]})},Q=({locValue:V,peerValue:je,format:Ae,label:Be,higherBetter:Ie})=>{if(V==null&&je==null)return null;const ce=Math.max(V||0,je||0)*1.15||1,Et=(V||0)/ce*100,_e=(je||0)/ce*100,wt=Ie?(V||0)>=(je||0):(V||0)<=(je||0);return h.jsxs("div",{style:{marginBottom:14},children:[h.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:4},children:[h.jsx("span",{style:{fontSize:11,fontFamily:me.body,fontWeight:600,color:T.dark},children:Be}),h.jsxs("span",{style:{fontSize:11,fontFamily:me.body,color:T.gray},children:[Ee(V,Ae)," vs ",Ee(je,Ae)," peer"]})]}),h.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:3},children:[h.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[h.jsx("span",{style:{fontSize:9,fontFamily:me.body,color:T.gray,width:32},children:"You"}),h.jsx("div",{style:{flex:1,height:10,background:T.light,borderRadius:5,overflow:"hidden"},children:h.jsx("div",{style:{width:`${Et}%`,height:"100%",background:wt?T.green:T.red,borderRadius:5,transition:"width 0.4s"}})})]}),h.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[h.jsx("span",{style:{fontSize:9,fontFamily:me.body,color:T.gray,width:32},children:"Peer"}),h.jsx("div",{style:{flex:1,height:10,background:T.light,borderRadius:5,overflow:"hidden"},children:h.jsx("div",{style:{width:`${_e}%`,height:"100%",background:T.goldLight,borderRadius:5,transition:"width 0.4s"}})})]})]})]})};return h.jsxs("div",{style:{background:T.white,borderRadius:10,border:`1px solid ${T.taupe}`,marginBottom:32,overflow:"hidden"},children:[h.jsxs("div",{style:{padding:"16px 24px",background:T.navy,display:"flex",alignItems:"center",justifyContent:"space-between"},children:[h.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[h.jsx("span",{style:{fontFamily:me.heading,fontSize:18,color:T.gold,letterSpacing:1},children:"Location Performance Report"}),h.jsx("span",{style:{fontSize:10,fontFamily:me.body,fontWeight:700,color:T.navy,background:T.gold,padding:"3px 10px",borderRadius:12,letterSpacing:.5,textTransform:"uppercase"},children:ae.locType})]}),h.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[h.jsx("span",{style:{fontSize:10,fontFamily:me.body,color:"rgba(255,255,255,0.55)",letterSpacing:.8,textTransform:"uppercase"},children:"Period"}),[["YESTERDAY","Yesterday"],["MTD","MTD"],["QTD","QTD"],["YTD","YTD"],["L30","Last 30"],["L60","Last 60"]].map(([V,je])=>h.jsx("button",{onClick:()=>w(V),style:{fontSize:11,fontFamily:me.body,fontWeight:700,padding:"4px 12px",borderRadius:20,cursor:"pointer",border:P===V?"none":"1px solid rgba(255,255,255,0.3)",background:P===V?T.gold:"transparent",color:P===V?T.navy:"rgba(255,255,255,0.75)",letterSpacing:.5,transition:"all 0.15s",whiteSpace:"nowrap"},children:je},V))]})]}),h.jsxs("div",{style:{padding:"24px 28px 28px"},children:[h.jsx("div",{style:{marginBottom:24},children:h.jsxs("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",flexWrap:"wrap",gap:16,marginBottom:8},children:[h.jsxs("div",{children:[h.jsx("h2",{style:{fontFamily:me.heading,fontSize:28,fontWeight:400,color:T.navy,margin:"0 0 4px"},children:e}),h.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,flexWrap:"wrap"},children:[h.jsxs("span",{style:{fontSize:12,fontFamily:me.body,color:T.gray},children:["Period: ",ae.periodLabel]}),h.jsxs("span",{style:{fontSize:11,fontFamily:me.body,color:T.blush,fontStyle:"italic"},children:["Generated ",er]})]})]}),h.jsx("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:(()=>{const V=ae,je=(V.locCancelRate!=null?V.locCancelRate:0)+(V.locNoshowRate!=null?V.locNoshowRate:0),Ae=V.locCancelRate==null&&V.locNoshowRate==null,Be=P==="MTD";return[{label:"Sales",value:V.locRev!=null?`$${Math.round(V.locRev).toLocaleString()}`:"--",goal:V.locRevBudget>0?`Goal $${Math.round(V.locRevBudget).toLocaleString()}`:null,above:V.locRevBudget>0?V.locRev>=V.locRevBudget:null,fullMonthGoal:Be&&V.fullMonthRevBudget>0?`Total Month $${Math.round(V.fullMonthRevBudget).toLocaleString()}`:null},{label:"Collections",value:V.locColl!=null?`$${Math.round(V.locColl).toLocaleString()}`:"--",goal:V.locCollBudget>0?`Goal $${Math.round(V.locCollBudget).toLocaleString()}`:null,above:V.locCollBudget>0?V.locColl>=V.locCollBudget:null,fullMonthGoal:Be&&V.fullMonthCollBudget>0?`Total Month $${Math.round(V.fullMonthCollBudget).toLocaleString()}`:null},{label:"Rev / Patient",value:V.locRevPerPt!=null?`$${Math.round(V.locRevPerPt).toLocaleString()}`:"--",goal:"Goal $500",above:V.locRevPerPt!=null?V.locRevPerPt>=500:null},{label:"Utilization",value:V.locUtil!=null?`${V.locUtil.toFixed(1)}%`:"--",goal:"Goal 70%",above:V.locUtil!=null?V.locUtil>=70:null},{label:"Cancel + NS",value:Ae?"--":`${je.toFixed(1)}%`,goal:"Goal <5%",above:Ae?null:je<5},{label:"Retail %",value:V.locRetailPct!=null?`${V.locRetailPct.toFixed(1)}%`:"--",goal:"Goal 7.5%",above:V.locRetailPct!=null?V.locRetailPct>=7.5:null}].map(ce=>h.jsxs("div",{style:{background:T.navy,borderRadius:8,padding:"10px 14px",minWidth:90,textAlign:"center",display:"flex",flexDirection:"column",gap:3},children:[h.jsx("div",{style:{fontSize:9,fontFamily:me.body,fontWeight:700,letterSpacing:1.2,textTransform:"uppercase",color:"rgba(185,151,91,0.85)"},children:ce.label}),h.jsx("div",{style:{fontFamily:me.heading,fontSize:17,color:T.white,lineHeight:1.2},children:ce.value}),ce.goal&&h.jsx("div",{style:{fontSize:10,fontFamily:me.body,fontWeight:600,color:ce.above==null?"rgba(255,255,255,0.45)":ce.above?"#4CAF50":"#EF5350"},children:ce.goal}),ce.fullMonthGoal&&h.jsx("div",{style:{fontSize:9,fontFamily:me.body,fontWeight:600,color:T.gold},children:ce.fullMonthGoal})]},ce.label))})()})]})}),h.jsxs("div",{style:{marginBottom:28},children:[h.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 0",borderBottom:`1px solid ${T.taupe}`,marginBottom:y.kpi?14:0},children:[h.jsxs("button",{onClick:()=>x("kpi"),style:{display:"flex",alignItems:"center",gap:8,flex:1,background:"none",border:"none",cursor:"pointer",textAlign:"left",padding:0},children:[h.jsx("span",{style:{fontSize:10,fontWeight:700,color:T.gold,letterSpacing:1.5,textTransform:"uppercase",fontFamily:me.body},children:"A."}),h.jsx("span",{style:{fontSize:13,fontFamily:me.body,fontWeight:600,color:T.navy},children:"KPI Scorecard"}),H!==null&&H.size<(ae.allProviderNames||[]).length&&h.jsxs("span",{style:{fontSize:9,fontFamily:me.body,color:T.gold,background:T.navy,padding:"2px 7px",borderRadius:10,marginLeft:4},children:[H.size," provider",H.size!==1?"s":""]}),h.jsx("span",{style:{color:T.gray,fontSize:12,marginLeft:4,transition:"transform 0.2s",display:"inline-block",transform:y.kpi?"rotate(180deg)":"rotate(0deg)"},children:"▼"})]}),h.jsx(he,{open:le,setOpen:ne,selected:H,setSelected:B,allNames:ae.allProviderNames||[],dropRef:Z})]}),y.kpi&&h.jsx("div",{style:{overflowX:"auto"},children:h.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontFamily:me.body,fontSize:12},children:[h.jsx("thead",{children:h.jsx("tr",{style:{borderBottom:`2px solid ${T.navy}`},children:["KPI","Value","Peer Avg","Goal","Status","Trend"].map(V=>h.jsx("th",{style:{padding:"8px 10px",textAlign:"left",fontSize:9,fontWeight:700,color:T.gold,letterSpacing:1.2,textTransform:"uppercase"},children:V},V))})}),h.jsx("tbody",{children:ae.kpis.map((V,je)=>{const Ae=ot(V.value,V.goal,V.peerAvg,V.higherBetter),Be=it(V.trend,V.higherBetter);return h.jsxs("tr",{style:{borderBottom:`1px solid ${T.light}`,background:je%2===0?T.white:T.cream},children:[h.jsx("td",{style:{padding:"10px",fontWeight:600,color:T.navy,fontSize:12},children:V.name}),h.jsx("td",{style:{padding:"10px",fontFamily:me.heading,fontSize:16,color:T.navy},children:Ee(V.value,V.format)}),h.jsx("td",{style:{padding:"10px",color:T.gray},children:Ee(V.peerAvg,V.format)}),h.jsx("td",{style:{padding:"10px",color:T.gray},children:V.goal!=null?`${V.higherBetter?"≥":"≤"}${V.format==="pct"?`${V.goal}%`:V.format==="dollar"?Ee(V.goal,"dollar"):V.goal}`:"--"}),h.jsx("td",{style:{padding:"10px"},children:h.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[h.jsx("span",{style:{width:10,height:10,borderRadius:"50%",background:Ae.color,display:"inline-block",flexShrink:0}}),h.jsx("span",{style:{fontSize:10,color:Ae.color,fontWeight:600},children:Ae.label})]})}),h.jsx("td",{style:{padding:"10px"},children:h.jsx("span",{style:{fontSize:16,color:Be.color,fontWeight:700},children:Be.arrow})})]},V.name)})})]})})]}),h.jsxs("div",{style:{marginBottom:28},children:[h.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 0",borderBottom:`1px solid ${T.taupe}`,marginBottom:y.efficiency?14:0},children:[h.jsxs("button",{onClick:()=>x("efficiency"),style:{display:"flex",alignItems:"center",gap:8,flex:1,background:"none",border:"none",cursor:"pointer",textAlign:"left",padding:0},children:[h.jsx("span",{style:{fontSize:10,fontWeight:700,color:T.gold,letterSpacing:1.5,textTransform:"uppercase",fontFamily:me.body},children:"B."}),h.jsx("span",{style:{fontSize:13,fontFamily:me.body,fontWeight:600,color:T.navy},children:"Revenue & Efficiency Analysis"}),X!==null&&X.size<(ae.allProviderNames||[]).length&&h.jsxs("span",{style:{fontSize:9,fontFamily:me.body,color:T.gold,background:T.navy,padding:"2px 7px",borderRadius:10,marginLeft:4},children:[X.size," provider",X.size!==1?"s":""]}),h.jsx("span",{style:{color:T.gray,fontSize:12,marginLeft:4,transition:"transform 0.2s",display:"inline-block",transform:y.efficiency?"rotate(180deg)":"rotate(0deg)"},children:"▼"})]}),h.jsx(he,{open:U,setOpen:te,selected:X,setSelected:ee,allNames:ae.allProviderNames||[],dropRef:ue})]}),y.efficiency&&h.jsxs("div",{style:{background:T.cream,borderRadius:8,border:`1px solid ${T.taupe}`,padding:"20px 24px"},children:[h.jsx(Q,{locValue:ae.efficiency.revPerHour,peerValue:ae.efficiency.peerRevPerHour,format:"dollar",label:"Revenue Per Net Provider Hour",higherBetter:!0}),h.jsx(Q,{locValue:ae.efficiency.collPerHour,peerValue:ae.efficiency.peerCollPerHour,format:"dollar",label:"Collections Per Net Provider Hour",higherBetter:!0}),h.jsx(Q,{locValue:ae.efficiency.avgHoursPerWeek,peerValue:ae.efficiency.peerAvgHoursPerWeek,format:"num",label:"Avg Net Provider Hours/Week",higherBetter:!0}),h.jsx(Q,{locValue:ae.efficiency.utilRate,peerValue:ae.efficiency.peerUtilRate,format:"pct",label:"Utilization Rate",higherBetter:!0}),ae.efficiency.revPerHour!=null&&ae.efficiency.peerRevPerHour!=null&&ae.efficiency.revPerHour0&&h.jsxs("div",{style:{marginBottom:28},children:[h.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 0",borderBottom:`1px solid ${T.taupe}`,marginBottom:y.providers?14:0},children:[h.jsxs("button",{onClick:()=>x("providers"),style:{display:"flex",alignItems:"center",gap:8,flex:1,background:"none",border:"none",cursor:"pointer",textAlign:"left",padding:0},children:[h.jsx("span",{style:{fontSize:10,fontWeight:700,color:T.gold,letterSpacing:1.5,textTransform:"uppercase",fontFamily:me.body},children:"C."}),h.jsx("span",{style:{fontSize:13,fontFamily:me.body,fontWeight:600,color:T.navy},children:"Provider Performance"}),h.jsx("span",{style:{color:T.gray,fontSize:12,marginLeft:4,transition:"transform 0.2s",display:"inline-block",transform:y.providers?"rotate(180deg)":"rotate(0deg)"},children:"▼"})]}),(()=>{const V=ae.allProviderNames||[],je=S===null||S.size===V.length,Ae=S===null?V.length:S.size,Be=je?"All Providers":`${Ae} of ${V.length} Providers`,Ie=ce=>{j(Et=>{const _e=Et===null?new Set(V):new Set(Et);return _e.has(ce)?_e.delete(ce):_e.add(ce),new Set(_e)})};return h.jsxs("div",{ref:K,style:{position:"relative",flexShrink:0,marginLeft:12},onClick:ce=>ce.stopPropagation(),children:[h.jsxs("button",{onClick:()=>R(ce=>!ce),style:{display:"flex",alignItems:"center",gap:6,padding:"5px 10px",border:`1px solid ${T.taupe}`,borderRadius:5,background:T.white,cursor:"pointer",fontSize:11,fontFamily:me.body,color:T.navy,whiteSpace:"nowrap"},children:[Be,h.jsx("span",{style:{fontSize:9,color:T.gray,display:"inline-block",transform:E?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s"},children:"▼"})]}),E&&h.jsxs("div",{style:{position:"absolute",right:0,top:"calc(100% + 4px)",zIndex:200,background:T.white,border:`1px solid ${T.taupe}`,borderRadius:6,boxShadow:"0 4px 12px rgba(4,30,66,0.15)",minWidth:210,maxHeight:280,overflowY:"auto"},children:[h.jsxs("div",{style:{padding:"7px 12px",borderBottom:`1px solid ${T.taupe}`,display:"flex",gap:10,alignItems:"center"},children:[h.jsx("button",{onClick:()=>j(null),style:{fontSize:11,fontFamily:me.body,color:T.navy,background:"none",border:"none",cursor:"pointer",padding:0,fontWeight:700},children:"Select All"}),h.jsx("span",{style:{color:T.taupe},children:"|"}),h.jsx("button",{onClick:()=>j(new Set),style:{fontSize:11,fontFamily:me.body,color:T.gray,background:"none",border:"none",cursor:"pointer",padding:0},children:"Deselect All"})]}),V.map(ce=>{const Et=S===null||S.has(ce);return h.jsxs("label",{style:{display:"flex",alignItems:"center",gap:8,padding:"7px 12px",cursor:"pointer",fontSize:12,fontFamily:me.body,color:T.dark,borderBottom:`1px solid ${T.light}`},children:[h.jsx("input",{type:"checkbox",checked:Et,onChange:()=>Ie(ce),style:{accentColor:T.navy,cursor:"pointer",width:14,height:14}}),ce]},ce)})]})]})})()]}),y.providers&&h.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:14},children:ae.providerCards.filter(V=>S===null||S.has(V.name)).map(V=>{const je=[{label:"Inj Revenue",value:V.injRev,peerAvg:V.peerAvgInjRev,format:"dollar",higherBetter:!0},{label:"Avg Botox Units",value:V.avgBtx,peerAvg:V.peerAvgBtx,format:"num1",higherBetter:!0},{label:"Avg Syr/Inj Appt",value:V.avgSyrInj,peerAvg:V.peerAvgSyrInj,format:"num1",higherBetter:!0},{label:"Avg Syr/Filler Appt",value:V.avgSyrFiller,peerAvg:V.peerAvgSyrFiller,format:"num1",higherBetter:!0},{label:"Collections %",value:V.collPct,peerAvg:V.peerAvgCollPct,format:"pct",higherBetter:!0},{label:"Avg Rev Per Patient",value:V.avgRevPerPt,peerAvg:V.peerAvgRevPerPt,format:"dollar",higherBetter:!0},{label:"Utilization",value:V.provUtil,peerAvg:V.peerAvgUtil,format:"pct",higherBetter:!0},{label:"Rev Per Net Hr",value:V.provRevPerHour,peerAvg:V.peerAvgRevPerHour,format:"dollar",higherBetter:!0}];return h.jsxs("div",{style:{background:T.cream,borderRadius:8,border:`1px solid ${T.taupe}`,padding:"16px 18px",display:"flex",flexDirection:"column"},children:[h.jsx("div",{style:{fontFamily:me.heading,fontSize:16,color:T.navy,marginBottom:10,borderBottom:`1px solid ${T.taupe}`,paddingBottom:8},children:V.name}),h.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6,flex:1},children:je.map(Ae=>{const Be=Ae.value!=null&&Ae.peerAvg!=null?Ae.higherBetter?Ae.value>=Ae.peerAvg:Ae.value<=Ae.peerAvg:null;return h.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[h.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[h.jsx("span",{style:{width:8,height:8,borderRadius:"50%",flexShrink:0,background:Be==null?T.gray:Be?T.green:T.red,display:"inline-block"}}),h.jsx("span",{style:{fontSize:11,fontFamily:me.body,color:T.dark},children:Ae.label})]}),h.jsx("span",{style:{fontSize:12,fontFamily:me.body,fontWeight:700,color:T.navy},children:Ee(Ae.value,Ae.format)})]},Ae.label)})}),V.recommendation&&h.jsx("div",{style:{marginTop:10,padding:"8px 10px",background:T.white,borderRadius:5,fontSize:11,fontFamily:me.body,color:T.dark,lineHeight:1.5,borderLeft:`3px solid ${T.gold}`},children:V.recommendation})]},V.name)})})]}),(ae.quickWins.length>0||ae.recommendations.length>0)&&h.jsxs("div",{children:[h.jsx(Ke,{label:"D.",sectionKey:"recommendations",title:"Operational Recommendations"}),y.recommendations&&h.jsxs("div",{children:[ae.quickWins.length>0&&h.jsxs("div",{style:{marginBottom:16},children:[h.jsxs("div",{style:{fontSize:10,fontWeight:700,color:T.navy,letterSpacing:1,textTransform:"uppercase",fontFamily:me.body,marginBottom:8,display:"flex",alignItems:"center",gap:6},children:[h.jsx("span",{style:{background:T.green,color:T.white,padding:"2px 8px",borderRadius:10,fontSize:9,letterSpacing:.5},children:"QUICK WINS"}),"Low-Effort, High-Impact"]}),h.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:ae.quickWins.map((V,je)=>h.jsx("div",{style:{background:T.cream,borderRadius:8,border:`1px solid ${T.taupe}`,padding:"12px 18px",display:"flex",gap:14,alignItems:"flex-start",borderLeft:`4px solid ${T.green}`},children:h.jsxs("div",{style:{flex:1},children:[h.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:4},children:[h.jsx("span",{style:{fontFamily:me.body,fontSize:13,fontWeight:700,color:T.navy},children:V.title}),h.jsx("span",{style:{fontSize:9,fontWeight:700,fontFamily:me.body,color:T.white,background:Te[V.priority],padding:"2px 8px",borderRadius:10,letterSpacing:.5,textTransform:"uppercase"},children:V.priority})]}),h.jsx("p",{style:{margin:0,fontSize:12,fontFamily:me.body,color:T.dark,lineHeight:1.6},children:V.description})]})},`qw-${je}`))})]}),h.jsx("div",{style:{display:"flex",flexDirection:"column",gap:10},children:ae.recommendations.map((V,je)=>h.jsxs("div",{style:{background:T.cream,borderRadius:8,border:`1px solid ${T.taupe}`,padding:"14px 20px",display:"flex",gap:16,alignItems:"flex-start"},children:[h.jsx("div",{style:{width:28,height:28,borderRadius:6,background:T.navy,display:"flex",alignItems:"center",justifyContent:"center",fontFamily:me.heading,fontSize:14,color:T.gold,flexShrink:0},children:je+1}),h.jsxs("div",{style:{flex:1},children:[h.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:4},children:[h.jsx("span",{style:{fontFamily:me.body,fontSize:13,fontWeight:700,color:T.navy},children:V.title}),h.jsx("span",{style:{fontSize:9,fontWeight:700,fontFamily:me.body,color:T.white,background:Te[V.priority],padding:"2px 8px",borderRadius:10,letterSpacing:.5,textTransform:"uppercase"},children:V.priority})]}),h.jsx("p",{style:{margin:0,fontSize:12,fontFamily:me.body,color:T.dark,lineHeight:1.6},children:V.description})]})]},je))}),h.jsxs("div",{style:{marginTop:16,background:T.cream,borderRadius:8,border:`1px solid ${T.taupe}`,padding:"14px 18px",fontFamily:me.body,fontSize:12,color:T.dark,lineHeight:1.7},children:[h.jsx("div",{style:{fontSize:9,fontWeight:700,color:T.gold,letterSpacing:1.2,textTransform:"uppercase",marginBottom:6},children:"4-Week Trend Summary"}),h.jsxs("p",{style:{margin:"0 0 4px"},children:[h.jsx("strong",{children:"Revenue"})," is"," ",h.jsx("span",{style:{color:jt(ae.revTrend),fontWeight:600},children:pt(ae.revTrend)})," ","(",ae.revTrend>0?"+":"",ae.revTrend.toFixed(1),"%)."," ",h.jsx("strong",{children:"Patient volume"})," is"," ",h.jsx("span",{style:{color:jt(ae.ptTrend),fontWeight:600},children:pt(ae.ptTrend)})," ","(",ae.ptTrend>0?"+":"",ae.ptTrend.toFixed(1),"%)."]}),ae.improved.length>0&&h.jsxs("p",{style:{margin:"0 0 2px"},children:[h.jsx("span",{style:{color:T.green,fontWeight:600},children:"Meeting goals:"})," ",ae.improved.join(", "),"."]}),ae.declined.length>0&&h.jsxs("p",{style:{margin:0},children:[h.jsx("span",{style:{color:T.red,fontWeight:600},children:"Below goals:"})," ",ae.declined.join(", "),"."]})]})]})]})]})]})}function av({initialLocTypes:e,initialPractices:t,initialLocations:r}){const[n,i]=_.useState([]),[o,a]=_.useState([]),[l,s]=_.useState([]),[u,f]=_.useState([]),[c,d]=_.useState([]),[p,m]=_.useState([]),[v,b]=_.useState([]),[y,g]=_.useState([]),[x,P]=_.useState([]),[w,S]=_.useState([]),[j,E]=_.useState([]),[R,K]=_.useState([]),[H,B]=_.useState([]),[le,ne]=_.useState([]),[Z,X]=_.useState([]),[ee,U]=_.useState([]),[te,ue]=_.useState([]),[ae,pe]=_.useState(!0),[Ee,it]=_.useState(e||[]),[ot,jt]=_.useState(t||[]),[pt,er]=_.useState(r||[]),Te=!!(e!=null&&e.length||t!=null&&t.length||r!=null&&r.length),Ke=_.useRef(!1),he="Total",Q=(r==null?void 0:r.length)===1,[V,je]=_.useState(Q?null:[]),[Ae,Be]=_.useState(Q?null:[]),Ie=Q?r:[he],[ce,Et]=_.useState("weekly"),[_e,wt]=_.useState(12),[Ce,We]=_.useState({}),[Dt,He]=_.useState({section1:!1,section2:!1,section3:!1,section4:!1,appendix:!1}),$r=M=>He(oe=>({...oe,[M]:!oe[M]})),Qe=M=>{const oe=Ce[M];return{mode:(oe==null?void 0:oe.mode)||ce,count:(oe==null?void 0:oe.count)||_e}},[tr,Us]=_.useState(Ie),[Fr,on]=_.useState(Ie),[Br,Er]=_.useState(Ie),[Cr,pi]=_.useState(Ie),[lr,Hs]=_.useState(Ie),[Pr,ff]=_.useState(Ie),[yr,df]=_.useState(Ie),[Wn,pf]=_.useState(Ie),[Gr,hf]=_.useState(Ie),[xn,el]=_.useState(Ie),[zr,Vs]=_.useState(Ie),[wn,Ks]=_.useState(Ie),[Sn,vf]=_.useState(Ie),[Un,tl]=_.useState(Ie),[Pn,Gs]=_.useState(Ie),[so,Ys]=_.useState(Ie),[Yr,yf]=_.useState(Ie),[uo,qs]=_.useState(Ie),[co,gf]=_.useState(Ie),[Xs,On]=_.useState(null),[Qs,Hn]=_.useState(null),[fo,an]=_.useState(Ie),[rl,nl]=_.useState(null),[il,po]=_.useState([]),[Zs,Js]=_.useState(null),[Vn,mf]=_.useState(Ie),[ho,eu]=_.useState(null),[vo,bf]=_.useState(Ie),[yo,tu]=_.useState(null),[sa,ol]=_.useState(null),[ln,go]=_.useState(null),[hi,ua]=_.useState(null),[ki,ru]=_.useState(null),[Kn,mo]=_.useState(null),[bo,ca]=_.useState(null),[Gn,al]=_.useState(null),[xo,nu]=_.useState(null),[Mi,ll]=_.useState(null),[wo,sv]=_.useState(null),[ht,vi]=_.useState(null);_.useEffect(()=>{Promise.all([fetch("/data/performance/locations.json").then(M=>M.json()),fetch("/data/performance/weekly-metrics.json").then(M=>M.json()),fetch("/data/performance/daily-metrics.json").then(M=>M.json()).catch(()=>[]),fetch("/data/performance/weekly-ops.json").then(M=>M.json()),fetch("/data/performance/weekly-btx.json").then(M=>M.json()).catch(()=>[]),fetch("/data/performance/weekly-budget.json").then(M=>M.json()).catch(()=>[]),fetch("/data/performance/weekly-inj-rev-provider.json").then(M=>M.json()).catch(()=>[]),fetch("/data/performance/weekly-btx-provider.json").then(M=>M.json()).catch(()=>[]),fetch("/data/performance/weekly-ntx-filler.json").then(M=>M.json()).catch(()=>[]),fetch("/data/performance/weekly-syringe-loc.json").then(M=>M.json()).catch(()=>[]),fetch("/data/performance/weekly-syringe-provider.json").then(M=>M.json()).catch(()=>[]),fetch("/data/performance/weekly-rev-coll-provider.json").then(M=>M.json()).catch(()=>[]),fetch("/data/performance/weekly-provider-hours.json").then(M=>M.json()).catch(()=>[]),fetch("/data/performance/weekly-utilization.json").then(M=>M.json()).catch(()=>[]),fetch("/data/performance/weekly-metrics-provider.json").then(M=>M.json()).catch(()=>[]),fetch("/data/performance/weekly-ops-provider.json").then(M=>M.json()).catch(()=>[]),fetch("/data/performance/weekly-util-hours-provider.json").then(M=>M.json()).catch(()=>[])]).then(([M,oe,J,ie,ye,Oe,fe,G,Y,z,C,W,A,$,O,k,I])=>{i(M),a(oe),s(J),f(ie),d(ye),m(Oe),b(fe),g(G),P(Y),S(z),E(C),K(W),B(A),ne($),X(O),U(k),ue(I),pe(!1),setTimeout(()=>{Ke.current=!0},100)})},[]);const iu=_.useMemo(()=>{const M=new Set;return n.forEach(oe=>{(oe.types||(oe.type?[oe.type]:[])).forEach(ie=>M.add(ie))}),[...M].sort()},[n]),ou=_.useMemo(()=>{let M=n;return Ee.length&&(M=n.filter(oe=>(oe.types||(oe.type?[oe.type]:[])).some(ie=>Ee.includes(ie)))),[...new Set(M.map(oe=>oe.practice))].sort()},[n,Ee]);_.useEffect(()=>{Te&&!Ke.current||jt(M=>M.filter(oe=>ou.includes(oe)))},[ou]);const Yn=_.useMemo(()=>n.filter(M=>!(Ee.length&&!(M.types||(M.type?[M.type]:[])).some(J=>Ee.includes(J))||ot.length&&!ot.includes(M.practice)||pt.length&&!pt.includes(M.name))),[n,Ee,ot,pt]),be=_.useMemo(()=>Yn.map(M=>M.name),[Yn]),Ct=Ee.length>0||ot.length>0||pt.length>0,sl=[Us,on,Er,pi,Hs,ff,df,pf,hf,el,Vs,tl,Gs,qs,gf,Ks,vf,an,Ys,mf,bf];_.useEffect(()=>{if(Te&&!Ke.current)return;const M=oe=>oe(J=>J.filter(ie=>ie==="Total"||be.includes(ie)));sl.forEach(M),er(oe=>oe.filter(J=>be.includes(J))),Ct?(je(null),Be(null),On(null),Hn(null),nl(null),Js(null),ol(null),eu(null),tu(null),go(null),ua(null),ru(null),mo(null),ca(null),nu(null),ll(null)):(je([]),Be([]),On([]),Hn([]),nl([]),Js(null),ol(null),eu(null),tu(null),go(null),ua(null),ru(null),mo(null),ca(null),nu(null),ll(null))},[be,Ct]);const au=_.useRef([]);_.useEffect(()=>{const M=au.current,oe=pt.filter(ie=>!M.includes(ie)),J=M.filter(ie=>!pt.includes(ie));if(oe.length>0&&sl.forEach(ie=>ie(ye=>[...new Set([...ye,...oe])])),J.length>0){const ie=new Set(J);sl.forEach(ye=>ye(Oe=>Oe.filter(fe=>!ie.has(fe))))}au.current=[...pt]},[pt]),_.useMemo(()=>see(n,u),[n,u]);const xf=_.useMemo(()=>{if(!o.length)return"";const M=[...new Set(o.map(ye=>ye.w))].sort(),oe=M[0],J=M[M.length-1],ie=ye=>`${new Date(ye+"T00:00:00").toLocaleDateString("en-US",{month:"short",day:"numeric"})}`;return`${ie(oe)} – ${ie(J)}, ${new Date(J+"T00:00:00").getFullYear()}`},[o]),wf=_.useMemo(()=>{const M=[];return Ee.length&&M.push(Ee.join(", ")),ot.length&&M.push(ot.join(", ")),M.length?M.join(" · "):"All Locations"},[Ee,ot]),Wt=_.useMemo(()=>{const M=n.map(J=>J.name).sort(),oe={};return M.forEach((J,ie)=>{oe[J]=En[ie%En.length]}),oe},[n]),L=_.useMemo(()=>pt.length>0?pt:be,[be,pt]),q=_.useMemo(()=>{const M=new Set(L),oe=new Set;return v.filter(J=>M.has(J.c)).forEach(J=>oe.add(J.pr)),[...oe].sort()},[v,L]),$e=_.useMemo(()=>{const M=new Set(L),oe=new Set;return y.filter(J=>M.has(J.c)).forEach(J=>oe.add(J.pr)),[...oe].sort()},[y,L]),ke=_.useMemo(()=>{const M=[...new Set([...q,...$e])].sort(),oe={};return M.forEach((J,ie)=>{oe[J]=En[ie%En.length]}),oe},[q,$e]),{revWeekData:Ve,revWeekSeries:Ne,revWeekIsProviderMode:rt}=_.useMemo(()=>{const M=new Set(be);if(Q&&ho&&ho.length>0&&ho.lengthM.has(O.c)&&G.has(O.pr)),z=[...new Set(Y.map(O=>O.w))].sort(),{mode:C,count:W}=Qe("revWeek"),A=nt(z,C,W),$=[...G].sort();if(A.isMonthly){const O=new Date,k=`${O.getFullYear()}-${String(O.getMonth()+1).padStart(2,"0")}`;return{revWeekData:A.periods.map(F=>{const N={week:lt(F,F===k)},ve=Y.filter(re=>re.w.startsWith(F));return $.forEach(re=>{const ge=ve.filter(de=>de.pr===re).reduce((de,Se)=>de+(Se.s||0),0);N[re]=ge||null}),N}),revWeekSeries:$,revWeekIsProviderMode:!0}}else return{revWeekData:A.periods.map(k=>{const I={week:dt(k)},F=Y.filter(N=>N.w===k);return $.forEach(N=>{const ve=F.filter(re=>re.pr===N).reduce((re,ge)=>re+(ge.s||0),0);I[N]=ve||null}),I}),revWeekSeries:$,revWeekIsProviderMode:!0}}const J=o.filter(G=>M.has(G.c)),ie=[...new Set(J.map(G=>G.w))].sort(),{mode:ye,count:Oe}=Qe("revWeek"),fe=nt(ie,ye,Oe);if(fe.isMonthly){const G=new Date,Y=`${G.getFullYear()}-${String(G.getMonth()+1).padStart(2,"0")}`,z=fe.periods.map(W=>{const A=J.filter(k=>k.w.startsWith(W)),$=A.reduce((k,I)=>k+(I.s||0),0),O={week:lt(W,W===Y),Total:$};return Vn.filter(k=>k!=="Total").forEach(k=>{const I=A.filter(F=>F.c===k).reduce((F,N)=>F+(N.s||0),0);O[k]=I||null}),O}),C=Vn.filter(W=>W!=="Total");return{revWeekData:z,revWeekSeries:[...Vn.includes("Total")?["Total"]:[],...C],revWeekIsProviderMode:!1}}else{const Y=fe.periods.map(C=>{const W=J.filter(O=>O.w===C),A=W.reduce((O,k)=>O+(k.s||0),0),$={week:dt(C),Total:A};return Vn.filter(O=>O!=="Total").forEach(O=>{const k=W.find(I=>I.c===O);$[O]=k?k.s||0:null}),$}),z=Vn.filter(C=>C!=="Total");return{revWeekData:Y,revWeekSeries:[...Vn.includes("Total")?["Total"]:[],...z],revWeekIsProviderMode:!1}}},[o,Z,be,Vn,ho,Q,q,ce,_e,Ce]),{avgRevData:kt,avgRevSeries:at,avgRevIsProviderMode:ct}=_.useMemo(()=>{const M=new Set(be);if(Q&&hi&&hi.length>0&&hi.lengthM.has(O.c)&&G.has(O.pr)),z=[...new Set(Y.map(O=>O.w))].sort(),{mode:C,count:W}=Qe("avgRev"),A=nt(z,C,W),$=[...G].sort();if(A.isMonthly){const O=new Date,k=`${O.getFullYear()}-${String(O.getMonth()+1).padStart(2,"0")}`;return{avgRevData:A.periods.map(F=>{const N={week:lt(F,F===k)},ve=Y.filter(re=>re.w.startsWith(F));return $.forEach(re=>{const ge=ve.filter(Le=>Le.pr===re),de=ge.reduce((Le,vt)=>Le+(vt.s||0),0),Se=ge.reduce((Le,vt)=>Le+(vt.p||0),0);Se>0&&(N[re]=+(de/Se).toFixed(2))}),N}),avgRevSeries:$,avgRevIsProviderMode:!0}}else return{avgRevData:A.periods.map(k=>{const I={week:dt(k)},F=Y.filter(N=>N.w===k);return $.forEach(N=>{const ve=F.filter(de=>de.pr===N),re=ve.reduce((de,Se)=>de+(Se.s||0),0),ge=ve.reduce((de,Se)=>de+(Se.p||0),0);ge>0&&(I[N]=+(re/ge).toFixed(2))}),I}),avgRevSeries:$,avgRevIsProviderMode:!0}}const J=o.filter(G=>M.has(G.c)),ie=[...new Set(J.map(G=>G.w))].sort(),{mode:ye,count:Oe}=Qe("avgRev"),fe=nt(ie,ye,Oe);if(fe.isMonthly){const G=fe.periods,Y=new Date,z=`${Y.getFullYear()}-${String(Y.getMonth()+1).padStart(2,"0")}`,C=G.map(A=>{const $=J.filter(F=>F.w.startsWith(A)),O=$.reduce((F,N)=>F+(N.s||0),0),k=$.reduce((F,N)=>F+(N.p||0),0),I={week:lt(A,A===z),Total:k>0?+(O/k).toFixed(2):null};return Br.forEach(F=>{const N=$.filter(ge=>ge.c===F),ve=N.reduce((ge,de)=>ge+(de.s||0),0),re=N.reduce((ge,de)=>ge+(de.p||0),0);re>0&&(I[F]=+(ve/re).toFixed(2))}),I}),W=Br.filter(A=>A!=="Total");return{avgRevData:C,avgRevSeries:[...Br.includes("Total")?["Total"]:[],...W],avgRevIsProviderMode:!1}}else{const Y=fe.periods.map(C=>{const W=J.filter(k=>k.w===C),A=W.reduce((k,I)=>k+(I.s||0),0),$=W.reduce((k,I)=>k+(I.p||0),0),O={week:dt(C),Total:$>0?+(A/$).toFixed(2):null};return Br.forEach(k=>{const I=W.find(F=>F.c===k);I&&I.p>0&&(O[k]=+(I.s/I.p).toFixed(2))}),O}),z=Br.filter(C=>C!=="Total");return{avgRevData:Y,avgRevSeries:[...Br.includes("Total")?["Total"]:[],...z],avgRevIsProviderMode:!1}}},[o,Z,be,Br,hi,Q,q,ce,_e,Ce]),{uniquePtData:rr,uniquePtSeries:gr,uniquePtIsProviderMode:sr}=_.useMemo(()=>{const M=new Set(be);if(Q&&ln&&ln.length>0&&ln.lengthM.has(O.c)&&G.has(O.pr)),z=[...new Set(Y.map(O=>O.w))].sort(),{mode:C,count:W}=Qe("uniquePt"),A=nt(z,C,W),$=[...G].sort();if(A.isMonthly){const O=new Date,k=`${O.getFullYear()}-${String(O.getMonth()+1).padStart(2,"0")}`;return{uniquePtData:A.periods.map(F=>{const N={week:lt(F,F===k)},ve=Y.filter(re=>re.w.startsWith(F));return $.forEach(re=>{const ge=ve.filter(de=>de.pr===re);N[re]=ge.reduce((de,Se)=>de+(Se.p||0),0)}),N}),uniquePtSeries:$,uniquePtIsProviderMode:!0}}else return{uniquePtData:A.periods.map(k=>{const I={week:dt(k)},F=Y.filter(N=>N.w===k);return $.forEach(N=>{const ve=F.filter(re=>re.pr===N);I[N]=ve.reduce((re,ge)=>re+(ge.p||0),0)}),I}),uniquePtSeries:$,uniquePtIsProviderMode:!0}}const J=o.filter(G=>M.has(G.c)),ie=[...new Set(J.map(G=>G.w))].sort(),{mode:ye,count:Oe}=Qe("uniquePt"),fe=nt(ie,ye,Oe);if(fe.isMonthly){const G=fe.periods,Y=new Date,z=`${Y.getFullYear()}-${String(Y.getMonth()+1).padStart(2,"0")}`,C=G.map(A=>{const $=J.filter(k=>k.w.startsWith(A)),O={week:lt(A,A===z),Total:$.reduce((k,I)=>k+(I.p||0),0)};return Cr.forEach(k=>{const I=$.filter(F=>F.c===k);O[k]=I.reduce((F,N)=>F+(N.p||0),0)}),O}),W=Cr.filter(A=>A!=="Total");return{uniquePtData:C,uniquePtSeries:[...Cr.includes("Total")?["Total"]:[],...W],uniquePtIsProviderMode:!1}}else{const Y=fe.periods.map(C=>{const W=J.filter($=>$.w===C),A={week:dt(C),Total:W.reduce(($,O)=>$+(O.p||0),0)};return Cr.forEach($=>{const O=W.find(k=>k.c===$);O&&(A[$]=O.p||0)}),A}),z=Cr.filter(C=>C!=="Total");return{uniquePtData:Y,uniquePtSeries:[...Cr.includes("Total")?["Total"]:[],...z],uniquePtIsProviderMode:!1}}},[o,Z,be,Cr,ln,Q,q,ce,_e,Ce]),{retailData:nr,retailSeries:Ii,retailIsProviderMode:qn}=_.useMemo(()=>{const M=new Set(be);if(Q&&ki&&ki.length>0&&ki.lengthM.has(O.c)&&G.has(O.pr)),z=[...new Set(Y.map(O=>O.w))].sort(),{mode:C,count:W}=Qe("retail"),A=nt(z,C,W),$=[...G].sort();if(A.isMonthly){const O=new Date,k=`${O.getFullYear()}-${String(O.getMonth()+1).padStart(2,"0")}`;return{retailData:A.periods.map(F=>{const N={week:lt(F,F===k)},ve=Y.filter(re=>re.w.startsWith(F));return $.forEach(re=>{const ge=ve.filter(de=>de.pr===re);N[re]=ge.reduce((de,Se)=>de+(Se.rt||0),0)}),N}),retailSeries:$,retailIsProviderMode:!0}}else return{retailData:A.periods.map(k=>{const I={week:dt(k)},F=Y.filter(N=>N.w===k);return $.forEach(N=>{const ve=F.filter(re=>re.pr===N);I[N]=ve.reduce((re,ge)=>re+(ge.rt||0),0)}),I}),retailSeries:$,retailIsProviderMode:!0}}const J=o.filter(G=>M.has(G.c)),ie=[...new Set(J.map(G=>G.w))].sort(),{mode:ye,count:Oe}=Qe("retail"),fe=nt(ie,ye,Oe);if(fe.isMonthly){const G=fe.periods,Y=new Date,z=`${Y.getFullYear()}-${String(Y.getMonth()+1).padStart(2,"0")}`,C=G.map(A=>{const $=J.filter(k=>k.w.startsWith(A)),O={week:lt(A,A===z),Total:$.reduce((k,I)=>k+(I.rt||0),0)};return lr.forEach(k=>{const I=$.filter(F=>F.c===k);O[k]=I.reduce((F,N)=>F+(N.rt||0),0)}),O}),W=lr.filter(A=>A!=="Total");return{retailData:C,retailSeries:[...lr.includes("Total")?["Total"]:[],...W],retailIsProviderMode:!1}}else{const Y=fe.periods.map(C=>{const W=J.filter($=>$.w===C),A={week:dt(C),Total:W.reduce(($,O)=>$+(O.rt||0),0)};return lr.forEach($=>{const O=W.find(k=>k.c===$);O&&(A[$]=O.rt||0)}),A}),z=lr.filter(C=>C!=="Total");return{retailData:Y,retailSeries:[...lr.includes("Total")?["Total"]:[],...z],retailIsProviderMode:!1}}},[o,Z,be,lr,ki,Q,q,ce,_e,Ce]),{retailPctData:fa,retailPctSeries:So,retailPctIsProviderMode:Ri}=_.useMemo(()=>{const M=new Set(be);if(Q&&Kn&&Kn.length>0&&Kn.lengthM.has(O.c)&&G.has(O.pr)),z=[...new Set(Y.map(O=>O.w))].sort(),{mode:C,count:W}=Qe("retailPct"),A=nt(z,C,W),$=[...G].sort();if(A.isMonthly){const O=new Date,k=`${O.getFullYear()}-${String(O.getMonth()+1).padStart(2,"0")}`;return{retailPctData:A.periods.map(F=>{const N={week:lt(F,F===k)},ve=Y.filter(re=>re.w.startsWith(F));return $.forEach(re=>{const ge=ve.filter(Le=>Le.pr===re),de=ge.reduce((Le,vt)=>Le+(vt.s||0),0),Se=ge.reduce((Le,vt)=>Le+(vt.rt||0),0);de>0&&(N[re]=+(Se/de*100).toFixed(1))}),N}),retailPctSeries:$,retailPctIsProviderMode:!0}}else return{retailPctData:A.periods.map(k=>{const I={week:dt(k)},F=Y.filter(N=>N.w===k);return $.forEach(N=>{const ve=F.filter(de=>de.pr===N),re=ve.reduce((de,Se)=>de+(Se.s||0),0),ge=ve.reduce((de,Se)=>de+(Se.rt||0),0);re>0&&(I[N]=+(ge/re*100).toFixed(1))}),I}),retailPctSeries:$,retailPctIsProviderMode:!0}}const J=o.filter(G=>M.has(G.c)),ie=[...new Set(J.map(G=>G.w))].sort(),{mode:ye,count:Oe}=Qe("retailPct"),fe=nt(ie,ye,Oe);if(fe.isMonthly){const G=fe.periods,Y=new Date,z=`${Y.getFullYear()}-${String(Y.getMonth()+1).padStart(2,"0")}`,C=G.map(A=>{const $=J.filter(F=>F.w.startsWith(A)),O=$.reduce((F,N)=>F+(N.s||0),0),k=$.reduce((F,N)=>F+(N.rt||0),0),I={week:lt(A,A===z),Total:O>0?+(k/O*100).toFixed(1):null};return Pr.forEach(F=>{const N=$.filter(ge=>ge.c===F),ve=N.reduce((ge,de)=>ge+(de.s||0),0),re=N.reduce((ge,de)=>ge+(de.rt||0),0);ve>0&&(I[F]=+(re/ve*100).toFixed(1))}),I}),W=Pr.filter(A=>A!=="Total");return{retailPctData:C,retailPctSeries:[...Pr.includes("Total")?["Total"]:[],...W],retailPctIsProviderMode:!1}}else{const Y=fe.periods.map(C=>{const W=J.filter(k=>k.w===C),A=W.reduce((k,I)=>k+(I.s||0),0),$=W.reduce((k,I)=>k+(I.rt||0),0),O={week:dt(C),Total:A>0?+($/A*100).toFixed(1):null};return Pr.forEach(k=>{const I=W.find(F=>F.c===k);I&&I.s>0&&(O[k]=+(I.rt/I.s*100).toFixed(1))}),O}),z=Pr.filter(C=>C!=="Total");return{retailPctData:Y,retailPctSeries:[...Pr.includes("Total")?["Total"]:[],...z],retailPctIsProviderMode:!1}}},[o,Z,be,Pr,Kn,Q,q,ce,_e,Ce]),{injSalesData:Xn,injSalesSeries:yi,injSalesIsProviderMode:ul}=_.useMemo(()=>{const M=new Set(be);if(Q&&wo&&wo.length>0&&wo.lengthM.has(O.c)&&G.has(O.pr)),z=[...new Set(Y.map(O=>O.w))].sort(),{mode:C,count:W}=Qe("injSales"),A=nt(z,C,W),$=[...G].sort();if(A.isMonthly){const O=new Date,k=`${O.getFullYear()}-${String(O.getMonth()+1).padStart(2,"0")}`;return{injSalesData:A.periods.map(F=>{const N={week:lt(F,F===k)},ve=Y.filter(re=>re.w.startsWith(F));return $.forEach(re=>{const ge=ve.filter(de=>de.pr===re);N[re]=ge.reduce((de,Se)=>de+(Se.inj||0),0)}),N}),injSalesSeries:$,injSalesIsProviderMode:!0}}else return{injSalesData:A.periods.map(k=>{const I={week:dt(k)},F=Y.filter(N=>N.w===k);return $.forEach(N=>{const ve=F.filter(re=>re.pr===N);I[N]=ve.reduce((re,ge)=>re+(ge.inj||0),0)}),I}),injSalesSeries:$,injSalesIsProviderMode:!0}}const J=o.filter(G=>M.has(G.c)),ie=[...new Set(J.map(G=>G.w))].sort(),{mode:ye,count:Oe}=Qe("injSales"),fe=nt(ie,ye,Oe);if(fe.isMonthly){const G=fe.periods,Y=new Date,z=`${Y.getFullYear()}-${String(Y.getMonth()+1).padStart(2,"0")}`,C=G.map(A=>{const $=J.filter(k=>k.w.startsWith(A)),O={week:lt(A,A===z),Total:$.reduce((k,I)=>k+(I.inj||0),0)};return yr.forEach(k=>{const I=$.filter(F=>F.c===k);O[k]=I.reduce((F,N)=>F+(N.inj||0),0)}),O}),W=yr.filter(A=>A!=="Total");return{injSalesData:C,injSalesSeries:[...yr.includes("Total")?["Total"]:[],...W],injSalesIsProviderMode:!1}}else{const Y=fe.periods.map(C=>{const W=J.filter($=>$.w===C),A={week:dt(C),Total:W.reduce(($,O)=>$+(O.inj||0),0)};return yr.forEach($=>{const O=W.find(k=>k.c===$);O&&(A[$]=O.inj||0)}),A}),z=yr.filter(C=>C!=="Total");return{injSalesData:Y,injSalesSeries:[...yr.includes("Total")?["Total"]:[],...z],injSalesIsProviderMode:!1}}},[o,Z,be,yr,wo,Q,q,ce,_e,Ce]),{injPctData:lu,injPctSeries:su,injPctIsProviderMode:xe}=_.useMemo(()=>{const M=new Set(be);if(Q&&ht&&ht.length>0&&ht.lengthM.has(O.c)&&G.has(O.pr)),z=[...new Set(Y.map(O=>O.w))].sort(),{mode:C,count:W}=Qe("injPct"),A=nt(z,C,W),$=[...G].sort();if(A.isMonthly){const O=new Date,k=`${O.getFullYear()}-${String(O.getMonth()+1).padStart(2,"0")}`;return{injPctData:A.periods.map(F=>{const N={week:lt(F,F===k)},ve=Y.filter(re=>re.w.startsWith(F));return $.forEach(re=>{const ge=ve.filter(Le=>Le.pr===re),de=ge.reduce((Le,vt)=>Le+(vt.s||0),0),Se=ge.reduce((Le,vt)=>Le+(vt.inj||0),0);de>0&&(N[re]=+(Se/de*100).toFixed(1))}),N}),injPctSeries:$,injPctIsProviderMode:!0}}else return{injPctData:A.periods.map(k=>{const I={week:dt(k)},F=Y.filter(N=>N.w===k);return $.forEach(N=>{const ve=F.filter(de=>de.pr===N),re=ve.reduce((de,Se)=>de+(Se.s||0),0),ge=ve.reduce((de,Se)=>de+(Se.inj||0),0);re>0&&(I[N]=+(ge/re*100).toFixed(1))}),I}),injPctSeries:$,injPctIsProviderMode:!0}}const J=o.filter(G=>M.has(G.c)),ie=[...new Set(J.map(G=>G.w))].sort(),{mode:ye,count:Oe}=Qe("injPct"),fe=nt(ie,ye,Oe);if(fe.isMonthly){const G=fe.periods,Y=new Date,z=`${Y.getFullYear()}-${String(Y.getMonth()+1).padStart(2,"0")}`,C=G.map(A=>{const $=J.filter(F=>F.w.startsWith(A)),O=$.reduce((F,N)=>F+(N.s||0),0),k=$.reduce((F,N)=>F+(N.inj||0),0),I={week:lt(A,A===z),Total:O>0?+(k/O*100).toFixed(1):null};return Wn.forEach(F=>{const N=$.filter(ge=>ge.c===F),ve=N.reduce((ge,de)=>ge+(de.s||0),0),re=N.reduce((ge,de)=>ge+(de.inj||0),0);ve>0&&(I[F]=+(re/ve*100).toFixed(1))}),I}),W=Wn.filter(A=>A!=="Total");return{injPctData:C,injPctSeries:[...Wn.includes("Total")?["Total"]:[],...W],injPctIsProviderMode:!1}}else{const Y=fe.periods.map(C=>{const W=J.filter(k=>k.w===C),A=W.reduce((k,I)=>k+(I.s||0),0),$=W.reduce((k,I)=>k+(I.inj||0),0),O={week:dt(C),Total:A>0?+($/A*100).toFixed(1):null};return Wn.forEach(k=>{const I=W.find(F=>F.c===k);I&&I.s>0&&(O[k]=+(I.inj/I.s*100).toFixed(1))}),O}),z=Wn.filter(C=>C!=="Total");return{injPctData:Y,injPctSeries:[...Wn.includes("Total")?["Total"]:[],...z],injPctIsProviderMode:!1}}},[o,Z,be,Wn,ht,Q,q,ce,_e,Ce]),{btxData:ze,btxSeries:Ye}=_.useMemo(()=>{if(!c.length)return{btxData:null,btxSeries:[]};const M=new Set(be),oe=c.filter(fe=>M.has(fe.c)),J=[...new Set(oe.map(fe=>fe.w))].sort(),{mode:ie,count:ye}=Qe("btxLoc"),Oe=nt(J,ie,ye);if(Oe.isMonthly){const fe=Oe.periods,G=new Date,Y=`${G.getFullYear()}-${String(G.getMonth()+1).padStart(2,"0")}`,z=fe.map(W=>{const A=oe.filter(I=>I.w.startsWith(W)),$=A.reduce((I,F)=>I+(F.b||0),0),O=A.filter(I=>I.b!=null).length,k={week:lt(W,W===Y),Total:O>0?+($/O).toFixed(1):null};return Gr.forEach(I=>{const F=A.filter(re=>re.c===I),N=F.reduce((re,ge)=>re+(ge.b||0),0),ve=F.filter(re=>re.b!=null).length;ve>0&&(k[I]=+(N/ve).toFixed(1))}),k}),C=Gr.filter(W=>W!=="Total");return{btxData:z,btxSeries:[...Gr.includes("Total")?["Total"]:[],...C]}}else{const G=Oe.periods.map(z=>{const C=oe.filter(O=>O.w===z),W=C.reduce((O,k)=>O+(k.b||0),0),A=C.filter(O=>O.b!=null).length,$={week:dt(z),Total:A>0?+(W/A).toFixed(1):null};return Gr.forEach(O=>{const k=C.find(I=>I.c===O);k&&($[O]=k.b)}),$}),Y=Gr.filter(z=>z!=="Total");return{btxData:G,btxSeries:[...Gr.includes("Total")?["Total"]:[],...Y]}}},[c,be,Gr,ce,_e,Ce]),{utilizationChartData:ft,utilizationSeries:Me,utilizationIsProviderMode:et}=_.useMemo(()=>{const M=new Set(be);if(Q&&bo&&bo.length>0&&bo.lengthM.has(O.c)&&G.has(O.pr)),z=[...new Set(Y.map(O=>O.w))].sort(),{mode:C,count:W}=Qe("utilization"),A=nt(z,C,W),$=[...G].sort();if(A.isMonthly){const O=new Date,k=`${O.getFullYear()}-${String(O.getMonth()+1).padStart(2,"0")}`;return{utilizationChartData:A.periods.map(F=>{const N={week:lt(F,F===k)},ve=Y.filter(re=>re.w.startsWith(F));return $.forEach(re=>{const de=ve.filter(Se=>Se.pr===re).map(Se=>Se.ur).filter(Se=>Se!=null&&Se>0);de.length&&(N[re]=+(de.reduce((Se,Le)=>Se+Le,0)/de.length).toFixed(1))}),N}),utilizationSeries:$,utilizationIsProviderMode:!0}}else return{utilizationChartData:A.periods.map(k=>{const I={week:A.formatLabel(k)},F=Y.filter(N=>N.w===k);return $.forEach(N=>{const ve=F.find(re=>re.pr===N);ve&&ve.ur!=null&&(I[N]=ve.ur)}),I}),utilizationSeries:$,utilizationIsProviderMode:!0}}const J=le.filter(G=>M.has(G.c)),ie=[...new Set(J.map(G=>G.w))].sort(),{mode:ye,count:Oe}=Qe("utilization"),fe=nt(ie,ye,Oe);if(fe.isMonthly){const Y=fe.periods.map(C=>{const W=J.filter(O=>O.w.startsWith(C)),A=W.map(O=>O.ur).filter(O=>O!=null&&O>0),$={week:fe.formatLabel(C+"-01"),Total:A.length?+(A.reduce((O,k)=>O+k,0)/A.length).toFixed(1):null};return wn.forEach(O=>{if(O===he)return;const I=W.filter(F=>F.c===O).map(F=>F.ur).filter(F=>F>0);I.length&&($[O]=+(I.reduce((F,N)=>F+N,0)/I.length).toFixed(1))}),$}),z=wn.filter(C=>C!==he);return{utilizationChartData:Y,utilizationSeries:[...wn.includes(he)?[he]:[],...z],utilizationIsProviderMode:!1}}else{const Y=fe.periods.map(C=>{const W=J.filter(O=>O.w===C),A=W.map(O=>O.ur).filter(O=>O!=null&&O>0),$={week:fe.formatLabel(C),Total:A.length?+(A.reduce((O,k)=>O+k,0)/A.length).toFixed(1):null};return wn.forEach(O=>{if(O===he)return;const k=W.find(I=>I.c===O);k&&($[O]=k.ur)}),$}),z=wn.filter(C=>C!==he);return{utilizationChartData:Y,utilizationSeries:[...wn.includes(he)?[he]:[],...z],utilizationIsProviderMode:!1}}},[le,te,be,wn,bo,Q,q,ce,_e,Ce]),{netHoursChartData:mr,netHoursSeries:Po,netHoursIsProviderMode:cl}=_.useMemo(()=>{const M=new Set(be);if(Q&&Gn&&Gn.length>0&&Gn.lengthM.has(O.c)&&G.has(O.pr)),z=[...new Set(Y.map(O=>O.w))].sort(),{mode:C,count:W}=Qe("netHours"),A=nt(z,C,W),$=[...G].sort();if(A.isMonthly){const O=new Date,k=`${O.getFullYear()}-${String(O.getMonth()+1).padStart(2,"0")}`;return{netHoursChartData:A.periods.map(F=>{const N={week:lt(F,F===k)},ve=Y.filter(re=>re.w.startsWith(F));return $.forEach(re=>{const ge=ve.filter(de=>de.pr===re);ge.length&&(N[re]=Math.round(ge.reduce((de,Se)=>de+(Se.h||0),0)))}),N}),netHoursSeries:$,netHoursIsProviderMode:!0}}else return{netHoursChartData:A.periods.map(k=>{const I={week:A.formatLabel(k)},F=Y.filter(N=>N.w===k);return $.forEach(N=>{const ve=F.find(re=>re.pr===N);ve&&(I[N]=Math.round(ve.h))}),I}),netHoursSeries:$,netHoursIsProviderMode:!0}}const J=H.filter(G=>M.has(G.c)),ie=[...new Set(J.map(G=>G.w))].sort(),{mode:ye,count:Oe}=Qe("netHours"),fe=nt(ie,ye,Oe);if(fe.isMonthly){const Y=fe.periods.map(C=>{const W=J.filter($=>$.w.startsWith(C)),A={week:fe.formatLabel(C+"-01"),Total:Math.round(W.reduce(($,O)=>$+(O.h||0),0))};return Sn.forEach($=>{if($===he)return;const O=W.filter(k=>k.c===$);O.length&&(A[$]=Math.round(O.reduce((k,I)=>k+(I.h||0),0)))}),A}),z=Sn.filter(C=>C!==he);return{netHoursChartData:Y,netHoursSeries:[...Sn.includes(he)?[he]:[],...z],netHoursIsProviderMode:!1}}else{const Y=fe.periods.map(C=>{const W=J.filter($=>$.w===C),A={week:fe.formatLabel(C),Total:Math.round(W.reduce(($,O)=>$+(O.h||0),0))};return Sn.forEach($=>{if($===he)return;const O=W.find(k=>k.c===$);O&&(A[$]=Math.round(O.h))}),A}),z=Sn.filter(C=>C!==he);return{netHoursChartData:Y,netHoursSeries:[...Sn.includes(he)?[he]:[],...z],netHoursIsProviderMode:!1}}},[H,te,be,Sn,Gn,Q,q,ce,_e,Ce]),{cancelData:uu,cancelSeries:fl,cancelIsProviderMode:da}=_.useMemo(()=>{const M=new Set(be);if(Q&&xo&&xo.length>0&&xo.lengthM.has(O.c)&&G.has(O.pr)),z=[...new Set(Y.map(O=>O.w))].sort(),{mode:C,count:W}=Qe("cancel"),A=nt(z,C,W),$=[...G].sort();if(A.isMonthly){const O=new Date,k=`${O.getFullYear()}-${String(O.getMonth()+1).padStart(2,"0")}`;return{cancelData:A.periods.map(F=>{const N={week:lt(F,F===k)},ve=Y.filter(re=>re.w.startsWith(F));return $.forEach(re=>{const de=ve.filter(Se=>Se.pr===re).map(Se=>Se.cn).filter(Se=>Se!=null);de.length&&(N[re]=+(de.reduce((Se,Le)=>Se+Le,0)/de.length).toFixed(1))}),N}),cancelSeries:$,cancelIsProviderMode:!0}}else return{cancelData:A.periods.map(k=>{const I={week:A.formatLabel(k)},F=Y.filter(N=>N.w===k);return $.forEach(N=>{const ve=F.find(re=>re.pr===N);ve&&(I[N]=ve.cn)}),I}),cancelSeries:$,cancelIsProviderMode:!0}}const J=u.filter(G=>M.has(G.c)),ie=[...new Set(J.map(G=>G.w))].sort(),{mode:ye,count:Oe}=Qe("cancel"),fe=nt(ie,ye,Oe);if(fe.isMonthly){const Y=fe.periods.map(C=>{const W=J.filter(O=>O.w.startsWith(C)),A=W.map(O=>O.cn).filter(O=>O!=null),$={week:fe.formatLabel(C+"-01"),Total:A.length?+(A.reduce((O,k)=>O+k,0)/A.length).toFixed(1):null};return zr.forEach(O=>{if(O===he)return;const I=W.filter(F=>F.c===O).map(F=>F.cn).filter(F=>F!=null);I.length&&($[O]=+(I.reduce((F,N)=>F+N,0)/I.length).toFixed(1))}),$}),z=zr.filter(C=>C!==he);return{cancelData:Y,cancelSeries:[...zr.includes(he)?[he]:[],...z],cancelIsProviderMode:!1}}else{const Y=fe.periods.map(C=>{const W=J.filter(O=>O.w===C),A=W.map(O=>O.cn).filter(O=>O!=null),$={week:fe.formatLabel(C),Total:A.length?+(A.reduce((O,k)=>O+k,0)/A.length).toFixed(1):null};return zr.forEach(O=>{if(O===he)return;const k=W.find(I=>I.c===O);k&&($[O]=k.cn)}),$}),z=zr.filter(C=>C!==he);return{cancelData:Y,cancelSeries:[...zr.includes(he)?[he]:[],...z],cancelIsProviderMode:!1}}},[u,ee,be,zr,xo,Q,q,ce,_e,Ce]),{noshowData:Sf,noshowSeries:dl,noshowIsProviderMode:Pf}=_.useMemo(()=>{const M=new Set(be);if(Q&&Mi&&Mi.length>0&&Mi.lengthM.has(O.c)&&G.has(O.pr)),z=[...new Set(Y.map(O=>O.w))].sort(),{mode:C,count:W}=Qe("noshow"),A=nt(z,C,W),$=[...G].sort();if(A.isMonthly){const O=new Date,k=`${O.getFullYear()}-${String(O.getMonth()+1).padStart(2,"0")}`;return{noshowData:A.periods.map(F=>{const N={week:lt(F,F===k)},ve=Y.filter(re=>re.w.startsWith(F));return $.forEach(re=>{const de=ve.filter(Se=>Se.pr===re).map(Se=>Se.ns).filter(Se=>Se!=null);de.length&&(N[re]=+(de.reduce((Se,Le)=>Se+Le,0)/de.length).toFixed(1))}),N}),noshowSeries:$,noshowIsProviderMode:!0}}else return{noshowData:A.periods.map(k=>{const I={week:A.formatLabel(k)},F=Y.filter(N=>N.w===k);return $.forEach(N=>{const ve=F.find(re=>re.pr===N);ve&&(I[N]=ve.ns)}),I}),noshowSeries:$,noshowIsProviderMode:!0}}const J=u.filter(G=>M.has(G.c)),ie=[...new Set(J.map(G=>G.w))].sort(),{mode:ye,count:Oe}=Qe("noshow"),fe=nt(ie,ye,Oe);if(fe.isMonthly){const Y=fe.periods.map(C=>{const W=J.filter(O=>O.w.startsWith(C)),A=W.map(O=>O.ns).filter(O=>O!=null),$={week:fe.formatLabel(C+"-01"),Total:A.length?+(A.reduce((O,k)=>O+k,0)/A.length).toFixed(1):null};return Un.forEach(O=>{if(O===he)return;const I=W.filter(F=>F.c===O).map(F=>F.ns).filter(F=>F!=null);I.length&&($[O]=+(I.reduce((F,N)=>F+N,0)/I.length).toFixed(1))}),$}),z=Un.filter(C=>C!==he);return{noshowData:Y,noshowSeries:[...Un.includes(he)?[he]:[],...z],noshowIsProviderMode:!1}}else{const Y=fe.periods.map(C=>{const W=J.filter(O=>O.w===C),A=W.map(O=>O.ns).filter(O=>O!=null),$={week:fe.formatLabel(C),Total:A.length?+(A.reduce((O,k)=>O+k,0)/A.length).toFixed(1):null};return Un.forEach(O=>{if(O===he)return;const k=W.find(I=>I.c===O);k&&($[O]=k.ns)}),$}),z=Un.filter(C=>C!==he);return{noshowData:Y,noshowSeries:[...Un.includes(he)?[he]:[],...z],noshowIsProviderMode:!1}}},[u,ee,be,Un,Mi,Q,q,ce,_e,Ce]),{revChartData:pl,revChartSeries:Fb}=_.useMemo(()=>{const M=new Set(be),oe=o.filter(C=>M.has(C.c)),J={},ie={};oe.forEach(C=>{J[C.w]||(J[C.w]=0),J[C.w]+=C.s||0,tr.includes(C.c)&&(ie[C.w]||(ie[C.w]={}),ie[C.w][C.c]=(ie[C.w][C.c]||0)+(C.s||0))});const ye={};if(p.length){const C=tr.includes("Total")?M:new Set(tr.filter(A=>A!=="Total"));p.filter(A=>C.has(A.c)).forEach(A=>{ye[A.w]||(ye[A.w]=0),ye[A.w]+=A.b||0})}const Oe=Object.keys(J).sort(),{mode:fe,count:G}=Qe("revChart"),Y=nt(Oe,fe,G),z=Object.keys(ye).length>0;if(Y.isMonthly){const C=Y.periods,W=new Date,A=`${W.getFullYear()}-${String(W.getMonth()+1).padStart(2,"0")}`,$=C.map(I=>{const F=Oe.filter(ge=>ge.startsWith(I)),N=F.reduce((ge,de)=>ge+(J[de]||0),0),ve=F.reduce((ge,de)=>ge+(ye[de]||0),0),re={week:lt(I,I===A),"All Locations":N};return z&&(re.Budget=ve),tr.filter(ge=>ge!=="Total").forEach(ge=>{re[ge]=F.reduce((de,Se)=>{var Le;return de+(((Le=ie[Se])==null?void 0:Le[ge])||0)},0)}),re}),O=tr.filter(I=>I!=="Total"),k=[...tr.includes("Total")?["All Locations"]:[],...z?["Budget"]:[],...O];return{revChartData:$,revChartSeries:k}}else{const W=Y.periods.map(O=>{const k=ye[O]!=null?ye[O]:null,I={week:dt(O),"All Locations":J[O]||0};return k!=null&&(I.Budget=k),tr.filter(F=>F!=="Total").forEach(F=>{var N;I[F]=((N=ie[O])==null?void 0:N[F])||0}),I}),A=tr.filter(O=>O!=="Total"),$=[...tr.includes("Total")?["All Locations"]:[],...z?["Budget"]:[],...A];return{revChartData:W,revChartSeries:$}}},[o,be,tr,p,ce,_e,Ce]),{collChartData:Of,collChartSeries:uv}=_.useMemo(()=>{const M=new Set(be),oe=o.filter(C=>M.has(C.c)),J={},ie={};oe.forEach(C=>{J[C.w]||(J[C.w]=0),J[C.w]+=C.co||0,Fr.includes(C.c)&&(ie[C.w]||(ie[C.w]={}),ie[C.w][C.c]=(ie[C.w][C.c]||0)+(C.co||0))});const ye={};if(p.length){const C=Fr.includes("Total")?M:new Set(Fr.filter(A=>A!=="Total"));p.filter(A=>C.has(A.c)).forEach(A=>{A.cb!=null&&(ye[A.w]||(ye[A.w]=0),ye[A.w]+=A.cb)})}const Oe=Object.keys(J).sort(),{mode:fe,count:G}=Qe("collChart"),Y=nt(Oe,fe,G),z=Object.keys(ye).length>0;if(Y.isMonthly){const C=Y.periods,W=new Date,A=`${W.getFullYear()}-${String(W.getMonth()+1).padStart(2,"0")}`,$=C.map(I=>{const F=Oe.filter(ge=>ge.startsWith(I)),N=F.reduce((ge,de)=>ge+(J[de]||0),0),ve=F.reduce((ge,de)=>ge+(ye[de]||0),0),re={week:lt(I,I===A),"All Locations":N};return z&&(re.Budget=ve),Fr.filter(ge=>ge!=="Total").forEach(ge=>{re[ge]=F.reduce((de,Se)=>{var Le;return de+(((Le=ie[Se])==null?void 0:Le[ge])||0)},0)}),re}),O=Fr.filter(I=>I!=="Total"),k=[...Fr.includes("Total")?["All Locations"]:[],...z?["Budget"]:[],...O];return{collChartData:$,collChartSeries:k}}else{const W=Y.periods.map(O=>{const k=ye[O]!=null?ye[O]:null,I={week:dt(O),"All Locations":J[O]||0};return k!=null&&(I.Budget=k),Fr.filter(F=>F!=="Total").forEach(F=>{var N;I[F]=((N=ie[O])==null?void 0:N[F])||0}),I}),A=Fr.filter(O=>O!=="Total"),$=[...Fr.includes("Total")?["All Locations"]:[],...z?["Budget"]:[],...A];return{collChartData:W,collChartSeries:$}}},[o,be,Fr,p,ce,_e,Ce]);_.useMemo(()=>{const M=new Set(be),oe=o.filter($=>M.has($.c)),J=p.filter($=>M.has($.c)),ie={};oe.forEach($=>{const O=$.w.substring(0,7);ie[O]||(ie[O]=[]),ie[O].push($)});const ye={};J.forEach($=>{const O=$.w.substring(0,7);ye[O]||(ye[O]=[]),ye[O].push($)});const Oe=new Date,fe=`${Oe.getFullYear()}-${String(Oe.getMonth()+1).padStart(2,"0")}`,G=[];for(let $=3;$>=0;$--){const O=new Date(Oe.getFullYear(),Oe.getMonth()-$,1);G.push(`${O.getFullYear()}-${String(O.getMonth()+1).padStart(2,"0")}`)}const Y=G.filter($=>ie[$]).map($=>{const O=ie[$]||[],k=ye[$]||[],I=O.reduce((Le,vt)=>Le+(vt.s||0),0),F=O.reduce((Le,vt)=>Le+(vt.co||0),0),N=k.reduce((Le,vt)=>Le+(vt.b||0),0),ve=k.reduce((Le,vt)=>Le+(vt.cb||0),0),[re,ge]=$.split("-").map(Number);return{label:$===fe?"MTD":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][ge-1],revActual:I,revBudget:N,collActual:F,collBudget:ve,isMTD:$===fe}}),z=Y.reduce(($,O)=>$+O.revActual,0),C=Y.reduce(($,O)=>$+O.revBudget,0),W=Y.reduce(($,O)=>$+O.collActual,0),A=Y.reduce(($,O)=>$+O.collBudget,0);return{revenue:[...Y.map($=>({label:$.label,actual:Math.round($.revActual),budget:Math.round($.revBudget)})),{label:"YTD",actual:Math.round(z),budget:Math.round(C),isTotal:!0}],collections:[...Y.map($=>({label:$.label,actual:Math.round($.collActual),budget:Math.round($.collBudget)})),{label:"YTD",actual:Math.round(W),budget:Math.round(A),isTotal:!0}]}},[o,be,p]);const jf=_.useMemo(()=>{const M=new Set(be),oe=o.filter(ye=>M.has(ye.c)),J={};oe.forEach(ye=>{J[ye.c]||(J[ye.c]={s:0,r:0,i:0}),J[ye.c].s+=ye.s||0,J[ye.c].r+=ye.rt||0,J[ye.c].i+=ye.inj||0});let ie=Object.entries(J).map(([ye,Oe])=>{const fe=Oe.s||1,G=+(Oe.i/fe*100).toFixed(1),Y=+(Oe.r/fe*100).toFixed(1),z=+(100-G-Y).toFixed(1);return{name:ye,injectables:G,body:0,laser:0,facials:0,retail:Y,other:z<0?0:z}});return ie.sort((ye,Oe)=>{var Y,z;const fe=((Y=J[ye.name])==null?void 0:Y.s)||0;return(((z=J[Oe.name])==null?void 0:z.s)||0)-fe}),ie.length>12&&(ie=ie.slice(0,12)),ie},[o,be]),{aggBtxChartData:Af,aggBtxSeries:Bb}=_.useMemo(()=>{if(!c.length)return{aggBtxChartData:null,aggBtxSeries:[]};const M=new Set(be),oe=c.filter(fe=>M.has(fe.c)),J=[...new Set(oe.map(fe=>fe.w))].sort(),{mode:ie,count:ye}=Qe("btxLoc"),Oe=nt(J,ie,ye);if(Oe.isMonthly){const fe=Oe.periods,G=new Date,Y=`${G.getFullYear()}-${String(G.getMonth()+1).padStart(2,"0")}`,z=fe.map(W=>{const A=oe.filter(I=>I.w.startsWith(W)),$=A.reduce((I,F)=>I+(F.b||0),0),O=A.filter(I=>I.b!=null).length,k={week:lt(W,W===Y),Total:O>0?+($/O).toFixed(1):null};return xn.forEach(I=>{const F=A.filter(re=>re.c===I),N=F.reduce((re,ge)=>re+(ge.b||0),0),ve=F.filter(re=>re.b!=null).length;ve>0&&(k[I]=+(N/ve).toFixed(1))}),k}),C=xn.filter(W=>W!=="Total");return{aggBtxChartData:z,aggBtxSeries:[...xn.includes("Total")?["Total"]:[],...C]}}else{const G=Oe.periods.map(z=>{const C=oe.filter(O=>O.w===z),W=C.reduce((O,k)=>O+(k.b||0),0),A=C.filter(O=>O.b!=null).length,$={week:dt(z),Total:A>0?+(W/A).toFixed(1):null};return xn.forEach(O=>{const k=C.find(I=>I.c===O);k&&($[O]=k.b)}),$}),Y=xn.filter(z=>z!=="Total");return{aggBtxChartData:G,aggBtxSeries:[...xn.includes("Total")?["Total"]:[],...Y]}}},[c,be,xn,ce,_e,Ce]),{injRevProvData:_f,injRevProvSeries:cv}=_.useMemo(()=>{const M=new Set(be),oe=v.filter(Y=>M.has(Y.c)),J=V||q,ie=new Set(J),ye=[...new Set(oe.map(Y=>Y.w))].sort(),{mode:Oe,count:fe}=Qe("injRevProv"),G=nt(ye,Oe,fe);if(G.isMonthly){const Y=G.periods,z=new Date,C=`${z.getFullYear()}-${String(z.getMonth()+1).padStart(2,"0")}`;return{injRevProvData:Y.map(A=>{const $={week:lt(A,A===C)};return oe.filter(k=>k.w.startsWith(A)).forEach(k=>{ie.has(k.pr)&&($[k.pr]=($[k.pr]||0)+(Number(k.r)||0))}),$}),injRevProvSeries:J.filter(A=>ie.has(A))}}else return{injRevProvData:G.periods.map(C=>{const W={week:dt(C)};return oe.filter($=>$.w===C).forEach($=>{ie.has($.pr)&&(W[$.pr]=(W[$.pr]||0)+(Number($.r)||0))}),W}),injRevProvSeries:J.filter(C=>ie.has(C))}},[v,be,V,q,ce,_e,Ce]),{btxProvData:Di,btxProvSeries:Tf}=_.useMemo(()=>{const M=new Set(be),oe=y.filter(z=>M.has(z.c)),J=Ae||$e,ie=new Set(J),ye=[...new Set(oe.map(z=>z.w))].sort(),{mode:Oe,count:fe}=Qe("btxProv"),G=nt(ye,Oe,fe),Y=(z,C)=>{const W={week:C},A={},$={};return z.forEach(O=>{if(ie.has(O.pr)){const k=Number(O.b)||0,I=Number(O.n)||0;A[O.pr]=(A[O.pr]||0)+k*I,$[O.pr]=($[O.pr]||0)+I}}),Object.keys(A).forEach(O=>{W[O]=$[O]>0?+(A[O]/$[O]).toFixed(1):null}),W};if(G.isMonthly){const z=new Date,C=`${z.getFullYear()}-${String(z.getMonth()+1).padStart(2,"0")}`;return{btxProvData:G.periods.map(A=>Y(oe.filter($=>$.w.startsWith(A)),lt(A,A===C))),btxProvSeries:J.filter(A=>ie.has(A))}}else return{btxProvData:G.periods.map(C=>Y(oe.filter(W=>W.w===C),dt(C))),btxProvSeries:J.filter(C=>ie.has(C))}},[y,be,Ae,$e,ce,_e,Ce]),{ntxFillerChartData:zb,ntxFillerSeries:$f}=_.useMemo(()=>{const M=new Set(be),oe=x.filter(z=>M.has(z.c)),J=[...new Set(oe.map(z=>z.w))].sort(),{mode:ie,count:ye}=Qe("ntxFiller"),Oe=nt(J,ie,ye),fe=(z,C)=>{const W={week:C,"Neurotoxin (Total)":z.reduce((A,$)=>A+($.ntx||0),0),"Filler (Total)":z.reduce((A,$)=>A+($.filler||0),0)};return Pn.forEach(A=>{if(A===he)return;const $=z.filter(O=>O.c===A);$.length&&(W[A+" NTX"]=$.reduce((O,k)=>O+(k.ntx||0),0),W[A+" Filler"]=$.reduce((O,k)=>O+(k.filler||0),0))}),W};let G;if(!Oe.isMonthly)G=Oe.periods.map(z=>fe(oe.filter(C=>C.w===z),dt(z)));else{const z=new Date,C=`${z.getFullYear()}-${String(z.getMonth()+1).padStart(2,"0")}`;G=Oe.periods.map(W=>fe(oe.filter(A=>A.w.startsWith(W)),lt(W,W===C)))}const Y=["Neurotoxin (Total)","Filler (Total)"];return Pn.filter(z=>z!==he).forEach(z=>{Y.push(z+" NTX",z+" Filler")}),{ntxFillerChartData:G,ntxFillerSeries:Pn.includes(he)?Y:Y.filter(z=>!z.includes("(Total)"))}},[x,be,Pn,ce,_e,Ce]),{syrInjData:Fe,syrInjSeries:Vt}=_.useMemo(()=>{const M=new Set(be),oe=w.filter(z=>M.has(z.c)),J=[...new Set(oe.map(z=>z.w))].sort(),{mode:ie,count:ye}=Qe("syrInjLoc"),Oe=nt(J,ie,ye),fe=(z,C)=>{const W=z.reduce((O,k)=>O+k.si*k.ni,0),A=z.reduce((O,k)=>O+k.ni,0),$={week:C,Total:A>0?+(W/A).toFixed(2):null};return uo.forEach(O=>{if(O===he)return;const k=z.filter(N=>N.c===O),I=k.reduce((N,ve)=>N+ve.si*ve.ni,0),F=k.reduce((N,ve)=>N+ve.ni,0);F>0&&($[O]=+(I/F).toFixed(2))}),$};let G;if(!Oe.isMonthly)G=Oe.periods.map(z=>fe(oe.filter(C=>C.w===z),dt(z)));else{const z=new Date,C=`${z.getFullYear()}-${String(z.getMonth()+1).padStart(2,"0")}`;G=Oe.periods.map(W=>fe(oe.filter(A=>A.w.startsWith(W)),lt(W,W===C)))}const Y=uo.filter(z=>z!==he);return{syrInjData:G,syrInjSeries:[...uo.includes(he)?[he]:[],...Y]}},[w,be,uo,ce,_e,Ce]),{syrFillerData:uE,syrFillerSeries:cE}=_.useMemo(()=>{const M=new Set(be),oe=w.filter(z=>M.has(z.c)),J=[...new Set(oe.map(z=>z.w))].sort(),{mode:ie,count:ye}=Qe("syrFillerLoc"),Oe=nt(J,ie,ye),fe=(z,C)=>{const W=z.reduce((O,k)=>O+k.sf*k.nf,0),A=z.reduce((O,k)=>O+k.nf,0),$={week:C,Total:A>0?+(W/A).toFixed(2):null};return co.forEach(O=>{if(O===he)return;const k=z.filter(N=>N.c===O),I=k.reduce((N,ve)=>N+ve.sf*ve.nf,0),F=k.reduce((N,ve)=>N+ve.nf,0);F>0&&($[O]=+(I/F).toFixed(2))}),$};let G;if(!Oe.isMonthly)G=Oe.periods.map(z=>fe(oe.filter(C=>C.w===z),dt(z)));else{const z=new Date,C=`${z.getFullYear()}-${String(z.getMonth()+1).padStart(2,"0")}`;G=Oe.periods.map(W=>fe(oe.filter(A=>A.w.startsWith(W)),lt(W,W===C)))}const Y=co.filter(z=>z!==he);return{syrFillerData:G,syrFillerSeries:[...co.includes(he)?[he]:[],...Y]}},[w,be,co,ce,_e,Ce]),Oo=_.useMemo(()=>{const M=new Set(L),oe=new Set;return j.filter(J=>M.has(J.c)).forEach(J=>oe.add(J.pr)),[...oe].sort()},[j,L]),{syrInjProvData:fE,syrInjProvSeries:dE}=_.useMemo(()=>{const M=new Set(be),oe=j.filter(C=>M.has(C.c)),J=Xs||Oo,ie=new Set(J),ye=[...new Set(oe.map(C=>C.w))].sort(),{mode:Oe,count:fe}=Qe("syrInjProv"),G=nt(ye,Oe,fe),Y=(C,W)=>{const A={week:W},$={};return C.forEach(O=>{ie.has(O.pr)&&($[O.pr]||($[O.pr]={totalSyr:0,totalN:0}),$[O.pr].totalSyr+=O.si*O.n,$[O.pr].totalN+=O.n)}),Object.entries($).forEach(([O,k])=>{A[O]=k.totalN>0?+(k.totalSyr/k.totalN).toFixed(2):null}),A};let z;if(!G.isMonthly)z=G.periods.map(C=>Y(oe.filter(W=>W.w===C),dt(C)));else{const C=new Date,W=`${C.getFullYear()}-${String(C.getMonth()+1).padStart(2,"0")}`;z=G.periods.map(A=>Y(oe.filter($=>$.w.startsWith(A)),lt(A,A===W)))}return{syrInjProvData:z,syrInjProvSeries:J.filter(C=>ie.has(C))}},[j,be,Xs,Oo,ce,_e,Ce]),{syrFillerProvData:pE,syrFillerProvSeries:hE}=_.useMemo(()=>{const M=new Set(be),oe=j.filter(C=>M.has(C.c)),J=Qs||Oo,ie=new Set(J),ye=[...new Set(oe.map(C=>C.w))].sort(),{mode:Oe,count:fe}=Qe("syrFillerProv"),G=nt(ye,Oe,fe),Y=(C,W)=>{const A={week:W},$={};return C.forEach(O=>{ie.has(O.pr)&&O.sf>0&&($[O.pr]||($[O.pr]={totalSyr:0,totalN:0}),$[O.pr].totalSyr+=O.sf*O.n,$[O.pr].totalN+=O.n)}),Object.entries($).forEach(([O,k])=>{A[O]=k.totalN>0?+(k.totalSyr/k.totalN).toFixed(2):null}),A};let z;if(!G.isMonthly)z=G.periods.map(C=>Y(oe.filter(W=>W.w===C),dt(C)));else{const C=new Date,W=`${C.getFullYear()}-${String(C.getMonth()+1).padStart(2,"0")}`;z=G.periods.map(A=>Y(oe.filter($=>$.w.startsWith(A)),lt(A,A===W)))}return{syrFillerProvData:z,syrFillerProvSeries:J.filter(C=>ie.has(C))}},[j,be,Qs,Oo,ce,_e,Ce]),{revCollAppendixData:vE,revCollAppendixSeries:yE,revCollAppendixRightAxis:gE}=_.useMemo(()=>{const M=new Set(be),oe=o.filter(C=>M.has(C.c)),J=[...new Set(oe.map(C=>C.w))].sort(),{mode:ie,count:ye}=Qe("revCollAppendix"),Oe=nt(J,ie,ye),fe=(C,W)=>{const A=C.reduce((I,F)=>I+(F.s||0),0),$=C.reduce((I,F)=>I+(F.co||0),0),O=A>0?+($/A*100).toFixed(1):null,k={week:W};return fo.includes(he)&&(k.Revenue=A,k.Collections=$,k["Coll % of Rev"]=O),fo.filter(I=>I!==he).forEach(I=>{const F=C.filter(re=>re.c===I),N=F.reduce((re,ge)=>re+(ge.s||0),0),ve=F.reduce((re,ge)=>re+(ge.co||0),0);k[I+" Rev"]=N,k[I+" Coll"]=ve,k[I+" %"]=N>0?+(ve/N*100).toFixed(1):null}),k};let G;if(!Oe.isMonthly)G=Oe.periods.map(C=>fe(oe.filter(W=>W.w===C),dt(C)));else{const C=new Date,W=`${C.getFullYear()}-${String(C.getMonth()+1).padStart(2,"0")}`;G=Oe.periods.map(A=>fe(oe.filter($=>$.w.startsWith(A)),lt(A,A===W)))}const Y=[],z=[];return fo.includes(he)&&(Y.push("Revenue","Collections","Coll % of Rev"),z.push("Coll % of Rev")),fo.filter(C=>C!==he).forEach(C=>{Y.push(C+" Rev",C+" Coll",C+" %"),z.push(C+" %")}),{revCollAppendixData:G,revCollAppendixSeries:Y,revCollAppendixRightAxis:z}},[o,be,fo,ce,_e,Ce]),Ef=_.useMemo(()=>{const M=new Set(be),oe=new Set(v.map(ie=>ie.pr)),J=new Set;return R.filter(ie=>M.has(ie.c)&&oe.has(ie.pr)).forEach(ie=>J.add(ie.pr)),[...J].sort()},[R,be,v]),{revCollHoursData:mE,revCollHoursSeries:bE,revCollHoursRightAxis:xE}=_.useMemo(()=>{const M=new Set(be),oe=o.filter(I=>M.has(I.c)),J=H.filter(I=>M.has(I.c)),ie=Zs,ye=ie&&ie.length>0,Oe=ye?new Set(ie):null,fe=ye?R.filter(I=>M.has(I.c)&&Oe.has(I.pr)):null,G=[...new Set(oe.map(I=>I.w))].sort(),{mode:Y,count:z}=Qe("revCollHours"),C=nt(G,Y,z),W={};J.forEach(I=>{W[I.w]||(W[I.w]={}),W[I.w][I.c]=(W[I.w][I.c]||0)+(I.h||0)});const A=(I,F)=>{const N=oe.filter(Se=>I.includes(Se.w)),ve=ye?fe.filter(Se=>I.includes(Se.w)).reduce((Se,Le)=>Se+(Le.rev||0),0):N.reduce((Se,Le)=>Se+(Le.s||0),0),re=ye?fe.filter(Se=>I.includes(Se.w)).reduce((Se,Le)=>Se+(Le.coll||0),0):N.reduce((Se,Le)=>Se+(Le.co||0),0),ge=I.reduce((Se,Le)=>{const vt=W[Le]||{};return Se+Object.values(vt).reduce((sn,tt)=>sn+tt,0)},0),de={week:F};return so.includes(he)&&(de.Revenue=ve,de.Collections=re,de["Net Sched Hours"]=Math.round(ge)),so.filter(Se=>Se!==he).forEach(Se=>{const Le=N.filter(tt=>tt.c===Se).reduce((tt,St)=>tt+(St.s||0),0),vt=N.filter(tt=>tt.c===Se).reduce((tt,St)=>tt+(St.co||0),0),sn=I.reduce((tt,St)=>tt+((W[St]||{})[Se]||0),0);de[Se+" Rev"]=Le,de[Se+" Coll"]=vt,de[Se+" Hours"]=Math.round(sn)}),de};let $;if(!C.isMonthly)$=C.periods.map(I=>A([I],dt(I)));else{const I=new Date,F=`${I.getFullYear()}-${String(I.getMonth()+1).padStart(2,"0")}`;$=C.periods.map(N=>A(G.filter(ve=>ve.startsWith(N)),lt(N,N===F)))}const O=[],k=[];return so.includes(he)&&(O.push("Revenue","Collections","Net Sched Hours"),k.push("Net Sched Hours")),so.filter(I=>I!==he).forEach(I=>{O.push(I+" Rev",I+" Coll",I+" Hours"),k.push(I+" Hours")}),{revCollHoursData:$,revCollHoursSeries:O,revCollHoursRightAxis:k}},[o,H,be,so,Zs,R,ce,_e,Ce]),{revPerHour2Data:wE,revPerHour2Series:SE}=_.useMemo(()=>{const M=new Set(be);if(Q&&yo&&yo.length>0&&yo.lengthM.has(de.c)&&A.has(de.pr)),O=te.filter(de=>M.has(de.c)&&A.has(de.pr)),k=[...new Set($.map(de=>de.w))].sort(),{mode:I,count:F}=Qe("revPerHour2"),N=nt(k,I,F),ve=[...A].sort(),re=(de,Se)=>{const Le={week:Se};return ve.forEach(vt=>{const sn=$.filter(St=>de.includes(St.w)&&St.pr===vt).reduce((St,gi)=>St+(gi.s||0),0),tt=O.filter(St=>de.includes(St.w)&&St.pr===vt).reduce((St,gi)=>St+(gi.h||0),0);Le[vt]=tt>0?Math.round(sn/tt):null}),Le};let ge;if(!N.isMonthly)ge=N.periods.map(de=>re([de],dt(de)));else{const de=new Date,Se=`${de.getFullYear()}-${String(de.getMonth()+1).padStart(2,"0")}`;ge=N.periods.map(Le=>re(k.filter(vt=>vt.startsWith(Le)),lt(Le,Le===Se)))}return{revPerHour2Data:ge,revPerHour2Series:ve}}const J=o.filter(A=>M.has(A.c)),ie=H.filter(A=>M.has(A.c)),ye=[...new Set(J.map(A=>A.w))].sort(),{mode:Oe,count:fe}=Qe("revPerHour2"),G=nt(ye,Oe,fe),Y={};ie.forEach(A=>{Y[A.w]||(Y[A.w]={}),Y[A.w][A.c]=(Y[A.w][A.c]||0)+(A.h||0)});const z=(A,$)=>{const O=J.filter(I=>A.includes(I.w)),k={week:$};if(vo.includes("Total")){const I=O.reduce((N,ve)=>N+(ve.s||0),0),F=A.reduce((N,ve)=>N+Object.values(Y[ve]||{}).reduce((re,ge)=>re+ge,0),0);k["Rev / Hour"]=F>0?Math.round(I/F):null}return vo.filter(I=>I!=="Total").forEach(I=>{const F=O.filter(ve=>ve.c===I).reduce((ve,re)=>ve+(re.s||0),0),N=A.reduce((ve,re)=>ve+((Y[re]||{})[I]||0),0);k[I+" Rev/Hr"]=N>0?Math.round(F/N):null}),k};let C;if(!G.isMonthly)C=G.periods.map(A=>z([A],dt(A)));else{const A=new Date,$=`${A.getFullYear()}-${String(A.getMonth()+1).padStart(2,"0")}`;C=G.periods.map(O=>z(ye.filter(k=>k.startsWith(O)),lt(O,O===$)))}const W=[];return vo.includes("Total")&&W.push("Rev / Hour"),vo.filter(A=>A!=="Total").forEach(A=>W.push(A+" Rev/Hr")),{revPerHour2Data:C,revPerHour2Series:W}},[o,Z,H,te,be,vo,yo,Q,q,ce,_e,Ce]),{revPerHourChartData:PE,revPerHourSeries:OE,revPerHourRightAxis:jE}=_.useMemo(()=>{const M=new Set(be),oe=o.filter(N=>M.has(N.c)),J=H.filter(N=>M.has(N.c)),ie=le.filter(N=>M.has(N.c)),ye=sa,Oe=ye&&ye.length>0,fe=Oe?new Set(ye):null,G=Oe?R.filter(N=>M.has(N.c)&&fe.has(N.pr)):null,Y=[...new Set(oe.map(N=>N.w))].sort(),{mode:z,count:C}=Qe("revPerHour"),W=nt(Y,z,C),A={};J.forEach(N=>{A[N.w]||(A[N.w]={}),A[N.w][N.c]=(A[N.w][N.c]||0)+(N.h||0)});const $={};ie.forEach(N=>{$[N.w]||($[N.w]={}),$[N.w][N.c]=N.ur});const O=(N,ve)=>{const re=oe.filter(tt=>N.includes(tt.w)),ge=Oe?G.filter(tt=>N.includes(tt.w)).reduce((tt,St)=>tt+(St.rev||0),0):re.reduce((tt,St)=>tt+(St.s||0),0),de=Oe?G.filter(tt=>N.includes(tt.w)).reduce((tt,St)=>tt+(St.coll||0),0):re.reduce((tt,St)=>tt+(St.co||0),0),Se=N.reduce((tt,St)=>tt+Object.values(A[St]||{}).reduce((gi,hl)=>gi+hl,0),0);let Le=0,vt=0;N.forEach(tt=>{const St=$[tt]||{};Object.values(St).forEach(gi=>{gi!=null&&(Le+=gi,vt++)})});const sn={week:ve};return Yr.includes(he)&&(sn["Rev / Hour"]=Se>0?Math.round(ge/Se):null,sn["Coll / Hour"]=Se>0?Math.round(de/Se):null,sn["Utilization %"]=vt>0?+(Le/vt).toFixed(1):null),Yr.filter(tt=>tt!==he).forEach(tt=>{const St=re.filter(Qn=>Qn.c===tt).reduce((Qn,jo)=>Qn+(jo.s||0),0),gi=re.filter(Qn=>Qn.c===tt).reduce((Qn,jo)=>Qn+(jo.co||0),0),hl=N.reduce((Qn,jo)=>Qn+((A[jo]||{})[tt]||0),0);let Ub=0,fv=0;N.forEach(Qn=>{const jo=($[Qn]||{})[tt];jo!=null&&(Ub+=jo,fv++)}),sn[tt+" Rev/Hr"]=hl>0?Math.round(St/hl):null,sn[tt+" Coll/Hr"]=hl>0?Math.round(gi/hl):null,sn[tt+" Util%"]=fv>0?+(Ub/fv).toFixed(1):null}),sn};let k;if(!W.isMonthly)k=W.periods.map(N=>O([N],dt(N)));else{const N=new Date,ve=`${N.getFullYear()}-${String(N.getMonth()+1).padStart(2,"0")}`;k=W.periods.map(re=>O(Y.filter(ge=>ge.startsWith(re)),lt(re,re===ve)))}const I=[],F=[];return Yr.includes(he)&&(I.push("Rev / Hour","Coll / Hour","Utilization %"),F.push("Utilization %")),Yr.filter(N=>N!==he).forEach(N=>{I.push(N+" Rev/Hr",N+" Coll/Hr",N+" Util%"),F.push(N+" Util%")}),{revPerHourChartData:k,revPerHourSeries:I,revPerHourRightAxis:F}},[o,H,le,be,Yr,sa,R,ce,_e,Ce]),cu=_.useMemo(()=>il.length>0?il:pt.length>0?pt:be,[il,be,pt]),Cf=_.useMemo(()=>{const M=new Set(cu),oe=new Set(v.map(ie=>ie.pr)),J=new Set;return R.filter(ie=>M.has(ie.c)&&oe.has(ie.pr)).forEach(ie=>J.add(ie.pr)),[...J].sort()},[R,cu,v]);_.useEffect(()=>{Ct&&nl(null)},[cu]);const{revCollProvChartData:AE,revCollProvBarSeries:Wb,revCollProvLineSeries:_E}=_.useMemo(()=>{const M=new Set(cu),oe=new Set(v.map(A=>A.pr)),J=R.filter(A=>M.has(A.c)&&oe.has(A.pr)),ie=rl||Cf,ye=new Set(ie),Oe=[...new Set(J.map(A=>A.w))].sort(),{mode:fe,count:G}=Qe("revCollProv"),Y=nt(Oe,fe,G),z=(A,$)=>{const O={week:$},k={};return A.forEach(I=>{ye.has(I.pr)&&(k[I.pr]||(k[I.pr]={rev:0,coll:0}),k[I.pr].rev+=I.rev||0,k[I.pr].coll+=I.coll||0)}),Object.entries(k).forEach(([I,F])=>{O[I]=F.coll,O[I+" %"]=F.rev>0?+(F.coll/F.rev*100).toFixed(1):null}),O};let C;if(!Y.isMonthly)C=Y.periods.map(A=>z(J.filter($=>$.w===A),dt(A)));else{const A=new Date,$=`${A.getFullYear()}-${String(A.getMonth()+1).padStart(2,"0")}`;C=Y.periods.map(O=>z(J.filter(k=>k.w.startsWith(O)),lt(O,O===$)))}const W=ie.filter(A=>ye.has(A));return{revCollProvChartData:C,revCollProvBarSeries:W,revCollProvLineSeries:W.map(A=>A+" %")}},[R,cu,rl,Cf,v,ce,_e,Ce]);return ae?h.jsxs("div",{style:{minHeight:"100vh",background:T.cream,fontFamily:me.body,display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",gap:16},children:[h.jsx("div",{style:{width:48,height:48,border:`3px solid ${T.taupe}`,borderTopColor:T.gold,borderRadius:"50%",animation:"spin 1s linear infinite"}}),h.jsx("div",{style:{color:T.navy,fontFamily:me.heading,fontSize:18},children:"Loading Performance Data..."}),h.jsx("style",{children:"@keyframes spin { to { transform: rotate(360deg); } }"})]}):h.jsxs("div",{style:{minHeight:"100vh",background:T.cream,fontFamily:me.body,color:T.dark},children:[h.jsxs("div",{style:{position:"sticky",top:0,zIndex:100,background:T.navy,padding:"0 32px",display:"flex",alignItems:"center",justifyContent:"space-between",height:52,borderBottom:"1px solid rgba(255,255,255,0.08)"},children:[h.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[h.jsx("span",{style:{fontFamily:me.heading,fontSize:18,color:T.gold,letterSpacing:6},children:"A M P"}),h.jsx("span",{style:{color:"rgba(255,255,255,0.25)",fontSize:20,fontWeight:200},children:"|"}),h.jsx("span",{style:{fontFamily:me.body,fontSize:10,fontWeight:600,color:T.white,letterSpacing:2.5,textTransform:"uppercase"},children:"Advanced MedAesthetic Partners"})]}),h.jsx("div",{style:{fontFamily:me.body,fontSize:11,color:T.blush,letterSpacing:1,textTransform:"uppercase",fontWeight:600},children:"Performance Tracker"})]}),h.jsxs("div",{style:{maxWidth:1440,margin:"0 auto",padding:"32px 40px 80px"},children:[h.jsxs(uee,{children:[wf," · ",xf]}),h.jsx("h1",{style:{fontFamily:me.heading,fontSize:36,fontWeight:400,color:T.navy,margin:"0 0 4px"},children:"Performance Tracker"}),h.jsxs("p",{style:{fontSize:13,color:T.mauve,margin:"0 0 6px"},children:["Weekly performance metrics across ",Yn.length," location",Yn.length!==1?"s":"",".",Ee.length>0&&` Filtered to ${Ee.join(", ")}.`,ot.length>0&&` Practice: ${ot.join(", ")}.`]}),h.jsx("div",{style:{width:40,height:3,background:T.gold,borderRadius:2,marginBottom:28}}),pt.length===1&&h.jsx(dee,{location:pt[0],locations:n,metrics:o,dailyMetrics:l,opsData:u,btxData:c,syringeLocData:w,utilizationData:le,providerHoursData:H,injRevProviderData:v,btxProviderData:y,syringeProvData:j,revCollProvData:R,budgetData:p,metricsProviderData:Z,opsProviderData:ee,utilHoursProviderData:te}),h.jsxs("div",{style:{display:"flex",alignItems:"center",gap:16,padding:"16px 20px",background:T.white,borderRadius:10,border:`1px solid ${T.taupe}`,marginBottom:32,flexWrap:"wrap"},children:[!(t!=null&&t.length)&&!(r!=null&&r.length)&&h.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[h.jsx("label",{style:{fontSize:10,fontWeight:700,color:T.navy,letterSpacing:1.5,textTransform:"uppercase",fontFamily:me.body},children:"Location Type"}),h.jsx(qe,{label:"Location Type",options:e!=null&&e.length?e:iu,selected:Ee,onChange:it,minWidth:200})]}),!(r!=null&&r.length)&&h.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[h.jsx("label",{style:{fontSize:10,fontWeight:700,color:T.navy,letterSpacing:1.5,textTransform:"uppercase",fontFamily:me.body},children:"Practice"}),h.jsx(qe,{label:"Practice",options:t!=null&&t.length?t:ou,selected:ot,onChange:jt,minWidth:220})]}),h.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[h.jsx("label",{style:{fontSize:10,fontWeight:700,color:T.navy,letterSpacing:1.5,textTransform:"uppercase",fontFamily:me.body},children:"Location"}),Q?h.jsx("div",{style:{padding:"7px 12px",background:T.cream,border:`1.5px solid ${T.taupe}`,borderRadius:6,fontSize:12,fontFamily:me.body,color:T.navy,fontWeight:600},children:r[0]}):h.jsx(qe,{label:"Location",options:r!=null&&r.length?r:be,selected:pt,onChange:er,minWidth:220})]}),h.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[h.jsx("label",{style:{fontSize:10,fontWeight:700,color:T.navy,letterSpacing:1.5,textTransform:"uppercase",fontFamily:me.body},children:"VIEW"}),h.jsxs("select",{value:ce,onChange:M=>Et(M.target.value),style:{padding:"7px 10px",border:`1.5px solid ${T.taupe}`,borderRadius:6,fontSize:12,fontFamily:me.body,color:T.navy,background:T.cream,cursor:"pointer"},children:[h.jsx("option",{value:"weekly",children:"Weekly"}),h.jsx("option",{value:"monthly",children:"Monthly"}),h.jsx("option",{value:"mtd",children:"MTD"}),h.jsx("option",{value:"qtd",children:"QTD"}),h.jsx("option",{value:"ytd",children:"YTD"})]}),!["mtd","qtd","ytd"].includes(ce)&&h.jsx("select",{value:_e,onChange:M=>wt(Number(M.target.value)),style:{padding:"7px 10px",border:`1.5px solid ${T.taupe}`,borderRadius:6,fontSize:12,fontFamily:me.body,color:T.navy,background:T.cream,cursor:"pointer",minWidth:50},children:[1,2,3,4,5,6,7,8,9,10,11,12].map(M=>h.jsx("option",{value:M,children:M},M))})]}),!Q&&h.jsxs(h.Fragment,{children:[h.jsx("button",{onClick:()=>{it([]),jt([]),er([]);const M=["Total"];sl.forEach(oe=>oe([...M])),je(null),Be(null),Et("weekly"),wt(12),We({})},style:{marginLeft:"auto",padding:"7px 16px",background:"transparent",color:T.navy,border:`1.5px solid ${T.taupe}`,borderRadius:5,fontFamily:me.body,fontSize:11,fontWeight:600,cursor:"pointer",letterSpacing:.3},children:"Clear Filters"}),h.jsxs("div",{style:{padding:"7px 13px",background:T.gold,color:T.navy,fontFamily:me.body,fontSize:10,fontWeight:700,letterSpacing:.3,borderRadius:5},children:[Yn.length," of ",n.length," Locations"]})]})]}),h.jsx("div",{onClick:()=>$r("section1"),style:{cursor:"pointer",userSelect:"none"},children:h.jsx($u,{number:"1",title:`Top Line Performance Deep Dive ${Dt.section1?"▸":""}`})}),h.jsxs("div",{style:{display:Dt.section1?"none":"block"},children:[h.jsx("div",{style:{marginBottom:24},children:h.jsx(_t,{title:"Revenue vs Budget",headerRight:h.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[h.jsx(Mt,{chartId:"revChart",globalMode:ce,globalCount:_e,overrides:Ce,setOverrides:We}),h.jsx(qe,{label:"Location",options:["Total",...be],selected:tr,onChange:Us,minWidth:85})]}),children:h.jsx(Nt,{data:pl,series:Fb,height:300,formatter:Tn,colorMap:{"All Locations":T.gold,Budget:T.navy,...Wt}})})}),h.jsx("div",{style:{marginBottom:24},children:h.jsx(_t,{title:"Collections vs Budget",headerRight:h.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[h.jsx(Mt,{chartId:"collChart",globalMode:ce,globalCount:_e,overrides:Ce,setOverrides:We}),h.jsx(qe,{label:"Location",options:["Total",...be],selected:Fr,onChange:on,minWidth:85})]}),children:h.jsx(Nt,{data:Of,series:uv,height:300,formatter:Tn,colorMap:{"All Locations":T.gold,Budget:T.navy,...Wt},rightAxisSeries:Fr.filter(M=>M!=="Total")})})}),h.jsx("div",{style:{marginBottom:24},children:h.jsx(_t,{title:"Revenue vs Collections (with Collections % of Revenue)",tooltip:"Revenue and Collections on the left axis; Collections as a percentage of Revenue shown as a dotted line on the right axis",headerRight:h.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[h.jsx(Mt,{chartId:"revCollAppendix",globalMode:ce,globalCount:_e,overrides:Ce,setOverrides:We}),h.jsx(qe,{label:"Location",options:["Total",...be],selected:fo,onChange:an,minWidth:85})]}),children:h.jsx(Nt,{data:vE,series:yE,height:300,formatter:Tn,rightAxisFormatter:Li,colorMap:{Revenue:T.gold,Collections:T.navy,"Coll % of Rev":T.red,...Wt},rightAxisSeries:gE||[]})})})]}),h.jsx("div",{onClick:()=>$r("section2"),style:{cursor:"pointer",userSelect:"none"},children:h.jsx($u,{number:"2",title:`Core KPIs ${Dt.section2?"▸":""}`})}),h.jsxs("div",{style:{display:Dt.section2?"none":"block"},children:[h.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:24,marginBottom:24},children:[h.jsx(_t,{title:"Revenue",tooltip:"Total revenue per week by location or provider",headerRight:h.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[h.jsx(Mt,{chartId:"revWeek",globalMode:ce,globalCount:_e,overrides:Ce,setOverrides:We}),!Q&&h.jsx(qe,{label:"Location",options:["Total",...be],selected:Vn,onChange:mf,minWidth:85}),Q&&q.length>0&&h.jsx(qe,{label:"Provider",options:q,selected:ho||q,onChange:eu,minWidth:85})]}),children:h.jsx(Nt,{data:Ve,series:Ne,height:300,formatter:Tn,colorMap:rt?ke:{Total:T.gold,...Wt},rightAxisSeries:rt?[]:Vn.filter(M=>M!=="Total")})}),h.jsx(_t,{title:"Revenue Per Net Provider Hour",tooltip:"Revenue divided by net provider hours worked per week",headerRight:h.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[h.jsx(Mt,{chartId:"revPerHour2",globalMode:ce,globalCount:_e,overrides:Ce,setOverrides:We}),!Q&&h.jsx(qe,{label:"Location",options:["Total",...be],selected:vo,onChange:bf,minWidth:85}),Q&&q.length>0&&h.jsx(qe,{label:"Provider",options:q,selected:yo||q,onChange:tu,minWidth:85})]}),children:h.jsx(Nt,{data:wE,series:SE,height:300,formatter:py,colorMap:rt?ke:{Total:T.gold,...Wt},rightAxisSeries:[]})})]}),h.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:24,marginBottom:24},children:[h.jsx(_t,{title:"Collections-Generating Unique Patients",tooltip:"Count of unique patients who generated collections each week",headerRight:h.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[h.jsx(Mt,{chartId:"uniquePt",globalMode:ce,globalCount:_e,overrides:Ce,setOverrides:We}),!Q&&h.jsx(qe,{label:"Location",options:["Total",...be],selected:Cr,onChange:pi,minWidth:85}),Q&&q.length>0&&h.jsx(qe,{label:"Provider",options:q,selected:ln||q,onChange:go,minWidth:85})]}),children:h.jsx(Nt,{data:rr,series:gr,height:300,formatter:M=>M==null?void 0:M.toLocaleString(),colorMap:sr?ke:{Total:T.gold,...Wt},rightAxisSeries:sr?[]:Cr.filter(M=>M!=="Total")})}),h.jsx(_t,{title:"Avg Revenue Per Patient",tooltip:"Average revenue per unique patient visit by location",headerRight:h.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[h.jsx(Mt,{chartId:"avgRev",globalMode:ce,globalCount:_e,overrides:Ce,setOverrides:We}),!Q&&h.jsx(qe,{label:"Location",options:["Total",...be],selected:Br,onChange:Er,minWidth:85}),Q&&q.length>0&&h.jsx(qe,{label:"Provider",options:q,selected:hi||q,onChange:ua,minWidth:85})]}),children:h.jsx(Nt,{data:kt,series:at,height:300,formatter:py,colorMap:ct?ke:{Total:T.gold,...Wt},rightAxisSeries:ct?[]:Br.filter(M=>M!=="Total")})})]}),h.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:24,marginBottom:24},children:[h.jsx(_t,{title:"Retail Sales",tooltip:"Total retail product sales by location per week",headerRight:h.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[h.jsx(Mt,{chartId:"retail",globalMode:ce,globalCount:_e,overrides:Ce,setOverrides:We}),!Q&&h.jsx(qe,{label:"Location",options:["Total",...be],selected:lr,onChange:Hs,minWidth:85}),Q&&q.length>0&&h.jsx(qe,{label:"Provider",options:q,selected:ki||q,onChange:ru,minWidth:85})]}),children:h.jsx(Nt,{data:nr,series:Ii,height:300,formatter:Tn,colorMap:qn?ke:{Total:T.gold,...Wt},rightAxisSeries:qn?[]:lr.filter(M=>M!=="Total")})}),h.jsx(_t,{title:"Retail Sales as % of Total Sales",tooltip:"Retail revenue as a percentage of total location revenue. Goal: >7.5%",headerRight:h.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[h.jsx(Mt,{chartId:"retailPct",globalMode:ce,globalCount:_e,overrides:Ce,setOverrides:We}),!Q&&h.jsx(qe,{label:"Location",options:["Total",...be],selected:Pr,onChange:ff,minWidth:85}),Q&&q.length>0&&h.jsx(qe,{label:"Provider",options:q,selected:Kn||q,onChange:mo,minWidth:85})]}),children:h.jsx(Nt,{data:fa,series:So,height:300,formatter:Li,colorMap:Ri?ke:{Total:T.gold,...Wt},rightAxisSeries:Ri?[]:Pr.filter(M=>M!=="Total")})})]}),h.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:24,marginBottom:24},children:[h.jsx(_t,{title:"Patient Cancellation Rate",tooltip:"Percentage of appointments cancelled per week by location. Goal: <5%",headerRight:h.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[h.jsx(Mt,{chartId:"cancel",globalMode:ce,globalCount:_e,overrides:Ce,setOverrides:We}),!Q&&h.jsx(qe,{label:"Location",options:["Total",...be],selected:zr,onChange:Vs,minWidth:85}),Q&&q.length>0&&h.jsx(qe,{label:"Provider",options:q,selected:xo||q,onChange:nu,minWidth:85})]}),children:h.jsx(Nt,{data:uu,series:fl,height:300,formatter:Li,colorMap:da?ke:{Total:T.gold,...Wt},rightAxisSeries:da?[]:zr.filter(M=>M!==he)})}),h.jsx(_t,{title:"Patient No-Show Rate",tooltip:"Percentage of appointments that were no-shows per week. Goal: <5%",headerRight:h.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[h.jsx(Mt,{chartId:"noshow",globalMode:ce,globalCount:_e,overrides:Ce,setOverrides:We}),!Q&&h.jsx(qe,{label:"Location",options:["Total",...be],selected:Un,onChange:tl,minWidth:85}),Q&&q.length>0&&h.jsx(qe,{label:"Provider",options:q,selected:Mi||q,onChange:ll,minWidth:85})]}),children:h.jsx(Nt,{data:Sf,series:dl,height:300,formatter:Li,colorMap:Pf?ke:{Total:T.gold,...Wt},rightAxisSeries:Pf?[]:Un.filter(M=>M!==he)})})]}),h.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:24,marginBottom:24},children:[h.jsx(_t,{title:"Utilization Rate",tooltip:"Average provider utilization rate (booked hours / scheduled hours). Goal: >70%",headerRight:h.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[h.jsx(Mt,{chartId:"utilization",globalMode:ce,globalCount:_e,overrides:Ce,setOverrides:We}),!Q&&h.jsx(qe,{label:"Location",options:["Total",...be],selected:wn,onChange:Ks,minWidth:85}),Q&&q.length>0&&h.jsx(qe,{label:"Provider",options:q,selected:bo||q,onChange:ca,minWidth:85})]}),children:h.jsx(Nt,{data:ft,series:Me,height:300,formatter:Li,colorMap:et?ke:{Total:T.gold,...Wt},rightAxisSeries:et?[]:wn.filter(M=>M!==he)})}),h.jsx(_t,{title:"Net Provider Hours",tooltip:"Total net scheduled provider hours (scheduled hours minus blockout hours) by location per week",headerRight:h.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[h.jsx(Mt,{chartId:"netHours",globalMode:ce,globalCount:_e,overrides:Ce,setOverrides:We}),!Q&&h.jsx(qe,{label:"Location",options:["Total",...be],selected:Sn,onChange:vf,minWidth:85}),Q&&q.length>0&&h.jsx(qe,{label:"Provider",options:q,selected:Gn||q,onChange:al,minWidth:85})]}),children:h.jsx(Nt,{data:mr,series:Po,height:300,formatter:M=>M!=null?`${M.toLocaleString()} hrs`:"",colorMap:cl?ke:{Total:T.gold,...Wt},rightAxisSeries:cl?[]:Sn.filter(M=>M!==he)})})]})]}),h.jsx("div",{onClick:()=>$r("section3"),style:{cursor:"pointer",userSelect:"none"},children:h.jsx($u,{number:"3",title:`Service Mix Shift ${Dt.section3?"▸":""}`})}),h.jsx("div",{style:{display:Dt.section3?"none":"block"},children:h.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:24,marginBottom:24},children:[h.jsx(_t,{title:"Total Inject. Sales",tooltip:"All injectable revenue (neuromodulators + fillers) by location",headerRight:h.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[h.jsx(Mt,{chartId:"injSales",globalMode:ce,globalCount:_e,overrides:Ce,setOverrides:We}),!Q&&h.jsx(qe,{label:"Location",options:["Total",...be],selected:yr,onChange:df,minWidth:85}),Q&&q.length>0&&h.jsx(qe,{label:"Provider",options:q,selected:wo||q,onChange:sv,minWidth:85})]}),children:h.jsx(Nt,{data:Xn,series:yi,height:300,formatter:Tn,colorMap:ul?ke:{Total:T.gold,...Wt},rightAxisSeries:ul?[]:yr.filter(M=>M!=="Total")})}),h.jsx(_t,{title:"Inject. Sales as % of Total Sales",tooltip:"Injectable revenue share of total sales by location",headerRight:h.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[h.jsx(Mt,{chartId:"injPct",globalMode:ce,globalCount:_e,overrides:Ce,setOverrides:We}),!Q&&h.jsx(qe,{label:"Location",options:["Total",...be],selected:Wn,onChange:pf,minWidth:85}),Q&&q.length>0&&h.jsx(qe,{label:"Provider",options:q,selected:ht||q,onChange:vi,minWidth:85})]}),children:h.jsx(Nt,{data:lu,series:su,height:300,formatter:Li,colorMap:xe?ke:{Total:T.gold,...Wt},rightAxisSeries:xe?[]:Wn.filter(M=>M!=="Total")})})]})}),h.jsx("div",{onClick:()=>$r("section4"),style:{cursor:"pointer",userSelect:"none"},children:h.jsx($u,{number:"4",title:`Provider Productivity ${Dt.section4?"▸":""}`})}),h.jsxs("div",{style:{display:Dt.section4?"none":"block"},children:[h.jsx("div",{style:{marginBottom:24},children:h.jsx(_t,{title:"Revenue vs Collections (with Net Scheduled Provider Hours)",tooltip:"Revenue and Collections on the left axis; Net Scheduled Provider Hours as dotted line on the right axis",headerRight:h.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap"},children:[h.jsx(Mt,{chartId:"revCollHours",globalMode:ce,globalCount:_e,overrides:Ce,setOverrides:We}),!Q&&h.jsx(qe,{label:"Location",options:["Total",...be],selected:so,onChange:Ys,minWidth:85}),h.jsx(qe,{label:"Provider",options:Ef,selected:Zs||Ef,onChange:Js,minWidth:85})]}),children:h.jsx(Nt,{data:mE,series:bE,height:300,formatter:Tn,rightAxisFormatter:M=>M!=null?`${M.toLocaleString()} hrs`:"",colorMap:{Revenue:T.gold,Collections:T.navy,"Net Sched Hours":"#4A7C6F",...Wt},rightAxisSeries:xE||[]})})}),h.jsx("div",{style:{marginBottom:24},children:h.jsx(_t,{title:"Revenue & Collections per Provider Hour (with Utilization Rate)",tooltip:"Revenue and Collections per net scheduled provider hour on primary axis; Utilization rate as dotted line on secondary axis",headerRight:h.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap"},children:[h.jsx(Mt,{chartId:"revPerHour",globalMode:ce,globalCount:_e,overrides:Ce,setOverrides:We}),!Q&&h.jsx(qe,{label:"Location",options:["Total",...be],selected:Yr,onChange:yf,minWidth:85}),h.jsx(qe,{label:"Provider",options:Ef,selected:sa||Ef,onChange:ol,minWidth:85})]}),children:h.jsx(Nt,{data:PE,series:OE,height:300,formatter:py,rightAxisFormatter:Li,colorMap:{"Rev / Hour":T.gold,"Coll / Hour":T.navy,"Utilization %":T.green,...Wt},rightAxisSeries:jE||[]})})}),h.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:24,marginBottom:24},children:[h.jsx(_t,{title:"Neurotoxin vs Dermal Filler Sales",tooltip:"Neurotoxin and filler revenue split by location",headerRight:h.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[h.jsx(Mt,{chartId:"ntxFiller",globalMode:ce,globalCount:_e,overrides:Ce,setOverrides:We}),!Q&&h.jsx(qe,{label:"Location",options:["Total",...be],selected:Pn,onChange:Gs,minWidth:85})]}),children:h.jsx(Nt,{data:zb,series:$f,height:300,formatter:Tn,colorMap:{"Neurotoxin (Total)":T.gold,"Filler (Total)":T.navy,...Wt},rightAxisSeries:Pn.filter(M=>M!==he).flatMap(M=>[M+" NTX",M+" Filler"])})}),h.jsx(_t,{title:"Inject. Revenue by Provider",tooltip:"Weekly injectable revenue by provider for filtered locations",headerRight:Ct?h.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[h.jsx(Mt,{chartId:"injRevProv",globalMode:ce,globalCount:_e,overrides:Ce,setOverrides:We}),h.jsx(qe,{label:"Provider",options:q,selected:V||q,onChange:je,minWidth:85})]}):null,children:Ct?h.jsx(Nt,{data:_f,series:cv,height:300,formatter:Tn,colorMap:ke}):h.jsx("div",{style:{height:320,display:"flex",alignItems:"center",justifyContent:"center",color:T.gray,fontFamily:me.body,fontSize:13},children:"Select a Location Type, Practice, or Location filter to view provider data"})})]}),h.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:24,marginBottom:24},children:[ze?h.jsx(_t,{title:"Avg Botox Units per Botox Appt",tooltip:"Average units per unique botox appointment by location",headerRight:h.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[h.jsx(Mt,{chartId:"btxLoc",globalMode:ce,globalCount:_e,overrides:Ce,setOverrides:We}),!Q&&h.jsx(qe,{label:"Location",options:["Total",...be],selected:Gr,onChange:hf,minWidth:85})]}),children:h.jsx(Nt,{data:ze,series:Ye,height:300,formatter:M=>`${M} units`,colorMap:{Total:T.gold,...Wt},rightAxisSeries:Gr.filter(M=>M!=="Total")})}):h.jsx(fee,{title:"Avg Botox Units per Botox Appt",message:"Botox unit data will be populated in the next iteration"}),h.jsx(_t,{title:"Avg Botox Units per Botox Appt by Provider",tooltip:"Average botox units per appointment by provider for filtered locations",headerRight:Ct?h.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[h.jsx(Mt,{chartId:"btxProv",globalMode:ce,globalCount:_e,overrides:Ce,setOverrides:We}),h.jsx(qe,{label:"Provider",options:$e,selected:Ae||$e,onChange:Be,minWidth:85})]}):null,children:Ct?h.jsx(Nt,{data:Di,series:Tf,height:300,formatter:M=>`${M} units`,colorMap:ke}):h.jsx("div",{style:{height:300,display:"flex",alignItems:"center",justifyContent:"center",color:T.gray,fontFamily:me.body,fontSize:13},children:"Select a Location Type, Practice, or Location filter to view provider data"})})]}),h.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:24,marginBottom:24},children:[h.jsx(_t,{title:"Avg Filler Syringes Per Inject. Appt",tooltip:"Average filler syringes dispensed per unique injectable appointment (includes non-filler inj appointments)",headerRight:h.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[h.jsx(Mt,{chartId:"syrInjLoc",globalMode:ce,globalCount:_e,overrides:Ce,setOverrides:We}),!Q&&h.jsx(qe,{label:"Location",options:["Total",...be],selected:uo,onChange:qs,minWidth:85})]}),children:h.jsx(Nt,{data:Fe,series:Vt,height:300,formatter:M=>M!=null?`${M} syr`:"",colorMap:{Total:T.gold,...Wt},rightAxisSeries:uo.filter(M=>M!==he)})}),h.jsx(_t,{title:"Avg Filler Syringes Per Inject. Appt by Provider",tooltip:"Average filler syringes per injectable appointment broken down by provider",headerRight:Ct?h.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[h.jsx(Mt,{chartId:"syrInjProv",globalMode:ce,globalCount:_e,overrides:Ce,setOverrides:We}),h.jsx(qe,{label:"Provider",options:Oo,selected:Xs||Oo,onChange:On,minWidth:85})]}):null,children:Ct?h.jsx(Nt,{data:fE,series:dE,height:300,formatter:M=>M!=null?`${M} syr`:"",colorMap:ke}):h.jsx("div",{style:{height:300,display:"flex",alignItems:"center",justifyContent:"center",color:T.gray,fontFamily:me.body,fontSize:13},children:"Select a Location Type, Practice, or Location filter to view provider data"})})]}),h.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:24,marginBottom:24},children:[h.jsx(_t,{title:"Avg Filler Syringes Per Filler Appt",tooltip:"Average filler syringes dispensed per filler-only appointment (excludes neurotoxin-only visits)",headerRight:h.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[h.jsx(Mt,{chartId:"syrFillerLoc",globalMode:ce,globalCount:_e,overrides:Ce,setOverrides:We}),!Q&&h.jsx(qe,{label:"Location",options:["Total",...be],selected:co,onChange:gf,minWidth:85})]}),children:h.jsx(Nt,{data:uE,series:cE,height:300,formatter:M=>M!=null?`${M} syr`:"",colorMap:{Total:T.gold,...Wt},rightAxisSeries:co.filter(M=>M!==he)})}),h.jsx(_t,{title:"Avg Filler Syringes Per Filler Appt by Provider",tooltip:"Average filler syringes per filler appointment broken down by provider",headerRight:Ct?h.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[h.jsx(Mt,{chartId:"syrFillerProv",globalMode:ce,globalCount:_e,overrides:Ce,setOverrides:We}),h.jsx(qe,{label:"Provider",options:Oo,selected:Qs||Oo,onChange:Hn,minWidth:85})]}):null,children:Ct?h.jsx(Nt,{data:pE,series:hE,height:300,formatter:M=>M!=null?`${M} syr`:"",colorMap:ke}):h.jsx("div",{style:{height:300,display:"flex",alignItems:"center",justifyContent:"center",color:T.gray,fontFamily:me.body,fontSize:13},children:"Select a Location Type, Practice, or Location filter to view provider data"})})]})]}),h.jsx("div",{onClick:()=>$r("appendix"),style:{cursor:"pointer",userSelect:"none"},children:h.jsx($u,{number:"A",title:`Appendix ${Dt.appendix?"▸":""}`})}),h.jsxs("div",{style:{display:Dt.appendix?"none":"block"},children:[h.jsx("div",{style:{marginBottom:24},children:h.jsx(_t,{title:"Revenue vs Collections by Provider (with Coll % of Rev)",tooltip:"Revenue and Collections per provider on the left axis; Collections as a percentage of Revenue shown as dotted lines on the right axis",headerRight:Ct?h.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[h.jsx(Mt,{chartId:"revCollProv",globalMode:ce,globalCount:_e,overrides:Ce,setOverrides:We}),!Q&&h.jsx(qe,{label:"Location",options:be,selected:il,onChange:po,minWidth:85}),h.jsx(qe,{label:"Provider",options:Cf,selected:rl||Cf,onChange:nl,minWidth:85})]}):null,children:Ct?h.jsx(z_,{width:"100%",height:300,children:h.jsxs(lee,{data:AE,margin:{top:8,right:48,left:0,bottom:0},children:[h.jsx(Lb,{strokeDasharray:"3 3",stroke:T.taupe}),h.jsx(Ws,{dataKey:"week",tick:{fontSize:11,fontFamily:me.body,fill:T.gray}}),h.jsx(Zo,{yAxisId:"left",tick:{fontSize:11,fontFamily:me.body,fill:T.gray},tickFormatter:Tn}),h.jsx(Zo,{yAxisId:"right",orientation:"right",tick:{fontSize:10,fontFamily:me.body,fill:T.goldMuted},tickFormatter:Li,stroke:T.goldLight}),h.jsx(ri,{content:({active:M,payload:oe,label:J})=>!M||!oe?null:h.jsxs("div",{style:{background:T.navy,border:"none",borderRadius:6,padding:"8px 12px",fontFamily:me.body,fontSize:12},children:[h.jsx("div",{style:{color:T.gold,fontWeight:600,marginBottom:4},children:J}),oe.map((ie,ye)=>h.jsxs("div",{style:{display:"flex",justifyContent:"space-between",gap:16,padding:"1px 0"},children:[h.jsx("span",{style:{color:sE(ie.color||ie.fill||ie.stroke)},children:ie.name}),h.jsx("span",{style:{color:T.cream,fontWeight:600},children:ie.name.endsWith("%")?Li(ie.value):Tn(ie.value)})]},ye))]})}),h.jsx(Yo,{wrapperStyle:{fontFamily:me.body,fontSize:10},iconType:"rect"}),Wb.map((M,oe)=>h.jsx(Qa,{yAxisId:"left",dataKey:M,fill:ke[M]||En[oe%En.length],fillOpacity:.85,name:M,barSize:Wb.length>6?8:14},M)),_E.map((M,oe)=>h.jsx(Za,{yAxisId:"right",type:"monotone",dataKey:M,stroke:ke[M.replace(" %","")]||En[oe%En.length],strokeWidth:2,strokeDasharray:"6 3",dot:{r:3},activeDot:{r:5},connectNulls:!0,name:M},M))]})}):h.jsx("div",{style:{height:400,display:"flex",alignItems:"center",justifyContent:"center",color:T.gray,fontFamily:me.body,fontSize:13},children:"Select a Location Type, Practice, or Location filter to view provider data"})})}),h.jsx("div",{style:{marginBottom:24},children:h.jsx(_t,{title:"Service Mix by Location",tooltip:"Revenue breakdown by service category per location for the selected period",children:h.jsx(cee,{data:jf})})})]}),h.jsxs("div",{style:{marginTop:48,paddingTop:24,borderTop:`1px solid ${T.taupe}`,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[h.jsxs("div",{style:{fontSize:11,color:T.gray},children:["AMP Intelligence · Performance Tracker · ",wf]}),h.jsxs("div",{style:{fontSize:11,color:T.gray},children:["Data sourced from CorralData · ",xf]})]})]})]})}const Ze={navy:"#041E42",gold:"#B9975B",goldLight:"#CDB5A7",cream:"#FAF8F7",taupe:"#E4D5D3",light:"#f0eae9",gray:"#948794",dark:"#2a1f28",white:"#FFFFFF",red:"#C0392B",green:"#1A6B3C"},vn={heading:"'GFS Didot', Didot, Georgia, serif",body:"'Nunito Sans', 'Avenir Next', Avenir, sans-serif"},JP=["2026-03-30","2026-04-06","2026-04-13","2026-04-20"],eO=["2026-04-20"],tO=["2026-03-02","2026-03-09","2026-03-16","2026-03-23"],qt=(e,t=2)=>(e||0).toLocaleString("en-US",{minimumFractionDigits:t,maximumFractionDigits:t}),Eu=(e,t=0)=>"$"+qt(e,t);function rO(){return h.jsxs("div",{style:{background:Ze.navy,padding:"20px 32px",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[h.jsxs("div",{style:{display:"flex",alignItems:"center",gap:16},children:[h.jsx("a",{href:"/",style:{textDecoration:"none"},children:h.jsx("span",{style:{fontFamily:vn.heading,fontSize:16,color:Ze.gold,letterSpacing:6},children:"A M P"})}),h.jsx("span",{style:{color:"rgba(255,255,255,0.2)",fontSize:20},children:"|"}),h.jsx("span",{style:{fontSize:10,fontWeight:700,color:Ze.white,letterSpacing:2,textTransform:"uppercase",fontFamily:vn.body},children:"ADVANCED MEDAESTHETIC PARTNERS"})]}),h.jsx("span",{style:{fontSize:9,fontWeight:600,color:Ze.goldLight,letterSpacing:2,textTransform:"uppercase",fontFamily:vn.body},children:"PM HOURS-REDUCTION BRIEFING"})]})}function bi({value:e,unit:t="",digits:r=2,suffix:n=""}){const i=e||0,o=i>1e-4?Ze.green:i<-1e-4?Ze.red:Ze.gray,a=i>1e-4?"+":(i<-1e-4,""),l=t==="$"?`${a}$${qt(Math.abs(i),r)}${i<0,""}`:`${a}${qt(i,r)}${t}`,s=i<0&&t==="$"?`-$${qt(Math.abs(i),r)}`:l;return h.jsxs("span",{style:{color:o,fontWeight:600},children:[s,n]})}function xl({label:e,value:t,sub:r}){return h.jsxs("div",{style:{background:Ze.white,borderRadius:8,border:`1px solid ${Ze.taupe}`,padding:"14px 18px"},children:[h.jsx("div",{style:{fontSize:10,fontWeight:700,textTransform:"uppercase",letterSpacing:1.5,color:Ze.gold,marginBottom:8,fontFamily:vn.body},children:e}),h.jsx("div",{style:{fontFamily:vn.heading,fontSize:28,color:Ze.navy,fontWeight:400,lineHeight:1},children:t}),r&&h.jsx("div",{style:{fontSize:11,color:Ze.gray,marginTop:6,fontFamily:vn.body},children:r})]})}function Cu({children:e,lede:t}){return h.jsxs("div",{style:{marginTop:28,marginBottom:12},children:[h.jsx("h2",{style:{fontFamily:vn.heading,fontSize:22,fontWeight:400,color:Ze.navy,margin:0},children:e}),t&&h.jsx("div",{style:{fontSize:12,color:Ze.gray,marginTop:4,fontFamily:vn.body},children:t}),h.jsx("div",{style:{width:32,height:2,background:Ze.gold,borderRadius:2,marginTop:8}})]})}function cd({headers:e,rows:t,totalRow:r}){return h.jsx("div",{style:{background:Ze.white,borderRadius:8,border:`1px solid ${Ze.taupe}`,overflow:"hidden",marginTop:8},children:h.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontFamily:vn.body},children:[h.jsx("thead",{children:h.jsx("tr",{children:e.map((n,i)=>h.jsx("th",{style:{background:Ze.navy,color:Ze.gold,padding:"10px 14px",textAlign:i===0?"left":"right",fontSize:10,letterSpacing:1.2,textTransform:"uppercase",fontWeight:700},children:n},i))})}),h.jsxs("tbody",{children:[t.map((n,i)=>h.jsx("tr",{style:{background:i%2===0?Ze.white:Ze.cream},children:n.map((o,a)=>h.jsx("td",{style:{padding:"9px 14px",textAlign:a===0?"left":"right",borderBottom:`1px solid ${Ze.light}`,color:Ze.dark,fontSize:12.5},children:o},a))},i)),r&&h.jsx("tr",{style:{background:Ze.light},children:r.map((n,i)=>h.jsx("td",{style:{padding:"11px 14px",textAlign:i===0?"left":"right",color:Ze.navy,fontSize:12.5,fontWeight:700,borderTop:`2px solid ${Ze.gold}`},children:n},i))})]})]})})}function pee(){const{location:e}=yh(),t=decodeURIComponent(e||""),[r,n]=_.useState(null);_.useEffect(()=>{Promise.all([fetch("/data/performance/weekly-rev-coll-provider.json").then(v=>v.json()),fetch("/data/performance/weekly-util-hours-provider.json").then(v=>v.json()),fetch("/data/performance/weekly-metrics.json").then(v=>v.json()),fetch("/data/performance/weekly-utilization.json").then(v=>v.json()),fetch("/data/performance/weekly-provider-hours.json").then(v=>v.json())]).then(([v,b,y,g,x])=>n({revColl:v,utilH:b,metrics:y,utilLoc:g,provHrs:x}))},[]);const i=_.useMemo(()=>{if(!r)return null;const{revColl:v,utilH:b,metrics:y,utilLoc:g,provHrs:x}=r,P=X=>{const ee={};return b.filter(U=>U.c===t&&X.includes(U.w)).forEach(U=>{ee[U.pr]=ee[U.pr]||{rev:0,coll:0,h:0,sh:0},ee[U.pr].h+=U.h||0,ee[U.pr].sh+=U.sh||0}),v.filter(U=>U.c===t&&X.includes(U.w)).forEach(U=>{ee[U.pr]=ee[U.pr]||{rev:0,coll:0,h:0,sh:0},ee[U.pr].rev+=U.rev||0,ee[U.pr].coll+=U.coll||0}),ee},w=X=>{let ee=0,U=0,te=0,ue=0,ae=0;return y.filter(pe=>pe.c===t&&X.includes(pe.w)).forEach(pe=>{ee+=pe.s||0,U+=pe.co||0}),x.filter(pe=>pe.c===t&&X.includes(pe.w)).forEach(pe=>{te+=pe.h||0}),g.filter(pe=>pe.c===t&&X.includes(pe.w)&&pe.ur!=null).forEach(pe=>{ue+=pe.ur,ae+=1}),{rev:ee,coll:U,h:te,ur:ae>0?ue/ae:0}},S=P(JP),j=P(eO),E=P(tO),R=w(JP),K=w(eO),H=w(tO),le=[...new Set([...Object.keys(S),...Object.keys(j),...Object.keys(E)])].map(X=>{const ee=S[X]||{rev:0,coll:0,h:0,sh:0},U=j[X]||{rev:0,coll:0,h:0,sh:0},te=E[X]||{rev:0,coll:0,h:0,sh:0};return{pr:X,h4:ee.h,sh4:ee.sh,ur4:ee.h>0?ee.sh/ee.h*100:0,rh4:ee.h>0?ee.rev/ee.h:0,ch4:ee.h>0?ee.coll/ee.h:0,h1:U.h,sh1:U.sh,ur1:U.h>0?U.sh/U.h*100:0,rh1:U.h>0?U.rev/U.h:0,ch1:U.h>0?U.coll/U.h:0,hP:te.h,urP:te.h>0?te.sh/te.h*100:0,rhP:te.h>0?te.rev/te.h:0,chP:te.h>0?te.coll/te.h:0,hWk4:ee.h/4,hWkP:te.h/4}}).filter(X=>X.h4>0||X.h1>0).sort((X,ee)=>ee.h4-X.h4),ne=le.map(X=>{if(X.h4===0)return null;const ee=Math.max(0,X.h4-X.sh4/.75)/4;return{pr:X.pr,ur4:X.ur4,hWk4:X.hWk4,ch4:X.ch4,cut:ee,pct:X.hWk4>0?ee/X.hWk4*100:0}}).filter(X=>X&&X.cut>.5).sort((X,ee)=>ee.cut-X.cut),Z=ne.reduce((X,ee)=>X+ee.cut,0);return{rows:le,cuts:ne,totalCut:Z,d4:R,d1:K,dP:H}},[r,t]);if(!r||!i)return h.jsxs("div",{style:{minHeight:"100vh",background:Ze.cream,fontFamily:vn.body,padding:40},children:[h.jsx(rO,{}),"Loading…"]});const{rows:o,cuts:a,totalCut:l,d4:s,d1:u,dP:f}=i,c=s.h>0?s.rev/s.h:0,d=s.h>0?s.coll/s.h:0,p=f.h>0?f.rev/f.h:0,m=f.h>0?f.coll/f.h:0;return h.jsxs("div",{style:{minHeight:"100vh",background:Ze.cream,fontFamily:vn.body},children:[h.jsx(rO,{}),h.jsxs("div",{style:{maxWidth:1100,margin:"0 auto",padding:"40px 32px"},children:[h.jsx("div",{style:{fontSize:10,fontWeight:700,textTransform:"uppercase",letterSpacing:1.5,color:Ze.gold,marginBottom:8},children:"Provider Hour Productivity"}),h.jsx("h1",{style:{fontFamily:vn.heading,fontSize:36,fontWeight:400,color:Ze.navy,margin:"0 0 6px"},children:t}),h.jsx("div",{style:{fontSize:13,color:Ze.gray},children:"4 weeks ending 4/20/2026 · Generated 4/26/2026"}),h.jsx("div",{style:{width:40,height:3,background:Ze.gold,borderRadius:2,marginTop:14,marginBottom:24}}),h.jsx(Cu,{lede:"Comparison vs prior 4 weeks (3/02 – 3/23). Matches dashboard methodology.",children:"Location Snapshot — Last 4 Weeks"}),h.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:14},children:[h.jsx(xl,{label:"Provider Hours",value:qt(s.h,0),sub:h.jsxs(h.Fragment,{children:[h.jsx(bi,{value:s.h-f.h,digits:1})," vs prior 4w"]})}),h.jsx(xl,{label:"Utilization",value:`${qt(s.ur,1)}%`,sub:h.jsxs(h.Fragment,{children:[h.jsx(bi,{value:s.ur-f.ur,digits:1,suffix:"pp"})," vs prior 4w"]})}),h.jsx(xl,{label:"Collections / Hour",value:`$${qt(d,0)}`,sub:h.jsxs(h.Fragment,{children:[h.jsx(bi,{value:d-m,unit:"$"})," vs prior 4w"]})}),h.jsx(xl,{label:"Revenue",value:`$${qt(s.rev,0)}`,sub:h.jsxs(h.Fragment,{children:[h.jsx(bi,{value:s.rev-f.rev,unit:"$",digits:0})," vs prior 4w"]})}),h.jsx(xl,{label:"Collections",value:`$${qt(s.coll,0)}`,sub:h.jsxs(h.Fragment,{children:[h.jsx(bi,{value:s.coll-f.coll,unit:"$",digits:0})," vs prior 4w"]})}),h.jsx(xl,{label:"Revenue / Hour",value:`$${qt(c,0)}`,sub:h.jsxs(h.Fragment,{children:[h.jsx(bi,{value:c-p,unit:"$"})," vs prior 4w"]})})]}),h.jsx(Cu,{lede:"Rev/h and Coll/h reflect provider-attributed dollars only.",children:"By Provider — Last 4 Weeks"}),h.jsx(cd,{headers:["Provider","Hrs/wk","Booked/wk","Util %","Rev / h","Coll / h"],rows:o.map(v=>[v.pr,qt(v.hWk4,1),qt(v.sh4/4,1),`${qt(v.ur4,1)}%`,Eu(v.rh4,2),Eu(v.ch4,2)])}),h.jsx(Cu,{children:"By Provider — Past Week (W/E 4/20)"}),h.jsx(cd,{headers:["Provider","Hrs","Booked","Util %","Rev / h","Coll / h"],rows:o.filter(v=>v.h1>0).map(v=>[v.pr,qt(v.h1,1),qt(v.sh1,1),`${qt(v.ur1,1)}%`,Eu(v.rh1,2),Eu(v.ch1,2)])}),h.jsx(Cu,{children:"Trend by Provider · Last 4w vs Prior 4w"}),h.jsx(cd,{headers:["Provider","Hrs/wk Δ","Util Δ","Rev/h Δ","Coll/h Δ"],rows:o.filter(v=>v.hP>0||v.h4>0).map(v=>[v.pr,h.jsx(bi,{value:v.hWk4-v.hWkP,digits:1}),h.jsx(bi,{value:v.ur4-v.urP,digits:1,suffix:"pp"}),h.jsx(bi,{value:v.rh4-v.rhP,unit:"$"}),h.jsx(bi,{value:v.ch4-v.chP,unit:"$"})])}),h.jsx(Cu,{lede:"Method: bring each under-75% provider down to a 75% utilization floor at their current booked-hour pattern. Adjust for known PTO / onboarding before applying.",children:"Recommended Hour Reductions for Upcoming Week"}),h.jsx(cd,{headers:["Provider","Current Hrs/wk","4w Util %","4w Coll/h","Cut (hrs/wk)","Cut %"],rows:a.map(v=>[v.pr,qt(v.hWk4,1),`${qt(v.ur4,1)}%`,Eu(v.ch4,2),h.jsx("span",{style:{color:Ze.red,fontWeight:700},children:qt(v.cut,1)}),`${qt(v.pct,1)}%`]),totalRow:["TOTAL","","","",qt(l,1),""]}),h.jsxs("div",{style:{background:Ze.navy,color:Ze.cream,padding:"22px 26px",borderRadius:10,marginTop:22,display:"flex",alignItems:"center",gap:24},children:[h.jsxs("div",{children:[h.jsxs("div",{style:{fontFamily:vn.heading,fontSize:40,color:Ze.gold,fontWeight:400,lineHeight:1},children:["~",qt(l,0)," hrs"]}),h.jsx("div",{style:{fontSize:10,fontWeight:700,letterSpacing:1.5,textTransform:"uppercase",color:Ze.goldLight,marginTop:6},children:"Target reduction for upcoming week"})]}),h.jsx("div",{style:{flex:1,fontSize:13,color:Ze.cream,lineHeight:1.5},children:"Action items have been pre-allocated by provider above. Apply in next week's schedule, accounting for any planned PTO or onboarding."})]}),h.jsxs("div",{style:{marginTop:32,padding:"14px 20px",background:Ze.white,borderRadius:12,border:`1px solid ${Ze.taupe}`,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[h.jsxs("span",{style:{fontSize:12,color:Ze.gray},children:["← ",h.jsx("a",{href:"/",style:{color:Ze.navy,textDecoration:"none",fontWeight:600},children:"Back to Performance Tracker Hub"})]}),h.jsx("span",{style:{fontSize:11,color:Ze.gray},children:"DRAFT · Data sourced from CorralData"})]})]})]})}const mt={navy:"#041E42",gold:"#B9975B",cream:"#FAF8F7",taupe:"#E4D5D3",gray:"#948794",white:"#FFFFFF"},Xi={heading:"'GFS Didot', Didot, Georgia, serif",body:"'Nunito Sans', 'Avenir Next', Avenir, sans-serif"};function hee({subtitle:e}){return h.jsxs("div",{style:{background:mt.navy,padding:"20px 32px",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[h.jsxs("div",{style:{display:"flex",alignItems:"center",gap:16},children:[h.jsx("a",{href:"/",style:{textDecoration:"none"},children:h.jsx("span",{style:{fontFamily:Xi.heading,fontSize:16,color:mt.gold,letterSpacing:6},children:"A M P"})}),h.jsx("span",{style:{color:"rgba(255,255,255,0.2)",fontSize:20},children:"|"}),h.jsx("span",{style:{fontSize:10,fontWeight:700,color:mt.white,letterSpacing:2,textTransform:"uppercase",fontFamily:Xi.body},children:"ADVANCED MEDAESTHETIC PARTNERS"})]}),h.jsx("span",{style:{fontSize:9,fontWeight:600,color:"#CDB5A7",letterSpacing:2,textTransform:"uppercase",fontFamily:Xi.body},children:e||"PERFORMANCE TRACKER"})]})}function lv({label:e,title:t,description:r,children:n,backLink:i,backText:o}){return h.jsxs("div",{style:{minHeight:"100vh",background:mt.cream,fontFamily:Xi.body},children:[h.jsx(hee,{}),h.jsxs("div",{style:{maxWidth:1200,margin:"0 auto",padding:"48px 40px"},children:[e&&h.jsx("div",{style:{fontSize:10,fontWeight:700,textTransform:"uppercase",letterSpacing:1.5,color:mt.gold,marginBottom:8,fontFamily:Xi.body},children:e}),h.jsx("h1",{style:{fontFamily:Xi.heading,fontSize:36,fontWeight:400,color:mt.navy,margin:"0 0 8px"},children:t}),r&&h.jsx("p",{style:{fontSize:14,color:mt.gray,margin:"0 0 6px"},children:r}),h.jsx("div",{style:{width:40,height:3,background:mt.gold,borderRadius:2,marginBottom:40}}),n,h.jsxs("div",{style:{marginTop:32,padding:"16px 20px",background:mt.white,borderRadius:12,border:`1px solid ${mt.taupe}`,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[h.jsxs("span",{style:{fontSize:12,color:mt.gray},children:["← ",h.jsx("a",{href:i||"/",style:{color:mt.navy,textDecoration:"none",fontWeight:600},children:o||"Back to Performance Tracker Hub"})]}),h.jsx("span",{style:{fontSize:11,color:mt.gray},children:"Data sourced from CorralData"})]})]})]})}function _a({href:e,icon:t,title:r,description:n,count:i}){const[o,a]=_.useState(!1);return h.jsxs("a",{href:e,style:{background:o?mt.navy:mt.white,borderRadius:14,border:`1px solid ${o?mt.gold:mt.taupe}`,padding:"24px 20px",textDecoration:"none",color:"inherit",transition:"all 0.2s",boxShadow:o?"0 6px 20px rgba(0,0,0,0.08)":"0 1px 3px rgba(0,0,0,0.04)",display:"flex",flexDirection:"column",cursor:"pointer",transform:o?"translateY(-2px)":"none"},onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),children:[t&&h.jsx("div",{style:{width:40,height:40,borderRadius:10,background:o?"rgba(185,151,91,0.2)":"rgba(185,151,91,0.08)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:20,marginBottom:14,transition:"all 0.2s"},children:t}),h.jsx("div",{style:{fontFamily:Xi.heading,fontSize:17,fontWeight:400,color:o?mt.white:mt.navy,marginBottom:6,transition:"color 0.2s"},children:r}),n&&h.jsx("div",{style:{fontSize:12,color:o?"#CDB5A7":mt.gray,lineHeight:1.6,flex:1,transition:"color 0.2s"},children:n}),h.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:12},children:[h.jsx("span",{style:{fontSize:10,fontWeight:700,textTransform:"uppercase",letterSpacing:1,color:mt.gold,transition:"color 0.2s"},children:"Open →"}),i!=null&&h.jsxs("span",{style:{fontSize:10,fontWeight:700,color:o?mt.gold:mt.gray,background:o?"rgba(185,151,91,0.15)":mt.cream,padding:"2px 8px",borderRadius:4,transition:"all 0.2s"},children:[i," locations"]})]})]})}function vee(){return h.jsx(lv,{label:"Analytics & Reporting",title:"Performance Tracker",description:"Detailed weekly and monthly performance metrics across all AMP locations.",backLink:"https://ampintelligence.ai",backText:"Back to AMP Intelligence Hub",children:h.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(280px, 1fr))",gap:16},children:[h.jsx(_a,{href:"/org",icon:"📊",title:"Org Performance Tracker",description:"All locations with full interactive filters — revenue, collections, provider productivity, service mix, and ops KPIs.",count:66}),h.jsx(_a,{href:"/by-type",icon:"🏷️",title:"By Location Type",description:"Performance tracker pre-filtered by location type — includes Pod Leaders, Sparrow, Avelure, and more.",count:18}),h.jsx(_a,{href:"/by-practice",icon:"🏢",title:"By Practice",description:"Performance tracker pre-filtered by practice (Avelure, Ever/Body, Destination Aesthetics, etc.)",count:19}),h.jsx(_a,{href:"/by-location",icon:"📍",title:"By Location",description:"Performance tracker pre-filtered to a single location for detailed analysis and provider reports.",count:66})]})})}function yee(){const[e,t]=_.useState([]),[r,n]=_.useState({});return _.useEffect(()=>{fetch("/data/performance/locations.json").then(i=>i.json()).then(i=>{const o={};i.forEach(a=>(a.types||[]).forEach(l=>{o[l]||(o[l]=0),o[l]++})),t(Object.keys(o).sort()),n(o)})},[]),h.jsx(lv,{label:"By Location Type",title:"Select a Location Type",description:"Choose a location type to view its pre-filtered performance tracker.",children:h.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(250px, 1fr))",gap:14},children:e.map(i=>h.jsx(_a,{href:`/by-type/${encodeURIComponent(i)}`,title:i,count:r[i]},i))})})}function gee(){const[e,t]=_.useState([]),[r,n]=_.useState({});return _.useEffect(()=>{fetch("/data/performance/locations.json").then(i=>i.json()).then(i=>{const o={};i.forEach(a=>{const l=a.practice||"Unknown";o[l]=(o[l]||0)+1}),t(Object.keys(o).sort()),n(o)})},[]),h.jsx(lv,{label:"By Practice",title:"Select a Practice",description:"Choose a practice to view its pre-filtered performance tracker.",children:h.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(250px, 1fr))",gap:14},children:e.map(i=>h.jsx(_a,{href:`/by-practice/${encodeURIComponent(i)}`,title:i,count:r[i]},i))})})}function mee(){const[e,t]=_.useState([]),[r,n]=_.useState("");_.useEffect(()=>{fetch("/data/performance/locations.json").then(a=>a.json()).then(t)},[]);const i=r?e.filter(a=>a.name.toLowerCase().includes(r.toLowerCase())||(a.practice||"").toLowerCase().includes(r.toLowerCase())):e,o={};return i.forEach(a=>{const l=a.practice||"Other";o[l]||(o[l]=[]),o[l].push(a)}),h.jsxs(lv,{label:"By Location",title:"Select a Location",description:"Choose a specific location for detailed performance analysis and provider reports.",children:[h.jsx("div",{style:{marginBottom:24},children:h.jsx("input",{type:"text",placeholder:"Search locations or practices...",value:r,onChange:a=>n(a.target.value),style:{width:"100%",maxWidth:400,padding:"10px 16px",border:`1.5px solid ${mt.taupe}`,borderRadius:8,fontSize:13,fontFamily:Xi.body,color:mt.navy,background:mt.white,outline:"none"}})}),Object.entries(o).sort((a,l)=>a[0].localeCompare(l[0])).map(([a,l])=>h.jsxs("div",{style:{marginBottom:32},children:[h.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,marginBottom:14},children:[h.jsx("div",{style:{fontSize:10,fontWeight:700,textTransform:"uppercase",letterSpacing:2,color:mt.navy,background:"rgba(185,151,91,0.1)",border:"1px solid rgba(185,151,91,0.25)",borderRadius:4,padding:"3px 10px",fontFamily:Xi.body},children:a}),h.jsxs("div",{style:{fontSize:12,color:mt.gray},children:[l.length," ",l.length===1?"location":"locations"]}),h.jsx("div",{style:{flex:1,height:1,background:mt.taupe}})]}),h.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(220px, 1fr))",gap:12},children:l.sort((s,u)=>s.name.localeCompare(u.name)).map(s=>h.jsx(_a,{href:`/by-location/${encodeURIComponent(s.name)}`,title:s.name},s.name))})]},a)),i.length===0&&h.jsxs("div",{style:{textAlign:"center",padding:40,color:mt.gray},children:['No locations match "',r,'"']})]})}function bee(){const{type:e}=yh();return h.jsx(av,{initialLocTypes:[decodeURIComponent(e)]},e)}function xee(){const{practice:e}=yh();return h.jsx(av,{initialPractices:[decodeURIComponent(e)]},e)}function wee(){const{location:e}=yh();return h.jsx(av,{initialLocations:[decodeURIComponent(e)]},e)}class See extends D.Component{constructor(t){super(t),this.state={error:null}}static getDerivedStateFromError(t){return{error:t}}componentDidCatch(t,r){console.error("React Error:",t,r)}render(){return this.state.error?D.createElement("div",{style:{padding:40,fontFamily:"monospace",color:"red"}},D.createElement("h1",null,"App Crashed"),D.createElement("pre",null,this.state.error.message),D.createElement("pre",{style:{fontSize:10,color:"#666"}},this.state.error.stack)):this.props.children}}hy.createRoot(document.getElementById("root")).render(h.jsx(D.StrictMode,{children:h.jsx(See,{children:h.jsx(Uk,{children:h.jsxs(Bk,{children:[h.jsx(xi,{path:"/",element:h.jsx(vee,{})}),h.jsx(xi,{path:"/org",element:h.jsx(av,{})}),h.jsx(xi,{path:"/by-type",element:h.jsx(yee,{})}),h.jsx(xi,{path:"/by-type/:type",element:h.jsx(bee,{})}),h.jsx(xi,{path:"/by-practice",element:h.jsx(gee,{})}),h.jsx(xi,{path:"/by-practice/:practice",element:h.jsx(xee,{})}),h.jsx(xi,{path:"/by-location",element:h.jsx(mee,{})}),h.jsx(xi,{path:"/by-location/:location",element:h.jsx(wee,{})}),h.jsx(xi,{path:"/pm-report/:location",element:h.jsx(pee,{})})]})})})})); diff --git a/dist/assets/index-D35erps4.js b/dist/assets/index-D35erps4.js deleted file mode 100644 index 1319a73..0000000 --- a/dist/assets/index-D35erps4.js +++ /dev/null @@ -1,135 +0,0 @@ -function yE(e,t){for(var r=0;rn[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function r(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=r(i);fetch(i.href,o)}})();var Af=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Tt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var VP={exports:{}},Hp={},KP={exports:{}},lt={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Vc=Symbol.for("react.element"),gE=Symbol.for("react.portal"),mE=Symbol.for("react.fragment"),bE=Symbol.for("react.strict_mode"),xE=Symbol.for("react.profiler"),wE=Symbol.for("react.provider"),SE=Symbol.for("react.context"),PE=Symbol.for("react.forward_ref"),OE=Symbol.for("react.suspense"),AE=Symbol.for("react.memo"),jE=Symbol.for("react.lazy"),Db=Symbol.iterator;function _E(e){return e===null||typeof e!="object"?null:(e=Db&&e[Db]||e["@@iterator"],typeof e=="function"?e:null)}var GP={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},YP=Object.assign,qP={};function xs(e,t,r){this.props=e,this.context=t,this.refs=qP,this.updater=r||GP}xs.prototype.isReactComponent={};xs.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};xs.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function XP(){}XP.prototype=xs.prototype;function Tm(e,t,r){this.props=e,this.context=t,this.refs=qP,this.updater=r||GP}var $m=Tm.prototype=new XP;$m.constructor=Tm;YP($m,xs.prototype);$m.isPureReactComponent=!0;var Nb=Array.isArray,QP=Object.prototype.hasOwnProperty,Em={current:null},ZP={key:!0,ref:!0,__self:!0,__source:!0};function JP(e,t,r){var n,i={},o=null,a=null;if(t!=null)for(n in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)QP.call(t,n)&&!ZP.hasOwnProperty(n)&&(i[n]=t[n]);var l=arguments.length-2;if(l===1)i.children=r;else if(1>>1,Se=Q[le];if(0>>1;lei(it,fe))Oti(dt,it)?(Q[le]=dt,Q[Ot]=fe,le=Ot):(Q[le]=it,Q[nt]=fe,le=nt);else if(Oti(dt,fe))Q[le]=dt,Q[Ot]=fe,le=Ot;else break e}}return ie}function i(Q,ie){var fe=Q.sortIndex-ie.sortIndex;return fe!==0?fe:Q.id-ie.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var s=[],u=[],f=1,c=null,d=3,p=!1,g=!1,y=!1,m=typeof setTimeout=="function"?setTimeout:null,h=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(Q){for(var ie=r(u);ie!==null;){if(ie.callback===null)n(u);else if(ie.startTime<=Q)n(u),ie.sortIndex=ie.expirationTime,t(s,ie);else break;ie=r(u)}}function P(Q){if(y=!1,x(Q),!g)if(r(s)!==null)g=!0,ne(w);else{var ie=r(u);ie!==null&&ce(P,ie.startTime-Q)}}function w(Q,ie){g=!1,y&&(y=!1,h(E),E=-1),p=!0;var fe=d;try{for(x(ie),c=r(s);c!==null&&(!(c.expirationTime>ie)||Q&&!H());){var le=c.callback;if(typeof le=="function"){c.callback=null,d=c.priorityLevel;var Se=le(c.expirationTime<=ie);ie=e.unstable_now(),typeof Se=="function"?c.callback=Se:c===r(s)&&n(s),x(ie)}else n(s);c=r(s)}if(c!==null)var Ee=!0;else{var nt=r(u);nt!==null&&ce(P,nt.startTime-ie),Ee=!1}return Ee}finally{c=null,d=fe,p=!1}}var S=!1,A=null,E=-1,R=5,K=-1;function H(){return!(e.unstable_now()-KQ||125le?(Q.sortIndex=fe,t(u,Q),r(s)===null&&Q===r(u)&&(y?(h(E),E=-1):y=!0,ce(P,fe-le))):(Q.sortIndex=Se,t(s,Q),g||p||(g=!0,ne(w))),Q},e.unstable_shouldYield=H,e.unstable_wrapCallback=function(Q){var ie=d;return function(){var fe=d;d=ie;try{return Q.apply(this,arguments)}finally{d=fe}}}})(iO);nO.exports=iO;var BE=nO.exports;/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var FE=_,hn=BE;function xe(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ay=Object.prototype.hasOwnProperty,zE=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Bb={},Fb={};function WE(e){return ay.call(Fb,e)?!0:ay.call(Bb,e)?!1:zE.test(e)?Fb[e]=!0:(Bb[e]=!0,!1)}function UE(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function HE(e,t,r,n){if(t===null||typeof t>"u"||UE(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Hr(e,t,r,n,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var jr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){jr[e]=new Hr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];jr[t]=new Hr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){jr[e]=new Hr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){jr[e]=new Hr(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){jr[e]=new Hr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){jr[e]=new Hr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){jr[e]=new Hr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){jr[e]=new Hr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){jr[e]=new Hr(e,5,!1,e.toLowerCase(),null,!1,!1)});var Mm=/[\-:]([a-z])/g;function km(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Mm,km);jr[t]=new Hr(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Mm,km);jr[t]=new Hr(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Mm,km);jr[t]=new Hr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){jr[e]=new Hr(e,1,!1,e.toLowerCase(),null,!1,!1)});jr.xlinkHref=new Hr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){jr[e]=new Hr(e,1,!1,e.toLowerCase(),null,!0,!0)});function Im(e,t,r,n){var i=jr.hasOwnProperty(t)?jr[t]:null;(i!==null?i.type!==0:n||!(2l||i[a]!==o[l]){var s=` -`+i[a].replace(" at new "," at ");return e.displayName&&s.includes("")&&(s=s.replace("",e.displayName)),s}while(1<=a&&0<=l);break}}}finally{ov=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Au(e):""}function VE(e){switch(e.tag){case 5:return Au(e.type);case 16:return Au("Lazy");case 13:return Au("Suspense");case 19:return Au("SuspenseList");case 0:case 2:case 15:return e=av(e.type,!1),e;case 11:return e=av(e.type.render,!1),e;case 1:return e=av(e.type,!0),e;default:return""}}function cy(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case gl:return"Fragment";case yl:return"Portal";case ly:return"Profiler";case Rm:return"StrictMode";case sy:return"Suspense";case uy:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case lO:return(e.displayName||"Context")+".Consumer";case aO:return(e._context.displayName||"Context")+".Provider";case Dm:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Nm:return t=e.displayName||null,t!==null?t:cy(e.type)||"Memo";case Oo:t=e._payload,e=e._init;try{return cy(e(t))}catch{}}return null}function KE(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return cy(t);case 8:return t===Rm?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Ko(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function uO(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function GE(e){var t=uO(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,o=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){n=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(a){n=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Tf(e){e._valueTracker||(e._valueTracker=GE(e))}function cO(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=uO(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function vd(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function fy(e,t){var r=t.checked;return Gt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Wb(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Ko(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function fO(e,t){t=t.checked,t!=null&&Im(e,"checked",t,!1)}function dy(e,t){fO(e,t);var r=Ko(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?py(e,t.type,r):t.hasOwnProperty("defaultValue")&&py(e,t.type,Ko(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ub(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function py(e,t,r){(t!=="number"||vd(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var ju=Array.isArray;function Cl(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=$f.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Gu(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Eu={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},YE=["Webkit","ms","Moz","O"];Object.keys(Eu).forEach(function(e){YE.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Eu[t]=Eu[e]})});function vO(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Eu.hasOwnProperty(e)&&Eu[e]?(""+t).trim():t+"px"}function yO(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=vO(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,i):e[r]=i}}var qE=Gt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function yy(e,t){if(t){if(qE[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(xe(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(xe(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(xe(61))}if(t.style!=null&&typeof t.style!="object")throw Error(xe(62))}}function gy(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var my=null;function Lm(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var by=null,Ml=null,kl=null;function Kb(e){if(e=Yc(e)){if(typeof by!="function")throw Error(xe(280));var t=e.stateNode;t&&(t=qp(t),by(e.stateNode,e.type,t))}}function gO(e){Ml?kl?kl.push(e):kl=[e]:Ml=e}function mO(){if(Ml){var e=Ml,t=kl;if(kl=Ml=null,Kb(e),t)for(e=0;e>>=0,e===0?32:31-(aC(e)/lC|0)|0}var Ef=64,Cf=4194304;function _u(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function bd(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,i=e.suspendedLanes,o=e.pingedLanes,a=r&268435455;if(a!==0){var l=a&~i;l!==0?n=_u(l):(o&=a,o!==0&&(n=_u(o)))}else a=r&~i,a!==0?n=_u(a):o!==0&&(n=_u(o));if(n===0)return 0;if(t!==0&&t!==n&&!(t&i)&&(i=n&-n,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0r;r++)t.push(e);return t}function Kc(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-oi(t),e[t]=r}function fC(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0=Mu),tx=" ",rx=!1;function LO(e,t){switch(e){case"keyup":return BC.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function BO(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ml=!1;function zC(e,t){switch(e){case"compositionend":return BO(t);case"keypress":return t.which!==32?null:(rx=!0,tx);case"textInput":return e=t.data,e===tx&&rx?null:e;default:return null}}function WC(e,t){if(ml)return e==="compositionend"||!Km&&LO(e,t)?(e=DO(),ad=Um=Eo=null,ml=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ax(r)}}function UO(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?UO(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function HO(){for(var e=window,t=vd();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=vd(e.document)}return t}function Gm(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function QC(e){var t=HO(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&UO(r.ownerDocument.documentElement,r)){if(n!==null&&Gm(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=r.textContent.length,o=Math.min(n.start,i);n=n.end===void 0?o:Math.min(n.end,i),!e.extend&&o>n&&(i=n,n=o,o=i),i=lx(r,o);var a=lx(r,n);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>n?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,bl=null,Ay=null,Iu=null,jy=!1;function sx(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;jy||bl==null||bl!==vd(n)||(n=bl,"selectionStart"in n&&Gm(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Iu&&Ju(Iu,n)||(Iu=n,n=Sd(Ay,"onSelect"),0Sl||(e.current=My[Sl],My[Sl]=null,Sl--)}function It(e,t){Sl++,My[Sl]=e.current,e.current=t}var Go={},Dr=Xo(Go),Xr=Xo(!1),$a=Go;function Wl(e,t){var r=e.type.contextTypes;if(!r)return Go;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in r)i[o]=t[o];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Qr(e){return e=e.childContextTypes,e!=null}function Od(){Ft(Xr),Ft(Dr)}function vx(e,t,r){if(Dr.current!==Go)throw Error(xe(168));It(Dr,t),It(Xr,r)}function JO(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in t))throw Error(xe(108,KE(e)||"Unknown",i));return Gt({},r,n)}function Ad(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Go,$a=Dr.current,It(Dr,e),It(Xr,Xr.current),!0}function yx(e,t,r){var n=e.stateNode;if(!n)throw Error(xe(169));r?(e=JO(e,t,$a),n.__reactInternalMemoizedMergedChildContext=e,Ft(Xr),Ft(Dr),It(Dr,e)):Ft(Xr),It(Xr,r)}var Di=null,Xp=!1,xv=!1;function eA(e){Di===null?Di=[e]:Di.push(e)}function uM(e){Xp=!0,eA(e)}function Qo(){if(!xv&&Di!==null){xv=!0;var e=0,t=St;try{var r=Di;for(St=1;e>=a,i-=a,Ni=1<<32-oi(t)+i|r<E?(R=A,A=null):R=A.sibling;var K=d(h,A,x[E],P);if(K===null){A===null&&(A=R);break}e&&A&&K.alternate===null&&t(h,A),v=o(K,v,E),S===null?w=K:S.sibling=K,S=K,A=R}if(E===x.length)return r(h,A),Wt&&ca(h,E),w;if(A===null){for(;EE?(R=A,A=null):R=A.sibling;var H=d(h,A,K.value,P);if(H===null){A===null&&(A=R);break}e&&A&&H.alternate===null&&t(h,A),v=o(H,v,E),S===null?w=H:S.sibling=H,S=H,A=R}if(K.done)return r(h,A),Wt&&ca(h,E),w;if(A===null){for(;!K.done;E++,K=x.next())K=c(h,K.value,P),K!==null&&(v=o(K,v,E),S===null?w=K:S.sibling=K,S=K);return Wt&&ca(h,E),w}for(A=n(h,A);!K.done;E++,K=x.next())K=p(A,h,E,K.value,P),K!==null&&(e&&K.alternate!==null&&A.delete(K.key===null?E:K.key),v=o(K,v,E),S===null?w=K:S.sibling=K,S=K);return e&&A.forEach(function(F){return t(h,F)}),Wt&&ca(h,E),w}function m(h,v,x,P){if(typeof x=="object"&&x!==null&&x.type===gl&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case _f:e:{for(var w=x.key,S=v;S!==null;){if(S.key===w){if(w=x.type,w===gl){if(S.tag===7){r(h,S.sibling),v=i(S,x.props.children),v.return=h,h=v;break e}}else if(S.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===Oo&&bx(w)===S.type){r(h,S.sibling),v=i(S,x.props),v.ref=fu(h,S,x),v.return=h,h=v;break e}r(h,S);break}else t(h,S);S=S.sibling}x.type===gl?(v=Aa(x.props.children,h.mode,P,x.key),v.return=h,h=v):(P=hd(x.type,x.key,x.props,null,h.mode,P),P.ref=fu(h,v,x),P.return=h,h=P)}return a(h);case yl:e:{for(S=x.key;v!==null;){if(v.key===S)if(v.tag===4&&v.stateNode.containerInfo===x.containerInfo&&v.stateNode.implementation===x.implementation){r(h,v.sibling),v=i(v,x.children||[]),v.return=h,h=v;break e}else{r(h,v);break}else t(h,v);v=v.sibling}v=Tv(x,h.mode,P),v.return=h,h=v}return a(h);case Oo:return S=x._init,m(h,v,S(x._payload),P)}if(ju(x))return g(h,v,x,P);if(au(x))return y(h,v,x,P);Lf(h,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,v!==null&&v.tag===6?(r(h,v.sibling),v=i(v,x),v.return=h,h=v):(r(h,v),v=_v(x,h.mode,P),v.return=h,h=v),a(h)):r(h,v)}return m}var Hl=iA(!0),oA=iA(!1),Td=Xo(null),$d=null,Al=null,Qm=null;function Zm(){Qm=Al=$d=null}function Jm(e){var t=Td.current;Ft(Td),e._currentValue=t}function Ry(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Rl(e,t){$d=e,Qm=Al=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Yr=!0),e.firstContext=null)}function In(e){var t=e._currentValue;if(Qm!==e)if(e={context:e,memoizedValue:t,next:null},Al===null){if($d===null)throw Error(xe(308));Al=e,$d.dependencies={lanes:0,firstContext:e}}else Al=Al.next=e;return t}var ya=null;function e0(e){ya===null?ya=[e]:ya.push(e)}function aA(e,t,r,n){var i=t.interleaved;return i===null?(r.next=r,e0(t)):(r.next=i.next,i.next=r),t.interleaved=r,qi(e,n)}function qi(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Ao=!1;function t0(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function lA(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Wi(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Fo(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,vt&2){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,qi(e,r)}return i=n.interleaved,i===null?(t.next=t,e0(n)):(t.next=i.next,i.next=t),n.interleaved=t,qi(e,r)}function sd(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Fm(e,r)}}function xx(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,o=null;if(r=r.firstBaseUpdate,r!==null){do{var a={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};o===null?i=o=a:o=o.next=a,r=r.next}while(r!==null);o===null?i=o=t:o=o.next=t}else i=o=t;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Ed(e,t,r,n){var i=e.updateQueue;Ao=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var s=l,u=s.next;s.next=null,a===null?o=u:a.next=u,a=s;var f=e.alternate;f!==null&&(f=f.updateQueue,l=f.lastBaseUpdate,l!==a&&(l===null?f.firstBaseUpdate=u:l.next=u,f.lastBaseUpdate=s))}if(o!==null){var c=i.baseState;a=0,f=u=s=null,l=o;do{var d=l.lane,p=l.eventTime;if((n&d)===d){f!==null&&(f=f.next={eventTime:p,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var g=e,y=l;switch(d=t,p=r,y.tag){case 1:if(g=y.payload,typeof g=="function"){c=g.call(p,c,d);break e}c=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=y.payload,d=typeof g=="function"?g.call(p,c,d):g,d==null)break e;c=Gt({},c,d);break e;case 2:Ao=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,d=i.effects,d===null?i.effects=[l]:d.push(l))}else p={eventTime:p,lane:d,tag:l.tag,payload:l.payload,callback:l.callback,next:null},f===null?(u=f=p,s=c):f=f.next=p,a|=d;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;d=l,l=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(!0);if(f===null&&(s=c),i.baseState=s,i.firstBaseUpdate=u,i.lastBaseUpdate=f,t=i.shared.interleaved,t!==null){i=t;do a|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);Ma|=a,e.lanes=a,e.memoizedState=c}}function wx(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;tr?r:4,e(!0);var n=Sv.transition;Sv.transition={};try{e(!1),t()}finally{St=r,Sv.transition=n}}function OA(){return Rn().memoizedState}function pM(e,t,r){var n=Wo(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},AA(e))jA(t,r);else if(r=aA(e,t,r,n),r!==null){var i=Wr();ai(r,e,n,i),_A(r,t,n)}}function hM(e,t,r){var n=Wo(e),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(AA(e))jA(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,l=o(a,r);if(i.hasEagerState=!0,i.eagerState=l,li(l,a)){var s=t.interleaved;s===null?(i.next=i,e0(t)):(i.next=s.next,s.next=i),t.interleaved=i;return}}catch{}finally{}r=aA(e,t,i,n),r!==null&&(i=Wr(),ai(r,e,n,i),_A(r,t,n))}}function AA(e){var t=e.alternate;return e===Kt||t!==null&&t===Kt}function jA(e,t){Ru=Md=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function _A(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Fm(e,r)}}var kd={readContext:In,useCallback:Er,useContext:Er,useEffect:Er,useImperativeHandle:Er,useInsertionEffect:Er,useLayoutEffect:Er,useMemo:Er,useReducer:Er,useRef:Er,useState:Er,useDebugValue:Er,useDeferredValue:Er,useTransition:Er,useMutableSource:Er,useSyncExternalStore:Er,useId:Er,unstable_isNewReconciler:!1},vM={readContext:In,useCallback:function(e,t){return yi().memoizedState=[e,t===void 0?null:t],e},useContext:In,useEffect:Px,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,cd(4194308,4,bA.bind(null,t,e),r)},useLayoutEffect:function(e,t){return cd(4194308,4,e,t)},useInsertionEffect:function(e,t){return cd(4,2,e,t)},useMemo:function(e,t){var r=yi();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=yi();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=pM.bind(null,Kt,e),[n.memoizedState,e]},useRef:function(e){var t=yi();return e={current:e},t.memoizedState=e},useState:Sx,useDebugValue:u0,useDeferredValue:function(e){return yi().memoizedState=e},useTransition:function(){var e=Sx(!1),t=e[0];return e=dM.bind(null,e[1]),yi().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Kt,i=yi();if(Wt){if(r===void 0)throw Error(xe(407));r=r()}else{if(r=t(),br===null)throw Error(xe(349));Ca&30||fA(n,t,r)}i.memoizedState=r;var o={value:r,getSnapshot:t};return i.queue=o,Px(pA.bind(null,n,o,e),[e]),n.flags|=2048,lc(9,dA.bind(null,n,o,r,t),void 0,null),r},useId:function(){var e=yi(),t=br.identifierPrefix;if(Wt){var r=Li,n=Ni;r=(n&~(1<<32-oi(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=oc++,0<\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=a.createElement(r,{is:n.is}):(e=a.createElement(r),r==="select"&&(a=e,n.multiple?a.multiple=!0:n.size&&(a.size=n.size))):e=a.createElementNS(e,r),e[gi]=t,e[rc]=n,NA(e,t,!1,!1),t.stateNode=e;e:{switch(a=gy(r,n),r){case"dialog":Nt("cancel",e),Nt("close",e),i=n;break;case"iframe":case"object":case"embed":Nt("load",e),i=n;break;case"video":case"audio":for(i=0;iGl&&(t.flags|=128,n=!0,du(o,!1),t.lanes=4194304)}else{if(!n)if(e=Cd(a),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),du(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!Wt)return Cr(t),null}else 2*Xt()-o.renderingStartTime>Gl&&r!==1073741824&&(t.flags|=128,n=!0,du(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(r=o.last,r!==null?r.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Xt(),t.sibling=null,r=Vt.current,It(Vt,n?r&1|2:r&1),t):(Cr(t),null);case 22:case 23:return v0(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?un&1073741824&&(Cr(t),t.subtreeFlags&6&&(t.flags|=8192)):Cr(t),null;case 24:return null;case 25:return null}throw Error(xe(156,t.tag))}function PM(e,t){switch(qm(t),t.tag){case 1:return Qr(t.type)&&Od(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Vl(),Ft(Xr),Ft(Dr),i0(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return n0(t),null;case 13:if(Ft(Vt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(xe(340));Ul()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ft(Vt),null;case 4:return Vl(),null;case 10:return Jm(t.type._context),null;case 22:case 23:return v0(),null;case 24:return null;default:return null}}var Ff=!1,kr=!1,OM=typeof WeakSet=="function"?WeakSet:Set,Re=null;function jl(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Yt(e,t,n)}else r.current=null}function Hy(e,t,r){try{r()}catch(n){Yt(e,t,n)}}var Ix=!1;function AM(e,t){if(_y=xd,e=HO(),Gm(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,o=n.focusNode;n=n.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break e}var a=0,l=-1,s=-1,u=0,f=0,c=e,d=null;t:for(;;){for(var p;c!==r||i!==0&&c.nodeType!==3||(l=a+i),c!==o||n!==0&&c.nodeType!==3||(s=a+n),c.nodeType===3&&(a+=c.nodeValue.length),(p=c.firstChild)!==null;)d=c,c=p;for(;;){if(c===e)break t;if(d===r&&++u===i&&(l=a),d===o&&++f===n&&(s=a),(p=c.nextSibling)!==null)break;c=d,d=c.parentNode}c=p}r=l===-1||s===-1?null:{start:l,end:s}}else r=null}r=r||{start:0,end:0}}else r=null;for(Ty={focusedElem:e,selectionRange:r},xd=!1,Re=t;Re!==null;)if(t=Re,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Re=e;else for(;Re!==null;){t=Re;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var y=g.memoizedProps,m=g.memoizedState,h=t.stateNode,v=h.getSnapshotBeforeUpdate(t.elementType===t.type?y:Qn(t.type,y),m);h.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(xe(163))}}catch(P){Yt(t,t.return,P)}if(e=t.sibling,e!==null){e.return=t.return,Re=e;break}Re=t.return}return g=Ix,Ix=!1,g}function Du(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&Hy(t,r,o)}i=i.next}while(i!==n)}}function Jp(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function Vy(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function FA(e){var t=e.alternate;t!==null&&(e.alternate=null,FA(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[gi],delete t[rc],delete t[Cy],delete t[lM],delete t[sM])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function zA(e){return e.tag===5||e.tag===3||e.tag===4}function Rx(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||zA(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ky(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Pd));else if(n!==4&&(e=e.child,e!==null))for(Ky(e,t,r),e=e.sibling;e!==null;)Ky(e,t,r),e=e.sibling}function Gy(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(Gy(e,t,r),e=e.sibling;e!==null;)Gy(e,t,r),e=e.sibling}var Pr=null,Zn=!1;function So(e,t,r){for(r=r.child;r!==null;)WA(e,t,r),r=r.sibling}function WA(e,t,r){if(xi&&typeof xi.onCommitFiberUnmount=="function")try{xi.onCommitFiberUnmount(Vp,r)}catch{}switch(r.tag){case 5:kr||jl(r,t);case 6:var n=Pr,i=Zn;Pr=null,So(e,t,r),Pr=n,Zn=i,Pr!==null&&(Zn?(e=Pr,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Pr.removeChild(r.stateNode));break;case 18:Pr!==null&&(Zn?(e=Pr,r=r.stateNode,e.nodeType===8?bv(e.parentNode,r):e.nodeType===1&&bv(e,r),Qu(e)):bv(Pr,r.stateNode));break;case 4:n=Pr,i=Zn,Pr=r.stateNode.containerInfo,Zn=!0,So(e,t,r),Pr=n,Zn=i;break;case 0:case 11:case 14:case 15:if(!kr&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&Hy(r,t,a),i=i.next}while(i!==n)}So(e,t,r);break;case 1:if(!kr&&(jl(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(l){Yt(r,t,l)}So(e,t,r);break;case 21:So(e,t,r);break;case 22:r.mode&1?(kr=(n=kr)||r.memoizedState!==null,So(e,t,r),kr=n):So(e,t,r);break;default:So(e,t,r)}}function Dx(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new OM),t.forEach(function(n){var i=IM.bind(null,e,n);r.has(n)||(r.add(n),n.then(i,i))})}}function qn(e,t){var r=t.deletions;if(r!==null)for(var n=0;ni&&(i=a),n&=~o}if(n=i,n=Xt()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*_M(n/1960))-n,10e?16:e,Co===null)var n=!1;else{if(e=Co,Co=null,Dd=0,vt&6)throw Error(xe(331));var i=vt;for(vt|=4,Re=e.current;Re!==null;){var o=Re,a=o.child;if(Re.flags&16){var l=o.deletions;if(l!==null){for(var s=0;sXt()-p0?Oa(e,0):d0|=r),Zr(e,t)}function XA(e,t){t===0&&(e.mode&1?(t=Cf,Cf<<=1,!(Cf&130023424)&&(Cf=4194304)):t=1);var r=Wr();e=qi(e,t),e!==null&&(Kc(e,t,r),Zr(e,r))}function kM(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),XA(e,r)}function IM(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(xe(314))}n!==null&&n.delete(t),XA(e,r)}var QA;QA=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Xr.current)Yr=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Yr=!1,wM(e,t,r);Yr=!!(e.flags&131072)}else Yr=!1,Wt&&t.flags&1048576&&tA(t,_d,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;fd(e,t),e=t.pendingProps;var i=Wl(t,Dr.current);Rl(t,r),i=a0(null,t,n,e,i,r);var o=l0();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Qr(n)?(o=!0,Ad(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,t0(t),i.updater=Zp,t.stateNode=i,i._reactInternals=t,Ny(t,n,e,r),t=Fy(null,t,n,!0,o,r)):(t.tag=0,Wt&&o&&Ym(t),Fr(null,t,i,r),t=t.child),t;case 16:n=t.elementType;e:{switch(fd(e,t),e=t.pendingProps,i=n._init,n=i(n._payload),t.type=n,i=t.tag=DM(n),e=Qn(n,e),i){case 0:t=By(null,t,n,e,r);break e;case 1:t=Cx(null,t,n,e,r);break e;case 11:t=$x(null,t,n,e,r);break e;case 14:t=Ex(null,t,n,Qn(n.type,e),r);break e}throw Error(xe(306,n,""))}return t;case 0:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Qn(n,i),By(e,t,n,i,r);case 1:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Qn(n,i),Cx(e,t,n,i,r);case 3:e:{if(IA(t),e===null)throw Error(xe(387));n=t.pendingProps,o=t.memoizedState,i=o.element,lA(e,t),Ed(t,n,null,r);var a=t.memoizedState;if(n=a.element,o.isDehydrated)if(o={element:n,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Kl(Error(xe(423)),t),t=Mx(e,t,n,r,i);break e}else if(n!==i){i=Kl(Error(xe(424)),t),t=Mx(e,t,n,r,i);break e}else for(dn=Bo(t.stateNode.containerInfo.firstChild),pn=t,Wt=!0,ri=null,r=oA(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Ul(),n===i){t=Xi(e,t,r);break e}Fr(e,t,n,r)}t=t.child}return t;case 5:return sA(t),e===null&&Iy(t),n=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,$y(n,i)?a=null:o!==null&&$y(n,o)&&(t.flags|=32),kA(e,t),Fr(e,t,a,r),t.child;case 6:return e===null&&Iy(t),null;case 13:return RA(e,t,r);case 4:return r0(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Hl(t,null,n,r):Fr(e,t,n,r),t.child;case 11:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Qn(n,i),$x(e,t,n,i,r);case 7:return Fr(e,t,t.pendingProps,r),t.child;case 8:return Fr(e,t,t.pendingProps.children,r),t.child;case 12:return Fr(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,It(Td,n._currentValue),n._currentValue=a,o!==null)if(li(o.value,a)){if(o.children===i.children&&!Xr.current){t=Xi(e,t,r);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){a=o.child;for(var s=l.firstContext;s!==null;){if(s.context===n){if(o.tag===1){s=Wi(-1,r&-r),s.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var f=u.pending;f===null?s.next=s:(s.next=f.next,f.next=s),u.pending=s}}o.lanes|=r,s=o.alternate,s!==null&&(s.lanes|=r),Ry(o.return,r,t),l.lanes|=r;break}s=s.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(xe(341));a.lanes|=r,l=a.alternate,l!==null&&(l.lanes|=r),Ry(a,r,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}Fr(e,t,i.children,r),t=t.child}return t;case 9:return i=t.type,n=t.pendingProps.children,Rl(t,r),i=In(i),n=n(i),t.flags|=1,Fr(e,t,n,r),t.child;case 14:return n=t.type,i=Qn(n,t.pendingProps),i=Qn(n.type,i),Ex(e,t,n,i,r);case 15:return CA(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Qn(n,i),fd(e,t),t.tag=1,Qr(n)?(e=!0,Ad(t)):e=!1,Rl(t,r),TA(t,n,i),Ny(t,n,i,r),Fy(null,t,n,!0,e,r);case 19:return DA(e,t,r);case 22:return MA(e,t,r)}throw Error(xe(156,t.tag))};function ZA(e,t){return AO(e,t)}function RM(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function En(e,t,r,n){return new RM(e,t,r,n)}function g0(e){return e=e.prototype,!(!e||!e.isReactComponent)}function DM(e){if(typeof e=="function")return g0(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Dm)return 11;if(e===Nm)return 14}return 2}function Uo(e,t){var r=e.alternate;return r===null?(r=En(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function hd(e,t,r,n,i,o){var a=2;if(n=e,typeof e=="function")g0(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case gl:return Aa(r.children,i,o,t);case Rm:a=8,i|=8;break;case ly:return e=En(12,r,t,i|2),e.elementType=ly,e.lanes=o,e;case sy:return e=En(13,r,t,i),e.elementType=sy,e.lanes=o,e;case uy:return e=En(19,r,t,i),e.elementType=uy,e.lanes=o,e;case sO:return th(r,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case aO:a=10;break e;case lO:a=9;break e;case Dm:a=11;break e;case Nm:a=14;break e;case Oo:a=16,n=null;break e}throw Error(xe(130,e==null?e:typeof e,""))}return t=En(a,r,t,i),t.elementType=e,t.type=n,t.lanes=o,t}function Aa(e,t,r,n){return e=En(7,e,n,t),e.lanes=r,e}function th(e,t,r,n){return e=En(22,e,n,t),e.elementType=sO,e.lanes=r,e.stateNode={isHidden:!1},e}function _v(e,t,r){return e=En(6,e,null,t),e.lanes=r,e}function Tv(e,t,r){return t=En(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function NM(e,t,r,n,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=sv(0),this.expirationTimes=sv(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=sv(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function m0(e,t,r,n,i,o,a,l,s){return e=new NM(e,t,r,l,s),t===1?(t=1,o===!0&&(t|=8)):t=0,o=En(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},t0(o),e}function LM(e,t,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(rj)}catch(e){console.error(e)}}rj(),rO.exports=vn;var UM=rO.exports,Hx=UM;oy.createRoot=Hx.createRoot,oy.hydrateRoot=Hx.hydrateRoot;/** - * @remix-run/router v1.23.2 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function Bd(){return Bd=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function nj(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function VM(){return Math.random().toString(36).substr(2,8)}function Kx(e,t){return{usr:e.state,key:e.key,idx:t}}function Zy(e,t,r,n){return r===void 0&&(r=null),Bd({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ah(t):t,{state:r,key:t&&t.key||n||VM()})}function ij(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function ah(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function KM(e,t,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:o=!1}=n,a=i.history,l=Mo.Pop,s=null,u=f();u==null&&(u=0,a.replaceState(Bd({},a.state,{idx:u}),""));function f(){return(a.state||{idx:null}).idx}function c(){l=Mo.Pop;let m=f(),h=m==null?null:m-u;u=m,s&&s({action:l,location:y.location,delta:h})}function d(m,h){l=Mo.Push;let v=Zy(y.location,m,h);u=f()+1;let x=Kx(v,u),P=y.createHref(v);try{a.pushState(x,"",P)}catch(w){if(w instanceof DOMException&&w.name==="DataCloneError")throw w;i.location.assign(P)}o&&s&&s({action:l,location:y.location,delta:1})}function p(m,h){l=Mo.Replace;let v=Zy(y.location,m,h);u=f();let x=Kx(v,u),P=y.createHref(v);a.replaceState(x,"",P),o&&s&&s({action:l,location:y.location,delta:0})}function g(m){let h=i.location.origin!=="null"?i.location.origin:i.location.href,v=typeof m=="string"?m:ij(m);return v=v.replace(/ $/,"%20"),en(h,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,h)}let y={get action(){return l},get location(){return e(i,a)},listen(m){if(s)throw new Error("A history only accepts one active listener");return i.addEventListener(Vx,c),s=m,()=>{i.removeEventListener(Vx,c),s=null}},createHref(m){return t(i,m)},createURL:g,encodeLocation(m){let h=g(m);return{pathname:h.pathname,search:h.search,hash:h.hash}},push:d,replace:p,go(m){return a.go(m)}};return y}var Gx;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Gx||(Gx={}));function GM(e,t,r){return r===void 0&&(r="/"),YM(e,t,r)}function YM(e,t,r,n){let i=typeof t=="string"?ah(t):t,o=lj(i.pathname||"/",r);if(o==null)return null;let a=oj(e);qM(a);let l=null;for(let s=0;l==null&&s{let s={relativePath:l===void 0?o.path||"":l,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};s.relativePath.startsWith("/")&&(en(s.relativePath.startsWith(n),'Absolute route path "'+s.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),s.relativePath=s.relativePath.slice(n.length));let u=Nl([n,s.relativePath]),f=r.concat(s);o.children&&o.children.length>0&&(en(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),oj(o.children,t,f,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:rk(u,o.index),routesMeta:f})};return e.forEach((o,a)=>{var l;if(o.path===""||!((l=o.path)!=null&&l.includes("?")))i(o,a);else for(let s of aj(o.path))i(o,a,s)}),t}function aj(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,i=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return i?[o,""]:[o];let a=aj(n.join("/")),l=[];return l.push(...a.map(s=>s===""?o:[o,s].join("/"))),i&&l.push(...a),l.map(s=>e.startsWith("/")&&s===""?"/":s)}function qM(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:nk(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const XM=/^:[\w-]+$/,QM=3,ZM=2,JM=1,ek=10,tk=-2,Yx=e=>e==="*";function rk(e,t){let r=e.split("/"),n=r.length;return r.some(Yx)&&(n+=tk),t&&(n+=ZM),r.filter(i=>!Yx(i)).reduce((i,o)=>i+(XM.test(o)?QM:o===""?JM:ek),n)}function nk(e,t){return e.length===t.length&&e.slice(0,-1).every((n,i)=>n===t[i])?e[e.length-1]-t[t.length-1]:0}function ik(e,t,r){let{routesMeta:n}=e,i={},o="/",a=[];for(let l=0;l{let{paramName:d,isOptional:p}=f;if(d==="*"){let y=l[c]||"";a=o.slice(0,o.length-y.length).replace(/(.)\/+$/,"$1")}const g=l[c];return p&&!g?u[d]=void 0:u[d]=(g||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:a,pattern:e}}function ak(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),nj(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,l,s)=>(n.push({paramName:l,isOptional:s!=null}),s?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),n]}function lk(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return nj(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function lj(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}const Nl=e=>e.join("/").replace(/\/\/+/g,"/"),sk=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/");function uk(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const sj=["post","put","patch","delete"];new Set(sj);const ck=["get",...sj];new Set(ck);/** - * React Router v6.30.3 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function Fd(){return Fd=Object.assign?Object.assign.bind():function(e){for(var t=1;tObject.assign({},m,{params:Object.assign({},l,m.params),pathname:Nl([s,i.encodeLocation?i.encodeLocation(m.pathname).pathname:m.pathname]),pathnameBase:m.pathnameBase==="/"?s:Nl([s,i.encodeLocation?i.encodeLocation(m.pathnameBase).pathname:m.pathnameBase])})),o,r,n);return t&&y?_.createElement(lh.Provider,{value:{location:Fd({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:Mo.Pop}},y):y}function yk(){let e=Ok(),t=uk(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return _.createElement(_.Fragment,null,_.createElement("h2",null,"Unexpected Application Error!"),_.createElement("h3",{style:{fontStyle:"italic"}},t),r?_.createElement("pre",{style:i},r):null,null)}const gk=_.createElement(yk,null);class mk extends _.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?_.createElement(Xc.Provider,{value:this.props.routeContext},_.createElement(cj.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function bk(e){let{routeContext:t,match:r,children:n}=e,i=_.useContext(fk);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),_.createElement(Xc.Provider,{value:t},n)}function xk(e,t,r,n){var i;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var o;if(!r)return null;if(r.errors)e=r.matches;else if((o=n)!=null&&o.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let a=e,l=(i=r)==null?void 0:i.errors;if(l!=null){let f=a.findIndex(c=>c.route.id&&(l==null?void 0:l[c.route.id])!==void 0);f>=0||en(!1),a=a.slice(0,Math.min(a.length,f+1))}let s=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let f=0;f=0?a=a.slice(0,u+1):a=[a[0]];break}}}return a.reduceRight((f,c,d)=>{let p,g=!1,y=null,m=null;r&&(p=l&&c.route.id?l[c.route.id]:void 0,y=c.route.errorElement||gk,s&&(u<0&&d===0?(Ak("route-fallback"),g=!0,m=null):u===d&&(g=!0,m=c.route.hydrateFallbackElement||null)));let h=t.concat(a.slice(0,d+1)),v=()=>{let x;return p?x=y:g?x=m:c.route.Component?x=_.createElement(c.route.Component,null):c.route.element?x=c.route.element:x=f,_.createElement(bk,{match:c,routeContext:{outlet:f,matches:h,isDataRoute:r!=null},children:x})};return r&&(c.route.ErrorBoundary||c.route.errorElement||d===0)?_.createElement(mk,{location:r.location,revalidation:r.revalidation,component:y,error:p,children:v(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):v()},null)}var fj=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(fj||{});function wk(e){let t=_.useContext(dk);return t||en(!1),t}function Sk(e){let t=_.useContext(Xc);return t||en(!1),t}function Pk(e){let t=Sk(),r=t.matches[t.matches.length-1];return r.route.id||en(!1),r.route.id}function Ok(){var e;let t=_.useContext(cj),r=wk(fj.UseRouteError),n=Pk();return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}const qx={};function Ak(e,t,r){qx[e]||(qx[e]=!0)}function jk(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Ii(e){en(!1)}function _k(e){let{basename:t="/",children:r=null,location:n,navigationType:i=Mo.Pop,navigator:o,static:a=!1,future:l}=e;S0()&&en(!1);let s=t.replace(/^\/*/,"/"),u=_.useMemo(()=>({basename:s,navigator:o,static:a,future:Fd({v7_relativeSplatPath:!1},l)}),[s,l,o,a]);typeof n=="string"&&(n=ah(n));let{pathname:f="/",search:c="",hash:d="",state:p=null,key:g="default"}=n,y=_.useMemo(()=>{let m=lj(f,s);return m==null?null:{location:{pathname:m,search:c,hash:d,state:p,key:g},navigationType:i}},[s,f,c,d,p,g,i]);return y==null?null:_.createElement(uj.Provider,{value:u},_.createElement(lh.Provider,{children:r,value:y}))}function Tk(e){let{children:t,location:r}=e;return hk(Jy(t),r)}new Promise(()=>{});function Jy(e,t){t===void 0&&(t=[]);let r=[];return _.Children.forEach(e,(n,i)=>{if(!_.isValidElement(n))return;let o=[...t,i];if(n.type===_.Fragment){r.push.apply(r,Jy(n.props.children,o));return}n.type!==Ii&&en(!1),!n.props.index||!n.props.children||en(!1);let a={id:n.props.id||o.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(a.children=Jy(n.props.children,o)),r.push(a)}),r}/** - * React Router DOM v6.30.3 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */const $k="6";try{window.__reactRouterVersion=$k}catch{}const Ek="startTransition",Xx=ME[Ek];function Ck(e){let{basename:t,children:r,future:n,window:i}=e,o=_.useRef();o.current==null&&(o.current=HM({window:i,v5Compat:!0}));let a=o.current,[l,s]=_.useState({action:a.action,location:a.location}),{v7_startTransition:u}=n||{},f=_.useCallback(c=>{u&&Xx?Xx(()=>s(c)):s(c)},[s,u]);return _.useLayoutEffect(()=>a.listen(f),[a,f]),_.useEffect(()=>jk(n),[n]),_.createElement(_k,{basename:t,children:r,location:l.location,navigationType:l.action,navigator:a,future:n})}var Qx;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Qx||(Qx={}));var Zx;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Zx||(Zx={}));function dj(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t-1}var EI=$I,CI=uh;function MI(e,t){var r=this.__data__,n=CI(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var kI=MI,II=yI,RI=OI,DI=_I,NI=EI,LI=kI;function js(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t0?1:-1},ma=function(t){return Ia(t)&&t.indexOf("%")===t.length-1},Pe=function(t){return iD(t)&&!Ts(t)},sD=function(t){return Ge(t)},fr=function(t){return Pe(t)||Ia(t)},uD=0,Ua=function(t){var r=++uD;return"".concat(t||"").concat(r)},Ra=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Pe(t)&&!Ia(t))return n;var o;if(ma(t)){var a=t.indexOf("%");o=r*parseFloat(t.slice(0,a))/100}else o=+t;return Ts(o)&&(o=n),i&&o>r&&(o=r),o},$o=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},cD=function(t){if(!Array.isArray(t))return!1;for(var r=t.length,n={},i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function mD(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function tg(e){"@babel/helpers - typeof";return tg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tg(e)}var cw={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},Ui=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},fw=null,Cv=null,R0=function e(t){if(t===fw&&Array.isArray(Cv))return Cv;var r=[];return _.Children.forEach(t,function(n){Ge(n)||(JR.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),Cv=r,fw=t,r};function Jr(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(i){return Ui(i)}):n=[Ui(t)],R0(e).forEach(function(i){var o=kn(i,"type.displayName")||kn(i,"type.name");n.indexOf(o)!==-1&&r.push(i)}),r}function cn(e,t){var r=Jr(e,t);return r&&r[0]}var dw=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,i=r.height;return!(!Pe(n)||n<=0||!Pe(i)||i<=0)},bD=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],xD=function(t){return t&&t.type&&Ia(t.type)&&bD.indexOf(t.type)>=0},Aj=function(t){return t&&tg(t)==="object"&&"clipDot"in t},wD=function(t,r,n,i){var o,a=(o=Ev==null?void 0:Ev[i])!==null&&o!==void 0?o:[];return r.startsWith("data-")||!Ze(t)&&(i&&a.includes(r)||hD.includes(r))||n&&I0.includes(r)},Xe=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(_.isValidElement(t)&&(i=t.props),!Os(i))return null;var o={};return Object.keys(i).forEach(function(a){var l;wD((l=i)===null||l===void 0?void 0:l[a],a,r,n)&&(o[a]=i[a])}),o},rg=function e(t,r){if(t===r)return!0;var n=_.Children.count(t);if(n!==_.Children.count(r))return!1;if(n===0)return!0;if(n===1)return pw(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function jD(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function ig(e){var t=e.children,r=e.width,n=e.height,i=e.viewBox,o=e.className,a=e.style,l=e.title,s=e.desc,u=AD(e,OD),f=i||{width:r,height:n,x:0,y:0},c=st("recharts-surface",o);return D.createElement("svg",ng({},Xe(u,!0,"svg"),{className:c,width:r,height:n,style:a,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height)}),D.createElement("title",null,l),D.createElement("desc",null,s),t)}var _D=["children","className"];function og(){return og=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function $D(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var mt=D.forwardRef(function(e,t){var r=e.children,n=e.className,i=TD(e,_D),o=st("recharts-layer",n);return D.createElement("g",og({className:o},Xe(i,!0),{ref:t}),r)}),Hi=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),o=2;oi?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var o=Array(i);++n=n?e:MD(e,t,r)}var ID=kD,RD="\\ud800-\\udfff",DD="\\u0300-\\u036f",ND="\\ufe20-\\ufe2f",LD="\\u20d0-\\u20ff",BD=DD+ND+LD,FD="\\ufe0e\\ufe0f",zD="\\u200d",WD=RegExp("["+zD+RD+BD+FD+"]");function UD(e){return WD.test(e)}var jj=UD;function HD(e){return e.split("")}var VD=HD,_j="\\ud800-\\udfff",KD="\\u0300-\\u036f",GD="\\ufe20-\\ufe2f",YD="\\u20d0-\\u20ff",qD=KD+GD+YD,XD="\\ufe0e\\ufe0f",QD="["+_j+"]",ag="["+qD+"]",lg="\\ud83c[\\udffb-\\udfff]",ZD="(?:"+ag+"|"+lg+")",Tj="[^"+_j+"]",$j="(?:\\ud83c[\\udde6-\\uddff]){2}",Ej="[\\ud800-\\udbff][\\udc00-\\udfff]",JD="\\u200d",Cj=ZD+"?",Mj="["+XD+"]?",eN="(?:"+JD+"(?:"+[Tj,$j,Ej].join("|")+")"+Mj+Cj+")*",tN=Mj+Cj+eN,rN="(?:"+[Tj+ag+"?",ag,$j,Ej,QD].join("|")+")",nN=RegExp(lg+"(?="+lg+")|"+rN+tN,"g");function iN(e){return e.match(nN)||[]}var oN=iN,aN=VD,lN=jj,sN=oN;function uN(e){return lN(e)?sN(e):aN(e)}var cN=uN,fN=ID,dN=jj,pN=cN,hN=bj;function vN(e){return function(t){t=hN(t);var r=dN(t)?pN(t):void 0,n=r?r[0]:t.charAt(0),i=r?fN(r,1).join(""):t.slice(1);return n[e]()+i}}var yN=vN,gN=yN,mN=gN("toUpperCase"),bN=mN;const Ph=Tt(bN);function kt(e){return function(){return e}}const kj=Math.cos,Ud=Math.sin,ui=Math.sqrt,Hd=Math.PI,Oh=2*Hd,sg=Math.PI,ug=2*sg,da=1e-6,xN=ug-da;function Ij(e){this._+=e[0];for(let t=1,r=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Ij;const r=10**t;return function(n){this._+=n[0];for(let i=1,o=n.length;ida)if(!(Math.abs(c*s-u*f)>da)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let p=n-a,g=i-l,y=s*s+u*u,m=p*p+g*g,h=Math.sqrt(y),v=Math.sqrt(d),x=o*Math.tan((sg-Math.acos((y+d-m)/(2*h*v)))/2),P=x/v,w=x/h;Math.abs(P-1)>da&&this._append`L${t+P*f},${r+P*c}`,this._append`A${o},${o},0,0,${+(c*p>f*g)},${this._x1=t+w*s},${this._y1=r+w*u}`}}arc(t,r,n,i,o,a){if(t=+t,r=+r,n=+n,a=!!a,n<0)throw new Error(`negative radius: ${n}`);let l=n*Math.cos(i),s=n*Math.sin(i),u=t+l,f=r+s,c=1^a,d=a?i-o:o-i;this._x1===null?this._append`M${u},${f}`:(Math.abs(this._x1-u)>da||Math.abs(this._y1-f)>da)&&this._append`L${u},${f}`,n&&(d<0&&(d=d%ug+ug),d>xN?this._append`A${n},${n},0,1,${c},${t-l},${r-s}A${n},${n},0,1,${c},${this._x1=u},${this._y1=f}`:d>da&&this._append`A${n},${n},0,${+(d>=sg)},${c},${this._x1=t+n*Math.cos(o)},${this._y1=r+n*Math.sin(o)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function D0(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new SN(t)}function N0(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Rj(e){this._context=e}Rj.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Ah(e){return new Rj(e)}function Dj(e){return e[0]}function Nj(e){return e[1]}function Lj(e,t){var r=kt(!0),n=null,i=Ah,o=null,a=D0(l);e=typeof e=="function"?e:e===void 0?Dj:kt(e),t=typeof t=="function"?t:t===void 0?Nj:kt(t);function l(s){var u,f=(s=N0(s)).length,c,d=!1,p;for(n==null&&(o=i(p=a())),u=0;u<=f;++u)!(u=p;--g)l.point(x[g],P[g]);l.lineEnd(),l.areaEnd()}h&&(x[d]=+e(m,d,c),P[d]=+t(m,d,c),l.point(n?+n(m,d,c):x[d],r?+r(m,d,c):P[d]))}if(v)return l=null,v+""||null}function f(){return Lj().defined(i).curve(a).context(o)}return u.x=function(c){return arguments.length?(e=typeof c=="function"?c:kt(+c),n=null,u):e},u.x0=function(c){return arguments.length?(e=typeof c=="function"?c:kt(+c),u):e},u.x1=function(c){return arguments.length?(n=c==null?null:typeof c=="function"?c:kt(+c),u):n},u.y=function(c){return arguments.length?(t=typeof c=="function"?c:kt(+c),r=null,u):t},u.y0=function(c){return arguments.length?(t=typeof c=="function"?c:kt(+c),u):t},u.y1=function(c){return arguments.length?(r=c==null?null:typeof c=="function"?c:kt(+c),u):r},u.lineX0=u.lineY0=function(){return f().x(e).y(t)},u.lineY1=function(){return f().x(e).y(r)},u.lineX1=function(){return f().x(n).y(t)},u.defined=function(c){return arguments.length?(i=typeof c=="function"?c:kt(!!c),u):i},u.curve=function(c){return arguments.length?(a=c,o!=null&&(l=a(o)),u):a},u.context=function(c){return arguments.length?(c==null?o=l=null:l=a(o=c),u):o},u}class Bj{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function PN(e){return new Bj(e,!0)}function ON(e){return new Bj(e,!1)}const L0={draw(e,t){const r=ui(t/Hd);e.moveTo(r,0),e.arc(0,0,r,0,Oh)}},AN={draw(e,t){const r=ui(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},Fj=ui(1/3),jN=Fj*2,_N={draw(e,t){const r=ui(t/jN),n=r*Fj;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},TN={draw(e,t){const r=ui(t),n=-r/2;e.rect(n,n,r,r)}},$N=.8908130915292852,zj=Ud(Hd/10)/Ud(7*Hd/10),EN=Ud(Oh/10)*zj,CN=-kj(Oh/10)*zj,MN={draw(e,t){const r=ui(t*$N),n=EN*r,i=CN*r;e.moveTo(0,-r),e.lineTo(n,i);for(let o=1;o<5;++o){const a=Oh*o/5,l=kj(a),s=Ud(a);e.lineTo(s*r,-l*r),e.lineTo(l*n-s*i,s*n+l*i)}e.closePath()}},Mv=ui(3),kN={draw(e,t){const r=-ui(t/(Mv*3));e.moveTo(0,r*2),e.lineTo(-Mv*r,-r),e.lineTo(Mv*r,-r),e.closePath()}},Sn=-.5,Pn=ui(3)/2,cg=1/ui(12),IN=(cg/2+1)*3,RN={draw(e,t){const r=ui(t/IN),n=r/2,i=r*cg,o=n,a=r*cg+r,l=-o,s=a;e.moveTo(n,i),e.lineTo(o,a),e.lineTo(l,s),e.lineTo(Sn*n-Pn*i,Pn*n+Sn*i),e.lineTo(Sn*o-Pn*a,Pn*o+Sn*a),e.lineTo(Sn*l-Pn*s,Pn*l+Sn*s),e.lineTo(Sn*n+Pn*i,Sn*i-Pn*n),e.lineTo(Sn*o+Pn*a,Sn*a-Pn*o),e.lineTo(Sn*l+Pn*s,Sn*s-Pn*l),e.closePath()}};function DN(e,t){let r=null,n=D0(i);e=typeof e=="function"?e:kt(e||L0),t=typeof t=="function"?t:kt(t===void 0?64:+t);function i(){let o;if(r||(r=o=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),o)return r=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:kt(o),i):e},i.size=function(o){return arguments.length?(t=typeof o=="function"?o:kt(+o),i):t},i.context=function(o){return arguments.length?(r=o??null,i):r},i}function Vd(){}function Kd(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function Wj(e){this._context=e}Wj.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Kd(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Kd(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function NN(e){return new Wj(e)}function Uj(e){this._context=e}Uj.prototype={areaStart:Vd,areaEnd:Vd,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Kd(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function LN(e){return new Uj(e)}function Hj(e){this._context=e}Hj.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:Kd(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function BN(e){return new Hj(e)}function Vj(e){this._context=e}Vj.prototype={areaStart:Vd,areaEnd:Vd,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function FN(e){return new Vj(e)}function vw(e){return e<0?-1:1}function yw(e,t,r){var n=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(n||i<0&&-0),a=(r-e._y1)/(i||n<0&&-0),l=(o*i+a*n)/(n+i);return(vw(o)+vw(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(l))||0}function gw(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function kv(e,t,r){var n=e._x0,i=e._y0,o=e._x1,a=e._y1,l=(o-n)/3;e._context.bezierCurveTo(n+l,i+l*t,o-l,a-l*r,o,a)}function Gd(e){this._context=e}Gd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:kv(this,this._t0,gw(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,kv(this,gw(this,r=yw(this,e,t)),r);break;default:kv(this,this._t0,r=yw(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Kj(e){this._context=new Gj(e)}(Kj.prototype=Object.create(Gd.prototype)).point=function(e,t){Gd.prototype.point.call(this,t,e)};function Gj(e){this._context=e}Gj.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,o){this._context.bezierCurveTo(t,e,n,r,o,i)}};function zN(e){return new Gd(e)}function WN(e){return new Kj(e)}function Yj(e){this._context=e}Yj.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=mw(e),i=mw(t),o=0,a=1;a=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function HN(e){return new jh(e,.5)}function VN(e){return new jh(e,0)}function KN(e){return new jh(e,1)}function Yl(e,t){if((a=e.length)>1)for(var r=1,n,i,o=e[t[0]],a,l=o.length;r=0;)r[t]=t;return r}function GN(e,t){return e[t]}function YN(e){const t=[];return t.key=e,t}function qN(){var e=kt([]),t=fg,r=Yl,n=GN;function i(o){var a=Array.from(e.apply(this,arguments),YN),l,s=a.length,u=-1,f;for(const c of o)for(l=0,++u;l0){for(var r,n,i=0,o=e[0].length,a;i0){for(var r=0,n=e[t[0]],i,o=n.length;r0)||!((o=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,o,a;n=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function iL(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var qj={symbolCircle:L0,symbolCross:AN,symbolDiamond:_N,symbolSquare:TN,symbolStar:MN,symbolTriangle:kN,symbolWye:RN},oL=Math.PI/180,aL=function(t){var r="symbol".concat(Ph(t));return qj[r]||L0},lL=function(t,r,n){if(r==="area")return t;switch(n){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*oL;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},sL=function(t,r){qj["symbol".concat(Ph(t))]=r},_h=function(t){var r=t.type,n=r===void 0?"circle":r,i=t.size,o=i===void 0?64:i,a=t.sizeType,l=a===void 0?"area":a,s=nL(t,JN),u=xw(xw({},s),{},{type:n,size:o,sizeType:l}),f=function(){var m=aL(n),h=DN().type(m).size(lL(o,l,n));return h()},c=u.className,d=u.cx,p=u.cy,g=Xe(u,!0);return d===+d&&p===+p&&o===+o?D.createElement("path",dg({},g,{className:st("recharts-symbols",c),transform:"translate(".concat(d,", ").concat(p,")"),d:f()})):null};_h.registerSymbol=sL;function ql(e){"@babel/helpers - typeof";return ql=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ql(e)}function pg(){return pg=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var v=p.inactive?u:p.color;return D.createElement("li",pg({className:m,style:c,key:"legend-item-".concat(g)},uc(n.props,p,g)),D.createElement(ig,{width:a,height:a,viewBox:f,style:d},n.renderIcon(p)),D.createElement("span",{className:"recharts-legend-item-text",style:{color:v}},y?y(h,p,g):h))})}},{key:"render",value:function(){var n=this.props,i=n.payload,o=n.layout,a=n.align;if(!i||!i.length)return null;var l={padding:0,margin:0,textAlign:o==="horizontal"?a:"left"};return D.createElement("ul",{className:"recharts-default-legend",style:l},this.renderItems())}}])}(_.PureComponent);fc(B0,"displayName","Legend");fc(B0,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var mL=ch;function bL(){this.__data__=new mL,this.size=0}var xL=bL;function wL(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var SL=wL;function PL(e){return this.__data__.get(e)}var OL=PL;function AL(e){return this.__data__.has(e)}var jL=AL,_L=ch,TL=_0,$L=T0,EL=200;function CL(e,t){var r=this.__data__;if(r instanceof _L){var n=r.__data__;if(!TL||n.lengthl))return!1;var u=o.get(e),f=o.get(t);if(u&&f)return u==t&&f==e;var c=-1,d=!0,p=r&JL?new qL:void 0;for(o.set(e,t),o.set(t,e);++c-1&&e%1==0&&e-1&&e%1==0&&e<=nF}var U0=iF,oF=to,aF=U0,lF=ro,sF="[object Arguments]",uF="[object Array]",cF="[object Boolean]",fF="[object Date]",dF="[object Error]",pF="[object Function]",hF="[object Map]",vF="[object Number]",yF="[object Object]",gF="[object RegExp]",mF="[object Set]",bF="[object String]",xF="[object WeakMap]",wF="[object ArrayBuffer]",SF="[object DataView]",PF="[object Float32Array]",OF="[object Float64Array]",AF="[object Int8Array]",jF="[object Int16Array]",_F="[object Int32Array]",TF="[object Uint8Array]",$F="[object Uint8ClampedArray]",EF="[object Uint16Array]",CF="[object Uint32Array]",Lt={};Lt[PF]=Lt[OF]=Lt[AF]=Lt[jF]=Lt[_F]=Lt[TF]=Lt[$F]=Lt[EF]=Lt[CF]=!0;Lt[sF]=Lt[uF]=Lt[wF]=Lt[cF]=Lt[SF]=Lt[fF]=Lt[dF]=Lt[pF]=Lt[hF]=Lt[vF]=Lt[yF]=Lt[gF]=Lt[mF]=Lt[bF]=Lt[xF]=!1;function MF(e){return lF(e)&&aF(e.length)&&!!Lt[oF(e)]}var kF=MF;function IF(e){return function(t){return e(t)}}var a_=IF,Qd={exports:{}};Qd.exports;(function(e,t){var r=pj,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===n,a=o&&r.process,l=function(){try{var s=i&&i.require&&i.require("util").types;return s||a&&a.binding&&a.binding("util")}catch{}}();e.exports=l})(Qd,Qd.exports);var RF=Qd.exports,DF=kF,NF=a_,_w=RF,Tw=_w&&_w.isTypedArray,LF=Tw?NF(Tw):DF,l_=LF,BF=WB,FF=z0,zF=tn,WF=o_,UF=W0,HF=l_,VF=Object.prototype,KF=VF.hasOwnProperty;function GF(e,t){var r=zF(e),n=!r&&FF(e),i=!r&&!n&&WF(e),o=!r&&!n&&!i&&HF(e),a=r||n||i||o,l=a?BF(e.length,String):[],s=l.length;for(var u in e)(t||KF.call(e,u))&&!(a&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||UF(u,s)))&&l.push(u);return l}var YF=GF,qF=Object.prototype;function XF(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||qF;return e===r}var QF=XF;function ZF(e,t){return function(r){return e(t(r))}}var s_=ZF,JF=s_,e3=JF(Object.keys,Object),t3=e3,r3=QF,n3=t3,i3=Object.prototype,o3=i3.hasOwnProperty;function a3(e){if(!r3(e))return n3(e);var t=[];for(var r in Object(e))o3.call(e,r)&&r!="constructor"&&t.push(r);return t}var l3=a3,s3=A0,u3=U0;function c3(e){return e!=null&&u3(e.length)&&!s3(e)}var Zc=c3,f3=YF,d3=l3,p3=Zc;function h3(e){return p3(e)?f3(e):d3(e)}var Th=h3,v3=EB,y3=FB,g3=Th;function m3(e){return v3(e,g3,y3)}var b3=m3,$w=b3,x3=1,w3=Object.prototype,S3=w3.hasOwnProperty;function P3(e,t,r,n,i,o){var a=r&x3,l=$w(e),s=l.length,u=$w(t),f=u.length;if(s!=f&&!a)return!1;for(var c=s;c--;){var d=l[c];if(!(a?d in t:S3.call(t,d)))return!1}var p=o.get(e),g=o.get(t);if(p&&g)return p==t&&g==e;var y=!0;o.set(e,t),o.set(t,e);for(var m=a;++c-1}var w4=x4;function S4(e,t,r){for(var n=-1,i=e==null?0:e.length;++n=N4){var u=t?null:R4(e);if(u)return D4(u);a=!1,i=I4,s=new C4}else s=t?[]:l;e:for(;++n=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function J4(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function e8(e){return e.value}function t8(e,t){if(D.isValidElement(e))return D.cloneElement(e,t);if(typeof e=="function")return D.createElement(e,t);t.ref;var r=Z4(t,H4);return D.createElement(B0,r)}var Vw=1,Ho=function(e){function t(){var r;V4(this,t);for(var n=arguments.length,i=new Array(n),o=0;oVw||Math.abs(i.height-this.lastBoundingBox.height)>Vw)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,n&&n(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,n&&n(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Mi({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var i=this.props,o=i.layout,a=i.align,l=i.verticalAlign,s=i.margin,u=i.chartWidth,f=i.chartHeight,c,d;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(a==="center"&&o==="vertical"){var p=this.getBBoxSnapshot();c={left:((u||0)-p.width)/2}}else c=a==="right"?{right:s&&s.right||0}:{left:s&&s.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(l==="middle"){var g=this.getBBoxSnapshot();d={top:((f||0)-g.height)/2}}else d=l==="bottom"?{bottom:s&&s.bottom||0}:{top:s&&s.top||0};return Mi(Mi({},c),d)}},{key:"render",value:function(){var n=this,i=this.props,o=i.content,a=i.width,l=i.height,s=i.wrapperStyle,u=i.payloadUniqBy,f=i.payload,c=Mi(Mi({position:"absolute",width:a||"auto",height:l||"auto"},this.getDefaultPosition(s)),s);return D.createElement("div",{className:"recharts-legend-wrapper",style:c,ref:function(p){n.wrapperNode=p}},t8(o,Mi(Mi({},this.props),{},{payload:v_(f,u,e8)})))}}],[{key:"getWithHeight",value:function(n,i){var o=Mi(Mi({},this.defaultProps),n.props),a=o.layout;return a==="vertical"&&Pe(n.props.height)?{height:n.props.height}:a==="horizontal"?{width:n.props.width||i}:null}}])}(_.PureComponent);$h(Ho,"displayName","Legend");$h(Ho,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Kw=Qc,r8=z0,n8=tn,Gw=Kw?Kw.isConcatSpreadable:void 0;function i8(e){return n8(e)||r8(e)||!!(Gw&&e&&e[Gw])}var o8=i8,a8=n_,l8=o8;function m_(e,t,r,n,i){var o=-1,a=e.length;for(r||(r=l8),i||(i=[]);++o0&&r(l)?t>1?m_(l,t-1,r,n,i):a8(i,l):n||(i[i.length]=l)}return i}var b_=m_;function s8(e){return function(t,r,n){for(var i=-1,o=Object(t),a=n(t),l=a.length;l--;){var s=a[e?l:++i];if(r(o[s],s,o)===!1)break}return t}}var u8=s8,c8=u8,f8=c8(),d8=f8,p8=d8,h8=Th;function v8(e,t){return e&&p8(e,t,h8)}var x_=v8,y8=Zc;function g8(e,t){return function(r,n){if(r==null)return r;if(!y8(r))return e(r,n);for(var i=r.length,o=t?i:-1,a=Object(r);(t?o--:++ot||o&&a&&s&&!l&&!u||n&&a&&s||!r&&s||!i)return 1;if(!n&&!o&&!u&&e=l)return s;var u=r[n];return s*(u=="desc"?-1:1)}}return e.index-t.index}var C8=E8,Nv=E0,M8=C0,k8=Jo,I8=w_,R8=j8,D8=a_,N8=C8,L8=Cs,B8=tn;function F8(e,t,r){t.length?t=Nv(t,function(o){return B8(o)?function(a){return M8(a,o.length===1?o[0]:o)}:o}):t=[L8];var n=-1;t=Nv(t,D8(k8));var i=I8(e,function(o,a,l){var s=Nv(t,function(u){return u(o)});return{criteria:s,index:++n,value:o}});return R8(i,function(o,a){return N8(o,a,r)})}var z8=F8;function W8(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var U8=W8,H8=U8,qw=Math.max;function V8(e,t,r){return t=qw(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=qw(n.length-t,0),a=Array(o);++i0){if(++t>=t5)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var o5=i5,a5=e5,l5=o5,s5=l5(a5),u5=s5,c5=Cs,f5=K8,d5=u5;function p5(e,t){return d5(f5(e,t,c5),e+"")}var h5=p5,v5=j0,y5=Zc,g5=W0,m5=Zo;function b5(e,t,r){if(!m5(r))return!1;var n=typeof t;return(n=="number"?y5(r)&&g5(t,r.length):n=="string"&&t in r)?v5(r[t],e):!1}var Eh=b5,x5=b_,w5=z8,S5=h5,Qw=Eh,P5=S5(function(e,t){if(e==null)return[];var r=t.length;return r>1&&Qw(e,t[0],t[1])?t=[]:r>2&&Qw(t[0],t[1],t[2])&&(t=[t[0]]),w5(e,x5(t,1),[])}),O5=P5;const K0=Tt(O5);function dc(e){"@babel/helpers - typeof";return dc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dc(e)}function wg(){return wg=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=t.x),"".concat(vu,"-left"),Pe(r)&&t&&Pe(t.x)&&r=t.y),"".concat(vu,"-top"),Pe(n)&&t&&Pe(t.y)&&ny?Math.max(f,s[n]):Math.max(c,s[n])}function B5(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function F5(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,i=e.position,o=e.reverseDirection,a=e.tooltipBox,l=e.useTranslate3d,s=e.viewBox,u,f,c;return a.height>0&&a.width>0&&r?(f=e1({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:o,tooltipDimension:a.width,viewBox:s,viewBoxDimension:s.width}),c=e1({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:o,tooltipDimension:a.height,viewBox:s,viewBoxDimension:s.height}),u=B5({translateX:f,translateY:c,useTranslate3d:l})):u=N5,{cssProperties:u,cssClasses:L5({translateX:f,translateY:c,coordinate:r})}}function Ql(e){"@babel/helpers - typeof";return Ql=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ql(e)}function t1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function r1(e){for(var t=1;tn1||Math.abs(n.height-this.state.lastBoundingBox.height)>n1)&&this.setState({lastBoundingBox:{width:n.width,height:n.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var n,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,i=this.props,o=i.active,a=i.allowEscapeViewBox,l=i.animationDuration,s=i.animationEasing,u=i.children,f=i.coordinate,c=i.hasPayload,d=i.isAnimationActive,p=i.offset,g=i.position,y=i.reverseDirection,m=i.useTranslate3d,h=i.viewBox,v=i.wrapperStyle,x=F5({allowEscapeViewBox:a,coordinate:f,offsetTopLeft:p,position:g,reverseDirection:y,tooltipBox:this.state.lastBoundingBox,useTranslate3d:m,viewBox:h}),P=x.cssClasses,w=x.cssProperties,S=r1(r1({transition:d&&o?"transform ".concat(l,"ms ").concat(s):void 0},w),{},{pointerEvents:"none",visibility:!this.state.dismissed&&o&&c?"visible":"hidden",position:"absolute",top:0,left:0},v);return D.createElement("div",{tabIndex:-1,className:P,style:S,ref:function(E){n.wrapperNode=E}},u)}}])}(_.PureComponent),X5=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},ea={isSsr:X5()};function Zl(e){"@babel/helpers - typeof";return Zl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zl(e)}function i1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function o1(e){for(var t=1;t0;return D.createElement(q5,{allowEscapeViewBox:a,animationDuration:l,animationEasing:s,isAnimationActive:d,active:o,coordinate:f,hasPayload:S,offset:p,position:m,reverseDirection:h,useTranslate3d:v,viewBox:x,wrapperStyle:P},aW(u,o1(o1({},this.props),{},{payload:w})))}}])}(_.PureComponent);G0(Jn,"displayName","Tooltip");G0(Jn,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!ea.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var lW=ji,sW=function(){return lW.Date.now()},uW=sW,cW=/\s/;function fW(e){for(var t=e.length;t--&&cW.test(e.charAt(t)););return t}var dW=fW,pW=dW,hW=/^\s+/;function vW(e){return e&&e.slice(0,pW(e)+1).replace(hW,"")}var yW=vW,gW=yW,a1=Zo,mW=Ps,l1=NaN,bW=/^[-+]0x[0-9a-f]+$/i,xW=/^0b[01]+$/i,wW=/^0o[0-7]+$/i,SW=parseInt;function PW(e){if(typeof e=="number")return e;if(mW(e))return l1;if(a1(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=a1(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=gW(e);var r=xW.test(e);return r||wW.test(e)?SW(e.slice(2),r?2:8):bW.test(e)?l1:+e}var __=PW,OW=Zo,Bv=uW,s1=__,AW="Expected a function",jW=Math.max,_W=Math.min;function TW(e,t,r){var n,i,o,a,l,s,u=0,f=!1,c=!1,d=!0;if(typeof e!="function")throw new TypeError(AW);t=s1(t)||0,OW(r)&&(f=!!r.leading,c="maxWait"in r,o=c?jW(s1(r.maxWait)||0,t):o,d="trailing"in r?!!r.trailing:d);function p(S){var A=n,E=i;return n=i=void 0,u=S,a=e.apply(E,A),a}function g(S){return u=S,l=setTimeout(h,t),f?p(S):a}function y(S){var A=S-s,E=S-u,R=t-A;return c?_W(R,o-E):R}function m(S){var A=S-s,E=S-u;return s===void 0||A>=t||A<0||c&&E>=o}function h(){var S=Bv();if(m(S))return v(S);l=setTimeout(h,y(S))}function v(S){return l=void 0,d&&n?p(S):(n=i=void 0,a)}function x(){l!==void 0&&clearTimeout(l),u=0,n=s=i=l=void 0}function P(){return l===void 0?a:v(Bv())}function w(){var S=Bv(),A=m(S);if(n=arguments,i=this,s=S,A){if(l===void 0)return g(s);if(c)return clearTimeout(l),l=setTimeout(h,t),p(s)}return l===void 0&&(l=setTimeout(h,t)),a}return w.cancel=x,w.flush=P,w}var $W=TW,EW=$W,CW=Zo,MW="Expected a function";function kW(e,t,r){var n=!0,i=!0;if(typeof e!="function")throw new TypeError(MW);return CW(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),EW(e,t,{leading:n,maxWait:t,trailing:i})}var IW=kW;const T_=Tt(IW);function hc(e){"@babel/helpers - typeof";return hc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hc(e)}function u1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Kf(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&(ae=T_(ae,y,{trailing:!0,leading:!1}));var te=new ResizeObserver(ae),X=w.current.getBoundingClientRect(),ne=X.width,ce=X.height;return H(ne,ce),te.observe(w.current),function(){te.disconnect()}},[H,y]);var F=_.useMemo(function(){var ae=R.containerWidth,te=R.containerHeight;if(ae<0||te<0)return null;Hi(ma(a)||ma(s),`The width(%s) and height(%s) are both fixed numbers, - maybe you don't need to use a ResponsiveContainer.`,a,s),Hi(!r||r>0,"The aspect(%s) must be greater than zero.",r);var X=ma(a)?ae:a,ne=ma(s)?te:s;r&&r>0&&(X?ne=X/r:ne&&(X=ne*r),d&&ne>d&&(ne=d)),Hi(X>0||ne>0,`The width(%s) and height(%s) of chart should be greater than 0, - please check the style of container, or the props width(%s) and height(%s), - or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the - height and width.`,X,ne,a,s,f,c,r);var ce=!Array.isArray(p)&&Ui(p.type).endsWith("Chart");return D.Children.map(p,function(Q){return D.isValidElement(Q)?_.cloneElement(Q,Kf({width:X,height:ne},ce?{style:Kf({height:"100%",width:"100%",maxHeight:ne,maxWidth:X},Q.props.style)}:{})):Q})},[r,p,s,d,c,f,R,a]);return D.createElement("div",{id:m?"".concat(m):void 0,className:st("recharts-responsive-container",h),style:Kf(Kf({},P),{},{width:a,height:s,minWidth:f,minHeight:c,maxHeight:d}),ref:w},F)}),Y0=function(t){return null};Y0.displayName="Cell";function vc(e){"@babel/helpers - typeof";return vc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vc(e)}function f1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ag(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||ea.isSsr)return{width:0,height:0};var n=YW(r),i=JSON.stringify({text:t,copyStyle:n});if(dl.widthCache[i])return dl.widthCache[i];try{var o=document.getElementById(d1);o||(o=document.createElement("span"),o.setAttribute("id",d1),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var a=Ag(Ag({},GW),n);Object.assign(o.style,a),o.textContent="".concat(t);var l=o.getBoundingClientRect(),s={width:l.width,height:l.height};return dl.widthCache[i]=s,++dl.cacheCount>KW&&(dl.cacheCount=0,dl.widthCache={}),s}catch{return{width:0,height:0}}},qW=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function yc(e){"@babel/helpers - typeof";return yc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yc(e)}function tp(e,t){return JW(e)||ZW(e,t)||QW(e,t)||XW()}function XW(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function QW(e,t){if(e){if(typeof e=="string")return p1(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return p1(e,t)}}function p1(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function p6(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function b1(e,t){return g6(e)||y6(e,t)||v6(e,t)||h6()}function h6(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function v6(e,t){if(e){if(typeof e=="string")return x1(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return x1(e,t)}}function x1(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&arguments[0]!==void 0?arguments[0]:[];return X.reduce(function(ne,ce){var Q=ce.word,ie=ce.width,fe=ne[ne.length-1];if(fe&&(i==null||o||fe.width+ie+nce.width?ne:ce})};if(!f)return p;for(var y="…",m=function(X){var ne=c.slice(0,X),ce=k_({breakAll:u,style:s,children:ne+y}).wordsWithComputedWidth,Q=d(ce),ie=Q.length>a||g(Q).width>Number(i);return[ie,Q]},h=0,v=c.length-1,x=0,P;h<=v&&x<=c.length-1;){var w=Math.floor((h+v)/2),S=w-1,A=m(S),E=b1(A,2),R=E[0],K=E[1],H=m(w),F=b1(H,1),ae=F[0];if(!R&&!ae&&(h=w+1),R&&ae&&(v=w-1),!R&&ae){P=K;break}x++}return P||p},w1=function(t){var r=Ge(t)?[]:t.toString().split(M_);return[{words:r}]},b6=function(t){var r=t.width,n=t.scaleToFit,i=t.children,o=t.style,a=t.breakAll,l=t.maxLines;if((r||n)&&!ea.isSsr){var s,u,f=k_({breakAll:a,children:i,style:o});if(f){var c=f.wordsWithComputedWidth,d=f.spaceWidth;s=c,u=d}else return w1(i);return m6({breakAll:a,children:i,maxLines:l,style:o},s,u,r,n)}return w1(i)},S1="#808080",rp=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,o=i===void 0?0:i,a=t.lineHeight,l=a===void 0?"1em":a,s=t.capHeight,u=s===void 0?"0.71em":s,f=t.scaleToFit,c=f===void 0?!1:f,d=t.textAnchor,p=d===void 0?"start":d,g=t.verticalAnchor,y=g===void 0?"end":g,m=t.fill,h=m===void 0?S1:m,v=m1(t,f6),x=_.useMemo(function(){return b6({breakAll:v.breakAll,children:v.children,maxLines:v.maxLines,scaleToFit:c,style:v.style,width:v.width})},[v.breakAll,v.children,v.maxLines,c,v.style,v.width]),P=v.dx,w=v.dy,S=v.angle,A=v.className,E=v.breakAll,R=m1(v,d6);if(!fr(n)||!fr(o))return null;var K=n+(Pe(P)?P:0),H=o+(Pe(w)?w:0),F;switch(y){case"start":F=Fv("calc(".concat(u,")"));break;case"middle":F=Fv("calc(".concat((x.length-1)/2," * -").concat(l," + (").concat(u," / 2))"));break;default:F=Fv("calc(".concat(x.length-1," * -").concat(l,")"));break}var ae=[];if(c){var te=x[0].width,X=v.width;ae.push("scale(".concat((Pe(X)?X/te:1)/te,")"))}return S&&ae.push("rotate(".concat(S,", ").concat(K,", ").concat(H,")")),ae.length&&(R.transform=ae.join(" ")),D.createElement("text",jg({},Xe(R,!0),{x:K,y:H,className:st("recharts-text",A),textAnchor:p,fill:h.includes("url")?S1:h}),x.map(function(ne,ce){var Q=ne.words.join(E?"":" ");return D.createElement("tspan",{x:K,dy:ce===0?F:l,key:"".concat(Q,"-").concat(ce)},Q)}))};function Vo(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function x6(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function q0(e){let t,r,n;e.length!==2?(t=Vo,r=(l,s)=>Vo(e(l),s),n=(l,s)=>e(l)-s):(t=e===Vo||e===x6?e:w6,r=e,n=e);function i(l,s,u=0,f=l.length){if(u>>1;r(l[c],s)<0?u=c+1:f=c}while(u>>1;r(l[c],s)<=0?u=c+1:f=c}while(uu&&n(l[c-1],s)>-n(l[c],s)?c-1:c}return{left:i,center:a,right:o}}function w6(){return 0}function I_(e){return e===null?NaN:+e}function*S6(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const P6=q0(Vo),Jc=P6.right;q0(I_).center;class P1 extends Map{constructor(t,r=j6){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(O1(this,t))}has(t){return super.has(O1(this,t))}set(t,r){return super.set(O6(this,t),r)}delete(t){return super.delete(A6(this,t))}}function O1({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function O6({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function A6({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function j6(e){return e!==null&&typeof e=="object"?e.valueOf():e}function _6(e=Vo){if(e===Vo)return R_;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function R_(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const T6=Math.sqrt(50),$6=Math.sqrt(10),E6=Math.sqrt(2);function np(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),o=n/Math.pow(10,i),a=o>=T6?10:o>=$6?5:o>=E6?2:1;let l,s,u;return i<0?(u=Math.pow(10,-i)/a,l=Math.round(e*u),s=Math.round(t*u),l/ut&&--s,u=-u):(u=Math.pow(10,i)*a,l=Math.round(e/u),s=Math.round(t/u),l*ut&&--s),s0))return[];if(e===t)return[e];const n=t=i))return[];const l=o-i+1,s=new Array(l);if(n)if(a<0)for(let u=0;u=n)&&(r=n);return r}function j1(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function D_(e,t,r=0,n=1/0,i){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(i=i===void 0?R_:_6(i);n>r;){if(n-r>600){const s=n-r+1,u=t-r+1,f=Math.log(s),c=.5*Math.exp(2*f/3),d=.5*Math.sqrt(f*c*(s-c)/s)*(u-s/2<0?-1:1),p=Math.max(r,Math.floor(t-u*c/s+d)),g=Math.min(n,Math.floor(t+(s-u)*c/s+d));D_(e,t,p,g,i)}const o=e[t];let a=r,l=n;for(yu(e,r,t),i(e[n],o)>0&&yu(e,r,n);a0;)--l}i(e[r],o)===0?yu(e,r,l):(++l,yu(e,l,n)),l<=t&&(r=l+1),t<=l&&(n=l-1)}return e}function yu(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function C6(e,t,r){if(e=Float64Array.from(S6(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return j1(e);if(t>=1)return A1(e);var n,i=(n-1)*t,o=Math.floor(i),a=A1(D_(e,o).subarray(0,o+1)),l=j1(e.subarray(o+1));return a+(l-a)*(i-o)}}function M6(e,t,r=I_){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,o=Math.floor(i),a=+r(e[o],o,e),l=+r(e[o+1],o+1,e);return a+(l-a)*(i-o)}}function k6(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,o=new Array(i);++n>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Yf(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Yf(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=R6.exec(e))?new qr(t[1],t[2],t[3],1):(t=D6.exec(e))?new qr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=N6.exec(e))?Yf(t[1],t[2],t[3],t[4]):(t=L6.exec(e))?Yf(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=B6.exec(e))?k1(t[1],t[2]/100,t[3]/100,1):(t=F6.exec(e))?k1(t[1],t[2]/100,t[3]/100,t[4]):_1.hasOwnProperty(e)?E1(_1[e]):e==="transparent"?new qr(NaN,NaN,NaN,0):null}function E1(e){return new qr(e>>16&255,e>>8&255,e&255,1)}function Yf(e,t,r,n){return n<=0&&(e=t=r=NaN),new qr(e,t,r,n)}function U6(e){return e instanceof ef||(e=xc(e)),e?(e=e.rgb(),new qr(e.r,e.g,e.b,e.opacity)):new qr}function Cg(e,t,r,n){return arguments.length===1?U6(e):new qr(e,t,r,n??1)}function qr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}Q0(qr,Cg,L_(ef,{brighter(e){return e=e==null?ip:Math.pow(ip,e),new qr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?mc:Math.pow(mc,e),new qr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new qr(ja(this.r),ja(this.g),ja(this.b),op(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:C1,formatHex:C1,formatHex8:H6,formatRgb:M1,toString:M1}));function C1(){return`#${ba(this.r)}${ba(this.g)}${ba(this.b)}`}function H6(){return`#${ba(this.r)}${ba(this.g)}${ba(this.b)}${ba((isNaN(this.opacity)?1:this.opacity)*255)}`}function M1(){const e=op(this.opacity);return`${e===1?"rgb(":"rgba("}${ja(this.r)}, ${ja(this.g)}, ${ja(this.b)}${e===1?")":`, ${e})`}`}function op(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ja(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ba(e){return e=ja(e),(e<16?"0":"")+e.toString(16)}function k1(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new ni(e,t,r,n)}function B_(e){if(e instanceof ni)return new ni(e.h,e.s,e.l,e.opacity);if(e instanceof ef||(e=xc(e)),!e)return new ni;if(e instanceof ni)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=NaN,l=o-i,s=(o+i)/2;return l?(t===o?a=(r-n)/l+(r0&&s<1?0:a,new ni(a,l,s,e.opacity)}function V6(e,t,r,n){return arguments.length===1?B_(e):new ni(e,t,r,n??1)}function ni(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Q0(ni,V6,L_(ef,{brighter(e){return e=e==null?ip:Math.pow(ip,e),new ni(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?mc:Math.pow(mc,e),new ni(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new qr(zv(e>=240?e-240:e+120,i,n),zv(e,i,n),zv(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new ni(I1(this.h),qf(this.s),qf(this.l),op(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=op(this.opacity);return`${e===1?"hsl(":"hsla("}${I1(this.h)}, ${qf(this.s)*100}%, ${qf(this.l)*100}%${e===1?")":`, ${e})`}`}}));function I1(e){return e=(e||0)%360,e<0?e+360:e}function qf(e){return Math.max(0,Math.min(1,e||0))}function zv(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const Z0=e=>()=>e;function K6(e,t){return function(r){return e+r*t}}function G6(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function Y6(e){return(e=+e)==1?F_:function(t,r){return r-t?G6(t,r,e):Z0(isNaN(t)?r:t)}}function F_(e,t){var r=t-e;return r?K6(e,r):Z0(isNaN(e)?t:e)}const R1=function e(t){var r=Y6(t);function n(i,o){var a=r((i=Cg(i)).r,(o=Cg(o)).r),l=r(i.g,o.g),s=r(i.b,o.b),u=F_(i.opacity,o.opacity);return function(f){return i.r=a(f),i.g=l(f),i.b=s(f),i.opacity=u(f),i+""}}return n.gamma=e,n}(1);function q6(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(o){for(i=0;ir&&(o=t.slice(r,o),l[a]?l[a]+=o:l[++a]=o),(n=n[0])===(i=i[0])?l[a]?l[a]+=i:l[++a]=i:(l[++a]=null,s.push({i:a,x:ap(n,i)})),r=Wv.lastIndex;return rt&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function aU(e,t,r){var n=e[0],i=e[1],o=t[0],a=t[1];return i2?lU:aU,s=u=null,c}function c(d){return d==null||isNaN(d=+d)?o:(s||(s=l(e.map(n),t,r)))(n(a(d)))}return c.invert=function(d){return a(i((u||(u=l(t,e.map(n),ap)))(d)))},c.domain=function(d){return arguments.length?(e=Array.from(d,lp),f()):e.slice()},c.range=function(d){return arguments.length?(t=Array.from(d),f()):t.slice()},c.rangeRound=function(d){return t=Array.from(d),r=J0,f()},c.clamp=function(d){return arguments.length?(a=d?!0:zr,f()):a!==zr},c.interpolate=function(d){return arguments.length?(r=d,f()):r},c.unknown=function(d){return arguments.length?(o=d,c):o},function(d,p){return n=d,i=p,f()}}function eb(){return Ch()(zr,zr)}function sU(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function sp(e,t){if(!isFinite(e)||e===0)return null;var r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function Jl(e){return e=sp(Math.abs(e)),e?e[1]:NaN}function uU(e,t){return function(r,n){for(var i=r.length,o=[],a=0,l=e[0],s=0;i>0&&l>0&&(s+l+1>n&&(l=Math.max(1,n-s)),o.push(r.substring(i-=l,i+l)),!((s+=l+1)>n));)l=e[a=(a+1)%e.length];return o.reverse().join(t)}}function cU(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var fU=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function wc(e){if(!(t=fU.exec(e)))throw new Error("invalid format: "+e);var t;return new tb({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}wc.prototype=tb.prototype;function tb(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}tb.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function dU(e){e:for(var t=e.length,r=1,n=-1,i;r0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var up;function pU(e,t){var r=sp(e,t);if(!r)return up=void 0,e.toPrecision(t);var n=r[0],i=r[1],o=i-(up=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=n.length;return o===a?n:o>a?n+new Array(o-a+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+new Array(1-o).join("0")+sp(e,Math.max(0,t+o-1))[0]}function N1(e,t){var r=sp(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const L1={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:sU,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>N1(e*100,t),r:N1,s:pU,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function B1(e){return e}var F1=Array.prototype.map,z1=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function hU(e){var t=e.grouping===void 0||e.thousands===void 0?B1:uU(F1.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?B1:cU(F1.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"−":e.minus+"",s=e.nan===void 0?"NaN":e.nan+"";function u(c,d){c=wc(c);var p=c.fill,g=c.align,y=c.sign,m=c.symbol,h=c.zero,v=c.width,x=c.comma,P=c.precision,w=c.trim,S=c.type;S==="n"?(x=!0,S="g"):L1[S]||(P===void 0&&(P=12),w=!0,S="g"),(h||p==="0"&&g==="=")&&(h=!0,p="0",g="=");var A=(d&&d.prefix!==void 0?d.prefix:"")+(m==="$"?r:m==="#"&&/[boxX]/.test(S)?"0"+S.toLowerCase():""),E=(m==="$"?n:/[%p]/.test(S)?a:"")+(d&&d.suffix!==void 0?d.suffix:""),R=L1[S],K=/[defgprs%]/.test(S);P=P===void 0?6:/[gprs]/.test(S)?Math.max(1,Math.min(21,P)):Math.max(0,Math.min(20,P));function H(F){var ae=A,te=E,X,ne,ce;if(S==="c")te=R(F)+te,F="";else{F=+F;var Q=F<0||1/F<0;if(F=isNaN(F)?s:R(Math.abs(F),P),w&&(F=dU(F)),Q&&+F==0&&y!=="+"&&(Q=!1),ae=(Q?y==="("?y:l:y==="-"||y==="("?"":y)+ae,te=(S==="s"&&!isNaN(F)&&up!==void 0?z1[8+up/3]:"")+te+(Q&&y==="("?")":""),K){for(X=-1,ne=F.length;++Xce||ce>57){te=(ce===46?i+F.slice(X+1):F.slice(X))+te,F=F.slice(0,X);break}}}x&&!h&&(F=t(F,1/0));var ie=ae.length+F.length+te.length,fe=ie>1)+ae+F+te+fe.slice(ie);break;default:F=fe+ae+F+te;break}return o(F)}return H.toString=function(){return c+""},H}function f(c,d){var p=Math.max(-8,Math.min(8,Math.floor(Jl(d)/3)))*3,g=Math.pow(10,-p),y=u((c=wc(c),c.type="f",c),{suffix:z1[8+p/3]});return function(m){return y(g*m)}}return{format:u,formatPrefix:f}}var Xf,rb,z_;vU({thousands:",",grouping:[3],currency:["$",""]});function vU(e){return Xf=hU(e),rb=Xf.format,z_=Xf.formatPrefix,Xf}function yU(e){return Math.max(0,-Jl(Math.abs(e)))}function gU(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Jl(t)/3)))*3-Jl(Math.abs(e)))}function mU(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Jl(t)-Jl(e))+1}function W_(e,t,r,n){var i=$g(e,t,r),o;switch(n=wc(n??",f"),n.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(o=gU(i,a))&&(n.precision=o),z_(n,a)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(o=mU(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=o-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(o=yU(i))&&(n.precision=o-(n.type==="%")*2);break}}return rb(n)}function ta(e){var t=e.domain;return e.ticks=function(r){var n=t();return _g(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return W_(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,o=n.length-1,a=n[i],l=n[o],s,u,f=10;for(l0;){if(u=Tg(a,l,r),u===s)return n[i]=a,n[o]=l,t(n);if(u>0)a=Math.floor(a/u)*u,l=Math.ceil(l/u)*u;else if(u<0)a=Math.ceil(a*u)/u,l=Math.floor(l*u)/u;else break;s=u}return e},e}function cp(){var e=eb();return e.copy=function(){return tf(e,cp())},Ln.apply(e,arguments),ta(e)}function U_(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,lp),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return U_(e).unknown(t)},e=arguments.length?Array.from(e,lp):[0,1],ta(r)}function H_(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],o=e[n],a;return oMath.pow(e,t)}function PU(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function H1(e){return(t,r)=>-e(-t,r)}function nb(e){const t=e(W1,U1),r=t.domain;let n=10,i,o;function a(){return i=PU(n),o=SU(n),r()[0]<0?(i=H1(i),o=H1(o),e(bU,xU)):e(W1,U1),t}return t.base=function(l){return arguments.length?(n=+l,a()):n},t.domain=function(l){return arguments.length?(r(l),a()):r()},t.ticks=l=>{const s=r();let u=s[0],f=s[s.length-1];const c=f0){for(;d<=p;++d)for(g=1;gf)break;h.push(y)}}else for(;d<=p;++d)for(g=n-1;g>=1;--g)if(y=d>0?g/o(-d):g*o(d),!(yf)break;h.push(y)}h.length*2{if(l==null&&(l=10),s==null&&(s=n===10?"s":","),typeof s!="function"&&(!(n%1)&&(s=wc(s)).precision==null&&(s.trim=!0),s=rb(s)),l===1/0)return s;const u=Math.max(1,n*l/t.ticks().length);return f=>{let c=f/o(Math.round(i(f)));return c*nr(H_(r(),{floor:l=>o(Math.floor(i(l))),ceil:l=>o(Math.ceil(i(l)))})),t}function V_(){const e=nb(Ch()).domain([1,10]);return e.copy=()=>tf(e,V_()).base(e.base()),Ln.apply(e,arguments),e}function V1(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function K1(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function ib(e){var t=1,r=e(V1(t),K1(t));return r.constant=function(n){return arguments.length?e(V1(t=+n),K1(t)):t},ta(r)}function K_(){var e=ib(Ch());return e.copy=function(){return tf(e,K_()).constant(e.constant())},Ln.apply(e,arguments)}function G1(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function OU(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function AU(e){return e<0?-e*e:e*e}function ob(e){var t=e(zr,zr),r=1;function n(){return r===1?e(zr,zr):r===.5?e(OU,AU):e(G1(r),G1(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},ta(t)}function ab(){var e=ob(Ch());return e.copy=function(){return tf(e,ab()).exponent(e.exponent())},Ln.apply(e,arguments),e}function jU(){return ab.apply(null,arguments).exponent(.5)}function Y1(e){return Math.sign(e)*e*e}function _U(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function G_(){var e=eb(),t=[0,1],r=!1,n;function i(o){var a=_U(e(o));return isNaN(a)?n:r?Math.round(a):a}return i.invert=function(o){return e.invert(Y1(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,lp)).map(Y1)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(r=!!o,i):r},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return G_(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},Ln.apply(i,arguments),ta(i)}function Y_(){var e=[],t=[],r=[],n;function i(){var a=0,l=Math.max(1,t.length);for(r=new Array(l-1);++a0?r[l-1]:e[0],l=r?[n[r-1],t]:[n[u-1],n[u]]},a.unknown=function(s){return arguments.length&&(o=s),a},a.thresholds=function(){return n.slice()},a.copy=function(){return q_().domain([e,t]).range(i).unknown(o)},Ln.apply(ta(a),arguments)}function X_(){var e=[.5],t=[0,1],r,n=1;function i(o){return o!=null&&o<=o?t[Jc(e,o,0,n)]:r}return i.domain=function(o){return arguments.length?(e=Array.from(o),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var a=t.indexOf(o);return[e[a-1],e[a]]},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return X_().domain(e).range(t).unknown(r)},Ln.apply(i,arguments)}const Uv=new Date,Hv=new Date;function pr(e,t,r,n){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const a=i(o),l=i.ceil(o);return o-a(t(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,l)=>{const s=[];if(o=i.ceil(o),l=l==null?1:Math.floor(l),!(o0))return s;let u;do s.push(u=new Date(+o)),t(o,l),e(o);while(upr(a=>{if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},(a,l)=>{if(a>=a)if(l<0)for(;++l<=0;)for(;t(a,-1),!o(a););else for(;--l>=0;)for(;t(a,1),!o(a););}),r&&(i.count=(o,a)=>(Uv.setTime(+o),Hv.setTime(+a),e(Uv),e(Hv),Math.floor(r(Uv,Hv))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(n?a=>n(a)%o===0:a=>i.count(0,a)%o===0):i)),i}const fp=pr(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);fp.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?pr(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):fp);fp.range;const Bi=1e3,Cn=Bi*60,Fi=Cn*60,Qi=Fi*24,lb=Qi*7,q1=Qi*30,Vv=Qi*365,xa=pr(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Bi)},(e,t)=>(t-e)/Bi,e=>e.getUTCSeconds());xa.range;const sb=pr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Bi)},(e,t)=>{e.setTime(+e+t*Cn)},(e,t)=>(t-e)/Cn,e=>e.getMinutes());sb.range;const ub=pr(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Cn)},(e,t)=>(t-e)/Cn,e=>e.getUTCMinutes());ub.range;const cb=pr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Bi-e.getMinutes()*Cn)},(e,t)=>{e.setTime(+e+t*Fi)},(e,t)=>(t-e)/Fi,e=>e.getHours());cb.range;const fb=pr(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Fi)},(e,t)=>(t-e)/Fi,e=>e.getUTCHours());fb.range;const rf=pr(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Cn)/Qi,e=>e.getDate()-1);rf.range;const Mh=pr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Qi,e=>e.getUTCDate()-1);Mh.range;const Q_=pr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Qi,e=>Math.floor(e/Qi));Q_.range;function Ha(e){return pr(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*Cn)/lb)}const kh=Ha(0),dp=Ha(1),TU=Ha(2),$U=Ha(3),es=Ha(4),EU=Ha(5),CU=Ha(6);kh.range;dp.range;TU.range;$U.range;es.range;EU.range;CU.range;function Va(e){return pr(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/lb)}const Ih=Va(0),pp=Va(1),MU=Va(2),kU=Va(3),ts=Va(4),IU=Va(5),RU=Va(6);Ih.range;pp.range;MU.range;kU.range;ts.range;IU.range;RU.range;const db=pr(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());db.range;const pb=pr(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());pb.range;const Zi=pr(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Zi.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:pr(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});Zi.range;const Ji=pr(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Ji.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:pr(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});Ji.range;function Z_(e,t,r,n,i,o){const a=[[xa,1,Bi],[xa,5,5*Bi],[xa,15,15*Bi],[xa,30,30*Bi],[o,1,Cn],[o,5,5*Cn],[o,15,15*Cn],[o,30,30*Cn],[i,1,Fi],[i,3,3*Fi],[i,6,6*Fi],[i,12,12*Fi],[n,1,Qi],[n,2,2*Qi],[r,1,lb],[t,1,q1],[t,3,3*q1],[e,1,Vv]];function l(u,f,c){const d=fm).right(a,d);if(p===a.length)return e.every($g(u/Vv,f/Vv,c));if(p===0)return fp.every(Math.max($g(u,f,c),1));const[g,y]=a[d/a[p-1][2]53)return null;"w"in q||(q.w=1),"Z"in q?(Ae=Gv(gu(q.y,0,1)),je=Ae.getUTCDay(),Ae=je>4||je===0?pp.ceil(Ae):pp(Ae),Ae=Mh.offset(Ae,(q.V-1)*7),q.y=Ae.getUTCFullYear(),q.m=Ae.getUTCMonth(),q.d=Ae.getUTCDate()+(q.w+6)%7):(Ae=Kv(gu(q.y,0,1)),je=Ae.getDay(),Ae=je>4||je===0?dp.ceil(Ae):dp(Ae),Ae=rf.offset(Ae,(q.V-1)*7),q.y=Ae.getFullYear(),q.m=Ae.getMonth(),q.d=Ae.getDate()+(q.w+6)%7)}else("W"in q||"U"in q)&&("w"in q||(q.w="u"in q?q.u%7:"W"in q?1:0),je="Z"in q?Gv(gu(q.y,0,1)).getUTCDay():Kv(gu(q.y,0,1)).getDay(),q.m=0,q.d="W"in q?(q.w+6)%7+q.W*7-(je+5)%7:q.w+q.U*7-(je+6)%7);return"Z"in q?(q.H+=q.Z/100|0,q.M+=q.Z%100,Gv(q)):Kv(q)}}function E(Te,Ke,pe,q){for(var U=0,Ae=Ke.length,je=pe.length,Fe,Ie;U=je)return-1;if(Fe=Ke.charCodeAt(U++),Fe===37){if(Fe=Ke.charAt(U++),Ie=w[Fe in X1?Ke.charAt(U++):Fe],!Ie||(q=Ie(Te,pe,q))<0)return-1}else if(Fe!=pe.charCodeAt(q++))return-1}return q}function R(Te,Ke,pe){var q=u.exec(Ke.slice(pe));return q?(Te.p=f.get(q[0].toLowerCase()),pe+q[0].length):-1}function K(Te,Ke,pe){var q=p.exec(Ke.slice(pe));return q?(Te.w=g.get(q[0].toLowerCase()),pe+q[0].length):-1}function H(Te,Ke,pe){var q=c.exec(Ke.slice(pe));return q?(Te.w=d.get(q[0].toLowerCase()),pe+q[0].length):-1}function F(Te,Ke,pe){var q=h.exec(Ke.slice(pe));return q?(Te.m=v.get(q[0].toLowerCase()),pe+q[0].length):-1}function ae(Te,Ke,pe){var q=y.exec(Ke.slice(pe));return q?(Te.m=m.get(q[0].toLowerCase()),pe+q[0].length):-1}function te(Te,Ke,pe){return E(Te,t,Ke,pe)}function X(Te,Ke,pe){return E(Te,r,Ke,pe)}function ne(Te,Ke,pe){return E(Te,n,Ke,pe)}function ce(Te){return a[Te.getDay()]}function Q(Te){return o[Te.getDay()]}function ie(Te){return s[Te.getMonth()]}function fe(Te){return l[Te.getMonth()]}function le(Te){return i[+(Te.getHours()>=12)]}function Se(Te){return 1+~~(Te.getMonth()/3)}function Ee(Te){return a[Te.getUTCDay()]}function nt(Te){return o[Te.getUTCDay()]}function it(Te){return s[Te.getUTCMonth()]}function Ot(Te){return l[Te.getUTCMonth()]}function dt(Te){return i[+(Te.getUTCHours()>=12)]}function Zt(Te){return 1+~~(Te.getUTCMonth()/3)}return{format:function(Te){var Ke=S(Te+="",x);return Ke.toString=function(){return Te},Ke},parse:function(Te){var Ke=A(Te+="",!1);return Ke.toString=function(){return Te},Ke},utcFormat:function(Te){var Ke=S(Te+="",P);return Ke.toString=function(){return Te},Ke},utcParse:function(Te){var Ke=A(Te+="",!0);return Ke.toString=function(){return Te},Ke}}}var X1={"-":"",_:" ",0:"0"},xr=/^\s*\d+/,zU=/^%/,WU=/[\\^$*+?|[\]().{}]/g;function yt(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",o=i.length;return n+(o[t.toLowerCase(),r]))}function HU(e,t,r){var n=xr.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function VU(e,t,r){var n=xr.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function KU(e,t,r){var n=xr.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function GU(e,t,r){var n=xr.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function YU(e,t,r){var n=xr.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function Q1(e,t,r){var n=xr.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function Z1(e,t,r){var n=xr.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function qU(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function XU(e,t,r){var n=xr.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function QU(e,t,r){var n=xr.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function J1(e,t,r){var n=xr.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function ZU(e,t,r){var n=xr.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function eS(e,t,r){var n=xr.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function JU(e,t,r){var n=xr.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function eH(e,t,r){var n=xr.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function tH(e,t,r){var n=xr.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function rH(e,t,r){var n=xr.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function nH(e,t,r){var n=zU.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function iH(e,t,r){var n=xr.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function oH(e,t,r){var n=xr.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function tS(e,t){return yt(e.getDate(),t,2)}function aH(e,t){return yt(e.getHours(),t,2)}function lH(e,t){return yt(e.getHours()%12||12,t,2)}function sH(e,t){return yt(1+rf.count(Zi(e),e),t,3)}function J_(e,t){return yt(e.getMilliseconds(),t,3)}function uH(e,t){return J_(e,t)+"000"}function cH(e,t){return yt(e.getMonth()+1,t,2)}function fH(e,t){return yt(e.getMinutes(),t,2)}function dH(e,t){return yt(e.getSeconds(),t,2)}function pH(e){var t=e.getDay();return t===0?7:t}function hH(e,t){return yt(kh.count(Zi(e)-1,e),t,2)}function eT(e){var t=e.getDay();return t>=4||t===0?es(e):es.ceil(e)}function vH(e,t){return e=eT(e),yt(es.count(Zi(e),e)+(Zi(e).getDay()===4),t,2)}function yH(e){return e.getDay()}function gH(e,t){return yt(dp.count(Zi(e)-1,e),t,2)}function mH(e,t){return yt(e.getFullYear()%100,t,2)}function bH(e,t){return e=eT(e),yt(e.getFullYear()%100,t,2)}function xH(e,t){return yt(e.getFullYear()%1e4,t,4)}function wH(e,t){var r=e.getDay();return e=r>=4||r===0?es(e):es.ceil(e),yt(e.getFullYear()%1e4,t,4)}function SH(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+yt(t/60|0,"0",2)+yt(t%60,"0",2)}function rS(e,t){return yt(e.getUTCDate(),t,2)}function PH(e,t){return yt(e.getUTCHours(),t,2)}function OH(e,t){return yt(e.getUTCHours()%12||12,t,2)}function AH(e,t){return yt(1+Mh.count(Ji(e),e),t,3)}function tT(e,t){return yt(e.getUTCMilliseconds(),t,3)}function jH(e,t){return tT(e,t)+"000"}function _H(e,t){return yt(e.getUTCMonth()+1,t,2)}function TH(e,t){return yt(e.getUTCMinutes(),t,2)}function $H(e,t){return yt(e.getUTCSeconds(),t,2)}function EH(e){var t=e.getUTCDay();return t===0?7:t}function CH(e,t){return yt(Ih.count(Ji(e)-1,e),t,2)}function rT(e){var t=e.getUTCDay();return t>=4||t===0?ts(e):ts.ceil(e)}function MH(e,t){return e=rT(e),yt(ts.count(Ji(e),e)+(Ji(e).getUTCDay()===4),t,2)}function kH(e){return e.getUTCDay()}function IH(e,t){return yt(pp.count(Ji(e)-1,e),t,2)}function RH(e,t){return yt(e.getUTCFullYear()%100,t,2)}function DH(e,t){return e=rT(e),yt(e.getUTCFullYear()%100,t,2)}function NH(e,t){return yt(e.getUTCFullYear()%1e4,t,4)}function LH(e,t){var r=e.getUTCDay();return e=r>=4||r===0?ts(e):ts.ceil(e),yt(e.getUTCFullYear()%1e4,t,4)}function BH(){return"+0000"}function nS(){return"%"}function iS(e){return+e}function oS(e){return Math.floor(+e/1e3)}var pl,nT,iT;FH({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function FH(e){return pl=FU(e),nT=pl.format,pl.parse,iT=pl.utcFormat,pl.utcParse,pl}function zH(e){return new Date(e)}function WH(e){return e instanceof Date?+e:+new Date(+e)}function hb(e,t,r,n,i,o,a,l,s,u){var f=eb(),c=f.invert,d=f.domain,p=u(".%L"),g=u(":%S"),y=u("%I:%M"),m=u("%I %p"),h=u("%a %d"),v=u("%b %d"),x=u("%B"),P=u("%Y");function w(S){return(s(S)t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,o)=>C6(e,o/n))},r.copy=function(){return sT(t).domain(e)},no.apply(r,arguments)}function Dh(){var e=0,t=.5,r=1,n=1,i,o,a,l,s,u=zr,f,c=!1,d;function p(y){return isNaN(y=+y)?d:(y=.5+((y=+f(y))-o)*(n*yt}var XH=qH,QH=dT,ZH=XH,JH=Cs;function e7(e){return e&&e.length?QH(e,JH,ZH):void 0}var t7=e7;const ko=Tt(t7);function r7(e,t){return ee.e^o.s<0?1:-1;for(n=o.d.length,i=e.d.length,t=0,r=ne.d[t]^o.s<0?1:-1;return n===i?0:n>i^o.s<0?1:-1};De.decimalPlaces=De.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*Bt;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};De.dividedBy=De.div=function(e){return Vi(this,new this.constructor(e))};De.dividedToIntegerBy=De.idiv=function(e){var t=this,r=t.constructor;return _t(Vi(t,new r(e),0,1),r.precision)};De.equals=De.eq=function(e){return!this.cmp(e)};De.exponent=function(){return ir(this)};De.greaterThan=De.gt=function(e){return this.cmp(e)>0};De.greaterThanOrEqualTo=De.gte=function(e){return this.cmp(e)>=0};De.isInteger=De.isint=function(){return this.e>this.d.length-2};De.isNegative=De.isneg=function(){return this.s<0};De.isPositive=De.ispos=function(){return this.s>0};De.isZero=function(){return this.s===0};De.lessThan=De.lt=function(e){return this.cmp(e)<0};De.lessThanOrEqualTo=De.lte=function(e){return this.cmp(e)<1};De.logarithm=De.log=function(e){var t,r=this,n=r.constructor,i=n.precision,o=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(fn))throw Error(Dn+"NaN");if(r.s<1)throw Error(Dn+(r.s?"NaN":"-Infinity"));return r.eq(fn)?new n(0):(Ut=!1,t=Vi(Sc(r,o),Sc(e,o),o),Ut=!0,_t(t,i))};De.minus=De.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?yT(t,e):hT(t,(e.s=-e.s,e))};De.modulo=De.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(Dn+"NaN");return r.s?(Ut=!1,t=Vi(r,e,0,1).times(e),Ut=!0,r.minus(t)):_t(new n(r),i)};De.naturalExponential=De.exp=function(){return vT(this)};De.naturalLogarithm=De.ln=function(){return Sc(this)};De.negated=De.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};De.plus=De.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?hT(t,e):yT(t,(e.s=-e.s,e))};De.precision=De.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(_a+e);if(t=ir(i)+1,n=i.d.length-1,r=n*Bt+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};De.squareRoot=De.sqrt=function(){var e,t,r,n,i,o,a,l=this,s=l.constructor;if(l.s<1){if(!l.s)return new s(0);throw Error(Dn+"NaN")}for(e=ir(l),Ut=!1,i=Math.sqrt(+l),i==0||i==1/0?(t=mi(l.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Is((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new s(t)):n=new s(i.toString()),r=s.precision,i=a=r+3;;)if(o=n,n=o.plus(Vi(l,o,a+2)).times(.5),mi(o.d).slice(0,a)===(t=mi(n.d)).slice(0,a)){if(t=t.slice(a-3,a+1),i==a&&t=="4999"){if(_t(o,r+1,0),o.times(o).eq(l)){n=o;break}}else if(t!="9999")break;a+=4}return Ut=!0,_t(n,r)};De.times=De.mul=function(e){var t,r,n,i,o,a,l,s,u,f=this,c=f.constructor,d=f.d,p=(e=new c(e)).d;if(!f.s||!e.s)return new c(0);for(e.s*=f.s,r=f.e+e.e,s=d.length,u=p.length,s=0;){for(t=0,i=s+n;i>n;)l=o[i]+p[n]*d[i-n-1]+t,o[i--]=l%gr|0,t=l/gr|0;o[i]=(o[i]+t)%gr|0}for(;!o[--a];)o.pop();return t?++r:o.shift(),e.d=o,e.e=r,Ut?_t(e,c.precision):e};De.toDecimalPlaces=De.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Ai(e,0,ks),t===void 0?t=n.rounding:Ai(t,0,8),_t(r,e+ir(r)+1,t))};De.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Na(n,!0):(Ai(e,0,ks),t===void 0?t=i.rounding:Ai(t,0,8),n=_t(new i(n),e+1,t),r=Na(n,!0,e+1)),r};De.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?Na(i):(Ai(e,0,ks),t===void 0?t=o.rounding:Ai(t,0,8),n=_t(new o(i),e+ir(i)+1,t),r=Na(n.abs(),!1,e+ir(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};De.toInteger=De.toint=function(){var e=this,t=e.constructor;return _t(new t(e),ir(e)+1,t.rounding)};De.toNumber=function(){return+this};De.toPower=De.pow=function(e){var t,r,n,i,o,a,l=this,s=l.constructor,u=12,f=+(e=new s(e));if(!e.s)return new s(fn);if(l=new s(l),!l.s){if(e.s<1)throw Error(Dn+"Infinity");return l}if(l.eq(fn))return l;if(n=s.precision,e.eq(fn))return _t(l,n);if(t=e.e,r=e.d.length-1,a=t>=r,o=l.s,a){if((r=f<0?-f:f)<=pT){for(i=new s(fn),t=Math.ceil(n/Bt+4),Ut=!1;r%2&&(i=i.times(l),sS(i.d,t)),r=Is(r/2),r!==0;)l=l.times(l),sS(l.d,t);return Ut=!0,e.s<0?new s(fn).div(i):_t(i,n)}}else if(o<0)throw Error(Dn+"NaN");return o=o<0&&e.d[Math.max(t,r)]&1?-1:1,l.s=1,Ut=!1,i=e.times(Sc(l,n+u)),Ut=!0,i=vT(i),i.s=o,i};De.toPrecision=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?(r=ir(i),n=Na(i,r<=o.toExpNeg||r>=o.toExpPos)):(Ai(e,1,ks),t===void 0?t=o.rounding:Ai(t,0,8),i=_t(new o(i),e,t),r=ir(i),n=Na(i,e<=r||r<=o.toExpNeg,e)),n};De.toSignificantDigits=De.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(Ai(e,1,ks),t===void 0?t=n.rounding:Ai(t,0,8)),_t(new n(r),e,t)};De.toString=De.valueOf=De.val=De.toJSON=De[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=ir(e),r=e.constructor;return Na(e,t<=r.toExpNeg||t>=r.toExpPos)};function hT(e,t){var r,n,i,o,a,l,s,u,f=e.constructor,c=f.precision;if(!e.s||!t.s)return t.s||(t=new f(e)),Ut?_t(t,c):t;if(s=e.d,u=t.d,a=e.e,i=t.e,s=s.slice(),o=a-i,o){for(o<0?(n=s,o=-o,l=u.length):(n=u,i=a,l=s.length),a=Math.ceil(c/Bt),l=a>l?a+1:l+1,o>l&&(o=l,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(l=s.length,o=u.length,l-o<0&&(o=l,n=u,u=s,s=n),r=0;o;)r=(s[--o]=s[o]+u[o]+r)/gr|0,s[o]%=gr;for(r&&(s.unshift(r),++i),l=s.length;s[--l]==0;)s.pop();return t.d=s,t.e=i,Ut?_t(t,c):t}function Ai(e,t,r){if(e!==~~e||er)throw Error(_a+e)}function mi(e){var t,r,n,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;ta?1:-1;else for(l=s=0;li[l]?1:-1;break}return s}function r(n,i,o){for(var a=0;o--;)n[o]-=a,a=n[o]1;)n.shift()}return function(n,i,o,a){var l,s,u,f,c,d,p,g,y,m,h,v,x,P,w,S,A,E,R=n.constructor,K=n.s==i.s?1:-1,H=n.d,F=i.d;if(!n.s)return new R(n);if(!i.s)throw Error(Dn+"Division by zero");for(s=n.e-i.e,A=F.length,w=H.length,p=new R(K),g=p.d=[],u=0;F[u]==(H[u]||0);)++u;if(F[u]>(H[u]||0)&&--s,o==null?v=o=R.precision:a?v=o+(ir(n)-ir(i))+1:v=o,v<0)return new R(0);if(v=v/Bt+2|0,u=0,A==1)for(f=0,F=F[0],v++;(u1&&(F=e(F,f),H=e(H,f),A=F.length,w=H.length),P=A,y=H.slice(0,A),m=y.length;m=gr/2&&++S;do f=0,l=t(F,y,A,m),l<0?(h=y[0],A!=m&&(h=h*gr+(y[1]||0)),f=h/S|0,f>1?(f>=gr&&(f=gr-1),c=e(F,f),d=c.length,m=y.length,l=t(c,y,d,m),l==1&&(f--,r(c,A16)throw Error(gb+ir(e));if(!e.s)return new f(fn);for(Ut=!1,l=c,a=new f(.03125);e.abs().gte(.1);)e=e.times(a),u+=5;for(n=Math.log(ha(2,u))/Math.LN10*2+5|0,l+=n,r=i=o=new f(fn),f.precision=l;;){if(i=_t(i.times(e),l),r=r.times(++s),a=o.plus(Vi(i,r,l)),mi(a.d).slice(0,l)===mi(o.d).slice(0,l)){for(;u--;)o=_t(o.times(o),l);return f.precision=c,t==null?(Ut=!0,_t(o,c)):o}o=a}}function ir(e){for(var t=e.e*Bt,r=e.d[0];r>=10;r/=10)t++;return t}function Yv(e,t,r){if(t>e.LN10.sd())throw Ut=!0,r&&(e.precision=r),Error(Dn+"LN10 precision limit exceeded");return _t(new e(e.LN10),t)}function jo(e){for(var t="";e--;)t+="0";return t}function Sc(e,t){var r,n,i,o,a,l,s,u,f,c=1,d=10,p=e,g=p.d,y=p.constructor,m=y.precision;if(p.s<1)throw Error(Dn+(p.s?"NaN":"-Infinity"));if(p.eq(fn))return new y(0);if(t==null?(Ut=!1,u=m):u=t,p.eq(10))return t==null&&(Ut=!0),Yv(y,u);if(u+=d,y.precision=u,r=mi(g),n=r.charAt(0),o=ir(p),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)p=p.times(e),r=mi(p.d),n=r.charAt(0),c++;o=ir(p),n>1?(p=new y("0."+r),o++):p=new y(n+"."+r.slice(1))}else return s=Yv(y,u+2,m).times(o+""),p=Sc(new y(n+"."+r.slice(1)),u-d).plus(s),y.precision=m,t==null?(Ut=!0,_t(p,m)):p;for(l=a=p=Vi(p.minus(fn),p.plus(fn),u),f=_t(p.times(p),u),i=3;;){if(a=_t(a.times(f),u),s=l.plus(Vi(a,new y(i),u)),mi(s.d).slice(0,u)===mi(l.d).slice(0,u))return l=l.times(2),o!==0&&(l=l.plus(Yv(y,u+2,m).times(o+""))),l=Vi(l,new y(c),u),y.precision=m,t==null?(Ut=!0,_t(l,m)):l;l=s,i+=2}}function lS(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=Is(r/Bt),e.d=[],n=(r+1)%Bt,r<0&&(n+=Bt),nhp||e.e<-hp))throw Error(gb+r)}else e.s=0,e.e=0,e.d=[0];return e}function _t(e,t,r){var n,i,o,a,l,s,u,f,c=e.d;for(a=1,o=c[0];o>=10;o/=10)a++;if(n=t-a,n<0)n+=Bt,i=t,u=c[f=0];else{if(f=Math.ceil((n+1)/Bt),o=c.length,f>=o)return e;for(u=o=c[f],a=1;o>=10;o/=10)a++;n%=Bt,i=n-Bt+a}if(r!==void 0&&(o=ha(10,a-i-1),l=u/o%10|0,s=t<0||c[f+1]!==void 0||u%o,s=r<4?(l||s)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||s||r==6&&(n>0?i>0?u/ha(10,a-i):0:c[f-1])%10&1||r==(e.s<0?8:7))),t<1||!c[0])return s?(o=ir(e),c.length=1,t=t-o-1,c[0]=ha(10,(Bt-t%Bt)%Bt),e.e=Is(-t/Bt)||0):(c.length=1,c[0]=e.e=e.s=0),e;if(n==0?(c.length=f,o=1,f--):(c.length=f+1,o=ha(10,Bt-n),c[f]=i>0?(u/ha(10,a-i)%ha(10,i)|0)*o:0),s)for(;;)if(f==0){(c[0]+=o)==gr&&(c[0]=1,++e.e);break}else{if(c[f]+=o,c[f]!=gr)break;c[f--]=0,o=1}for(n=c.length;c[--n]===0;)c.pop();if(Ut&&(e.e>hp||e.e<-hp))throw Error(gb+ir(e));return e}function yT(e,t){var r,n,i,o,a,l,s,u,f,c,d=e.constructor,p=d.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new d(e),Ut?_t(t,p):t;if(s=e.d,c=t.d,n=t.e,u=e.e,s=s.slice(),a=u-n,a){for(f=a<0,f?(r=s,a=-a,l=c.length):(r=c,n=u,l=s.length),i=Math.max(Math.ceil(p/Bt),l)+2,a>i&&(a=i,r.length=1),r.reverse(),i=a;i--;)r.push(0);r.reverse()}else{for(i=s.length,l=c.length,f=i0;--i)s[l++]=0;for(i=c.length;i>a;){if(s[--i]0?o=o.charAt(0)+"."+o.slice(1)+jo(n):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+jo(-i-1)+o,r&&(n=r-a)>0&&(o+=jo(n))):i>=a?(o+=jo(i+1-a),r&&(n=r-i-1)>0&&(o=o+"."+jo(n))):((n=i+1)0&&(i+1===a&&(o+="."),o+=jo(n))),e.s<0?"-"+o:o}function sS(e,t){if(e.length>t)return e.length=t,!0}function gT(e){var t,r,n;function i(o){var a=this;if(!(a instanceof i))return new i(o);if(a.constructor=i,o instanceof i){a.s=o.s,a.e=o.e,a.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(_a+o);if(o>0)a.s=1;else if(o<0)o=-o,a.s=-1;else{a.s=0,a.e=0,a.d=[0];return}if(o===~~o&&o<1e7){a.e=0,a.d=[o];return}return lS(a,o.toString())}else if(typeof o!="string")throw Error(_a+o);if(o.charCodeAt(0)===45?(o=o.slice(1),a.s=-1):a.s=1,O7.test(o))lS(a,o);else throw Error(_a+o)}if(i.prototype=De,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=gT,i.config=i.set=A7,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(_a+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(_a+r+": "+n);return this}var mb=gT(P7);fn=new mb(1);const At=mb;function j7(e){return E7(e)||$7(e)||T7(e)||_7()}function _7(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function T7(e,t){if(e){if(typeof e=="string")return Ig(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ig(e,t)}}function $7(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function E7(e){if(Array.isArray(e))return Ig(e)}function Ig(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=t?r.apply(void 0,i):e(t-a,uS(function(){for(var l=arguments.length,s=new Array(l),u=0;ue.length)&&(t=e.length);for(var r=0,n=new Array(t);r"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,i=!1,o=void 0;try{for(var a=e[Symbol.iterator](),l;!(n=(l=a.next()).done)&&(r.push(l.value),!(t&&r.length===t));n=!0);}catch(s){i=!0,o=s}finally{try{!n&&a.return!=null&&a.return()}finally{if(i)throw o}}return r}}function V7(e){if(Array.isArray(e))return e}function ST(e){var t=Pc(e,2),r=t[0],n=t[1],i=r,o=n;return r>n&&(i=n,o=r),[i,o]}function PT(e,t,r){if(e.lte(0))return new At(0);var n=Bh.getDigitCount(e.toNumber()),i=new At(10).pow(n),o=e.div(i),a=n!==1?.05:.1,l=new At(Math.ceil(o.div(a).toNumber())).add(r).mul(a),s=l.mul(i);return t?s:new At(Math.ceil(s))}function K7(e,t,r){var n=1,i=new At(e);if(!i.isint()&&r){var o=Math.abs(e);o<1?(n=new At(10).pow(Bh.getDigitCount(e)-1),i=new At(Math.floor(i.div(n).toNumber())).mul(n)):o>1&&(i=new At(Math.floor(e)))}else e===0?i=new At(Math.floor((t-1)/2)):r||(i=new At(Math.floor(e)));var a=Math.floor((t-1)/2),l=I7(k7(function(s){return i.add(new At(s-a).mul(n)).toNumber()}),Rg);return l(0,t)}function OT(e,t,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(r-1)))return{step:new At(0),tickMin:new At(0),tickMax:new At(0)};var o=PT(new At(t).sub(e).div(r-1),n,i),a;e<=0&&t>=0?a=new At(0):(a=new At(e).add(t).div(2),a=a.sub(new At(a).mod(o)));var l=Math.ceil(a.sub(e).div(o).toNumber()),s=Math.ceil(new At(t).sub(a).div(o).toNumber()),u=l+s+1;return u>r?OT(e,t,r,n,i+1):(u0?s+(r-u):s,l=t>0?l:l+(r-u)),{step:o,tickMin:a.sub(new At(l).mul(o)),tickMax:a.add(new At(s).mul(o))})}function G7(e){var t=Pc(e,2),r=t[0],n=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=Math.max(i,2),l=ST([r,n]),s=Pc(l,2),u=s[0],f=s[1];if(u===-1/0||f===1/0){var c=f===1/0?[u].concat(Ng(Rg(0,i-1).map(function(){return 1/0}))):[].concat(Ng(Rg(0,i-1).map(function(){return-1/0})),[f]);return r>n?Dg(c):c}if(u===f)return K7(u,i,o);var d=OT(u,f,a,o),p=d.step,g=d.tickMin,y=d.tickMax,m=Bh.rangeStep(g,y.add(new At(.1).mul(p)),p);return r>n?Dg(m):m}function Y7(e,t){var r=Pc(e,2),n=r[0],i=r[1],o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=ST([n,i]),l=Pc(a,2),s=l[0],u=l[1];if(s===-1/0||u===1/0)return[n,i];if(s===u)return[s];var f=Math.max(t,2),c=PT(new At(u).sub(s).div(f-1),o,0),d=[].concat(Ng(Bh.rangeStep(new At(s),new At(u).sub(new At(.99).mul(c)),c)),[u]);return n>i?Dg(d):d}var q7=xT(G7),X7=xT(Y7),Q7="Invariant failed";function La(e,t){throw new Error(Q7)}var Z7=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function rs(e){"@babel/helpers - typeof";return rs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rs(e)}function vp(){return vp=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function o9(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function a9(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l9(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,a=-1,l=(r=n==null?void 0:n.length)!==null&&r!==void 0?r:0;if(l<=1)return 0;if(o&&o.axisType==="angleAxis"&&Math.abs(Math.abs(o.range[1]-o.range[0])-360)<=1e-6)for(var s=o.range,u=0;u0?i[u-1].coordinate:i[l-1].coordinate,c=i[u].coordinate,d=u>=l-1?i[0].coordinate:i[u+1].coordinate,p=void 0;if(ii(c-f)!==ii(d-c)){var g=[];if(ii(d-c)===ii(s[1]-s[0])){p=d;var y=c+s[1]-s[0];g[0]=Math.min(y,(y+f)/2),g[1]=Math.max(y,(y+f)/2)}else{p=f;var m=d+s[1]-s[0];g[0]=Math.min(c,(m+c)/2),g[1]=Math.max(c,(m+c)/2)}var h=[Math.min(c,(p+c)/2),Math.max(c,(p+c)/2)];if(t>h[0]&&t<=h[1]||t>=g[0]&&t<=g[1]){a=i[u].index;break}}else{var v=Math.min(f,d),x=Math.max(f,d);if(t>(v+c)/2&&t<=(x+c)/2){a=i[u].index;break}}}else for(var P=0;P0&&P(n[P].coordinate+n[P-1].coordinate)/2&&t<=(n[P].coordinate+n[P+1].coordinate)/2||P===l-1&&t>(n[P].coordinate+n[P-1].coordinate)/2){a=n[P].index;break}return a},bb=function(t){var r,n=t,i=n.type.displayName,o=(r=t.type)!==null&&r!==void 0&&r.defaultProps?qt(qt({},t.type.defaultProps),t.props):t.props,a=o.stroke,l=o.fill,s;switch(i){case"Line":s=a;break;case"Area":case"Radar":s=a&&a!=="none"?a:l;break;default:s=l;break}return s},O9=function(t){var r=t.barSize,n=t.totalSize,i=t.stackGroups,o=i===void 0?{}:i;if(!o)return{};for(var a={},l=Object.keys(o),s=0,u=l.length;s=0});if(h&&h.length){var v=h[0].type.defaultProps,x=v!==void 0?qt(qt({},v),h[0].props):h[0].props,P=x.barSize,w=x[m];a[w]||(a[w]=[]);var S=Ge(P)?r:P;a[w].push({item:h[0],stackList:h.slice(1),barSize:Ge(S)?void 0:Ra(S,n,0)})}}return a},A9=function(t){var r=t.barGap,n=t.barCategoryGap,i=t.bandSize,o=t.sizeList,a=o===void 0?[]:o,l=t.maxBarSize,s=a.length;if(s<1)return null;var u=Ra(r,i,0,!0),f,c=[];if(a[0].barSize===+a[0].barSize){var d=!1,p=i/s,g=a.reduce(function(P,w){return P+w.barSize||0},0);g+=(s-1)*u,g>=i&&(g-=(s-1)*u,u=0),g>=i&&p>0&&(d=!0,p*=.9,g=s*p);var y=(i-g)/2>>0,m={offset:y-u,size:0};f=a.reduce(function(P,w){var S={item:w.item,position:{offset:m.offset+m.size+u,size:d?p:w.barSize}},A=[].concat(dS(P),[S]);return m=A[A.length-1].position,w.stackList&&w.stackList.length&&w.stackList.forEach(function(E){A.push({item:E,position:m})}),A},c)}else{var h=Ra(n,i,0,!0);i-2*h-(s-1)*u<=0&&(u=0);var v=(i-2*h-(s-1)*u)/s;v>1&&(v>>=0);var x=l===+l?Math.min(v,l):v;f=a.reduce(function(P,w,S){var A=[].concat(dS(P),[{item:w.item,position:{offset:h+(v+u)*S+(v-x)/2,size:x}}]);return w.stackList&&w.stackList.length&&w.stackList.forEach(function(E){A.push({item:E,position:A[A.length-1].position})}),A},c)}return f},j9=function(t,r,n,i){var o=n.children,a=n.width,l=n.margin,s=a-(l.left||0)-(l.right||0),u=TT({children:o,legendWidth:s});if(u){var f=i||{},c=f.width,d=f.height,p=u.align,g=u.verticalAlign,y=u.layout;if((y==="vertical"||y==="horizontal"&&g==="middle")&&p!=="center"&&Pe(t[p]))return qt(qt({},t),{},Fl({},p,t[p]+(c||0)));if((y==="horizontal"||y==="vertical"&&p==="center")&&g!=="middle"&&Pe(t[g]))return qt(qt({},t),{},Fl({},g,t[g]+(d||0)))}return t},_9=function(t,r,n){return Ge(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},$T=function(t,r,n,i,o){var a=r.props.children,l=Jr(a,Rs).filter(function(u){return _9(i,o,u.props.direction)});if(l&&l.length){var s=l.map(function(u){return u.props.dataKey});return t.reduce(function(u,f){var c=dr(f,n);if(Ge(c))return u;var d=Array.isArray(c)?[Nh(c),ko(c)]:[c,c],p=s.reduce(function(g,y){var m=dr(f,y,0),h=d[0]-Math.abs(Array.isArray(m)?m[0]:m),v=d[1]+Math.abs(Array.isArray(m)?m[1]:m);return[Math.min(h,g[0]),Math.max(v,g[1])]},[1/0,-1/0]);return[Math.min(p[0],u[0]),Math.max(p[1],u[1])]},[1/0,-1/0])}return null},T9=function(t,r,n,i,o){var a=r.map(function(l){return $T(t,l,n,o,i)}).filter(function(l){return!Ge(l)});return a&&a.length?a.reduce(function(l,s){return[Math.min(l[0],s[0]),Math.max(l[1],s[1])]},[1/0,-1/0]):null},ET=function(t,r,n,i,o){var a=r.map(function(s){var u=s.props.dataKey;return n==="number"&&u&&$T(t,s,u,i)||zu(t,u,n,o)});if(n==="number")return a.reduce(function(s,u){return[Math.min(s[0],u[0]),Math.max(s[1],u[1])]},[1/0,-1/0]);var l={};return a.reduce(function(s,u){for(var f=0,c=u.length;f=2?ii(l[0]-l[1])*2*u:u,r&&(t.ticks||t.niceTicks)){var f=(t.ticks||t.niceTicks).map(function(c){var d=o?o.indexOf(c):c;return{coordinate:i(d)+u,value:c,offset:u}});return f.filter(function(c){return!Ts(c.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(c,d){return{coordinate:i(c)+u,value:c,index:d,offset:u}}):i.ticks&&!n?i.ticks(t.tickCount).map(function(c){return{coordinate:i(c)+u,value:c,offset:u}}):i.domain().map(function(c,d){return{coordinate:i(c)+u,value:o?o[c]:c,index:d,offset:u}})},qv=new WeakMap,Qf=function(t,r){if(typeof r!="function")return t;qv.has(t)||qv.set(t,new WeakMap);var n=qv.get(t);if(n.has(r))return n.get(r);var i=function(){t.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,i),i},$9=function(t,r,n){var i=t.scale,o=t.type,a=t.layout,l=t.axisType;if(i==="auto")return a==="radial"&&l==="radiusAxis"?{scale:gc(),realScaleType:"band"}:a==="radial"&&l==="angleAxis"?{scale:cp(),realScaleType:"linear"}:o==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:Fu(),realScaleType:"point"}:o==="category"?{scale:gc(),realScaleType:"band"}:{scale:cp(),realScaleType:"linear"};if(Ia(i)){var s="scale".concat(Ph(i));return{scale:(aS[s]||Fu)(),realScaleType:aS[s]?s:"point"}}return Ze(i)?{scale:i}:{scale:Fu(),realScaleType:"point"}},hS=1e-4,E9=function(t){var r=t.domain();if(!(!r||r.length<=2)){var n=r.length,i=t.range(),o=Math.min(i[0],i[1])-hS,a=Math.max(i[0],i[1])+hS,l=t(r[0]),s=t(r[n-1]);(la||sa)&&t.domain([r[0],r[n-1]])}},C9=function(t,r){if(!t)return null;for(var n=0,i=t.length;ni)&&(o[1]=i),o[0]>i&&(o[0]=i),o[1]=0?(t[l][n][0]=o,t[l][n][1]=o+s,o=t[l][n][1]):(t[l][n][0]=a,t[l][n][1]=a+s,a=t[l][n][1])}},I9=function(t){var r=t.length;if(!(r<=0))for(var n=0,i=t[0].length;n=0?(t[a][n][0]=o,t[a][n][1]=o+l,o=t[a][n][1]):(t[a][n][0]=0,t[a][n][1]=0)}},R9={sign:k9,expand:XN,none:Yl,silhouette:QN,wiggle:ZN,positive:I9},D9=function(t,r,n){var i=r.map(function(l){return l.props.dataKey}),o=R9[n],a=qN().keys(i).value(function(l,s){return+dr(l,s,0)}).order(fg).offset(o);return a(t)},N9=function(t,r,n,i,o,a){if(!t)return null;var l=a?r.reverse():r,s={},u=l.reduce(function(c,d){var p,g=(p=d.type)!==null&&p!==void 0&&p.defaultProps?qt(qt({},d.type.defaultProps),d.props):d.props,y=g.stackId,m=g.hide;if(m)return c;var h=g[n],v=c[h]||{hasStack:!1,stackGroups:{}};if(fr(y)){var x=v.stackGroups[y]||{numericAxisId:n,cateAxisId:i,items:[]};x.items.push(d),v.hasStack=!0,v.stackGroups[y]=x}else v.stackGroups[Ua("_stackId_")]={numericAxisId:n,cateAxisId:i,items:[d]};return qt(qt({},c),{},Fl({},h,v))},s),f={};return Object.keys(u).reduce(function(c,d){var p=u[d];if(p.hasStack){var g={};p.stackGroups=Object.keys(p.stackGroups).reduce(function(y,m){var h=p.stackGroups[m];return qt(qt({},y),{},Fl({},m,{numericAxisId:n,cateAxisId:i,items:h.items,stackedData:D9(t,h.items,o)}))},g)}return qt(qt({},c),{},Fl({},d,p))},f)},L9=function(t,r){var n=r.realScaleType,i=r.type,o=r.tickCount,a=r.originalDomain,l=r.allowDecimals,s=n||r.scale;if(s!=="auto"&&s!=="linear")return null;if(o&&i==="number"&&a&&(a[0]==="auto"||a[1]==="auto")){var u=t.domain();if(!u.length)return null;var f=q7(u,o,l);return t.domain([Nh(f),ko(f)]),{niceTicks:f}}if(o&&i==="number"){var c=t.domain(),d=X7(c,o,l);return{niceTicks:d}}return null};function ns(e){var t=e.axis,r=e.ticks,n=e.bandSize,i=e.entry,o=e.index,a=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Ge(i[t.dataKey])){var l=zd(r,"value",i[t.dataKey]);if(l)return l.coordinate+n/2}return r[o]?r[o].coordinate+n/2:null}var s=dr(i,Ge(a)?t.dataKey:a);return Ge(s)?null:t.scale(s)}var vS=function(t){var r=t.axis,n=t.ticks,i=t.offset,o=t.bandSize,a=t.entry,l=t.index;if(r.type==="category")return n[l]?n[l].coordinate+i:null;var s=dr(a,r.dataKey,r.domain[l]);return Ge(s)?null:r.scale(s)-o/2+i},B9=function(t){var r=t.numericAxis,n=r.scale.domain();if(r.type==="number"){var i=Math.min(n[0],n[1]),o=Math.max(n[0],n[1]);return i<=0&&o>=0?0:o<0?o:i}return n[0]},F9=function(t,r){var n,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?qt(qt({},t.type.defaultProps),t.props):t.props,o=i.stackId;if(fr(o)){var a=r[o];if(a){var l=a.items.indexOf(t);return l>=0?a.stackedData[l]:null}}return null},z9=function(t){return t.reduce(function(r,n){return[Nh(n.concat([r[0]]).filter(Pe)),ko(n.concat([r[1]]).filter(Pe))]},[1/0,-1/0])},kT=function(t,r,n){return Object.keys(t).reduce(function(i,o){var a=t[o],l=a.stackedData,s=l.reduce(function(u,f){var c=z9(f.slice(r,n+1));return[Math.min(u[0],c[0]),Math.max(u[1],c[1])]},[1/0,-1/0]);return[Math.min(s[0],i[0]),Math.max(s[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},yS=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,gS=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,zg=function(t,r,n){if(Ze(t))return t(r,n);if(!Array.isArray(t))return r;var i=[];if(Pe(t[0]))i[0]=n?t[0]:Math.min(t[0],r[0]);else if(yS.test(t[0])){var o=+yS.exec(t[0])[1];i[0]=r[0]-o}else Ze(t[0])?i[0]=t[0](r[0]):i[0]=r[0];if(Pe(t[1]))i[1]=n?t[1]:Math.max(t[1],r[1]);else if(gS.test(t[1])){var a=+gS.exec(t[1])[1];i[1]=r[1]+a}else Ze(t[1])?i[1]=t[1](r[1]):i[1]=r[1];return i},gp=function(t,r,n){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!n||i>0)return i}if(t&&r&&r.length>=2){for(var o=K0(r,function(c){return c.coordinate}),a=1/0,l=1,s=o.length;la&&(u=2*Math.PI-u),{radius:l,angle:V9(u),angleInRadian:u}},Y9=function(t){var r=t.startAngle,n=t.endAngle,i=Math.floor(r/360),o=Math.floor(n/360),a=Math.min(i,o);return{startAngle:r-a*360,endAngle:n-a*360}},q9=function(t,r){var n=r.startAngle,i=r.endAngle,o=Math.floor(n/360),a=Math.floor(i/360),l=Math.min(o,a);return t+l*360},wS=function(t,r){var n=t.x,i=t.y,o=G9({x:n,y:i},r),a=o.radius,l=o.angle,s=r.innerRadius,u=r.outerRadius;if(au)return!1;if(a===0)return!0;var f=Y9(r),c=f.startAngle,d=f.endAngle,p=l,g;if(c<=d){for(;p>d;)p-=360;for(;p=c&&p<=d}else{for(;p>c;)p-=360;for(;p=d&&p<=c}return g?xS(xS({},r),{},{radius:a,angle:q9(p,r)}):null};function _c(e){"@babel/helpers - typeof";return _c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_c(e)}var X9=["offset"];function Q9(e){return tV(e)||eV(e)||J9(e)||Z9()}function Z9(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function J9(e,t){if(e){if(typeof e=="string")return Wg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Wg(e,t)}}function eV(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function tV(e){if(Array.isArray(e))return Wg(e)}function Wg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function nV(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function SS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function sr(e){for(var t=1;t=0?1:-1,x,P;i==="insideStart"?(x=p+v*a,P=y):i==="insideEnd"?(x=g-v*a,P=!y):i==="end"&&(x=g+v*a,P=y),P=h<=0?P:!P;var w=Or(u,f,m,x),S=Or(u,f,m,x+(P?1:-1)*359),A="M".concat(w.x,",").concat(w.y,` - A`).concat(m,",").concat(m,",0,1,").concat(P?0:1,`, - `).concat(S.x,",").concat(S.y),E=Ge(t.id)?Ua("recharts-radial-line-"):t.id;return D.createElement("text",Tc({},n,{dominantBaseline:"central",className:st("recharts-radial-bar-label",l)}),D.createElement("defs",null,D.createElement("path",{id:E,d:A})),D.createElement("textPath",{xlinkHref:"#".concat(E)},r))},cV=function(t){var r=t.viewBox,n=t.offset,i=t.position,o=r,a=o.cx,l=o.cy,s=o.innerRadius,u=o.outerRadius,f=o.startAngle,c=o.endAngle,d=(f+c)/2;if(i==="outside"){var p=Or(a,l,u+n,d),g=p.x,y=p.y;return{x:g,y,textAnchor:g>=a?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:a,y:l,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:a,y:l,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:a,y:l,textAnchor:"middle",verticalAnchor:"end"};var m=(s+u)/2,h=Or(a,l,m,d),v=h.x,x=h.y;return{x:v,y:x,textAnchor:"middle",verticalAnchor:"middle"}},fV=function(t){var r=t.viewBox,n=t.parentViewBox,i=t.offset,o=t.position,a=r,l=a.x,s=a.y,u=a.width,f=a.height,c=f>=0?1:-1,d=c*i,p=c>0?"end":"start",g=c>0?"start":"end",y=u>=0?1:-1,m=y*i,h=y>0?"end":"start",v=y>0?"start":"end";if(o==="top"){var x={x:l+u/2,y:s-c*i,textAnchor:"middle",verticalAnchor:p};return sr(sr({},x),n?{height:Math.max(s-n.y,0),width:u}:{})}if(o==="bottom"){var P={x:l+u/2,y:s+f+d,textAnchor:"middle",verticalAnchor:g};return sr(sr({},P),n?{height:Math.max(n.y+n.height-(s+f),0),width:u}:{})}if(o==="left"){var w={x:l-m,y:s+f/2,textAnchor:h,verticalAnchor:"middle"};return sr(sr({},w),n?{width:Math.max(w.x-n.x,0),height:f}:{})}if(o==="right"){var S={x:l+u+m,y:s+f/2,textAnchor:v,verticalAnchor:"middle"};return sr(sr({},S),n?{width:Math.max(n.x+n.width-S.x,0),height:f}:{})}var A=n?{width:u,height:f}:{};return o==="insideLeft"?sr({x:l+m,y:s+f/2,textAnchor:v,verticalAnchor:"middle"},A):o==="insideRight"?sr({x:l+u-m,y:s+f/2,textAnchor:h,verticalAnchor:"middle"},A):o==="insideTop"?sr({x:l+u/2,y:s+d,textAnchor:"middle",verticalAnchor:g},A):o==="insideBottom"?sr({x:l+u/2,y:s+f-d,textAnchor:"middle",verticalAnchor:p},A):o==="insideTopLeft"?sr({x:l+m,y:s+d,textAnchor:v,verticalAnchor:g},A):o==="insideTopRight"?sr({x:l+u-m,y:s+d,textAnchor:h,verticalAnchor:g},A):o==="insideBottomLeft"?sr({x:l+m,y:s+f-d,textAnchor:v,verticalAnchor:p},A):o==="insideBottomRight"?sr({x:l+u-m,y:s+f-d,textAnchor:h,verticalAnchor:p},A):Os(o)&&(Pe(o.x)||ma(o.x))&&(Pe(o.y)||ma(o.y))?sr({x:l+Ra(o.x,u),y:s+Ra(o.y,f),textAnchor:"end",verticalAnchor:"end"},A):sr({x:l+u/2,y:s+f/2,textAnchor:"middle",verticalAnchor:"middle"},A)},dV=function(t){return"cx"in t&&Pe(t.cx)};function Ir(e){var t=e.offset,r=t===void 0?5:t,n=rV(e,X9),i=sr({offset:r},n),o=i.viewBox,a=i.position,l=i.value,s=i.children,u=i.content,f=i.className,c=f===void 0?"":f,d=i.textBreakAll;if(!o||Ge(l)&&Ge(s)&&!_.isValidElement(u)&&!Ze(u))return null;if(_.isValidElement(u))return _.cloneElement(u,i);var p;if(Ze(u)){if(p=_.createElement(u,i),_.isValidElement(p))return p}else p=lV(i);var g=dV(o),y=Xe(i,!0);if(g&&(a==="insideStart"||a==="insideEnd"||a==="end"))return uV(i,p,y);var m=g?cV(i):fV(i);return D.createElement(rp,Tc({className:st("recharts-label",c)},y,m,{breakAll:d}),p)}Ir.displayName="Label";var RT=function(t){var r=t.cx,n=t.cy,i=t.angle,o=t.startAngle,a=t.endAngle,l=t.r,s=t.radius,u=t.innerRadius,f=t.outerRadius,c=t.x,d=t.y,p=t.top,g=t.left,y=t.width,m=t.height,h=t.clockWise,v=t.labelViewBox;if(v)return v;if(Pe(y)&&Pe(m)){if(Pe(c)&&Pe(d))return{x:c,y:d,width:y,height:m};if(Pe(p)&&Pe(g))return{x:p,y:g,width:y,height:m}}return Pe(c)&&Pe(d)?{x:c,y:d,width:0,height:0}:Pe(r)&&Pe(n)?{cx:r,cy:n,startAngle:o||i||0,endAngle:a||i||0,innerRadius:u||0,outerRadius:f||s||l||0,clockWise:h}:t.viewBox?t.viewBox:{}},pV=function(t,r){return t?t===!0?D.createElement(Ir,{key:"label-implicit",viewBox:r}):fr(t)?D.createElement(Ir,{key:"label-implicit",viewBox:r,value:t}):_.isValidElement(t)?t.type===Ir?_.cloneElement(t,{key:"label-implicit",viewBox:r}):D.createElement(Ir,{key:"label-implicit",content:t,viewBox:r}):Ze(t)?D.createElement(Ir,{key:"label-implicit",content:t,viewBox:r}):Os(t)?D.createElement(Ir,Tc({viewBox:r},t,{key:"label-implicit"})):null:null},hV=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&n&&!t.label)return null;var i=t.children,o=RT(t),a=Jr(i,Ir).map(function(s,u){return _.cloneElement(s,{viewBox:r||o,key:"label-".concat(u)})});if(!n)return a;var l=pV(t.label,r||o);return[l].concat(Q9(a))};Ir.parseViewBox=RT;Ir.renderCallByParent=hV;function vV(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var yV=vV;const gV=Tt(yV);function $c(e){"@babel/helpers - typeof";return $c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$c(e)}var mV=["valueAccessor"],bV=["data","dataKey","clockWise","id","textBreakAll"];function xV(e){return OV(e)||PV(e)||SV(e)||wV()}function wV(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function SV(e,t){if(e){if(typeof e=="string")return Ug(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ug(e,t)}}function PV(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function OV(e){if(Array.isArray(e))return Ug(e)}function Ug(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function TV(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var $V=function(t){return Array.isArray(t.value)?gV(t.value):t.value};function Pi(e){var t=e.valueAccessor,r=t===void 0?$V:t,n=AS(e,mV),i=n.data,o=n.dataKey,a=n.clockWise,l=n.id,s=n.textBreakAll,u=AS(n,bV);return!i||!i.length?null:D.createElement(mt,{className:"recharts-label-list"},i.map(function(f,c){var d=Ge(o)?r(f,c):dr(f&&f.payload,o),p=Ge(l)?{}:{id:"".concat(l,"-").concat(c)};return D.createElement(Ir,bp({},Xe(f,!0),u,p,{parentViewBox:f.parentViewBox,value:d,textBreakAll:s,viewBox:Ir.parseViewBox(Ge(a)?f:OS(OS({},f),{},{clockWise:a})),key:"label-".concat(c),index:c}))}))}Pi.displayName="LabelList";function EV(e,t){return e?e===!0?D.createElement(Pi,{key:"labelList-implicit",data:t}):D.isValidElement(e)||Ze(e)?D.createElement(Pi,{key:"labelList-implicit",data:t,content:e}):Os(e)?D.createElement(Pi,bp({data:t},e,{key:"labelList-implicit"})):null:null}function CV(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&r&&!e.label)return null;var n=e.children,i=Jr(n,Pi).map(function(a,l){return _.cloneElement(a,{data:t,key:"labelList-".concat(l)})});if(!r)return i;var o=EV(e.label,t);return[o].concat(xV(i))}Pi.renderCallByParent=CV;function Ec(e){"@babel/helpers - typeof";return Ec=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ec(e)}function Hg(){return Hg=Object.assign?Object.assign.bind():function(e){for(var t=1;t180),",").concat(+(a>u),`, - `).concat(c.x,",").concat(c.y,` - `);if(i>0){var p=Or(r,n,i,a),g=Or(r,n,i,u);d+="L ".concat(g.x,",").concat(g.y,` - A `).concat(i,",").concat(i,`,0, - `).concat(+(Math.abs(s)>180),",").concat(+(a<=u),`, - `).concat(p.x,",").concat(p.y," Z")}else d+="L ".concat(r,",").concat(n," Z");return d},DV=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,o=t.outerRadius,a=t.cornerRadius,l=t.forceCornerRadius,s=t.cornerIsExternal,u=t.startAngle,f=t.endAngle,c=ii(f-u),d=Zf({cx:r,cy:n,radius:o,angle:u,sign:c,cornerRadius:a,cornerIsExternal:s}),p=d.circleTangency,g=d.lineTangency,y=d.theta,m=Zf({cx:r,cy:n,radius:o,angle:f,sign:-c,cornerRadius:a,cornerIsExternal:s}),h=m.circleTangency,v=m.lineTangency,x=m.theta,P=s?Math.abs(u-f):Math.abs(u-f)-y-x;if(P<0)return l?"M ".concat(g.x,",").concat(g.y,` - a`).concat(a,",").concat(a,",0,0,1,").concat(a*2,`,0 - a`).concat(a,",").concat(a,",0,0,1,").concat(-a*2,`,0 - `):DT({cx:r,cy:n,innerRadius:i,outerRadius:o,startAngle:u,endAngle:f});var w="M ".concat(g.x,",").concat(g.y,` - A`).concat(a,",").concat(a,",0,0,").concat(+(c<0),",").concat(p.x,",").concat(p.y,` - A`).concat(o,",").concat(o,",0,").concat(+(P>180),",").concat(+(c<0),",").concat(h.x,",").concat(h.y,` - A`).concat(a,",").concat(a,",0,0,").concat(+(c<0),",").concat(v.x,",").concat(v.y,` - `);if(i>0){var S=Zf({cx:r,cy:n,radius:i,angle:u,sign:c,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),A=S.circleTangency,E=S.lineTangency,R=S.theta,K=Zf({cx:r,cy:n,radius:i,angle:f,sign:-c,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),H=K.circleTangency,F=K.lineTangency,ae=K.theta,te=s?Math.abs(u-f):Math.abs(u-f)-R-ae;if(te<0&&a===0)return"".concat(w,"L").concat(r,",").concat(n,"Z");w+="L".concat(F.x,",").concat(F.y,` - A`).concat(a,",").concat(a,",0,0,").concat(+(c<0),",").concat(H.x,",").concat(H.y,` - A`).concat(i,",").concat(i,",0,").concat(+(te>180),",").concat(+(c>0),",").concat(A.x,",").concat(A.y,` - A`).concat(a,",").concat(a,",0,0,").concat(+(c<0),",").concat(E.x,",").concat(E.y,"Z")}else w+="L".concat(r,",").concat(n,"Z");return w},NV={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},NT=function(t){var r=_S(_S({},NV),t),n=r.cx,i=r.cy,o=r.innerRadius,a=r.outerRadius,l=r.cornerRadius,s=r.forceCornerRadius,u=r.cornerIsExternal,f=r.startAngle,c=r.endAngle,d=r.className;if(a0&&Math.abs(f-c)<360?m=DV({cx:n,cy:i,innerRadius:o,outerRadius:a,cornerRadius:Math.min(y,g/2),forceCornerRadius:s,cornerIsExternal:u,startAngle:f,endAngle:c}):m=DT({cx:n,cy:i,innerRadius:o,outerRadius:a,startAngle:f,endAngle:c}),D.createElement("path",Hg({},Xe(r,!0),{className:p,d:m,role:"img"}))};function Cc(e){"@babel/helpers - typeof";return Cc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cc(e)}function Vg(){return Vg=Object.assign?Object.assign.bind():function(e){for(var t=1;tXV.call(e,t));function Ka(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const JV="__v",eK="__o",tK="_owner",{getOwnPropertyDescriptor:MS,keys:kS}=Object;function rK(e,t){return e.byteLength===t.byteLength&&xp(new Uint8Array(e),new Uint8Array(t))}function nK(e,t,r){let n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function iK(e,t){return e.byteLength===t.byteLength&&xp(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function oK(e,t){return Ka(e.getTime(),t.getTime())}function aK(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function lK(e,t){return e===t}function IS(e,t,r){const n=e.size;if(n!==t.size)return!1;if(!n)return!0;const i=new Array(n),o=e.entries();let a,l,s=0;for(;(a=o.next())&&!a.done;){const u=t.entries();let f=!1,c=0;for(;(l=u.next())&&!l.done;){if(i[c]){c++;continue}const d=a.value,p=l.value;if(r.equals(d[0],p[0],s,c,e,t,r)&&r.equals(d[1],p[1],d[0],p[0],e,t,r)){f=i[c]=!0;break}c++}if(!f)return!1;s++}return!0}const sK=Ka;function uK(e,t,r){const n=kS(e);let i=n.length;if(kS(t).length!==i)return!1;for(;i-- >0;)if(!zT(e,t,r,n[i]))return!1;return!0}function Su(e,t,r){const n=CS(e);let i=n.length;if(CS(t).length!==i)return!1;let o,a,l;for(;i-- >0;)if(o=n[i],!zT(e,t,r,o)||(a=MS(e,o),l=MS(t,o),(a||l)&&(!a||!l||a.configurable!==l.configurable||a.enumerable!==l.enumerable||a.writable!==l.writable)))return!1;return!0}function cK(e,t){return Ka(e.valueOf(),t.valueOf())}function fK(e,t){return e.source===t.source&&e.flags===t.flags}function RS(e,t,r){const n=e.size;if(n!==t.size)return!1;if(!n)return!0;const i=new Array(n),o=e.values();let a,l;for(;(a=o.next())&&!a.done;){const s=t.values();let u=!1,f=0;for(;(l=s.next())&&!l.done;){if(!i[f]&&r.equals(a.value,l.value,a.value,l.value,e,t,r)){u=i[f]=!0;break}f++}if(!u)return!1}return!0}function xp(e,t){let r=e.byteLength;if(t.byteLength!==r||e.byteOffset!==t.byteOffset)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function dK(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function zT(e,t,r,n){return(n===tK||n===eK||n===JV)&&(e.$$typeof||t.$$typeof)?!0:ZV(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}const pK="[object ArrayBuffer]",hK="[object Arguments]",vK="[object Boolean]",yK="[object DataView]",gK="[object Date]",mK="[object Error]",bK="[object Map]",xK="[object Number]",wK="[object Object]",SK="[object RegExp]",PK="[object Set]",OK="[object String]",AK={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},jK="[object URL]",_K=Object.prototype.toString;function TK({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:r,areDatesEqual:n,areErrorsEqual:i,areFunctionsEqual:o,areMapsEqual:a,areNumbersEqual:l,areObjectsEqual:s,arePrimitiveWrappersEqual:u,areRegExpsEqual:f,areSetsEqual:c,areTypedArraysEqual:d,areUrlsEqual:p,unknownTagComparators:g}){return function(m,h,v){if(m===h)return!0;if(m==null||h==null)return!1;const x=typeof m;if(x!==typeof h)return!1;if(x!=="object")return x==="number"?l(m,h,v):x==="function"?o(m,h,v):!1;const P=m.constructor;if(P!==h.constructor)return!1;if(P===Object)return s(m,h,v);if(Array.isArray(m))return t(m,h,v);if(P===Date)return n(m,h,v);if(P===RegExp)return f(m,h,v);if(P===Map)return a(m,h,v);if(P===Set)return c(m,h,v);const w=_K.call(m);if(w===gK)return n(m,h,v);if(w===SK)return f(m,h,v);if(w===bK)return a(m,h,v);if(w===PK)return c(m,h,v);if(w===wK)return typeof m.then!="function"&&typeof h.then!="function"&&s(m,h,v);if(w===jK)return p(m,h,v);if(w===mK)return i(m,h,v);if(w===hK)return s(m,h,v);if(AK[w])return d(m,h,v);if(w===pK)return e(m,h,v);if(w===yK)return r(m,h,v);if(w===vK||w===xK||w===OK)return u(m,h,v);if(g){let S=g[w];if(!S){const A=QV(m);A&&(S=g[A])}if(S)return S(m,h,v)}return!1}}function $K({circular:e,createCustomConfig:t,strict:r}){let n={areArrayBuffersEqual:rK,areArraysEqual:r?Su:nK,areDataViewsEqual:iK,areDatesEqual:oK,areErrorsEqual:aK,areFunctionsEqual:lK,areMapsEqual:r?Xv(IS,Su):IS,areNumbersEqual:sK,areObjectsEqual:r?Su:uK,arePrimitiveWrappersEqual:cK,areRegExpsEqual:fK,areSetsEqual:r?Xv(RS,Su):RS,areTypedArraysEqual:r?Xv(xp,Su):xp,areUrlsEqual:dK,unknownTagComparators:void 0};if(t&&(n=Object.assign({},n,t(n))),e){const i=ed(n.areArraysEqual),o=ed(n.areMapsEqual),a=ed(n.areObjectsEqual),l=ed(n.areSetsEqual);n=Object.assign({},n,{areArraysEqual:i,areMapsEqual:o,areObjectsEqual:a,areSetsEqual:l})}return n}function EK(e){return function(t,r,n,i,o,a,l){return e(t,r,l)}}function CK({circular:e,comparator:t,createState:r,equals:n,strict:i}){if(r)return function(l,s){const{cache:u=e?new WeakMap:void 0,meta:f}=r();return t(l,s,{cache:u,equals:n,meta:f,strict:i})};if(e)return function(l,s){return t(l,s,{cache:new WeakMap,equals:n,meta:void 0,strict:i})};const o={cache:void 0,equals:n,meta:void 0,strict:i};return function(l,s){return t(l,s,o)}}const MK=na();na({strict:!0});na({circular:!0});na({circular:!0,strict:!0});na({createInternalComparator:()=>Ka});na({strict:!0,createInternalComparator:()=>Ka});na({circular:!0,createInternalComparator:()=>Ka});na({circular:!0,createInternalComparator:()=>Ka,strict:!0});function na(e={}){const{circular:t=!1,createInternalComparator:r,createState:n,strict:i=!1}=e,o=$K(e),a=TK(o),l=r?r(a):EK(a);return CK({circular:t,comparator:a,createState:n,equals:l,strict:i})}function kK(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function DS(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function i(o){r<0&&(r=o),o-r>t?(e(o),r=-1):kK(i)};requestAnimationFrame(n)}function Kg(e){"@babel/helpers - typeof";return Kg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kg(e)}function IK(e){return LK(e)||NK(e)||DK(e)||RK()}function RK(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function DK(e,t){if(e){if(typeof e=="string")return NS(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return NS(e,t)}}function NS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r1?1:h<0?0:h},y=function(h){for(var v=h>1?1:h,x=v,P=0;P<8;++P){var w=c(x)-v,S=p(x);if(Math.abs(w-v)0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,i=t.damping,o=i===void 0?8:i,a=t.dt,l=a===void 0?17:a,s=function(f,c,d){var p=-(f-c)*n,g=d*o,y=d+(p-g)*l/1e3,m=d*l/1e3+f;return Math.abs(m-c)e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function vG(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,o;for(o=0;o=0)&&(r[i]=e[i]);return r}function Qv(e){return bG(e)||mG(e)||gG(e)||yG()}function yG(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gG(e,t){if(e){if(typeof e=="string")return Qg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Qg(e,t)}}function mG(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function bG(e){if(Array.isArray(e))return Qg(e)}function Qg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Pp(e){return Pp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Pp(e)}var si=function(e){OG(r,e);var t=AG(r);function r(n,i){var o;xG(this,r),o=t.call(this,n,i);var a=o.props,l=a.isActive,s=a.attributeName,u=a.from,f=a.to,c=a.steps,d=a.children,p=a.duration;if(o.handleStyleChange=o.handleStyleChange.bind(em(o)),o.changeStyle=o.changeStyle.bind(em(o)),!l||p<=0)return o.state={style:{}},typeof d=="function"&&(o.state={style:f}),Jg(o);if(c&&c.length)o.state={style:c[0].style};else if(u){if(typeof d=="function")return o.state={style:u},Jg(o);o.state={style:s?$u({},s,u):u}}else o.state={style:{}};return o}return SG(r,[{key:"componentDidMount",value:function(){var i=this.props,o=i.isActive,a=i.canBegin;this.mounted=!0,!(!o||!a)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var o=this.props,a=o.isActive,l=o.canBegin,s=o.attributeName,u=o.shouldReAnimate,f=o.to,c=o.from,d=this.state.style;if(l){if(!a){var p={style:s?$u({},s,f):f};this.state&&d&&(s&&d[s]!==f||!s&&d!==f)&&this.setState(p);return}if(!(MK(i.to,f)&&i.canBegin&&i.isActive)){var g=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var y=g||u?c:i.to;if(this.state&&d){var m={style:s?$u({},s,y):y};(s&&d[s]!==y||!s&&d!==y)&&this.setState(m)}this.runAnimation(Xn(Xn({},this.props),{},{from:y,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var o=this,a=i.from,l=i.to,s=i.duration,u=i.easing,f=i.begin,c=i.onAnimationEnd,d=i.onAnimationStart,p=dG(a,l,tG(u),s,this.changeStyle),g=function(){o.stopJSAnimation=p()};this.manager.start([d,f,g,s,c])}},{key:"runStepAnimation",value:function(i){var o=this,a=i.steps,l=i.begin,s=i.onAnimationStart,u=a[0],f=u.style,c=u.duration,d=c===void 0?0:c,p=function(y,m,h){if(h===0)return y;var v=m.duration,x=m.easing,P=x===void 0?"ease":x,w=m.style,S=m.properties,A=m.onAnimationEnd,E=h>0?a[h-1]:m,R=S||Object.keys(w);if(typeof P=="function"||P==="spring")return[].concat(Qv(y),[o.runJSAnimation.bind(o,{from:E.style,to:w,duration:v,easing:P}),v]);var K=FS(R,v,P),H=Xn(Xn(Xn({},E.style),w),{},{transition:K});return[].concat(Qv(y),[H,v,A]).filter(UK)};return this.manager.start([s].concat(Qv(a.reduce(p,[f,Math.max(d,l)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=BK());var o=i.begin,a=i.duration,l=i.attributeName,s=i.to,u=i.easing,f=i.onAnimationStart,c=i.onAnimationEnd,d=i.steps,p=i.children,g=this.manager;if(this.unSubscribe=g.subscribe(this.handleStyleChange),typeof u=="function"||typeof p=="function"||u==="spring"){this.runJSAnimation(i);return}if(d.length>1){this.runStepAnimation(i);return}var y=l?$u({},l,s):s,m=FS(Object.keys(y),a,u);g.start([f,o,Xn(Xn({},y),{},{transition:m}),a,c])}},{key:"render",value:function(){var i=this.props,o=i.children;i.begin;var a=i.duration;i.attributeName,i.easing;var l=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var s=hG(i,pG),u=_.Children.count(o),f=this.state.style;if(typeof o=="function")return o(f);if(!l||u===0||a<=0)return o;var c=function(p){var g=p.props,y=g.style,m=y===void 0?{}:y,h=g.className,v=_.cloneElement(p,Xn(Xn({},s),{},{style:Xn(Xn({},m),f),className:h}));return v};return u===1?c(_.Children.only(o)):D.createElement("div",null,_.Children.map(o,function(d){return c(d)}))}}]),r}(_.PureComponent);si.displayName="Animate";si.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};si.propTypes={from:bt.oneOfType([bt.object,bt.string]),to:bt.oneOfType([bt.object,bt.string]),attributeName:bt.string,duration:bt.number,begin:bt.number,easing:bt.oneOfType([bt.string,bt.func]),steps:bt.arrayOf(bt.shape({duration:bt.number.isRequired,style:bt.object.isRequired,easing:bt.oneOfType([bt.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),bt.func]),properties:bt.arrayOf("string"),onAnimationEnd:bt.func})),children:bt.oneOfType([bt.node,bt.func]),isActive:bt.bool,canBegin:bt.bool,onAnimationEnd:bt.func,shouldReAnimate:bt.bool,onAnimationStart:bt.func,onAnimationReStart:bt.func};function Ic(e){"@babel/helpers - typeof";return Ic=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ic(e)}function Op(){return Op=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0?1:-1,s=n>=0?1:-1,u=i>=0&&n>=0||i<0&&n<0?1:0,f;if(a>0&&o instanceof Array){for(var c=[0,0,0,0],d=0,p=4;da?a:o[d];f="M".concat(t,",").concat(r+l*c[0]),c[0]>0&&(f+="A ".concat(c[0],",").concat(c[0],",0,0,").concat(u,",").concat(t+s*c[0],",").concat(r)),f+="L ".concat(t+n-s*c[1],",").concat(r),c[1]>0&&(f+="A ".concat(c[1],",").concat(c[1],",0,0,").concat(u,`, - `).concat(t+n,",").concat(r+l*c[1])),f+="L ".concat(t+n,",").concat(r+i-l*c[2]),c[2]>0&&(f+="A ".concat(c[2],",").concat(c[2],",0,0,").concat(u,`, - `).concat(t+n-s*c[2],",").concat(r+i)),f+="L ".concat(t+s*c[3],",").concat(r+i),c[3]>0&&(f+="A ".concat(c[3],",").concat(c[3],",0,0,").concat(u,`, - `).concat(t,",").concat(r+i-l*c[3])),f+="Z"}else if(a>0&&o===+o&&o>0){var g=Math.min(a,o);f="M ".concat(t,",").concat(r+l*g,` - A `).concat(g,",").concat(g,",0,0,").concat(u,",").concat(t+s*g,",").concat(r,` - L `).concat(t+n-s*g,",").concat(r,` - A `).concat(g,",").concat(g,",0,0,").concat(u,",").concat(t+n,",").concat(r+l*g,` - L `).concat(t+n,",").concat(r+i-l*g,` - A `).concat(g,",").concat(g,",0,0,").concat(u,",").concat(t+n-s*g,",").concat(r+i,` - L `).concat(t+s*g,",").concat(r+i,` - A `).concat(g,",").concat(g,",0,0,").concat(u,",").concat(t,",").concat(r+i-l*g," Z")}else f="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(i," h ").concat(-n," Z");return f},RG=function(t,r){if(!t||!r)return!1;var n=t.x,i=t.y,o=r.x,a=r.y,l=r.width,s=r.height;if(Math.abs(l)>0&&Math.abs(s)>0){var u=Math.min(o,o+l),f=Math.max(o,o+l),c=Math.min(a,a+s),d=Math.max(a,a+s);return n>=u&&n<=f&&i>=c&&i<=d}return!1},DG={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},xb=function(t){var r=YS(YS({},DG),t),n=_.useRef(),i=_.useState(-1),o=_G(i,2),a=o[0],l=o[1];_.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var P=n.current.getTotalLength();P&&l(P)}catch{}},[]);var s=r.x,u=r.y,f=r.width,c=r.height,d=r.radius,p=r.className,g=r.animationEasing,y=r.animationDuration,m=r.animationBegin,h=r.isAnimationActive,v=r.isUpdateAnimationActive;if(s!==+s||u!==+u||f!==+f||c!==+c||f===0||c===0)return null;var x=st("recharts-rectangle",p);return v?D.createElement(si,{canBegin:a>0,from:{width:f,height:c,x:s,y:u},to:{width:f,height:c,x:s,y:u},duration:y,animationEasing:g,isActive:v},function(P){var w=P.width,S=P.height,A=P.x,E=P.y;return D.createElement(si,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:m,duration:y,isActive:h,easing:g},D.createElement("path",Op({},Xe(r,!0),{className:x,d:qS(A,E,w,S,d),ref:n})))}):D.createElement("path",Op({},Xe(r,!0),{className:x,d:qS(s,u,f,c,d)}))};function tm(){return tm=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function UG(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var HG=function(t,r,n,i,o,a){return"M".concat(t,",").concat(o,"v").concat(i,"M").concat(a,",").concat(r,"h").concat(n)},VG=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,o=i===void 0?0:i,a=t.top,l=a===void 0?0:a,s=t.left,u=s===void 0?0:s,f=t.width,c=f===void 0?0:f,d=t.height,p=d===void 0?0:d,g=t.className,y=WG(t,NG),m=LG({x:n,y:o,top:l,left:u,width:c,height:p},y);return!Pe(n)||!Pe(o)||!Pe(c)||!Pe(p)||!Pe(l)||!Pe(u)?null:D.createElement("path",rm({},Xe(m,!0),{className:st("recharts-cross",g),d:HG(n,o,c,p,l,u)}))},KG=s_,GG=KG(Object.getPrototypeOf,Object),YG=GG,qG=to,XG=YG,QG=ro,ZG="[object Object]",JG=Function.prototype,eY=Object.prototype,YT=JG.toString,tY=eY.hasOwnProperty,rY=YT.call(Object);function nY(e){if(!QG(e)||qG(e)!=ZG)return!1;var t=XG(e);if(t===null)return!0;var r=tY.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&YT.call(r)==rY}var iY=nY;const oY=Tt(iY);var aY=to,lY=ro,sY="[object Boolean]";function uY(e){return e===!0||e===!1||lY(e)&&aY(e)==sY}var cY=uY;const fY=Tt(cY);function Dc(e){"@babel/helpers - typeof";return Dc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dc(e)}function Ap(){return Ap=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0,from:{upperWidth:0,lowerWidth:0,height:d,x:s,y:u},to:{upperWidth:f,lowerWidth:c,height:d,x:s,y:u},duration:y,animationEasing:g,isActive:h},function(x){var P=x.upperWidth,w=x.lowerWidth,S=x.height,A=x.x,E=x.y;return D.createElement(si,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:m,duration:y,easing:g},D.createElement("path",Ap({},Xe(r,!0),{className:v,d:eP(A,E,P,w,S),ref:n})))}):D.createElement("g",null,D.createElement("path",Ap({},Xe(r,!0),{className:v,d:eP(s,u,f,c,d)})))},SY=["option","shapeType","propTransformer","activeClassName","isActive"];function Nc(e){"@babel/helpers - typeof";return Nc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nc(e)}function PY(e,t){if(e==null)return{};var r=OY(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function OY(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function tP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function jp(e){for(var t=1;t0&&n.handleDrag(i.changedTouches[0])}),sn(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=n.props,o=i.endIndex,a=i.onDragEnd,l=i.startIndex;a==null||a({endIndex:o,startIndex:l})}),n.detachDragEndListener()}),sn(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),sn(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),sn(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),sn(n,"handleSlideDragStart",function(i){var o=sP(i)?i.changedTouches[0]:i;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:o.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return lq(t,e),nq(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var i=n.startX,o=n.endX,a=this.state.scaleValues,l=this.props,s=l.gap,u=l.data,f=u.length-1,c=Math.min(i,o),d=Math.max(i,o),p=t.getIndexInRange(a,c),g=t.getIndexInRange(a,d);return{startIndex:p-p%s,endIndex:g===f?f:g-g%s}}},{key:"getTextOfTick",value:function(n){var i=this.props,o=i.data,a=i.tickFormatter,l=i.dataKey,s=dr(o[n],l,n);return Ze(a)?a(s,n):s}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(n){var i=this.state,o=i.slideMoveStartX,a=i.startX,l=i.endX,s=this.props,u=s.x,f=s.width,c=s.travellerWidth,d=s.startIndex,p=s.endIndex,g=s.onChange,y=n.pageX-o;y>0?y=Math.min(y,u+f-c-l,u+f-c-a):y<0&&(y=Math.max(y,u-a,u-l));var m=this.getIndex({startX:a+y,endX:l+y});(m.startIndex!==d||m.endIndex!==p)&&g&&g(m),this.setState({startX:a+y,endX:l+y,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,i){var o=sP(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:o.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var i=this.state,o=i.brushMoveStartX,a=i.movingTravellerId,l=i.endX,s=i.startX,u=this.state[a],f=this.props,c=f.x,d=f.width,p=f.travellerWidth,g=f.onChange,y=f.gap,m=f.data,h={startX:this.state.startX,endX:this.state.endX},v=n.pageX-o;v>0?v=Math.min(v,c+d-p-u):v<0&&(v=Math.max(v,c-u)),h[a]=u+v;var x=this.getIndex(h),P=x.startIndex,w=x.endIndex,S=function(){var E=m.length-1;return a==="startX"&&(l>s?P%y===0:w%y===0)||ls?w%y===0:P%y===0)||l>s&&w===E};this.setState(sn(sn({},a,u+v),"brushMoveStartX",n.pageX),function(){g&&S()&&g(x)})}},{key:"handleTravellerMoveKeyboard",value:function(n,i){var o=this,a=this.state,l=a.scaleValues,s=a.startX,u=a.endX,f=this.state[i],c=l.indexOf(f);if(c!==-1){var d=c+n;if(!(d===-1||d>=l.length)){var p=l[d];i==="startX"&&p>=u||i==="endX"&&p<=s||this.setState(sn({},i,p),function(){o.props.onChange(o.getIndex({startX:o.state.startX,endX:o.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,i=n.x,o=n.y,a=n.width,l=n.height,s=n.fill,u=n.stroke;return D.createElement("rect",{stroke:u,fill:s,x:i,y:o,width:a,height:l})}},{key:"renderPanorama",value:function(){var n=this.props,i=n.x,o=n.y,a=n.width,l=n.height,s=n.data,u=n.children,f=n.padding,c=_.Children.only(u);return c?D.cloneElement(c,{x:i,y:o,width:a,height:l,margin:f,compact:!0,data:s}):null}},{key:"renderTravellerLayer",value:function(n,i){var o,a,l=this,s=this.props,u=s.y,f=s.travellerWidth,c=s.height,d=s.traveller,p=s.ariaLabel,g=s.data,y=s.startIndex,m=s.endIndex,h=Math.max(n,this.props.x),v=Jv(Jv({},Xe(this.props,!1)),{},{x:h,y:u,width:f,height:c}),x=p||"Min value: ".concat((o=g[y])===null||o===void 0?void 0:o.name,", Max value: ").concat((a=g[m])===null||a===void 0?void 0:a.name);return D.createElement(mt,{tabIndex:0,role:"slider","aria-label":x,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(w){["ArrowLeft","ArrowRight"].includes(w.key)&&(w.preventDefault(),w.stopPropagation(),l.handleTravellerMoveKeyboard(w.key==="ArrowRight"?1:-1,i))},onFocus:function(){l.setState({isTravellerFocused:!0})},onBlur:function(){l.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(d,v))}},{key:"renderSlide",value:function(n,i){var o=this.props,a=o.y,l=o.height,s=o.stroke,u=o.travellerWidth,f=Math.min(n,i)+u,c=Math.max(Math.abs(i-n)-u,0);return D.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:s,fillOpacity:.2,x:f,y:a,width:c,height:l})}},{key:"renderText",value:function(){var n=this.props,i=n.startIndex,o=n.endIndex,a=n.y,l=n.height,s=n.travellerWidth,u=n.stroke,f=this.state,c=f.startX,d=f.endX,p=5,g={pointerEvents:"none",fill:u};return D.createElement(mt,{className:"recharts-brush-texts"},D.createElement(rp,Tp({textAnchor:"end",verticalAnchor:"middle",x:Math.min(c,d)-p,y:a+l/2},g),this.getTextOfTick(i)),D.createElement(rp,Tp({textAnchor:"start",verticalAnchor:"middle",x:Math.max(c,d)+s+p,y:a+l/2},g),this.getTextOfTick(o)))}},{key:"render",value:function(){var n=this.props,i=n.data,o=n.className,a=n.children,l=n.x,s=n.y,u=n.width,f=n.height,c=n.alwaysShowText,d=this.state,p=d.startX,g=d.endX,y=d.isTextActive,m=d.isSlideMoving,h=d.isTravellerMoving,v=d.isTravellerFocused;if(!i||!i.length||!Pe(l)||!Pe(s)||!Pe(u)||!Pe(f)||u<=0||f<=0)return null;var x=st("recharts-brush",o),P=D.Children.count(a)===1,w=tq("userSelect","none");return D.createElement(mt,{className:x,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:w},this.renderBackground(),P&&this.renderPanorama(),this.renderSlide(p,g),this.renderTravellerLayer(p,"startX"),this.renderTravellerLayer(g,"endX"),(y||m||h||v||c)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var i=n.x,o=n.y,a=n.width,l=n.height,s=n.stroke,u=Math.floor(o+l/2)-1;return D.createElement(D.Fragment,null,D.createElement("rect",{x:i,y:o,width:a,height:l,fill:s,stroke:"none"}),D.createElement("line",{x1:i+1,y1:u,x2:i+a-1,y2:u,fill:"none",stroke:"#fff"}),D.createElement("line",{x1:i+1,y1:u+2,x2:i+a-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,i){var o;return D.isValidElement(n)?o=D.cloneElement(n,i):Ze(n)?o=n(i):o=t.renderDefaultTraveller(i),o}},{key:"getDerivedStateFromProps",value:function(n,i){var o=n.data,a=n.width,l=n.x,s=n.travellerWidth,u=n.updateId,f=n.startIndex,c=n.endIndex;if(o!==i.prevData||u!==i.prevUpdateId)return Jv({prevData:o,prevTravellerWidth:s,prevUpdateId:u,prevX:l,prevWidth:a},o&&o.length?uq({data:o,width:a,x:l,travellerWidth:s,startIndex:f,endIndex:c}):{scale:null,scaleValues:null});if(i.scale&&(a!==i.prevWidth||l!==i.prevX||s!==i.prevTravellerWidth)){i.scale.range([l,l+a-s]);var d=i.scale.domain().map(function(p){return i.scale(p)});return{prevData:o,prevTravellerWidth:s,prevUpdateId:u,prevX:l,prevWidth:a,startX:i.scale(n.startIndex),endX:i.scale(n.endIndex),scaleValues:d}}return null}},{key:"getIndexInRange",value:function(n,i){for(var o=n.length,a=0,l=o-1;l-a>1;){var s=Math.floor((a+l)/2);n[s]>i?l=s:a=s}return i>=n[l]?l:a}}])}(_.PureComponent);sn(as,"displayName","Brush");sn(as,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var cq=V0;function fq(e,t){var r;return cq(e,function(n,i,o){return r=t(n,i,o),!r}),!!r}var dq=fq,pq=e_,hq=Jo,vq=dq,yq=tn,gq=Eh;function mq(e,t,r){var n=yq(e)?pq:vq;return r&&gq(e,t,r)&&(t=void 0),n(e,hq(t))}var bq=mq;const xq=Tt(bq);var Oi=function(t,r){var n=t.alwaysShow,i=t.ifOverflow;return n&&(i="extendDomain"),i===r},uP=S_;function wq(e,t,r){t=="__proto__"&&uP?uP(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var Sq=wq,Pq=Sq,Oq=x_,Aq=Jo;function jq(e,t){var r={};return t=Aq(t),Oq(e,function(n,i,o){Pq(r,i,t(n,i,o))}),r}var _q=jq;const Tq=Tt(_q);function $q(e,t){for(var r=-1,n=e==null?0:e.length;++r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Kq(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Gq(e,t){var r=e.x,n=e.y,i=Vq(e,zq),o="".concat(r),a=parseInt(o,10),l="".concat(n),s=parseInt(l,10),u="".concat(t.height||i.height),f=parseInt(u,10),c="".concat(t.width||i.width),d=parseInt(c,10);return Pu(Pu(Pu(Pu(Pu({},t),i),a?{x:a}:{}),s?{y:s}:{}),{},{height:f,width:d,name:t.name,radius:t.radius})}function fP(e){return D.createElement(nm,om({shapeType:"rectangle",propTransformer:Gq,activeClassName:"recharts-active-bar"},e))}var Yq=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,i){if(typeof t=="number")return t;var o=Pe(n)||sD(n);return o?t(n,i):(o||La(),r)}},qq=["value","background"],e$;function ls(e){"@babel/helpers - typeof";return ls=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ls(e)}function Xq(e,t){if(e==null)return{};var r=Qq(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Qq(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Ep(){return Ep=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(X)0&&Math.abs(te)0&&(ae=Math.min((nt||0)-(te[it-1]||0),ae))}),Number.isFinite(ae)){var X=ae/F,ne=y.layout==="vertical"?n.height:n.width;if(y.padding==="gap"&&(A=X*ne/2),y.padding==="no-gap"){var ce=Ra(t.barCategoryGap,X*ne),Q=X*ne/2;A=Q-ce-(Q-ce)/ne*ce}}}i==="xAxis"?E=[n.left+(x.left||0)+(A||0),n.left+n.width-(x.right||0)-(A||0)]:i==="yAxis"?E=s==="horizontal"?[n.top+n.height-(x.bottom||0),n.top+(x.top||0)]:[n.top+(x.top||0)+(A||0),n.top+n.height-(x.bottom||0)-(A||0)]:E=y.range,w&&(E=[E[1],E[0]]);var ie=$9(y,o,d),fe=ie.scale,le=ie.realScaleType;fe.domain(h).range(E),E9(fe);var Se=L9(fe,ei(ei({},y),{},{realScaleType:le}));i==="xAxis"?(H=m==="top"&&!P||m==="bottom"&&P,R=n.left,K=c[S]-H*y.height):i==="yAxis"&&(H=m==="left"&&!P||m==="right"&&P,R=c[S]-H*y.width,K=n.top);var Ee=ei(ei(ei({},y),Se),{},{realScaleType:le,x:R,y:K,scale:fe,width:i==="xAxis"?n.width:y.width,height:i==="yAxis"?n.height:y.height});return Ee.bandSize=gp(Ee,Se),!y.hide&&i==="xAxis"?c[S]+=(H?-1:1)*Ee.height:y.hide||(c[S]+=(H?-1:1)*Ee.width),ei(ei({},p),{},Uh({},g,Ee))},{})},o$=function(t,r){var n=t.x,i=t.y,o=r.x,a=r.y;return{x:Math.min(n,o),y:Math.min(i,a),width:Math.abs(o-n),height:Math.abs(a-i)}},sX=function(t){var r=t.x1,n=t.y1,i=t.x2,o=t.y2;return o$({x:r,y:n},{x:i,y:o})},a$=function(){function e(t){oX(this,e),this.scale=t}return aX(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.bandAware,o=n.position;if(r!==void 0){if(o)switch(o){case"start":return this.scale(r);case"middle":{var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+a}case"end":{var l=this.bandwidth?this.bandwidth():0;return this.scale(r)+l}default:return this.scale(r)}if(i){var s=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+s}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),i=n[0],o=n[n.length-1];return i<=o?r>=i&&r<=o:r>=o&&r<=i}}],[{key:"create",value:function(r){return new e(r)}}])}();Uh(a$,"EPS",1e-4);var wb=function(t){var r=Object.keys(t).reduce(function(n,i){return ei(ei({},n),{},Uh({},i,a$.create(t[i])))},{});return ei(ei({},r),{},{apply:function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=o.bandAware,l=o.position;return Tq(i,function(s,u){return r[u].apply(s,{bandAware:a,position:l})})},isInRange:function(i){return JT(i,function(o,a){return r[a].isInRange(o)})}})};function uX(e){return(e%180+180)%180}var cX=function(t){var r=t.width,n=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=uX(i),a=o*Math.PI/180,l=Math.atan(n/r),s=a>l&&a-1?i[o?t[a]:a]:void 0}}var vX=hX,yX=qT;function gX(e){var t=yX(e),r=t%1;return t===t?r?t-r:t:0}var mX=gX,bX=h_,xX=Jo,wX=mX,SX=Math.max;function PX(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:wX(r);return i<0&&(i=SX(n+i,0)),bX(e,xX(t),i)}var OX=PX,AX=vX,jX=OX,_X=AX(jX),TX=_X;const $X=Tt(TX);var EX=hR(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),Sb=_.createContext(void 0),Pb=_.createContext(void 0),l$=_.createContext(void 0),s$=_.createContext({}),u$=_.createContext(void 0),c$=_.createContext(0),f$=_.createContext(0),yP=function(t){var r=t.state,n=r.xAxisMap,i=r.yAxisMap,o=r.offset,a=t.clipPathId,l=t.children,s=t.width,u=t.height,f=EX(o);return D.createElement(Sb.Provider,{value:n},D.createElement(Pb.Provider,{value:i},D.createElement(s$.Provider,{value:o},D.createElement(l$.Provider,{value:f},D.createElement(u$.Provider,{value:a},D.createElement(c$.Provider,{value:u},D.createElement(f$.Provider,{value:s},l)))))))},CX=function(){return _.useContext(u$)},d$=function(t){var r=_.useContext(Sb);r==null&&La();var n=r[t];return n==null&&La(),n},MX=function(){var t=_.useContext(Sb);return $o(t)},kX=function(){var t=_.useContext(Pb),r=$X(t,function(n){return JT(n.domain,Number.isFinite)});return r||$o(t)},p$=function(t){var r=_.useContext(Pb);r==null&&La();var n=r[t];return n==null&&La(),n},IX=function(){var t=_.useContext(l$);return t},RX=function(){return _.useContext(s$)},Ob=function(){return _.useContext(f$)},Ab=function(){return _.useContext(c$)};function ss(e){"@babel/helpers - typeof";return ss=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ss(e)}function DX(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function NX(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);re*i)return!1;var o=r();return e*(t-e*o/2-n)>=0&&e*(t+e*o/2-i)<=0}function mQ(e,t){return x$(e,t+1)}function bQ(e,t,r,n,i){for(var o=(n||[]).slice(),a=t.start,l=t.end,s=0,u=1,f=a,c=function(){var g=n==null?void 0:n[s];if(g===void 0)return{v:x$(n,u)};var y=s,m,h=function(){return m===void 0&&(m=r(g,y)),m},v=g.coordinate,x=s===0||Rp(e,v,h,f,l);x||(s=0,f=a,u+=1),x&&(f=v+e*(h()/2+i),s+=u)},d;u<=o.length;)if(d=c(),d)return d.v;return[]}function Wc(e){"@babel/helpers - typeof";return Wc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wc(e)}function OP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Mr(e){for(var t=1;t0?p.coordinate-m*e:p.coordinate})}else o[d]=p=Mr(Mr({},p),{},{tickCoord:p.coordinate});var h=Rp(e,p.tickCoord,y,l,s);h&&(s=p.tickCoord-e*(y()/2+i),o[d]=Mr(Mr({},p),{},{isShow:!0}))},f=a-1;f>=0;f--)u(f);return o}function OQ(e,t,r,n,i,o){var a=(n||[]).slice(),l=a.length,s=t.start,u=t.end;if(o){var f=n[l-1],c=r(f,l-1),d=e*(f.coordinate+e*c/2-u);a[l-1]=f=Mr(Mr({},f),{},{tickCoord:d>0?f.coordinate-d*e:f.coordinate});var p=Rp(e,f.tickCoord,function(){return c},s,u);p&&(u=f.tickCoord-e*(c/2+i),a[l-1]=Mr(Mr({},f),{},{isShow:!0}))}for(var g=o?l-1:l,y=function(v){var x=a[v],P,w=function(){return P===void 0&&(P=r(x,v)),P};if(v===0){var S=e*(x.coordinate-e*w()/2-s);a[v]=x=Mr(Mr({},x),{},{tickCoord:S<0?x.coordinate-S*e:x.coordinate})}else a[v]=x=Mr(Mr({},x),{},{tickCoord:x.coordinate});var A=Rp(e,x.tickCoord,w,s,u);A&&(s=x.tickCoord+e*(w()/2+i),a[v]=Mr(Mr({},x),{},{isShow:!0}))},m=0;m=2?ii(i[1].coordinate-i[0].coordinate):1,h=gQ(o,m,p);return s==="equidistantPreserveStart"?bQ(m,h,y,i,a):(s==="preserveStart"||s==="preserveStartEnd"?d=OQ(m,h,y,i,a,s==="preserveStartEnd"):d=PQ(m,h,y,i,a),d.filter(function(v){return v.isShow}))}var AQ=["viewBox"],jQ=["viewBox"],_Q=["ticks"];function fs(e){"@babel/helpers - typeof";return fs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fs(e)}function $l(){return $l=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function TQ(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function $Q(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jP(e,t){for(var r=0;r0?s(this.props):s(p)),a<=0||l<=0||!g||!g.length?null:D.createElement(mt,{className:st("recharts-cartesian-axis",u),ref:function(m){n.layerReference=m}},o&&this.renderAxisLine(),this.renderTicks(g,this.state.fontSize,this.state.letterSpacing),Ir.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,i,o){var a,l=st(i.className,"recharts-cartesian-axis-tick-value");return D.isValidElement(n)?a=D.cloneElement(n,lr(lr({},i),{},{className:l})):Ze(n)?a=n(lr(lr({},i),{},{className:l})):a=D.createElement(rp,$l({},i,{className:"recharts-cartesian-axis-tick-value"}),o),a}}])}(_.Component);$b(Ds,"displayName","CartesianAxis");$b(Ds,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var DQ=["x1","y1","x2","y2","key"],NQ=["offset"];function Ba(e){"@babel/helpers - typeof";return Ba=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ba(e)}function _P(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Rr(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function zQ(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var WQ=function(t){var r=t.fill;if(!r||r==="none")return null;var n=t.fillOpacity,i=t.x,o=t.y,a=t.width,l=t.height,s=t.ry;return D.createElement("rect",{x:i,y:o,ry:s,width:a,height:l,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function P$(e,t){var r;if(D.isValidElement(e))r=D.cloneElement(e,t);else if(Ze(e))r=e(t);else{var n=t.x1,i=t.y1,o=t.x2,a=t.y2,l=t.key,s=TP(t,DQ),u=Xe(s,!1);u.offset;var f=TP(u,NQ);r=D.createElement("line",wa({},f,{x1:n,y1:i,x2:o,y2:a,fill:"none",key:l}))}return r}function UQ(e){var t=e.x,r=e.width,n=e.horizontal,i=n===void 0?!0:n,o=e.horizontalPoints;if(!i||!o||!o.length)return null;var a=o.map(function(l,s){var u=Rr(Rr({},e),{},{x1:t,y1:l,x2:t+r,y2:l,key:"line-".concat(s),index:s});return P$(i,u)});return D.createElement("g",{className:"recharts-cartesian-grid-horizontal"},a)}function HQ(e){var t=e.y,r=e.height,n=e.vertical,i=n===void 0?!0:n,o=e.verticalPoints;if(!i||!o||!o.length)return null;var a=o.map(function(l,s){var u=Rr(Rr({},e),{},{x1:l,y1:t,x2:l,y2:t+r,key:"line-".concat(s),index:s});return P$(i,u)});return D.createElement("g",{className:"recharts-cartesian-grid-vertical"},a)}function VQ(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,i=e.y,o=e.width,a=e.height,l=e.horizontalPoints,s=e.horizontal,u=s===void 0?!0:s;if(!u||!t||!t.length)return null;var f=l.map(function(d){return Math.round(d+i-i)}).sort(function(d,p){return d-p});i!==f[0]&&f.unshift(0);var c=f.map(function(d,p){var g=!f[p+1],y=g?i+a-d:f[p+1]-d;if(y<=0)return null;var m=p%t.length;return D.createElement("rect",{key:"react-".concat(p),y:d,x:n,height:y,width:o,stroke:"none",fill:t[m],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return D.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},c)}function KQ(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,i=e.fillOpacity,o=e.x,a=e.y,l=e.width,s=e.height,u=e.verticalPoints;if(!r||!n||!n.length)return null;var f=u.map(function(d){return Math.round(d+o-o)}).sort(function(d,p){return d-p});o!==f[0]&&f.unshift(0);var c=f.map(function(d,p){var g=!f[p+1],y=g?o+l-d:f[p+1]-d;if(y<=0)return null;var m=p%n.length;return D.createElement("rect",{key:"react-".concat(p),x:d,y:a,width:y,height:s,stroke:"none",fill:n[m],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return D.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},c)}var GQ=function(t,r){var n=t.xAxis,i=t.width,o=t.height,a=t.offset;return MT(Tb(Rr(Rr(Rr({},Ds.defaultProps),n),{},{ticks:zi(n,!0),viewBox:{x:0,y:0,width:i,height:o}})),a.left,a.left+a.width,r)},YQ=function(t,r){var n=t.yAxis,i=t.width,o=t.height,a=t.offset;return MT(Tb(Rr(Rr(Rr({},Ds.defaultProps),n),{},{ticks:zi(n,!0),viewBox:{x:0,y:0,width:i,height:o}})),a.top,a.top+a.height,r)},hl={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Eb(e){var t,r,n,i,o,a,l=Ob(),s=Ab(),u=RX(),f=Rr(Rr({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:hl.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:hl.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:hl.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:hl.horizontalFill,vertical:(o=e.vertical)!==null&&o!==void 0?o:hl.vertical,verticalFill:(a=e.verticalFill)!==null&&a!==void 0?a:hl.verticalFill,x:Pe(e.x)?e.x:u.left,y:Pe(e.y)?e.y:u.top,width:Pe(e.width)?e.width:u.width,height:Pe(e.height)?e.height:u.height}),c=f.x,d=f.y,p=f.width,g=f.height,y=f.syncWithTicks,m=f.horizontalValues,h=f.verticalValues,v=MX(),x=kX();if(!Pe(p)||p<=0||!Pe(g)||g<=0||!Pe(c)||c!==+c||!Pe(d)||d!==+d)return null;var P=f.verticalCoordinatesGenerator||GQ,w=f.horizontalCoordinatesGenerator||YQ,S=f.horizontalPoints,A=f.verticalPoints;if((!S||!S.length)&&Ze(w)){var E=m&&m.length,R=w({yAxis:x?Rr(Rr({},x),{},{ticks:E?m:x.ticks}):void 0,width:l,height:s,offset:u},E?!0:y);Hi(Array.isArray(R),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Ba(R),"]")),Array.isArray(R)&&(S=R)}if((!A||!A.length)&&Ze(P)){var K=h&&h.length,H=P({xAxis:v?Rr(Rr({},v),{},{ticks:K?h:v.ticks}):void 0,width:l,height:s,offset:u},K?!0:y);Hi(Array.isArray(H),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Ba(H),"]")),Array.isArray(H)&&(A=H)}return D.createElement("g",{className:"recharts-cartesian-grid"},D.createElement(WQ,{fill:f.fill,fillOpacity:f.fillOpacity,x:f.x,y:f.y,width:f.width,height:f.height,ry:f.ry}),D.createElement(UQ,wa({},f,{offset:u,horizontalPoints:S,xAxis:v,yAxis:x})),D.createElement(HQ,wa({},f,{offset:u,verticalPoints:A,xAxis:v,yAxis:x})),D.createElement(VQ,wa({},f,{horizontalPoints:S})),D.createElement(KQ,wa({},f,{verticalPoints:A})))}Eb.displayName="CartesianGrid";var qQ=["type","layout","connectNulls","ref"],XQ=["key"];function ds(e){"@babel/helpers - typeof";return ds=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ds(e)}function $P(e,t){if(e==null)return{};var r=QQ(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function QQ(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Uu(){return Uu=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);rc){p=[].concat(vl(s.slice(0,g)),[c-y]);break}var m=p.length%2===0?[0,d]:[d];return[].concat(vl(t.repeat(s,f)),vl(p),m).map(function(h){return"".concat(h,"px")}).join(", ")}),ti(r,"id",Ua("recharts-line-")),ti(r,"pathRef",function(a){r.mainCurve=a}),ti(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),ti(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return lZ(t,e),nZ(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();this.setState({totalLength:n})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();n!==this.state.totalLength&&this.setState({totalLength:n})}}},{key:"getTotalLength",value:function(){var n=this.mainCurve;try{return n&&n.getTotalLength&&n.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(n,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var o=this.props,a=o.points,l=o.xAxis,s=o.yAxis,u=o.layout,f=o.children,c=Jr(f,Rs);if(!c)return null;var d=function(y,m){return{x:y.x,y:y.y,value:y.value,errorVal:dr(y.payload,m)}},p={clipPath:n?"url(#clipPath-".concat(i,")"):null};return D.createElement(mt,p,c.map(function(g){return D.cloneElement(g,{key:"bar-".concat(g.props.dataKey),data:a,xAxis:l,yAxis:s,layout:u,dataPointFormatter:d})}))}},{key:"renderDots",value:function(n,i,o){var a=this.props.isAnimationActive;if(a&&!this.state.isAnimationFinished)return null;var l=this.props,s=l.dot,u=l.points,f=l.dataKey,c=Xe(this.props,!1),d=Xe(s,!0),p=u.map(function(y,m){var h=ln(ln(ln({key:"dot-".concat(m),r:3},c),d),{},{index:m,cx:y.x,cy:y.y,value:y.value,dataKey:f,payload:y.payload,points:u});return t.renderDotItem(s,h)}),g={clipPath:n?"url(#clipPath-".concat(i?"":"dots-").concat(o,")"):null};return D.createElement(mt,Uu({className:"recharts-line-dots",key:"dots"},g),p)}},{key:"renderCurveStatically",value:function(n,i,o,a){var l=this.props,s=l.type,u=l.layout,f=l.connectNulls;l.ref;var c=$P(l,qQ),d=ln(ln(ln({},Xe(c,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(o,")"):null,points:n},a),{},{type:s,layout:u,connectNulls:f});return D.createElement(Ta,Uu({},d,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(n,i){var o=this,a=this.props,l=a.points,s=a.strokeDasharray,u=a.isAnimationActive,f=a.animationBegin,c=a.animationDuration,d=a.animationEasing,p=a.animationId,g=a.animateNewValues,y=a.width,m=a.height,h=this.state,v=h.prevPoints,x=h.totalLength;return D.createElement(si,{begin:f,duration:c,isActive:u,easing:d,from:{t:0},to:{t:1},key:"line-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(P){var w=P.t;if(v){var S=v.length/l.length,A=l.map(function(F,ae){var te=Math.floor(ae*S);if(v[te]){var X=v[te],ne=Qt(X.x,F.x),ce=Qt(X.y,F.y);return ln(ln({},F),{},{x:ne(w),y:ce(w)})}if(g){var Q=Qt(y*2,F.x),ie=Qt(m/2,F.y);return ln(ln({},F),{},{x:Q(w),y:ie(w)})}return ln(ln({},F),{},{x:F.x,y:F.y})});return o.renderCurveStatically(A,n,i)}var E=Qt(0,x),R=E(w),K;if(s){var H="".concat(s).split(/[,\s]+/gim).map(function(F){return parseFloat(F)});K=o.getStrokeDasharray(R,x,H)}else K=o.generateSimpleStrokeDasharray(x,R);return o.renderCurveStatically(l,n,i,{strokeDasharray:K})})}},{key:"renderCurve",value:function(n,i){var o=this.props,a=o.points,l=o.isAnimationActive,s=this.state,u=s.prevPoints,f=s.totalLength;return l&&a&&a.length&&(!u&&f>0||!Da(u,a))?this.renderCurveWithAnimation(n,i):this.renderCurveStatically(a,n,i)}},{key:"render",value:function(){var n,i=this.props,o=i.hide,a=i.dot,l=i.points,s=i.className,u=i.xAxis,f=i.yAxis,c=i.top,d=i.left,p=i.width,g=i.height,y=i.isAnimationActive,m=i.id;if(o||!l||!l.length)return null;var h=this.state.isAnimationFinished,v=l.length===1,x=st("recharts-line",s),P=u&&u.allowDataOverflow,w=f&&f.allowDataOverflow,S=P||w,A=Ge(m)?this.id:m,E=(n=Xe(a,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},R=E.r,K=R===void 0?3:R,H=E.strokeWidth,F=H===void 0?2:H,ae=Aj(a)?a:{},te=ae.clipDot,X=te===void 0?!0:te,ne=K*2+F;return D.createElement(mt,{className:x},P||w?D.createElement("defs",null,D.createElement("clipPath",{id:"clipPath-".concat(A)},D.createElement("rect",{x:P?d:d-p/2,y:w?c:c-g/2,width:P?p:p*2,height:w?g:g*2})),!X&&D.createElement("clipPath",{id:"clipPath-dots-".concat(A)},D.createElement("rect",{x:d-ne/2,y:c-ne/2,width:p+ne,height:g+ne}))):null,!v&&this.renderCurve(S,A),this.renderErrorBar(S,A),(v||a)&&this.renderDots(S,X,A),(!y||h)&&Pi.renderCallByParent(this.props,l))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:i.curPoints}:n.points!==i.curPoints?{curPoints:n.points}:null}},{key:"repeat",value:function(n,i){for(var o=n.length%2!==0?[].concat(vl(n),[0]):n,a=[],l=0;l=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function fZ(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Sa(){return Sa=Object.assign?Object.assign.bind():function(e){for(var t=1;t0||!Da(f,a)||!Da(c,l))?this.renderAreaWithAnimation(n,i):this.renderAreaStatically(a,l,n,i)}},{key:"render",value:function(){var n,i=this.props,o=i.hide,a=i.dot,l=i.points,s=i.className,u=i.top,f=i.left,c=i.xAxis,d=i.yAxis,p=i.width,g=i.height,y=i.isAnimationActive,m=i.id;if(o||!l||!l.length)return null;var h=this.state.isAnimationFinished,v=l.length===1,x=st("recharts-area",s),P=c&&c.allowDataOverflow,w=d&&d.allowDataOverflow,S=P||w,A=Ge(m)?this.id:m,E=(n=Xe(a,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},R=E.r,K=R===void 0?3:R,H=E.strokeWidth,F=H===void 0?2:H,ae=Aj(a)?a:{},te=ae.clipDot,X=te===void 0?!0:te,ne=K*2+F;return D.createElement(mt,{className:x},P||w?D.createElement("defs",null,D.createElement("clipPath",{id:"clipPath-".concat(A)},D.createElement("rect",{x:P?f:f-p/2,y:w?u:u-g/2,width:P?p:p*2,height:w?g:g*2})),!X&&D.createElement("clipPath",{id:"clipPath-dots-".concat(A)},D.createElement("rect",{x:f-ne/2,y:u-ne/2,width:p+ne,height:g+ne}))):null,v?null:this.renderArea(S,A),(a||v)&&this.renderDots(S,X,A),(!y||h)&&Pi.renderCallByParent(this.props,l))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,curBaseLine:n.baseLine,prevPoints:i.curPoints,prevBaseLine:i.curBaseLine}:n.points!==i.curPoints||n.baseLine!==i.curBaseLine?{curPoints:n.points,curBaseLine:n.baseLine}:null}}])}(_.PureComponent);j$=qa;bi(qa,"displayName","Area");bi(qa,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!ea.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});bi(qa,"getBaseValue",function(e,t,r,n){var i=e.layout,o=e.baseValue,a=t.props.baseValue,l=a??o;if(Pe(l)&&typeof l=="number")return l;var s=i==="horizontal"?n:r,u=s.scale.domain();if(s.type==="number"){var f=Math.max(u[0],u[1]),c=Math.min(u[0],u[1]);return l==="dataMin"?c:l==="dataMax"||f<0?f:Math.max(Math.min(u[0],u[1]),0)}return l==="dataMin"?u[0]:l==="dataMax"?u[1]:u[0]});bi(qa,"getComposedData",function(e){var t=e.props,r=e.item,n=e.xAxis,i=e.yAxis,o=e.xAxisTicks,a=e.yAxisTicks,l=e.bandSize,s=e.dataKey,u=e.stackedData,f=e.dataStartIndex,c=e.displayedData,d=e.offset,p=t.layout,g=u&&u.length,y=j$.getBaseValue(t,r,n,i),m=p==="horizontal",h=!1,v=c.map(function(P,w){var S;g?S=u[f+w]:(S=dr(P,s),Array.isArray(S)?h=!0:S=[y,S]);var A=S[1]==null||g&&dr(P,s)==null;return m?{x:ns({axis:n,ticks:o,bandSize:l,entry:P,index:w}),y:A?null:i.scale(S[1]),value:S,payload:P}:{x:A?null:n.scale(S[1]),y:ns({axis:i,ticks:a,bandSize:l,entry:P,index:w}),value:S,payload:P}}),x;return g||h?x=v.map(function(P){var w=Array.isArray(P.value)?P.value[0]:null;return m?{x:P.x,y:w!=null&&P.y!=null?i.scale(w):null}:{x:w!=null?n.scale(w):null,y:P.y}}):x=m?i.scale(y):n.scale(y),Po({points:v,baseLine:x,layout:p,isRange:h},d)});bi(qa,"renderDotItem",function(e,t){var r;if(D.isValidElement(e))r=D.cloneElement(e,t);else if(Ze(e))r=e(t);else{var n=st("recharts-area-dot",typeof e!="boolean"?e.className:""),i=t.key,o=_$(t,cZ);r=D.createElement(Fh,Sa({},o,{key:i,className:n}))}return r});function hs(e){"@babel/helpers - typeof";return hs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hs(e)}function bZ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xZ(e,t){for(var r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function $Z(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function EZ(e){var t=e.option,r=e.isActive,n=TZ(e,_Z);return typeof t=="string"?_.createElement(nm,Hu({option:_.createElement(_h,Hu({type:t},n)),isActive:r,shapeType:"symbols"},n)):_.createElement(nm,Hu({option:t,isActive:r,shapeType:"symbols"},n))}function vs(e){"@babel/helpers - typeof";return vs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vs(e)}function Vu(){return Vu=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function AJ(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function jJ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _J(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r0?a:t&&t.length&&Pe(i)&&Pe(o)?t.slice(i,o+1):[]};function Y$(e){return e==="number"?[0,"auto"]:void 0}var _m=function(t,r,n,i){var o=t.graphicalItems,a=t.tooltipAxis,l=Xh(r,t);return n<0||!o||!o.length||n>=l.length?null:o.reduce(function(s,u){var f,c=(f=u.props.data)!==null&&f!==void 0?f:r;c&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(c=c.slice(t.dataStartIndex,t.dataEndIndex+1));var d;if(a.dataKey&&!a.allowDuplicatedCategory){var p=c===void 0?l:c;d=zd(p,a.dataKey,i)}else d=c&&c[n]||l[n];return d?[].concat(bs(s),[IT(u,d)]):s},[])},zP=function(t,r,n,i){var o=i||{x:t.chartX,y:t.chartY},a=BJ(o,n),l=t.orderedTooltipTicks,s=t.tooltipAxis,u=t.tooltipTicks,f=P9(a,l,u,s);if(f>=0&&u){var c=u[f]&&u[f].value,d=_m(t,r,f,c),p=FJ(n,l,f,o);return{activeTooltipIndex:f,activeLabel:c,activePayload:d,activeCoordinate:p}}return null},zJ=function(t,r){var n=r.axes,i=r.graphicalItems,o=r.axisType,a=r.axisIdKey,l=r.stackGroups,s=r.dataStartIndex,u=r.dataEndIndex,f=t.layout,c=t.children,d=t.stackOffset,p=CT(f,o);return n.reduce(function(g,y){var m,h=y.type.defaultProps!==void 0?oe(oe({},y.type.defaultProps),y.props):y.props,v=h.type,x=h.dataKey,P=h.allowDataOverflow,w=h.allowDuplicatedCategory,S=h.scale,A=h.ticks,E=h.includeHidden,R=h[a];if(g[R])return g;var K=Xh(t.data,{graphicalItems:i.filter(function(Se){var Ee,nt=a in Se.props?Se.props[a]:(Ee=Se.type.defaultProps)===null||Ee===void 0?void 0:Ee[a];return nt===R}),dataStartIndex:s,dataEndIndex:u}),H=K.length,F,ae,te;pJ(h.domain,P,v)&&(F=zg(h.domain,null,P),p&&(v==="number"||S!=="auto")&&(te=zu(K,x,"category")));var X=Y$(v);if(!F||F.length===0){var ne,ce=(ne=h.domain)!==null&&ne!==void 0?ne:X;if(x){if(F=zu(K,x,v),v==="category"&&p){var Q=cD(F);w&&Q?(ae=F,F=_p(0,H)):w||(F=mS(ce,F,y).reduce(function(Se,Ee){return Se.indexOf(Ee)>=0?Se:[].concat(bs(Se),[Ee])},[]))}else if(v==="category")w?F=F.filter(function(Se){return Se!==""&&!Ge(Se)}):F=mS(ce,F,y).reduce(function(Se,Ee){return Se.indexOf(Ee)>=0||Ee===""||Ge(Ee)?Se:[].concat(bs(Se),[Ee])},[]);else if(v==="number"){var ie=T9(K,i.filter(function(Se){var Ee,nt,it=a in Se.props?Se.props[a]:(Ee=Se.type.defaultProps)===null||Ee===void 0?void 0:Ee[a],Ot="hide"in Se.props?Se.props.hide:(nt=Se.type.defaultProps)===null||nt===void 0?void 0:nt.hide;return it===R&&(E||!Ot)}),x,o,f);ie&&(F=ie)}p&&(v==="number"||S!=="auto")&&(te=zu(K,x,"category"))}else p?F=_p(0,H):l&&l[R]&&l[R].hasStack&&v==="number"?F=d==="expand"?[0,1]:kT(l[R].stackGroups,s,u):F=ET(K,i.filter(function(Se){var Ee=a in Se.props?Se.props[a]:Se.type.defaultProps[a],nt="hide"in Se.props?Se.props.hide:Se.type.defaultProps.hide;return Ee===R&&(E||!nt)}),v,f,!0);if(v==="number")F=Om(c,F,R,o,A),ce&&(F=zg(ce,F,P));else if(v==="category"&&ce){var fe=ce,le=F.every(function(Se){return fe.indexOf(Se)>=0});le&&(F=fe)}}return oe(oe({},g),{},Ue({},R,oe(oe({},h),{},{axisType:o,domain:F,categoricalDomain:te,duplicateDomain:ae,originalDomain:(m=h.domain)!==null&&m!==void 0?m:X,isCategorical:p,layout:f})))},{})},WJ=function(t,r){var n=r.graphicalItems,i=r.Axis,o=r.axisType,a=r.axisIdKey,l=r.stackGroups,s=r.dataStartIndex,u=r.dataEndIndex,f=t.layout,c=t.children,d=Xh(t.data,{graphicalItems:n,dataStartIndex:s,dataEndIndex:u}),p=d.length,g=CT(f,o),y=-1;return n.reduce(function(m,h){var v=h.type.defaultProps!==void 0?oe(oe({},h.type.defaultProps),h.props):h.props,x=v[a],P=Y$("number");if(!m[x]){y++;var w;return g?w=_p(0,p):l&&l[x]&&l[x].hasStack?(w=kT(l[x].stackGroups,s,u),w=Om(c,w,x,o)):(w=zg(P,ET(d,n.filter(function(S){var A,E,R=a in S.props?S.props[a]:(A=S.type.defaultProps)===null||A===void 0?void 0:A[a],K="hide"in S.props?S.props.hide:(E=S.type.defaultProps)===null||E===void 0?void 0:E.hide;return R===x&&!K}),"number",f),i.defaultProps.allowDataOverflow),w=Om(c,w,x,o)),oe(oe({},m),{},Ue({},x,oe(oe({axisType:o},i.defaultProps),{},{hide:!0,orientation:kn(NJ,"".concat(o,".").concat(y%2),null),domain:w,originalDomain:P,isCategorical:g,layout:f})))}return m},{})},UJ=function(t,r){var n=r.axisType,i=n===void 0?"xAxis":n,o=r.AxisComp,a=r.graphicalItems,l=r.stackGroups,s=r.dataStartIndex,u=r.dataEndIndex,f=t.children,c="".concat(i,"Id"),d=Jr(f,o),p={};return d&&d.length?p=zJ(t,{axes:d,graphicalItems:a,axisType:i,axisIdKey:c,stackGroups:l,dataStartIndex:s,dataEndIndex:u}):a&&a.length&&(p=WJ(t,{Axis:o,graphicalItems:a,axisType:i,axisIdKey:c,stackGroups:l,dataStartIndex:s,dataEndIndex:u})),p},HJ=function(t){var r=$o(t),n=zi(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:K0(n,function(i){return i.coordinate}),tooltipAxis:r,tooltipAxisBandSize:gp(r,n)}},WP=function(t){var r=t.children,n=t.defaultShowTooltip,i=cn(r,as),o=0,a=0;return t.data&&t.data.length!==0&&(a=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(o=i.props.startIndex),i.props.endIndex>=0&&(a=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:o,dataEndIndex:a,activeTooltipIndex:-1,isTooltipActive:!!n}},VJ=function(t){return!t||!t.length?!1:t.some(function(r){var n=Ui(r&&r.type);return n&&n.indexOf("Bar")>=0})},UP=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},KJ=function(t,r){var n=t.props,i=t.graphicalItems,o=t.xAxisMap,a=o===void 0?{}:o,l=t.yAxisMap,s=l===void 0?{}:l,u=n.width,f=n.height,c=n.children,d=n.margin||{},p=cn(c,as),g=cn(c,Ho),y=Object.keys(s).reduce(function(w,S){var A=s[S],E=A.orientation;return!A.mirror&&!A.hide?oe(oe({},w),{},Ue({},E,w[E]+A.width)):w},{left:d.left||0,right:d.right||0}),m=Object.keys(a).reduce(function(w,S){var A=a[S],E=A.orientation;return!A.mirror&&!A.hide?oe(oe({},w),{},Ue({},E,kn(w,"".concat(E))+A.height)):w},{top:d.top||0,bottom:d.bottom||0}),h=oe(oe({},m),y),v=h.bottom;p&&(h.bottom+=p.props.height||as.defaultProps.height),g&&r&&(h=j9(h,i,n,r));var x=u-h.left-h.right,P=f-h.top-h.bottom;return oe(oe({brushBottom:v},h),{},{width:Math.max(x,0),height:Math.max(P,0)})},GJ=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},q$=function(t){var r=t.chartName,n=t.GraphicalChild,i=t.defaultTooltipEventType,o=i===void 0?"axis":i,a=t.validateTooltipEventTypes,l=a===void 0?["axis"]:a,s=t.axisComponents,u=t.legendContent,f=t.formatAxisMap,c=t.defaultProps,d=function(h,v){var x=v.graphicalItems,P=v.stackGroups,w=v.offset,S=v.updateId,A=v.dataStartIndex,E=v.dataEndIndex,R=h.barSize,K=h.layout,H=h.barGap,F=h.barCategoryGap,ae=h.maxBarSize,te=UP(K),X=te.numericAxisName,ne=te.cateAxisName,ce=VJ(x),Q=[];return x.forEach(function(ie,fe){var le=Xh(h.data,{graphicalItems:[ie],dataStartIndex:A,dataEndIndex:E}),Se=ie.type.defaultProps!==void 0?oe(oe({},ie.type.defaultProps),ie.props):ie.props,Ee=Se.dataKey,nt=Se.maxBarSize,it=Se["".concat(X,"Id")],Ot=Se["".concat(ne,"Id")],dt={},Zt=s.reduce(function(xt,Ce){var We=v["".concat(Ce.axisType,"Map")],Rt=Se["".concat(Ce.axisType,"Id")];We&&We[Rt]||Ce.axisType==="zAxis"||La();var He=We[Rt];return oe(oe({},xt),{},Ue(Ue({},Ce.axisType,He),"".concat(Ce.axisType,"Ticks"),zi(He)))},dt),Te=Zt[ne],Ke=Zt["".concat(ne,"Ticks")],pe=P&&P[it]&&P[it].hasStack&&F9(ie,P[it].stackGroups),q=Ui(ie.type).indexOf("Bar")>=0,U=gp(Te,Ke),Ae=[],je=ce&&O9({barSize:R,stackGroups:P,totalSize:GJ(Zt,ne)});if(q){var Fe,Ie,se=Ge(nt)?ae:nt,$t=(Fe=(Ie=gp(Te,Ke,!0))!==null&&Ie!==void 0?Ie:se)!==null&&Fe!==void 0?Fe:0;Ae=A9({barGap:H,barCategoryGap:F,bandSize:$t!==U?$t:U,sizeList:je[Ot],maxBarSize:se}),$t!==U&&(Ae=Ae.map(function(xt){return oe(oe({},xt),{},{position:oe(oe({},xt.position),{},{offset:xt.position.offset-$t/2})})}))}var _e=ie&&ie.type&&ie.type.getComposedData;_e&&Q.push({props:oe(oe({},_e(oe(oe({},Zt),{},{displayedData:le,props:h,dataKey:Ee,item:ie,bandSize:U,barPosition:Ae,offset:w,stackedData:pe,layout:K,dataStartIndex:A,dataEndIndex:E}))),{},Ue(Ue(Ue({key:ie.key||"item-".concat(fe)},X,Zt[X]),ne,Zt[ne]),"animationId",S)),childIndex:PD(ie,h.children),item:ie})}),Q},p=function(h,v){var x=h.props,P=h.dataStartIndex,w=h.dataEndIndex,S=h.updateId;if(!dw({props:x}))return null;var A=x.children,E=x.layout,R=x.stackOffset,K=x.data,H=x.reverseStackOrder,F=UP(E),ae=F.numericAxisName,te=F.cateAxisName,X=Jr(A,n),ne=N9(K,X,"".concat(ae,"Id"),"".concat(te,"Id"),R,H),ce=s.reduce(function(Se,Ee){var nt="".concat(Ee.axisType,"Map");return oe(oe({},Se),{},Ue({},nt,UJ(x,oe(oe({},Ee),{},{graphicalItems:X,stackGroups:Ee.axisType===ae&&ne,dataStartIndex:P,dataEndIndex:w}))))},{}),Q=KJ(oe(oe({},ce),{},{props:x,graphicalItems:X}),v==null?void 0:v.legendBBox);Object.keys(ce).forEach(function(Se){ce[Se]=f(x,ce[Se],Q,Se.replace("Map",""),r)});var ie=ce["".concat(te,"Map")],fe=HJ(ie),le=d(x,oe(oe({},ce),{},{dataStartIndex:P,dataEndIndex:w,updateId:S,graphicalItems:X,stackGroups:ne,offset:Q}));return oe(oe({formattedGraphicalItems:le,graphicalItems:X,offset:Q,stackGroups:ne},fe),ce)},g=function(m){function h(v){var x,P,w;return jJ(this,h),w=$J(this,h,[v]),Ue(w,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Ue(w,"accessibilityManager",new dJ),Ue(w,"handleLegendBBoxUpdate",function(S){if(S){var A=w.state,E=A.dataStartIndex,R=A.dataEndIndex,K=A.updateId;w.setState(oe({legendBBox:S},p({props:w.props,dataStartIndex:E,dataEndIndex:R,updateId:K},oe(oe({},w.state),{},{legendBBox:S}))))}}),Ue(w,"handleReceiveSyncEvent",function(S,A,E){if(w.props.syncId===S){if(E===w.eventEmitterSymbol&&typeof w.props.syncMethod!="function")return;w.applySyncEvent(A)}}),Ue(w,"handleBrushChange",function(S){var A=S.startIndex,E=S.endIndex;if(A!==w.state.dataStartIndex||E!==w.state.dataEndIndex){var R=w.state.updateId;w.setState(function(){return oe({dataStartIndex:A,dataEndIndex:E},p({props:w.props,dataStartIndex:A,dataEndIndex:E,updateId:R},w.state))}),w.triggerSyncEvent({dataStartIndex:A,dataEndIndex:E})}}),Ue(w,"handleMouseEnter",function(S){var A=w.getMouseInfo(S);if(A){var E=oe(oe({},A),{},{isTooltipActive:!0});w.setState(E),w.triggerSyncEvent(E);var R=w.props.onMouseEnter;Ze(R)&&R(E,S)}}),Ue(w,"triggeredAfterMouseMove",function(S){var A=w.getMouseInfo(S),E=A?oe(oe({},A),{},{isTooltipActive:!0}):{isTooltipActive:!1};w.setState(E),w.triggerSyncEvent(E);var R=w.props.onMouseMove;Ze(R)&&R(E,S)}),Ue(w,"handleItemMouseEnter",function(S){w.setState(function(){return{isTooltipActive:!0,activeItem:S,activePayload:S.tooltipPayload,activeCoordinate:S.tooltipPosition||{x:S.cx,y:S.cy}}})}),Ue(w,"handleItemMouseLeave",function(){w.setState(function(){return{isTooltipActive:!1}})}),Ue(w,"handleMouseMove",function(S){S.persist(),w.throttleTriggeredAfterMouseMove(S)}),Ue(w,"handleMouseLeave",function(S){w.throttleTriggeredAfterMouseMove.cancel();var A={isTooltipActive:!1};w.setState(A),w.triggerSyncEvent(A);var E=w.props.onMouseLeave;Ze(E)&&E(A,S)}),Ue(w,"handleOuterEvent",function(S){var A=SD(S),E=kn(w.props,"".concat(A));if(A&&Ze(E)){var R,K;/.*touch.*/i.test(A)?K=w.getMouseInfo(S.changedTouches[0]):K=w.getMouseInfo(S),E((R=K)!==null&&R!==void 0?R:{},S)}}),Ue(w,"handleClick",function(S){var A=w.getMouseInfo(S);if(A){var E=oe(oe({},A),{},{isTooltipActive:!0});w.setState(E),w.triggerSyncEvent(E);var R=w.props.onClick;Ze(R)&&R(E,S)}}),Ue(w,"handleMouseDown",function(S){var A=w.props.onMouseDown;if(Ze(A)){var E=w.getMouseInfo(S);A(E,S)}}),Ue(w,"handleMouseUp",function(S){var A=w.props.onMouseUp;if(Ze(A)){var E=w.getMouseInfo(S);A(E,S)}}),Ue(w,"handleTouchMove",function(S){S.changedTouches!=null&&S.changedTouches.length>0&&w.throttleTriggeredAfterMouseMove(S.changedTouches[0])}),Ue(w,"handleTouchStart",function(S){S.changedTouches!=null&&S.changedTouches.length>0&&w.handleMouseDown(S.changedTouches[0])}),Ue(w,"handleTouchEnd",function(S){S.changedTouches!=null&&S.changedTouches.length>0&&w.handleMouseUp(S.changedTouches[0])}),Ue(w,"handleDoubleClick",function(S){var A=w.props.onDoubleClick;if(Ze(A)){var E=w.getMouseInfo(S);A(E,S)}}),Ue(w,"handleContextMenu",function(S){var A=w.props.onContextMenu;if(Ze(A)){var E=w.getMouseInfo(S);A(E,S)}}),Ue(w,"triggerSyncEvent",function(S){w.props.syncId!==void 0&&ty.emit(ry,w.props.syncId,S,w.eventEmitterSymbol)}),Ue(w,"applySyncEvent",function(S){var A=w.props,E=A.layout,R=A.syncMethod,K=w.state.updateId,H=S.dataStartIndex,F=S.dataEndIndex;if(S.dataStartIndex!==void 0||S.dataEndIndex!==void 0)w.setState(oe({dataStartIndex:H,dataEndIndex:F},p({props:w.props,dataStartIndex:H,dataEndIndex:F,updateId:K},w.state)));else if(S.activeTooltipIndex!==void 0){var ae=S.chartX,te=S.chartY,X=S.activeTooltipIndex,ne=w.state,ce=ne.offset,Q=ne.tooltipTicks;if(!ce)return;if(typeof R=="function")X=R(Q,S);else if(R==="value"){X=-1;for(var ie=0;ie=0){var pe,q;if(ae.dataKey&&!ae.allowDuplicatedCategory){var U=typeof ae.dataKey=="function"?Ke:"payload.".concat(ae.dataKey.toString());pe=zd(ie,U,X),q=fe&&le&&zd(le,U,X)}else pe=ie==null?void 0:ie[te],q=fe&&le&&le[te];if(Ot||it){var Ae=S.props.activeIndex!==void 0?S.props.activeIndex:te;return[_.cloneElement(S,oe(oe(oe({},R.props),Zt),{},{activeIndex:Ae})),null,null]}if(!Ge(pe))return[Te].concat(bs(w.renderActivePoints({item:R,activePoint:pe,basePoint:q,childIndex:te,isRange:fe})))}else{var je,Fe=(je=w.getItemByXY(w.state.activeCoordinate))!==null&&je!==void 0?je:{graphicalItem:Te},Ie=Fe.graphicalItem,se=Ie.item,$t=se===void 0?S:se,_e=Ie.childIndex,xt=oe(oe(oe({},R.props),Zt),{},{activeIndex:_e});return[_.cloneElement($t,xt),null,null]}return fe?[Te,null,null]:[Te,null]}),Ue(w,"renderCustomized",function(S,A,E){return _.cloneElement(S,oe(oe({key:"recharts-customized-".concat(E)},w.props),w.state))}),Ue(w,"renderMap",{CartesianGrid:{handler:rd,once:!0},ReferenceArea:{handler:w.renderReferenceElement},ReferenceLine:{handler:rd},ReferenceDot:{handler:w.renderReferenceElement},XAxis:{handler:rd},YAxis:{handler:rd},Brush:{handler:w.renderBrush,once:!0},Bar:{handler:w.renderGraphicChild},Line:{handler:w.renderGraphicChild},Area:{handler:w.renderGraphicChild},Radar:{handler:w.renderGraphicChild},RadialBar:{handler:w.renderGraphicChild},Scatter:{handler:w.renderGraphicChild},Pie:{handler:w.renderGraphicChild},Funnel:{handler:w.renderGraphicChild},Tooltip:{handler:w.renderCursor,once:!0},PolarGrid:{handler:w.renderPolarGrid,once:!0},PolarAngleAxis:{handler:w.renderPolarAxis},PolarRadiusAxis:{handler:w.renderPolarAxis},Customized:{handler:w.renderCustomized}}),w.clipPathId="".concat((x=v.id)!==null&&x!==void 0?x:Ua("recharts"),"-clip"),w.throttleTriggeredAfterMouseMove=T_(w.triggeredAfterMouseMove,(P=v.throttleDelay)!==null&&P!==void 0?P:1e3/60),w.state={},w}return MJ(h,m),TJ(h,[{key:"componentDidMount",value:function(){var x,P;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(x=this.props.margin.left)!==null&&x!==void 0?x:0,top:(P=this.props.margin.top)!==null&&P!==void 0?P:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var x=this.props,P=x.children,w=x.data,S=x.height,A=x.layout,E=cn(P,Jn);if(E){var R=E.props.defaultIndex;if(!(typeof R!="number"||R<0||R>this.state.tooltipTicks.length-1)){var K=this.state.tooltipTicks[R]&&this.state.tooltipTicks[R].value,H=_m(this.state,w,R,K),F=this.state.tooltipTicks[R].coordinate,ae=(this.state.offset.top+S)/2,te=A==="horizontal",X=te?{x:F,y:ae}:{y:F,x:ae},ne=this.state.formattedGraphicalItems.find(function(Q){var ie=Q.item;return ie.type.name==="Scatter"});ne&&(X=oe(oe({},X),ne.props.points[R].tooltipPosition),H=ne.props.points[R].tooltipPayload);var ce={activeTooltipIndex:R,isTooltipActive:!0,activeLabel:K,activePayload:H,activeCoordinate:X};this.setState(ce),this.renderCursor(E),this.accessibilityManager.setIndex(R)}}}},{key:"getSnapshotBeforeUpdate",value:function(x,P){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==P.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==x.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==x.margin){var w,S;this.accessibilityManager.setDetails({offset:{left:(w=this.props.margin.left)!==null&&w!==void 0?w:0,top:(S=this.props.margin.top)!==null&&S!==void 0?S:0}})}return null}},{key:"componentDidUpdate",value:function(x){rg([cn(x.children,Jn)],[cn(this.props.children,Jn)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var x=cn(this.props.children,Jn);if(x&&typeof x.props.shared=="boolean"){var P=x.props.shared?"axis":"item";return l.indexOf(P)>=0?P:o}return o}},{key:"getMouseInfo",value:function(x){if(!this.container)return null;var P=this.container,w=P.getBoundingClientRect(),S=qW(w),A={chartX:Math.round(x.pageX-S.left),chartY:Math.round(x.pageY-S.top)},E=w.width/P.offsetWidth||1,R=this.inRange(A.chartX,A.chartY,E);if(!R)return null;var K=this.state,H=K.xAxisMap,F=K.yAxisMap,ae=this.getTooltipEventType(),te=zP(this.state,this.props.data,this.props.layout,R);if(ae!=="axis"&&H&&F){var X=$o(H).scale,ne=$o(F).scale,ce=X&&X.invert?X.invert(A.chartX):null,Q=ne&&ne.invert?ne.invert(A.chartY):null;return oe(oe({},A),{},{xValue:ce,yValue:Q},te)}return te?oe(oe({},A),te):null}},{key:"inRange",value:function(x,P){var w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,S=this.props.layout,A=x/w,E=P/w;if(S==="horizontal"||S==="vertical"){var R=this.state.offset,K=A>=R.left&&A<=R.left+R.width&&E>=R.top&&E<=R.top+R.height;return K?{x:A,y:E}:null}var H=this.state,F=H.angleAxisMap,ae=H.radiusAxisMap;if(F&&ae){var te=$o(F);return wS({x:A,y:E},te)}return null}},{key:"parseEventsOfWrapper",value:function(){var x=this.props.children,P=this.getTooltipEventType(),w=cn(x,Jn),S={};w&&P==="axis"&&(w.props.trigger==="click"?S={onClick:this.handleClick}:S={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var A=Wd(this.props,this.handleOuterEvent);return oe(oe({},A),S)}},{key:"addListener",value:function(){ty.on(ry,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){ty.removeListener(ry,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(x,P,w){for(var S=this.state.formattedGraphicalItems,A=0,E=S.length;Ae==null?"":e>=1e6?`$${(e/1e6).toFixed(1)}M`:e>=1e3?`$${(e/1e3).toFixed(0)}K`:`$${e}`,iy=e=>e==null?"":`$${e==null?void 0:e.toLocaleString()}`,ki=e=>e==null?"":`${e}%`;function ft(e){const t=new Date(e+"T00:00:00");return`${t.getMonth()+1}/${t.getDate()}`}function at(e,t=!1){const n=new Date(e+"-01T00:00:00").toLocaleString("en",{month:"short"});return t?n+" (MTD)":n}function rt(e,t,r){const n=[...e].sort(),i=new Date,o=i.toISOString().split("T")[0];if(t==="mtd"){const l=new Date(i.getFullYear(),i.getMonth(),1),s=new Date(l);s.setDate(s.getDate()-6);const u=s.toISOString().split("T")[0],f=n.filter(c=>c>=u&&c<=o);return{periods:f,isMonthly:!1,weekSet:new Set(f),formatLabel:ft}}if(t==="qtd"){const l=Math.floor(i.getMonth()/3)*3,s=new Date(i.getFullYear(),l,1),u=new Date(s);u.setDate(u.getDate()-6);const f=u.toISOString().split("T")[0],c=n.filter(d=>d>=f&&d<=o);return{periods:c,isMonthly:!1,weekSet:new Set(c),formatLabel:ft}}if(t==="ytd"){const l=i.getFullYear(),s=`${l}-${String(i.getMonth()+1).padStart(2,"0")}`,u=[...new Set(n.map(f=>f.substring(0,7)))].filter(f=>f>=`${l}-01`&&f<=s).sort();return{periods:u,isMonthly:!0,weekSet:new Set(n.filter(f=>u.includes(f.substring(0,7)))),formatLabel:f=>{const c=f.substring(0,7);return at(c,c===s)}}}if(t==="monthly"){const s=[...new Set(n.map(f=>f.substring(0,7)))].sort().slice(-r),u=`${i.getFullYear()}-${String(i.getMonth()+1).padStart(2,"0")}`;return{periods:s,isMonthly:!0,weekSet:new Set(n.filter(f=>s.includes(f.substring(0,7)))),formatLabel:f=>{const c=f.substring(0,7);return at(c,c===u)}}}const a=n.slice(-r);return{periods:a,isMonthly:!1,weekSet:new Set(a),formatLabel:ft}}function XJ(e,t){const r=[...new Set(t.map(i=>i.c))],n={};for(const i of r)if(i)for(const o of e){const l=o.name.replace(/^(Avelure-|Ever\/Body-|Blush - |Back to 30 - )/,"").split(/[\s-]+/)[0];if(l&&l.length>2&&i.includes(l))if(!n[i])n[i]=o.name;else{const s=HP(n[i],i);HP(o.name,i)>s&&(n[i]=o.name)}}return n}function HP(e,t){return e.split(/[\s\-]+/).filter(n=>n.length>2).filter(n=>t.includes(n)).length}function qe({label:e,options:t,selected:r,onChange:n,minWidth:i=200}){const[o,a]=_.useState(!1),l=_.useRef(null);_.useEffect(()=>{const f=c=>{l.current&&!l.current.contains(c.target)&&a(!1)};return document.addEventListener("mousedown",f),()=>document.removeEventListener("mousedown",f)},[]);const s=f=>{n(r.includes(f)?r.filter(c=>c!==f):[...r,f])},u=r.length===0?`All ${e}s`:r.length===1?r[0]:`${r.length} selected`;return b.jsxs("div",{ref:l,style:{position:"relative"},children:[b.jsxs("div",{onClick:()=>a(!o),style:{padding:"4px 26px 4px 8px",border:`1px solid ${T.taupe}`,borderRadius:4,fontSize:10,fontFamily:ge.body,color:r.length?T.navy:T.gray,background:T.cream,minWidth:i,cursor:"pointer",userSelect:"none",position:"relative",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:[u,b.jsx("span",{style:{position:"absolute",right:6,top:"50%",transform:"translateY(-50%)",fontSize:8,color:T.gray,pointerEvents:"none"},children:"▼"})]}),o&&b.jsxs("div",{style:{position:"absolute",top:"100%",right:0,zIndex:1e3,marginTop:4,minWidth:220,maxHeight:320,overflowY:"auto",background:T.white,border:`1.5px solid ${T.taupe}`,borderRadius:8,boxShadow:"0 4px 16px rgba(4,30,66,0.12)",padding:"6px 0"},children:[b.jsxs("div",{style:{display:"flex",justifyContent:"space-between",padding:"4px 12px 8px",borderBottom:`1px solid ${T.light}`,marginBottom:4},children:[b.jsx("button",{onClick:f=>{f.stopPropagation(),n([...t])},style:{background:"none",border:"none",color:T.gold,fontSize:11,fontFamily:ge.body,fontWeight:600,cursor:"pointer",padding:0},children:"Select All"}),b.jsx("button",{onClick:f=>{f.stopPropagation(),n([])},style:{background:"none",border:"none",color:T.gray,fontSize:11,fontFamily:ge.body,fontWeight:600,cursor:"pointer",padding:0},children:"Clear All"})]}),t.map(f=>b.jsxs("div",{onClick:c=>{c.stopPropagation(),s(f)},style:{display:"flex",alignItems:"center",gap:8,padding:"4px 10px",cursor:"pointer",fontSize:10,fontFamily:ge.body,color:T.dark,background:r.includes(f)?T.light:"transparent"},onMouseEnter:c=>{r.includes(f)||(c.currentTarget.style.background=T.cream)},onMouseLeave:c=>{c.currentTarget.style.background=r.includes(f)?T.light:"transparent"},children:[b.jsx("span",{style:{width:14,height:14,borderRadius:3,border:`1.5px solid ${r.includes(f)?T.gold:T.taupe}`,background:r.includes(f)?T.gold:T.white,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,transition:"all 0.15s"},children:r.includes(f)&&b.jsx("span",{style:{color:T.white,fontSize:11,fontWeight:700,lineHeight:1},children:"✓"})}),f]},f))]})]})}function Ou({number:e,title:t}){return b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:16,margin:"48px 0 24px",paddingBottom:12,borderBottom:`2px solid ${T.gold}`},children:[b.jsx("div",{style:{width:44,height:44,borderRadius:8,background:T.navy,display:"flex",alignItems:"center",justifyContent:"center",fontFamily:ge.heading,fontSize:22,color:T.gold},children:e}),b.jsx("h2",{style:{fontFamily:ge.heading,fontSize:24,fontWeight:400,color:T.navy,margin:0},children:t})]})}function QJ({children:e}){return b.jsx("div",{style:{fontSize:10,fontWeight:700,color:T.gold,letterSpacing:1.5,textTransform:"uppercase",fontFamily:ge.body,marginBottom:4},children:e})}function jt({title:e,tooltip:t,children:r,width:n="100%",height:i,headerRight:o}){return b.jsxs("div",{style:{background:T.white,borderRadius:10,border:`1px solid ${T.taupe}`,padding:"14px 16px",width:n,boxSizing:"border-box",minHeight:i||"auto"},children:[b.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:10,gap:8},children:[b.jsx("h3",{style:{fontFamily:ge.heading,fontSize:16,fontWeight:400,color:T.navy,margin:0,flexShrink:0},children:e}),b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[o,t&&b.jsx("span",{style:{fontSize:11,color:T.gray,fontFamily:ge.body,cursor:"help"},title:t,children:"ⓘ"})]})]}),r]})}function X$(e){if(!e)return T.cream;const t=e.replace("#","");if(t.length<6)return T.cream;const r=parseInt(t.substring(0,2),16),n=parseInt(t.substring(2,4),16),i=parseInt(t.substring(4,6),16);return(r*299+n*587+i*114)/1e3<100?`rgb(${Math.min(r+160,255)}, ${Math.min(n+160,255)}, ${Math.min(i+160,255)})`:e}function Dt({data:e,series:t,height:r=320,formatter:n=An,rightAxisFormatter:i,yLabel:o,note:a,colorMap:l,rightAxisSeries:s=[]}){const u=new Set(s),f=s.length>0,c=i||n,d=({active:p,payload:g,label:y})=>!p||!g?null:b.jsxs("div",{style:{background:T.navy,border:"none",borderRadius:6,padding:"8px 12px",fontFamily:ge.body,fontSize:12},children:[b.jsx("div",{style:{color:T.gold,fontWeight:600,marginBottom:4},children:y}),g.map((m,h)=>{const v=u.has(m.name)?c(m.value):n(m.value),x=m.color||m.stroke||T.cream;return b.jsxs("div",{style:{display:"flex",justifyContent:"space-between",gap:16,padding:"1px 0"},children:[b.jsx("span",{style:{color:X$(x)},children:m.name}),b.jsx("span",{style:{color:T.cream,fontWeight:600},children:v})]},h)})]});return b.jsxs("div",{children:[b.jsx($_,{width:"100%",height:r,children:b.jsxs(YJ,{data:e,margin:{top:8,right:f?48:12,left:0,bottom:0},children:[b.jsx(Eb,{strokeDasharray:"3 3",stroke:T.taupe}),b.jsx(Ns,{dataKey:"week",tick:{fontSize:11,fontFamily:ge.body,fill:T.gray}}),b.jsx(Yo,{yAxisId:"left",tick:{fontSize:11,fontFamily:ge.body,fill:T.gray},tickFormatter:n}),f&&b.jsx(Yo,{yAxisId:"right",orientation:"right",tick:{fontSize:10,fontFamily:ge.body,fill:T.goldMuted},tickFormatter:c,stroke:T.goldLight}),b.jsx(Jn,{content:d}),b.jsx(Ho,{wrapperStyle:{fontFamily:ge.body,fontSize:11},iconType:"line"}),t.map((p,g)=>b.jsx(Ya,{type:"monotone",dataKey:p,yAxisId:u.has(p)?"right":"left",stroke:l&&l[p]||_n[g%_n.length],strokeWidth:u.has(p)?1.5:2,strokeDasharray:u.has(p)?"6 3":"",dot:{r:u.has(p)?2.5:3},activeDot:{r:5},connectNulls:!0},p))]})}),a&&b.jsx("div",{style:{fontSize:10,color:T.gray,fontFamily:ge.body,marginTop:4,textAlign:"right"},children:a})]})}function ZJ({data:e,compact:t=!1}){const r=["Inject.","Body","Laser","Facials","Retail","Other"],n=["injectables","body","laser","facials","retail","other"],i=t?`100px repeat(${r.length}, 1fr)`:`180px repeat(${r.length}, 1fr)`,o=t?"6px 10px":"10px 14px",a=t?10:12,l=t?8:9;return b.jsxs("div",{style:{borderRadius:8,overflow:"hidden",border:`1px solid ${T.taupe}`},children:[b.jsxs("div",{style:{display:"grid",gridTemplateColumns:i,background:T.navy,padding:o},children:[b.jsx("div",{style:{fontSize:l,fontWeight:600,color:T.blush,letterSpacing:1.5,textTransform:"uppercase",fontFamily:ge.body},children:"Location"}),r.map(s=>b.jsx("div",{style:{fontSize:l,fontWeight:600,color:T.blush,letterSpacing:1,textTransform:"uppercase",fontFamily:ge.body,textAlign:"right"},children:s},s))]}),e.map((s,u)=>b.jsxs("div",{style:{display:"grid",gridTemplateColumns:i,padding:o,background:u%2===0?T.cream:T.white,borderTop:`1px solid ${T.taupe}`},children:[b.jsx("div",{style:{fontFamily:ge.body,fontSize:a,fontWeight:600,color:T.navy,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:s.name}),n.map(f=>b.jsxs("div",{style:{fontFamily:ge.body,fontSize:a,color:T.dark,textAlign:"right"},children:[s[f],"%"]},f))]},u))]})}function JJ({title:e,message:t}){return b.jsxs("div",{style:{padding:"20px 24px",background:T.white,borderRadius:10,border:`1px solid ${T.taupe}`,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[b.jsx("div",{style:{fontFamily:ge.heading,fontSize:16,color:T.navy,marginBottom:8},children:e}),b.jsx("div",{style:{fontSize:12,color:T.gray,fontFamily:ge.body},children:t})]})}function Mt({chartId:e,globalMode:t,globalCount:r,overrides:n,setOverrides:i}){const o=n[e],a=(o==null?void 0:o.mode)||t,l=(o==null?void 0:o.count)||r,s=!!o,u=g=>{const y=g.target.value;i(m=>({...m,[e]:{mode:y,count:l}}))},f=g=>{const y=Number(g.target.value);i(m=>({...m,[e]:{mode:a,count:y}}))},c=()=>{i(g=>{const y={...g};return delete y[e],y})},d={padding:"3px 6px",fontSize:10,fontFamily:ge.body,border:`1px solid ${s?T.gold:T.taupe}`,borderRadius:4,background:s?"rgba(185,151,91,0.08)":T.cream,color:T.navy,cursor:"pointer",minWidth:65},p=["mtd","qtd","ytd"].includes(a);return b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4},children:[b.jsxs("select",{value:a,onChange:u,style:d,children:[b.jsx("option",{value:"weekly",children:"Weekly"}),b.jsx("option",{value:"monthly",children:"Monthly"}),b.jsx("option",{value:"mtd",children:"MTD"}),b.jsx("option",{value:"qtd",children:"QTD"}),b.jsx("option",{value:"ytd",children:"YTD"})]}),!p&&b.jsx("select",{value:l,onChange:f,style:{...d,minWidth:40},children:[1,2,3,4,5,6,7,8,9,10,11,12].map(g=>b.jsx("option",{value:g,children:g},g))}),s&&b.jsx("button",{onClick:c,style:{background:"none",border:"none",color:T.gold,fontSize:10,cursor:"pointer",fontFamily:ge.body,textDecoration:"underline",padding:0},children:"Reset"})]})}function eee({location:e,locations:t,metrics:r,dailyMetrics:n,opsData:i,btxData:o,syringeLocData:a,utilizationData:l,providerHoursData:s,injRevProviderData:u,btxProviderData:f,syringeProvData:c,revCollProvData:d,budgetData:p,metricsProviderData:g,opsProviderData:y,utilHoursProviderData:m}){const[h,v]=_.useState({kpi:!1,efficiency:!1,providers:!1,recommendations:!1}),x=U=>v(Ae=>({...Ae,[U]:!Ae[U]})),[P,w]=_.useState("MTD"),[S,A]=_.useState(null),[E,R]=_.useState(!1),K=_.useRef(null),[H,F]=_.useState(null),[ae,te]=_.useState(!1),X=_.useRef(null),[ne,ce]=_.useState(null),[Q,ie]=_.useState(!1),fe=_.useRef(null),le=_.useMemo(()=>{var zt;if(!e||!t.length||!r.length)return null;const U=t.find(L=>L.name===e),Ae=((zt=U==null?void 0:U.types)==null?void 0:zt[0])||"",je=t.filter(L=>{var Y;return(Y=L.types)==null?void 0:Y.includes(Ae)}).map(L=>L.name),Fe=[...new Set(r.map(L=>L.w))].sort(),Ie=new Date,se=Ie.getFullYear(),$t=Ie.getMonth(),_e=L=>new Date(L+"T00:00:00").toLocaleDateString("en-US",{month:"short",day:"numeric"});let xt,Ce;const We=Ie.toISOString().slice(0,10),Rt=(L,Y,$e)=>{const Me=new Date(L+"T00:00:00"),Ve=new Date(Me);return Ve.setDate(Ve.getDate()+6),Ve>=Y&&Me<=$e};if(P==="YESTERDAY"){const L=new Date(Ie);L.setDate(L.getDate()-1),xt=Fe.filter(Y=>Rt(Y,L,L)),Ce=L.toLocaleDateString("en-US",{weekday:"short",month:"short",day:"numeric",year:"numeric"})}else if(P==="MTD"){const L=new Date(se,$t,1),Y=new Date(se,$t+1,0);xt=Fe.filter(Me=>Rt(Me,L,Y));const $e=L.toLocaleDateString("en-US",{month:"short"});Ce=`${$e} 1 – ${$e} ${Y.getDate()}, ${se}`}else if(P==="QTD"){const L=Math.floor($t/3),Y=new Date(se,L*3,1),$e=new Date(se,(L+1)*3,0);xt=Fe.filter(Ne=>Rt(Ne,Y,$e));const Me=Y.toLocaleDateString("en-US",{month:"short",day:"numeric"}),Ve=$e.toLocaleDateString("en-US",{month:"short",day:"numeric"});Ce=`${Me} – ${Ve}, ${se}`}else if(P==="YTD"){const L=new Date(se,0,1);xt=Fe.filter(Y=>Rt(Y,L,Ie)),Ce=`Jan 1 – ${_e(We)}, ${se}`}else if(P==="L30"){const L=new Date(Ie);L.setDate(L.getDate()-29),xt=Fe.filter(Y=>Rt(Y,L,Ie)),Ce=`${_e(L.toISOString().slice(0,10))} – ${_e(We)}, ${se}`}else if(P==="L60"){const L=new Date(Ie);L.setDate(L.getDate()-59),xt=Fe.filter(Y=>Rt(Y,L,Ie)),Ce=`${_e(L.toISOString().slice(0,10))} – ${_e(We)}, ${se}`}else xt=Fe.slice(-4),Ce=`${_e(xt[0])} – ${_e(xt[xt.length-1])}, ${se}`;const He=new Set(xt);let _r,Qe=We;if(P==="YESTERDAY"){const L=new Date(Ie);L.setDate(L.getDate()-1),_r=L.toISOString().slice(0,10),Qe=_r}else if(P==="MTD")_r=`${se}-${String($t+1).padStart(2,"0")}-01`;else if(P==="QTD"){const L=Math.floor($t/3)*3;_r=`${se}-${String(L+1).padStart(2,"0")}-01`}else if(P==="YTD")_r=`${se}-01-01`;else if(P==="L30"){const L=new Date(Ie);L.setDate(L.getDate()-29),_r=L.toISOString().slice(0,10)}else if(P==="L60"){const L=new Date(Ie);L.setDate(L.getDate()-59),_r=L.toISOString().slice(0,10)}else _r=xt.length?xt[0]:We;const Jt=(L,Y,$e)=>{if(!L||!L.length)return null;const Me=L.filter(Ve=>Ve.c===Y&&He.has(Ve.w));return Me.length?Me.reduce((Ve,Ne)=>Ve+(Number(Ne[$e])||0),0)/Me.length:null},Ls=(L,Y,$e)=>{if(!L||!L.length)return null;const Me=L.filter(Ve=>Ve.c===Y&&He.has(Ve.w)&&Number(Ve[$e])>0);return Me.length?Me.reduce((Ve,Ne)=>Ve+(Number(Ne[$e])||0),0)/Me.length:null},Nr=(L,Y,$e)=>!L||!L.length?0:L.filter(Me=>Me.c===Y&&He.has(Me.w)).reduce((Me,Ve)=>Me+(Number(Ve[$e])||0),0),rn=(L,Y)=>!n||!n.length?0:n.filter($e=>$e.c===L&&$e.d>=_r&&$e.d<=Qe).reduce(($e,Me)=>$e+(Number(Me[Y])||0),0),Lr=(L,Y,$e)=>{if(!L||!L.length)return null;const Me=Y.map(Ve=>Jt(L,Ve,$e)).filter(Ve=>Ve!=null);return Me.length?Me.reduce((Ve,Ne)=>Ve+Ne,0)/Me.length:null},Tr=rn(e,"s"),$r=rn(e,"p"),ci=$r>0?Tr/$r:null,or=je.reduce((L,Y)=>L+rn(Y,"s"),0),Bs=je.reduce((L,Y)=>L+rn(Y,"p"),0),wr=Bs>0?or/Bs:null,nf=rn(e,"rt"),hr=Tr>0?nf/Tr*100:null,of=je.reduce((L,Y)=>L+rn(Y,"rt"),0),Bn=or>0?of/or*100:null,af=rn(e,"inj"),Vr=Tr>0?af/Tr*100:null,lf=je.reduce((L,Y)=>L+rn(Y,"inj"),0),gn=or>0?lf/or*100:null,Xa=rn(e,"co"),Br=Tr>0?Xa/Tr*100:null,Fs=(L,Y)=>{if(!p||!p.length)return 0;const $e=new Date(_r+"T00:00:00"),Me=new Date(Qe+"T00:00:00");let Ve=0;for(const Ne of p){if(Ne.c!==L)continue;const tt=Number(Ne[Y]);if(!tt||tt<=0)continue;const Ct=new Date(Ne.w+"T00:00:00"),ot=new Date(Ct);ot.setDate(ot.getDate()+6);const ut=$e>Ct?$e:Ct,er=Me{if(P!=="MTD"||!p||!p.length)return 0;const $e=new Date(se,$t,1),Me=new Date(se,$t+1,0);let Ve=0;for(const Ne of p){if(Ne.c!==L)continue;const tt=Number(Ne[Y]);if(!tt||tt<=0)continue;const Ct=new Date(Ne.w+"T00:00:00"),ot=new Date(Ct);ot.setDate(ot.getDate()+6);const ut=$e>Ct?$e:Ct,er=MeL+rn(Y,"co"),0),xn=or>0?Qa/or*100:null,Ws=(f||[]).filter(L=>L.c===e&&He.has(L.w)),io=Ws.reduce((L,Y)=>L+(Number(Y.total_qty)||0),0),Us=Ws.reduce((L,Y)=>L+(Number(Y.n)||0),0),Kr=Us>0?io/Us:null,uf=(f||[]).filter(L=>je.includes(L.c)&&He.has(L.w)),oo=uf.reduce((L,Y)=>L+(Number(Y.total_qty)||0),0),Hs=uf.reduce((L,Y)=>L+(Number(Y.n)||0),0),ao=Hs>0?oo/Hs:null,cf=Jt(a,e,"sf"),Vs=Lr(a,je,"sf"),wn=Jt(i,e,"cn"),Ks=Lr(i,je,"cn"),zn=Jt(i,e,"ns"),lo=Lr(i,je,"ns"),nn=Ls(l,e,"ur"),Za=(()=>{if(!l||!l.length)return null;const L=je.map(Y=>Ls(l,Y,"ur")).filter(Y=>Y!=null);return L.length?L.reduce((Y,$e)=>Y+$e,0)/L.length:null})(),Ja=Jt(r,e,"p"),el=Lr(r,je,"p"),so=(L,Y,$e,Me,Ve)=>{if(!L||!L.length||xt.length<2)return null;const Ne=L.filter(ar=>ar.c===Y&&He.has(ar.w)).sort((ar,tr)=>ar.w.localeCompare(tr.w));if(Ne.length<2)return null;const tt=Math.ceil(Ne.length/2),Ct=Ne.slice(0,tt),ot=Ne.slice(tt),ut=ar=>ar.length?ar.reduce((tr,$i)=>tr+(Number($i[$e])||0),0)/ar.length:0,er=ut(Ct),vr=ut(ot);return er===0&&vr===0?0:er!==0?(vr-er)/Math.abs(er)*100:vr>0?100:-100},Gs=(()=>{const L=r.filter(Ne=>Ne.c===e&&He.has(Ne.w)).sort((Ne,tt)=>Ne.w.localeCompare(tt.w));if(L.length<2)return null;const Y=Math.ceil(L.length/2),$e=Ne=>{const tt=Ne.reduce((ot,ut)=>ot+(Number(ut.s)||0),0),Ct=Ne.reduce((ot,ut)=>ot+(Number(ut.p)||0),0);return Ct>0?tt/Ct:0},Me=$e(L.slice(0,Y)),Ve=$e(L.slice(Y));return Me!==0?(Ve-Me)/Math.abs(Me)*100:0})(),Ys=(()=>{const L=r.filter(Ne=>Ne.c===e&&He.has(Ne.w)).sort((Ne,tt)=>Ne.w.localeCompare(tt.w));if(L.length<2)return null;const Y=Math.ceil(L.length/2),$e=Ne=>{const tt=Ne.reduce((ot,ut)=>ot+(Number(ut.s)||0),0),Ct=Ne.reduce((ot,ut)=>ot+(Number(ut.rt)||0),0);return tt>0?Ct/tt*100:0},Me=$e(L.slice(0,Y));return $e(L.slice(Y))-Me})(),Wn=(()=>{const L=r.filter(Ne=>Ne.c===e&&He.has(Ne.w)).sort((Ne,tt)=>Ne.w.localeCompare(tt.w));if(L.length<2)return null;const Y=Math.ceil(L.length/2),$e=Ne=>{const tt=Ne.reduce((ot,ut)=>ot+(Number(ut.s)||0),0),Ct=Ne.reduce((ot,ut)=>ot+(Number(ut.inj)||0),0);return tt>0?Ct/tt*100:0},Me=$e(L.slice(0,Y));return $e(L.slice(Y))-Me})(),ff=(()=>{const L=r.filter(Ne=>Ne.c===e&&He.has(Ne.w)).sort((Ne,tt)=>Ne.w.localeCompare(tt.w));if(L.length<2)return null;const Y=Math.ceil(L.length/2),$e=Ne=>{const tt=Ne.reduce((ot,ut)=>ot+(Number(ut.s)||0),0),Ct=Ne.reduce((ot,ut)=>ot+(Number(ut.co)||0),0);return tt>0?Ct/tt*100:0},Me=$e(L.slice(0,Y));return $e(L.slice(Y))-Me})(),uo=so(o,e,"avg_units"),qs=so(a,e,"sf"),co=so(i,e,"cn"),df=so(i,e,"ns"),fo=so(l,e,"ur"),Xs=so(r,e,"p"),ia=r.filter(L=>L.c===e&&He.has(L.w)).sort((L,Y)=>L.w.localeCompare(Y.w)),tl=Math.ceil(ia.length/2),on=ia.slice(0,tl),po=ia.slice(tl),fi=L=>L.length?L.reduce((Y,$e)=>Y+(Number($e.s)||0),0)/L.length:0,oa=L=>L.length?L.reduce((Y,$e)=>Y+(Number($e.p)||0),0)/L.length:0,_i=on.length&&po.length?(fi(po)-fi(on))/(fi(on)||1)*100:0,Qs=on.length&&po.length?(oa(po)-oa(on))/(oa(on)||1)*100:0,Un=Nr(s||[],e,"h"),ho=Un>0?Tr/Un:null,vo=Un>0?Xa/Un:null,aa=Jt(s||[],e,"h"),Hn=je.reduce((L,Y)=>L+Nr(s||[],Y,"h"),0),rl=Hn>0?or/Hn:null,yo=Hn>0?Qa/Hn:null,Zs=Lr(s||[],je,"h"),Ti=(L,Y,$e,Me,Ve,Ne,tt)=>{if(!L||L.size===0)return null;const Ct=(Y||[]).filter(ke=>ke.c===e&&He.has(ke.w)&&L.has(ke.pr)),ot=($e||[]).filter(ke=>ke.c===e&&He.has(ke.w)&&L.has(ke.pr)),ut=(Me||[]).filter(ke=>ke.c===e&&He.has(ke.w)&&L.has(ke.pr)),er=(Ve||[]).filter(ke=>ke.c===e&&He.has(ke.w)&&L.has(ke.pr)),vr=(Ne||[]).filter(ke=>ke.c===e&&He.has(ke.w)&&L.has(ke.pr)&&(Number(ke.total_qty)||0)>0),ar=(tt||[]).filter(ke=>ke.c===e&&He.has(ke.w)&&L.has(ke.pr)),tr=Ct.reduce((ke,Je)=>ke+(Number(Je.s)||0),0),$i=Ct.reduce((ke,Je)=>ke+(Number(Je.p)||0),0),Kn=Ct.reduce((ke,Je)=>ke+(Number(Je.rt)||0),0),la=Ct.reduce((ke,Je)=>ke+(Number(Je.inj)||0),0),mo=ot.reduce((ke,Je)=>ke+(Number(Je.coll)||0),0),Ei=ut.reduce((ke,Je)=>ke+(Number(Je.t)||0),0),Gn=er.reduce((ke,Je)=>ke+(Number(Je.h)||0),0),pi=er.filter(ke=>Number(ke.ur)>0),ol=pi.length>0?pi.reduce((ke,Je)=>ke+(Number(Je.ur)||0),0)/pi.length:null,ru=vr.reduce((ke,Je)=>ke+(Number(Je.total_qty)||0),0),nu=vr.reduce((ke,Je)=>ke+(Number(Je.n)||0),0),be=nu>0?ru/nu:null,ze=ar.filter(ke=>ke.sf!=null&&Number(ke.sf)>0),Ye=ze.length>0?ze.reduce((ke,Je)=>ke+(Number(Je.sf)||0),0)/ze.length:null,ct=He.size||1;return{rev:tr,pt:$i,rt:Kn,inj:la,coll:mo,revPerPt:$i>0?tr/$i:null,retailPct:tr>0?Kn/tr*100:null,injPct:tr>0?la/tr*100:null,collPct:tr>0?mo/tr*100:null,cancelRate:Ei>0?ut.reduce((ke,Je)=>ke+(Number(Je.cn)||0)*(Number(Je.t)||0),0)/Ei:null,noshowRate:Ei>0?ut.reduce((ke,Je)=>ke+(Number(Je.ns)||0)*(Number(Je.t)||0),0)/Ei:null,util:ol,avgPt:$i/ct,avgBtxUnits:be,avgSyrFiller:Ye,revPerHour:Gn>0?tr/Gn:null,collPerHour:Gn>0?mo/Gn:null,avgHoursPerWeek:Gn/ct}},nl=new Set([...(g||[]).filter(L=>L.c===e&&He.has(L.w)).map(L=>L.pr),...(f||[]).filter(L=>L.c===e&&He.has(L.w)).map(L=>L.pr),...(c||[]).filter(L=>L.c===e&&He.has(L.w)).map(L=>L.pr),...(d||[]).filter(L=>L.c===e&&He.has(L.w)).map(L=>L.pr),...(u||[]).filter(L=>L.c===e&&He.has(L.w)).map(L=>L.pr)].filter(Boolean)),go=!H||H.size===0||H.size>=nl.size,Jh=!ne||ne.size===0||ne.size>=nl.size,pt=go?null:Ti(H,g,d,y,m,f,c),di=Jh?null:Ti(ne,g,d,y,m,f,c),{cards:Js,allProviderNames:eu}=(()=>{const L=(u||[]).filter(be=>be.c===e&&He.has(be.w)),$e=[...new Set([...L.map(be=>be.pr),...(f||[]).filter(be=>be.c===e&&He.has(be.w)).map(be=>be.pr),...(c||[]).filter(be=>be.c===e&&He.has(be.w)).map(be=>be.pr),...(d||[]).filter(be=>be.c===e&&He.has(be.w)).map(be=>be.pr)].filter(Boolean))];if(!$e.length)return{cards:[],allProviderNames:[]};const Me=u.filter(be=>je.includes(be.c)&&He.has(be.w)),Ve=[...new Set(Me.map(be=>be.pr))],Ne=Ve.length>0?Ve.map(be=>Me.filter(ze=>ze.pr===be).reduce((ze,Ye)=>ze+(Number(Ye.r)||0),0)).reduce((be,ze)=>be+ze,0)/Ve.length:null,tt=(f||[]).filter(be=>je.includes(be.c)&&He.has(be.w)&&(Number(be.total_qty)||0)>0),ot=[...new Set(tt.map(be=>be.pr))].length>0?(()=>{const be=tt.reduce((Ye,ct)=>Ye+(Number(ct.total_qty)||0),0),ze=tt.reduce((Ye,ct)=>Ye+(Number(ct.n)||0),0);return ze>0?be/ze:null})():null,ut=(c||[]).filter(be=>je.includes(be.c)&&He.has(be.w)),er=[...new Set(ut.map(be=>be.pr))],vr=er.length>0?(()=>{const be=er.map(ze=>{const Ye=ut.filter(ct=>ct.pr===ze&&ct.si!=null&&Number(ct.si)>0);return Ye.length?Ye.reduce((ct,ke)=>ct+(Number(ke.si)||0),0)/Ye.length:null}).filter(ze=>ze!=null);return be.length?be.reduce((ze,Ye)=>ze+Ye,0)/be.length:null})():null,ar=er.length>0?(()=>{const be=er.map(ze=>{const Ye=ut.filter(ct=>ct.pr===ze&&ct.sf!=null&&Number(ct.sf)>0);return Ye.length?Ye.reduce((ct,ke)=>ct+(Number(ke.sf)||0),0)/Ye.length:null}).filter(ze=>ze!=null);return be.length?be.reduce((ze,Ye)=>ze+Ye,0)/be.length:null})():null,tr=(d||[]).filter(be=>je.includes(be.c)&&He.has(be.w)),Kn=[...new Set(tr.map(be=>be.pr))].length>0?(()=>{const be=tr.reduce((Ye,ct)=>Ye+(Number(ct.rev)||0),0),ze=tr.reduce((Ye,ct)=>Ye+(Number(ct.coll)||0),0);return be>0?ze/be*100:null})():null,la=(g||[]).filter(be=>je.includes(be.c)&&He.has(be.w)),mo=[...new Set(la.map(be=>be.pr))],Ei=mo.length>0?(()=>{const be=mo.map(ze=>{const Ye=la.filter(Je=>Je.pr===ze),ct=Ye.reduce((Je,yr)=>Je+(Number(yr.s)||0),0),ke=Ye.reduce((Je,yr)=>Je+(Number(yr.p)||0),0);return ke>0?ct/ke:null}).filter(ze=>ze!=null);return be.length?be.reduce((ze,Ye)=>ze+Ye,0)/be.length:null})():null,Gn=(m||[]).filter(be=>je.includes(be.c)&&He.has(be.w)),pi=[...new Set(Gn.map(be=>be.pr))],ol=pi.length>0?(()=>{const be=pi.map(ze=>{const Ye=Gn.filter(ct=>ct.pr===ze&&Number(ct.ur)>0);return Ye.length?Ye.reduce((ct,ke)=>ct+(Number(ke.ur)||0),0)/Ye.length:null}).filter(ze=>ze!=null);return be.length?be.reduce((ze,Ye)=>ze+Ye,0)/be.length:null})():null,ru=pi.length>0?(()=>{const be=pi.map(ze=>{const Ye=Gn.filter(yr=>yr.pr===ze),ke=tr.filter(yr=>yr.pr===ze).reduce((yr,bo)=>yr+(Number(bo.rev)||0),0),Je=Ye.reduce((yr,bo)=>yr+(Number(bo.h)||0),0);return Je>0?ke/Je:null}).filter(ze=>ze!=null);return be.length?be.reduce((ze,Ye)=>ze+Ye,0)/be.length:null})():null;return{cards:$e.map(be=>{var Sf;const Ye=L.filter(Be=>Be.pr===be).reduce((Be,Ht)=>Be+(Number(Ht.r)||0),0),ct=(f||[]).filter(Be=>Be.c===e&&Be.pr===be&&He.has(Be.w)&&(Number(Be.total_qty)||0)>0),ke=ct.reduce((Be,Ht)=>Be+(Number(Ht.total_qty)||0),0),Je=ct.reduce((Be,Ht)=>Be+(Number(Ht.n)||0),0),yr=Je>0?ke/Je:null,bo=(c||[]).filter(Be=>Be.c===e&&Be.pr===be&&He.has(Be.w)),al=bo.filter(Be=>Be.si!=null&&Number(Be.si)>0),iu=bo.filter(Be=>Be.sf!=null&&Number(Be.sf)>0),ll=al.length?al.reduce((Be,Ht)=>Be+(Number(Ht.si)||0),0)/al.length:null,sa=iu.length?iu.reduce((Be,Ht)=>Be+(Number(Ht.sf)||0),0)/iu.length:null,vf=(d||[]).filter(Be=>Be.c===e&&Be.pr===be&&He.has(Be.w)),sl=vf.reduce((Be,Ht)=>Be+(Number(Ht.rev)||0),0),yf=vf.reduce((Be,Ht)=>Be+(Number(Ht.coll)||0),0),ul=sl>0?yf/sl*100:null,gf=(g||[]).filter(Be=>Be.c===e&&Be.pr===be&&He.has(Be.w)).reduce((Be,Ht)=>Be+(Number(Ht.p)||0),0),ev=gf>0?sl/gf:null,mf=(m||[]).filter(Be=>Be.c===e&&Be.pr===be&&He.has(Be.w)),bf=mf.filter(Be=>Number(Be.ur)>0),Mb=bf.length>0?bf.reduce((Be,Ht)=>Be+(Number(Ht.ur)||0),0)/bf.length:null,xf=mf.reduce((Be,Ht)=>Be+(Number(Ht.h)||0),0),tv=xf>0?sl/xf:null,Ci=[];yr!=null&&ot!=null&&yrHt.gap-Be.gap);const wf=((Sf=Ci[0])==null?void 0:Sf.metric)||null;return{name:be,injRev:Ye,avgBtx:yr,avgSyrInj:ll,avgSyrFiller:sa,collPct:ul,avgRevPerPt:ev,provUtil:Mb,provRevPerHour:tv,peerAvgInjRev:Ne,peerAvgBtx:ot,peerAvgSyrInj:vr,peerAvgSyrFiller:ar,peerAvgCollPct:Kn,peerAvgRevPerPt:Ei,peerAvgUtil:ol,peerAvgRevPerHour:ru,recommendation:wf?{btx:"Consider full-face assessment protocols to increase neurotoxin dosing.",syrInj:"Review injectable treatment plans -- opportunity to increase volume per appointment.",syrFiller:"Review filler treatment plans -- opportunity to increase volume per appointment.",coll:"Focus on point-of-sale collection and reducing outstanding balances.",injRev:"Schedule injectable-focused training and increase consultation-to-treatment conversion."}[wf]:null}}).sort((be,ze)=>ze.injRev-be.injRev),allProviderNames:$e}})(),Vn=[],me=[];hr!=null&&(hr>=7.5?Vn.push("Retail %"):me.push("Retail %")),Kr!=null&&(Kr>=40?Vn.push("Botox Units"):me.push("Botox Units")),wn!=null&&(wn<=5?Vn.push("Cancellation Rate"):me.push("Cancellation Rate")),nn!=null&&(nn>=70?Vn.push("Utilization"):me.push("Utilization"));const Et=[];if(wn!=null&&wn>5){const L=Jt(i,e,"t")||0,Y=wn-5,$e=Math.round(L*Y/100),Me=$r>0?Tr/$r:0,Ve=$e*Me/4;Et.push({title:"Confirmation Protocol Improvement",description:`Cancellation rate at ${wn.toFixed(1)}% exceeds the 5% goal (~${$e} excess cancellations/week, ~$${Math.round(Ve).toLocaleString()}/week revenue impact). Implement 48-hour and 24-hour confirmation touchpoints via text and phone.`,priority:"CRITICAL",quickWin:!0})}if(zn!=null&&zn>5){const L=Jt(i,e,"t")||0,Y=zn-5,$e=Math.round(L*Y/100),Me=$r>0?Tr/$r:0,Ve=$e*Me/4;Et.push({title:"No-Show Reduction",description:`No-show rate at ${zn.toFixed(1)}% (~${$e} excess no-shows/week, ~$${Math.round(Ve).toLocaleString()}/week). Activate automated SMS reminders at 72h, 24h, and 2h before appointments.`,priority:zn>10?"CRITICAL":"IMPORTANT",quickWin:!0})}if(hr!=null&&hr<7.5){const L=7.5-hr,Y=Tr/4*(L/100);Et.push({title:"Retail Strategy Enhancement",description:`Retail at ${hr.toFixed(1)}% vs 7.5% goal (~$${Math.round(Y).toLocaleString()}/week gap). Introduce product bundling with service packages and ensure all providers recommend post-treatment products at checkout.`,priority:L>3?"CRITICAL":"IMPORTANT"})}const il=Js.filter(L=>L.avgBtx!=null&&L.peerAvgBtx!=null&&L.avgBtx$e.name),Y=L.length>0?` Focus training on ${L.join(", ")}.`:"";Et.push({title:"Neurotoxin Dosing Training",description:`Avg Botox units at ${Kr.toFixed(1)} vs 40-unit goal. Schedule provider education on full-face treatment protocols.${Y}`,priority:40-Kr>10?"CRITICAL":"IMPORTANT"})}if(nn!=null&&nn<70){const L=70-nn,Y=aa!=null?` (currently ${aa.toFixed(0)} net hrs/week)`:"";Et.push({title:"Schedule Optimization",description:`Utilization at ${nn.toFixed(1)}% vs 70% target${Y}. Review provider scheduling templates to minimize gaps. ${nn<55?"Consider reducing blockout hours and maximizing appointment density during peak times.":"Offer last-minute booking promotions for open slots."}`,priority:L>15?"CRITICAL":"IMPORTANT"})}if(Br!=null&&xn!=null&&Br$e.collPct!=null&&$e.peerAvgCollPct!=null&&$e.collPct<$e.peerAvgCollPct).slice(0,2).map($e=>$e.name).join(", ");Et.push({title:"Collections Follow-Up Process",description:`Collections at ${Br.toFixed(1)}% vs peer avg ${xn.toFixed(1)}%.${Y?` Key providers: ${Y}.`:""} Audit outstanding balances weekly and implement payment plans for larger invoices.`,priority:xn-Br>5?"CRITICAL":"IMPORTANT"})}ci!=null&&wr!=null&&ci.15?"CRITICAL":"OPTIMIZE"}),ho!=null&&rl!=null&&ho5&&Et.push({title:"Injectable Service Promotion",description:`Injectables at ${Vr.toFixed(1)}% vs peer avg ${gn.toFixed(1)}%. Run targeted injectable promotions and ensure consultations include injectable assessments.`,priority:"OPTIMIZE"});const tu={CRITICAL:0,IMPORTANT:1,OPTIMIZE:2};Et.sort((L,Y)=>tu[L.priority]-tu[Y.priority]);const pf=Et.filter(L=>L.quickWin),hf=Et.filter(L=>!L.quickWin).slice(0,6);return{locType:Ae,peers:je,periodLabel:Ce,locRev:Tr,locColl:Xa,locRevBudget:mn,locCollBudget:zs,fullMonthRevBudget:sf,fullMonthCollBudget:Fn,locRevPerPt:ci,locRetailPct:hr,locUtil:nn,locCancelRate:wn,locNoshowRate:zn,kpis:[{name:"Revenue",value:pt?pt.rev:Tr,peerAvg:or,goal:pt?null:mn||null,format:"dollar",higherBetter:!0,trend:_i},{name:"Collections",value:pt?pt.coll:Xa,peerAvg:Qa,goal:pt?null:zs||null,format:"dollar",higherBetter:!0,trend:null},{name:"Avg Revenue Per Patient",value:pt?pt.revPerPt:ci,peerAvg:wr,goal:500,format:"dollar",higherBetter:!0,trend:Gs},{name:"Retail % of Sales",value:pt?pt.retailPct:hr,peerAvg:Bn,goal:7.5,format:"pct",higherBetter:!0,trend:Ys},{name:"Injectables % of Sales",value:pt?pt.injPct:Vr,peerAvg:gn,goal:null,format:"pct",higherBetter:!0,trend:Wn},{name:"Collections % of Revenue",value:pt?pt.collPct:Br,peerAvg:xn,goal:null,format:"pct",higherBetter:!0,trend:ff},{name:"Avg Botox Units",value:pt?pt.avgBtxUnits:Kr,peerAvg:ao,goal:40,format:"num",higherBetter:!0,trend:uo},{name:"Avg Syringes / Filler Appt",value:pt?pt.avgSyrFiller:cf,peerAvg:Vs,goal:null,format:"num1",higherBetter:!0,trend:qs},{name:"Cancellation Rate",value:pt?pt.cancelRate:wn,peerAvg:Ks,goal:5,format:"pct",higherBetter:!1,trend:co},{name:"No-Show Rate",value:pt?pt.noshowRate:zn,peerAvg:lo,goal:5,format:"pct",higherBetter:!1,trend:df},{name:"Utilization Rate",value:pt?pt.util:nn,peerAvg:Za,goal:70,format:"pct",higherBetter:!0,trend:fo},{name:"Avg Weekly Patients",value:pt?pt.avgPt:Ja,peerAvg:el,goal:null,format:"num",higherBetter:!0,trend:Xs}],revTrend:_i,ptTrend:Qs,improved:Vn,declined:me,efficiency:{revPerHour:di?di.revPerHour:ho,peerRevPerHour:rl,collPerHour:di?di.collPerHour:vo,peerCollPerHour:yo,avgHoursPerWeek:di?di.avgHoursPerWeek:aa,peerAvgHoursPerWeek:Zs,utilRate:di?di.util:nn,peerUtilRate:Za},providerCards:Js,allProviderNames:eu,quickWins:pf,recommendations:hf}},[e,t,r,n,i,o,a,l,s,u,f,c,d,p,g,y,m,H,ne,P]);if(!le)return null;const Se=(le.allProviderNames||[]).slice().sort().join("|");_.useEffect(()=>{A(null),F(null),ce(null)},[Se]),_.useEffect(()=>{const U=Ae=>{K.current&&!K.current.contains(Ae.target)&&R(!1),X.current&&!X.current.contains(Ae.target)&&te(!1),fe.current&&!fe.current.contains(Ae.target)&&ie(!1)};return document.addEventListener("mousedown",U),()=>document.removeEventListener("mousedown",U)},[]);const Ee=(U,Ae)=>{if(U==null)return"--";switch(Ae){case"dollar":return`$${Math.round(U).toLocaleString()}`;case"pct":return`${U.toFixed(1)}%`;case"num":return Math.round(U).toLocaleString();case"num1":return U.toFixed(1);default:return String(U)}},nt=(U,Ae)=>{if(U==null)return{arrow:"--",color:T.gray};const je=Ae?U:-U;return je>5?{arrow:"↑",color:T.green}:je>1?{arrow:"↗",color:T.green}:je>-1?{arrow:"→",color:T.gray}:je>-5?{arrow:"↘",color:T.red}:{arrow:"↓",color:T.red}},it=(U,Ae,je,Fe)=>{if(U==null)return{color:T.gray,label:"N/A"};const Ie=Ae??je;return Ie==null?{color:T.gray,label:"--"}:Fe?U>=Ie?{color:T.green,label:"On Track"}:U>=Ie*.9?{color:T.gold,label:"Near Goal"}:{color:T.red,label:"Below"}:U<=Ie?{color:T.green,label:"On Track"}:U<=Ie*1.1?{color:T.gold,label:"Near Goal"}:{color:T.red,label:"Below"}},Ot=U=>U>2?T.green:U<-2?T.red:T.gray,dt=U=>U>2?"trending up":U<-2?"trending down":"flat",Zt=new Date().toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"}),Te={CRITICAL:T.red,IMPORTANT:T.gold,OPTIMIZE:T.gray},Ke=({label:U,sectionKey:Ae,title:je})=>b.jsxs("button",{onClick:()=>x(Ae),style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 0",background:"none",border:"none",cursor:"pointer",borderBottom:`1px solid ${T.taupe}`,marginBottom:h[Ae]?14:0},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[b.jsx("span",{style:{fontSize:10,fontWeight:700,color:T.gold,letterSpacing:1.5,textTransform:"uppercase",fontFamily:ge.body},children:U}),b.jsx("span",{style:{fontSize:13,fontFamily:ge.body,fontWeight:600,color:T.navy},children:je})]}),b.jsx("span",{style:{color:T.gray,fontSize:12,transition:"transform 0.2s",transform:h[Ae]?"rotate(180deg)":"rotate(0deg)"},children:"▼"})]}),pe=({open:U,setOpen:Ae,selected:je,setSelected:Fe,allNames:Ie,dropRef:se})=>{const $t=je===null||je.size===Ie.length,_e=je===null?Ie.length:je.size,xt=$t?"All Providers":`${_e} of ${Ie.length} Providers`,Ce=We=>{Fe(Rt=>{const He=Rt===null?new Set(Ie):new Set(Rt);return He.has(We)?He.delete(We):He.add(We),new Set(He)})};return b.jsxs("div",{ref:se,style:{position:"relative",flexShrink:0,marginLeft:12},onClick:We=>We.stopPropagation(),children:[b.jsxs("button",{onClick:()=>Ae(We=>!We),style:{display:"flex",alignItems:"center",gap:6,padding:"5px 10px",border:`1px solid ${T.taupe}`,borderRadius:5,background:T.white,cursor:"pointer",fontSize:11,fontFamily:ge.body,color:T.navy,whiteSpace:"nowrap"},children:[xt,b.jsx("span",{style:{fontSize:9,color:T.gray,display:"inline-block",transform:U?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s"},children:"▼"})]}),U&&b.jsxs("div",{style:{position:"absolute",right:0,top:"calc(100% + 4px)",zIndex:200,background:T.white,border:`1px solid ${T.taupe}`,borderRadius:6,boxShadow:"0 4px 12px rgba(4,30,66,0.15)",minWidth:210,maxHeight:280,overflowY:"auto"},children:[b.jsxs("div",{style:{padding:"7px 12px",borderBottom:`1px solid ${T.taupe}`,display:"flex",gap:10,alignItems:"center"},children:[b.jsx("button",{onClick:()=>Fe(null),style:{fontSize:11,fontFamily:ge.body,color:T.navy,background:"none",border:"none",cursor:"pointer",padding:0,fontWeight:700},children:"Select All"}),b.jsx("span",{style:{color:T.taupe},children:"|"}),b.jsx("button",{onClick:()=>Fe(new Set),style:{fontSize:11,fontFamily:ge.body,color:T.gray,background:"none",border:"none",cursor:"pointer",padding:0},children:"Deselect All"})]}),Ie.map(We=>{const Rt=je===null||je.has(We);return b.jsxs("label",{style:{display:"flex",alignItems:"center",gap:8,padding:"7px 12px",cursor:"pointer",fontSize:12,fontFamily:ge.body,color:T.dark,borderBottom:`1px solid ${T.light}`},children:[b.jsx("input",{type:"checkbox",checked:Rt,onChange:()=>Ce(We),style:{accentColor:T.navy,cursor:"pointer",width:14,height:14}}),We]},We)})]})]})},q=({locValue:U,peerValue:Ae,format:je,label:Fe,higherBetter:Ie})=>{if(U==null&&Ae==null)return null;const se=Math.max(U||0,Ae||0)*1.15||1,$t=(U||0)/se*100,_e=(Ae||0)/se*100,xt=Ie?(U||0)>=(Ae||0):(U||0)<=(Ae||0);return b.jsxs("div",{style:{marginBottom:14},children:[b.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:4},children:[b.jsx("span",{style:{fontSize:11,fontFamily:ge.body,fontWeight:600,color:T.dark},children:Fe}),b.jsxs("span",{style:{fontSize:11,fontFamily:ge.body,color:T.gray},children:[Ee(U,je)," vs ",Ee(Ae,je)," peer"]})]}),b.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:3},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[b.jsx("span",{style:{fontSize:9,fontFamily:ge.body,color:T.gray,width:32},children:"You"}),b.jsx("div",{style:{flex:1,height:10,background:T.light,borderRadius:5,overflow:"hidden"},children:b.jsx("div",{style:{width:`${$t}%`,height:"100%",background:xt?T.green:T.red,borderRadius:5,transition:"width 0.4s"}})})]}),b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[b.jsx("span",{style:{fontSize:9,fontFamily:ge.body,color:T.gray,width:32},children:"Peer"}),b.jsx("div",{style:{flex:1,height:10,background:T.light,borderRadius:5,overflow:"hidden"},children:b.jsx("div",{style:{width:`${_e}%`,height:"100%",background:T.goldLight,borderRadius:5,transition:"width 0.4s"}})})]})]})]})};return b.jsxs("div",{style:{background:T.white,borderRadius:10,border:`1px solid ${T.taupe}`,marginBottom:32,overflow:"hidden"},children:[b.jsxs("div",{style:{padding:"16px 24px",background:T.navy,display:"flex",alignItems:"center",justifyContent:"space-between"},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[b.jsx("span",{style:{fontFamily:ge.heading,fontSize:18,color:T.gold,letterSpacing:1},children:"Location Performance Report"}),b.jsx("span",{style:{fontSize:10,fontFamily:ge.body,fontWeight:700,color:T.navy,background:T.gold,padding:"3px 10px",borderRadius:12,letterSpacing:.5,textTransform:"uppercase"},children:le.locType})]}),b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[b.jsx("span",{style:{fontSize:10,fontFamily:ge.body,color:"rgba(255,255,255,0.55)",letterSpacing:.8,textTransform:"uppercase"},children:"Period"}),[["YESTERDAY","Yesterday"],["MTD","MTD"],["QTD","QTD"],["YTD","YTD"],["L30","Last 30"],["L60","Last 60"]].map(([U,Ae])=>b.jsx("button",{onClick:()=>w(U),style:{fontSize:11,fontFamily:ge.body,fontWeight:700,padding:"4px 12px",borderRadius:20,cursor:"pointer",border:P===U?"none":"1px solid rgba(255,255,255,0.3)",background:P===U?T.gold:"transparent",color:P===U?T.navy:"rgba(255,255,255,0.75)",letterSpacing:.5,transition:"all 0.15s",whiteSpace:"nowrap"},children:Ae},U))]})]}),b.jsxs("div",{style:{padding:"24px 28px 28px"},children:[b.jsx("div",{style:{marginBottom:24},children:b.jsxs("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",flexWrap:"wrap",gap:16,marginBottom:8},children:[b.jsxs("div",{children:[b.jsx("h2",{style:{fontFamily:ge.heading,fontSize:28,fontWeight:400,color:T.navy,margin:"0 0 4px"},children:e}),b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,flexWrap:"wrap"},children:[b.jsxs("span",{style:{fontSize:12,fontFamily:ge.body,color:T.gray},children:["Period: ",le.periodLabel]}),b.jsxs("span",{style:{fontSize:11,fontFamily:ge.body,color:T.blush,fontStyle:"italic"},children:["Generated ",Zt]})]})]}),b.jsx("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:(()=>{const U=le,Ae=(U.locCancelRate!=null?U.locCancelRate:0)+(U.locNoshowRate!=null?U.locNoshowRate:0),je=U.locCancelRate==null&&U.locNoshowRate==null,Fe=P==="MTD";return[{label:"Sales",value:U.locRev!=null?`$${Math.round(U.locRev).toLocaleString()}`:"--",goal:U.locRevBudget>0?`Goal $${Math.round(U.locRevBudget).toLocaleString()}`:null,above:U.locRevBudget>0?U.locRev>=U.locRevBudget:null,fullMonthGoal:Fe&&U.fullMonthRevBudget>0?`Total Month $${Math.round(U.fullMonthRevBudget).toLocaleString()}`:null},{label:"Collections",value:U.locColl!=null?`$${Math.round(U.locColl).toLocaleString()}`:"--",goal:U.locCollBudget>0?`Goal $${Math.round(U.locCollBudget).toLocaleString()}`:null,above:U.locCollBudget>0?U.locColl>=U.locCollBudget:null,fullMonthGoal:Fe&&U.fullMonthCollBudget>0?`Total Month $${Math.round(U.fullMonthCollBudget).toLocaleString()}`:null},{label:"Rev / Patient",value:U.locRevPerPt!=null?`$${Math.round(U.locRevPerPt).toLocaleString()}`:"--",goal:"Goal $500",above:U.locRevPerPt!=null?U.locRevPerPt>=500:null},{label:"Utilization",value:U.locUtil!=null?`${U.locUtil.toFixed(1)}%`:"--",goal:"Goal 70%",above:U.locUtil!=null?U.locUtil>=70:null},{label:"Cancel + NS",value:je?"--":`${Ae.toFixed(1)}%`,goal:"Goal <5%",above:je?null:Ae<5},{label:"Retail %",value:U.locRetailPct!=null?`${U.locRetailPct.toFixed(1)}%`:"--",goal:"Goal 7.5%",above:U.locRetailPct!=null?U.locRetailPct>=7.5:null}].map(se=>b.jsxs("div",{style:{background:T.navy,borderRadius:8,padding:"10px 14px",minWidth:90,textAlign:"center",display:"flex",flexDirection:"column",gap:3},children:[b.jsx("div",{style:{fontSize:9,fontFamily:ge.body,fontWeight:700,letterSpacing:1.2,textTransform:"uppercase",color:"rgba(185,151,91,0.85)"},children:se.label}),b.jsx("div",{style:{fontFamily:ge.heading,fontSize:17,color:T.white,lineHeight:1.2},children:se.value}),se.goal&&b.jsx("div",{style:{fontSize:10,fontFamily:ge.body,fontWeight:600,color:se.above==null?"rgba(255,255,255,0.45)":se.above?"#4CAF50":"#EF5350"},children:se.goal}),se.fullMonthGoal&&b.jsx("div",{style:{fontSize:9,fontFamily:ge.body,fontWeight:600,color:T.gold},children:se.fullMonthGoal})]},se.label))})()})]})}),b.jsxs("div",{style:{marginBottom:28},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 0",borderBottom:`1px solid ${T.taupe}`,marginBottom:h.kpi?14:0},children:[b.jsxs("button",{onClick:()=>x("kpi"),style:{display:"flex",alignItems:"center",gap:8,flex:1,background:"none",border:"none",cursor:"pointer",textAlign:"left",padding:0},children:[b.jsx("span",{style:{fontSize:10,fontWeight:700,color:T.gold,letterSpacing:1.5,textTransform:"uppercase",fontFamily:ge.body},children:"A."}),b.jsx("span",{style:{fontSize:13,fontFamily:ge.body,fontWeight:600,color:T.navy},children:"KPI Scorecard"}),H!==null&&H.size<(le.allProviderNames||[]).length&&b.jsxs("span",{style:{fontSize:9,fontFamily:ge.body,color:T.gold,background:T.navy,padding:"2px 7px",borderRadius:10,marginLeft:4},children:[H.size," provider",H.size!==1?"s":""]}),b.jsx("span",{style:{color:T.gray,fontSize:12,marginLeft:4,transition:"transform 0.2s",display:"inline-block",transform:h.kpi?"rotate(180deg)":"rotate(0deg)"},children:"▼"})]}),b.jsx(pe,{open:ae,setOpen:te,selected:H,setSelected:F,allNames:le.allProviderNames||[],dropRef:X})]}),h.kpi&&b.jsx("div",{style:{overflowX:"auto"},children:b.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontFamily:ge.body,fontSize:12},children:[b.jsx("thead",{children:b.jsx("tr",{style:{borderBottom:`2px solid ${T.navy}`},children:["KPI","Value","Peer Avg","Goal","Status","Trend"].map(U=>b.jsx("th",{style:{padding:"8px 10px",textAlign:"left",fontSize:9,fontWeight:700,color:T.gold,letterSpacing:1.2,textTransform:"uppercase"},children:U},U))})}),b.jsx("tbody",{children:le.kpis.map((U,Ae)=>{const je=it(U.value,U.goal,U.peerAvg,U.higherBetter),Fe=nt(U.trend,U.higherBetter);return b.jsxs("tr",{style:{borderBottom:`1px solid ${T.light}`,background:Ae%2===0?T.white:T.cream},children:[b.jsx("td",{style:{padding:"10px",fontWeight:600,color:T.navy,fontSize:12},children:U.name}),b.jsx("td",{style:{padding:"10px",fontFamily:ge.heading,fontSize:16,color:T.navy},children:Ee(U.value,U.format)}),b.jsx("td",{style:{padding:"10px",color:T.gray},children:Ee(U.peerAvg,U.format)}),b.jsx("td",{style:{padding:"10px",color:T.gray},children:U.goal!=null?`${U.higherBetter?"≥":"≤"}${U.format==="pct"?`${U.goal}%`:U.format==="dollar"?Ee(U.goal,"dollar"):U.goal}`:"--"}),b.jsx("td",{style:{padding:"10px"},children:b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[b.jsx("span",{style:{width:10,height:10,borderRadius:"50%",background:je.color,display:"inline-block",flexShrink:0}}),b.jsx("span",{style:{fontSize:10,color:je.color,fontWeight:600},children:je.label})]})}),b.jsx("td",{style:{padding:"10px"},children:b.jsx("span",{style:{fontSize:16,color:Fe.color,fontWeight:700},children:Fe.arrow})})]},U.name)})})]})})]}),b.jsxs("div",{style:{marginBottom:28},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 0",borderBottom:`1px solid ${T.taupe}`,marginBottom:h.efficiency?14:0},children:[b.jsxs("button",{onClick:()=>x("efficiency"),style:{display:"flex",alignItems:"center",gap:8,flex:1,background:"none",border:"none",cursor:"pointer",textAlign:"left",padding:0},children:[b.jsx("span",{style:{fontSize:10,fontWeight:700,color:T.gold,letterSpacing:1.5,textTransform:"uppercase",fontFamily:ge.body},children:"B."}),b.jsx("span",{style:{fontSize:13,fontFamily:ge.body,fontWeight:600,color:T.navy},children:"Revenue & Efficiency Analysis"}),ne!==null&&ne.size<(le.allProviderNames||[]).length&&b.jsxs("span",{style:{fontSize:9,fontFamily:ge.body,color:T.gold,background:T.navy,padding:"2px 7px",borderRadius:10,marginLeft:4},children:[ne.size," provider",ne.size!==1?"s":""]}),b.jsx("span",{style:{color:T.gray,fontSize:12,marginLeft:4,transition:"transform 0.2s",display:"inline-block",transform:h.efficiency?"rotate(180deg)":"rotate(0deg)"},children:"▼"})]}),b.jsx(pe,{open:Q,setOpen:ie,selected:ne,setSelected:ce,allNames:le.allProviderNames||[],dropRef:fe})]}),h.efficiency&&b.jsxs("div",{style:{background:T.cream,borderRadius:8,border:`1px solid ${T.taupe}`,padding:"20px 24px"},children:[b.jsx(q,{locValue:le.efficiency.revPerHour,peerValue:le.efficiency.peerRevPerHour,format:"dollar",label:"Revenue Per Net Provider Hour",higherBetter:!0}),b.jsx(q,{locValue:le.efficiency.collPerHour,peerValue:le.efficiency.peerCollPerHour,format:"dollar",label:"Collections Per Net Provider Hour",higherBetter:!0}),b.jsx(q,{locValue:le.efficiency.avgHoursPerWeek,peerValue:le.efficiency.peerAvgHoursPerWeek,format:"num",label:"Avg Net Provider Hours/Week",higherBetter:!0}),b.jsx(q,{locValue:le.efficiency.utilRate,peerValue:le.efficiency.peerUtilRate,format:"pct",label:"Utilization Rate",higherBetter:!0}),le.efficiency.revPerHour!=null&&le.efficiency.peerRevPerHour!=null&&le.efficiency.revPerHour0&&b.jsxs("div",{style:{marginBottom:28},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 0",borderBottom:`1px solid ${T.taupe}`,marginBottom:h.providers?14:0},children:[b.jsxs("button",{onClick:()=>x("providers"),style:{display:"flex",alignItems:"center",gap:8,flex:1,background:"none",border:"none",cursor:"pointer",textAlign:"left",padding:0},children:[b.jsx("span",{style:{fontSize:10,fontWeight:700,color:T.gold,letterSpacing:1.5,textTransform:"uppercase",fontFamily:ge.body},children:"C."}),b.jsx("span",{style:{fontSize:13,fontFamily:ge.body,fontWeight:600,color:T.navy},children:"Provider Performance"}),b.jsx("span",{style:{color:T.gray,fontSize:12,marginLeft:4,transition:"transform 0.2s",display:"inline-block",transform:h.providers?"rotate(180deg)":"rotate(0deg)"},children:"▼"})]}),(()=>{const U=le.allProviderNames||[],Ae=S===null||S.size===U.length,je=S===null?U.length:S.size,Fe=Ae?"All Providers":`${je} of ${U.length} Providers`,Ie=se=>{A($t=>{const _e=$t===null?new Set(U):new Set($t);return _e.has(se)?_e.delete(se):_e.add(se),new Set(_e)})};return b.jsxs("div",{ref:K,style:{position:"relative",flexShrink:0,marginLeft:12},onClick:se=>se.stopPropagation(),children:[b.jsxs("button",{onClick:()=>R(se=>!se),style:{display:"flex",alignItems:"center",gap:6,padding:"5px 10px",border:`1px solid ${T.taupe}`,borderRadius:5,background:T.white,cursor:"pointer",fontSize:11,fontFamily:ge.body,color:T.navy,whiteSpace:"nowrap"},children:[Fe,b.jsx("span",{style:{fontSize:9,color:T.gray,display:"inline-block",transform:E?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s"},children:"▼"})]}),E&&b.jsxs("div",{style:{position:"absolute",right:0,top:"calc(100% + 4px)",zIndex:200,background:T.white,border:`1px solid ${T.taupe}`,borderRadius:6,boxShadow:"0 4px 12px rgba(4,30,66,0.15)",minWidth:210,maxHeight:280,overflowY:"auto"},children:[b.jsxs("div",{style:{padding:"7px 12px",borderBottom:`1px solid ${T.taupe}`,display:"flex",gap:10,alignItems:"center"},children:[b.jsx("button",{onClick:()=>A(null),style:{fontSize:11,fontFamily:ge.body,color:T.navy,background:"none",border:"none",cursor:"pointer",padding:0,fontWeight:700},children:"Select All"}),b.jsx("span",{style:{color:T.taupe},children:"|"}),b.jsx("button",{onClick:()=>A(new Set),style:{fontSize:11,fontFamily:ge.body,color:T.gray,background:"none",border:"none",cursor:"pointer",padding:0},children:"Deselect All"})]}),U.map(se=>{const $t=S===null||S.has(se);return b.jsxs("label",{style:{display:"flex",alignItems:"center",gap:8,padding:"7px 12px",cursor:"pointer",fontSize:12,fontFamily:ge.body,color:T.dark,borderBottom:`1px solid ${T.light}`},children:[b.jsx("input",{type:"checkbox",checked:$t,onChange:()=>Ie(se),style:{accentColor:T.navy,cursor:"pointer",width:14,height:14}}),se]},se)})]})]})})()]}),h.providers&&b.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:14},children:le.providerCards.filter(U=>S===null||S.has(U.name)).map(U=>{const Ae=[{label:"Inj Revenue",value:U.injRev,peerAvg:U.peerAvgInjRev,format:"dollar",higherBetter:!0},{label:"Avg Botox Units",value:U.avgBtx,peerAvg:U.peerAvgBtx,format:"num1",higherBetter:!0},{label:"Avg Syr/Inj Appt",value:U.avgSyrInj,peerAvg:U.peerAvgSyrInj,format:"num1",higherBetter:!0},{label:"Avg Syr/Filler Appt",value:U.avgSyrFiller,peerAvg:U.peerAvgSyrFiller,format:"num1",higherBetter:!0},{label:"Collections %",value:U.collPct,peerAvg:U.peerAvgCollPct,format:"pct",higherBetter:!0},{label:"Avg Rev Per Patient",value:U.avgRevPerPt,peerAvg:U.peerAvgRevPerPt,format:"dollar",higherBetter:!0},{label:"Utilization",value:U.provUtil,peerAvg:U.peerAvgUtil,format:"pct",higherBetter:!0},{label:"Rev Per Net Hr",value:U.provRevPerHour,peerAvg:U.peerAvgRevPerHour,format:"dollar",higherBetter:!0}];return b.jsxs("div",{style:{background:T.cream,borderRadius:8,border:`1px solid ${T.taupe}`,padding:"16px 18px",display:"flex",flexDirection:"column"},children:[b.jsx("div",{style:{fontFamily:ge.heading,fontSize:16,color:T.navy,marginBottom:10,borderBottom:`1px solid ${T.taupe}`,paddingBottom:8},children:U.name}),b.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6,flex:1},children:Ae.map(je=>{const Fe=je.value!=null&&je.peerAvg!=null?je.higherBetter?je.value>=je.peerAvg:je.value<=je.peerAvg:null;return b.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[b.jsx("span",{style:{width:8,height:8,borderRadius:"50%",flexShrink:0,background:Fe==null?T.gray:Fe?T.green:T.red,display:"inline-block"}}),b.jsx("span",{style:{fontSize:11,fontFamily:ge.body,color:T.dark},children:je.label})]}),b.jsx("span",{style:{fontSize:12,fontFamily:ge.body,fontWeight:700,color:T.navy},children:Ee(je.value,je.format)})]},je.label)})}),U.recommendation&&b.jsx("div",{style:{marginTop:10,padding:"8px 10px",background:T.white,borderRadius:5,fontSize:11,fontFamily:ge.body,color:T.dark,lineHeight:1.5,borderLeft:`3px solid ${T.gold}`},children:U.recommendation})]},U.name)})})]}),(le.quickWins.length>0||le.recommendations.length>0)&&b.jsxs("div",{children:[b.jsx(Ke,{label:"D.",sectionKey:"recommendations",title:"Operational Recommendations"}),h.recommendations&&b.jsxs("div",{children:[le.quickWins.length>0&&b.jsxs("div",{style:{marginBottom:16},children:[b.jsxs("div",{style:{fontSize:10,fontWeight:700,color:T.navy,letterSpacing:1,textTransform:"uppercase",fontFamily:ge.body,marginBottom:8,display:"flex",alignItems:"center",gap:6},children:[b.jsx("span",{style:{background:T.green,color:T.white,padding:"2px 8px",borderRadius:10,fontSize:9,letterSpacing:.5},children:"QUICK WINS"}),"Low-Effort, High-Impact"]}),b.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:le.quickWins.map((U,Ae)=>b.jsx("div",{style:{background:T.cream,borderRadius:8,border:`1px solid ${T.taupe}`,padding:"12px 18px",display:"flex",gap:14,alignItems:"flex-start",borderLeft:`4px solid ${T.green}`},children:b.jsxs("div",{style:{flex:1},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:4},children:[b.jsx("span",{style:{fontFamily:ge.body,fontSize:13,fontWeight:700,color:T.navy},children:U.title}),b.jsx("span",{style:{fontSize:9,fontWeight:700,fontFamily:ge.body,color:T.white,background:Te[U.priority],padding:"2px 8px",borderRadius:10,letterSpacing:.5,textTransform:"uppercase"},children:U.priority})]}),b.jsx("p",{style:{margin:0,fontSize:12,fontFamily:ge.body,color:T.dark,lineHeight:1.6},children:U.description})]})},`qw-${Ae}`))})]}),b.jsx("div",{style:{display:"flex",flexDirection:"column",gap:10},children:le.recommendations.map((U,Ae)=>b.jsxs("div",{style:{background:T.cream,borderRadius:8,border:`1px solid ${T.taupe}`,padding:"14px 20px",display:"flex",gap:16,alignItems:"flex-start"},children:[b.jsx("div",{style:{width:28,height:28,borderRadius:6,background:T.navy,display:"flex",alignItems:"center",justifyContent:"center",fontFamily:ge.heading,fontSize:14,color:T.gold,flexShrink:0},children:Ae+1}),b.jsxs("div",{style:{flex:1},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:4},children:[b.jsx("span",{style:{fontFamily:ge.body,fontSize:13,fontWeight:700,color:T.navy},children:U.title}),b.jsx("span",{style:{fontSize:9,fontWeight:700,fontFamily:ge.body,color:T.white,background:Te[U.priority],padding:"2px 8px",borderRadius:10,letterSpacing:.5,textTransform:"uppercase"},children:U.priority})]}),b.jsx("p",{style:{margin:0,fontSize:12,fontFamily:ge.body,color:T.dark,lineHeight:1.6},children:U.description})]})]},Ae))}),b.jsxs("div",{style:{marginTop:16,background:T.cream,borderRadius:8,border:`1px solid ${T.taupe}`,padding:"14px 18px",fontFamily:ge.body,fontSize:12,color:T.dark,lineHeight:1.7},children:[b.jsx("div",{style:{fontSize:9,fontWeight:700,color:T.gold,letterSpacing:1.2,textTransform:"uppercase",marginBottom:6},children:"4-Week Trend Summary"}),b.jsxs("p",{style:{margin:"0 0 4px"},children:[b.jsx("strong",{children:"Revenue"})," is"," ",b.jsx("span",{style:{color:Ot(le.revTrend),fontWeight:600},children:dt(le.revTrend)})," ","(",le.revTrend>0?"+":"",le.revTrend.toFixed(1),"%)."," ",b.jsx("strong",{children:"Patient volume"})," is"," ",b.jsx("span",{style:{color:Ot(le.ptTrend),fontWeight:600},children:dt(le.ptTrend)})," ","(",le.ptTrend>0?"+":"",le.ptTrend.toFixed(1),"%)."]}),le.improved.length>0&&b.jsxs("p",{style:{margin:"0 0 2px"},children:[b.jsx("span",{style:{color:T.green,fontWeight:600},children:"Meeting goals:"})," ",le.improved.join(", "),"."]}),le.declined.length>0&&b.jsxs("p",{style:{margin:0},children:[b.jsx("span",{style:{color:T.red,fontWeight:600},children:"Below goals:"})," ",le.declined.join(", "),"."]})]})]})]})]})]})}function Qh({initialLocTypes:e,initialPractices:t,initialLocations:r}){const[n,i]=_.useState([]),[o,a]=_.useState([]),[l,s]=_.useState([]),[u,f]=_.useState([]),[c,d]=_.useState([]),[p,g]=_.useState([]),[y,m]=_.useState([]),[h,v]=_.useState([]),[x,P]=_.useState([]),[w,S]=_.useState([]),[A,E]=_.useState([]),[R,K]=_.useState([]),[H,F]=_.useState([]),[ae,te]=_.useState([]),[X,ne]=_.useState([]),[ce,Q]=_.useState([]),[ie,fe]=_.useState([]),[le,Se]=_.useState(!0),[Ee,nt]=_.useState(e||[]),[it,Ot]=_.useState(t||[]),[dt,Zt]=_.useState(r||[]),Te=!!(e!=null&&e.length||t!=null&&t.length||r!=null&&r.length),Ke=_.useRef(!1),pe="Total",q=(r==null?void 0:r.length)===1,[U,Ae]=_.useState(q?null:[]),[je,Fe]=_.useState(q?null:[]),Ie=q?r:[pe],[se,$t]=_.useState("weekly"),[_e,xt]=_.useState(12),[Ce,We]=_.useState({}),[Rt,He]=_.useState({section1:!1,section2:!1,section3:!1,section4:!1,appendix:!1}),_r=k=>He(re=>({...re,[k]:!re[k]})),Qe=k=>{const re=Ce[k];return{mode:(re==null?void 0:re.mode)||se,count:(re==null?void 0:re.count)||_e}},[Jt,Ls]=_.useState(Ie),[Nr,rn]=_.useState(Ie),[Lr,Tr]=_.useState(Ie),[$r,ci]=_.useState(Ie),[or,Bs]=_.useState(Ie),[wr,nf]=_.useState(Ie),[hr,of]=_.useState(Ie),[Bn,af]=_.useState(Ie),[Vr,lf]=_.useState(Ie),[gn,Xa]=_.useState(Ie),[Br,Fs]=_.useState(Ie),[mn,zs]=_.useState(Ie),[bn,sf]=_.useState(Ie),[Fn,Qa]=_.useState(Ie),[xn,Ws]=_.useState(Ie),[io,Us]=_.useState(Ie),[Kr,uf]=_.useState(Ie),[oo,Hs]=_.useState(Ie),[ao,cf]=_.useState(Ie),[Vs,wn]=_.useState(null),[Ks,zn]=_.useState(null),[lo,nn]=_.useState(Ie),[Za,Ja]=_.useState(null),[el,so]=_.useState([]),[Gs,Ys]=_.useState(null),[Wn,ff]=_.useState(Ie),[uo,qs]=_.useState(null),[co,df]=_.useState(Ie),[fo,Xs]=_.useState(null),[ia,tl]=_.useState(null),[on,po]=_.useState(null),[fi,oa]=_.useState(null),[_i,Qs]=_.useState(null),[Un,ho]=_.useState(null),[vo,aa]=_.useState(null),[Hn,rl]=_.useState(null),[yo,Zs]=_.useState(null),[Ti,nl]=_.useState(null),[go,Jh]=_.useState(null),[pt,di]=_.useState(null);_.useEffect(()=>{Promise.all([fetch("/data/performance/locations.json").then(k=>k.json()),fetch("/data/performance/weekly-metrics.json").then(k=>k.json()),fetch("/data/performance/daily-metrics.json").then(k=>k.json()).catch(()=>[]),fetch("/data/performance/weekly-ops.json").then(k=>k.json()),fetch("/data/performance/weekly-btx.json").then(k=>k.json()).catch(()=>[]),fetch("/data/performance/weekly-budget.json").then(k=>k.json()).catch(()=>[]),fetch("/data/performance/weekly-inj-rev-provider.json").then(k=>k.json()).catch(()=>[]),fetch("/data/performance/weekly-btx-provider.json").then(k=>k.json()).catch(()=>[]),fetch("/data/performance/weekly-ntx-filler.json").then(k=>k.json()).catch(()=>[]),fetch("/data/performance/weekly-syringe-loc.json").then(k=>k.json()).catch(()=>[]),fetch("/data/performance/weekly-syringe-provider.json").then(k=>k.json()).catch(()=>[]),fetch("/data/performance/weekly-rev-coll-provider.json").then(k=>k.json()).catch(()=>[]),fetch("/data/performance/weekly-provider-hours.json").then(k=>k.json()).catch(()=>[]),fetch("/data/performance/weekly-utilization.json").then(k=>k.json()).catch(()=>[]),fetch("/data/performance/weekly-metrics-provider.json").then(k=>k.json()).catch(()=>[]),fetch("/data/performance/weekly-ops-provider.json").then(k=>k.json()).catch(()=>[]),fetch("/data/performance/weekly-util-hours-provider.json").then(k=>k.json()).catch(()=>[])]).then(([k,re,Z,ee,ve,Oe,ue,V,G,z,C,W,j,$,O,M,I])=>{i(k),a(re),s(Z),f(ee),d(ve),g(Oe),m(ue),v(V),P(G),S(z),E(C),K(W),F(j),te($),ne(O),Q(M),fe(I),Se(!1),setTimeout(()=>{Ke.current=!0},100)})},[]);const Js=_.useMemo(()=>{const k=new Set;return n.forEach(re=>{(re.types||(re.type?[re.type]:[])).forEach(ee=>k.add(ee))}),[...k].sort()},[n]),eu=_.useMemo(()=>{let k=n;return Ee.length&&(k=n.filter(re=>(re.types||(re.type?[re.type]:[])).some(ee=>Ee.includes(ee)))),[...new Set(k.map(re=>re.practice))].sort()},[n,Ee]);_.useEffect(()=>{Te&&!Ke.current||Ot(k=>k.filter(re=>eu.includes(re)))},[eu]);const Vn=_.useMemo(()=>n.filter(k=>!(Ee.length&&!(k.types||(k.type?[k.type]:[])).some(Z=>Ee.includes(Z))||it.length&&!it.includes(k.practice)||dt.length&&!dt.includes(k.name))),[n,Ee,it,dt]),me=_.useMemo(()=>Vn.map(k=>k.name),[Vn]),Et=Ee.length>0||it.length>0||dt.length>0,il=[Ls,rn,Tr,ci,Bs,nf,of,af,lf,Xa,Fs,Qa,Ws,Hs,cf,zs,sf,nn,Us,ff,df];_.useEffect(()=>{if(Te&&!Ke.current)return;const k=re=>re(Z=>Z.filter(ee=>ee==="Total"||me.includes(ee)));il.forEach(k),Zt(re=>re.filter(Z=>me.includes(Z))),Et?(Ae(null),Fe(null),wn(null),zn(null),Ja(null),Ys(null),tl(null),qs(null),Xs(null),po(null),oa(null),Qs(null),ho(null),aa(null),Zs(null),nl(null)):(Ae([]),Fe([]),wn([]),zn([]),Ja([]),Ys(null),tl(null),qs(null),Xs(null),po(null),oa(null),Qs(null),ho(null),aa(null),Zs(null),nl(null))},[me,Et]);const tu=_.useRef([]);_.useEffect(()=>{const k=tu.current,re=dt.filter(ee=>!k.includes(ee)),Z=k.filter(ee=>!dt.includes(ee));if(re.length>0&&il.forEach(ee=>ee(ve=>[...new Set([...ve,...re])])),Z.length>0){const ee=new Set(Z);il.forEach(ve=>ve(Oe=>Oe.filter(ue=>!ee.has(ue))))}tu.current=[...dt]},[dt]),_.useMemo(()=>XJ(n,u),[n,u]);const pf=_.useMemo(()=>{if(!o.length)return"";const k=[...new Set(o.map(ve=>ve.w))].sort(),re=k[0],Z=k[k.length-1],ee=ve=>`${new Date(ve+"T00:00:00").toLocaleDateString("en-US",{month:"short",day:"numeric"})}`;return`${ee(re)} – ${ee(Z)}, ${new Date(Z+"T00:00:00").getFullYear()}`},[o]),hf=_.useMemo(()=>{const k=[];return Ee.length&&k.push(Ee.join(", ")),it.length&&k.push(it.join(", ")),k.length?k.join(" · "):"All Locations"},[Ee,it]),zt=_.useMemo(()=>{const k=n.map(Z=>Z.name).sort(),re={};return k.forEach((Z,ee)=>{re[Z]=_n[ee%_n.length]}),re},[n]),L=_.useMemo(()=>dt.length>0?dt:me,[me,dt]),Y=_.useMemo(()=>{const k=new Set(L),re=new Set;return y.filter(Z=>k.has(Z.c)).forEach(Z=>re.add(Z.pr)),[...re].sort()},[y,L]),$e=_.useMemo(()=>{const k=new Set(L),re=new Set;return h.filter(Z=>k.has(Z.c)).forEach(Z=>re.add(Z.pr)),[...re].sort()},[h,L]),Me=_.useMemo(()=>{const k=[...new Set([...Y,...$e])].sort(),re={};return k.forEach((Z,ee)=>{re[Z]=_n[ee%_n.length]}),re},[Y,$e]),{revWeekData:Ve,revWeekSeries:Ne,revWeekIsProviderMode:tt}=_.useMemo(()=>{const k=new Set(me);if(q&&uo&&uo.length>0&&uo.lengthk.has(O.c)&&V.has(O.pr)),z=[...new Set(G.map(O=>O.w))].sort(),{mode:C,count:W}=Qe("revWeek"),j=rt(z,C,W),$=[...V].sort();if(j.isMonthly){const O=new Date,M=`${O.getFullYear()}-${String(O.getMonth()+1).padStart(2,"0")}`;return{revWeekData:j.periods.map(B=>{const N={week:at(B,B===M)},he=G.filter(J=>J.w.startsWith(B));return $.forEach(J=>{const ye=he.filter(de=>de.pr===J).reduce((de,we)=>de+(we.s||0),0);N[J]=ye||null}),N}),revWeekSeries:$,revWeekIsProviderMode:!0}}else return{revWeekData:j.periods.map(M=>{const I={week:ft(M)},B=G.filter(N=>N.w===M);return $.forEach(N=>{const he=B.filter(J=>J.pr===N).reduce((J,ye)=>J+(ye.s||0),0);I[N]=he||null}),I}),revWeekSeries:$,revWeekIsProviderMode:!0}}const Z=o.filter(V=>k.has(V.c)),ee=[...new Set(Z.map(V=>V.w))].sort(),{mode:ve,count:Oe}=Qe("revWeek"),ue=rt(ee,ve,Oe);if(ue.isMonthly){const V=new Date,G=`${V.getFullYear()}-${String(V.getMonth()+1).padStart(2,"0")}`,z=ue.periods.map(W=>{const j=Z.filter(M=>M.w.startsWith(W)),$=j.reduce((M,I)=>M+(I.s||0),0),O={week:at(W,W===G),Total:$};return Wn.filter(M=>M!=="Total").forEach(M=>{const I=j.filter(B=>B.c===M).reduce((B,N)=>B+(N.s||0),0);O[M]=I||null}),O}),C=Wn.filter(W=>W!=="Total");return{revWeekData:z,revWeekSeries:[...Wn.includes("Total")?["Total"]:[],...C],revWeekIsProviderMode:!1}}else{const G=ue.periods.map(C=>{const W=Z.filter(O=>O.w===C),j=W.reduce((O,M)=>O+(M.s||0),0),$={week:ft(C),Total:j};return Wn.filter(O=>O!=="Total").forEach(O=>{const M=W.find(I=>I.c===O);$[O]=M?M.s||0:null}),$}),z=Wn.filter(C=>C!=="Total");return{revWeekData:G,revWeekSeries:[...Wn.includes("Total")?["Total"]:[],...z],revWeekIsProviderMode:!1}}},[o,X,me,Wn,uo,q,Y,se,_e,Ce]),{avgRevData:Ct,avgRevSeries:ot,avgRevIsProviderMode:ut}=_.useMemo(()=>{const k=new Set(me);if(q&&fi&&fi.length>0&&fi.lengthk.has(O.c)&&V.has(O.pr)),z=[...new Set(G.map(O=>O.w))].sort(),{mode:C,count:W}=Qe("avgRev"),j=rt(z,C,W),$=[...V].sort();if(j.isMonthly){const O=new Date,M=`${O.getFullYear()}-${String(O.getMonth()+1).padStart(2,"0")}`;return{avgRevData:j.periods.map(B=>{const N={week:at(B,B===M)},he=G.filter(J=>J.w.startsWith(B));return $.forEach(J=>{const ye=he.filter(Le=>Le.pr===J),de=ye.reduce((Le,ht)=>Le+(ht.s||0),0),we=ye.reduce((Le,ht)=>Le+(ht.p||0),0);we>0&&(N[J]=+(de/we).toFixed(2))}),N}),avgRevSeries:$,avgRevIsProviderMode:!0}}else return{avgRevData:j.periods.map(M=>{const I={week:ft(M)},B=G.filter(N=>N.w===M);return $.forEach(N=>{const he=B.filter(de=>de.pr===N),J=he.reduce((de,we)=>de+(we.s||0),0),ye=he.reduce((de,we)=>de+(we.p||0),0);ye>0&&(I[N]=+(J/ye).toFixed(2))}),I}),avgRevSeries:$,avgRevIsProviderMode:!0}}const Z=o.filter(V=>k.has(V.c)),ee=[...new Set(Z.map(V=>V.w))].sort(),{mode:ve,count:Oe}=Qe("avgRev"),ue=rt(ee,ve,Oe);if(ue.isMonthly){const V=ue.periods,G=new Date,z=`${G.getFullYear()}-${String(G.getMonth()+1).padStart(2,"0")}`,C=V.map(j=>{const $=Z.filter(B=>B.w.startsWith(j)),O=$.reduce((B,N)=>B+(N.s||0),0),M=$.reduce((B,N)=>B+(N.p||0),0),I={week:at(j,j===z),Total:M>0?+(O/M).toFixed(2):null};return Lr.forEach(B=>{const N=$.filter(ye=>ye.c===B),he=N.reduce((ye,de)=>ye+(de.s||0),0),J=N.reduce((ye,de)=>ye+(de.p||0),0);J>0&&(I[B]=+(he/J).toFixed(2))}),I}),W=Lr.filter(j=>j!=="Total");return{avgRevData:C,avgRevSeries:[...Lr.includes("Total")?["Total"]:[],...W],avgRevIsProviderMode:!1}}else{const G=ue.periods.map(C=>{const W=Z.filter(M=>M.w===C),j=W.reduce((M,I)=>M+(I.s||0),0),$=W.reduce((M,I)=>M+(I.p||0),0),O={week:ft(C),Total:$>0?+(j/$).toFixed(2):null};return Lr.forEach(M=>{const I=W.find(B=>B.c===M);I&&I.p>0&&(O[M]=+(I.s/I.p).toFixed(2))}),O}),z=Lr.filter(C=>C!=="Total");return{avgRevData:G,avgRevSeries:[...Lr.includes("Total")?["Total"]:[],...z],avgRevIsProviderMode:!1}}},[o,X,me,Lr,fi,q,Y,se,_e,Ce]),{uniquePtData:er,uniquePtSeries:vr,uniquePtIsProviderMode:ar}=_.useMemo(()=>{const k=new Set(me);if(q&&on&&on.length>0&&on.lengthk.has(O.c)&&V.has(O.pr)),z=[...new Set(G.map(O=>O.w))].sort(),{mode:C,count:W}=Qe("uniquePt"),j=rt(z,C,W),$=[...V].sort();if(j.isMonthly){const O=new Date,M=`${O.getFullYear()}-${String(O.getMonth()+1).padStart(2,"0")}`;return{uniquePtData:j.periods.map(B=>{const N={week:at(B,B===M)},he=G.filter(J=>J.w.startsWith(B));return $.forEach(J=>{const ye=he.filter(de=>de.pr===J);N[J]=ye.reduce((de,we)=>de+(we.p||0),0)}),N}),uniquePtSeries:$,uniquePtIsProviderMode:!0}}else return{uniquePtData:j.periods.map(M=>{const I={week:ft(M)},B=G.filter(N=>N.w===M);return $.forEach(N=>{const he=B.filter(J=>J.pr===N);I[N]=he.reduce((J,ye)=>J+(ye.p||0),0)}),I}),uniquePtSeries:$,uniquePtIsProviderMode:!0}}const Z=o.filter(V=>k.has(V.c)),ee=[...new Set(Z.map(V=>V.w))].sort(),{mode:ve,count:Oe}=Qe("uniquePt"),ue=rt(ee,ve,Oe);if(ue.isMonthly){const V=ue.periods,G=new Date,z=`${G.getFullYear()}-${String(G.getMonth()+1).padStart(2,"0")}`,C=V.map(j=>{const $=Z.filter(M=>M.w.startsWith(j)),O={week:at(j,j===z),Total:$.reduce((M,I)=>M+(I.p||0),0)};return $r.forEach(M=>{const I=$.filter(B=>B.c===M);O[M]=I.reduce((B,N)=>B+(N.p||0),0)}),O}),W=$r.filter(j=>j!=="Total");return{uniquePtData:C,uniquePtSeries:[...$r.includes("Total")?["Total"]:[],...W],uniquePtIsProviderMode:!1}}else{const G=ue.periods.map(C=>{const W=Z.filter($=>$.w===C),j={week:ft(C),Total:W.reduce(($,O)=>$+(O.p||0),0)};return $r.forEach($=>{const O=W.find(M=>M.c===$);O&&(j[$]=O.p||0)}),j}),z=$r.filter(C=>C!=="Total");return{uniquePtData:G,uniquePtSeries:[...$r.includes("Total")?["Total"]:[],...z],uniquePtIsProviderMode:!1}}},[o,X,me,$r,on,q,Y,se,_e,Ce]),{retailData:tr,retailSeries:$i,retailIsProviderMode:Kn}=_.useMemo(()=>{const k=new Set(me);if(q&&_i&&_i.length>0&&_i.lengthk.has(O.c)&&V.has(O.pr)),z=[...new Set(G.map(O=>O.w))].sort(),{mode:C,count:W}=Qe("retail"),j=rt(z,C,W),$=[...V].sort();if(j.isMonthly){const O=new Date,M=`${O.getFullYear()}-${String(O.getMonth()+1).padStart(2,"0")}`;return{retailData:j.periods.map(B=>{const N={week:at(B,B===M)},he=G.filter(J=>J.w.startsWith(B));return $.forEach(J=>{const ye=he.filter(de=>de.pr===J);N[J]=ye.reduce((de,we)=>de+(we.rt||0),0)}),N}),retailSeries:$,retailIsProviderMode:!0}}else return{retailData:j.periods.map(M=>{const I={week:ft(M)},B=G.filter(N=>N.w===M);return $.forEach(N=>{const he=B.filter(J=>J.pr===N);I[N]=he.reduce((J,ye)=>J+(ye.rt||0),0)}),I}),retailSeries:$,retailIsProviderMode:!0}}const Z=o.filter(V=>k.has(V.c)),ee=[...new Set(Z.map(V=>V.w))].sort(),{mode:ve,count:Oe}=Qe("retail"),ue=rt(ee,ve,Oe);if(ue.isMonthly){const V=ue.periods,G=new Date,z=`${G.getFullYear()}-${String(G.getMonth()+1).padStart(2,"0")}`,C=V.map(j=>{const $=Z.filter(M=>M.w.startsWith(j)),O={week:at(j,j===z),Total:$.reduce((M,I)=>M+(I.rt||0),0)};return or.forEach(M=>{const I=$.filter(B=>B.c===M);O[M]=I.reduce((B,N)=>B+(N.rt||0),0)}),O}),W=or.filter(j=>j!=="Total");return{retailData:C,retailSeries:[...or.includes("Total")?["Total"]:[],...W],retailIsProviderMode:!1}}else{const G=ue.periods.map(C=>{const W=Z.filter($=>$.w===C),j={week:ft(C),Total:W.reduce(($,O)=>$+(O.rt||0),0)};return or.forEach($=>{const O=W.find(M=>M.c===$);O&&(j[$]=O.rt||0)}),j}),z=or.filter(C=>C!=="Total");return{retailData:G,retailSeries:[...or.includes("Total")?["Total"]:[],...z],retailIsProviderMode:!1}}},[o,X,me,or,_i,q,Y,se,_e,Ce]),{retailPctData:la,retailPctSeries:mo,retailPctIsProviderMode:Ei}=_.useMemo(()=>{const k=new Set(me);if(q&&Un&&Un.length>0&&Un.lengthk.has(O.c)&&V.has(O.pr)),z=[...new Set(G.map(O=>O.w))].sort(),{mode:C,count:W}=Qe("retailPct"),j=rt(z,C,W),$=[...V].sort();if(j.isMonthly){const O=new Date,M=`${O.getFullYear()}-${String(O.getMonth()+1).padStart(2,"0")}`;return{retailPctData:j.periods.map(B=>{const N={week:at(B,B===M)},he=G.filter(J=>J.w.startsWith(B));return $.forEach(J=>{const ye=he.filter(Le=>Le.pr===J),de=ye.reduce((Le,ht)=>Le+(ht.s||0),0),we=ye.reduce((Le,ht)=>Le+(ht.rt||0),0);de>0&&(N[J]=+(we/de*100).toFixed(1))}),N}),retailPctSeries:$,retailPctIsProviderMode:!0}}else return{retailPctData:j.periods.map(M=>{const I={week:ft(M)},B=G.filter(N=>N.w===M);return $.forEach(N=>{const he=B.filter(de=>de.pr===N),J=he.reduce((de,we)=>de+(we.s||0),0),ye=he.reduce((de,we)=>de+(we.rt||0),0);J>0&&(I[N]=+(ye/J*100).toFixed(1))}),I}),retailPctSeries:$,retailPctIsProviderMode:!0}}const Z=o.filter(V=>k.has(V.c)),ee=[...new Set(Z.map(V=>V.w))].sort(),{mode:ve,count:Oe}=Qe("retailPct"),ue=rt(ee,ve,Oe);if(ue.isMonthly){const V=ue.periods,G=new Date,z=`${G.getFullYear()}-${String(G.getMonth()+1).padStart(2,"0")}`,C=V.map(j=>{const $=Z.filter(B=>B.w.startsWith(j)),O=$.reduce((B,N)=>B+(N.s||0),0),M=$.reduce((B,N)=>B+(N.rt||0),0),I={week:at(j,j===z),Total:O>0?+(M/O*100).toFixed(1):null};return wr.forEach(B=>{const N=$.filter(ye=>ye.c===B),he=N.reduce((ye,de)=>ye+(de.s||0),0),J=N.reduce((ye,de)=>ye+(de.rt||0),0);he>0&&(I[B]=+(J/he*100).toFixed(1))}),I}),W=wr.filter(j=>j!=="Total");return{retailPctData:C,retailPctSeries:[...wr.includes("Total")?["Total"]:[],...W],retailPctIsProviderMode:!1}}else{const G=ue.periods.map(C=>{const W=Z.filter(M=>M.w===C),j=W.reduce((M,I)=>M+(I.s||0),0),$=W.reduce((M,I)=>M+(I.rt||0),0),O={week:ft(C),Total:j>0?+($/j*100).toFixed(1):null};return wr.forEach(M=>{const I=W.find(B=>B.c===M);I&&I.s>0&&(O[M]=+(I.rt/I.s*100).toFixed(1))}),O}),z=wr.filter(C=>C!=="Total");return{retailPctData:G,retailPctSeries:[...wr.includes("Total")?["Total"]:[],...z],retailPctIsProviderMode:!1}}},[o,X,me,wr,Un,q,Y,se,_e,Ce]),{injSalesData:Gn,injSalesSeries:pi,injSalesIsProviderMode:ol}=_.useMemo(()=>{const k=new Set(me);if(q&&go&&go.length>0&&go.lengthk.has(O.c)&&V.has(O.pr)),z=[...new Set(G.map(O=>O.w))].sort(),{mode:C,count:W}=Qe("injSales"),j=rt(z,C,W),$=[...V].sort();if(j.isMonthly){const O=new Date,M=`${O.getFullYear()}-${String(O.getMonth()+1).padStart(2,"0")}`;return{injSalesData:j.periods.map(B=>{const N={week:at(B,B===M)},he=G.filter(J=>J.w.startsWith(B));return $.forEach(J=>{const ye=he.filter(de=>de.pr===J);N[J]=ye.reduce((de,we)=>de+(we.inj||0),0)}),N}),injSalesSeries:$,injSalesIsProviderMode:!0}}else return{injSalesData:j.periods.map(M=>{const I={week:ft(M)},B=G.filter(N=>N.w===M);return $.forEach(N=>{const he=B.filter(J=>J.pr===N);I[N]=he.reduce((J,ye)=>J+(ye.inj||0),0)}),I}),injSalesSeries:$,injSalesIsProviderMode:!0}}const Z=o.filter(V=>k.has(V.c)),ee=[...new Set(Z.map(V=>V.w))].sort(),{mode:ve,count:Oe}=Qe("injSales"),ue=rt(ee,ve,Oe);if(ue.isMonthly){const V=ue.periods,G=new Date,z=`${G.getFullYear()}-${String(G.getMonth()+1).padStart(2,"0")}`,C=V.map(j=>{const $=Z.filter(M=>M.w.startsWith(j)),O={week:at(j,j===z),Total:$.reduce((M,I)=>M+(I.inj||0),0)};return hr.forEach(M=>{const I=$.filter(B=>B.c===M);O[M]=I.reduce((B,N)=>B+(N.inj||0),0)}),O}),W=hr.filter(j=>j!=="Total");return{injSalesData:C,injSalesSeries:[...hr.includes("Total")?["Total"]:[],...W],injSalesIsProviderMode:!1}}else{const G=ue.periods.map(C=>{const W=Z.filter($=>$.w===C),j={week:ft(C),Total:W.reduce(($,O)=>$+(O.inj||0),0)};return hr.forEach($=>{const O=W.find(M=>M.c===$);O&&(j[$]=O.inj||0)}),j}),z=hr.filter(C=>C!=="Total");return{injSalesData:G,injSalesSeries:[...hr.includes("Total")?["Total"]:[],...z],injSalesIsProviderMode:!1}}},[o,X,me,hr,go,q,Y,se,_e,Ce]),{injPctData:ru,injPctSeries:nu,injPctIsProviderMode:be}=_.useMemo(()=>{const k=new Set(me);if(q&&pt&&pt.length>0&&pt.lengthk.has(O.c)&&V.has(O.pr)),z=[...new Set(G.map(O=>O.w))].sort(),{mode:C,count:W}=Qe("injPct"),j=rt(z,C,W),$=[...V].sort();if(j.isMonthly){const O=new Date,M=`${O.getFullYear()}-${String(O.getMonth()+1).padStart(2,"0")}`;return{injPctData:j.periods.map(B=>{const N={week:at(B,B===M)},he=G.filter(J=>J.w.startsWith(B));return $.forEach(J=>{const ye=he.filter(Le=>Le.pr===J),de=ye.reduce((Le,ht)=>Le+(ht.s||0),0),we=ye.reduce((Le,ht)=>Le+(ht.inj||0),0);de>0&&(N[J]=+(we/de*100).toFixed(1))}),N}),injPctSeries:$,injPctIsProviderMode:!0}}else return{injPctData:j.periods.map(M=>{const I={week:ft(M)},B=G.filter(N=>N.w===M);return $.forEach(N=>{const he=B.filter(de=>de.pr===N),J=he.reduce((de,we)=>de+(we.s||0),0),ye=he.reduce((de,we)=>de+(we.inj||0),0);J>0&&(I[N]=+(ye/J*100).toFixed(1))}),I}),injPctSeries:$,injPctIsProviderMode:!0}}const Z=o.filter(V=>k.has(V.c)),ee=[...new Set(Z.map(V=>V.w))].sort(),{mode:ve,count:Oe}=Qe("injPct"),ue=rt(ee,ve,Oe);if(ue.isMonthly){const V=ue.periods,G=new Date,z=`${G.getFullYear()}-${String(G.getMonth()+1).padStart(2,"0")}`,C=V.map(j=>{const $=Z.filter(B=>B.w.startsWith(j)),O=$.reduce((B,N)=>B+(N.s||0),0),M=$.reduce((B,N)=>B+(N.inj||0),0),I={week:at(j,j===z),Total:O>0?+(M/O*100).toFixed(1):null};return Bn.forEach(B=>{const N=$.filter(ye=>ye.c===B),he=N.reduce((ye,de)=>ye+(de.s||0),0),J=N.reduce((ye,de)=>ye+(de.inj||0),0);he>0&&(I[B]=+(J/he*100).toFixed(1))}),I}),W=Bn.filter(j=>j!=="Total");return{injPctData:C,injPctSeries:[...Bn.includes("Total")?["Total"]:[],...W],injPctIsProviderMode:!1}}else{const G=ue.periods.map(C=>{const W=Z.filter(M=>M.w===C),j=W.reduce((M,I)=>M+(I.s||0),0),$=W.reduce((M,I)=>M+(I.inj||0),0),O={week:ft(C),Total:j>0?+($/j*100).toFixed(1):null};return Bn.forEach(M=>{const I=W.find(B=>B.c===M);I&&I.s>0&&(O[M]=+(I.inj/I.s*100).toFixed(1))}),O}),z=Bn.filter(C=>C!=="Total");return{injPctData:G,injPctSeries:[...Bn.includes("Total")?["Total"]:[],...z],injPctIsProviderMode:!1}}},[o,X,me,Bn,pt,q,Y,se,_e,Ce]),{btxData:ze,btxSeries:Ye}=_.useMemo(()=>{if(!c.length)return{btxData:null,btxSeries:[]};const k=new Set(me),re=c.filter(ue=>k.has(ue.c)),Z=[...new Set(re.map(ue=>ue.w))].sort(),{mode:ee,count:ve}=Qe("btxLoc"),Oe=rt(Z,ee,ve);if(Oe.isMonthly){const ue=Oe.periods,V=new Date,G=`${V.getFullYear()}-${String(V.getMonth()+1).padStart(2,"0")}`,z=ue.map(W=>{const j=re.filter(I=>I.w.startsWith(W)),$=j.reduce((I,B)=>I+(B.b||0),0),O=j.filter(I=>I.b!=null).length,M={week:at(W,W===G),Total:O>0?+($/O).toFixed(1):null};return Vr.forEach(I=>{const B=j.filter(J=>J.c===I),N=B.reduce((J,ye)=>J+(ye.b||0),0),he=B.filter(J=>J.b!=null).length;he>0&&(M[I]=+(N/he).toFixed(1))}),M}),C=Vr.filter(W=>W!=="Total");return{btxData:z,btxSeries:[...Vr.includes("Total")?["Total"]:[],...C]}}else{const V=Oe.periods.map(z=>{const C=re.filter(O=>O.w===z),W=C.reduce((O,M)=>O+(M.b||0),0),j=C.filter(O=>O.b!=null).length,$={week:ft(z),Total:j>0?+(W/j).toFixed(1):null};return Vr.forEach(O=>{const M=C.find(I=>I.c===O);M&&($[O]=M.b)}),$}),G=Vr.filter(z=>z!=="Total");return{btxData:V,btxSeries:[...Vr.includes("Total")?["Total"]:[],...G]}}},[c,me,Vr,se,_e,Ce]),{utilizationChartData:ct,utilizationSeries:ke,utilizationIsProviderMode:Je}=_.useMemo(()=>{const k=new Set(me);if(q&&vo&&vo.length>0&&vo.lengthk.has(O.c)&&V.has(O.pr)),z=[...new Set(G.map(O=>O.w))].sort(),{mode:C,count:W}=Qe("utilization"),j=rt(z,C,W),$=[...V].sort();if(j.isMonthly){const O=new Date,M=`${O.getFullYear()}-${String(O.getMonth()+1).padStart(2,"0")}`;return{utilizationChartData:j.periods.map(B=>{const N={week:at(B,B===M)},he=G.filter(J=>J.w.startsWith(B));return $.forEach(J=>{const de=he.filter(we=>we.pr===J).map(we=>we.ur).filter(we=>we!=null&&we>0);de.length&&(N[J]=+(de.reduce((we,Le)=>we+Le,0)/de.length).toFixed(1))}),N}),utilizationSeries:$,utilizationIsProviderMode:!0}}else return{utilizationChartData:j.periods.map(M=>{const I={week:j.formatLabel(M)},B=G.filter(N=>N.w===M);return $.forEach(N=>{const he=B.find(J=>J.pr===N);he&&he.ur!=null&&(I[N]=he.ur)}),I}),utilizationSeries:$,utilizationIsProviderMode:!0}}const Z=ae.filter(V=>k.has(V.c)),ee=[...new Set(Z.map(V=>V.w))].sort(),{mode:ve,count:Oe}=Qe("utilization"),ue=rt(ee,ve,Oe);if(ue.isMonthly){const G=ue.periods.map(C=>{const W=Z.filter(O=>O.w.startsWith(C)),j=W.map(O=>O.ur).filter(O=>O!=null&&O>0),$={week:ue.formatLabel(C+"-01"),Total:j.length?+(j.reduce((O,M)=>O+M,0)/j.length).toFixed(1):null};return mn.forEach(O=>{if(O===pe)return;const I=W.filter(B=>B.c===O).map(B=>B.ur).filter(B=>B>0);I.length&&($[O]=+(I.reduce((B,N)=>B+N,0)/I.length).toFixed(1))}),$}),z=mn.filter(C=>C!==pe);return{utilizationChartData:G,utilizationSeries:[...mn.includes(pe)?[pe]:[],...z],utilizationIsProviderMode:!1}}else{const G=ue.periods.map(C=>{const W=Z.filter(O=>O.w===C),j=W.map(O=>O.ur).filter(O=>O!=null&&O>0),$={week:ue.formatLabel(C),Total:j.length?+(j.reduce((O,M)=>O+M,0)/j.length).toFixed(1):null};return mn.forEach(O=>{if(O===pe)return;const M=W.find(I=>I.c===O);M&&($[O]=M.ur)}),$}),z=mn.filter(C=>C!==pe);return{utilizationChartData:G,utilizationSeries:[...mn.includes(pe)?[pe]:[],...z],utilizationIsProviderMode:!1}}},[ae,ie,me,mn,vo,q,Y,se,_e,Ce]),{netHoursChartData:yr,netHoursSeries:bo,netHoursIsProviderMode:al}=_.useMemo(()=>{const k=new Set(me);if(q&&Hn&&Hn.length>0&&Hn.lengthk.has(O.c)&&V.has(O.pr)),z=[...new Set(G.map(O=>O.w))].sort(),{mode:C,count:W}=Qe("netHours"),j=rt(z,C,W),$=[...V].sort();if(j.isMonthly){const O=new Date,M=`${O.getFullYear()}-${String(O.getMonth()+1).padStart(2,"0")}`;return{netHoursChartData:j.periods.map(B=>{const N={week:at(B,B===M)},he=G.filter(J=>J.w.startsWith(B));return $.forEach(J=>{const ye=he.filter(de=>de.pr===J);ye.length&&(N[J]=Math.round(ye.reduce((de,we)=>de+(we.h||0),0)))}),N}),netHoursSeries:$,netHoursIsProviderMode:!0}}else return{netHoursChartData:j.periods.map(M=>{const I={week:j.formatLabel(M)},B=G.filter(N=>N.w===M);return $.forEach(N=>{const he=B.find(J=>J.pr===N);he&&(I[N]=Math.round(he.h))}),I}),netHoursSeries:$,netHoursIsProviderMode:!0}}const Z=H.filter(V=>k.has(V.c)),ee=[...new Set(Z.map(V=>V.w))].sort(),{mode:ve,count:Oe}=Qe("netHours"),ue=rt(ee,ve,Oe);if(ue.isMonthly){const G=ue.periods.map(C=>{const W=Z.filter($=>$.w.startsWith(C)),j={week:ue.formatLabel(C+"-01"),Total:Math.round(W.reduce(($,O)=>$+(O.h||0),0))};return bn.forEach($=>{if($===pe)return;const O=W.filter(M=>M.c===$);O.length&&(j[$]=Math.round(O.reduce((M,I)=>M+(I.h||0),0)))}),j}),z=bn.filter(C=>C!==pe);return{netHoursChartData:G,netHoursSeries:[...bn.includes(pe)?[pe]:[],...z],netHoursIsProviderMode:!1}}else{const G=ue.periods.map(C=>{const W=Z.filter($=>$.w===C),j={week:ue.formatLabel(C),Total:Math.round(W.reduce(($,O)=>$+(O.h||0),0))};return bn.forEach($=>{if($===pe)return;const O=W.find(M=>M.c===$);O&&(j[$]=Math.round(O.h))}),j}),z=bn.filter(C=>C!==pe);return{netHoursChartData:G,netHoursSeries:[...bn.includes(pe)?[pe]:[],...z],netHoursIsProviderMode:!1}}},[H,ie,me,bn,Hn,q,Y,se,_e,Ce]),{cancelData:iu,cancelSeries:ll,cancelIsProviderMode:sa}=_.useMemo(()=>{const k=new Set(me);if(q&&yo&&yo.length>0&&yo.lengthk.has(O.c)&&V.has(O.pr)),z=[...new Set(G.map(O=>O.w))].sort(),{mode:C,count:W}=Qe("cancel"),j=rt(z,C,W),$=[...V].sort();if(j.isMonthly){const O=new Date,M=`${O.getFullYear()}-${String(O.getMonth()+1).padStart(2,"0")}`;return{cancelData:j.periods.map(B=>{const N={week:at(B,B===M)},he=G.filter(J=>J.w.startsWith(B));return $.forEach(J=>{const de=he.filter(we=>we.pr===J).map(we=>we.cn).filter(we=>we!=null);de.length&&(N[J]=+(de.reduce((we,Le)=>we+Le,0)/de.length).toFixed(1))}),N}),cancelSeries:$,cancelIsProviderMode:!0}}else return{cancelData:j.periods.map(M=>{const I={week:j.formatLabel(M)},B=G.filter(N=>N.w===M);return $.forEach(N=>{const he=B.find(J=>J.pr===N);he&&(I[N]=he.cn)}),I}),cancelSeries:$,cancelIsProviderMode:!0}}const Z=u.filter(V=>k.has(V.c)),ee=[...new Set(Z.map(V=>V.w))].sort(),{mode:ve,count:Oe}=Qe("cancel"),ue=rt(ee,ve,Oe);if(ue.isMonthly){const G=ue.periods.map(C=>{const W=Z.filter(O=>O.w.startsWith(C)),j=W.map(O=>O.cn).filter(O=>O!=null),$={week:ue.formatLabel(C+"-01"),Total:j.length?+(j.reduce((O,M)=>O+M,0)/j.length).toFixed(1):null};return Br.forEach(O=>{if(O===pe)return;const I=W.filter(B=>B.c===O).map(B=>B.cn).filter(B=>B!=null);I.length&&($[O]=+(I.reduce((B,N)=>B+N,0)/I.length).toFixed(1))}),$}),z=Br.filter(C=>C!==pe);return{cancelData:G,cancelSeries:[...Br.includes(pe)?[pe]:[],...z],cancelIsProviderMode:!1}}else{const G=ue.periods.map(C=>{const W=Z.filter(O=>O.w===C),j=W.map(O=>O.cn).filter(O=>O!=null),$={week:ue.formatLabel(C),Total:j.length?+(j.reduce((O,M)=>O+M,0)/j.length).toFixed(1):null};return Br.forEach(O=>{if(O===pe)return;const M=W.find(I=>I.c===O);M&&($[O]=M.cn)}),$}),z=Br.filter(C=>C!==pe);return{cancelData:G,cancelSeries:[...Br.includes(pe)?[pe]:[],...z],cancelIsProviderMode:!1}}},[u,ce,me,Br,yo,q,Y,se,_e,Ce]),{noshowData:vf,noshowSeries:sl,noshowIsProviderMode:yf}=_.useMemo(()=>{const k=new Set(me);if(q&&Ti&&Ti.length>0&&Ti.lengthk.has(O.c)&&V.has(O.pr)),z=[...new Set(G.map(O=>O.w))].sort(),{mode:C,count:W}=Qe("noshow"),j=rt(z,C,W),$=[...V].sort();if(j.isMonthly){const O=new Date,M=`${O.getFullYear()}-${String(O.getMonth()+1).padStart(2,"0")}`;return{noshowData:j.periods.map(B=>{const N={week:at(B,B===M)},he=G.filter(J=>J.w.startsWith(B));return $.forEach(J=>{const de=he.filter(we=>we.pr===J).map(we=>we.ns).filter(we=>we!=null);de.length&&(N[J]=+(de.reduce((we,Le)=>we+Le,0)/de.length).toFixed(1))}),N}),noshowSeries:$,noshowIsProviderMode:!0}}else return{noshowData:j.periods.map(M=>{const I={week:j.formatLabel(M)},B=G.filter(N=>N.w===M);return $.forEach(N=>{const he=B.find(J=>J.pr===N);he&&(I[N]=he.ns)}),I}),noshowSeries:$,noshowIsProviderMode:!0}}const Z=u.filter(V=>k.has(V.c)),ee=[...new Set(Z.map(V=>V.w))].sort(),{mode:ve,count:Oe}=Qe("noshow"),ue=rt(ee,ve,Oe);if(ue.isMonthly){const G=ue.periods.map(C=>{const W=Z.filter(O=>O.w.startsWith(C)),j=W.map(O=>O.ns).filter(O=>O!=null),$={week:ue.formatLabel(C+"-01"),Total:j.length?+(j.reduce((O,M)=>O+M,0)/j.length).toFixed(1):null};return Fn.forEach(O=>{if(O===pe)return;const I=W.filter(B=>B.c===O).map(B=>B.ns).filter(B=>B!=null);I.length&&($[O]=+(I.reduce((B,N)=>B+N,0)/I.length).toFixed(1))}),$}),z=Fn.filter(C=>C!==pe);return{noshowData:G,noshowSeries:[...Fn.includes(pe)?[pe]:[],...z],noshowIsProviderMode:!1}}else{const G=ue.periods.map(C=>{const W=Z.filter(O=>O.w===C),j=W.map(O=>O.ns).filter(O=>O!=null),$={week:ue.formatLabel(C),Total:j.length?+(j.reduce((O,M)=>O+M,0)/j.length).toFixed(1):null};return Fn.forEach(O=>{if(O===pe)return;const M=W.find(I=>I.c===O);M&&($[O]=M.ns)}),$}),z=Fn.filter(C=>C!==pe);return{noshowData:G,noshowSeries:[...Fn.includes(pe)?[pe]:[],...z],noshowIsProviderMode:!1}}},[u,ce,me,Fn,Ti,q,Y,se,_e,Ce]),{revChartData:ul,revChartSeries:Cb}=_.useMemo(()=>{const k=new Set(me),re=o.filter(C=>k.has(C.c)),Z={},ee={};re.forEach(C=>{Z[C.w]||(Z[C.w]=0),Z[C.w]+=C.s||0,Jt.includes(C.c)&&(ee[C.w]||(ee[C.w]={}),ee[C.w][C.c]=(ee[C.w][C.c]||0)+(C.s||0))});const ve={};if(p.length){const C=Jt.includes("Total")?k:new Set(Jt.filter(j=>j!=="Total"));p.filter(j=>C.has(j.c)).forEach(j=>{ve[j.w]||(ve[j.w]=0),ve[j.w]+=j.b||0})}const Oe=Object.keys(Z).sort(),{mode:ue,count:V}=Qe("revChart"),G=rt(Oe,ue,V),z=Object.keys(ve).length>0;if(G.isMonthly){const C=G.periods,W=new Date,j=`${W.getFullYear()}-${String(W.getMonth()+1).padStart(2,"0")}`,$=C.map(I=>{const B=Oe.filter(ye=>ye.startsWith(I)),N=B.reduce((ye,de)=>ye+(Z[de]||0),0),he=B.reduce((ye,de)=>ye+(ve[de]||0),0),J={week:at(I,I===j),"All Locations":N};return z&&(J.Budget=he),Jt.filter(ye=>ye!=="Total").forEach(ye=>{J[ye]=B.reduce((de,we)=>{var Le;return de+(((Le=ee[we])==null?void 0:Le[ye])||0)},0)}),J}),O=Jt.filter(I=>I!=="Total"),M=[...Jt.includes("Total")?["All Locations"]:[],...z?["Budget"]:[],...O];return{revChartData:$,revChartSeries:M}}else{const W=G.periods.map(O=>{const M=ve[O]!=null?ve[O]:null,I={week:ft(O),"All Locations":Z[O]||0};return M!=null&&(I.Budget=M),Jt.filter(B=>B!=="Total").forEach(B=>{var N;I[B]=((N=ee[O])==null?void 0:N[B])||0}),I}),j=Jt.filter(O=>O!=="Total"),$=[...Jt.includes("Total")?["All Locations"]:[],...z?["Budget"]:[],...j];return{revChartData:W,revChartSeries:$}}},[o,me,Jt,p,se,_e,Ce]),{collChartData:gf,collChartSeries:ev}=_.useMemo(()=>{const k=new Set(me),re=o.filter(C=>k.has(C.c)),Z={},ee={};re.forEach(C=>{Z[C.w]||(Z[C.w]=0),Z[C.w]+=C.co||0,Nr.includes(C.c)&&(ee[C.w]||(ee[C.w]={}),ee[C.w][C.c]=(ee[C.w][C.c]||0)+(C.co||0))});const ve={};if(p.length){const C=Nr.includes("Total")?k:new Set(Nr.filter(j=>j!=="Total"));p.filter(j=>C.has(j.c)).forEach(j=>{j.cb!=null&&(ve[j.w]||(ve[j.w]=0),ve[j.w]+=j.cb)})}const Oe=Object.keys(Z).sort(),{mode:ue,count:V}=Qe("collChart"),G=rt(Oe,ue,V),z=Object.keys(ve).length>0;if(G.isMonthly){const C=G.periods,W=new Date,j=`${W.getFullYear()}-${String(W.getMonth()+1).padStart(2,"0")}`,$=C.map(I=>{const B=Oe.filter(ye=>ye.startsWith(I)),N=B.reduce((ye,de)=>ye+(Z[de]||0),0),he=B.reduce((ye,de)=>ye+(ve[de]||0),0),J={week:at(I,I===j),"All Locations":N};return z&&(J.Budget=he),Nr.filter(ye=>ye!=="Total").forEach(ye=>{J[ye]=B.reduce((de,we)=>{var Le;return de+(((Le=ee[we])==null?void 0:Le[ye])||0)},0)}),J}),O=Nr.filter(I=>I!=="Total"),M=[...Nr.includes("Total")?["All Locations"]:[],...z?["Budget"]:[],...O];return{collChartData:$,collChartSeries:M}}else{const W=G.periods.map(O=>{const M=ve[O]!=null?ve[O]:null,I={week:ft(O),"All Locations":Z[O]||0};return M!=null&&(I.Budget=M),Nr.filter(B=>B!=="Total").forEach(B=>{var N;I[B]=((N=ee[O])==null?void 0:N[B])||0}),I}),j=Nr.filter(O=>O!=="Total"),$=[...Nr.includes("Total")?["All Locations"]:[],...z?["Budget"]:[],...j];return{collChartData:W,collChartSeries:$}}},[o,me,Nr,p,se,_e,Ce]);_.useMemo(()=>{const k=new Set(me),re=o.filter($=>k.has($.c)),Z=p.filter($=>k.has($.c)),ee={};re.forEach($=>{const O=$.w.substring(0,7);ee[O]||(ee[O]=[]),ee[O].push($)});const ve={};Z.forEach($=>{const O=$.w.substring(0,7);ve[O]||(ve[O]=[]),ve[O].push($)});const Oe=new Date,ue=`${Oe.getFullYear()}-${String(Oe.getMonth()+1).padStart(2,"0")}`,V=[];for(let $=3;$>=0;$--){const O=new Date(Oe.getFullYear(),Oe.getMonth()-$,1);V.push(`${O.getFullYear()}-${String(O.getMonth()+1).padStart(2,"0")}`)}const G=V.filter($=>ee[$]).map($=>{const O=ee[$]||[],M=ve[$]||[],I=O.reduce((Le,ht)=>Le+(ht.s||0),0),B=O.reduce((Le,ht)=>Le+(ht.co||0),0),N=M.reduce((Le,ht)=>Le+(ht.b||0),0),he=M.reduce((Le,ht)=>Le+(ht.cb||0),0),[J,ye]=$.split("-").map(Number);return{label:$===ue?"MTD":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][ye-1],revActual:I,revBudget:N,collActual:B,collBudget:he,isMTD:$===ue}}),z=G.reduce(($,O)=>$+O.revActual,0),C=G.reduce(($,O)=>$+O.revBudget,0),W=G.reduce(($,O)=>$+O.collActual,0),j=G.reduce(($,O)=>$+O.collBudget,0);return{revenue:[...G.map($=>({label:$.label,actual:Math.round($.revActual),budget:Math.round($.revBudget)})),{label:"YTD",actual:Math.round(z),budget:Math.round(C),isTotal:!0}],collections:[...G.map($=>({label:$.label,actual:Math.round($.collActual),budget:Math.round($.collBudget)})),{label:"YTD",actual:Math.round(W),budget:Math.round(j),isTotal:!0}]}},[o,me,p]);const mf=_.useMemo(()=>{const k=new Set(me),re=o.filter(ve=>k.has(ve.c)),Z={};re.forEach(ve=>{Z[ve.c]||(Z[ve.c]={s:0,r:0,i:0}),Z[ve.c].s+=ve.s||0,Z[ve.c].r+=ve.rt||0,Z[ve.c].i+=ve.inj||0});let ee=Object.entries(Z).map(([ve,Oe])=>{const ue=Oe.s||1,V=+(Oe.i/ue*100).toFixed(1),G=+(Oe.r/ue*100).toFixed(1),z=+(100-V-G).toFixed(1);return{name:ve,injectables:V,body:0,laser:0,facials:0,retail:G,other:z<0?0:z}});return ee.sort((ve,Oe)=>{var G,z;const ue=((G=Z[ve.name])==null?void 0:G.s)||0;return(((z=Z[Oe.name])==null?void 0:z.s)||0)-ue}),ee.length>12&&(ee=ee.slice(0,12)),ee},[o,me]),{aggBtxChartData:bf,aggBtxSeries:Mb}=_.useMemo(()=>{if(!c.length)return{aggBtxChartData:null,aggBtxSeries:[]};const k=new Set(me),re=c.filter(ue=>k.has(ue.c)),Z=[...new Set(re.map(ue=>ue.w))].sort(),{mode:ee,count:ve}=Qe("btxLoc"),Oe=rt(Z,ee,ve);if(Oe.isMonthly){const ue=Oe.periods,V=new Date,G=`${V.getFullYear()}-${String(V.getMonth()+1).padStart(2,"0")}`,z=ue.map(W=>{const j=re.filter(I=>I.w.startsWith(W)),$=j.reduce((I,B)=>I+(B.b||0),0),O=j.filter(I=>I.b!=null).length,M={week:at(W,W===G),Total:O>0?+($/O).toFixed(1):null};return gn.forEach(I=>{const B=j.filter(J=>J.c===I),N=B.reduce((J,ye)=>J+(ye.b||0),0),he=B.filter(J=>J.b!=null).length;he>0&&(M[I]=+(N/he).toFixed(1))}),M}),C=gn.filter(W=>W!=="Total");return{aggBtxChartData:z,aggBtxSeries:[...gn.includes("Total")?["Total"]:[],...C]}}else{const V=Oe.periods.map(z=>{const C=re.filter(O=>O.w===z),W=C.reduce((O,M)=>O+(M.b||0),0),j=C.filter(O=>O.b!=null).length,$={week:ft(z),Total:j>0?+(W/j).toFixed(1):null};return gn.forEach(O=>{const M=C.find(I=>I.c===O);M&&($[O]=M.b)}),$}),G=gn.filter(z=>z!=="Total");return{aggBtxChartData:V,aggBtxSeries:[...gn.includes("Total")?["Total"]:[],...G]}}},[c,me,gn,se,_e,Ce]),{injRevProvData:xf,injRevProvSeries:tv}=_.useMemo(()=>{const k=new Set(me),re=y.filter(G=>k.has(G.c)),Z=U||Y,ee=new Set(Z),ve=[...new Set(re.map(G=>G.w))].sort(),{mode:Oe,count:ue}=Qe("injRevProv"),V=rt(ve,Oe,ue);if(V.isMonthly){const G=V.periods,z=new Date,C=`${z.getFullYear()}-${String(z.getMonth()+1).padStart(2,"0")}`;return{injRevProvData:G.map(j=>{const $={week:at(j,j===C)};return re.filter(M=>M.w.startsWith(j)).forEach(M=>{ee.has(M.pr)&&($[M.pr]=($[M.pr]||0)+(Number(M.r)||0))}),$}),injRevProvSeries:Z.filter(j=>ee.has(j))}}else return{injRevProvData:V.periods.map(C=>{const W={week:ft(C)};return re.filter($=>$.w===C).forEach($=>{ee.has($.pr)&&(W[$.pr]=(W[$.pr]||0)+(Number($.r)||0))}),W}),injRevProvSeries:Z.filter(C=>ee.has(C))}},[y,me,U,Y,se,_e,Ce]),{btxProvData:Ci,btxProvSeries:wf}=_.useMemo(()=>{const k=new Set(me),re=h.filter(z=>k.has(z.c)),Z=je||$e,ee=new Set(Z),ve=[...new Set(re.map(z=>z.w))].sort(),{mode:Oe,count:ue}=Qe("btxProv"),V=rt(ve,Oe,ue),G=(z,C)=>{const W={week:C},j={},$={};return z.forEach(O=>{if(ee.has(O.pr)){const M=Number(O.b)||0,I=Number(O.n)||0;j[O.pr]=(j[O.pr]||0)+M*I,$[O.pr]=($[O.pr]||0)+I}}),Object.keys(j).forEach(O=>{W[O]=$[O]>0?+(j[O]/$[O]).toFixed(1):null}),W};if(V.isMonthly){const z=new Date,C=`${z.getFullYear()}-${String(z.getMonth()+1).padStart(2,"0")}`;return{btxProvData:V.periods.map(j=>G(re.filter($=>$.w.startsWith(j)),at(j,j===C))),btxProvSeries:Z.filter(j=>ee.has(j))}}else return{btxProvData:V.periods.map(C=>G(re.filter(W=>W.w===C),ft(C))),btxProvSeries:Z.filter(C=>ee.has(C))}},[h,me,je,$e,se,_e,Ce]),{ntxFillerChartData:kb,ntxFillerSeries:Sf}=_.useMemo(()=>{const k=new Set(me),re=x.filter(z=>k.has(z.c)),Z=[...new Set(re.map(z=>z.w))].sort(),{mode:ee,count:ve}=Qe("ntxFiller"),Oe=rt(Z,ee,ve),ue=(z,C)=>{const W={week:C,"Neurotoxin (Total)":z.reduce((j,$)=>j+($.ntx||0),0),"Filler (Total)":z.reduce((j,$)=>j+($.filler||0),0)};return xn.forEach(j=>{if(j===pe)return;const $=z.filter(O=>O.c===j);$.length&&(W[j+" NTX"]=$.reduce((O,M)=>O+(M.ntx||0),0),W[j+" Filler"]=$.reduce((O,M)=>O+(M.filler||0),0))}),W};let V;if(!Oe.isMonthly)V=Oe.periods.map(z=>ue(re.filter(C=>C.w===z),ft(z)));else{const z=new Date,C=`${z.getFullYear()}-${String(z.getMonth()+1).padStart(2,"0")}`;V=Oe.periods.map(W=>ue(re.filter(j=>j.w.startsWith(W)),at(W,W===C)))}const G=["Neurotoxin (Total)","Filler (Total)"];return xn.filter(z=>z!==pe).forEach(z=>{G.push(z+" NTX",z+" Filler")}),{ntxFillerChartData:V,ntxFillerSeries:xn.includes(pe)?G:G.filter(z=>!z.includes("(Total)"))}},[x,me,xn,se,_e,Ce]),{syrInjData:Be,syrInjSeries:Ht}=_.useMemo(()=>{const k=new Set(me),re=w.filter(z=>k.has(z.c)),Z=[...new Set(re.map(z=>z.w))].sort(),{mode:ee,count:ve}=Qe("syrInjLoc"),Oe=rt(Z,ee,ve),ue=(z,C)=>{const W=z.reduce((O,M)=>O+M.si*M.ni,0),j=z.reduce((O,M)=>O+M.ni,0),$={week:C,Total:j>0?+(W/j).toFixed(2):null};return oo.forEach(O=>{if(O===pe)return;const M=z.filter(N=>N.c===O),I=M.reduce((N,he)=>N+he.si*he.ni,0),B=M.reduce((N,he)=>N+he.ni,0);B>0&&($[O]=+(I/B).toFixed(2))}),$};let V;if(!Oe.isMonthly)V=Oe.periods.map(z=>ue(re.filter(C=>C.w===z),ft(z)));else{const z=new Date,C=`${z.getFullYear()}-${String(z.getMonth()+1).padStart(2,"0")}`;V=Oe.periods.map(W=>ue(re.filter(j=>j.w.startsWith(W)),at(W,W===C)))}const G=oo.filter(z=>z!==pe);return{syrInjData:V,syrInjSeries:[...oo.includes(pe)?[pe]:[],...G]}},[w,me,oo,se,_e,Ce]),{syrFillerData:Q$,syrFillerSeries:Z$}=_.useMemo(()=>{const k=new Set(me),re=w.filter(z=>k.has(z.c)),Z=[...new Set(re.map(z=>z.w))].sort(),{mode:ee,count:ve}=Qe("syrFillerLoc"),Oe=rt(Z,ee,ve),ue=(z,C)=>{const W=z.reduce((O,M)=>O+M.sf*M.nf,0),j=z.reduce((O,M)=>O+M.nf,0),$={week:C,Total:j>0?+(W/j).toFixed(2):null};return ao.forEach(O=>{if(O===pe)return;const M=z.filter(N=>N.c===O),I=M.reduce((N,he)=>N+he.sf*he.nf,0),B=M.reduce((N,he)=>N+he.nf,0);B>0&&($[O]=+(I/B).toFixed(2))}),$};let V;if(!Oe.isMonthly)V=Oe.periods.map(z=>ue(re.filter(C=>C.w===z),ft(z)));else{const z=new Date,C=`${z.getFullYear()}-${String(z.getMonth()+1).padStart(2,"0")}`;V=Oe.periods.map(W=>ue(re.filter(j=>j.w.startsWith(W)),at(W,W===C)))}const G=ao.filter(z=>z!==pe);return{syrFillerData:V,syrFillerSeries:[...ao.includes(pe)?[pe]:[],...G]}},[w,me,ao,se,_e,Ce]),xo=_.useMemo(()=>{const k=new Set(L),re=new Set;return A.filter(Z=>k.has(Z.c)).forEach(Z=>re.add(Z.pr)),[...re].sort()},[A,L]),{syrInjProvData:J$,syrInjProvSeries:eE}=_.useMemo(()=>{const k=new Set(me),re=A.filter(C=>k.has(C.c)),Z=Vs||xo,ee=new Set(Z),ve=[...new Set(re.map(C=>C.w))].sort(),{mode:Oe,count:ue}=Qe("syrInjProv"),V=rt(ve,Oe,ue),G=(C,W)=>{const j={week:W},$={};return C.forEach(O=>{ee.has(O.pr)&&($[O.pr]||($[O.pr]={totalSyr:0,totalN:0}),$[O.pr].totalSyr+=O.si*O.n,$[O.pr].totalN+=O.n)}),Object.entries($).forEach(([O,M])=>{j[O]=M.totalN>0?+(M.totalSyr/M.totalN).toFixed(2):null}),j};let z;if(!V.isMonthly)z=V.periods.map(C=>G(re.filter(W=>W.w===C),ft(C)));else{const C=new Date,W=`${C.getFullYear()}-${String(C.getMonth()+1).padStart(2,"0")}`;z=V.periods.map(j=>G(re.filter($=>$.w.startsWith(j)),at(j,j===W)))}return{syrInjProvData:z,syrInjProvSeries:Z.filter(C=>ee.has(C))}},[A,me,Vs,xo,se,_e,Ce]),{syrFillerProvData:tE,syrFillerProvSeries:rE}=_.useMemo(()=>{const k=new Set(me),re=A.filter(C=>k.has(C.c)),Z=Ks||xo,ee=new Set(Z),ve=[...new Set(re.map(C=>C.w))].sort(),{mode:Oe,count:ue}=Qe("syrFillerProv"),V=rt(ve,Oe,ue),G=(C,W)=>{const j={week:W},$={};return C.forEach(O=>{ee.has(O.pr)&&O.sf>0&&($[O.pr]||($[O.pr]={totalSyr:0,totalN:0}),$[O.pr].totalSyr+=O.sf*O.n,$[O.pr].totalN+=O.n)}),Object.entries($).forEach(([O,M])=>{j[O]=M.totalN>0?+(M.totalSyr/M.totalN).toFixed(2):null}),j};let z;if(!V.isMonthly)z=V.periods.map(C=>G(re.filter(W=>W.w===C),ft(C)));else{const C=new Date,W=`${C.getFullYear()}-${String(C.getMonth()+1).padStart(2,"0")}`;z=V.periods.map(j=>G(re.filter($=>$.w.startsWith(j)),at(j,j===W)))}return{syrFillerProvData:z,syrFillerProvSeries:Z.filter(C=>ee.has(C))}},[A,me,Ks,xo,se,_e,Ce]),{revCollAppendixData:nE,revCollAppendixSeries:iE,revCollAppendixRightAxis:oE}=_.useMemo(()=>{const k=new Set(me),re=o.filter(C=>k.has(C.c)),Z=[...new Set(re.map(C=>C.w))].sort(),{mode:ee,count:ve}=Qe("revCollAppendix"),Oe=rt(Z,ee,ve),ue=(C,W)=>{const j=C.reduce((I,B)=>I+(B.s||0),0),$=C.reduce((I,B)=>I+(B.co||0),0),O=j>0?+($/j*100).toFixed(1):null,M={week:W};return lo.includes(pe)&&(M.Revenue=j,M.Collections=$,M["Coll % of Rev"]=O),lo.filter(I=>I!==pe).forEach(I=>{const B=C.filter(J=>J.c===I),N=B.reduce((J,ye)=>J+(ye.s||0),0),he=B.reduce((J,ye)=>J+(ye.co||0),0);M[I+" Rev"]=N,M[I+" Coll"]=he,M[I+" %"]=N>0?+(he/N*100).toFixed(1):null}),M};let V;if(!Oe.isMonthly)V=Oe.periods.map(C=>ue(re.filter(W=>W.w===C),ft(C)));else{const C=new Date,W=`${C.getFullYear()}-${String(C.getMonth()+1).padStart(2,"0")}`;V=Oe.periods.map(j=>ue(re.filter($=>$.w.startsWith(j)),at(j,j===W)))}const G=[],z=[];return lo.includes(pe)&&(G.push("Revenue","Collections","Coll % of Rev"),z.push("Coll % of Rev")),lo.filter(C=>C!==pe).forEach(C=>{G.push(C+" Rev",C+" Coll",C+" %"),z.push(C+" %")}),{revCollAppendixData:V,revCollAppendixSeries:G,revCollAppendixRightAxis:z}},[o,me,lo,se,_e,Ce]),Pf=_.useMemo(()=>{const k=new Set(me),re=new Set(y.map(ee=>ee.pr)),Z=new Set;return R.filter(ee=>k.has(ee.c)&&re.has(ee.pr)).forEach(ee=>Z.add(ee.pr)),[...Z].sort()},[R,me,y]),{revCollHoursData:aE,revCollHoursSeries:lE,revCollHoursRightAxis:sE}=_.useMemo(()=>{const k=new Set(me),re=o.filter(I=>k.has(I.c)),Z=H.filter(I=>k.has(I.c)),ee=Gs,ve=ee&&ee.length>0,Oe=ve?new Set(ee):null,ue=ve?R.filter(I=>k.has(I.c)&&Oe.has(I.pr)):null,V=[...new Set(re.map(I=>I.w))].sort(),{mode:G,count:z}=Qe("revCollHours"),C=rt(V,G,z),W={};Z.forEach(I=>{W[I.w]||(W[I.w]={}),W[I.w][I.c]=(W[I.w][I.c]||0)+(I.h||0)});const j=(I,B)=>{const N=re.filter(we=>I.includes(we.w)),he=ve?ue.filter(we=>I.includes(we.w)).reduce((we,Le)=>we+(Le.rev||0),0):N.reduce((we,Le)=>we+(Le.s||0),0),J=ve?ue.filter(we=>I.includes(we.w)).reduce((we,Le)=>we+(Le.coll||0),0):N.reduce((we,Le)=>we+(Le.co||0),0),ye=I.reduce((we,Le)=>{const ht=W[Le]||{};return we+Object.values(ht).reduce((an,et)=>an+et,0)},0),de={week:B};return io.includes(pe)&&(de.Revenue=he,de.Collections=J,de["Net Sched Hours"]=Math.round(ye)),io.filter(we=>we!==pe).forEach(we=>{const Le=N.filter(et=>et.c===we).reduce((et,wt)=>et+(wt.s||0),0),ht=N.filter(et=>et.c===we).reduce((et,wt)=>et+(wt.co||0),0),an=I.reduce((et,wt)=>et+((W[wt]||{})[we]||0),0);de[we+" Rev"]=Le,de[we+" Coll"]=ht,de[we+" Hours"]=Math.round(an)}),de};let $;if(!C.isMonthly)$=C.periods.map(I=>j([I],ft(I)));else{const I=new Date,B=`${I.getFullYear()}-${String(I.getMonth()+1).padStart(2,"0")}`;$=C.periods.map(N=>j(V.filter(he=>he.startsWith(N)),at(N,N===B)))}const O=[],M=[];return io.includes(pe)&&(O.push("Revenue","Collections","Net Sched Hours"),M.push("Net Sched Hours")),io.filter(I=>I!==pe).forEach(I=>{O.push(I+" Rev",I+" Coll",I+" Hours"),M.push(I+" Hours")}),{revCollHoursData:$,revCollHoursSeries:O,revCollHoursRightAxis:M}},[o,H,me,io,Gs,R,se,_e,Ce]),{revPerHour2Data:uE,revPerHour2Series:cE}=_.useMemo(()=>{const k=new Set(me);if(q&&fo&&fo.length>0&&fo.lengthk.has(de.c)&&j.has(de.pr)),O=ie.filter(de=>k.has(de.c)&&j.has(de.pr)),M=[...new Set($.map(de=>de.w))].sort(),{mode:I,count:B}=Qe("revPerHour2"),N=rt(M,I,B),he=[...j].sort(),J=(de,we)=>{const Le={week:we};return he.forEach(ht=>{const an=$.filter(wt=>de.includes(wt.w)&&wt.pr===ht).reduce((wt,hi)=>wt+(hi.s||0),0),et=O.filter(wt=>de.includes(wt.w)&&wt.pr===ht).reduce((wt,hi)=>wt+(hi.h||0),0);Le[ht]=et>0?Math.round(an/et):null}),Le};let ye;if(!N.isMonthly)ye=N.periods.map(de=>J([de],ft(de)));else{const de=new Date,we=`${de.getFullYear()}-${String(de.getMonth()+1).padStart(2,"0")}`;ye=N.periods.map(Le=>J(M.filter(ht=>ht.startsWith(Le)),at(Le,Le===we)))}return{revPerHour2Data:ye,revPerHour2Series:he}}const Z=o.filter(j=>k.has(j.c)),ee=H.filter(j=>k.has(j.c)),ve=[...new Set(Z.map(j=>j.w))].sort(),{mode:Oe,count:ue}=Qe("revPerHour2"),V=rt(ve,Oe,ue),G={};ee.forEach(j=>{G[j.w]||(G[j.w]={}),G[j.w][j.c]=(G[j.w][j.c]||0)+(j.h||0)});const z=(j,$)=>{const O=Z.filter(I=>j.includes(I.w)),M={week:$};if(co.includes("Total")){const I=O.reduce((N,he)=>N+(he.s||0),0),B=j.reduce((N,he)=>N+Object.values(G[he]||{}).reduce((J,ye)=>J+ye,0),0);M["Rev / Hour"]=B>0?Math.round(I/B):null}return co.filter(I=>I!=="Total").forEach(I=>{const B=O.filter(he=>he.c===I).reduce((he,J)=>he+(J.s||0),0),N=j.reduce((he,J)=>he+((G[J]||{})[I]||0),0);M[I+" Rev/Hr"]=N>0?Math.round(B/N):null}),M};let C;if(!V.isMonthly)C=V.periods.map(j=>z([j],ft(j)));else{const j=new Date,$=`${j.getFullYear()}-${String(j.getMonth()+1).padStart(2,"0")}`;C=V.periods.map(O=>z(ve.filter(M=>M.startsWith(O)),at(O,O===$)))}const W=[];return co.includes("Total")&&W.push("Rev / Hour"),co.filter(j=>j!=="Total").forEach(j=>W.push(j+" Rev/Hr")),{revPerHour2Data:C,revPerHour2Series:W}},[o,X,H,ie,me,co,fo,q,Y,se,_e,Ce]),{revPerHourChartData:fE,revPerHourSeries:dE,revPerHourRightAxis:pE}=_.useMemo(()=>{const k=new Set(me),re=o.filter(N=>k.has(N.c)),Z=H.filter(N=>k.has(N.c)),ee=ae.filter(N=>k.has(N.c)),ve=ia,Oe=ve&&ve.length>0,ue=Oe?new Set(ve):null,V=Oe?R.filter(N=>k.has(N.c)&&ue.has(N.pr)):null,G=[...new Set(re.map(N=>N.w))].sort(),{mode:z,count:C}=Qe("revPerHour"),W=rt(G,z,C),j={};Z.forEach(N=>{j[N.w]||(j[N.w]={}),j[N.w][N.c]=(j[N.w][N.c]||0)+(N.h||0)});const $={};ee.forEach(N=>{$[N.w]||($[N.w]={}),$[N.w][N.c]=N.ur});const O=(N,he)=>{const J=re.filter(et=>N.includes(et.w)),ye=Oe?V.filter(et=>N.includes(et.w)).reduce((et,wt)=>et+(wt.rev||0),0):J.reduce((et,wt)=>et+(wt.s||0),0),de=Oe?V.filter(et=>N.includes(et.w)).reduce((et,wt)=>et+(wt.coll||0),0):J.reduce((et,wt)=>et+(wt.co||0),0),we=N.reduce((et,wt)=>et+Object.values(j[wt]||{}).reduce((hi,cl)=>hi+cl,0),0);let Le=0,ht=0;N.forEach(et=>{const wt=$[et]||{};Object.values(wt).forEach(hi=>{hi!=null&&(Le+=hi,ht++)})});const an={week:he};return Kr.includes(pe)&&(an["Rev / Hour"]=we>0?Math.round(ye/we):null,an["Coll / Hour"]=we>0?Math.round(de/we):null,an["Utilization %"]=ht>0?+(Le/ht).toFixed(1):null),Kr.filter(et=>et!==pe).forEach(et=>{const wt=J.filter(Yn=>Yn.c===et).reduce((Yn,wo)=>Yn+(wo.s||0),0),hi=J.filter(Yn=>Yn.c===et).reduce((Yn,wo)=>Yn+(wo.co||0),0),cl=N.reduce((Yn,wo)=>Yn+((j[wo]||{})[et]||0),0);let Rb=0,rv=0;N.forEach(Yn=>{const wo=($[Yn]||{})[et];wo!=null&&(Rb+=wo,rv++)}),an[et+" Rev/Hr"]=cl>0?Math.round(wt/cl):null,an[et+" Coll/Hr"]=cl>0?Math.round(hi/cl):null,an[et+" Util%"]=rv>0?+(Rb/rv).toFixed(1):null}),an};let M;if(!W.isMonthly)M=W.periods.map(N=>O([N],ft(N)));else{const N=new Date,he=`${N.getFullYear()}-${String(N.getMonth()+1).padStart(2,"0")}`;M=W.periods.map(J=>O(G.filter(ye=>ye.startsWith(J)),at(J,J===he)))}const I=[],B=[];return Kr.includes(pe)&&(I.push("Rev / Hour","Coll / Hour","Utilization %"),B.push("Utilization %")),Kr.filter(N=>N!==pe).forEach(N=>{I.push(N+" Rev/Hr",N+" Coll/Hr",N+" Util%"),B.push(N+" Util%")}),{revPerHourChartData:M,revPerHourSeries:I,revPerHourRightAxis:B}},[o,H,ae,me,Kr,ia,R,se,_e,Ce]),ou=_.useMemo(()=>el.length>0?el:dt.length>0?dt:me,[el,me,dt]),Of=_.useMemo(()=>{const k=new Set(ou),re=new Set(y.map(ee=>ee.pr)),Z=new Set;return R.filter(ee=>k.has(ee.c)&&re.has(ee.pr)).forEach(ee=>Z.add(ee.pr)),[...Z].sort()},[R,ou,y]);_.useEffect(()=>{Et&&Ja(null)},[ou]);const{revCollProvChartData:hE,revCollProvBarSeries:Ib,revCollProvLineSeries:vE}=_.useMemo(()=>{const k=new Set(ou),re=new Set(y.map(j=>j.pr)),Z=R.filter(j=>k.has(j.c)&&re.has(j.pr)),ee=Za||Of,ve=new Set(ee),Oe=[...new Set(Z.map(j=>j.w))].sort(),{mode:ue,count:V}=Qe("revCollProv"),G=rt(Oe,ue,V),z=(j,$)=>{const O={week:$},M={};return j.forEach(I=>{ve.has(I.pr)&&(M[I.pr]||(M[I.pr]={rev:0,coll:0}),M[I.pr].rev+=I.rev||0,M[I.pr].coll+=I.coll||0)}),Object.entries(M).forEach(([I,B])=>{O[I]=B.coll,O[I+" %"]=B.rev>0?+(B.coll/B.rev*100).toFixed(1):null}),O};let C;if(!G.isMonthly)C=G.periods.map(j=>z(Z.filter($=>$.w===j),ft(j)));else{const j=new Date,$=`${j.getFullYear()}-${String(j.getMonth()+1).padStart(2,"0")}`;C=G.periods.map(O=>z(Z.filter(M=>M.w.startsWith(O)),at(O,O===$)))}const W=ee.filter(j=>ve.has(j));return{revCollProvChartData:C,revCollProvBarSeries:W,revCollProvLineSeries:W.map(j=>j+" %")}},[R,ou,Za,Of,y,se,_e,Ce]);return le?b.jsxs("div",{style:{minHeight:"100vh",background:T.cream,fontFamily:ge.body,display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",gap:16},children:[b.jsx("div",{style:{width:48,height:48,border:`3px solid ${T.taupe}`,borderTopColor:T.gold,borderRadius:"50%",animation:"spin 1s linear infinite"}}),b.jsx("div",{style:{color:T.navy,fontFamily:ge.heading,fontSize:18},children:"Loading Performance Data..."}),b.jsx("style",{children:"@keyframes spin { to { transform: rotate(360deg); } }"})]}):b.jsxs("div",{style:{minHeight:"100vh",background:T.cream,fontFamily:ge.body,color:T.dark},children:[b.jsxs("div",{style:{position:"sticky",top:0,zIndex:100,background:T.navy,padding:"0 32px",display:"flex",alignItems:"center",justifyContent:"space-between",height:52,borderBottom:"1px solid rgba(255,255,255,0.08)"},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[b.jsx("span",{style:{fontFamily:ge.heading,fontSize:18,color:T.gold,letterSpacing:6},children:"A M P"}),b.jsx("span",{style:{color:"rgba(255,255,255,0.25)",fontSize:20,fontWeight:200},children:"|"}),b.jsx("span",{style:{fontFamily:ge.body,fontSize:10,fontWeight:600,color:T.white,letterSpacing:2.5,textTransform:"uppercase"},children:"Advanced MedAesthetic Partners"})]}),b.jsx("div",{style:{fontFamily:ge.body,fontSize:11,color:T.blush,letterSpacing:1,textTransform:"uppercase",fontWeight:600},children:"Performance Tracker"})]}),b.jsxs("div",{style:{maxWidth:1440,margin:"0 auto",padding:"32px 40px 80px"},children:[b.jsxs(QJ,{children:[hf," · ",pf]}),b.jsx("h1",{style:{fontFamily:ge.heading,fontSize:36,fontWeight:400,color:T.navy,margin:"0 0 4px"},children:"Performance Tracker"}),b.jsxs("p",{style:{fontSize:13,color:T.mauve,margin:"0 0 6px"},children:["Weekly performance metrics across ",Vn.length," location",Vn.length!==1?"s":"",".",Ee.length>0&&` Filtered to ${Ee.join(", ")}.`,it.length>0&&` Practice: ${it.join(", ")}.`]}),b.jsx("div",{style:{width:40,height:3,background:T.gold,borderRadius:2,marginBottom:28}}),dt.length===1&&b.jsx(eee,{location:dt[0],locations:n,metrics:o,dailyMetrics:l,opsData:u,btxData:c,syringeLocData:w,utilizationData:ae,providerHoursData:H,injRevProviderData:y,btxProviderData:h,syringeProvData:A,revCollProvData:R,budgetData:p,metricsProviderData:X,opsProviderData:ce,utilHoursProviderData:ie}),b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:16,padding:"16px 20px",background:T.white,borderRadius:10,border:`1px solid ${T.taupe}`,marginBottom:32,flexWrap:"wrap"},children:[!(t!=null&&t.length)&&!(r!=null&&r.length)&&b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[b.jsx("label",{style:{fontSize:10,fontWeight:700,color:T.navy,letterSpacing:1.5,textTransform:"uppercase",fontFamily:ge.body},children:"Location Type"}),b.jsx(qe,{label:"Location Type",options:e!=null&&e.length?e:Js,selected:Ee,onChange:nt,minWidth:200})]}),!(r!=null&&r.length)&&b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[b.jsx("label",{style:{fontSize:10,fontWeight:700,color:T.navy,letterSpacing:1.5,textTransform:"uppercase",fontFamily:ge.body},children:"Practice"}),b.jsx(qe,{label:"Practice",options:t!=null&&t.length?t:eu,selected:it,onChange:Ot,minWidth:220})]}),b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[b.jsx("label",{style:{fontSize:10,fontWeight:700,color:T.navy,letterSpacing:1.5,textTransform:"uppercase",fontFamily:ge.body},children:"Location"}),q?b.jsx("div",{style:{padding:"7px 12px",background:T.cream,border:`1.5px solid ${T.taupe}`,borderRadius:6,fontSize:12,fontFamily:ge.body,color:T.navy,fontWeight:600},children:r[0]}):b.jsx(qe,{label:"Location",options:r!=null&&r.length?r:me,selected:dt,onChange:Zt,minWidth:220})]}),b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[b.jsx("label",{style:{fontSize:10,fontWeight:700,color:T.navy,letterSpacing:1.5,textTransform:"uppercase",fontFamily:ge.body},children:"VIEW"}),b.jsxs("select",{value:se,onChange:k=>$t(k.target.value),style:{padding:"7px 10px",border:`1.5px solid ${T.taupe}`,borderRadius:6,fontSize:12,fontFamily:ge.body,color:T.navy,background:T.cream,cursor:"pointer"},children:[b.jsx("option",{value:"weekly",children:"Weekly"}),b.jsx("option",{value:"monthly",children:"Monthly"}),b.jsx("option",{value:"mtd",children:"MTD"}),b.jsx("option",{value:"qtd",children:"QTD"}),b.jsx("option",{value:"ytd",children:"YTD"})]}),!["mtd","qtd","ytd"].includes(se)&&b.jsx("select",{value:_e,onChange:k=>xt(Number(k.target.value)),style:{padding:"7px 10px",border:`1.5px solid ${T.taupe}`,borderRadius:6,fontSize:12,fontFamily:ge.body,color:T.navy,background:T.cream,cursor:"pointer",minWidth:50},children:[1,2,3,4,5,6,7,8,9,10,11,12].map(k=>b.jsx("option",{value:k,children:k},k))})]}),!q&&b.jsxs(b.Fragment,{children:[b.jsx("button",{onClick:()=>{nt([]),Ot([]),Zt([]);const k=["Total"];il.forEach(re=>re([...k])),Ae(null),Fe(null),$t("weekly"),xt(12),We({})},style:{marginLeft:"auto",padding:"7px 16px",background:"transparent",color:T.navy,border:`1.5px solid ${T.taupe}`,borderRadius:5,fontFamily:ge.body,fontSize:11,fontWeight:600,cursor:"pointer",letterSpacing:.3},children:"Clear Filters"}),b.jsxs("div",{style:{padding:"7px 13px",background:T.gold,color:T.navy,fontFamily:ge.body,fontSize:10,fontWeight:700,letterSpacing:.3,borderRadius:5},children:[Vn.length," of ",n.length," Locations"]})]})]}),b.jsx("div",{onClick:()=>_r("section1"),style:{cursor:"pointer",userSelect:"none"},children:b.jsx(Ou,{number:"1",title:`Top Line Performance Deep Dive ${Rt.section1?"▸":""}`})}),b.jsxs("div",{style:{display:Rt.section1?"none":"block"},children:[b.jsx("div",{style:{marginBottom:24},children:b.jsx(jt,{title:"Revenue vs Budget",headerRight:b.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[b.jsx(Mt,{chartId:"revChart",globalMode:se,globalCount:_e,overrides:Ce,setOverrides:We}),b.jsx(qe,{label:"Location",options:["Total",...me],selected:Jt,onChange:Ls,minWidth:85})]}),children:b.jsx(Dt,{data:ul,series:Cb,height:300,formatter:An,colorMap:{"All Locations":T.gold,Budget:T.navy,...zt}})})}),b.jsx("div",{style:{marginBottom:24},children:b.jsx(jt,{title:"Collections vs Budget",headerRight:b.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[b.jsx(Mt,{chartId:"collChart",globalMode:se,globalCount:_e,overrides:Ce,setOverrides:We}),b.jsx(qe,{label:"Location",options:["Total",...me],selected:Nr,onChange:rn,minWidth:85})]}),children:b.jsx(Dt,{data:gf,series:ev,height:300,formatter:An,colorMap:{"All Locations":T.gold,Budget:T.navy,...zt},rightAxisSeries:Nr.filter(k=>k!=="Total")})})}),b.jsx("div",{style:{marginBottom:24},children:b.jsx(jt,{title:"Revenue vs Collections (with Collections % of Revenue)",tooltip:"Revenue and Collections on the left axis; Collections as a percentage of Revenue shown as a dotted line on the right axis",headerRight:b.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[b.jsx(Mt,{chartId:"revCollAppendix",globalMode:se,globalCount:_e,overrides:Ce,setOverrides:We}),b.jsx(qe,{label:"Location",options:["Total",...me],selected:lo,onChange:nn,minWidth:85})]}),children:b.jsx(Dt,{data:nE,series:iE,height:300,formatter:An,rightAxisFormatter:ki,colorMap:{Revenue:T.gold,Collections:T.navy,"Coll % of Rev":T.red,...zt},rightAxisSeries:oE||[]})})})]}),b.jsx("div",{onClick:()=>_r("section2"),style:{cursor:"pointer",userSelect:"none"},children:b.jsx(Ou,{number:"2",title:`Core KPIs ${Rt.section2?"▸":""}`})}),b.jsxs("div",{style:{display:Rt.section2?"none":"block"},children:[b.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:24,marginBottom:24},children:[b.jsx(jt,{title:"Revenue",tooltip:"Total revenue per week by location or provider",headerRight:b.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[b.jsx(Mt,{chartId:"revWeek",globalMode:se,globalCount:_e,overrides:Ce,setOverrides:We}),!q&&b.jsx(qe,{label:"Location",options:["Total",...me],selected:Wn,onChange:ff,minWidth:85}),q&&Y.length>0&&b.jsx(qe,{label:"Provider",options:Y,selected:uo||Y,onChange:qs,minWidth:85})]}),children:b.jsx(Dt,{data:Ve,series:Ne,height:300,formatter:An,colorMap:tt?Me:{Total:T.gold,...zt},rightAxisSeries:tt?[]:Wn.filter(k=>k!=="Total")})}),b.jsx(jt,{title:"Revenue Per Net Provider Hour",tooltip:"Revenue divided by net provider hours worked per week",headerRight:b.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[b.jsx(Mt,{chartId:"revPerHour2",globalMode:se,globalCount:_e,overrides:Ce,setOverrides:We}),!q&&b.jsx(qe,{label:"Location",options:["Total",...me],selected:co,onChange:df,minWidth:85}),q&&Y.length>0&&b.jsx(qe,{label:"Provider",options:Y,selected:fo||Y,onChange:Xs,minWidth:85})]}),children:b.jsx(Dt,{data:uE,series:cE,height:300,formatter:iy,colorMap:tt?Me:{Total:T.gold,...zt},rightAxisSeries:[]})})]}),b.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:24,marginBottom:24},children:[b.jsx(jt,{title:"Collections-Generating Unique Patients",tooltip:"Count of unique patients who generated collections each week",headerRight:b.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[b.jsx(Mt,{chartId:"uniquePt",globalMode:se,globalCount:_e,overrides:Ce,setOverrides:We}),!q&&b.jsx(qe,{label:"Location",options:["Total",...me],selected:$r,onChange:ci,minWidth:85}),q&&Y.length>0&&b.jsx(qe,{label:"Provider",options:Y,selected:on||Y,onChange:po,minWidth:85})]}),children:b.jsx(Dt,{data:er,series:vr,height:300,formatter:k=>k==null?void 0:k.toLocaleString(),colorMap:ar?Me:{Total:T.gold,...zt},rightAxisSeries:ar?[]:$r.filter(k=>k!=="Total")})}),b.jsx(jt,{title:"Avg Revenue Per Patient",tooltip:"Average revenue per unique patient visit by location",headerRight:b.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[b.jsx(Mt,{chartId:"avgRev",globalMode:se,globalCount:_e,overrides:Ce,setOverrides:We}),!q&&b.jsx(qe,{label:"Location",options:["Total",...me],selected:Lr,onChange:Tr,minWidth:85}),q&&Y.length>0&&b.jsx(qe,{label:"Provider",options:Y,selected:fi||Y,onChange:oa,minWidth:85})]}),children:b.jsx(Dt,{data:Ct,series:ot,height:300,formatter:iy,colorMap:ut?Me:{Total:T.gold,...zt},rightAxisSeries:ut?[]:Lr.filter(k=>k!=="Total")})})]}),b.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:24,marginBottom:24},children:[b.jsx(jt,{title:"Retail Sales",tooltip:"Total retail product sales by location per week",headerRight:b.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[b.jsx(Mt,{chartId:"retail",globalMode:se,globalCount:_e,overrides:Ce,setOverrides:We}),!q&&b.jsx(qe,{label:"Location",options:["Total",...me],selected:or,onChange:Bs,minWidth:85}),q&&Y.length>0&&b.jsx(qe,{label:"Provider",options:Y,selected:_i||Y,onChange:Qs,minWidth:85})]}),children:b.jsx(Dt,{data:tr,series:$i,height:300,formatter:An,colorMap:Kn?Me:{Total:T.gold,...zt},rightAxisSeries:Kn?[]:or.filter(k=>k!=="Total")})}),b.jsx(jt,{title:"Retail Sales as % of Total Sales",tooltip:"Retail revenue as a percentage of total location revenue. Goal: >7.5%",headerRight:b.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[b.jsx(Mt,{chartId:"retailPct",globalMode:se,globalCount:_e,overrides:Ce,setOverrides:We}),!q&&b.jsx(qe,{label:"Location",options:["Total",...me],selected:wr,onChange:nf,minWidth:85}),q&&Y.length>0&&b.jsx(qe,{label:"Provider",options:Y,selected:Un||Y,onChange:ho,minWidth:85})]}),children:b.jsx(Dt,{data:la,series:mo,height:300,formatter:ki,colorMap:Ei?Me:{Total:T.gold,...zt},rightAxisSeries:Ei?[]:wr.filter(k=>k!=="Total")})})]}),b.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:24,marginBottom:24},children:[b.jsx(jt,{title:"Patient Cancellation Rate",tooltip:"Percentage of appointments cancelled per week by location. Goal: <5%",headerRight:b.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[b.jsx(Mt,{chartId:"cancel",globalMode:se,globalCount:_e,overrides:Ce,setOverrides:We}),!q&&b.jsx(qe,{label:"Location",options:["Total",...me],selected:Br,onChange:Fs,minWidth:85}),q&&Y.length>0&&b.jsx(qe,{label:"Provider",options:Y,selected:yo||Y,onChange:Zs,minWidth:85})]}),children:b.jsx(Dt,{data:iu,series:ll,height:300,formatter:ki,colorMap:sa?Me:{Total:T.gold,...zt},rightAxisSeries:sa?[]:Br.filter(k=>k!==pe)})}),b.jsx(jt,{title:"Patient No-Show Rate",tooltip:"Percentage of appointments that were no-shows per week. Goal: <5%",headerRight:b.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[b.jsx(Mt,{chartId:"noshow",globalMode:se,globalCount:_e,overrides:Ce,setOverrides:We}),!q&&b.jsx(qe,{label:"Location",options:["Total",...me],selected:Fn,onChange:Qa,minWidth:85}),q&&Y.length>0&&b.jsx(qe,{label:"Provider",options:Y,selected:Ti||Y,onChange:nl,minWidth:85})]}),children:b.jsx(Dt,{data:vf,series:sl,height:300,formatter:ki,colorMap:yf?Me:{Total:T.gold,...zt},rightAxisSeries:yf?[]:Fn.filter(k=>k!==pe)})})]}),b.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:24,marginBottom:24},children:[b.jsx(jt,{title:"Utilization Rate",tooltip:"Average provider utilization rate (booked hours / scheduled hours). Goal: >70%",headerRight:b.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[b.jsx(Mt,{chartId:"utilization",globalMode:se,globalCount:_e,overrides:Ce,setOverrides:We}),!q&&b.jsx(qe,{label:"Location",options:["Total",...me],selected:mn,onChange:zs,minWidth:85}),q&&Y.length>0&&b.jsx(qe,{label:"Provider",options:Y,selected:vo||Y,onChange:aa,minWidth:85})]}),children:b.jsx(Dt,{data:ct,series:ke,height:300,formatter:ki,colorMap:Je?Me:{Total:T.gold,...zt},rightAxisSeries:Je?[]:mn.filter(k=>k!==pe)})}),b.jsx(jt,{title:"Net Provider Hours",tooltip:"Total net scheduled provider hours (scheduled hours minus blockout hours) by location per week",headerRight:b.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[b.jsx(Mt,{chartId:"netHours",globalMode:se,globalCount:_e,overrides:Ce,setOverrides:We}),!q&&b.jsx(qe,{label:"Location",options:["Total",...me],selected:bn,onChange:sf,minWidth:85}),q&&Y.length>0&&b.jsx(qe,{label:"Provider",options:Y,selected:Hn||Y,onChange:rl,minWidth:85})]}),children:b.jsx(Dt,{data:yr,series:bo,height:300,formatter:k=>k!=null?`${k.toLocaleString()} hrs`:"",colorMap:al?Me:{Total:T.gold,...zt},rightAxisSeries:al?[]:bn.filter(k=>k!==pe)})})]})]}),b.jsx("div",{onClick:()=>_r("section3"),style:{cursor:"pointer",userSelect:"none"},children:b.jsx(Ou,{number:"3",title:`Service Mix Shift ${Rt.section3?"▸":""}`})}),b.jsx("div",{style:{display:Rt.section3?"none":"block"},children:b.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:24,marginBottom:24},children:[b.jsx(jt,{title:"Total Inject. Sales",tooltip:"All injectable revenue (neuromodulators + fillers) by location",headerRight:b.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[b.jsx(Mt,{chartId:"injSales",globalMode:se,globalCount:_e,overrides:Ce,setOverrides:We}),!q&&b.jsx(qe,{label:"Location",options:["Total",...me],selected:hr,onChange:of,minWidth:85}),q&&Y.length>0&&b.jsx(qe,{label:"Provider",options:Y,selected:go||Y,onChange:Jh,minWidth:85})]}),children:b.jsx(Dt,{data:Gn,series:pi,height:300,formatter:An,colorMap:ol?Me:{Total:T.gold,...zt},rightAxisSeries:ol?[]:hr.filter(k=>k!=="Total")})}),b.jsx(jt,{title:"Inject. Sales as % of Total Sales",tooltip:"Injectable revenue share of total sales by location",headerRight:b.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[b.jsx(Mt,{chartId:"injPct",globalMode:se,globalCount:_e,overrides:Ce,setOverrides:We}),!q&&b.jsx(qe,{label:"Location",options:["Total",...me],selected:Bn,onChange:af,minWidth:85}),q&&Y.length>0&&b.jsx(qe,{label:"Provider",options:Y,selected:pt||Y,onChange:di,minWidth:85})]}),children:b.jsx(Dt,{data:ru,series:nu,height:300,formatter:ki,colorMap:be?Me:{Total:T.gold,...zt},rightAxisSeries:be?[]:Bn.filter(k=>k!=="Total")})})]})}),b.jsx("div",{onClick:()=>_r("section4"),style:{cursor:"pointer",userSelect:"none"},children:b.jsx(Ou,{number:"4",title:`Provider Productivity ${Rt.section4?"▸":""}`})}),b.jsxs("div",{style:{display:Rt.section4?"none":"block"},children:[b.jsx("div",{style:{marginBottom:24},children:b.jsx(jt,{title:"Revenue vs Collections (with Net Scheduled Provider Hours)",tooltip:"Revenue and Collections on the left axis; Net Scheduled Provider Hours as dotted line on the right axis",headerRight:b.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap"},children:[b.jsx(Mt,{chartId:"revCollHours",globalMode:se,globalCount:_e,overrides:Ce,setOverrides:We}),!q&&b.jsx(qe,{label:"Location",options:["Total",...me],selected:io,onChange:Us,minWidth:85}),b.jsx(qe,{label:"Provider",options:Pf,selected:Gs||Pf,onChange:Ys,minWidth:85})]}),children:b.jsx(Dt,{data:aE,series:lE,height:300,formatter:An,rightAxisFormatter:k=>k!=null?`${k.toLocaleString()} hrs`:"",colorMap:{Revenue:T.gold,Collections:T.navy,"Net Sched Hours":"#4A7C6F",...zt},rightAxisSeries:sE||[]})})}),b.jsx("div",{style:{marginBottom:24},children:b.jsx(jt,{title:"Revenue & Collections per Provider Hour (with Utilization Rate)",tooltip:"Revenue and Collections per net scheduled provider hour on primary axis; Utilization rate as dotted line on secondary axis",headerRight:b.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap"},children:[b.jsx(Mt,{chartId:"revPerHour",globalMode:se,globalCount:_e,overrides:Ce,setOverrides:We}),!q&&b.jsx(qe,{label:"Location",options:["Total",...me],selected:Kr,onChange:uf,minWidth:85}),b.jsx(qe,{label:"Provider",options:Pf,selected:ia||Pf,onChange:tl,minWidth:85})]}),children:b.jsx(Dt,{data:fE,series:dE,height:300,formatter:iy,rightAxisFormatter:ki,colorMap:{"Rev / Hour":T.gold,"Coll / Hour":T.navy,"Utilization %":T.green,...zt},rightAxisSeries:pE||[]})})}),b.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:24,marginBottom:24},children:[b.jsx(jt,{title:"Neurotoxin vs Dermal Filler Sales",tooltip:"Neurotoxin and filler revenue split by location",headerRight:b.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[b.jsx(Mt,{chartId:"ntxFiller",globalMode:se,globalCount:_e,overrides:Ce,setOverrides:We}),!q&&b.jsx(qe,{label:"Location",options:["Total",...me],selected:xn,onChange:Ws,minWidth:85})]}),children:b.jsx(Dt,{data:kb,series:Sf,height:300,formatter:An,colorMap:{"Neurotoxin (Total)":T.gold,"Filler (Total)":T.navy,...zt},rightAxisSeries:xn.filter(k=>k!==pe).flatMap(k=>[k+" NTX",k+" Filler"])})}),b.jsx(jt,{title:"Inject. Revenue by Provider",tooltip:"Weekly injectable revenue by provider for filtered locations",headerRight:Et?b.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[b.jsx(Mt,{chartId:"injRevProv",globalMode:se,globalCount:_e,overrides:Ce,setOverrides:We}),b.jsx(qe,{label:"Provider",options:Y,selected:U||Y,onChange:Ae,minWidth:85})]}):null,children:Et?b.jsx(Dt,{data:xf,series:tv,height:300,formatter:An,colorMap:Me}):b.jsx("div",{style:{height:320,display:"flex",alignItems:"center",justifyContent:"center",color:T.gray,fontFamily:ge.body,fontSize:13},children:"Select a Location Type, Practice, or Location filter to view provider data"})})]}),b.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:24,marginBottom:24},children:[ze?b.jsx(jt,{title:"Avg Botox Units per Botox Appt",tooltip:"Average units per unique botox appointment by location",headerRight:b.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[b.jsx(Mt,{chartId:"btxLoc",globalMode:se,globalCount:_e,overrides:Ce,setOverrides:We}),!q&&b.jsx(qe,{label:"Location",options:["Total",...me],selected:Vr,onChange:lf,minWidth:85})]}),children:b.jsx(Dt,{data:ze,series:Ye,height:300,formatter:k=>`${k} units`,colorMap:{Total:T.gold,...zt},rightAxisSeries:Vr.filter(k=>k!=="Total")})}):b.jsx(JJ,{title:"Avg Botox Units per Botox Appt",message:"Botox unit data will be populated in the next iteration"}),b.jsx(jt,{title:"Avg Botox Units per Botox Appt by Provider",tooltip:"Average botox units per appointment by provider for filtered locations",headerRight:Et?b.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[b.jsx(Mt,{chartId:"btxProv",globalMode:se,globalCount:_e,overrides:Ce,setOverrides:We}),b.jsx(qe,{label:"Provider",options:$e,selected:je||$e,onChange:Fe,minWidth:85})]}):null,children:Et?b.jsx(Dt,{data:Ci,series:wf,height:300,formatter:k=>`${k} units`,colorMap:Me}):b.jsx("div",{style:{height:300,display:"flex",alignItems:"center",justifyContent:"center",color:T.gray,fontFamily:ge.body,fontSize:13},children:"Select a Location Type, Practice, or Location filter to view provider data"})})]}),b.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:24,marginBottom:24},children:[b.jsx(jt,{title:"Avg Filler Syringes Per Inject. Appt",tooltip:"Average filler syringes dispensed per unique injectable appointment (includes non-filler inj appointments)",headerRight:b.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[b.jsx(Mt,{chartId:"syrInjLoc",globalMode:se,globalCount:_e,overrides:Ce,setOverrides:We}),!q&&b.jsx(qe,{label:"Location",options:["Total",...me],selected:oo,onChange:Hs,minWidth:85})]}),children:b.jsx(Dt,{data:Be,series:Ht,height:300,formatter:k=>k!=null?`${k} syr`:"",colorMap:{Total:T.gold,...zt},rightAxisSeries:oo.filter(k=>k!==pe)})}),b.jsx(jt,{title:"Avg Filler Syringes Per Inject. Appt by Provider",tooltip:"Average filler syringes per injectable appointment broken down by provider",headerRight:Et?b.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[b.jsx(Mt,{chartId:"syrInjProv",globalMode:se,globalCount:_e,overrides:Ce,setOverrides:We}),b.jsx(qe,{label:"Provider",options:xo,selected:Vs||xo,onChange:wn,minWidth:85})]}):null,children:Et?b.jsx(Dt,{data:J$,series:eE,height:300,formatter:k=>k!=null?`${k} syr`:"",colorMap:Me}):b.jsx("div",{style:{height:300,display:"flex",alignItems:"center",justifyContent:"center",color:T.gray,fontFamily:ge.body,fontSize:13},children:"Select a Location Type, Practice, or Location filter to view provider data"})})]}),b.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:24,marginBottom:24},children:[b.jsx(jt,{title:"Avg Filler Syringes Per Filler Appt",tooltip:"Average filler syringes dispensed per filler-only appointment (excludes neurotoxin-only visits)",headerRight:b.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[b.jsx(Mt,{chartId:"syrFillerLoc",globalMode:se,globalCount:_e,overrides:Ce,setOverrides:We}),!q&&b.jsx(qe,{label:"Location",options:["Total",...me],selected:ao,onChange:cf,minWidth:85})]}),children:b.jsx(Dt,{data:Q$,series:Z$,height:300,formatter:k=>k!=null?`${k} syr`:"",colorMap:{Total:T.gold,...zt},rightAxisSeries:ao.filter(k=>k!==pe)})}),b.jsx(jt,{title:"Avg Filler Syringes Per Filler Appt by Provider",tooltip:"Average filler syringes per filler appointment broken down by provider",headerRight:Et?b.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[b.jsx(Mt,{chartId:"syrFillerProv",globalMode:se,globalCount:_e,overrides:Ce,setOverrides:We}),b.jsx(qe,{label:"Provider",options:xo,selected:Ks||xo,onChange:zn,minWidth:85})]}):null,children:Et?b.jsx(Dt,{data:tE,series:rE,height:300,formatter:k=>k!=null?`${k} syr`:"",colorMap:Me}):b.jsx("div",{style:{height:300,display:"flex",alignItems:"center",justifyContent:"center",color:T.gray,fontFamily:ge.body,fontSize:13},children:"Select a Location Type, Practice, or Location filter to view provider data"})})]})]}),b.jsx("div",{onClick:()=>_r("appendix"),style:{cursor:"pointer",userSelect:"none"},children:b.jsx(Ou,{number:"A",title:`Appendix ${Rt.appendix?"▸":""}`})}),b.jsxs("div",{style:{display:Rt.appendix?"none":"block"},children:[b.jsx("div",{style:{marginBottom:24},children:b.jsx(jt,{title:"Revenue vs Collections by Provider (with Coll % of Rev)",tooltip:"Revenue and Collections per provider on the left axis; Collections as a percentage of Revenue shown as dotted lines on the right axis",headerRight:Et?b.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[b.jsx(Mt,{chartId:"revCollProv",globalMode:se,globalCount:_e,overrides:Ce,setOverrides:We}),!q&&b.jsx(qe,{label:"Location",options:me,selected:el,onChange:so,minWidth:85}),b.jsx(qe,{label:"Provider",options:Of,selected:Za||Of,onChange:Ja,minWidth:85})]}):null,children:Et?b.jsx($_,{width:"100%",height:300,children:b.jsxs(qJ,{data:hE,margin:{top:8,right:48,left:0,bottom:0},children:[b.jsx(Eb,{strokeDasharray:"3 3",stroke:T.taupe}),b.jsx(Ns,{dataKey:"week",tick:{fontSize:11,fontFamily:ge.body,fill:T.gray}}),b.jsx(Yo,{yAxisId:"left",tick:{fontSize:11,fontFamily:ge.body,fill:T.gray},tickFormatter:An}),b.jsx(Yo,{yAxisId:"right",orientation:"right",tick:{fontSize:10,fontFamily:ge.body,fill:T.goldMuted},tickFormatter:ki,stroke:T.goldLight}),b.jsx(Jn,{content:({active:k,payload:re,label:Z})=>!k||!re?null:b.jsxs("div",{style:{background:T.navy,border:"none",borderRadius:6,padding:"8px 12px",fontFamily:ge.body,fontSize:12},children:[b.jsx("div",{style:{color:T.gold,fontWeight:600,marginBottom:4},children:Z}),re.map((ee,ve)=>b.jsxs("div",{style:{display:"flex",justifyContent:"space-between",gap:16,padding:"1px 0"},children:[b.jsx("span",{style:{color:X$(ee.color||ee.fill||ee.stroke)},children:ee.name}),b.jsx("span",{style:{color:T.cream,fontWeight:600},children:ee.name.endsWith("%")?ki(ee.value):An(ee.value)})]},ve))]})}),b.jsx(Ho,{wrapperStyle:{fontFamily:ge.body,fontSize:10},iconType:"rect"}),Ib.map((k,re)=>b.jsx(Ga,{yAxisId:"left",dataKey:k,fill:Me[k]||_n[re%_n.length],fillOpacity:.85,name:k,barSize:Ib.length>6?8:14},k)),vE.map((k,re)=>b.jsx(Ya,{yAxisId:"right",type:"monotone",dataKey:k,stroke:Me[k.replace(" %","")]||_n[re%_n.length],strokeWidth:2,strokeDasharray:"6 3",dot:{r:3},activeDot:{r:5},connectNulls:!0,name:k},k))]})}):b.jsx("div",{style:{height:400,display:"flex",alignItems:"center",justifyContent:"center",color:T.gray,fontFamily:ge.body,fontSize:13},children:"Select a Location Type, Practice, or Location filter to view provider data"})})}),b.jsx("div",{style:{marginBottom:24},children:b.jsx(jt,{title:"Service Mix by Location",tooltip:"Revenue breakdown by service category per location for the selected period",children:b.jsx(ZJ,{data:mf})})})]}),b.jsxs("div",{style:{marginTop:48,paddingTop:24,borderTop:`1px solid ${T.taupe}`,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[b.jsxs("div",{style:{fontSize:11,color:T.gray},children:["AMP Intelligence · Performance Tracker · ",hf]}),b.jsxs("div",{style:{fontSize:11,color:T.gray},children:["Data sourced from CorralData · ",pf]})]})]})]})}const gt={navy:"#041E42",gold:"#B9975B",cream:"#FAF8F7",taupe:"#E4D5D3",gray:"#948794",white:"#FFFFFF"},Ki={heading:"'GFS Didot', Didot, Georgia, serif",body:"'Nunito Sans', 'Avenir Next', Avenir, sans-serif"};function tee({subtitle:e}){return b.jsxs("div",{style:{background:gt.navy,padding:"20px 32px",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:16},children:[b.jsx("a",{href:"/",style:{textDecoration:"none"},children:b.jsx("span",{style:{fontFamily:Ki.heading,fontSize:16,color:gt.gold,letterSpacing:6},children:"A M P"})}),b.jsx("span",{style:{color:"rgba(255,255,255,0.2)",fontSize:20},children:"|"}),b.jsx("span",{style:{fontSize:10,fontWeight:700,color:gt.white,letterSpacing:2,textTransform:"uppercase",fontFamily:Ki.body},children:"ADVANCED MEDAESTHETIC PARTNERS"})]}),b.jsx("span",{style:{fontSize:9,fontWeight:600,color:"#CDB5A7",letterSpacing:2,textTransform:"uppercase",fontFamily:Ki.body},children:e||"PERFORMANCE TRACKER"})]})}function Zh({label:e,title:t,description:r,children:n,backLink:i,backText:o}){return b.jsxs("div",{style:{minHeight:"100vh",background:gt.cream,fontFamily:Ki.body},children:[b.jsx(tee,{}),b.jsxs("div",{style:{maxWidth:1200,margin:"0 auto",padding:"48px 40px"},children:[e&&b.jsx("div",{style:{fontSize:10,fontWeight:700,textTransform:"uppercase",letterSpacing:1.5,color:gt.gold,marginBottom:8,fontFamily:Ki.body},children:e}),b.jsx("h1",{style:{fontFamily:Ki.heading,fontSize:36,fontWeight:400,color:gt.navy,margin:"0 0 8px"},children:t}),r&&b.jsx("p",{style:{fontSize:14,color:gt.gray,margin:"0 0 6px"},children:r}),b.jsx("div",{style:{width:40,height:3,background:gt.gold,borderRadius:2,marginBottom:40}}),n,b.jsxs("div",{style:{marginTop:32,padding:"16px 20px",background:gt.white,borderRadius:12,border:`1px solid ${gt.taupe}`,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[b.jsxs("span",{style:{fontSize:12,color:gt.gray},children:["← ",b.jsx("a",{href:i||"/",style:{color:gt.navy,textDecoration:"none",fontWeight:600},children:o||"Back to Performance Tracker Hub"})]}),b.jsx("span",{style:{fontSize:11,color:gt.gray},children:"Data sourced from CorralData"})]})]})]})}function Pa({href:e,icon:t,title:r,description:n,count:i}){const[o,a]=_.useState(!1);return b.jsxs("a",{href:e,style:{background:o?gt.navy:gt.white,borderRadius:14,border:`1px solid ${o?gt.gold:gt.taupe}`,padding:"24px 20px",textDecoration:"none",color:"inherit",transition:"all 0.2s",boxShadow:o?"0 6px 20px rgba(0,0,0,0.08)":"0 1px 3px rgba(0,0,0,0.04)",display:"flex",flexDirection:"column",cursor:"pointer",transform:o?"translateY(-2px)":"none"},onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),children:[t&&b.jsx("div",{style:{width:40,height:40,borderRadius:10,background:o?"rgba(185,151,91,0.2)":"rgba(185,151,91,0.08)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:20,marginBottom:14,transition:"all 0.2s"},children:t}),b.jsx("div",{style:{fontFamily:Ki.heading,fontSize:17,fontWeight:400,color:o?gt.white:gt.navy,marginBottom:6,transition:"color 0.2s"},children:r}),n&&b.jsx("div",{style:{fontSize:12,color:o?"#CDB5A7":gt.gray,lineHeight:1.6,flex:1,transition:"color 0.2s"},children:n}),b.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:12},children:[b.jsx("span",{style:{fontSize:10,fontWeight:700,textTransform:"uppercase",letterSpacing:1,color:gt.gold,transition:"color 0.2s"},children:"Open →"}),i!=null&&b.jsxs("span",{style:{fontSize:10,fontWeight:700,color:o?gt.gold:gt.gray,background:o?"rgba(185,151,91,0.15)":gt.cream,padding:"2px 8px",borderRadius:4,transition:"all 0.2s"},children:[i," locations"]})]})]})}function ree(){return b.jsx(Zh,{label:"Analytics & Reporting",title:"Performance Tracker",description:"Detailed weekly and monthly performance metrics across all AMP locations.",backLink:"https://ampintelligence.ai",backText:"Back to AMP Intelligence Hub",children:b.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(280px, 1fr))",gap:16},children:[b.jsx(Pa,{href:"/org",icon:"📊",title:"Org Performance Tracker",description:"All locations with full interactive filters — revenue, collections, provider productivity, service mix, and ops KPIs.",count:66}),b.jsx(Pa,{href:"/by-type",icon:"🏷️",title:"By Location Type",description:"Performance tracker pre-filtered by location type — includes Pod Leaders, Sparrow, Avelure, and more.",count:18}),b.jsx(Pa,{href:"/by-practice",icon:"🏢",title:"By Practice",description:"Performance tracker pre-filtered by practice (Avelure, Ever/Body, Destination Aesthetics, etc.)",count:19}),b.jsx(Pa,{href:"/by-location",icon:"📍",title:"By Location",description:"Performance tracker pre-filtered to a single location for detailed analysis and provider reports.",count:66})]})})}function nee(){const[e,t]=_.useState([]),[r,n]=_.useState({});return _.useEffect(()=>{fetch("/data/performance/locations.json").then(i=>i.json()).then(i=>{const o={};i.forEach(a=>(a.types||[]).forEach(l=>{o[l]||(o[l]=0),o[l]++})),t(Object.keys(o).sort()),n(o)})},[]),b.jsx(Zh,{label:"By Location Type",title:"Select a Location Type",description:"Choose a location type to view its pre-filtered performance tracker.",children:b.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(250px, 1fr))",gap:14},children:e.map(i=>b.jsx(Pa,{href:`/by-type/${encodeURIComponent(i)}`,title:i,count:r[i]},i))})})}function iee(){const[e,t]=_.useState([]),[r,n]=_.useState({});return _.useEffect(()=>{fetch("/data/performance/locations.json").then(i=>i.json()).then(i=>{const o={};i.forEach(a=>{const l=a.practice||"Unknown";o[l]=(o[l]||0)+1}),t(Object.keys(o).sort()),n(o)})},[]),b.jsx(Zh,{label:"By Practice",title:"Select a Practice",description:"Choose a practice to view its pre-filtered performance tracker.",children:b.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(250px, 1fr))",gap:14},children:e.map(i=>b.jsx(Pa,{href:`/by-practice/${encodeURIComponent(i)}`,title:i,count:r[i]},i))})})}function oee(){const[e,t]=_.useState([]),[r,n]=_.useState("");_.useEffect(()=>{fetch("/data/performance/locations.json").then(a=>a.json()).then(t)},[]);const i=r?e.filter(a=>a.name.toLowerCase().includes(r.toLowerCase())||(a.practice||"").toLowerCase().includes(r.toLowerCase())):e,o={};return i.forEach(a=>{const l=a.practice||"Other";o[l]||(o[l]=[]),o[l].push(a)}),b.jsxs(Zh,{label:"By Location",title:"Select a Location",description:"Choose a specific location for detailed performance analysis and provider reports.",children:[b.jsx("div",{style:{marginBottom:24},children:b.jsx("input",{type:"text",placeholder:"Search locations or practices...",value:r,onChange:a=>n(a.target.value),style:{width:"100%",maxWidth:400,padding:"10px 16px",border:`1.5px solid ${gt.taupe}`,borderRadius:8,fontSize:13,fontFamily:Ki.body,color:gt.navy,background:gt.white,outline:"none"}})}),Object.entries(o).sort((a,l)=>a[0].localeCompare(l[0])).map(([a,l])=>b.jsxs("div",{style:{marginBottom:32},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,marginBottom:14},children:[b.jsx("div",{style:{fontSize:10,fontWeight:700,textTransform:"uppercase",letterSpacing:2,color:gt.navy,background:"rgba(185,151,91,0.1)",border:"1px solid rgba(185,151,91,0.25)",borderRadius:4,padding:"3px 10px",fontFamily:Ki.body},children:a}),b.jsxs("div",{style:{fontSize:12,color:gt.gray},children:[l.length," ",l.length===1?"location":"locations"]}),b.jsx("div",{style:{flex:1,height:1,background:gt.taupe}})]}),b.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(220px, 1fr))",gap:12},children:l.sort((s,u)=>s.name.localeCompare(u.name)).map(s=>b.jsx(Pa,{href:`/by-location/${encodeURIComponent(s.name)}`,title:s.name},s.name))})]},a)),i.length===0&&b.jsxs("div",{style:{textAlign:"center",padding:40,color:gt.gray},children:['No locations match "',r,'"']})]})}function aee(){const{type:e}=P0();return b.jsx(Qh,{initialLocTypes:[decodeURIComponent(e)]},e)}function lee(){const{practice:e}=P0();return b.jsx(Qh,{initialPractices:[decodeURIComponent(e)]},e)}function see(){const{location:e}=P0();return b.jsx(Qh,{initialLocations:[decodeURIComponent(e)]},e)}class uee extends D.Component{constructor(t){super(t),this.state={error:null}}static getDerivedStateFromError(t){return{error:t}}componentDidCatch(t,r){console.error("React Error:",t,r)}render(){return this.state.error?D.createElement("div",{style:{padding:40,fontFamily:"monospace",color:"red"}},D.createElement("h1",null,"App Crashed"),D.createElement("pre",null,this.state.error.message),D.createElement("pre",{style:{fontSize:10,color:"#666"}},this.state.error.stack)):this.props.children}}oy.createRoot(document.getElementById("root")).render(b.jsx(D.StrictMode,{children:b.jsx(uee,{children:b.jsx(Ck,{children:b.jsxs(Tk,{children:[b.jsx(Ii,{path:"/",element:b.jsx(ree,{})}),b.jsx(Ii,{path:"/org",element:b.jsx(Qh,{})}),b.jsx(Ii,{path:"/by-type",element:b.jsx(nee,{})}),b.jsx(Ii,{path:"/by-type/:type",element:b.jsx(aee,{})}),b.jsx(Ii,{path:"/by-practice",element:b.jsx(iee,{})}),b.jsx(Ii,{path:"/by-practice/:practice",element:b.jsx(lee,{})}),b.jsx(Ii,{path:"/by-location",element:b.jsx(oee,{})}),b.jsx(Ii,{path:"/by-location/:location",element:b.jsx(see,{})})]})})})})); diff --git a/dist/index.html b/dist/index.html index 552a85f..1a0a7c4 100644 --- a/dist/index.html +++ b/dist/index.html @@ -5,7 +5,7 @@ AMP Performance Tracker - +
From 2e3cfd892a21ca647249f8b59a39df44dd5512e1 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 27 Apr 2026 15:09:51 +0000 Subject: [PATCH 5/5] fix: prefix data fetch URLs with BASE_URL for subpath deployments --- src/components/PMReport.jsx | 10 ++++---- src/components/PerformanceTracker.jsx | 34 +++++++++++++-------------- src/main.jsx | 6 ++--- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/components/PMReport.jsx b/src/components/PMReport.jsx index 4916a45..f7f28e9 100644 --- a/src/components/PMReport.jsx +++ b/src/components/PMReport.jsx @@ -101,11 +101,11 @@ export default function PMReport() { useEffect(() => { Promise.all([ - fetch('/data/performance/weekly-rev-coll-provider.json').then(r => r.json()), - fetch('/data/performance/weekly-util-hours-provider.json').then(r => r.json()), - fetch('/data/performance/weekly-metrics.json').then(r => r.json()), - fetch('/data/performance/weekly-utilization.json').then(r => r.json()), - fetch('/data/performance/weekly-provider-hours.json').then(r => r.json()), + fetch(import.meta.env.BASE_URL + 'data/performance/weekly-rev-coll-provider.json').then(r => r.json()), + fetch(import.meta.env.BASE_URL + 'data/performance/weekly-util-hours-provider.json').then(r => r.json()), + fetch(import.meta.env.BASE_URL + 'data/performance/weekly-metrics.json').then(r => r.json()), + fetch(import.meta.env.BASE_URL + 'data/performance/weekly-utilization.json').then(r => r.json()), + fetch(import.meta.env.BASE_URL + 'data/performance/weekly-provider-hours.json').then(r => r.json()), ]).then(([revColl, utilH, metrics, utilLoc, provHrs]) => setData({ revColl, utilH, metrics, utilLoc, provHrs })); }, []); diff --git a/src/components/PerformanceTracker.jsx b/src/components/PerformanceTracker.jsx index e59feba..0df293a 100644 --- a/src/components/PerformanceTracker.jsx +++ b/src/components/PerformanceTracker.jsx @@ -2442,23 +2442,23 @@ export default function PerformanceTracker({ initialLocTypes, initialPractices, // Fetch all data on mount useEffect(() => { Promise.all([ - fetch('/data/performance/locations.json').then(r => r.json()), - fetch('/data/performance/weekly-metrics.json').then(r => r.json()), - fetch('/data/performance/daily-metrics.json').then(r => r.json()).catch(() => []), - fetch('/data/performance/weekly-ops.json').then(r => r.json()), - fetch('/data/performance/weekly-btx.json').then(r => r.json()).catch(() => []), - fetch('/data/performance/weekly-budget.json').then(r => r.json()).catch(() => []), - fetch('/data/performance/weekly-inj-rev-provider.json').then(r => r.json()).catch(() => []), - fetch('/data/performance/weekly-btx-provider.json').then(r => r.json()).catch(() => []), - fetch('/data/performance/weekly-ntx-filler.json').then(r => r.json()).catch(() => []), - fetch('/data/performance/weekly-syringe-loc.json').then(r => r.json()).catch(() => []), - fetch('/data/performance/weekly-syringe-provider.json').then(r => r.json()).catch(() => []), - fetch('/data/performance/weekly-rev-coll-provider.json').then(r => r.json()).catch(() => []), - fetch('/data/performance/weekly-provider-hours.json').then(r => r.json()).catch(() => []), - fetch('/data/performance/weekly-utilization.json').then(r => r.json()).catch(() => []), - fetch('/data/performance/weekly-metrics-provider.json').then(r => r.json()).catch(() => []), - fetch('/data/performance/weekly-ops-provider.json').then(r => r.json()).catch(() => []), - fetch('/data/performance/weekly-util-hours-provider.json').then(r => r.json()).catch(() => []), + fetch(import.meta.env.BASE_URL + 'data/performance/locations.json').then(r => r.json()), + fetch(import.meta.env.BASE_URL + 'data/performance/weekly-metrics.json').then(r => r.json()), + fetch(import.meta.env.BASE_URL + 'data/performance/daily-metrics.json').then(r => r.json()).catch(() => []), + fetch(import.meta.env.BASE_URL + 'data/performance/weekly-ops.json').then(r => r.json()), + fetch(import.meta.env.BASE_URL + 'data/performance/weekly-btx.json').then(r => r.json()).catch(() => []), + fetch(import.meta.env.BASE_URL + 'data/performance/weekly-budget.json').then(r => r.json()).catch(() => []), + fetch(import.meta.env.BASE_URL + 'data/performance/weekly-inj-rev-provider.json').then(r => r.json()).catch(() => []), + fetch(import.meta.env.BASE_URL + 'data/performance/weekly-btx-provider.json').then(r => r.json()).catch(() => []), + fetch(import.meta.env.BASE_URL + 'data/performance/weekly-ntx-filler.json').then(r => r.json()).catch(() => []), + fetch(import.meta.env.BASE_URL + 'data/performance/weekly-syringe-loc.json').then(r => r.json()).catch(() => []), + fetch(import.meta.env.BASE_URL + 'data/performance/weekly-syringe-provider.json').then(r => r.json()).catch(() => []), + fetch(import.meta.env.BASE_URL + 'data/performance/weekly-rev-coll-provider.json').then(r => r.json()).catch(() => []), + fetch(import.meta.env.BASE_URL + 'data/performance/weekly-provider-hours.json').then(r => r.json()).catch(() => []), + fetch(import.meta.env.BASE_URL + 'data/performance/weekly-utilization.json').then(r => r.json()).catch(() => []), + fetch(import.meta.env.BASE_URL + 'data/performance/weekly-metrics-provider.json').then(r => r.json()).catch(() => []), + fetch(import.meta.env.BASE_URL + 'data/performance/weekly-ops-provider.json').then(r => r.json()).catch(() => []), + fetch(import.meta.env.BASE_URL + 'data/performance/weekly-util-hours-provider.json').then(r => r.json()).catch(() => []), ]).then(([locs, met, daily, ops, btx, bud, injRevProv, btxProv, ntxFiller, syrLoc, syrProv, revCollProv, provHours, utilization, metricsProvData, opsProvData, utilHoursProvData]) => { setLocations(locs); setMetrics(met); diff --git a/src/main.jsx b/src/main.jsx index d0e7d51..5c4d084 100644 --- a/src/main.jsx +++ b/src/main.jsx @@ -90,7 +90,7 @@ function ByTypeListing() { const [locCounts, setLocCounts] = useState({}); useEffect(() => { - fetch('/data/performance/locations.json').then(r => r.json()).then(locs => { + fetch(import.meta.env.BASE_URL + 'data/performance/locations.json').then(r => r.json()).then(locs => { const typeSet = {}; locs.forEach(l => (l.types || []).forEach(t => { if (!typeSet[t]) typeSet[t] = 0; @@ -120,7 +120,7 @@ function ByPracticeListing() { const [locCounts, setLocCounts] = useState({}); useEffect(() => { - fetch('/data/performance/locations.json').then(r => r.json()).then(locs => { + fetch(import.meta.env.BASE_URL + 'data/performance/locations.json').then(r => r.json()).then(locs => { const practiceSet = {}; locs.forEach(l => { const p = l.practice || 'Unknown'; @@ -150,7 +150,7 @@ function ByLocationListing() { const [search, setSearch] = useState(''); useEffect(() => { - fetch('/data/performance/locations.json').then(r => r.json()).then(setLocs); + fetch(import.meta.env.BASE_URL + 'data/performance/locations.json').then(r => r.json()).then(setLocs); }, []); const filtered = search