{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/jfZkPONN39ogV3hUVVSA/I5LefFPJB8tAJE6OrFdb/Analytics.js"],
  "sourcesContent": ["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef}from\"react\";import{useRef,useEffect}from\"react\";import{useInView}from\"framer-motion\";import{useTrackClickComponent,useTrackViewComponent}from\"https://asset.29cm.co.kr/contents/framer/components/canvas/ComponentEventTracker/ComponentEventTracker.hooks.event.js\";const getComponent=(props,Component)=>Component[\"displayName\"]||props[\"name\"]||props[\"data-framer-name\"];// prettier-ignore\nconst mergeRefs=(...refs)=>{return value=>{refs.forEach(ref=>{if(typeof ref===\"function\"){ref(value);}else if(ref!=null){ref.current=value;}});};};export function withViewEventTracker(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const component=getComponent(props,Component);const containerRef=useRef(null);const isInView=useInView(containerRef);const{trackViewComponent}=useTrackViewComponent();useEffect(()=>{if(!isInView){return;}trackViewComponent(component);},[isInView]);return /*#__PURE__*/_jsx(Component,{...props,ref:mergeRefs(ref,containerRef)});});}export function withClickEventTracker(Component){return props=>{const component=getComponent(props,Component);const{trackClickComponent}=useTrackClickComponent();const handleClick=e=>{if(e.isTriggered){return;}e.isTriggered=true;trackClickComponent(component);};return /*#__PURE__*/_jsx(Component,{...props,onTap:handleClick});};}export function withViewClickEventTracker(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const component=getComponent(props,Component);const containerRef=useRef(null);const isInView=useInView(containerRef);const{trackViewComponent}=useTrackViewComponent();const{trackClickComponent}=useTrackClickComponent();useEffect(()=>{if(!isInView){return;}trackViewComponent(component);},[isInView]);const handleClick=e=>{if(e.isTriggered){return;}e.isTriggered=true;trackClickComponent(component);};return /*#__PURE__*/_jsx(Component,{ref:mergeRefs(ref,containerRef),...props,onTap:handleClick});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withClickEventTracker\":{\"type\":\"reactHoc\",\"name\":\"withClickEventTracker\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withViewClickEventTracker\":{\"type\":\"reactHoc\",\"name\":\"withViewClickEventTracker\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withViewEventTracker\":{\"type\":\"reactHoc\",\"name\":\"withViewEventTracker\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Analytics.map"],
  "mappings": "uHAAkU,IAAMA,EAAa,CAACC,EAAMC,IAAYA,EAAU,aAAgBD,EAAM,MAASA,EAAM,kBAAkB,EACnaE,EAAU,IAAIC,IAAeC,GAAO,CAACD,EAAK,QAAQE,GAAK,CAAI,OAAOA,GAAM,WAAYA,EAAID,CAAK,EAAWC,GAAK,OAAMA,EAAI,QAAQD,EAAO,CAAC,CAAE,EAAmb,SAASE,EAAsBC,EAAU,CAAC,OAAOC,GAAO,CAAC,IAAMC,EAAUC,EAAaF,EAAMD,CAAS,EAAO,CAAC,oBAAAI,CAAmB,EAAEC,EAAuB,EAAsG,OAAoBC,EAAKN,EAAU,CAAC,GAAGC,EAAM,MAA/HM,GAAG,CAAIA,EAAE,cAAqBA,EAAE,YAAY,GAAKH,EAAoBF,CAAS,EAAE,CAAgE,CAAC,CAAE,CAAE,CAAQ,SAASM,EAA0BR,EAAU,CAAC,OAAoBS,EAAW,CAACR,EAAMS,IAAM,CAAC,IAAMR,EAAUC,EAAaF,EAAMD,CAAS,EAAQW,EAAaC,EAAO,IAAI,EAAQC,EAASC,EAAUH,CAAY,EAAO,CAAC,mBAAAI,CAAkB,EAAEC,EAAsB,EAAO,CAAC,oBAAAZ,CAAmB,EAAEC,EAAuB,EAAEY,EAAU,IAAI,CAAKJ,GAAkBE,EAAmBb,CAAS,CAAE,EAAE,CAACW,CAAQ,CAAC,EAAE,IAAMK,EAAYX,GAAG,CAAIA,EAAE,cAAqBA,EAAE,YAAY,GAAKH,EAAoBF,CAAS,EAAE,EAAE,OAAoBI,EAAKN,EAAU,CAAC,IAAImB,EAAUT,EAAIC,CAAY,EAAE,GAAGV,EAAM,MAAMiB,CAAW,CAAC,CAAE,CAAC,CAAE",
  "names": ["getComponent", "props", "Component", "mergeRefs", "refs", "value", "ref", "withClickEventTracker", "Component", "props", "component", "getComponent", "trackClickComponent", "useTrackClickComponent", "p", "e", "withViewClickEventTracker", "Y", "ref", "containerRef", "pe", "isInView", "useInView", "trackViewComponent", "useTrackViewComponent", "ue", "handleClick", "mergeRefs"]
}
