{"version":3,"file":"shared-lib.CyTip_Tf.mjs","names":["useState","useCallback","fonts","css","className"],"sources":["https:/framerusercontent.com/modules/udpCkPq4l4F2zlsnF0DE/GoyYygCaZacj0ToVGdYg/CookieBanner.js","https:/framerusercontent.com/modules/2lOlt8oqELkMY2cEPA1T/Hm6hMq1eIHOlSdB1SdwQ/aqM1bLPb6.js","https:/framerusercontent.com/modules/jgkzEktYSEOJ8bd7P7UE/jDXvqu3LJXs9XaQ4if15/RgSKOs3OR.js"],"sourcesContent":["// BYRNE YACHTS cookie banner: navy card with Accept / Decline buttons and a link to the privacy policy.\n// On the live site it floats at the bottom-left of the screen (full width minus a margin on phones),\n// wherever the instance sits on the page, so no positioning is needed in Framer. On the canvas it shows inline\n// and its buttons do nothing (so clicking it while editing never saves a choice).\n// Remembers the visitor's choice in localStorage (\"byrne-cookie-consent-v2\" = \"accepted\" | \"declined\")\n// so it is shown only once. Add ?cookies=reset to any page URL to clear the choice and see the banner again.\n// Meta Pixel: loaded ONLY when the visitor has accepted (now or on an earlier visit). Tracks PageView on each\n// page, and a \"Lead\" event when any form on the site is submitted (e.g. the /enquire form).\n// A \"byrne-cookie-consent\" window event is dispatched when the visitor chooses.\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useState,useCallback,startTransition}from\"react\";import{createPortal}from\"react-dom\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";const STORAGE_KEY=\"byrne-cookie-consent-v2\";// Loads the Meta Pixel once per page load, then records a PageView.\n// Also listens for form submissions site-wide and records a Lead.\nfunction startPixel(pixelId){if(typeof window===\"undefined\"||!pixelId)return;const w=window;if(!w.fbq){const n=function(...args){n.callMethod?n.callMethod.apply(n,args):n.queue.push(args);};n.push=n;n.loaded=true;n.version=\"2.0\";n.queue=[];w.fbq=n;w._fbq=n;const s=document.createElement(\"script\");s.async=true;s.src=\"https://connect.facebook.net/en_US/fbevents.js\";document.head.appendChild(s);}if(!w.__byrnePixelInit){w.fbq(\"init\",pixelId);w.__byrnePixelInit=true;document.addEventListener(\"submit\",()=>{try{w.fbq(\"track\",\"Lead\");}catch(e){// ignore\n}},true);}w.fbq(\"track\",\"PageView\");}/**\n * Cookie Banner\n *\n * @framerIntrinsicWidth 560\n * @framerIntrinsicHeight 120\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n */export default function CookieBanner(props){const{message,linkLabel,linkUrl,acceptLabel,declineLabel,pixelId,backgroundColor,textColor,linkColor,acceptColor,acceptTextColor,font,buttonFont,borderRadius}=props;const target=RenderTarget.current();const isCanvas=target===RenderTarget.canvas;// Hidden until we have checked storage, so returning visitors never see a flash\nconst[show,setShow]=useState(false);useEffect(()=>{if(isCanvas||typeof window===\"undefined\")return;let saved=null;try{if(window.location.search.indexOf(\"cookies=reset\")!==-1){window.localStorage.removeItem(STORAGE_KEY);}saved=window.localStorage.getItem(STORAGE_KEY);}catch(e){saved=null;}if(saved===\"accepted\")startPixel(pixelId);if(!saved)startTransition(()=>setShow(true));},[isCanvas,pixelId]);const choose=useCallback(value=>{if(isCanvas)return;if(typeof window!==\"undefined\"){try{window.localStorage.setItem(STORAGE_KEY,value);}catch(e){// storage blocked: just hide for this visit\n}if(value===\"accepted\")startPixel(pixelId);window.dispatchEvent(new CustomEvent(\"byrne-cookie-consent\",{detail:value}));}startTransition(()=>setShow(false));},[isCanvas,pixelId]);if(target===RenderTarget.thumbnail)return null;const fontFamily='\"Manrope\", \"Manrope Placeholder\", sans-serif';const buttonBase={...buttonFont,fontFamily,flex:\"1 1 auto\",borderRadius:999,padding:\"12px 22px\",cursor:\"pointer\",whiteSpace:\"nowrap\",minWidth:\"max-content\"};const card=/*#__PURE__*/_jsxs(\"div\",{role:\"dialog\",\"aria-live\":\"polite\",\"aria-label\":\"Cookie consent\",style:{position:\"relative\",boxSizing:\"border-box\",width:\"100%\",background:backgroundColor,color:textColor,borderRadius,display:\"flex\",flexWrap:\"wrap\",alignItems:\"center\",justifyContent:\"space-between\",gap:16,padding:\"20px 22px\",boxShadow:\"0 12px 40px rgba(6, 24, 43, 0.35)\",border:\"1px solid rgba(255,255,255,0.12)\"},children:[/*#__PURE__*/_jsxs(\"p\",{style:{...font,fontFamily,margin:0,flex:\"1 1 240px\",color:textColor},children:[message,\" \",/*#__PURE__*/_jsx(\"a\",{href:linkUrl,style:{color:linkColor,textDecoration:\"underline\",textUnderlineOffset:3},children:linkLabel})]}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",gap:10,flex:\"0 1 auto\"},children:[/*#__PURE__*/_jsx(\"button\",{type:\"button\",onClick:()=>choose(\"declined\"),style:{...buttonBase,background:\"transparent\",color:textColor,border:\"1px solid rgba(255,255,255,0.35)\"},children:declineLabel}),/*#__PURE__*/_jsx(\"button\",{type:\"button\",onClick:()=>choose(\"accepted\"),style:{...buttonBase,background:acceptColor,color:acceptTextColor,border:`1px solid ${acceptColor}`},children:acceptLabel})]})]});// Canvas: show inline (up to 560px wide, narrower in the phone layout) so it can be seen and edited\nif(isCanvas){return /*#__PURE__*/_jsx(\"div\",{style:{...props.style,position:\"relative\",width:\"100%\",maxWidth:560},children:card});}// Live site / preview: float over the page at the bottom-left\nif(!show||typeof document===\"undefined\"){return /*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",width:0,height:0}});}return /*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",width:0,height:0},children:/*#__PURE__*/createPortal(/*#__PURE__*/_jsx(\"div\",{style:{position:\"fixed\",left:16,right:16,bottom:16,zIndex:2147483e3,maxWidth:560},children:card}),document.body)});}addPropertyControls(CookieBanner,{message:{type:ControlType.String,title:\"Message\",defaultValue:\"We use cookies to improve the site and measure our ads.\",displayTextArea:true},linkLabel:{type:ControlType.String,title:\"Link Label\",defaultValue:\"Privacy policy\"},linkUrl:{type:ControlType.Link,title:\"Link\",defaultValue:\"/privacy\"},acceptLabel:{type:ControlType.String,title:\"Accept Label\",defaultValue:\"Accept\"},declineLabel:{type:ControlType.String,title:\"Decline Label\",defaultValue:\"Decline\"},pixelId:{type:ControlType.String,title:\"Meta Pixel ID\",defaultValue:\"1467684365276716\"},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#06182B\"},textColor:{type:ControlType.Color,title:\"Text\",defaultValue:\"#FFFFFF\"},linkColor:{type:ControlType.Color,title:\"Link Color\",defaultValue:\"#A9BCCF\"},acceptColor:{type:ControlType.Color,title:\"Accept Button\",defaultValue:\"#FFFFFF\"},acceptTextColor:{type:ControlType.Color,title:\"Accept Text\",defaultValue:\"#06182B\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{variant:\"Regular\",fontSize:\"14px\",letterSpacing:\"0em\",lineHeight:\"1.5em\"}},buttonFont:{type:ControlType.Font,title:\"Button Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{variant:\"Semibold\",fontSize:\"14px\",letterSpacing:\"0em\",lineHeight:\"1em\"}},borderRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:20,min:0,max:40}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CookieBanner\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"560\",\"framerIntrinsicHeight\":\"120\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CookieBanner.map","// Generated by Framer (0da2bc6)\nimport{fontStore}from\"framer\";fontStore.loadFonts([\"GF;Manrope-600\",\"GF;Manrope-700\"]);export const fonts=[{explicitInter:true,fonts:[{cssFamilyName:\"Manrope\",openType:true,source:\"google\",style:\"normal\",uiFamilyName:\"Manrope\",url:\"https://fonts.gstatic.com/s/manrope/v20/xn7_YHE41ni1AdIRqAuZuw1Bx9mbZk4jE-_A87jxeN7B.woff2\",weight:\"600\"},{cssFamilyName:\"Manrope\",openType:true,source:\"google\",style:\"normal\",uiFamilyName:\"Manrope\",url:\"https://fonts.gstatic.com/s/manrope/v20/xn7_YHE41ni1AdIRqAuZuw1Bx9mbZk4aE-_A87jxeN7B.woff2\",weight:\"700\"}]}];export const css=[\".framer-EuHPf .framer-styles-preset-1fq81qg:not(.rich-text-wrapper), .framer-EuHPf .framer-styles-preset-1fq81qg.rich-text-wrapper p { --framer-font-family: \\\"Manrope\\\", \\\"Manrope Placeholder\\\", sans-serif; --framer-font-family-bold: \\\"Manrope\\\", \\\"Manrope Placeholder\\\", sans-serif; --framer-font-open-type-features: 'blwf' on, 'cv03' on, 'cv04' on, 'cv09' on, 'cv11' on; --framer-font-size: 16px; --framer-font-style: normal; --framer-font-style-bold: normal; --framer-font-variation-axes: normal; --framer-font-weight: 600; --framer-font-weight-bold: 700; --framer-letter-spacing: 0em; --framer-line-height: 1.2em; --framer-paragraph-spacing: 20px; --framer-text-alignment: start; --framer-text-color: #ffffff; --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; }\"];export const className=\"framer-EuHPf\";\nexport const __FramerMetadata__ = {\"exports\":{\"css\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"className\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"fonts\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","// Generated by Framer (0da2bc6)\nimport{fontStore}from\"framer\";fontStore.loadFonts([\"GF;Manrope-600\",\"GF;Manrope-700\"]);export const fonts=[{explicitInter:true,fonts:[{cssFamilyName:\"Manrope\",openType:true,source:\"google\",style:\"normal\",uiFamilyName:\"Manrope\",url:\"https://fonts.gstatic.com/s/manrope/v20/xn7_YHE41ni1AdIRqAuZuw1Bx9mbZk4jE-_A87jxeN7B.woff2\",weight:\"600\"},{cssFamilyName:\"Manrope\",openType:true,source:\"google\",style:\"normal\",uiFamilyName:\"Manrope\",url:\"https://fonts.gstatic.com/s/manrope/v20/xn7_YHE41ni1AdIRqAuZuw1Bx9mbZk4aE-_A87jxeN7B.woff2\",weight:\"700\"}]}];export const css=[\".framer-AWcke .framer-styles-preset-1kr0v12:not(.rich-text-wrapper), .framer-AWcke .framer-styles-preset-1kr0v12.rich-text-wrapper p { --framer-font-family: \\\"Manrope\\\", \\\"Manrope Placeholder\\\", sans-serif; --framer-font-family-bold: \\\"Manrope\\\", \\\"Manrope Placeholder\\\", sans-serif; --framer-font-open-type-features: 'blwf' on, 'cv03' on, 'cv04' on, 'cv09' on, 'cv11' on; --framer-font-size: 15px; --framer-font-style: normal; --framer-font-style-bold: normal; --framer-font-variation-axes: normal; --framer-font-weight: 600; --framer-font-weight-bold: 700; --framer-letter-spacing: 0.32em; --framer-line-height: 1.2em; --framer-paragraph-spacing: 20px; --framer-text-alignment: start; --framer-text-color: #ffffff; --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; }\"];export const className=\"framer-AWcke\";\nexport const __FramerMetadata__ = {\"exports\":{\"css\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"className\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"fonts\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"2OAWA,SAAS,EAAW,EAAQ,CAAC,GAAU,IAAS,QAAa,CAAC,EAAQ,OAAO,IAAM,EAAE,EAAO,GAAG,CAAC,EAAE,IAAI,CAAC,IAAM,EAAE,SAAS,GAAG,EAAK,CAAC,EAAE,WAAW,EAAE,WAAW,MAAM,EAAE,CAAI,EAAE,EAAE,MAAM,KAAK,CAAI,CAAE,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,GAAK,EAAE,QAAQ,MAAM,EAAE,MAAM,CAAC,EAAE,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,IAAM,EA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