{"version":3,"file":"DragSlider.AXrs0a1Y.mjs","names":["React.forwardRef"],"sources":["https:/framerusercontent.com/modules/q6AdYuVdn7nqnxRYPtBb/OYrLlDFAClRhsX9vzOMl/bDZjksbCJ.js","https:/framerusercontent.com/modules/jA2TFLZjJnIVGACD3CWe/ITAvbV39UCYahyUmEBoK/DragSlider.js"],"sourcesContent":["// Generated by Framer (6ca5d98)\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,cx,motion,useSVGTemplate,withCSS}from\"framer\";import*as React from\"react\";import{forwardRef}from\"react\";const mask=\"var(--framer-icon-mask)\";const Base=/*#__PURE__*/forwardRef(function(props,ref){return /*#__PURE__*/_jsx(\"svg\",{...props,ref:ref,children:props.children});});const MotionSVG=motion.create(Base);const SVG=/*#__PURE__*/forwardRef((props,ref)=>{const{animated,layoutId,children,...rest}=props;return animated?/*#__PURE__*/_jsx(MotionSVG,{...rest,layoutId:layoutId,ref:ref,children:children}):/*#__PURE__*/_jsx(\"svg\",{...rest,ref:ref,children:children});});const svg='<svg display=\"block\" role=\"presentation\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 0 0 L 16.5 0 C 17.328 0 18 0.672 18 1.5 L 18 15 L 18 15 L 0 15 L 0 15 L 0 0 Z\" fill-opacity=\"var(--1m6trwb, 0)\" fill=\"var(--21h8s6, rgb(0, 0, 0))\" height=\"15px\" id=\"p1fpTQK7F\" transform=\"translate(3 4.5)\" width=\"18px\"/><path d=\"M 18 15 L 0 15 L 0 0\" fill=\"transparent\" height=\"15px\" id=\"LOKQVnF_E\" stroke-dasharray=\"\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"var(--pgex8v, 1.5)\" stroke=\"var(--21h8s6, rgb(0, 0, 0))\" transform=\"translate(3 4.5)\" width=\"18px\"/><path d=\"M 15.75 0 L 9 6.75 L 6 3.75 L 0 9.75\" fill=\"transparent\" height=\"9.75px\" id=\"YJGYU62So\" stroke-dasharray=\"\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"var(--pgex8v, 1.5)\" stroke=\"var(--21h8s6, rgb(0, 0, 0))\" transform=\"translate(3 6.75)\" width=\"15.75px\"/><path d=\"M 3.75 3.75 L 3.75 0 L 0 0\" fill=\"transparent\" height=\"3.75px\" id=\"LN0V1ajm1\" stroke-dasharray=\"\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"var(--pgex8v, 1.5)\" stroke=\"var(--21h8s6, rgb(0, 0, 0))\" transform=\"translate(15 6.75)\" width=\"3.75px\"/></svg>';const getProps=({alpha,color,height,id,width,width1,...props})=>{return{...props,ezTt3ayMo:color??props.ezTt3ayMo??\"rgb(0, 0, 0)\",lschgej4H:width1??props.lschgej4H??1.5,qxTvv_EBh:alpha??props.qxTvv_EBh};};const Component=/*#__PURE__*/React.forwardRef(function(props,ref){const{style,className,layoutId,variant,ezTt3ayMo,lschgej4H,qxTvv_EBh,...restProps}=getProps(props);const href=useSVGTemplate(\"987190984\",svg);return /*#__PURE__*/_jsx(SVG,{...restProps,className:cx(\"framer-DkID7\",className),layoutId:layoutId,ref:ref,role:\"presentation\",style:{\"--1m6trwb\":qxTvv_EBh,\"--21h8s6\":ezTt3ayMo,\"--pgex8v\":lschgej4H,...style},viewBox:\"0 0 24 24\",children:/*#__PURE__*/_jsx(\"use\",{href:href})});});const css=[`.framer-DkID7 { -webkit-mask: ${mask}; aspect-ratio: 1; display: block; mask: ${mask}; width: 24px; }`];/**\n * This is a generated Framer component.\n * @framerIntrinsicWidth 24\n * @framerIntrinsicHeight 24\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n * @framerVariables {\"ezTt3ayMo\":\"color\",\"lschgej4H\":\"width1\",\"qxTvv_EBh\":\"alpha\"}\n * @framerImmutableVariables true\n * @framerVector {\"name\":\"Chart Line Up\",\"color\":{\"type\":\"variable\",\"value\":\"21h8s6\"},\"set\":{\"localId\":\"vectorSet/NGVKdicsm\",\"id\":\"NGVKdicsm\",\"moduleId\":\"omX0gWFPqDwhaiWwf6ab\"}}\n * @framerDisableUnlink true\n */const Icon=withCSS(Component,css,\"framer-DkID7\");Icon.displayName=\"Chart Line Up\";export default Icon;addPropertyControls(Icon,{ezTt3ayMo:{defaultValue:\"rgb(0, 0, 0)\",hidden:false,title:\"Color\",type:ControlType.Color},lschgej4H:{defaultValue:1.5,displayStepper:true,hidden:false,max:6,min:0,step:.5,title:\"Width\",type:ControlType.Number},qxTvv_EBh:{defaultValue:0,displayStepper:true,hidden:false,max:1,min:0,step:.1,title:\"Alpha\",type:ControlType.Number}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Icon\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerVector\":\"{\\\"name\\\":\\\"Chart Line Up\\\",\\\"color\\\":{\\\"type\\\":\\\"variable\\\",\\\"value\\\":\\\"21h8s6\\\"},\\\"set\\\":{\\\"localId\\\":\\\"vectorSet/NGVKdicsm\\\",\\\"id\\\":\\\"NGVKdicsm\\\",\\\"moduleId\\\":\\\"omX0gWFPqDwhaiWwf6ab\\\"}}\",\"framerIntrinsicHeight\":\"24\",\"framerVariables\":\"{\\\"ezTt3ayMo\\\":\\\"color\\\",\\\"lschgej4H\\\":\\\"width1\\\",\\\"qxTvv_EBh\\\":\\\"alpha\\\"}\",\"framerDisableUnlink\":\"true\",\"framerImmutableVariables\":\"true\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"24\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";// Drag slider for horizontally overflowing rows, plus prev/next arrow\n// buttons. Mouse drag scrolls and snaps to the nearest card; touch keeps\n// native swiping. Arrows scroll a page of cards (up to three) and dim at either end.\nconst STYLE_ID=\"drag-slider-style\";const EVENT=\"drag-slider:step\";function injectStyles(){if(document.getElementById(STYLE_ID))return;const s=document.createElement(\"style\");s.id=STYLE_ID;s.textContent=[\"[data-drag-slider]::-webkit-scrollbar{display:none}\",\"[data-slider-btn]{transition:background-color .15s ease,opacity .2s ease}\",\"[data-slider-btn]:hover{background-color:var(--token-ac705832-092f-475e-a252-93784ea8573d, #f5f5f5)}\",\"[data-slider-btn][data-disabled]{opacity:.35;pointer-events:none}\"].join(\"\");document.head.appendChild(s);}function sliders(){return Array.from(document.querySelectorAll(\"[data-drag-slider]\")).filter(el=>el.offsetParent!==null);}function cardOffsets(el){const kids=Array.from(el.children);const first=kids[0]?.offsetLeft??0;return kids.map(k=>k.offsetLeft-first);}function maxScroll(el){return el.scrollWidth-el.clientWidth;}function snap(el){const x=el.scrollLeft;let best=0;for(const left of cardOffsets(el))if(Math.abs(left-x)<Math.abs(best-x))best=left;el.scrollTo({left:Math.min(best,maxScroll(el)),behavior:\"smooth\"});}function step(el,dir){const offs=cardOffsets(el);const x=el.scrollLeft;const card=offs.length>1?offs[1]-offs[0]:el.clientWidth;const perPage=Math.max(1,Math.min(3,Math.floor((el.clientWidth+2)/card)));let i=offs.findIndex(o=>o>=x-2);if(i<0)i=offs.length-1;const next=Math.max(0,Math.min(offs.length-1,i+dir*perPage));el.scrollTo({left:Math.max(0,Math.min(offs[next],maxScroll(el))),behavior:\"smooth\"});}function updateButtons(){const el=sliders()[0];if(!el)return;const atStart=el.scrollLeft<=2;const atEnd=el.scrollLeft>=maxScroll(el)-2;document.querySelectorAll(\"[data-slider-btn]\").forEach(b=>{const dir=b.dataset.sliderBtn;const off=dir===\"prev\"?atStart:atEnd;if(off)b.setAttribute(\"data-disabled\",\"\");else b.removeAttribute(\"data-disabled\");});}export function withDragSlider(Component){return props=>{useEffect(()=>{injectStyles();const onStep=e=>sliders().forEach(el=>step(el,e.detail));window.addEventListener(EVENT,onStep);const t=setTimeout(updateButtons,300);window.addEventListener(\"resize\",updateButtons);return()=>{window.removeEventListener(EVENT,onStep);window.removeEventListener(\"resize\",updateButtons);clearTimeout(t);};},[]);const onPointerDown=e=>{if(e.pointerType!==\"mouse\"||e.button!==0)return;const el=e.currentTarget;const startX=e.clientX;const startLeft=el.scrollLeft;let moved=false;el.style.cursor=\"grabbing\";el.style.userSelect=\"none\";const move=ev=>{const dx=ev.clientX-startX;if(Math.abs(dx)>3)moved=true;el.scrollLeft=startLeft-dx;};const up=()=>{window.removeEventListener(\"pointermove\",move);window.removeEventListener(\"pointerup\",up);el.style.cursor=\"grab\";el.style.userSelect=\"\";if(moved){snap(el);const block=ev=>{ev.preventDefault();ev.stopPropagation();};el.addEventListener(\"click\",block,{capture:true,once:true});setTimeout(()=>el.removeEventListener(\"click\",block,{capture:true}),0);}};window.addEventListener(\"pointermove\",move);window.addEventListener(\"pointerup\",up);};return /*#__PURE__*/_jsx(Component,{...props,\"data-drag-slider\":\"\",onPointerDown:onPointerDown,onScroll:updateButtons,onDragStart:e=>e.preventDefault(),style:{...props.style,cursor:\"grab\",scrollbarWidth:\"none\",overscrollBehaviorX:\"contain\"}});};}function SliderButton({Component,dir,props}){useEffect(()=>{injectStyles();const t=setTimeout(updateButtons,300);return()=>clearTimeout(t);},[]);return /*#__PURE__*/_jsx(Component,{...props,\"data-slider-btn\":dir,role:\"button\",\"aria-label\":dir===\"prev\"?\"Previous\":\"Next\",onClick:()=>window.dispatchEvent(new CustomEvent(EVENT,{detail:dir===\"prev\"?-1:1})),style:{...props.style,cursor:\"pointer\"}});}export function withSliderPrev(Component){return props=>/*#__PURE__*/_jsx(SliderButton,{Component:Component,dir:\"prev\",props:props});}export function withSliderNext(Component){return props=>/*#__PURE__*/_jsx(SliderButton,{Component:Component,dir:\"next\",props:props});}\nexport const __FramerMetadata__ = {\"exports\":{\"withSliderPrev\":{\"type\":\"reactHoc\",\"name\":\"withSliderPrev\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withDragSlider\":{\"type\":\"reactHoc\",\"name\":\"withDragSlider\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withSliderNext\":{\"type\":\"reactHoc\",\"name\":\"withSliderNext\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./DragSlider.map"],"mappings":"8RAC0C,IAAqF,IAA4B,EAAqC,EAAK,0BAAgC,EAAkB,EAAW,SAAS,EAAM,EAAI,CAAC,OAAoB,EAAK,MAAM,CAAC,GAAG,EAAU,MAAI,SAAS,EAAM,QAAQ,CAAC,CAAE,CAAC,EAAQ,EAAU,EAAO,OAAO,CAAI,EAAQ,EAAiB,GAAY,EAAM,IAAM,CAAC,GAAK,CAAC,WAAS,WAAS,WAAS,GAAG,GAAM,EAAM,OAAO,EAAsB,EAAK,EAAU,CAAC,GAAG,EAAc,WAAa,MAAa,UAAQ,CAAC,EAAe,EAAK,MAAM,CAAC,GAAG,EAAS,MAAa,UAAQ,CAAC,CAAE,CAAC,EAAQ,EAAI,6nCAAmoC,GAAU,CAAC,QAAM,QAAM,SAAO,KAAG,QAAM,SAAO,GAAG,MAAgB,CAAC,GAAG,EAAM,UAAU,GAAO,EAAM,WAAW,eAAe,UAAU,GAAQ,EAAM,WAAW,IAAI,UAAU,GAAO,EAAM,SAAS,GAUl9D,EAAK,EAV8+DA,EAAiB,SAAS,EAAM,EAAI,CAAC,GAAK,CAAC,QAAM,YAAU,WAAS,UAAQ,YAAU,YAAU,YAAU,GAAG,GAAW,EAAS,CAAK,EAAQ,EAAK,EAAe,YAAY,CAAG,EAAE,OAAoB,EAAK,EAAI,CAAC,GAAG,EAAU,UAAU,EAAG,eAAe,CAAS,EAAW,WAAa,MAAI,KAAK,eAAe,MAAM,CAAC,YAAY,EAAU,WAAW,EAAU,WAAW,EAAU,GAAG,CAAK,EAAE,QAAQ,YAAY,SAAsB,EAAK,MAAM,CAAM,MAAI,CAAC,CAAC,CAAC,CAAE,CAUt6E,EAAE,CAVk7E,iCAAiC,EAAK,2CA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