{"version":3,"file":"CMSCardStack.DdiASJUT.mjs","names":["Fragment","Children","isValidElement","useState","useRef","startTransition","__esmMin","z","init_ssg_sandbox_shims","te","x","j","_e","de","K","c","p","init_npm_react_18_3_1","ce","window","motion","useMotionValue","animate","init_framer_motion_DhsWWWsN","addPropertyControls","init_framer_BL70qLPA","useIsStaticRenderer","ControlType","pad","value","today","now","parts","TIME_ZONE","get","part","type","isPast","match","DATE_PATTERN","text","month","MONTHS","flattenItems","node","withCollectionItems","props","original","args","render","child","found","CMSCardStack","settings","splitCards","scaleStep","layers","slides","Stack","content","list","layer","keyed","item","allItems","isStatic","pastKeys","setPastKeys","slideRefs","items","hidePast","index","shownCount","check","slide","key","added","keys","timer","PAST_CHECK_MS","front","setFrontState","savedFront","label","setFront","next","f","draggedIndex","setDraggedIndex","dragX","gesture","justSwiped","count","shown","CHANGE_EVENT","onGo","detail","GO_EVENT","current","behind","MAX_VISIBLE_BEHIND","go","step","onPointerDown","onPointerMove","g","dx","dy","SWIPE_SLOP","dt","onPointerEnd","offset","SWIPE_DISTANCE","SWIPE_VELOCITY","SPRING","peek","depth","isFront","visibleDepth","hidden","cardRatio","radius","SPLIT_DIM_STEP","DIM_STEP","showDots","active","dotColor","init_CMSCardStack","init_jsx_runtime"],"sources":["https:/framerusercontent.com/modules/lFD7xjA9IFRqKzLFjA6y/x1Q1DkR9m5N38qUGAAVk/CMSCardStack.js"],"sourcesContent":["// Swipeable, looping stack of cards taken from a connected Collection List (or\n// any layers, which are stretched to the stack's width). Cards behind the front one peek out on the right; swipe left for\n// the next card, right for the previous. Taps on the front card still reach the\n// card's own interactions, e.g. opening an overlay.\n//\n// \"Hide Past\" leaves out cards whose text shows a date that is over, e.g. a\n// session on \"October 17, 2026\" drops out of the stack the day after.\n//\n// \"Split Cards\" is for cards made of separate pieces with a gap between them,\n// e.g. a photo above a text card. The pieces still slide as one card.\n//\n// Swiping is tracked with plain pointer events instead of Motion's drag: a tap\n// gesture that ends while a Motion drag is active is never released, which would\n// leave the card's own tap interaction dead after its first swipe.\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{Children,Fragment,cloneElement,isValidElement,useEffect,useRef,useState,startTransition}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{animate,motion,useMotionValue}from\"framer-motion\";const SWIPE_DISTANCE=60;const SWIPE_VELOCITY=400;const SWIPE_SLOP=8;const SPRING={type:\"spring\",stiffness:320,damping:32};const MAX_VISIBLE_BEHIND=2;// How much darker each card behind the front one is\nconst DIM_STEP=.05;const SPLIT_DIM_STEP=.14;// Window events: \"change\" is sent with { label, index } whenever the front card\n// changes; send \"go\" with the same detail to bring a card to the front\nconst CHANGE_EVENT=\"cardstack:change\";const GO_EVENT=\"cardstack:go\";// \"Hide Past\": a card is over when the first \"Month D, YYYY\" in its text is\n// before today in New York\nconst TIME_ZONE=\"America/New_York\";const PAST_CHECK_MS=10*60*1e3;const MONTHS=[\"january\",\"february\",\"march\",\"april\",\"may\",\"june\",\"july\",\"august\",\"september\",\"october\",\"november\",\"december\"];const DATE_PATTERN=new RegExp(`(${MONTHS.join(\"|\")})\\\\s+(\\\\d{1,2}),\\\\s+(\\\\d{4})`,\"i\");function pad(value){return value<10?`0${value}`:String(value);}// Today's date in New York as \"2026-10-17\"\nfunction today(){const now=new Date;try{const parts=new Intl.DateTimeFormat(\"en-US\",{timeZone:TIME_ZONE,year:\"numeric\",month:\"2-digit\",day:\"2-digit\"}).formatToParts(now);const get=type=>parts.find(part=>part.type===type)?.value??\"\";const value=`${get(\"year\")}-${get(\"month\")}-${get(\"day\")}`;if(/^\\d{4}-\\d{2}-\\d{2}$/.test(value))return value;}catch{}return`${now.getFullYear()}-${pad(now.getMonth()+1)}-${pad(now.getDate())}`;}function isPast(text){const match=DATE_PATTERN.exec(text);if(!match)return false;const month=MONTHS.indexOf(match[1].toLowerCase())+1;return`${match[3]}-${pad(month)}-${pad(Number(match[2]))}`<today();}// Front card per stack label, so a stack that re-mounts (e.g. when a tap on a\n// card switches the surrounding component's variant) keeps showing that card\nconst savedFront=new Map;function flattenItems(node){if(Array.isArray(node))return node.flatMap(flattenItems);if(!/*#__PURE__*/isValidElement(node))return[];if(node.type===Fragment)return flattenItems(node.props.children);return[node];}// A connected Collection List arrives as one element. Its items are rendered by\n// a descendant that loads the CMS data and calls a function child. Rebuild that\n// chain (minus the list's own layout wrapper) with a function that passes the\n// rendered items to `render` instead of laying them out.\nfunction withCollectionItems(node,render){if(!/*#__PURE__*/isValidElement(node))return null;const props=node.props;if(typeof props.children===\"function\"&&props.query){const original=props.children;return /*#__PURE__*/cloneElement(node,{children:(...args)=>render(flattenItems(original(...args)))});}for(const child of Children.toArray(props.children)){const found=withCollectionItems(child,render);if(found)return /*#__PURE__*/cloneElement(node,{},found);}return null;}/**\n * CMS Card Stack\n *\n * @framerIntrinsicWidth 342\n * @framerIntrinsicHeight 640\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function CMSCardStack(props){const{slides,peek=14,scaleStep=.06,radius=20,showDots=true,dotColor=\"#08547A\",label=\"Cards\",cardRatio=0,hidePast=false,splitCards=false}=props;const settings={peek,// Shrunk back cards would show through the gaps of the card in front\nscaleStep:splitCards?0:scaleStep,radius,showDots,dotColor,label,cardRatio,hidePast,splitCards};const layers=Children.toArray(slides);const render=items=>/*#__PURE__*/_jsx(Stack,{items:items,...settings});let content=null;const list=layers.length===1?layers[0]:null;if(list&&/*#__PURE__*/isValidElement(list)){content=withCollectionItems(list.props.children,render);}if(!content){// Plain layers keep their canvas size, so stretch them to the stack's width\nconst cards=layers.filter(isValidElement).map(layer=>/*#__PURE__*/cloneElement(layer,{style:{...layer.props.style,width:\"100%\",height:\"100%\"}}));content=render(cards);}// Isolate so the cards' z-indexes only order them against each other and\n// never lift them above page elements such as a sticky header\nreturn /*#__PURE__*/_jsx(\"div\",{style:{...props.style,position:\"relative\",width:\"100%\",isolation:\"isolate\"},children:content});}function Stack(props){const{peek,scaleStep,radius,showDots,dotColor,label,cardRatio,hidePast,splitCards}=props;// Drop non-item output such as a hidden empty state\nconst keyed=props.items.filter(item=>item.key!=null);const allItems=keyed.length>0?keyed:props.items;const isStatic=useIsStaticRenderer();// Keys of the cards found to be over; they leave the stack for good\nconst[pastKeys,setPastKeys]=useState([]);const slideRefs=useRef(new Map);const items=hidePast&&pastKeys.length>0?allItems.filter((item,index)=>!pastKeys.includes(String(item.key??index))):allItems;const shownCount=items.length;useEffect(()=>{if(!hidePast||isStatic)return;const check=()=>{const found=[];slideRefs.current.forEach((slide,key)=>{if(isPast(slide.textContent||\"\"))found.push(key);});if(found.length===0)return;startTransition(()=>setPastKeys(keys=>{const added=found.filter(key=>!keys.includes(key));return added.length>0?[...keys,...added]:keys;}));};check();// A day can end while the page is open\nconst timer=window.setInterval(check,PAST_CHECK_MS);return()=>window.clearInterval(timer);},[hidePast,isStatic,shownCount]);const[front,setFrontState]=useState(()=>savedFront.get(label)??0);function setFront(next){setFrontState(f=>{const value=typeof next===\"function\"?next(f):next;savedFront.set(label,value);return value;});}const[draggedIndex,setDraggedIndex]=useState(null);const dragX=useMotionValue(0);const gesture=useRef(null);const justSwiped=useRef(false);const count=items.length;const shown=count>0?front%count:0;// Lets other layers follow the stack, e.g. a row of tabs: the stack announces\n// its front card, and brings a card forward when asked to by its label\nuseEffect(()=>{if(isStatic)return;window.dispatchEvent(new CustomEvent(CHANGE_EVENT,{detail:{label,index:shown}}));},[isStatic,label,shown]);useEffect(()=>{if(isStatic)return;const onGo=e=>{const detail=e.detail;if(!detail||detail.label!==label)return;const index=Number(detail.index);if(!Number.isInteger(index)||index<0||index>=count)return;startTransition(()=>setFront(index));};window.addEventListener(GO_EVENT,onGo);return()=>window.removeEventListener(GO_EVENT,onGo);},[isStatic,label,count]);if(count===0)return null;const current=shown;const behind=Math.min(count-1,MAX_VISIBLE_BEHIND);function go(step){startTransition(()=>setFront(f=>((f+step)%count+count)%count));}function onPointerDown(e,index){if(isStatic||count<2||e.pointerType===\"mouse\"&&e.button!==0)return;gesture.current={id:e.pointerId,index,x:e.clientX,y:e.clientY,lastX:e.clientX,lastT:e.timeStamp,velocity:0,swiping:false};}function onPointerMove(e){const g=gesture.current;if(!g||e.pointerId!==g.id)return;const dx=e.clientX-g.x;const dy=e.clientY-g.y;if(!g.swiping){if(Math.abs(dx)<SWIPE_SLOP&&Math.abs(dy)<SWIPE_SLOP)return;if(Math.abs(dy)>Math.abs(dx)){// Vertical: let the page scroll\ngesture.current=null;return;}g.swiping=true;// Capturing moves the release off the card, so its tap is cancelled\ne.currentTarget.setPointerCapture(g.id);dragX.stop();setDraggedIndex(g.index);}const dt=e.timeStamp-g.lastT;if(dt>0)g.velocity=(e.clientX-g.lastX)/dt*1e3;g.lastX=e.clientX;g.lastT=e.timeStamp;dragX.set(dx*.9);}function onPointerEnd(e){const g=gesture.current;if(!g||e.pointerId!==g.id)return;gesture.current=null;if(!g.swiping)return;const offset=dragX.get();if(offset<-SWIPE_DISTANCE||g.velocity<-SWIPE_VELOCITY)go(1);else if(offset>SWIPE_DISTANCE||g.velocity>SWIPE_VELOCITY)go(-1);justSwiped.current=true;window.setTimeout(()=>justSwiped.current=false,50);animate(dragX,0,{...SPRING,onComplete:()=>setDraggedIndex(null)});}return /*#__PURE__*/_jsxs(\"section\",{\"aria-roledescription\":\"carousel\",\"aria-label\":label,\"data-card-stack\":\"\",\"data-card-stack-split\":splitCards?\"\":undefined,style:{display:\"flex\",flexDirection:\"column\",alignItems:\"stretch\",gap:20},children:[/*#__PURE__*/_jsx(\"style\",{children:`[data-card-stack] img { -webkit-user-drag: none; user-drag: none; pointer-events: none; }`}),splitCards&&/*#__PURE__*/_jsx(\"style\",{children:`[data-card-stack-split] [data-card-stack-content] > * > :last-child { flex: 1 0 auto !important; }`}),/*#__PURE__*/_jsx(\"div\",{tabIndex:0,onKeyDown:e=>{if(e.key===\"ArrowRight\")go(1);if(e.key===\"ArrowLeft\")go(-1);},style:{display:\"grid\",paddingRight:behind*peek,outline:\"none\"},children:items.map((item,index)=>{const depth=(index-current+count)%count;const isFront=depth===0;const visibleDepth=Math.min(depth,behind);const hidden=depth>behind;return /*#__PURE__*/_jsxs(motion.div,{ref:slide=>{const key=String(item.key??index);if(slide)slideRefs.current.set(key,slide);else slideRefs.current.delete(key);},\"aria-hidden\":!isFront,\"aria-roledescription\":\"slide\",\"aria-label\":`${index+1} of ${count}`,initial:false,animate:{x:visibleDepth*peek,scale:1-visibleDepth*scaleStep,opacity:hidden?0:1},transition:SPRING,onPointerDown:isFront?e=>onPointerDown(e,index):undefined,onPointerMove:isFront?onPointerMove:undefined,onPointerUp:isFront?onPointerEnd:undefined,onPointerCancel:isFront?onPointerEnd:undefined,// Photos are <img> elements, which the browser would otherwise\n// drag as a ghost image instead of letting the card swipe\nonDragStart:e=>e.preventDefault(),// Cancels the mouse's native drag and text selection so only the swipe runs\nonMouseDown:isFront&&count>1&&!isStatic?e=>e.preventDefault():undefined,onClickCapture:e=>{if(justSwiped.current){e.preventDefault();e.stopPropagation();}},onClick:isFront||hidden?undefined:()=>go(depth),style:{position:\"relative\",gridArea:\"1 / 1\",// Cards with no content height (e.g. photo cards) take their height from the width\naspectRatio:cardRatio>0?cardRatio:undefined,zIndex:count-depth,transformOrigin:\"right center\",borderRadius:radius,cursor:!isFront?\"pointer\":count<2||isStatic?\"auto\":index===draggedIndex?\"grabbing\":\"grab\",pointerEvents:hidden?\"none\":\"auto\",touchAction:\"pan-y\"},children:[/*#__PURE__*/_jsx(motion.div,{\"data-card-stack-content\":\"\",initial:false,// Darkens the pieces of a split card and leaves its gaps clear\nanimate:splitCards?{filter:`brightness(${1-visibleDepth*SPLIT_DIM_STEP})`}:undefined,transition:SPRING,style:{height:\"100%\",x:index===draggedIndex?dragX:0,// Back cards only respond as a whole, to bring them forward\npointerEvents:isFront?\"auto\":\"none\",userSelect:\"none\",WebkitUserSelect:\"none\"},children:item}),!splitCards&&/*#__PURE__*/_jsx(motion.div,{\"aria-hidden\":\"true\",initial:false,animate:{opacity:visibleDepth*DIM_STEP},style:{position:\"absolute\",inset:0,borderRadius:radius,background:\"#000000\",pointerEvents:\"none\"}})]},item.key??index);})}),showDots&&count>1&&/*#__PURE__*/_jsx(\"div\",{role:\"tablist\",\"aria-label\":`Choose from ${label}`,style:{display:\"flex\",justifyContent:\"center\",gap:8},children:items.map((item,index)=>{const active=index===current;return /*#__PURE__*/_jsx(\"button\",{type:\"button\",role:\"tab\",\"aria-selected\":active,\"aria-label\":`Show ${index+1} of ${count}`,onClick:()=>startTransition(()=>setFront(index)),style:{width:active?20:8,height:8,padding:0,border:\"none\",borderRadius:999,background:dotColor,opacity:active?1:.25,cursor:\"pointer\",transition:\"width 0.3s ease, opacity 0.3s ease\"}},item.key??index);})})]});}addPropertyControls(CMSCardStack,{slides:{type:ControlType.Slot,title:\"Cards\",description:\"Connect a Collection List, or the card layers themselves.\"},peek:{type:ControlType.Number,title:\"Peek\",defaultValue:14,min:0,max:40,unit:\"px\"},scaleStep:{type:ControlType.Number,title:\"Shrink\",defaultValue:.06,min:0,max:.2,step:.01,hidden:props=>props.splitCards===true},radius:{type:ControlType.Number,title:\"Radius\",defaultValue:20,min:0,max:48,unit:\"px\"},showDots:{type:ControlType.Boolean,title:\"Dots\",defaultValue:true},dotColor:{type:ControlType.Color,title:\"Dot Color\",defaultValue:\"#08547A\"},cardRatio:{type:ControlType.Number,title:\"Card Ratio\",defaultValue:0,min:0,max:3,step:.01,description:\"Width \\xf7 height of each card. 0 sizes cards to their content.\"},hidePast:{type:ControlType.Boolean,title:\"Hide Past\",defaultValue:false,description:\"Leaves out cards whose text shows a date before today, e.g. October 17, 2026.\"},splitCards:{type:ControlType.Boolean,title:\"Split Cards\",defaultValue:false,description:\"For cards made of separate pieces with a gap between them, e.g. a photo above a text card. The last piece fills the card's height.\"},label:{type:ControlType.String,title:\"Label\",defaultValue:\"Cards\",description:\"Read out by screen readers, e.g. Magazines.\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CMSCardStack\",\"slots\":[\"slides\"],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"342\",\"framerSupportedLayoutHeight\":\"auto\",\"framerIntrinsicHeight\":\"640\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CMSCardStack.map"],"mappings":"A,mTAmBoR,SAAS4B,EAAI,EAAM,CAAC,OAAOC,EAAM,GAAG,IAAIA,IAAQ,OAAOA,CAAK,CAAE,CAClV,SAASC,GAAO,CAAC,IAAMC,kBAAI,IAAI,KAAK,GAAG,CAAC,IAAMC,EAAM,IAAI,KAAK,eAAe,QAAQ,CAAC,SAASC,EAAU,KAAK,UAAU,MAAM,UAAU,IAAI,SAAS,CAAC,CAAC,CAAC,cAAcF,CAAG,EAAQG,EAAI,GAAMF,EAAM,KAAK,GAAMG,EAAK,OAAOC,CAAI,CAAC,EAAE,OAAO,GAASP,EAAM,GAAGK,EAAI,MAAM,EAAE,GAAGA,EAAI,OAAO,EAAE,GAAGA,EAAI,KAAK,IAAI,GAAG,sBAAsB,KAAKL,CAAK,EAAE,OAAOA,CAAM,MAAM,CAAC,CAAC,MAAM,GAAGE,EAAI,YAAY,EAAE,GAAGH,EAAIG,EAAI,SAAS,EAAE,CAAC,EAAE,GAAGH,EAAIG,EAAI,QAAQ,CAAC,GAAI,CAAC,SAASM,EAAO,EAAK,CAAC,IAAMC,EAAMC,EAAa,KAAKC,CAAI,EAAE,GAAG,CAACF,EAAM,MAAO,GAAM,IAAMG,EAAMC,EAAO,QAAQJ,EAAM,EAAE,CAAC,YAAY,CAAC,EAAE,EAAE,MAAM,GAAGA,EAAM,GAAG,GAAGV,EAAIa,CAAK,EAAE,GAAGb,EAAI,OAAOU,EAAM,EAAE,CAAC,IAAIR,EAAM,CAAE,CAE1lB,SAASa,EAAa,EAAK,CAA0K,OAAtK,MAAM,QAAQC,CAAI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