{"version":3,"file":"KeywordCollectionTags.utils.DLE4EBgy.mjs","names":["createContext","Root","forwardRef","useRef","useState","containerStyle","useContext","forwardRef","useState","List","forwardRef","useState","containerStyle","Panel","forwardRef","containerStyle","createContext","forwardRef","useContext","Fragment","forwardRef","a$1","useCallback","useMemo","a","forwardRef","t","p","forwardRef","forwardRef","Fragment"],"sources":["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/systems/KeywordCollection/KeywordCollectionTags/KeywordCollectionTags.utils.js"],"sourcesContent":["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 \"../../../../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 \"../../../../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 \"../../../../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 { 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"],"x_google_ignoreList":[12,13,14],"mappings":"0yDAAM,EAAsB,GAAY,CACtC,GAAM,CACJ,cAAc,EACd,cAAc,GACZ,GAAW,EAAE,CACjB,OAAO,EAAc,4BCLiB,IACuB,IACiC,IACtB,CACpE,EAAuB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