{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/hkeHXCiR1Ibo4sAlkFtn/hxk7LoYvXBOw76NsR2HV/MasonryLayout_1.js", "ssg:https://framerusercontent.com/modules/7yeYvUYiSf3Nks7xY3C5/oCZT4bd4SfjRn7gFRZf7/WdMscfac4.js"],
  "sourcesContent": ["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";///////////////////////////\n// Code from Nikolay Goncharuk on GitHub:\n// https://github.com/GoncharukBro/react-smart-masonry/blob/master/src/Masonry.tsx\n// https://github.com/GoncharukBro/react-smart-masonry/blob/master/src/useResize.ts\n//\n// Modified by Isaac Roberts (twitter.com/madebyisaacr)\n//\n// Copyright (c) 2021 Nikolay Goncharuk\n// MIT License\nimport{useState,useLayoutEffect,useEffect,useMemo,useRef,Children,forwardRef,isValidElement}from\"react\";function getCurrentBreakpoints(breakpoints,width){const normalizedBreakpoints=breakpoints&&Object.entries(breakpoints).sort((a,b)=>b[1]-a[1]);return normalizedBreakpoints===null||normalizedBreakpoints===void 0?void 0:normalizedBreakpoints.filter(item=>item[1]<=width).map(item=>item[0]);}function getState(breakpoints,width){return{width,currentBreakpoints:getCurrentBreakpoints(breakpoints,width)};}function useResize(breakpoints){const[state,setState]=useState(()=>getState(breakpoints,0)//global.innerWidth)\n);useEffect(()=>{const handleResize=()=>{setState(getState(breakpoints,window.innerWidth));};window.addEventListener(\"resize\",handleResize);return()=>{window.removeEventListener(\"resize\",handleResize);};},[breakpoints]);return state;}function getCurrentParam(breakpoints,param,defaultValue){if(typeof param===\"object\"){const breakpoint=breakpoints===null||breakpoints===void 0?void 0:breakpoints.find(item=>param[item]!==undefined);var _breakpoint;return breakpoint!==undefined?(_breakpoint=param[breakpoint])!==null&&_breakpoint!==void 0?_breakpoint:defaultValue:defaultValue;}return param;}const DEFAULT_COLUMNS=1;const DEFAULT_GAP=0;function MasonryComponent({breakpoints,columns=DEFAULT_COLUMNS,gap=DEFAULT_GAP,reverse=false,autoArrange=false,children,style,...otherProps},forwardedRef){const{currentBreakpoints}=useResize(breakpoints);const elements=useRef([]);const[arrange,setArrange]=useState(false);const[currentColumns,setCurrentColumns]=useState(()=>{return getCurrentParam(currentBreakpoints,columns,DEFAULT_COLUMNS);});const[currentGap,setCurrentGap]=useState(()=>{return getCurrentParam(currentBreakpoints,gap,DEFAULT_GAP);});// eslint-disable-next-line react-hooks/exhaustive-deps\nuseLayoutEffect(()=>{if(autoArrange&&!arrange)setArrange(true);return()=>{if(autoArrange&&arrange)setArrange(false);};});useEffect(()=>{const param=getCurrentParam(currentBreakpoints,columns,DEFAULT_COLUMNS);setCurrentColumns(param);},[columns,currentBreakpoints]);useEffect(()=>{const param=getCurrentParam(currentBreakpoints,gap,DEFAULT_GAP);setCurrentGap(param);},[gap,currentBreakpoints]);const layout=useMemo(()=>{if(currentColumns<1)return[];const arrayOfChildren=Children.toArray(children);if(reverse)arrayOfChildren.reverse();const newLayout=Array.from({length:currentColumns},()=>{return[];});const columnHeights=newLayout.map(()=>0);const getcolumnIndex=index=>{if(autoArrange&&arrange&&elements.current.length>0){const columnIndex=columnHeights.findIndex(item=>{return item===Math.min(...columnHeights);});const element=elements.current.find(item=>item.index===index);const elementHeight=element===null||element===void 0?void 0:element.element.getBoundingClientRect().height;columnHeights[columnIndex]+=elementHeight||0;return columnIndex;}return index%currentColumns;};arrayOfChildren.forEach((child,index)=>{if(child&&/*#__PURE__*/isValidElement(child)){newLayout[getcolumnIndex(index)].push({element:child,index});}});return newLayout;},[arrange,autoArrange,children,currentColumns,reverse]);const temporaryElements=[];const addElement=index=>element=>{if(element!==null){temporaryElements.push({element,index});elements.current=temporaryElements;}};return /*#__PURE__*/_jsx(\"div\",{ref:forwardedRef,style:{display:\"flex\",gap:currentGap,...style},...otherProps,children:layout.map((column,columnIndex)=>/*#__PURE__*/_jsx(\"div\",{style:{flex:1,display:\"flex\",flexDirection:\"column\",gap:currentGap},children:column.map((item,itemIndex)=>/*#__PURE__*/_jsx(\"div\",{ref:addElement(item.index),children:item.element},itemIndex))},columnIndex))});}const Masonry=/*#__PURE__*/forwardRef(MasonryComponent);///////////////////////////\n/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n */export default function MasonryLayout(props){var _props_layers;let layers=[];if(props.columnWidth==\"fill\"){for(let i=0;i<props.layers.length;i++){let layer=props.layers[i];if(!layer.props.style){layer.props.style={};}layer.props.style.width=\"100%\";layers.push(layer);}}else{layers=props.layers;}if(((_props_layers=props.layers)===null||_props_layers===void 0?void 0:_props_layers.length)==0){return /*#__PURE__*/_jsx(\"div\",{style:{minWidth:\"100px\",minHeight:\"100px\"}});}else if(props.columns==1){return /*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",flexDirection:\"column\",gap:props.gap},children:layers});}else{return /*#__PURE__*/_jsx(Masonry,{columns:props.columns,gap:props.gap,autoArrange:props.autoArrange,reverse:false,children:layers});}}MasonryLayout.displayName=\"Masonry Layout\";MasonryLayout.defaultProps={layers:[],columns:3,columnWidth:\"fit\",autoArrange:true,gap:10};addPropertyControls(MasonryLayout,{layers:{type:ControlType.Array,control:{type:ControlType.ComponentInstance}},columns:{type:ControlType.Number,defaultValue:MasonryLayout.defaultProps.columns,min:1,step:1,displayStepper:true,hidden(props){return props.direction==\"h\";}},columnWidth:{type:ControlType.Enum,defaultValue:MasonryLayout.defaultProps.columnWidth,options:[\"fit\",\"fill\"],optionTitles:[\"Fit\",\"Fill\"],displaySegmentedControl:true},autoArrange:{type:ControlType.Boolean,defaultValue:MasonryLayout.defaultProps.autoArrange,description:\"Arranges each layer into the shortest column.\"},gap:{type:ControlType.Number,defaultValue:MasonryLayout.defaultProps.gap,min:0}});\nexport const __FramerMetadata__ = {\"exports\":{\"MasonryProps\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"reactComponent\",\"name\":\"MasonryLayout\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./MasonryLayout_1.map", "import{fontStore}from\"framer\";fontStore.loadFonts([]);export const fonts=[];export const css=[\".framer-lhO5M .framer-styles-preset-vjdnzx:not(.rich-text-wrapper), .framer-lhO5M .framer-styles-preset-vjdnzx.rich-text-wrapper a { --framer-link-current-text-color: #6c03cd; --framer-link-current-text-decoration: none; --framer-link-hover-text-color: #ff0073; --framer-link-hover-text-decoration: underline; --framer-link-text-color: #c6e849; --framer-link-text-decoration: none; transition: color 0s cubic-bezier(0, 0, 1, 1) 0s; }\"];export const className=\"framer-lhO5M\";\nexport const __FramerMetadata__ = {\"exports\":{\"css\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"fonts\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"className\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],
  "mappings": "kKASwG,SAASA,EAAsBC,EAAYC,EAAM,CAAC,IAAMC,EAAsBF,GAAa,OAAO,QAAQA,CAAW,EAAE,KAAK,CAACG,EAAEC,IAAIA,EAAE,CAAC,EAAED,EAAE,CAAC,CAAC,EAAE,OAA2ED,GAAsB,OAAOG,GAAMA,EAAK,CAAC,GAAGJ,CAAK,EAAE,IAAII,GAAMA,EAAK,CAAC,CAAC,CAAE,CAAC,SAASC,EAASN,EAAYC,EAAM,CAAC,MAAM,CAAC,MAAAA,EAAM,mBAAmBF,EAAsBC,EAAYC,CAAK,CAAC,CAAE,CAAC,SAASM,EAAUP,EAAY,CAAC,GAAK,CAACQ,EAAMC,CAAQ,EAAEC,EAAS,IAAIJ,EAASN,EAAY,CAAC,CACjlB,EAAE,OAAAW,EAAU,IAAI,CAAC,IAAMC,EAAa,IAAI,CAACH,EAASH,EAASN,EAAYa,EAAO,UAAU,CAAC,CA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AAC,EAAE,QAAQ,CAAC,KAAKA,EAAY,OAAO,aAAaP,EAAc,aAAa,QAAQ,IAAI,EAAE,KAAK,EAAE,eAAe,GAAK,OAAOC,EAAM,CAAC,OAAOA,EAAM,WAAW,GAAI,CAAC,EAAE,YAAY,CAAC,KAAKM,EAAY,KAAK,aAAaP,EAAc,aAAa,YAAY,QAAQ,CAAC,MAAM,MAAM,EAAE,aAAa,CAAC,MAAM,MAAM,EAAE,wBAAwB,EAAI,EAAE,YAAY,CAAC,KAAKO,EAAY,QAAQ,aAAaP,EAAc,aAAa,YAAY,YAAY,+CAA+C,EAAE,IAAI,CAAC,KAAKO,EAAY,OAAO,aAAaP,EAAc,aAAa,IAAI,IAAI,CAAC,CAAC,CAAC,ECfn/CQ,EAAU,UAAU,CAAC,CAAC,EAAS,IAAMC,GAAM,CAAC,EAAeC,GAAI,CAAC,mbAAmb,EAAeC,GAAU",
  "names": ["getCurrentBreakpoints", "breakpoints", "width", "normalizedBreakpoints", "a", "b", "item", "getState", "useResize", "state", "setState", "ye", "ue", "handleResize", "window", "getCurrentParam", "param", "defaultValue", "breakpoint", "_breakpoint", "DEFAULT_COLUMNS", "DEFAULT_GAP", "MasonryComponent", "columns", "gap", "reverse", "autoArrange", "children", "style", "otherProps", "forwardedRef", "currentBreakpoints", "elements", "pe", "arrange", "setArrange", "currentColumns", "setCurrentColumns", "currentGap", "setCurrentGap", "fe", "layout", "se", "arrayOfChildren", "j", "newLayout", "columnHeights", "getcolumnIndex", "index", "columnIndex", "element", "elementHeight", "child", "J", "temporaryElements", "addElement", "p", "column", "itemIndex", "Masonry", "Y", "MasonryLayout", "props", "_props_layers", "layers", "i", "layer", "addPropertyControls", "ControlType", "fontStore", "fonts", "css", "className"]
}
