@verifiedinc-public/shared-ui-elements 8.19.1 → 8.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verifiedinc-public/shared-ui-elements",
3
- "version": "8.19.1",
3
+ "version": "8.20.0",
4
4
  "description": "A set of UI components, utilities that is shareable with the core apps.",
5
5
  "private": false,
6
6
  "keywords": [],
@@ -1,17 +0,0 @@
1
- import { default as React } from 'react';
2
- import { SxProps } from '@mui/material';
3
- import { SeriesChartData } from '../SeriesChart';
4
- import { BrandFilter } from '../../BrandFilterInput';
5
- export interface OneClickVerificationOverTimeChartProps {
6
- label?: string;
7
- data: SeriesChartData[];
8
- isLoading: boolean;
9
- isSuccess: boolean;
10
- isFetching: boolean;
11
- filter: {
12
- timezone?: string;
13
- brands?: BrandFilter[];
14
- };
15
- sx?: SxProps;
16
- }
17
- export declare function OneClickVerificationOverTimeChart({ label, data, isLoading, isFetching, isSuccess, filter, sx, }: Readonly<OneClickVerificationOverTimeChartProps>): React.ReactNode;
@@ -1,26 +0,0 @@
1
- import { mapSeriesTimeSeriesData, MapSeriesTimeSeriesDataOptions } from '../SeriesChart/SeriesChart.map';
2
- export interface MapOneClickVerificationTimeSeriesDataOptions extends MapSeriesTimeSeriesDataOptions {
3
- data: Array<{
4
- interval?: Array<{
5
- oneClickVerificationCreated: number;
6
- oneClickVerificationDelivered: number;
7
- oneClickVerificationVerified: number;
8
- oneClickVerificationFailed: number;
9
- oneClickVerificationSending: number;
10
- oneClickVerificationUndelivered: number;
11
- oneClickVerificationExpired: number;
12
- date: string | number;
13
- [key: string]: any;
14
- }>;
15
- brandUuid: string;
16
- brandName: string;
17
- }>;
18
- }
19
- /**
20
- * Maps raw OneClick verification time series data into a format suitable for charting.
21
- * Delegates to the shared mapSeriesTimeSeriesData function.
22
- *
23
- * @param options Configuration options for mapping the data
24
- * @returns Array of formatted time series data ready for charting, one entry per keyword
25
- */
26
- export declare function mapOneClickVerificationTimeSeriesData(options: MapOneClickVerificationTimeSeriesDataOptions): ReturnType<typeof mapSeriesTimeSeriesData>;
@@ -1,2 +0,0 @@
1
- export * from './OneClickVerificationOverTimeChart';
2
- export * from './OneClickVerificationOverTimeChart.map';
@@ -1 +0,0 @@
1
- "use strict";import{Alert as Xe,Box as N,IconButton as Se,Stack as w,Typography as L,useTheme as R,Paper as xe,TableContainer as Qe,Table as e0,TableHead as a0,TableRow as Te,TableCell as S,TableBody as t0}from"@mui/material";import{jsx as a,Fragment as ie,jsxs as p}from"react/jsx-runtime";import{forwardRef as n0,useCallback as ce,useMemo as se,createElement as o0,useState as J,useRef as i0,useEffect as Me}from"react";import{ResponsiveContainer as z,LineChart as we,CartesianGrid as Z,XAxis as Y,YAxis as X,Label as c0,Tooltip as Q,Legend as re,Line as Le,ComposedChart as s0,ReferenceLine as fe,ReferenceArea as ue,Bar as r0,AreaChart as f0,Area as u0,Sector as Pe,PieChart as m0,Pie as l0,Cell as d0}from"recharts";import{k as _0}from"./formatKebabToPretty-Du43TgPC.mjs";import"@date-fns/tz";import ee from"@mui/material/Unstable_Grid2";import De,{Decimal as me}from"decimal.js";import{AnimatePresence as Ne}from"framer-motion";import"qrcode";import{u as le}from"./isEqual-DsQDNaUy.mjs";import"qr-code-styling";import"libphonenumber-js";import{a as Re,C as Ie}from"./motions-CgJF6dYW.mjs";import{_ as A0,s as Ue,b as de,c as _e}from"./uuidColor-bmve2xeu.mjs";import{u as Be}from"./useCopyToClipboard-ClqTa6sX.mjs";import{u as h0}from"./useCounter-BV32zXDQ.mjs";import{Close as p0}from"@mui/icons-material";import{SnackbarContent as g0,closeSnackbar as Fe,enqueueSnackbar as y0}from"notistack";function Ae({value:e,children:n}){return e?typeof n=="function"?a(ie,{children:n(e)}):a(ie,{children:n}):null}const Ge=[{name:"Etc/GMT+12",utc_offset:"-12:00:00"},{name:"US/Samoa",utc_offset:"-11:00:00"},{name:"Etc/GMT+11",utc_offset:"-11:00:00"},{name:"Pacific/Pago_Pago",utc_offset:"-11:00:00"},{name:"Pacific/Niue",utc_offset:"-11:00:00"},{name:"Pacific/Samoa",utc_offset:"-11:00:00"},{name:"Pacific/Midway",utc_offset:"-11:00:00"},{name:"HST",utc_offset:"-10:00:00"},{name:"US/Hawaii",utc_offset:"-10:00:00"},{name:"Etc/GMT+10",utc_offset:"-10:00:00"},{name:"Pacific/Tahiti",utc_offset:"-10:00:00"},{name:"Pacific/Honolulu",utc_offset:"-10:00:00"},{name:"Pacific/Johnston",utc_offset:"-10:00:00"},{name:"Pacific/Rarotonga",utc_offset:"-10:00:00"},{name:"America/Atka",utc_offset:"-09:00:00"},{name:"America/Adak",utc_offset:"-09:00:00"},{name:"US/Aleutian",utc_offset:"-09:00:00"},{name:"Etc/GMT+9",utc_offset:"-09:00:00"},{name:"Pacific/Marquesas",utc_offset:"-09:30:00"},{name:"Pacific/Gambier",utc_offset:"-09:00:00"},{name:"America/Sitka",utc_offset:"-08:00:00"},{name:"America/Metlakatla",utc_offset:"-08:00:00"},{name:"America/Juneau",utc_offset:"-08:00:00"},{name:"America/Nome",utc_offset:"-08:00:00"},{name:"America/Yakutat",utc_offset:"-08:00:00"},{name:"America/Anchorage",utc_offset:"-08:00:00"},{name:"US/Alaska",utc_offset:"-08:00:00"},{name:"Etc/GMT+8",utc_offset:"-08:00:00"},{name:"Pacific/Pitcairn",utc_offset:"-08:00:00"},{name:"Mexico/BajaSur",utc_offset:"-07:00:00"},{name:"Mexico/BajaNorte",utc_offset:"-07:00:00"},{name:"America/Ensenada",utc_offset:"-07:00:00"},{name:"America/Los_Angeles",utc_offset:"-07:00:00"},{name:"America/Dawson_Creek",utc_offset:"-07:00:00"},{name:"America/Mazatlan",utc_offset:"-07:00:00"},{name:"America/Santa_Isabel",utc_offset:"-07:00:00"},{name:"America/Creston",utc_offset:"-07:00:00"},{name:"America/Dawson",utc_offset:"-07:00:00"},{name:"America/Whitehorse",utc_offset:"-07:00:00"},{name:"America/Vancouver",utc_offset:"-07:00:00"},{name:"America/Tijuana",utc_offset:"-07:00:00"},{name:"America/Hermosillo",utc_offset:"-07:00:00"},{name:"America/Fort_Nelson",utc_offset:"-07:00:00"},{name:"America/Phoenix",utc_offset:"-07:00:00"},{name:"US/Arizona",utc_offset:"-07:00:00"},{name:"US/Pacific",utc_offset:"-07:00:00"},{name:"Etc/GMT+7",utc_offset:"-07:00:00"},{name:"PST8PDT",utc_offset:"-07:00:00"},{name:"MST",utc_offset:"-07:00:00"},{name:"Canada/Yukon",utc_offset:"-07:00:00"},{name:"Canada/Pacific",utc_offset:"-07:00:00"},{name:"Navajo",utc_offset:"-06:00:00"},{name:"Chile/EasterIsland",utc_offset:"-06:00:00"},{name:"MST7MDT",utc_offset:"-06:00:00"},{name:"Mexico/General",utc_offset:"-06:00:00"},{name:"America/Guatemala",utc_offset:"-06:00:00"},{name:"America/Boise",utc_offset:"-06:00:00"},{name:"America/Costa_Rica",utc_offset:"-06:00:00"},{name:"America/Swift_Current",utc_offset:"-06:00:00"},{name:"America/Managua",utc_offset:"-06:00:00"},{name:"America/Yellowknife",utc_offset:"-06:00:00"},{name:"America/Bahia_Banderas",utc_offset:"-06:00:00"},{name:"America/Shiprock",utc_offset:"-06:00:00"},{name:"America/Edmonton",utc_offset:"-06:00:00"},{name:"America/Mexico_City",utc_offset:"-06:00:00"},{name:"America/Belize",utc_offset:"-06:00:00"},{name:"America/Inuvik",utc_offset:"-06:00:00"},{name:"America/Tegucigalpa",utc_offset:"-06:00:00"},{name:"America/Regina",utc_offset:"-06:00:00"},{name:"America/Cambridge_Bay",utc_offset:"-06:00:00"},{name:"America/Denver",utc_offset:"-06:00:00"},{name:"America/El_Salvador",utc_offset:"-06:00:00"},{name:"America/Chihuahua",utc_offset:"-06:00:00"},{name:"America/Monterrey",utc_offset:"-06:00:00"},{name:"America/Ciudad_Juarez",utc_offset:"-06:00:00"},{name:"America/Merida",utc_offset:"-06:00:00"},{name:"US/Mountain",utc_offset:"-06:00:00"},{name:"Etc/GMT+6",utc_offset:"-06:00:00"},{name:"Pacific/Galapagos",utc_offset:"-06:00:00"},{name:"Pacific/Easter",utc_offset:"-06:00:00"},{name:"Canada/Saskatchewan",utc_offset:"-06:00:00"},{name:"Canada/Mountain",utc_offset:"-06:00:00"},{name:"Brazil/Acre",utc_offset:"-05:00:00"},{name:"America/Cancun",utc_offset:"-05:00:00"},{name:"America/Rainy_River",utc_offset:"-05:00:00"},{name:"America/Atikokan",utc_offset:"-05:00:00"},{name:"America/Panama",utc_offset:"-05:00:00"},{name:"America/Porto_Acre",utc_offset:"-05:00:00"},{name:"America/Ojinaga",utc_offset:"-05:00:00"},{name:"America/Chicago",utc_offset:"-05:00:00"},{name:"America/Cayman",utc_offset:"-05:00:00"},{name:"America/Knox_IN",utc_offset:"-05:00:00"},{name:"America/Coral_Harbour",utc_offset:"-05:00:00"},{name:"America/Indiana/Knox",utc_offset:"-05:00:00"},{name:"America/Indiana/Tell_City",utc_offset:"-05:00:00"},{name:"America/Rio_Branco",utc_offset:"-05:00:00"},{name:"America/Eirunepe",utc_offset:"-05:00:00"},{name:"America/Menominee",utc_offset:"-05:00:00"},{name:"America/Winnipeg",utc_offset:"-05:00:00"},{name:"America/Lima",utc_offset:"-05:00:00"},{name:"America/Matamoros",utc_offset:"-05:00:00"},{name:"America/Resolute",utc_offset:"-05:00:00"},{name:"America/Guayaquil",utc_offset:"-05:00:00"},{name:"America/North_Dakota/Center",utc_offset:"-05:00:00"},{name:"America/North_Dakota/Beulah",utc_offset:"-05:00:00"},{name:"America/North_Dakota/New_Salem",utc_offset:"-05:00:00"},{name:"America/Bogota",utc_offset:"-05:00:00"},{name:"America/Rankin_Inlet",utc_offset:"-05:00:00"},{name:"America/Jamaica",utc_offset:"-05:00:00"},{name:"US/Central",utc_offset:"-05:00:00"},{name:"US/Indiana-Starke",utc_offset:"-05:00:00"},{name:"EST",utc_offset:"-05:00:00"},{name:"Etc/GMT+5",utc_offset:"-05:00:00"},{name:"Canada/Central",utc_offset:"-05:00:00"},{name:"CST6CDT",utc_offset:"-05:00:00"},{name:"Jamaica",utc_offset:"-05:00:00"},{name:"Chile/Continental",utc_offset:"-04:00:00"},{name:"Brazil/West",utc_offset:"-04:00:00"},{name:"America/Martinique",utc_offset:"-04:00:00"},{name:"America/La_Paz",utc_offset:"-04:00:00"},{name:"America/Cuiaba",utc_offset:"-04:00:00"},{name:"America/Caracas",utc_offset:"-04:00:00"},{name:"America/Grand_Turk",utc_offset:"-04:00:00"},{name:"America/Nipigon",utc_offset:"-04:00:00"},{name:"America/Grenada",utc_offset:"-04:00:00"},{name:"America/Lower_Princes",utc_offset:"-04:00:00"},{name:"America/Port-au-Prince",utc_offset:"-04:00:00"},{name:"America/Santiago",utc_offset:"-04:00:00"},{name:"America/St_Vincent",utc_offset:"-04:00:00"},{name:"America/Kentucky/Monticello",utc_offset:"-04:00:00"},{name:"America/Kentucky/Louisville",utc_offset:"-04:00:00"},{name:"America/St_Kitts",utc_offset:"-04:00:00"},{name:"America/St_Lucia",utc_offset:"-04:00:00"},{name:"America/Guadeloupe",utc_offset:"-04:00:00"},{name:"America/Havana",utc_offset:"-04:00:00"},{name:"America/Toronto",utc_offset:"-04:00:00"},{name:"America/Montserrat",utc_offset:"-04:00:00"},{name:"America/Curacao",utc_offset:"-04:00:00"},{name:"America/Barbados",utc_offset:"-04:00:00"},{name:"America/Virgin",utc_offset:"-04:00:00"},{name:"America/Detroit",utc_offset:"-04:00:00"},{name:"America/Antigua",utc_offset:"-04:00:00"},{name:"America/Blanc-Sablon",utc_offset:"-04:00:00"},{name:"America/Manaus",utc_offset:"-04:00:00"},{name:"America/Thunder_Bay",utc_offset:"-04:00:00"},{name:"America/Guyana",utc_offset:"-04:00:00"},{name:"America/Puerto_Rico",utc_offset:"-04:00:00"},{name:"America/Louisville",utc_offset:"-04:00:00"},{name:"America/Port_of_Spain",utc_offset:"-04:00:00"},{name:"America/Nassau",utc_offset:"-04:00:00"},{name:"America/Boa_Vista",utc_offset:"-04:00:00"},{name:"America/Fort_Wayne",utc_offset:"-04:00:00"},{name:"America/Iqaluit",utc_offset:"-04:00:00"},{name:"America/Indiana/Winamac",utc_offset:"-04:00:00"},{name:"America/Indiana/Vincennes",utc_offset:"-04:00:00"},{name:"America/Indiana/Marengo",utc_offset:"-04:00:00"},{name:"America/Indiana/Petersburg",utc_offset:"-04:00:00"},{name:"America/Indiana/Indianapolis",utc_offset:"-04:00:00"},{name:"America/Indiana/Vevay",utc_offset:"-04:00:00"},{name:"America/St_Barthelemy",utc_offset:"-04:00:00"},{name:"America/New_York",utc_offset:"-04:00:00"},{name:"America/Campo_Grande",utc_offset:"-04:00:00"},{name:"America/St_Thomas",utc_offset:"-04:00:00"},{name:"America/Tortola",utc_offset:"-04:00:00"},{name:"America/Montreal",utc_offset:"-04:00:00"},{name:"America/Pangnirtung",utc_offset:"-04:00:00"},{name:"America/Anguilla",utc_offset:"-04:00:00"},{name:"America/Kralendijk",utc_offset:"-04:00:00"},{name:"America/Indianapolis",utc_offset:"-04:00:00"},{name:"America/Dominica",utc_offset:"-04:00:00"},{name:"America/Santo_Domingo",utc_offset:"-04:00:00"},{name:"America/Marigot",utc_offset:"-04:00:00"},{name:"America/Porto_Velho",utc_offset:"-04:00:00"},{name:"America/Aruba",utc_offset:"-04:00:00"},{name:"EST5EDT",utc_offset:"-04:00:00"},{name:"US/Eastern",utc_offset:"-04:00:00"},{name:"US/East-Indiana",utc_offset:"-04:00:00"},{name:"US/Michigan",utc_offset:"-04:00:00"},{name:"Etc/GMT+4",utc_offset:"-04:00:00"},{name:"Canada/Eastern",utc_offset:"-04:00:00"},{name:"Cuba",utc_offset:"-04:00:00"},{name:"America/Sao_Paulo",utc_offset:"-03:00:00"},{name:"Brazil/East",utc_offset:"-03:00:00"},{name:"America/Asuncion",utc_offset:"-03:00:00"},{name:"America/Bahia",utc_offset:"-03:00:00"},{name:"America/Buenos_Aires",utc_offset:"-03:00:00"},{name:"America/Cayenne",utc_offset:"-03:00:00"},{name:"America/Argentina/Buenos_Aires",utc_offset:"-03:00:00"},{name:"America/Argentina/ComodRivadavia",utc_offset:"-03:00:00"},{name:"America/Argentina/Salta",utc_offset:"-03:00:00"},{name:"America/Argentina/Mendoza",utc_offset:"-03:00:00"},{name:"America/Argentina/Rio_Gallegos",utc_offset:"-03:00:00"},{name:"America/Argentina/Cordoba",utc_offset:"-03:00:00"},{name:"America/Argentina/Catamarca",utc_offset:"-03:00:00"},{name:"America/Argentina/Ushuaia",utc_offset:"-03:00:00"},{name:"America/Argentina/Jujuy",utc_offset:"-03:00:00"},{name:"America/Argentina/San_Luis",utc_offset:"-03:00:00"},{name:"America/Argentina/La_Rioja",utc_offset:"-03:00:00"},{name:"America/Argentina/San_Juan",utc_offset:"-03:00:00"},{name:"America/Argentina/Tucuman",utc_offset:"-03:00:00"},{name:"America/Belem",utc_offset:"-03:00:00"},{name:"America/Recife",utc_offset:"-03:00:00"},{name:"America/Mendoza",utc_offset:"-03:00:00"},{name:"America/Goose_Bay",utc_offset:"-03:00:00"},{name:"America/Cordoba",utc_offset:"-03:00:00"},{name:"America/Rosario",utc_offset:"-03:00:00"},{name:"America/Catamarca",utc_offset:"-03:00:00"},{name:"America/Santarem",utc_offset:"-03:00:00"},{name:"America/Maceio",utc_offset:"-03:00:00"},{name:"America/Punta_Arenas",utc_offset:"-03:00:00"},{name:"America/Jujuy",utc_offset:"-03:00:00"},{name:"America/Fortaleza",utc_offset:"-03:00:00"},{name:"America/Araguaina",utc_offset:"-03:00:00"},{name:"America/Thule",utc_offset:"-03:00:00"},{name:"America/Paramaribo",utc_offset:"-03:00:00"},{name:"America/Moncton",utc_offset:"-03:00:00"},{name:"America/Glace_Bay",utc_offset:"-03:00:00"},{name:"America/Halifax",utc_offset:"-03:00:00"},{name:"America/Montevideo",utc_offset:"-03:00:00"},{name:"Etc/GMT+3",utc_offset:"-03:00:00"},{name:"Antarctica/Rothera",utc_offset:"-03:00:00"},{name:"Antarctica/Palmer",utc_offset:"-03:00:00"},{name:"Atlantic/Bermuda",utc_offset:"-03:00:00"},{name:"Atlantic/Stanley",utc_offset:"-03:00:00"},{name:"Canada/Atlantic",utc_offset:"-03:00:00"},{name:"Brazil/DeNoronha",utc_offset:"-02:00:00"},{name:"America/Noronha",utc_offset:"-02:00:00"},{name:"America/St_Johns",utc_offset:"-02:30:00"},{name:"America/Miquelon",utc_offset:"-02:00:00"},{name:"Etc/GMT+2",utc_offset:"-02:00:00"},{name:"Atlantic/South_Georgia",utc_offset:"-02:00:00"},{name:"Canada/Newfoundland",utc_offset:"-02:30:00"},{name:"America/Scoresbysund",utc_offset:"-01:00:00"},{name:"America/Godthab",utc_offset:"-01:00:00"},{name:"America/Nuuk",utc_offset:"-01:00:00"},{name:"Etc/GMT+1",utc_offset:"-01:00:00"},{name:"Atlantic/Cape_Verde",utc_offset:"-01:00:00"},{name:"UTC",utc_offset:"00:00:00"},{name:"GMT",utc_offset:"00:00:00"},{name:"Universal",utc_offset:"00:00:00"},{name:"GMT-0",utc_offset:"00:00:00"},{name:"Greenwich",utc_offset:"00:00:00"},{name:"Africa/Freetown",utc_offset:"00:00:00"},{name:"Africa/Accra",utc_offset:"00:00:00"},{name:"Africa/Monrovia",utc_offset:"00:00:00"},{name:"Africa/Ouagadougou",utc_offset:"00:00:00"},{name:"Africa/Lome",utc_offset:"00:00:00"},{name:"Africa/Timbuktu",utc_offset:"00:00:00"},{name:"Africa/Conakry",utc_offset:"00:00:00"},{name:"Africa/Nouakchott",utc_offset:"00:00:00"},{name:"Africa/Bissau",utc_offset:"00:00:00"},{name:"Africa/Sao_Tome",utc_offset:"00:00:00"},{name:"Africa/Dakar",utc_offset:"00:00:00"},{name:"Africa/Bamako",utc_offset:"00:00:00"},{name:"Africa/Abidjan",utc_offset:"00:00:00"},{name:"Africa/Banjul",utc_offset:"00:00:00"},{name:"Zulu",utc_offset:"00:00:00"},{name:"America/Danmarkshavn",utc_offset:"00:00:00"},{name:"GMT0",utc_offset:"00:00:00"},{name:"UCT",utc_offset:"00:00:00"},{name:"Etc/Greenwich",utc_offset:"00:00:00"},{name:"Etc/UTC",utc_offset:"00:00:00"},{name:"Etc/GMT",utc_offset:"00:00:00"},{name:"Etc/Universal",utc_offset:"00:00:00"},{name:"Etc/GMT-0",utc_offset:"00:00:00"},{name:"Etc/Zulu",utc_offset:"00:00:00"},{name:"Etc/GMT0",utc_offset:"00:00:00"},{name:"Etc/UCT",utc_offset:"00:00:00"},{name:"Etc/GMT+0",utc_offset:"00:00:00"},{name:"GMT+0",utc_offset:"00:00:00"},{name:"Atlantic/Azores",utc_offset:"00:00:00"},{name:"Atlantic/St_Helena",utc_offset:"00:00:00"},{name:"Atlantic/Reykjavik",utc_offset:"00:00:00"},{name:"Factory",utc_offset:"00:00:00"},{name:"Iceland",utc_offset:"00:00:00"},{name:"Eire",utc_offset:"01:00:00"},{name:"Africa/Casablanca",utc_offset:"01:00:00"},{name:"Africa/Luanda",utc_offset:"01:00:00"},{name:"Africa/Libreville",utc_offset:"01:00:00"},{name:"Africa/Porto-Novo",utc_offset:"01:00:00"},{name:"Africa/Kinshasa",utc_offset:"01:00:00"},{name:"Africa/Ndjamena",utc_offset:"01:00:00"},{name:"Africa/Brazzaville",utc_offset:"01:00:00"},{name:"Africa/Malabo",utc_offset:"01:00:00"},{name:"Africa/Tunis",utc_offset:"01:00:00"},{name:"Africa/Algiers",utc_offset:"01:00:00"},{name:"Africa/Lagos",utc_offset:"01:00:00"},{name:"Africa/El_Aaiun",utc_offset:"01:00:00"},{name:"Africa/Niamey",utc_offset:"01:00:00"},{name:"Africa/Bangui",utc_offset:"01:00:00"},{name:"Africa/Douala",utc_offset:"01:00:00"},{name:"Europe/Lisbon",utc_offset:"01:00:00"},{name:"Europe/Jersey",utc_offset:"01:00:00"},{name:"Europe/Guernsey",utc_offset:"01:00:00"},{name:"Europe/Isle_of_Man",utc_offset:"01:00:00"},{name:"Europe/Belfast",utc_offset:"01:00:00"},{name:"Europe/London",utc_offset:"01:00:00"},{name:"Europe/Dublin",utc_offset:"01:00:00"},{name:"GB",utc_offset:"01:00:00"},{name:"GB-Eire",utc_offset:"01:00:00"},{name:"Etc/GMT-1",utc_offset:"01:00:00"},{name:"Atlantic/Faeroe",utc_offset:"01:00:00"},{name:"Atlantic/Faroe",utc_offset:"01:00:00"},{name:"Atlantic/Canary",utc_offset:"01:00:00"},{name:"Atlantic/Madeira",utc_offset:"01:00:00"},{name:"WET",utc_offset:"01:00:00"},{name:"Portugal",utc_offset:"01:00:00"},{name:"Libya",utc_offset:"02:00:00"},{name:"Africa/Blantyre",utc_offset:"02:00:00"},{name:"Africa/Windhoek",utc_offset:"02:00:00"},{name:"Africa/Johannesburg",utc_offset:"02:00:00"},{name:"Africa/Cairo",utc_offset:"02:00:00"},{name:"Africa/Gaborone",utc_offset:"02:00:00"},{name:"Africa/Juba",utc_offset:"02:00:00"},{name:"Africa/Maputo",utc_offset:"02:00:00"},{name:"Africa/Lubumbashi",utc_offset:"02:00:00"},{name:"Africa/Maseru",utc_offset:"02:00:00"},{name:"Africa/Ceuta",utc_offset:"02:00:00"},{name:"Africa/Kigali",utc_offset:"02:00:00"},{name:"Africa/Harare",utc_offset:"02:00:00"},{name:"Africa/Lusaka",utc_offset:"02:00:00"},{name:"Africa/Tripoli",utc_offset:"02:00:00"},{name:"Africa/Bujumbura",utc_offset:"02:00:00"},{name:"Africa/Mbabane",utc_offset:"02:00:00"},{name:"Africa/Khartoum",utc_offset:"02:00:00"},{name:"Europe/Copenhagen",utc_offset:"02:00:00"},{name:"Europe/Skopje",utc_offset:"02:00:00"},{name:"Europe/Sarajevo",utc_offset:"02:00:00"},{name:"Europe/Stockholm",utc_offset:"02:00:00"},{name:"Europe/Zurich",utc_offset:"02:00:00"},{name:"Europe/Gibraltar",utc_offset:"02:00:00"},{name:"Europe/Prague",utc_offset:"02:00:00"},{name:"Europe/Brussels",utc_offset:"02:00:00"},{name:"Europe/Busingen",utc_offset:"02:00:00"},{name:"Europe/Madrid",utc_offset:"02:00:00"},{name:"Europe/Bratislava",utc_offset:"02:00:00"},{name:"Europe/Luxembourg",utc_offset:"02:00:00"},{name:"Europe/Budapest",utc_offset:"02:00:00"},{name:"Europe/Malta",utc_offset:"02:00:00"},{name:"Europe/Belgrade",utc_offset:"02:00:00"},{name:"Europe/Ljubljana",utc_offset:"02:00:00"},{name:"Europe/Vaduz",utc_offset:"02:00:00"},{name:"Europe/Vatican",utc_offset:"02:00:00"},{name:"Europe/Podgorica",utc_offset:"02:00:00"},{name:"Europe/Andorra",utc_offset:"02:00:00"},{name:"Europe/Zagreb",utc_offset:"02:00:00"},{name:"Europe/Kaliningrad",utc_offset:"02:00:00"},{name:"Europe/Paris",utc_offset:"02:00:00"},{name:"Europe/San_Marino",utc_offset:"02:00:00"},{name:"Europe/Amsterdam",utc_offset:"02:00:00"},{name:"Europe/Vienna",utc_offset:"02:00:00"},{name:"Europe/Tirane",utc_offset:"02:00:00"},{name:"Europe/Berlin",utc_offset:"02:00:00"},{name:"Europe/Warsaw",utc_offset:"02:00:00"},{name:"Europe/Monaco",utc_offset:"02:00:00"},{name:"Europe/Oslo",utc_offset:"02:00:00"},{name:"Europe/Rome",utc_offset:"02:00:00"},{name:"CET",utc_offset:"02:00:00"},{name:"Asia/Hebron",utc_offset:"02:00:00"},{name:"Asia/Gaza",utc_offset:"02:00:00"},{name:"MET",utc_offset:"02:00:00"},{name:"Etc/GMT-2",utc_offset:"02:00:00"},{name:"Antarctica/Troll",utc_offset:"02:00:00"},{name:"Atlantic/Jan_Mayen",utc_offset:"02:00:00"},{name:"Arctic/Longyearbyen",utc_offset:"02:00:00"},{name:"Poland",utc_offset:"02:00:00"},{name:"Egypt",utc_offset:"02:00:00"},{name:"Indian/Mayotte",utc_offset:"03:00:00"},{name:"Indian/Comoro",utc_offset:"03:00:00"},{name:"Indian/Antananarivo",utc_offset:"03:00:00"},{name:"Africa/Nairobi",utc_offset:"03:00:00"},{name:"Africa/Mogadishu",utc_offset:"03:00:00"},{name:"Africa/Asmera",utc_offset:"03:00:00"},{name:"Africa/Dar_es_Salaam",utc_offset:"03:00:00"},{name:"Africa/Asmara",utc_offset:"03:00:00"},{name:"Africa/Kampala",utc_offset:"03:00:00"},{name:"Africa/Djibouti",utc_offset:"03:00:00"},{name:"Africa/Addis_Ababa",utc_offset:"03:00:00"},{name:"Europe/Uzhgorod",utc_offset:"03:00:00"},{name:"Europe/Minsk",utc_offset:"03:00:00"},{name:"Europe/Vilnius",utc_offset:"03:00:00"},{name:"Europe/Sofia",utc_offset:"03:00:00"},{name:"Europe/Mariehamn",utc_offset:"03:00:00"},{name:"Europe/Riga",utc_offset:"03:00:00"},{name:"Europe/Tallinn",utc_offset:"03:00:00"},{name:"Europe/Moscow",utc_offset:"03:00:00"},{name:"Europe/Bucharest",utc_offset:"03:00:00"},{name:"Europe/Athens",utc_offset:"03:00:00"},{name:"Europe/Nicosia",utc_offset:"03:00:00"},{name:"Europe/Zaporozhye",utc_offset:"03:00:00"},{name:"Europe/Kyiv",utc_offset:"03:00:00"},{name:"Europe/Istanbul",utc_offset:"03:00:00"},{name:"Europe/Helsinki",utc_offset:"03:00:00"},{name:"Europe/Simferopol",utc_offset:"03:00:00"},{name:"Europe/Volgograd",utc_offset:"03:00:00"},{name:"Europe/Kirov",utc_offset:"03:00:00"},{name:"Europe/Chisinau",utc_offset:"03:00:00"},{name:"Europe/Kiev",utc_offset:"03:00:00"},{name:"Europe/Tiraspol",utc_offset:"03:00:00"},{name:"Asia/Damascus",utc_offset:"03:00:00"},{name:"Asia/Amman",utc_offset:"03:00:00"},{name:"Asia/Riyadh",utc_offset:"03:00:00"},{name:"Asia/Famagusta",utc_offset:"03:00:00"},{name:"Asia/Baghdad",utc_offset:"03:00:00"},{name:"Asia/Beirut",utc_offset:"03:00:00"},{name:"Asia/Kuwait",utc_offset:"03:00:00"},{name:"Asia/Jerusalem",utc_offset:"03:00:00"},{name:"Asia/Nicosia",utc_offset:"03:00:00"},{name:"Asia/Aden",utc_offset:"03:00:00"},{name:"Asia/Tehran",utc_offset:"03:30:00"},{name:"Asia/Istanbul",utc_offset:"03:00:00"},{name:"Asia/Qatar",utc_offset:"03:00:00"},{name:"Asia/Bahrain",utc_offset:"03:00:00"},{name:"Asia/Tel_Aviv",utc_offset:"03:00:00"},{name:"Etc/GMT-3",utc_offset:"03:00:00"},{name:"EET",utc_offset:"03:00:00"},{name:"Antarctica/Syowa",utc_offset:"03:00:00"},{name:"W-SU",utc_offset:"03:00:00"},{name:"Israel",utc_offset:"03:00:00"},{name:"Turkey",utc_offset:"03:00:00"},{name:"Iran",utc_offset:"03:30:00"},{name:"Indian/Mahe",utc_offset:"04:00:00"},{name:"Indian/Mauritius",utc_offset:"04:00:00"},{name:"Indian/Reunion",utc_offset:"04:00:00"},{name:"Europe/Samara",utc_offset:"04:00:00"},{name:"Europe/Ulyanovsk",utc_offset:"04:00:00"},{name:"Europe/Saratov",utc_offset:"04:00:00"},{name:"Europe/Astrakhan",utc_offset:"04:00:00"},{name:"Asia/Baku",utc_offset:"04:00:00"},{name:"Asia/Dubai",utc_offset:"04:00:00"},{name:"Asia/Muscat",utc_offset:"04:00:00"},{name:"Asia/Tbilisi",utc_offset:"04:00:00"},{name:"Asia/Kabul",utc_offset:"04:30:00"},{name:"Asia/Yerevan",utc_offset:"04:00:00"},{name:"Etc/GMT-4",utc_offset:"04:00:00"},{name:"Indian/Kerguelen",utc_offset:"05:00:00"},{name:"Indian/Maldives",utc_offset:"05:00:00"},{name:"Asia/Ashgabat",utc_offset:"05:00:00"},{name:"Asia/Kolkata",utc_offset:"05:30:00"},{name:"Asia/Qostanay",utc_offset:"05:00:00"},{name:"Asia/Aqtau",utc_offset:"05:00:00"},{name:"Asia/Samarkand",utc_offset:"05:00:00"},{name:"Asia/Ashkhabad",utc_offset:"05:00:00"},{name:"Asia/Kathmandu",utc_offset:"05:45:00"},{name:"Asia/Atyrau",utc_offset:"05:00:00"},{name:"Asia/Aqtobe",utc_offset:"05:00:00"},{name:"Asia/Calcutta",utc_offset:"05:30:00"},{name:"Asia/Almaty",utc_offset:"05:00:00"},{name:"Asia/Katmandu",utc_offset:"05:45:00"},{name:"Asia/Colombo",utc_offset:"05:30:00"},{name:"Asia/Dushanbe",utc_offset:"05:00:00"},{name:"Asia/Tashkent",utc_offset:"05:00:00"},{name:"Asia/Oral",utc_offset:"05:00:00"},{name:"Asia/Qyzylorda",utc_offset:"05:00:00"},{name:"Asia/Karachi",utc_offset:"05:00:00"},{name:"Asia/Yekaterinburg",utc_offset:"05:00:00"},{name:"Etc/GMT-5",utc_offset:"05:00:00"},{name:"Antarctica/Mawson",utc_offset:"05:00:00"},{name:"Antarctica/Vostok",utc_offset:"05:00:00"},{name:"Indian/Chagos",utc_offset:"06:00:00"},{name:"Indian/Cocos",utc_offset:"06:30:00"},{name:"Asia/Thimphu",utc_offset:"06:00:00"},{name:"Asia/Yangon",utc_offset:"06:30:00"},{name:"Asia/Rangoon",utc_offset:"06:30:00"},{name:"Asia/Bishkek",utc_offset:"06:00:00"},{name:"Asia/Urumqi",utc_offset:"06:00:00"},{name:"Asia/Dacca",utc_offset:"06:00:00"},{name:"Asia/Dhaka",utc_offset:"06:00:00"},{name:"Asia/Kashgar",utc_offset:"06:00:00"},{name:"Asia/Thimbu",utc_offset:"06:00:00"},{name:"Asia/Omsk",utc_offset:"06:00:00"},{name:"Etc/GMT-6",utc_offset:"06:00:00"},{name:"Indian/Christmas",utc_offset:"07:00:00"},{name:"Asia/Ho_Chi_Minh",utc_offset:"07:00:00"},{name:"Asia/Saigon",utc_offset:"07:00:00"},{name:"Asia/Pontianak",utc_offset:"07:00:00"},{name:"Asia/Barnaul",utc_offset:"07:00:00"},{name:"Asia/Novokuznetsk",utc_offset:"07:00:00"},{name:"Asia/Vientiane",utc_offset:"07:00:00"},{name:"Asia/Novosibirsk",utc_offset:"07:00:00"},{name:"Asia/Phnom_Penh",utc_offset:"07:00:00"},{name:"Asia/Jakarta",utc_offset:"07:00:00"},{name:"Asia/Bangkok",utc_offset:"07:00:00"},{name:"Asia/Hovd",utc_offset:"07:00:00"},{name:"Asia/Tomsk",utc_offset:"07:00:00"},{name:"Asia/Krasnoyarsk",utc_offset:"07:00:00"},{name:"Etc/GMT-7",utc_offset:"07:00:00"},{name:"Antarctica/Davis",utc_offset:"07:00:00"},{name:"PRC",utc_offset:"08:00:00"},{name:"Australia/Eucla",utc_offset:"08:45:00"},{name:"Australia/Perth",utc_offset:"08:00:00"},{name:"Australia/West",utc_offset:"08:00:00"},{name:"Singapore",utc_offset:"08:00:00"},{name:"Asia/Macau",utc_offset:"08:00:00"},{name:"Asia/Harbin",utc_offset:"08:00:00"},{name:"Asia/Irkutsk",utc_offset:"08:00:00"},{name:"Asia/Shanghai",utc_offset:"08:00:00"},{name:"Asia/Ujung_Pandang",utc_offset:"08:00:00"},{name:"Asia/Kuching",utc_offset:"08:00:00"},{name:"Asia/Kuala_Lumpur",utc_offset:"08:00:00"},{name:"Asia/Manila",utc_offset:"08:00:00"},{name:"Asia/Brunei",utc_offset:"08:00:00"},{name:"Asia/Chongqing",utc_offset:"08:00:00"},{name:"Asia/Singapore",utc_offset:"08:00:00"},{name:"Asia/Choibalsan",utc_offset:"08:00:00"},{name:"Asia/Chungking",utc_offset:"08:00:00"},{name:"Asia/Taipei",utc_offset:"08:00:00"},{name:"Asia/Ulan_Bator",utc_offset:"08:00:00"},{name:"Asia/Hong_Kong",utc_offset:"08:00:00"},{name:"Asia/Ulaanbaatar",utc_offset:"08:00:00"},{name:"Asia/Macao",utc_offset:"08:00:00"},{name:"Asia/Makassar",utc_offset:"08:00:00"},{name:"Etc/GMT-8",utc_offset:"08:00:00"},{name:"Antarctica/Casey",utc_offset:"08:00:00"},{name:"ROC",utc_offset:"08:00:00"},{name:"Hongkong",utc_offset:"08:00:00"},{name:"Australia/Yancowinna",utc_offset:"09:30:00"},{name:"Australia/Adelaide",utc_offset:"09:30:00"},{name:"Australia/Darwin",utc_offset:"09:30:00"},{name:"Australia/South",utc_offset:"09:30:00"},{name:"Australia/North",utc_offset:"09:30:00"},{name:"Australia/Broken_Hill",utc_offset:"09:30:00"},{name:"ROK",utc_offset:"09:00:00"},{name:"Asia/Seoul",utc_offset:"09:00:00"},{name:"Asia/Dili",utc_offset:"09:00:00"},{name:"Asia/Tokyo",utc_offset:"09:00:00"},{name:"Asia/Yakutsk",utc_offset:"09:00:00"},{name:"Asia/Jayapura",utc_offset:"09:00:00"},{name:"Asia/Chita",utc_offset:"09:00:00"},{name:"Asia/Pyongyang",utc_offset:"09:00:00"},{name:"Asia/Khandyga",utc_offset:"09:00:00"},{name:"Japan",utc_offset:"09:00:00"},{name:"Etc/GMT-9",utc_offset:"09:00:00"},{name:"Pacific/Palau",utc_offset:"09:00:00"},{name:"Australia/Tasmania",utc_offset:"10:00:00"},{name:"Australia/Lord_Howe",utc_offset:"10:30:00"},{name:"Australia/Currie",utc_offset:"10:00:00"},{name:"Australia/Hobart",utc_offset:"10:00:00"},{name:"Australia/LHI",utc_offset:"10:30:00"},{name:"Australia/Melbourne",utc_offset:"10:00:00"},{name:"Australia/Lindeman",utc_offset:"10:00:00"},{name:"Australia/Sydney",utc_offset:"10:00:00"},{name:"Australia/Canberra",utc_offset:"10:00:00"},{name:"Australia/Victoria",utc_offset:"10:00:00"},{name:"Australia/NSW",utc_offset:"10:00:00"},{name:"Australia/ACT",utc_offset:"10:00:00"},{name:"Australia/Queensland",utc_offset:"10:00:00"},{name:"Australia/Brisbane",utc_offset:"10:00:00"},{name:"Asia/Ust-Nera",utc_offset:"10:00:00"},{name:"Asia/Vladivostok",utc_offset:"10:00:00"},{name:"Etc/GMT-10",utc_offset:"10:00:00"},{name:"Antarctica/DumontDUrville",utc_offset:"10:00:00"},{name:"Antarctica/Macquarie",utc_offset:"10:00:00"},{name:"Pacific/Port_Moresby",utc_offset:"10:00:00"},{name:"Pacific/Chuuk",utc_offset:"10:00:00"},{name:"Pacific/Saipan",utc_offset:"10:00:00"},{name:"Pacific/Yap",utc_offset:"10:00:00"},{name:"Pacific/Truk",utc_offset:"10:00:00"},{name:"Pacific/Guam",utc_offset:"10:00:00"},{name:"Asia/Magadan",utc_offset:"11:00:00"},{name:"Asia/Srednekolymsk",utc_offset:"11:00:00"},{name:"Asia/Sakhalin",utc_offset:"11:00:00"},{name:"Etc/GMT-11",utc_offset:"11:00:00"},{name:"Pacific/Noumea",utc_offset:"11:00:00"},{name:"Pacific/Kosrae",utc_offset:"11:00:00"},{name:"Pacific/Efate",utc_offset:"11:00:00"},{name:"Pacific/Bougainville",utc_offset:"11:00:00"},{name:"Pacific/Norfolk",utc_offset:"11:00:00"},{name:"Pacific/Ponape",utc_offset:"11:00:00"},{name:"Pacific/Guadalcanal",utc_offset:"11:00:00"},{name:"Pacific/Pohnpei",utc_offset:"11:00:00"},{name:"NZ-CHAT",utc_offset:"12:45:00"},{name:"Kwajalein",utc_offset:"12:00:00"},{name:"Asia/Anadyr",utc_offset:"12:00:00"},{name:"Asia/Kamchatka",utc_offset:"12:00:00"},{name:"Etc/GMT-12",utc_offset:"12:00:00"},{name:"Antarctica/McMurdo",utc_offset:"12:00:00"},{name:"Antarctica/South_Pole",utc_offset:"12:00:00"},{name:"Pacific/Majuro",utc_offset:"12:00:00"},{name:"Pacific/Auckland",utc_offset:"12:00:00"},{name:"Pacific/Nauru",utc_offset:"12:00:00"},{name:"Pacific/Funafuti",utc_offset:"12:00:00"},{name:"Pacific/Chatham",utc_offset:"12:45:00"},{name:"Pacific/Wake",utc_offset:"12:00:00"},{name:"Pacific/Kwajalein",utc_offset:"12:00:00"},{name:"Pacific/Wallis",utc_offset:"12:00:00"},{name:"Pacific/Tarawa",utc_offset:"12:00:00"},{name:"Pacific/Fiji",utc_offset:"12:00:00"},{name:"NZ",utc_offset:"12:00:00"},{name:"Etc/GMT-13",utc_offset:"13:00:00"},{name:"Pacific/Kanton",utc_offset:"13:00:00"},{name:"Pacific/Apia",utc_offset:"13:00:00"},{name:"Pacific/Fakaofo",utc_offset:"13:00:00"},{name:"Pacific/Enderbury",utc_offset:"13:00:00"},{name:"Pacific/Tongatapu",utc_offset:"13:00:00"},{name:"Etc/GMT-14",utc_offset:"14:00:00"},{name:"Pacific/Kiritimati",utc_offset:"14:00:00"}];Ge.map(e=>e.name);const he="UTC",b0=e=>{let n=new Date(Number(e));if(!e){const s=new Date;n=new Date(Date.UTC(s.getUTCFullYear(),s.getUTCMonth(),s.getUTCDate()))}const o=String(n.getUTCDate()).padStart(2,"0"),t=String(n.getUTCMonth()+1).padStart(2,"0"),i=n.getUTCFullYear();return[t,o,i].join("/")},v0=(e,n)=>new Date(Number(e)).toLocaleDateString("en-US",{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",...n});function pe(){return{enqueueSnackbar:(e,n="success",o)=>{y0(e,{severity:n,variant:"customAlertComponent",persist:!0,...o})},closeSnackbar:Fe}}const C0=n0(({id:e,message:n,severity:o,alertAction:t,sx:i,showCloseIcon:s=!0,persist:c,hideIconVariant:l,autoHideDuration:d,anchorOrigin:r,iconVariant:f,..._},u)=>a(g0,{ref:u,..._,children:a(Xe,{severity:o,action:p(N,{ml:1,children:[a(Ae,{value:t,children:a(Se,{size:"small",onClick:()=>{var m;return e&&((m=t?.onAction)==null?void 0:m.call(t,e))},color:"inherit",children:t?.icon})}),a(Ae,{value:!t&&s,children:a(Se,{size:"small",onClick:()=>{Fe(e)},color:"inherit",children:a(p0,{})})})]}),sx:{alignItems:"center",width:"320px",...i},children:n})}));function k0({entry:e,payload:n,showUuid:o=!0}){const t=ce(u=>{var m,A,g;return(g=(A=(m=u.payload)==null?void 0:m.data)==null?void 0:A.reduce)==null?void 0:g.call(A,(b,y)=>b+y.value,0)},[]),i=ce(u=>{const m=new me(t(u)||0),A=n?.reduce((y,v)=>y+t(v),0)||0,g=new me(A),b=Number(m.div(g).times(100).toFixed(2,me.ROUND_DOWN));return isNaN(b)||!isFinite(b)?0:b},[t,n]),s=se(()=>t(e),[e,t]),c=le(s),l=se(()=>Number(i(e)),[e,i]),d=le(l),r=ce(u=>Math.floor(u).toLocaleString(),[]),f=Be({type:"text/plain"}),_=pe();return p(Re,{component:"li",direction:"row",spacing:1,sx:{color:e.color},layout:"position",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:[a(N,{sx:{width:"3px",height:"100%",backgroundColor:e.color,borderRadius:3}}),p(w,{children:[p(L,{component:"p",variant:"caption",children:[a(w,{component:"span",display:"inline-flex",mr:.5,children:a(Ie,{from:c??0,to:s,map:r,children:"0"})}),p(w,{component:"span",direction:"row",display:"inline-flex",children:["(",a(Ie,{from:d??0,to:l,map:r,children:"0"}),"%)"]})]}),a(L,{variant:"body1",children:e.value}),e.payload.description&&a(L,{variant:"body2",children:e.payload.description}),o&&e.payload.uuid&&p(L,{variant:"body2",sx:{cursor:"pointer","&:hover":{textDecoration:"underline"}},onClick:()=>{f.copy(e.payload.uuid).catch(()=>{}),_.enqueueSnackbar("UUID copied to clipboard","success")},children:[e.payload.uuid.slice(0,5),"..."]})]})]})}function Oe(e){const{payload:n}=e;return a(ee,{container:!0,direction:"row",component:"ul",gap:2,sx:{mt:2,justifyContent:"flex-start",alignItem:"center",flexWrap:"wrap"},children:a(Ne,{children:n?.map(o=>a(ee,{children:a(k0,{entry:o,payload:n,showUuid:e.showUuid})},`item-${o.payload.uuid}-${o.value}`))})})}function H(e){const{brands:n,colorMap:o,data:t,keyValue:i}=e,s=new Map;n.forEach(({_raw:r})=>{(t?.filter(f=>f.brandUuid===r.brandUuid)??[]).forEach(f=>{const _=f.keyword??f.brandUuid;if(!_)return;const u=(f.interval??[]).map(m=>({date:+new Date(m.date),value:Number(m[i]||0)})).filter(m=>e.filterOutZeroValues?m.value>0:!0);if(s.has(_)){const m=s.get(_);if(!m)return;const A=[...m.chartData,...u],g=new Map;A.forEach(({date:y,value:v})=>{g.set(y,(g.get(y)??0)+v)});const b=Array.from(g.entries()).map(([y,v])=>({date:y,value:v})).sort((y,v)=>y.date-v.date);s.set(_,{keyword:f.keyword,brandUuid:r.brandUuid,brandName:r.brandName,brandColor:o.get(r.brandUuid),brandIntegrationType:r.integrationType,chartData:b})}else s.set(_,{keyword:f.keyword,brandUuid:r.brandUuid,brandName:r.brandName,brandColor:o.get(r.brandUuid),brandIntegrationType:r.integrationType,chartData:u})})});const c=r=>r==="hosted"||r==="sdk"?"SDK":r==="non-hosted"||r==="api"?"API":r,l=({keyword:r,brandColor:f,brandUuid:_})=>r?Ue(r):f??Ue(_),d=Array.from(s.values()).map(({keyword:r,brandUuid:f,brandName:_,brandColor:u,brandIntegrationType:m,chartData:A})=>({uuid:r??f,name:r??_,description:r?"":c(m),color:l({keyword:r,brandColor:u,brandUuid:f}),chartData:A}));return A0.chain(d).sortBy(r=>r.name).toArray().value()}function q(e){const n=R(),{timezone:o=he}=e.filter;return a(N,{sx:{width:"100%",height:"100%",...e.sx},children:a(z,{children:p(we,{width:500,height:300,margin:{top:5,right:60,left:20,bottom:5},children:[a(Z,{vertical:!1}),a(Y,{dataKey:"date",type:"number",domain:["dataMin","dataMax"],tickFormatter:t=>de(t,{timeZone:o,hour12:!1,hour:"numeric"}),allowDuplicatedCategory:!1,tickLine:!1,fontSize:12,tickMargin:12}),a(X,{textAnchor:"end",dataKey:"value",tickLine:!1,tickFormatter:t=>Number(t).toLocaleString(),allowDecimals:!1,domain:[1,"dataMax"],children:e.label&&a(c0,{value:e.label,angle:-90,position:"insideLeft",style:{textAnchor:"middle"}})}),a(Q,{cursor:{stroke:n.palette.neutral.main,strokeWidth:1},formatter:t=>Number(t).toLocaleString(),labelFormatter:t=>_e(t,{timeZone:o,hour12:!1}),itemSorter:t=>-Number(t?.value??0)}),a(re,{content:a(Oe,{showUuid:e.showUuid})}),e.data.map(t=>o0(Le,{uuid:t.uuid,description:t.description,key:t.uuid,name:t.name,dataKey:"value",data:t.chartData,type:"monotone",stroke:t.color,strokeWidth:2,isAnimationActive:!1}))]})})})}function E0({entry:e,showUuid:n=!0}){const o=Be({type:"text/plain"}),t=pe();return p(Re,{component:"li",direction:"row",spacing:1,sx:{color:e.color},layout:"position",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:[a(N,{sx:{width:"3px",height:"100%",backgroundColor:e.color,borderRadius:3}}),p(w,{children:[a(L,{variant:"body1",children:e.value}),e.integrationType&&a(L,{variant:"body2",children:e.integrationType}),n&&e.uuid&&p(L,{variant:"body2",sx:{cursor:"pointer","&:hover":{textDecoration:"underline"}},onClick:()=>{e.uuid&&(o.copy(e.uuid).catch(()=>{}),t.enqueueSnackbar("UUID copied to clipboard","success"))},children:[e.uuid.slice(0,5),"..."]})]})]})}function S0(e){const{payload:n}=e;return a(ee,{container:!0,direction:"row",component:"ul",gap:2,sx:{mt:2,justifyContent:"flex-start",alignItem:"center",flexWrap:"wrap"},children:a(Ne,{children:n?.map(o=>a(ee,{children:a(E0,{entry:o,showUuid:e.showUuid})},`item-${o.uuid}-${o.value}`))})})}const x0=(e,n)=>{const o=new Map;return e.forEach(t=>{t.chartData.forEach(i=>{const s=new Date(i.date).getTime().toString();if(!o.has(s)){const l={date:s};o.set(s,l)}const c=o.get(s);n.forEach(({key:l})=>{var d;const r=`${t.uuid}_${l}`,f=i[l],_=(d=n.find(m=>m.isTotal))==null?void 0:d.key,u=typeof f=="string"?f.trim()===""?0:parseInt(f,10):typeof f=="number"?f:0;if(c[`${r}_absolute`]=u,l!==_){const m=i[_??""];let A;m===0?A=100:A=m>0?parseFloat(new De(u.toString()).div(m).mul(100).toFixed(2,De.ROUND_DOWN)):0,c[r]=A}else c[r]=100})})}),Array.from(o.values()).sort((t,i)=>parseInt(t.date)-parseInt(i.date))};function ge(e){const{timezone:n=he}=e.filter,o=R(),t=se(()=>e.data?x0(e.data,e.keyValues):[],[e.data,e.keyValues]);return a(N,{sx:{width:"100%",height:"100%",...e.sx},children:a(z,{width:"100%",height:"100%",children:p(we,{data:t,width:500,height:300,margin:{top:5,right:60,left:20,bottom:5},children:[a(Z,{strokeDasharray:"3 3"}),a(Y,{dataKey:"date",type:"number",domain:["dataMin","dataMax"],tickFormatter:i=>de(i,{timeZone:n,hour12:!1,hour:"numeric"}),allowDuplicatedCategory:!1,tickLine:!1,fontSize:12,tickMargin:12}),a(X,{textAnchor:"end",tickLine:!1,tickFormatter:i=>`${i.toFixed(0)}%`}),a(Q,{cursor:{stroke:o.palette.neutral.main,strokeWidth:1},labelFormatter:i=>_e(i,{timeZone:n,hour12:!1}),itemSorter:i=>-Number(i?.value??0),formatter:(i,s)=>{const c=typeof i=="number"?i.toFixed(1):i;return[`${s}: ${c}%`]}}),a(re,{content:i=>{var s;const{height:c,width:l,...d}=i,r=t[t.length-1];Object.entries(r).forEach(([u,m])=>{});const f=new Map;e.data.forEach(u=>{e.keyValues.filter(m=>!m.isTotal).forEach(m=>{const A=`${u.uuid}_${m.key}`;f.set(A,u.uuid),f.set(`${A}_integrationType`,u.integrationType??"")})});const _=u=>{const m=f.get(`${u.dataKey}_integrationType`);return m==="hosted"||m==="sdk"?"SDK":m==="non-hosted"||m==="api"?"API":m};return a(S0,{...d,payload:(s=i.payload)==null?void 0:s.map(u=>({uuid:f.get(u.dataKey)??"",value:u.value,color:u.color??o.palette.primary.main,integrationType:_(u),dataKey:u.dataKey}))})}}),e.data.map(i=>e.keyValues.filter(s=>!s.isTotal).map(s=>a(Le,{type:"monotone",dataKey:`${i.uuid}_${s.key}`,name:i.name??i.uuid,stroke:i.color??o.palette.primary.main,strokeWidth:2,dot:!1,isAnimationActive:!1},`${i.uuid}_${s.key}`)))]})})})}function C(e){const n=le(e.value),{ref:o}=h0({from:n??0,to:e.value,duration:1,map:e.map});return a(xe,{sx:{p:3,flex:1,...e.sx},children:p(w,{spacing:1,alignItems:"center",children:[a(L,{ref:o,variant:"h4",fontWeight:"bold",children:e.initialValue}),a(L,{color:"text.secondary",children:e.label})]})})}const ye={margin:{top:5,right:30,left:20,bottom:5}},Ke={tickLine:!1,fontSize:12,tickMargin:12},Ve={textAnchor:"end",tickLine:!1};function ae({data:e,series:n,xAxis:o,yAxis:t,tooltip:i,bar:s,referenceLines:c,referenceAreas:l,sx:d}){const r=R(),f=u=>!u.isFront,_=u=>!!u.isFront;return a(N,{sx:{width:"100%",height:"100%",...d},children:a(z,{children:p(s0,{data:e,...ye,children:[a(Z,{strokeDasharray:"3 3",vertical:!1}),a(Y,{...Ke,...o}),a(X,{...Ve,...t}),a(Q,{cursor:{stroke:r.palette.neutral.main,strokeWidth:1},...i}),c?.filter(f).map((u,m)=>a(fe,{...u},u.label??m)),l?.filter(f).map((u,m)=>a(ue,{...u},u.label??m)),n.map(u=>a(r0,{name:u.key,dataKey:u.dataKey,fill:u.color,stackId:"stack",isAnimationActive:!1,...s},u.key)),c?.filter(_).map((u,m)=>a(fe,{...u},u.label??m)),l?.filter(_).map((u,m)=>a(ue,{...u},u.label??m))]})})})}function We({data:e,series:n,color:o,xAxis:t,yAxis:i,tooltip:s,area:c,referenceLines:l,referenceAreas:d,sx:r,isAnimationActive:f=!1,areaType:_="monotone"}){const u=R(),m=o??u.palette.primary.main;return a(N,{sx:{width:"100%",height:"100%",...r},children:a(z,{children:p(f0,{data:e,...ye,children:[a("defs",{children:n.map((A,g)=>{const b=`gradient-${g}`,y=A.color??m;return p("linearGradient",{id:b,x1:"0",y1:"0",x2:"0",y2:"1",children:[a("stop",{offset:"5%",stopColor:y,stopOpacity:.2}),a("stop",{offset:"95%",stopColor:y,stopOpacity:0})]},b)})}),a(Z,{strokeDasharray:"3 3",vertical:!1}),a(Y,{...Ke,...t}),a(X,{...Ve,...i}),a(Q,{cursor:{stroke:u.palette.neutral.main,strokeWidth:1},...s}),l?.map((A,g)=>a(fe,{...A},A.label??g)),d?.map((A,g)=>a(ue,{...A},A.label??g)),n.map((A,g)=>{const b=`gradient-${g}`,y=A.color??m;return a(u0,{name:A.key,dataKey:A.dataKey,fill:`url(#${b})`,stroke:y,strokeWidth:2,type:_,isAnimationActive:f,...c},A.key)})]})})})}const x={ALLOW:{MIN:0,MAX:400,NAME:"Allow",LABEL:"0-400"},FLAG:{MIN:401,MAX:600,NAME:"Flag",LABEL:"401-600"},BLOCK:{MIN:601,NAME:"Block",LABEL:"601-1000"}},je={ERR001:"Generic error code",OCE001:"1-Click error code",OCE002:"Unsupported phone number",OCE003:"Either phone or email is required",OCE004:"User not found",OCE005:"Credential requests are missing",OCE006:"User identifier is missing",OCE007:"Missing mandatory credentials",OCE008:"Invalid/expired verification code",OCE009:"Verification code required",OCE010:"Missing fields to autofill",OCE011:"Additional information required",OCE012:"BirthDate or SSN4 mismatch",OCE013:"No credentials found",OCE014:"1-Click request expired",OCE015:"1-Click not found",OCE016:"Conflict request for phone number",OCE017:"Risk score too high",OCE018:"Maximum code attempts exceeded",OCE019:"Maximum input attempts exceeded",OCE020:"Brand cannot be used for 1-Click API",OCE021:"User Opted Out"},I=()=>({regularChartWrapper:{justifyContent:"center",alignItems:"center",width:"100%",height:500},smallChartWrapper:{justifyContent:"center",alignItems:"center",width:"100%",height:300}});function be(e){return a(L,{variant:"h6",fontWeight:"900",...e})}function ve(e){return a(L,{variant:"h6",fontWeight:"400",...e})}function T(){const e=I();return p(w,{sx:e.smallChartWrapper,children:[a(be,{children:"No data available for the selected period and brands"}),a(ve,{children:"Please select a different period or brand"})]})}function M(){const e=I();return p(w,{sx:e.smallChartWrapper,children:[a(be,{children:"Loading..."}),a(ve,{children:"Preparing your chart data"})]})}function T0({data:e,threshold:n=120,isLoading:o,isFetching:t,isSuccess:i,sx:s}){const c=R(),l=I(),d=Object.entries(e??{}).map(([f,_])=>({key:f,[f]:_})),r=d.map(({key:f})=>({key:f,dataKey:f,color:c.palette.error.light}));return(!e||Object.keys(e).length===0)&&o?a(M,{}):!e||Object.keys(e).length===0||!i?a(T,{}):a(ae,{sx:{...l.smallChartWrapper,opacity:t?.4:1,...s},data:d,series:r,xAxis:{tickLine:!1,dataKey:"key"},yAxis:{tickLine:!1,domain:[0,`dataMax + ${n>0?n+5:0}`]},tooltip:{labelFormatter:f=>`${je[f]?`${je[f]}`:""}`}})}function Ce(){const e=I();return p(w,{sx:e.smallChartWrapper,children:[a(be,{children:"No data available for the selected period and brands"}),a(ve,{children:"Please change the Risk Signals setting for your brands to enable risk signals metadata"})]})}function M0({data:e,threshold:n=100,isLoading:o=!1,isFetching:t=!1,isSuccess:i=!0,hasPermissionToDisplay:s=!0,sx:c}){const l=R(),d=I(),r=Object.entries(e??{}).map(([_,u])=>({key:_,[_]:u})),f=r.map(({key:_})=>({key:_,dataKey:_,color:l.palette.warning.light}));return s?(!e||Object.keys(e).length===0)&&o?a(M,{}):!e||Object.keys(e).length===0||!i?a(T,{}):a(ae,{sx:{...d.smallChartWrapper,opacity:t?.4:1,...c},data:r,series:f,xAxis:{tickLine:!1,dataKey:"key"},yAxis:{tickLine:!1,domain:[0,`dataMax + ${n>0?n+5:0}`]},tooltip:{labelFormatter:_=>"Total"}}):a(Ce,{})}function $e({payload:e=[],hiddenItems:n,onToggle:o,legendLabel:t}){return a(N,{sx:{display:"flex",justifyContent:"center",gap:"20px",paddingTop:"20px"},children:e.map((i,s)=>{const c=n.has(i.payload.name);return p("div",{style:{display:"flex",alignItems:"center",cursor:"pointer",opacity:c?.4:1},onClick:()=>{o?.(i.payload)},children:[a("div",{style:{width:"12px",height:"12px",backgroundColor:i.color,marginRight:"8px",borderRadius:"2px"}}),a("span",{style:{color:i.color},children:t?`${t}: ${i.value}`:i.value})]},`legend-${s}`)})})}const w0=e=>{const n=Math.PI/180,{cx:o,cy:t,midAngle:i,innerRadius:s,outerRadius:c,startAngle:l,endAngle:d,fill:r,payload:f,percent:_,value:u,valueText:m,valuePercentage:A,needleVisible:g,customText:b,allActive:y}=e,v=Math.sin(-n*i),k=Math.cos(-n*i),K=o+(c+5)*k,V=t+(c+5)*v,U=o+(c+15)*k,j=t+(c+15)*v,B=U+(k>=0?1:-1)*22,F=j,D=k>=0?"start":"end",h=u.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:0});return p("g",{children:[g||y?null:a("text",{x:o,y:t,dy:8,textAnchor:"middle",fill:"#333",fontSize:14,children:f.name}),a(Pe,{cx:o,cy:t,innerRadius:s,outerRadius:c,startAngle:l,endAngle:d,fill:r}),a(Pe,{cx:o,cy:t,startAngle:l,endAngle:d,innerRadius:c+2,outerRadius:c+6,fill:r}),a("path",{d:`M${K},${V}L${U},${j}L${B},${F}`,stroke:r,fill:"none"}),a("circle",{cx:B,cy:F,r:2,fill:r,stroke:"none"}),a("text",{x:B+(k>=0?1:-1)*12,y:F,textAnchor:D,fill:"#333",fontSize:12,children:b||(m?`${m} ${h}`:h)}),A&&p("text",{x:B+(k>=0?1:-1)*12,y:F,dy:16,textAnchor:D,fill:"#999",fontSize:11,children:[`${(_*100).toFixed(2)}%`," (",h,")"]})]})},L0=e=>{const{value:n,data:o,color:t,innerRadius:i,outerRadius:s,boxDimensions:c,legendDimensions:l,valueText:d}=e,r=Math.PI/180;let f=0;o.forEach(E=>{f+=E.value});const _=c?c.width/2:150,u=(c?c.height/2:200)-l.height/2,m=180*(1-Math.max(0,Math.min(1,n/f))),A=(Number(i)+2*Number(s))/3,g=Math.sin(-r*m),b=Math.cos(-r*m),y=5,v=_-y,k=u,K=v+y*g,V=k-y*b,U=v-y*g,j=k+y*b,B=v+A*b,F=k+A*g,D=n.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:0}),h=d??D;return p(ie,{children:[a("circle",{cx:v,cy:k,r:y,fill:t,stroke:"none",style:{pointerEvents:"none"}},"needle-circle"),a("path",{d:`M${K} ${V}L${U} ${j} L${B} ${F} L${K} ${V}`,stroke:"none",fill:t,style:{pointerEvents:"none"}},"needle-path"),a("text",{x:v+y,y:k+26,textAnchor:"middle",fill:"#333",fontSize:12,children:h},"needle-value")]})},P0=(e,n)=>({Allow:n.palette.success.main,Flag:n.palette.warning.main,Block:n.palette.error.main})[e]??n.palette.primary.main;function ze({data:e,sx:n,legendLabel:o,legendToggle:t=!1,valueText:i="",valuePercentage:s=!0,pie:c,needleVisible:l=!1,needleValue:d,needleColor:r="#aaa",allActive:f=!1}){const{innerRadius:_=60,outerRadius:u=100}=c??{},m=R(),[A,g]=J(void 0),[b,y]=J(new Set),v=i0(null),[k,K]=J(null),[V,U]=J(null),j=(h,E)=>{f||g(E)},B=()=>{f||g(void 0)},F=h=>{t&&h&&y(E=>{const P=new Set(E);return P.has(h.name)?P.delete(h.name):P.size<e.length-1&&P.add(h.name),P})},D=e.map((h,E)=>({...h,index:E,value:b.has(h.name)?0:h.value}));return Me(()=>{const h=v.current;if(!h)return;const E=new ResizeObserver(oe=>{var W;const G=(W=oe[0])==null?void 0:W.contentRect;G&&K(G)});E.observe(h);const P=h.getBoundingClientRect();return K(P),()=>{E.disconnect()}},[]),Me(()=>{var h;const E=(h=v.current)==null?void 0:h.querySelector(".recharts-legend-wrapper");if(!E){const W=setInterval(()=>{var G;const $=(G=v.current)==null?void 0:G.querySelector(".recharts-legend-wrapper");if($){const Ye=$.getBoundingClientRect();U(Ye),clearInterval(W)}},100);return()=>{clearInterval(W)}}const P=new ResizeObserver(W=>{var G;const $=(G=W[0])==null?void 0:G.contentRect;$&&U($)});P.observe(E);const oe=E.getBoundingClientRect();return U(oe),()=>{P.disconnect()}},[]),a(N,{ref:v,sx:{width:"100%",height:"100%","& g":{outline:"none"},...n},children:a(z,{children:p(m0,{...ye,children:[a(l0,{data:D,nameKey:"name",dataKey:"value",innerRadius:_,outerRadius:u,activeIndex:f?D.filter(h=>h.value>0).map(h=>h.index):A,activeShape:h=>w0({...h,valueText:i,valuePercentage:s,needleVisible:l,allActive:f}),paddingAngle:0,onMouseEnter:j,onMouseLeave:B,...c,children:D.map(h=>a(d0,{fill:h.color??P0(h.name,m),opacity:b.has(h.name)?.5:1,stroke:"none"},h.name))}),a(re,{content:a($e,{legendLabel:o,hiddenItems:b,onToggle:F})}),l&&d!==void 0&&k&&V&&L0({data:D,value:d,color:r,innerRadius:_,outerRadius:u,boxDimensions:k,legendDimensions:V,valueText:i})]})})})}function D0({data:e,score:n=200,legendLabel:o,isLoading:t,isFetching:i,isSuccess:s,hasPermissionToDisplay:c=!0,sx:l}){const d=R(),r=I();if(!c)return a(Ce,{});if((!e||e.length<=0)&&t)return a(M,{});if(!e||e.length<=0||!s)return a(T,{});const f=[{name:x.ALLOW.NAME,customText:x.ALLOW.LABEL,value:e[0].value,color:d.palette.primary.main},{name:x.FLAG.NAME,customText:x.FLAG.LABEL,value:e[1].value,color:d.palette.warning.main},{name:x.BLOCK.NAME,customText:x.BLOCK.LABEL,value:e[2].value,color:d.palette.error.main}];return a(ze,{data:f,legendToggle:!0,needleValue:n,legendLabel:o,allActive:!0,sx:{...r.smallChartWrapper,opacity:i?.4:1,...l}})}function N0({data:e,isLoading:n,isFetching:o,isSuccess:t,hasPermissionToDisplay:i=!0,sx:s}){const c=R(),l=I(),d=(f=>{const _={};return f.forEach(u=>{Object.entries(u).forEach(([m,A])=>{const g=parseInt(m);g<=1e3&&(_[g]=(_[g]||0)+A)})}),Array.from({length:1001},(u,m)=>({key:m.toString(),value:_[m]||0}))})(e),r=[{key:"Risk Score",dataKey:"value",color:c.palette.error.main}];return i?(!e||Object.keys(e).length===0)&&n?a(M,{}):!e||Object.keys(e).length===0||!t?a(T,{}):a(ae,{data:d,series:r,sx:{...l.smallChartWrapper,opacity:o?.4:1,...s},yAxis:{label:{value:"Count",angle:-90,position:"insideLeft"},domain:[0,"dataMax + 10"]},xAxis:{domain:[0,"dataMax"],interval:"preserveStartEnd"},tooltip:{labelFormatter:()=>"Risk Score",formatter:(f,_,u)=>[f,u.payload.key]},referenceAreas:[{x1:x.ALLOW.MIN,x2:x.ALLOW.MAX,fill:"#ffffff00",isFront:!1,label:x.ALLOW.NAME},{x1:x.FLAG.MIN,x2:x.FLAG.MAX,fill:c.palette.warning.light,isFront:!1,label:x.FLAG.NAME},{x1:x.BLOCK.MIN,fill:c.palette.error.light,isFront:!1,label:x.BLOCK.NAME}]}):a(Ce,{})}function R0({data:e,isLoading:n,isFetching:o,isSuccess:t,filter:i,sx:s}){var c,l;const d=I(),r={oneClickCreated:{key:"oneClickCreated",name:"Started",isTotal:!0},oneClickSuccess:{key:"oneClickSuccess",name:"Finished"}};return!e.length&&n?a(M,{}):!e.length||!((l=(c=e[0])==null?void 0:c.chartData)!=null&&l.length)||!t?a(T,{}):a(ge,{data:e,keyValues:Object.values(r),filter:i,sx:{...d.smallChartWrapper,opacity:o?.4:1,...s}})}const I0={chartWrapper:{justifyContent:"center",alignItems:"center",width:"100%",height:500}};function U0({data:e,isLoading:n,isFetching:o,isSuccess:t,filter:i}){return!e.length&&n?a(M,{}):!e.length||!t?a(T,{}):a(q,{label:"Uniques",data:e,filter:i,sx:{...I0.chartWrapper,opacity:o?.4:1}})}function B0(e){return H(e)}const F0=({data:e,brands:n})=>e.flatMap(o=>{const t=n.find(i=>i.brandUuid===o.brandUuid);return!t||!o.interval?[]:o.interval.map(i=>({month:i.date,brandUuid:o.brandUuid,brand:t.brandName,integrationType:_0(t.integrationType),total:i.oneClickCreated,finished:i.oneClickSuccess,totalCost:i.totalCost,riskSignal:i.riskSignal}))}),te="",G0=({data:e,isLoading:n,isFetching:o,showTotalCost:t=!0,showRiskSignal:i=!0,timezone:s=he})=>!(e!=null&&e.length)&&n?a(M,{}):e!=null&&e.length?a(Qe,{component:xe,sx:{opacity:o?.4:1},children:p(e0,{children:[a(a0,{children:p(Te,{children:[a(S,{children:"Month"}),a(S,{children:"Brand"}),a(S,{children:"Integration Type"}),a(S,{align:"right",children:"Started"}),a(S,{align:"right",children:"Finished"}),t&&a(S,{align:"right",children:"Total Cost"}),i&&a(S,{align:"right",children:"Risk Signal"})]})}),a(t0,{children:e.map(c=>p(Te,{children:[a(S,{children:new Date(c.month).toLocaleDateString(void 0,{month:"short",year:"numeric",timeZone:s})}),a(S,{children:c.brand}),a(S,{children:c.integrationType}),a(S,{align:"right",children:c.total||te}),a(S,{align:"right",children:c.finished||te}),t&&a(S,{align:"right",children:c.totalCost??te}),i&&a(S,{align:"right",children:c.riskSignal||te})]},`${c.brandUuid}-${c.month}`))})]})}):a(T,{});function O0({lastUpdated:e}){return p(L,{variant:"caption",color:"text.secondary",fontWeight:"600",children:["The data was last updated on"," ",v0(e??Date.now(),{hour12:!1}),"."]})}const O=e=>new Intl.NumberFormat("en-US").format(Number(e.toFixed(0))),ke=e=>new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(e),ne=e=>new Intl.NumberFormat("en-US",{style:"percent",minimumFractionDigits:2,maximumFractionDigits:2}).format(e),He={totalSignups:0,totalSuccess:0,totalCost:0,successRate:0};function K0(e){if(!(e!=null&&e.length))return He;const n=e.reduce((s,c)=>s+(c.overall.oneClickCreated||0),0),o=e.reduce((s,c)=>s+(c.overall.oneClickSuccess||0),0),t=e.reduce((s,c)=>{const l=c.overall.totalCost?Number(c.overall.totalCost.replace("$","").replace(/,/g,"")):0;return s+l},0),i=o/n;return{totalSignups:n,totalSuccess:o,totalCost:t,successRate:isNaN(i)?0:i}}function V0({chartData:e,isLoading:n=!0,hideTotalCost:o=!1}){const t=n?He:K0(e);return p(w,{direction:"row",spacing:3,children:[a(C,{label:"Total 1-Click Signups",value:t.totalSignups,initialValue:t.totalSignups,map:O}),a(C,{label:"Finished 1-Click Signups",value:t.totalSuccess,initialValue:t.totalSuccess,map:O}),!o&&a(C,{label:"Total Cost",value:t.totalCost,initialValue:t.totalCost,map:ke}),a(C,{label:"Success Rate",value:t.successRate,initialValue:t.successRate,map:ne})]})}const W0={chartWrapper:{justifyContent:"center",alignItems:"center",width:"100%",height:500}};function j0({label:e,data:n,isLoading:o,isFetching:t,isSuccess:i,filter:s,sx:c}){return!n.length&&o?a(M,{}):!n.length||!i?a(T,{}):a(q,{label:e??"TTS Over Time",data:n,filter:s,showUuid:!1,sx:{...W0.chartWrapper,opacity:t?.4:1,...c}})}function $0(e){return H(e)}const qe={total:0,success:0,totalCost:0,successRate:0};function z0(e){if(!(e!=null&&e.length))return qe;let n=0,o=0;const t=0;e.forEach(s=>{var c;if((c=s.interval)!=null&&c.length){const l=s.interval.reduce((r,f)=>r+(f.ttsSent||0),0),d=s.interval.reduce((r,f)=>r+(f.ttsVerified||0),0);n+=l,o+=d}});const i=n>0?o/n:0;return{total:n,success:o,totalCost:t,successRate:isNaN(i)?0:i}}function H0({chartData:e,isLoading:n=!0,hideTotalCost:o=!1}){const t=n?qe:z0(e);return p(w,{direction:"row",spacing:3,children:[a(C,{label:"Total Sent",value:t.total,initialValue:t.total,map:O}),a(C,{label:"Total Verified",value:t.success,initialValue:t.success,map:O}),!o&&a(C,{label:"Total Cost",value:t.totalCost,initialValue:t.totalCost,map:ke}),a(C,{label:"Success Rate",value:t.successRate,initialValue:t.successRate,map:ne})]})}const q0={chartWrapper:{justifyContent:"center",alignItems:"center",width:"100%",height:500}};function J0({label:e,data:n,isLoading:o,isFetching:t,isSuccess:i,filter:s,sx:c}){return!n.length&&o?a(M,{}):!n.length||!i?a(T,{}):a(q,{label:e??"OneClick Health Over Time",data:n,filter:s,showUuid:!0,sx:{...q0.chartWrapper,opacity:t?.4:1,...c}})}function Z0(e){return H(e)}const Ee={total:0,success:0,totalCost:0,successRate:0};function Je(e){if(!(e!=null&&e.length))return Ee;let n=0,o=0;const t=0;e.forEach(s=>{var c;if((c=s.interval)!=null&&c.length){const l=s.interval.reduce((r,f)=>r+(f.oneClickHealthCreated||0),0),d=s.interval.reduce((r,f)=>r+(f.oneClickHealthSucceeded||0),0);n+=l,o+=d}});const i=n>0?o/n:0;return{total:n,success:o,totalCost:t,successRate:isNaN(i)?0:i}}function Y0({chartData:e,isLoading:n=!0,hideTotalCost:o=!1}){const t=n?Ee:Je(e);return p(w,{direction:"row",spacing:3,children:[a(C,{label:"Total Created",value:t.total,initialValue:t.total,map:O}),a(C,{label:"Total Success",value:t.success,initialValue:t.success,map:O}),!o&&a(C,{label:"Total Cost",value:t.totalCost,initialValue:t.totalCost,map:ke}),a(C,{label:"Success Rate",value:t.successRate,initialValue:t.successRate,map:ne})]})}function X0({data:e,isLoading:n,isFetching:o,isSuccess:t,filter:i,sx:s}){var c,l;const d=I(),r={oneClickHealthCreated:{key:"oneClickHealthCreated",name:"Started",isTotal:!0},oneClickHealthSucceeded:{key:"oneClickHealthSucceeded",name:"Finished"}};return!e.length&&n?a(M,{}):!e.length||!((l=(c=e[0])==null?void 0:c.chartData)!=null&&l.length)||!t?a(T,{}):a(ge,{data:e,keyValues:Object.values(r),filter:i,sx:{...d.smallChartWrapper,opacity:o?.4:1,...s}})}const Ze={totalDelivered:0,totalVerified:0,successRate:0};function Q0(e){if(!(e!=null&&e.length))return Ze;let n=0,o=0;e.forEach(i=>{var s;if((s=i.interval)!=null&&s.length){const c=i.interval.reduce((d,r)=>d+(r.oneClickVerificationDelivered||0),0),l=i.interval.reduce((d,r)=>d+(r.oneClickVerificationVerified||0),0);n+=c,o+=l}});const t=n>0?o/n:0;return{totalDelivered:n,totalVerified:o,successRate:isNaN(t)?0:t}}function ea({chartData:e,isLoading:n=!0}){const o=n?Ze:Q0(e);return p(w,{direction:"row",spacing:3,children:[a(C,{label:"Total Delivered",value:o.totalDelivered,initialValue:o.totalDelivered,map:O}),a(C,{label:"Total Verified",value:o.totalVerified,initialValue:o.totalVerified,map:O}),a(C,{label:"Success Rate",value:o.successRate,initialValue:o.successRate,map:ne})]})}const aa={chartWrapper:{justifyContent:"center",alignItems:"center",width:"100%",height:500}};function ta({label:e,data:n,isLoading:o,isFetching:t,isSuccess:i,filter:s,sx:c}){return!n.length&&o?a(M,{}):!n.length||!i?a(T,{}):a(q,{label:e??"Delivered Over Time",data:n,filter:s,showUuid:!0,sx:{...aa.chartWrapper,opacity:t?.4:1,...c}})}function na(e){return H(e)}const oa={chartWrapper:{justifyContent:"center",alignItems:"center",width:"100%",height:500}};function ia({chartData:e,isLoading:n,isFetching:o,isSuccess:t,filter:i,sx:s}){return!e.data.length&&n?a(M,{}):!e.data.length||!t?a(T,{}):a(We,{series:e.series,data:e.data,xAxis:{dataKey:"month",type:"number",domain:["dataMin","dataMax"],tickFormatter:c=>de(c,{timeZone:i.timezone,hour12:!1,hour:"numeric"})},yAxis:{tickFormatter:c=>`${c}%`},tooltip:{formatter:c=>[`${String(c)}%`,"Success Percentage"],labelFormatter:c=>_e(c,{timeZone:i.timezone,hour12:!1})},sx:{...oa.chartWrapper,opacity:o?.4:1,...s}})}function ca(e){const{data:n,seriesConfig:o}=e;return{series:o,data:n}}function sa(e){const n=new Map,o=e.map(i=>({key:i.brandName,dataKey:i.brandUuid})),t=(i,s)=>s===0?0:i/s*100;for(const i of e)if(i.interval)for(const s of i.interval){const c=new Date(s.date).getTime(),l=n.get(c)??{month:c};n.set(c,l);const d=t(s.oneClickVerificationDelivered,s.oneClickVerificationVerified);l[i.brandUuid]=Math.round(d)}return ca({data:Array.from(n.values()),seriesConfig:o})}export{We as A,C as B,C0 as C,sa as D,T0 as E,Ge as F,b0 as G,M as L,G0 as M,R0 as O,ze as P,M0 as R,q as S,j0 as T,Ae as W,Oe as a,ge as b,ae as c,D0 as d,N0 as e,$e as f,U0 as g,B0 as h,F0 as i,T as j,O0 as k,V0 as l,H as m,$0 as n,H0 as o,J0 as p,Z0 as q,Y0 as r,Ee as s,Je as t,pe as u,X0 as v,ea as w,ta as x,na as y,ia as z};