{"version":3,"file":"AddToCalendar.DM8XCoLG.mjs","names":["useState","useRef","useCallback","useMemo","startTransition","_Fragment","useLayoutEffect","useEffect","__esmMin","pe","init_npm_react_18_3_1","ne","init_ssg_sandbox_shims","navigator","window","te","le","init_npm_react_dom_18_3_1","l","_e","Ha","p","c","init_jsx_runtime","ce","de","useIsStaticRenderer","addPropertyControls","ControlType","init_framer_DKtAEkcX","pad","n","parseClock","raw","match","hour","minute","suffix","parseDay","text","iso","written","MONTHS","zonedTimeToInstant","guess","year","month","day","parts","TIME_ZONE","get","found","type","seenAsUtc","utcStamp","date","dayStamp","addDays","next","amount","fill","template","values","key","escapeIcs","value","foldIcsLine","encoder","line","current","used","char","size","limit","detectPlatform","desktop","ua","IN_APP_BROWSER","OTHER_IOS_BROWSER","helpText","platform","googleAppLink","webUrl","handoffUrl","url","HANDOFF_PARAM","openInSafari","left","onVisibility","onPageHide","resolve","copyText","area","ok","AddToCalendar","props","isStatic","open","setOpen","panel","setPanel","copied","setCopied","arrived","setArrived","setPlatform","rootRef","buttonRef","menuRef","anchorBox","setAnchorBox","menuSize","setMenuSize","alignRight","align","measure","button","r","onMove","plan","start","startTime","end","endTime","startAt","endAt","title","titleTemplate","city","venue","location","locationTemplate","description","notes","detailsUrl","googleHref","range","showKey","icsText","when","fileName","close","onPointerDown","root","menu","event","onKeyDown","downloadIcs","asDataUri","blob","anchor","showHelp","goToSafari","copyLink","handoffClaimed","params","query","useIsomorphicLayoutEffect","width","height","prev","buttonStyle","textColor","font","itemStyle","menuTextColor","menuFont","kind","onIOS","googleOption","googleLabel","options","icsLabel","help","noteStyle","smallButtonStyle","menuPortal","viewportH","viewportW","helpWidth","menuW","menuH","top","rawLeft","menuBackground","content","option","label","init_AddToCalendar"],"sources":["https:/framerusercontent.com/modules/S0WaixafFWBNWyAqruKR/KHIPf2s9F7vh0HGvwc5g/AddToCalendar.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useCallback,useEffect,useLayoutEffect,useMemo,useRef,useState,startTransition}from\"react\";import{createPortal}from\"react-dom\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";/**\n * Lets a visitor drop a show straight into their own calendar.\n *\n * Every Cardfest show happens in Washington, so the times below are read as\n * Pacific wall-clock and converted to a real instant before they go out. That\n * way a visitor in another timezone gets 10:00 AM Pacific in their calendar\n * rather than 10:00 AM wherever they happen to be.\n *\n * Bind `date`, `startTime`, `endTime`, `city`, `venue` and `detailsUrl` to the\n * matching Shows collection fields and the button fills itself in per show.\n * If a time field is empty or typo'd, the entry falls back to an all-day event\n * instead of shipping a wrong time.\n *\n * On phones the menu only offers what works in the visitor's browser — see\n * detectPlatform() below.\n */const TIME_ZONE=\"America/Los_Angeles\";function pad(n){return String(n).padStart(2,\"0\");}// Accepts \"10:00 AM\", \"10 AM\", \"10:00\", \"17:00\", \"5:30pm\".\nfunction parseClock(raw){if(!raw)return null;const match=raw.trim().match(/^(\\d{1,2})(?::(\\d{2}))?\\s*([ap]\\.?m\\.?)?$/i);if(!match)return null;let hour=Number(match[1]);const minute=match[2]?Number(match[2]):0;const suffix=match[3]?match[3].toLowerCase().replace(/\\./g,\"\"):\"\";if(suffix===\"pm\"&&hour<12)hour+=12;if(suffix===\"am\"&&hour===12)hour=0;if(hour>23||minute>59)return null;return{hour,minute};}const MONTHS=[\"jan\",\"feb\",\"mar\",\"apr\",\"may\",\"jun\",\"jul\",\"aug\",\"sep\",\"oct\",\"nov\",\"dec\"];// The CMS stores the show date at midnight UTC, so the UTC parts are the day.\n// A written date (\"October 24, 2026\") is accepted too, in case the value comes\n// in already formatted rather than as an ISO string.\nfunction parseDay(raw){if(!raw)return null;const text=String(raw);const iso=text.match(/^(\\d{4})-(\\d{2})-(\\d{2})/);if(iso)return{year:Number(iso[1]),month:Number(iso[2]),day:Number(iso[3])};const written=text.match(/(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)[a-z]*\\.?\\s+(\\d{1,2}),?\\s+(\\d{4})/i);if(!written)return null;return{year:Number(written[3]),month:MONTHS.indexOf(written[1].toLowerCase())+1,day:Number(written[2])};}// Turn a Pacific wall-clock time into the instant it actually happens, without\n// pulling in a timezone library — Intl already knows the DST rules.\nfunction zonedTimeToInstant(year,month,day,hour,minute){const guess=Date.UTC(year,month-1,day,hour,minute);const parts=new Intl.DateTimeFormat(\"en-US\",{timeZone:TIME_ZONE,hour12:false,year:\"numeric\",month:\"2-digit\",day:\"2-digit\",hour:\"2-digit\",minute:\"2-digit\",second:\"2-digit\"}).formatToParts(new Date(guess));const get=type=>{const found=parts.find(p=>p.type===type);return found?Number(found.value):0;};const seenAsUtc=Date.UTC(get(\"year\"),get(\"month\")-1,get(\"day\"),get(\"hour\")%24,get(\"minute\"),get(\"second\"));return new Date(guess-(seenAsUtc-guess));}function utcStamp(date){return`${date.getUTCFullYear()}${pad(date.getUTCMonth()+1)}${pad(date.getUTCDate())}`+`T${pad(date.getUTCHours())}${pad(date.getUTCMinutes())}00Z`;}function dayStamp(year,month,day){return`${year}${pad(month)}${pad(day)}`;}function addDays(year,month,day,amount){const next=new Date(Date.UTC(year,month-1,day+amount));return dayStamp(next.getUTCFullYear(),next.getUTCMonth()+1,next.getUTCDate());}function fill(template,values){return template.replace(/\\{(\\w+)\\}/g,(_,key)=>values[key]??\"\").replace(/\\s*,\\s*,/g,\",\").replace(/\\s{2,}/g,\" \").replace(/^[\\s,\\u2014-]+|[\\s,\\u2014-]+$/g,\"\").trim();}function escapeIcs(value){return value.replace(/\\\\/g,\"\\\\\\\\\").replace(/;/g,\"\\\\;\").replace(/,/g,\"\\\\,\").replace(/\\r?\\n/g,\"\\\\n\");}// RFC 5545 caps a content line at 75 octets; anything longer is folded onto\n// continuation lines that begin with a single space. Folding by character\n// rather than by byte keeps multi-byte characters (the em dash in the title)\n// from being split down the middle.\nfunction foldIcsLine(line){const encoder=new TextEncoder;if(encoder.encode(line).length<=75)return line;const parts=[];let current=\"\";let used=0;for(const char of line){const size=encoder.encode(char).length;// A continuation line spends one octet on its leading space.\nconst limit=parts.length===0?75:74;if(used+size>limit){parts.push(current);current=\"\";used=0;}current+=char;used+=size;}if(current)parts.push(current);return parts.join(\"\\r\\n \");}const IN_APP_BROWSER=/FBAN|FBAV|FB_IAB|FBIOS|Instagram|Barcelona|TikTok|musical_ly|Bytedance|Snapchat|LinkedInApp|Pinterest|Line\\/|KAKAOTALK|MicroMessenger/i;const OTHER_IOS_BROWSER=/CriOS|FxiOS|EdgiOS|OPiOS|OPT\\/|YaBrowser|DuckDuckGo|GSA\\/|Focus\\//i;function detectPlatform(){const desktop={kind:\"desktop\",os:\"other\",canOpenSafari:false};if(typeof navigator===\"undefined\")return desktop;const ua=navigator.userAgent||\"\";// iPadOS reports itself as a Mac; touch support gives it away.\nconst isIOS=/iPhone|iPad|iPod/.test(ua)||/Macintosh/.test(ua)&&(navigator.maxTouchPoints||0)>1;if(isIOS){// In-app browsers are bare WebKit views, and none carry Safari's \"Safari/\" token.\nif(IN_APP_BROWSER.test(ua)||!/Safari\\//.test(ua))return{kind:\"in-app\",os:\"ios\",canOpenSafari:false};if(OTHER_IOS_BROWSER.test(ua)){const major=Number((ua.match(/OS (\\d+)_/)||[])[1]||0);return{kind:\"ios-browser\",os:\"ios\",canOpenSafari:major>=17};}return{kind:\"ios-safari\",os:\"ios\",canOpenSafari:false};}if(/Android/i.test(ua)){// \"; wv)\" marks Android's embedded WebView, which apps use as their built-in browser.\nif(IN_APP_BROWSER.test(ua)||/; ?wv\\)/.test(ua))return{kind:\"in-app\",os:\"android\",canOpenSafari:false};return{kind:\"android\",os:\"android\",canOpenSafari:false};}return desktop;}// Directions for browsers that cannot reach a calendar themselves.\nfunction helpText(platform){if(platform&&platform.kind===\"in-app\"){return platform.os===\"ios\"?{title:\"Open this page in Safari\",body:\"This app's built-in browser can't add events to your calendar. Tap ••• at the top, choose Open in Safari (or Open in external browser), then tap Add to Calendar again.\"}:{title:\"Open this page in Chrome\",body:\"This app's built-in browser can't save calendar events. Tap ⋮ at the top, choose Open in Chrome (or Open in browser), then tap Add to Calendar again.\"};}return{title:\"Apple Calendar needs Safari\",body:\"On iPhone, only Safari can add events to Apple Calendar. Copy this link and paste it into Safari — the show will be ready to add.\"};}// On Android an intent:// link opens the Google Calendar app on the new event.\n// If the app is not installed, the browser goes to the web page instead.\nfunction googleAppLink(webUrl){return`intent://${webUrl.replace(/^https:\\/\\//,\"\")}`+`#Intent;scheme=https;package=com.google.android.calendar;`+`S.browser_fallback_url=${encodeURIComponent(webUrl)};end`;}// A page opened with ?add-to-calendar=<show key> opens that show's calendar\n// options on arrival. That is how a visitor sent over to Safari lands one tap\n// from Apple Calendar.\nconst HANDOFF_PARAM=\"add-to-calendar\";function handoffUrl(key){const url=new URL(window.location.href);url.searchParams.set(HANDOFF_PARAM,key);url.hash=\"\";return url.toString();}// Asks iOS to reopen `url` in Safari. Resolves false when the page is still on\n// screen two seconds later, which means nothing took it over.\nfunction openInSafari(url){return new Promise(resolve=>{let left=false;const onVisibility=()=>{if(document.visibilityState===\"hidden\")left=true;};const onPageHide=()=>{left=true;};document.addEventListener(\"visibilitychange\",onVisibility);window.addEventListener(\"pagehide\",onPageHide);window.setTimeout(()=>{document.removeEventListener(\"visibilitychange\",onVisibility);window.removeEventListener(\"pagehide\",onPageHide);resolve(left);},2e3);try{window.location.href=`x-safari-${url}`;}catch{// Refused outright; the timer reports it.\n}});}async function copyText(text){try{if(navigator.clipboard&&window.isSecureContext){await navigator.clipboard.writeText(text);return true;}}catch{// Fall through to the older copy path.\n}try{const area=document.createElement(\"textarea\");area.value=text;area.setAttribute(\"readonly\",\"\");area.style.position=\"fixed\";area.style.opacity=\"0\";document.body.appendChild(area);area.select();area.setSelectionRange(0,text.length);const ok=document.execCommand(\"copy\");document.body.removeChild(area);return ok;}catch{return false;}}// Framer can render a hidden copy of a list per breakpoint, so only one button\n// per page may answer a hand-off link.\nlet handoffClaimed=false;const useIsomorphicLayoutEffect=typeof window!==\"undefined\"?useLayoutEffect:useEffect;/**\n * @framerIntrinsicWidth 190\n * @framerIntrinsicHeight 44\n *\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function AddToCalendar(props){const{label,date,startTime,endTime,city,venue,detailsUrl,titleTemplate,locationTemplate,notes,googleLabel,icsLabel,font,menuFont,background,textColor,menuBackground,menuTextColor,borderRadius,padding,align}=props;const isStatic=useIsStaticRenderer();const[open,setOpen]=useState(false);// \"help\" swaps the options for directions, for browsers that cannot reach the calendar themselves.\nconst[panel,setPanel]=useState(\"options\");const[copied,setCopied]=useState(\"idle\");// True when the menu opened itself after a hand-off to Safari.\nconst[arrived,setArrived]=useState(false);// Read after mount, so the server-rendered HTML stays the same for everyone.\nconst[platform,setPlatform]=useState(null);const rootRef=useRef(null);const buttonRef=useRef(null);const menuRef=useRef(null);const[anchorBox,setAnchorBox]=useState(null);const[menuSize,setMenuSize]=useState(null);// Framer can hand this back as the option's title (\"Right\") rather than its value.\nconst alignRight=String(align??\"\").toLowerCase()===\"right\";useEffect(()=>{if(isStatic)return;setPlatform(detectPlatform());},[isStatic]);// The button sits inside Framer card and section frames that are all\n// `overflow: clip`, so a menu positioned within the component is cut off at\n// the card edge — on /shows only 12px of an 86px menu survived. Measuring\n// the button and rendering the menu through a portal on document.body puts\n// it outside every one of those clipping ancestors.\nconst measure=useCallback(()=>{const button=buttonRef.current;if(!button)return;const r=button.getBoundingClientRect();setAnchorBox({top:r.top,left:r.left,right:r.right,bottom:r.bottom});},[]);useEffect(()=>{if(isStatic||!open||typeof window===\"undefined\")return;measure();const onMove=()=>measure();window.addEventListener(\"scroll\",onMove,true);window.addEventListener(\"resize\",onMove);return()=>{window.removeEventListener(\"scroll\",onMove,true);window.removeEventListener(\"resize\",onMove);};},[isStatic,open,measure]);const plan=useMemo(()=>{const day=parseDay(date);if(!day)return null;const start=parseClock(startTime);const end=parseClock(endTime);if(!start||!end)return{allDay:true,day};const startAt=zonedTimeToInstant(day.year,day.month,day.day,start.hour,start.minute);let endAt=zonedTimeToInstant(day.year,day.month,day.day,end.hour,end.minute);// A typo'd end before the start would produce a negative event.\nif(endAt.getTime()<=startAt.getTime())endAt=new Date(startAt.getTime()+60*60*1e3);return{allDay:false,day,startAt,endAt};},[date,startTime,endTime]);const title=useMemo(()=>fill(titleTemplate,{city,venue}),[titleTemplate,city,venue]);const location=useMemo(()=>fill(locationTemplate,{city,venue}),[locationTemplate,city,venue]);const description=useMemo(()=>{const lines=[notes,detailsUrl].filter(Boolean);return lines.join(\"\\n\\n\");},[notes,detailsUrl]);const googleHref=useMemo(()=>{if(!plan)return\"\";const range=plan.allDay?`${dayStamp(plan.day.year,plan.day.month,plan.day.day)}/${addDays(plan.day.year,plan.day.month,plan.day.day,1)}`:`${utcStamp(plan.startAt)}/${utcStamp(plan.endAt)}`;const query=[\"action=TEMPLATE\",`text=${encodeURIComponent(title)}`,`dates=${range}`,`details=${encodeURIComponent(description)}`,`location=${encodeURIComponent(location)}`].join(\"&\");return`https://calendar.google.com/calendar/render?${query}`;},[plan,title,description,location]);// Names this show in a hand-off link and in the .ics UID.\nconst showKey=useMemo(()=>{if(!plan)return\"\";return`${dayStamp(plan.day.year,plan.day.month,plan.day.day)}-${(city||\"show\").toLowerCase().replace(/[^a-z0-9]+/g,\"-\")}`;},[plan,city]);const icsText=useMemo(()=>{if(!plan)return\"\";const when=plan.allDay?[`DTSTART;VALUE=DATE:${dayStamp(plan.day.year,plan.day.month,plan.day.day)}`,`DTEND;VALUE=DATE:${addDays(plan.day.year,plan.day.month,plan.day.day,1)}`]:[`DTSTART:${utcStamp(plan.startAt)}`,`DTEND:${utcStamp(plan.endAt)}`];const uid=`${showKey}@cardfestnw.com`;const lines=[\"BEGIN:VCALENDAR\",\"VERSION:2.0\",\"PRODID:-//Cardfest NW//Shows//EN\",\"CALSCALE:GREGORIAN\",\"METHOD:PUBLISH\",\"BEGIN:VEVENT\",`UID:${uid}`,`DTSTAMP:${utcStamp(new Date)}`,...when,`SUMMARY:${escapeIcs(title)}`,`LOCATION:${escapeIcs(location)}`,`DESCRIPTION:${escapeIcs(description)}`,detailsUrl?`URL:${escapeIcs(detailsUrl)}`:\"\",\"END:VEVENT\",\"END:VCALENDAR\"].filter(Boolean);return lines.map(foldIcsLine).join(\"\\r\\n\");},[plan,title,location,description,detailsUrl,showKey]);const fileName=useMemo(()=>{const slug=fill(\"{city}\",{city}).toLowerCase().replace(/[^a-z0-9]+/g,\"-\")||\"cardfest-show\";return`cardfest-${slug}.ics`;},[city]);const close=useCallback(()=>startTransition(()=>{setOpen(false);setPanel(\"options\");setCopied(\"idle\");setArrived(false);}),[]);// Clicking anywhere outside dismisses the menu; Escape does too.\nuseEffect(()=>{if(isStatic||!open||typeof document===\"undefined\")return;function onPointerDown(event){const root=rootRef.current;const menu=menuRef.current;if(!(event.target instanceof Node))return;// The menu lives in a portal now, so it is no longer inside the\n// root — both have to count as \"inside\" or clicking an item would\n// dismiss the menu before the item ever fires.\nconst inside=root&&root.contains(event.target)||menu&&menu.contains(event.target);if(!inside)close();}function onKeyDown(event){if(event.key===\"Escape\")close();}document.addEventListener(\"mousedown\",onPointerDown);document.addEventListener(\"touchstart\",onPointerDown);document.addEventListener(\"keydown\",onKeyDown);return()=>{document.removeEventListener(\"mousedown\",onPointerDown);document.removeEventListener(\"touchstart\",onPointerDown);document.removeEventListener(\"keydown\",onKeyDown);};},[isStatic,open,close]);const downloadIcs=useCallback(()=>{if(typeof window===\"undefined\"||!icsText)return;const asDataUri=()=>`data:text/calendar;charset=utf-8,${encodeURIComponent(icsText)}`;try{const blob=new Blob([icsText],{type:\"text/calendar;charset=utf-8\"});const url=URL.createObjectURL(blob);const anchor=document.createElement(\"a\");anchor.href=url;anchor.download=fileName;anchor.rel=\"noopener\";document.body.appendChild(anchor);anchor.click();document.body.removeChild(anchor);window.setTimeout(()=>URL.revokeObjectURL(url),1e4);}catch{window.open(asDataUri(),\"_blank\");}close();},[icsText,fileName,close]);const showHelp=useCallback(()=>{startTransition(()=>{setCopied(\"idle\");setPanel(\"help\");});},[]);// Chrome and the rest on iPhone: reopen this show in Safari, where Apple\n// Calendar takes the file. If the browser will not hand it over, explain.\nconst goToSafari=useCallback(()=>{if(typeof window===\"undefined\"||!showKey)return;if(!platform||!platform.canOpenSafari){showHelp();return;}void openInSafari(handoffUrl(showKey)).then(left=>{if(left)close();else showHelp();});},[platform,showKey,showHelp,close]);const copyLink=useCallback(()=>{if(typeof window===\"undefined\"||!showKey)return;void copyText(handoffUrl(showKey)).then(ok=>startTransition(()=>setCopied(ok?\"copied\":\"failed\")));},[showKey]);// Arriving from a hand-off link: bring this show's button on screen and open\n// its options, so the calendar is one tap away.\nuseEffect(()=>{if(isStatic||!showKey||handoffClaimed||typeof window===\"undefined\")return;const params=new URLSearchParams(window.location.search);if(params.get(HANDOFF_PARAM)!==showKey)return;const button=buttonRef.current;// A copy hidden for another breakpoint has no boxes; only the visible one answers.\nif(!button||button.getClientRects().length===0)return;handoffClaimed=true;params.delete(HANDOFF_PARAM);const query=params.toString();window.history.replaceState(window.history.state,\"\",`${window.location.pathname}${query?`?${query}`:\"\"}${window.location.hash}`);button.scrollIntoView({block:\"center\"});window.setTimeout(()=>{measure();startTransition(()=>{setArrived(true);setPanel(\"options\");setOpen(true);});},450);// The card may still be settling from its appear animation; re-anchor once it has.\nwindow.setTimeout(measure,1e3);window.setTimeout(measure,1600);},[isStatic,showKey,measure]);// The menu's size changes with the options and the help text, so it is\n// measured before paint to keep it on screen.\nuseIsomorphicLayoutEffect(()=>{if(!open)return;const menu=menuRef.current;if(!menu)return;const width=menu.offsetWidth;const height=menu.offsetHeight;setMenuSize(prev=>prev&&prev.width===width&&prev.height===height?prev:{width,height});},[open,panel,copied,arrived,platform,anchorBox]);// Nothing to offer without a date — better an absent button than a broken one.\nif(!plan)return null;const buttonStyle={appearance:\"none\",border:\"none\",cursor:\"pointer\",background,color:textColor,borderRadius,padding,display:\"inline-flex\",alignItems:\"center\",gap:8,whiteSpace:\"nowrap\",...font};const itemStyle={appearance:\"none\",border:\"none\",background:\"transparent\",color:menuTextColor,cursor:\"pointer\",textAlign:\"left\",padding:\"10px 14px\",width:\"100%\",display:\"block\",textDecoration:\"none\",whiteSpace:\"nowrap\",...menuFont};const MENU_WIDTH=190;const MENU_HEIGHT=92;const HELP_WIDTH=290;const GAP=8;// What this browser can actually do with each calendar. Until the platform\n// is known (and on desktop) it is the original pair.\nconst kind=platform?platform.kind:\"desktop\";const onIOS=platform?platform.os===\"ios\":false;const googleOption=kind===\"android\"?{key:\"google\",label:googleLabel,href:googleAppLink(googleHref)}:{key:\"google\",label:googleLabel,href:googleHref,newTab:true};let options;if(kind===\"ios-safari\"){options=[{key:\"apple\",label:\"Apple Calendar\",onSelect:downloadIcs},googleOption];}else if(kind===\"ios-browser\"){const note=platform&&platform.canOpenSafari?\"Opens in Safari\":\"Needs Safari\";options=[googleOption,{key:\"apple\",label:\"Apple Calendar\",note,onSelect:goToSafari}];}else if(kind===\"in-app\"){options=[googleOption,{key:\"other\",label:onIOS?\"Apple Calendar\":\"Other calendar app\",onSelect:showHelp}];}else if(kind===\"android\"){options=[googleOption,{key:\"other\",label:\"Other calendar app\",onSelect:downloadIcs}];}else{options=[googleOption,{key:\"ics\",label:icsLabel,onSelect:downloadIcs}];}const help=helpText(platform);const noteStyle={display:\"block\",fontSize:12,fontWeight:500,opacity:.65,marginTop:3};const smallButtonStyle={appearance:\"none\",cursor:\"pointer\",background:\"transparent\",color:menuTextColor,borderRadius,padding:\"9px 14px\",whiteSpace:\"nowrap\",...menuFont,fontSize:13};let menuPortal=null;if(open&&anchorBox&&!isStatic&&typeof document!==\"undefined\"){const viewportH=typeof window!==\"undefined\"?window.innerHeight:0;const viewportW=typeof window!==\"undefined\"?window.innerWidth:0;const helpWidth=Math.min(HELP_WIDTH,viewportW-16);const menuW=menuSize?menuSize.width:panel===\"help\"?helpWidth:MENU_WIDTH;const menuH=menuSize?menuSize.height:MENU_HEIGHT;// Drop upward when the button is close to the bottom of the screen.\nconst dropUp=anchorBox.bottom+GAP+menuH>viewportH&&anchorBox.top-GAP-menuH>0;const top=dropUp?anchorBox.top-GAP-menuH:anchorBox.bottom+GAP;const rawLeft=alignRight?anchorBox.right-menuW:anchorBox.left;// Keep it on screen on narrow phones.\nconst left=Math.max(8,Math.min(rawLeft,viewportW-menuW-8));menuPortal=/*#__PURE__*/createPortal(/*#__PURE__*/_jsx(\"div\",{ref:menuRef,role:panel===\"help\"?\"dialog\":\"menu\",\"aria-label\":panel===\"help\"?help.title:undefined,style:{position:\"fixed\",top,left,minWidth:MENU_WIDTH,width:panel===\"help\"?helpWidth:undefined,maxWidth:viewportW-16,boxSizing:\"border-box\",background:menuBackground,borderRadius,padding:panel===\"help\"?\"16px 16px 12px\":\"6px 0\",boxShadow:\"0 12px 30px rgba(0, 0, 0, 0.28)\",zIndex:2147483e3,overflow:\"hidden\"},children:panel===\"options\"?/*#__PURE__*/_jsxs(_Fragment,{children:[arrived&&/*#__PURE__*/_jsx(\"div\",{style:{...itemStyle,cursor:\"default\",paddingBottom:4,fontSize:12,opacity:.65},children:kind===\"ios-safari\"?\"Tap Apple Calendar to finish\":\"Choose your calendar\"}),options.map(option=>{const content=/*#__PURE__*/_jsxs(_Fragment,{children:[option.label,option.note&&/*#__PURE__*/_jsx(\"span\",{style:noteStyle,children:option.note})]});return option.href?/*#__PURE__*/_jsx(\"a\",{role:\"menuitem\",href:option.href,target:option.newTab?\"_blank\":undefined,rel:option.newTab?\"noopener noreferrer\":undefined,style:itemStyle,onClick:close,children:content},option.key):/*#__PURE__*/_jsx(\"button\",{role:\"menuitem\",type:\"button\",style:itemStyle,onClick:option.onSelect,children:content},option.key);})]}):/*#__PURE__*/_jsxs(\"div\",{style:{color:menuTextColor,...menuFont,whiteSpace:\"normal\"},children:[/*#__PURE__*/_jsx(\"strong\",{style:{display:\"block\",marginBottom:6},children:help.title}),/*#__PURE__*/_jsx(\"p\",{style:{margin:\"0 0 14px\",fontSize:13,fontWeight:500,lineHeight:1.45,opacity:.8},children:help.body}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",alignItems:\"center\",gap:6,flexWrap:\"wrap\"},children:[/*#__PURE__*/_jsx(\"button\",{type:\"button\",style:{...smallButtonStyle,border:`1px solid ${menuTextColor}`},onClick:copyLink,children:copied===\"copied\"?\"Link copied ✓\":\"Copy link\"}),/*#__PURE__*/_jsx(\"button\",{type:\"button\",style:{...smallButtonStyle,border:\"1px solid transparent\",opacity:.7},onClick:()=>startTransition(()=>setPanel(\"options\")),children:\"Back\"})]}),copied===\"failed\"&&// Copying can be blocked; leave the link where it can be selected by hand.\n/*#__PURE__*/_jsx(\"span\",{style:{display:\"block\",marginTop:12,fontSize:12,fontWeight:500,opacity:.7},children:\"Couldn't copy it. Press and hold the link to copy:\"}),copied===\"failed\"&&/*#__PURE__*/_jsx(\"input\",{readOnly:true,\"aria-label\":\"Link to this show\",value:handoffUrl(showKey),onFocus:event=>event.currentTarget.select(),style:{display:\"block\",width:\"100%\",boxSizing:\"border-box\",marginTop:6,padding:\"8px 10px\",borderRadius:6,border:`1px solid ${menuTextColor}`,background:\"transparent\",color:menuTextColor,// 16px keeps iOS from zooming the page when the field is focused.\nfontSize:16}})]})}),document.body);}return /*#__PURE__*/_jsxs(\"div\",{ref:rootRef,style:{position:\"relative\",display:\"inline-flex\",minWidth:\"max-content\",...props.style},children:[/*#__PURE__*/_jsxs(\"button\",{ref:buttonRef,type:\"button\",style:buttonStyle,\"aria-haspopup\":\"menu\",\"aria-expanded\":open,onClick:()=>{if(isStatic)return;measure();startTransition(()=>{setPanel(\"options\");setCopied(\"idle\");setArrived(false);setOpen(value=>!value);});},children:[/*#__PURE__*/_jsxs(\"svg\",{width:\"15\",height:\"15\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"currentColor\",strokeWidth:\"2.2\",\"aria-hidden\":\"true\",children:[/*#__PURE__*/_jsx(\"rect\",{x:\"3\",y:\"5\",width:\"18\",height:\"16\",rx:\"2.5\"}),/*#__PURE__*/_jsx(\"path\",{d:\"M8 3v4M16 3v4M3 10h18M12 14v4M10 16h4\"})]}),label]}),open&&menuPortal]});}addPropertyControls(AddToCalendar,{label:{type:ControlType.String,title:\"Label\",defaultValue:\"Add to Calendar\"},date:{type:ControlType.Date,title:\"Date\",defaultValue:\"2026-10-24T00:00:00.000Z\",description:\"Bind to the show's Date field.\"},startTime:{type:ControlType.String,title:\"Start Time\",defaultValue:\"10:00 AM\"},endTime:{type:ControlType.String,title:\"End Time\",defaultValue:\"5:00 PM\"},city:{type:ControlType.String,title:\"City\",defaultValue:\"Mount Vernon\"},venue:{type:ControlType.String,title:\"Venue\",defaultValue:\"Skagit County Fairgrounds\"},detailsUrl:{type:ControlType.String,title:\"Details URL\",defaultValue:\"https://cardfestnw.com/shows\"},titleTemplate:{type:ControlType.String,title:\"Event Title\",defaultValue:\"Cardfest NW — {city} Collectibles Show\",description:\"{city} and {venue} are filled in per show.\"},locationTemplate:{type:ControlType.String,title:\"Location\",defaultValue:\"{venue}, {city}, WA\"},notes:{type:ControlType.String,title:\"Notes\",defaultValue:\"Doors open at 10 AM for ELITE VIP badge holders. General admission from 12 PM.\",displayTextArea:true},googleLabel:{type:ControlType.String,title:\"Google Item\",defaultValue:\"Google Calendar\"},icsLabel:{type:ControlType.String,title:\"Apple Item\",defaultValue:\"Apple / Outlook\"},align:{type:ControlType.Enum,title:\"Menu Align\",options:[\"left\",\"right\"],optionTitles:[\"Left\",\"Right\"],defaultValue:\"left\",displaySegmentedControl:true},background:{type:ControlType.Color,title:\"Button Fill\",defaultValue:\"rgba(255, 255, 255, 0.1)\"},textColor:{type:ControlType.Color,title:\"Button Text\",defaultValue:\"#FFFFFF\"},menuBackground:{type:ControlType.Color,title:\"Menu Fill\",defaultValue:\"#12150F\"},menuTextColor:{type:ControlType.Color,title:\"Menu Text\",defaultValue:\"#FFFFFF\"},borderRadius:{type:ControlType.BorderRadius,title:\"Radius\",defaultValue:\"10px\"},padding:{type:ControlType.Padding,title:\"Padding\",defaultValue:\"13px 20px\"},font:{type:ControlType.Font,title:\"Button Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{variant:\"Extra Bold\",fontSize:\"14px\",letterSpacing:\"0em\",lineHeight:\"1em\"}},menuFont:{type:ControlType.Font,title:\"Menu Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{variant:\"Semibold\",fontSize:\"14px\",letterSpacing:\"0em\",lineHeight:\"1.2em\"}}});AddToCalendar.displayName=\"Add to Calendar\";\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"AddToCalendar\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerIntrinsicHeight\":\"44\",\"framerIntrinsicWidth\":\"190\",\"framerSupportedLayoutWidth\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./AddToCalendar.map"],"mappings":"A,iRAeyC,SAAS8B,EAAI,EAAE,CAAC,OAAO,OAAOC,CAAC,CAAC,CAAC,SAAS,EAAE,GAAG,CAAE,CAC1F,SAASC,GAAW,EAAI,CAAC,GAAG,CAACC,EAAI,OAAO,KAAK,IAAMC,EAAMD,EAAI,KAAK,CAAC,CAAC,MAAM,4CAA4C,EAAE,GAAG,CAACC,EAAM,OAAO,KAAK,IAAIC,EAAK,OAAOD,EAAM,EAAE,EAAQE,EAAOF,EAAM,GAAG,OAAOA,EAAM,EAAE,EAAE,EAAQG,EAAOH,EAAM,GAAGA,EAAM,EAAE,CAAC,YAAY,CAAC,CAAC,QAAQ,MAAM,EAAE,EAAE,GAA2G,OAArGG,IAAS,MAAMF,EAAK,KAAG,GAAM,IAAME,IAAS,MAAMF,IAAO,KAAG,EAAK,GAAKA,EAAK,IAAIC,EAAO,GAAU,KAAW,CAAC,OAAK,QAAM,CAAE,CAG/Y,SAASE,GAAS,EAAI,CAAC,GAAG,CAACL,EAAI,OAAO,KAAK,IAAMM,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