{"version":3,"file":"VenueMapEmbed.SCSpWYAL.mjs","names":["useMemo"],"sources":["https:/framerusercontent.com/modules/zrRsjf5tgvXc2Y9d3mIX/Ztd7q2RbgSXyUHbZxD8F/VenueMapEmbed.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useMemo}from\"react\";/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function VenueMapEmbed(props){const{address,zoom,mapUrl,googleEmbedURL,tintColor,tintStrength,grayscale,radius,filterStrength,filter,title,style}=props;const src=useMemo(()=>{const fallbackAddress=\"615 Sacramento St., San Francisco, CA 94111\";const safeAddress=(address||\"\").trim()||fallbackAddress;const encodedAddress=encodeURIComponent(safeAddress);const safeZoom=Math.max(1,Math.min(21,Math.round(zoom)));const addressEmbedUrl=`https://maps.google.com/maps?q=${encodedAddress}&z=${safeZoom}&output=embed`;const manualUrl=(mapUrl||googleEmbedURL||\"\").trim();if(!manualUrl)return addressEmbedUrl;const normalizedManualUrl=manualUrl.toLowerCase();const isClearlyEmbeddable=normalizedManualUrl.includes(\"output=embed\")||normalizedManualUrl.includes(\"/maps/embed\");if(isClearlyEmbeddable)return manualUrl;return addressEmbedUrl;},[address,zoom,mapUrl,googleEmbedURL]);const resolvedTintStrength=useMemo(()=>{if(typeof tintStrength===\"number\")return tintStrength;if(typeof filterStrength===\"number\")return filterStrength;if(typeof filter===\"number\")return filter;return 52;},[tintStrength,filterStrength,filter]);const iframeFilter=useMemo(()=>{const clampedGray=Math.max(0,Math.min(100,grayscale));const normalizedTint=Math.max(0,Math.min(100,resolvedTintStrength))/100;const contrast=92+normalizedTint*8;const brightness=108+normalizedTint*8;const saturation=82-normalizedTint*30;return`grayscale(${clampedGray}%) contrast(${contrast}%) brightness(${brightness}%) saturate(${saturation}%)`;},[grayscale,resolvedTintStrength]);const colorOverlayOpacity=useMemo(()=>{const normalizedTint=Math.max(0,Math.min(100,resolvedTintStrength))/100;return .16+normalizedTint*.24;},[resolvedTintStrength]);const softLightOpacity=useMemo(()=>{const normalizedTint=Math.max(0,Math.min(100,resolvedTintStrength))/100;return .1+normalizedTint*.16;},[resolvedTintStrength]);return /*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",width:\"100%\",height:\"100%\",overflow:\"hidden\",borderRadius:radius,...style},children:[/*#__PURE__*/_jsx(\"iframe\",{title:title,src:src,style:{width:\"100%\",height:\"100%\",border:0,display:\"block\",filter:iframeFilter},loading:\"lazy\",allowFullScreen:true,referrerPolicy:\"no-referrer-when-downgrade\"}),/*#__PURE__*/_jsx(\"div\",{\"aria-hidden\":true,style:{position:\"absolute\",inset:0,pointerEvents:\"none\",background:tintColor,opacity:colorOverlayOpacity,mixBlendMode:\"color\"}}),/*#__PURE__*/_jsx(\"div\",{\"aria-hidden\":true,style:{position:\"absolute\",inset:0,pointerEvents:\"none\",background:tintColor,opacity:softLightOpacity,mixBlendMode:\"soft-light\"}})]});}addPropertyControls(VenueMapEmbed,{address:{type:ControlType.String,title:\"Address\",defaultValue:\"615 Sacramento St., San Francisco, CA 94111\"},zoom:{type:ControlType.Number,title:\"Zoom\",min:1,max:21,step:1,defaultValue:15},mapUrl:{type:ControlType.String,title:\"Google Embed URL\",description:\"Leave blank to auto-build from Address and Zoom.\",placeholder:\"Leave blank to auto-build\",defaultValue:\"\"},googleEmbedURL:{type:ControlType.String,title:\"Legacy Google Embed URL\",defaultValue:\"\",hidden:()=>true},tintColor:{type:ControlType.Color,title:\"Tint Color\",defaultValue:\"#C2DDF8\"},tintStrength:{type:ControlType.Number,title:\"Tint Strength\",min:0,max:100,step:1,defaultValue:58},grayscale:{type:ControlType.Number,title:\"Grayscale\",min:0,max:100,step:1,defaultValue:72},radius:{type:ControlType.Number,title:\"Radius\",min:0,max:80,step:1,defaultValue:16,unit:\"px\"},filterStrength:{type:ControlType.Number,title:\"Legacy Filter\",min:0,max:100,step:1,defaultValue:55,hidden:()=>true},filter:{type:ControlType.Number,title:\"Legacy Filter 2\",min:0,max:100,step:1,defaultValue:55,hidden:()=>true},title:{type:ControlType.String,title:\"Title\",defaultValue:\"Venue map\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"VenueMapEmbed\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./VenueMapEmbed.map"],"mappings":"iLAGG,SAAwB,EAAc,EAAM,CAAC,GAAK,CAAC,UAAQ,OAAK,SAAO,iBAAe,YAAU,eAAa,YAAU,SAAO,iBAAe,SAAO,QAAM,SAAO,EAAY,EAAIA,MAAY,CAAqE,IAAM,GAAa,GAAS,GAAA,CAAI,KAAK,GAAG,8CAAoI,EAAgB,kCAA/G,mBAAmB,CAA2I,EAAE,KAAjH,KAAK,IAAI,EAAE,KAAK,IAAI,GAAG,KAAK,MAAM,CAAI,CAAC,CAAsF,EAAE,eAAqB,GAAW,GAAQ,GAAgB,GAAA,CAAI,KAAK,EAAE,GAAG,CAAC,EAAU,OAAO,EAAgB,IAAM,EAAoB,EAAU,YAAY,EAA8J,OAAlI,EAAoB,SAAS,cAAc,GAAG,EAAoB,SAAS,aAAa,EAAgC,EAAiB,CAAgB,EAAE,CAAC,EAAQ,EAAK,EAAO,CAAc,CAAC,EAAQ,EAAqBA,MAAgB,OAAO,GAAe,SAAgB,EAAgB,OAAO,GAAiB,SAAgB,EAAkB,OAAO,GAAS,SAAgB,EAAc,GAAK,CAAC,EAAa,EAAe,CAAM,CAAC,EAAQ,EAAaA,MAAY,CAAC,IAAM,EAAY,KAAK,IAAI,EAAE,KAAK,IAAI,IAAI,CAAS,CAAC,EAAQ,EAAe,KAAK,IAAI,EAAE,KAAK,IAAI,IAAI,CAAoB,CAAC,EAAE,IAAmH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