{"version":3,"file":"js/scripts_react_brightcove-video-playlist_components_RequiredAuthModal_index_js-scripts_react_b-787aa5.js?_t=9fe705e2dfcfcc533c4f","mappings":";;;;;;;;;;;;;;AAAA;AAOA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AACA;AAGA;AAEA;AACA;AAAA;AAGA;AACA;AACA;AAAA;AACA;AAGA;AACA;AACA;AAAA;AACA;AAGA;AACA;AACA;AAAA;AACA;AACA;AAGA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AACA;AACA;AAGA;AACA;AACA;AAAA;AACA;AAGA;AACA;AACA;AAAA;AACA;AAGA;AACA;AAAA;AACA;AACA;AAEA;;;;;;;;;;;;;;;;;;;AC3EA;AACA;AAEA;AACA;AAAA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AAAA;AAEA;AAAA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAGA;AAEA;AAEA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AAAA;AACA;AACA;AACA;AACA;AAGA;AAAA;AACA;AAGA;AACA;AAAA;AACA;AACA;AAGA;AAAA;AACA;AAEA;AACA;AAAA;AAGA;AAAA;AACA;AAEA;AACA;AAAA;AAGA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAGA;AACA;AAAA;AAGA;AACA;AAAA;AAGA;AAAA;AACA;AAEA;AAAA;AACA;AAGA;AAAA;AACA;AAGA;AAAA;AACA;AAGA;AAAA;AACA;AAAA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAGA;AACA;AACA;AAAA;AAGA;AACA;AACA;AAAA;AAGA;AACA;AACA;AACA;AAAA;AACA;AACA;AAGA;AAAA;AAGA;AAEA;AACA;AAAA;AACA;AACA;AAGA;AAAA;AACA;AAGA;AAEA;AACA;AAAA;AAGA;AACA;AAAA;AACA;AAGA;AAEA;AAEA;AAAA;AACA;AAEA;AAGA;AAEA;AACA;AACA;AACA;AAEA;AAAA;AACA;AAGA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAGA;AACA;AAAA;AAGA;AACA;AAAA;AAGA;AACA;AACA;AAAA;AACA;AACA;AAEA;AACA;AAAA;AACA;AAGA;AACA;AACA;AAAA;AACA;AACA;AAEA;AACA;AAAA;AACA;AAGA;AACA;AAAA;AAEA;AACA;AAAA;AAIA;AACA;AAAA;AACA;AACA;AAGA;;;;;;;;;;;;;;;;;;;;ACjTA;AACA;AACA;AACA;AACA;AAEA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGA;AACA;AACA;AAAA;AACA;AACA;AACA;AAGA;AACA;AAAA;AAGA;AACA;AAUA;AAAA;AAAA;AACA;AACA;AAAA;AAEA;AAIA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AAEA;AAGA;AAAA;AAAA;AACA;AACA;AAAA;AAEA;AAIA;AACA;AAGA;AAEA;;;;;;;;;;;;;;;;ACzEA;;;;;;;;;;;;;;;;ACAA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AAEA;AAAA;AACA;AAIA;AAGA;AACA;AAAA;AAGA;AAAA;AAGA;AACA;AAEA;;;;;;;;;;;;;;;;;;;;;ACjCA;AACA;AAEA;AAAA;AACA;AACA;AAEA;AAEA;AAAA;AACA;AAEA;AACA;AACA;AAAA;AAGA;AACA;AAEA;AACA;AAAA;AAGA;AACA;AAEA;AACA;AAAA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AAAA;AACA;AACA;AAEA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AAGA;AACA;AAEA;AACA;AAEA;AACA;;;;;;;;;;;;;;;;AC5DA;AAEA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AAsBA;AAGA;AAEA","sources":["webpack://@mlssoccer/netcore/./scripts/libraries/_modules/auth0/helpers.js","webpack://@mlssoccer/netcore/./scripts/libraries/_modules/auth0/index.js","webpack://@mlssoccer/netcore/./scripts/react/brightcove-video-playlist/components/RequiredAuthModal/RequiredAuthModal.js","webpack://@mlssoccer/netcore/./scripts/react/brightcove-video-playlist/components/RequiredAuthModal/index.js","webpack://@mlssoccer/netcore/./scripts/react/brightcove-video-playlist/hooks/useAuth0Session.js","webpack://@mlssoccer/netcore/./scripts/react/brightcove-video-playlist/utils.js","webpack://@mlssoccer/netcore/./scripts/react/shared/svg/ReplayIcon/ReplayIcon.js"],"sourcesContent":["import { trackUserFreemiumLoginWallViewed, trackUserFreemiumLoginWallCtaClicked } from \"../tracking/helpers\";\n\n/**\n * Update account button if user is logged\n * @param isLogged the meta data\n */\n\nexport const updateWalledElements = (isLogged) => {\n  var mlsAccountLoading = document.querySelectorAll('.mls-account-wall-loading');\n  var mlsAccountWall = document.querySelectorAll(\".mls-account-wall\");\n  var mlsAccountWallContent = document.querySelectorAll('.mls-account-wall-content');\n  var mlsAccountWallContentRight = document.querySelectorAll(\".mls-account-wall-content--right \");\n  var mlsLockVideoIcon = document.querySelectorAll(\".-lock\");\n\n  if (mlsAccountLoading?.length) {\n    mlsAccountLoading.forEach(function (element) {\n      element.classList.remove(\"mls-account-wall-loading\");\n    });\n  }\n\n  if (isLogged) {\n\n    if (mlsLockVideoIcon?.length) {\n      mlsLockVideoIcon.forEach((el) => el.remove());\n    }\n\n    if (mlsAccountWall?.length) {\n      mlsAccountWall.forEach(function (element) {\n        element.remove();\n      });\n    }\n\n    if (mlsAccountWallContent) {\n      mlsAccountWallContent.forEach(function (element) {\n        element.classList.remove(\"mls-account-wall-content\");\n      });\n    }\n\n    if (mlsAccountWallContentRight?.length) {\n      mlsAccountWallContentRight.forEach(function (element) {\n        element.classList.remove(\"mls-account-wall-content--right\");\n      });\n    }\n\n  } else {\n    if (mlsAccountWallContent?.length) {\n      var mlsAccountWallDivs = document.querySelectorAll('.mls-account-wall-content .body-part');\n      var mlsAccountWallAds = document.querySelectorAll('.mls-account-wall-content .adv-part');\n      var mlsAccountWallFooter = document.querySelectorAll('.mls-c-article__footer');\n\n      if (mlsAccountWallDivs) {\n        mlsAccountWallDivs.forEach((el, i) => {\n          if (i > 1) {\n            el.remove();\n          }\n        });\n      }\n\n      if (mlsAccountWallAds) {\n        mlsAccountWallAds.forEach((el, i) => {\n          el.remove();\n        });\n      }\n\n      if (mlsAccountWallFooter) {\n        mlsAccountWallFooter.forEach((el, i) => {\n          el.remove();\n        });\n      }\n\n      mlsAccountWallContent.forEach(function (element) {\n        element.classList.remove(\"mls-account-wall-content\");\n      });\n    }\n  }\n}\n","import { trackUserLogged, trackUserFreemiumLoginWallCtaClicked, trackUserFreemiumLoginWallViewed, trackUserFreemiumSuccessfulLogin, trackUserFreemiumSuccessfulSignup } from \"../tracking/helpers\";\nimport { updateWalledElements } from \"./helpers\";\n\nconst configureClient = async () => {\n  window.auth0Client = await auth0.createAuth0Client({\n    domain: window.forgeVariables.auth0.domain,\n    clientId: window.forgeVariables.auth0.clientId,\n    useRefreshTokens: true,\n    cacheLocation: \"localstorage\",\n  });\n};\n\nexport const login = async (redirect_uri = null) => {\n  if (window.auth0Client) {\n    await window.auth0Client.loginWithRedirect({\n      authorizationParams: {\n        redirect_uri: redirect_uri ? redirect_uri : `${window.location.origin}/mlsid/callback?return_uri=${window.location.pathname}`,\n        connection: \"fan-id\",\n        display: \"signin\",\n        prompt: \"login\"\n      },\n    });\n  }\n};\n\nconst logout = async () => {\n  if (window.auth0Client) {\n    await window.auth0Client.logout({\n      clientId: window.forgeVariables.auth0.clientId,\n      logoutParams: {\n        returnTo: window.location.origin\n      }\n    });\n  }\n};\n\nexport const signUp = async (redirect_uri = null) => {\n  if (window.auth0Client) {\n    await window.auth0Client.loginWithRedirect({\n      authorizationParams: {\n        redirect_uri: redirect_uri ? redirect_uri : `${window.location.origin}/mlsid/callback?return_uri=${window.location.pathname}`,\n        connection: \"fan-id\",\n        display: \"signup\",\n        prompt: \"login\"\n      },\n    });\n  }\n};\n\nconst updateWall = (isAuthenticated) => {\n  console.log(\"AUTHENTICATED ? \", isAuthenticated)\n  if (isAuthenticated) {\n    updateWalledElements(true);\n  } else {\n    updateWalledElements(false);\n  }\n};\n\nconst updateUI = async () => {\n  if (window.auth0Client) {\n    const isAuthenticated = await window.auth0Client.isAuthenticated();\n    const query = window.location.search;\n    const params = new URLSearchParams(query);\n    const freemiumType = params.get(\"freemiumType\");\n    const event = params.get(\"event\");\n    const signupType = params.get(\"signupType\");\n    const method = params.get(\"method\") || \"\";\n\n    if (window.dataLayerInitialized) {\n      if (isAuthenticated) {\n        const user = await window.auth0Client.getUser();\n        const sub = user?.sub;\n  \n        if (sub) {\n          window.dataLayer.push({\n            ...window.dataLayerInitialized,\n            userId: user?.sub\n          });\n        }\n      }\n    }\n\n    updateWall(isAuthenticated);\n\n    if (isAuthenticated) {\n\n      if (event === \"successful-signup\" && event && signupType) {\n        trackUserFreemiumSuccessfulSignup({\n          freemiumType,\n          event,\n          signupType,\n          method\n        });\n      }\n  \n      if (event === \"successful-login-freemium\" && freemiumType) {\n        trackUserFreemiumSuccessfulLogin({\n          freemiumType,\n          event,\n          method\n        });\n      }\n\n      const accountSelector = document.querySelectorAll(\n        \".mls-o-navigation__item-link--account\"\n      );\n\n      if (accountSelector?.length) {\n        accountSelector.forEach((el) =>\n          el.setAttribute(\"href\", \"/mlsid/profile\")\n        );\n      }\n\n      const accountIconSelector = document.querySelectorAll(\n        \".mls-o-navigation__item-link--account .oc-o-icon--mls-profile\"\n      );\n      if (accountIconSelector?.length) {\n        accountIconSelector.forEach((el) => el.classList.remove(\"d-none\"));\n      }\n\n      const accountTextSelector = document.querySelectorAll(\n        \".mls-o-navigation__item-link--account .mls-o-navigation__item-text\"\n      );\n      if (accountTextSelector?.length) {\n        accountTextSelector.forEach((el) => el.classList.add(\"d-none\"));\n      }\n\n      const profile = await window.auth0Client.getUser();\n      const profilePage = document.querySelector(\".mls-c-auth0-profile\");\n\n      if (profile && profilePage) {\n        const accountContainer = document.querySelector(\".mls-c-account_info\");\n        const divider = document.querySelector(\".mls-c-account__divider\");\n        const logoutButton = document.querySelector(\".mls-c-account__logout-button\");\n        const connectedAccountsContainer = document.querySelector(\".mls-c-account__connected_accounts--title\");\n        const appleAccount = document.querySelector(\".mls-c-account__connected_accounts--apple\");\n        const fbAccount = document.querySelector(\".mls-c-account__connected_accounts--facebook\");\n\n        if (accountContainer) {\n          accountContainer.style.display = \"grid\";\n        }\n\n        if (divider) {\n          divider.style.display = \"block\";\n        }\n\n        if (logoutButton) {\n          logoutButton.style.display = \"block\";\n        }\n\n        const nameContainer = document.querySelector(\n          \".mls-c-account__name\"\n        );\n        const emailContainer = document.querySelector(\n          \".mls-c-account__email\"\n        );\n\n        const favoriteClubContainer = document.querySelector(\n          \".mls-c-account__favorite-club-wrapper\"\n        );\n\n        const favoriteClubEl = document.querySelector(\n          \".mls-c-account__favorite-club\"\n        );\n\n        if (nameContainer) nameContainer.innerHTML = profile?.given_name && profile?.family_name ? profile?.given_name + \" \" + profile?.family_name : profile?.nickname;\n        if (emailContainer) emailContainer.innerHTML = profile?.email;\n        if (profile?.user_metadata?.favorite_club_opta_id) {\n          const clubsUrl = `${window.forgeVariables.apiList.forgeDAPI}/content/${window.forgeVariables.currentSite.culture}/clubs?fields.inMLSCompetition=true&$skip=0&$limit=99`\n          const clubs = await fetch(clubsUrl)\n            .then((res) => res.json())\n            .catch((_) => []);\n\n          if (clubs?.items?.length) {\n            const optaId = profile.user_metadata.favorite_club_opta_id;\n            const club = clubs?.items.find((club) => club.fields.optaId == optaId);\n            if (club && favoriteClubContainer && favoriteClubEl) {\n              favoriteClubContainer.style.display = \"block\";\n              favoriteClubEl.innerHTML = club.title;\n            }\n          }\n        }\n\n        if (connectedAccountsContainer && appleAccount && profile?.sub?.includes(\"apple\")) {\n          appleAccount.style.display = \"block\";\n          connectedAccountsContainer.style.display = \"flex\";\n        }\n\n        if (connectedAccountsContainer && fbAccount && profile?.sub?.includes(\"facebook\")) {\n          fbAccount.style.display = \"block\";\n          connectedAccountsContainer.style.display = \"flex\";\n        }\n\n        if (!profile?.sub?.includes(\"facebook\") && !profile?.sub?.includes(\"apple\")) {\n          const connectedAccountsTitle = document.querySelector(\".mls-c-account__connected_accounts--title\");\n          if (connectedAccountsTitle) {\n            connectedAccountsTitle.style.display = \"none\";\n          }\n        }\n      }\n\n      return;\n    } else {\n\n      const wall = document.querySelector(\".mls-account-wall\");\n\n      if (wall) {\n        trackUserFreemiumLoginWallViewed({\n          freemiumType: 'article'\n        });\n      }\n\n      const accountTextSelector = document.querySelectorAll(\n        \".mls-o-navigation__item-link--account .mls-o-navigation__item-text\"\n      );\n\n      const signinButton = document.querySelector(\".mls-c-account__signin-button\");\n\n      if (signinButton) {\n        signinButton.style.display = \"block\";\n      }\n\n      if (accountTextSelector?.length) {\n        accountTextSelector.forEach((el) => el.classList.remove(\"d-none\"));\n      }\n    }\n\n    if (query.includes(\"code=\") && query.includes(\"state=\")) {\n      // Process the login state\n      await window.auth0Client.handleRedirectCallback();\n\n      updateUI();\n    }\n  }\n};\n\n\nexport const initializeAuth = async () => {\n\n  const callbackEvent = new Event(\"callback_check\");\n  await configureClient();\n  await updateUI();\n  document.dispatchEvent(callbackEvent);\n\n  const signUpButton = document.querySelector(\n    \".mls-c-account__sign-up--button\"\n  );\n\n  const accountLoginButton = document.querySelector('.mls-o-navigation__item-link--login .mls-o-navigation__item-text');\n  const accountLoginButtonMobile = document.querySelectorAll('.mls-o-navigation__item-link--login-mobile .mls-o-navigation__item-text');\n  const profileSigninButton = document.querySelector(\".mls-c-account__signin-button\");\n\n  const loginButton = document.querySelector(\".mls-c-account__sign-in--button\");\n  const signUpWallButton = document.querySelector(\".mls-account-wall__btn\");\n  const signInWallButton = document.querySelector(\".mls-account-wall__use-profile\");\n  const logoutButton = document.querySelector(\".mls-c-account__logout-button\");\n\n  if (signUpButton) {\n    signUpButton.onclick = () => signUp();\n  }\n\n  if (logoutButton) {\n    logoutButton.onclick = () => logout();\n  }\n\n  if (loginButton) {\n    loginButton.onclick = () => login();\n  }\n\n  if (signInWallButton) {\n    signInWallButton.onclick = () => {\n      trackUserFreemiumLoginWallCtaClicked({\n        freemiumType: \"article\",\n        ctaAction: \"signin\"\n      });\n      const redirect_uri = `${window.location.origin}/mlsid/callback?return_uri=${window.location.pathname}&freemiumType=article&event=successful-login-freemium`\n      login(redirect_uri);\n    };\n  }\n\n  if (signUpWallButton) {\n    signUpWallButton.onclick = () => {\n      trackUserFreemiumLoginWallCtaClicked({\n        freemiumType: \"article\",\n        ctaAction: \"signup\"\n      });\n      const redirect_uri = `${window.location.origin}/mlsid/callback?return_uri=${window.location.pathname}&freemiumType=article&event=successful-signup&signupType=freemium`\n      signUp(redirect_uri);\n    }\n  }\n\n  if (accountLoginButton) {\n    accountLoginButton.onclick = () => login();\n  }\n  if (profileSigninButton) {\n    profileSigninButton.onclick = () => login();\n  }\n\n\n  if (accountLoginButtonMobile?.length) {\n    accountLoginButtonMobile.forEach((el) =>\n      el.onclick = () => login()\n    );\n  }\n\n};\n","import React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { openLoginPage, openSignupPage } from \"../../utils\";\nimport { useReactAppState } from \"../../../shared/containers/utils\";\nimport { trackUserFreemiumLoginWallViewed } from \"../../../../libraries/_modules/tracking/helpers\";\n\nconst RequiredAuthModal = ({\n  visible = true,\n  onGoBackClick = () => null,\n  accountWall = null,\n}) => {\n  const { t, freemiumPopupImageUrl } = useReactAppState();\n  const [modalElement, setModalElement] = useState(null);\n  const accountWallSlugify = accountWall ? accountWall.toLowerCase().split(\" \").join(\"_\") : null;\n  const accountWallPrefix = accountWallSlugify ? \"aw_\" + accountWallSlugify : \"aw\";\n  useEffect(() => {\n    const element = document.getElementById(\"react-root\");\n    setModalElement(element);\n  }, []);\n\n  useEffect(() => {\n    if (visible) {\n      trackUserFreemiumLoginWallViewed({\n        freemiumType: \"video\",\n      });\n    }\n  }, [visible])\n\n  if (!modalElement) {\n    return null;\n  }\n\n  return visible\n    ? ReactDOM.createPortal(\n        <div className=\"mls-c-video-wall\">\n          <div className=\"mls-c-video-wall-modal\">\n            {freemiumPopupImageUrl ? (\n              <img src={freemiumPopupImageUrl} alt=\"freemium popup image\" />\n            ) : null}\n            <div className=\"mls-c-video-wall-modal__container\">\n              <h2 className=\"mls-c-video-wall-modal__title\">\n                {t(`${accountWallPrefix}_hed_video`)}\n              </h2>\n              <button\n                className=\"mls-c-video-wall-modal__button\"\n                onClick={openSignupPage}\n              >\n                {t(`${accountWallPrefix}_cta_1`)}\n              </button>\n              <div className=\"mls-c-video-wall-modal__account\">\n                <span>{t(`${accountWallPrefix}_dek_copy`)} </span>\n                <a\n                  className=\"mls-c-video-wall-modal__account--sign-in\"\n                  href=\"#\"\n                  onClick={openLoginPage}\n                >\n                  {t(`${accountWallPrefix}_cta_2`)}\n                </a>\n              </div>\n              <div\n                className=\"mls-c-video-wall-modal__go-back\"\n                onClick={onGoBackClick}\n              >\n                <span>{t(`${accountWallPrefix}_cta_3`)}</span>\n              </div>\n            </div>\n          </div>\n        </div>,\n        modalElement,\n      )\n    : null;\n};\n\nexport default RequiredAuthModal;\n","export { default } from './RequiredAuthModal';\n","import { useState, useEffect } from \"react\";\n\nfunction useAuth0Session() {\n    const [isAuthenticated, setIsAuthenticated] = useState(undefined);\n\n    useEffect(() => {\n        let intervalId;\n\n        const checkAuth0Client = async () => {\n            if (window.auth0Client) {\n                const _isAuthenticated = await window.auth0Client.isAuthenticated();\n                console.log(\"IS AUTH\", _isAuthenticated);\n                if (typeof _isAuthenticated === \"boolean\") {\n                    setIsAuthenticated(_isAuthenticated);\n                }\n                clearInterval(intervalId); // Clear the interval once we have the auth0Client\n            }\n        };\n\n        // Check immediately in case the auth0Client is already loaded\n        checkAuth0Client();\n\n        // Polling to check if auth0Client becomes available\n        intervalId = setInterval(() => {\n            checkAuth0Client();\n        }, 1000); // You can adjust the interval time\n\n        return () => clearInterval(intervalId); // Cleanup the interval on unmount\n    }, []); // We no longer track window.auth0Client as a dependency\n\n    return isAuthenticated;\n}\n\nexport default useAuth0Session;\n","import { login as Auth0Login, signUp as Auth0SignUp } from \"../../libraries/_modules/auth0\";\nimport { trackUserFreemiumLoginWallCtaClicked } from \"../../libraries/_modules/tracking/helpers\";\n\nconst VIDEO_TYPES = {\n  free: \"Free\",\n  freemium: \"Freemium\",\n  premium: \"Premium\",\n};\n\nexport function getUserPlayVideoPermission({\n  accountWall = null,\n  isUserLogged = false,\n}) {\n  if (!accountWall) {\n    return true;\n  }\n\n  const isVideoFreemium = accountWall === VIDEO_TYPES.freemium;\n  const isVideoFree = accountWall === VIDEO_TYPES.free;\n\n  if (isVideoFree || (isVideoFreemium && isUserLogged)) {\n    return true;\n  }\n\n  return false;\n}\n\nexport function openLoginPage() {\n  trackUserFreemiumLoginWallCtaClicked({\n    freemiumType: \"video\",\n    ctaAction: \"signin\"\n  });\n  const redirect_uri = `${window.location.origin}/mlsid/callback?return_uri=${window.location.pathname}&freemiumType=video&event=successful-login-freemium`\n  Auth0Login(redirect_uri);\n}\n\nexport function openSignupPage() {\n  trackUserFreemiumLoginWallCtaClicked({\n    freemiumType: \"video\",\n    ctaAction: \"signup\"\n  });\n  const redirect_uri = `${window.location.origin}/mlsid/callback?return_uri=${window.location.pathname}&freemiumType=video&event=successful-signup&signupType=freemium`\n  Auth0SignUp(redirect_uri);\n}\n\n\nexport function formatVideoDuration(videoDuration) {\n  const seconds = Math.floor(videoDuration / 1000);\n  const minutes = Math.floor(seconds / 60);\n  const remainingSeconds = seconds % 60;\n  const formattedSeconds =\n    remainingSeconds < 10 ? `0${remainingSeconds}` : remainingSeconds;\n\n  return `${minutes}:${formattedSeconds}`;\n}\n\nexport function isMobileBrowser() {\n  const isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);\n\n  return isMobile;\n}\n","import React from \"react\";\n\nconst ReplayIcon = ({ handleClick, extraClasses, size = \"small\" }) => {\n  return (\n    <button\n      role=\"img\"\n      onClick={handleClick}\n      className={`mls-o-svg transform ${extraClasses ? extraClasses : \"\"}`}>\n      <span className={`oc-o-icon-next-video icon-svg fa-icon-svg--${size}`}>\n        <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 40 40\">\n          <defs>\n            <path id=\"a\" d=\"M0 0h23.62v22.4H0z\" />\n            <path id=\"c\" d=\"M0 0h23.62v22.4H0z\" />\n          </defs>\n          <g fill=\"none\" fillRule=\"evenodd\">\n            <g transform=\"translate(8 9.33)\">\n              <mask id=\"b\" fill=\"#fff\">\n                <use xlinkHref=\"#a\" />\n              </mask>\n              <path fill=\"#FFF\" d=\"M12.41 0C8.12 0 4.25 2.48 2.38 6.27L1.23 1.69 0 2l1.7 6.72 6.72-1.7-.31-1.22-4.67 1.18a9.95 9.95 0 018.97-5.72 9.95 9.95 0 010 19.89c-3.65 0-7-2-8.74-5.2l-1.1.6A11.2 11.2 0 1012.4 0\" mask=\"url(#b)\" />\n            </g>\n            <g transform=\"translate(8 9.33)\">\n              <mask id=\"d\" fill=\"#fff\">\n                <use xlinkHref=\"#c\" />\n              </mask>\n              <path fill=\"#FFF\" d=\"M12.41 0C8.12 0 4.25 2.48 2.38 6.27L1.23 1.69 0 2l1.7 6.72 6.72-1.7-.31-1.22-4.67 1.18a9.95 9.95 0 018.97-5.72 9.95 9.95 0 010 19.89c-3.65 0-7-2-8.74-5.2l-1.1.6A11.2 11.2 0 1012.4 0\" mask=\"url(#d)\" />\n            </g>\n          </g>\n        </svg>\n      </span>\n    </button>\n  );\n};\n\nexport default ReplayIcon;\n"],"names":[],"sourceRoot":""}