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0C,EAAyB,CAAA9d,KAAA,SAAAC,OAAA,sF,6DC3E/B,QANA,WACI,MAAM,OAAEgE,IAAWwa,EAAAA,EAAAA,eAEnB,OAAOvF,EAAAA,EAAAA,UAAQ,IAAM,IAAI/S,gBAAgBlC,IAAS,CAACA,GACvD,C","sources":["apiHandler/point.js","api/point/client.js","client/components/dialog/PureDialog.js","client/components/dialogVerification/popupPayPoint/DialogLoading.js","client/components/dialogLogin/LoginFacebook.js","client/components/dialogLogin/LoginLine.js","client/components/dialogLogin/LoginLineLiff.js","client/components/dialogLogin/LoginLineContainer.js","client/components/dialogLogin/LoginEnterprise.js","client/components/dialogLogin/PrivacyLink.js","client/components/dialogLogin/DialogLogin.js","client/components/dialogLogin/DialogLoginContainer.js","client/components/infoDialog/DialogInfoBeforeLoginTrigger.js","client/components/infoDialog/DialogInfoAfterLoginTrigger.js","client/components/dialogVerification/popupPayPoint/PointJoin.js","client/components/dialogVerification/popupPayPoint/PointSuccess.js","client/components/dialogVerification/popupPayPoint/ErrorHint.js","client/components/dialogVerification/popupPayPoint/PayPointCover.js","client/components/dialogVerification/DialogPasscodeSuccess.js","client/components/dialogVerification/DialogEnterPasscode.js","client/components/dialogVerification/dialogDeductPoint/DialogDeductSuccess.js","client/components/dialogVerification/dialogDeductPoint/DialogDeductFailed.js","client/components/dialogVerification/dialogDeductPoint/DialogPointNotEnough.js","client/components/dialogVerification/dialogDeductPoint/DialogDeductPoint.js","client/components/dialogLoginNoQualified/KKboxUpgradeMemberLevel.js","client/components/dialogLoginNoQualified/DialogLineAddFriend.js","client/components/dialogLoginNoQualified/DialogBindCyberbizECMember.js","client/components/dialogLoginNoQualified/DialogEnterpriseBindLine.js","components/common/Dialog/DialogReferralCode.js","client/components/infoDialog/DialogQualifyCheckTrigger.js","client/components/infoDialog/ProviderFlowInfoAndActionChecker.js","client/hooks/login/useLoginWindowPostMessage.js","client/hooks/login/useLoginLinkAction.js","client/hooks/login/useLoginUrl.js","client/hooks/logout/useLogout.js","client/hooks/logout/useLogoutRedirect.js","client/hooks/useReCaptcha.js","client/hooks/useSubmitReferralCode.js","client/utils/referralCode.js","components/Dialog/DialogReCaptcha.js","hooks/useSearchParams.js"],"sourcesContent":["/**\n * 檢查錯誤是否為點數被上鎖錯誤\n * @typedef {Function} CHECK_POINT_IS_LOCKED\n * processing - 1 => 檢查鎖時發現有鎖噴錯\n * processing - 2 => 上鎖時,如果有鎖就會噴錯\n */\nexport const CHECK_POINT_IS_LOCKED = resp =>\n resp.httpStatus === 400 &&\n resp?.payload?.code === 'PSM-V0-F0' &&\n (resp?.payload?.message === 'Data processing - 1' ||\n resp?.payload?.message === 'Data processing - 2');\n","import querystring from 'query-string';\nimport {\n fetches,\n generateFetchOpts,\n getTestQueryString,\n generateFetchOptsGetter\n} from 'api/client';\nimport { POST } from 'api/common';\nimport * as clientErrTypes from 'config/clientErrorTypes';\nimport { CHECK_POINT_IS_LOCKED } from 'apiHandler/point';\n\n/**\n * @description https://app.clickup.com/t/866afp4a9\n * @example GET:`/promotions/points/pools/${pointPoolUuid}`\n * @method getPointPoolInfoByClientApi 取得點數池 Info ( client 流程 )\n * @param {string} pointPoolUuid 點數池 uuid\n * @return {promise}\n */\nexport const getPointPoolInfoByClientApi = pointPoolUuid => {\n return fetches(`/promotions/points/pools/${pointPoolUuid}`, generateFetchOpts(), {\n dataKeys: 'data'\n });\n};\n\n/**\n * @description https://app.clickup.com/t/866a8k3xc\n * @example GET:`/promotions/members/${login}/point/pools/${pointPoolUuid}/histories/${loginType}`\n * @method getHistoriesByPointPoolMemberApi 取得 member 在特定點數池的點數歷程清單 Api\n * @param {string} loginMethod 登入方式\n * @param {string} pointPoolUuid 點數池 uuid\n * @param {string} perPage 每頁幾筆\n * @param {string} page 第幾頁\n * @return {promise}\n */\nexport const getHistoriesByPointPoolMemberApi = ({ loginMethod, pointPoolUuid, perPage, page }) => {\n const qs = querystring.stringify({ page, perPage });\n\n return fetches(\n `/promotions/members/point/pools/${pointPoolUuid}/histories/${loginMethod}${\n Boolean(qs) ? `?${qs}` : ``\n }`,\n generateFetchOptsGetter(),\n { passPayload: true, dataKeys: 'data' }\n );\n};\n\n/**\n * @description https://app.clickup.com/t/866a8k4f4\n * @example GET:`/promotions/members/point/pools/${pointPoolUuid}/${loginType}`\n * @method getMemberPointTotalByMemberApi member 在特定點數池的當前點數資料\n * @param {string} loginType 登入方式 (facebook, line, enterprise...etc)\n * @param {string} pointPoolUuid 點數池 uuid\n * @return {promise}\n */\n\nexport const getMemberPointTotalByMemberApi = ({ pointPoolUuid, loginType }) => {\n const testQs = getTestQueryString();\n const qs = testQs ? `?${querystring.stringify(testQs)}` : '';\n return fetches(\n `/promotions/members/point/pools/${pointPoolUuid}/${loginType}${qs}`,\n generateFetchOptsGetter(),\n {\n dataKeys: 'data',\n throwErrConfigs: {\n [clientErrTypes.POINT_IS_LOCKED]: CHECK_POINT_IS_LOCKED\n }\n }\n );\n};\n\n/**\n * 活動參加限制扣點 api https://app.clickup.com/t/866a8k3nj\n * @param {string} promoUuid promoUuid\n * @param {string} entriesUuid entriesUuid\n * @return {promise}\n */\n\nexport const deductPointByPromo = ({ promoUUID, currentEntryUUID }) => {\n return fetches(\n `/promotions/${promoUUID}/entries/${currentEntryUUID}/member/points/cost`,\n generateFetchOptsGetter({ method: POST }),\n {\n dataKeys: 'data'\n }\n );\n};\n\n/**\n * @description https://app.clickup.com/t/866a8k3zg\n * @example GET:`/promotions/${promoUuid}/member/points`\n * @method getMemberPointTotalByPromo 取得 member 在特定活動中獲得的點數加總 api\n * @param {string} promoUuid 活動 Uuid\n * @return {promise}\n */\nexport const getMemberPointTotalByPromo = promoUuid => {\n return fetches(`/promotions/${promoUuid}/member/points`, generateFetchOptsGetter(), {\n dataKeys: 'data'\n });\n};\n\n/**\n * @method getPromoPointPoolInfosApi 取得活動使用的點數池清單\n * @param {string} promoUUID 活動 Uuid\n * @return {promise}\n */\nexport function getPromoPointPoolInfosApi(promoUUID) {\n return fetches(`/promotions/${promoUUID}/points/pools`, generateFetchOpts(), {\n dataKeys: 'data',\n throwErrConfigs: { [clientErrTypes.GET_API_ERROR]: r => r.httpStatus !== 200 }\n });\n}\n","import React from 'react';\nimport i18next from 'i18next';\nimport { css } from '@emotion/core';\nimport PropTypes from 'prop-types';\nimport FeverButton from 'components/common/Button/FeverButton';\nimport Backdrop from '@material-ui/core/Backdrop';\nimport Fade from '@material-ui/core/Fade';\nimport IconButton from '@material-ui/core/IconButton';\nimport Modal from '@material-ui/core/Modal';\nimport Typography from '@material-ui/core/Typography';\nimport CheckCircleIcon from '@material-ui/icons/CheckCircle';\nimport CloseIcon from '@material-ui/icons/Close';\nimport { white, functional, success, system900 } from 'Mui/styles/color';\nimport { dp03 } from 'Mui/styles/shadow';\nimport { stylePropType, childrenPropType } from 'utils/propTypes';\nimport useScrollElementOnMount from 'client/hooks/useScrollElementOnMount';\n\nconst PureDialog = ({\n children,\n open,\n isShowHeaderIcon = false,\n isShowCloseIcon = true,\n isShowPrimaryButton = true,\n isShowSecondaryButton = false,\n isLoading = false,\n titleAlign = 'left',\n contentAlgin = 'left',\n titleText,\n contentText,\n primaryButtonText = i18next.t('btn.confirmed'),\n secondaryButtonText = i18next.t('btn.cancel'),\n iconStyle,\n buttonStyle,\n modalStyle,\n dialogContentStyle,\n Icon = CheckCircleIcon,\n onPrimaryButtonClick = () => {},\n onSecondaryButtonClick = () => {},\n onClose = () => {}\n}) => {\n const hasHeader = Boolean(isShowHeaderIcon) && Boolean(titleText) && Boolean(isShowCloseIcon);\n const bindRef = useScrollElementOnMount();\n return (\n \n \n
\n
\n
\n {Boolean(isShowHeaderIcon) && Icon && typeof Icon === 'object' && (\n
\n \n
\n )}\n {titleText && (\n
\n {titleText}\n
\n )}\n
\n {Boolean(isShowCloseIcon) && (\n
\n \n \n \n
\n )}\n
\n
\n {children ? (\n children\n ) : Boolean(contentText) ? (\n \n {contentText}\n \n ) : null}\n
\n {(Boolean(isShowPrimaryButton) || Boolean(isShowSecondaryButton)) && (\n
\n {Boolean(isShowPrimaryButton) && (\n \n )}\n {Boolean(isShowSecondaryButton) && (\n \n )}\n
\n )}\n
\n
\n \n );\n};\n\nexport default PureDialog;\n\nconst modalContainerStyle = css`\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n\nconst containerStyle = css`\n min-width: 320px;\n max-width: 320px;\n padding: 16px;\n background-color: ${white.color};\n box-shadow: ${dp03.boxShadow};\n border-radius: 24px;\n`;\n\nconst iconWrapperStyle = customStyle => css`\n display: flex;\n align-items: center;\n justify-content: center;\n\n & > * {\n font-size: 24px;\n color: ${success.color};\n text-align: center;\n margin-bottom: 4px;\n ${customStyle}\n }\n`;\n\n// adjustWidth: boolean (Dialog 寬度要扣掉 close icon 的寬度)\nconst titleWrapperStyle = (align = 'left', adjustWidth) => css`\n & > * {\n width: ${adjustWidth ? 'calc(100% - 24px)' : '100%'};\n font-weight: 500;\n line-height: 30px;\n letter-spacing: 0.15px;\n text-align: ${align};\n }\n`;\n\nconst contentTextStyle = (align = 'left') => css`\n white-space: pre-line;\n font-weight: 500;\n line-height: 20px;\n letter-spacing: 0.1px;\n text-align: ${align};\n`;\n\nconst closeIconWrapperStyle = css`\n position: absolute;\n top: 0;\n right: 0;\n`;\n\nconst headerStyle = css`\n position: relative;\n display: flex;\n align-items: center;\n justify-content: space-between;\n`;\n\nconst headerInfoStyle = css`\n flex: 1;\n`;\n\nconst contentStyle = hasHeader => css`\n ${hasHeader && 'margin-top: 16px;'}\n`;\n\nconst footerStyle = css`\n gap: 4px;\n display: flex;\n flex-direction: column;\n margin-top: 16px;\n`;\n\nconst closeIconStyle = css`\n color: ${system900.color};\n`;\n\nconst baseButtonStyle = css`\n min-height: 48px;\n padding: 14px 16px 14px 16px;\n gap: 8px;\n border-radius: 16px;\n\n & .MuiTypography-root {\n font-size: 14px;\n font-weight: 500;\n line-height: 20px;\n letter-spacing: 1.25px;\n text-align: center;\n }\n`;\n\nconst primaryButtonStyle = css`\n ${baseButtonStyle}\n`;\n\nconst secondaryButtonStyle = css`\n ${baseButtonStyle}\n`;\n\nPureDialog.propTypes = {\n children: childrenPropType,\n open: PropTypes.bool,\n isShowHeaderIcon: PropTypes.bool,\n isShowCloseIco: PropTypes.bool,\n isShowPrimaryButton: PropTypes.bool,\n isShowSecondaryButton: PropTypes.bool,\n isLoading: PropTypes.bool,\n titleAlign: PropTypes.oneOf(['left', 'center', 'right']),\n contentAlgin: PropTypes.oneOf(['left', 'center', 'right']),\n titleText: PropTypes.string,\n contentText: PropTypes.string,\n primaryButtonText: PropTypes.string,\n secondaryButtonText: PropTypes.string,\n iconStyle: stylePropType,\n buttonStyle: stylePropType,\n modalStyle: stylePropType,\n dialogContentStyle: stylePropType,\n Icon: PropTypes.object,\n onPrimaryButtonClick: PropTypes.func,\n onSecondaryButtonClick: PropTypes.func,\n onClose: PropTypes.func\n};\n","import React from 'react';\nimport { css } from '@emotion/core';\nimport Typography from '@material-ui/core/Typography';\nimport PureDialog from 'client/components/dialog/PureDialog';\n\nexport default function DialogLoading({ open, desc }) {\n return (\n \n
\n \n {desc}\n
\n \n );\n}\n\nconst modalContentStyle = css`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n height: 180px;\n > img {\n margin-bottom: 8px;\n }\n`;\n\nconst modalStyle = zIndex => css`\n ${zIndex && `z-index: ${zIndex} !important;`}\n`;\n","import React from 'react';\nimport { css } from '@emotion/core';\nimport i18n from 'i18next';\nimport { isAndroid } from 'react-device-detect';\n\nimport Button from 'Mui/Button';\n\nimport useLoginUrl from 'client/hooks/login/useLoginUrl';\nimport useLoginLinkClickAction from 'client/hooks/login/useLoginLinkAction';\nimport { loginTypesForApi } from 'config/loginTypes';\nimport { facebook, system300 } from 'Mui/styles/color';\nimport useLineEnv from 'hooks/useLineEnv';\n\nfunction LoginFacebook() {\n const { isInLineAppBrowser } = useLineEnv();\n const loginUrl = useLoginUrl({\n loginType: loginTypesForApi.FACEBOOK,\n additionalQsObj: isAndroid && isInLineAppBrowser ? { openExternalBrowser: '1' } : {}\n });\n const { target, href, onClick } = useLoginLinkClickAction({ loginUrl });\n\n return (\n \n \n \n );\n}\n\nexport default LoginFacebook;\n\nconst buttonStyle = css`\n color: #fff;\n border-radius: 18px;\n background-color: ${facebook.color};\n padding: 6px 12.5px;\n font-weight: bold;\n &:hover {\n background-color: ${facebook.color};\n }\n &.Mui-disabled {\n background-color: ${system300.color};\n color: #fff;\n }\n`;\n\nconst iconStyle = css`\n height: 24px;\n width: 24px;\n display: block;\n background: url(https://assets.fevercdn.com/promotion/img/icon-facebook-login.png) 50% 50%\n no-repeat;\n background-size: contain;\n`;\n\nconst linkStyle = css`\n text-decoration: none;\n`;\n","import React from 'react';\nimport { css } from '@emotion/core';\nimport i18n from 'i18next';\nimport Divider from '@material-ui/core/Divider';\n\nimport Button from 'Mui/Button';\nimport { line, system300 } from 'Mui/styles/color';\nimport useLoginUrl from 'client/hooks/login/useLoginUrl';\nimport useLoginLinkClickAction from 'client/hooks/login/useLoginLinkAction';\nimport { loginTypesForApi } from 'config/loginTypes';\n\nfunction LoginLine() {\n const loginUrl = useLoginUrl({ loginType: loginTypesForApi.LINE });\n const { target, href, onClick } = useLoginLinkClickAction({ loginUrl });\n\n return (\n \n \n \n );\n}\n\nexport default LoginLine;\n\nconst buttonStyle = css`\n color: #fff;\n border-radius: 8px;\n background-color: ${line.color};\n padding: 6px 6.5px;\n font-weight: bold;\n padding-left: 5px;\n &:hover {\n background-color: ${line.color};\n }\n &.Mui-disabled {\n background-color: ${system300.color};\n color: #fff;\n }\n`;\n\nconst linkStyle = css`\n text-decoration: none;\n`;\n\nconst iconStyle = css`\n height: 24px;\n width: 24px;\n display: block;\n background: url(https://assets.fevercdn.com/promotion/img/icon-line-login.png) 50% 50% no-repeat;\n background-size: contain;\n`;\n\nconst dividerStyle = css`\n margin: -6px 5px;\n`;\n","import React from 'react';\nimport { useSelector } from 'react-redux';\nimport { useParams } from 'react-router-dom';\nimport i18n from 'i18next';\nimport querystring from 'query-string';\nimport { css } from '@emotion/core';\nimport Divider from '@material-ui/core/Divider';\n\nimport { IS_UGC_FLOW } from 'config/envVariable';\nimport { line, system300 } from 'Mui/styles/color';\nimport { getLiffUrl } from 'client/utils/login';\nimport { retrieveLineConfig } from 'utils/manipulatePartnerSponsor';\nimport { getQsOfParentUrl } from 'client/utils/queryString';\n\nimport useLoginLinkClickAction from 'client/hooks/login/useLoginLinkAction';\n\nimport Button from 'Mui/Button';\nimport LineLiffQrCode from 'client/components/dialogLogin/LineLiffQrCode';\nimport LoginLine from './LoginLine';\n\nfunction LoginLineLiff({ type, isPC = false }) {\n const { promoUUID } = useParams();\n const {\n partner,\n sponsor,\n sponsor: { uuid: sponsorUUID }\n } = useSelector(s => s);\n const { lineLoginAppLiffId } = retrieveLineConfig({ partner, sponsor });\n const liffId = lineLoginAppLiffId;\n const baseOnPromotionsRouteRedirectPath = `/r/promotions/p/${promoUUID}`;\n const baseOnUgcRouteRedirectPath = window.location.pathname;\n const redirectPath = IS_UGC_FLOW\n ? baseOnUgcRouteRedirectPath\n : baseOnPromotionsRouteRedirectPath;\n const appendQsObj = (() => {\n let { parentUrl, ...qsObj } = querystring.parse(window.location.search);\n const parentQuery = getQsOfParentUrl(parentUrl);\n qsObj = { ...qsObj, ...parentQuery, promo_uuid: promoUUID };\n\n return qsObj;\n })();\n const liffUrl = getLiffUrl({\n liffId,\n sponsorUUID,\n redirectPath,\n appendQsObj\n });\n\n return type === types.QRCODE ? (\n
\n \n {isPC && (\n
\n \n
\n )}\n
\n ) : (\n \n );\n}\n\nexport default LoginLineLiff;\n\nfunction LoginLineButton({ url }) {\n const { target } = useLoginLinkClickAction({ loginUrl: url });\n\n return (\n \n \n \n );\n}\n\nexport const types = {\n BUTTON: 'button',\n QRCODE: 'qrCode'\n};\n\nconst buttonStyle = css`\n color: #fff;\n border-radius: 8px;\n background-color: ${line.color};\n padding: 6px 6.5px;\n font-weight: bold;\n padding-left: 5px;\n display: flex;\n flex-direction: column;\n &:hover {\n background-color: ${line.color};\n }\n &.Mui-disabled {\n background-color: ${system300.color};\n color: #fff;\n }\n`;\n\nconst lineLoginWrapperStyle = css`\n padding-top: 1rem;\n`;\n\nconst linkStyle = css`\n text-decoration: none;\n`;\n\nconst iconStyle = css`\n height: 24px;\n width: 24px;\n display: block;\n background: url(https://assets.fevercdn.com/promotion/img/icon-line-login.png) 50% 50% no-repeat;\n background-size: contain;\n`;\n\nconst dividerStyle = css`\n margin: -6px 5px;\n`;\n\nconst contentStyle = css`\n display: flex;\n flex-direction: column;\n`;\n","import React from 'react';\nimport { useSelector } from 'react-redux';\nimport { isMobile } from 'react-device-detect';\n\nimport { retrieveLineConfig } from 'utils/manipulatePartnerSponsor';\n\nimport LoginLine from 'client/components/dialogLogin/LoginLine';\nimport LoginLineLiff, { types } from 'client/components/dialogLogin/LoginLineLiff';\nimport useLineEnv from 'hooks/useLineEnv';\n\nfunction LoginLineContainer() {\n const {\n partner,\n sponsor,\n appState: { hasTryLiff }\n } = useSelector(s => s);\n const { isInLiffBrowser, isInLineAppBrowser } = useLineEnv();\n\n const { lineLoginAppLiffId } = retrieveLineConfig({ partner, sponsor });\n const canUseLiff = Boolean(lineLoginAppLiffId);\n\n if (isMobile) {\n // android v8,v11 facebook can not open liff suck bug liff v2.4.1\n // 所以需要假裝在 liff browser 以免無限循環\n const notLineBrowser = !isInLineAppBrowser && !isInLiffBrowser;\n const mobileShouldUseLiffLogin = canUseLiff && notLineBrowser && !hasTryLiff;\n return mobileShouldUseLiffLogin ? : ;\n } else {\n return canUseLiff ? : ;\n }\n}\n\nexport default LoginLineContainer;\n","import React from 'react';\nimport { useSelector } from 'react-redux';\nimport { css } from '@emotion/core';\nimport i18n from 'i18next';\nimport Button from 'Mui/Button';\n\nimport useLoginUrl from 'client/hooks/login/useLoginUrl';\nimport useLoginLinkClickAction from 'client/hooks/login/useLoginLinkAction';\nimport usePromoSettingThemeStyle from 'client/hooks/usePromoSettingThemeStyle';\nimport { loginTypesForApi } from 'config/loginTypes';\nimport { system300 } from 'Mui/styles/color';\nimport { themedButtonStyle } from 'styles/common';\n\nfunction LoginEnterprise() {\n const themeStyle = usePromoSettingThemeStyle();\n const { enableRestrictToAppLogin } = useSelector(s => s.settingPromo);\n const {\n enterpriseAppDeepLink: sponsorEnterpriseAppDeepLink = '',\n enterpriseCanAppendUrlToDeepLink: sponsorEnterpriseCanAppendUrlToDeepLink = 'false'\n } = useSelector(s => s.sponsor);\n const {\n enterpriseAppDeepLink: partnerEnterpriseAppDeepLink = '',\n enterpriseCanAppendUrlToDeepLink: partnerEnterpriseCanAppendUrlToDeepLink = 'false'\n } = useSelector(s => s.partner);\n const enterpriseAppDeepLink = sponsorEnterpriseAppDeepLink || partnerEnterpriseAppDeepLink;\n const enterpriseCanAppendUrlToDeepLink =\n JSON.parse(sponsorEnterpriseCanAppendUrlToDeepLink) ||\n JSON.parse(partnerEnterpriseCanAppendUrlToDeepLink);\n const loginUrl = useLoginUrl({ loginType: loginTypesForApi.ENTERPRISE });\n const deepLinkUrl = (() => {\n if (Boolean(enterpriseAppDeepLink.length)) {\n if (enterpriseCanAppendUrlToDeepLink) {\n const url = new URL(enterpriseAppDeepLink);\n const qs = new URLSearchParams(url.search);\n let qsIndex = 1;\n for (let [key, value] of qs.entries()) {\n const isLastQs = qsIndex === [...qs].length;\n // [86enfp4qd] deep link 最後一個 query string 沒有設定值,就補上我們的活動 url\n if (isLastQs && !Boolean(value)) {\n qs.set(key, encodeURIComponent(window.location.href));\n url.search = qs;\n }\n qsIndex++;\n }\n return url.toString();\n }\n return enterpriseAppDeepLink;\n }\n return '';\n })();\n\n const buttonUrl = enableRestrictToAppLogin ? deepLinkUrl : loginUrl;\n const { target, href, onClick } = useLoginLinkClickAction({ loginUrl: buttonUrl });\n\n return (\n \n \n {enableRestrictToAppLogin\n ? i18n.t('label.login.app')\n : i18n.t('label.login.enterprise')}\n \n \n );\n}\n\nexport default LoginEnterprise;\n\nconst buttonStyle = css`\n color: #fff;\n border-radius: 20px;\n background-color: #0066ff;\n padding: 6px 12.5px;\n font-weight: bold;\n min-width: 125px;\n &:hover {\n background-color: #0066ff;\n }\n &.Mui-disabled {\n background-color: ${system300.color};\n color: #fff;\n }\n`;\n\nconst linkStyle = css`\n text-decoration: none;\n`;\n","import React from 'react';\nimport { css } from '@emotion/core';\nimport PropTypes from 'prop-types';\nimport i18n from 'i18next';\n\nimport Typography from '@material-ui/core/Typography';\n\nfunction PrivacyLink({ privacyUrl, privacyText }) {\n return (\n \n {privacyText || i18n.t('label.privacy_rule')}\n \n );\n}\n\nPrivacyLink.propTypes = {\n privacyUrl: PropTypes.string,\n privacyText: PropTypes.string\n};\n\nexport default PrivacyLink;\n\nconst linkStyle = css`\n text-decoration: none;\n`;\n","import React from 'react';\nimport { css } from '@emotion/core';\nimport PropTypes from 'prop-types';\nimport Typography from '@material-ui/core/Typography';\n\nimport { loginTypes } from 'config/loginTypes';\nimport useScrollElementOnMount from 'client/hooks/useScrollElementOnMount';\nimport Popup from 'client/components/Popup';\nimport LoginFacebook from 'client/components/dialogLogin/LoginFacebook';\nimport LoginLineContainer from 'client/components/dialogLogin/LoginLineContainer';\nimport LoginEnterprise from 'client/components/dialogLogin/LoginEnterprise';\nimport PrivacyLink from 'client/components/dialogLogin/PrivacyLink';\n\nfunction DialogLogin({\n handleClose,\n title,\n footer,\n type,\n privacyUrl = false,\n privacyText = '',\n open\n}) {\n const bindRef = useScrollElementOnMount();\n\n return (\n \n
\n
\n {type === loginTypes.LINELOGIN && }\n {type === loginTypes.FACEBOOKLOGIN && }\n {type === loginTypes.ENTERPRISELOGIN && }\n
\n {Boolean(privacyUrl) && (\n \n )}\n
\n
\n {Boolean(footer) && {footer}}\n
\n
\n );\n}\n\nDialogLogin.propTypes = {\n handleClose: PropTypes.func,\n title: PropTypes.string,\n footer: PropTypes.string,\n type: PropTypes.number,\n privacyUrl: PropTypes.string,\n privacyText: PropTypes.string\n};\n\nexport default DialogLogin;\n\nconst contentStyle = css`\n display: flex;\n align-items: center;\n justify-content: center;\n flex-flow: column;\n text-align: center;\n padding: 24px 0;\n`;\n\nconst btnContainerStyle = css`\n margin-bottom: 8px;\n`;\n\nconst footerStyle = css`\n text-align: center;\n padding: 9.5px;\n min-height: 40px;\n`;\n","import React from 'react';\nimport { useSelector } from 'react-redux';\nimport i18n from 'i18next';\nimport Cookie from 'js-cookie';\nimport { loginTypes } from 'config/loginTypes';\nimport { gameRunningStatuses } from 'config/gameRunningStatuses';\nimport { loginTypeMappingPointRoutesParam } from 'config/loginTypes';\nimport DialogLogin from 'client/components/dialogLogin/DialogLogin';\n\nfunction DialogLoginContainer({ open, onClose }) {\n const {\n settingPromo: { loginMethod },\n sponsor: { privacyUrl, privacyText }\n } = useSelector(s => s);\n\n const { isNeedEnterPasscode } = useSelector(s => s.userEntryState);\n const { gameRunningStatus, isTestMode } = useSelector(s => s.promoState);\n const isPromoEnd = gameRunningStatus === gameRunningStatuses.END;\n const needPasscodeHint = isNeedEnterPasscode ? i18n.t('label.passcode_need_hint') : '';\n const [title, footer] = (() => {\n if (isTestMode) {\n return [i18n.t('label.test_mode'), needPasscodeHint];\n }\n if (isPromoEnd) {\n return [i18n.t('label.promo_is_end'), i18n.t('label.login_check_prize')];\n }\n return [i18n.t('label.promo_login'), needPasscodeHint];\n })();\n\n if (!shouldShowLoginDialog(loginMethod)) {\n return null;\n }\n if (open) {\n // 5 min for cookie expired\n const loginType = loginTypeMappingPointRoutesParam[loginMethod];\n Cookie.set('gtm_login_event', loginType[0], { expires: 1 / (24 * 12) });\n }\n return (\n \n );\n}\n\nexport default DialogLoginContainer;\n\nfunction shouldShowLoginDialog(loginType) {\n return new Set([\n loginTypes.FACEBOOKLOGIN,\n loginTypes.LINELOGIN,\n loginTypes.ENTERPRISELOGIN\n ]).has(loginType);\n}\n","import React, { useState, forwardRef, useImperativeHandle } from 'react';\nimport { useSelector } from 'react-redux';\nimport i18n from 'i18next';\nimport { loginTypes } from 'config/loginTypes';\nimport { gameRunningStatuses } from 'config/gameRunningStatuses';\nimport DialogSystem from 'client/components/DialogSystem';\nimport DialogLoginContainer from 'client/components/dialogLogin/DialogLoginContainer';\nimport { hasPassLoginCheckTriggerGame } from 'config/promoGameTypes';\n\nconst DialogInfoBeforeLoginTrigger = forwardRef((_, ref) => {\n const { gameRunningStatus } = useSelector(s => s.promoState);\n const { isLogin } = useSelector(s => s.userLoginState);\n const { loginMethod } = useSelector(s => s.settingPromo);\n const { type } = useSelector(s => s.promo);\n const [open, setOpen] = useState(false);\n let hasInfo = false;\n\n useImperativeHandle(ref, () => ({\n checkIsHasInfo: shouldOpen => {\n if (shouldOpen && hasInfo) {\n setOpen(true);\n }\n return hasInfo;\n }\n }));\n\n function onClose() {\n setOpen(false);\n }\n\n if (gameRunningStatus === gameRunningStatuses.NOT_PUBLISH) {\n hasInfo = true;\n const title = i18n.t('label.promo_not_publish');\n const body = i18n.t('label.try_again_later');\n return ;\n } else if (gameRunningStatus === gameRunningStatuses.BEFORE) {\n hasInfo = true;\n const title = i18n.t('label.promo_not_start');\n const body = i18n.t('label.try_again_later');\n return ;\n } else if (\n !isLogin &&\n loginMethod !== loginTypes.INSTAGRAM &&\n !hasPassLoginCheckTriggerGame(type)\n ) {\n hasInfo = true;\n return ;\n }\n\n return null;\n});\n\nDialogInfoBeforeLoginTrigger.displayName = 'DialogInfoBeforeLoginTrigger';\n\nexport default DialogInfoBeforeLoginTrigger;\n","import React, { useState, forwardRef, useImperativeHandle } from 'react';\nimport { useSelector } from 'react-redux';\nimport i18n from 'i18next';\n\nimport { gameRunningStatuses } from 'config/gameRunningStatuses';\nimport DialogSystem from 'client/components/DialogSystem';\n\nconst DialogInfoAfterLoginTrigger = forwardRef((_, ref) => {\n const {\n gameRunningStatus,\n periodPlayMatchedInfo: { matchedInfo: { match: isInPlayTimePeriod } = {} } = {}\n } = useSelector(s => s.promoState);\n const [open, setOpen] = useState(false);\n let hasInfo = false;\n\n useImperativeHandle(ref, () => ({\n checkIsHasInfo: shouldOpen => {\n if (shouldOpen && hasInfo) {\n setOpen(true);\n }\n return hasInfo;\n }\n }));\n\n function onClose() {\n setOpen(false);\n }\n\n if (gameRunningStatus === gameRunningStatuses.SUSPEND) {\n hasInfo = true;\n const title = i18n.t('label.system.unavailable');\n const body = i18n.t('label.try_again_later');\n return ;\n } else if (gameRunningStatus === gameRunningStatuses.END) {\n hasInfo = true;\n const title = i18n.t('label.promo_is_end');\n const body = i18n.t('label.see_you_next_time');\n return ;\n } else if (!isInPlayTimePeriod) {\n hasInfo = true;\n const title = i18n.t('label.system.unavailable');\n const body = i18n.t('label.not_in_play_period');\n return ;\n }\n\n return null;\n});\n\nDialogInfoAfterLoginTrigger.displayName = 'DialogInfoAfterLoginTrigger';\n\nexport default DialogInfoAfterLoginTrigger;\n","import React from 'react';\nimport { css } from '@emotion/core';\nimport i18n from 'i18next';\n\nimport Button from 'Mui/Button';\nimport Typography from '@material-ui/core/Typography';\n\nimport { error, system900 } from 'Mui/styles/color';\nimport { below } from 'utils/breakpoint';\n\nfunction PointJoin({ currentPoints, needPoints, isKKReducePointMode, onConfirm, onClose }) {\n const isPointsEnough = currentPoints >= needPoints;\n\n return (\n <>\n
\n \n {i18n.t('label.own_point', { count: currentPoints })}\n \n \n {i18n.t('label.activity_needed_point', { count: needPoints })}\n \n {i18n.t('label.activity_point_hint')}\n {!isPointsEnough && (\n \n {i18n.t('label.point_not_enough')}\n \n )}\n
\n
\n {isPointsEnough && (\n \n )}\n {!isPointsEnough && isKKReducePointMode && (\n \n \n \n )}\n \n
\n \n );\n}\n\nexport default PointJoin;\n\nconst contentStyle = css`\n display: flex;\n flex-grow: 1;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n`;\n\nconst btnContainerStyle = css`\n display: flex;\n flex-direction: column;\n width: 100%;\n align-items: center;\n`;\n\nconst errroStyle = css`\n color: ${error.color};\n`;\n\nconst successBtnStyle = css`\n background: ${system900.color};\n color: #fff;\n &:hover {\n background: rgba(85, 85, 85, 0.8);\n }\n width: 500px;\n ${below('xsm')} {\n width: 100%;\n }\n`;\n\nconst cancelBtnStyle = css`\n margin-top: 8px;\n width: 500px;\n ${below('xsm')} {\n width: 100%;\n }\n`;\n\nconst linkStyle = css`\n text-decoration: none;\n`;\n","import React from 'react';\nimport { css } from '@emotion/core';\nimport i18n from 'i18next';\n\nimport Button from 'Mui/Button';\nimport Typography from '@material-ui/core/Typography';\n\nimport { system900 } from 'Mui/styles/color';\nimport { below } from 'utils/breakpoint';\n\nfunction PaySuccess({ onConfirm = () => {}, needPoints }) {\n return (\n <>\n
\n {i18n.t('label.join_success')}\n \n {i18n.t('label.already_decrease_point', { count: needPoints })}\n \n
\n
\n \n
\n \n );\n}\n\nexport default PaySuccess;\n\nconst contentStyle = css`\n display: flex;\n flex-grow: 1;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n`;\n\nconst btnContainerStyle = css`\n display: flex;\n flex-direction: column;\n width: 100%;\n align-items: center;\n`;\n\nconst successBtnStyle = css`\n background: ${system900.color};\n color: #fff;\n &:hover {\n background: rgba(85, 85, 85, 0.8);\n }\n width: 500px;\n ${below('xsm')} {\n width: 100%;\n }\n`;\n","import React from 'react';\nimport { css } from '@emotion/core';\nimport i18n from 'i18next';\n\nimport Button from 'Mui/Button';\nimport Typography from '@material-ui/core/Typography';\n\nimport { system900 } from 'Mui/styles/color';\nimport { below } from 'utils/breakpoint';\n\nfunction ErrorHint({ errorCode, isKKReducePointMode, onClose = () => {} }) {\n return (\n <>\n
\n {i18n.t('label.system_error_try_later')}\n {errorCode}\n
\n
\n {isKKReducePointMode && (\n \n \n \n )}\n \n
\n \n );\n}\n\nexport default ErrorHint;\n\nconst contentStyle = css`\n display: flex;\n flex-grow: 1;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n`;\n\nconst btnContainerStyle = css`\n display: flex;\n flex-direction: column;\n width: 100%;\n align-items: center;\n`;\n\nconst successBtnStyle = css`\n background: ${system900.color};\n color: #fff;\n &:hover {\n background: rgba(85, 85, 85, 0.8);\n }\n width: 500px;\n ${below('xsm')} {\n width: 100%;\n }\n`;\n\nconst cancelBtnStyle = css`\n margin-top: 8px;\n width: 500px;\n ${below('xsm')} {\n width: 100%;\n }\n`;\n","import React, { useState, useEffect, useRef } from 'react';\nimport { useSelector, useDispatch } from 'react-redux';\nimport i18n from 'i18next';\nimport { css } from '@emotion/core';\nimport Typography from '@material-ui/core/Typography';\n\nimport * as clientErrTypes from 'config/clientErrorTypes';\nimport { IS_IFRAME_MODE, IFRAME_MODE_MIN_HEIGHT } from 'config/envVariable';\nimport { getUserPoints, exchangePoints, getKKboxUserPoints, exchangeKKboxPoints } from 'api/client';\nimport { setNeedReducePoint } from 'client/redux/modules/userEntryState';\nimport useClientErrorHandler, { generateApiErrObj } from 'client/hooks/useClientErrorHandler';\n\nimport useLogout from 'client/hooks/logout/useLogout';\nimport useLogoutRedirect from 'client/hooks/logout/useLogoutRedirect';\n\nimport PointJoin from 'client/components/dialogVerification/popupPayPoint/PointJoin';\nimport PointSuccess from 'client/components/dialogVerification/popupPayPoint/PointSuccess';\nimport ErrorHint from 'client/components/dialogVerification/popupPayPoint/ErrorHint';\nimport DialogLoading from './DialogLoading';\n\n// 後段 kkbox 扣點狀態\nconst KKBOX_EXCHANGE_STATUS = {\n INIT: 0,\n PENDING: 1,\n SUCCESS: 2,\n FAILED: 3,\n CANCELED: 4\n};\n\nfunction PayPointCover({ open, onClose = () => {}, onPaypointError = () => {} }) {\n const dispatch = useDispatch();\n const logout = useLogout();\n const redirectEnterpriseLogout = useLogoutRedirect();\n const { uuid: promoUUid } = useSelector(s => s.promo);\n const { enableKkpoint, kkpointAmount, transactionWithdrawQuantity } = useSelector(\n s => s.settingPromo\n );\n const { currentEntryUUID: entriesUUid } = useSelector(s => s.userEntryState);\n const loadingRef = useRef(null);\n const [loading, setLoading] = useState(true);\n const [points, setPoints] = useState(0);\n const [paidSuccess, setPaidSuccess] = useState(false);\n const [errorCode, setShowErrorCode] = useState('');\n const isKKReducePointMode = Boolean(enableKkpoint);\n const needPoints = isKKReducePointMode ? kkpointAmount : transactionWithdrawQuantity;\n const hasError = Boolean(errorCode);\n const errHandler = useClientErrorHandler();\n const [isPeddingDialogOpen, setPeddingDialogOpen] = useState(false);\n\n useEffect(() => {\n async function getPoint() {\n try {\n if (isKKReducePointMode) {\n const { payload = {} } = await getKKboxUserPoints(promoUUid, entriesUUid);\n const { data, code } = payload;\n const { total_qty } = data ?? {};\n if (typeof total_qty == 'number') {\n setPoints(total_qty);\n } else {\n // Debug 偶發情況會回傳非數字型態格式\n errHandler({\n err: generateApiErrObj(payload, clientErrTypes.GET_KKBOX_USER_POINT)\n });\n showError(code);\n }\n } else {\n const resp = await getUserPoints(promoUUid, entriesUUid);\n const { payload = {}, httpStatus } = resp;\n if (httpStatus !== 200) {\n throw generateApiErrObj(resp, clientErrTypes.KKBOX_API);\n } else {\n const { quantity } = payload;\n setPoints(quantity);\n }\n }\n } catch (error) {\n onPaypointError(error);\n } finally {\n setLoading(false);\n }\n }\n getPoint();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [entriesUUid, promoUUid]);\n\n function handleUpdatePointStatus() {\n dispatch(setNeedReducePoint(false));\n }\n let isAlreadyCallKKBoxPayPoint = false;\n const KKBoxPayPoint = async () => {\n const { payload = {} } = await exchangeKKboxPoints(promoUUid, entriesUUid);\n const { data, code } = payload;\n const { status } = data || {};\n\n if (\n Number(status) === KKBOX_EXCHANGE_STATUS.INIT ||\n Number(status) === KKBOX_EXCHANGE_STATUS.PENDING\n ) {\n // 訂單狀態 pedding 須在呼叫一次確認狀態\n if (!isAlreadyCallKKBoxPayPoint) {\n setPeddingDialogOpen(true);\n setTimeout(async () => {\n await KKBoxPayPoint();\n setPeddingDialogOpen(false);\n }, 5000);\n isAlreadyCallKKBoxPayPoint = true;\n }\n } else if (Number(status) === KKBOX_EXCHANGE_STATUS.SUCCESS) {\n // 訂單狀態 - 交易成功\n setPaidSuccess(true);\n setPeddingDialogOpen(false);\n } else {\n errHandler({\n err: generateApiErrObj(payload, clientErrTypes.REDUCE_KKBOX_POINT)\n });\n showError(code);\n }\n };\n\n async function payPoint() {\n if (loadingRef.current) {\n return;\n }\n loadingRef.current = true;\n try {\n if (isKKReducePointMode) {\n await KKBoxPayPoint();\n } else {\n const resp = await exchangePoints(promoUUid, entriesUUid);\n const { httpStatus } = resp;\n if (httpStatus !== 200) {\n throw generateApiErrObj(resp, clientErrTypes.KKBOX_API);\n } else {\n setPaidSuccess(true);\n }\n }\n } catch (error) {\n onPaypointError(error);\n } finally {\n loadingRef.current = false;\n }\n }\n function showError(code) {\n setShowErrorCode(code);\n }\n function closeError() {\n setShowErrorCode('');\n }\n function logoutCloseCover() {\n logout(redirectEnterpriseLogout);\n onClose();\n }\n\n return (\n open &&\n !loading && (\n
\n
\n {!hasError && !paidSuccess && (\n \n )}\n {!hasError && paidSuccess && (\n \n )}\n {hasError && (\n \n )}\n
\n \n {i18n.t('label.logout')}\n \n
\n \n
\n
\n )\n );\n}\n\nexport default PayPointCover;\n\nconst containerStyle = css`\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 6;\n`;\n\nconst maskInfoStyle = css`\n background-color: rgba(255, 255, 255, 0.72);\n backdrop-filter: blur(4px);\n`;\n\nconst powerByHeight = '32px';\n\nconst contentStyle = css`\n max-width: 720px;\n height: 100%;\n min-height: calc(\n ${IS_IFRAME_MODE ? `${IFRAME_MODE_MIN_HEIGHT}px` : '100vh'} - ${powerByHeight}\n );\n padding: 32px 0;\n margin: 0 auto;\n display: flex;\n flex-direction: column;\n\n @media only screen and (max-width: 720px) {\n width: 100%;\n padding-left: 8px;\n padding-right: 8px;\n }\n`;\n\nconst footerWrapperStyle = css`\n width: 100%;\n padding: 24px;\n text-align: right;\n`;\n\nconst logoutBtnStyle = css`\n text-decoration: underline;\n cursor: pointer;\n color: #333;\n`;\n","import React from 'react';\nimport i18n from 'i18next';\nimport { css } from '@emotion/core';\nimport Typography from '@material-ui/core/Typography';\nimport CheckCircleIcon from '@material-ui/icons/CheckCircle';\n\nimport Popup from 'client/components/Popup';\n\nexport default function DialogPasscodeSuccess({ open }) {\n return (\n \n
\n \n {i18n.t('label.passcode.verify.success')}\n
\n
\n );\n}\n\nconst dialogStyle = css`\n max-width: 280px;\n`;\n\nconst modalContentStyle = css`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n height: 240px;\n > svg {\n margin-bottom: 25px;\n }\n`;\n\nconst iconStyle = css`\n font-size: 85px;\n color: #00b022;\n`;\n","import React, { useState, useEffect } from 'react';\nimport { useSelector, useDispatch } from 'react-redux';\nimport i18n from 'i18next';\nimport querystring from 'query-string';\nimport { css } from '@emotion/core';\nimport TextField from '@material-ui/core/TextField';\n\nimport { getPasscodeVerify } from 'api/client';\nimport * as clientErrTypes from 'config/clientErrorTypes';\nimport { getPasscodeErrorType, getErrorTypeMessage } from 'config/passcode';\nimport { generateApiErrObj } from 'client/hooks/useClientErrorHandler';\n\nimport { updateShowPasswordQualifyStatus } from 'client/redux/modules/promoState';\nimport useScrollElementOnMount from 'client/hooks/useScrollElementOnMount';\n\nimport Popup from 'client/components/Popup';\nimport DialogPasscodeSuccess from 'client/components/dialogVerification/DialogPasscodeSuccess';\nimport { useReCaptcha } from 'client/hooks/useReCaptcha';\nimport DialogReCaptcha from 'components/Dialog/DialogReCaptcha';\n\nexport default function DialogEnterPasscode({ open, onClose = () => {}, onApiError = () => {} }) {\n const dispatch = useDispatch();\n const bindRef = useScrollElementOnMount();\n const { uuid: promoUUID } = useSelector(s => s.promo);\n const { enableReCaptcha } = useSelector(s => s.settingPromo);\n const [isRequesting, setIsRequesting] = useState(false);\n const [errorType, setErrorType] = useState('');\n const [passcode, setPasscode] = useState('');\n const [openSuccessDialog, setOpenSuccessDialog] = useState(false);\n const { isShowReCaptcha, setShowReCaptcha } = useReCaptcha();\n\n useEffect(() => {\n const { pcode = '' } = querystring.parse(window.location.search);\n setPasscode(open ? pcode : '');\n setErrorType('');\n }, [open]);\n\n const handleSubmitClick = () => {\n if (enableReCaptcha) setShowReCaptcha(true);\n else handleSubmit();\n };\n\n async function handleSubmit(token) {\n setIsRequesting(true);\n try {\n const resp = await getPasscodeVerify({ promoUUID, passcode, recaptchaToken: token });\n const {\n httpStatus,\n payload: { data }\n } = resp;\n if (httpStatus === 200) {\n setOpenSuccessDialog(true);\n setTimeout(() => {\n onClose();\n dispatch(\n updateShowPasswordQualifyStatus({\n hasUsablePasscode: Boolean(data?.remainingCounts),\n passcode: data?.remainingCounts ? passcode : '',\n passcodeRemainingCount: data?.remainingCounts\n })\n );\n }, 2000);\n } else {\n const errType = getPasscodeErrorType(resp);\n if (errType) {\n setErrorType(errType);\n } else {\n throw generateApiErrObj(resp, clientErrTypes.VERIFY_PASSCODE);\n }\n }\n } catch (error) {\n onApiError(error);\n } finally {\n setIsRequesting(false);\n }\n }\n function handleChange(e) {\n const {\n target: { value }\n } = e;\n setPasscode(value);\n setErrorType('');\n }\n\n return (\n <>\n \n {isShowReCaptcha && (\n \n )}\n \n
\n \n
\n \n \n );\n}\n\nconst dialogContentStyle = css`\n padding: 16px;\n`;\n","import React from 'react';\nimport i18n from 'i18next';\nimport { css } from '@emotion/core';\nimport Typography from '@material-ui/core/Typography';\nimport CheckCircleIcon from '@material-ui/icons/CheckCircle';\nimport { PointSystemPoints } from 'client/components/dialogVerification/dialogDeductPoint/DialogDeductPoint';\n\nimport Popup from 'client/components/Popup';\n\nexport default function DialogDeductSuccess({ open, transactionWithdrawQuantity }) {\n return (\n \n
\n \n
\n {i18n.t('label.deduct')}\n \n
\n {i18n.t('label.passcode.verify.success')}\n
\n
\n );\n}\n\nconst dialogStyle = css`\n max-width: 280px;\n`;\n\nconst modalContentStyle = css`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n height: 240px;\n > svg {\n margin-bottom: 25px;\n }\n`;\n\nconst iconStyle = css`\n font-size: 85px;\n color: #00b022;\n`;\n\nconst descStyle = css`\n display: flex;\n justify-content: center;\n align-items: center;\n`;\n","import React from 'react';\nimport { css } from '@emotion/core';\nimport useScrollElementOnMount from 'client/hooks/useScrollElementOnMount';\nimport Popup from 'client/components/Popup';\nimport { Typography } from '@material-ui/core';\nimport { PointSystemPoints } from 'client/components/dialogVerification/dialogDeductPoint/DialogDeductPoint';\nimport i18next from 'i18next';\n\nexport default function DialogDeductFailed({ open, onClose = () => {}, handleSubmit }) {\n const bindRef = useScrollElementOnMount();\n\n return (\n <>\n \n
\n
\n \n {i18next.t('label.please_confirm')}\n \n \n \n {i18next.t('label.is_it_enough')}\n \n
\n
\n \n \n );\n}\n\nconst dialogContentStyle = css`\n padding: 16px;\n text-align: center;\n`;\n\nconst descStyle = css`\n display: flex;\n justify-content: center;\n align-items: center;\n`;\n","import React from 'react';\nimport { Trans } from 'react-i18next';\nimport i18n from 'i18next';\nimport { css } from '@emotion/core';\n\nimport useScrollElementOnMount from 'client/hooks/useScrollElementOnMount';\nimport Popup from 'client/components/Popup';\nimport { Typography } from '@material-ui/core';\nimport { PointSystemPoints } from 'client/components/dialogVerification/dialogDeductPoint/DialogDeductPoint';\n\nexport default function DialogPointNotEnough({\n isOpen,\n onClose = () => {},\n points,\n transactionWithdrawQuantity\n}) {\n const bindRef = useScrollElementOnMount();\n\n return (\n <>\n \n
\n \n }\n />\n \n \n \n }\n />\n \n
\n \n \n );\n}\n\nconst dialogContentStyle = css`\n padding: 16px;\n text-align: center;\n`;\n\nconst descStyle = css`\n display: flex;\n justify-content: center;\n align-items: center;\n`;\n","import React, { useState, useEffect } from 'react';\nimport { useSelector, useDispatch } from 'react-redux';\nimport i18n from 'i18next';\nimport { Trans } from 'react-i18next';\nimport { css } from '@emotion/core';\n\nimport * as clientErrTypes from 'config/clientErrorTypes';\nimport { generateApiErrObj } from 'client/hooks/useClientErrorHandler';\n\nimport useScrollElementOnMount from 'client/hooks/useScrollElementOnMount';\nimport PointIcon from 'components/PointSystem/PointIcon';\nimport Popup from 'client/components/Popup';\nimport DialogDeductSuccess from 'client/components/dialogVerification/dialogDeductPoint/DialogDeductSuccess';\nimport DialogDeductFailed from 'client/components/dialogVerification/dialogDeductPoint/DialogDeductFailed';\nimport DialogPointNotEnough from 'client/components/dialogVerification/dialogDeductPoint/DialogPointNotEnough';\nimport { Typography } from '@material-ui/core';\nimport useClientErrorHandler from 'client/hooks/useClientErrorHandler';\nimport { loginTypeMappingPointRoutesParam } from 'config/loginTypes';\nimport { deductPointByPromo, getMemberPointTotalByMemberApi } from 'api/point/client';\nimport { setNeedReducePoint } from 'client/redux/modules/userEntryState';\nimport { isErrMemberPointsNotEnough } from 'client/utils/errorObjectChecker';\nimport useGetPromoPointPoolInfo from 'client/hooks/useGetPromoPointPoolInfo';\nimport useGetPartnerOrSponsorPointIcon, {\n processed_type\n} from 'client/hooks/useGetPartnerOrSponsorPointIcon';\n\nexport default function DialogDeductPoint({ open, onClose = () => {}, onApiError = () => {} }) {\n const dispatch = useDispatch();\n const bindRef = useScrollElementOnMount();\n const errHandler = useClientErrorHandler();\n const { uuid: promoUUID } = useSelector(s => s.promo);\n const { loginMethod, transactionWithdrawQuantity } = useSelector(s => s.settingPromo);\n const { qualifyWithdrawUuid } = useSelector(s => s.settingPointSystems);\n const { currentEntryUUID } = useSelector(s => s.userEntryState);\n const [isRequesting, setIsRequesting] = useState(true);\n const [points, setPoints] = useState('');\n const [openSuccessDialog, setOpenSuccessDialog] = useState(false);\n const [openFailedDialog, setOpenFailedDialog] = useState(false);\n const pointNotEnough = points < transactionWithdrawQuantity;\n\n useEffect(() => {\n const pointFetch = async () => {\n setIsRequesting(true);\n try {\n const [remainPointResp] = await Promise.all([\n getMemberPointTotalByMemberApi({\n pointPoolUuid: qualifyWithdrawUuid,\n loginType: loginTypeMappingPointRoutesParam[loginMethod]\n })\n ]);\n if (remainPointResp.httpStatus >= 400) {\n throw generateApiErrObj(\n remainPointResp,\n clientErrTypes.GET_MEMBER_POINT_FAILED\n );\n } else {\n setPoints(remainPointResp.payload.points);\n }\n } catch (err) {\n errHandler({ err });\n } finally {\n setIsRequesting(false);\n }\n };\n pointFetch();\n }, [errHandler, loginMethod, open, qualifyWithdrawUuid]);\n\n async function handleSubmit() {\n setIsRequesting(true);\n try {\n const resp = await deductPointByPromo({ promoUUID, currentEntryUUID });\n if (resp.httpStatus === 200) {\n setOpenSuccessDialog(true);\n setTimeout(() => {\n onClose();\n dispatch(setNeedReducePoint(false));\n }, 2000);\n } else if (isErrMemberPointsNotEnough(resp)) {\n setOpenFailedDialog(true);\n onClose();\n } else {\n throw generateApiErrObj(\n resp,\n clientErrTypes.TRANSACTION_WITHDRAW_QUANTITY_IS_WRONG\n );\n }\n } catch (error) {\n onApiError(error);\n } finally {\n setIsRequesting(false);\n }\n }\n\n return (\n <>\n \n setOpenFailedDialog(false)}\n handleSubmit={handleSubmit}\n />\n {pointNotEnough && !isRequesting ? (\n \n ) : (\n \n
\n \n \n }\n />\n \n \n \n }\n />\n \n \n {i18n.t('label.non_refundable_after_exchange')}\n \n
\n \n )}\n \n );\n}\n\nconst dialogContentStyle = css`\n padding: 16px;\n text-align: center;\n`;\n\nconst descStyle = css`\n display: flex;\n justify-content: center;\n align-items: center;\n`;\n\nexport function PointSystemPoints({ pointCount, pointSize = 24, style, needShowPoint = true }) {\n const { qualifyWithdrawUuid } = useSelector(s => s.settingPointSystems);\n const getPromoPointPoolInfo = useGetPromoPointPoolInfo();\n const pointPoolInfo = getPromoPointPoolInfo(qualifyWithdrawUuid);\n const pointIconStyle = pointPoolInfo?.settings?.pointIconStyle || {};\n const { partnerPointIconUrl, sponsorPointIconUrl } = useGetPartnerOrSponsorPointIcon(\n processed_type.DEDUCTION\n );\n\n return (\n
\n \n\n {needShowPoint && (\n \n {pointCount}\n \n )}\n
\n );\n}\n\nconst pointSystemPointsStyle = css`\n display: flex;\n justify-content: start;\n align-items: center;\n padding: 0 4px;\n`;\n","import React from 'react';\nimport { css } from '@emotion/core';\nimport PropTypes from 'prop-types';\nimport i18n from 'i18next';\n\nimport Button from 'Mui/Button';\nimport Typography from '@material-ui/core/Typography';\nimport useLogoutRedirect from 'client/hooks/logout/useLogoutRedirect';\n\nimport { system900 } from 'Mui/styles/color';\nimport { below } from 'utils/breakpoint';\n\nfunction KKboxUpgradeMemberLevel({ logout }) {\n const redirectEnterpriseLogout = useLogoutRedirect();\n\n function handleUpgradeBtnClick() {\n window.open('https://ssl.kkbox.com/tw/billing/index.php', '_blank');\n }\n\n return (\n
\n
\n {i18n.t('label.sign_error')}\n \n {i18n.t('label.member_upgrade_notification')}\n \n
\n
\n \n \n
\n
\n );\n}\n\nKKboxUpgradeMemberLevel.propTypes = {\n logout: PropTypes.func\n};\n\nexport default KKboxUpgradeMemberLevel;\n\nconst contentStyle = css`\n display: flex;\n flex-grow: 1;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n`;\n\nconst btnContainerStyle = css`\n display: flex;\n flex-direction: column;\n width: 100%;\n align-items: center;\n margin-bottom: 16px;\n`;\n\nconst successBtnStyle = css`\n background: ${system900.color};\n color: #fff;\n &:hover {\n background: rgba(85, 85, 85, 0.8);\n }\n width: 500px;\n ${below('xsm')} {\n width: 100%;\n }\n`;\n\nconst cancelBtnStyle = css`\n margin-top: 8px;\n width: 500px;\n ${below('xsm')} {\n width: 100%;\n }\n`;\n\nconst coverStyle = css`\n padding: 16px;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 2;\n`;\n\nconst maskInfoStyle = css`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n background-color: rgba(255, 255, 255, 0.72);\n backdrop-filter: blur(4px);\n`;\n","import React from 'react';\nimport { css } from '@emotion/core';\nimport i18n from 'i18next';\nimport { useSelector } from 'react-redux';\nimport Typography from '@material-ui/core/Typography';\nimport Divider from '@material-ui/core/Divider';\n\nimport { line, system300 } from 'Mui/styles/color';\nimport Button from 'Mui/Button';\nimport DialogSystem from 'client/components/DialogSystem';\nimport useLoginUrl from 'client/hooks/login/useLoginUrl';\nimport useLoginLinkClickAction from 'client/hooks/login/useLoginLinkAction';\nimport { loginTypesForApi } from 'config/loginTypes';\nimport PrivacyLink from 'client/components/dialogLogin/PrivacyLink';\n\nfunction DialogLineAddFriend({ open, onClose }) {\n const { privacyUrl, privacyText } = useSelector(s => s.sponsor);\n const loginUrl = useLoginUrl({\n loginType: loginTypesForApi.LINE,\n additionalQsObj: { prompt: 'consent' }\n });\n const { target, href, onClick } = useLoginLinkClickAction({ loginUrl });\n\n return (\n \n
\n \n {privacyUrl && (\n \n )}\n
\n \n {i18n.t('label.login.need_line_friendship')}\n \n \n }\n endButton={null}\n closePopup={onClose}\n />\n );\n}\n\nexport default DialogLineAddFriend;\n\nconst contentStyle = css`\n display: flex;\n align-items: center;\n justify-content: center;\n flex-flow: column;\n text-align: center;\n padding: 0 0 24px;\n`;\n\nconst btnContainerStyle = css`\n margin-bottom: 8px;\n`;\n\nconst buttonStyle = css`\n color: #fff;\n border-radius: 8px;\n background-color: ${line.color};\n padding: 6px 6.5px;\n font-weight: bold;\n padding-left: 5px;\n &:hover {\n background-color: ${line.color};\n }\n &.Mui-disabled {\n background-color: ${system300.color};\n color: #fff;\n }\n`;\n\nconst linkStyle = css`\n text-decoration: none;\n`;\n\nconst iconStyle = css`\n height: 24px;\n width: 24px;\n display: block;\n background: url(https://assets.fevercdn.com/promotion/img/icon-line-login.png) 50% 50% no-repeat;\n background-size: contain;\n`;\n\nconst dividerStyle = css`\n margin: -6px 5px;\n`;\n","import React from 'react';\nimport { useSelector } from 'react-redux';\nimport i18n from 'i18next';\n\nimport DialogSystem from 'client/components/DialogSystem';\n\nexport default function DialogBindCyberbizECMember({ open, onClose = () => {} }) {\n const { officialSiteUrl } = useSelector(s => s.sponsor);\n const hasOfficialSiteUrl = Boolean(officialSiteUrl);\n\n return (\n {\n if (hasOfficialSiteUrl) {\n window.open(officialSiteUrl);\n }\n onClose();\n }}\n />\n );\n}\n","import React from 'react';\nimport { useSelector } from 'react-redux';\nimport i18n from 'i18next';\nimport qs from 'query-string';\n\nimport DialogSystem from 'client/components/DialogSystem';\n\nexport default function DialogEnterpriseBindLine({ open, onClose = () => {} }) {\n const { notQualifiedErrInfo: { redirectUrl = '' } = {} } = useSelector(s => s.userLoginState);\n\n return (\n {\n const { query, url } = qs.parseUrl(redirectUrl);\n const qStr = qs.stringify({ ...query, redirect_uri: window.location.href });\n window.open(`${url}?${qStr}`);\n onClose();\n }}\n />\n );\n}\n","import React, { useState } from 'react';\nimport Dialog from '@material-ui/core/Dialog';\nimport ReferralCodeCard from '../ReferralCodeCard';\nimport { css } from '@emotion/core';\nimport { useSelector } from 'react-redux';\nimport useSubmitReferralCode from 'client/hooks/useSubmitReferralCode';\nimport { REFERRAL_CODE_API_FAIL_REASON } from 'client/utils/referralCode';\nimport i18next from 'i18next';\n\nexport default function DialogReferralCode({\n onClose = () => {},\n onClick = () => {},\n isShowCloseButton\n}) {\n const [isLoading, setLoading] = useState(false);\n const { referralCodeCard = {} } = useSelector(s => s.settingMGMReferral);\n const [value, setValue] = useState('');\n const [error, setError] = useState('');\n const handleSubmit = useSubmitReferralCode();\n\n const handleClick = async () => {\n if (value.trim().length > 0) {\n setLoading(true);\n\n const submitResp = await handleSubmit(value);\n\n if (submitResp.success) {\n setError('');\n onClick();\n onClose();\n }\n\n if (submitResp.reason === REFERRAL_CODE_API_FAIL_REASON.REFERRAL_CODE_NOT_FOUND) {\n setError(i18next.t('label.validate.referral_code_is_not_correct'));\n }\n\n if (\n submitResp?.reason === REFERRAL_CODE_API_FAIL_REASON.CAN_NOT_USE_SELF_REFERRAL_CODE\n ) {\n setError(i18next.t('label.validate.member_can_not_use_self_referral_code'));\n }\n\n setLoading(false);\n } else setError(i18next.t('label.validate.referral_code_is_required'));\n };\n\n return (\n \n {\n setValue(e?.target?.value);\n }}\n />\n \n );\n}\n\nconst dialogStyle = css`\n & .MuiDialog-paper {\n border-radius: 12px;\n }\n`;\n","import React, { useState, useImperativeHandle, forwardRef } from 'react';\nimport { useSelector } from 'react-redux';\nimport i18n from 'i18next';\nimport { notQualifiedTypes } from 'config/notQualifiedTypes';\nimport { loginTypes } from 'config/loginTypes';\n\nimport useLogout from 'client/hooks/logout/useLogout';\nimport useClientErrorHandler from 'client/hooks/useClientErrorHandler';\n\nimport DialogSystem from 'client/components/DialogSystem';\nimport PayPointCover from 'client/components/dialogVerification/popupPayPoint/PayPointCover';\nimport DialogEnterPasscode from 'client/components/dialogVerification/DialogEnterPasscode';\nimport DialogDeductPoint from 'client/components/dialogVerification/dialogDeductPoint/DialogDeductPoint';\nimport KKboxUpgradeMemberLevel from 'client/components/dialogLoginNoQualified/KKboxUpgradeMemberLevel';\nimport DialogLineAddFriend from 'client/components/dialogLoginNoQualified/DialogLineAddFriend';\nimport DialogBindCyberbizECMember from 'client/components/dialogLoginNoQualified/DialogBindCyberbizECMember';\nimport DialogEnterpriseBindLine from 'client/components/dialogLoginNoQualified/DialogEnterpriseBindLine';\nimport { gameTypes, hasPassLoginCheckTriggerGame } from 'config/promoGameTypes';\nimport DialogReferralCode from 'components/common/Dialog/DialogReferralCode';\nimport useSearchParams from 'hooks/useSearchParams';\nimport { getErrorTypeDialogDesc, errorTypes } from 'config/passcode';\n\nconst DialogQualifyCheckTrigger = forwardRef((_, ref) => {\n const logout = useLogout();\n const errHandler = useClientErrorHandler();\n const { loginMethod } = useSelector(s => s.settingPromo);\n const { isTestMode, hasUsablePasscode } = useSelector(s => s.promoState);\n const { notQualifiedType } = useSelector(s => s.userLoginState);\n const { userGameResultRecords: gameResultRecords = [] } = useSelector(s => s);\n const { type } = useSelector(s => s.promo);\n\n const {\n currentEntryUUID,\n isNeedReducePoint,\n createEntryNotQualifiedType,\n isNeedEnterPasscode\n } = useSelector(s => s.userEntryState);\n\n const { qualifyWithdrawUuid = '' } = useSelector(state => state.settingPointSystems);\n const notQualified = Boolean(notQualifiedType) || Boolean(createEntryNotQualifiedType);\n const [open, setOpen] = useState(false);\n const searchParams = useSearchParams();\n\n let hasInfo = false;\n useImperativeHandle(ref, () => ({\n checkIsHasInfo: shouldOpen => {\n if (shouldOpen && hasInfo) {\n setOpen(true);\n }\n return hasInfo;\n }\n }));\n\n function onClose() {\n setOpen(false);\n }\n function handleApiError(err) {\n errHandler({\n err\n });\n }\n\n if (notQualified) {\n hasInfo = true;\n if (notQualifiedType === notQualifiedTypes.ENTERPRISE.MEMBER_KKBOX) {\n return open && ;\n } else if (notQualifiedType === notQualifiedTypes.ENTERPRISE.CYBERBIZ_EC_MEMBER) {\n return ;\n } else if (notQualifiedType === notQualifiedTypes.LINE.FRIEND) {\n return ;\n } else if (notQualifiedType === notQualifiedTypes.LINE.ENTERPRISE_MEMBER_BIND) {\n return ;\n } else if (\n createEntryNotQualifiedType === notQualifiedTypes.QUALIFICATION.MEMBER_ORDER ||\n notQualifiedType === notQualifiedTypes.QUALIFICATION.NAME_LIST_API\n ) {\n const title = i18n.t('label.no_qualify_join');\n const body = i18n.t('desc.sorry_no_qualify.name_list');\n const endButton = i18n.t('btn.understood');\n return (\n \n );\n } else if (\n isTestMode &&\n createEntryNotQualifiedType === notQualifiedTypes.ENTRIES.REACH_LIMIT\n ) {\n const title = i18n.t('label.test_mode');\n const body = i18n.t('desc.testmode_credit_full');\n const endButton = i18n.t('btn.close');\n return (\n \n );\n } else if (notQualifiedType === notQualifiedTypes.QUALIFICATION.NEW_REGISTER_MEMBER) {\n // 若有 gameResult 一樣可以直接進入查看,但不應該建立 entry、submit game result\n if (gameResultRecords.length > 0) return;\n const title = i18n.t('label.new_registration_member_fail');\n const body = i18n.t('desc.new_registration_member_fail');\n return ;\n } else if (notQualifiedType === notQualifiedTypes.QUALIFICATION.SUBMIT_REFERRAL_CODE) {\n // 新客加入獎勵有自己的邀請碼輸入頁面\n if (type === gameTypes.SIGN_UP) return null;\n\n return open ? : null;\n } else {\n const title = i18n.t('label.no_qualify_join');\n const body = i18n.t('desc.sorry_no_qualify');\n return ;\n }\n } else if (!hasUsablePasscode && isNeedEnterPasscode) {\n hasInfo = true;\n const hasPcodeInUrl = searchParams.has('pcode');\n if (hasPcodeInUrl) {\n const title = i18n.t('label.passcode.inuse');\n const body = getErrorTypeDialogDesc(errorTypes.USAGE_LIMIT_EXCEEDED);\n return ;\n }\n return ;\n } else if (isNeedReducePoint) {\n if (Boolean(qualifyWithdrawUuid)) {\n hasInfo = true;\n return ;\n }\n hasInfo = true;\n return ;\n } else if (\n !currentEntryUUID &&\n loginMethod !== loginTypes.INSTAGRAM &&\n !hasPassLoginCheckTriggerGame(type)\n ) {\n hasInfo = true;\n const title = i18n.t('label.promo_not_start');\n const body = i18n.t('label.try_again_later');\n return ;\n }\n\n return null;\n});\n\nDialogQualifyCheckTrigger.displayName = 'DialogQualifyCheckTrigger';\n\nexport default DialogQualifyCheckTrigger;\n","import React, { useRef, useMemo } from 'react';\n\nimport contextGenerator, { nameSpaces } from 'utils/contextGenerator';\n\nimport DialogInfoBeforeLoginTrigger from 'client/components/infoDialog/DialogInfoBeforeLoginTrigger';\nimport DialogInfoAfterLoginTrigger from 'client/components/infoDialog/DialogInfoAfterLoginTrigger';\nimport DialogQualifyCheckTrigger from 'client/components/infoDialog/DialogQualifyCheckTrigger';\n\nconst { Provider, useContextValue } = contextGenerator(nameSpaces.CLIENT_PROMO_JOIN_CHECKER, {\n login: () => {},\n full: () => {}\n});\n\nexport const useCheckerContext = useContextValue;\n\nexport const checkTypes = {\n LOGIN_STATUS: 'LOGIN_STATUS',\n PROMO_STATUS: 'PROMO_STATUS',\n QUALIFY_STATUS: 'QUALIFY_STATUS'\n};\n\nexport default function ProviderFlowInfoAndActionChecker({ children }) {\n const infoBeforeLogin = useRef(null);\n const infoAfterLogin = useRef(null);\n const infoInterAction = useRef(null);\n const checkers = useMemo(\n () => ({\n // types 是可以設定要檢查哪幾個 dialog\n check: (types = [], shouldOpen = true) => {\n const checkTypesMappingCheckers = {\n [checkTypes.LOGIN_STATUS]: infoBeforeLogin,\n [checkTypes.PROMO_STATUS]: infoAfterLogin,\n [checkTypes.QUALIFY_STATUS]: infoInterAction\n };\n return runner(\n types.map(t => checkTypesMappingCheckers[t].current).filter(Boolean),\n shouldOpen\n );\n }\n }),\n []\n );\n\n return (\n <>\n \n \n \n {children}\n \n );\n}\n\n// instance 是 [infoBeforeLogin, infoAfterLogin, infoInterAction] 這個 ref of array\n// 若全部 instance 都\nfunction runner(instances = [], shouldOpen) {\n for (const i of instances) {\n if (Boolean(i) && typeof i.checkIsHasInfo === 'function') {\n // 如果這個 ref 在條件上是沒有 dialog Info,checkApi 會回傳 false\n if (i.checkIsHasInfo(shouldOpen)) {\n // 因為 dialog 需要被顯示,代表 checkApi 要通知呼叫的人要先處理好 dialog 的警告才能往下一步走\n return false;\n }\n }\n }\n return true;\n}\n","import { useRef, useEffect, useCallback } from 'react';\nimport { isMobile } from 'react-device-detect';\n\nfunction useLoginWindowPostMessage({ redirectUrl }) {\n const windowRef = useRef(null);\n\n const getLoginMessage = useCallback(\n event => {\n const { data, origin = '' } = event;\n if (origin === window.location.origin) {\n if (data === 'login_success' && windowRef) {\n windowRef.current.postMessage('closeWindow', document.location.origin);\n if (redirectUrl) window.location.href = redirectUrl;\n else window.location.reload();\n }\n }\n },\n [redirectUrl]\n );\n\n useEffect(() => {\n if (!isMobile) {\n window.addEventListener('message', getLoginMessage, false);\n return () => {\n window.removeEventListener('message', getLoginMessage, false);\n };\n }\n // eslint-disable-next-line no-use-before-define\n }, [getLoginMessage]);\n\n return { windowRef };\n}\n\nexport default useLoginWindowPostMessage;\n","import { getLoginLinkClickAction } from 'client/utils/login';\nimport useLoginWindowPostMessage from 'client/hooks/login/useLoginWindowPostMessage';\n\nexport default function useLoginLinkClickAction({ loginUrl, afterLoginRedirectUrl = '' }) {\n const { windowRef } = useLoginWindowPostMessage({ redirectUrl: afterLoginRedirectUrl });\n\n return getLoginLinkClickAction(windowRef, loginUrl);\n}\n","import { useSelector } from 'react-redux';\nimport { useParams } from 'react-router-dom';\n\nimport {\n getFeverLoginUrl,\n getEnterpriseLoginUrl,\n getRedirectUrlFromLoginServerToPromoOrUgc\n} from 'client/utils/login';\nimport { loginTypesForApi } from 'config/loginTypes';\n\nexport default function useLoginUrl({ loginType, additionalQsObj = {} }) {\n const { promoUUID, promoId } = useParams();\n const partner = useSelector(s => s.partner);\n const sponsor = useSelector(s => s.sponsor);\n\n const { uuid: sponsorUUID } = sponsor;\n\n const redirectUrl = getRedirectUrlFromLoginServerToPromoOrUgc({\n promoUUID,\n promoId\n });\n\n switch (loginType) {\n case loginTypesForApi.ENTERPRISE:\n return getEnterpriseLoginUrl({\n partner,\n sponsor,\n promoId,\n redirectUrl,\n appendQsObj: additionalQsObj\n });\n case loginTypesForApi.FACEBOOK:\n case loginTypesForApi.LINE:\n return getFeverLoginUrl({\n loginType,\n sponsorUUID,\n redirectUrl,\n appendQsObj: additionalQsObj\n });\n default:\n return '';\n }\n}\n","import { useCallback } from 'react';\n\nimport tokenManager from 'client/utils/tokenManager';\n\nexport default function useLogout() {\n return useCallback(async callback => {\n const result = await tokenManager.logout();\n\n if (result) {\n if (typeof callback === 'function') {\n await callback();\n }\n window.location.reload();\n }\n }, []);\n}\n","import { useSelector } from 'react-redux';\n\nimport { loginTypes } from 'config/loginTypes';\nimport { IS_IFRAME_MODE } from 'config/envVariable';\n\nexport default function useLogoutRedirect() {\n const { loginMethod } = useSelector(s => s.settingPromo);\n const {\n domainMappingFE = '',\n enterpriseLoginAppLogoutUrl: partnerEnterpriseLoginAppLogoutUrl\n } = useSelector(s => s.partner);\n\n const { enterpriseLoginAppLogoutUrl: sponsorEnterpriseLoginAppLogoutUrl } = useSelector(\n s => s.sponsor\n );\n\n const enterpriseLoginAppLogoutUrl =\n sponsorEnterpriseLoginAppLogoutUrl || partnerEnterpriseLoginAppLogoutUrl;\n\n if (loginMethod === loginTypes.ENTERPRISELOGIN && Boolean(enterpriseLoginAppLogoutUrl)) {\n return () => {\n let targetUrl = `${enterpriseLoginAppLogoutUrl}${encodeURIComponent(\n window.location.href\n )}`;\n\n if (IS_IFRAME_MODE) {\n targetUrl = `${enterpriseLoginAppLogoutUrl}${encodeURIComponent(\n `https://${domainMappingFE}/promotions/checklogout`\n )}`;\n\n const width = 600;\n const height = 700;\n const left = window.screen.width / 2 - width / 2;\n const top = window.screen.height / 2 - height / 2;\n window.open(\n targetUrl,\n '_blank',\n `menubar=0,resizable=0,width=${width},height=${height},top=${top},left=${left}`\n );\n } else window.location.href = targetUrl;\n };\n }\n return false;\n}\n","import { useEffect, useState } from 'react';\nimport { useSelector } from 'react-redux';\n\nexport function useReCaptcha() {\n const [isShowReCaptcha, setShowReCaptcha] = useState(false);\n const { shouldGetNextEntry } = useSelector(s => s.userEntryState);\n\n useEffect(() => {\n if (Boolean(shouldGetNextEntry)) setShowReCaptcha(true);\n\n return () => {\n setShowReCaptcha(false);\n };\n }, [shouldGetNextEntry]);\n\n return {\n isShowReCaptcha,\n setShowReCaptcha\n };\n}\n","import { submitReferralCodeApi } from 'api/client';\nimport { REFERRAL_CODE_API_FAIL_REASON, REFERRAL_CODE_REASON } from 'client/utils/referralCode';\nimport Cookies from 'js-cookie';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { setReferralCodeInput } from 'client/redux/modules/userEntryState';\nimport { setReferralCodeStatus } from 'client/redux/modules/promoState';\nimport { useCallback } from 'react';\nimport useClientErrorHandler, { generateApiErrObj } from 'client/hooks/useClientErrorHandler';\nimport * as clientErrTypes from 'config/clientErrorTypes';\nimport { setNotQualifiedType } from 'client/redux/modules/userLoginState';\n\nexport default function useSubmitReferralCode() {\n const {\n promoState: { referralCode },\n settingMGMReferral: { enableReferralCodeRequired }\n } = useSelector(s => s);\n const { currentEntryUUID: entryUuid } = useSelector(s => s.userEntryState);\n const { uuid: promoUuid } = useSelector(s => s.promo);\n const dispatch = useDispatch();\n const errHandler = useClientErrorHandler();\n\n const handleSubmit = useCallback(\n async code => {\n const submitCode = code || referralCode;\n\n if (submitCode) {\n Cookies.remove('ref_code');\n try {\n const submitResp = await submitReferralCodeApi({\n promoUuid,\n entryUuid,\n referralCode: submitCode\n });\n\n if (submitResp.httpStatus === 200) {\n dispatch(setReferralCodeInput(true));\n dispatch(\n setReferralCodeStatus({\n referralCode: ''\n })\n );\n dispatch(setNotQualifiedType(''));\n\n return {\n success: true\n };\n } else if (\n submitResp?.payload?.message ===\n REFERRAL_CODE_API_FAIL_REASON.REFERRAL_CODE_NOT_FOUND\n ) {\n // 邀請碼錯誤\n dispatch(\n setReferralCodeStatus({\n referralCode: ''\n })\n );\n\n return {\n success: false,\n reason: REFERRAL_CODE_API_FAIL_REASON.REFERRAL_CODE_NOT_FOUND,\n error: submitResp\n };\n } else if (\n submitResp?.payload?.message ===\n REFERRAL_CODE_API_FAIL_REASON.CAN_NOT_USE_SELF_REFERRAL_CODE\n ) {\n // 邀請碼錯誤\n dispatch(\n setReferralCodeStatus({\n referralCode: ''\n })\n );\n\n return {\n success: false,\n reason: REFERRAL_CODE_API_FAIL_REASON.CAN_NOT_USE_SELF_REFERRAL_CODE,\n error: submitResp\n };\n } else {\n throw generateApiErrObj(\n submitResp,\n clientErrTypes.SUBMIT_REFERRIAL_CODE_FAILED\n );\n }\n } catch (err) {\n dispatch(\n setReferralCodeStatus({\n referralCode: ''\n })\n );\n\n errHandler({ err });\n }\n } else {\n // 失敗\n dispatch(\n setReferralCodeStatus({\n referralCode: ''\n })\n );\n\n return {\n success: false,\n reason: REFERRAL_CODE_REASON.GET_EMPTY_REFERRAL_CODE\n };\n }\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [enableReferralCodeRequired, referralCode]\n );\n\n return handleSubmit;\n}\n","export const REFERRAL_CODE_REASON = {\n GET_EMPTY_REFERRAL_CODE: 'Get empty referral code.',\n SUBMIT_FAILED: 'Submit failed.'\n};\n\nexport const REFERRAL_CODE_API_FAIL_REASON = {\n REFERRAL_CODE_NOT_FOUND: 'referral code not found',\n CAN_NOT_USE_SELF_REFERRAL_CODE: 'member can not input self referral code'\n};\n","import React, { useEffect, useRef, useState } from 'react';\nimport Recaptcha from 'react-google-recaptcha';\nimport i18n from 'i18next';\nimport { css } from '@emotion/core';\nimport Dialog from '@material-ui/core/Dialog';\nimport { RECAPTCHA_SITE_KEY } from 'config/envVariable';\nimport Cookies from 'js-cookie';\n\nexport default function DialogReCaptcha({ onOpen = () => {}, onComplete = () => {} }) {\n const recaptchaRef = useRef(null);\n const dialogRef = useRef(null);\n const dialogContentRef = useRef(null);\n const [isLoaded, setLoaded] = useState(false);\n const [containerPosition, setContainerPosition] = useState({});\n\n const handleRecaptchaChange = token => {\n handleDialogClose();\n Cookies.set('reTkn', token);\n onComplete(token);\n };\n\n const handleDialogClose = () => {\n onOpen(false);\n };\n\n const resetRecaptcha = () => {\n if (recaptchaRef.current) recaptchaRef.current.reset();\n };\n\n const handleOnLoad = () => {\n setLoaded(true);\n };\n\n useEffect(() => {\n if (isLoaded) {\n const { height: dialogHeight, width: dialogWidth } =\n dialogRef?.current?.getBoundingClientRect() || {};\n const { height: dialogContentHeight, width: dialogContentWidth } =\n dialogContentRef?.current?.getBoundingClientRect() || {};\n const remainWidth = dialogWidth - dialogContentWidth;\n const remainHeight = dialogHeight - dialogContentHeight;\n const limitRate = 2;\n\n /**\n * 計算可變動的距離 ( 定位點會是 0,負數會向左、向上,正數會向右、向下 )\n * 利用剩餘空間來計算,來避免 dialog 超出畫面\n *\n * (Math.random() * 2 - 1):取得 -1 ~ 1 的亂數\n * remainHeight / 2:可移動的數值。(因正負數值所以除 2 )\n * limitRate:限縮極大極小值,避免 dialog 變動位置過大,影響 UX 體驗\n */\n let top = ((Math.random() * 2 - 1) * (remainHeight / 2)) / limitRate;\n let left = ((Math.random() * 2 - 1) * (remainWidth / 2)) / limitRate;\n setContainerPosition({ top, left });\n }\n }, [isLoaded]);\n\n return (\n e.stopPropagation()}\n open\n ref={dialogRef}\n >\n
\n \n
\n \n );\n}\n\nconst dialogStyle = ({ top = 0, left = 0 }) => css`\n & .MuiBackdrop-root {\n z-index: 1000;\n }\n\n & .MuiDialog-paper {\n top: ${top}px;\n left: ${left}px;\n }\n\n & .MuiDialog-container {\n position: relative;\n z-index: 1100;\n }\n`;\n\nconst dialogContentWrapperStyle = css`\n width: 320px;\n min-height: 84px;\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n","import { useLocation } from 'react-router-dom';\nimport { useMemo } from 'react';\n\n/**\n *\n * @returns {ReadOnlyURLSearchParams}\n * @example\n * const searchParams = useSearchParams();\n * const value = searchParams.get('key');\n * searchParams.append('key', 'value');\n * searchParams.set('key', 'value');\n * searchParams.delete('key');\n * searchParams.sort();\n */\nfunction useSearchParams() {\n const { search } = useLocation();\n\n return useMemo(() => new URLSearchParams(search), [search]);\n}\n\nexport default useSearchParams;\n"],"names":["CHECK_POINT_IS_LOCKED","resp","_resp$payload","_resp$payload2","_resp$payload3","httpStatus","payload","code","message","getPointPoolInfoByClientApi","pointPoolUuid","fetches","concat","generateFetchOpts","dataKeys","getHistoriesByPointPoolMemberApi","_ref","loginMethod","perPage","page","qs","querystring","stringify","Boolean","generateFetchOptsGetter","passPayload","getMemberPointTotalByMemberApi","_ref2","loginType","testQs","getTestQueryString","throwErrConfigs","clientErrTypes","deductPointByPromo","_ref3","promoUUID","currentEntryUUID","method","POST","children","open","isShowHeaderIcon","isShowCloseIcon","isShowPrimaryButton","isShowSecondaryButton","isLoading","titleAlign","contentAlgin","titleText","contentText","primaryButtonText","i18next","t","secondaryButtonText","iconStyle","buttonStyle","modalStyle","dialogContentStyle","Icon","CheckCircleIcon","onPrimaryButtonClick","onSecondaryButtonClick","onClose","hasHeader","bindRef","useScrollElementOnMount","___EmotionJSX","Modal","closeAfterTransition","BackdropComponent","Backdrop","BackdropProps","timeout","css","_css","modalContainerStyle","Fade","in","containerStyle","ref","headerStyle","headerInfoStyle","iconWrapperStyle","titleWrapperStyle","Typography","variant","closeIconWrapperStyle","IconButton","closeIconStyle","size","onClick","CloseIcon","contentStyle","contentTextStyle","footerStyle","FeverButton","text","loading","customBtnStyle","primaryButtonStyle","componentStyle","textColor","white","color","bgColor","functional","secondaryButtonStyle","system900","name","styles","dp03","boxShadow","customStyle","success","align","arguments","length","undefined","adjustWidth","baseButtonStyle","DialogLoading","desc","PureDialog","modalContentStyle","src","alt","zIndex","isInLineAppBrowser","useLineEnv","loginUrl","useLoginUrl","loginTypesForApi","FACEBOOK","additionalQsObj","isAndroid","openExternalBrowser","target","href","useLoginLinkClickAction","linkStyle","Button","i18n","facebook","system300","LINE","Divider","dividerStyle","orientation","flexItem","line","type","isPC","useParams","partner","sponsor","uuid","sponsorUUID","useSelector","s","lineLoginAppLiffId","retrieveLineConfig","liffId","baseOnPromotionsRouteRedirectPath","baseOnUgcRouteRedirectPath","window","location","pathname","redirectPath","IS_UGC_FLOW","appendQsObj","parentUrl","qsObj","parse","search","parentQuery","getQsOfParentUrl","promo_uuid","liffUrl","getLiffUrl","types","QRCODE","LineLiffQrCode","url","lineLoginWrapperStyle","LoginLine","LoginLineButton","BUTTON","appState","hasTryLiff","isInLiffBrowser","canUseLiff","isMobile","LoginLineLiff","themeStyle","usePromoSettingThemeStyle","enableRestrictToAppLogin","settingPromo","enterpriseAppDeepLink","sponsorEnterpriseAppDeepLink","enterpriseCanAppendUrlToDeepLink","sponsorEnterpriseCanAppendUrlToDeepLink","partnerEnterpriseAppDeepLink","partnerEnterpriseCanAppendUrlToDeepLink","JSON","ENTERPRISE","deepLinkUrl","URL","URLSearchParams","qsIndex","key","value","entries","set","encodeURIComponent","toString","buttonUrl","themedButtonStyle","btnColor","privacyUrl","privacyText","rel","handleClose","title","footer","Popup","isOpen","btnContainerStyle","loginTypes","LINELOGIN","LoginLineContainer","FACEBOOKLOGIN","LoginFacebook","ENTERPRISELOGIN","LoginEnterprise","PrivacyLink","isNeedEnterPasscode","userEntryState","gameRunningStatus","isTestMode","promoState","isPromoEnd","gameRunningStatuses","END","needPasscodeHint","Set","has","loginTypeMappingPointRoutesParam","Cookie","expires","DialogLogin","DialogInfoBeforeLoginTrigger","forwardRef","_","isLogin","userLoginState","promo","setOpen","useState","hasInfo","useImperativeHandle","checkIsHasInfo","shouldOpen","NOT_PUBLISH","body","DialogSystem","closePopup","BEFORE","INSTAGRAM","hasPassLoginCheckTriggerGame","DialogLoginContainer","displayName","DialogInfoAfterLoginTrigger","periodPlayMatchedInfo","matchedInfo","match","isInPlayTimePeriod","SUSPEND","currentPoints","needPoints","isKKReducePointMode","onConfirm","isPointsEnough","React","count","errroStyle","successBtnStyle","cancelBtnStyle","error","below","errorCode","KKBOX_EXCHANGE_STATUS","onPaypointError","dispatch","useDispatch","logout","useLogout","redirectEnterpriseLogout","useLogoutRedirect","promoUUid","enableKkpoint","kkpointAmount","transactionWithdrawQuantity","entriesUUid","loadingRef","useRef","setLoading","points","setPoints","paidSuccess","setPaidSuccess","setShowErrorCode","hasError","errHandler","useClientErrorHandler","isPeddingDialogOpen","setPeddingDialogOpen","useEffect","async","getKKboxUserPoints","data","total_qty","err","generateApiErrObj","showError","getUserPoints","quantity","getPoint","isAlreadyCallKKBoxPayPoint","KKBoxPayPoint","exchangeKKboxPoints","status","Number","setTimeout","maskInfoStyle","PointJoin","current","exchangePoints","PointSuccess","setNeedReducePoint","ErrorHint","footerWrapperStyle","logoutBtnStyle","IS_IFRAME_MODE","IFRAME_MODE_MIN_HEIGHT","DialogPasscodeSuccess","dialogStyle","DialogEnterPasscode","onApiError","enableReCaptcha","isRequesting","setIsRequesting","errorType","setErrorType","passcode","setPasscode","openSuccessDialog","setOpenSuccessDialog","isShowReCaptcha","setShowReCaptcha","useReCaptcha","pcode","handleSubmit","token","getPasscodeVerify","recaptchaToken","updateShowPasswordQualifyStatus","hasUsablePasscode","remainingCounts","passcodeRemainingCount","errType","getPasscodeErrorType","DialogReCaptcha","onOpen","onComplete","showClose","endButton","endButtonDisable","trim","handleSubmitClick","disableBackdropClick","TextField","hiddenLabel","fullWidth","placeholder","onChange","e","helperText","getErrorTypeMessage","DialogDeductSuccess","descStyle","PointSystemPoints","pointCount","pointSize","DialogDeductFailed","startButton","needShowPoint","DialogPointNotEnough","Trans","i18nKey","components","DialogDeductPoint","qualifyWithdrawUuid","settingPointSystems","openFailedDialog","setOpenFailedDialog","pointNotEnough","isErrMemberPointsNotEnough","remainPointResp","Promise","all","pointFetch","_pointPoolInfo$settin","style","pointPoolInfo","useGetPromoPointPoolInfo","getPromoPointPoolInfo","pointIconStyle","settings","partnerPointIconUrl","sponsorPointIconUrl","useGetPartnerOrSponsorPointIcon","processed_type","DEDUCTION","pointSystemPointsStyle","PointIcon","iconColor","colorText","coverStyle","prompt","DialogBindCyberbizECMember","officialSiteUrl","hasOfficialSiteUrl","DialogEnterpriseBindLine","notQualifiedErrInfo","redirectUrl","query","parseUrl","qStr","redirect_uri","DialogReferralCode","isShowCloseButton","referralCodeCard","settingMGMReferral","setValue","setError","useSubmitReferralCode","Dialog","ReferralCodeCard","submitResp","reason","REFERRAL_CODE_API_FAIL_REASON","REFERRAL_CODE_NOT_FOUND","CAN_NOT_USE_SELF_REFERRAL_CODE","isShowImage","imageUrl","buttonText","buttonTextColor","buttonBgColor","description","themeTextColor","themeBgColor","_e$target","DialogQualifyCheckTrigger","notQualifiedType","userGameResultRecords","gameResultRecords","isNeedReducePoint","createEntryNotQualifiedType","state","notQualified","searchParams","useSearchParams","handleApiError","notQualifiedTypes","MEMBER_KKBOX","KKboxUpgradeMemberLevel","CYBERBIZ_EC_MEMBER","FRIEND","DialogLineAddFriend","ENTERPRISE_MEMBER_BIND","QUALIFICATION","MEMBER_ORDER","NAME_LIST_API","ENTRIES","REACH_LIMIT","NEW_REGISTER_MEMBER","SUBMIT_REFERRAL_CODE","gameTypes","SIGN_UP","getErrorTypeDialogDesc","errorTypes","USAGE_LIMIT_EXCEEDED","PayPointCover","Provider","useContextValue","contextGenerator","nameSpaces","CLIENT_PROMO_JOIN_CHECKER","login","full","useCheckerContext","checkTypes","LOGIN_STATUS","PROMO_STATUS","QUALIFY_STATUS","ProviderFlowInfoAndActionChecker","infoBeforeLogin","infoAfterLogin","infoInterAction","checkers","useMemo","check","checkTypesMappingCheckers","instances","i","runner","map","filter","windowRef","getLoginMessage","useCallback","event","origin","postMessage","document","reload","addEventListener","removeEventListener","afterLoginRedirectUrl","useLoginWindowPostMessage","getLoginLinkClickAction","promoId","getRedirectUrlFromLoginServerToPromoOrUgc","getEnterpriseLoginUrl","getFeverLoginUrl","tokenManager","callback","domainMappingFE","enterpriseLoginAppLogoutUrl","partnerEnterpriseLoginAppLogoutUrl","sponsorEnterpriseLoginAppLogoutUrl","targetUrl","width","height","left","screen","top","shouldGetNextEntry","referralCode","enableReferralCodeRequired","entryUuid","promoUuid","submitCode","setReferralCodeStatus","REFERRAL_CODE_REASON","GET_EMPTY_REFERRAL_CODE","Cookies","_submitResp$payload","_submitResp$payload2","submitReferralCodeApi","setReferralCodeInput","setNotQualifiedType","SUBMIT_FAILED","recaptchaRef","dialogRef","dialogContentRef","isLoaded","setLoaded","containerPosition","setContainerPosition","handleDialogClose","resetRecaptcha","reset","_dialogRef$current","_dialogContentRef$cur","dialogHeight","dialogWidth","getBoundingClientRect","dialogContentHeight","dialogContentWidth","remainWidth","remainHeight","limitRate","Math","random","stopPropagation","dialogContentWrapperStyle","id","Recaptcha","asyncScriptOnLoad","handleOnLoad","onErrored","onExpired","sitekey","RECAPTCHA_SITE_KEY","hl","language","useLocation"],"sourceRoot":""}