{"version":3,"file":"CouponModule.eHBeFfa-.mjs","names":["clamp","platform","computePosition","x","autoPlacement","d","a","shift","min","max","clamp","css","css","x","window","useRef","x","useState","useRef","createContext","Root","forwardRef","useRef","useState","containerStyle","useContext","forwardRef","useState","css","List","forwardRef","useState","containerStyle","Panel","Trigger","forwardRef","containerStyle","createContext","Root","forwardRef","useContext","containerStyle","Fragment","forwardRef","a$1","useCallback","useMemo","a","forwardRef","t","l","p","forwardRef","Item","forwardRef","Fragment","useMemo","attachAdditionalQuery","x","format","offset","x","x","useMemo","useReducer","useState","wrapperStyle","format","createContext","Root","forwardRef","useCallback","containerStyle","skeletonStyle","skeletonStyleByTheme","x","useContext","forwardRef","forwardRef","containerStyle","forwardRef","containerStyle","containerStyleByLayout","forwardRef","forwardRef","downloadCoupons","createContext","withStyle","forwardRef","classNames","useState","useContext","withStyle","forwardRef","classNames","withStyle","forwardRef","classNames","forwardRef","sortCouponsByDiscountValueAscending","x","useMemo","useState","x","useState","useMemo","useRef","Fragment","COUPON_CONTROLS","x"],"sources":["https:/asset.29cm.co.kr/contents/framer/components/@shared/icons/PlusIcon.js","https:/asset.29cm.co.kr/contents/framer/components/systems/PinProductBannerV2/PinProductBannerV2.constants.effect.js","https:/asset.29cm.co.kr/contents/framer/node_modules/@floating-ui/utils/dist/floating-ui.utils.js","https:/asset.29cm.co.kr/contents/framer/node_modules/@floating-ui/core/dist/floating-ui.core.js","https:/asset.29cm.co.kr/contents/framer/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js","https:/asset.29cm.co.kr/contents/framer/node_modules/@floating-ui/dom/dist/floating-ui.dom.js","https:/asset.29cm.co.kr/contents/framer/hooks/useComputeFloatingPosition.js","https:/asset.29cm.co.kr/contents/framer/hooks/useOutsideClick.js","https:/asset.29cm.co.kr/contents/framer/components/systems/PinProductBannerV2/PinProductBannerV2.hooks.event.js","https:/asset.29cm.co.kr/contents/framer/components/systems/PinProductBannerV2/PinProductBannerV2.hooks.js","https:/asset.29cm.co.kr/contents/framer/components/systems/PinProductBannerV2/PinProductBannerV2.module.css.js","https:/asset.29cm.co.kr/contents/framer/components/systems/PinProductBannerV2/PinProductBannerV2.js","https:/framerusercontent.com/modules/4gBB3FGqrvzyxmz8kQhP/sy94cNAaDGLYG1eHXw27/PinProductCard.js","https:/asset.29cm.co.kr/contents/framer/components/modules/TagsModule/TagsModule.types.js","https:/asset.29cm.co.kr/contents/framer/utils/getRestScrollWidth.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/DraggableTabs/Root.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/DraggableTabs/Root.hooks.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/DraggableTabs/Gradient.js","https:/asset.29cm.co.kr/contents/framer/utils/closest.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/DraggableTabs/List.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/DraggableTabs/Panel.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/DraggableTabs/Trigger.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/DraggableTabs/index.js","https:/asset.29cm.co.kr/contents/framer/components/systems/curations/Tags/Root.js","https:/asset.29cm.co.kr/contents/framer/components/systems/curations/Tags/Root.hooks.js","https:/asset.29cm.co.kr/contents/framer/components/systems/curations/Tags/List.js","https:/asset.29cm.co.kr/contents/framer/node_modules/@29cm/ruler-ui/dist/components/Tag/Tag.styles.js","https:/asset.29cm.co.kr/contents/framer/node_modules/@29cm/ruler-ui/dist/components/Tag/useTag.js","https:/asset.29cm.co.kr/contents/framer/node_modules/@29cm/ruler-ui/dist/components/Tag/ToggleTag/ToggleTag.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/TagSkeleton/TagSkeleton.js","https:/asset.29cm.co.kr/contents/framer/components/systems/curations/Tags/Item.js","https:/asset.29cm.co.kr/contents/framer/components/systems/curations/Tags/Panels.js","https:/asset.29cm.co.kr/contents/framer/components/systems/curations/Tags/Panel.js","https:/asset.29cm.co.kr/contents/framer/components/systems/curations/Tags/index.js","https:/asset.29cm.co.kr/contents/framer/components/modules/TagsModule/TagsElement/TagsElement.js","https:/asset.29cm.co.kr/contents/framer/apis/brand-curation/BrandCurationApiService.js","https:/asset.29cm.co.kr/contents/framer/apis/collection/CollectionApiService.js","https:/asset.29cm.co.kr/contents/framer/node_modules/date-fns/locale/ko/_lib/formatDistance.js","https:/asset.29cm.co.kr/contents/framer/node_modules/date-fns/locale/ko/_lib/formatLong.js","https:/asset.29cm.co.kr/contents/framer/node_modules/date-fns/locale/ko/_lib/formatRelative.js","https:/asset.29cm.co.kr/contents/framer/node_modules/date-fns/locale/ko/_lib/localize.js","https:/asset.29cm.co.kr/contents/framer/node_modules/date-fns/locale/ko/_lib/match.js","https:/asset.29cm.co.kr/contents/framer/node_modules/date-fns/locale/ko.js","https:/asset.29cm.co.kr/contents/framer/components/systems/curations/KeywordCollectionV2/TimeSaleCollectionTags/TimeSaleCollectionTags.utils.js","https:/asset.29cm.co.kr/contents/framer/components/modules/utils/facet.js","https:/asset.29cm.co.kr/contents/framer/components/systems/KeywordCollection/KeywordCollectionTags/KeywordCollectionTags.utils.js","https:/asset.29cm.co.kr/contents/framer/node_modules/date-fns/subDays.js","https:/asset.29cm.co.kr/contents/framer/node_modules/date-fns/subMonths.js","https:/asset.29cm.co.kr/contents/framer/node_modules/date-fns/sub.js","https:/asset.29cm.co.kr/contents/framer/node_modules/date-fns/formatISO.js","https:/asset.29cm.co.kr/contents/framer/components/systems/curations/KeywordCollectionV2/TimeSaleCollection.utils.js","https:/asset.29cm.co.kr/contents/framer/components/systems/curations/CouponCollection/CalendarTags/CalendarTags.utils.js","https:/asset.29cm.co.kr/contents/framer/components/modules/TagsModule/TagsModule.utils.js","https:/asset.29cm.co.kr/contents/framer/components/modules/TagsModule/TagsModule.hooks.js","https:/asset.29cm.co.kr/contents/framer/components/modules/TagsModule/AutoTagsModule/AutoTagsModule.js","https:/asset.29cm.co.kr/contents/framer/components/modules/TagsModule/TagsModule.controls.js","https:/asset.29cm.co.kr/contents/framer/components/modules/TagsModule/LinkedTagsModule/LinkedTagsModule.utils.js","https:/asset.29cm.co.kr/contents/framer/components/modules/TagsModule/LinkedTagsModule/LinkedTagsModule.js","https:/asset.29cm.co.kr/contents/framer/components/modules/TagsModule/TagsModule.js","https:/framerusercontent.com/modules/LcoSbbUQzAWYrkTx3Hyi/yfr8qKY2xRRK7cInEyBA/TagsModule.js","https:/framerusercontent.com/modules/NEd4VmDdsxM3StIUbddO/1de6WpgIbCrKkRcPfQcW/YouTube.js","https:/asset.29cm.co.kr/contents/framer/libs/property-controls/coupon.js","https:/asset.29cm.co.kr/contents/framer/utils/object.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/Coupon/Root.constants.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/Coupon/Root.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/Coupon/Root.hooks.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/Coupon/Description.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/Coupon/Divider.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/Coupon/Button.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/Coupon/Summary.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/Coupon/Title.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/Coupon/index.js","https:/asset.29cm.co.kr/contents/framer/utils/error/error.js","https:/asset.29cm.co.kr/contents/framer/utils/error/sentry.js","https:/asset.29cm.co.kr/contents/framer/apis/coupon/CouponApiService.js","https:/asset.29cm.co.kr/contents/framer/hooks/fetchers/useFetchCouponsDownloadStatus.js","https:/asset.29cm.co.kr/contents/framer/hooks/mutations/useDownloadCouponsMutation.js","https:/asset.29cm.co.kr/contents/framer/components/canvas/CouponDownloadCTA/CouponDownloadCTA.constants.js","https:/asset.29cm.co.kr/contents/framer/hooks/mutations/useDownloadRandomCouponMutation.js","https:/asset.29cm.co.kr/contents/framer/hooks/useDownloadCoupons.js","https:/asset.29cm.co.kr/contents/framer/components/modules/CouponModule/CouponModule.utils.js","https:/asset.29cm.co.kr/contents/framer/components/modules/CouponModule/CouponModule.hooks.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/FoldableList/Root.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/FoldableList/Root.hooks.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/FoldableList/Content.hooks.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/FoldableList/Content.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/FoldableList/Root.constants.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/FoldableList/Item.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/FoldableList/Trigger.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/FoldableList/index.js","https:/asset.29cm.co.kr/contents/framer/components/modules/CouponModule/NoticesElement/NoticesElement.utils.js","https:/asset.29cm.co.kr/contents/framer/components/modules/CouponModule/NoticesElement/NoticesElement.js","https:/asset.29cm.co.kr/contents/framer/components/systems/RandomDiscountValue/RandomDiscountValue.js","https:/asset.29cm.co.kr/contents/framer/components/modules/CouponModule/CouponElement/CouponElement.utils.js","https:/asset.29cm.co.kr/contents/framer/components/modules/CouponModule/CouponElement/CouponElement.hooks.js","https:/asset.29cm.co.kr/contents/framer/components/modules/CouponModule/CouponElement/CouponElement.validate.js","https:/asset.29cm.co.kr/contents/framer/components/modules/CouponModule/CouponElement/CouponElement.js","https:/asset.29cm.co.kr/contents/framer/components/modules/CouponModule/LinkedCouponModule/LinkedCouponModule.js","https:/asset.29cm.co.kr/contents/framer/libs/property-controls/coupon-notices.js","https:/asset.29cm.co.kr/contents/framer/components/modules/CouponModule/CouponModule.controls.js","https:/asset.29cm.co.kr/contents/framer/components/modules/CouponModule/AutoCouponModule/AutoCouponModule.hooks.js","https:/asset.29cm.co.kr/contents/framer/components/modules/CouponModule/AutoCouponModule/AutoCouponModule.js","https:/asset.29cm.co.kr/contents/framer/components/modules/CouponModule/CouponModule.js","https:/framerusercontent.com/modules/v2w1uRsZPJslVNIRLCeW/PgjboXO18lboOdhFrAoz/CouponModule.js"],"sourcesContent":["import { jsx } from \"react/jsx-runtime\";\nconst PlusIcon = ({\n  className\n}) => {\n  return /* @__PURE__ */ jsx(\"svg\", { className, style: {\n    width: \"16px\",\n    height: \"16px\"\n  }, xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 24 24\", children: /* @__PURE__ */ jsx(\"path\", { fill: \"#fff\", d: \"M13 3h-2v8H3v2h8v8h2v-8h8v-2h-8V3z\" }) });\n};\nexport {\n  PlusIcon\n};\n","const TYPE_SPRING_TRANSITION = {\n  type: \"spring\",\n  stiffness: 400,\n  damping: 30,\n  mass: 1\n};\nconst PIN_BUTTON_HOVER_EFFECT = {\n  scale: 1.2,\n  transition: TYPE_SPRING_TRANSITION\n};\nconst PIN_BUTTON_TAP_EFFECT = {\n  scale: 0.9,\n  transition: TYPE_SPRING_TRANSITION\n};\nconst PRODUCT_BANNER_EFFECT = {\n  animate: {\n    opacity: 1\n  },\n  exit: {\n    opacity: 0\n  },\n  transition: TYPE_SPRING_TRANSITION\n};\nconst PRODUCT_BANNER_EFFECT_INITIAL = {\n  opacity: 0\n};\nexport {\n  PIN_BUTTON_HOVER_EFFECT,\n  PIN_BUTTON_TAP_EFFECT,\n  PRODUCT_BANNER_EFFECT,\n  PRODUCT_BANNER_EFFECT_INITIAL,\n  TYPE_SPRING_TRANSITION\n};\n","const sides = [\"top\", \"right\", \"bottom\", \"left\"];\nconst alignments = [\"start\", \"end\"];\nconst placements = /* @__PURE__ */ sides.reduce((acc, side) => acc.concat(side, side + \"-\" + alignments[0], side + \"-\" + alignments[1]), []);\nconst min = Math.min;\nconst max = Math.max;\nconst round = Math.round;\nconst createCoords = (v) => ({\n  x: v,\n  y: v\n});\nconst oppositeSideMap = {\n  left: \"right\",\n  right: \"left\",\n  bottom: \"top\",\n  top: \"bottom\"\n};\nconst oppositeAlignmentMap = {\n  start: \"end\",\n  end: \"start\"\n};\nfunction clamp(start, value, end) {\n  return max(start, min(value, end));\n}\nfunction evaluate(value, param) {\n  return typeof value === \"function\" ? value(param) : value;\n}\nfunction getSide(placement) {\n  return placement.split(\"-\")[0];\n}\nfunction getAlignment(placement) {\n  return placement.split(\"-\")[1];\n}\nfunction getOppositeAxis(axis) {\n  return axis === \"x\" ? \"y\" : \"x\";\n}\nfunction getAxisLength(axis) {\n  return axis === \"y\" ? \"height\" : \"width\";\n}\nfunction getSideAxis(placement) {\n  return [\"top\", \"bottom\"].includes(getSide(placement)) ? \"y\" : \"x\";\n}\nfunction getAlignmentAxis(placement) {\n  return getOppositeAxis(getSideAxis(placement));\n}\nfunction getAlignmentSides(placement, rects, rtl) {\n  if (rtl === void 0) {\n    rtl = false;\n  }\n  const alignment = getAlignment(placement);\n  const alignmentAxis = getAlignmentAxis(placement);\n  const length = getAxisLength(alignmentAxis);\n  let mainAlignmentSide = alignmentAxis === \"x\" ? alignment === (rtl ? \"end\" : \"start\") ? \"right\" : \"left\" : alignment === \"start\" ? \"bottom\" : \"top\";\n  if (rects.reference[length] > rects.floating[length]) {\n    mainAlignmentSide = getOppositePlacement(mainAlignmentSide);\n  }\n  return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];\n}\nfunction getOppositeAlignmentPlacement(placement) {\n  return placement.replace(/start|end/g, (alignment) => oppositeAlignmentMap[alignment]);\n}\nfunction getOppositePlacement(placement) {\n  return placement.replace(/left|right|bottom|top/g, (side) => oppositeSideMap[side]);\n}\nfunction expandPaddingObject(padding) {\n  return {\n    top: 0,\n    right: 0,\n    bottom: 0,\n    left: 0,\n    ...padding\n  };\n}\nfunction getPaddingObject(padding) {\n  return typeof padding !== \"number\" ? expandPaddingObject(padding) : {\n    top: padding,\n    right: padding,\n    bottom: padding,\n    left: padding\n  };\n}\nfunction rectToClientRect(rect) {\n  return {\n    ...rect,\n    top: rect.y,\n    left: rect.x,\n    right: rect.x + rect.width,\n    bottom: rect.y + rect.height\n  };\n}\nexport {\n  alignments,\n  clamp,\n  createCoords,\n  evaluate,\n  expandPaddingObject,\n  getAlignment,\n  getAlignmentAxis,\n  getAlignmentSides,\n  getAxisLength,\n  getOppositeAlignmentPlacement,\n  getOppositeAxis,\n  getOppositePlacement,\n  getPaddingObject,\n  getSide,\n  getSideAxis,\n  max,\n  min,\n  placements,\n  rectToClientRect,\n  round,\n  sides\n};\n","import { evaluate, placements, getAlignmentSides, getSide, getAlignment, getSideAxis, clamp, getAlignmentAxis, getPaddingObject, rectToClientRect, getOppositeAlignmentPlacement, getOppositeAxis, getAxisLength } from \"../../utils/dist/floating-ui.utils.js\";\nfunction computeCoordsFromPlacement(_ref, placement, rtl) {\n  let {\n    reference,\n    floating\n  } = _ref;\n  const sideAxis = getSideAxis(placement);\n  const alignmentAxis = getAlignmentAxis(placement);\n  const alignLength = getAxisLength(alignmentAxis);\n  const side = getSide(placement);\n  const isVertical = sideAxis === \"y\";\n  const commonX = reference.x + reference.width / 2 - floating.width / 2;\n  const commonY = reference.y + reference.height / 2 - floating.height / 2;\n  const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;\n  let coords;\n  switch (side) {\n    case \"top\":\n      coords = {\n        x: commonX,\n        y: reference.y - floating.height\n      };\n      break;\n    case \"bottom\":\n      coords = {\n        x: commonX,\n        y: reference.y + reference.height\n      };\n      break;\n    case \"right\":\n      coords = {\n        x: reference.x + reference.width,\n        y: commonY\n      };\n      break;\n    case \"left\":\n      coords = {\n        x: reference.x - floating.width,\n        y: commonY\n      };\n      break;\n    default:\n      coords = {\n        x: reference.x,\n        y: reference.y\n      };\n  }\n  switch (getAlignment(placement)) {\n    case \"start\":\n      coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);\n      break;\n    case \"end\":\n      coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);\n      break;\n  }\n  return coords;\n}\nconst computePosition = async (reference, floating, config) => {\n  const {\n    placement = \"bottom\",\n    strategy = \"absolute\",\n    middleware = [],\n    platform\n  } = config;\n  const validMiddleware = middleware.filter(Boolean);\n  const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));\n  let rects = await platform.getElementRects({\n    reference,\n    floating,\n    strategy\n  });\n  let {\n    x,\n    y\n  } = computeCoordsFromPlacement(rects, placement, rtl);\n  let statefulPlacement = placement;\n  let middlewareData = {};\n  let resetCount = 0;\n  for (let i = 0; i < validMiddleware.length; i++) {\n    const {\n      name,\n      fn\n    } = validMiddleware[i];\n    const {\n      x: nextX,\n      y: nextY,\n      data,\n      reset\n    } = await fn({\n      x,\n      y,\n      initialPlacement: placement,\n      placement: statefulPlacement,\n      strategy,\n      middlewareData,\n      rects,\n      platform,\n      elements: {\n        reference,\n        floating\n      }\n    });\n    x = nextX != null ? nextX : x;\n    y = nextY != null ? nextY : y;\n    middlewareData = {\n      ...middlewareData,\n      [name]: {\n        ...middlewareData[name],\n        ...data\n      }\n    };\n    if (reset && resetCount <= 50) {\n      resetCount++;\n      if (typeof reset === \"object\") {\n        if (reset.placement) {\n          statefulPlacement = reset.placement;\n        }\n        if (reset.rects) {\n          rects = reset.rects === true ? await platform.getElementRects({\n            reference,\n            floating,\n            strategy\n          }) : reset.rects;\n        }\n        ({\n          x,\n          y\n        } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));\n      }\n      i = -1;\n    }\n  }\n  return {\n    x,\n    y,\n    placement: statefulPlacement,\n    strategy,\n    middlewareData\n  };\n};\nasync function detectOverflow(state, options) {\n  var _await$platform$isEle;\n  if (options === void 0) {\n    options = {};\n  }\n  const {\n    x,\n    y,\n    platform,\n    rects,\n    elements,\n    strategy\n  } = state;\n  const {\n    boundary = \"clippingAncestors\",\n    rootBoundary = \"viewport\",\n    elementContext = \"floating\",\n    altBoundary = false,\n    padding = 0\n  } = evaluate(options, state);\n  const paddingObject = getPaddingObject(padding);\n  const altContext = elementContext === \"floating\" ? \"reference\" : \"floating\";\n  const element = elements[altBoundary ? altContext : elementContext];\n  const clippingClientRect = rectToClientRect(await platform.getClippingRect({\n    element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating)),\n    boundary,\n    rootBoundary,\n    strategy\n  }));\n  const rect = elementContext === \"floating\" ? {\n    ...rects.floating,\n    x,\n    y\n  } : rects.reference;\n  const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));\n  const offsetScale = await (platform.isElement == null ? void 0 : platform.isElement(offsetParent)) ? await (platform.getScale == null ? void 0 : platform.getScale(offsetParent)) || {\n    x: 1,\n    y: 1\n  } : {\n    x: 1,\n    y: 1\n  };\n  const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({\n    elements,\n    rect,\n    offsetParent,\n    strategy\n  }) : rect);\n  return {\n    top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,\n    bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,\n    left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,\n    right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x\n  };\n}\nfunction getPlacementList(alignment, autoAlignment, allowedPlacements) {\n  const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter((placement) => getAlignment(placement) === alignment), ...allowedPlacements.filter((placement) => getAlignment(placement) !== alignment)] : allowedPlacements.filter((placement) => getSide(placement) === placement);\n  return allowedPlacementsSortedByAlignment.filter((placement) => {\n    if (alignment) {\n      return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);\n    }\n    return true;\n  });\n}\nconst autoPlacement = function(options) {\n  if (options === void 0) {\n    options = {};\n  }\n  return {\n    name: \"autoPlacement\",\n    options,\n    async fn(state) {\n      var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;\n      const {\n        rects,\n        middlewareData,\n        placement,\n        platform,\n        elements\n      } = state;\n      const {\n        crossAxis = false,\n        alignment,\n        allowedPlacements = placements,\n        autoAlignment = true,\n        ...detectOverflowOptions\n      } = evaluate(options, state);\n      const placements$1 = alignment !== void 0 || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;\n      const overflow = await detectOverflow(state, detectOverflowOptions);\n      const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;\n      const currentPlacement = placements$1[currentIndex];\n      if (currentPlacement == null) {\n        return {};\n      }\n      const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));\n      if (placement !== currentPlacement) {\n        return {\n          reset: {\n            placement: placements$1[0]\n          }\n        };\n      }\n      const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];\n      const allOverflows = [...((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || [], {\n        placement: currentPlacement,\n        overflows: currentOverflows\n      }];\n      const nextPlacement = placements$1[currentIndex + 1];\n      if (nextPlacement) {\n        return {\n          data: {\n            index: currentIndex + 1,\n            overflows: allOverflows\n          },\n          reset: {\n            placement: nextPlacement\n          }\n        };\n      }\n      const placementsSortedByMostSpace = allOverflows.map((d) => {\n        const alignment2 = getAlignment(d.placement);\n        return [d.placement, alignment2 && crossAxis ? (\n          // Check along the mainAxis and main crossAxis side.\n          d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0)\n        ) : (\n          // Check only the mainAxis.\n          d.overflows[0]\n        ), d.overflows];\n      }).sort((a, b) => a[1] - b[1]);\n      const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter((d) => d[2].slice(\n        0,\n        // Aligned placements should not check their opposite crossAxis\n        // side.\n        getAlignment(d[0]) ? 2 : 3\n      ).every((v) => v <= 0));\n      const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];\n      if (resetPlacement !== placement) {\n        return {\n          data: {\n            index: currentIndex + 1,\n            overflows: allOverflows\n          },\n          reset: {\n            placement: resetPlacement\n          }\n        };\n      }\n      return {};\n    }\n  };\n};\nasync function convertValueToCoords(state, options) {\n  const {\n    placement,\n    platform,\n    elements\n  } = state;\n  const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n  const side = getSide(placement);\n  const alignment = getAlignment(placement);\n  const isVertical = getSideAxis(placement) === \"y\";\n  const mainAxisMulti = [\"left\", \"top\"].includes(side) ? -1 : 1;\n  const crossAxisMulti = rtl && isVertical ? -1 : 1;\n  const rawValue = evaluate(options, state);\n  let {\n    mainAxis,\n    crossAxis,\n    alignmentAxis\n  } = typeof rawValue === \"number\" ? {\n    mainAxis: rawValue,\n    crossAxis: 0,\n    alignmentAxis: null\n  } : {\n    mainAxis: 0,\n    crossAxis: 0,\n    alignmentAxis: null,\n    ...rawValue\n  };\n  if (alignment && typeof alignmentAxis === \"number\") {\n    crossAxis = alignment === \"end\" ? alignmentAxis * -1 : alignmentAxis;\n  }\n  return isVertical ? {\n    x: crossAxis * crossAxisMulti,\n    y: mainAxis * mainAxisMulti\n  } : {\n    x: mainAxis * mainAxisMulti,\n    y: crossAxis * crossAxisMulti\n  };\n}\nconst offset = function(options) {\n  if (options === void 0) {\n    options = 0;\n  }\n  return {\n    name: \"offset\",\n    options,\n    async fn(state) {\n      var _middlewareData$offse, _middlewareData$arrow;\n      const {\n        x,\n        y,\n        placement,\n        middlewareData\n      } = state;\n      const diffCoords = await convertValueToCoords(state, options);\n      if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n        return {};\n      }\n      return {\n        x: x + diffCoords.x,\n        y: y + diffCoords.y,\n        data: {\n          ...diffCoords,\n          placement\n        }\n      };\n    }\n  };\n};\nconst shift = function(options) {\n  if (options === void 0) {\n    options = {};\n  }\n  return {\n    name: \"shift\",\n    options,\n    async fn(state) {\n      const {\n        x,\n        y,\n        placement\n      } = state;\n      const {\n        mainAxis: checkMainAxis = true,\n        crossAxis: checkCrossAxis = false,\n        limiter = {\n          fn: (_ref) => {\n            let {\n              x: x2,\n              y: y2\n            } = _ref;\n            return {\n              x: x2,\n              y: y2\n            };\n          }\n        },\n        ...detectOverflowOptions\n      } = evaluate(options, state);\n      const coords = {\n        x,\n        y\n      };\n      const overflow = await detectOverflow(state, detectOverflowOptions);\n      const crossAxis = getSideAxis(getSide(placement));\n      const mainAxis = getOppositeAxis(crossAxis);\n      let mainAxisCoord = coords[mainAxis];\n      let crossAxisCoord = coords[crossAxis];\n      if (checkMainAxis) {\n        const minSide = mainAxis === \"y\" ? \"top\" : \"left\";\n        const maxSide = mainAxis === \"y\" ? \"bottom\" : \"right\";\n        const min = mainAxisCoord + overflow[minSide];\n        const max = mainAxisCoord - overflow[maxSide];\n        mainAxisCoord = clamp(min, mainAxisCoord, max);\n      }\n      if (checkCrossAxis) {\n        const minSide = crossAxis === \"y\" ? \"top\" : \"left\";\n        const maxSide = crossAxis === \"y\" ? \"bottom\" : \"right\";\n        const min = crossAxisCoord + overflow[minSide];\n        const max = crossAxisCoord - overflow[maxSide];\n        crossAxisCoord = clamp(min, crossAxisCoord, max);\n      }\n      const limitedCoords = limiter.fn({\n        ...state,\n        [mainAxis]: mainAxisCoord,\n        [crossAxis]: crossAxisCoord\n      });\n      return {\n        ...limitedCoords,\n        data: {\n          x: limitedCoords.x - x,\n          y: limitedCoords.y - y\n        }\n      };\n    }\n  };\n};\nexport {\n  autoPlacement,\n  computePosition,\n  detectOverflow,\n  offset,\n  rectToClientRect,\n  shift\n};\n","function getNodeName(node) {\n  if (isNode(node)) {\n    return (node.nodeName || \"\").toLowerCase();\n  }\n  return \"#document\";\n}\nfunction getWindow(node) {\n  var _node$ownerDocument;\n  return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;\n}\nfunction getDocumentElement(node) {\n  var _ref;\n  return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;\n}\nfunction isNode(value) {\n  return value instanceof Node || value instanceof getWindow(value).Node;\n}\nfunction isElement(value) {\n  return value instanceof Element || value instanceof getWindow(value).Element;\n}\nfunction isHTMLElement(value) {\n  return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;\n}\nfunction isShadowRoot(value) {\n  if (typeof ShadowRoot === \"undefined\") {\n    return false;\n  }\n  return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;\n}\nfunction isOverflowElement(element) {\n  const {\n    overflow,\n    overflowX,\n    overflowY,\n    display\n  } = getComputedStyle(element);\n  return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && ![\"inline\", \"contents\"].includes(display);\n}\nfunction isTableElement(element) {\n  return [\"table\", \"td\", \"th\"].includes(getNodeName(element));\n}\nfunction isContainingBlock(element) {\n  const webkit = isWebKit();\n  const css = getComputedStyle(element);\n  return css.transform !== \"none\" || css.perspective !== \"none\" || (css.containerType ? css.containerType !== \"normal\" : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== \"none\" : false) || !webkit && (css.filter ? css.filter !== \"none\" : false) || [\"transform\", \"perspective\", \"filter\"].some((value) => (css.willChange || \"\").includes(value)) || [\"paint\", \"layout\", \"strict\", \"content\"].some((value) => (css.contain || \"\").includes(value));\n}\nfunction getContainingBlock(element) {\n  let currentNode = getParentNode(element);\n  while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {\n    if (isContainingBlock(currentNode)) {\n      return currentNode;\n    } else {\n      currentNode = getParentNode(currentNode);\n    }\n  }\n  return null;\n}\nfunction isWebKit() {\n  if (typeof CSS === \"undefined\" || !CSS.supports)\n    return false;\n  return CSS.supports(\"-webkit-backdrop-filter\", \"none\");\n}\nfunction isLastTraversableNode(node) {\n  return [\"html\", \"body\", \"#document\"].includes(getNodeName(node));\n}\nfunction getComputedStyle(element) {\n  return getWindow(element).getComputedStyle(element);\n}\nfunction getNodeScroll(element) {\n  if (isElement(element)) {\n    return {\n      scrollLeft: element.scrollLeft,\n      scrollTop: element.scrollTop\n    };\n  }\n  return {\n    scrollLeft: element.pageXOffset,\n    scrollTop: element.pageYOffset\n  };\n}\nfunction getParentNode(node) {\n  if (getNodeName(node) === \"html\") {\n    return node;\n  }\n  const result = (\n    // Step into the shadow DOM of the parent of a slotted node.\n    node.assignedSlot || // DOM Element detected.\n    node.parentNode || // ShadowRoot detected.\n    isShadowRoot(node) && node.host || // Fallback.\n    getDocumentElement(node)\n  );\n  return isShadowRoot(result) ? result.host : result;\n}\nfunction getNearestOverflowAncestor(node) {\n  const parentNode = getParentNode(node);\n  if (isLastTraversableNode(parentNode)) {\n    return node.ownerDocument ? node.ownerDocument.body : node.body;\n  }\n  if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {\n    return parentNode;\n  }\n  return getNearestOverflowAncestor(parentNode);\n}\nfunction getOverflowAncestors(node, list, traverseIframes) {\n  var _node$ownerDocument2;\n  if (list === void 0) {\n    list = [];\n  }\n  if (traverseIframes === void 0) {\n    traverseIframes = true;\n  }\n  const scrollableAncestor = getNearestOverflowAncestor(node);\n  const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);\n  const win = getWindow(scrollableAncestor);\n  if (isBody) {\n    return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], win.frameElement && traverseIframes ? getOverflowAncestors(win.frameElement) : []);\n  }\n  return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));\n}\nexport {\n  getComputedStyle,\n  getContainingBlock,\n  getDocumentElement,\n  getNearestOverflowAncestor,\n  getNodeName,\n  getNodeScroll,\n  getOverflowAncestors,\n  getParentNode,\n  getWindow,\n  isContainingBlock,\n  isElement,\n  isHTMLElement,\n  isLastTraversableNode,\n  isNode,\n  isOverflowElement,\n  isShadowRoot,\n  isTableElement,\n  isWebKit\n};\n","import { autoPlacement as autoPlacement$1, shift as shift$1, computePosition as computePosition$1 } from \"../../core/dist/floating-ui.core.js\";\nimport { detectOverflow, offset } from \"../../core/dist/floating-ui.core.js\";\nimport { createCoords, round, max, min, rectToClientRect } from \"../../utils/dist/floating-ui.utils.js\";\nimport { getDocumentElement, isElement, isHTMLElement, getNodeName, isOverflowElement, getNodeScroll, getWindow, isTableElement, getComputedStyle, isContainingBlock, getContainingBlock, getOverflowAncestors, getParentNode, isLastTraversableNode, isWebKit } from \"../../utils/dist/floating-ui.utils.dom.js\";\nfunction getCssDimensions(element) {\n  const css = getComputedStyle(element);\n  let width = parseFloat(css.width) || 0;\n  let height = parseFloat(css.height) || 0;\n  const hasOffset = isHTMLElement(element);\n  const offsetWidth = hasOffset ? element.offsetWidth : width;\n  const offsetHeight = hasOffset ? element.offsetHeight : height;\n  const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;\n  if (shouldFallback) {\n    width = offsetWidth;\n    height = offsetHeight;\n  }\n  return {\n    width,\n    height,\n    $: shouldFallback\n  };\n}\nfunction unwrapElement(element) {\n  return !isElement(element) ? element.contextElement : element;\n}\nfunction getScale(element) {\n  const domElement = unwrapElement(element);\n  if (!isHTMLElement(domElement)) {\n    return createCoords(1);\n  }\n  const rect = domElement.getBoundingClientRect();\n  const {\n    width,\n    height,\n    $\n  } = getCssDimensions(domElement);\n  let x = ($ ? round(rect.width) : rect.width) / width;\n  let y = ($ ? round(rect.height) : rect.height) / height;\n  if (!x || !Number.isFinite(x)) {\n    x = 1;\n  }\n  if (!y || !Number.isFinite(y)) {\n    y = 1;\n  }\n  return {\n    x,\n    y\n  };\n}\nconst noOffsets = /* @__PURE__ */ createCoords(0);\nfunction getVisualOffsets(element) {\n  const win = getWindow(element);\n  if (!isWebKit() || !win.visualViewport) {\n    return noOffsets;\n  }\n  return {\n    x: win.visualViewport.offsetLeft,\n    y: win.visualViewport.offsetTop\n  };\n}\nfunction shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {\n  if (isFixed === void 0) {\n    isFixed = false;\n  }\n  if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {\n    return false;\n  }\n  return isFixed;\n}\nfunction getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {\n  if (includeScale === void 0) {\n    includeScale = false;\n  }\n  if (isFixedStrategy === void 0) {\n    isFixedStrategy = false;\n  }\n  const clientRect = element.getBoundingClientRect();\n  const domElement = unwrapElement(element);\n  let scale = createCoords(1);\n  if (includeScale) {\n    if (offsetParent) {\n      if (isElement(offsetParent)) {\n        scale = getScale(offsetParent);\n      }\n    } else {\n      scale = getScale(element);\n    }\n  }\n  const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);\n  let x = (clientRect.left + visualOffsets.x) / scale.x;\n  let y = (clientRect.top + visualOffsets.y) / scale.y;\n  let width = clientRect.width / scale.x;\n  let height = clientRect.height / scale.y;\n  if (domElement) {\n    const win = getWindow(domElement);\n    const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;\n    let currentWin = win;\n    let currentIFrame = currentWin.frameElement;\n    while (currentIFrame && offsetParent && offsetWin !== currentWin) {\n      const iframeScale = getScale(currentIFrame);\n      const iframeRect = currentIFrame.getBoundingClientRect();\n      const css = getComputedStyle(currentIFrame);\n      const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;\n      const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;\n      x *= iframeScale.x;\n      y *= iframeScale.y;\n      width *= iframeScale.x;\n      height *= iframeScale.y;\n      x += left;\n      y += top;\n      currentWin = getWindow(currentIFrame);\n      currentIFrame = currentWin.frameElement;\n    }\n  }\n  return rectToClientRect({\n    width,\n    height,\n    x,\n    y\n  });\n}\nconst topLayerSelectors = [\":popover-open\", \":modal\"];\nfunction isTopLayer(floating) {\n  return topLayerSelectors.some((selector) => {\n    try {\n      return floating.matches(selector);\n    } catch (e) {\n      return false;\n    }\n  });\n}\nfunction convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {\n  let {\n    elements,\n    rect,\n    offsetParent,\n    strategy\n  } = _ref;\n  const isFixed = strategy === \"fixed\";\n  const documentElement = getDocumentElement(offsetParent);\n  const topLayer = elements ? isTopLayer(elements.floating) : false;\n  if (offsetParent === documentElement || topLayer && isFixed) {\n    return rect;\n  }\n  let scroll = {\n    scrollLeft: 0,\n    scrollTop: 0\n  };\n  let scale = createCoords(1);\n  const offsets = createCoords(0);\n  const isOffsetParentAnElement = isHTMLElement(offsetParent);\n  if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n    if (getNodeName(offsetParent) !== \"body\" || isOverflowElement(documentElement)) {\n      scroll = getNodeScroll(offsetParent);\n    }\n    if (isHTMLElement(offsetParent)) {\n      const offsetRect = getBoundingClientRect(offsetParent);\n      scale = getScale(offsetParent);\n      offsets.x = offsetRect.x + offsetParent.clientLeft;\n      offsets.y = offsetRect.y + offsetParent.clientTop;\n    }\n  }\n  return {\n    width: rect.width * scale.x,\n    height: rect.height * scale.y,\n    x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x,\n    y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y\n  };\n}\nfunction getClientRects(element) {\n  return Array.from(element.getClientRects());\n}\nfunction getWindowScrollBarX(element) {\n  return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;\n}\nfunction getDocumentRect(element) {\n  const html = getDocumentElement(element);\n  const scroll = getNodeScroll(element);\n  const body = element.ownerDocument.body;\n  const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);\n  const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);\n  let x = -scroll.scrollLeft + getWindowScrollBarX(element);\n  const y = -scroll.scrollTop;\n  if (getComputedStyle(body).direction === \"rtl\") {\n    x += max(html.clientWidth, body.clientWidth) - width;\n  }\n  return {\n    width,\n    height,\n    x,\n    y\n  };\n}\nfunction getViewportRect(element, strategy) {\n  const win = getWindow(element);\n  const html = getDocumentElement(element);\n  const visualViewport = win.visualViewport;\n  let width = html.clientWidth;\n  let height = html.clientHeight;\n  let x = 0;\n  let y = 0;\n  if (visualViewport) {\n    width = visualViewport.width;\n    height = visualViewport.height;\n    const visualViewportBased = isWebKit();\n    if (!visualViewportBased || visualViewportBased && strategy === \"fixed\") {\n      x = visualViewport.offsetLeft;\n      y = visualViewport.offsetTop;\n    }\n  }\n  return {\n    width,\n    height,\n    x,\n    y\n  };\n}\nfunction getInnerBoundingClientRect(element, strategy) {\n  const clientRect = getBoundingClientRect(element, true, strategy === \"fixed\");\n  const top = clientRect.top + element.clientTop;\n  const left = clientRect.left + element.clientLeft;\n  const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);\n  const width = element.clientWidth * scale.x;\n  const height = element.clientHeight * scale.y;\n  const x = left * scale.x;\n  const y = top * scale.y;\n  return {\n    width,\n    height,\n    x,\n    y\n  };\n}\nfunction getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {\n  let rect;\n  if (clippingAncestor === \"viewport\") {\n    rect = getViewportRect(element, strategy);\n  } else if (clippingAncestor === \"document\") {\n    rect = getDocumentRect(getDocumentElement(element));\n  } else if (isElement(clippingAncestor)) {\n    rect = getInnerBoundingClientRect(clippingAncestor, strategy);\n  } else {\n    const visualOffsets = getVisualOffsets(element);\n    rect = {\n      ...clippingAncestor,\n      x: clippingAncestor.x - visualOffsets.x,\n      y: clippingAncestor.y - visualOffsets.y\n    };\n  }\n  return rectToClientRect(rect);\n}\nfunction hasFixedPositionAncestor(element, stopNode) {\n  const parentNode = getParentNode(element);\n  if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {\n    return false;\n  }\n  return getComputedStyle(parentNode).position === \"fixed\" || hasFixedPositionAncestor(parentNode, stopNode);\n}\nfunction getClippingElementAncestors(element, cache) {\n  const cachedResult = cache.get(element);\n  if (cachedResult) {\n    return cachedResult;\n  }\n  let result = getOverflowAncestors(element, [], false).filter((el) => isElement(el) && getNodeName(el) !== \"body\");\n  let currentContainingBlockComputedStyle = null;\n  const elementIsFixed = getComputedStyle(element).position === \"fixed\";\n  let currentNode = elementIsFixed ? getParentNode(element) : element;\n  while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {\n    const computedStyle = getComputedStyle(currentNode);\n    const currentNodeIsContaining = isContainingBlock(currentNode);\n    if (!currentNodeIsContaining && computedStyle.position === \"fixed\") {\n      currentContainingBlockComputedStyle = null;\n    }\n    const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === \"static\" && !!currentContainingBlockComputedStyle && [\"absolute\", \"fixed\"].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);\n    if (shouldDropCurrentNode) {\n      result = result.filter((ancestor) => ancestor !== currentNode);\n    } else {\n      currentContainingBlockComputedStyle = computedStyle;\n    }\n    currentNode = getParentNode(currentNode);\n  }\n  cache.set(element, result);\n  return result;\n}\nfunction getClippingRect(_ref) {\n  let {\n    element,\n    boundary,\n    rootBoundary,\n    strategy\n  } = _ref;\n  const elementClippingAncestors = boundary === \"clippingAncestors\" ? getClippingElementAncestors(element, this._c) : [].concat(boundary);\n  const clippingAncestors = [...elementClippingAncestors, rootBoundary];\n  const firstClippingAncestor = clippingAncestors[0];\n  const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {\n    const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);\n    accRect.top = max(rect.top, accRect.top);\n    accRect.right = min(rect.right, accRect.right);\n    accRect.bottom = min(rect.bottom, accRect.bottom);\n    accRect.left = max(rect.left, accRect.left);\n    return accRect;\n  }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));\n  return {\n    width: clippingRect.right - clippingRect.left,\n    height: clippingRect.bottom - clippingRect.top,\n    x: clippingRect.left,\n    y: clippingRect.top\n  };\n}\nfunction getDimensions(element) {\n  const {\n    width,\n    height\n  } = getCssDimensions(element);\n  return {\n    width,\n    height\n  };\n}\nfunction getRectRelativeToOffsetParent(element, offsetParent, strategy) {\n  const isOffsetParentAnElement = isHTMLElement(offsetParent);\n  const documentElement = getDocumentElement(offsetParent);\n  const isFixed = strategy === \"fixed\";\n  const rect = getBoundingClientRect(element, true, isFixed, offsetParent);\n  let scroll = {\n    scrollLeft: 0,\n    scrollTop: 0\n  };\n  const offsets = createCoords(0);\n  if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n    if (getNodeName(offsetParent) !== \"body\" || isOverflowElement(documentElement)) {\n      scroll = getNodeScroll(offsetParent);\n    }\n    if (isOffsetParentAnElement) {\n      const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);\n      offsets.x = offsetRect.x + offsetParent.clientLeft;\n      offsets.y = offsetRect.y + offsetParent.clientTop;\n    } else if (documentElement) {\n      offsets.x = getWindowScrollBarX(documentElement);\n    }\n  }\n  const x = rect.left + scroll.scrollLeft - offsets.x;\n  const y = rect.top + scroll.scrollTop - offsets.y;\n  return {\n    x,\n    y,\n    width: rect.width,\n    height: rect.height\n  };\n}\nfunction getTrueOffsetParent(element, polyfill) {\n  if (!isHTMLElement(element) || getComputedStyle(element).position === \"fixed\") {\n    return null;\n  }\n  if (polyfill) {\n    return polyfill(element);\n  }\n  return element.offsetParent;\n}\nfunction getOffsetParent(element, polyfill) {\n  const window = getWindow(element);\n  if (!isHTMLElement(element) || isTopLayer(element)) {\n    return window;\n  }\n  let offsetParent = getTrueOffsetParent(element, polyfill);\n  while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === \"static\") {\n    offsetParent = getTrueOffsetParent(offsetParent, polyfill);\n  }\n  if (offsetParent && (getNodeName(offsetParent) === \"html\" || getNodeName(offsetParent) === \"body\" && getComputedStyle(offsetParent).position === \"static\" && !isContainingBlock(offsetParent))) {\n    return window;\n  }\n  return offsetParent || getContainingBlock(element) || window;\n}\nconst getElementRects = async function(data) {\n  const getOffsetParentFn = this.getOffsetParent || getOffsetParent;\n  const getDimensionsFn = this.getDimensions;\n  return {\n    reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),\n    floating: {\n      x: 0,\n      y: 0,\n      ...await getDimensionsFn(data.floating)\n    }\n  };\n};\nfunction isRTL(element) {\n  return getComputedStyle(element).direction === \"rtl\";\n}\nconst platform = {\n  convertOffsetParentRelativeRectToViewportRelativeRect,\n  getDocumentElement,\n  getClippingRect,\n  getOffsetParent,\n  getElementRects,\n  getClientRects,\n  getDimensions,\n  getScale,\n  isElement,\n  isRTL\n};\nconst autoPlacement = autoPlacement$1;\nconst shift = shift$1;\nconst computePosition = (reference, floating, options) => {\n  const cache = /* @__PURE__ */ new Map();\n  const mergedOptions = {\n    platform,\n    ...options\n  };\n  const platformWithCache = {\n    ...mergedOptions.platform,\n    _c: cache\n  };\n  return computePosition$1(reference, floating, {\n    ...mergedOptions,\n    platform: platformWithCache\n  });\n};\nexport {\n  autoPlacement,\n  computePosition,\n  detectOverflow,\n  getOverflowAncestors,\n  offset,\n  platform,\n  shift\n};\n","import { useRef } from \"react\";\nimport { computePosition, autoPlacement, shift } from \"../node_modules/@floating-ui/dom/dist/floating-ui.dom.js\";\nimport { offset } from \"../node_modules/@floating-ui/core/dist/floating-ui.core.js\";\nconst useComputeFloatingPosition = () => {\n  const referenceElementRef = useRef(null);\n  const floatingElementRef = useRef(null);\n  const computeFloatingPosition = async (params = {}) => {\n    if (!referenceElementRef.current || !floatingElementRef.current) {\n      return;\n    }\n    const {\n      x,\n      y\n    } = await computePosition(referenceElementRef.current, floatingElementRef.current, {\n      middleware: [autoPlacement(params.autoPlacement), offset(params.offset), shift(params.shift)]\n    });\n    Object.assign(floatingElementRef.current.style, {\n      left: `${x}px`,\n      top: `${y}px`\n    });\n  };\n  return {\n    referenceElementRef,\n    floatingElementRef,\n    computeFloatingPosition\n  };\n};\nexport {\n  useComputeFloatingPosition\n};\n","import { useEffect } from \"react\";\nconst useOutsideClick = (ref, handler) => {\n  useEffect(() => {\n    const listener = (event) => {\n      if (!ref.current || ref.current.contains(event.target)) {\n        return;\n      }\n      handler();\n    };\n    document.addEventListener(\"mousedown\", listener);\n    document.addEventListener(\"touchstart\", listener);\n    return () => {\n      document.removeEventListener(\"mousedown\", listener);\n      document.removeEventListener(\"touchstart\", listener);\n    };\n  }, [ref, handler]);\n};\nexport {\n  useOutsideClick\n};\n","import { useTrackClickComponent } from \"../../canvas/ComponentEventTracker/ComponentEventTracker.hooks.event.js\";\nconst useTrackClickRoundPlusComponent = () => {\n  const {\n    trackClickComponent\n  } = useTrackClickComponent();\n  const trackClickRoundPlusComponent = () => {\n    trackClickComponent(\"RoundPlus\");\n  };\n  return {\n    trackClickRoundPlusComponent\n  };\n};\nexport {\n  useTrackClickRoundPlusComponent\n};\n","import { useState, useRef, useEffect } from \"react\";\nimport { useComputeFloatingPosition } from \"../../../hooks/useComputeFloatingPosition.js\";\nimport { useOutsideClick } from \"../../../hooks/useOutsideClick.js\";\nimport { useTrackClickRoundPlusComponent } from \"./PinProductBannerV2.hooks.event.js\";\nimport { isCanvas } from \"../../../utils/framer/isCanvas.js\";\nimport \"framer\";\nimport { useInView } from \"framer-motion\";\nconst PRODUCT_OFFSET = 15;\nconst PRODUCT_SHIFT_PADDING = 20;\nconst usePinProductBannerV2 = (initialIsActive) => {\n  const [isActive, setIsActive] = useState(initialIsActive);\n  const containerRef = useRef(null);\n  const {\n    referenceElementRef,\n    floatingElementRef,\n    computeFloatingPosition\n  } = useComputeFloatingPosition();\n  const isAllInViewOnce = useInView(containerRef, {\n    amount: 1,\n    once: true\n  });\n  const {\n    trackClickRoundPlusComponent\n  } = useTrackClickRoundPlusComponent();\n  useEffect(() => {\n    if (!isCanvas()) {\n      return;\n    }\n    setIsActive(initialIsActive);\n  }, [initialIsActive]);\n  useEffect(() => {\n    if (!isActive) {\n      return;\n    }\n    computeFloatingPosition({\n      offset: PRODUCT_OFFSET,\n      shift: {\n        padding: PRODUCT_SHIFT_PADDING\n      },\n      autoPlacement: {\n        allowedPlacements: [\"top\", \"bottom\"]\n      }\n    });\n  }, [isActive]);\n  useOutsideClick(containerRef, () => {\n    if (!isAllInViewOnce) {\n      return;\n    }\n    if (!isActive) {\n      return;\n    }\n    setIsActive(false);\n  });\n  const handlePinButtonClick = () => {\n    trackClickRoundPlusComponent();\n    setIsActive((prev) => !prev);\n  };\n  return {\n    isActive,\n    containerRef,\n    referenceElementRef,\n    floatingElementRef,\n    handlePinButtonClick\n  };\n};\nexport {\n  usePinProductBannerV2\n};\n","(function() {\n  \"use strict\";\n  try {\n    if (typeof document != \"undefined\") {\n      var elementStyle = document.createElement(\"style\");\n      elementStyle.appendChild(document.createTextNode(\"._pinButtonWrapper_1wlij_1 {\\n  padding: 8px;\\n  width: fit-content;\\n  height: fit-content;\\n  cursor: pointer;\\n}\\n\\n._pinButton_1wlij_1 {\\n  position: relative;\\n  display: flex;\\n  justify-content: center;\\n  align-items: center;\\n  padding: 0;\\n  width: 20px;\\n  height: 20px;\\n  background-color: #000;\\n  border: none;\\n  border-radius: 50%;\\n\\n  &[data-color-theme='light'] {\\n    background-color: #fff;\\n\\n    > svg > path {\\n      fill: #000;\\n    }\\n  }\\n}\\n\\n._productWrapper_1wlij_29 {\\n  /* Float on top of the UI */\\n  position: absolute;\\n\\n  /* Avoid layout interference */\\n  width: max-content;\\n  top: 0px;\\n  left: 0px;\\n}\\n\\n._productContainer_1wlij_39 {\\n  display: flex;\\n  justify-content: center;\\n\\n  width: 100%;\\n  height: 100%;\\n  cursor: pointer;\\n\\n  width: 196px;\\n  background: white;\\n  border: 0.7px solid #00000066;\\n  border-radius: 2px;\\n  padding: 8px;\\n}\\n\\n._productContainer_1wlij_39 > :first-child {\\n  width: 100% !important;\\n  height: 100% !important;\\n}\"));\n      document.head.appendChild(elementStyle);\n    }\n  } catch (e) {\n    console.error(\"vite-plugin-css-injected-by-js\", e);\n  }\n})();\nconst pinButtonWrapper = \"_pinButtonWrapper_1wlij_1\";\nconst pinButton = \"_pinButton_1wlij_1\";\nconst productWrapper = \"_productWrapper_1wlij_29\";\nconst productContainer = \"_productContainer_1wlij_39\";\nconst styles = {\n  pinButtonWrapper,\n  pinButton,\n  productWrapper,\n  productContainer\n};\nexport {\n  styles as default,\n  pinButton,\n  pinButtonWrapper,\n  productContainer,\n  productWrapper\n};\n","import { jsxs, jsx } from \"react/jsx-runtime\";\nimport { addPropertyControls, ControlType } from \"framer\";\nimport { motion, AnimatePresence } from \"framer-motion\";\nimport { PlusIcon } from \"../../@shared/icons/PlusIcon.js\";\nimport { isCanvas } from \"../../../utils/framer/isCanvas.js\";\nimport { isFramerPreview } from \"../../../utils/framer/isFramerPreview.js\";\nimport { PIN_BUTTON_HOVER_EFFECT, PIN_BUTTON_TAP_EFFECT, PRODUCT_BANNER_EFFECT, PRODUCT_BANNER_EFFECT_INITIAL } from \"./PinProductBannerV2.constants.effect.js\";\nimport { usePinProductBannerV2 } from \"./PinProductBannerV2.hooks.js\";\nimport styles from \"./PinProductBannerV2.module.css.js\";\nimport { COMPONENT_ID_PROPS } from \"../../../libs/property-controls/component-id.js\";\nimport { ProductCard } from \"../../@shared/ProductCard/ProductCard.js\";\nimport { ProductCardType } from \"../../@shared/ProductCard/ProductCard.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 { formatFramerProduct2Product } from \"../../../apis/framer/FramerApiService.js\";\nimport \"../../../config/index.js\";\nimport { useFetchProductList } from \"../../../hooks/fetchers/useFetchProductList.js\";\nimport \"../../../apis/taste-sharing/TasteSharingApiService.js\";\nimport \"../../../node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.js\";\nimport \"../../../node_modules/js-cookie/dist/js.cookie.js\";\nimport \"../../../apis/preuser/PreuserApiService.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 \"../../../containers/DialogContainer/DialogContainer.emitter.js\";\nimport \"../../../utils/redirectLogin.js\";\nimport \"../../../utils/event-properties/source.js\";\nimport { useSendProductIds } from \"../../../hooks/product/useSendProductIds.js\";\nimport \"../../../constants/snowplow/snowplowSchema.js\";\nconst PinProductBannerV2 = ({\n  productId,\n  isActive: initialIsActive,\n  buttonTheme,\n  style,\n  componentId\n}) => {\n  const {\n    isActive,\n    containerRef,\n    referenceElementRef,\n    floatingElementRef,\n    handlePinButtonClick\n  } = usePinProductBannerV2(initialIsActive);\n  useSendProductIds(productId);\n  const {\n    productList\n  } = useFetchProductList([Number(productId)]);\n  const framerProduct = productList.find(({\n    itemNo\n  }) => itemNo === Number(productId));\n  const product = formatFramerProduct2Product(framerProduct);\n  const isFramer = isCanvas() || isFramerPreview();\n  if (!product && !isFramer) {\n    return null;\n  }\n  return /* @__PURE__ */ jsxs(\"div\", { ref: containerRef, style, children: [\n    /* @__PURE__ */ jsx(\"div\", { className: styles.pinButtonWrapper, onClick: handlePinButtonClick, children: /* @__PURE__ */ jsx(motion.button, { className: styles.pinButton, ref: referenceElementRef, \"data-color-theme\": buttonTheme, whileHover: PIN_BUTTON_HOVER_EFFECT, whileTap: PIN_BUTTON_TAP_EFFECT, children: /* @__PURE__ */ jsx(PlusIcon, {}) }) }),\n    /* @__PURE__ */ jsx(motion.div, { className: styles.productWrapper, ref: floatingElementRef, children: /* @__PURE__ */ jsx(AnimatePresence, { children: isActive ? /* @__PURE__ */ jsx(motion.div, { ...PRODUCT_BANNER_EFFECT, initial: isCanvas() ? void 0 : PRODUCT_BANNER_EFFECT_INITIAL, children: /* @__PURE__ */ jsx(\"div\", { className: styles.productContainer, style, children: product ? /* @__PURE__ */ jsx(ProductCard, { product, type: ProductCardType.BAR, size: \"small\", eventProperties: {\n      product,\n      isProductGroup: false,\n      componentName: componentId\n    }, hasBadges: false, hasSoldOutBadge: false, hasHeart: false, hasPriceUnit: false, isHeartOn: \"OFF\", style: {\n      overflow: \"hidden\"\n    }, onHeartOn: () => {\n    }, onHeartOff: () => {\n    } }) : /* @__PURE__ */ jsx(Fallback, { productId, isFramer }) }) }) : null }) })\n  ] });\n};\nconst Fallback = ({\n  productId,\n  isFramer\n}) => {\n  if (!isFramer) {\n    return null;\n  }\n  if (!productId) {\n    return \"[관리자용 메시지] 상품 번호를 입력해주세요. 상품 번호가 없을 경우 배포된 페이지에서 본 컴포넌트 자체가 표시되지 않습니다.\";\n  }\n  return \"[관리자용 메시지] 완전 품절된 상품입니다. 완전 품절된 상품은 정책에 따라 배포된 페이지에서 본 컴포넌트 자체가 표시되지 않습니다.\";\n};\naddPropertyControls(PinProductBannerV2, {\n  isActive: {\n    title: \"상품 배너 오픈\",\n    type: ControlType.Boolean,\n    defaultValue: false\n  },\n  productId: {\n    title: \"상품 번호\",\n    type: ControlType.String,\n    placeholder: \"상품 번호를 입력\",\n    description: \"단수만 입력\"\n  },\n  buttonTheme: {\n    title: \"핀 버튼 색상\",\n    type: ControlType.Enum,\n    displaySegmentedControl: true,\n    options: [\"dark\", \"light\"],\n    optionTitles: [\"검은색\", \"하얀색\"],\n    defaultValue: \"dark\"\n  },\n  ...COMPONENT_ID_PROPS\n});\nexport {\n  PinProductBannerV2\n};\n","import{PinProductBannerV2}from\"https://asset.29cm.co.kr/contents/framer/components/systems/PinProductBannerV2/PinProductBannerV2.js\";// import { PinProductBannerV2 } from \"http://localhost:4173/components/systems/PinProductBannerV2/PinProductBannerV2.js\"\nPinProductBannerV2.displayName=\"PinProductCard\";/**\n * @framerDisableUnlink\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default PinProductBannerV2;\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"PinProductBannerV2\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerDisableUnlink\":\"* @framerSupportedLayoutWidth auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./PinProductCard.map","var TagsModuleInputType = /* @__PURE__ */ ((TagsModuleInputType2) => {\n  TagsModuleInputType2[TagsModuleInputType2[\"Linked\"] = 0] = \"Linked\";\n  TagsModuleInputType2[TagsModuleInputType2[\"Manual\"] = 1] = \"Manual\";\n  TagsModuleInputType2[TagsModuleInputType2[\"Auto\"] = 2] = \"Auto\";\n  return TagsModuleInputType2;\n})(TagsModuleInputType || {});\nexport {\n  TagsModuleInputType\n};\n","const getRestScrollWidth = (element) => {\n  const {\n    scrollWidth = 0,\n    offsetWidth = 0\n  } = element ?? {};\n  return scrollWidth - offsetWidth;\n};\nexport {\n  getRestScrollWidth\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { useMotionValue, clamp, animate } from \"framer-motion\";\nimport { createContext, forwardRef, useRef, useState, useLayoutEffect, useEffect } from \"react\";\nimport { getRestScrollWidth } from \"../../../utils/getRestScrollWidth.js\";\nconst DraggableTabsContext = createContext(null);\nconst Root = forwardRef(({\n  children,\n  style,\n  defaultValue,\n  value,\n  dragPaddingLeft = 0,\n  dragPaddingRight = 0,\n  onValueChange,\n  ...rest\n}, ref) => {\n  const refs = useRef(/* @__PURE__ */ new Map());\n  const listRef = useRef(null);\n  const [firstValue] = refs.current.keys();\n  const [currentValue, setCurrentValue] = useState(defaultValue ?? value ?? firstValue);\n  const listX = useMotionValue(0);\n  const focusTo = (incoming, smooth = true) => {\n    const item = refs.current.get(incoming);\n    if (item === void 0) {\n      return;\n    }\n    const threshold = getRestScrollWidth(listRef.current);\n    const finalX = -clamp(0, threshold, item.offsetLeft - dragPaddingLeft);\n    if (smooth) {\n      animate(listX, finalX, {\n        type: \"spring\",\n        stiffness: 400,\n        damping: 50\n      });\n    } else {\n      listX.set(finalX);\n    }\n  };\n  const move = (next) => {\n    onValueChange == null ? void 0 : onValueChange(next);\n    setCurrentValue(next);\n    focusTo(next);\n  };\n  useLayoutEffect(() => {\n    if (defaultValue) {\n      focusTo(defaultValue, false);\n    }\n  }, []);\n  useEffect(() => {\n    if (value) {\n      move(value);\n    }\n  }, [value]);\n  const context = {\n    refs,\n    listRef,\n    currentValue,\n    listX,\n    dragPaddingLeft,\n    dragPaddingRight,\n    move\n  };\n  return /* @__PURE__ */ jsx(DraggableTabsContext.Provider, { value: context, children: /* @__PURE__ */ jsx(\"div\", { ref, ...rest, style: {\n    ...style,\n    ...containerStyle\n  }, children }) });\n});\nconst containerStyle = {\n  display: \"flex\",\n  flexDirection: \"column\"\n};\nexport {\n  DraggableTabsContext,\n  Root\n};\n","import { useContext } from \"react\";\nimport { DraggableTabsContext } from \"./Root.js\";\nconst useDraggableTabsContext = () => {\n  const context = useContext(DraggableTabsContext);\n  if (!context) {\n    throw new Error(\"useDraggableTabsContext should be used within Root\");\n  }\n  return context;\n};\nexport {\n  useDraggableTabsContext\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { useTransform, motion, useMotionValue, useMotionValueEvent } from \"framer-motion\";\nimport { useDraggableTabsContext } from \"./Root.hooks.js\";\nimport { forwardRef, useState, useEffect } from \"react\";\nimport { getRestScrollWidth } from \"../../../utils/getRestScrollWidth.js\";\nconst Gradient = forwardRef(({\n  style,\n  theme = \"light\",\n  ...props\n}, ref) => {\n  const {\n    listRef\n  } = useDraggableTabsContext();\n  const xProgress = useListXProgress();\n  const opacity = useTransform(xProgress, [0.95, 1], [1, 0]);\n  const [hidden, setHidden] = useState(true);\n  useEffect(() => {\n    const container = listRef.current;\n    if (container === null) {\n      return;\n    }\n    setHidden(container.scrollWidth <= container.clientWidth);\n  }, []);\n  return /* @__PURE__ */ jsx(motion.div, { ref, ...props, style: {\n    ...gradientStyle,\n    ...gradientStyleByTheme[theme],\n    opacity: hidden ? 0 : opacity,\n    ...style\n  } });\n});\nconst useListXProgress = () => {\n  const {\n    listX,\n    listRef\n  } = useDraggableTabsContext();\n  const xProgress = useMotionValue(0);\n  useMotionValueEvent(listX, \"change\", (latest) => {\n    xProgress.set(-latest / getRestScrollWidth(listRef.current));\n  });\n  return xProgress;\n};\nconst gradientStyle = {\n  position: \"absolute\",\n  zIndex: 8,\n  inset: \"0 0 0 auto\",\n  pointerEvents: \"none\",\n  width: 60\n};\nconst gradientStyleByTheme = {\n  light: {\n    background: \"linear-gradient(270deg, #ffffff 0%, rgba(0, 0, 0, 0) 100%)\"\n  },\n  dark: {\n    background: \"linear-gradient(270deg, #000000 0%, rgba(0, 0, 0, 0) 100%)\"\n  }\n};\nexport {\n  Gradient\n};\n","const closest = (array, target) => {\n  return array.reduce((prev, curr) => Math.abs(curr - target) < Math.abs(prev - target) ? curr : prev, 0);\n};\nexport {\n  closest\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { forwardRef, useState, useLayoutEffect, useEffect } from \"react\";\nimport { withCSS } from \"framer\";\nimport { motion, clamp, animate } from \"framer-motion\";\nimport { closest } from \"../../../utils/closest.js\";\nimport { getRestScrollWidth } from \"../../../utils/getRestScrollWidth.js\";\nimport { mergeRefs } from \"../../../utils/react/mergeRefs.js\";\nimport { useDraggableTabsContext } from \"./Root.hooks.js\";\nconst COMPONENT_NAME = \"tabs-list\";\nconst INITIAL_DAMPING = 0.4;\nconst css = [`\n    .${COMPONENT_NAME}-container::-webkit-scrollbar {\n      display: none;\n    }\n  `];\nconst List = withCSS(forwardRef(({\n  children,\n  style,\n  gap = 0,\n  damping = INITIAL_DAMPING,\n  ...rest\n}, ref) => {\n  const {\n    listRef,\n    refs,\n    listX,\n    dragPaddingLeft,\n    dragPaddingRight\n  } = useDraggableTabsContext();\n  const [constraints, setConstraints] = useState({\n    left: 0,\n    right: 0\n  });\n  const updateConstraints = () => {\n    if (!listRef.current) {\n      return;\n    }\n    const maxScroll = getRestScrollWidth(listRef.current);\n    const newLeft = -maxScroll;\n    setConstraints((prev) => {\n      if (prev.left === newLeft) {\n        return prev;\n      }\n      return {\n        left: newLeft,\n        right: 0\n      };\n    });\n  };\n  const getChildrenPositions = () => {\n    return Array.from(refs.current.values()).map((element) => element.offsetLeft);\n  };\n  const handleDragEnd = (_, {\n    velocity\n  }) => {\n    const destinationX = listX.get() + velocity.x * damping;\n    const closestX = closest(getChildrenPositions(), -destinationX);\n    const threshold = getRestScrollWidth(listRef.current);\n    const finalX = -clamp(0, threshold, closestX - dragPaddingLeft);\n    animate(listX, finalX, {\n      type: \"spring\",\n      stiffness: 200,\n      damping: 50\n    });\n  };\n  useLayoutEffect(() => {\n    updateConstraints();\n  }, []);\n  useEffect(() => {\n    const container = listRef.current;\n    if (!container) {\n      return;\n    }\n    const resizeObserver = new ResizeObserver(() => {\n      updateConstraints();\n    });\n    resizeObserver.observe(container);\n    return () => {\n      resizeObserver.disconnect();\n    };\n  }, []);\n  return /* @__PURE__ */ jsx(\"div\", { ref: mergeRefs([ref, listRef]), className: `${COMPONENT_NAME}-container`, style: {\n    ...containerStyle,\n    ...style\n  }, ...rest, children: /* @__PURE__ */ jsx(motion.div, { style: {\n    ...listStyle,\n    x: listX,\n    gap,\n    paddingLeft: dragPaddingLeft,\n    paddingRight: dragPaddingRight\n  }, drag: \"x\", dragElastic: 0.1, dragConstraints: constraints, dragPropagation: false, onDragEnd: handleDragEnd, whileDrag: {\n    pointerEvents: \"none\"\n  }, children }) });\n}), css);\nconst containerStyle = {\n  position: \"relative\",\n  zIndex: 8,\n  width: \"100%\",\n  overflow: \"hidden\",\n  msOverflowStyle: \"none\",\n  scrollbarWidth: \"none\",\n  cursor: \"grab\"\n};\nconst listStyle = {\n  display: \"inline-flex\",\n  minWidth: \"100%\"\n};\nexport {\n  List\n};\n","import { useDraggableTabsContext } from \"./Root.hooks.js\";\nconst Panel = ({\n  children,\n  value\n}) => {\n  const {\n    currentValue\n  } = useDraggableTabsContext();\n  const isCurrent = value === currentValue;\n  return isCurrent ? children : null;\n};\nexport {\n  Panel\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { forwardRef } from \"react\";\nimport { useDraggableTabsContext } from \"./Root.hooks.js\";\nimport { mergeRefs } from \"../../../utils/react/mergeRefs.js\";\nimport { isFunction } from \"../../../utils/function.js\";\nimport { playHaptic } from \"../../../utils/playHaptic.js\";\nconst Trigger = forwardRef(({\n  children,\n  style,\n  value,\n  onClick,\n  ...rest\n}, ref) => {\n  const {\n    refs,\n    currentValue,\n    move\n  } = useDraggableTabsContext();\n  const isCurrent = value === currentValue;\n  const register = (incoming) => (element) => {\n    refs.current.set(incoming, element);\n  };\n  const handleClick = (e) => {\n    onClick == null ? void 0 : onClick(e);\n    move(value);\n    playHaptic(\"rigid\");\n  };\n  return /* @__PURE__ */ jsx(\"div\", { ref: mergeRefs([ref, register(value)]), style: {\n    ...containerStyle,\n    ...style\n  }, ...rest, onClick: handleClick, children: isFunction(children) ? children(isCurrent) : children });\n});\nconst containerStyle = {\n  position: \"relative\",\n  display: \"flex\",\n  flex: \"0 0 auto\",\n  alignItems: \"center\",\n  justifyContent: \"center\",\n  cursor: \"pointer\",\n  scrollSnapAlign: \"start\"\n};\nexport {\n  Trigger\n};\n","import { Gradient } from \"./Gradient.js\";\nimport { List } from \"./List.js\";\nimport { Panel } from \"./Panel.js\";\nimport { Root } from \"./Root.js\";\nimport { Trigger } from \"./Trigger.js\";\nconst DraggableTabs = {\n  Root,\n  List,\n  Trigger,\n  Panel,\n  Gradient\n};\nexport {\n  DraggableTabs\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { createContext, forwardRef } from \"react\";\nimport { DraggableTabs } from \"../../../@shared/DraggableTabs/index.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 \"../../../../apis/taste-sharing/TasteSharingApiService.js\";\nimport \"../../../../node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.js\";\nimport \"../../../../node_modules/js-cookie/dist/js.cookie.js\";\nimport \"../../../../apis/preuser/PreuserApiService.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 { useBreakpoint } from \"../../../../hooks/useBreakpoint.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 \"../../../../utils/redirectLogin.js\";\nimport \"../../../../utils/event-properties/source.js\";\nimport { Breakpoint } from \"../../../../styles/breakpoint.js\";\nconst TagsContext = createContext(null);\nconst Root = forwardRef(({\n  children,\n  loading = false,\n  defaultValue,\n  value,\n  dragPaddingLeft,\n  dragPaddingRight,\n  onValueChange\n}, ref) => {\n  const breakpoint = useBreakpoint();\n  const sidePadding = sidePaddingByBreakpoint[breakpoint];\n  return /* @__PURE__ */ jsx(TagsContext.Provider, { value: {\n    loading\n  }, children: /* @__PURE__ */ jsx(DraggableTabs.Root, { ref, defaultValue, value, dragPaddingLeft: dragPaddingLeft ?? sidePadding, dragPaddingRight: dragPaddingRight ?? sidePadding, onValueChange, children }) });\n});\nconst sidePaddingByBreakpoint = {\n  [Breakpoint.DESKTOP]: 0,\n  [Breakpoint.TABLET]: 20,\n  [Breakpoint.MOBILE]: 20\n};\nexport {\n  Root,\n  TagsContext\n};\n","import { useContext } from \"react\";\nimport { TagsContext } from \"./Root.js\";\nconst useTagsContext = () => {\n  const context = useContext(TagsContext);\n  if (!context) {\n    throw new Error(\"useTagsContext should be used within Root\");\n  }\n  return context;\n};\nexport {\n  useTagsContext\n};\n","import { jsxs, jsx } from \"react/jsx-runtime\";\nimport { forwardRef, Fragment } from \"react\";\nimport { DraggableTabs } from \"../../../@shared/DraggableTabs/index.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 \"../../../../apis/taste-sharing/TasteSharingApiService.js\";\nimport \"../../../../node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.js\";\nimport \"../../../../node_modules/js-cookie/dist/js.cookie.js\";\nimport \"../../../../apis/preuser/PreuserApiService.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 { useTheme } from \"../../../../hooks/useTheme.js\";\nimport { useBreakpoint } from \"../../../../hooks/useBreakpoint.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 \"../../../../utils/redirectLogin.js\";\nimport \"../../../../utils/event-properties/source.js\";\nimport { Breakpoint } from \"../../../../styles/breakpoint.js\";\nimport { useTagsContext } from \"./Root.hooks.js\";\nconst LIST_GAP = 6;\nconst SKELETONS_PER_PENDING = 3;\nconst List = ({\n  style,\n  children,\n  list\n}, ref) => {\n  const breakpoint = useBreakpoint();\n  const theme = useTheme();\n  const {\n    loading\n  } = useTagsContext();\n  const pending = loading && list.length === 0;\n  const shouldRenderGradient = !pending && breakpoint !== Breakpoint.MOBILE;\n  return /* @__PURE__ */ jsxs(\"div\", { style: {\n    ...containerStyle,\n    ...style\n  }, children: [\n    /* @__PURE__ */ jsxs(DraggableTabs.List, { ref, gap: LIST_GAP, children: [\n      list.map((item, index) => (\n        // eslint-disable-next-line react/no-array-index-key\n        /* @__PURE__ */ jsx(Fragment, { children: children({\n          index,\n          pending,\n          item\n        }) }, index)\n      )),\n      pending ? Array.from({\n        length: SKELETONS_PER_PENDING\n      }).map((_, index) => (\n        // eslint-disable-next-line react/no-array-index-key\n        /* @__PURE__ */ jsx(Fragment, { children: children({\n          index,\n          pending\n        }) }, index)\n      )) : null\n    ] }),\n    shouldRenderGradient ? /* @__PURE__ */ jsx(DraggableTabs.Gradient, { theme }) : null\n  ] });\n};\nconst Default = forwardRef(List);\nconst containerStyle = {\n  position: \"relative\",\n  width: \"100%\",\n  marginBottom: 16,\n  overflow: \"hidden\"\n};\nexport {\n  Default as List\n};\n","import { tv as g } from \"../../packages/configs/tailwind-variants/index.js\";\nconst t = g({\n  base: \"focus-visible:outline focus-visible:outline-1 focus-visible:outline-offset-1 focus-visible:outline-interactive\"\n}), a = g({\n  slots: {\n    base: [t(), \"inline-flex cursor-pointer items-center justify-center rounded-full px-14 py-6\"],\n    label: \"text-m-medium\"\n  },\n  variants: {\n    active: {\n      true: {},\n      false: {}\n    },\n    theme: {\n      light: {\n        label: \"hover:text-primary-hover  active:text-primary-pressed\"\n      },\n      dark: {}\n    },\n    disabled: {\n      true: {\n        base: \"cursor-not-allowed bg-disabled [&_*]:cursor-not-allowed\",\n        label: \"text-disabled hover:text-disabled active:text-disabled\",\n        icon: \"text-disabled\"\n      }\n    }\n  },\n  compoundVariants: [\n    {\n      active: true,\n      disabled: false,\n      theme: \"light\",\n      class: {\n        base: \"pressed:bg-primary-pressed bg-primary text-on-color hover:bg-primary-hover\",\n        label: \"text-on-color hover:text-on-white-hover active:text-on-white-pressed\"\n      }\n    },\n    {\n      active: true,\n      disabled: false,\n      theme: \"dark\",\n      class: {\n        base: \"pressed:bg-primary-pressed bg-[#3d3d3d] text-on-color\",\n        label: \"text-on-color\"\n      }\n    },\n    {\n      active: false,\n      disabled: false,\n      theme: \"light\",\n      class: {\n        base: \"bg-tertiary text-secondary\",\n        label: \"text-secondary hover:text-secondary-hover active:text-secondary-pressed\"\n      }\n    },\n    {\n      active: false,\n      disabled: false,\n      theme: \"dark\",\n      class: {\n        base: \"bg-[#19191a] text-secondary-dark\",\n        label: \"text-secondary-dark\"\n      }\n    }\n  ],\n  defaultVariants: {\n    disabled: false\n  }\n});\nexport {\n  t as baseFocusVisible,\n  a as baseTag\n};\n","import { cn as a } from \"../../packages/configs/tailwind-variants/index.js\";\nimport { useCallback, useMemo } from \"react\";\nconst C = (o) => {\n  const { disabled: s, onClick: e, className: a$1, bgClass: c } = o, l = useCallback(() => {\n    !s && e && e();\n  }, [s, e]), n = useMemo(() => a(s ? \"\" : c, a$1), [s, c]);\n  return {\n    handleClick: l,\n    className: n\n  };\n};\nexport {\n  C as useTag\n};\n","import { j as m } from \"../../../node_modules/.pnpm/react@18.3.0/node_modules/react/jsx-runtime.js\";\nimport { tv as g } from \"../../../packages/configs/tailwind-variants/index.js\";\nimport { forwardRef } from \"react\";\nimport { baseTag as a } from \"../Tag.styles.js\";\nimport { useTag as C } from \"../useTag.js\";\nconst N = g({\n  extend: a\n}), d = forwardRef(\n  ({ className: t, active: e = false, theme: a2 = \"light\", disabled: s, onClick: r, children: m$1, bgClass: l, ...c }, n) => {\n    const { base: g2, label: i } = N({ active: e, theme: a2, disabled: s }), { handleClick: p, className: f } = C({ disabled: s, onClick: r, bgClass: l, className: t });\n    return /* @__PURE__ */ m.jsx(\n      \"button\",\n      {\n        ...c,\n        ref: n,\n        className: g2({ className: f }),\n        onClick: p,\n        disabled: s,\n        children: /* @__PURE__ */ m.jsx(\"span\", { className: i(), children: m$1 })\n      }\n    );\n  }\n);\nexport {\n  d as ToggleTag\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { forwardRef } from \"react\";\nimport { Skeleton } from \"../Skeleton/Skeleton.js\";\nconst TagSkeleton = forwardRef(({\n  theme = \"light\"\n}, ref) => {\n  return /* @__PURE__ */ jsx(Skeleton, { ref, style: {\n    width: 73,\n    height: \"29px\",\n    borderRadius: 20,\n    ...baseStyleByTheme[theme]\n  } });\n});\nconst baseStyleByTheme = {\n  light: {\n    backgroundColor: \"#dee2e6\"\n  },\n  dark: {\n    backgroundColor: \"#27272a\"\n  }\n};\nexport {\n  TagSkeleton\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { forwardRef } from \"react\";\nimport { DraggableTabs } from \"../../../@shared/DraggableTabs/index.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 \"../../../../apis/taste-sharing/TasteSharingApiService.js\";\nimport \"../../../../node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.js\";\nimport \"../../../../node_modules/js-cookie/dist/js.cookie.js\";\nimport \"../../../../apis/preuser/PreuserApiService.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 { useTheme } from \"../../../../hooks/useTheme.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 \"../../../../utils/redirectLogin.js\";\nimport { ToggleTag as d } from \"../../../../node_modules/@29cm/ruler-ui/dist/components/Tag/ToggleTag/ToggleTag.js\";\nimport \"../../../../utils/event-properties/source.js\";\nimport { useTagsContext } from \"./Root.hooks.js\";\nimport { TagSkeleton } from \"../../../@shared/TagSkeleton/TagSkeleton.js\";\nconst Item = forwardRef(({\n  children,\n  value,\n  onClick\n}, ref) => {\n  const {\n    loading\n  } = useTagsContext();\n  const theme = useTheme();\n  if (loading) {\n    return /* @__PURE__ */ jsx(TagSkeleton, { theme });\n  }\n  return /* @__PURE__ */ jsx(DraggableTabs.Trigger, { ref, value, onClick, children: (active) => /* @__PURE__ */ jsx(d, { active, theme, className: \"whitespace-nowrap\", children }) });\n});\nexport {\n  Item\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { Fragment } from \"react\";\nimport { useTagsContext } from \"./Root.hooks.js\";\nconst Panels = ({\n  children,\n  list\n}) => {\n  const {\n    loading\n  } = useTagsContext();\n  const pending = loading && list.length === 0;\n  if (pending) {\n    return children({\n      index: 0,\n      pending\n    });\n  }\n  return list.map((item, index) => (\n    // eslint-disable-next-line react/no-array-index-key\n    /* @__PURE__ */ jsx(Fragment, { children: children({\n      index,\n      pending,\n      item\n    }) }, index)\n  ));\n};\nexport {\n  Panels\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { DraggableTabs } from \"../../../@shared/DraggableTabs/index.js\";\nimport { useTagsContext } from \"./Root.hooks.js\";\nconst Panel = ({\n  children,\n  value\n}) => {\n  const {\n    loading\n  } = useTagsContext();\n  if (loading) {\n    return children;\n  }\n  return /* @__PURE__ */ jsx(DraggableTabs.Panel, { value, children });\n};\nexport {\n  Panel\n};\n","import { Root } from \"./Root.js\";\nimport { List as Default } from \"./List.js\";\nimport { Item } from \"./Item.js\";\nimport { Panels } from \"./Panels.js\";\nimport { Panel } from \"./Panel.js\";\nconst Tags = {\n  Root,\n  List: Default,\n  Item,\n  Panels,\n  Panel\n};\nexport {\n  Tags\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { useMemo, useEffect } from \"react\";\nimport { useQueryStore } from \"../../query-store/query.store.js\";\nimport { Tags } from \"../../../systems/curations/Tags/index.js\";\nimport { useTrackClickButtonEvent, useSetRootModule } from \"../../hooks.js\";\nimport { EventTrigger } from \"../../../@shared/EventTrigger/index.js\";\nimport { getPadding } from \"../../../../utils/spacing.js\";\nimport { useSegment } from \"../../../@shared/providers/SegmentProvider/SegmentProvider.js\";\nconst TagsElement = ({\n  loading = false,\n  currentIndex = 0,\n  inputs: _inputs,\n  output,\n  layout\n}) => {\n  const dispatchSetQuery = useQueryStore((state) => state.dispatchSetQuery);\n  const inputs = useMemo(() => attachAdditionalQuery(_inputs, output), [_inputs, output]);\n  const currentInput = inputs[currentIndex];\n  const {\n    isVisible\n  } = useSegment();\n  const trackClickButtonEvent = useTrackClickButtonEvent(currentInput == null ? void 0 : currentInput.query);\n  const handleClick = (index, name = \"\") => () => {\n    trackClickButtonEvent({\n      type: \"tag\",\n      layoutPosition: index + 1,\n      name\n    });\n  };\n  const handleValueChange = (value) => {\n    if (!output) {\n      return;\n    }\n    const index = Number(value);\n    const input = inputs[index];\n    dispatchSetQuery(output, input.query);\n  };\n  useEffect(() => {\n    window == null ? void 0 : window.dispatchEvent(new CustomEvent(\"layout-done\"));\n    if (!currentInput) {\n      return;\n    }\n    if (!output) {\n      return;\n    }\n    dispatchSetQuery(output, currentInput.query);\n  }, [output, currentInput]);\n  useSetRootModule(currentInput == null ? void 0 : currentInput.query, output);\n  const padding = getPadding(layout);\n  if (!loading && inputs.length === 0 || !isVisible) {\n    window == null ? void 0 : window.dispatchEvent(new CustomEvent(\"layout-done\"));\n    return null;\n  }\n  return /* @__PURE__ */ jsx(Tags.Root, { loading, defaultValue: 0, value: currentIndex, dragPaddingLeft: padding.left, dragPaddingRight: padding.right, onValueChange: handleValueChange, children: /* @__PURE__ */ jsx(Tags.List, { style: {\n    margin: 0,\n    paddingTop: padding.top,\n    paddingBottom: padding.bottom,\n    lineHeight: 0\n  }, list: inputs, children: ({\n    item,\n    index\n  }) => /* @__PURE__ */ jsx(EventTrigger.Target, { onClick: handleClick(index, item == null ? void 0 : item.label), children: /* @__PURE__ */ jsx(Tags.Item, { value: index, children: item == null ? void 0 : item.label }) }) }) });\n};\nconst attachAdditionalQuery = (values, output) => {\n  return values.map((value, index) => ({\n    ...value,\n    query: {\n      ...value.query,\n      facetName: value.label,\n      keys: [...value.query.keys ?? [], `tags-${index}`],\n      isRoot: value.query.rootOutput === void 0,\n      rootOutput: value.query.rootOutput || output\n    }\n  }));\n};\nexport {\n  TagsElement\n};\n","import { env } from \"../../config/index.js\";\nimport { throwFailError } from \"../@middlewares/throwFailError.js\";\nimport { APIService } from \"../APIService.js\";\nclass BrandCurationApiService extends APIService {\n  constructor() {\n    super();\n    this.setMiddleware(throwFailError);\n  }\n  async getFavoriteBrands({\n    size,\n    brandGroupIds\n  }) {\n    return this.get(`${env.api.content}/api/v4/framers/proxy/content-api/api/v5/brand-curations/favorite`, {\n      size,\n      brandGroupIds\n    });\n  }\n}\nconst brandCurationApi = new BrandCurationApiService();\nexport {\n  brandCurationApi\n};\n","import { APIService } from \"../APIService.js\";\nimport { throwFailError } from \"../@middlewares/throwFailError.js\";\nimport { environments, env } from \"../../config/index.js\";\nconst DEFAULT_COLLECTION_PRODUCTS_SIZE = 20;\nclass CollectionApiService extends APIService {\n  constructor() {\n    super();\n    this.setMiddleware(throwFailError);\n  }\n  async getCollection(collectionId, needShuffle, isDevMode) {\n    const baseUrl = isDevMode ? environments.development.api.content : env.api.content;\n    return this.get(`${baseUrl}/api/v4/framers/collections/${collectionId}/product-group-preview?productShuffleEnabled=${String(needShuffle)}`);\n  }\n  async getCollections(collectionIds) {\n    return this.get(`${env.api.content}/api/v4/framers/proxy/content-api/api/v4/collections`, {\n      collectionIds: collectionIds.join(\",\")\n    });\n  }\n  async getCollectionProducts({\n    collectionId,\n    productGroupId,\n    sort,\n    isDevMode\n  }) {\n    const baseUrl = isDevMode ? environments.development.api.content : env.api.content;\n    return this.get(`${baseUrl}/api/v4/framers/proxy/content-api/api/v5/keyword-collections/${collectionId}/product-groups/${productGroupId}/products`, {\n      sort,\n      page: 0,\n      size: DEFAULT_COLLECTION_PRODUCTS_SIZE\n    }).then((data) => formatProducts(data.data.resultList));\n  }\n}\nconst formatProducts = (products) => products.map((product) => {\n  var _a;\n  return {\n    frontBrand: {\n      frontBrandId: product.frontBrand.id,\n      nameKor: product.frontBrand.nameKor,\n      nameEng: product.frontBrand.nameEng\n    },\n    productId: product.productId,\n    productName: product.productName,\n    subjectDescriptions: product.subjectDescriptions,\n    imageUrl: product.imageUrl,\n    consumerPrice: product.consumerPrice,\n    lastSalePrice: product.lastSalePrice,\n    lastSalePercent: product.lastSalePercent,\n    heartCount: product.heartCount,\n    heartOn: product.heartOn,\n    reviewCount: product.reviewCount,\n    reviewAveragePoint: product.reviewAveragePoint,\n    isCoupon: product.saleInfo.coupon,\n    isFreeShipping: product.freeShipping,\n    isNew: product.newProperty,\n    isSoldOut: product.soldOut,\n    frontCategories: (_a = product.frontCategories) == null ? void 0 : _a.map((category) => ({\n      largeCategoryCode: category.largeCode ?? 0,\n      largeCategoryName: category.largeName ?? \"\",\n      mediumCategoryCode: category.mediumCode ?? 0,\n      mediumCategoryName: category.mediumName ?? \"\",\n      smallCategoryCode: category.smallCode ?? 0,\n      smallCategoryName: category.smallName ?? \"\"\n    }))\n  };\n});\nconst collectionApi = new CollectionApiService();\nexport {\n  collectionApi\n};\n","const formatDistanceLocale = {\n  lessThanXSeconds: {\n    one: \"1초 미만\",\n    other: \"{{count}}초 미만\"\n  },\n  xSeconds: {\n    one: \"1초\",\n    other: \"{{count}}초\"\n  },\n  halfAMinute: \"30초\",\n  lessThanXMinutes: {\n    one: \"1분 미만\",\n    other: \"{{count}}분 미만\"\n  },\n  xMinutes: {\n    one: \"1분\",\n    other: \"{{count}}분\"\n  },\n  aboutXHours: {\n    one: \"약 1시간\",\n    other: \"약 {{count}}시간\"\n  },\n  xHours: {\n    one: \"1시간\",\n    other: \"{{count}}시간\"\n  },\n  xDays: {\n    one: \"1일\",\n    other: \"{{count}}일\"\n  },\n  aboutXWeeks: {\n    one: \"약 1주\",\n    other: \"약 {{count}}주\"\n  },\n  xWeeks: {\n    one: \"1주\",\n    other: \"{{count}}주\"\n  },\n  aboutXMonths: {\n    one: \"약 1개월\",\n    other: \"약 {{count}}개월\"\n  },\n  xMonths: {\n    one: \"1개월\",\n    other: \"{{count}}개월\"\n  },\n  aboutXYears: {\n    one: \"약 1년\",\n    other: \"약 {{count}}년\"\n  },\n  xYears: {\n    one: \"1년\",\n    other: \"{{count}}년\"\n  },\n  overXYears: {\n    one: \"1년 이상\",\n    other: \"{{count}}년 이상\"\n  },\n  almostXYears: {\n    one: \"거의 1년\",\n    other: \"거의 {{count}}년\"\n  }\n};\nconst formatDistance = (token, count, options) => {\n  let result;\n  const tokenValue = formatDistanceLocale[token];\n  if (typeof tokenValue === \"string\") {\n    result = tokenValue;\n  } else if (count === 1) {\n    result = tokenValue.one;\n  } else {\n    result = tokenValue.other.replace(\"{{count}}\", count.toString());\n  }\n  if (options == null ? void 0 : options.addSuffix) {\n    if (options.comparison && options.comparison > 0) {\n      return result + \" 후\";\n    } else {\n      return result + \" 전\";\n    }\n  }\n  return result;\n};\nexport {\n  formatDistance\n};\n","import { buildFormatLongFn } from \"../../_lib/buildFormatLongFn.js\";\nconst dateFormats = {\n  full: \"y년 M월 d일 EEEE\",\n  long: \"y년 M월 d일\",\n  medium: \"y.MM.dd\",\n  short: \"y.MM.dd\"\n};\nconst timeFormats = {\n  full: \"a H시 mm분 ss초 zzzz\",\n  long: \"a H:mm:ss z\",\n  medium: \"HH:mm:ss\",\n  short: \"HH:mm\"\n};\nconst dateTimeFormats = {\n  full: \"{{date}} {{time}}\",\n  long: \"{{date}} {{time}}\",\n  medium: \"{{date}} {{time}}\",\n  short: \"{{date}} {{time}}\"\n};\nconst formatLong = {\n  date: buildFormatLongFn({\n    formats: dateFormats,\n    defaultWidth: \"full\"\n  }),\n  time: buildFormatLongFn({\n    formats: timeFormats,\n    defaultWidth: \"full\"\n  }),\n  dateTime: buildFormatLongFn({\n    formats: dateTimeFormats,\n    defaultWidth: \"full\"\n  })\n};\nexport {\n  formatLong\n};\n","const formatRelativeLocale = {\n  lastWeek: \"'지난' eeee p\",\n  yesterday: \"'어제' p\",\n  today: \"'오늘' p\",\n  tomorrow: \"'내일' p\",\n  nextWeek: \"'다음' eeee p\",\n  other: \"P\"\n};\nconst formatRelative = (token, _date, _baseDate, _options) => formatRelativeLocale[token];\nexport {\n  formatRelative\n};\n","import { buildLocalizeFn } from \"../../_lib/buildLocalizeFn.js\";\nconst eraValues = {\n  narrow: [\"BC\", \"AD\"],\n  abbreviated: [\"BC\", \"AD\"],\n  wide: [\"기원전\", \"서기\"]\n};\nconst quarterValues = {\n  narrow: [\"1\", \"2\", \"3\", \"4\"],\n  abbreviated: [\"Q1\", \"Q2\", \"Q3\", \"Q4\"],\n  wide: [\"1분기\", \"2분기\", \"3분기\", \"4분기\"]\n};\nconst monthValues = {\n  narrow: [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"11\", \"12\"],\n  abbreviated: [\n    \"1월\",\n    \"2월\",\n    \"3월\",\n    \"4월\",\n    \"5월\",\n    \"6월\",\n    \"7월\",\n    \"8월\",\n    \"9월\",\n    \"10월\",\n    \"11월\",\n    \"12월\"\n  ],\n  wide: [\n    \"1월\",\n    \"2월\",\n    \"3월\",\n    \"4월\",\n    \"5월\",\n    \"6월\",\n    \"7월\",\n    \"8월\",\n    \"9월\",\n    \"10월\",\n    \"11월\",\n    \"12월\"\n  ]\n};\nconst dayValues = {\n  narrow: [\"일\", \"월\", \"화\", \"수\", \"목\", \"금\", \"토\"],\n  short: [\"일\", \"월\", \"화\", \"수\", \"목\", \"금\", \"토\"],\n  abbreviated: [\"일\", \"월\", \"화\", \"수\", \"목\", \"금\", \"토\"],\n  wide: [\"일요일\", \"월요일\", \"화요일\", \"수요일\", \"목요일\", \"금요일\", \"토요일\"]\n};\nconst dayPeriodValues = {\n  narrow: {\n    am: \"오전\",\n    pm: \"오후\",\n    midnight: \"자정\",\n    noon: \"정오\",\n    morning: \"아침\",\n    afternoon: \"오후\",\n    evening: \"저녁\",\n    night: \"밤\"\n  },\n  abbreviated: {\n    am: \"오전\",\n    pm: \"오후\",\n    midnight: \"자정\",\n    noon: \"정오\",\n    morning: \"아침\",\n    afternoon: \"오후\",\n    evening: \"저녁\",\n    night: \"밤\"\n  },\n  wide: {\n    am: \"오전\",\n    pm: \"오후\",\n    midnight: \"자정\",\n    noon: \"정오\",\n    morning: \"아침\",\n    afternoon: \"오후\",\n    evening: \"저녁\",\n    night: \"밤\"\n  }\n};\nconst formattingDayPeriodValues = {\n  narrow: {\n    am: \"오전\",\n    pm: \"오후\",\n    midnight: \"자정\",\n    noon: \"정오\",\n    morning: \"아침\",\n    afternoon: \"오후\",\n    evening: \"저녁\",\n    night: \"밤\"\n  },\n  abbreviated: {\n    am: \"오전\",\n    pm: \"오후\",\n    midnight: \"자정\",\n    noon: \"정오\",\n    morning: \"아침\",\n    afternoon: \"오후\",\n    evening: \"저녁\",\n    night: \"밤\"\n  },\n  wide: {\n    am: \"오전\",\n    pm: \"오후\",\n    midnight: \"자정\",\n    noon: \"정오\",\n    morning: \"아침\",\n    afternoon: \"오후\",\n    evening: \"저녁\",\n    night: \"밤\"\n  }\n};\nconst ordinalNumber = (dirtyNumber, options) => {\n  const number = Number(dirtyNumber);\n  const unit = String(options == null ? void 0 : options.unit);\n  switch (unit) {\n    case \"minute\":\n    case \"second\":\n      return String(number);\n    case \"date\":\n      return number + \"일\";\n    default:\n      return number + \"번째\";\n  }\n};\nconst localize = {\n  ordinalNumber,\n  era: buildLocalizeFn({\n    values: eraValues,\n    defaultWidth: \"wide\"\n  }),\n  quarter: buildLocalizeFn({\n    values: quarterValues,\n    defaultWidth: \"wide\",\n    argumentCallback: (quarter) => quarter - 1\n  }),\n  month: buildLocalizeFn({\n    values: monthValues,\n    defaultWidth: \"wide\"\n  }),\n  day: buildLocalizeFn({\n    values: dayValues,\n    defaultWidth: \"wide\"\n  }),\n  dayPeriod: buildLocalizeFn({\n    values: dayPeriodValues,\n    defaultWidth: \"wide\",\n    formattingValues: formattingDayPeriodValues,\n    defaultFormattingWidth: \"wide\"\n  })\n};\nexport {\n  localize\n};\n","import { buildMatchFn } from \"../../_lib/buildMatchFn.js\";\nimport { buildMatchPatternFn } from \"../../_lib/buildMatchPatternFn.js\";\nconst matchOrdinalNumberPattern = /^(\\d+)(일|번째)?/i;\nconst parseOrdinalNumberPattern = /\\d+/i;\nconst matchEraPatterns = {\n  narrow: /^(b\\.?\\s?c\\.?|b\\.?\\s?c\\.?\\s?e\\.?|a\\.?\\s?d\\.?|c\\.?\\s?e\\.?)/i,\n  abbreviated: /^(b\\.?\\s?c\\.?|b\\.?\\s?c\\.?\\s?e\\.?|a\\.?\\s?d\\.?|c\\.?\\s?e\\.?)/i,\n  wide: /^(기원전|서기)/i\n};\nconst parseEraPatterns = {\n  any: [/^(bc|기원전)/i, /^(ad|서기)/i]\n};\nconst matchQuarterPatterns = {\n  narrow: /^[1234]/i,\n  abbreviated: /^q[1234]/i,\n  wide: /^[1234]사?분기/i\n};\nconst parseQuarterPatterns = {\n  any: [/1/i, /2/i, /3/i, /4/i]\n};\nconst matchMonthPatterns = {\n  narrow: /^(1[012]|[123456789])/,\n  abbreviated: /^(1[012]|[123456789])월/i,\n  wide: /^(1[012]|[123456789])월/i\n};\nconst parseMonthPatterns = {\n  any: [\n    /^1월?$/,\n    /^2/,\n    /^3/,\n    /^4/,\n    /^5/,\n    /^6/,\n    /^7/,\n    /^8/,\n    /^9/,\n    /^10/,\n    /^11/,\n    /^12/\n  ]\n};\nconst matchDayPatterns = {\n  narrow: /^[일월화수목금토]/,\n  short: /^[일월화수목금토]/,\n  abbreviated: /^[일월화수목금토]/,\n  wide: /^[일월화수목금토]요일/\n};\nconst parseDayPatterns = {\n  any: [/^일/, /^월/, /^화/, /^수/, /^목/, /^금/, /^토/]\n};\nconst matchDayPeriodPatterns = {\n  any: /^(am|pm|오전|오후|자정|정오|아침|저녁|밤)/i\n};\nconst parseDayPeriodPatterns = {\n  any: {\n    am: /^(am|오전)/i,\n    pm: /^(pm|오후)/i,\n    midnight: /^자정/i,\n    noon: /^정오/i,\n    morning: /^아침/i,\n    afternoon: /^오후/i,\n    evening: /^저녁/i,\n    night: /^밤/i\n  }\n};\nconst match = {\n  ordinalNumber: buildMatchPatternFn({\n    matchPattern: matchOrdinalNumberPattern,\n    parsePattern: parseOrdinalNumberPattern,\n    valueCallback: (value) => parseInt(value, 10)\n  }),\n  era: buildMatchFn({\n    matchPatterns: matchEraPatterns,\n    defaultMatchWidth: \"wide\",\n    parsePatterns: parseEraPatterns,\n    defaultParseWidth: \"any\"\n  }),\n  quarter: buildMatchFn({\n    matchPatterns: matchQuarterPatterns,\n    defaultMatchWidth: \"wide\",\n    parsePatterns: parseQuarterPatterns,\n    defaultParseWidth: \"any\",\n    valueCallback: (index) => index + 1\n  }),\n  month: buildMatchFn({\n    matchPatterns: matchMonthPatterns,\n    defaultMatchWidth: \"wide\",\n    parsePatterns: parseMonthPatterns,\n    defaultParseWidth: \"any\"\n  }),\n  day: buildMatchFn({\n    matchPatterns: matchDayPatterns,\n    defaultMatchWidth: \"wide\",\n    parsePatterns: parseDayPatterns,\n    defaultParseWidth: \"any\"\n  }),\n  dayPeriod: buildMatchFn({\n    matchPatterns: matchDayPeriodPatterns,\n    defaultMatchWidth: \"any\",\n    parsePatterns: parseDayPeriodPatterns,\n    defaultParseWidth: \"any\"\n  })\n};\nexport {\n  match\n};\n","import { formatDistance } from \"./ko/_lib/formatDistance.js\";\nimport { formatLong } from \"./ko/_lib/formatLong.js\";\nimport { formatRelative } from \"./ko/_lib/formatRelative.js\";\nimport { localize } from \"./ko/_lib/localize.js\";\nimport { match } from \"./ko/_lib/match.js\";\nconst ko = {\n  code: \"ko\",\n  formatDistance,\n  formatLong,\n  formatRelative,\n  localize,\n  match,\n  options: {\n    weekStartsOn: 0,\n    firstWeekContainsDate: 1\n  }\n};\nexport {\n  ko as default,\n  ko\n};\n","import { createKRTimeZoneDate } from \"../../../../../utils/createUTCDate.js\";\nimport { compareAsc } from \"../../../../../node_modules/date-fns/compareAsc.js\";\nimport { parseISO } from \"../../../../../node_modules/date-fns/parseISO.js\";\nimport { formatDate as format } from \"../../../../../node_modules/date-fns/format.js\";\nimport { ko } from \"../../../../../node_modules/date-fns/locale/ko.js\";\nimport { isWithinInterval } from \"../../../../../node_modules/date-fns/isWithinInterval.js\";\nimport { isBefore } from \"../../../../../node_modules/date-fns/isBefore.js\";\nconst orderByDateAsc = (list) => list.sort((groupA, groupB) => compareAsc(groupA.startAt, groupB.startAt));\nconst formatSchedule = (str) => {\n  const schedule = parseISO(str);\n  return format(schedule, \"M. d EEEEE\", {\n    locale: ko\n  });\n};\nconst getCurrentScheduleIndex = (list) => {\n  const now = createKRTimeZoneDate();\n  const currentIndex = list.findIndex((group, index) => {\n    const nextGroup = list[index + 1];\n    const start = parseISO(group.startAt);\n    const end = parseISO(group.endAt);\n    const isWithin = end ? isWithinInterval(now, {\n      start,\n      end\n    }) : false;\n    const isUpcoming = isBefore(now, start);\n    const isLast = nextGroup === void 0;\n    return isWithin || isUpcoming || isLast;\n  });\n  return currentIndex === -1 ? void 0 : currentIndex;\n};\nexport {\n  formatSchedule,\n  getCurrentScheduleIndex,\n  orderByDateAsc\n};\n","import { CategoryType } from \"../types.js\";\nconst CATEGORY_MIN_PRODUCT_COUNT = 12;\nconst mergeByLargeCategories = (values, excludeCategories) => {\n  const map = values.reduce(\n    (prev, curr) => {\n      const {\n        count = 0,\n        children = []\n      } = prev[curr.largeId] ?? {};\n      if (excludeCategories.largeIds.includes(curr.largeId)) {\n        return prev;\n      }\n      return {\n        ...prev,\n        [curr.largeId]: {\n          id: curr.largeId,\n          name: curr.largeName,\n          count: count + curr.count,\n          children: concatMiddleCategories(children, curr, excludeCategories.middleIds)\n        }\n      };\n    },\n    // 중복 카테고리를 솎아내기 쉽도록 카테고리 id 가 key 인 객체로 정의한다.\n    {}\n  );\n  return Object.values(map);\n};\nconst concatMiddleCategories = (categories, value, excludeMiddleCategoryIds) => {\n  if (!value.middleId || !value.middleName || excludeMiddleCategoryIds.includes(value.middleId)) {\n    return categories;\n  }\n  const has = categories.findIndex((category) => category.id === value.middleId) !== -1;\n  return has ? categories : [...categories, {\n    id: value.middleId,\n    name: value.middleName,\n    parentId: value.largeId\n  }];\n};\nconst filterByOverMinProductCount = (values) => {\n  return values.filter(({\n    count = 0\n  }) => count >= CATEGORY_MIN_PRODUCT_COUNT);\n};\nconst orderByGender = (values, matcher, gender) => {\n  const oppositeGender = getOppositeGender(gender);\n  return [...values].sort((x, y) => (\n    // 현재 성별을 우선적으로 검사하여 해당되는 카테고리를 앞으로 보낸다.\n    matcher(y, gender) - matcher(x, gender) || // 현재 성별과 반대되는 성별을 기준으로 검사하여 해당되는 카테고리를 뒤로 보낸다.\n    matcher(x, oppositeGender) - matcher(y, oppositeGender)\n  ));\n};\nconst getOppositeGender = (gender) => {\n  return gender === \"F\" ? \"M\" : \"F\";\n};\nconst isGenderCategoryMatches = (value, gender) => {\n  return Number(value.name.includes(gender === \"F\" ? \"여성\" : \"남성\"));\n};\nconst isGenderProductGroupMatches = (value, gender) => {\n  return Number(value.gender === gender);\n};\nconst reshapeCategoryFacetValues = (values, options) => {\n  const {\n    categoryType,\n    gender,\n    excludeCategories\n  } = options;\n  const categories = orderByGender(filterByOverMinProductCount(mergeByLargeCategories(values, excludeCategories)), isGenderCategoryMatches, gender);\n  switch (categoryType) {\n    case CategoryType.Large:\n      return categories;\n    case CategoryType.Middle:\n      return categories.flatMap((category) => category.children ?? []);\n  }\n};\nexport {\n  filterByOverMinProductCount,\n  isGenderCategoryMatches,\n  isGenderProductGroupMatches,\n  mergeByLargeCategories,\n  orderByGender,\n  reshapeCategoryFacetValues\n};\n","import { createKRTimeZoneDate } from \"../../../../utils/createUTCDate.js\";\nimport { isAbove } from \"../../../../utils/date.js\";\nimport { isBefore } from \"../../../../node_modules/date-fns/isBefore.js\";\nimport { isWithinInterval } from \"../../../../node_modules/date-fns/isWithinInterval.js\";\nimport { formatDate as format } from \"../../../../node_modules/date-fns/format.js\";\nimport { ko } from \"../../../../node_modules/date-fns/locale/ko.js\";\nconst SEPARATOR = \"@\";\nconst reservedWords = [\"DATE\", \"GENDER\"];\nconst getProductGroupType = (productGroupList) => {\n  const includedReservedWordProductGroup = productGroupList.find((group) => group.title.includes(SEPARATOR));\n  if (includedReservedWordProductGroup === void 0) {\n    return \"KEYWORD\";\n  }\n  const firstReservedWord = includedReservedWordProductGroup.title.split(SEPARATOR)[0];\n  if (!reservedWords.includes(firstReservedWord)) {\n    return \"KEYWORD\";\n  }\n  return firstReservedWord;\n};\nconst reshapeProductGroupList = (productGroupList, productGroupType, gender) => {\n  if (productGroupType === \"DATE\") {\n    return reshapeDateProductGroupList(productGroupList);\n  }\n  if (productGroupType === \"GENDER\") {\n    return reshapeGenderProductGroupList(productGroupList, gender);\n  }\n  return productGroupList;\n};\nconst findInitialProductGroupId = (collectionProductGroup, reshapedProductGroupList, productGroupType) => {\n  if (collectionProductGroup.length === 0) {\n    return void 0;\n  }\n  if (productGroupType === \"DATE\") {\n    const currentProductGroupList = findCurrentProductGroupListByDate(collectionProductGroup);\n    return currentProductGroupList.productGroupId;\n  }\n  return reshapedProductGroupList[0].productGroupId;\n};\nconst reshapeDateProductGroupList = (productGroupList) => productGroupList.map((group) => ({\n  ...group,\n  title: formatTitle(group.title, \"DATE\")\n}));\nconst reshapeGenderProductGroupList = (productGroupList, gender) => {\n  const genderProductGroup = productGroupList.reduce((acc, cur) => {\n    const isCommonGroup = !cur.title.includes(SEPARATOR);\n    if (isCommonGroup) {\n      return {\n        ...acc,\n        common: [...acc.common, cur]\n      };\n    }\n    const isNotAllowedReservedWord = cur.title.split(SEPARATOR)[0] !== \"GENDER\";\n    if (isNotAllowedReservedWord) {\n      return {\n        ...acc,\n        notAllowed: [...acc.notAllowed, cur]\n      };\n    }\n    const groupGender = cur.title.split(SEPARATOR)[1].split(\":\")[0];\n    const formattedTitleGroup = {\n      ...cur,\n      title: formatTitle(cur.title, \"GENDER\")\n    };\n    switch (groupGender) {\n      case \"F\":\n        return {\n          ...acc,\n          female: [...acc.female, formattedTitleGroup]\n        };\n      case \"M\":\n        return {\n          ...acc,\n          male: [...acc.male, formattedTitleGroup]\n        };\n      default:\n        return {\n          ...acc,\n          notAllowed: [...acc.notAllowed, cur]\n        };\n    }\n  }, {\n    male: [],\n    female: [],\n    common: [],\n    notAllowed: []\n  });\n  if (!gender || gender === \"F\") {\n    return [...genderProductGroup.female, ...genderProductGroup.common, ...genderProductGroup.male, ...genderProductGroup.notAllowed];\n  }\n  return [...genderProductGroup.male, ...genderProductGroup.common, ...genderProductGroup.female, ...genderProductGroup.notAllowed];\n};\nconst findCurrentProductGroupIndex = (productGroupList) => {\n  const now = createKRTimeZoneDate();\n  return productGroupList.findIndex((group, index) => {\n    const standardDate = new Date(group.title.split(\"@\")[1]);\n    const nextGroupList = productGroupList[index + 1];\n    const nextDate = nextGroupList ? new Date(nextGroupList.title.split(\"@\")[1]) : null;\n    const isFirstProductGroupList = index === 0;\n    const isLastProductGroupList = nextDate === null;\n    const isBeforeStart = isFirstProductGroupList && isBefore(now, standardDate);\n    const isLast = isLastProductGroupList && isAbove(now, standardDate);\n    const isWithin = !isLastProductGroupList && isWithinInterval(now, {\n      start: standardDate,\n      end: nextDate\n    });\n    return isBeforeStart || isLast || isWithin;\n  });\n};\nconst findCurrentProductGroupListByDate = (productGroupList) => {\n  const currentIndex = findCurrentProductGroupIndex(productGroupList);\n  return productGroupList[currentIndex ?? 0];\n};\nconst formatTitle = (title, reservedWord) => {\n  if (!reservedWord) {\n    return title;\n  }\n  const [, needToFormatTitle] = title.split(SEPARATOR);\n  switch (reservedWord) {\n    case \"DATE\":\n      return format(new Date(needToFormatTitle), \"M. d EEEEE\", {\n        locale: ko\n      });\n    case \"GENDER\":\n      return needToFormatTitle.split(\":\")[1];\n    default:\n      return title;\n  }\n};\nexport {\n  findCurrentProductGroupIndex,\n  findInitialProductGroupId,\n  getProductGroupType,\n  reshapeProductGroupList\n};\n","import { addDays } from \"./addDays.js\";\nfunction subDays(date, amount) {\n  return addDays(date, -amount);\n}\nexport {\n  subDays as default,\n  subDays\n};\n","import { addMonths } from \"./addMonths.js\";\nfunction subMonths(date, amount) {\n  return addMonths(date, -amount);\n}\nexport {\n  subMonths as default,\n  subMonths\n};\n","import { subDays } from \"./subDays.js\";\nimport { subMonths } from \"./subMonths.js\";\nimport { constructFrom } from \"./constructFrom.js\";\nfunction sub(date, duration) {\n  const {\n    years = 0,\n    months = 0,\n    weeks = 0,\n    days = 0,\n    hours = 0,\n    minutes = 0,\n    seconds = 0\n  } = duration;\n  const dateWithoutMonths = subMonths(date, months + years * 12);\n  const dateWithoutDays = subDays(dateWithoutMonths, days + weeks * 7);\n  const minutestoSub = minutes + hours * 60;\n  const secondstoSub = seconds + minutestoSub * 60;\n  const mstoSub = secondstoSub * 1e3;\n  const finalDate = constructFrom(date, dateWithoutDays.getTime() - mstoSub);\n  return finalDate;\n}\nexport {\n  sub as default,\n  sub\n};\n","import { toDate } from \"./toDate.js\";\nimport { addLeadingZeros } from \"./_lib/addLeadingZeros.js\";\nfunction formatISO(date, options) {\n  const _date = toDate(date);\n  if (isNaN(_date.getTime())) {\n    throw new RangeError(\"Invalid time value\");\n  }\n  const format = (options == null ? void 0 : options.format) ?? \"extended\";\n  const representation = (options == null ? void 0 : options.representation) ?? \"complete\";\n  let result = \"\";\n  let tzOffset = \"\";\n  const dateDelimiter = format === \"extended\" ? \"-\" : \"\";\n  const timeDelimiter = format === \"extended\" ? \":\" : \"\";\n  if (representation !== \"time\") {\n    const day = addLeadingZeros(_date.getDate(), 2);\n    const month = addLeadingZeros(_date.getMonth() + 1, 2);\n    const year = addLeadingZeros(_date.getFullYear(), 4);\n    result = `${year}${dateDelimiter}${month}${dateDelimiter}${day}`;\n  }\n  if (representation !== \"date\") {\n    const offset = _date.getTimezoneOffset();\n    if (offset !== 0) {\n      const absoluteOffset = Math.abs(offset);\n      const hourOffset = addLeadingZeros(Math.trunc(absoluteOffset / 60), 2);\n      const minuteOffset = addLeadingZeros(absoluteOffset % 60, 2);\n      const sign = offset < 0 ? \"+\" : \"-\";\n      tzOffset = `${sign}${hourOffset}:${minuteOffset}`;\n    } else {\n      tzOffset = \"Z\";\n    }\n    const hour = addLeadingZeros(_date.getHours(), 2);\n    const minute = addLeadingZeros(_date.getMinutes(), 2);\n    const second = addLeadingZeros(_date.getSeconds(), 2);\n    const separator = result === \"\" ? \"\" : \"T\";\n    const time = [hour, minute, second].join(timeDelimiter);\n    result = `${result}${separator}${time}${tzOffset}`;\n  }\n  return result;\n}\nexport {\n  formatISO as default,\n  formatISO\n};\n","import { createKRTimeZoneDate } from \"../../../../utils/createUTCDate.js\";\nimport { sub } from \"../../../../node_modules/date-fns/sub.js\";\nimport { formatISO } from \"../../../../node_modules/date-fns/formatISO.js\";\nimport { formatSchedule } from \"./TimeSaleCollectionTags/TimeSaleCollectionTags.utils.js\";\nconst DATE_PREFIX = \"DATE@\";\nconst removeDatePrefix = (str) => str.replace(DATE_PREFIX, \"\").trim();\nconst reshapeProductGroups = (list, displayEndAt) => list.map((item, index) => {\n  const nextGroup = list[index + 1];\n  const startAt = formatISO(createKRTimeZoneDate(removeDatePrefix(item.title)));\n  const endAt = nextGroup ? (\n    // NOTE: (한지원) 상품 그룹 응답에서 종료일을 명확히 알 수 없으므로, 다음 스케줄의 1초 전 시간을 종료일로 설정합니다.\n    formatISO(sub(createKRTimeZoneDate(removeDatePrefix(nextGroup.title)), {\n      seconds: 1\n    }))\n  ) : displayEndAt;\n  return {\n    ...item,\n    title: formatSchedule(startAt),\n    startAt,\n    endAt\n  };\n});\nexport {\n  removeDatePrefix,\n  reshapeProductGroups\n};\n","import { createKRTimeZoneDate } from \"../../../../../utils/createUTCDate.js\";\nimport { isAbove } from \"../../../../../utils/date.js\";\nimport { ko } from \"../../../../../node_modules/date-fns/locale/ko.js\";\nimport { isWithinInterval } from \"../../../../../node_modules/date-fns/isWithinInterval.js\";\nimport { formatDate as format } from \"../../../../../node_modules/date-fns/format.js\";\nimport { differenceInHours } from \"../../../../../node_modules/date-fns/differenceInHours.js\";\nconst STANDARD_DIFF_HOURS = 48;\nconst getCurrentBrandSaleIndex = (brandSaleList) => {\n  const now = createKRTimeZoneDate();\n  const currentIndex = brandSaleList.findIndex((brandSale, index) => {\n    const nextInterval = brandSaleList[index + 1];\n    const hasNext = nextInterval !== void 0;\n    const start = new Date(brandSale.displayStartAt);\n    const end = new Date(brandSale.displayEndAt);\n    const isWithin = hasNext && isWithinInterval(now, {\n      start,\n      end\n    });\n    const isLast = !hasNext && isAbove(now, start);\n    return isWithin || isLast;\n  });\n  return currentIndex === -1 ? void 0 : currentIndex;\n};\nconst getCalendarTagName = ({\n  displayStartAt,\n  displayEndAt\n}) => {\n  const defaultTagName = format(displayStartAt, \"M. d eeeee\", {\n    locale: ko\n  });\n  if (!displayEndAt) {\n    return defaultTagName;\n  }\n  const diff = differenceInHours(displayEndAt, displayStartAt);\n  if (diff > STANDARD_DIFF_HOURS) {\n    return `${defaultTagName} 시작`;\n  }\n  return defaultTagName;\n};\nexport {\n  getCalendarTagName,\n  getCurrentBrandSaleIndex\n};\n","import { getProductGroupType } from \"../../systems/KeywordCollection/KeywordCollectionTags/KeywordCollectionTags.utils.js\";\nimport { reshapeProductGroups } from \"../../systems/curations/KeywordCollectionV2/TimeSaleCollection.utils.js\";\nimport { orderByDateAsc, getCurrentScheduleIndex } from \"../../../utils/date.js\";\nimport { getCalendarTagName, getCurrentBrandSaleIndex } from \"../../systems/curations/CouponCollection/CalendarTags/CalendarTags.utils.js\";\nimport { orderByGender, isGenderProductGroupMatches } from \"../utils/facet.js\";\nconst GENDER_PREFIX = \"GENDER@\";\nconst GENDER_SEPARATOR = \":\";\nconst reshapeProductGroupsByGender = (groups) => groups.map((group) => {\n  const [gender, title] = group.title.replace(GENDER_PREFIX, \"\").trim().split(GENDER_SEPARATOR);\n  return {\n    ...group,\n    title: group.title.includes(GENDER_PREFIX) ? title : group.title,\n    gender\n  };\n});\nconst getKeywordCollectionTagsResult = (query, userSegment) => {\n  const {\n    displayEndAt,\n    productGroups = []\n  } = query;\n  const type = getProductGroupType(productGroups);\n  if (type === \"DATE\") {\n    const groups = orderByDateAsc(reshapeProductGroups(productGroups, displayEndAt ?? \"\"), (x) => x.startAt);\n    const currentIndex = getCurrentScheduleIndex(groups, (x) => x.startAt, (x) => x.endAt);\n    return {\n      values: groups.map((group, index) => ({\n        label: group.title,\n        query: {\n          ...query,\n          selectedProductGroup: {\n            id: group.productGroupId,\n            index,\n            sort: group.sort,\n            startAt: group.startAt,\n            endAt: group.endAt\n          }\n        }\n      })),\n      currentIndex\n    };\n  }\n  if (type === \"GENDER\") {\n    const gender = userSegment.gender ?? \"F\";\n    const groups = orderByGender(reshapeProductGroupsByGender(productGroups), isGenderProductGroupMatches, gender);\n    return {\n      values: groups.map((group, index) => ({\n        label: group.title,\n        query: {\n          ...query,\n          selectedProductGroup: {\n            id: group.productGroupId,\n            sort: group.sort,\n            index\n          }\n        }\n      }))\n    };\n  }\n  return {\n    values: productGroups.map((group, index) => ({\n      label: group.title,\n      query: {\n        ...query,\n        selectedProductGroup: {\n          id: group.productGroupId,\n          index,\n          sort: group.sort\n        }\n      }\n    }))\n  };\n};\nconst getCouponCollectionTagsResult = (query) => {\n  const {\n    brandSales = []\n  } = query;\n  const values = brandSales.map((brandSale, index) => ({\n    label: getCalendarTagName(brandSale),\n    query: {\n      ...query,\n      brandSaleId: brandSale.brandSaleId,\n      index,\n      displayStartAt: brandSale.displayStartAt,\n      displayEndAt: brandSale.displayEndAt\n    }\n  }));\n  const currentIndex = getCurrentBrandSaleIndex(brandSales);\n  return {\n    values,\n    currentIndex\n  };\n};\nexport {\n  getCouponCollectionTagsResult,\n  getKeywordCollectionTagsResult,\n  reshapeProductGroupsByGender\n};\n","import useSWR from \"../../../node_modules/swr/core/dist/index.js\";\nimport { bestApi } from \"../../../apis/best/BestApiService.js\";\nimport { brandCurationApi } from \"../../../apis/brand-curation/BrandCurationApiService.js\";\nimport { brandSaleApi } from \"../../../apis/brand-sale/BrandSaleApiService.js\";\nimport { collectionApi } from \"../../../apis/collection/CollectionApiService.js\";\nimport { keywordCollectionApi } from \"../../../apis/keyword-collections/KeywordCollectionApiService.js\";\nimport { formatSchedule } from \"../../systems/curations/KeywordCollectionV2/TimeSaleCollectionTags/TimeSaleCollectionTags.utils.js\";\nimport { orderByDateAsc, getCurrentScheduleIndex } from \"../../../utils/date.js\";\nimport { splitToNumberArray } from \"../../../utils/splitToNumberArray.js\";\nimport { QueryType, CategoryType, RankingType } from \"../types.js\";\nimport { reshapeCategoryFacetValues } from \"../utils/facet.js\";\nimport { getKeywordCollectionTagsResult, getCouponCollectionTagsResult } from \"./TagsModule.utils.js\";\nconst TAGS_FETCHER_KEY = \"tags-module/tags\";\nconst useTagsQuery = (options) => {\n  const {\n    enabled: _enabled = true,\n    query,\n    userSegment\n  } = options;\n  const enabled = _enabled && query !== void 0;\n  const {\n    data,\n    isLoading,\n    ...rest\n  } = useSWR(enabled ? [TAGS_FETCHER_KEY, query] : null, () => queryTags(query, userSegment));\n  const {\n    values = [],\n    currentIndex\n  } = data ?? {};\n  const hasTags = values.length > 0;\n  return {\n    isLoading: isLoading || !enabled || !hasTags,\n    tags: values,\n    currentIndex,\n    ...rest\n  };\n};\nconst fetchKeywordCollectionTags = async (query, userSegment) => {\n  if (!query.keywordCollectionId) {\n    return {\n      values: []\n    };\n  }\n  const {\n    data\n  } = await keywordCollectionApi.getKeywordCollection(Number(query.keywordCollectionId));\n  const {\n    title,\n    description,\n    displayEndAt,\n    productGroups\n  } = data;\n  return getKeywordCollectionTagsResult({\n    ...query,\n    title,\n    description: description ?? void 0,\n    displayEndAt: displayEndAt ?? void 0,\n    couponId: data.couponId ?? void 0,\n    productGroups\n  }, userSegment);\n};\nconst fetchKeywordCollectionsTags = async (query) => {\n  if (!query.keywordCollectionIds) {\n    return {\n      values: []\n    };\n  }\n  const {\n    data\n  } = await collectionApi.getCollections(splitToNumberArray(query.keywordCollectionIds));\n  const collections = orderByDateAsc(data, (x) => x.displayStartAt);\n  const currentIndex = getCurrentScheduleIndex(collections, (current) => current.displayStartAt, (_, next) => next == null ? void 0 : next.displayStartAt);\n  return {\n    values: collections.map((collection) => {\n      const {\n        collectionId,\n        title,\n        description,\n        displayStartAt,\n        displayEndAt,\n        productGroupList,\n        couponId\n      } = collection;\n      const [firstProductGroup] = productGroupList;\n      return {\n        label: formatSchedule(displayStartAt),\n        query: {\n          // NOTE(임규민): 다중 키워드 컬렉션의 개별 요소는 결국 키워드 컬렉션이므로, 연결되는 모듈에서 KeywordCollectionQuery 로 식별되도록 한다.\n          type: QueryType.KeywordCollection,\n          keywordCollectionId: `${collectionId}`,\n          title,\n          description: description ?? void 0,\n          displayEndAt: displayEndAt ?? void 0,\n          couponId: couponId ?? void 0,\n          productGroups: productGroupList.map((group) => ({\n            productGroupId: group.collectionProductGroupId,\n            title: group.title,\n            sort: group.sort\n          })),\n          selectedProductGroup: {\n            id: firstProductGroup.collectionProductGroupId,\n            sort: firstProductGroup.sort,\n            index: 0\n          }\n        }\n      };\n    }),\n    currentIndex\n  };\n};\nconst fetchBrandCurationTags = async (query) => {\n  if (!query.brandGroupIds) {\n    return {\n      values: []\n    };\n  }\n  const brandGroupIds = splitToNumberArray(query.brandGroupIds).join(\",\");\n  const {\n    data\n  } = await brandCurationApi.getFavoriteBrands({\n    size: query.brandSize,\n    brandGroupIds\n  });\n  const values = data.frontBrands.map((brand) => ({\n    label: brand.nameKor,\n    query: {\n      ...query,\n      brandId: brand.frontBrandId\n    }\n  }));\n  return {\n    values\n  };\n};\nconst fetchRankingTags = async (query, userSegment) => {\n  if (!query.rankingTagIds) {\n    return {\n      values: []\n    };\n  }\n  const tagIds = splitToNumberArray(query.rankingTagIds);\n  const {\n    data\n  } = await bestApi.getPLPFacetGroup({\n    facetGroupInput: {\n      tagFacetInputs: tagIds.map((tagId) => ({\n        tagId\n      }))\n    }\n  });\n  const gender = userSegment.gender ?? \"F\";\n  const categories = reshapeCategoryFacetValues(data.categoryFacet.values, {\n    categoryType: query.categoryType,\n    gender,\n    excludeCategories: {\n      largeIds: splitToNumberArray(query.excludeLargeCategoryIds),\n      middleIds: splitToNumberArray(query.excludeMiddleCategoryIds)\n    }\n  });\n  const inputs = categories.map((category) => {\n    const categoryProperties = {\n      [CategoryType.Large]: {\n        largeCategoryId: category.id\n      },\n      [CategoryType.Middle]: {\n        largeCategoryId: category.parentId,\n        middleCategoryId: category.id\n      }\n    };\n    return {\n      label: category.name,\n      query: {\n        ...query,\n        ...categoryProperties[query.categoryType],\n        childCategories: category.children ?? []\n      }\n    };\n  });\n  const allCategory = {\n    label: \"전체\",\n    query\n  };\n  const isTrending = query.rankingType === RankingType.Trending;\n  return {\n    values: isTrending ? [allCategory, ...inputs] : inputs\n  };\n};\nconst fetchCouponCollectionTags = async (query) => {\n  if (!query.brandSaleGroupId) {\n    return {\n      values: []\n    };\n  }\n  const {\n    data\n  } = await brandSaleApi.getBrandSaleGroup(Number(query.brandSaleGroupId));\n  const {\n    title,\n    description,\n    brandSaleList\n  } = data;\n  return getCouponCollectionTagsResult({\n    ...query,\n    title,\n    description: description ?? void 0,\n    brandSales: brandSaleList\n  });\n};\nconst queryTags = (query, userSegment) => {\n  if (!query) {\n    return {\n      values: []\n    };\n  }\n  switch (query.type) {\n    case QueryType.KeywordCollection:\n      return fetchKeywordCollectionTags(query, userSegment);\n    case QueryType.KeywordCollections:\n      return fetchKeywordCollectionsTags(query);\n    case QueryType.BrandCuration:\n      return fetchBrandCurationTags(query);\n    case QueryType.Ranking:\n      return fetchRankingTags(query, userSegment);\n    case QueryType.CouponCollection:\n      return fetchCouponCollectionTags(query);\n    default:\n      return {\n        values: []\n      };\n  }\n};\nexport {\n  useTagsQuery\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { useSegment } from \"../../../@shared/providers/SegmentProvider/SegmentProvider.js\";\nimport \"../../../systems/curations/IntersectionProvider/IntersectionProvider.js\";\nimport { useIntersectionContext } from \"../../../systems/curations/IntersectionProvider/IntersectionProvider.hooks.js\";\nimport \"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 \"framer\";\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 \"../../../../apis/taste-sharing/TasteSharingApiService.js\";\nimport \"../../../../node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.js\";\nimport \"../../../../node_modules/js-cookie/dist/js.cookie.js\";\nimport \"../../../../apis/preuser/PreuserApiService.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 \"../../../systems/Dialog/Dialog.module.css.js\";\nimport \"framer-motion\";\nimport \"../../../../containers/DialogContainer/DialogContainer.emitter.js\";\nimport \"../../../../utils/redirectLogin.js\";\nimport \"../../../../utils/event-properties/source.js\";\nimport { TagsElement } from \"../TagsElement/TagsElement.js\";\nimport { useTagsQuery } from \"../TagsModule.hooks.js\";\nconst AutoTagsModule = ({\n  query,\n  output,\n  layout\n}) => {\n  const {\n    isInView\n  } = useIntersectionContext();\n  const {\n    isVisible\n  } = useSegment();\n  const user = useCurrentUser();\n  const {\n    isLoading,\n    tags,\n    currentIndex\n  } = useTagsQuery({\n    query,\n    userSegment: user,\n    enabled: isInView && isVisible\n  });\n  return /* @__PURE__ */ jsx(TagsElement, { loading: isLoading, currentIndex, inputs: tags, output, layout });\n};\nexport {\n  AutoTagsModule\n};\n","import { combineObjectPropertyControls } from \"../../../libs/property-controls/helpers.js\";\nimport { QUERY_CONTROL, COUPON_COLLECTION_CONTROLS, RANKING_CONTROLS, BRAND_CURATION_CONTROLS, KEYWORD_COLLECTIONS_CONTROLS, KEYWORD_COLLECTION_CONTROLS, RECOMMENDATION_CONTROLS, PRODUCT_CONTROLS } from \"../controls.js\";\nconst AUTO_TAGS_MODULE_QUERY = {\n  ...QUERY_CONTROL,\n  controls: combineObjectPropertyControls(KEYWORD_COLLECTION_CONTROLS, KEYWORD_COLLECTIONS_CONTROLS, BRAND_CURATION_CONTROLS, RANKING_CONTROLS, COUPON_COLLECTION_CONTROLS)\n};\nconst MANUAL_TAGS_MODULE_QUERY = {\n  ...QUERY_CONTROL,\n  controls: combineObjectPropertyControls(PRODUCT_CONTROLS, RECOMMENDATION_CONTROLS)\n};\nexport {\n  AUTO_TAGS_MODULE_QUERY,\n  MANUAL_TAGS_MODULE_QUERY\n};\n","import { QueryType } from \"../../types.js\";\nimport { getKeywordCollectionTagsResult, getCouponCollectionTagsResult } from \"../TagsModule.utils.js\";\nconst getKeywordCollectionTags = (query, userSegment) => {\n  if (query.productGroups === void 0) {\n    return {\n      values: []\n    };\n  }\n  return getKeywordCollectionTagsResult(query, userSegment);\n};\nconst getCouponCollectionTags = (query) => {\n  if (query.brandSales === void 0) {\n    return {\n      values: []\n    };\n  }\n  return getCouponCollectionTagsResult(query);\n};\nconst getRankingTags = (query) => {\n  if (query.childCategories === void 0) {\n    return {\n      values: []\n    };\n  }\n  const {\n    childCategories\n  } = query;\n  const inputs = childCategories.map((category) => ({\n    label: category.name,\n    query: {\n      ...query,\n      middleCategoryId: category.id\n    }\n  }));\n  const allCategory = {\n    label: \"전체\",\n    query\n  };\n  return {\n    values: [allCategory, ...inputs]\n  };\n};\nconst getTags = (query, userSegment) => {\n  if (!query) {\n    return {\n      values: []\n    };\n  }\n  switch (query.type) {\n    case QueryType.KeywordCollection:\n      return getKeywordCollectionTags(query, userSegment);\n    case QueryType.CouponCollection:\n      return getCouponCollectionTags(query);\n    case QueryType.Ranking:\n      return getRankingTags(query);\n    default:\n      return {\n        values: []\n      };\n  }\n};\nexport {\n  getTags\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { useQueryStore } from \"../../query-store/query.store.js\";\nimport { TagsElement } from \"../TagsElement/TagsElement.js\";\nimport { useMemo, useEffect } 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 \"framer\";\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 \"../../../../apis/taste-sharing/TasteSharingApiService.js\";\nimport \"../../../../node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.js\";\nimport \"../../../../node_modules/js-cookie/dist/js.cookie.js\";\nimport \"../../../../apis/preuser/PreuserApiService.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 \"../../../systems/Dialog/Dialog.module.css.js\";\nimport \"framer-motion\";\nimport \"../../../../containers/DialogContainer/DialogContainer.emitter.js\";\nimport { shallow as shallow$1 } from \"../../../../node_modules/zustand/esm/shallow.js\";\nimport \"../../../../utils/redirectLogin.js\";\nimport \"../../../../utils/event-properties/source.js\";\nimport { getTags } from \"./LinkedTagsModule.utils.js\";\nimport { createKey } from \"../../utils/key.js\";\nconst LinkedTagsModule = ({\n  value,\n  output,\n  layout\n}) => {\n  const user = useCurrentUser();\n  const [query, dispatchSetQuery] = useQueryStore((state) => [state.queries[value], state.dispatchSetQuery], shallow$1);\n  const {\n    values,\n    currentIndex\n  } = useMemo(() => getTags(query, user), [query, user]);\n  useEffect(() => {\n    if (values.length > 0 || !query) {\n      return;\n    }\n    dispatchSetQuery(output, query);\n  }, [query, values.length]);\n  return /* @__PURE__ */ jsx(TagsElement, { inputs: values, output, currentIndex, layout }, createKey(query));\n};\nexport {\n  LinkedTagsModule\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { addPropertyControls, ControlType } from \"framer\";\nimport { TagsModuleInputType } from \"./TagsModule.types.js\";\nimport { AutoTagsModule } from \"./AutoTagsModule/AutoTagsModule.js\";\nimport { SectionLayout } from \"../../systems/curations/SectionLayout/SectionLayout.js\";\nimport { SWRErrorBoundary } from \"../../@shared/SWRErrorBoundary/SWRErrorBoundary.js\";\nimport { BREAKPOINT_CONTROLS } from \"../../../libs/property-controls/breakpoint.js\";\nimport { THEME_CONTROLS } from \"../../../libs/property-controls/theme.js\";\nimport { COMPONENT_ID_PROPS } from \"../../../libs/property-controls/component-id.js\";\nimport { TagsElement } from \"./TagsElement/TagsElement.js\";\nimport { MANUAL_TAGS_MODULE_QUERY, AUTO_TAGS_MODULE_QUERY } from \"./TagsModule.controls.js\";\nimport { LinkedTagsModule } from \"./LinkedTagsModule/LinkedTagsModule.js\";\nimport { SEGMENT_CONTROLS } from \"../../../libs/property-controls/segment.js\";\nconst TagsModuleInner = ({\n  input,\n  output,\n  layout\n}) => {\n  switch (input.type) {\n    case TagsModuleInputType.Linked:\n      return /* @__PURE__ */ jsx(LinkedTagsModule, { value: input.value, output, layout });\n    case TagsModuleInputType.Auto:\n      return /* @__PURE__ */ jsx(AutoTagsModule, { query: input.query, output, layout });\n    case TagsModuleInputType.Manual:\n      return /* @__PURE__ */ jsx(TagsElement, { inputs: input.values, output, layout });\n    default:\n      return null;\n  }\n};\nconst TagsModule = ({\n  theme,\n  breakpoint,\n  componentId,\n  segment,\n  ...rest\n}) => {\n  return /* @__PURE__ */ jsx(SectionLayout, { theme, breakpoint, componentId, segment, children: /* @__PURE__ */ jsx(SWRErrorBoundary, { children: /* @__PURE__ */ jsx(TagsModuleInner, { ...rest }) }) });\n};\naddPropertyControls(TagsModule, {\n  ...BREAKPOINT_CONTROLS,\n  ...THEME_CONTROLS,\n  ...SEGMENT_CONTROLS,\n  componentId: {\n    hidden: ({\n      input\n    }) => (input == null ? void 0 : input.type) === TagsModuleInputType.Linked,\n    ...COMPONENT_ID_PROPS.componentId\n  },\n  input: {\n    type: ControlType.Object,\n    title: \"입력 값\",\n    controls: {\n      type: {\n        type: ControlType.Enum,\n        title: \"유형\",\n        options: [TagsModuleInputType.Linked, TagsModuleInputType.Auto, TagsModuleInputType.Manual],\n        optionTitles: [\"연결\", \"자동\", \"수동\"]\n      },\n      value: {\n        hidden: ({\n          type\n        }) => type !== TagsModuleInputType.Linked,\n        type: ControlType.String,\n        title: \"출력 값\",\n        defaultValue: \"\"\n      },\n      values: {\n        hidden: ({\n          type\n        }) => type !== TagsModuleInputType.Manual,\n        type: ControlType.Array,\n        title: \"입력 값 목록\",\n        control: {\n          type: ControlType.Object,\n          title: \"입력 값\",\n          controls: {\n            label: {\n              type: ControlType.String,\n              title: \"이름\",\n              defaultValue: \"텍스트\"\n            },\n            query: MANUAL_TAGS_MODULE_QUERY\n          }\n        },\n        defaultValue: [{\n          label: \"텍스트\"\n        }]\n      },\n      query: {\n        hidden: ({\n          type\n        }) => type !== TagsModuleInputType.Auto,\n        ...AUTO_TAGS_MODULE_QUERY\n      }\n    }\n  },\n  output: {\n    type: ControlType.String,\n    title: \"출력 값\"\n  },\n  layout: {\n    type: ControlType.Object,\n    title: \"레이아웃\",\n    controls: {\n      padding: {\n        type: ControlType.FusedNumber,\n        title: \"패딩\",\n        defaultValue: 0,\n        toggleKey: \"isMixed\",\n        toggleTitles: [\"All\", \"Individual\"],\n        valueKeys: [\"paddingTop\", \"paddingRight\", \"paddingBottom\", \"paddingLeft\"],\n        valueLabels: [\"T\", \"R\", \"B\", \"L\"],\n        min: 0\n      }\n    }\n  }\n});\nexport {\n  TagsModule\n};\n","import{TagsModule}from\"https://asset.29cm.co.kr/contents/framer/components/modules/TagsModule/TagsModule.js\";TagsModule.displayName=\"[조립형]Tags\";export default TagsModule;\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"TagsModule\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TagsModule.map","import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useReducer,useState}from\"react\";import{ControlType,addPropertyControls}from\"framer\";import{useIsOnCanvas,emptyStateStyle,containerStyles,defaultEvents,useRadius,borderRadiusControl}from\"https://framer.com/m/framer/default-utils.js@^0.45.0\";var PlayOptions;(function(PlayOptions){PlayOptions[\"Normal\"]=\"Off\";PlayOptions[\"Auto\"]=\"On\";PlayOptions[\"Loop\"]=\"Loop\";})(PlayOptions||(PlayOptions={}));var ThumbnailOptions;(function(ThumbnailOptions){ThumbnailOptions[\"High\"]=\"High Quality\";ThumbnailOptions[\"Medium\"]=\"Medium Quality\";ThumbnailOptions[\"Low\"]=\"Low Quality\";ThumbnailOptions[\"Off\"]=\"Off\";})(ThumbnailOptions||(ThumbnailOptions={}));var ThumbnailFormat;(function(ThumbnailFormat){ThumbnailFormat[\"WebP\"]=\"webp\";ThumbnailFormat[\"JPG\"]=\"jpg\";})(ThumbnailFormat||(ThumbnailFormat={}));/**\n * @framerIntrinsicWidth 560\n * @framerIntrinsicHeight 315\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n *\n * @framerComponentPresetProps isRed, borderRadius\n */export function Youtube({url,play,shouldMute,thumbnail,isRed,onClick,onMouseEnter,onMouseLeave,onMouseDown,onMouseUp,title,...props}){const onCanvas=useIsOnCanvas();const isAutoplay=play!==\"Off\";const showThumbnail=onCanvas||thumbnail!==\"Off\"&&!isAutoplay;const[isPreloading,preloadVideo]=useReducer(()=>true,false);const[showVideo,startVideo]=useReducer(()=>true,!showThumbnail);const[isHovered,setHovered]=useState(false);const borderRadius=useRadius(props);const hasBorderRadius=borderRadius!==\"0px 0px 0px 0px\"&&borderRadius!==\"0px\";if(url===\"\"){return /*#__PURE__*/_jsx(Instructions,{});}const parsedURL=parseVideoURL(url);if(parsedURL===undefined){return /*#__PURE__*/_jsx(ErrorMessage,{message:\"Invalid Youtube URL.\"});}const[videoId,embedURL]=parsedURL;// https://developers.google.com/youtube/player_parameters\nconst searchParams=embedURL.searchParams;searchParams.set(\"iv_load_policy\",\"3\");searchParams.set(\"rel\",\"0\");searchParams.set(\"modestbranding\",\"1\");searchParams.set(\"playsinline\",\"1\");if(!showVideo){// if a browser does not support `loading=lazy`, make sure the video doesn't start playing in the background\nsearchParams.set(\"autoplay\",\"0\");}else if(isAutoplay||// when there is no thumbnail, we don't want to autoplay, unless video is started\nshowThumbnail&&showVideo){searchParams.set(\"autoplay\",\"1\");}if(isAutoplay&&shouldMute){searchParams.set(\"mute\",\"1\");}if(play===\"Loop\"){searchParams.set(\"loop\",\"1\");searchParams.set(\"playlist\",videoId);}if(!isRed){searchParams.set(\"color\",\"white\");}const iframeProps={title:title||\"Youtube Video\",allow:\"presentation; fullscreen; accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\",src:embedURL.href,frameBorder:\"0\",onClick,onMouseEnter,onMouseLeave,onMouseDown,onMouseUp};return /*#__PURE__*/_jsxs(\"article\",{onPointerEnter:()=>setHovered(true),onPointerLeave:()=>setHovered(false),onPointerOver:preloadVideo,onKeyDown:startVideo,onClick:startVideo,style:{...wrapperStyle,borderRadius,transform:// Safari sometimes struggles to render border-radius:\n// - on the canvas when changing from 0 to any other value\n// - or when rendering an iframe\nhasBorderRadius&&(showVideo||onCanvas)?\"translateZ(0.000001px)\":\"unset\",cursor:\"pointer\",overflow:\"hidden\"},role:\"presentation\",children:[isPreloading&&/*#__PURE__*/_jsx(\"link\",{rel:\"preconnect\",href:\"https://www.youtube.com\"}),isPreloading&&/*#__PURE__*/_jsx(\"link\",{rel:\"preconnect\",href:\"https://www.google.com\"}),/*#__PURE__*/_jsx(\"div\",{style:{...videoStyle,background:showThumbnail?`center / cover url(${getThumbnailURL(videoId,thumbnail,getWebPSupported()?\"webp\":\"jpg\")}) no-repeat`:undefined}}),!onCanvas?/*#__PURE__*/_jsx(\"iframe\",{loading:!showVideo?\"lazy\":undefined,style:!showVideo?{...videoStyle,display:\"none\"}:videoStyle,...iframeProps}):null,showVideo?null:/*#__PURE__*/_jsx(PlayButton,{onClick:startVideo,isHovered:isHovered,isRed:isRed})]});}Youtube.displayName=\"YouTube\";addPropertyControls(Youtube,{url:{type:ControlType.String,title:\"Video\"},play:{type:ControlType.Enum,title:\"Autoplay\",options:Object.values(PlayOptions)},shouldMute:{title:\"Mute\",type:ControlType.Boolean,enabledTitle:\"Yes\",disabledTitle:\"No\",hidden(props){return props.play===\"Off\";}},thumbnail:{title:\"Thumbnail\",description:\"Showing a thumbnail improves performance.\",type:ControlType.Enum,options:Object.values(ThumbnailOptions),hidden(props){return props.play!==\"Off\";}},isRed:{title:\"Color\",type:ControlType.Boolean,enabledTitle:\"Red\",disabledTitle:\"White\"},...borderRadiusControl,...defaultEvents});const defaultProps={url:\"https://youtu.be/smPos0mJvh8\",play:\"Off\",shouldMute:true,thumbnail:\"Medium Quality\",isRed:true};Youtube.defaultProps=defaultProps;function parseVideoURL(urlString){let url;try{url=new URL(urlString);}catch{const embedURL=getEmbedURL(urlString);return[urlString,embedURL];}if(url.hostname===\"youtube.com\"||url.hostname===\"www.youtube.com\"||url.hostname===\"youtube-nocookie.com\"||url.hostname===\"www.youtube-nocookie.com\"){const pathSegments=url.pathname.slice(1).split(\"/\");// https://www.youtube.com/watch?v=Fop2oskTug8\nif(pathSegments[0]===\"watch\"){const videoId=url.searchParams.get(\"v\");const embedURL=getEmbedURL(videoId);return[videoId,embedURL];}// https://www.youtube.com/embed/Fop2oskTug8\nif(pathSegments[0]===\"embed\"){const videoId=pathSegments[1];return[videoId,url];}}// https://youtu.be/Fop2oskTug8\nif(url.hostname===\"youtu.be\"){const videoId=url.pathname.slice(1);const embedURL=getEmbedURL(videoId);return[videoId,embedURL];}}function getEmbedURL(videoId){return new URL(`https://www.youtube.com/embed/${videoId}`);}function getThumbnailURL(videoId,res,format=\"jpg\"){// https://gist.github.com/a1ip/be4514c1fd392a8c13b05e082c4da363\nconst useWebP=format===\"webp\";const pre=useWebP?\"https://i.ytimg.com/vi_webp/\":\"https://i.ytimg.com/vi/\";const ext=useWebP?\"webp\":\"jpg\";switch(res){case\"Low Quality\":return`${pre}${videoId}/hqdefault.${ext}`;case\"Medium Quality\":return`${pre}${videoId}/sddefault.${ext}`;case\"High Quality\":return`${pre}${videoId}/maxresdefault.${ext}`;default:return`${pre}${videoId}/0.${ext}`;}}let _getWebPSupported;// https://stackoverflow.com/a/27232658\nfunction getWebPSupported(){// We're going to default to webp because it's pretty widely supported by now\nif(!window){return true;}if(_getWebPSupported!==undefined){return _getWebPSupported;}const element=document.createElement(\"canvas\");if(element.getContext&&element.getContext(\"2d\")){// was able or not to get WebP representation\nreturn _getWebPSupported=element.toDataURL(\"image/webp\").indexOf(\"data:image/webp\")===0;}else{// very old browser like IE 8, canvas not supported\nreturn _getWebPSupported=false;}}// Helper components\nfunction Instructions(){return /*#__PURE__*/_jsx(\"div\",{style:{...emptyStateStyle,overflow:\"hidden\"},children:/*#__PURE__*/_jsx(\"div\",{style:centerTextStyle,children:\"To embed a Youtube video, add the URL to the properties\\xa0panel.\"})});}function ErrorMessage({message}){return /*#__PURE__*/_jsx(\"div\",{className:\"framerInternalUI-errorPlaceholder\",style:{...containerStyles,overflow:\"hidden\"},children:/*#__PURE__*/_jsxs(\"div\",{style:centerTextStyle,children:[\"Error: \",message]})});}function PlayButton({onClick,isHovered,isRed}){return /*#__PURE__*/_jsx(\"button\",{onClick:onClick,\"aria-label\":\"Play\",style:buttonStyle,children:/*#__PURE__*/_jsxs(\"svg\",{height:\"100%\",version:\"1.1\",viewBox:\"0 0 68 48\",width:\"100%\",children:[/*#__PURE__*/_jsx(\"path\",{d:\"M66.52,7.74c-0.78-2.93-2.49-5.41-5.42-6.19C55.79,.13,34,0,34,0S12.21,.13,6.9,1.55 C3.97,2.33,2.27,4.81,1.48,7.74C0.06,13.05,0,24,0,24s0.06,10.95,1.48,16.26c0.78,2.93,2.49,5.41,5.42,6.19 C12.21,47.87,34,48,34,48s21.79-0.13,27.1-1.55c2.93-0.78,4.64-3.26,5.42-6.19C67.94,34.95,68,24,68,24S67.94,13.05,66.52,7.74z\",fill:isHovered?isRed?\"#f00\":\"#000\":\"#212121\",fillOpacity:isHovered?isRed?1:.8:.8,style:{transition:\"fill .1s cubic-bezier(0.4, 0, 1, 1), fill-opacity .1s cubic-bezier(0.4, 0, 1, 1)\"}}),/*#__PURE__*/_jsx(\"path\",{d:\"M 45,24 27,14 27,34\",fill:\"#fff\"})]})});}const buttonStyle={position:\"absolute\",top:\"50%\",left:\"50%\",transform:\"translate(-50%, -50%)\",width:68,height:48,padding:0,border:\"none\",background:\"transparent\",cursor:\"pointer\"};const wrapperStyle={position:\"relative\",width:\"100%\",height:\"100%\"};const centerTextStyle={textAlign:\"center\",minWidth:140};const videoStyle={position:\"absolute\",top:0,left:0,height:\"100%\",width:\"100%\"};\nexport const __FramerMetadata__ = {\"exports\":{\"Youtube\":{\"type\":\"reactComponent\",\"name\":\"Youtube\",\"slots\":[],\"annotations\":{\"framerComponentPresetProps\":\"isRed, borderRadius\",\"framerIntrinsicHeight\":\"315\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerIntrinsicWidth\":\"560\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./YouTube.map","import { ControlType } from \"framer\";\nconst COUPON_LAYOUT_RESPONSIVE = \"responsive\";\nvar CouponColorType = /* @__PURE__ */ ((CouponColorType2) => {\n  CouponColorType2[\"DEFAULT\"] = \"default\";\n  CouponColorType2[\"SOLID\"] = \"solid\";\n  CouponColorType2[\"GRADIENT\"] = \"gradient\";\n  return CouponColorType2;\n})(CouponColorType || {});\nconst COUPON_CONTROLS = {\n  couponLayout: {\n    type: ControlType.Enum,\n    title: \"쿠폰 레이아웃\",\n    options: [\"detail\", \"compact\", COUPON_LAYOUT_RESPONSIVE],\n    optionTitles: [\"기본\", \"컴팩트\", \"반응형\"],\n    defaultValue: \"detail\"\n  },\n  backgroundColor: {\n    type: ControlType.Object,\n    title: \"쿠폰 배경색\",\n    controls: {\n      colorType: {\n        type: ControlType.Enum,\n        title: \"유형\",\n        optionTitles: [\"기본\", \"단색\", \"그라디언트\"],\n        options: [\n          \"default\",\n          \"solid\",\n          \"gradient\"\n          /* GRADIENT */\n        ]\n      },\n      color: {\n        type: ControlType.Color,\n        title: \"단색\",\n        optional: true,\n        hidden: ({\n          colorType\n        }) => colorType !== \"solid\"\n        /* SOLID */\n      },\n      gradient: {\n        type: ControlType.Object,\n        title: \"그라디언트\",\n        controls: {\n          stops: {\n            type: ControlType.Array,\n            title: \"색상 및 정지점들\",\n            control: {\n              type: ControlType.Object,\n              title: \"색상 및 정지점\",\n              controls: {\n                color: {\n                  type: ControlType.Color,\n                  title: \"색상\",\n                  optional: true\n                },\n                offsetPercent: {\n                  type: ControlType.Number,\n                  title: \"정지점\",\n                  unit: \"%\",\n                  min: 0,\n                  max: 100,\n                  defaultValue: 0,\n                  step: 1,\n                  displayStepper: true\n                }\n              }\n            }\n          },\n          degree: {\n            type: ControlType.Number,\n            title: \"각도\",\n            unit: \"deg\",\n            defaultValue: 0,\n            step: 1,\n            displayStepper: true\n          }\n        },\n        hidden: ({\n          colorType\n        }) => colorType !== \"gradient\"\n        /* GRADIENT */\n      }\n    }\n  }\n};\nconst COUPON_THEME_TYPE = {\n  DEFAULT: \"default\",\n  LIGHT: \"light\",\n  DARK: \"dark\"\n};\nconst COUPON_THEME_CONTROLS = {\n  couponTheme: {\n    type: ControlType.Enum,\n    title: \"쿠폰 테마\",\n    description: \"쿠폰 영역에 별도 테마를 적용합니다. 기본은 섹션 테마를 따릅니다.\",\n    options: [COUPON_THEME_TYPE.DEFAULT, COUPON_THEME_TYPE.LIGHT, COUPON_THEME_TYPE.DARK],\n    optionTitles: [\"기본 (테마 동일)\", \"Light\", \"Dark\"],\n    defaultValue: COUPON_THEME_TYPE.DEFAULT\n  }\n};\nconst resolveCouponTheme = (couponTheme) => couponTheme === COUPON_THEME_TYPE.DEFAULT ? void 0 : couponTheme;\nconst resolveCouponLayout = (couponLayout, breakpoint) => {\n  if (!couponLayout || couponLayout === COUPON_LAYOUT_RESPONSIVE) {\n    return breakpoint === \"mobile\" ? \"compact\" : \"detail\";\n  }\n  return couponLayout;\n};\nconst toBackgroundColor = (backgroundColor) => {\n  const {\n    colorType,\n    color,\n    gradient\n  } = backgroundColor;\n  const backgroundColorByType = {\n    [\n      \"default\"\n      /* DEFAULT */\n    ]: void 0,\n    [\n      \"solid\"\n      /* SOLID */\n    ]: color,\n    [\n      \"gradient\"\n      /* GRADIENT */\n    ]: gradient\n  };\n  return backgroundColorByType[colorType];\n};\nexport {\n  COUPON_CONTROLS,\n  COUPON_LAYOUT_RESPONSIVE,\n  COUPON_THEME_CONTROLS,\n  COUPON_THEME_TYPE,\n  CouponColorType,\n  resolveCouponLayout,\n  resolveCouponTheme,\n  toBackgroundColor\n};\n","const pick = (obj, keys) => {\n  const picked = {};\n  keys.forEach((key) => {\n    picked[key] = obj[key];\n  });\n  return picked;\n};\nconst isObject = (object) => {\n  return typeof object === \"object\" && object !== null && !Array.isArray(object);\n};\nexport {\n  isObject,\n  pick\n};\n","const variantByType = {\n  neutral: {\n    background: {\n      light: \"#dee2e6\",\n      dark: \"#27272a\"\n    },\n    primary: {\n      light: \"#000\",\n      dark: \"#fff\"\n    },\n    secondary: {\n      light: \"#474747\",\n      dark: \"#a0a0a0\"\n    },\n    tertiary: {\n      light: \"rgba(0, 0, 0, 0.5)\",\n      dark: \"rgba(255, 255, 255, 0.5)\"\n    },\n    border: \"rgba(255, 255, 255, 0.13)\"\n  },\n  accent: {\n    // NOTE(임규민): 기본 key color, 외부에서 커스터마이즈가 가능한 값입니다.\n    background: {\n      light: \"#ff4800\",\n      dark: \"#ff4800\"\n    },\n    primary: {\n      light: \"#000\",\n      dark: \"#fff\"\n    },\n    secondary: {\n      light: \"#000\",\n      dark: \"#fff\"\n    },\n    tertiary: {\n      light: \"#000\",\n      dark: \"#fff\"\n    },\n    border: \"rgba(255, 255, 255, 0.5)\"\n  },\n  disabled: {\n    background: {\n      light: \"#dee2e6\",\n      dark: \"#27272a\"\n    },\n    primary: {\n      light: \"#474747\",\n      dark: \"#a0a0a0\"\n    },\n    secondary: {\n      light: \"#474747\",\n      dark: \"#a0a0a0\"\n    },\n    tertiary: {\n      light: \"rgba(0, 0, 0, 0.5)\",\n      dark: \"rgba(255, 255, 255, 0.5)\"\n    },\n    border: \"rgba(255, 255, 255, 0.13)\"\n  }\n};\nconst variantByStatus = {\n  upcoming: variantByType.neutral,\n  downloadable: variantByType.accent,\n  downloaded: variantByType.neutral,\n  expired: variantByType.disabled,\n  disabled: variantByType.disabled,\n  issuanceLimitedReached: variantByType.disabled\n};\nexport {\n  variantByStatus,\n  variantByType\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { createContext, forwardRef, useCallback } from \"react\";\nimport { isObject } from \"../../../utils/object.js\";\nimport { Skeleton } from \"../Skeleton/Skeleton.js\";\nimport { variantByStatus } from \"./Root.constants.js\";\nconst CouponContext = createContext(null);\nconst Root = forwardRef(({\n  children,\n  style,\n  theme = \"light\",\n  loading = false,\n  status = \"downloadable\",\n  layout = \"detail\",\n  backgroundColor: _backgroundColor,\n  ...rest\n}, ref) => {\n  const variant = variantByStatus[status];\n  const backgroundColor = status === \"downloadable\" ? _backgroundColor ?? variant.background : variant.background;\n  const getBackground = useCallback(() => {\n    if (!isObject(backgroundColor)) {\n      return backgroundColor;\n    }\n    if (\"stops\" in backgroundColor) {\n      return getLinearGradient(backgroundColor);\n    }\n    return backgroundColor[theme];\n  }, [backgroundColor, theme]);\n  return /* @__PURE__ */ jsx(CouponContext.Provider, { value: {\n    status,\n    variant,\n    layout\n  }, children: /* @__PURE__ */ jsx(\"div\", { ref, style: {\n    ...containerStyle,\n    ...style\n  }, ...rest, children: loading ? /* @__PURE__ */ jsx(Skeleton, { style: {\n    ...skeletonStyle,\n    ...skeletonStyleByTheme[theme],\n    ...skeletonStyleByLayout[layout]\n  } }) : /* @__PURE__ */ jsx(\"div\", { style: {\n    ...wrapperStyle,\n    background: getBackground(),\n    ...wrapperStyleByLayout[layout],\n    ...layout === \"compact\" ? compactWrapperStyleByStatus[status] : {}\n  }, children }) }) });\n});\nconst getLinearGradient = (linearGradient) => {\n  const {\n    stops,\n    degree\n  } = linearGradient;\n  const gradient = [...stops].sort((x, y) => x.offsetPercent - y.offsetPercent).map((stop) => `${stop.color} ${stop.offsetPercent}%`).join(\", \");\n  return `linear-gradient(${degree}deg, ${gradient})`;\n};\nconst containerStyle = {\n  width: \"100%\"\n};\nconst wrapperStyle = {\n  position: \"relative\",\n  width: \"100%\",\n  display: \"flex\",\n  borderRadius: 4,\n  overflow: \"hidden\"\n};\nconst wrapperStyleByLayout = {\n  compact: {\n    height: 46,\n    WebkitMaskImage: `url('data:image/svg+xml;utf8,<svg width=\"6\" height=\"14\" viewBox=\"0 0 6 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M6.00017 7C6.00017 10.866 2.86617 14 0.000163798 14C1.24598e-06 9.18 0.000163798 4.822 0.000163798 0C2.86617 0 6.00017 3.134 6.00017 7Z\" fill=\"white\"/></svg>'), linear-gradient(#fff,#fff)`,\n    maskImage: `url('data:image/svg+xml;utf8,<svg width=\"6\" height=\"14\" viewBox=\"0 0 6 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M6.00017 7C6.00017 10.866 2.86617 14 0.000163798 14C1.24598e-06 9.18 0.000163798 4.822 0.000163798 0C2.86617 0 6.00017 3.134 6.00017 7Z\" fill=\"white\"/></svg>'), linear-gradient(#fff,#fff)`,\n    WebkitMaskComposite: \"exclude\",\n    maskComposite: \"exclude\",\n    WebkitMaskPosition: \"0 50%\",\n    maskPosition: \"0 50%\",\n    WebkitMaskSize: \"6px 14px, auto\",\n    maskSize: \"6px 14px, auto\",\n    WebkitMaskRepeat: \"no-repeat\",\n    maskRepeat: \"no-repeat\"\n  },\n  detail: {\n    height: 76,\n    WebkitMaskImage: `url('data:image/svg+xml;utf8,<svg width=\"8\" height=\"16\" viewBox=\"0 0 8 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M8.00022 8C8.00022 12.4183 4.4185 16 0.000218398 16C1.66131e-06 10.4911 0.000218398 5.52413 0.000218398 0C4.4185 0 8.00022 3.58172 8.00022 8Z\" fill=\"white\"/></svg>'), linear-gradient(#fff,#fff)`,\n    maskImage: `url('data:image/svg+xml;utf8,<svg width=\"8\" height=\"16\" viewBox=\"0 0 8 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M8.00022 8C8.00022 12.4183 4.4185 16 0.000218398 16C1.66131e-06 10.4911 0.000218398 5.52413 0.000218398 0C4.4185 0 8.00022 3.58172 8.00022 8Z\" fill=\"white\"/></svg>'), linear-gradient(#fff,#fff)`,\n    WebkitMaskComposite: \"exclude\",\n    maskComposite: \"exclude\",\n    WebkitMaskPosition: \"0 50%\",\n    maskPosition: \"0 50%\",\n    WebkitMaskSize: \"8px 16px, auto\",\n    maskSize: \"8px 16px, auto\",\n    WebkitMaskRepeat: \"no-repeat\",\n    maskRepeat: \"no-repeat\"\n  }\n};\nconst compactWrapperStyleByStatus = {\n  upcoming: {\n    cursor: \"not-allowed\"\n  },\n  downloadable: {\n    cursor: \"pointer\"\n  },\n  downloaded: {\n    cursor: \"pointer\"\n  },\n  expired: {\n    cursor: \"not-allowed\"\n  },\n  disabled: {\n    cursor: \"not-allowed\"\n  },\n  issuanceLimitedReached: {\n    cursor: \"not-allowed\"\n  }\n};\nconst skeletonStyle = {\n  width: \"100%\",\n  borderRadius: 4\n};\nconst skeletonStyleByTheme = {\n  light: {\n    backgroundColor: \"#dee2e6\"\n  },\n  dark: {\n    backgroundColor: \"#27272a\"\n  }\n};\nconst skeletonStyleByLayout = {\n  compact: {\n    height: 46\n  },\n  detail: {\n    height: 76\n  }\n};\nexport {\n  CouponContext,\n  Root\n};\n","import { useContext } from \"react\";\nimport { CouponContext } from \"./Root.js\";\nconst useCouponContext = () => {\n  const context = useContext(CouponContext);\n  if (!context) {\n    throw new Error(\"useCouponContext should be used with in Root\");\n  }\n  return context;\n};\nexport {\n  useCouponContext\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { forwardRef } 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 \"../../../config/index.js\";\nimport \"../../../apis/taste-sharing/TasteSharingApiService.js\";\nimport \"../../../node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.js\";\nimport \"../../../node_modules/js-cookie/dist/js.cookie.js\";\nimport \"../../../apis/preuser/PreuserApiService.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 { useTheme } from \"../../../hooks/useTheme.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 \"../../../utils/redirectLogin.js\";\nimport \"../../../utils/event-properties/source.js\";\nimport { typography } from \"../../../styles/typography.js\";\nimport { useCouponContext } from \"./Root.hooks.js\";\nconst Description = forwardRef(({\n  children,\n  style,\n  ...rest\n}, ref) => {\n  const {\n    variant,\n    layout\n  } = useCouponContext();\n  const theme = useTheme();\n  if (layout === \"compact\") {\n    return null;\n  }\n  return /* @__PURE__ */ jsx(\"div\", { ref, ...rest, style: {\n    ...typography(12, 400),\n    color: variant.tertiary[theme],\n    ...style\n  }, children });\n});\nexport {\n  Description\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { forwardRef } 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 \"../../../config/index.js\";\nimport \"../../../apis/taste-sharing/TasteSharingApiService.js\";\nimport \"../../../node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.js\";\nimport \"../../../node_modules/js-cookie/dist/js.cookie.js\";\nimport \"../../../apis/preuser/PreuserApiService.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 { useTheme } from \"../../../hooks/useTheme.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 \"../../../utils/redirectLogin.js\";\nimport \"../../../utils/event-properties/source.js\";\nimport { useCouponContext } from \"./Root.hooks.js\";\nconst Divider = forwardRef(({\n  children,\n  style,\n  ...rest\n}, ref) => {\n  const theme = useTheme();\n  const {\n    layout\n  } = useCouponContext();\n  if (layout === \"compact\") {\n    return null;\n  }\n  return /* @__PURE__ */ jsx(\"div\", { ref, ...rest, style: {\n    ...containerStyle,\n    ...containerStyleByTheme[theme],\n    ...style\n  }, children });\n});\nconst containerStyle = {\n  zIndex: 1,\n  height: \"100%\",\n  borderLeftWidth: \"1px\",\n  borderLeftStyle: \"dashed\",\n  opacity: 0.2\n};\nconst containerStyleByTheme = {\n  light: {\n    borderColor: \"#000\"\n  },\n  dark: {\n    borderColor: \"#fff\"\n  }\n};\nexport {\n  Divider\n};\n","import { jsxs, jsx } from \"react/jsx-runtime\";\nimport { forwardRef } 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 \"../../../config/index.js\";\nimport \"../../../apis/taste-sharing/TasteSharingApiService.js\";\nimport \"../../../node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.js\";\nimport \"../../../node_modules/js-cookie/dist/js.cookie.js\";\nimport \"../../../apis/preuser/PreuserApiService.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 { useTheme } from \"../../../hooks/useTheme.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 \"../../../utils/redirectLogin.js\";\nimport \"../../../utils/event-properties/source.js\";\nimport { typography } from \"../../../styles/typography.js\";\nimport { playHaptic } from \"../../../utils/playHaptic.js\";\nimport { Icon } from \"../Icon/Icon.js\";\nimport { useCouponContext } from \"./Root.hooks.js\";\nconst Button = forwardRef(({\n  style,\n  onClick,\n  ...rest\n}, ref) => {\n  const {\n    variant,\n    status,\n    layout\n  } = useCouponContext();\n  const theme = useTheme();\n  const {\n    icon,\n    text\n  } = contentByStatus[status];\n  const shouldRenderIcon = layout === \"detail\" || status === \"downloadable\" || status === \"downloaded\";\n  const getIconSize = () => {\n    if (layout === \"detail\") {\n      return 24;\n    }\n    if (layout === \"compact\") {\n      return 14;\n    }\n    return 16;\n  };\n  const getIconType = () => {\n    if (layout === \"compact\" && icon === \"download\") {\n      return \"downloadSlim\";\n    }\n    return icon;\n  };\n  const handleClick = (e) => {\n    if (status === \"upcoming\" || status === \"expired\") {\n      return;\n    }\n    playHaptic(\"rigid\");\n    onClick == null ? void 0 : onClick(e);\n  };\n  return /* @__PURE__ */ jsxs(\"div\", { ref, ...rest, style: {\n    ...containerStyle,\n    ...containerStyleByLayout[layout],\n    ...style,\n    ...containerStyleByStatus[status]\n  }, onClick: handleClick, children: [\n    shouldRenderIcon ? /* @__PURE__ */ jsx(Icon, { type: getIconType(), weight: layout === \"detail\" ? \"light\" : \"regular\", size: getIconSize(), color: variant.secondary[theme] }) : null,\n    /* @__PURE__ */ jsx(\"div\", { style: {\n      ...typography(12, layout === \"compact\" ? 500 : 400),\n      color: variant.secondary[theme]\n    }, children: text })\n  ] });\n});\nconst contentByStatus = {\n  upcoming: {\n    icon: \"clock\",\n    text: \"발행예정\"\n  },\n  downloadable: {\n    icon: \"download\",\n    text: \"쿠폰받기\"\n  },\n  downloaded: {\n    icon: \"check\",\n    text: \"받기완료\"\n  },\n  expired: {\n    icon: \"close\",\n    text: \"기간만료\"\n  },\n  disabled: {\n    icon: \"close\",\n    text: \"사용불가\"\n  },\n  issuanceLimitedReached: {\n    icon: \"close\",\n    text: \"받기마감\"\n  }\n};\nconst containerStyle = {\n  zIndex: 1,\n  height: \"100%\",\n  display: \"flex\",\n  alignItems: \"center\",\n  justifyContent: \"center\",\n  gap: 4\n};\nconst containerStyleByLayout = {\n  compact: {\n    paddingRight: 16,\n    flexShrink: 0\n  },\n  detail: {\n    aspectRatio: \"1 / 1\",\n    flexDirection: \"column\"\n  }\n};\nconst containerStyleByStatus = {\n  upcoming: {\n    cursor: \"not-allowed\"\n  },\n  downloadable: {\n    cursor: \"pointer\"\n  },\n  downloaded: {\n    cursor: \"pointer\"\n  },\n  expired: {\n    cursor: \"not-allowed\"\n  },\n  disabled: {\n    cursor: \"not-allowed\"\n  },\n  issuanceLimitedReached: {\n    cursor: \"not-allowed\"\n  }\n};\nexport {\n  Button\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { forwardRef } from \"react\";\nimport { useCouponContext } from \"./Root.hooks.js\";\nconst Summary = forwardRef(({\n  children,\n  style,\n  ...rest\n}, ref) => {\n  const {\n    layout\n  } = useCouponContext();\n  return /* @__PURE__ */ jsx(\"div\", { ref, ...rest, style: {\n    ...containerStyle,\n    ...containerStyleByLayout[layout],\n    ...style\n  }, children });\n});\nconst containerStyle = {\n  zIndex: 1,\n  flex: 1,\n  height: \"100%\",\n  display: \"flex\",\n  flexDirection: \"column\",\n  justifyContent: \"center\",\n  gap: 2\n};\nconst containerStyleByLayout = {\n  compact: {\n    flexDirection: \"row\",\n    alignItems: \"center\",\n    gap: 12,\n    padding: \"0px 0px 0px 16px\"\n  },\n  detail: {\n    padding: \"0px 8px 0px 26px\"\n  }\n};\nexport {\n  Summary\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { forwardRef } 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 \"../../../config/index.js\";\nimport \"../../../apis/taste-sharing/TasteSharingApiService.js\";\nimport \"../../../node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.js\";\nimport \"../../../node_modules/js-cookie/dist/js.cookie.js\";\nimport \"../../../apis/preuser/PreuserApiService.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 { useTheme } from \"../../../hooks/useTheme.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 \"../../../utils/redirectLogin.js\";\nimport \"../../../utils/event-properties/source.js\";\nimport { typography } from \"../../../styles/typography.js\";\nimport { useCouponContext } from \"./Root.hooks.js\";\nconst Title = forwardRef(({\n  children,\n  style,\n  ...rest\n}, ref) => {\n  const {\n    variant,\n    layout\n  } = useCouponContext();\n  const theme = useTheme();\n  return /* @__PURE__ */ jsx(\"div\", { ref, ...rest, style: {\n    ...styleByLayout[layout],\n    color: variant.primary[theme],\n    ...style\n  }, children });\n});\nconst styleByLayout = {\n  compact: {\n    flex: \"1 0 0\",\n    overflow: \"hidden\",\n    textOverflow: \"ellipsis\",\n    whiteSpace: \"nowrap\",\n    ...typography(14, 500)\n  },\n  detail: {\n    ...typography(15, 700)\n  }\n};\nexport {\n  Title\n};\n","import { Description } from \"./Description.js\";\nimport { Divider } from \"./Divider.js\";\nimport { Root } from \"./Root.js\";\nimport { Button } from \"./Button.js\";\nimport { Summary } from \"./Summary.js\";\nimport { Title } from \"./Title.js\";\nconst Coupon = {\n  Root,\n  Summary,\n  Title,\n  Description,\n  Divider,\n  Button\n};\nexport {\n  Coupon\n};\n","const parseErrorMessage = (err, fallbackMessage) => {\n  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;\n  const error = err;\n  const errors = error == null ? void 0 : error.errors;\n  if (isArrayErrorDetail(errors == null ? void 0 : errors.detail) && typeof ((_a = errors == null ? void 0 : errors.detail) == null ? void 0 : _a[0]) === \"string\") {\n    return errors.detail[0] || fallbackMessage;\n  }\n  if (isArrayErrorDetail(errors == null ? void 0 : errors.detail) && typeof ((_c = (_b = errors == null ? void 0 : errors.detail) == null ? void 0 : _b[0]) == null ? void 0 : _c.warning) === \"string\") {\n    return errors.detail[0].warning || fallbackMessage;\n  }\n  if (isArrayErrorDetail(errors == null ? void 0 : errors.detail) && typeof ((_f = (_e = (_d = errors == null ? void 0 : errors.detail) == null ? void 0 : _d[0]) == null ? void 0 : _e.warning) == null ? void 0 : _f[0]) === \"string\") {\n    return errors.detail[0].warning[0] || fallbackMessage;\n  }\n  if (isArrayErrorDetail(errors == null ? void 0 : errors.detail) && typeof ((_h = (_g = errors == null ? void 0 : errors.detail) == null ? void 0 : _g[0]) == null ? void 0 : _h.message) === \"string\") {\n    return errors.detail[0].message || fallbackMessage;\n  }\n  if (isArrayErrorDetail(errors == null ? void 0 : errors.detail) && typeof ((_k = (_j = (_i = errors == null ? void 0 : errors.detail) == null ? void 0 : _i[0]) == null ? void 0 : _j.message) == null ? void 0 : _k[0]) === \"string\") {\n    return errors.detail[0].message[0] || fallbackMessage;\n  }\n  if (isErrorDetail(errors == null ? void 0 : errors.detail) && typeof ((_l = errors == null ? void 0 : errors.detail) == null ? void 0 : _l.warning) === \"string\") {\n    return errors.detail.warning || fallbackMessage;\n  }\n  if (isErrorDetail(errors == null ? void 0 : errors.detail) && typeof ((_n = (_m = errors == null ? void 0 : errors.detail) == null ? void 0 : _m.warning) == null ? void 0 : _n[0]) === \"string\") {\n    return errors.detail.warning[0] || fallbackMessage;\n  }\n  if (isErrorDetail(errors == null ? void 0 : errors.detail) && typeof ((_o = errors == null ? void 0 : errors.detail) == null ? void 0 : _o.message) === \"string\") {\n    return errors.detail.message || fallbackMessage;\n  }\n  if (isErrorDetail(errors == null ? void 0 : errors.detail) && typeof ((_q = (_p = errors == null ? void 0 : errors.detail) == null ? void 0 : _p.message) == null ? void 0 : _q[0]) === \"string\") {\n    return errors.detail.message[0] || fallbackMessage;\n  }\n  if (error == null ? void 0 : error.message) {\n    return error.message;\n  }\n  const message = (errors == null ? void 0 : errors.message) ?? fallbackMessage;\n  if (message) {\n    return message;\n  }\n  return \"\";\n};\nconst parseDirectionCode = (err) => {\n  var _a, _b, _c;\n  const error = err;\n  const errors = error == null ? void 0 : error.errors;\n  if (isArrayErrorDetail(errors == null ? void 0 : errors.detail) && errors && Array.isArray((_b = (_a = errors == null ? void 0 : errors.detail) == null ? void 0 : _a[0]) == null ? void 0 : _b.direction_code)) {\n    return errors.detail[0].direction_code;\n  }\n  if (isErrorDetail(errors == null ? void 0 : errors.detail) && errors && Array.isArray((_c = errors == null ? void 0 : errors.detail) == null ? void 0 : _c.direction_code)) {\n    return errors.detail.direction_code;\n  }\n  return null;\n};\nconst isArrayErrorDetail = (detail) => {\n  return Array.isArray(detail);\n};\nconst isErrorDetail = (detail) => {\n  return typeof detail === \"object\" && detail !== null && !(\"length\" in detail);\n};\nexport {\n  parseDirectionCode,\n  parseErrorMessage\n};\n","import { withScope } from \"../../node_modules/@sentry/core/build/esm/currentScopes.js\";\nimport { captureException } from \"../../node_modules/@sentry/core/build/esm/exports.js\";\nconst captureAPIError = (error, response) => {\n  withScope((scope) => {\n    scope.setTag(\"error.type\", \"api_error\");\n    scope.setExtra(\"APIResponse\", response);\n    captureException(error);\n  });\n};\nexport {\n  captureAPIError\n};\n","import { parseErrorMessage, parseDirectionCode } from \"../../utils/error/error.js\";\nimport { GENERAL_ERROR } from \"../../constants/error.js\";\nimport camelcaseKeys from \"../../node_modules/camelcase-keys/index.js\";\nimport { environments, env } from \"../../config/index.js\";\nimport { captureAPIError } from \"../../utils/error/sentry.js\";\nconst COUPONS_PER_REQUEST = 50;\nconst INVALID_COUPON_ID = 0;\nclass CouponApiService {\n  async getCoupons(couponIdList, isDevMode = false) {\n    const slicedCouponIdList = couponIdList.slice(0, COUPONS_PER_REQUEST);\n    const isValidCouponIdList = !slicedCouponIdList.includes(INVALID_COUPON_ID);\n    const slicedCouponIdListString = isValidCouponIdList ? slicedCouponIdList.join(\",\") : null;\n    const baseUrl = isDevMode ? environments.development.api.content : env.api.content;\n    const response = await fetch(`${baseUrl}/api/v4/framers/proxy/promotion-api/api/v1/coupon?couponIdList=${slicedCouponIdListString}`).then((res) => res.json()).then((res) => camelcaseKeys(res, {\n      deep: true\n    }));\n    if (response.result === \"FAIL\" || response.data === null) {\n      captureAPIError(new Error(response.message ?? GENERAL_ERROR), response);\n      throw new Error(response.message ?? GENERAL_ERROR);\n    }\n    return response;\n  }\n  async downloadCouponBulk(couponNoList) {\n    return fetch(`${env.api.promotion}/api/v4/coupons/download:bulk`, {\n      method: \"POST\",\n      body: JSON.stringify({\n        couponList: couponNoList.map((couponId) => ({\n          couponId,\n          downloadCount: 1\n        }))\n      }),\n      headers: {\n        \"Content-Type\": \"application/json\",\n        \"accept\": \"application/json\"\n      },\n      credentials: \"include\"\n    }).then((res) => res.json());\n  }\n  async downloadCoupon(couponNo, downloadCount) {\n    const safeDownloadCount = Math.max(downloadCount, 1);\n    return fetch(`${env.api.promotion}/api/v4/coupons/download`, {\n      method: \"POST\",\n      body: JSON.stringify({\n        couponId: couponNo,\n        downloadCount: safeDownloadCount\n      }),\n      headers: {\n        \"Content-Type\": \"application/json\",\n        \"accept\": \"application/json\"\n      },\n      credentials: \"include\"\n    }).then((res) => res.json());\n  }\n  async downloadLimitedCoupons(couponNoList) {\n    const promises = couponNoList.map(async (couponId) => {\n      return fetch(`${env.api.promotion}/api/v4/coupons/download:limited`, {\n        method: \"POST\",\n        body: JSON.stringify({\n          couponId\n        }),\n        headers: {\n          \"Content-Type\": \"application/json\",\n          \"accept\": \"application/json\"\n        },\n        credentials: \"include\"\n      }).then((res) => res.json());\n    });\n    const [response] = await Promise.all(promises);\n    return response;\n  }\n  async downloadRandomCoupon() {\n    return fetch(`${env.api.promotion}/api/v1/random-coupon/${env.name === \"qa\" ? \"issue-test\" : \"issue\"}`, {\n      method: \"POST\",\n      headers: {\n        \"Content-Type\": \"application/json\",\n        \"accept\": \"application/json\"\n      },\n      credentials: \"include\"\n    }).then((res) => res.json());\n  }\n  async getMaxIssueCount(couponId) {\n    const result = await fetch(`${env.api.promotion}/api/v4/coupons/max-issue-count/${couponId}`);\n    const response = await result.json();\n    if (response.result === \"FAIL\" || response.data === null) {\n      throw new Error(response.errorCode ?? GENERAL_ERROR);\n    }\n    return response;\n  }\n  async getDownloadableCouponSummaries(couponIdList, userId) {\n    const result = await fetch(`${env.api.promotion}/api/v4/coupons/downloadable?userId=${userId}`, {\n      method: \"POST\",\n      body: JSON.stringify({\n        couponIdList\n      }),\n      headers: {\n        \"Content-Type\": \"application/json\",\n        \"accept\": \"application/json\"\n      },\n      credentials: \"include\"\n    });\n    const response = await result.json();\n    if (response.result === \"FAIL\" || response.data === null) {\n      throw new Error(response.errorCode ?? GENERAL_ERROR);\n    }\n    return response.data.downloadableCouponInfoList;\n  }\n  async getCouponsDownloadStatus(couponIdList, userId) {\n    const result = await fetch(`${env.api.promotion}/api/v4/coupons/download-status?userId=${userId}`, {\n      method: \"POST\",\n      body: JSON.stringify({\n        couponIdList\n      }),\n      headers: {\n        \"Content-Type\": \"application/json\",\n        \"accept\": \"application/json\"\n      },\n      credentials: \"include\"\n    });\n    const response = await result.json();\n    if (response.result === \"FAIL\" || response.data === null) {\n      throw new Error(response.errorCode ?? GENERAL_ERROR);\n    }\n    return response.data.resultList;\n  }\n  parseDownloadCouponError(error, fallbackMessage) {\n    const message = parseErrorMessage(error, fallbackMessage) ?? \"\";\n    const directionCode = parseDirectionCode(error);\n    const isAuthError = (directionCode == null ? void 0 : directionCode[0]) === \"auth\";\n    return {\n      message,\n      callbackUrl: isAuthError ? \"/mypage/edit/info\" : void 0\n    };\n  }\n}\nconst couponApi = new CouponApiService();\nexport {\n  couponApi\n};\n","import useSWR from \"../../node_modules/swr/core/dist/index.js\";\nimport { couponApi } from \"../../apis/coupon/CouponApiService.js\";\nconst COUPONS_DOWNLOAD_STATUS_FETCHER_KEY = \"@coupon/coupons-download-status\";\nconst useFetchCouponsDownloadStatus = (couponIds, userNo, enabled = true) => {\n  const canFetch = couponIds.length > 0 && Boolean(userNo) && enabled;\n  const {\n    isLoading,\n    data,\n    ...rest\n  } = useSWR(canFetch ? [COUPONS_DOWNLOAD_STATUS_FETCHER_KEY, ...couponIds] : null, () => couponApi.getCouponsDownloadStatus(couponIds, Number(userNo)), {\n    revalidateIfStale: true\n  });\n  return {\n    isLoading: isLoading || !canFetch,\n    statuses: data ?? [],\n    ...rest\n  };\n};\nexport {\n  useFetchCouponsDownloadStatus\n};\n","import useSWRMutation from \"../../node_modules/swr/mutation/dist/index.js\";\nimport { couponApi } from \"../../apis/coupon/CouponApiService.js\";\nconst COUPON_MULTI_ISSUE_FETCHER_KEY = \"coupon-multi-issue\";\nconst downloadCoupons = (_key, {\n  arg\n}) => {\n  const {\n    couponIds,\n    downloadCount\n  } = arg;\n  const [couponId] = couponIds;\n  return couponIds.length > 1 ? couponApi.downloadCouponBulk(couponIds) : couponApi.downloadCoupon(couponId, downloadCount);\n};\nconst downloadLimitedCoupons = (_key, {\n  arg\n}) => {\n  return couponApi.downloadLimitedCoupons(arg.couponIds);\n};\nconst useDownloadCouponsMutation = ({\n  isLimited = false,\n  enabled = true,\n  onError,\n  onSuccess\n} = {}) => {\n  return useSWRMutation(enabled ? COUPON_MULTI_ISSUE_FETCHER_KEY : null, isLimited ? downloadLimitedCoupons : downloadCoupons, {\n    onError,\n    onSuccess\n  });\n};\nexport {\n  COUPON_MULTI_ISSUE_FETCHER_KEY,\n  useDownloadCouponsMutation\n};\n","const DOWNLOAD_COUPON_MESSAGES = {\n  SUCCESS: \"쿠폰을 받았어요.\\n받은 쿠폰은 마이페이지에서 확인하세요.\",\n  BULK_SUCCESS: \"쿠폰을 모두 받았어요.\\n받은 쿠폰은 마이페이지에서 확인하세요.\",\n  LOADING: \"쿠폰 발급을 시도하고 있어요. 잠시 기다려주세요.\\n신청 순서대로 처리되며 신청량이 많은 경우 쿠폰이 소진될 수 있어요\",\n  NEED_IDENTIFICATION: \"쿠폰 발급을 위해 본인확인이 필요해요.\",\n  FAILED_SOME_COUPON_DOWNLOAD: \"쿠폰을 모두 받았어요. 받은 쿠폰은 MY>쿠폰함에서 확인하세요.\",\n  FAILED_COUPON_DOWNLOAD: \"쿠폰을 모두 받았어요. 받은 쿠폰은 MY>쿠폰함에서 확인하세요.\",\n  NOT_FOUND_USER_ID: \"로그인이 필요해요.\",\n  GENERAL_ERROR: \"쿠폰 발급에 실패했어요.\",\n  RANDOM_COUPON_ISSUANCE_END: \"선착순 쿠폰이 마감되었습니다.\"\n};\nexport {\n  DOWNLOAD_COUPON_MESSAGES\n};\n","import useSWRMutation from \"../../node_modules/swr/mutation/dist/index.js\";\nimport { couponApi } from \"../../apis/coupon/CouponApiService.js\";\nconst DOWNLOAD_RANDOM_COUPON_MUTATION_KEY = \"@coupon/download-random-coupon\";\nconst useDownloadRandomCouponMutation = ({\n  enabled = true,\n  onError,\n  onSuccess\n} = {}) => {\n  return useSWRMutation(enabled ? DOWNLOAD_RANDOM_COUPON_MUTATION_KEY : null, () => couponApi.downloadRandomCoupon(), {\n    onError,\n    onSuccess\n  });\n};\nexport {\n  DOWNLOAD_RANDOM_COUPON_MUTATION_KEY,\n  useDownloadRandomCouponMutation\n};\n","import { useCurrentUser } from \"./useCurrentUser.js\";\nimport { useRedirectLoginDialog } from \"./useRedirectLoginDialog.js\";\nimport { useDownloadCouponsMutation } from \"./mutations/useDownloadCouponsMutation.js\";\nimport \"../node_modules/swr/mutation/dist/index.js\";\nimport \"../config/index.js\";\nimport \"../apis/taste-sharing/TasteSharingApiService.js\";\nimport { useDialog } from \"./useDialog.js\";\nimport { isContentOrigin } from \"../utils/location.js\";\nimport { DOWNLOAD_COUPON_MESSAGES } from \"../components/canvas/CouponDownloadCTA/CouponDownloadCTA.constants.js\";\nimport { useDownloadRandomCouponMutation } from \"./mutations/useDownloadRandomCouponMutation.js\";\nimport { CouponType, DiscountType } from \"../types/models/coupon.js\";\nconst useDownloadCoupons = (couponType = CouponType.NORMAL, discountType = DiscountType.FIXED_RATE, handleCouponDownloadSuccess) => {\n  const {\n    logged\n  } = useCurrentUser();\n  const {\n    showRedirectLoginDialog\n  } = useRedirectLoginDialog();\n  const isValidOrigin = isContentOrigin();\n  const dialog = useDialog();\n  const {\n    trigger: downloadCoupons,\n    isMutating: isLoading\n  } = useDownloadCouponsMutation({\n    isLimited: couponType === CouponType.LIMITED,\n    enabled: isValidOrigin\n  });\n  const {\n    trigger: downloadRandomCoupon,\n    isMutating: isRandomCouponLoading\n  } = useDownloadRandomCouponMutation({\n    enabled: isValidOrigin\n  });\n  const handleSuccess = () => (response) => {\n    if ((response == null ? void 0 : response.result) === \"FAIL\") {\n      dialog.show({\n        content: getErrorMessage(response.errorCode, response.message)\n      });\n      return;\n    }\n    handleCouponDownloadSuccess == null ? void 0 : handleCouponDownloadSuccess();\n    dialog.show({\n      content: getSuccessMessage(response, discountType)\n    });\n  };\n  const validate = () => {\n    if (!isValidOrigin) {\n      return false;\n    }\n    if (!logged) {\n      showRedirectLoginDialog();\n      return false;\n    }\n    if (isLoading || isRandomCouponLoading) {\n      dialog.show({\n        content: DOWNLOAD_COUPON_MESSAGES.LOADING\n      });\n      return false;\n    }\n    return true;\n  };\n  const download = async (couponNoList = [], downloadCount = 1, skipValidation = false) => {\n    if (!skipValidation && !validate()) {\n      return;\n    }\n    if (couponType === CouponType.NORMAL || couponType === CouponType.LIMITED) {\n      await downloadCoupons({\n        couponIds: couponNoList,\n        downloadCount\n      }, {\n        onSuccess: handleSuccess(),\n        onError: () => {\n          dialog.show({\n            content: \"쿠폰 다운로드 요청이 많아 지연 중입니다. 죄송합니다. 잠시 후 다시 시도해 주세요.\"\n          });\n        }\n      });\n      return;\n    }\n    if (couponType === CouponType.RANDOM) {\n      await downloadRandomCoupon(void 0, {\n        onSuccess: handleSuccess(),\n        onError: () => {\n          dialog.show({\n            content: \"쿠폰 다운로드 요청이 많아 지연 중입니다. 죄송합니다. 잠시 후 다시 시도해 주세요.\"\n          });\n        }\n      });\n    }\n  };\n  return {\n    validate,\n    download\n  };\n};\nconst getSuccessMessage = (response, discountType) => {\n  const {\n    data\n  } = response;\n  const isBulk = data && \"downloadSummaryList\" in data;\n  const isRandom = data && \"couponId\" in data;\n  if (isRandom) {\n    return createRandomCouponSuccessMessage(data.discountValue)[discountType];\n  }\n  return isBulk ? DOWNLOAD_COUPON_MESSAGES.BULK_SUCCESS : DOWNLOAD_COUPON_MESSAGES.SUCCESS;\n};\nconst createRandomCouponSuccessMessage = (discountValue) => ({\n  [DiscountType.FIXED_PRICE]: `${discountValue.toLocaleString(\"ko-KR\")}원 쿠폰에 당첨됐어요.\n받은 쿠폰은 마이페이지에서 확인하세요.`,\n  [DiscountType.FIXED_RATE]: `${discountValue}% 쿠폰에 당첨됐어요.\n받은 쿠폰은 마이페이지에서 확인하세요.`\n});\nconst getErrorMessage = (errorCode, errorMessage) => {\n  switch (errorCode) {\n    case \"FAILED_SOME_COUPON_DOWNLOAD\":\n      return DOWNLOAD_COUPON_MESSAGES.FAILED_SOME_COUPON_DOWNLOAD;\n    case \"FAILED_COUPON_DOWNLOAD\":\n      return DOWNLOAD_COUPON_MESSAGES.FAILED_COUPON_DOWNLOAD;\n    case \"NOT_FOUND_USER_ID\":\n      return DOWNLOAD_COUPON_MESSAGES.NOT_FOUND_USER_ID;\n    case \"RANDOM_COUPON_ISSUANCE_END\":\n      return DOWNLOAD_COUPON_MESSAGES.RANDOM_COUPON_ISSUANCE_END;\n    default:\n      return errorMessage || \"쿠폰 다운로드 요청이 많아 지연 중입니다. 죄송합니다. 잠시 후 다시 시도해 주세요.\";\n  }\n};\nconst toCouponNos = (couponNosStr) => {\n  return couponNosStr.split(\",\").map((item) => Number(item.trim()));\n};\nexport {\n  toCouponNos,\n  useDownloadCoupons\n};\n","const formatToCoupon = (coupon) => {\n  if (!coupon) {\n    return void 0;\n  }\n  return {\n    ...coupon,\n    id: coupon.couponId\n  };\n};\nexport {\n  formatToCoupon\n};\n","import { QueryType } from \"../types.js\";\nimport useSWR from \"../../../node_modules/swr/core/dist/index.js\";\nimport { couponApi } from \"../../../apis/coupon/CouponApiService.js\";\nimport { formatToCoupon } from \"./CouponModule.utils.js\";\nconst COUPONS_FETCHER_KEY = \"@coupon/coupons\";\nconst useCouponsQuery = ({\n  query,\n  couponIds,\n  enabled = true\n}) => {\n  const canFetch = couponIds.length > 0 && enabled && query !== void 0;\n  const {\n    data\n  } = useSWR(canFetch ? [COUPONS_FETCHER_KEY, couponIds] : null, () => queryCoupons(couponIds, query));\n  return {\n    coupons: (data == null ? void 0 : data.coupons) ?? []\n  };\n};\nconst fetchCoupons = async (couponIds) => {\n  const {\n    data\n  } = await couponApi.getCoupons(couponIds);\n  return {\n    coupons: data\n  };\n};\nconst fetchCouponCollectionCoupon = (query) => {\n  const coupon = formatToCoupon(query.coupon);\n  return {\n    coupons: coupon ? [coupon] : []\n  };\n};\nconst fetchKeywordCollectionCoupon = async (query) => {\n  if (!query.couponId) {\n    return {\n      coupons: []\n    };\n  }\n  const {\n    data\n  } = await couponApi.getCoupons([query.couponId]);\n  return {\n    coupons: data\n  };\n};\nconst queryCoupons = (couponIds, query) => {\n  if (query === void 0) {\n    return {\n      coupons: []\n    };\n  }\n  switch (query.type) {\n    case QueryType.Coupon:\n      return fetchCoupons(couponIds);\n    case QueryType.CouponCollection:\n      return fetchCouponCollectionCoupon(query);\n    case QueryType.KeywordCollection:\n      return fetchKeywordCollectionCoupon(query);\n    default:\n      return {\n        coupons: []\n      };\n  }\n};\nexport {\n  useCouponsQuery\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { createContext, forwardRef } from \"react\";\nimport { ComponentName } from \"../../../styles/ComponentName.js\";\nimport { createWithStyle } from \"../../../styles/createWithStyle.js\";\nimport { css } from \"../../../styles/css.js\";\nimport { useFold } from \"./Root.hooks.js\";\nimport { cx } from \"framer\";\nimport { Skeleton } from \"../Skeleton/Skeleton.js\";\nconst {\n  classNames,\n  withStyle\n} = createWithStyle(ComponentName.FoldableListRoot, {\n  container: css`\n    display: flex;\n    flex-direction: column;\n    align-items: flex-start;\n  `\n});\nconst FoldableListContext = createContext(null);\nconst Root = withStyle(forwardRef(({\n  children,\n  className,\n  theme = \"light\",\n  pending = false,\n  ...rest\n}, ref) => {\n  const {\n    isFolded,\n    toggleFold\n  } = useFold();\n  if (pending) {\n    return /* @__PURE__ */ jsx(Skeleton, { style: {\n      ...skeletonStyle,\n      ...skeletonStyleByTheme[theme]\n    } });\n  }\n  return /* @__PURE__ */ jsx(FoldableListContext.Provider, { value: {\n    theme,\n    isFolded,\n    toggleFold\n  }, children: /* @__PURE__ */ jsx(\"div\", { className: cx(className, classNames.container), ref, ...rest, children }) });\n}));\nconst skeletonStyle = {\n  width: 100,\n  height: 20,\n  borderRadius: 4\n};\nconst skeletonStyleByTheme = {\n  light: {\n    backgroundColor: \"#dee2e6\"\n  },\n  dark: {\n    backgroundColor: \"#27272a\"\n  }\n};\nexport {\n  FoldableListContext,\n  Root\n};\n","import { useState, useContext } from \"react\";\nimport { FoldableListContext } from \"./Root.js\";\nconst useFold = () => {\n  const [isFolded, setIsFolded] = useState(true);\n  const toggleFold = () => {\n    setIsFolded((prev) => !prev);\n  };\n  return {\n    isFolded,\n    toggleFold\n  };\n};\nconst useFoldableListContext = () => {\n  const context = useContext(FoldableListContext);\n  if (!context) {\n    throw new Error(\"useFoldableListContext should be used within Root\");\n  }\n  return context;\n};\nexport {\n  useFold,\n  useFoldableListContext\n};\n","import { useAnimationControls } from \"framer-motion\";\nimport { useFoldableListContext } from \"./Root.hooks.js\";\nimport { useEffect } from \"react\";\nconst useFoldControls = () => {\n  const {\n    isFolded\n  } = useFoldableListContext();\n  const controls = useAnimationControls();\n  useEffect(() => {\n    if (isFolded) {\n      controls.start({\n        height: 0\n      });\n    } else {\n      controls.start({\n        height: \"auto\"\n      });\n    }\n  }, [isFolded]);\n  return controls;\n};\nexport {\n  useFoldControls\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { forwardRef } from \"react\";\nimport { ComponentName } from \"../../../styles/ComponentName.js\";\nimport { createWithStyle } from \"../../../styles/createWithStyle.js\";\nimport { css } from \"../../../styles/css.js\";\nimport { motion } from \"framer-motion\";\nimport { cx } from \"framer\";\nimport { useFoldControls } from \"./Content.hooks.js\";\nconst {\n  classNames,\n  withStyle\n} = createWithStyle(ComponentName.FoldableListContent, {\n  container: css`\n    display: flex;\n    flex-direction: column;\n    gap: 2px;\n    padding-top: 7px;\n  `\n});\nconst Content = withStyle(forwardRef(({\n  children,\n  className,\n  ...rest\n}, ref) => {\n  const controls = useFoldControls();\n  return /* @__PURE__ */ jsx(motion.div, { ref, initial: {\n    height: 0\n  }, animate: controls, style: {\n    overflow: \"hidden\"\n  }, transition: {\n    type: \"spring\",\n    stiffness: 500,\n    damping: 60,\n    mass: 1\n  }, children: /* @__PURE__ */ jsx(\"div\", { className: cx(className, classNames.container), ...rest, children }) });\n}));\nexport {\n  Content\n};\n","const textStyleByTheme = {\n  light: {\n    color: \"#474747\"\n  },\n  dark: {\n    color: \"#a0a0a0\"\n  }\n};\nexport {\n  textStyleByTheme\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { cx } from \"framer\";\nimport { forwardRef } from \"react\";\nimport { ComponentName } from \"../../../styles/ComponentName.js\";\nimport { createWithStyle } from \"../../../styles/createWithStyle.js\";\nimport { css } from \"../../../styles/css.js\";\nimport { typographyCSS } from \"../../../styles/typography.js\";\nimport { useFoldableListContext } from \"./Root.hooks.js\";\nimport { textStyleByTheme } from \"./Root.constants.js\";\nconst {\n  classNames,\n  withStyle\n} = createWithStyle(ComponentName.FoldableListItem, {\n  \"container\": css`\n    display: flex;\n\n    ${typographyCSS(12, 400)};\n\n    line-height: 1.6em;\n    white-space: pre-wrap;\n    word-break: keep-all;\n  `,\n  \"container::before\": css`\n    content: '•';\n    font-size: 16px;\n    margin-right: 6px;\n  `\n});\nconst Item = withStyle(forwardRef(({\n  children,\n  className,\n  style,\n  ...rest\n}, ref) => {\n  const {\n    theme\n  } = useFoldableListContext();\n  return /* @__PURE__ */ jsx(\"div\", { ref, className: cx(className, classNames.container), style: {\n    ...textStyleByTheme[theme],\n    ...style\n  }, ...rest, children });\n}));\nexport {\n  Item\n};\n","import { jsxs, jsx } from \"react/jsx-runtime\";\nimport { AnimatePresence, motion } from \"framer-motion\";\nimport { forwardRef } from \"react\";\nimport { ComponentName } from \"../../../styles/ComponentName.js\";\nimport { createWithStyle } from \"../../../styles/createWithStyle.js\";\nimport { css } from \"../../../styles/css.js\";\nimport { typographyCSS } from \"../../../styles/typography.js\";\nimport { Icon } from \"../Icon/Icon.js\";\nimport { cx } from \"framer\";\nimport { useFoldableListContext } from \"./Root.hooks.js\";\nimport \"../../../hooks/stores/content/content.store.js\";\nimport \"../../../utils/event-properties/source.js\";\nimport { isCanvas } from \"../../../utils/framer/isCanvas.js\";\nimport { textStyleByTheme } from \"./Root.constants.js\";\nconst {\n  classNames,\n  withStyle\n} = createWithStyle(ComponentName.FoldableListTrigger, {\n  container: css`\n    display: flex;\n    align-items: center;\n    gap: 4px;\n    cursor: pointer;\n  `,\n  text: typographyCSS(14, 500, 1.6)\n});\nconst Trigger = withStyle(forwardRef(({\n  children,\n  className,\n  textStyle,\n  icons,\n  onClick,\n  ...rest\n}, ref) => {\n  const {\n    theme,\n    isFolded,\n    toggleFold\n  } = useFoldableListContext();\n  const {\n    initial = \"chevronDown\",\n    active = \"chevronUp\",\n    size = 14\n  } = icons ?? {};\n  const handleClick = (e) => {\n    onClick == null ? void 0 : onClick(e);\n    toggleFold();\n  };\n  return /* @__PURE__ */ jsxs(\"div\", { ref, className: cx(className, classNames.container), onClick: handleClick, ...rest, children: [\n    /* @__PURE__ */ jsx(\"div\", { className: classNames.text, style: {\n      ...textStyleByTheme[theme],\n      ...baseTextStyle,\n      ...textStyle\n    }, children }),\n    /* @__PURE__ */ jsx(AnimatePresence, { mode: \"wait\", children: /* @__PURE__ */ jsx(motion.div, { style: {\n      display: \"flex\",\n      alignItems: \"center\",\n      justifyContent: \"center\"\n    }, animate: {\n      opacity: 1\n    }, initial: {\n      opacity: isCanvas() ? 1 : 0\n    }, exit: {\n      opacity: 0\n    }, transition: {\n      duration: 0.2\n    }, children: /* @__PURE__ */ jsx(Icon, { type: isFolded ? initial : active, color: textStyleByTheme[theme].color, size, weight: \"bold\" }) }, isFolded ? \"plus\" : \"minus\") })\n  ] });\n}));\nconst baseTextStyle = {\n  minHeight: 20,\n  display: \"flex\",\n  alignItems: \"center\"\n};\nexport {\n  Trigger\n};\n","import { Content } from \"./Content.js\";\nimport { Item } from \"./Item.js\";\nimport { Root } from \"./Root.js\";\nimport { Trigger } from \"./Trigger.js\";\nconst FoldableList = {\n  Root,\n  Trigger,\n  Content,\n  Item\n};\nexport {\n  FoldableList\n};\n","import { CouponType, DiscountType, AvailableDayType } from \"../../../../types/models/coupon.js\";\nimport { deduplicate } from \"../../../../utils/deduplicate.js\";\nimport head from \"../../../../node_modules/lodash-es/head.js\";\nimport { parseISO } from \"../../../../node_modules/date-fns/parseISO.js\";\nimport { formatDate as format } from \"../../../../node_modules/date-fns/format.js\";\nconst DATE_FORMAT = \"yyyy.MM.dd HH:mm\";\nconst HOURS_IN_DAY = 24;\nconst getCouponNotices = (couponType, coupons) => {\n  const coupon = head(coupons);\n  if (!coupon) {\n    return [];\n  }\n  const formattedAvailablePeriod = formatAvailablePeriod(coupon);\n  const formattedMaxDiscountPrice = formatMaxDiscountPrice(couponType, sortCouponsByDiscountValueAscending(coupons));\n  const maxIssueCountNotice = createMaxIssueCountNotice(coupon.personMaxIssueCount);\n  if (couponType === CouponType.RANDOM) {\n    return getRandomCouponNotices(formattedAvailablePeriod, formattedMaxDiscountPrice);\n  }\n  if (coupon.discountType === DiscountType.FIXED_RATE) {\n    return getRateCouponNotices(formattedAvailablePeriod, formattedMaxDiscountPrice, maxIssueCountNotice);\n  }\n  return getAmountCouponNotices(formattedAvailablePeriod, formattedMaxDiscountPrice, maxIssueCountNotice);\n};\nconst createMaxIssueCountNotice = (maxIssueCount) => {\n  if (!maxIssueCount) {\n    return \"\";\n  }\n  const hasMaxIssueCount = maxIssueCount > 0;\n  if (!hasMaxIssueCount) {\n    return \"쿠폰은 이벤트 기간 중복 발급 가능합니다.\";\n  }\n  return `쿠폰은 이벤트 기간 동안 하나의 ID 당 ${maxIssueCount}회 발급 및 사용 가능합니다.`;\n};\nconst formatMaxDiscountPrice = (couponType, coupons) => {\n  const hasMaxDiscountPrice = coupons.some((coupon2) => coupon2.maxDiscountPrice > 0);\n  if (!hasMaxDiscountPrice) {\n    return \"제한 없음\";\n  }\n  const [coupon] = coupons;\n  if (couponType === CouponType.RANDOM) {\n    return formatRandomCouponMaxDiscountPrice(coupons);\n  }\n  if (coupon.discountType === DiscountType.FIXED_PRICE) {\n    return formatAmountCouponMaxDiscountPrice(coupons);\n  }\n  return formatRateCouponMaxDiscountPrice(coupons);\n};\nconst formatRateCouponMaxDiscountPrice = (coupons) => {\n  return `${composeWithUnit(getMaxDiscountPrice(coupons), \"원\")}`;\n};\nconst formatAmountCouponMaxDiscountPrice = (coupons) => {\n  const uniquified = uniquifyCouponsByMinPayAmount(coupons);\n  const formatted = uniquified.reduce((acc, curr) => {\n    const {\n      maxDiscountPrice,\n      minPayAmount\n    } = curr;\n    acc.push(`${composeWithUnit(minPayAmount, \"원\")} 이상 구매 시 ${composeWithUnit(maxDiscountPrice, \"원\")} 할인`);\n    return acc;\n  }, []);\n  return formatted.join(\", \");\n};\nconst formatRandomCouponMaxDiscountPrice = (coupons) => {\n  const uniquified = uniquifyCouponsByDiscountValue(coupons);\n  const formatted = uniquified.reduce((acc, curr) => {\n    const {\n      discountType,\n      discountValue,\n      maxDiscountPrice\n    } = curr;\n    acc.push(`${composeWithUnitByType(discountType, discountValue)} 쿠폰 ${composeWithUnit(maxDiscountPrice, \"원\")} 할인`);\n    return acc;\n  }, []);\n  return formatted.join(\", \");\n};\nconst formatAvailablePeriod = (coupon) => {\n  if (coupon.useAvailableDayType === AvailableDayType.DAY) {\n    return `쿠폰 발급 후 ${coupon.couponUseAfterDay * HOURS_IN_DAY}시간 이내`;\n  }\n  if (coupon.useAvailableDayType === AvailableDayType.RANGE) {\n    const availableStartAt = parseISO(coupon.couponUseStartAt);\n    const availableEndAt = parseISO(coupon.couponUseEndAt);\n    return `${format(availableStartAt, DATE_FORMAT)} - ${format(availableEndAt, DATE_FORMAT)}`;\n  }\n  return \"없음\";\n};\nconst uniquifyCouponsByDiscountValue = (coupons) => {\n  return deduplicate(coupons, (x, y) => x.discountValue === y.discountValue && x.maxDiscountPrice === y.maxDiscountPrice);\n};\nconst uniquifyCouponsByMinPayAmount = (coupons) => {\n  return deduplicate(coupons, (x, y) => x.minPayAmount === y.minPayAmount && x.maxDiscountPrice === y.maxDiscountPrice);\n};\nconst sortCouponsByDiscountValueAscending = (coupons) => {\n  return [...coupons].sort((x, y) => x.discountValue - y.discountValue);\n};\nconst getMaxDiscountPrice = (coupons) => {\n  return Math.max(...coupons.map((coupon) => coupon.maxDiscountPrice));\n};\nconst RANDOM_COUPON_PERIOD_CUTOFF = new Date(2026, 1, 18, 10, 0, 0);\nconst getRandomCouponUseablePeriod = (now = /* @__PURE__ */ new Date()) => {\n  if (now >= RANDOM_COUPON_PERIOD_CUTOFF) {\n    return \"발급일 기준 당일 23:59 까지\";\n  }\n  return \"발급일 기준 익일 09:59 까지\";\n};\nconst getRandomCouponNotices = (_availablePeriod, maxDiscountPrice) => [`쿠폰 사용 기간 : ${getRandomCouponUseablePeriod()}`, `쿠폰 최대 할인 금액 : ${maxDiscountPrice}`, `다운로드한 쿠폰은 'MY PAGE > 사용 가능 쿠폰'에서 확인 가능합니다.`, `쿠폰을 사용한 이력이 있는 경우 쿠폰은 보이지 않습니다.`, `쿠폰 소멸, 발급 중단, 사용 완료된 쿠폰은 구매 취소 시 별도 재발급이 불가합니다.`, `브랜드 정책에 따라 일부 상품 쿠폰 적용이 불가할 수 있습니다.`];\nconst getRateCouponNotices = (availablePeriod, maxDiscountPrice, maxIssueCountNotice) => [`쿠폰 사용 기간 : ${availablePeriod}`, `쿠폰 최대 할인 금액 : ${maxDiscountPrice}`, maxIssueCountNotice, `다운로드한 쿠폰은 'MY PAGE > 사용 가능 쿠폰'에서 확인 가능합니다.`, `해당 쿠폰은 이벤트 참여 상품 대상으로만 적용 가능합니다.`, `쿠폰 적용 가능 상품은 수시로 변경되며, 일부 품목에 한하여 쿠폰 적용이 제한될 수 있습니다.`, `브랜드 재고 사정에 따라 품절이나 환불 안내를 받게 될 수 있습니다.`];\nconst getAmountCouponNotices = (availablePeriod, maxDiscountPrice, maxIssueCountNotice) => {\n  return [`쿠폰 사용 기간 : ${availablePeriod}`, `쿠폰 최대 할인 금액 : ${maxDiscountPrice}`, maxIssueCountNotice, `다운로드한 쿠폰은 'MY PAGE > 사용 가능 쿠폰'에서 확인 가능합니다.`, `해당 쿠폰은 이벤트 참여 상품 대상으로만 적용 가능합니다.`, `쿠폰 적용 가능 상품은 수시로 변경되며, 일부 품목에 한하여 쿠폰 적용이 제한될 수 있습니다.`, `브랜드 재고 사정에 따라 품절이나 환불 안내를 받게 될 수 있습니다.`];\n};\nconst composeWithUnitByType = (discountType, discountValue) => {\n  switch (discountType) {\n    case DiscountType.FIXED_RATE:\n      return composeWithUnit(discountValue, \"%\");\n    case DiscountType.FIXED_PRICE:\n      return composeWithUnit(discountValue, \"원\");\n  }\n};\nconst composeWithUnit = (discountValue, unit) => {\n  return `${discountValue.toLocaleString(\"ko-KR\")}${unit}`;\n};\nexport {\n  composeWithUnit,\n  composeWithUnitByType,\n  getCouponNotices,\n  getRandomCouponUseablePeriod\n};\n","import { jsxs, jsx } from \"react/jsx-runtime\";\nimport { useMemo } from \"react\";\nimport { FoldableList } from \"../../../@shared/FoldableList/index.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 \"../../../../apis/taste-sharing/TasteSharingApiService.js\";\nimport \"../../../../node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.js\";\nimport \"../../../../node_modules/js-cookie/dist/js.cookie.js\";\nimport \"../../../../apis/preuser/PreuserApiService.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 { useTheme } from \"../../../../hooks/useTheme.js\";\nimport \"../../../@shared/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 \"../../../../utils/redirectLogin.js\";\nimport \"../../../../utils/event-properties/source.js\";\nimport { typography } from \"../../../../styles/typography.js\";\nimport { getCouponNotices } from \"./NoticesElement.utils.js\";\nimport { filterMap } from \"../../../../utils/filterMap.js\";\nconst NoticesElement = ({\n  couponType,\n  coupons,\n  mainNotices,\n  hasAdditionalNotices,\n  additionalNotices\n}) => {\n  const theme = useTheme();\n  const uniqueMainNotices = [...new Set(mainNotices)];\n  const mergedAdditionalNotices = useMemo(() => [...getCouponNotices(couponType, coupons), ...additionalNotices], [couponType, coupons, additionalNotices]);\n  const uniqueAdditionalNotices = [...new Set(mergedAdditionalNotices)];\n  const hasMainNotices = mainNotices.length > 0;\n  const hasNotices = hasMainNotices || hasAdditionalNotices;\n  if (!hasNotices) {\n    return null;\n  }\n  return /* @__PURE__ */ jsxs(\"div\", { style: noticesLayout, children: [\n    hasMainNotices ? /* @__PURE__ */ jsx(\"div\", { style: mainNoticesStyle, children: uniqueMainNotices.map((notice) => /* @__PURE__ */ jsxs(\"div\", { style: {\n      ...typography(12, 400),\n      ...mainNoticeStyleByTheme[theme]\n    }, children: [\n      \"*\",\n      notice\n    ] }, notice)) }) : null,\n    hasAdditionalNotices ? /* @__PURE__ */ jsxs(FoldableList.Root, { theme, children: [\n      /* @__PURE__ */ jsx(FoldableList.Trigger, { style: {\n        gap: 2\n      }, textStyle: typography(12, 700), icons: {\n        initial: \"chevronDown\",\n        active: \"chevronUp\",\n        size: 12\n      }, children: \"유의사항\" }),\n      /* @__PURE__ */ jsx(FoldableList.Content, { children: filterMap(uniqueAdditionalNotices, (notice) => notice !== \"\", (notice) => /* @__PURE__ */ jsx(FoldableList.Item, { children: notice }, notice)) })\n    ] }) : null\n  ] });\n};\nconst noticesLayout = {\n  display: \"flex\",\n  flexDirection: \"column\",\n  gap: \"12px\",\n  marginTop: \"8px\"\n};\nconst mainNoticesStyle = {\n  width: \"100%\",\n  display: \"flex\",\n  flexDirection: \"column\"\n};\nconst mainNoticeStyleByTheme = {\n  light: {\n    color: \"#474747\"\n  },\n  dark: {\n    color: \"#a0a0a0\"\n  }\n};\nexport {\n  NoticesElement\n};\n","import { jsxs, jsx } from \"react/jsx-runtime\";\nimport { useState } from \"react\";\nimport { DiscountType } from \"../../../types/models/coupon.js\";\nimport \"../Countdown/Countdown.js\";\nimport \"react-dom\";\nimport \"../Dialog/Dialog.module.css.js\";\nimport \"framer-motion\";\nimport \"../Expandable/Expandable.js\";\nimport \"../FixedScrollProgressBar/FixedScrollProgressBar.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 \"../../../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 \"../../../apis/taste-sharing/TasteSharingApiService.js\";\nimport \"../../../node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.js\";\nimport \"../../../node_modules/js-cookie/dist/js.cookie.js\";\nimport \"../../../apis/preuser/PreuserApiService.js\";\nimport \"framer\";\nimport \"../../../node_modules/@29cm/snowplow/dist/esm/core/snowplow.js\";\nimport \"../ShareButtonWithReferralEvent/ShareButtonWithReferralEvent.js\";\nimport \"../../../node_modules/swr/mutation/dist/index.js\";\nimport \"../../@shared/providers/ThemeProvider/ThemeProvider.js\";\nimport \"../../@shared/providers/BreakpointProvider/BreakpointProvider.js\";\nimport \"../../../hooks/stores/bottom-sheet/bottom-sheet.store.js\";\nimport \"../../../containers/DialogContainer/DialogContainer.emitter.js\";\nimport \"../../../utils/redirectLogin.js\";\nimport \"../../../utils/event-properties/source.js\";\nimport \"../../../constants/snowplow/snowplowSchema.js\";\nimport \"../Products/Products.js\";\nimport \"../ResponsiveSplitView/ResponsiveSplitView.js\";\nimport \"../ResponsiveSplitViewOverlayButton/ResponsiveSplitViewOverlayButton.js\";\nimport { RollingNumber } from \"../RollingNumber/RollingNumber.js\";\nimport \"../TabBar/TabBar.js\";\nimport \"../TimeProgressBar/TimeProgressBar.js\";\nimport \"../ViewportContainer/ViewportContainer.js\";\nimport \"../TabBarV2/TabBarV2.js\";\nimport \"../TabBarV3/TabBarV3.js\";\nimport { useVisibilityAwareInterval } from \"../../../hooks/useVisibilityAwareInterval.js\";\nconst RandomDiscountValue = ({\n  discountType,\n  discountValues\n}) => {\n  const [index, setIndex] = useState(0);\n  useVisibilityAwareInterval(() => {\n    setIndex((prev) => (prev + 1) % discountValues.length);\n  }, 800);\n  return /* @__PURE__ */ jsxs(\"div\", { style: {\n    display: \"flex\",\n    alignItems: \"center\"\n  }, children: [\n    /* @__PURE__ */ jsx(RollingNumber, { value: discountValues[index] ?? 0 }),\n    discountType === DiscountType.FIXED_RATE ? \"%\" : \"원\"\n  ] });\n};\nexport {\n  RandomDiscountValue\n};\n","import { jsxs, jsx } from \"react/jsx-runtime\";\nimport { Countdown } from \"../../../systems/Countdown/Countdown.js\";\nimport \"react-dom\";\nimport \"react\";\nimport \"../../../systems/Dialog/Dialog.module.css.js\";\nimport \"framer-motion\";\nimport \"../../../systems/Expandable/Expandable.js\";\nimport \"../../../systems/FixedScrollProgressBar/FixedScrollProgressBar.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 \"../../../../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 \"../../../../apis/taste-sharing/TasteSharingApiService.js\";\nimport \"../../../../node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.js\";\nimport \"../../../../node_modules/js-cookie/dist/js.cookie.js\";\nimport \"../../../../apis/preuser/PreuserApiService.js\";\nimport { isCanvas } from \"../../../../utils/framer/isCanvas.js\";\nimport \"framer\";\nimport \"../../../../node_modules/@29cm/snowplow/dist/esm/core/snowplow.js\";\nimport \"../../../systems/ShareButtonWithReferralEvent/ShareButtonWithReferralEvent.js\";\nimport \"../../../../node_modules/swr/mutation/dist/index.js\";\nimport \"../../../@shared/providers/ThemeProvider/ThemeProvider.js\";\nimport \"../../../@shared/providers/BreakpointProvider/BreakpointProvider.js\";\nimport \"../../../../hooks/stores/bottom-sheet/bottom-sheet.store.js\";\nimport \"../../../../containers/DialogContainer/DialogContainer.emitter.js\";\nimport \"../../../../utils/redirectLogin.js\";\nimport \"../../../../utils/event-properties/source.js\";\nimport { createKRTimeZoneDate } from \"../../../../utils/createUTCDate.js\";\nimport \"../../../../constants/snowplow/snowplowSchema.js\";\nimport \"../../../systems/Products/Products.js\";\nimport \"../../../systems/ResponsiveSplitView/ResponsiveSplitView.js\";\nimport \"../../../systems/ResponsiveSplitViewOverlayButton/ResponsiveSplitViewOverlayButton.js\";\nimport \"../../../systems/RollingNumber/RollingNumber.js\";\nimport \"../../../systems/TabBar/TabBar.js\";\nimport \"../../../systems/TimeProgressBar/TimeProgressBar.js\";\nimport \"../../../systems/ViewportContainer/ViewportContainer.js\";\nimport \"../../../systems/TabBarV2/TabBarV2.js\";\nimport \"../../../systems/TabBarV3/TabBarV3.js\";\nimport { typography } from \"../../../../styles/typography.js\";\nimport { DiscountType, KindType, CouponType, AvailableDayType } from \"../../../../types/models/coupon.js\";\nimport { RandomDiscountValue } from \"../../../systems/RandomDiscountValue/RandomDiscountValue.js\";\nimport { QueryType } from \"../../types.js\";\nimport { isAbove } from \"../../../../utils/date.js\";\nimport head from \"../../../../node_modules/lodash-es/head.js\";\nimport { isBefore } from \"../../../../node_modules/date-fns/isBefore.js\";\nimport { isAfter } from \"../../../../node_modules/date-fns/isAfter.js\";\nimport { formatDate as format } from \"../../../../node_modules/date-fns/format.js\";\nimport { isWithinInterval } from \"../../../../node_modules/date-fns/isWithinInterval.js\";\nimport { differenceInCalendarDays } from \"../../../../node_modules/date-fns/differenceInCalendarDays.js\";\nimport { ko } from \"../../../../node_modules/date-fns/locale/ko.js\";\nconst getCouponUseEndAt = (coupon) => {\n  if (coupon.useAvailableDayType === AvailableDayType.RANGE) {\n    return createKRTimeZoneDate(coupon.couponUseEndAt);\n  }\n  return void 0;\n};\nconst getCouponStatus = (coupon, logged, query, statuses) => {\n  var _a;\n  if (!coupon) {\n    return \"downloadable\";\n  }\n  if (isCanvas()) {\n    return \"downloadable\";\n  }\n  if (query.type === QueryType.Coupon && query.couponType === CouponType.RANDOM) {\n    return \"downloadable\";\n  }\n  const now = createKRTimeZoneDate();\n  const issueStartAt = createKRTimeZoneDate(coupon.couponIssueStartAt);\n  const issueEndAt = createKRTimeZoneDate(coupon.couponIssueEndAt);\n  const useEndAt = getCouponUseEndAt(coupon);\n  const isUpcoming = isBefore(now, issueStartAt);\n  const isEnd = isAfter(now, issueEndAt);\n  const isExpired = useEndAt !== void 0 && isAfter(now, useEndAt);\n  if (isUpcoming) {\n    return \"upcoming\";\n  }\n  if (isExpired || isEnd) {\n    return \"expired\";\n  }\n  if (!logged) {\n    return \"downloadable\";\n  }\n  const status = (_a = statuses.find((_status) => _status.couponId === coupon.id)) == null ? void 0 : _a.couponDownloadStatus;\n  switch (status) {\n    case \"NOT_ISSUED\":\n      return \"upcoming\";\n    case \"DOWNLOADABLE\":\n      return \"downloadable\";\n    case \"ISSUANCE_LIMIT_REACHED\":\n      return \"issuanceLimitedReached\";\n    case \"EXPIRED\":\n      return \"expired\";\n    case \"DOWNLOADED\":\n      return \"downloaded\";\n    case \"DISABLED\":\n      return \"disabled\";\n    default:\n      return \"downloadable\";\n  }\n};\nconst getCouponFallbackDescription = (coupons) => {\n  const discountValues = coupons.map((coupon) => coupon.discountValue);\n  const {\n    discountType = DiscountType.FIXED_RATE,\n    couponKindType = KindType.CART\n  } = head(coupons) ?? {};\n  const minDiscountValue = Math.min(...discountValues).toLocaleString(\"ko-KR\");\n  const maxDiscountValue = Math.max(...discountValues).toLocaleString(\"ko-KR\");\n  const unit = unitByDiscountType[discountType];\n  return `${minDiscountValue}${unit}~${maxDiscountValue}${unit} ${textByCouponKindType[couponKindType]} 쿠폰 랜덤 지급`;\n};\nconst unitByDiscountType = {\n  [DiscountType.FIXED_RATE]: \"%\",\n  [DiscountType.FIXED_PRICE]: \"원\"\n};\nconst textByCouponKindType = {\n  [KindType.CART]: \"장바구니\",\n  [KindType.PRODUCT]: \"상품\"\n};\nconst getUpcomingText = (issueStartAt) => {\n  const hour = format(issueStartAt, \"H\", {\n    locale: ko\n  });\n  const minute = format(issueStartAt, \"m\", {\n    locale: ko\n  });\n  const timeText = minute === \"0\" ? `${hour}시` : `${hour}시 ${minute}분`;\n  return `${format(issueStartAt, \"M월 d일(EEE)\", {\n    locale: ko\n  })} ${timeText} 발행 예정`;\n};\nconst getDescriptionByStatus = (coupon) => {\n  const issueStartAt = createKRTimeZoneDate(coupon.couponIssueStartAt);\n  const issueEndAt = createKRTimeZoneDate(coupon.couponIssueEndAt);\n  const useEndAt = getCouponUseEndAt(coupon);\n  return {\n    upcoming: getUpcomingText(issueStartAt),\n    downloadable: /* @__PURE__ */ jsxs(\"div\", { style: descriptionStyle, children: [\n      /* @__PURE__ */ jsx(Countdown, { targetDateString: format(issueEndAt, \"yyyy-MM-dd\"), targetTimeString: format(issueEndAt, \"HH:mm:ss\"), dateDisplayFormat: \"D일\", timeDisplayFormat: \"H시간 m분 s초\", fontSize: 12, color: \"inherit\", style: typography(12, 400) }),\n      \"남음\"\n    ] }),\n    downloaded: useEndAt ? /* @__PURE__ */ jsxs(\"div\", { style: descriptionStyle, children: [\n      /* @__PURE__ */ jsx(Countdown, { targetDateString: format(useEndAt, \"yyyy-MM-dd\"), targetTimeString: format(useEndAt, \"HH:mm:ss\"), dateDisplayFormat: \"D일\", timeDisplayFormat: \"H시간 m분 s초\", fontSize: 12, color: \"inherit\", style: typography(12, 400) }),\n      \"남음\"\n    ] }) : null,\n    expired: \"쿠폰 사용 기간이 종료되었어요\",\n    disabled: \"사용할 수 없는 쿠폰입니다\",\n    issuanceLimitedReached: \"쿠폰이 모두 소진되었어요\"\n  };\n};\nconst descriptionStyle = {\n  display: \"flex\",\n  alignItems: \"center\",\n  gap: 3,\n  color: \"inherit\"\n};\nconst markAsDownloaded = (statuses, couponIds) => {\n  return statuses.map((status) => ({\n    ...status,\n    couponDownloadStatus: status.couponDownloadStatus === \"DOWNLOADABLE\" && couponIds.includes(status.couponId) ? \"DOWNLOADED\" : status.couponDownloadStatus\n  }));\n};\nconst getCouponCollectionCouponName = (query) => {\n  var _a, _b;\n  const personMaxIssueCount = (_a = query.coupon) == null ? void 0 : _a.personMaxIssueCount;\n  const issueCount = personMaxIssueCount && personMaxIssueCount > 1 ? ` ${personMaxIssueCount}장` : \"\";\n  return `${(_b = query.coupon) == null ? void 0 : _b.couponName}${issueCount}`;\n};\nconst getRandomCouponName = (coupons) => {\n  var _a;\n  const sortByDiscountValue = sortCouponsByDiscountValueAscending(coupons);\n  const couponDiscountValues = sortByDiscountValue.map((coupon) => coupon.discountValue);\n  return /* @__PURE__ */ jsxs(\"div\", { style: {\n    display: \"flex\",\n    alignItems: \"center\",\n    gap: 6\n  }, children: [\n    /* @__PURE__ */ jsx(\"div\", { children: /* @__PURE__ */ jsx(RandomDiscountValue, { discountType: ((_a = head(coupons)) == null ? void 0 : _a.discountType) ?? DiscountType.FIXED_RATE, discountValues: couponDiscountValues }) }),\n    /* @__PURE__ */ jsx(\"span\", { children: \"쿠폰\" })\n  ] });\n};\nconst getGeneralCouponName = (coupons) => {\n  if (coupons.length === 1) {\n    const firstCoupon = coupons[0];\n    const personMaxIssueCount = firstCoupon.personMaxIssueCount;\n    const issueCount = personMaxIssueCount && personMaxIssueCount > 1 ? ` ${personMaxIssueCount}장` : \"\";\n    return getCouponNameByDiscountType(firstCoupon) + issueCount;\n  }\n  const isAllFixedRateCoupon = coupons.every((coupon) => coupon.discountType === DiscountType.FIXED_RATE);\n  const maxDiscountValue = Math.max(...coupons.map((coupon) => coupon.discountValue), 0).toLocaleString(\"ko-KR\");\n  if (isAllFixedRateCoupon) {\n    return `${maxDiscountValue}% 쿠폰 외 ${coupons.length - 1}장`;\n  }\n  return `${maxDiscountValue}원 쿠폰 외 ${coupons.length - 1}장`;\n};\nconst getCouponNameByCouponType = (coupons, query) => {\n  switch (query.couponType) {\n    case CouponType.RANDOM:\n      return getRandomCouponName(coupons);\n    case CouponType.LIMITED:\n    case CouponType.NORMAL:\n      return getGeneralCouponName(coupons);\n  }\n};\nconst getCouponName = (coupons, query) => {\n  if (coupons.length === 0) {\n    return \"\";\n  }\n  switch (query.type) {\n    case QueryType.CouponCollection:\n      return getCouponCollectionCouponName(query);\n    case QueryType.KeywordCollection:\n      return getGeneralCouponName(coupons);\n    case QueryType.Coupon:\n      return getCouponNameByCouponType(coupons, query);\n  }\n};\nconst getCouponNameByDiscountType = (coupon) => {\n  if (!coupon) {\n    return \"\";\n  }\n  const {\n    discountType,\n    discountValue\n  } = coupon;\n  const postfix = discountType === DiscountType.FIXED_PRICE ? \"원 쿠폰\" : \"% 쿠폰\";\n  return discountValue.toLocaleString(\"ko-KR\") + postfix;\n};\nconst sortCouponsByDiscountValueAscending = (coupons) => {\n  return [...coupons].sort((x, y) => x.discountValue - y.discountValue);\n};\nconst findCurrentSchedule = (schedule) => {\n  const now = createKRTimeZoneDate();\n  const scheduleIndex = schedule.findIndex((item, index) => {\n    const {\n      shouldUpdateAt\n    } = item;\n    const next = schedule[index + 1];\n    const hasNext = next !== void 0;\n    const isFirst = index === 0 && isAbove(shouldUpdateAt, now);\n    const isWithin = hasNext && isWithinInterval(now, {\n      start: shouldUpdateAt,\n      end: next.shouldUpdateAt\n    });\n    const isLast = !hasNext && isAbove(now, shouldUpdateAt);\n    return isFirst || isWithin || isLast;\n  });\n  return schedule[scheduleIndex];\n};\nconst toSchedule = (options) => sortScheduleAscending(toCouponSchedule(options));\nconst sortScheduleAscending = (schedule) => {\n  return [...schedule].sort((x, y) => x.shouldUpdateAt.getTime() - y.shouldUpdateAt.getTime());\n};\nconst toCouponSchedule = (options) => {\n  return options.flatMap((option) => {\n    const {\n      dailyCouponIds,\n      updateSchedule,\n      updateAt\n    } = option;\n    const {\n      startAt,\n      endAt\n    } = updateSchedule;\n    if (!startAt || !endAt) {\n      return [];\n    }\n    const diff = differenceInCalendarDays(endAt, startAt);\n    return Array.from({\n      length: diff + 1\n    }, (_, index) => {\n      const {\n        hours,\n        minutes,\n        seconds\n      } = updateAt;\n      const date = createKRTimeZoneDate(startAt);\n      date.setDate(date.getDate() + index);\n      date.setHours(hours, minutes, seconds);\n      return {\n        shouldUpdateAt: date,\n        couponIdList: dailyCouponIds[index]\n      };\n    });\n  });\n};\nexport {\n  findCurrentSchedule,\n  getCouponFallbackDescription,\n  getCouponName,\n  getCouponStatus,\n  getDescriptionByStatus,\n  markAsDownloaded,\n  toSchedule\n};\n","import { toCouponNos } from \"../../../../hooks/useDownloadCoupons.js\";\nimport { CouponUpdateType } from \"../CouponModule.types.js\";\nimport { CouponType } from \"../../../../types/models/coupon.js\";\nimport { shallowUnique } from \"../../../../utils/unique.js\";\nimport { useState, useEffect } from \"react\";\nimport { useVisibilityAwareInterval } from \"../../../../hooks/useVisibilityAwareInterval.js\";\nimport { QueryType } from \"../../types.js\";\nimport { findCurrentSchedule, toSchedule } from \"./CouponElement.utils.js\";\nconst MS_IN_SECOND = 1e3;\nconst DEFAULT_COUPON_ITEM_ENTRY = {\n  couponIds: [],\n  updateType: CouponUpdateType.NORMAL,\n  couponType: CouponType.NORMAL\n};\nconst useCouponIds = ({\n  query\n}) => {\n  const [couponItemEntry, setCouponItemEntry] = useState(getCouponItemEntry({\n    query\n  }) ?? DEFAULT_COUPON_ITEM_ENTRY);\n  useVisibilityAwareInterval(() => {\n    if (couponItemEntry.updateType === CouponUpdateType.NORMAL) {\n      return;\n    }\n    const currentSchedule = findCurrentSchedule(couponItemEntry.schedules ?? []);\n    setCouponItemEntry((prev) => ({\n      ...prev,\n      couponIds: shallowUnique(toCouponNos((currentSchedule == null ? void 0 : currentSchedule.couponIdList) ?? \"\"))\n    }));\n  }, MS_IN_SECOND);\n  useEffect(() => {\n    setCouponItemEntry(getCouponItemEntry({\n      query\n    }) ?? DEFAULT_COUPON_ITEM_ENTRY);\n  }, [query]);\n  return {\n    couponIds: couponItemEntry.couponIds,\n    couponType: couponItemEntry.couponType\n  };\n};\nconst getCouponCollectionCouponItemEntry = ({\n  coupon\n}) => {\n  return {\n    couponIds: coupon ? [coupon.couponId] : [],\n    updateType: CouponUpdateType.NORMAL,\n    couponType: CouponType.NORMAL\n  };\n};\nconst getKeywordCollectionCouponItemEntry = ({\n  couponId\n}) => {\n  return {\n    couponIds: couponId ? [couponId] : [],\n    updateType: CouponUpdateType.NORMAL,\n    couponType: CouponType.NORMAL\n  };\n};\nconst getRandomCouponItemEntry = (query) => {\n  const {\n    couponType,\n    couponIds = \"\"\n  } = query;\n  return {\n    couponIds: shallowUnique(toCouponNos(couponIds)),\n    updateType: CouponUpdateType.NORMAL,\n    couponType\n  };\n};\nconst getNormalCouponItemEntry = (query) => {\n  const {\n    couponType,\n    couponIds = \"\",\n    couponUpdateType\n  } = query;\n  return {\n    couponIds: shallowUnique(toCouponNos(couponIds)),\n    updateType: couponUpdateType,\n    couponType\n  };\n};\nconst getDailyCouponItemEntry = (query) => {\n  const {\n    couponType,\n    dailyCouponOptions = [],\n    couponUpdateType\n  } = query;\n  const schedules = toSchedule(dailyCouponOptions);\n  const currentSchedule = findCurrentSchedule(schedules);\n  return {\n    couponIds: shallowUnique(toCouponNos((currentSchedule == null ? void 0 : currentSchedule.couponIdList) ?? \"\")),\n    updateType: couponUpdateType,\n    couponType,\n    schedules\n  };\n};\nconst getGeneralCouponItemEntry = (query) => {\n  switch (query.couponUpdateType) {\n    case CouponUpdateType.NORMAL:\n      return getNormalCouponItemEntry(query);\n    case CouponUpdateType.DAILY:\n      return getDailyCouponItemEntry(query);\n    default:\n      return null;\n  }\n};\nconst getCouponItemEntryByCouponType = (query) => {\n  switch (query.couponType) {\n    case CouponType.RANDOM:\n      return getRandomCouponItemEntry(query);\n    case CouponType.LIMITED:\n    case CouponType.NORMAL:\n      return getGeneralCouponItemEntry(query);\n    default:\n      return null;\n  }\n};\nconst getCouponItemEntry = ({\n  query\n}) => {\n  if (query === void 0) {\n    return null;\n  }\n  switch (query.type) {\n    case QueryType.CouponCollection:\n      return getCouponCollectionCouponItemEntry(query);\n    case QueryType.KeywordCollection:\n      return getKeywordCollectionCouponItemEntry(query);\n    case QueryType.Coupon:\n      return getCouponItemEntryByCouponType(query);\n    default:\n      return null;\n  }\n};\nexport {\n  useCouponIds\n};\n","import { CouponType } from \"../../../../types/models/coupon.js\";\nimport { QueryType } from \"../../types.js\";\nimport { CouponUpdateType } from \"../CouponModule.types.js\";\nimport { toSchedule } from \"./CouponElement.utils.js\";\nimport { filterMap } from \"../../../../utils/filterMap.js\";\nconst validateCoupon = ({\n  query,\n  enabled\n}) => {\n  if (!enabled) {\n    return {\n      isValid: true\n    };\n  }\n  return validateCouponByQuery(query);\n};\nconst validateDailyUpdateCoupon = (query) => {\n  const schedule = toSchedule(query.dailyCouponOptions ?? []);\n  const isValid = schedule.every(({\n    couponIdList\n  }) => couponIdList !== void 0);\n  const errorMessage = isValid ? void 0 : `[관리자용 메시지] 일자별 쿠폰이 모두 입력되어 있는지 확인해주세요.\n${filterMap(schedule, ({\n    couponIdList\n  }) => couponIdList === void 0, ({\n    shouldUpdateAt\n  }) => {\n    return `[${shouldUpdateAt.toLocaleDateString()}] 쿠폰이 없습니다.`;\n  }).join(\"\\n\")}`;\n  return {\n    isValid,\n    errorMessage\n  };\n};\nconst validateCouponQuery = (query) => {\n  if (query.couponType === CouponType.RANDOM) {\n    return {\n      isValid: true\n    };\n  }\n  switch (query.couponUpdateType) {\n    case CouponUpdateType.DAILY:\n      return validateDailyUpdateCoupon(query);\n    default:\n      return {\n        isValid: true\n      };\n  }\n};\nconst validateCouponByQuery = (query) => {\n  if (query === void 0) {\n    return {\n      isValid: false,\n      errorMessage: \"쿠폰 쿼리가 없습니다.\"\n    };\n  }\n  switch (query.type) {\n    case QueryType.Coupon:\n      return validateCouponQuery(query);\n    default:\n      return {\n        isValid: true\n      };\n  }\n};\nexport {\n  validateCoupon\n};\n","import { jsx, jsxs, Fragment } from \"react/jsx-runtime\";\nimport { useMemo, useRef, useEffect } from \"react\";\nimport { Coupon } from \"../../../@shared/Coupon/index.js\";\nimport { EventTrigger } from \"../../../@shared/EventTrigger/index.js\";\nimport { useSegment } from \"../../../@shared/providers/SegmentProvider/SegmentProvider.js\";\nimport { useRootComponentId, useSetRootModule } from \"../../hooks.js\";\nimport { useQueryStore } from \"../../query-store/query.store.js\";\nimport { QueryType } from \"../../types.js\";\nimport \"../../../systems/curations/IntersectionProvider/IntersectionProvider.js\";\nimport { useIntersectionContext } from \"../../../systems/curations/IntersectionProvider/IntersectionProvider.hooks.js\";\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 { isCanvas } from \"../../../../utils/framer/isCanvas.js\";\nimport \"framer\";\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 \"../../../../apis/taste-sharing/TasteSharingApiService.js\";\nimport \"../../../../node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.js\";\nimport \"../../../../node_modules/js-cookie/dist/js.cookie.js\";\nimport \"../../../../apis/preuser/PreuserApiService.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 { useTheme } from \"../../../../hooks/useTheme.js\";\nimport { useBreakpoint } from \"../../../../hooks/useBreakpoint.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 \"../../../../utils/redirectLogin.js\";\nimport \"../../../../utils/event-properties/source.js\";\nimport { useFetchCouponsDownloadStatus } from \"../../../../hooks/fetchers/useFetchCouponsDownloadStatus.js\";\nimport { useTrackSnowplowEvent } from \"../../../../hooks/snowplow/useTrackSnowplowEvent.js\";\nimport { useDownloadCoupons } from \"../../../../hooks/useDownloadCoupons.js\";\nimport { resolveCouponLayout, toBackgroundColor } from \"../../../../libs/property-controls/coupon.js\";\nimport { CouponType } from \"../../../../types/models/coupon.js\";\nimport { hideClosestParentByFramerName } from \"../../../../utils/hideParentElement.js\";\nimport { getPaddingStyle } from \"../../../../utils/spacing.js\";\nimport { useCouponsQuery } from \"../CouponModule.hooks.js\";\nimport { NoticesElement } from \"../NoticesElement/NoticesElement.js\";\nimport { useCouponIds } from \"./CouponElement.hooks.js\";\nimport { getCouponName, getCouponStatus, getCouponFallbackDescription, getDescriptionByStatus, markAsDownloaded } from \"./CouponElement.utils.js\";\nimport { validateCoupon } from \"./CouponElement.validate.js\";\nimport head from \"../../../../node_modules/lodash-es/head.js\";\nconst CouponElement = ({\n  loading = false,\n  query: _query,\n  output,\n  layout\n}) => {\n  const {\n    logged,\n    userNo\n  } = useCurrentUser();\n  const breakpoint = useBreakpoint();\n  const trackSnowplowEvent = useTrackSnowplowEvent();\n  const dispatchSetQuery = useQueryStore((state) => state.dispatchSetQuery);\n  const theme = useTheme();\n  const {\n    isInView\n  } = useIntersectionContext();\n  const query = useMemo(() => attachAdditionalQuery(_query, output), [_query, output]);\n  const {\n    isVisible,\n    loading: isSegmentLoading\n  } = useSegment();\n  const canFetchBySegment = !isSegmentLoading && isVisible;\n  const rootRef = useRef(null);\n  const componentId = useRootComponentId(query);\n  const {\n    couponIds,\n    couponType\n  } = useCouponIds({\n    query\n  });\n  const isFramer = isCanvas();\n  const {\n    isValid,\n    errorMessage\n  } = validateCoupon({\n    query,\n    enabled: isFramer\n  });\n  const {\n    coupons\n  } = useCouponsQuery({\n    query,\n    couponIds,\n    enabled: isInView && canFetchBySegment\n  });\n  const headCoupon = head(coupons);\n  const hasCoupon = headCoupon !== void 0;\n  const isRandomCoupon = (query == null ? void 0 : query.type) === QueryType.Coupon && (query == null ? void 0 : query.couponType) === CouponType.RANDOM;\n  const enabledFetchCouponDownloadStatus = isInView && !isRandomCoupon && canFetchBySegment;\n  const {\n    statuses,\n    isLoading,\n    mutate\n  } = useFetchCouponsDownloadStatus(couponIds, userNo, enabledFetchCouponDownloadStatus);\n  const handleCouponDownloadSuccess = () => {\n    if (!headCoupon) {\n      return;\n    }\n    trackSnowplowEvent(\"click_button\", {\n      section_name: componentId,\n      section_title: componentId,\n      position: -1,\n      button_id: `coupondown_${headCoupon.id}`,\n      button_name: headCoupon.couponName,\n      layout_position: -1\n    });\n  };\n  const {\n    validate,\n    download\n  } = useDownloadCoupons(couponType, headCoupon == null ? void 0 : headCoupon.discountType, handleCouponDownloadSuccess);\n  const shouldRender = query && hasCoupon && (!loading || !isLoading || !logged);\n  const paddingStyle = getPaddingStyle(layout);\n  useEffect(() => {\n    window == null ? void 0 : window.dispatchEvent(new CustomEvent(\"layout-done\"));\n    if (!query) {\n      return;\n    }\n    if (!output) {\n      return;\n    }\n    dispatchSetQuery(output, query);\n  }, [output, query]);\n  useSetRootModule(query, output);\n  const shouldRenderError = !isValid && isFramer;\n  useEffect(() => {\n    if (rootRef.current) {\n      hideClosestParentByFramerName(rootRef.current, \"카테고리첫구매쿠폰\", isVisible);\n    }\n  }, [isVisible]);\n  if (!isVisible) {\n    window == null ? void 0 : window.dispatchEvent(new CustomEvent(\"layout-done\"));\n    return /* @__PURE__ */ jsx(\"div\", { ref: rootRef });\n  }\n  if (!shouldRender) {\n    return /* @__PURE__ */ jsxs(Fragment, { children: [\n      /* @__PURE__ */ jsx(Coupon.Root, { ref: rootRef, style: {\n        padding: paddingStyle\n      }, loading: true, theme }),\n      shouldRenderError ? /* @__PURE__ */ jsx(\"div\", { style: errorMessageStyle, children: errorMessage ?? \"쿠폰 상태가 올바르지 않습니다.\" }) : null\n    ] });\n  }\n  const downloadCount = Math.max(headCoupon.personMaxIssueCount ?? 1, 1);\n  const downloadCoupon = async () => {\n    await download(couponIds, downloadCount, true);\n    return markAsDownloaded(statuses, couponIds);\n  };\n  const handleClick = () => {\n    if (!validate()) {\n      return;\n    }\n    mutate(downloadCoupon(), {\n      optimisticData: markAsDownloaded(statuses, couponIds),\n      rollbackOnError: true,\n      populateCache: true,\n      revalidate: true\n    });\n  };\n  const handleImpression = () => {\n    trackSnowplowEvent(\"impression_content\", {\n      section_name: componentId,\n      section_title: componentId,\n      position: -1,\n      layout_position: -1,\n      layout_id: `coupondown_${headCoupon.id}`\n    });\n  };\n  const couponName = getCouponName(coupons, query);\n  const status = getCouponStatus(headCoupon, logged, query, statuses);\n  const description = isRandomCoupon ? getCouponFallbackDescription(coupons) : getDescriptionByStatus(headCoupon)[status];\n  const {\n    backgroundColor,\n    ...rest\n  } = layout;\n  const resolvedCouponLayout = resolveCouponLayout(layout.couponLayout, breakpoint);\n  return /* @__PURE__ */ jsxs(EventTrigger.Root, { ref: rootRef, style: {\n    padding: paddingStyle\n  }, types: [\"impression\"], onImpression: handleImpression, children: [\n    /* @__PURE__ */ jsxs(Coupon.Root, { theme, backgroundColor: toBackgroundColor(backgroundColor), status, layout: resolvedCouponLayout, children: [\n      /* @__PURE__ */ jsxs(Coupon.Summary, { children: [\n        /* @__PURE__ */ jsx(Coupon.Title, { children: couponName }),\n        /* @__PURE__ */ jsx(Coupon.Description, { children: description })\n      ] }),\n      /* @__PURE__ */ jsx(Coupon.Divider, {}),\n      /* @__PURE__ */ jsx(EventTrigger.Target, { style: {\n        aspectRatio: resolvedCouponLayout === \"detail\" ? \"1 / 1\" : void 0\n      }, children: /* @__PURE__ */ jsx(Coupon.Button, { onClick: handleClick }) })\n    ] }),\n    /* @__PURE__ */ jsx(NoticesElement, { couponType, coupons, ...rest }),\n    shouldRenderError ? /* @__PURE__ */ jsx(\"div\", { style: errorMessageStyle, children: errorMessage ?? \"쿠폰 상태가 올바르지 않습니다.\" }) : null\n  ] });\n};\nconst errorMessageStyle = {\n  background: \"white\",\n  border: \"0.7px solid #00000066\",\n  borderRadius: \"2px\",\n  padding: \"8px\",\n  whiteSpace: \"pre-line\"\n};\nconst attachAdditionalQuery = (query, output) => {\n  return query ? {\n    ...query,\n    isRoot: query.rootOutput === void 0,\n    rootOutput: query.rootOutput || output\n  } : void 0;\n};\nexport {\n  CouponElement\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { useQueryStore } from \"../../query-store/query.store.js\";\nimport { CouponElement } from \"../CouponElement/CouponElement.js\";\nimport { createKey } from \"../../utils/key.js\";\nconst LinkedCouponModule = ({\n  value,\n  output,\n  layout\n}) => {\n  const query = useQueryStore((state) => state.queries[value]);\n  return /* @__PURE__ */ jsx(CouponElement, { query, output, layout }, createKey(query));\n};\nexport {\n  LinkedCouponModule\n};\n","import { ControlType } from \"framer\";\nconst COUPON_NOTICES_CONTROLS = {\n  mainNotices: {\n    type: ControlType.Array,\n    title: \"메인 유의사항\",\n    description: \"상시 노출되는 유의사항으로, 최대 두 줄 입력이 가능합니다.\",\n    control: {\n      type: ControlType.String\n    },\n    maxCount: 2\n  },\n  hasAdditionalNotices: {\n    type: ControlType.Boolean,\n    title: \"추가 유의사항 노출\",\n    enabledTitle: \"노출\",\n    disabledTitle: \"미노출\",\n    defaultValue: false\n  },\n  additionalNotices: {\n    hidden: ({\n      hasAdditionalNotices\n    }) => hasAdditionalNotices === false,\n    type: ControlType.Array,\n    title: \"추가 유의사항\",\n    description: \"더보기 클릭 시 노출되는 추가 유의사항입니다.\",\n    control: {\n      type: ControlType.String\n    }\n  }\n};\nexport {\n  COUPON_NOTICES_CONTROLS\n};\n","import { combineObjectPropertyControls } from \"../../../libs/property-controls/helpers.js\";\nimport { QUERY_CONTROL, COUPON_CONTROLS, KEYWORD_COLLECTIONS_CONTROLS, KEYWORD_COLLECTION_CONTROLS } from \"../controls.js\";\nconst MANUAL_COUPON_MODULE_QUERY = {\n  ...QUERY_CONTROL,\n  controls: combineObjectPropertyControls(COUPON_CONTROLS)\n};\nconst AUTO_COUPON_MODULE_QUERY = {\n  ...QUERY_CONTROL,\n  controls: combineObjectPropertyControls(KEYWORD_COLLECTION_CONTROLS, KEYWORD_COLLECTIONS_CONTROLS)\n};\nexport {\n  AUTO_COUPON_MODULE_QUERY,\n  MANUAL_COUPON_MODULE_QUERY\n};\n","import useSWR from \"../../../../node_modules/swr/core/dist/index.js\";\nimport { collectionApi } from \"../../../../apis/collection/CollectionApiService.js\";\nimport { keywordCollectionApi } from \"../../../../apis/keyword-collections/KeywordCollectionApiService.js\";\nimport { QueryType } from \"../../types.js\";\nimport { orderByDateAsc, getCurrentScheduleIndex } from \"../../../../utils/date.js\";\nimport { splitToNumberArray } from \"../../../../utils/splitToNumberArray.js\";\nconst COUPON_ID_FETCHER_KEY = \"coupon-module/coupon-id\";\nconst useCouponIdQuery = (options) => {\n  const {\n    enabled: _enabled = true,\n    query\n  } = options;\n  const enabled = _enabled && query !== void 0;\n  const {\n    data,\n    isLoading,\n    ...rest\n  } = useSWR(enabled ? [COUPON_ID_FETCHER_KEY, query] : null, () => queryCouponId(query));\n  return {\n    isLoading: isLoading || !enabled,\n    query: data,\n    ...rest\n  };\n};\nconst fetchKeywordCollectionCouponId = async (query) => {\n  if (!query.keywordCollectionId) {\n    return query;\n  }\n  const {\n    data\n  } = await keywordCollectionApi.getKeywordCollection(Number(query.keywordCollectionId));\n  const {\n    title,\n    description,\n    displayEndAt,\n    productGroups,\n    couponId\n  } = data;\n  const [firstProductGroup] = productGroups;\n  return {\n    ...query,\n    title,\n    description: description ?? void 0,\n    displayEndAt: displayEndAt ?? void 0,\n    couponId: couponId ?? void 0,\n    productGroups,\n    selectedProductGroup: {\n      id: firstProductGroup.productGroupId,\n      sort: firstProductGroup.sort,\n      index: 0\n    }\n  };\n};\nconst fetchKeywordCollectionsCouponId = async (query) => {\n  if (!query.keywordCollectionIds) {\n    return query;\n  }\n  const {\n    data\n  } = await collectionApi.getCollections(splitToNumberArray(query.keywordCollectionIds));\n  const collections = orderByDateAsc(data, (x) => x.displayStartAt);\n  const currentIndex = getCurrentScheduleIndex(collections, (current) => current.displayStartAt, (_, next) => next == null ? void 0 : next.displayStartAt);\n  const collection = collections[currentIndex ?? 0];\n  if (!collection) {\n    return query;\n  }\n  const {\n    collectionId,\n    title,\n    description,\n    displayEndAt,\n    productGroupList,\n    couponId\n  } = collection;\n  const [firstProductGroup] = productGroupList;\n  return {\n    type: QueryType.KeywordCollection,\n    keywordCollectionId: `${collectionId}`,\n    title,\n    description: description ?? void 0,\n    displayEndAt: displayEndAt ?? void 0,\n    couponId: couponId ?? void 0,\n    productGroups: productGroupList.map((group) => ({\n      productGroupId: group.collectionProductGroupId,\n      title: group.title,\n      sort: group.sort\n    })),\n    selectedProductGroup: {\n      id: firstProductGroup.collectionProductGroupId,\n      sort: firstProductGroup.sort,\n      index: 0\n    }\n  };\n};\nconst queryCouponId = (query) => {\n  if (!query) {\n    return;\n  }\n  switch (query.type) {\n    case QueryType.KeywordCollection:\n      return fetchKeywordCollectionCouponId(query);\n    case QueryType.KeywordCollections:\n      return fetchKeywordCollectionsCouponId(query);\n    default:\n      return query;\n  }\n};\nexport {\n  useCouponIdQuery\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { useSegment } from \"../../../@shared/providers/SegmentProvider/SegmentProvider.js\";\nimport \"../../../systems/curations/IntersectionProvider/IntersectionProvider.js\";\nimport { useIntersectionContext } from \"../../../systems/curations/IntersectionProvider/IntersectionProvider.hooks.js\";\nimport { useCouponIdQuery } from \"./AutoCouponModule.hooks.js\";\nimport { CouponElement } from \"../CouponElement/CouponElement.js\";\nconst AutoCouponModule = ({\n  query: _query,\n  output,\n  layout\n}) => {\n  const {\n    isInView\n  } = useIntersectionContext();\n  const {\n    isVisible,\n    loading: isSegmentLoading\n  } = useSegment();\n  const canFetchBySegment = !isSegmentLoading && isVisible;\n  const {\n    isLoading,\n    query\n  } = useCouponIdQuery({\n    query: _query,\n    enabled: isInView && canFetchBySegment\n  });\n  return /* @__PURE__ */ jsx(CouponElement, { loading: isLoading, query, output, layout });\n};\nexport {\n  AutoCouponModule\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { addPropertyControls, ControlType } from \"framer\";\nimport { COUPON_CONTROLS } from \"../../../libs/property-controls/coupon.js\";\nimport { THEME_CONTROLS } from \"../../../libs/property-controls/theme.js\";\nimport { SEGMENT_CONTROLS } from \"../../../libs/property-controls/segment.js\";\nimport { CouponModuleInputType } from \"./CouponModule.types.js\";\nimport { LinkedCouponModule } from \"./LinkedCouponModule/LinkedCouponModule.js\";\nimport { COUPON_NOTICES_CONTROLS } from \"../../../libs/property-controls/coupon-notices.js\";\nimport { COMPONENT_ID_PROPS } from \"../../../libs/property-controls/component-id.js\";\nimport { SectionLayout } from \"../../systems/curations/SectionLayout/SectionLayout.js\";\nimport { MANUAL_COUPON_MODULE_QUERY, AUTO_COUPON_MODULE_QUERY } from \"./CouponModule.controls.js\";\nimport { AutoCouponModule } from \"./AutoCouponModule/AutoCouponModule.js\";\nimport { CouponElement } from \"./CouponElement/CouponElement.js\";\nconst CouponModuleInner = ({\n  input,\n  output,\n  layout\n}) => {\n  switch (input.type) {\n    case CouponModuleInputType.Linked:\n      return /* @__PURE__ */ jsx(LinkedCouponModule, { value: input.value, output, layout });\n    case CouponModuleInputType.Auto:\n      return /* @__PURE__ */ jsx(AutoCouponModule, { query: input.autoQuery, output, layout });\n    case CouponModuleInputType.Manual:\n      return /* @__PURE__ */ jsx(CouponElement, { query: input.query, output, layout });\n    default:\n      return null;\n  }\n};\nconst CouponModule = ({\n  theme,\n  componentId,\n  segment,\n  ...rest\n}) => {\n  return /* @__PURE__ */ jsx(SectionLayout, { componentId, theme, segment, children: /* @__PURE__ */ jsx(CouponModuleInner, { ...rest }) });\n};\naddPropertyControls(CouponModule, {\n  ...THEME_CONTROLS,\n  ...SEGMENT_CONTROLS,\n  componentId: {\n    hidden: ({\n      input\n    }) => (input == null ? void 0 : input.type) === CouponModuleInputType.Linked,\n    ...COMPONENT_ID_PROPS.componentId\n  },\n  input: {\n    type: ControlType.Object,\n    title: \"입력 값\",\n    controls: {\n      type: {\n        type: ControlType.Enum,\n        title: \"유형\",\n        options: [CouponModuleInputType.Manual, CouponModuleInputType.Linked, CouponModuleInputType.Auto],\n        optionTitles: [\"수동\", \"연결\", \"자동\"],\n        defaultValue: CouponModuleInputType.Manual\n      },\n      value: {\n        hidden: ({\n          type\n        }) => type !== CouponModuleInputType.Linked,\n        type: ControlType.String,\n        title: \"출력 값\",\n        defaultValue: \"\"\n      },\n      query: {\n        hidden: ({\n          type\n        }) => type !== CouponModuleInputType.Manual,\n        ...MANUAL_COUPON_MODULE_QUERY\n      },\n      autoQuery: {\n        hidden: ({\n          type\n        }) => type !== CouponModuleInputType.Auto,\n        ...AUTO_COUPON_MODULE_QUERY\n      }\n    }\n  },\n  output: {\n    type: ControlType.String,\n    title: \"출력 값\",\n    defaultValue: \"\"\n  },\n  layout: {\n    type: ControlType.Object,\n    title: \"레이아웃\",\n    controls: {\n      ...COUPON_CONTROLS,\n      ...COUPON_NOTICES_CONTROLS,\n      padding: {\n        type: ControlType.FusedNumber,\n        title: \"패딩\",\n        defaultValue: 0,\n        toggleKey: \"isMixed\",\n        toggleTitles: [\"All\", \"Individual\"],\n        valueKeys: [\"paddingTop\", \"paddingRight\", \"paddingBottom\", \"paddingLeft\"],\n        valueLabels: [\"T\", \"R\", \"B\", \"L\"],\n        min: 0\n      }\n    }\n  }\n});\nexport {\n  CouponModule\n};\n","import{CouponModule}from\"https://asset.29cm.co.kr/contents/framer/components/modules/CouponModule/CouponModule.js\";CouponModule.displayName=\"[조립형]Coupon\";export default CouponModule;\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CouponModule\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CouponModule.map"],"x_google_ignoreList":[2,3,4,5,26,27,28,37,38,39,40,41,42,46,47,48,49],"mappings":"w8EAAwC,CAClC,IAAY,CAChB,eAEuB,EAAI,MAAO,CAAE,YAAW,MAAO,CACpD,MAAO,OACP,OAAQ,OACT,CAAE,MAAO,6BAA8B,QAAS,YAAa,SAA0B,EAAI,OAAQ,CAAE,KAAM,OAAQ,EAAG,qCAAsC,CAAC,CAAE,CAAC,8BCP7J,GAAyB,CAC7B,KAAM,SACN,UAAW,IACX,QAAS,GACT,KAAM,EACP,CACK,GAA0B,CAC9B,MAAO,IACP,WAAY,GACb,CACK,GAAwB,CAC5B,MAAO,GACP,WAAY,GACb,CACK,GAAwB,CAC5B,QAAS,CACP,QAAS,EACV,CACD,KAAM,CACJ,QAAS,EACV,CACD,WAAY,GACb,CACK,GAAgC,CACpC,QAAS,EACV,ICLD,SAASA,GAAM,EAAO,EAAO,EAAK,CAChC,OAAO,GAAI,EAAO,GAAI,EAAO,EAAI,CAAC,CAEpC,SAAS,GAAS,EAAO,EAAO,CAC9B,OAAO,OAAO,GAAU,WAAa,EAAM,EAAM,CAAG,EAEtD,SAAS,GAAQ,EAAW,CAC1B,OAAO,EAAU,MAAM,IAAI,CAAC,GAE9B,SAAS,GAAa,EAAW,CAC/B,OAAO,EAAU,MAAM,IAAI,CAAC,GAE9B,SAAS,GAAgB,EAAM,CAC7B,OAAO,IAAS,IAAM,IAAM,IAE9B,SAAS,GAAc,EAAM,CAC3B,OAAO,IAAS,IAAM,SAAW,QAEnC,SAAS,GAAY,EAAW,CAC9B,MAAO,CAAC,MAAO,SAAS,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