{"version":3,"file":"PathNameSync.VvjNb2I9.mjs","names":[],"sources":["https:/framerusercontent.com/modules/lRJoiQHBm42KfDFB3ksH/egFAmrb1rwtgKmqE6fEI/LinkRewriter.js","https:/framerusercontent.com/modules/Na4j2orU8gzi2xSJoo33/2lsGBO9SeBpoTF5bgMFp/PathNameSync.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";export function LinkRewriter(){useEffect(()=>{const baseUrl=\"https://sumsei.kr/adventure.html\";const rewriteLinks=()=>{const links=document.querySelectorAll(\"a[href]\");links.forEach(link=>{const originalHref=link.getAttribute(\"href\");if(!originalHref||/^https?:\\/\\//.test(originalHref))return;const match=originalHref.match(/\\/?([\\w-]+)$/);const detectedSlug=match?.[1];if(!detectedSlug)return;const isListPage=detectedSlug===\"adventure\";const newHref=isListPage?baseUrl:`${baseUrl}?slug=${encodeURIComponent(detectedSlug)}`;link.setAttribute(\"href\",newHref);});};// 최초 실행\nrewriteLinks();// DOM 변경 감지 후 다시 실행\nconst observer=new MutationObserver(()=>{rewriteLinks();});observer.observe(document.body,{childList:true,subtree:true});return()=>{observer.disconnect();};},[]);return /*#__PURE__*/_jsx(\"div\",{});}\nexport const __FramerMetadata__ = {\"exports\":{\"LinkRewriter\":{\"type\":\"reactComponent\",\"name\":\"LinkRewriter\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LinkRewriter.map","import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";export default function PathnameSync(){useEffect(()=>{const clickHandler=e=>{const anchor=e.target?.closest(\"a\");if(anchor){const href=anchor.getAttribute(\"href\");if(href){e.preventDefault();window.parent.postMessage({type:\"navigate\",href},\"*\");}}};document.body.addEventListener(\"click\",clickHandler);return()=>{document.body.removeEventListener(\"click\",clickHandler);};},[]);return /*#__PURE__*/_jsx(\"div\",{});}\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"PathnameSync\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./PathNameSync.map"],"mappings":"mMAAwE,SAAgB,GAAc,CAE4D,OAF3D,MAAc,CAAC,IAAM,EAAQ,mCAAyC,MAAiB,CAAa,SAAS,iBAAiB,UAAU,CAAO,QAAQ,GAAM,CAAC,IAAM,EAAa,EAAK,aAAa,OAAO,CAAC,GAAG,CAAC,GAAc,eAAe,KAAK,EAAa,CAAC,OAAsD,IAAM,EAAzC,EAAa,MAAM,eAAe,GAA4B,GAAG,GAAG,CAAC,EAAa,OAAmD,IAAM,EAAjC,IAAe,YAAqC,EAAQ,GAAG,EAAQ,QAAQ,mBAAmB,EAAa,GAAG,EAAK,aAAa,OAAO,EAAQ,EAAG,EACznB,GAAc,CACd,IAAM,EAAS,IAAI,qBAAqB,CAAC,GAAc,EAAG,CAA+D,OAA9D,EAAS,QAAQ,SAAS,KAAK,CAAC,UAAU,GAAK,QAAQ,GAAK,CAAC,KAAW,CAAC,EAAS,YAAY,GAAK,EAAE,CAAC,CAAqB,EAAK,MAAM,EAAE,CAAC,kBAFzJ,IAA6B,ICAA,SAAwB,GAAc,CAAmV,OAAlV,MAAc,CAAC,IAAM,EAAa,GAAG,CAAC,IAAM,EAAO,EAAE,QAAQ,QAAQ,IAAI,CAAC,GAAG,EAAO,CAAC,IAAM,EAAK,EAAO,aAAa,OAAO,CAAI,IAAM,EAAE,gBAAgB,CAAC,EAAO,OAAO,YAAY,CAAC,KAAK,WAAW,OAAK,CAAC,IAAI,IAA0D,OAArD,SAAS,KAAK,iBAAiB,QAAQ,EAAa,KAAW,CAAC,SAAS,KAAK,oBAAoB,QAAQ,EAAa,GAAK,EAAE,CAAC,CAAqB,EAAK,MAAM,EAAE,CAAC,sBAAxb,IAA6B"}