{"version":3,"file":"Masonry_Layout.CZ18cDrE.mjs","names":["defaultEmptyStateStyle","useState","useRef","React"],"sources":["https:/framerusercontent.com/modules/cuQH4dmpDnV8YK1mSgQX/tTLhbOFToDhKcwOVmn8E/useFontControls.js","https:/framerusercontent.com/modules/afBE9Yx1W6bY5q32qPxe/AAh30yXzt1DUsOi1YwUY/useRenderTarget.js","https:/framerusercontent.com/modules/G4IfyjvwmaeSBpdb4TWu/Pk7RhKpPAlu4xr8tiZYq/index.js","https:/framer.com/m/framer/default-utils.js@^0.43.0","https:/framerusercontent.com/modules/ZORE1BBUY4n4vHC0WFDH/bnwaYkSw2e4q5eLH4jPK/styles.js","https:/framer.com/m/framer/integrations-styles.js@0.2.0","https:/framerusercontent.com/modules/Sgny8a1hxufC0CW4sw7y/ge9DeOBixm4ccPbiVABL/Masonry_Layout.js"],"sourcesContent":["// @ts-ignore\nimport { fontStore } from \"framer\";\nimport { useEffect } from \"react\";\n// @ts-ignore\nimport { fontStack } from \"https://framerusercontent.com/modules/VTUDdizacRHpwbkOamr7/AykinQJbgwl92LvMGZwu/constants.js\";\nconst fontWeights = {\n    100: \"Thin\",\n    200: \"Extra-light\",\n    300: \"Light\",\n    400: \"Regular\",\n    500: \"Medium\",\n    600: \"Semi-bold\",\n    700: \"Bold\",\n    800: \"Extra-bold\",\n    900: \"Black\"\n};\nexport function useFontControls(props) {\n    const { fontFamily , fontSize , fontWeight , font  } = props;\n    const fontWeightName = fontWeights[fontWeight];\n    const customFontStack = `\"${fontFamily} ${fontWeightName}\", \"${fontFamily}\", ${fontStack}`;\n    const fontFamilyStyle = fontFamily ? {\n        fontSize,\n        fontWeight,\n        fontFamily: customFontStack\n    } : {\n        fontSize,\n        fontWeight\n    };\n    const fetchCustomFonts = async ()=>{\n        await fontStore.loadWebFontsFromSelectors([\n            `CUSTOM;${fontFamily}`,\n            `CUSTOM;${fontFamily} ${fontWeightName}`,\n            `GF;${fontFamily}-${fontWeightName.toLowerCase()}`, \n        ]).catch((e)=>console.error(e)\n        );\n    };\n    useEffect(()=>{\n        if (font) fetchCustomFonts();\n    }, [\n        font,\n        fontFamily,\n        fontWeight\n    ]);\n    return fontFamilyStyle;\n}\n\nexport const __FramerMetadata__ = {\"exports\":{\"useFontControls\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}}}}\n//# sourceMappingURL=./useFontControls.map","import { useMemo } from \"react\";\nimport { RenderTarget } from \"framer\";\nexport function useRenderTarget() {\n    const currentRenderTarget = useMemo(()=>RenderTarget.current()\n    , []);\n    return currentRenderTarget;\n}\nexport function useIsInPreview() {\n    const inPreview = useMemo(()=>RenderTarget.current() === RenderTarget.preview\n    , []);\n    return inPreview;\n}\n\nexport const __FramerMetadata__ = {\"exports\":{\"useIsInPreview\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useRenderTarget\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}}}}\n//# sourceMappingURL=./useRenderTarget.map","import { defaultEvents, localeOptions, fontControls, fontSizeOptions, emptyStateStyle, containerStyles, fontStack } from \"https://framerusercontent.com/modules/VTUDdizacRHpwbkOamr7/AykinQJbgwl92LvMGZwu/constants.js\";\nimport { useOnEnter, useOnExit } from \"https://framerusercontent.com/modules/D4TWeLfcxT6Tysr2BlYg/iZjmqdxVx1EOiM3k1FaW/useOnNavigationTargetChange.js\";\nimport { useConstant } from \"https://framerusercontent.com/modules/ExNgrA7EJTKUPpH6vIlN/eiOrSJ2Ab5M9jPCvVwUz/useConstant.js\";\nimport { colorTokentoValue, colorFromToken } from \"https://framerusercontent.com/modules/D2Lz5CmnNVPZFFiZXalt/QaCzPbriZBfXWZIIycFI/colorFromToken.js\";\nimport { isMotionValue } from \"https://framerusercontent.com/modules/3mKFSGQqKHV82uOV1eBc/5fbRLvOpxZC0JOXugvwm/isMotionValue.js\";\nimport { useUniqueClassName, randomID } from \"https://framerusercontent.com/modules/xDiQsqBGXzmMsv7AlEVy/uhunpMiNsbXxzjlXsg1y/useUniqueClassName.js\";\nimport { getVariantControls } from \"https://framerusercontent.com/modules/ETACN5BJyFTSo0VVDJfu/NHRqowOiXkF9UwOzczF7/variantUtils.js\";\nimport { useIsBrowserSafari } from \"https://framerusercontent.com/modules/eMBrwoqQK7h6mEeGQUH8/GuplvPJVjmxpk9zqOTcb/isBrowser.js\";\nimport { useMultiOnChange, useOnChange } from \"https://framerusercontent.com/modules/v9AWX2URmiYsHf7GbctE/XxKAZ9KlhWqf5x1JMyyF/useOnChange.js\";\nimport { mstoMinAndSec, secondsToMinutes } from \"https://framerusercontent.com/modules/4zHZnO5JojN1PrIbu2jm/revv9QCWpkh8lPzi2jje/time.js\";\nimport { useAutoMotionValue } from \"https://framerusercontent.com/modules/kNDwabfjDEb3vUxkQlZS/fSIr3AOAYbGlfSPgXpYu/useAutoMotionValue.js\";\nimport { useFontControls } from \"https://framerusercontent.com/modules/cuQH4dmpDnV8YK1mSgQX/tTLhbOFToDhKcwOVmn8E/useFontControls.js\";\nimport { useRenderTarget, useIsInPreview } from \"https://framerusercontent.com/modules/afBE9Yx1W6bY5q32qPxe/AAh30yXzt1DUsOi1YwUY/useRenderTarget.js\";\nimport { useControlledState } from \"https://framerusercontent.com/modules/zGkoP8tPDCkoBzMdt5uq/0zFSjxIYliHxrQQnryFX/useControlledState.js\";\nimport { usePadding, useRadius, paddingControl, borderRadiusControl } from \"https://framerusercontent.com/modules/5SM58HxZHxjjv7aLMOgQ/WXz9i6mVki0bBCrKdqB3/propUtils.js\";\nimport { detectAutoSizingAxis } from \"https://framerusercontent.com/modules/8CkHAZatUz1UR8jNTcfD/HwbnIAZlUmQ2oTpcLkaH/detectAutoSizingAxis.js\";\nexport { useOnEnter, useOnExit, defaultEvents, isMotionValue, colorFromToken, colorTokentoValue, localeOptions, fontControls, fontSizeOptions, emptyStateStyle, containerStyles, fontStack, useUniqueClassName, getVariantControls, useIsBrowserSafari, randomID, useConstant, useMultiOnChange, useOnChange, usePadding, useRadius, paddingControl, borderRadiusControl, mstoMinAndSec, useFontControls, secondsToMinutes, useAutoMotionValue, useRenderTarget, useIsInPreview, useControlledState, detectAutoSizingAxis,  };\n\nexport const __FramerMetadata__ = {\"exports\":{\"fontControls\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"mstoMinAndSec\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"colorTokentoValue\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useFontControls\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useUniqueClassName\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"paddingControl\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"localeOptions\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"fontStack\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"detectAutoSizingAxis\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useRenderTarget\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useOnEnter\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"emptyStateStyle\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useIsBrowserSafari\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"getVariantControls\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useAutoMotionValue\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"randomID\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useOnExit\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useIsInPreview\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useRadius\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"usePadding\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useMultiOnChange\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"containerStyles\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"fontSizeOptions\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"defaultEvents\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useConstant\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"isMotionValue\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useOnChange\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useControlledState\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"borderRadiusControl\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"colorFromToken\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"secondsToMinutes\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}}}}","/*\n * index (framer/default-utils@0.43.0)\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://framerusercontent.com/modules/G4IfyjvwmaeSBpdb4TWu/Pk7RhKpPAlu4xr8tiZYq/index.js\"\n","import{containerStyles,emptyStateStyle as defaultEmptyStateStyle}from\"https://framer.com/m/framer/default-utils.js@^0.43.0\";export const emptyStateStyle={...containerStyles,...defaultEmptyStateStyle,textAlign:\"center\",padding:15,width:200,height:100,overflow:\"hidden\"};export const neutralStateStyle={...emptyStateStyle,color:\"#09f\",background:\"rgb(0, 153, 255, 0.1)\",borderColor:\"#09f\"};export const stateTitleStyle={fontSize:12,fontWeight:600,margin:0};export const stateParagraphStyle={fontSize:12,maxWidth:200,lineHeight:1.4,margin:\"5px 0 0 0\"};\nexport const __FramerMetadata__ = {\"exports\":{\"neutralStateStyle\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"stateTitleStyle\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"emptyStateStyle\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"stateParagraphStyle\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./styles.map","/*\n * styles (framer/integrations-styles@0.2.0)\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://framerusercontent.com/modules/ZORE1BBUY4n4vHC0WFDH/bnwaYkSw2e4q5eLH4jPK/styles.js\"\n","import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import React from\"react\";import{emptyStateStyle,stateParagraphStyle,stateTitleStyle}from\"https://framer.com/m/framer/integrations-styles.js@0.2.0\";/////////////////////////////\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// Modified for CMS support by Fehmi Özüseven (twitter.com/fhmi)\n//\n// Copyright (c) 2021 Nikolay Goncharuk\n// MIT License\nimport{useState,useLayoutEffect,useEffect,useRef,forwardRef}from\"react\";function getCurrentBreakpoints(breakpoints,width){const normalizedBreakpoints=breakpoints&&Object.entries(breakpoints).sort((a,b)=>b[1]-a[1]);return 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.innerWidthh)\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?.find(item=>param[item]!==undefined);return breakpoint!==undefined?param[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 hostname=document.location.hostname;const isFramerDomain=hostname.endsWith(\".framercanvas.com\")||hostname.startsWith(\"screenshot.framer.\");if(isFramerDomain)return;fetch(\"https://reframer.net/be/events/usage.php\",{method:\"POST\",headers:{\"Content-Type\":\"application/json\"},body:JSON.stringify({domain:hostname,component:\"Masonry\"})}).catch(error=>{console.warn(\"Usage tracking failed:\",error);});},[]);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 newLayout=Array.from({length:currentColumns},()=>{return[];});const columnHeights=newLayout.map(()=>0);function generateLayout({arrange,autoArrange,children,currentColumns,reverse,elements}){if(currentColumns<1)return[];const arrayOfChildren=React.Children.toArray(children);if(reverse)arrayOfChildren.reverse();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?.element.getBoundingClientRect().height;columnHeights[columnIndex]+=elementHeight||0;return columnIndex;}return index%currentColumns;};arrayOfChildren.forEach((child,index)=>{if(child&&/*#__PURE__*/React.isValidElement(child)){newLayout[getcolumnIndex(index)].push({element:child,index});}});return newLayout;}//console.log(\"children\", children)\ntry{children=children.props.children.type({query:children.props.children.props.query,children:children.props.children.props.children});children=children.props.children;}catch(e){try{children=children.type({query:children.props.query,children:children.props.children});children=children.props.children;//console.log(\"resssooooo\", children)\n}catch(e){children=children?.[0]?.props?.children?.[0]?.props?.children||children?.[0]?.props?.children||children?.props?.children||children;}}// Usage\nconst layout=generateLayout({arrange,autoArrange,children,currentColumns,reverse,elements});let minValue=Math.min(...columnHeights);let maxValue=Math.max(...columnHeights);//\n//\n// fix for masonry rearrangement\n//\n//\nif(typeof document!==\"undefined\"&&typeof window!==\"undefined\"){// this works on first load and every cms page change\nif(elements.current.length==0){// console.log(\"first things firsr\")\nwindow.firstRearrange=false;window.lastRearrange=false;window.imagesLoaded=false;}if(document.querySelector(\"head title\")&&!window.imagesLoaded&&document.images.length>1){window.imagesLoaded=\"loading\";// console.log(document.images.length)\nPromise.all(Array.from(document.images).map(img=>{if(img.complete)return Promise.resolve(true);return new Promise(resolve=>{img.addEventListener(\"load\",()=>resolve(true));img.addEventListener(\"error\",()=>resolve(false));});})).then(results=>{setTimeout(function(){window.imagesLoaded=\"loaded\";setArrange(false);// console.log(\"images are loaded and fixed\")\n},222);});}else if(document.querySelector(\"head title\")&&!window.firstRearrange&&document.images.length>1){window.firstRearrange=true;// console.log(\"first rearrange before load images\")\nif(window.lastPhoto&&document.querySelector(\"[href$='\"+window.lastPhoto.lastPhotoSrc+\"']\")){let elPos=document.querySelector(\"[href$='\"+window.lastPhoto.lastPhotoSrc+\"']\").getBoundingClientRect().top;window.scrollTo(0,elPos-80);}setArrange(false);}else if(document.querySelector(\"head title\")&&!window.lastRearrange&&window.imagesLoaded==\"loaded\"){window.lastRearrange=true;// console.log(\"for browser/preview, after images loaded\")\nsetTimeout(function(){setArrange(false);setTimeout(function(){setArrange(true);},350);},750);}//\n// fix for editor\n//\nif(!document.querySelector(\"head title\")&&layout.length>1&&layout[layout.length-1].length==0){setTimeout(function(){setArrange(false);setTimeout(function(){setArrange(true);},500);},500);}}const temporaryElements=[];const addElement=index=>element=>{if(element!==null){temporaryElements.push({element,index});elements.current=temporaryElements;}};function EmptyState({title,description}){return /*#__PURE__*/_jsxs(\"div\",{style:{...emptyStateStyle,width:\"100%\",height:\"100%\"},children:[/*#__PURE__*/_jsx(\"h1\",{style:{...stateTitleStyle},children:title}),/*#__PURE__*/_jsx(\"p\",{style:{...stateParagraphStyle},children:description})]});}return /*#__PURE__*/_jsx(\"div\",{ref:forwardedRef,style:{display:\"flex\",gap:currentGap,// opacity: opacity,\n...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 any\n * @framerDisableUnlink\n */export default function MasonryLayout(props,a){function EmptyState({title,description}){return /*#__PURE__*/_jsxs(\"div\",{style:{...emptyStateStyle,width:\"100%\",height:\"300px\"},children:[/*#__PURE__*/_jsx(\"h1\",{style:{...stateTitleStyle},children:title}),/*#__PURE__*/_jsx(\"p\",{style:{...stateParagraphStyle},children:description})]});}if(props.layers.length==0){console.log(\"no layer\");return EmptyState({title:\"Masonry Layout\",description:\"Connect a collection list to present it in a masonry layout.\"});}// const ref = React.createRef<HTMLDivElement>()\nlet layers=[];const[arrange,setArrange]=useState(false);useEffect(()=>{//console.log(\"hee 2\")\nsetTimeout(function(){setArrange(true);},1e3);});console.log(\"render\",props);if(props.columnWidth==\"fill\"){try{console.log(\"try 1\");var resolved=props.layers[0].props.children.type({query:props.layers[0].props.children.props.query,children:props.layers[0].props.children.props.children});// console.log(\"resssooooo\", resolved)\nlayers=resolved;}catch(e){try{console.log(\"try 2\");if(props.layers.length==0){return;}//console.log(\"props layers: \", props.layers)\n//console.log(\n//    props.layers[0].type,\n//    props.layers[0].props.query,\n//    props.layers[0].props.children\n//)\ntry{console.log(\"try 3\");var resolved=props.layers[0].type({query:props.layers[0].props.query,children:props.layers[0].props.children});//console.log(props.layers[0])\n//console.log(\"resolved\", resolved)\nfor(let i=0;i<resolved.props.children.length;i++){let layer=resolved.props.children[i];if(!layer.props.style){layer.props.style={};}layer.props.style.width=\"100%\";layers.push(layer);}}catch(e){if(props.layers[0].props.__node.cache){/*\n\n                        editör paylayınca bu trylar ile oyna\n                        children'ı bulman lazım\n                        en son props.layers[0].props.__node.cache.htmlElement, props.layers[0].props.__node.cache.elements olarak değişmişti ondan patladı mesela\n\n\n                        *///console.log(\n//    props.layers[0].props.__node.cache.htmlElement\n//)\ntry{console.log(\"try 5\");let key=Object.keys(props.layers[0].props.__node.cache.elements)[0];let key2=Object.keys(props.layers[0].props.__node.cache.elements[key])[0];var children=props.layers[0].props.__node.cache.elements[key][key2].memoizedProps.children[0].props.children.props.children[1].props.children[0].props.children;console.log(children,\"alooo\");}catch(e){console.log(\"try 6\");let key=Object.keys(props.layers[0].props.__node.cache.htmlElement)[0];var children=props.layers[0].props.__node.cache.htmlElement[key].memoizedProps.children[0].props.children.props.children[1].props.children;}for(let i=0;i<children.length;i++){let layer=children[i];if(!layer.props.style){layer.props.style={};}layer.props.style.width=\"100%\";layers.push(layer);}}else{layers=props.layers[0];}}}catch(e){}}}/*\n     else {\n        console.log(\"haydar\")\n        layers = props.layers\n    }\n    */if(layers.length==0){layers=props.layers[0];}console.log(props,layers);if(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:\"fill\",autoArrange:true,gap:10};addPropertyControls(MasonryLayout,{layers:{type:ControlType.ComponentInstance,title:\"Collection\"},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,hidden(props){return props.columnWidth==\"fill\";}},autoArrange:{type:ControlType.Boolean,defaultValue:true,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\",\"framerDisableUnlink\":\"\",\"framerSupportedLayoutHeight\":\"any\",\"framerSupportedLayoutWidth\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Masonry_Layout.map"],"mappings":"gYACkC,IACD,IAEuF,iBCJzF,IACM,iBCDkL,IACjE,IAC1B,IACyB,IACrB,IACoB,IAChB,IACH,IACa,IAEJ,IACN,IACgB,IACV,IAC+B,wCEd9C,EAAc,EAAgB,CAAC,GAAG,EAAgB,GAAGA,EAAuB,UAAU,SAAS,QAAQ,GAAG,MAAM,IAAI,OAAO,IAAI,SAAS,QAAQ,EAAqD,CAAnB,GAAG,CAAsB,EAA2E,EAAgB,CAAC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