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,KAAA,MAAIS,MAAO2I,GAAgB,GAAA7I,OAAKmC,EAAAA,EAAKpD,EAAE,oBAAmB,MAAAiB,OAAKkH,IAElEC,IACG1H,EAAAA,EAAAA,KAAA,UAAQS,MAAO4I,EAAUxI,QAASA,IAAM4D,OAAO2B,SAASC,UACnD3D,EAAAA,EAAKpD,EAAE,gBAOrB0I,KAAKsB,MAAM5K,QACtB,EAGJ,MAAMyK,EAAiB,CACnBlM,QAAS,OACTI,OAAQ,OACRQ,QAAS,OACTE,cAAe,SACfD,eAAgB,SAChByL,WAAY,SACZ7I,gBAAiB,2BAEf2I,EAAW,CACbpM,QAAS,WACTJ,aAAc,MACd2M,OAAQ,kBACR9I,gBAAiB,cACjBjD,OAAQ,WAEN2L,EAAkB,CACpBK,UAAW,SACXC,UAAW,c,cChFA,SAASC,EAAwBtL,GAAgB,IAAf,SAAEK,GAAUL,EACzD,OACI2B,EAAAA,EAAAA,KAACoH,EAAgB,MACbpH,EAAAA,EAAAA,KAAC4J,EAAAA,GAAQ,CAACC,MAAOA,EAAAA,IACb7J,EAAAA,EAAAA,KAAC8J,EAAAA,EAAuB,MACpB9J,EAAAA,EAAAA,KAAC+J,EAAAA,GAAgC,MAC7B/J,EAAAA,EAAAA,KAACgK,EAAiB,OAClBhK,EAAAA,EAAAA,KAACiK,EAAa,KAAEvL,MAMxC,CAEA,SAASuL,EAAaC,GAAgB,IAAf,SAAExL,GAAUwL,EAI/B,OCzBW,WACX,MAAM5G,GAAWC,EAAAA,EAAAA,MACX4G,GAAgBC,EAAAA,EAAAA,GAAc,cAAD7J,OAAe8J,EAAAA,GAAYC,GAAE,SAEhE3K,EAAAA,EAAAA,YAAU,KACN2D,GAASiH,EAAAA,EAAAA,IAAoBJ,GAAe,GAE7C,CAACA,GACR,CDcIK,GACApH,EAAkC,UAClCA,EAAkC,SAC3B1E,CACX,C","sources":["client/components/PopupWithWaitingButton.js","client/components/DialogSystemLoading.js","client/hooks/useSpecificIframeEmbedInitPostMsg.js","client/components/DialogSystemError.js","client/components/ErrorBoundaryApp.js","client/components/GeneralClientFlowWrapper.js","client/hooks/useListenSmallScreen.js"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport { makeStyles } from '@material-ui/core/styles';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport Button from 'Mui/Button';\nimport MuiDialog from '@material-ui/core/Dialog';\nimport DialogTitle from '@material-ui/core/DialogTitle';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport IconButton from '@material-ui/core/IconButton';\nimport CloseIcon from '@material-ui/icons/Close';\nimport Typography from '@material-ui/core/Typography';\nimport { system900 } from 'Mui/styles/color';\nimport { dp08 } from 'Mui/styles/shadow';\nimport { useTranslation } from 'react-i18next';\nimport { css } from '@emotion/core';\n\nconst useStyles = makeStyles({\n dialog: {\n width: '100%',\n maxWidth: '320px',\n borderRadius: '16px',\n boxShadow: dp08.boxShadow\n },\n title: {\n padding: '12px 24px',\n whiteSpace: 'pre-wrap'\n },\n content: {\n '&[class^=\"MuiDialogContent-root\"]': {\n padding: '0'\n }\n },\n closeIcon: {\n width: '24px',\n height: '24px',\n position: 'absolute',\n top: '15px',\n right: '15px',\n cursor: 'pointer',\n color: system900.color,\n 'z-index': 1\n },\n footer: {\n display: 'flex',\n justifyContent: 'center',\n padding: '16px',\n flexDirection: 'column'\n },\n button: {\n borderRadius: '20px',\n minWidth: '125px',\n '&.MuiButtonBase-root': {\n margin: '0'\n },\n '&:not(:first-child)': {\n marginTop: '8px'\n }\n },\n largeButton: {\n minWidth: '182px',\n borderRadius: '24px',\n padding: '12px 8px'\n }\n});\n\nfunction PopupWithWaitingButton({\n isOpen = true,\n showClose,\n maxWidth = 'xs',\n onClose,\n onConfirm,\n children,\n title,\n titleAlign = 'center',\n disableBackdropClick,\n button,\n buttonVariant = 'contained',\n buttonColor = 'primary',\n buttonStyle,\n buttonDisable,\n buttonSize = 'medium',\n className,\n backdropStyle = {},\n waitingTime = 3\n}) {\n const classes = useStyles();\n const { t } = useTranslation();\n const [time, setTime] = useState(waitingTime || 0);\n\n useEffect(() => {\n let timer = null;\n\n if (isOpen && time > 0) {\n timer = setTimeout(() => {\n setTime(c => (c -= 1));\n }, 1000);\n\n return () => clearTimeout(timer);\n }\n }, [isOpen, time]);\n\n useEffect(() => {\n if (isOpen === true) setTime(waitingTime);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isOpen]);\n\n useEffect(() => {\n setTime(waitingTime);\n }, [waitingTime]);\n\n return (\n \n {showClose ? (\n \n \n \n ) : null}\n {Boolean(title) && (\n \n \n {title}\n \n \n )}\n {children}\n {\n <>\n {button && (\n \n 0}\n className={clsx(\n classes.button,\n buttonStyle,\n buttonSize === 'large' && classes.largeButton\n )}\n >\n {button}\n \n \n )}\n {Boolean(time) && (\n \n {t('label.watting_seconds_to_action', { seconds: time })}\n \n )}\n \n }\n \n );\n}\n\nPopupWithWaitingButton.propTypes = {\n isOpen: PropTypes.bool,\n showClose: PropTypes.bool,\n maxWidth: PropTypes.string,\n onCancel: PropTypes.func,\n onClose: PropTypes.func,\n onConfirm: PropTypes.func,\n children: PropTypes.node,\n title: PropTypes.string,\n titleAlign: PropTypes.string,\n disableBackdropClick: PropTypes.bool,\n startButton: PropTypes.string,\n startButtonVariant: PropTypes.string,\n startButtonColor: PropTypes.string,\n startButtonStyle: PropTypes.string,\n startButtonDisable: PropTypes.bool,\n endButton: PropTypes.string,\n endButtonVariant: PropTypes.string,\n endButtonColor: PropTypes.string,\n endButtonStyle: PropTypes.string,\n endButtonDisable: PropTypes.bool,\n className: PropTypes.string,\n backdropStyle: PropTypes.object\n};\n\nexport default PopupWithWaitingButton;\n\nconst WaitingMessageStyle = css`\n text-align: center;\n padding-bottom: 16px;\n font-weight: 500;\n font-size: 10px;\n line-height: 14px;\n text-align: center;\n letter-spacing: 1.5px;\n`;\n\nconst ActionContainerStyle = isWaiting => css`\n padding: ${isWaiting ? '16px 16px 4px' : '16px'};\n`;\n","import React from 'react';\nimport { css } from '@emotion/core';\nimport PropTypes from 'prop-types';\nimport i18n from 'i18next';\nimport Typography from '@material-ui/core/Typography';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { system300 } from 'Mui/styles/color';\nimport { stylePropType } from 'utils/propTypes';\nimport useScrollElementOnMount from 'client/hooks/useScrollElementOnMount';\nimport PopupWithWaitingButton from 'client/components/PopupWithWaitingButton';\n\nconst useStyle = makeStyles({\n endButton: {\n backgroundColor: `#0066ff`,\n '&:hover': {\n backgroundColor: '#0066ff'\n },\n '&.Mui-disabled': {\n backgroundColor: system300.color,\n color: '#fff'\n }\n }\n});\n\nfunction DialogSystemLoading({\n title,\n body,\n isOpen = true,\n dense = false,\n closePopup = () => {},\n endButton = i18n.t('btn.close'),\n scrollInViewWhenOpen = true,\n waitingTime = 3,\n style = {}\n}) {\n const muiStyle = useStyle();\n const bindRef = useScrollElementOnMount({ trigger: scrollInViewWhenOpen && isOpen });\n\n return (\n \n {Boolean(body) && (\n
\n {body}\n
\n )}\n \n );\n}\n\nDialogSystemLoading.propTypes = {\n isOpen: PropTypes.bool,\n title: PropTypes.string,\n body: PropTypes.node,\n dense: PropTypes.bool,\n scrollInViewWhenOpen: PropTypes.bool,\n closePopup: PropTypes.func,\n endButton: PropTypes.string,\n style: stylePropType\n};\n\nexport default DialogSystemLoading;\n\nconst contentStyle = css`\n padding: 24px;\n text-align: center;\n white-space: pre-wrap;\n > * {\n line-height: 2;\n }\n`;\n","import { useEffect, useMemo, useCallback } from 'react';\nimport { useDispatch } from 'react-redux';\nimport { IS_IFRAME_MODE } from 'config/envVariable';\nimport * as postMsgEvent from 'config/postMsgEvent';\nimport { setIsZinesEmbedded, setIsWidgetEmbedded } from 'client/redux/modules/appState';\n\nexport default function useSpecificIframeEmbedInitPostMsg(eventType) {\n const dispatch = useDispatch();\n const CHECK_IFRAME_EMBEDDED_EVENTS = useMemo(\n () => ({\n widget: {\n event: postMsgEvent.IS_WIDGET_EMBEDDED,\n action: setIsWidgetEmbedded\n },\n zines: {\n event: postMsgEvent.IS_ZINES_EMBEDDED,\n action: setIsZinesEmbedded\n }\n }),\n []\n );\n\n const handleMessage = useCallback(\n event => {\n const message = event.data ?? {};\n if (message.event === CHECK_IFRAME_EMBEDDED_EVENTS[eventType]?.event) {\n dispatch(CHECK_IFRAME_EMBEDDED_EVENTS[eventType]?.action());\n }\n },\n [CHECK_IFRAME_EMBEDDED_EVENTS, dispatch, eventType]\n );\n\n useEffect(() => {\n if (IS_IFRAME_MODE && CHECK_IFRAME_EMBEDDED_EVENTS[eventType]) {\n window.parent.postMessage(\n {\n event: CHECK_IFRAME_EMBEDDED_EVENTS[eventType]?.event\n },\n '*'\n );\n window.addEventListener('message', handleMessage, false);\n return () => {\n window.removeEventListener('message', handleMessage, false);\n };\n }\n }, [CHECK_IFRAME_EMBEDDED_EVENTS, dispatch, eventType, handleMessage]);\n}\n","import React from 'react';\nimport { useSelector, useDispatch } from 'react-redux';\nimport { useHistory } from 'react-router-dom';\nimport i18n from 'i18next';\nimport { css } from '@emotion/core';\nimport { updateShowPasswordQualifyStatus } from 'client/redux/modules/promoState';\n\nimport useLogout from 'client/hooks/logout/useLogout';\nimport {\n closeSystemErrorDialog,\n handlers,\n showErrDialog\n} from 'client/redux/modules/systemErrorDialog';\nimport DialogSystemLoading from 'client/components/DialogSystemLoading';\nimport useSearchParams from 'hooks/useSearchParams';\n\nfunction DialogSystemError() {\n const logout = useLogout();\n const history = useHistory();\n const searchParams = useSearchParams();\n\n const dispatch = useDispatch();\n const {\n systemErrorDialog: { persist, show, title, desc, handler }\n } = useSelector(s => s);\n const DEFAULT_COOL_DOWN_SEC = 0;\n // [860t32w1m] 修正系統繁忙中的處理和訊息提示 handlers.RELOAD 與 handlers.TRY_AGAIN 基本上功能一樣,差在說明、按鈕文字、按鈕在點擊一次時有冷卻時間\n const HIGH_TRAFFIC_COOL_DOWN_SEC = 6;\n\n const [onClick, endButton, waitingTime] = (() => {\n switch (handler) {\n case handlers.CLOSE:\n return [\n () => dispatch(closeSystemErrorDialog()),\n i18n.t('btn.close'),\n DEFAULT_COOL_DOWN_SEC\n ];\n case handlers.PASSCODE_DENIED:\n return [\n () => {\n dispatch(closeSystemErrorDialog());\n if (searchParams.get('pcode')) {\n searchParams.delete('pcode');\n history.replace({ search: searchParams.toString() });\n }\n window.location.reload();\n },\n i18n.t('btn.reload'),\n DEFAULT_COOL_DOWN_SEC\n ];\n case handlers.PASSCODE_UNVERIFIED:\n return [\n () => {\n dispatch(closeSystemErrorDialog());\n dispatch(\n updateShowPasswordQualifyStatus({\n hasUsablePasscode: false,\n passcode: '',\n passcodeRemainingCount: 0\n })\n );\n },\n i18n.t('btn.close'),\n DEFAULT_COOL_DOWN_SEC\n ];\n case handlers.RELOAD:\n return [\n () => window.location.reload(),\n i18n.t('btn.reload'),\n DEFAULT_COOL_DOWN_SEC\n ];\n case handlers.TRY_AGAIN:\n return [\n () => window.location.reload(),\n i18n.t('btn.try_again'),\n HIGH_TRAFFIC_COOL_DOWN_SEC\n ];\n case handlers.LOGOUT_RELOAD:\n return [() => logout(), i18n.t('btn.relogin'), DEFAULT_COOL_DOWN_SEC];\n case handlers.HIDE_BUTTON:\n default:\n return [() => {}, null, DEFAULT_COOL_DOWN_SEC];\n }\n })();\n\n return (\n <>\n \n {persist &&
dispatch(showErrDialog())} />}\n \n );\n}\n\nexport default DialogSystemError;\n\nconst fullWrapperStyle = css`\n position: absolute;\n right: 0;\n left: 0;\n top: 0;\n bottom: 0;\n z-index: 10;\n`;\n","import React from 'react';\nimport i18n from 'i18next';\n\nimport { sentryCaptureException } from 'sentry.js';\nimport * as clientErrTypes from 'config/clientErrorTypes';\nimport { isChunkLoadError } from 'client/utils/errorObjectChecker';\n\nconst ignoreErrorMessage = [];\n\n// 可以透過 error stack 去判斷是否為外部檔案造成的 error 並過濾\nconst ignoreErrorStack = ['gtm.js'];\n\nexport default class ErrorBoundaryApp extends React.Component {\n state = {\n hasError: false,\n code: '',\n isCrashDueToOldCache: false\n };\n\n static getDerivedStateFromError(error) {\n const isCrashDueToOldCache = isChunkLoadError(error);\n return { hasError: true, isCrashDueToOldCache };\n }\n\n componentDidCatch(error, errorInfo) {\n const { isCrashDueToOldCache } = this.state;\n if (!isCrashDueToOldCache) {\n if (errorInfo?.componentStack) console.log('componentStack:', errorInfo.componentStack);\n error.extraInfo = {\n ...errorInfo,\n errType: clientErrTypes.COMPONENT_CRASH\n };\n try {\n const { message = '' } = error;\n console.log('error message:', message);\n if (ignoreErrorMessage.some(text => message.includes(text))) return;\n\n const errorStack = error?.error?.stack || '';\n console.log('error.error.stack:', error?.error?.stack);\n if (ignoreErrorStack.some(text => errorStack.includes(text))) return;\n } catch (error) {}\n\n const eventId = sentryCaptureException(error);\n this.setState({ code: eventId });\n }\n }\n\n render() {\n const { hasError, code, isCrashDueToOldCache } = this.state;\n const title = i18n.t(\n isCrashDueToOldCache\n ? 'label.err_boundary.failed_to_load'\n : 'label.err_boundary.sth_went_wrong'\n );\n\n if (hasError) {\n return (\n
\n

{title}

\n {Boolean(code) && (\n

{`${i18n.t('label.error_code')}: ${code}`}

\n )}\n {isCrashDueToOldCache && (\n \n )}\n
\n );\n }\n\n return this.props.children;\n }\n}\n\nconst containerStyle = {\n padding: '16px',\n height: '100%',\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor: 'rgba(255, 255,255, 0.5)'\n};\nconst btnStyle = {\n padding: '8px 16px',\n borderRadius: '4px',\n border: '1px solid black',\n backgroundColor: 'transparent',\n cursor: 'pointer'\n};\nconst alignTextCenter = {\n textAlign: 'center',\n wordBreak: 'break-word'\n};\n","import React from 'react';\nimport { Provider } from 'react-redux';\n\nimport store from 'client/redux/store';\n\nimport useListenSmallScreen from 'client/hooks/useListenSmallScreen';\nimport useSpecificIframeEmbedInitPostMsg from 'client/hooks/useSpecificIframeEmbedInitPostMsg';\n\nimport DialogSystemError from 'client/components/DialogSystemError';\nimport ProviderFlowInfoAndActionChecker from 'client/components/infoDialog/ProviderFlowInfoAndActionChecker';\nimport ErrorBoundaryApp from 'client/components/ErrorBoundaryApp';\nimport ProviderMuiPickersUtils from 'components/ProviderMuiPickersUtils';\n\nexport default function GeneralClientFlowWrapper({ children }) {\n return (\n \n \n \n \n \n {children}\n \n \n \n \n );\n}\n\nfunction EffectWrapper({ children }) {\n useListenSmallScreen();\n useSpecificIframeEmbedInitPostMsg('widget');\n useSpecificIframeEmbedInitPostMsg('zines');\n return children;\n}\n","import { useEffect } from 'react';\nimport { useDispatch } from 'react-redux';\nimport useMediaQuery from '@material-ui/core/useMediaQuery';\n\nimport { breakpoints } from 'utils/breakpoint';\nimport { setIsSmallScreenApp } from 'client/redux/modules/appState';\n\nexport default function useListenSmallScreen() {\n const dispatch = useDispatch();\n const isSmallScreen = useMediaQuery(`(max-width:${breakpoints.sm}px)`);\n\n useEffect(() => {\n dispatch(setIsSmallScreenApp(isSmallScreen));\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isSmallScreen]);\n}\n"],"names":["useStyles","makeStyles","dialog","width","maxWidth","borderRadius","boxShadow","dp08","title","padding","whiteSpace","content","closeIcon","height","position","top","right","cursor","color","system900","footer","display","justifyContent","flexDirection","button","minWidth","margin","marginTop","largeButton","_ref","isOpen","showClose","onClose","onConfirm","children","titleAlign","disableBackdropClick","buttonVariant","buttonColor","buttonStyle","buttonDisable","buttonSize","className","backdropStyle","waitingTime","classes","t","useTranslation","time","setTime","useState","useEffect","timer","setTimeout","c","clearTimeout","___EmotionJSX","MuiDialog","disableAutoFocus","disableEnforceFocus","disableRestoreFocus","open","paper","concat","BackdropProps","style","backgroundColor","backdropFilter","IconButton","onClick","size","CloseIcon","Boolean","DialogTitle","disableTypography","Typography","align","variant","DialogContent","root","React","DialogActions","css","ActionContainerStyle","Button","disabled","clsx","WaitingMessageStyle","seconds","name","styles","isWaiting","useStyle","endButton","system300","body","dense","closePopup","i18n","scrollInViewWhenOpen","muiStyle","bindRef","useScrollElementOnMount","trigger","PopupWithWaitingButton","ref","_css","contentStyle","useSpecificIframeEmbedInitPostMsg","eventType","dispatch","useDispatch","CHECK_IFRAME_EMBEDDED_EVENTS","useMemo","widget","event","postMsgEvent","action","setIsWidgetEmbedded","zines","setIsZinesEmbedded","handleMessage","useCallback","_event$data","_CHECK_IFRAME_EMBEDDE","_CHECK_IFRAME_EMBEDDE2","data","_CHECK_IFRAME_EMBEDDE3","IS_IFRAME_MODE","window","parent","postMessage","addEventListener","removeEventListener","logout","useLogout","history","useHistory","searchParams","useSearchParams","systemErrorDialog","persist","show","desc","handler","useSelector","s","handlers","CLOSE","closeSystemErrorDialog","PASSCODE_DENIED","get","delete","replace","search","toString","location","reload","PASSCODE_UNVERIFIED","updateShowPasswordQualifyStatus","hasUsablePasscode","passcode","passcodeRemainingCount","RELOAD","TRY_AGAIN","LOGOUT_RELOAD","HIDE_BUTTON","DialogSystemLoading","fullWrapperStyle","showErrDialog","ignoreErrorMessage","ignoreErrorStack","ErrorBoundaryApp","constructor","arguments","state","hasError","code","isCrashDueToOldCache","getDerivedStateFromError","error","isChunkLoadError","componentDidCatch","errorInfo","this","componentStack","console","log","extraInfo","errType","clientErrTypes","_error$error","_error$error2","message","some","text","includes","errorStack","stack","eventId","sentryCaptureException","setState","render","containerStyle","alignTextCenter","btnStyle","props","alignItems","border","textAlign","wordBreak","GeneralClientFlowWrapper","Provider","store","ProviderMuiPickersUtils","ProviderFlowInfoAndActionChecker","DialogSystemError","EffectWrapper","_ref2","isSmallScreen","useMediaQuery","breakpoints","sm","setIsSmallScreenApp","useListenSmallScreen"],"sourceRoot":""}