{"version":3,"file":"KeywordCollectionApiService.Do59tr2R.mjs","names":["forwardRef","useContext","useContext","createContext","useRef","useContext"],"sources":["https:/asset.29cm.co.kr/contents/framer/components/@shared/TextButton/TextButton.js","https:/asset.29cm.co.kr/contents/framer/styles/breakpoint.js","https:/asset.29cm.co.kr/contents/framer/libs/property-controls/breakpoint.js","https:/asset.29cm.co.kr/contents/framer/libs/property-controls/theme.js","https:/asset.29cm.co.kr/contents/framer/libs/property-controls/component-id.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/providers/BreakpointProvider/BreakpointProvider.hooks.js","https:/asset.29cm.co.kr/contents/framer/hooks/useBreakpoint.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/providers/ThemeProvider/ThemeProvider.hooks.js","https:/asset.29cm.co.kr/contents/framer/hooks/useTheme.js","https:/asset.29cm.co.kr/contents/framer/components/systems/curations/IntersectionProvider/IntersectionProvider.js","https:/asset.29cm.co.kr/contents/framer/components/systems/curations/SectionLayout/SectionLayout.js","https:/asset.29cm.co.kr/contents/framer/components/systems/curations/IntersectionProvider/IntersectionProvider.hooks.js","https:/asset.29cm.co.kr/contents/framer/apis/keyword-collections/KeywordCollectionApiService.js"],"sourcesContent":["import { jsxs, jsx } from \"react/jsx-runtime\";\nimport { forwardRef } from \"react\";\nimport { Icon } from \"../Icon/Icon.js\";\nimport { typography } from \"../../../styles/typography.js\";\nconst TextButton = ({\n  children,\n  style,\n  as,\n  theme = \"light\",\n  size = \"medium\",\n  prefixIcon,\n  postfixIcon,\n  variant,\n  backgroundColor,\n  color,\n  isUnderlined = false,\n  ...rest\n}, ref) => {\n  const Component = as ?? \"button\";\n  const variantStyle = textButtonStyleByVariant[rest.disabled ? \"disabled\" : variant];\n  const textButtonStyle = {\n    ...style,\n    ...baseTextButtonStyle,\n    ...textButtonStyleBySize[size],\n    ...variantStyle[theme],\n    ...isUnderlined && {\n      textDecoration: \"underline\"\n    }\n  };\n  const reshapedProps = {\n    ...rest,\n    href: rest.disabled ? void 0 : rest.href,\n    onClick: rest.disabled ? void 0 : rest.onClick\n  };\n  return /* @__PURE__ */ jsxs(Component, { ref, ...reshapedProps, style: textButtonStyle, children: [\n    prefixIcon ? /* @__PURE__ */ jsx(Icon, { type: getIconType(prefixIcon), fill: getIconFill(prefixIcon), size: iconSizeByButtonSize[size], color: textButtonStyle.color, weight: \"bold\" }) : null,\n    /* @__PURE__ */ jsx(\"div\", { style: contentStyle, children }),\n    postfixIcon ? /* @__PURE__ */ jsx(Icon, { type: getIconType(postfixIcon), fill: getIconFill(postfixIcon), size: iconSizeByButtonSize[size], color: textButtonStyle.color, weight: \"bold\" }) : null\n  ] });\n};\nconst getIconType = (icon) => typeof icon === \"string\" ? icon : icon.type;\nconst getIconFill = (icon) => typeof icon === \"string\" ? void 0 : icon.fill;\nconst baseTextButtonStyle = {\n  minWidth: \"fit-content\",\n  height: \"auto\",\n  display: \"flex\",\n  alignItems: \"center\",\n  justifyContent: \"center\",\n  cursor: \"pointer\",\n  // reset button element css\n  backgroundColor: \"transparent\",\n  textDecoration: \"none\",\n  padding: 0,\n  outline: \"none\",\n  border: \"none\",\n  boxSizing: \"border-box\"\n};\nconst textButtonStyleBySize = {\n  large: {\n    gap: \"4px\",\n    ...typography(18, 600, 1.2)\n  },\n  medium: {\n    gap: \"4px\",\n    ...typography(16, 600, 1.2)\n  },\n  small: {\n    gap: \"2px\",\n    ...typography(14, 600, 1.2)\n  },\n  xSmall: {\n    gap: \"2px\",\n    ...typography(12, 700, 1.36)\n  }\n};\nconst textButtonStyleByVariant = {\n  primary: {\n    light: {\n      color: \"#000\"\n    },\n    dark: {\n      color: \"#fff\"\n    }\n  },\n  secondary: {\n    light: {\n      color: \"#474747\"\n    },\n    dark: {\n      color: \"#a0a0a0\"\n    }\n  },\n  tertiary: {\n    light: {\n      color: \"#a0a0a0\"\n    },\n    dark: {\n      color: \"#474747\"\n    }\n  },\n  disabled: {\n    light: {\n      color: \"#c4c4c4\",\n      cursor: \"not-allowed\"\n    },\n    dark: {\n      color: \"#303033\",\n      cursor: \"not-allowed\"\n    }\n  }\n};\nconst iconSizeByButtonSize = {\n  large: 20,\n  medium: 18,\n  small: 16,\n  xSmall: 12\n};\nconst contentStyle = {\n  display: \"flex\",\n  alignItems: \"center\"\n};\nconst Default = forwardRef(TextButton);\nexport {\n  Default as TextButton\n};\n","var Breakpoint = /* @__PURE__ */ ((Breakpoint2) => {\n  Breakpoint2[\"DESKTOP\"] = \"desktop\";\n  Breakpoint2[\"TABLET\"] = \"tablet\";\n  Breakpoint2[\"MOBILE\"] = \"mobile\";\n  return Breakpoint2;\n})(Breakpoint || {});\nexport {\n  Breakpoint\n};\n","import { ControlType } from \"framer\";\nimport { Breakpoint } from \"../../styles/breakpoint.js\";\nconst BREAKPOINT_CONTROLS = {\n  breakpoint: {\n    type: ControlType.Enum,\n    title: \"분기점\",\n    options: [Breakpoint.DESKTOP, Breakpoint.TABLET, Breakpoint.MOBILE],\n    optionTitles: [\"PC\", \"Tablet\", \"Mobile\"],\n    displaySegmentedControl: true\n  }\n};\nexport {\n  BREAKPOINT_CONTROLS\n};\n","import { ControlType } from \"framer\";\nimport { Theme } from \"../../styles/theme.js\";\nconst THEME_CONTROLS = {\n  theme: {\n    type: ControlType.Enum,\n    title: \"테마\",\n    description: \"Light 테마는 일부 스타일이 미적용되어 있을 수 있습니다.\",\n    options: [Theme.LIGHT, Theme.DARK],\n    optionTitles: [\"Light\", \"Dark\"],\n    defaultValue: Theme.LIGHT,\n    displaySegmentedControl: true\n  }\n};\nexport {\n  THEME_CONTROLS\n};\n","import { ControlType } from \"framer\";\nconst COMPONENT_ID_PROPS = {\n  componentId: {\n    type: ControlType.String,\n    title: \"컴포넌트 ID\",\n    description: \"이벤트 수집 시에 모듈을 구분하기 위한 값\\nex. 29welcoming\",\n    defaultValue: \"\"\n  }\n};\nexport {\n  COMPONENT_ID_PROPS\n};\n","import { useContext } from \"react\";\nimport { BreakpointContext } from \"./BreakpointProvider.js\";\nconst useBreakpointContext = () => {\n  return useContext(BreakpointContext);\n};\nexport {\n  useBreakpointContext\n};\n","import \"../components/@shared/providers/BreakpointProvider/BreakpointProvider.js\";\nimport { useBreakpointContext } from \"../components/@shared/providers/BreakpointProvider/BreakpointProvider.hooks.js\";\nconst useBreakpoint = () => {\n  const {\n    breakpoint\n  } = useBreakpointContext();\n  return breakpoint;\n};\nexport {\n  useBreakpoint\n};\n","import { useContext } from \"react\";\nimport { ThemeContext } from \"./ThemeProvider.js\";\nconst useThemeContext = () => {\n  return useContext(ThemeContext);\n};\nexport {\n  useThemeContext\n};\n","import \"../components/@shared/providers/ThemeProvider/ThemeProvider.js\";\nimport { useThemeContext } from \"../components/@shared/providers/ThemeProvider/ThemeProvider.hooks.js\";\nconst useTheme = () => {\n  const {\n    theme\n  } = useThemeContext();\n  return theme;\n};\nexport {\n  useTheme\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { useInView } from \"framer-motion\";\nimport { createContext, useRef } from \"react\";\nconst IntersectionContext = createContext({\n  isInView: false\n});\nconst IntersectionProvider = ({\n  children,\n  ...rest\n}) => {\n  const ref = useRef(null);\n  const isInView = useInView(ref, rest);\n  return /* @__PURE__ */ jsx(IntersectionContext.Provider, { value: {\n    isInView\n  }, children: /* @__PURE__ */ jsx(\"div\", { ref, style: {\n    width: \"100%\"\n  }, children }) });\n};\nexport {\n  IntersectionContext,\n  IntersectionProvider\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { BreakpointProvider } from \"../../../@shared/providers/BreakpointProvider/BreakpointProvider.js\";\nimport \"react\";\nimport { ThemeProvider } from \"../../../@shared/providers/ThemeProvider/ThemeProvider.js\";\nimport { IntersectionProvider } from \"../IntersectionProvider/IntersectionProvider.js\";\nimport \"framer-motion\";\nimport \"../../../../node_modules/@firebase/analytics/dist/esm/index.esm2017.js\";\nimport \"../../../../node_modules/firebase/app/dist/esm/index.esm.js\";\nimport { SWRConfig } from \"../../../../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 \"../../../../hooks/stores/content/content.store.js\";\nimport \"../../../../utils/event-properties/source.js\";\nimport { EventTrackingProvider } from \"../EventTrackingProvider/EventTrackingProvider.js\";\nimport \"../../../../constants/snowplow/snowplowSchema.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 { SegmentProvider } from \"../../../@shared/providers/SegmentProvider/SegmentProvider.js\";\nconst SectionLayout = ({\n  children,\n  theme = \"light\",\n  breakpoint = \"mobile\",\n  componentId,\n  intersectionOptions,\n  segment\n}) => {\n  return /* @__PURE__ */ jsx(ThemeProvider, { theme, children: /* @__PURE__ */ jsx(BreakpointProvider, { breakpoint, children: /* @__PURE__ */ jsx(IntersectionProvider, { once: true, margin: \"200px 0px\", ...intersectionOptions, children: /* @__PURE__ */ jsx(EventTrackingProvider, { componentId, children: /* @__PURE__ */ jsx(SWRConfig, { value: {\n    revalidateIfStale: false,\n    revalidateOnFocus: false,\n    revalidateOnReconnect: false,\n    errorRetryCount: 1\n  }, children: /* @__PURE__ */ jsx(SegmentProvider, { segment, children }) }) }) }) }) });\n};\nexport {\n  SectionLayout\n};\n","import { useContext } from \"react\";\nimport { IntersectionContext } from \"./IntersectionProvider.js\";\nconst useIntersectionContext = () => {\n  return useContext(IntersectionContext);\n};\nexport {\n  useIntersectionContext\n};\n","import { APIService } from \"../APIService.js\";\nimport { throwFailError } from \"../@middlewares/throwFailError.js\";\nimport { env } from \"../../config/index.js\";\nclass KeywordCollectionApiService extends APIService {\n  constructor() {\n    super();\n    this.setMiddleware(throwFailError);\n  }\n  async getKeywordCollection(collectionId) {\n    return this.get(`${env.api.content}/api/v4/framers/proxy/content-api/api/v5/keyword-collections/${collectionId}`);\n  }\n  async getCollectionProducts({\n    collectionId,\n    productGroupId,\n    sort,\n    page,\n    size\n  }) {\n    return this.get(`${env.api.content}/api/v4/framers/proxy/content-api/api/v5/keyword-collections/${collectionId}/product-groups/${productGroupId}/products`, {\n      sort,\n      page,\n      size\n    }).then((data) => ({\n      ...data.data,\n      resultList: data.data.resultList.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      })\n    }));\n  }\n}\nconst keywordCollectionApi = new KeywordCollectionApiService();\nexport {\n  keywordCollectionApi\n};\n"],"mappings":"4wCAA8C,IACX,KACI,KACoB,CACrD,GAAc,CAClB,WACA,QACA,KACA,QAAQ,QACR,OAAO,SACP,aACA,cACA,UACA,kBACA,QACA,eAAe,GACf,GAAG,GACF,IAAQ,CACT,IAAM,EAAY,GAAM,SAClB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