{"version":3,"file":"PageAddress.Cb-Po9FU.mjs","names":["useState","Framer.useRouter","__esmMin","init_npm_react_18_3_1","window","_e","p","c","init_jsx_runtime","ce","init_ssg_sandbox_shims","addPropertyControls","init_framer_D6uXRwWs","useRouter","ControlType","routePath","path","router","vars","k","PageAddress","props","hover","setHover","useRouterSafe","base","siteAddress","url","setUrl","fontSize","leadIn","linkColor","init_PageAddress"],"sources":["https:/framerusercontent.com/modules/tQt5Dt2OHBv8fOP1U2PB/OdtnF3UzCwO9tZtVOYX1/PageAddress.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";import*as Framer from\"framer\";import{addPropertyControls,ControlType}from\"framer\";// Framer's router hook (used by its own pages; not in the public types)\nconst useRouterSafe=Framer.useRouter||(()=>null);/**\n * Page address: shows a lead-in and this page's own address (origin + path,\n * no query), e.g. \"Here's the page: https://richardrussell.co/coaching\".\n * Sits under the line to paste, in the same text style; the address is a\n * blue, underlined link (blue = clickable in the brand).\n *\n * The first render (the HTML that link previews, search engines and AI tools\n * read) builds the path from the page's own route, on the site address set\n * below. In the browser it then switches to the real address, so the test\n * site shows its own domain.\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */function routePath(router){try{const route=router?.routes?.[router?.currentRouteId];let path=route?.path||\"\";const vars=router?.currentPathVariables||{};path=path.replace(/:([A-Za-z0-9_]+)/g,(_m,k)=>vars[k]!=null?String(vars[k]):\"\");return path.startsWith(\"/\")?path:\"\";}catch(e){return\"\";}}export default function PageAddress(props){const{leadIn,color,linkColor,fontSize,siteAddress}=props;const[hover,setHover]=useState(false);const router=useRouterSafe();const base=String(siteAddress||\"https://richardrussell.co\").replace(/\\/+$/,\"\");const path=routePath(router)||\"/\";const[url,setUrl]=useState(base+path);useEffect(()=>{if(typeof window!==\"undefined\")setUrl(window.location.origin+window.location.pathname);},[path]);return /*#__PURE__*/_jsxs(\"p\",{style:{margin:0,width:\"100%\",font:`400 ${fontSize}px/1.55 \"Inter\", \"Inter Placeholder\", sans-serif`,color,overflowWrap:\"anywhere\"},children:[leadIn,leadIn?\" \":\"\",/*#__PURE__*/_jsx(\"a\",{href:url,onMouseEnter:()=>setHover(true),onMouseLeave:()=>setHover(false),style:{color:linkColor,textDecoration:\"underline\",textDecorationThickness:hover?\"2px\":\"1px\",textUnderlineOffset:\"3px\"},children:url})]});}PageAddress.defaultProps={leadIn:\"Here's the page:\",color:\"#1F1F1F\",linkColor:\"#1A64F0\",fontSize:17,siteAddress:\"https://richardrussell.co\"};addPropertyControls(PageAddress,{leadIn:{type:ControlType.String,title:\"Lead-in\"},color:{type:ControlType.Color,title:\"Color\"},linkColor:{type:ControlType.Color,title:\"Link color\"},fontSize:{type:ControlType.Number,title:\"Size\",min:12,max:24,step:1},siteAddress:{type:ControlType.String,title:\"Site address\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"PageAddress\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./PageAddress.map"],"mappings":"A,8MAcG,SAASe,EAAU,EAAO,CAAC,GAAG,CAAsD,IAAIC,EAA7CC,GAAQ,SAASA,GAAQ,eAAA,EAAgC,MAAM,GAASC,EAAKD,GAAQ,sBAAsB,CAAC,EAAkF,MAAhF,GAAKD,EAAK,QAAQ,qBAAqB,EAAG,IAAIE,EAAKC,IAAI,KAAqB,GAAhB,OAAOD,EAAKC,EAAE,CAAI,EAASH,EAAK,WAAW,GAAG,EAAEA,EAAK,EAAG,MAAS,CAAC,MAAM,EAAG,CAAC,CAAC,SAAwBI,EAAY,EAAM,CAAC,GAAK,CAAC,SAAO,QAAM,YAAU,WAAS,eAAaC,EAAW,CAACC,EAAMC,GAAUvB,EAAS,EAAK,EAAQiB,EAAOO,EAAc,EAAQC,EAAK,OAAOC,GAAa,2BAA2B,CAAC,CAAC,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