{"version":3,"file":"ProfilesModule.8Keng8Ul.mjs","names":["useMemo","__esmMin","init_npm_react_18_3_1","init_ssg_sandbox_shims","pe","window","init_jsx_runtime","ce","addPropertyControls","init_framer_CaDWdxiz","ControlType","init_helpers","useTrackClickButtonEvent","init_ComponentTimingContext","COMPONENT_ID_PROPS","init_breakpoint","BRAND_CURATION_CONTROLS","init_dist","init_EventTrigger","RECOMMENDATION_CONTROLS","QUERY_CONTROL","init_BrandCurationApiService","useSWR","init_controls","init_types","SWRErrorBoundary","useComponentTiming","THEME_CONTROLS","init_IntersectionProvider_hooks","init_hooks","init_theme","useIntersectionContext","combineObjectPropertyControls","init_SWRErrorBoundary","KEYWORD_COLLECTIONS_CONTROLS","init_IntersectionProvider","BREAKPOINT_CONTROLS","QueryType","useComponentTimingContext","PRODUCT_CONTROLS","EventTrigger","init_spacing","init_SectionLayout","init_segment","ProfilesModuleInputType","collectionApi","init_BrandSaleApiService","getPadding","brandSaleApi","splitToNumberArray","init_key","init_useComponentTiming","useSetRootModule","init_SegmentProvider","orderByDateAsc","init_splitToNumberArray","createKey","getCurrentScheduleIndex","init_CollectionApiService","brandCurationApi","SectionLayout","init_date","init_ProfilesModule_types","useSegment","SEGMENT_CONTROLS","init_query_store","init_component_id","useQueryStore","ComponentTimingProvider","init_Profiles","Profiles","AUTO_PROFILES_MODULE_QUERY","MANUAL_PROFILES_MODULE_QUERY","init_ProfilesModule_controls","ProfilesElement","attachAdditionalQuery","init_ProfilesElement","_inputs","dispatchSetQuery","state","layout","inputs","output","currentInput","currentIndex","trackClickButtonEvent","handleClick","index","handleValueChange","value","input","padding","isVisible","item","hasName","values","PROFILES_FETCHER_KEY","INITIAL_PRODUCT_GROUP_INDEX","useProfilesQuery","fetchBrandCurationProfiles","fetchCouponCollectionProfiles","fetchKeywordCollectionsProfiles","queryProfiles","init_ProfilesModule_hooks","_enabled","options","enabled","query","rest","hasProfiles","data","isLoading","brandGroupIds","brand","collections","x","collection","firstProductGroup","productGroupList","title","coverImageUrl","displayEndAt","productGroup","AutoProfilesModule","init_AutoProfilesModule","isInView","profiles","markReady","profile","LinkedProfilesModule","init_LinkedProfilesModule","ProfilesModuleInner","ProfilesModule","init_ProfilesModule","timing","type","ProfilesModule_default","init_ProfilesModule$1"],"sources":["https:/asset.29cm.co.kr/contents/framer/components/modules/ProfilesModule/ProfilesModule.controls.js","https:/asset.29cm.co.kr/contents/framer/components/modules/ProfilesModule/ProfilesElement/ProfilesElement.js","https:/asset.29cm.co.kr/contents/framer/components/modules/ProfilesModule/ProfilesModule.hooks.js","https:/asset.29cm.co.kr/contents/framer/components/modules/ProfilesModule/AutoProfilesModule/AutoProfilesModule.js","https:/asset.29cm.co.kr/contents/framer/components/modules/ProfilesModule/LinkedProfilesModule/LinkedProfilesModule.js","https:/asset.29cm.co.kr/contents/framer/components/modules/ProfilesModule/ProfilesModule.js","https:/framerusercontent.com/modules/ZxiJAgYKh8tJzW8zvfwh/fqSej077nus6Umyr6IwF/ProfilesModule.js"],"sourcesContent":["import { combineObjectPropertyControls } from \"../../../libs/property-controls/helpers.js\";\nimport { QUERY_CONTROL, KEYWORD_COLLECTIONS_CONTROLS, BRAND_CURATION_CONTROLS, RECOMMENDATION_CONTROLS, PRODUCT_CONTROLS } from \"../controls.js\";\nconst AUTO_PROFILES_MODULE_QUERY = {\n  ...QUERY_CONTROL,\n  controls: combineObjectPropertyControls(BRAND_CURATION_CONTROLS, KEYWORD_COLLECTIONS_CONTROLS)\n};\nconst MANUAL_PROFILES_MODULE_QUERY = {\n  ...QUERY_CONTROL,\n  controls: combineObjectPropertyControls(PRODUCT_CONTROLS, RECOMMENDATION_CONTROLS)\n};\nexport {\n  AUTO_PROFILES_MODULE_QUERY,\n  MANUAL_PROFILES_MODULE_QUERY\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { useQueryStore } from \"../../query-store/query.store.js\";\nimport { useMemo, useEffect } from \"react\";\nimport { Profiles } from \"../../../systems/curations/Profiles/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 ProfilesElement = ({\n  loading,\n  inputs: _inputs,\n  output,\n  layout,\n  currentIndex = 0\n}) => {\n  const dispatchSetQuery = useQueryStore((state) => state.dispatchSetQuery);\n  const {\n    hasName\n  } = layout;\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: \"image_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 (!isVisible) {\n    window == null ? void 0 : window.dispatchEvent(new CustomEvent(\"layout-done\"));\n    return null;\n  }\n  return /* @__PURE__ */ jsx(Profiles.Root, { loading, value: currentIndex, defaultValue: currentIndex, dragPaddingLeft: padding.left, dragPaddingRight: padding.right, onValueChange: handleValueChange, children: /* @__PURE__ */ jsx(Profiles.List, { style: {\n    paddingTop: padding.top,\n    paddingBottom: padding.bottom,\n    lineHeight: 0\n  }, list: inputs, children: ({\n    item,\n    index\n  }) => {\n    var _a;\n    return /* @__PURE__ */ jsx(EventTrigger.Target, { onClick: handleClick(index, item == null ? void 0 : item.label), children: /* @__PURE__ */ jsx(Profiles.Item, { value: index, name: hasName ? item == null ? void 0 : item.label : \"\", imageSrc: ((_a = item == null ? void 0 : item.image) == null ? void 0 : _a.src) ?? \"\" }) });\n  } }) });\n};\nconst attachAdditionalQuery = (values, output) => {\n  return values.map((value, index) => ({\n    ...value,\n    query: {\n      ...value.query,\n      facetName: value.query.facetName,\n      keys: [...value.query.keys ?? [], `profiles-${index}`],\n      isRoot: value.query.rootOutput === void 0,\n      rootOutput: value.query.rootOutput || output\n    }\n  }));\n};\nexport {\n  ProfilesElement\n};\n","import useSWR from \"../../../node_modules/swr/core/dist/index.js\";\nimport { QueryType } from \"../types.js\";\nimport { splitToNumberArray } from \"../../../utils/splitToNumberArray.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 { orderByDateAsc, getCurrentScheduleIndex } from \"../../../utils/date.js\";\nconst PROFILES_FETCHER_KEY = \"profiles-module/profiles\";\nconst INITIAL_PRODUCT_GROUP_INDEX = 0;\nconst useProfilesQuery = (options) => {\n  const {\n    enabled: _enabled = true,\n    query\n  } = options;\n  const enabled = _enabled && query !== void 0;\n  const {\n    data = {\n      values: []\n    },\n    isLoading,\n    ...rest\n  } = useSWR(enabled ? [PROFILES_FETCHER_KEY, query] : null, () => queryProfiles(query));\n  const hasProfiles = data.values.length > 0;\n  return {\n    isLoading: isLoading || !enabled || !hasProfiles,\n    profiles: data.values,\n    currentIndex: data.currentIndex,\n    ...rest\n  };\n};\nconst fetchBrandCurationProfiles = 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  return {\n    values: data.frontBrands.map((brand) => ({\n      label: brand.nameKor,\n      image: {\n        src: brand.iconImageUrl\n      },\n      query: {\n        ...query,\n        brandId: brand.frontBrandId\n      }\n    }))\n  };\n};\nconst fetchCouponCollectionProfiles = async (query) => {\n  if (!query.brandSaleId) {\n    return {\n      values: []\n    };\n  }\n  const {\n    data\n  } = await brandSaleApi.getBrandSales(query.brandSaleId);\n  return {\n    values: data.brandSaleCouponList.map((item) => ({\n      label: item.frontBrand.nameKor,\n      image: {\n        src: item.frontBrand.iconImageUrl\n      },\n      query: {\n        ...query,\n        couponCollectionId: item.couponCollectionId,\n        coupon: item.coupon,\n        frontBrand: item.frontBrand\n      }\n    }))\n  };\n};\nconst fetchKeywordCollectionsProfiles = 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, (x) => x.displayStartAt, (x) => x.displayEndAt);\n  return {\n    values: data.map((item, index) => {\n      const collection = collections[index];\n      const {\n        title,\n        displayEndAt,\n        productGroupList,\n        coverImageUrl\n      } = item;\n      const [firstProductGroup] = productGroupList ?? [];\n      return {\n        label: title,\n        image: {\n          // NOTE:(김홍동) 현재 서버에서는 coverImageUrl을 보내고 있지 않습니다. 때문에 임시로 이미지를 추가합니다.\n          // 이구위크에서는 서버의 coverImageUrl를 사용하지 않고 커스텀으로 이미지를 추가하기 때문에 coverImageUrl이 당장 필요하지 않지만 추후에 서버에서 받아야 합니다.\n          src: coverImageUrl ?? \"https://img.29cm.co.kr/cms/202505/11f0379df9076589bb067bd6be985e23.jpg\"\n        },\n        query: {\n          type: QueryType.KeywordCollection,\n          title: collection.title,\n          keywordCollectionId: String(collection.collectionId),\n          displayEndAt: displayEndAt ?? void 0,\n          couponId: collection.couponId ?? void 0,\n          productGroups: productGroupList.map((productGroup) => ({\n            ...productGroup,\n            productGroupId: productGroup.collectionProductGroupId\n          })),\n          selectedProductGroup: firstProductGroup ? {\n            id: firstProductGroup.collectionProductGroupId,\n            sort: firstProductGroup.sort,\n            index: INITIAL_PRODUCT_GROUP_INDEX\n          } : void 0\n        }\n      };\n    }),\n    currentIndex\n  };\n};\nconst queryProfiles = (query) => {\n  if (!query) {\n    return {\n      values: []\n    };\n  }\n  switch (query.type) {\n    case QueryType.BrandCuration:\n      return fetchBrandCurationProfiles(query);\n    case QueryType.CouponCollection:\n      return fetchCouponCollectionProfiles(query);\n    case QueryType.KeywordCollections:\n      return fetchKeywordCollectionsProfiles(query);\n    default:\n      return {\n        values: []\n      };\n  }\n};\nexport {\n  useProfilesQuery\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { useEffect } from \"react\";\nimport \"../../../systems/curations/IntersectionProvider/IntersectionProvider.js\";\nimport { useIntersectionContext } from \"../../../systems/curations/IntersectionProvider/IntersectionProvider.hooks.js\";\nimport { useComponentTimingContext } from \"../../../../hooks/beacon/ComponentTimingContext.js\";\nimport { useProfilesQuery } from \"../ProfilesModule.hooks.js\";\nimport { ProfilesElement } from \"../ProfilesElement/ProfilesElement.js\";\nconst AutoProfilesModule = ({\n  query,\n  inputs,\n  output,\n  layout\n}) => {\n  const {\n    isInView\n  } = useIntersectionContext();\n  const {\n    isLoading,\n    profiles,\n    currentIndex\n  } = useProfilesQuery({\n    query,\n    enabled: isInView\n  });\n  const {\n    markReady\n  } = useComponentTimingContext();\n  useEffect(() => {\n    if (!isLoading && profiles.length > 0) {\n      markReady();\n    }\n  }, [isLoading, profiles.length, markReady]);\n  return /* @__PURE__ */ jsx(ProfilesElement, { loading: isLoading, inputs: profiles.map((profile, index) => {\n    const input = inputs[index];\n    return {\n      ...profile,\n      label: (input == null ? void 0 : input.label) || profile.label,\n      image: (input == null ? void 0 : input.image) || profile.image\n    };\n  }), output, layout, currentIndex });\n};\nexport {\n  AutoProfilesModule\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { useEffect } from \"react\";\nimport { useQueryStore } from \"../../query-store/query.store.js\";\nimport { ProfilesElement } from \"../ProfilesElement/ProfilesElement.js\";\nimport { useProfilesQuery } from \"../ProfilesModule.hooks.js\";\nimport \"../../../systems/curations/IntersectionProvider/IntersectionProvider.js\";\nimport { useIntersectionContext } from \"../../../systems/curations/IntersectionProvider/IntersectionProvider.hooks.js\";\nimport { useComponentTimingContext } from \"../../../../hooks/beacon/ComponentTimingContext.js\";\nimport { createKey } from \"../../utils/key.js\";\nconst LinkedProfilesModule = ({\n  value,\n  output,\n  layout\n}) => {\n  const {\n    isInView\n  } = useIntersectionContext();\n  const query = useQueryStore((state) => state.queries[value]);\n  const {\n    isLoading,\n    profiles\n  } = useProfilesQuery({\n    query,\n    enabled: isInView\n  });\n  const {\n    markReady\n  } = useComponentTimingContext();\n  useEffect(() => {\n    if (!isLoading && profiles.length > 0) {\n      markReady();\n    }\n  }, [isLoading, profiles.length, markReady]);\n  return /* @__PURE__ */ jsx(ProfilesElement, { loading: isLoading, inputs: profiles, output, layout }, createKey(query));\n};\nexport {\n  LinkedProfilesModule\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { addPropertyControls, ControlType } from \"framer\";\nimport { SWRErrorBoundary } from \"../../@shared/SWRErrorBoundary/SWRErrorBoundary.js\";\nimport { SectionLayout } from \"../../systems/curations/SectionLayout/SectionLayout.js\";\nimport { ComponentTimingProvider } from \"../../../hooks/beacon/ComponentTimingContext.js\";\nimport { useComponentTiming } from \"../../../hooks/beacon/useComponentTiming.js\";\nimport { BREAKPOINT_CONTROLS } from \"../../../libs/property-controls/breakpoint.js\";\nimport { COMPONENT_ID_PROPS } from \"../../../libs/property-controls/component-id.js\";\nimport { THEME_CONTROLS } from \"../../../libs/property-controls/theme.js\";\nimport { ProfilesModuleInputType } from \"./ProfilesModule.types.js\";\nimport { MANUAL_PROFILES_MODULE_QUERY, AUTO_PROFILES_MODULE_QUERY } from \"./ProfilesModule.controls.js\";\nimport { ProfilesElement } from \"./ProfilesElement/ProfilesElement.js\";\nimport { AutoProfilesModule } from \"./AutoProfilesModule/AutoProfilesModule.js\";\nimport { LinkedProfilesModule } from \"./LinkedProfilesModule/LinkedProfilesModule.js\";\nimport { SEGMENT_CONTROLS } from \"../../../libs/property-controls/segment.js\";\nconst ProfilesModuleInner = ({\n  input,\n  output,\n  layout\n}) => {\n  switch (input.type) {\n    case ProfilesModuleInputType.Linked:\n      return /* @__PURE__ */ jsx(LinkedProfilesModule, { value: input.value, output, layout });\n    case ProfilesModuleInputType.Auto:\n      return /* @__PURE__ */ jsx(AutoProfilesModule, { query: input.query, inputs: input.inputs, output, layout });\n    case ProfilesModuleInputType.Manual:\n      return /* @__PURE__ */ jsx(ProfilesElement, { inputs: input.values, output, layout });\n  }\n};\nconst ProfilesModule = ({\n  theme,\n  breakpoint,\n  componentId,\n  segment,\n  ...rest\n}) => {\n  const timing = useComponentTiming(\"ProfilesModule\");\n  return /* @__PURE__ */ jsx(ComponentTimingProvider, { timing, children: /* @__PURE__ */ jsx(SectionLayout, { theme, breakpoint, componentId, segment, onVisible: timing.markVisible, children: /* @__PURE__ */ jsx(SWRErrorBoundary, { reportFailure: true, children: /* @__PURE__ */ jsx(ProfilesModuleInner, { ...rest }) }) }) });\n};\naddPropertyControls(ProfilesModule, {\n  ...BREAKPOINT_CONTROLS,\n  ...THEME_CONTROLS,\n  ...SEGMENT_CONTROLS,\n  componentId: {\n    hidden: ({\n      input\n    }) => (input == null ? void 0 : input.type) === ProfilesModuleInputType.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: [ProfilesModuleInputType.Linked, ProfilesModuleInputType.Auto, ProfilesModuleInputType.Manual],\n        optionTitles: [\"연결\", \"자동\", \"수동\"]\n      },\n      value: {\n        hidden: ({\n          type\n        }) => type !== ProfilesModuleInputType.Linked,\n        type: ControlType.String,\n        title: \"출력 값\",\n        defaultValue: \"\"\n      },\n      values: {\n        hidden: ({\n          type\n        }) => type !== ProfilesModuleInputType.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              displayTextArea: true,\n              description: \"최대 3줄까지 가능합니다\"\n            },\n            image: {\n              type: ControlType.ResponsiveImage,\n              title: \"이미지\"\n            },\n            query: MANUAL_PROFILES_MODULE_QUERY\n          }\n        },\n        defaultValue: [{\n          label: \"텍스트\"\n        }]\n      },\n      inputs: {\n        hidden: ({\n          type\n        }) => type !== ProfilesModuleInputType.Auto,\n        type: ControlType.Array,\n        title: \"프로필 옵션 목록\",\n        description: \"자동 유형일 때에는 데이터를 통해 가져온 옵션을 대체할 수 있습니다.\",\n        control: {\n          type: ControlType.Object,\n          title: \"입력 값\",\n          controls: {\n            label: {\n              type: ControlType.String,\n              title: \"이름\",\n              defaultValue: \"\",\n              displayTextArea: true,\n              description: \"최대 3줄까지 가능합니다\"\n            },\n            image: {\n              type: ControlType.ResponsiveImage,\n              title: \"이미지\"\n            }\n          }\n        }\n      },\n      query: {\n        hidden: ({\n          type\n        }) => type !== ProfilesModuleInputType.Auto,\n        ...AUTO_PROFILES_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      hasName: {\n        type: ControlType.Boolean,\n        title: \"텍스트 노출\",\n        defaultValue: true\n      },\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  ProfilesModule,\n  ProfilesModuleInner\n};\n","import{ProfilesModule}from\"https://asset.29cm.co.kr/contents/framer/components/modules/ProfilesModule/ProfilesModule.js\";ProfilesModule.displayName=\"[조립형]Profiles\";export default ProfilesModule;\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ProfilesModule\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ProfilesModule.map"],"mappings":"A,0zBAEM,EAA6B,CACjC,GAAGoB,EACH,SAAUY,EAA8BhB,EAAyBkB,EAA4B,CAC/F,EACM,EAA+B,CACnC,GAAGd,EACH,SAAUY,EAA8BO,GAAkBpB,EAAuB,CACnF,C,qFCDM,GAAmB,CACvB,UACA,OAAQ0D,EACR,SACA,SACA,eAAe,KACX,CACJ,IAAMC,EAAmBX,EAAe,GAAUY,EAAM,gBAAgB,EAClE,CACJ,WACEC,EACEC,EAASjF,MAAc2E,EAAsBE,EAASK,CAAM,EAAG,CAACL,EAASK,CAAM,CAAC,EAChFC,EAAeF,EAAOG,GACtB,CACJ,aACErB,GAAW,EACTsB,EAAwBzE,GAAyBuE,GAA6C,KAAK,EACnGG,GAAe,EAAO,EAAO,SAAa,CAC9CD,EAAsB,CACpB,KAAM,YACN,eAAgBE,EAAQ,EACxB,MACF,CAAC,CACH,EACMC,EAAqB,GAAU,CACnC,GAAI,CAACN,EACH,OAEF,IAAMK,EAAQ,OAAOE,CAAK,EACpBC,EAAQT,EAAOM,GACrBT,EAAiBI,EAAQQ,EAAM,KAAK,CACtC,EACAnF,MAAgB,CACdF,GAAiC,cAAc,IAAI,YAAY,aAAa,CAAC,EACxE8E,GAGAD,GAGLJ,EAAiBI,EAAQC,EAAa,KAAK,CAC7C,EAAG,CAACD,EAAQC,CAAY,CAAC,EACzB/B,GAAiB+B,GAA6C,MAAOD,CAAM,EAC3E,IAAMS,EAAU5C,GAAWiC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