{"version":3,"file":"Utils-QTIc.CCcB2REa.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/vj7bFUjvEQFgEzNBkdoG/vf3CKm378wlVcBk7IhSU/createStore.js","https:/framer.com/m/framer/store.js@^1.0.0","https:/framerusercontent.com/modules/PN5c9Lm200xYeKxP2Gcy/PVRWqcAS5FromVQ03eYl/Utils.js","https:/framer.com/m/Utils-QTIc.js@PVRWqcAS5FromVQ03eYl"],"sourcesContent":["import{useState,useEffect}from\"react\";import{Data,useObserveData}from\"framer\";export function createStore(state1){// Use Data so that a Preview reload resets the state\nconst dataStore=Data({state:Object.freeze({...state1})});// Create a set function that updates the state\nconst setDataStore=newState=>{// If the state is an object, make sure we copy it\nif(typeof newState===\"function\"){newState=newState(dataStore.state);}dataStore.state=Object.freeze({...dataStore.state,...newState});};// Store the initial state, copy the object if it's an object\nlet storeState=typeof state1===\"object\"?Object.freeze({...state1}):state1;// Keep a list of all the listeners, in the form of React hook setters\nconst storeSetters=new Set();// Create a set function that updates all the listeners / setters\nconst setStoreState=newState=>{// If the state is an object, make sure we copy it\nif(typeof newState===\"function\"){newState=newState(storeState);}storeState=typeof newState===\"object\"?Object.freeze({...storeState,...newState}):newState;// Update all the listeners / setters with the new value\nstoreSetters.forEach(setter=>setter(storeState));};// Create the actual hook based on everything above\nfunction useStore(){// Create the hook we are going to use as a listener\nconst[state,setState]=useState(storeState);// If we unmount the component using this hook, we need to remove the listener\n// @ts-ignore\nuseEffect(()=>{// But right now, we need to add the listener\nstoreSetters.add(setState);return()=>storeSetters.delete(setState);},[]);// If Data context exists, use Data, otherwise use vanilla React state\nif(useObserveData()===true){useObserveData();return[dataStore.state,setDataStore];}else{// Return the state and a function to update the central store\nreturn[state,setStoreState];}}return useStore;}\nexport const __FramerMetadata__ = {\"exports\":{\"createStore\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./createStore.map","/*\n * createStore (framer/store@1.0.1)\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://framerusercontent.com/modules/vj7bFUjvEQFgEzNBkdoG/vf3CKm378wlVcBk7IhSU/createStore.js\"\n","import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{ControlType}from\"framer\";import{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";export const updateChildren=(children,properties)=>{return[{...children,props:{...children.props,children:{...children.props.children,props:{...children.props.children.props,children:{...children.props.children.props.children,props:{...children.props.children.props.children.props,...properties}}}}}}];};export const SettingsMessage=({icon=\"✨\",title,description,containerStyle})=>{return /*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"column\",alignItems:\"center\",textAlign:\"center\",justifyContent:\"center\",backgroundColor:\"rgba(136, 85, 255, 0.1)\",overflow:\"hidden\",...containerStyle},children:[/*#__PURE__*/_jsx(\"span\",{role:\"img\",\"aria-label\":\"icon\",style:{fontSize:\"32px\"},children:icon}),/*#__PURE__*/_jsxs(\"div\",{style:{maxWidth:\"240px\"},children:[/*#__PURE__*/_jsx(\"h1\",{style:{fontSize:11,color:\"#96F\",fontWeight:600},children:title}),/*#__PURE__*/_jsx(\"p\",{style:{fontSize:11,color:\"rgba(153, 102, 255, 0.7)\",lineHeight:1.5},children:description})]})]});};export const getBorder=border=>{if(!border)return{border:\"none\"};const{width,color,style}=border;return{borderWidth:width,borderColor:color,borderStyle:style};};export const borderProperty=(title=\"Border\",width=\"0px\",color=\"#fff\")=>({title,type:ControlType.Object,controls:{width:{title:\"Width\",type:ControlType.Padding,defaultValue:width},color:{title:\"Color\",type:ControlType.Color,defaultValue:color},style:{type:ControlType.Enum,defaultValue:\"solid\",options:[\"solid\",\"dashed\",\"dotted\",\"double\"],optionTitles:[\"Solid\",\"Dashed\",\"Dotted\",\"Double\"]}}});export const getBoxShadow=property=>{const{x,y,blur,color}=property.shadow;return`${x}px ${y}px ${blur}px ${color}`;};export const shadowProperty={type:ControlType.Object,controls:{color:{title:\"Color\",type:ControlType.Color,defaultValue:\"#bfbfbf\"},x:{title:\"X\",type:ControlType.Number,defaultValue:0,min:-100,max:100},y:{title:\"Y\",type:ControlType.Number,defaultValue:0,min:-100,max:100},blur:{title:\"Blur\",type:ControlType.Number,defaultValue:0,min:0,max:100}}};export const heightProperty={height:{type:ControlType.Enum,defaultValue:\"auto\",displaySegmentedControl:true,options:[\"auto\",\"fixed\"],optionTitles:[\"Auto\",\"Fixed\"]},heightNumber:{title:\" \",type:ControlType.Number,defaultValue:50,hidden(props){return props.height===\"auto\";}}};export const getHeight=property=>{if(property.height===\"auto\"){return property.height;}else{return`${property.heightNumber}px`;}};export const getPageQueryParam=()=>{const urlParams=new URLSearchParams(window.location.search);const pageParam=urlParams.get(\"page\");return pageParam?parseInt(pageParam,10):1;};export const updatePageQueryParam=newPage=>{const url=new URL(window.location.href);url.searchParams.set(\"page\",newPage);window.history.replaceState({},\"\",url.toString());};export const scrollToTop=(withScroll,scrollTop,scrollBehavior)=>{if(withScroll){window.scrollTo({top:scrollTop,behavior:scrollBehavior});}};//Pagination\nexport const usePaginationStore=createStore({});//Table of Content\nexport const useTableOfContentStore=createStore({headings:[],scrollOffsetY:0});\nexport const __FramerMetadata__ = {\"exports\":{\"getPageQueryParam\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useTableOfContentStore\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"usePaginationStore\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"getHeight\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"heightProperty\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"borderProperty\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"shadowProperty\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"updateChildren\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"scrollToTop\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"SettingsMessage\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"getBoxShadow\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"getBorder\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"updatePageQueryParam\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Utils.map","/*\n * Utils\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://framerusercontent.com/modules/PN5c9Lm200xYeKxP2Gcy/PVRWqcAS5FromVQ03eYl/Utils.js\"\n"],"mappings":"mMAA8E,SAAgB,EAAY,EAAO,CACjH,IAAM,EAAU,EAAK,CAAC,MAAM,OAAO,OAAO,CAAC,GAAG,CAAM,CAAC,CAAC,CAAC,EACjD,EAAa,GAAU,CAC1B,OAAO,GAAW,aAAY,EAAS,EAAS,EAAU,KAAK,GAAG,EAAU,MAAM,OAAO,OAAO,CAAC,GAAG,EAAU,MAAM,GAAG,CAAQ,CAAC,CAAE,EACjI,EAAW,OAAO,GAAS,SAAS,OAAO,OAAO,CAAC,GAAG,CAAM,CAAC,EAAE,EAC7D,EAAa,IAAI,IACjB,EAAc,GAAU,CAC3B,OAAO,GAAW,aAAY,EAAS,EAAS,CAAU,GAAG,EAAW,OAAO,GAAW,SAAS,OAAO,OAAO,CAAC,GAAG,EAAW,GAAG,CAAQ,CAAC,EAAE,EACjJ,EAAa,QAAQ,GAAQ,EAAO,CAAU,CAAC,CAAE,EACjD,SAAS,GAAU,CACnB,GAAK,CAAC,EAAM,GAAUA,EAAS,CAAU,EAKzC,OAHA,OACA,EAAa,IAAI,CAAQ,MAAY,EAAa,OAAO,CAAQ,GAAI,CAAC,CAAC,EACpE,EAAe,IAAI,IAAM,EAAe,EAAQ,CA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