{"version":3,"file":"RaffleButton.Bso89o9L.mjs","names":["useState","useMemo","microSeconds","create","microSeconds$1","close","postMessage","onMessage","canBeUsed","averageResponseTime","microSeconds","type","create","close","postMessage","onMessage","canBeUsed","averageResponseTime","microSeconds","microSeconds$1","type","postMessage","create","canBeUsed","close","onMessage","averageResponseTime","microSeconds","microSeconds$1","type","microSeconds$1","BroadcastChannel","useRef","useCallback","BroadcastChannel","useRef","useState","TITLE","SECTION_NAME","useMemo","useState","useRef","createContext","useState","useMemo","useContext","useMemo","useCallback","useRef"],"sources":["https:/asset.29cm.co.kr/contents/framer/hooks/fetchers/useLazyFetchRaffleDisplayInformation.js","https:/asset.29cm.co.kr/contents/framer/components/systems/RaffleButton/hooks/useFetchRaffleData.js","https:/asset.29cm.co.kr/contents/framer/components/systems/RaffleButton/RaffleButton.types.js","https:/asset.29cm.co.kr/contents/framer/components/systems/RaffleButton/hooks/useRaffleStatus.js","https:/asset.29cm.co.kr/contents/framer/components/systems/RaffleButton/hooks/useCreateRaffleAction.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/dialogs/AppQRCodeDialog/AppQRCodeDialog.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/dialogs/AppQRCodeDialog/AppQRCodeDialog.hooks.js","https:/asset.29cm.co.kr/contents/framer/components/systems/RaffleButton/hooks/useTrackRaffleEvent.js","https:/asset.29cm.co.kr/contents/framer/components/systems/RaffleButton/hooks/useRaffleActions.js","https:/asset.29cm.co.kr/contents/framer/components/systems/RaffleButton/RaffleButton.utils.js","https:/asset.29cm.co.kr/contents/framer/components/systems/RaffleButton/modals/RaffleMssOneNudgeModal/RaffleMssOneNudgeModalContent.js","https:/asset.29cm.co.kr/contents/framer/node_modules/date-fns/endOfDay.js","https:/asset.29cm.co.kr/contents/framer/utils/raffle/raffleMssOneNudgeVisibility.js","https:/asset.29cm.co.kr/contents/framer/node_modules/broadcast-channel/dist/esbrowser/util.js","https:/asset.29cm.co.kr/contents/framer/node_modules/broadcast-channel/dist/esbrowser/methods/native.js","https:/asset.29cm.co.kr/contents/framer/node_modules/oblivious-set/dist/esm/src/index.js","https:/asset.29cm.co.kr/contents/framer/node_modules/broadcast-channel/dist/esbrowser/options.js","https:/asset.29cm.co.kr/contents/framer/node_modules/broadcast-channel/dist/esbrowser/methods/indexed-db.js","https:/asset.29cm.co.kr/contents/framer/node_modules/broadcast-channel/dist/esbrowser/methods/localstorage.js","https:/asset.29cm.co.kr/contents/framer/node_modules/broadcast-channel/dist/esbrowser/methods/simulate.js","https:/asset.29cm.co.kr/contents/framer/node_modules/broadcast-channel/dist/esbrowser/method-chooser.js","https:/asset.29cm.co.kr/contents/framer/node_modules/broadcast-channel/dist/esbrowser/broadcast-channel.js","https:/asset.29cm.co.kr/contents/framer/hooks/useBroadcastChannel.js","https:/asset.29cm.co.kr/contents/framer/constants/broadcast-channels.js","https:/asset.29cm.co.kr/contents/framer/hooks/mss-one/useMSSOneConnect.js","https:/asset.29cm.co.kr/contents/framer/components/systems/RaffleButton/modals/RaffleMssOneNudgeModal/useMssOneNudgeModal.js","https:/asset.29cm.co.kr/contents/framer/components/systems/RaffleButton/modals/RaffleMssOneNudgeModal/RaffleMssOneNudgeModal.js","https:/asset.29cm.co.kr/contents/framer/components/systems/RaffleButton/modals/RaffleMssOneConnectedModal/hooks/useRaffleData.js","https:/asset.29cm.co.kr/contents/framer/components/systems/RaffleButton/modals/RaffleMssOneConnectedModal/hooks/useRaffleAgreements.js","https:/asset.29cm.co.kr/contents/framer/components/systems/RaffleButton/modals/RaffleMssOneConnectedModal/hooks/useConnectedModalState.js","https:/asset.29cm.co.kr/contents/framer/components/systems/RaffleButton/modals/RaffleMssOneConnectedModal/useMssOneConnectedModal.js","https:/asset.29cm.co.kr/contents/framer/components/systems/RaffleButton/modals/RaffleMssOneConnectedModal/RaffleMssOneConnectedModalContent.js","https:/asset.29cm.co.kr/contents/framer/components/systems/RaffleButton/modals/RaffleMssOneConnectedModal/RaffleMssOneConnectedModal.js","https:/asset.29cm.co.kr/contents/framer/components/systems/RaffleButton/providers/RaffleModalProvider.js","https:/asset.29cm.co.kr/contents/framer/components/systems/RaffleButton/components/RaffleButtonWithAccountIntegration.js","https:/asset.29cm.co.kr/contents/framer/components/systems/RaffleButton/RaffleButton.js","https:/framerusercontent.com/modules/OcBddWDWXlGS4T3Q4Wnl/2foFwHDTq9SF2tB5eSAx/RaffleButton.js"],"sourcesContent":["import { raffleApi } from \"../../apis/raffle/RaffleApiService.js\";\nimport { useLazySWR } from \"../swr/useLazySWR.js\";\nconst raffleDisplayInformationFetcherKey = \"raffle-display-information\";\nconst useLazyFetchRaffleDisplayInformation = (raffleGroupId, raffleId) => {\n  const enabled = Boolean(raffleGroupId) && Boolean(raffleId);\n  const {\n    data,\n    isLoading,\n    fetch,\n    mutate\n  } = useLazySWR(enabled ? [raffleDisplayInformationFetcherKey, raffleGroupId, raffleId] : null, () => raffleApi.getRaffleDisplayInformation(raffleGroupId, raffleId));\n  const isPending = isLoading || !enabled;\n  return {\n    displayInformation: data == null ? void 0 : data.data,\n    isPending,\n    fetch,\n    mutate\n  };\n};\nexport {\n  useLazyFetchRaffleDisplayInformation\n};\n","import { useLazyFetchRaffleGroup } from \"../../../../hooks/fetchers/useLazyFetchRaffleGroup.js\";\nimport { useLazyFetchRaffleDisplayInformation } from \"../../../../hooks/fetchers/useLazyFetchRaffleDisplayInformation.js\";\nimport { useEffect } from \"react\";\nconst useFetchRaffleData = ({\n  raffleGroupId,\n  raffleId,\n  enabled,\n  shouldFetchDisplayInformation\n}) => {\n  const {\n    raffleGroup,\n    fetch: fetchRaffleGroup,\n    isPending: isRaffleGroupPending\n  } = useLazyFetchRaffleGroup(raffleGroupId);\n  const {\n    displayInformation,\n    fetch: fetchRaffleDisplayInformation,\n    isPending: isRaffleDisplayInformationPending,\n    mutate: revalidateDisplayInformation\n  } = useLazyFetchRaffleDisplayInformation(raffleGroupId, raffleId);\n  useEffect(() => {\n    if (enabled) {\n      fetchRaffleGroup();\n      if (shouldFetchDisplayInformation) {\n        fetchRaffleDisplayInformation();\n      }\n    }\n  }, [enabled, shouldFetchDisplayInformation]);\n  const isPending = isRaffleGroupPending || shouldFetchDisplayInformation && isRaffleDisplayInformationPending;\n  return {\n    raffleGroup,\n    displayInformation,\n    isPending,\n    revalidateDisplayInformation\n  };\n};\nexport {\n  useFetchRaffleData\n};\n","var RaffleStatus = /* @__PURE__ */ ((RaffleStatus2) => {\n  RaffleStatus2[RaffleStatus2[\"Pending\"] = 0] = \"Pending\";\n  RaffleStatus2[RaffleStatus2[\"InProgress\"] = 1] = \"InProgress\";\n  RaffleStatus2[RaffleStatus2[\"Finished\"] = 2] = \"Finished\";\n  RaffleStatus2[RaffleStatus2[\"Unknown\"] = 3] = \"Unknown\";\n  return RaffleStatus2;\n})(RaffleStatus || {});\nexport {\n  RaffleStatus\n};\n","import { useState, useEffect, useMemo } from \"react\";\nimport { RaffleStatus } from \"../RaffleButton.types.js\";\nimport { differenceInMilliseconds } from \"../../../../node_modules/date-fns/differenceInMilliseconds.js\";\nimport { createKRTimeZoneDate } from \"../../../../utils/createUTCDate.js\";\nimport useInterval from \"../../../../node_modules/react-use/esm/useInterval.js\";\nimport { parseISO } from \"../../../../node_modules/date-fns/parseISO.js\";\nconst MS_IN_SECOND = 1e3;\nconst getRaffleStatus = (remaining, duration) => {\n  switch (true) {\n    case remaining < MS_IN_SECOND:\n      return RaffleStatus.Finished;\n    case remaining - duration < MS_IN_SECOND:\n      return RaffleStatus.InProgress;\n    default:\n      return RaffleStatus.Pending;\n  }\n};\nconst getRaffleInterval = (status) => {\n  switch (status) {\n    case RaffleStatus.Finished:\n      return null;\n    case RaffleStatus.Unknown:\n      return MS_IN_SECOND / 2;\n    default:\n      return MS_IN_SECOND;\n  }\n};\nconst useRaffleStatus = (raffle) => {\n  const [status, setStatus] = useState(RaffleStatus.Unknown);\n  useEffect(() => {\n    setStatus(RaffleStatus.Unknown);\n  }, [raffle]);\n  const duration = useMemo(() => raffle ? differenceInMilliseconds(parseISO(raffle.applyEndedAt), parseISO(raffle.applyStartedAt)) : 0, [raffle]);\n  const intervalCallback = () => {\n    if (!raffle) {\n      return;\n    }\n    const currentTime = createKRTimeZoneDate();\n    const raffleEndTime = parseISO(raffle.applyEndedAt);\n    const remaining = differenceInMilliseconds(raffleEndTime, currentTime);\n    const newStatus = getRaffleStatus(remaining, duration);\n    setStatus(newStatus);\n  };\n  useInterval(intervalCallback, getRaffleInterval(status));\n  return status;\n};\nexport {\n  useRaffleStatus\n};\n","import { raffleApi } from \"../../../../apis/raffle/RaffleApiService.js\";\nimport { RaffleAgreementRequirement } from \"../../../../apis/raffle/RaffleApiService.types.js\";\nimport { isWebview } from \"../../../../utils/device.js\";\nimport \"react\";\nimport \"../../../../node_modules/@firebase/analytics/dist/esm/index.esm2017.js\";\nimport \"../../../../node_modules/firebase/app/dist/esm/index.esm.js\";\nimport \"../../../../node_modules/swr/core/dist/index.js\";\nimport \"../../../../apis/user-segment/CategoryFirstOrderApiService.js\";\nimport \"../../../../config/index.js\";\nimport \"../../../../node_modules/js-cookie/dist/js.cookie.js\";\nimport \"../../../../apis/highlight-products/HighlightProductsApiService.js\";\nimport \"../../../../apis/brand-mix/BrandMixApiService.js\";\nimport \"../../../../apis/one-brand-days/OneBrandDaysApiService.js\";\nimport \"../../../../apis/taste-sharing/TasteSharingApiService.js\";\nimport \"../../../../apis/user/UserApiService.js\";\nimport \"../../../../apis/preuser/PreuserApiService.js\";\nimport \"../../../../node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.js\";\nimport \"framer\";\nimport \"../../../../node_modules/@29cm/snowplow/dist/esm/core/snowplow.js\";\nimport useSWRMutation from \"../../../../node_modules/swr/mutation/dist/index.js\";\nimport { GENERAL_ERROR } from \"../../../../constants/error.js\";\nimport \"../../../../hooks/stores/content/content.store.js\";\nimport \"../../../../hooks/stores/dialog/dialog.store.js\";\nimport \"../../../../hooks/stores/global-layout/global-layout.store.js\";\nimport \"../../../../hooks/stores/toast/toast.store.js\";\nimport \"../../../@shared/providers/ThemeProvider/ThemeProvider.js\";\nimport \"../../../@shared/providers/BreakpointProvider/BreakpointProvider.js\";\nimport \"../../../../hooks/stores/bottom-sheet/bottom-sheet.store.js\";\nimport { useDialog } from \"../../../../hooks/useDialog.js\";\nimport \"../../../../hooks/useFeatureFlag.js\";\nimport \"framer-motion\";\nimport \"../../../../utils/redirectLogin.js\";\nimport \"react/jsx-runtime\";\nimport \"../../../../utils/event-properties/source.js\";\nimport { subscriptionApi } from \"../../../../apis/subscription/SubscriptionApiService.js\";\nimport { useAgreementsModal } from \"../../../../hooks/useAgreementsModal.js\";\nimport { useRequestUserAgreementBottomSheet } from \"../../../../hooks/useRequestUserAgreementBottomSheet.js\";\nimport { AgreementType } from \"../../../../types/agreement.js\";\nimport { useIdentityVerificationModal } from \"../../../../hooks/useIdentityVerificationModal.js\";\nimport { entries } from \"../../../../utils/entries.js\";\nimport { useTrackViewComponentEvent } from \"../../../../hooks/events/useTrackViewComponentEvent.js\";\nconst useCreateRaffleAction = ({\n  raffleGroupId,\n  raffleId,\n  actionType,\n  ...rest\n}) => {\n  const dialog = useDialog();\n  const {\n    show: showIdentityVerificationModal,\n    hide: hideIdentityVerificationModal\n  } = useIdentityVerificationModal();\n  const {\n    show: showAgreementsModal,\n    hide: hideAgreementsModal\n  } = useAgreementsModal();\n  const {\n    requestUserAgreementBottomSheet\n  } = useRequestUserAgreementBottomSheet();\n  const {\n    trackViewComponentEvent\n  } = useTrackViewComponentEvent();\n  const withRaffleAction = (callback) => async (...args) => {\n    const handleCallback = () => {\n      callback(...args);\n    };\n    try {\n      if (actionType === \"notification\") {\n        const {\n          data\n        } = await raffleApi.getRaffleNotificationApplicable(raffleGroupId, raffleId);\n        handleNotification(data, handleCallback);\n      } else if (actionType === \"application\") {\n        const {\n          data\n        } = await raffleApi.getRaffleApplicable(raffleGroupId, raffleId);\n        handleApplication(data, handleCallback);\n      }\n    } catch (error) {\n      handleError(error);\n    }\n  };\n  const handleNotification = async (data, onSubscribe) => {\n    const subscribe = async () => {\n      try {\n        if (rest.eventKey) {\n          await subscriptionApi.subscribe([rest.eventKey]);\n        }\n        onSubscribe();\n      } catch (error) {\n        handleError(error);\n      }\n    };\n    const isAllAgreed = await checkAgreementsAndShowModal({\n      title: \"이벤트 알림을 받으려면 동의해주세요\",\n      description: \"이벤트에 대한 알림을 받으려면 마케팅 목적의 개인정보 수집 및 이용 동의가 필요해요.\",\n      primaryButtonText: \"동의 후 알림받기\",\n      agreementInformation: data.agreementInformation,\n      onSuccess: () => {\n        subscribe();\n      }\n    });\n    if (isAllAgreed) {\n      subscribe();\n    }\n  };\n  const {\n    trigger: raffleApply,\n    isMutating: isRaffleApplyMutating\n  } = useSWRMutation(\"raffle-apply\", (_, {\n    arg\n  }) => raffleApi.postRaffleApply(arg.raffleGroupId, arg.raffleId));\n  const handleApplication = async (data, onApply) => {\n    const apply = async () => {\n      if (isRaffleApplyMutating) {\n        return;\n      }\n      try {\n        await raffleApply({\n          raffleGroupId,\n          raffleId\n        });\n        onApply();\n      } catch (error) {\n        handleError(error);\n      }\n    };\n    const createSubscriptionAgreementsParams = () => {\n      var _a;\n      const hasRequiredAgreements = (_a = data.agreementInformation) == null ? void 0 : _a.some((agreement) => !agreement.isAgreed && agreement.agreementRequirement === RaffleAgreementRequirement.Required);\n      return {\n        title: data.popupTitle,\n        description: data.popupDescription,\n        primaryButtonText: hasRequiredAgreements ? \"동의 후 응모하기\" : \"응모하기\",\n        agreementInformation: data.agreementInformation,\n        onSuccess: () => {\n          apply();\n        }\n      };\n    };\n    if (data.hasCi === false) {\n      showIdentityVerificationModal({\n        onSuccess: async () => {\n          hideIdentityVerificationModal();\n          const isAllAgreed2 = await checkAgreementsAndShowModal(createSubscriptionAgreementsParams());\n          if (isAllAgreed2) {\n            apply();\n          }\n        },\n        onFail: handleError\n      });\n      return;\n    }\n    const isAllAgreed = await checkAgreementsAndShowModal(createSubscriptionAgreementsParams());\n    if (isAllAgreed) {\n      apply();\n    }\n  };\n  const checkAgreementsAndShowModal = async ({\n    title,\n    description,\n    primaryButtonText,\n    agreementInformation,\n    onSuccess\n  }) => {\n    const isAllAgreed = agreementInformation.every((agreement) => agreement.isAgreed);\n    if (!isAllAgreed) {\n      handleAgreementsModal({\n        title,\n        description,\n        primaryButtonText,\n        agreements: reshapeRaffleAgreements(agreementInformation),\n        onSuccess\n      });\n      return false;\n    }\n    return true;\n  };\n  const RAFFLE_AGREEMENT_TYPE_LIST = [AgreementType.Advertising, AgreementType.PersonalInformation, AgreementType.Privacy];\n  const {\n    trigger: raffleAgree,\n    isMutating: isRaffleAgreeMutating\n  } = useSWRMutation(\"raffle-agree\", (_, {\n    arg\n  }) => raffleApi.postRaffleGroupAgreementsAgree({\n    raffleGroupId: arg.raffleGroupId,\n    raffleId: arg.raffleId,\n    agreementTypes: arg.agreementTypes\n  }));\n  const handleAgreementsModal = ({\n    agreements = [],\n    onSuccess,\n    ...params\n  }) => {\n    const displayAgreeAllCheckBox = agreements.length === RAFFLE_AGREEMENT_TYPE_LIST.length;\n    showAgreementsModal({\n      ...params,\n      agreements,\n      displayAgreeAllCheckBox,\n      onSuccess: async (state) => {\n        const agreedAgreementTypes = getAgreedAgreementTypes(state);\n        if (agreedAgreementTypes.length > 0) {\n          if (isRaffleAgreeMutating) {\n            return;\n          }\n          await raffleAgree({\n            raffleGroupId,\n            raffleId,\n            agreementTypes: agreedAgreementTypes\n          });\n        }\n        hideAgreementsModal();\n        handleOSNotification(onSuccess);\n      },\n      onError: handleError\n    });\n  };\n  const handleOSNotification = (callback) => {\n    if (isWebview()) {\n      requestUserAgreementBottomSheet({\n        type: \"CONTENT_DETAIL_PAGE\",\n        onConfirm: callback,\n        onCancel: callback\n      });\n      return;\n    }\n    callback == null ? void 0 : callback();\n  };\n  const handleError = (error) => {\n    let errorMessage = GENERAL_ERROR;\n    if (error instanceof Error) {\n      errorMessage = error.message;\n    }\n    trackViewComponentEvent(\"raffle-alert-dialog\", {\n      message: errorMessage\n    });\n    dialog.show({\n      content: errorMessage\n    });\n  };\n  return withRaffleAction;\n};\nconst reshapeRaffleAgreements = (agreements) => agreements.filter((agreement) => !agreement.isAgreed).map((agreement) => ({\n  type: agreement.agreementType,\n  label: agreement.label,\n  isRequired: agreement.agreementRequirement === RaffleAgreementRequirement.Required,\n  detailLink: agreement.linkUrl\n}));\nconst getAgreedAgreementTypes = (state) => {\n  return entries(state).reduce((acc, [key, value]) => {\n    if (value) {\n      acc.push(key);\n    }\n    return acc;\n  }, []);\n};\nexport {\n  useCreateRaffleAction\n};\n","import { jsxs, jsx } from \"react/jsx-runtime\";\nimport { QRCodeSVG } from \"../../../../node_modules/qrcode.react/lib/esm/index.js\";\nimport { typography } from \"../../../../styles/typography.js\";\nconst AppQRCodeDialogContent = ({\n  oneLink\n}) => {\n  return /* @__PURE__ */ jsxs(\"div\", { style: appQRCodeContainerStyle, children: [\n    /* @__PURE__ */ jsx(\"div\", { style: appQRCodeWrapperStyle, children: /* @__PURE__ */ jsx(QRCodeSVG, { value: oneLink, size: 150, bgColor: \"#ffffff\", fgColor: \"#000000\", includeMargin: false }) }),\n    /* @__PURE__ */ jsxs(\"p\", { style: descriptionStyle, children: [\n      \"앱 설치하면 더 정확한 소식을 받을 수 있어요.\",\n      /* @__PURE__ */ jsx(\"br\", {}),\n      \"카메라 앱을 열어 QR 코드를 비춰보세요.\"\n    ] })\n  ] });\n};\nconst descriptionStyle = {\n  /* text-l-medium */\n  ...typography(14, 500, 1.4),\n  textAlign: \"center\"\n};\nconst appQRCodeContainerStyle = {\n  display: \"flex\",\n  flexDirection: \"column\",\n  justifyContent: \"center\",\n  alignItems: \"center\",\n  gap: 12,\n  paddingTop: 36,\n  paddingBottom: 16,\n  minWidth: 420,\n  borderRadius: 8,\n  backgroundColor: \"#000000\",\n  color: \"#ffffff\"\n};\nconst appQRCodeWrapperStyle = {\n  padding: 4,\n  borderRadius: 8,\n  backgroundColor: \"#ffffff\"\n};\nexport {\n  AppQRCodeDialogContent\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { useCreateOneLink } from \"../../../../hooks/useCreateOneLink.js\";\nimport { useIsMobileDevice } from \"../../../../hooks/useIsMobileDevice.js\";\nimport { getCurrentHref } from \"../../../../utils/getCurrentHref.js\";\nimport { AppQRCodeDialogContent } from \"./AppQRCodeDialog.js\";\nimport \"react\";\nimport \"../../../../node_modules/@firebase/analytics/dist/esm/index.esm2017.js\";\nimport \"../../../../node_modules/firebase/app/dist/esm/index.esm.js\";\nimport \"../../../../node_modules/swr/core/dist/index.js\";\nimport \"../../../../apis/user-segment/CategoryFirstOrderApiService.js\";\nimport \"../../../../config/index.js\";\nimport \"../../../../node_modules/js-cookie/dist/js.cookie.js\";\nimport \"../../../../apis/highlight-products/HighlightProductsApiService.js\";\nimport \"../../../../apis/brand-mix/BrandMixApiService.js\";\nimport \"../../../../apis/one-brand-days/OneBrandDaysApiService.js\";\nimport \"../../../../apis/taste-sharing/TasteSharingApiService.js\";\nimport \"../../../../apis/user/UserApiService.js\";\nimport \"../../../../apis/preuser/PreuserApiService.js\";\nimport \"../../../../node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.js\";\nimport \"framer\";\nimport \"../../../../node_modules/@29cm/snowplow/dist/esm/core/snowplow.js\";\nimport \"../../../../node_modules/swr/mutation/dist/index.js\";\nimport \"../../../../hooks/stores/content/content.store.js\";\nimport \"../../../../hooks/stores/dialog/dialog.store.js\";\nimport \"../../../../hooks/stores/global-layout/global-layout.store.js\";\nimport \"../../../../hooks/stores/toast/toast.store.js\";\nimport \"../../providers/ThemeProvider/ThemeProvider.js\";\nimport \"../../providers/BreakpointProvider/BreakpointProvider.js\";\nimport \"../../../../hooks/stores/bottom-sheet/bottom-sheet.store.js\";\nimport \"react-dom\";\nimport \"../../../systems/Dialog/Dialog.module.css.js\";\nimport \"framer-motion\";\nimport \"../../../../containers/DialogContainer/DialogContainer.emitter.js\";\nimport \"../../../../hooks/useFeatureFlag.js\";\nimport \"../../../../utils/redirectLogin.js\";\nimport { alertDialog } from \"../../../../containers/AlertDialogContainer/AlertDialogContainer.js\";\nimport \"../../../../utils/event-properties/source.js\";\nimport { useIsWebview } from \"../../../../hooks/useIsWebview.js\";\nimport { ui } from \"../../../../containers/UIContainer/ui.js\";\nconst DIALOG_ID = \"app-qr-code-dialog-id\";\nconst useAppQRCodeDialog = ({\n  webviewNavOptions,\n  href\n} = {}) => {\n  const isMobile = useIsMobileDevice();\n  const isWebview = useIsWebview();\n  const shouldRenderAlertDialog = isMobile || isWebview;\n  const {\n    oneLink\n  } = useCreateOneLink(href ?? getCurrentHref({\n    removeQueryParams: true\n  }), webviewNavOptions);\n  const show = ({\n    title,\n    description,\n    onConfirm\n  }) => {\n    const handleConfirm = () => {\n      onConfirm == null ? void 0 : onConfirm();\n      hide();\n    };\n    if (shouldRenderAlertDialog) {\n      alertDialog.show({\n        id: DIALOG_ID,\n        title,\n        description,\n        primaryAction: {\n          label: \"확인\",\n          onClick: handleConfirm\n        }\n      });\n      return;\n    }\n    ui.showDialog({\n      title,\n      description,\n      children: /* @__PURE__ */ jsx(AppQRCodeDialogContent, { oneLink }),\n      primaryAction: {\n        label: \"확인\",\n        onClick: handleConfirm\n      }\n    }, {\n      id: DIALOG_ID\n    });\n  };\n  const hide = () => {\n    if (shouldRenderAlertDialog) {\n      alertDialog.hide(DIALOG_ID);\n      return;\n    }\n    ui.hide(DIALOG_ID);\n  };\n  return {\n    show,\n    hide\n  };\n};\nexport {\n  useAppQRCodeDialog\n};\n","import { useAnalytics } from \"../../../../hooks/analytics/useAnalytics.js\";\nimport \"../../../../node_modules/swr/core/dist/index.js\";\nimport \"../../../../apis/user-segment/CategoryFirstOrderApiService.js\";\nimport \"../../../../config/index.js\";\nimport \"../../../../node_modules/js-cookie/dist/js.cookie.js\";\nimport \"../../../../apis/highlight-products/HighlightProductsApiService.js\";\nimport \"../../../../apis/brand-mix/BrandMixApiService.js\";\nimport \"../../../../apis/one-brand-days/OneBrandDaysApiService.js\";\nimport \"../../../../apis/taste-sharing/TasteSharingApiService.js\";\nimport \"react\";\nimport \"../../../../apis/user/UserApiService.js\";\nimport \"../../../../apis/preuser/PreuserApiService.js\";\nimport \"../../../../node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.js\";\nimport \"../../../../node_modules/swr/mutation/dist/index.js\";\nimport \"../../../../hooks/stores/content/content.store.js\";\nimport \"../../../../hooks/stores/dialog/dialog.store.js\";\nimport \"../../../../hooks/stores/global-layout/global-layout.store.js\";\nimport \"../../../../hooks/stores/toast/toast.store.js\";\nimport \"../../../@shared/providers/ThemeProvider/ThemeProvider.js\";\nimport \"../../../@shared/providers/BreakpointProvider/BreakpointProvider.js\";\nimport \"../../../../hooks/stores/bottom-sheet/bottom-sheet.store.js\";\nimport \"react/jsx-runtime\";\nimport \"react-dom\";\nimport \"../../Dialog/Dialog.module.css.js\";\nimport \"framer-motion\";\nimport \"../../../../containers/DialogContainer/DialogContainer.emitter.js\";\nimport \"../../../../hooks/useFeatureFlag.js\";\nimport \"../../../../utils/redirectLogin.js\";\nimport \"../../../../utils/event-properties/source.js\";\nimport \"framer\";\nimport { useTrackSnowplowEvent } from \"../../../../hooks/snowplow/useTrackSnowplowEvent.js\";\nimport { trackRaffleClickBraze } from \"../../../../utils/analytics/braze/trackRaffleClickBraze.js\";\nconst useTrackRaffleActionEvent = () => {\n  const {\n    trackAmplitude\n  } = useAnalytics();\n  const trackSnowplowEvent = useTrackSnowplowEvent();\n  const trackClickCompeteButton = (raffleId) => {\n    trackAmplitude(\"click_button\", {\n      button_type: \"raffle\",\n      button_type_detail: raffleId\n    });\n  };\n  const trackClickRaffleButton = ({\n    buttonName,\n    componentId,\n    raffleId\n  }) => {\n    trackSnowplowEvent(\"click_button\", {\n      // TODO(한지원): section_name, position, layout_position 프로퍼티에 할당한 약속된 임의 값 수정\n      section_name: componentId,\n      section_title: componentId,\n      position: -1,\n      layout_position: -1,\n      button_id: `raffle_${raffleId}`,\n      button_name: buttonName\n    });\n    trackRaffleClickBraze(raffleId, buttonName);\n  };\n  return {\n    trackClickCompeteButton,\n    trackClickRaffleButton\n  };\n};\nexport {\n  useTrackRaffleActionEvent\n};\n","import { RaffleStatus } from \"../RaffleButton.types.js\";\nimport \"react\";\nimport \"../../../../node_modules/@firebase/analytics/dist/esm/index.esm2017.js\";\nimport \"../../../../node_modules/firebase/app/dist/esm/index.esm.js\";\nimport \"../../../../node_modules/swr/core/dist/index.js\";\nimport \"../../../../apis/user-segment/CategoryFirstOrderApiService.js\";\nimport \"../../../../config/index.js\";\nimport \"../../../../node_modules/js-cookie/dist/js.cookie.js\";\nimport \"../../../../apis/highlight-products/HighlightProductsApiService.js\";\nimport \"../../../../apis/brand-mix/BrandMixApiService.js\";\nimport \"../../../../apis/one-brand-days/OneBrandDaysApiService.js\";\nimport \"../../../../apis/taste-sharing/TasteSharingApiService.js\";\nimport \"../../../../apis/user/UserApiService.js\";\nimport \"../../../../apis/preuser/PreuserApiService.js\";\nimport \"../../../../node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.js\";\nimport \"framer\";\nimport \"../../../../node_modules/@29cm/snowplow/dist/esm/core/snowplow.js\";\nimport \"../../../../node_modules/swr/mutation/dist/index.js\";\nimport \"../../../../hooks/stores/content/content.store.js\";\nimport \"../../../../hooks/stores/dialog/dialog.store.js\";\nimport \"../../../../hooks/stores/global-layout/global-layout.store.js\";\nimport \"../../../../hooks/stores/toast/toast.store.js\";\nimport \"../../../@shared/providers/ThemeProvider/ThemeProvider.js\";\nimport \"../../../@shared/providers/BreakpointProvider/BreakpointProvider.js\";\nimport \"../../../../hooks/stores/bottom-sheet/bottom-sheet.store.js\";\nimport \"react/jsx-runtime\";\nimport \"react-dom\";\nimport \"../../Dialog/Dialog.module.css.js\";\nimport \"framer-motion\";\nimport \"../../../../containers/DialogContainer/DialogContainer.emitter.js\";\nimport \"../../../../hooks/useFeatureFlag.js\";\nimport \"../../../../utils/redirectLogin.js\";\nimport \"../../../../utils/event-properties/source.js\";\nimport { useWithLogin } from \"../../../../hooks/useWithLogin.js\";\nimport { useCreateRaffleAction } from \"./useCreateRaffleAction.js\";\nimport { useAppQRCodeDialog } from \"../../../@shared/dialogs/AppQRCodeDialog/AppQRCodeDialog.hooks.js\";\nimport { useTrackRaffleActionEvent } from \"./useTrackRaffleEvent.js\";\nconst DIALOG_MESSAGES = {\n  TITLE: {\n    UPCOMING: \"이벤트가 시작되면 알려드릴게요\",\n    COMPLETED: \"이벤트 참여가 완료되었어요\"\n  },\n  DESCRIPTION: {\n    UPCOMING: \"회원정보에 입력된 정보로 안내드려요.\",\n    COMPLETED: \"당첨 시 회원 정보에 입력된 연락처로 안내드려요.\"\n  }\n};\nconst useRaffleActions = ({\n  raffleGroupId,\n  raffleId,\n  raffle,\n  status,\n  onSuccess\n}) => {\n  const withLogin = useWithLogin();\n  const withRaffleNotification = useCreateRaffleAction({\n    raffleGroupId,\n    raffleId,\n    actionType: \"notification\",\n    eventKey: (raffle == null ? void 0 : raffle.notificationKey) ?? void 0\n  });\n  const withRaffleApplication = useCreateRaffleAction({\n    raffleGroupId,\n    raffleId,\n    actionType: \"application\"\n  });\n  const {\n    show: showAppQRCodeDialog\n  } = useAppQRCodeDialog();\n  const {\n    trackClickCompeteButton,\n    trackClickRaffleButton\n  } = useTrackRaffleActionEvent();\n  const handleDialogConfirm = () => {\n    trackClickCompeteButton(raffleId);\n  };\n  const isPendingStatus = status === RaffleStatus.Pending;\n  const handleSuccess = () => {\n    onSuccess();\n    showAppQRCodeDialog({\n      title: getAppQRCodeDialogTitle(status),\n      description: getAppQRCodeDialogDescription(status),\n      onConfirm: handleDialogConfirm\n    });\n  };\n  const raffleHandler = isPendingStatus ? withRaffleNotification : withRaffleApplication;\n  const handleClick = ({\n    componentId,\n    buttonText\n  }) => () => {\n    if (status === RaffleStatus.Unknown || status === RaffleStatus.Finished) {\n      return;\n    }\n    trackClickRaffleButton({\n      buttonName: buttonText,\n      componentId,\n      raffleId\n    });\n    withLogin(raffleHandler(handleSuccess))();\n  };\n  return {\n    handleClick\n  };\n};\nconst getAppQRCodeDialogTitle = (status) => {\n  switch (status) {\n    case RaffleStatus.Pending:\n      return DIALOG_MESSAGES.TITLE.UPCOMING;\n    default:\n      return DIALOG_MESSAGES.TITLE.COMPLETED;\n  }\n};\nconst getAppQRCodeDialogDescription = (status) => {\n  switch (status) {\n    case RaffleStatus.Pending:\n      return DIALOG_MESSAGES.DESCRIPTION.UPCOMING;\n    default:\n      return DIALOG_MESSAGES.DESCRIPTION.COMPLETED;\n  }\n};\nexport {\n  useRaffleActions\n};\n","import { RaffleStatus } from \"./RaffleButton.types.js\";\nconst getCurrentRaffle = (raffles, raffleId) => raffles.find((raffle) => `${raffle.raffleId}` === raffleId);\nconst reshapeRaffleButtonProps = ({\n  props,\n  raffle,\n  status,\n  displayInformation\n}) => {\n  const buttonText = getRaffleButtonText({\n    raffle,\n    status,\n    displayInformation\n  });\n  const disabled = isRaffleButtonDisabled({\n    raffle,\n    status,\n    displayInformation\n  });\n  const iconProps = getRaffleButtonIconProps({\n    raffle,\n    status,\n    disabled\n  });\n  if (!disabled) {\n    return {\n      buttonText,\n      disabled,\n      ...props,\n      ...iconProps\n    };\n  }\n  return {\n    buttonText,\n    disabled,\n    ...props,\n    ...iconProps,\n    variant: \"disabled\"\n  };\n};\nconst fallbackRaffleButtonText = \" \";\nconst getRaffleButtonText = ({\n  status,\n  raffle,\n  displayInformation\n}) => {\n  if (!raffle) {\n    return fallbackRaffleButtonText;\n  }\n  switch (true) {\n    case (status === RaffleStatus.Pending && (displayInformation == null ? void 0 : displayInformation.isNotificationApplied)):\n      return \"사전 알림 신청 완료\";\n    case (status === RaffleStatus.InProgress && (displayInformation == null ? void 0 : displayInformation.isRaffleApplied)):\n      return \"이벤트 참여 완료\";\n    default:\n      return getRaffleButtonTextByStatus(raffle, status);\n  }\n};\nconst getRaffleButtonTextByStatus = (raffle, status) => {\n  switch (status) {\n    case RaffleStatus.Pending:\n      return raffle.pendingButtonText;\n    case RaffleStatus.InProgress:\n      return raffle.inProgressButtonText;\n    case RaffleStatus.Finished:\n      return raffle.finishedButtonText;\n    default:\n      return fallbackRaffleButtonText;\n  }\n};\nconst isRaffleButtonDisabled = ({\n  status,\n  raffle,\n  displayInformation\n}) => {\n  switch (true) {\n    case status === RaffleStatus.Finished:\n    case (status === RaffleStatus.Pending && (raffle == null ? void 0 : raffle.isNotificationAvailable) === false):\n    case (status === RaffleStatus.Pending && (displayInformation == null ? void 0 : displayInformation.isNotificationApplied) === true):\n    case (status === RaffleStatus.InProgress && (displayInformation == null ? void 0 : displayInformation.isRaffleApplied) === true):\n      return true;\n    default:\n      return false;\n  }\n};\nconst getRaffleButtonIconProps = ({\n  status,\n  raffle,\n  disabled\n}) => {\n  switch (true) {\n    case (status === RaffleStatus.Pending && (raffle == null ? void 0 : raffle.isNotificationAvailable) === false):\n      return {\n        prefixIcon: \"lock\"\n      };\n    case (status === RaffleStatus.Pending && !disabled):\n      return {\n        prefixIcon: \"bell\"\n      };\n    default:\n      return {};\n  }\n};\nexport {\n  getCurrentRaffle,\n  getRaffleButtonText,\n  isRaffleButtonDisabled,\n  reshapeRaffleButtonProps\n};\n","import { jsx } from \"react/jsx-runtime\";\nconst IMAGE = \"https://img.29cm.co.kr/cms/202510/11f0a89fd0241fa2a918a574503622b1.png?format=webp\";\nconst containerStyle = {\n  width: \"100%\",\n  background: \"#E5E4E6\",\n  display: \"flex\",\n  justifyContent: \"center\"\n};\nconst imageStyle = {\n  width: 335,\n  height: 200\n};\nconst NudgeModalContent = () => /* @__PURE__ */ jsx(\"div\", { style: containerStyle, children: /* @__PURE__ */ jsx(\"img\", { style: imageStyle, src: IMAGE, alt: \"29CM와 무신사 계정 통합 안내\" }) });\nexport {\n  NudgeModalContent\n};\n","import { toDate } from \"./toDate.js\";\nfunction endOfDay(date) {\n  const _date = toDate(date);\n  _date.setHours(23, 59, 59, 999);\n  return _date;\n}\nexport {\n  endOfDay as default,\n  endOfDay\n};\n","import { Cookies } from \"../cookies.js\";\nimport { endOfDay } from \"../../node_modules/date-fns/endOfDay.js\";\nimport { addDays } from \"../../node_modules/date-fns/addDays.js\";\nconst RAFFLE_MSS_ONE_NUDGE_HIDE_COOKIE_KEY = \"raffle_mss_one_nudge_hidden\";\nconst COOKIE_OPTIONS = {\n  domain: \".29cm.co.kr\",\n  path: \"/\",\n  secure: true\n};\nconst MSS_ONE_NUDGE_DISMISSED_DAYS = 7;\nconst hideRaffleMssOneNudgeFor7Days = () => {\n  const cookies = new Cookies();\n  const hideUntil = endOfDay(addDays(/* @__PURE__ */ new Date(), MSS_ONE_NUDGE_DISMISSED_DAYS));\n  cookies.set(RAFFLE_MSS_ONE_NUDGE_HIDE_COOKIE_KEY, hideUntil.toISOString(), {\n    ...COOKIE_OPTIONS,\n    expires: hideUntil\n  });\n};\nconst isRaffleMssOneNudgeHidden = () => {\n  const cookies = new Cookies();\n  const hiddenUntil = cookies.get(RAFFLE_MSS_ONE_NUDGE_HIDE_COOKIE_KEY);\n  if (!hiddenUntil) {\n    return false;\n  }\n  try {\n    const hideUntilDate = new Date(hiddenUntil);\n    const now = /* @__PURE__ */ new Date();\n    if (now < hideUntilDate) {\n      return true;\n    }\n    cookies.remove(RAFFLE_MSS_ONE_NUDGE_HIDE_COOKIE_KEY, COOKIE_OPTIONS);\n    return false;\n  } catch {\n    cookies.remove(RAFFLE_MSS_ONE_NUDGE_HIDE_COOKIE_KEY, COOKIE_OPTIONS);\n    return false;\n  }\n};\nconst clearRaffleMSSOneNudgeHidden = () => {\n  const cookies = new Cookies();\n  cookies.remove(RAFFLE_MSS_ONE_NUDGE_HIDE_COOKIE_KEY, COOKIE_OPTIONS);\n};\nexport {\n  clearRaffleMSSOneNudgeHidden,\n  hideRaffleMssOneNudgeFor7Days,\n  isRaffleMssOneNudgeHidden\n};\n","function isPromise(obj) {\n  return obj && typeof obj.then === \"function\";\n}\nPromise.resolve(false);\nPromise.resolve(true);\nvar PROMISE_RESOLVED_VOID = Promise.resolve();\nfunction sleep(time, resolveWith) {\n  if (!time)\n    time = 0;\n  return new Promise(function(res) {\n    return setTimeout(function() {\n      return res(resolveWith);\n    }, time);\n  });\n}\nfunction randomInt(min, max) {\n  return Math.floor(Math.random() * (max - min + 1) + min);\n}\nfunction randomToken() {\n  return Math.random().toString(36).substring(2);\n}\nvar lastMs = 0;\nfunction microSeconds() {\n  var ret = Date.now() * 1e3;\n  if (ret <= lastMs) {\n    ret = lastMs + 1;\n  }\n  lastMs = ret;\n  return ret;\n}\nexport {\n  PROMISE_RESOLVED_VOID,\n  isPromise,\n  microSeconds,\n  randomInt,\n  randomToken,\n  sleep\n};\n","import { microSeconds as microSeconds$1, PROMISE_RESOLVED_VOID } from \"../util.js\";\nvar microSeconds = microSeconds$1;\nvar type = \"native\";\nfunction create(channelName) {\n  var state = {\n    time: microSeconds$1(),\n    messagesCallback: null,\n    bc: new BroadcastChannel(channelName),\n    subFns: []\n    // subscriberFunctions\n  };\n  state.bc.onmessage = function(msgEvent) {\n    if (state.messagesCallback) {\n      state.messagesCallback(msgEvent.data);\n    }\n  };\n  return state;\n}\nfunction close(channelState) {\n  channelState.bc.close();\n  channelState.subFns = [];\n}\nfunction postMessage(channelState, messageJson) {\n  try {\n    channelState.bc.postMessage(messageJson, false);\n    return PROMISE_RESOLVED_VOID;\n  } catch (err) {\n    return Promise.reject(err);\n  }\n}\nfunction onMessage(channelState, fn) {\n  channelState.messagesCallback = fn;\n}\nfunction canBeUsed() {\n  if (typeof globalThis !== \"undefined\" && globalThis.Deno && globalThis.Deno.args) {\n    return true;\n  }\n  if ((typeof window !== \"undefined\" || typeof self !== \"undefined\") && typeof BroadcastChannel === \"function\") {\n    if (BroadcastChannel._pubkey) {\n      throw new Error(\"BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill\");\n    }\n    return true;\n  } else {\n    return false;\n  }\n}\nfunction averageResponseTime() {\n  return 150;\n}\nvar NativeMethod = {\n  create,\n  close,\n  onMessage,\n  postMessage,\n  canBeUsed,\n  type,\n  averageResponseTime,\n  microSeconds\n};\nexport {\n  NativeMethod,\n  averageResponseTime,\n  canBeUsed,\n  close,\n  create,\n  microSeconds,\n  onMessage,\n  postMessage,\n  type\n};\n","var __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => {\n  __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n  return value;\n};\nclass ObliviousSet {\n  constructor(ttl) {\n    __publicField(this, \"ttl\");\n    __publicField(this, \"map\", /* @__PURE__ */ new Map());\n    /**\n     * Creating calls to setTimeout() is expensive,\n     * so we only do that if there is not timeout already open.\n     */\n    __publicField(this, \"_to\", false);\n    this.ttl = ttl;\n  }\n  has(value) {\n    return this.map.has(value);\n  }\n  add(value) {\n    this.map.set(value, now());\n    if (!this._to) {\n      this._to = true;\n      setTimeout(() => {\n        this._to = false;\n        removeTooOldValues(this);\n      }, 0);\n    }\n  }\n  clear() {\n    this.map.clear();\n  }\n}\nfunction removeTooOldValues(obliviousSet) {\n  const olderThen = now() - obliviousSet.ttl;\n  const iterator = obliviousSet.map[Symbol.iterator]();\n  while (true) {\n    const next = iterator.next().value;\n    if (!next) {\n      return;\n    }\n    const value = next[0];\n    const time = next[1];\n    if (time < olderThen) {\n      obliviousSet.map.delete(value);\n    } else {\n      return;\n    }\n  }\n}\nfunction now() {\n  return Date.now();\n}\nexport {\n  ObliviousSet,\n  now,\n  removeTooOldValues\n};\n","function fillOptionsWithDefaults() {\n  var originalOptions = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n  var options = JSON.parse(JSON.stringify(originalOptions));\n  if (typeof options.webWorkerSupport === \"undefined\")\n    options.webWorkerSupport = true;\n  if (!options.idb)\n    options.idb = {};\n  if (!options.idb.ttl)\n    options.idb.ttl = 1e3 * 45;\n  if (!options.idb.fallbackInterval)\n    options.idb.fallbackInterval = 150;\n  if (originalOptions.idb && typeof originalOptions.idb.onclose === \"function\")\n    options.idb.onclose = originalOptions.idb.onclose;\n  if (!options.localstorage)\n    options.localstorage = {};\n  if (!options.localstorage.removeTimeout)\n    options.localstorage.removeTimeout = 1e3 * 60;\n  if (originalOptions.methods)\n    options.methods = originalOptions.methods;\n  if (!options.node)\n    options.node = {};\n  if (!options.node.ttl)\n    options.node.ttl = 1e3 * 60 * 2;\n  if (!options.node.maxParallelWrites)\n    options.node.maxParallelWrites = 2048;\n  if (typeof options.node.useFastPath === \"undefined\")\n    options.node.useFastPath = true;\n  return options;\n}\nexport {\n  fillOptionsWithDefaults\n};\n","import { microSeconds as microSeconds$1, randomToken, PROMISE_RESOLVED_VOID, sleep, randomInt } from \"../util.js\";\nimport { ObliviousSet } from \"../../../../oblivious-set/dist/esm/src/index.js\";\nimport { fillOptionsWithDefaults } from \"../options.js\";\nvar microSeconds = microSeconds$1;\nvar DB_PREFIX = \"pubkey.broadcast-channel-0-\";\nvar OBJECT_STORE_ID = \"messages\";\nvar TRANSACTION_SETTINGS = {\n  durability: \"relaxed\"\n};\nvar type = \"idb\";\nfunction getIdb() {\n  if (typeof indexedDB !== \"undefined\")\n    return indexedDB;\n  if (typeof window !== \"undefined\") {\n    if (typeof window.mozIndexedDB !== \"undefined\")\n      return window.mozIndexedDB;\n    if (typeof window.webkitIndexedDB !== \"undefined\")\n      return window.webkitIndexedDB;\n    if (typeof window.msIndexedDB !== \"undefined\")\n      return window.msIndexedDB;\n  }\n  return false;\n}\nfunction commitIndexedDBTransaction(tx) {\n  if (tx.commit) {\n    tx.commit();\n  }\n}\nfunction createDatabase(channelName) {\n  var IndexedDB = getIdb();\n  var dbName = DB_PREFIX + channelName;\n  var openRequest = IndexedDB.open(dbName);\n  openRequest.onupgradeneeded = function(ev) {\n    var db = ev.target.result;\n    db.createObjectStore(OBJECT_STORE_ID, {\n      keyPath: \"id\",\n      autoIncrement: true\n    });\n  };\n  return new Promise(function(res, rej) {\n    openRequest.onerror = function(ev) {\n      return rej(ev);\n    };\n    openRequest.onsuccess = function() {\n      res(openRequest.result);\n    };\n  });\n}\nfunction writeMessage(db, readerUuid, messageJson) {\n  var time = Date.now();\n  var writeObject = {\n    uuid: readerUuid,\n    time,\n    data: messageJson\n  };\n  var tx = db.transaction([OBJECT_STORE_ID], \"readwrite\", TRANSACTION_SETTINGS);\n  return new Promise(function(res, rej) {\n    tx.oncomplete = function() {\n      return res();\n    };\n    tx.onerror = function(ev) {\n      return rej(ev);\n    };\n    var objectStore = tx.objectStore(OBJECT_STORE_ID);\n    objectStore.add(writeObject);\n    commitIndexedDBTransaction(tx);\n  });\n}\nfunction getMessagesHigherThan(db, lastCursorId) {\n  var tx = db.transaction(OBJECT_STORE_ID, \"readonly\", TRANSACTION_SETTINGS);\n  var objectStore = tx.objectStore(OBJECT_STORE_ID);\n  var ret = [];\n  var keyRangeValue = IDBKeyRange.bound(lastCursorId + 1, Infinity);\n  if (objectStore.getAll) {\n    var getAllRequest = objectStore.getAll(keyRangeValue);\n    return new Promise(function(res, rej) {\n      getAllRequest.onerror = function(err) {\n        return rej(err);\n      };\n      getAllRequest.onsuccess = function(e) {\n        res(e.target.result);\n      };\n    });\n  }\n  function openCursor() {\n    try {\n      keyRangeValue = IDBKeyRange.bound(lastCursorId + 1, Infinity);\n      return objectStore.openCursor(keyRangeValue);\n    } catch (e) {\n      return objectStore.openCursor();\n    }\n  }\n  return new Promise(function(res, rej) {\n    var openCursorRequest = openCursor();\n    openCursorRequest.onerror = function(err) {\n      return rej(err);\n    };\n    openCursorRequest.onsuccess = function(ev) {\n      var cursor = ev.target.result;\n      if (cursor) {\n        if (cursor.value.id < lastCursorId + 1) {\n          cursor[\"continue\"](lastCursorId + 1);\n        } else {\n          ret.push(cursor.value);\n          cursor[\"continue\"]();\n        }\n      } else {\n        commitIndexedDBTransaction(tx);\n        res(ret);\n      }\n    };\n  });\n}\nfunction removeMessagesById(channelState, ids) {\n  if (channelState.closed) {\n    return Promise.resolve([]);\n  }\n  var tx = channelState.db.transaction(OBJECT_STORE_ID, \"readwrite\", TRANSACTION_SETTINGS);\n  var objectStore = tx.objectStore(OBJECT_STORE_ID);\n  return Promise.all(ids.map(function(id) {\n    var deleteRequest = objectStore[\"delete\"](id);\n    return new Promise(function(res) {\n      deleteRequest.onsuccess = function() {\n        return res();\n      };\n    });\n  }));\n}\nfunction getOldMessages(db, ttl) {\n  var olderThen = Date.now() - ttl;\n  var tx = db.transaction(OBJECT_STORE_ID, \"readonly\", TRANSACTION_SETTINGS);\n  var objectStore = tx.objectStore(OBJECT_STORE_ID);\n  var ret = [];\n  return new Promise(function(res) {\n    objectStore.openCursor().onsuccess = function(ev) {\n      var cursor = ev.target.result;\n      if (cursor) {\n        var msgObk = cursor.value;\n        if (msgObk.time < olderThen) {\n          ret.push(msgObk);\n          cursor[\"continue\"]();\n        } else {\n          commitIndexedDBTransaction(tx);\n          res(ret);\n        }\n      } else {\n        res(ret);\n      }\n    };\n  });\n}\nfunction cleanOldMessages(channelState) {\n  return getOldMessages(channelState.db, channelState.options.idb.ttl).then(function(tooOld) {\n    return removeMessagesById(channelState, tooOld.map(function(msg) {\n      return msg.id;\n    }));\n  });\n}\nfunction create(channelName, options) {\n  options = fillOptionsWithDefaults(options);\n  return createDatabase(channelName).then(function(db) {\n    var state = {\n      closed: false,\n      lastCursorId: 0,\n      channelName,\n      options,\n      uuid: randomToken(),\n      /**\n       * emittedMessagesIds\n       * contains all messages that have been emitted before\n       * @type {ObliviousSet}\n       */\n      eMIs: new ObliviousSet(options.idb.ttl * 2),\n      // ensures we do not read messages in parallel\n      writeBlockPromise: PROMISE_RESOLVED_VOID,\n      messagesCallback: null,\n      readQueuePromises: [],\n      db\n    };\n    db.onclose = function() {\n      state.closed = true;\n      if (options.idb.onclose)\n        options.idb.onclose();\n    };\n    _readLoop(state);\n    return state;\n  });\n}\nfunction _readLoop(state) {\n  if (state.closed)\n    return;\n  readNewMessages(state).then(function() {\n    return sleep(state.options.idb.fallbackInterval);\n  }).then(function() {\n    return _readLoop(state);\n  });\n}\nfunction _filterMessage(msgObj, state) {\n  if (msgObj.uuid === state.uuid)\n    return false;\n  if (state.eMIs.has(msgObj.id))\n    return false;\n  if (msgObj.data.time < state.messagesCallbackTime)\n    return false;\n  return true;\n}\nfunction readNewMessages(state) {\n  if (state.closed)\n    return PROMISE_RESOLVED_VOID;\n  if (!state.messagesCallback)\n    return PROMISE_RESOLVED_VOID;\n  return getMessagesHigherThan(state.db, state.lastCursorId).then(function(newerMessages) {\n    var useMessages = newerMessages.filter(function(msgObj) {\n      return !!msgObj;\n    }).map(function(msgObj) {\n      if (msgObj.id > state.lastCursorId) {\n        state.lastCursorId = msgObj.id;\n      }\n      return msgObj;\n    }).filter(function(msgObj) {\n      return _filterMessage(msgObj, state);\n    }).sort(function(msgObjA, msgObjB) {\n      return msgObjA.time - msgObjB.time;\n    });\n    useMessages.forEach(function(msgObj) {\n      if (state.messagesCallback) {\n        state.eMIs.add(msgObj.id);\n        state.messagesCallback(msgObj.data);\n      }\n    });\n    return PROMISE_RESOLVED_VOID;\n  });\n}\nfunction close(channelState) {\n  channelState.closed = true;\n  channelState.db.close();\n}\nfunction postMessage(channelState, messageJson) {\n  channelState.writeBlockPromise = channelState.writeBlockPromise.then(function() {\n    return writeMessage(channelState.db, channelState.uuid, messageJson);\n  }).then(function() {\n    if (randomInt(0, 10) === 0) {\n      cleanOldMessages(channelState);\n    }\n  });\n  return channelState.writeBlockPromise;\n}\nfunction onMessage(channelState, fn, time) {\n  channelState.messagesCallbackTime = time;\n  channelState.messagesCallback = fn;\n  readNewMessages(channelState);\n}\nfunction canBeUsed() {\n  return !!getIdb();\n}\nfunction averageResponseTime(options) {\n  return options.idb.fallbackInterval * 2;\n}\nvar IndexedDBMethod = {\n  create,\n  close,\n  onMessage,\n  postMessage,\n  canBeUsed,\n  type,\n  averageResponseTime,\n  microSeconds\n};\nexport {\n  IndexedDBMethod,\n  TRANSACTION_SETTINGS,\n  averageResponseTime,\n  canBeUsed,\n  cleanOldMessages,\n  close,\n  commitIndexedDBTransaction,\n  create,\n  createDatabase,\n  getIdb,\n  getMessagesHigherThan,\n  getOldMessages,\n  microSeconds,\n  onMessage,\n  postMessage,\n  removeMessagesById,\n  type,\n  writeMessage\n};\n","import { ObliviousSet } from \"../../../../oblivious-set/dist/esm/src/index.js\";\nimport { fillOptionsWithDefaults } from \"../options.js\";\nimport { microSeconds as microSeconds$1, sleep, randomToken } from \"../util.js\";\nvar microSeconds = microSeconds$1;\nvar KEY_PREFIX = \"pubkey.broadcastChannel-\";\nvar type = \"localstorage\";\nfunction getLocalStorage() {\n  var localStorage;\n  if (typeof window === \"undefined\")\n    return null;\n  try {\n    localStorage = window.localStorage;\n    localStorage = window[\"ie8-eventlistener/storage\"] || window.localStorage;\n  } catch (e) {\n  }\n  return localStorage;\n}\nfunction storageKey(channelName) {\n  return KEY_PREFIX + channelName;\n}\nfunction postMessage(channelState, messageJson) {\n  return new Promise(function(res) {\n    sleep().then(function() {\n      var key = storageKey(channelState.channelName);\n      var writeObj = {\n        token: randomToken(),\n        time: Date.now(),\n        data: messageJson,\n        uuid: channelState.uuid\n      };\n      var value = JSON.stringify(writeObj);\n      getLocalStorage().setItem(key, value);\n      var ev = document.createEvent(\"Event\");\n      ev.initEvent(\"storage\", true, true);\n      ev.key = key;\n      ev.newValue = value;\n      window.dispatchEvent(ev);\n      res();\n    });\n  });\n}\nfunction addStorageEventListener(channelName, fn) {\n  var key = storageKey(channelName);\n  var listener = function listener2(ev) {\n    if (ev.key === key) {\n      fn(JSON.parse(ev.newValue));\n    }\n  };\n  window.addEventListener(\"storage\", listener);\n  return listener;\n}\nfunction removeStorageEventListener(listener) {\n  window.removeEventListener(\"storage\", listener);\n}\nfunction create(channelName, options) {\n  options = fillOptionsWithDefaults(options);\n  if (!canBeUsed()) {\n    throw new Error(\"BroadcastChannel: localstorage cannot be used\");\n  }\n  var uuid = randomToken();\n  var eMIs = new ObliviousSet(options.localstorage.removeTimeout);\n  var state = {\n    channelName,\n    uuid,\n    eMIs\n    // emittedMessagesIds\n  };\n  state.listener = addStorageEventListener(channelName, function(msgObj) {\n    if (!state.messagesCallback)\n      return;\n    if (msgObj.uuid === uuid)\n      return;\n    if (!msgObj.token || eMIs.has(msgObj.token))\n      return;\n    if (msgObj.data.time && msgObj.data.time < state.messagesCallbackTime)\n      return;\n    eMIs.add(msgObj.token);\n    state.messagesCallback(msgObj.data);\n  });\n  return state;\n}\nfunction close(channelState) {\n  removeStorageEventListener(channelState.listener);\n}\nfunction onMessage(channelState, fn, time) {\n  channelState.messagesCallbackTime = time;\n  channelState.messagesCallback = fn;\n}\nfunction canBeUsed() {\n  var ls = getLocalStorage();\n  if (!ls)\n    return false;\n  try {\n    var key = \"__broadcastchannel_check\";\n    ls.setItem(key, \"works\");\n    ls.removeItem(key);\n  } catch (e) {\n    return false;\n  }\n  return true;\n}\nfunction averageResponseTime() {\n  var defaultTime = 120;\n  var userAgent = navigator.userAgent.toLowerCase();\n  if (userAgent.includes(\"safari\") && !userAgent.includes(\"chrome\")) {\n    return defaultTime * 2;\n  }\n  return defaultTime;\n}\nvar LocalstorageMethod = {\n  create,\n  close,\n  onMessage,\n  postMessage,\n  canBeUsed,\n  type,\n  averageResponseTime,\n  microSeconds\n};\nexport {\n  LocalstorageMethod,\n  addStorageEventListener,\n  averageResponseTime,\n  canBeUsed,\n  close,\n  create,\n  getLocalStorage,\n  microSeconds,\n  onMessage,\n  postMessage,\n  removeStorageEventListener,\n  storageKey,\n  type\n};\n","import { microSeconds as microSeconds$1 } from \"../util.js\";\nvar microSeconds = microSeconds$1;\nvar type = \"simulate\";\nvar SIMULATE_CHANNELS = /* @__PURE__ */ new Set();\nfunction create(channelName) {\n  var state = {\n    time: microSeconds(),\n    name: channelName,\n    messagesCallback: null\n  };\n  SIMULATE_CHANNELS.add(state);\n  return state;\n}\nfunction close(channelState) {\n  SIMULATE_CHANNELS[\"delete\"](channelState);\n}\nvar SIMULATE_DELAY_TIME = 5;\nfunction postMessage(channelState, messageJson) {\n  return new Promise(function(res) {\n    return setTimeout(function() {\n      var channelArray = Array.from(SIMULATE_CHANNELS);\n      channelArray.forEach(function(channel) {\n        if (channel.name === channelState.name && // has same name\n        channel !== channelState && // not own channel\n        !!channel.messagesCallback && // has subscribers\n        channel.time < messageJson.time) {\n          channel.messagesCallback(messageJson);\n        }\n      });\n      res();\n    }, SIMULATE_DELAY_TIME);\n  });\n}\nfunction onMessage(channelState, fn) {\n  channelState.messagesCallback = fn;\n}\nfunction canBeUsed() {\n  return true;\n}\nfunction averageResponseTime() {\n  return SIMULATE_DELAY_TIME;\n}\nvar SimulateMethod = {\n  create,\n  close,\n  onMessage,\n  postMessage,\n  canBeUsed,\n  type,\n  averageResponseTime,\n  microSeconds\n};\nexport {\n  SIMULATE_DELAY_TIME,\n  SimulateMethod,\n  averageResponseTime,\n  canBeUsed,\n  close,\n  create,\n  microSeconds,\n  onMessage,\n  postMessage,\n  type\n};\n","import { NativeMethod } from \"./methods/native.js\";\nimport { IndexedDBMethod } from \"./methods/indexed-db.js\";\nimport { LocalstorageMethod } from \"./methods/localstorage.js\";\nimport { SimulateMethod } from \"./methods/simulate.js\";\nvar METHODS = [\n  NativeMethod,\n  // fastest\n  IndexedDBMethod,\n  LocalstorageMethod\n];\nfunction chooseMethod(options) {\n  var chooseMethods = [].concat(options.methods, METHODS).filter(Boolean);\n  if (options.type) {\n    if (options.type === \"simulate\") {\n      return SimulateMethod;\n    }\n    var ret = chooseMethods.find(function(m) {\n      return m.type === options.type;\n    });\n    if (!ret)\n      throw new Error(\"method-type \" + options.type + \" not found\");\n    else\n      return ret;\n  }\n  if (!options.webWorkerSupport) {\n    chooseMethods = chooseMethods.filter(function(m) {\n      return m.type !== \"idb\";\n    });\n  }\n  var useMethod = chooseMethods.find(function(method) {\n    return method.canBeUsed();\n  });\n  if (!useMethod) {\n    throw new Error(\"No usable method found in \" + JSON.stringify(METHODS.map(function(m) {\n      return m.type;\n    })));\n  } else {\n    return useMethod;\n  }\n}\nexport {\n  chooseMethod\n};\n","import { PROMISE_RESOLVED_VOID, isPromise } from \"./util.js\";\nimport { chooseMethod } from \"./method-chooser.js\";\nimport { fillOptionsWithDefaults } from \"./options.js\";\nvar OPEN_BROADCAST_CHANNELS = /* @__PURE__ */ new Set();\nvar lastId = 0;\nvar BroadcastChannel = function BroadcastChannel2(name, options) {\n  this.id = lastId++;\n  OPEN_BROADCAST_CHANNELS.add(this);\n  this.name = name;\n  if (ENFORCED_OPTIONS) {\n    options = ENFORCED_OPTIONS;\n  }\n  this.options = fillOptionsWithDefaults(options);\n  this.method = chooseMethod(this.options);\n  this._iL = false;\n  this._onML = null;\n  this._addEL = {\n    message: [],\n    internal: []\n  };\n  this._uMP = /* @__PURE__ */ new Set();\n  this._befC = [];\n  this._prepP = null;\n  _prepareChannel(this);\n};\nBroadcastChannel._pubkey = true;\nvar ENFORCED_OPTIONS;\nBroadcastChannel.prototype = {\n  postMessage: function postMessage(msg) {\n    if (this.closed) {\n      throw new Error(\"BroadcastChannel.postMessage(): Cannot post message after channel has closed \" + /**\n       * In the past when this error appeared, it was really hard to debug.\n       * So now we log the msg together with the error so it at least\n       * gives some clue about where in your application this happens.\n       */\n      JSON.stringify(msg));\n    }\n    return _post(this, \"message\", msg);\n  },\n  postInternal: function postInternal(msg) {\n    return _post(this, \"internal\", msg);\n  },\n  set onmessage(fn) {\n    var time = this.method.microSeconds();\n    var listenObj = {\n      time,\n      fn\n    };\n    _removeListenerObject(this, \"message\", this._onML);\n    if (fn && typeof fn === \"function\") {\n      this._onML = listenObj;\n      _addListenerObject(this, \"message\", listenObj);\n    } else {\n      this._onML = null;\n    }\n  },\n  addEventListener: function addEventListener(type, fn) {\n    var time = this.method.microSeconds();\n    var listenObj = {\n      time,\n      fn\n    };\n    _addListenerObject(this, type, listenObj);\n  },\n  removeEventListener: function removeEventListener(type, fn) {\n    var obj = this._addEL[type].find(function(obj2) {\n      return obj2.fn === fn;\n    });\n    _removeListenerObject(this, type, obj);\n  },\n  close: function close() {\n    var _this = this;\n    if (this.closed) {\n      return;\n    }\n    OPEN_BROADCAST_CHANNELS[\"delete\"](this);\n    this.closed = true;\n    var awaitPrepare = this._prepP ? this._prepP : PROMISE_RESOLVED_VOID;\n    this._onML = null;\n    this._addEL.message = [];\n    return awaitPrepare.then(function() {\n      return Promise.all(Array.from(_this._uMP));\n    }).then(function() {\n      return Promise.all(_this._befC.map(function(fn) {\n        return fn();\n      }));\n    }).then(function() {\n      return _this.method.close(_this._state);\n    });\n  },\n  get type() {\n    return this.method.type;\n  },\n  get isClosed() {\n    return this.closed;\n  }\n};\nfunction _post(broadcastChannel, type, msg) {\n  var time = broadcastChannel.method.microSeconds();\n  var msgObj = {\n    time,\n    type,\n    data: msg\n  };\n  var awaitPrepare = broadcastChannel._prepP ? broadcastChannel._prepP : PROMISE_RESOLVED_VOID;\n  return awaitPrepare.then(function() {\n    var sendPromise = broadcastChannel.method.postMessage(broadcastChannel._state, msgObj);\n    broadcastChannel._uMP.add(sendPromise);\n    sendPromise[\"catch\"]().then(function() {\n      return broadcastChannel._uMP[\"delete\"](sendPromise);\n    });\n    return sendPromise;\n  });\n}\nfunction _prepareChannel(channel) {\n  var maybePromise = channel.method.create(channel.name, channel.options);\n  if (isPromise(maybePromise)) {\n    channel._prepP = maybePromise;\n    maybePromise.then(function(s) {\n      channel._state = s;\n    });\n  } else {\n    channel._state = maybePromise;\n  }\n}\nfunction _hasMessageListeners(channel) {\n  if (channel._addEL.message.length > 0)\n    return true;\n  if (channel._addEL.internal.length > 0)\n    return true;\n  return false;\n}\nfunction _addListenerObject(channel, type, obj) {\n  channel._addEL[type].push(obj);\n  _startListening(channel);\n}\nfunction _removeListenerObject(channel, type, obj) {\n  channel._addEL[type] = channel._addEL[type].filter(function(o) {\n    return o !== obj;\n  });\n  _stopListening(channel);\n}\nfunction _startListening(channel) {\n  if (!channel._iL && _hasMessageListeners(channel)) {\n    var listenerFn = function listenerFn2(msgObj) {\n      channel._addEL[msgObj.type].forEach(function(listenerObject) {\n        if (msgObj.time >= listenerObject.time) {\n          listenerObject.fn(msgObj.data);\n        }\n      });\n    };\n    var time = channel.method.microSeconds();\n    if (channel._prepP) {\n      channel._prepP.then(function() {\n        channel._iL = true;\n        channel.method.onMessage(channel._state, listenerFn, time);\n      });\n    } else {\n      channel._iL = true;\n      channel.method.onMessage(channel._state, listenerFn, time);\n    }\n  }\n}\nfunction _stopListening(channel) {\n  if (channel._iL && !_hasMessageListeners(channel)) {\n    channel._iL = false;\n    var time = channel.method.microSeconds();\n    channel.method.onMessage(channel._state, null, time);\n  }\n}\nexport {\n  BroadcastChannel,\n  OPEN_BROADCAST_CHANNELS\n};\n","import { useRef, useEffect, useCallback } from \"react\";\nimport { BroadcastChannel } from \"../node_modules/broadcast-channel/dist/esbrowser/broadcast-channel.js\";\nconst useBroadcastChannel = (channelName, onMessage, options) => {\n  const channelRef = useRef(null);\n  const onMessageRef = useRef(onMessage);\n  useEffect(() => {\n    onMessageRef.current = onMessage;\n  }, [onMessage]);\n  const postMessage = useCallback((message) => {\n    var _a;\n    (_a = channelRef.current) == null ? void 0 : _a.postMessage(message);\n  }, []);\n  useEffect(() => {\n    channelRef.current = new BroadcastChannel(channelName, options);\n    channelRef.current.onmessage = (message) => {\n      var _a;\n      (_a = onMessageRef.current) == null ? void 0 : _a.call(onMessageRef, message);\n    };\n    return () => {\n      var _a;\n      (_a = channelRef.current) == null ? void 0 : _a.close();\n      channelRef.current = null;\n    };\n  }, [channelName, options]);\n  return {\n    postMessage\n  };\n};\nexport {\n  useBroadcastChannel\n};\n","const BROADCAST_CHANNELS = {\n  contentUniversalBroadcast: \"content-universal-broadcast\"\n};\nexport {\n  BROADCAST_CHANNELS\n};\n","import { useRef, useState } from \"react\";\nimport { authApi } from \"../../apis/auth/AuthApiService.js\";\nimport \"../stores/content/content.store.js\";\nimport \"../../utils/event-properties/source.js\";\nimport \"framer\";\nimport { isWebview } from \"../../utils/device.js\";\nimport { captureAPIError } from \"../../utils/error/sentry.js\";\nimport { openPopup } from \"../../utils/openPopup.js\";\nconst CONNECT_LINK_LOG_CONTEXT = {\n  api: \"GET /api/v4/onemember/connect/link\"\n};\nconst navigate = (url) => {\n  if (isWebview()) {\n    openPopup(url, \"mss-one-connect\");\n  } else {\n    window.location.href = url;\n  }\n};\nconst useMssOneConnect = () => {\n  const isPendingRef = useRef(false);\n  const [isPending, setIsPending] = useState(false);\n  const redirectToMssOneConnect = async (redirectUrl, returnUrl) => {\n    if (isPendingRef.current) {\n      return;\n    }\n    isPendingRef.current = true;\n    setIsPending(true);\n    const resolvedReturnUrl = returnUrl ?? window.location.href;\n    try {\n      const response = await authApi.getOneMemberConnectLink({\n        redirectUrl,\n        returnUrl: resolvedReturnUrl\n      }).catch((error) => {\n        captureAPIError(error instanceof Error ? error : new Error(String(error)), CONNECT_LINK_LOG_CONTEXT);\n        return null;\n      });\n      const link = (response == null ? void 0 : response.result) === \"SUCCESS\" ? response.data : null;\n      if (response && !link) {\n        captureAPIError(new Error(response.message ?? \"connect/link FAIL\"), {\n          ...CONNECT_LINK_LOG_CONTEXT,\n          errorCode: response.errorCode\n        });\n      } else if (link && link.linkUrl == null && !link.isConnect) {\n        captureAPIError(new Error(\"connect/link 통합회원 응답 없음\"), CONNECT_LINK_LOG_CONTEXT);\n      }\n      if ((link == null ? void 0 : link.linkUrl) != null) {\n        navigate(link.linkUrl);\n        return;\n      }\n      if (link == null ? void 0 : link.isConnect) {\n        navigate(redirectUrl);\n        return;\n      }\n      navigate(resolvedReturnUrl);\n    } finally {\n      isPendingRef.current = false;\n      setIsPending(false);\n    }\n  };\n  return {\n    redirectToMssOneConnect,\n    isPending\n  };\n};\nexport {\n  useMssOneConnect\n};\n","import { isWebview } from \"../../../../../utils/device.js\";\nimport { useEffect } from \"react\";\nimport \"../../../../../node_modules/@firebase/analytics/dist/esm/index.esm2017.js\";\nimport \"../../../../../node_modules/firebase/app/dist/esm/index.esm.js\";\nimport \"../../../../../node_modules/swr/core/dist/index.js\";\nimport \"../../../../../apis/user-segment/CategoryFirstOrderApiService.js\";\nimport { env } from \"../../../../../config/index.js\";\nimport \"../../../../../node_modules/js-cookie/dist/js.cookie.js\";\nimport \"../../../../../apis/highlight-products/HighlightProductsApiService.js\";\nimport \"../../../../../apis/brand-mix/BrandMixApiService.js\";\nimport \"../../../../../apis/one-brand-days/OneBrandDaysApiService.js\";\nimport \"../../../../../apis/taste-sharing/TasteSharingApiService.js\";\nimport \"../../../../../apis/user/UserApiService.js\";\nimport \"../../../../../apis/preuser/PreuserApiService.js\";\nimport \"../../../../../node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.js\";\nimport \"framer\";\nimport \"../../../../../node_modules/@29cm/snowplow/dist/esm/core/snowplow.js\";\nimport \"../../../../../node_modules/swr/mutation/dist/index.js\";\nimport { useEffectOnce } from \"../../../../../hooks/react/useEffectOnce.js\";\nimport \"../../../../../hooks/stores/content/content.store.js\";\nimport \"../../../../../hooks/stores/dialog/dialog.store.js\";\nimport \"../../../../../hooks/stores/global-layout/global-layout.store.js\";\nimport \"../../../../../hooks/stores/toast/toast.store.js\";\nimport \"../../../../@shared/providers/ThemeProvider/ThemeProvider.js\";\nimport \"../../../../@shared/providers/BreakpointProvider/BreakpointProvider.js\";\nimport \"../../../../../hooks/stores/bottom-sheet/bottom-sheet.store.js\";\nimport \"react/jsx-runtime\";\nimport \"react-dom\";\nimport \"../../../Dialog/Dialog.module.css.js\";\nimport \"framer-motion\";\nimport \"../../../../../containers/DialogContainer/DialogContainer.emitter.js\";\nimport \"../../../../../hooks/useFeatureFlag.js\";\nimport { useIsMobileDevice } from \"../../../../../hooks/useIsMobileDevice.js\";\nimport \"../../../../../utils/redirectLogin.js\";\nimport \"../../../../../utils/event-properties/source.js\";\nimport { useRaffleModalContext } from \"../../providers/RaffleModalProvider.js\";\nimport { hideRaffleMssOneNudgeFor7Days } from \"../../../../../utils/raffle/raffleMssOneNudgeVisibility.js\";\nimport { useBroadcastChannel } from \"../../../../../hooks/useBroadcastChannel.js\";\nimport { BROADCAST_CHANNELS } from \"../../../../../constants/broadcast-channels.js\";\nimport \"../../../../../hooks/amplitude-variant/WebAmplitudeService.js\";\nimport { useMssOneConnect } from \"../../../../../hooks/mss-one/useMSSOneConnect.js\";\nimport { useTrackSnowplowEvent } from \"../../../../../hooks/snowplow/useTrackSnowplowEvent.js\";\nconst TITLE = \"29CM와 무신사 계정을 통합하면\\n래플 당첨 확률이 올라가요\";\nconst DESCRIPTION = \"통합하면 로그인부터 무신사 머니까지,\\n하나의 계정으로 더 간편하게 이용할 수 있어요.\";\nconst PRIMARY_ACTION_LABEL = \"통합하고 응모하기\";\nconst SECONDARY_ACTION_LABEL = \"건너뛰고 응모하기\";\nconst TERTIARY_ACTION_LABEL = \"7일간 보지 않기\";\nconst SECTION_NAME = \"RaffleMssOneNudgeModal\";\nconst useMssOneNudgeModal = () => {\n  const isMobileDevice = useIsMobileDevice();\n  const {\n    raffleId,\n    elementRef,\n    originalRaffleHandler,\n    updateAccountState,\n    accountState\n  } = useRaffleModalContext();\n  const {\n    redirectToMssOneConnect,\n    isPending: isConnecting\n  } = useMssOneConnect();\n  const open = accountState.showNudgeModal;\n  const onOpenChange = (isOpen) => {\n    if (!isOpen && isConnecting) {\n      return;\n    }\n    updateAccountState({\n      showNudgeModal: isOpen\n    });\n  };\n  const trackSnowplowEvent = useTrackSnowplowEvent();\n  useEffect(() => {\n    if (!open) {\n      return;\n    }\n    trackSnowplowEvent(\"impression_popup\", {\n      section_name: SECTION_NAME,\n      section_title: TITLE,\n      popup_id: \"integrated_account\",\n      popup_type: isMobileDevice ? \"bottomsheet\" : \"dialog\",\n      layout_id: `raffle_${raffleId}`\n    });\n  }, [open]);\n  const handleMssOneResult = (result) => {\n    sessionStorage.removeItem(\"pendingRaffleId\");\n    if (result === \"success\") {\n      updateAccountState({\n        showConnectedModal: true\n      });\n    } else if (result === \"failure\") {\n      originalRaffleHandler();\n    }\n  };\n  useBroadcastChannel(BROADCAST_CHANNELS.contentUniversalBroadcast, ({\n    mssOneConnect\n  }) => {\n    const storedRaffleId = sessionStorage.getItem(\"pendingRaffleId\");\n    if (mssOneConnect && storedRaffleId === raffleId) {\n      handleMssOneResult(mssOneConnect);\n    }\n  });\n  useEffectOnce(() => {\n    const urlParams = new URLSearchParams(window.location.search);\n    const mssOneConnectResult = urlParams.get(\"mssOneConnect\");\n    const storedRaffleId = sessionStorage.getItem(\"pendingRaffleId\");\n    if (mssOneConnectResult && storedRaffleId === raffleId) {\n      const newUrl = new URL(window.location.href);\n      newUrl.searchParams.delete(\"mssOneConnect\");\n      window.history.replaceState({}, \"\", newUrl.toString());\n      if (elementRef.current) {\n        elementRef.current.scrollIntoView({\n          behavior: \"instant\",\n          block: \"center\",\n          inline: \"nearest\"\n        });\n      }\n      handleMssOneResult(mssOneConnectResult);\n    }\n  });\n  const handleRedirectToMssOneConnect = () => {\n    sessionStorage.setItem(\"pendingRaffleId\", raffleId);\n    const currentUrl = new URL(window.location.href);\n    const baseUrl = `${currentUrl.origin}${currentUrl.pathname}`;\n    const redirectBaseUrl = isWebview() ? `${env.workspace.content}/embed/broadcast` : baseUrl;\n    const successUrl = `${redirectBaseUrl}?mssOneConnect=success`;\n    const failureUrl = `${redirectBaseUrl}?mssOneConnect=failure`;\n    return redirectToMssOneConnect(successUrl, failureUrl);\n  };\n  const handleIntegrateAndApply = async () => {\n    if (isConnecting) {\n      return;\n    }\n    trackSnowplowEvent(\"click_button\", {\n      section_name: SECTION_NAME,\n      section_title: TITLE,\n      position: -1,\n      button_id: \"connect_one_member\",\n      button_name: PRIMARY_ACTION_LABEL,\n      layout_id: `raffle_${raffleId}`\n    });\n    await handleRedirectToMssOneConnect();\n    updateAccountState({\n      showNudgeModal: false\n    });\n  };\n  const handleSkipAndApply = () => {\n    if (isConnecting) {\n      return;\n    }\n    trackSnowplowEvent(\"click_button\", {\n      section_name: SECTION_NAME,\n      section_title: TITLE,\n      position: -1,\n      button_id: \"apply_raffle\",\n      button_name: SECONDARY_ACTION_LABEL,\n      layout_id: `raffle_${raffleId}`\n    });\n    originalRaffleHandler();\n    onOpenChange(false);\n  };\n  const handleHideFor7Days = () => {\n    if (isConnecting) {\n      return;\n    }\n    trackSnowplowEvent(\"click_button\", {\n      section_name: SECTION_NAME,\n      section_title: TITLE,\n      position: -1,\n      button_id: \"dismiss_for_7d\",\n      button_name: TERTIARY_ACTION_LABEL,\n      layout_id: `raffle_${raffleId}`\n    });\n    hideRaffleMssOneNudgeFor7Days();\n    originalRaffleHandler();\n    onOpenChange(false);\n  };\n  return {\n    open,\n    onOpenChange,\n    isMobileDevice,\n    modalContent: {\n      title: TITLE,\n      description: DESCRIPTION\n    },\n    actions: {\n      primary: {\n        label: PRIMARY_ACTION_LABEL,\n        onClick: () => void handleIntegrateAndApply(),\n        pending: isConnecting\n      },\n      secondary: {\n        label: SECONDARY_ACTION_LABEL,\n        onClick: handleSkipAndApply,\n        disabled: isConnecting\n      },\n      tertiary: {\n        label: TERTIARY_ACTION_LABEL,\n        onClick: handleHideFor7Days\n      }\n    }\n  };\n};\nexport {\n  useMssOneNudgeModal\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { Dialog as M } from \"../../../../../node_modules/@29cm/ruler-ui/dist/components/Dialog/Dialog.js\";\nimport { AppCompatBottomSheet } from \"../../../../../containers/UIContainer/AppCompatBottomSheet.js\";\nimport { NudgeModalContent } from \"./RaffleMssOneNudgeModalContent.js\";\nimport { useMssOneNudgeModal } from \"./useMssOneNudgeModal.js\";\nconst RaffleMssOneNudgeModal = () => {\n  const {\n    open,\n    onOpenChange,\n    isMobileDevice,\n    modalContent,\n    actions\n  } = useMssOneNudgeModal();\n  if (isMobileDevice) {\n    return /* @__PURE__ */ jsx(AppCompatBottomSheet, { open, onOpenChange, title: modalContent.title, description: modalContent.description, primaryAction: actions.primary, secondaryAction: actions.secondary, tertiaryAction: actions.tertiary, children: /* @__PURE__ */ jsx(\"div\", { style: {\n      padding: \"0 20px 16px\"\n    }, children: /* @__PURE__ */ jsx(NudgeModalContent, {}) }) });\n  }\n  return /* @__PURE__ */ jsx(M, { open, onOpenChange, title: modalContent.title, description: modalContent.description, primaryAction: actions.primary, secondaryAction: actions.secondary, tertiaryAction: actions.tertiary, children: /* @__PURE__ */ jsx(NudgeModalContent, {}) });\n};\nexport {\n  RaffleMssOneNudgeModal\n};\n","import useSWR from \"../../../../../../node_modules/swr/core/dist/index.js\";\nimport { authApi } from \"../../../../../../apis/auth/AuthApiService.js\";\nimport { raffleApi } from \"../../../../../../apis/raffle/RaffleApiService.js\";\nimport { useRaffleModalContext } from \"../../../providers/RaffleModalProvider.js\";\nconst useRaffleData = () => {\n  const {\n    raffleId,\n    raffleGroupId,\n    accountState\n  } = useRaffleModalContext();\n  const open = accountState.showConnectedModal;\n  const {\n    data: oneLoginData,\n    isLoading\n  } = useSWR(open ? \"mss-connected\" : null, () => authApi.getOneLoginNoticeData().then((res) => res.data || void 0));\n  const {\n    data: raffleApplicableData\n  } = useSWR(open ? \"raffle-applicable\" : null, () => raffleApi.getRaffleApplicable(raffleGroupId, raffleId).then((res) => res.data));\n  return {\n    oneLoginData,\n    isLoading,\n    raffleApplicableData\n  };\n};\nexport {\n  useRaffleData\n};\n","import { useMemo } from \"react\";\nimport useSWRMutation from \"../../../../../../node_modules/swr/mutation/dist/index.js\";\nimport { raffleApi } from \"../../../../../../apis/raffle/RaffleApiService.js\";\nimport { RaffleAgreementRequirement } from \"../../../../../../apis/raffle/RaffleApiService.types.js\";\nimport \"react/jsx-runtime\";\nimport \"../../../../../../node_modules/styled-jsx/dist/index/index.js\";\nimport \"../../../../../@shared/TextButton/TextButton.js\";\nimport \"../../../../../../node_modules/@firebase/analytics/dist/esm/index.esm2017.js\";\nimport \"../../../../../../node_modules/firebase/app/dist/esm/index.esm.js\";\nimport \"../../../../../../node_modules/swr/core/dist/index.js\";\nimport \"../../../../../../apis/user-segment/CategoryFirstOrderApiService.js\";\nimport \"../../../../../../config/index.js\";\nimport \"../../../../../../node_modules/js-cookie/dist/js.cookie.js\";\nimport \"../../../../../../apis/highlight-products/HighlightProductsApiService.js\";\nimport \"../../../../../../apis/brand-mix/BrandMixApiService.js\";\nimport \"../../../../../../apis/one-brand-days/OneBrandDaysApiService.js\";\nimport \"../../../../../../apis/taste-sharing/TasteSharingApiService.js\";\nimport \"../../../../../../apis/user/UserApiService.js\";\nimport \"../../../../../../apis/preuser/PreuserApiService.js\";\nimport \"../../../../../../node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.js\";\nimport \"framer\";\nimport \"../../../../../../node_modules/@29cm/snowplow/dist/esm/core/snowplow.js\";\nimport \"../../../../../../hooks/stores/content/content.store.js\";\nimport \"../../../../../../hooks/stores/dialog/dialog.store.js\";\nimport \"../../../../../../hooks/stores/global-layout/global-layout.store.js\";\nimport \"../../../../../../hooks/stores/toast/toast.store.js\";\nimport \"../../../../../@shared/providers/ThemeProvider/ThemeProvider.js\";\nimport \"../../../../../@shared/providers/BreakpointProvider/BreakpointProvider.js\";\nimport \"../../../../../../hooks/stores/bottom-sheet/bottom-sheet.store.js\";\nimport \"react-dom\";\nimport \"../../../../Dialog/Dialog.module.css.js\";\nimport \"framer-motion\";\nimport \"../../../../../../containers/DialogContainer/DialogContainer.emitter.js\";\nimport \"../../../../../../hooks/useFeatureFlag.js\";\nimport \"../../../../../../utils/redirectLogin.js\";\nimport \"../../../../../../utils/event-properties/source.js\";\nimport { useAgreementCheckListControl } from \"../../../../../@shared/AgreementCheckList/AgreementCheckList.hooks.js\";\nimport { useRaffleModalContext } from \"../../../providers/RaffleModalProvider.js\";\nconst useRaffleAgreements = (raffleApplicableData) => {\n  const {\n    raffleId,\n    raffleGroupId\n  } = useRaffleModalContext();\n  const agreements = useMemo(() => {\n    var _a, _b;\n    return ((_b = (_a = raffleApplicableData == null ? void 0 : raffleApplicableData.agreementInformation) == null ? void 0 : _a.filter((agreement) => !agreement.isAgreed)) == null ? void 0 : _b.map((agreement) => ({\n      type: agreement.agreementType,\n      label: agreement.label,\n      detailLink: agreement.linkUrl,\n      isRequired: agreement.agreementRequirement === RaffleAgreementRequirement.Required\n    }))) || [];\n  }, [raffleApplicableData]);\n  const hasAgreements = agreements.length > 0;\n  const hasRequiredAgreements = agreements.some((agreement) => agreement.isRequired);\n  const {\n    agreementsState,\n    agreements: richAgreements,\n    isAllRequiredAgreementsChecked\n  } = useAgreementCheckListControl(agreements);\n  const {\n    trigger: raffleAgree,\n    isMutating: isRaffleAgreeMutating\n  } = useSWRMutation(\"raffle-agree\", (_, {\n    arg\n  }) => raffleApi.postRaffleGroupAgreementsAgree({\n    raffleGroupId: arg.raffleGroupId,\n    raffleId: arg.raffleId,\n    agreementTypes: arg.agreementTypes\n  }));\n  const submitAgreements = async (agreementTypes) => {\n    if (agreementTypes.length > 0) {\n      await raffleAgree({\n        raffleGroupId,\n        raffleId,\n        agreementTypes\n      });\n    }\n  };\n  return {\n    agreements: richAgreements,\n    agreementsState,\n    hasAgreements,\n    hasRequiredAgreements,\n    isAllRequiredAgreementsChecked,\n    isRaffleAgreeMutating,\n    submitAgreements\n  };\n};\nexport {\n  useRaffleAgreements\n};\n","import { useState, useRef, useEffect } from \"react\";\nimport useSWRMutation from \"../../../../../../node_modules/swr/mutation/dist/index.js\";\nimport { raffleApi } from \"../../../../../../apis/raffle/RaffleApiService.js\";\nimport { useRaffleModalContext } from \"../../../providers/RaffleModalProvider.js\";\nimport { alertDialog } from \"../../../../../../containers/AlertDialogContainer/AlertDialogContainer.js\";\nconst useConnectedModalState = (raffleApplicableData, hasAgreements) => {\n  const {\n    raffleId,\n    raffleGroupId,\n    accountState,\n    updateAccountState,\n    revalidateDisplayInformation\n  } = useRaffleModalContext();\n  const [modalState, setModalState] = useState(\"connected\");\n  const [isApplying, setIsApplying] = useState(false);\n  const hasExecutedDirectApply = useRef(false);\n  const open = accountState.showConnectedModal;\n  const onOpenChange = (isOpen) => updateAccountState({\n    showConnectedModal: isOpen\n  });\n  const onRaffleComplete = () => updateAccountState({\n    showConnectedModal: false\n  });\n  const {\n    trigger: raffleApply,\n    isMutating: isRaffleApplyMutating\n  } = useSWRMutation(\"raffle-apply\", (_, {\n    arg\n  }) => raffleApi.postRaffleApply(arg.raffleGroupId, arg.raffleId));\n  const resetState = () => {\n    hasExecutedDirectApply.current = false;\n    setModalState(\"connected\");\n  };\n  useEffect(() => {\n    if (open) {\n      hasExecutedDirectApply.current = false;\n    }\n  }, [open]);\n  const handleRaffleApplication = async () => {\n    if (!raffleId || isRaffleApplyMutating) {\n      return;\n    }\n    try {\n      await raffleApply({\n        raffleGroupId,\n        raffleId\n      });\n      revalidateDisplayInformation();\n      setModalState(\"completed\");\n    } catch (error) {\n      alertDialog.show({\n        title: \"응모 중 오류가 발생했습니다. 잠시 후 다시 시도해주세요.\",\n        description: \"\",\n        primaryAction: {\n          label: \"확인\"\n        }\n      });\n      onOpenChange(false);\n    } finally {\n      setIsApplying(false);\n    }\n  };\n  const handleComplete = () => {\n    onRaffleComplete();\n    onOpenChange(false);\n    resetState();\n  };\n  useEffect(() => {\n    if (raffleApplicableData && !hasAgreements && modalState === \"connected\" && !hasExecutedDirectApply.current) {\n      hasExecutedDirectApply.current = true;\n      handleRaffleApplication();\n    }\n  }, [raffleApplicableData, hasAgreements, modalState]);\n  const shouldShowModal = () => {\n    if (modalState === \"completed\") {\n      return true;\n    }\n    if (modalState === \"connected\" && raffleApplicableData && hasAgreements) {\n      return true;\n    }\n    return false;\n  };\n  return {\n    open,\n    modalState,\n    shouldShowModal: shouldShowModal(),\n    onOpenChange,\n    // 내부 상태 관리용\n    isApplying,\n    setIsApplying,\n    handleComplete\n  };\n};\nexport {\n  useConnectedModalState\n};\n","import \"react\";\nimport \"../../../../../node_modules/@firebase/analytics/dist/esm/index.esm2017.js\";\nimport \"../../../../../node_modules/firebase/app/dist/esm/index.esm.js\";\nimport \"../../../../../node_modules/swr/core/dist/index.js\";\nimport \"../../../../../apis/user-segment/CategoryFirstOrderApiService.js\";\nimport \"../../../../../config/index.js\";\nimport \"../../../../../node_modules/js-cookie/dist/js.cookie.js\";\nimport \"../../../../../apis/highlight-products/HighlightProductsApiService.js\";\nimport \"../../../../../apis/brand-mix/BrandMixApiService.js\";\nimport \"../../../../../apis/one-brand-days/OneBrandDaysApiService.js\";\nimport \"../../../../../apis/taste-sharing/TasteSharingApiService.js\";\nimport \"../../../../../apis/user/UserApiService.js\";\nimport \"../../../../../apis/preuser/PreuserApiService.js\";\nimport \"../../../../../node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.js\";\nimport \"framer\";\nimport \"../../../../../node_modules/@29cm/snowplow/dist/esm/core/snowplow.js\";\nimport \"../../../../../node_modules/swr/mutation/dist/index.js\";\nimport \"../../../../../hooks/stores/content/content.store.js\";\nimport \"../../../../../hooks/stores/dialog/dialog.store.js\";\nimport \"../../../../../hooks/stores/global-layout/global-layout.store.js\";\nimport \"../../../../../hooks/stores/toast/toast.store.js\";\nimport \"../../../../@shared/providers/ThemeProvider/ThemeProvider.js\";\nimport \"../../../../@shared/providers/BreakpointProvider/BreakpointProvider.js\";\nimport \"../../../../../hooks/stores/bottom-sheet/bottom-sheet.store.js\";\nimport \"react/jsx-runtime\";\nimport \"react-dom\";\nimport \"../../../Dialog/Dialog.module.css.js\";\nimport \"framer-motion\";\nimport \"../../../../../containers/DialogContainer/DialogContainer.emitter.js\";\nimport \"../../../../../hooks/useFeatureFlag.js\";\nimport { useIsMobileDevice } from \"../../../../../hooks/useIsMobileDevice.js\";\nimport \"../../../../../utils/redirectLogin.js\";\nimport { alertDialog } from \"../../../../../containers/AlertDialogContainer/AlertDialogContainer.js\";\nimport \"../../../../../utils/event-properties/source.js\";\nimport { useRaffleModalContext } from \"../../providers/RaffleModalProvider.js\";\nimport { useRaffleData } from \"./hooks/useRaffleData.js\";\nimport { useRaffleAgreements } from \"./hooks/useRaffleAgreements.js\";\nimport { useConnectedModalState } from \"./hooks/useConnectedModalState.js\";\nimport { useTrackSnowplowEvent } from \"../../../../../hooks/snowplow/useTrackSnowplowEvent.js\";\nimport { mapTypesToString } from \"../../../../../utils/agreementMapper.js\";\nimport { AgreementType } from \"../../../../../types/agreement.js\";\nimport { SECTION_NAME } from \"./RaffleMssOneConnectedModal.js\";\nconst TITLE = \"계정 통합 완료!\\n래플 응모를 완료하려면 동의가 필요해요.\";\nconst COMPLETED_TITLE = \"계정 통합과 이벤트 참여가\\n모두 완료되었어요\";\nconst AGREEMENT_TYPE_MAP = {\n  [AgreementType.PersonalInformation]: \"personal_agree\",\n  [AgreementType.Privacy]: \"mkt_agree\",\n  [AgreementType.Advertising]: \"ad_agree\"\n};\nconst useMssOneConnectedModal = () => {\n  const isMobileDevice = useIsMobileDevice();\n  const {\n    raffleId,\n    originalRaffleHandler\n  } = useRaffleModalContext();\n  const {\n    raffleApplicableData\n  } = useRaffleData();\n  const {\n    agreements,\n    agreementsState,\n    hasAgreements,\n    hasRequiredAgreements,\n    isAllRequiredAgreementsChecked,\n    isRaffleAgreeMutating,\n    submitAgreements\n  } = useRaffleAgreements(raffleApplicableData);\n  const {\n    open,\n    modalState,\n    shouldShowModal,\n    onOpenChange,\n    isApplying,\n    setIsApplying,\n    handleComplete\n  } = useConnectedModalState(raffleApplicableData, hasAgreements);\n  const handleAgreementAndRaffle = async () => {\n    if (!raffleId || isRaffleAgreeMutating || isApplying) {\n      return;\n    }\n    setIsApplying(true);\n    try {\n      const agreedAgreementTypes = Object.entries(agreementsState).filter(([, agreed]) => agreed).map(([type]) => type);\n      await submitAgreements(agreedAgreementTypes);\n      originalRaffleHandler();\n      onOpenChange(false);\n    } catch (error) {\n      alertDialog.show({\n        title: \"동의 처리 중 오류가 발생했습니다. 잠시 후 다시 시도해주세요.\",\n        description: \"\",\n        primaryAction: {\n          label: \"확인\"\n        }\n      });\n    } finally {\n      setIsApplying(false);\n    }\n  };\n  const getTitle = () => {\n    switch (modalState) {\n      case \"completed\":\n        return COMPLETED_TITLE;\n      default:\n        return TITLE;\n    }\n  };\n  const getDescription = () => {\n    switch (modalState) {\n      case \"completed\":\n        return \"당첨 시 회원 정보에 입력된 연락처로 안내드려요.\";\n      default:\n        return \"\";\n    }\n  };\n  const trackSnowplowEvent = useTrackSnowplowEvent();\n  const getPrimaryAction = () => {\n    if (modalState === \"connected\") {\n      return {\n        label: hasRequiredAgreements ? \"동의 후 응모하기\" : \"응모하기\",\n        onClick: () => {\n          const agreedAgreements = agreements.filter((agreement) => agreementsState[agreement.type]);\n          trackSnowplowEvent(\"click_button\", {\n            section_name: SECTION_NAME,\n            section_title: getTitle(),\n            position: -1,\n            button_id: \"info_agree_confirm\",\n            button_name: hasRequiredAgreements ? \"동의 후 응모하기\" : \"응모하기\",\n            layout_id: `raffle_${raffleId}`,\n            option_name: mapTypesToString(AGREEMENT_TYPE_MAP, agreedAgreements)\n          });\n          handleAgreementAndRaffle();\n        },\n        pending: isApplying,\n        disabled: hasRequiredAgreements && !isAllRequiredAgreementsChecked\n      };\n    }\n    if (modalState === \"completed\") {\n      return {\n        label: \"확인\",\n        onClick: handleComplete\n      };\n    }\n    return void 0;\n  };\n  const getSecondaryAction = () => {\n    if (modalState === \"connected\") {\n      return {\n        label: \"다음에 응모하기\",\n        onClick: () => {\n          trackSnowplowEvent(\"click_button\", {\n            section_name: SECTION_NAME,\n            section_title: getTitle(),\n            position: -1,\n            button_id: \"cancel\",\n            button_name: \"다음에 응모하기\",\n            layout_id: `raffle_${raffleId}`\n          });\n          onOpenChange(false);\n        }\n      };\n    }\n    return void 0;\n  };\n  return {\n    // 모달 표시 제어\n    open,\n    shouldShowModal,\n    onOpenChange,\n    // UI 렌더링\n    isMobileDevice,\n    modalState,\n    title: getTitle(),\n    description: getDescription(),\n    primaryAction: getPrimaryAction(),\n    secondaryAction: getSecondaryAction(),\n    // 컨텐츠 렌더링용 데이터\n    agreements,\n    hasAgreements\n  };\n};\nexport {\n  useMssOneConnectedModal\n};\n","import { jsxs, jsx } from \"react/jsx-runtime\";\nimport { QRCodeSVG } from \"../../../../../node_modules/qrcode.react/lib/esm/index.js\";\nimport \"react\";\nimport \"framer\";\nimport { typography } from \"../../../../../styles/typography.js\";\nimport { AgreementCheckList } from \"../../../../@shared/AgreementCheckList/AgreementCheckList.js\";\nimport \"../../../../../node_modules/@firebase/analytics/dist/esm/index.esm2017.js\";\nimport \"../../../../../node_modules/firebase/app/dist/esm/index.esm.js\";\nimport \"../../../../../node_modules/swr/core/dist/index.js\";\nimport \"../../../../../apis/user-segment/CategoryFirstOrderApiService.js\";\nimport \"../../../../../config/index.js\";\nimport \"../../../../../node_modules/js-cookie/dist/js.cookie.js\";\nimport \"../../../../../apis/highlight-products/HighlightProductsApiService.js\";\nimport \"../../../../../apis/brand-mix/BrandMixApiService.js\";\nimport \"../../../../../apis/one-brand-days/OneBrandDaysApiService.js\";\nimport \"../../../../../apis/taste-sharing/TasteSharingApiService.js\";\nimport \"../../../../../apis/user/UserApiService.js\";\nimport \"../../../../../apis/preuser/PreuserApiService.js\";\nimport \"../../../../../node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.js\";\nimport \"../../../../../node_modules/@29cm/snowplow/dist/esm/core/snowplow.js\";\nimport \"../../../../../node_modules/swr/mutation/dist/index.js\";\nimport \"../../../../../hooks/stores/content/content.store.js\";\nimport \"../../../../../hooks/stores/dialog/dialog.store.js\";\nimport \"../../../../../hooks/stores/global-layout/global-layout.store.js\";\nimport \"../../../../../hooks/stores/toast/toast.store.js\";\nimport \"../../../../@shared/providers/ThemeProvider/ThemeProvider.js\";\nimport \"../../../../@shared/providers/BreakpointProvider/BreakpointProvider.js\";\nimport \"../../../../../hooks/stores/bottom-sheet/bottom-sheet.store.js\";\nimport \"react-dom\";\nimport \"../../../Dialog/Dialog.module.css.js\";\nimport \"framer-motion\";\nimport \"../../../../../containers/DialogContainer/DialogContainer.emitter.js\";\nimport \"../../../../../hooks/useFeatureFlag.js\";\nimport { useIsMobileDevice } from \"../../../../../hooks/useIsMobileDevice.js\";\nimport \"../../../../../utils/redirectLogin.js\";\nimport \"../../../../../utils/event-properties/source.js\";\nimport { useCreateOneLink } from \"../../../../../hooks/useCreateOneLink.js\";\nimport { getCurrentHref } from \"../../../../../utils/getCurrentHref.js\";\nimport { useRaffleData } from \"./hooks/useRaffleData.js\";\nimport { shouldDisplayAgreeAllCheckbox } from \"../../../../../utils/raffle/raffleAgreementUtils.js\";\nimport { useTrackSnowplowEvent } from \"../../../../../hooks/snowplow/useTrackSnowplowEvent.js\";\nimport { useRaffleModalContext } from \"../../providers/RaffleModalProvider.js\";\nimport { Intersection } from \"../../../../@shared/Intersection/Intersection.js\";\nimport \"../../../../@shared/Icon/Icon.js\";\nimport { SECTION_NAME } from \"./RaffleMssOneConnectedModal.js\";\nconst completedContainerStyle = {\n  display: \"flex\",\n  flexDirection: \"column\",\n  gap: 16\n};\nconst qrContainerStyle = {\n  display: \"flex\",\n  flexDirection: \"column\",\n  justifyContent: \"center\",\n  alignItems: \"center\",\n  gap: 12,\n  paddingTop: 36,\n  paddingBottom: 16,\n  minWidth: 420,\n  borderRadius: 8,\n  backgroundColor: \"#000000\",\n  color: \"#ffffff\"\n};\nconst qrCodeWrapperStyle = {\n  padding: 4,\n  borderRadius: 8,\n  backgroundColor: \"#ffffff\"\n};\nconst ConnectedModalContent = ({\n  modalState,\n  title,\n  agreements,\n  hasAgreements\n}) => {\n  const isMobileDevice = useIsMobileDevice();\n  const {\n    oneLoginData,\n    isLoading\n  } = useRaffleData();\n  const {\n    oneLink\n  } = useCreateOneLink(getCurrentHref({\n    removeQueryParams: true\n  }));\n  const {\n    raffleId\n  } = useRaffleModalContext();\n  const trackSnowplowEvent = useTrackSnowplowEvent();\n  const renderConnectedStep = () => /* @__PURE__ */ jsxs(\"div\", { children: [\n    /* @__PURE__ */ jsx(ConnectedDetail, { data: oneLoginData, isLoading }),\n    hasAgreements && /* @__PURE__ */ jsx(Intersection, { onView: () => {\n      trackSnowplowEvent(\"impression_popup\", {\n        section_name: SECTION_NAME,\n        section_title: title,\n        popup_id: \"info_agree\",\n        popup_type: isMobileDevice ? \"bottomsheet\" : \"dialog\",\n        layout_id: `raffle_${raffleId}`\n      });\n    }, children: /* @__PURE__ */ jsx(\"div\", { style: {\n      marginTop: \"20px\"\n    }, children: /* @__PURE__ */ jsx(AgreementCheckList, { agreements, displayAgreeAllCheckBox: shouldDisplayAgreeAllCheckbox(agreements) }) }) })\n  ] });\n  const renderCompletedStep = () => /* @__PURE__ */ jsxs(\"div\", { style: {\n    ...completedContainerStyle,\n    ...isMobileDevice && {\n      padding: \"0 20px 12px\"\n    }\n  }, children: [\n    /* @__PURE__ */ jsx(ConnectedDetail, { data: oneLoginData, isLoading }),\n    !isMobileDevice && /* @__PURE__ */ jsxs(\"div\", { style: qrContainerStyle, children: [\n      /* @__PURE__ */ jsx(\"div\", { style: qrCodeWrapperStyle, children: /* @__PURE__ */ jsx(QRCodeSVG, { value: oneLink, size: 150, bgColor: \"#ffffff\", fgColor: \"#000000\", includeMargin: false }) }),\n      /* @__PURE__ */ jsxs(\"p\", { style: {\n        ...typography(14),\n        textAlign: \"center\"\n      }, children: [\n        \"앱 설치하면 더 정확한 소식을 받을 수 있어요.\",\n        /* @__PURE__ */ jsx(\"br\", {}),\n        \"카메라 앱을 열어 QR 코드를 비춰보세요.\"\n      ] })\n    ] })\n  ] });\n  switch (modalState) {\n    case \"connected\":\n      return renderConnectedStep();\n    case \"completed\":\n      return renderCompletedStep();\n    default:\n      return null;\n  }\n};\nconst connectedDetailStyle = {\n  background: \"#F5F5F5\",\n  padding: 12,\n  borderRadius: 4\n};\nconst subDescriptionStyle = {\n  ...typography(14, 400),\n  color: \"#666666\"\n};\nconst ConnectedDetail = ({\n  data,\n  isLoading\n}) => {\n  if (isLoading) {\n    return null;\n  }\n  return /* @__PURE__ */ jsxs(\"div\", { style: connectedDetailStyle, children: [\n    (data == null ? void 0 : data.boxDescription) && /* @__PURE__ */ jsxs(\"p\", { style: typography(14, 400), children: [\n      data.boxTitle && `${data.boxTitle}: `,\n      data.boxDescription\n    ] }),\n    (data == null ? void 0 : data.boxSubDescription) && /* @__PURE__ */ jsx(\"p\", { style: subDescriptionStyle, children: data.boxSubDescription })\n  ] });\n};\nexport {\n  ConnectedModalContent\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { Dialog as M } from \"../../../../../node_modules/@29cm/ruler-ui/dist/components/Dialog/Dialog.js\";\nimport { AppCompatBottomSheet } from \"../../../../../containers/UIContainer/AppCompatBottomSheet.js\";\nimport { useMssOneConnectedModal } from \"./useMssOneConnectedModal.js\";\nimport { ConnectedModalContent } from \"./RaffleMssOneConnectedModalContent.js\";\nconst SECTION_NAME = \"RaffleMssOneConnectedModal\";\nconst RaffleMssOneConnectedModal = () => {\n  const {\n    open,\n    shouldShowModal,\n    isMobileDevice,\n    title,\n    description,\n    primaryAction,\n    secondaryAction,\n    // 컨텐츠 렌더링을 위한 데이터\n    modalState,\n    onOpenChange,\n    agreements,\n    hasAgreements\n  } = useMssOneConnectedModal();\n  if (!shouldShowModal) {\n    return null;\n  }\n  if (isMobileDevice) {\n    return /* @__PURE__ */ jsx(AppCompatBottomSheet, { open, onOpenChange, title, description, primaryAction, secondaryAction, children: /* @__PURE__ */ jsx(\"div\", { style: {\n      padding: modalState === \"connected\" ? \"0 20px 12px\" : \"0\"\n    }, children: /* @__PURE__ */ jsx(ConnectedModalContent, { modalState, title, agreements, hasAgreements }) }) });\n  }\n  return /* @__PURE__ */ jsx(M, { open, onOpenChange, title, description, primaryAction, secondaryAction, children: /* @__PURE__ */ jsx(ConnectedModalContent, { modalState, title, agreements, hasAgreements }) });\n};\nexport {\n  RaffleMssOneConnectedModal,\n  SECTION_NAME\n};\n","import { jsxs, jsx } from \"react/jsx-runtime\";\nimport { createContext, useState, useMemo, useContext } from \"react\";\nimport { RaffleMssOneNudgeModal } from \"../modals/RaffleMssOneNudgeModal/RaffleMssOneNudgeModal.js\";\nimport { RaffleMssOneConnectedModal } from \"../modals/RaffleMssOneConnectedModal/RaffleMssOneConnectedModal.js\";\nconst RaffleModalContext = createContext(null);\nconst initialAccountState = {\n  isConnected: false,\n  isLoading: false,\n  showNudgeModal: false,\n  showConnectedModal: false\n};\nconst RaffleModalProvider = ({\n  children,\n  raffleId,\n  raffleGroupId,\n  originalRaffleHandler,\n  elementRef,\n  revalidateDisplayInformation\n}) => {\n  const [accountState, setAccountState] = useState(initialAccountState);\n  const updateAccountState = (updates) => {\n    setAccountState((prev) => ({\n      ...prev,\n      ...updates\n    }));\n  };\n  const contextValue = useMemo(() => ({\n    raffleId,\n    raffleGroupId,\n    accountState,\n    updateAccountState,\n    originalRaffleHandler,\n    revalidateDisplayInformation,\n    elementRef\n  }), [raffleId, raffleGroupId, accountState, originalRaffleHandler, revalidateDisplayInformation, elementRef]);\n  return /* @__PURE__ */ jsxs(RaffleModalContext.Provider, { value: contextValue, children: [\n    children,\n    /* @__PURE__ */ jsx(RaffleMssOneNudgeModal, {}),\n    /* @__PURE__ */ jsx(RaffleMssOneConnectedModal, {})\n  ] });\n};\nconst useRaffleModalContext = () => {\n  const context = useContext(RaffleModalContext);\n  if (!context) {\n    throw new Error(\"useRaffleModalContext must be used within a RaffleModalProvider\");\n  }\n  return context;\n};\nexport {\n  RaffleModalProvider,\n  useRaffleModalContext\n};\n","import { isRaffleMssOneNudgeHidden } from \"../../../../utils/raffle/raffleMssOneNudgeVisibility.js\";\nimport { useRaffleModalContext } from \"../providers/RaffleModalProvider.js\";\nimport { useCheckOne } from \"../../../../hooks/mss-one/useCheckOne.js\";\nimport \"react\";\nimport \"../../../../config/index.js\";\nimport \"../../../../hooks/amplitude-variant/WebAmplitudeService.js\";\nimport \"../../../../node_modules/swr/core/dist/index.js\";\nimport \"../../../../apis/user-segment/CategoryFirstOrderApiService.js\";\nimport \"../../../../node_modules/js-cookie/dist/js.cookie.js\";\nimport \"../../../../apis/highlight-products/HighlightProductsApiService.js\";\nimport \"../../../../apis/brand-mix/BrandMixApiService.js\";\nimport \"../../../../apis/one-brand-days/OneBrandDaysApiService.js\";\nimport \"../../../../apis/taste-sharing/TasteSharingApiService.js\";\nimport \"../../../../apis/user/UserApiService.js\";\nimport \"../../../../apis/preuser/PreuserApiService.js\";\nimport \"../../../../node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.js\";\nimport \"framer\";\nimport \"../../../../hooks/stores/content/content.store.js\";\nimport \"../../../../utils/event-properties/source.js\";\nimport \"../../../../node_modules/@firebase/analytics/dist/esm/index.esm2017.js\";\nimport \"../../../../node_modules/firebase/app/dist/esm/index.esm.js\";\nimport \"../../../../node_modules/@29cm/snowplow/dist/esm/core/snowplow.js\";\nimport \"../../../../node_modules/swr/mutation/dist/index.js\";\nimport \"../../../../hooks/stores/dialog/dialog.store.js\";\nimport \"../../../../hooks/stores/global-layout/global-layout.store.js\";\nimport \"../../../../hooks/stores/toast/toast.store.js\";\nimport \"../../../@shared/providers/ThemeProvider/ThemeProvider.js\";\nimport \"../../../@shared/providers/BreakpointProvider/BreakpointProvider.js\";\nimport \"../../../../hooks/stores/bottom-sheet/bottom-sheet.store.js\";\nimport \"react/jsx-runtime\";\nimport \"react-dom\";\nimport \"../../Dialog/Dialog.module.css.js\";\nimport \"framer-motion\";\nimport \"../../../../containers/DialogContainer/DialogContainer.emitter.js\";\nimport \"../../../../hooks/useFeatureFlag.js\";\nimport \"../../../../utils/redirectLogin.js\";\nimport { useWithLogin } from \"../../../../hooks/useWithLogin.js\";\nconst RaffleButtonWithAccountIntegration = ({\n  enableAccountIntegration,\n  children\n}) => {\n  const {\n    onCheckOne\n  } = useCheckOne();\n  const {\n    accountState,\n    updateAccountState,\n    originalRaffleHandler\n  } = useRaffleModalContext();\n  const withLogin = useWithLogin();\n  const handleRaffleClick = withLogin(async () => {\n    if (!enableAccountIntegration) {\n      originalRaffleHandler();\n      return;\n    }\n    updateAccountState({\n      isLoading: true\n    });\n    try {\n      const isOne = await onCheckOne();\n      if (isOne) {\n        originalRaffleHandler();\n      } else {\n        if (isRaffleMssOneNudgeHidden()) {\n          originalRaffleHandler();\n          return;\n        }\n        updateAccountState({\n          showNudgeModal: true,\n          isConnected: false\n        });\n      }\n    } catch (error) {\n      originalRaffleHandler();\n    } finally {\n      updateAccountState({\n        isLoading: false\n      });\n    }\n  });\n  return children({\n    onClick: () => {\n      handleRaffleClick();\n    },\n    isLoading: accountState.isLoading\n  });\n};\nexport {\n  RaffleButtonWithAccountIntegration\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { addPropertyControls, ControlType } from \"framer\";\nimport { useMemo, useCallback, useEffect, useRef } from \"react\";\nimport \"../../../node_modules/@firebase/analytics/dist/esm/index.esm2017.js\";\nimport \"../../../node_modules/firebase/app/dist/esm/index.esm.js\";\nimport { useCurrentUser } from \"../../../hooks/useCurrentUser.js\";\nimport { isContentOrigin } from \"../../../utils/location.js\";\nimport \"../../../node_modules/@29cm/snowplow/dist/esm/core/snowplow.js\";\nimport \"../../../node_modules/swr/core/dist/index.js\";\nimport \"../../../apis/user-segment/CategoryFirstOrderApiService.js\";\nimport \"../../../config/index.js\";\nimport \"../../../node_modules/js-cookie/dist/js.cookie.js\";\nimport \"../../../apis/highlight-products/HighlightProductsApiService.js\";\nimport \"../../../apis/brand-mix/BrandMixApiService.js\";\nimport \"../../../apis/one-brand-days/OneBrandDaysApiService.js\";\nimport \"../../../apis/taste-sharing/TasteSharingApiService.js\";\nimport \"../../../apis/user/UserApiService.js\";\nimport \"../../../apis/preuser/PreuserApiService.js\";\nimport \"../../../node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.js\";\nimport \"../../../node_modules/swr/mutation/dist/index.js\";\nimport \"../../../hooks/stores/content/content.store.js\";\nimport \"../../../hooks/stores/dialog/dialog.store.js\";\nimport \"../../../hooks/stores/global-layout/global-layout.store.js\";\nimport \"../../../hooks/stores/toast/toast.store.js\";\nimport \"../../@shared/providers/ThemeProvider/ThemeProvider.js\";\nimport \"../../@shared/providers/BreakpointProvider/BreakpointProvider.js\";\nimport \"../../../hooks/stores/bottom-sheet/bottom-sheet.store.js\";\nimport \"react-dom\";\nimport \"../Dialog/Dialog.module.css.js\";\nimport \"framer-motion\";\nimport \"../../../containers/DialogContainer/DialogContainer.emitter.js\";\nimport \"../../../hooks/useFeatureFlag.js\";\nimport \"../../../utils/redirectLogin.js\";\nimport \"../../../utils/event-properties/source.js\";\nimport { SWRErrorBoundary } from \"../../@shared/SWRErrorBoundary/SWRErrorBoundary.js\";\nimport { Button as Default } from \"../../@shared/Button/Button.js\";\nimport \"../curations/IntersectionProvider/IntersectionProvider.js\";\nimport { useIntersectionContext } from \"../curations/IntersectionProvider/IntersectionProvider.hooks.js\";\nimport { useFetchRaffleData } from \"./hooks/useFetchRaffleData.js\";\nimport { useRaffleStatus } from \"./hooks/useRaffleStatus.js\";\nimport { useRaffleActions } from \"./hooks/useRaffleActions.js\";\nimport { getCurrentRaffle, reshapeRaffleButtonProps } from \"./RaffleButton.utils.js\";\nimport { RaffleStatus } from \"./RaffleButton.types.js\";\nimport { BUTTON_VARIANT_CONTROLS, BUTTON_THEME_CONTROLS, BUTTON_SIZE_CONTROLS, BUTTON_FILL_CONTROLS } from \"../../../libs/property-controls/button.js\";\nimport { SectionLayout } from \"../curations/SectionLayout/SectionLayout.js\";\nimport { useComponentId } from \"../curations/EventTrackingProvider/EventTrackingProvider.hooks.js\";\nimport \"../curations/EventTrackingProvider/EventTrackingProvider.js\";\nimport { COMPONENT_ID_PROPS } from \"../../../libs/property-controls/component-id.js\";\nimport { useTrackSnowplowEvent } from \"../../../hooks/snowplow/useTrackSnowplowEvent.js\";\nimport { RaffleModalProvider } from \"./providers/RaffleModalProvider.js\";\nimport { RaffleButtonWithAccountIntegration } from \"./components/RaffleButtonWithAccountIntegration.js\";\nconst RaffleButtonInner = ({\n  raffleGroupId,\n  raffleId,\n  button\n}) => {\n  const {\n    isInView\n  } = useIntersectionContext();\n  const {\n    logged\n  } = useCurrentUser();\n  const trackSnowplowEvent = useTrackSnowplowEvent();\n  const {\n    raffleGroup,\n    displayInformation,\n    isPending,\n    revalidateDisplayInformation\n  } = useFetchRaffleData({\n    raffleGroupId,\n    raffleId,\n    enabled: isInView,\n    shouldFetchDisplayInformation: logged && isContentOrigin()\n  });\n  const currentRaffle = useMemo(() => getCurrentRaffle((raffleGroup == null ? void 0 : raffleGroup.raffleList) ?? [], raffleId), [raffleGroup, raffleId]);\n  const status = useRaffleStatus(currentRaffle);\n  const {\n    buttonText,\n    disabled,\n    ...buttonProps\n  } = reshapeRaffleButtonProps({\n    status,\n    props: button,\n    raffle: currentRaffle,\n    displayInformation\n  });\n  const componentId = useComponentId();\n  const handleImpression = useCallback(() => {\n    trackSnowplowEvent(\"impression_content\", {\n      section_name: componentId,\n      section_title: componentId,\n      position: -1,\n      layout_position: -1,\n      layout_id: `raffle_${raffleId}`\n    });\n  }, [componentId, raffleId, trackSnowplowEvent]);\n  const {\n    handleClick\n  } = useRaffleActions({\n    raffleGroupId,\n    raffleId,\n    raffle: currentRaffle,\n    status,\n    onSuccess: () => {\n      revalidateDisplayInformation();\n    }\n  });\n  useEffect(() => {\n    if (!isInView) {\n      return;\n    }\n    handleImpression();\n  }, [handleImpression, isInView]);\n  const buttonRef = useRef(null);\n  const enableAccountIntegration = status === RaffleStatus.InProgress;\n  return /* @__PURE__ */ jsx(RaffleModalProvider, { raffleGroupId, raffleId, originalRaffleHandler: handleClick({\n    componentId,\n    buttonText\n  }), elementRef: buttonRef, revalidateDisplayInformation, children: /* @__PURE__ */ jsx(RaffleButtonWithAccountIntegration, { enableAccountIntegration, children: ({\n    onClick,\n    isLoading\n  }) => /* @__PURE__ */ jsx(Default, { ...buttonProps, onClick, pending: isPending || status === RaffleStatus.Unknown || isLoading, disabled, ref: buttonRef, children: buttonText }) }) });\n};\nconst RedoButton = ({\n  button,\n  onClick\n}) => {\n  return /* @__PURE__ */ jsx(Default, { ...button, onClick, prefixIcon: \"redo\", children: \"새로고침\" });\n};\nconst RaffleButton = ({\n  componentId,\n  ...props\n}) => {\n  return /* @__PURE__ */ jsx(SectionLayout, { componentId, intersectionOptions: {\n    margin: \"700px 200px\"\n  }, children: /* @__PURE__ */ jsx(SWRErrorBoundary, { fallback: (retry) => /* @__PURE__ */ jsx(RedoButton, { button: props.button, onClick: retry }), children: /* @__PURE__ */ jsx(RaffleButtonInner, { ...props }) }) });\n};\naddPropertyControls(RaffleButton, {\n  raffleGroupId: {\n    type: ControlType.String,\n    title: \"래플 그룹 ID\",\n    placeholder: \"래플 그룹 ID\"\n  },\n  raffleId: {\n    type: ControlType.String,\n    title: \"래플 ID\",\n    placeholder: \"래플 ID\"\n  },\n  ...COMPONENT_ID_PROPS,\n  button: {\n    type: ControlType.Object,\n    title: \"버튼 옵션\",\n    controls: {\n      ...BUTTON_VARIANT_CONTROLS,\n      ...BUTTON_THEME_CONTROLS,\n      ...BUTTON_SIZE_CONTROLS,\n      ...BUTTON_FILL_CONTROLS\n    }\n  }\n});\nexport {\n  RaffleButton\n};\n","/** local */// import { RaffleButton } from \"https://localhost:4173/components/systems/RaffleButton/RaffleButton.js\"\n/** dev */// import { RaffleButton } from \"https://asset.29cm.co.kr/contents/framer/dev/components/systems/RaffleButton/RaffleButton.js\"\n/** production */import{RaffleButton}from\"https://asset.29cm.co.kr/contents/framer/components/systems/RaffleButton/RaffleButton.js\";/**\n * @framerDisableUnlink\n */export default RaffleButton;\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"RaffleButton\",\"slots\":[],\"annotations\":{\"framerDisableUnlink\":\"\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./RaffleButton.map"],"x_google_ignoreList":[11,13,14,15,16,17,18,19,20,21],"mappings":"8qDAAiE,KAChB,EAC3C,GAAqC,6BACrC,IAAwC,EAAe,IAAa,CACxE,IAAM,EAAU,EAAQ,GAAkB,EAAQ,EAC5C,CACJ,OACA,YACA,QACA,UACE,GAAW,EAAU,CAAC,GAAoC,EAAe,CAAQ,EAAI,SAAY,EAAU,4BAA4B,EAAe,CAAQ,CAAC,EAC7J,EAAY,GAAa,CAAC,EAChC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kC,IACM,IACiC,IAC3B,IACF,IACF,IACc,IAChB,IACY,IACU,IACR,IAC1C,IACR,IACwB,IACpB,IACoD,IAC9B,IACD,IACU,IACtC,KAC4E,KACO,EAC5F,OAAkC,CACtC,GAAM,CACJ,kBACE,GAAa,EACX,EAAqB,GAAsB,EAuBjD,MAAO,CACL,wBAvB+B,GAAa,CAC5C,EAAe,eAAgB,CAC7B,YAAa,SACb,mBAAoB,CACtB,CAAC,CACH,EAmBE,wBAlB8B,CAC9B,aACA,cACA,cACI,CACJ,EAAmB,eAAgB,CAEjC,aAAc,EACd,cAAe,EACf,SAAU,GACV,gBAAiB,GACjB,UAAW,UAAU,IACrB,YAAa,CACf,CAAC,EACD,GAAsB,EAAU,CAAU,CAC5C,CAIA,CACF,+BC/DuD,IACzC,IACiE,IACX,IACZ,IACc,IAClC,IACyB,IACc,IAClB,IACS,IACD,IACjB,IACM,IACiC,IACxE,IAC2D,IACd,IACF,IACF,IACc,IAChB,IACY,IACU,IACR,IAC1C,IACR,IACwB,IACpB,IACoD,IAC9B,IACD,IACU,KACW,KACE,KACoC,KAClC,EAC9D,GAAkB,CACtB,MAAO,CACL,SAAU,mBACV,UAAW,gBACb,EACA,YAAa,CACX,SAAU,uBACV,UAAW,6BACb,CACF,EACM,IAAoB,CACxB,gBACA,WACA,SACA,SACA,eACI,CACJ,IAAM,EAAY,GAAa,EACzB,EAAyB,GAAsB,CACnD,gBACA,WACA,WAAY,eACZ,SAAW,GAAiC,iBAAoB,IAAK,EACvE,CAAC,EACK,EAAwB,GAAsB,CAClD,gBACA,WACA,WAAY,aACd,CAAC,EACK,CACJ,KAAM,GACJ,GAAmB,EACjB,CACJ,0BACA,0BACE,GAA0B,EACxB,MAA4B,CAChC,EAAwB,CAAQ,CAClC,EACM,EAAkB,IAAW,EAAa,QAC1C,MAAsB,CAC1B,EAAU,EACV,EAAoB,CAClB,MAAO,GAAwB,CAAM,EACrC,YAAa,GAA8B,CAAM,EACjD,UAAW,CACb,CAAC,CAC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CAAC,EAA0B,CAC7B,EAAsB,EACtB,MACF,CACA,EAAmB,CACjB,UAAW,EACb,CAAC,EACD,GAAI,CAEF,GAAI,MADgB,EAAW,EAE7B,EAAsB,MACjB,CACL,GAAI,GAA0B,EAAG,CAC/B,EAAsB,EACtB,MACF,CACA,EAAmB,CACjB,eAAgB,GAChB,YAAa,EACf,CAAC,CACH,CACF,MAAgB,CACd,EAAsB,CACxB,QAAU,CACR,EAAmB,CACjB,UAAW,EACb,CAAC,CACH,CACF,CAAC,EACD,OAAO,EAAS,CACd,YAAe,CACb,EAAkB,CACpB,EACA,UAAW,EAAa,SAC1B,CAAC,CACH,2BCtFuC,IACkB,IACM,IACa,IACX,KACA,KACL,IACW,IAClB,IACc,IAClC,IACyB,IACc,IAClB,IACS,IACD,IACjB,IACM,IACiC,IAC3B,IACF,IACF,IACc,IAChB,IACY,IACU,IACR,IAC/C,IACqB,IACjB,IACiD,IAC9B,IACD,IACU,KACmC,KACnB,KACA,KACsC,KACtC,KACN,KACE,KACsB,KAC9B,KACgG,KAC3E,KACuB,KAC9B,KACgB,KACI,IAChB,KAC+B,EACjG,IAAqB,CACzB,gBACA,WACA,YACI,CACJ,GAAM,CACJ,YACE,GAAuB,EACrB,CACJ,UACE,GAAe,EACb,EAAqB,GAAsB,EAC3C,CACJ,cACA,qBACA,YACA,gCACE,GAAmB,CACrB,gBACA,WACA,QAAS,EACT,8BAA+B,GAAU,GAAgB,CAC3D,CAAC,EACK,EAAgBC,MAAc,GAAkB,GAA2C,YAAe,CAAC,EAAG,CAAQ,EAAG,CAAC,EAAa,CAAQ,CAAC,EAChJ,EAAS,GAAgB,CAAa,EACtC,CACJ,aACA,WACA,GAAG,GACD,GAAyB,CAC3B,SACA,MAAO,EACP,OAAQ,EACR,oBACF,CAAC,EACK,EAAc,GAAe,EAC7B,EAAmBC,MAAkB,CACzC,EAAmB,qBAAsB,CACvC,aAAc,EACd,cAAe,EACf,SAAU,GACV,gBAAiB,GACjB,UAAW,UAAU,G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