{
  "version": 3,
  "sources": ["ssg:https://framer.com/m/framer/store.js@^1.0.0", "ssg:https://framer.com/m/framer/utils.js@^0.9.0", "ssg:https://framerusercontent.com/modules/8tDUzb3vBdl4rjhbRcEn/eeNt7oiLtt8ml7PORxZm/Examples.js"],
  "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", "export const centerContent = {\n    display: \"flex\",\n    justifyContent: \"center\",\n    alignItems: \"center\"\n};\nexport const autoSizingText = {\n    width: \"max-content\",\n    wordBreak: \"break-word\",\n    overflowWrap: \"break-word\",\n    overflow: \"hidden\",\n    whiteSpace: \"pre-wrap\",\n    flexShrink: 0\n};\nexport const defaultContainerStyles = {\n    ...centerContent,\n    overflow: \"hidden\"\n};\nexport const containerStyles = defaultContainerStyles;\nexport const randomColor = ()=>\"#\" + Math.floor(Math.random() * 16777215).toString(16)\n;\n\nexport const __FramerMetadata__ = {\"exports\":{\"centerContent\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"containerStyles\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"autoSizingText\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"defaultContainerStyles\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"randomColor\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}}}}\n//# sourceMappingURL=./Utils.map", "import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";import{randomColor}from\"https://framer.com/m/framer/utils.js@^0.9.0\";// Learn more: https://www.framer.com/developers/overrides/\nconst useStore=createStore({background:\"#0099FF\"});const HTML_IMAGE=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAFCAYAAABirU3bAAAAAXNSR0IArs4c6QAAAC5JREFUGFdjZEADjCD+B4b//1sYGBh6GBgZwQInT/7/72bOwPARJoCsC6wCGQAAyFcJBs7PDZkAAAAASUVORK5CYIIA\";const useHtmlStore=createStore({backgroundImage:HTML_IMAGE,shiftUp:\"0%\"});export function withRotate(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,animate:{rotate:90},transition:{duration:2}});};}export function withHover(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,whileHover:{scale:1.05}});};}export function withTextareaFieldSizing(Component){return props=>{const[id]=useState(()=>\"_\"+Math.random().toString(36).slice(2));return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{dangerouslySetInnerHTML:{__html:`.${id} textarea { field-sizing: content !important }`}}),/*#__PURE__*/_jsx(Component,{...props,className:[props.className,id].filter(Boolean).join(\" \"),style:{...props.style,\"field-sizing\":\"content\",height:\"auto\"}})]});};}export function withLineClamp3(Component){return props=>{const[id]=useState(()=>\"_\"+Math.random().toString(36).slice(2));return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{dangerouslySetInnerHTML:{__html:`.${id} p { line-clamp: 3 !important }`}}),/*#__PURE__*/_jsx(Component,{...props,className:[props.className,id].filter(Boolean).join(\" \"),style:{...props.style,lineClamp:\"3\"}})]});};}export function withNoOrphans(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,style:{...props.style,\"text-wrap\":\"pretty\"}});};}export function withHyphens(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,style:{...props.style,hyphens:\"auto\",\"text-wrap\":\"pretty\"}});};}export function withBalance(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,style:{...props.style,\"text-wrap\":\"balance\"}});};}export function withRandomColor(Component){return props=>{const[store,setStore]=useStore();return /*#__PURE__*/_jsx(Component,{...props,animate:{background:store.background},onClick:()=>{setStore({background:randomColor()});}});};}export function withOverride(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,children:props.override||props.value});};}export function HTMLBackground(props){useEffect(()=>{// if (window.__ftblur) return\nwindow.__ftblur=true;Object.assign(document.documentElement.style,{backgroundImage:`url(${props.image})`,backgroundSize:\"cover\",backgroundPosition:`center calc(${props.shift_up}%)`,backgroundRepeat:\"no-repeat\",imageRendering:\"pixelated\"});});return /*#__PURE__*/_jsx(\"div\",{});}HTMLBackground.defaultProps={image:HTML_IMAGE,shift_up:10,toggle:true};addPropertyControls(HTMLBackground,{toggle:{type:ControlType.Boolean,title:\"Toggle\",enabledTitle:\"Show\",disabledTitle:\"Hide\"},image:{type:ControlType.ResponsiveImage,title:\"Image\"},shift_up:{type:ControlType.Number,unit:\"%\",title:\"Shift up\",hidden(props){return props.toggle===false;}}});// hmmm\nexport function OrOverride(props){return /*#__PURE__*/_jsx(_Fragment,{children:props.override?props.truthy:props.falsey});}OrOverride.defaultProps={value:\"Value\",truthy:\"\",falsey:\"\"};addPropertyControls(OrOverride,{test:{type:ControlType.String,title:\"Test\"},truthy:{type:ControlType.ComponentInstance,title:\"Truthy\"},falsey:{type:ControlType.ComponentInstance,title:\"Falsey\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"HTMLBackground\":{\"type\":\"reactComponent\",\"name\":\"HTMLBackground\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"withNoOrphans\":{\"type\":\"reactHoc\",\"name\":\"withNoOrphans\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRandomColor\":{\"type\":\"reactHoc\",\"name\":\"withRandomColor\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withOverride\":{\"type\":\"reactHoc\",\"name\":\"withOverride\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withTextareaFieldSizing\":{\"type\":\"reactHoc\",\"name\":\"withTextareaFieldSizing\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRotate\":{\"type\":\"reactHoc\",\"name\":\"withRotate\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withBalance\":{\"type\":\"reactHoc\",\"name\":\"withBalance\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHover\":{\"type\":\"reactHoc\",\"name\":\"withHover\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withLineClamp3\":{\"type\":\"reactHoc\",\"name\":\"withLineClamp3\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"OrOverride\":{\"type\":\"reactComponent\",\"name\":\"OrOverride\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHyphens\":{\"type\":\"reactHoc\",\"name\":\"withHyphens\",\"annotations\":{\"fram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AAU,CAAC,OAAOC,GAA4BK,EAAKN,EAAU,CAAC,GAAGC,EAAM,MAAM,CAAC,GAAGA,EAAM,MAAM,YAAY,SAAS,CAAC,CAAC,CAAI,CAA6X,SAASU,EAAeC,EAAM,CAAC,OAAAC,EAAU,IAAI,CAChzEC,EAAO,SAAS,GAAK,OAAO,OAAO,SAAS,gBAAgB,MAAM,CAAC,gBAAgB,OAAOF,EAAM,KAAK,IAAI,eAAe,QAAQ,mBAAmB,eAAeA,EAAM,QAAQ,KAAK,iBAAiB,YAAY,eAAe,WAAW,CAAC,CAAE,CAAC,EAAsBG,EAAK,MAAM,CAAC,CAAC,CAAE,CAACJ,EAAe,aAAa,CAAC,MAAMK,EAAW,SAAS,GAAG,OAAO,EAAI,EAAEC,EAAoBN,EAAe,CAAC,OAAO,CAAC,KAAKO,EAAY,QAAQ,MAAM,SAAS,aAAa,OAAO,cAAc,MAAM,EAAE,MAAM,CAAC,KAAKA,EAAY,gBAAgB,MAAM,OAAO,EAAE,SAAS,CAAC,KAAKA,EAAY,OAAO,KAAK,IAAI,MAAM,WAAW,OAAON,EAAM,CAAC,OAAOA,EAAM,SAAS,EAAM,CAAC,CAAC,CAAC,EACpnB,SAASO,EAAWP,EAAM,CAAC,OAAoBG,EAAKK,EAAU,CAAC,SAASR,EAAM,SAASA,EAAM,OAAOA,EAAM,MAAM,CAAC,CAAE,CAACO,EAAW,aAAa,CAAC,MAAM,QAAQ,OAAO,GAAG,OAAO,EAAE,EAAEF,EAAoBE,EAAW,CAAC,KAAK,CAAC,KAAKD,EAAY,OAAO,MAAM,MAAM,EAAE,OAAO,CAAC,KAAKA,EAAY,kBAAkB,MAAM,QAAQ,EAAE,OAAO,CAAC,KAAKA,EAAY,kBAAkB,MAAM,QAAQ,CAAC,CAAC",
  "names": ["createStore", "state1", "dataStore", "Data", "setDataStore", "newState", "storeState", "storeSetters", "setStoreState", "setter", "useStore", "state", "setState", "ye", "ue", "useObserveData", "centerContent", "defaultContainerStyles", "centerContent", "useStore", "createStore", "HTML_IMAGE", "useHtmlStore", "withTextareaFieldSizing", "Component", "props", "id", "ye", "u", "l", "p", "withLineClamp3", "withNoOrphans", "withHyphens", "withBalance", "HTMLBackground", "props", "ue", "window", "p", "HTML_IMAGE", "addPropertyControls", "ControlType", "OrOverride", "l"]
}
