{"version":3,"file":"useCreateIsomorphicAppSchemeLink.BKlv6TmL.mjs","names":[],"sources":["https:/asset.29cm.co.kr/contents/framer/utils/getAnchorTarget.js","https:/asset.29cm.co.kr/contents/framer/hooks/useCreateIsomorphicAppSchemeLink.js"],"sourcesContent":["import { isServer } from \"./context.js\";\nconst getAnchorTarget = (url) => {\n  if (isServer()) {\n    return \"_self\";\n  }\n  return normalizeURL(url) === normalizeURL(window.location.href) ? \"_self\" : \"_blank\";\n};\nconst normalizeURL = (url) => {\n  const hasOrigin = !url.startsWith(\"/\");\n  try {\n    const {\n      origin,\n      pathname\n    } = new URL(hasOrigin ? url : `${window.location.origin}${url}`);\n    return `${origin}${pathname}`;\n  } catch (error) {\n    return \"\";\n  }\n};\nexport {\n  getAnchorTarget\n};\n","import { useDeviceInfo } from \"./useDeviceInfo.js\";\nconst useCreateIsomorphicAppSchemeLink = (url) => {\n  const {\n    isWebview\n  } = useDeviceInfo();\n  return isWebview && url ? `app29cm://web/${url}` : url;\n};\nexport {\n  useCreateIsomorphicAppSchemeLink\n};\n"],"mappings":"oMAAwC,CAClC,EAAmB,GACnB,GAAU,EAGP,EAAa,EAAI,GAAK,EAAa,EAAO,SAAS,KAAK,CAFtD,QAEmE,SAExE,EAAgB,GAAQ,CAC5B,IAAM,EAAY,CAAC,EAAI,WAAW,IAAI,CACtC,GAAI,CACF,GAAM,CACJ,SACA,YACE,IAAI,IAAI,EAAY,EAAM,GAAG,EAAO,SAAS,SAAS,IAAM,CAChE,MAAO,GAAG,IAAS,SACL,CACd,MAAO,uBChBwC,CAC7C,EAAoC,GAAQ,CAChD,GAAM,CACJ,aACE,GAAe,CACnB,OAAO,GAAa,EAAM,iBAAiB,IAAQ"}