{"version":3,"file":"js/react/mls-players-match-log-app.js?_t=883c6045abcf46d3d607","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA;AACA;AAAA;AAEA;AAEA;AAEA;AACA;AAOA;AACA;AAAA;AAEA;AAAA;AAEA;AACA;AACA;AACA;AACA;AAAA;AACA;AAEA;AAAA;AACA;AACA;AAGA;AACA;AAMA;AACA;AAAA;AACA;AACA;AAEA;AAOA;AACA;AAAA;AACA;AACA;AAEA;AAaA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AAcA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AAiBA;AACA;AACA;AAcA;AACA;AACA;AAUA;AACA;AACA;AAUA;AACA;AACA;AAcA;AACA;AACA;AAaA;AACA;AACA;AASA;AACA;AACA;AAMA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AASA;;;;;;;;;;;;;;;;AC5PA;;;;;;;;;;;;;;;;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AAEA;AAEA;AACA;AACA;AAEA;AACA;AAAA;AACA;AACA;AAGA;AAEA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAmBA;AAEA;;;;;;;;;;;;;;;;ACpFA;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAGA;AACA;AACA;AAAA;AAGA;AACA;AAAA;AAGA;AACA;AAAA;AAGA;AAAA;AACA;AACA;AACA;AACA;AACA;AAGA;AAEA;AAmBA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AAKA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAIA;AAGA;AAEA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AACA;AACA;AAIA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AAQA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAA;AAWA;AAGA;AAEA;;;;;;;;;;;;;;;;;;;;AC/JA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AAAA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AAGA;AACA;AAEA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;AAEA;AACA;AACA;AACA;AAAA;AACA;AAEA;AAAA;AACA;AAGA;AAEA;AACA;AAIA;AACA;AAAA;AACA;AAGA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;;;;;;;;;;;;;;;;;;;AC9LA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AAEA;AAAA;AAGA;AACA;AACA;AAAA;AAEA;AAEA;AAAA;AACA;AACA;AAEA;AACA;AAAA;AACA;AACA;AACA;AAGA;AACA;AACA;AAAA;AAGA;AACA;AAEA;AACA;AAAA;AACA;AAGA;AACA;AAAA;AACA;AAGA;AACA;AACA;AAAA;AAGA;AACA;AACA;AAAA;AAGA;AACA;AAAA;AAIA;AAMA;AACA;AACA;AAAA;AACA;AACA;AAGA;AACA;AACA;AAAA;AAGA;AAOA;AAAA;AACA;AAGA;AAEA;AACA;AAAA;AAGA;AAAA;AACA;AACA;AAGA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAEA;AAGA;AAEA;;;;;;;;;;;;;;;;AC7JA;;;;;;;;;;;;;;;;ACAA;AAEA;AACA;AACA;AAAA;AAGA;AACA;AAAA;AAGA;AACA;AAEA;AACA;AAAA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AAAA;AAGA;AAAA;AAGA;AACA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AAGA;AACA;AAAA;AAGA;AAAA;AACA;AACA;AAIA;AACA;AACA;AAGA;AAEA;;;;;;;;;;;;;;;;ACtDA;;;;;;;;;;;;;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AAGA;AACA;A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;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAKA;AAIA;AAEA;;;;;;;;;;;;;;;;ACjDA;;;;;;;;;;;;;;;;ACAA;AAEA;AAEA;AACA;AAEA;AACA;AAAA;AAGA;AACA;;;;;;;;;;;;;;;;ACZA;AAEA;AAMA;AACA;AACA;AAAA;AAEA;AAAA;AACA;AAGA;AACA;AACA;AAAA;AAEA;AACA;AACA;AAAA;AACA;AAEA;;;;;;;;;;;;;;;;;;ACxBA;AACA;AAEA;AACA;AACA;AAEA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AASA;AACA;AAEA;AACA;AAAA;AAGA;AACA;AAAA;AAGA;AACA;AAAA;AAGA;AACA;AASA;AACA;AACA;AAAA;AAEA;AACA;AASA;AACA;AACA;AAEA;AACA;AAKA;AACA;AAAA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AACA;AASA;AACA;AAKA;AAKA;AACA;AACA;AACA;AAAA;AAEA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AAGA;AACA;;;;;;;;;;;;;;;;;;AC/IA;AACA;AAEA;AACA;AACA;AAEA;AAEA;AACA;AAAA;AACA;AAEA;AAEA;;;;;;;;;;;;;;;;;;;;;;ACfA;AAEA;AAAA;AACA;AACA;AACA;AAEA;AAEA;AAAA;AACA;AACA;AACA;AAEA;AAEA;AAAA;AAAA;AACA;AAEA;AAAA;AAGA;AAAA;AAAA;AACA;AAAA;AAEA;AAAA;AAAA;AACA;AACA;AAAA;AAEA;AACA;AAEA;AASA;AACA;AAAA;AAAA;AACA;AACA;AAAA;AAiBA;AAGA;AACA;AAAA;AAAA;AACA;AACA;AAAA;AAKA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAEA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AAKA;AAGA;AACA;AAAA;AAAA;AACA;AACA;AAAA;AAEA;AAAA;AAAA;AACA;AAAA;AAKA;AAAA;AAAA;AACA;AACA;AAAA;AAIA;AAAA;AAAA;AACA;AACA;AAAA;AAIA;AAEA;AAGA;AAEA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AAYA;AAMA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAIA;AAIA;AACA;AAAA;AAAA;AACA;AACA;AAAA;AAOA;;;;;;;;;;;;;;;;AClKA","sources":["webpack://@mlssoccer/netcore/./scripts/libraries/_modules/tracking/helpers.js","webpack://@mlssoccer/netcore/./scripts/react/mls-players-match-log/app.js","webpack://@mlssoccer/netcore/./scripts/react/mls-players-match-log/components/PlayersMatchLogTable/PlayersMatchLogTable.js","webpack://@mlssoccer/netcore/./scripts/react/mls-players-match-log/components/PlayersMatchLogTable/index.js","webpack://@mlssoccer/netcore/./scripts/react/mls-players-match-log/main.js","webpack://@mlssoccer/netcore/./scripts/react/mls-players-match-log/utils.js","webpack://@mlssoccer/netcore/./scripts/react/shared/components/ButtonBase/ButtonBase.js","webpack://@mlssoccer/netcore/./scripts/react/shared/components/ButtonBase/index.js","webpack://@mlssoccer/netcore/./scripts/react/shared/components/ButtonGroup/ButtonGroup.js","webpack://@mlssoccer/netcore/./scripts/react/shared/components/ButtonGroup/index.js","webpack://@mlssoccer/netcore/./scripts/react/shared/components/Dropdown/Dropdown.js","webpack://@mlssoccer/netcore/./scripts/react/shared/components/Dropdown/index.js","webpack://@mlssoccer/netcore/./scripts/react/shared/components/Pagination/Pagination.js","webpack://@mlssoccer/netcore/./scripts/react/shared/components/Pagination/index.js","webpack://@mlssoccer/netcore/./scripts/react/shared/components/Table/Table.js","webpack://@mlssoccer/netcore/./scripts/react/shared/components/Table/index.js","webpack://@mlssoccer/netcore/./scripts/react/shared/components/ToggleButton/ToggleButton.js","webpack://@mlssoccer/netcore/./scripts/react/shared/components/ToggleButton/index.js","webpack://@mlssoccer/netcore/./scripts/react/shared/hooks/useEventCallback.js","webpack://@mlssoccer/netcore/./scripts/react/shared/hooks/useForkRef.js","webpack://@mlssoccer/netcore/./scripts/react/shared/hooks/useIsFocusVisible.js","webpack://@mlssoccer/netcore/./scripts/react/shared/hooks/useResize.js","webpack://@mlssoccer/netcore/./scripts/react/shared/svg/Svg.js","webpack://@mlssoccer/netcore/./scripts/react/shared/svg/index.js"],"sourcesContent":["/**\n * @private\n * Push somethig in dataLayer\n * @param obj object to push\n */\nconst dataLayerPush = (obj) => {\n if (!obj) return;\n\n window.dataLayer = window.dataLayer ?? [];\n\n obj = cleanupNull(obj);\n\n window.dataLayer.push(obj);\n};\n\n/**\n * @private\n * cleanup inner props\n * @param {object} obj\n */\nconst cleanupNull = (obj) => {\n if (obj === null) return undefined;\n\n if (typeof obj === 'string') return obj;\n\n for (const key in obj) {\n if (obj.hasOwnProperty(key)) {\n if (Array.isArray(obj[key])) {\n for (let index = 0; index < obj[key].length; index++) {\n obj[key][index] = cleanupNull(obj[key][index]);\n }\n } else {\n obj[key] = cleanupNull(obj[key]);\n }\n }\n }\n\n return obj;\n};\n\n/**\n * Push new Core dataLayer info\n * @param data the meta data\n */\nexport const addCoreDataLayer = (data) => {\n dataLayerPush({\n 'event': 'dataLayer-initialized',\n ...data,\n });\n};\n\n/**\n * Track generic event\n * @param {string} eventName event name\n * @param {any} data event data\n */\nexport const trackEvent = (eventName, data = {}) => {\n dataLayerPush({\n 'event': eventName,\n ...data\n });\n};\n\n/**\n * track block impression\n * @param {string} bucketName\n * @param {string} blockType\n * @param {{\n * id: string,\n * name: string,\n * creative: string,\n * position: string,\n * }[]} promotions\n */\nexport const trackBlockImpression = (bucketName, blockType, promotions) => {\n const impressionData = {\n bucketName,\n blockType,\n 'ecommerce': promotions?.length ? {\n 'promoView': {\n promotions,\n },\n } : undefined,\n };\n\n trackEvent('block-impression', impressionData);\n};\n\n/**\n * track block click\n * @param {string} bucketName\n * @param {string} blockType\n * @param {object} data\n * @param {{\n * id: string,\n * name: string,\n * creative: string,\n * position: string,\n * }} promotion\n */\nexport const trackBlockClick = (bucketName, blockType, layoutName, blockLayout, blockStyle, data, promotion) => {\n const clickData = {\n bucketName,\n blockType,\n layoutName,\n blockLayout,\n blockStyle,\n ...data,\n 'ecommerce': promotion ? {\n 'promoClick': {\n promotions: [promotion],\n },\n } : undefined,\n };\n\n trackEvent('block-click', clickData);\n};\n\n/**\n * Track MatchHub click event\n * @param {{\n * clickType: string,\n * clickItem: string,\n * match: string,\n * matchState: string,\n * clubName: string,\n * playerName: string,\n * competition: string,\n * cardType: string,\n * optaEventType: string,\n * toggle: string\n * }} clickData\n */\nexport const trackMatchHubClick = (clickData) => {\n trackEvent('match-hub-click', clickData);\n};\n\n/**\n * Track Match interaction event\n * @param {{\n * clickType: string,\n * clickItem: string,\n * clickPosition: string,\n * matchState: string,\n * match: string,\n * competition: string,\n * travelType: string\n * }} clickData\n */\nexport const trackMatchInteraction = (clickData) => {\n trackEvent('match-interaction', clickData);\n};\n\n/**\n * Track Week Selector event\n * @param {{\n * selectorLocation: 'top' | 'bottom',\n * direction: 'forward' | 'back',\n * selection: string\n * }} clickData\n */\nexport const trackWeekSelector = (clickData) => {\n trackEvent('week-selector-click', clickData);\n};\n\n/**\n * Track Filter interaction event\n * @param {{\n * statsCategory: string,\n * filterType: string,\n * clickItem: string\n * }} clickData\n */\nexport const trackFilterClick = (clickData) => {\n trackEvent('filter-click', clickData);\n};\n\n/**\n * Track FeaturedMatch click event\n * @param {{\n* clickType: string,\n* clickItem: string,\n* match: string,\n* matchState: string,\n* playerName: string,\n* competition: string,\n* toggle: string\n* }} clickData\n*/\nexport const trackFeaturedMatchClick = (clickData) => {\n trackEvent('featured-match-click', clickData);\n};\n\n/**\n * Track HorizontalScoreboardMatch click event\n * @param {{\n* clickType: string,\n* clickItem: string,\n* match: string,\n* matchState: string,\n* competition: string,\n* clickPosition: string,\n* }} clickData\n*/\nexport const trackHorizontalScoreboardMatch = (clickData) => {\n trackEvent('horizontal-scoreboard-match-click', clickData);\n};\n\n/**\n * Track user successful login event\n * @param {{\n* userId: string,\n* method: string,\n* }} eventData\n*/\nexport const trackUserLogin = (eventData) => {\n trackEvent('successful-login-freemium', eventData);\n};\n\n\n/**\n * Track user login freemium login wall event\n*/\nexport const trackUserFreemiumLoginWall = (eventData) => {\n trackEvent('freemium-login-wall', eventData);\n};\n\nexport const trackUserFreemiumLoginWallViewed = (eventData) => {\n trackEvent('freemium-login-wall_viewed', eventData);\n};\n\nexport const trackUserFreemiumLoginWallCtaClicked = (eventData) => {\n trackEvent('freemium-cta-click', eventData);\n};\n\nexport const trackUserFreemiumSuccessfulSignup = (eventData) => {\n trackEvent('successful-signup', eventData);\n};\n\nexport const trackUserFreemiumSuccessfulLogin = (eventData) => {\n trackEvent('successful-login-freemium', eventData);\n};\n\nexport const trackUserLogged = (userId) => {\n // const dataLayerInitialized = window.dataLayer.find((e) => e.event == 'dataLayer-initialized');\n\n // if (dataLayerInitialized) {\n // dataLayerPush({\n // ...dataLayerInitialized,\n // 'userId': userId,\n // });\n // }\n};\n","export { default } from './main';\n","import React, { useEffect } from 'react';\nimport { useSortBy, useTable, usePagination } from \"react-table\";\nimport { useColumns } from \"../../../shared/components/Table/utils\";\nimport Table from \"../../../shared/components/Table\";\nimport { NoResults } from \"../../../shared/svg/Svg\";\nimport { getEmptyStatTableValuesAccessors, checkNextPage } from \"../../../shared/utils\";\nimport Pagination from \"../../../shared/components/Pagination\";\nimport { periodTypes } from '../../../mls-match-list/utils';\n\nconst PlayersMatchLogTable = ({ baseClass, emptyResultsComponent, playerData, page, statType, setPage, order, setOrder }) => {\n const columns = useColumns(statType, playerData);\n const columnAccessors = columns[0].columns.map((el) => el?.accessor);\n\n const {\n getTableProps,\n getTableBodyProps,\n headerGroups,\n rows,\n prepareRow,\n state: { sortBy },\n } = useTable(\n {\n columns,\n data: playerData && playerData.length > 0\n ? playerData.filter((data) => data?.period === periodTypes.FullTime)\n : getEmptyStatTableValuesAccessors(30, columnAccessors).items,\n autoResetPage: true,\n autoResetSortBy: false,\n manualPagination: true,\n manualSortBy: true,\n disableMultiSort: true,\n disableSortRemove: true,\n initialState: {\n sortBy: [{ id: order?.id, desc: order?.desc }]\n }\n },\n useSortBy,\n usePagination\n );\n\n const canNextPage = checkNextPage(playerData, 30);\n\n const { desc: descending, id } = sortBy[0] || {};\n\n useEffect(() => {\n if (id != order?.id || order?.desc != descending) {\n setOrder({ id, desc: descending });\n\n if (page) {\n setPage(0);\n }\n }\n }, [descending, id]);\n\n return (\n <>\n
{\n if (e.key === \"Enter\") {\n column.toggleSortBy(!column.isSortedDesc);\n }\n }}\n {...column.getHeaderProps(column.getSortByToggleProps({ title: undefined }))}>\n \n \n {column.render(\"Header\")}\n \n {\n column.canSort\n ? \n : null\n }\n \n | \n ))}\n
---|
\n {cell.render(\"Cell\")}\n | \n );\n })}\n