{"version":3,"file":"Marquee.DIAM0rLI.mjs","names":["React.useMemo","React.useState","React.useRef","__esmMin","pe","init_npm_react_18_3_1","_e","p","c","init_jsx_runtime","ce","de","init_framer_BWFVvmND","addPropertyControls","ControlType","wavePath","half","PATH","d","y","end","x","measure","s","FONT","out","items","t","Marquee","GAP","props","pathD","wave","list","id","uid","widths","setWidths","textPath","hover","key","alive","run","fonts","seq","w","gap","offset","last","raf","visible","el","step","dt","now","speed","io","spans","n","PATH_LENGTH","i","fade","MASK","FONT_FACE","link","newTab","label","init_Marquee"],"sources":["https:/framerusercontent.com/modules/prvgVHMc8zs1vv2tVEa8/w0YmjCNPCaOBSOKs3Zob/Marquee.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";// T18 run 2 (2026-11-03): live's Squarespace \"scrolling\" block (website.components.scrolling) as on /workshops and /lower-cost.\n// Source of truth: qa/parity/workshops/ in the migration folder. Live: items set on the text of one SVG <textPath> along a fixed\n// sine path (wave intensity 30, frequency 4 = 1100px wavelength, same at every width), Arbeit-Light 16px black, 16px between items,\n// item x = running sum of rounded item widths; startOffset moves left by `speed` px per frame (60/s at speed 1) and wraps at one\n// sequence length; paused while hovering the 22px hit band along the wave, which links to `link` (new tab). 15% fade at both ends.\nconst PATH=\"M-550,14.564  L-550,14.564 S-183.15,44.564 0,44.564 S366.85,14.564 550,14.564 S916.85,44.564 1100,44.564 S1466.85,14.564 1650,14.564 S2016.85,44.564 2200,44.564\";const PATH_LENGTH=3300// enough copies to cover the path (2750px wide) plus one sequence\n;const FONT_FACE='@font-face{font-family:\"Arbeit Light\";src:url(https://framerusercontent.com/assets/OcUfyhVwXhO9lD77NpZ2BXINo.woff2) format(\"woff2\");font-weight:200;font-display:swap}';const FONT='\"Arbeit Light\"';const GAP=16;const MASK=\"linear-gradient(to right, rgba(0, 0, 0, 0) 0%, rgb(0, 0, 0) 15%, rgb(0, 0, 0) 85%, rgba(0, 0, 0, 0) 100%)\";let uid=0;// T18 run 18: optional half wavelength (live's \"frequency\" setting). 550 = the original PATH above (/workshops, /lower-cost);\n// the home page's first scrolling block uses 400. Same control points as Squarespace (x - 0.333 * half), path ends at ceil(2000 / half) * half.\nfunction wavePath(half){if(!half||half===550)return PATH;let d=`M${-half},14.564  L${-half},14.564`;let y=44.564;const end=Math.ceil(2e3/half)*half;for(let x=0;x<=end;x+=half){d+=` S${Number((x-.333*half).toFixed(2))},${y} ${x},${y}`;y=y===44.564?14.564:44.564;}return d;}// measured in the DOM like live's Marquee-measure row (canvas measureText differs by up to 0.8px)\nfunction measure(items){if(typeof document===\"undefined\"||!document.body)return null;const s=document.createElement(\"span\");s.style.cssText=`position:absolute;visibility:hidden;white-space:nowrap;font-family:${FONT};font-size:16px;font-weight:200`;document.body.appendChild(s);const out=items.map(t=>{s.textContent=t;return Math.round(s.getBoundingClientRect().width);});s.remove();return out;}/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight fixed\n * @framerIntrinsicWidth 1342\n * @framerIntrinsicHeight 52\n */export default function Marquee(props){const{items=[],speed=1,link=\"\",newTab=true,label=\"\",wave=550,gap=GAP,fade=true}=props;const pathD=wavePath(wave);const list=items.filter(t=>typeof t===\"string\"&&t.length>0);const id=React.useMemo(()=>`dc-mq-${++uid}`,[]);const[widths,setWidths]=React.useState(null);const textPath=React.useRef(null);const hover=React.useRef(false);const key=list.join(\"\\x00\");React.useEffect(()=>{let alive=true;const run=()=>alive&&setWidths(measure(list));run();const fonts=document.fonts;if(fonts){fonts.load(`16px ${FONT}`).then(run,run);fonts.ready.then(run,run);}return()=>{alive=false;};},[key]);const seq=widths?widths.reduce((s,w)=>s+w+gap,0):0;React.useEffect(()=>{if(!seq||!textPath.current)return;let offset=0;let last=0;let raf=0;let visible=true;const el=textPath.current;const step=now=>{const dt=last?Math.min(now-last,100):0;last=now;if(!hover.current){offset-=speed*60*dt/1e3;if(offset<=-seq)offset+=seq;el.setAttribute(\"startOffset\",String(Math.round(offset)));}raf=visible?requestAnimationFrame(step):0;};const io=typeof IntersectionObserver!==\"undefined\"?new IntersectionObserver(([e])=>{visible=e.isIntersecting;last=0;if(visible&&!raf)raf=requestAnimationFrame(step);}):null;if(io&&el.ownerSVGElement)io.observe(el.ownerSVGElement);raf=requestAnimationFrame(step);return()=>{cancelAnimationFrame(raf);io&&io.disconnect();};},[seq,speed]);const spans=[];if(widths&&seq){let x=0;for(let n=0;x<PATH_LENGTH;n++){list.forEach((t,i)=>{spans.push(/*#__PURE__*/_jsx(\"tspan\",{x:x,children:t},`${n}-${i}`));x+=widths[i]+gap;});}}return /*#__PURE__*/_jsxs(\"div\",{className:props.className,style:{...props.style,position:\"relative\",WebkitMaskImage:fade?MASK:undefined,maskImage:fade?MASK:undefined,fontFamily:FONT,fontSize:16,lineHeight:\"22.4px\",color:\"#000\"},children:[/*#__PURE__*/_jsx(\"style\",{children:FONT_FACE}),/*#__PURE__*/_jsxs(\"svg\",{fill:\"currentColor\",\"aria-hidden\":\"true\",style:{display:\"block\",width:\"100%\",height:52,transform:\"translateY(2.2px)\",overflow:\"visible\"},children:[/*#__PURE__*/_jsx(\"g\",{transform:\"translate(0, 1.1)\",children:/*#__PURE__*/_jsx(\"path\",{id:id,d:pathD,fill:\"none\",stroke:\"transparent\",strokeWidth:0})}),/*#__PURE__*/_jsx(\"text\",{style:{fontFamily:FONT,fontSize:16},children:/*#__PURE__*/_jsx(\"textPath\",{ref:textPath,href:`#${id}`,startOffset:0,children:spans})}),link?/*#__PURE__*/_jsx(\"a\",{href:link,target:newTab?\"_blank\":undefined,rel:newTab?\"noopener\":undefined,\"aria-label\":label||list.join(\" \"),style:{cursor:\"pointer\"},onMouseEnter:()=>hover.current=true,onMouseLeave:()=>hover.current=false,children:/*#__PURE__*/_jsx(\"g\",{transform:\"translate(0, -3.641)\",children:/*#__PURE__*/_jsx(\"path\",{d:pathD,fill:\"none\",stroke:\"transparent\",strokeWidth:22})})}):null]})]});}Marquee.displayName=\"Marquee\";addPropertyControls(Marquee,{items:{type:ControlType.Array,title:\"Items\",control:{type:ControlType.String},defaultValue:[\"Creative Healing\",\"✦\",\"Nervous System Care\",\"✦\",\"Community\",\"✦\"]},speed:{type:ControlType.Number,title:\"Speed\",defaultValue:1,min:0,max:5,step:.1},link:{type:ControlType.String,title:\"Link\",defaultValue:\"https://deciphercounselling.janeapp.com/\"},newTab:{type:ControlType.Boolean,title:\"New Tab\",defaultValue:true},label:{type:ControlType.String,title:\"Link Label\",defaultValue:\"\"},wave:{type:ControlType.Number,title:\"Half Wave\",defaultValue:550,min:100,max:2e3,step:1},// T18 run 19: live's item spacing and edge fade are block settings (home: 8px, no fade; /workshops, /lower-cost: 16px, 15% fade)\ngap:{type:ControlType.Number,title:\"Item Gap\",defaultValue:16,min:0,max:200,step:1},fade:{type:ControlType.Boolean,title:\"Edge Fade\",defaultValue:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Marquee\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerIntrinsicWidth\":\"1342\",\"framerIntrinsicHeight\":\"52\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Marquee.map"],"mappings":"A,sMAQA,SAASe,EAAS,EAAK,CAAC,GAAG,CAACC,GAAMA,IAAO,IAAI,OAAOC,EAAK,IAAIC,EAAE,IAAI,CAACF,EAAK,YAAY,CAACA,EAAK,SAAaG,EAAE,OAAaC,EAAI,KAAK,KAAK,IAAIJ,CAAI,EAAEA,EAAK,IAAI,IAAIK,EAAE,EAAEA,GAAGD,EAAI,GAAGJ,EAAM,GAAG,KAAK,QAAQK,EAAE,KAAKL,EAAA,CAAM,QAAQ,CAAC,CAAC,EAAE,GAAGG,EAAE,GAAGE,EAAE,GAAGF,IAAI,EAAEA,IAA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