{"version":3,"file":"Examples.BzrbP09t.mjs","names":["useState","_Fragment","useState","useRef","useCallback"],"sources":["https:/framerusercontent.com/modules/vj7bFUjvEQFgEzNBkdoG/vf3CKm378wlVcBk7IhSU/createStore.js","https:/framer.com/m/framer/store.js@^1.0.0","https:/framerusercontent.com/modules/28rXvpPsrum7FH6cMELS/1jCAazZw1EGHjrG5Nu5D/Utils.js","https:/framer.com/m/framer/utils.js@^0.9.0","https:/framerusercontent.com/modules/b7Ww0h8YRxBwGmxCT5bn/6Lb7b8Q34RA1Kfi0kGUM/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","/*\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","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","/*\n * Utils (framer/utils@0.9.0)\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://framerusercontent.com/modules/28rXvpPsrum7FH6cMELS/1jCAazZw1EGHjrG5Nu5D/Utils.js\"\n","import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{forwardRef,useCallback,useEffect,useRef,useState}from\"react\";import{createPortal}from\"react-dom\";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\"});export function withRotate(Component){return /*#__PURE__*/forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(Component,{ref:ref,...props,animate:{rotate:90},transition:{duration:2}});});}export function withHover(Component){return /*#__PURE__*/forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(Component,{ref:ref,...props,whileHover:{scale:1.05}});});}export function withRandomColor(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[store,setStore]=useStore();return /*#__PURE__*/_jsx(Component,{ref:ref,...props,animate:{background:store.background},onClick:()=>{setStore({background:randomColor()});}});});}// Stable public anchors on existing Home sections; no click or scroll handlers.\nexport function withHomeWorksAnchor(Component){return /*#__PURE__*/forwardRef((props,ref)=>{return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:'@media(max-width:767px){#works>[data-framer-name=\"Projects / List / Auto Layout\"]{gap:96px!important;}}'}),/*#__PURE__*/_jsx(Component,{ref:ref,...props,id:\"works\"})]});});}export function withHomeContactAnchor(Component){return /*#__PURE__*/forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(Component,{ref:ref,...props,id:\"contact\"});});}/** One reusable copy action for existing email links. No navigation or message sending. */export function withCopyEmail(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[feedback,setFeedback]=useState(\"\");const[ownerDocument,setOwnerDocument]=useState(null);const timer=useRef();const[element,setElement]=useState(null);const mergedRef=useCallback(node=>{setElement(node);if(typeof ref===\"function\")ref(node);else if(ref)ref.current=node;},[ref]);useEffect(()=>()=>{if(timer.current)clearTimeout(timer.current);},[]);const copy=useCallback(async event=>{event.preventDefault();event.stopPropagation();const target=event.currentTarget;const doc=target.ownerDocument;const email=\"mamichevalada@gmail.com\";setOwnerDocument(doc);if(timer.current)clearTimeout(timer.current);setFeedback(\"\");let success=false;try{await doc.defaultView.navigator.clipboard.writeText(email);success=true;}catch{// Preview iframes may deny the Clipboard API. Keep a user-initiated fallback.\nconst field=doc.createElement(\"textarea\");field.value=email;field.setAttribute(\"readonly\",\"\");field.style.cssText=\"position:fixed;left:0;top:0;width:1px;height:1px;opacity:0\";doc.body.appendChild(field);field.select();try{success=doc.execCommand(\"copy\");}catch{}field.remove();target.focus({preventScroll:true});}setFeedback(success?\"Почта скопирована\":\"Скопируйте адрес: \"+email);if(success)timer.current=setTimeout(()=>setFeedback(\"\"),4e3);},[]);useEffect(()=>{if(!element?.addEventListener||element.tagName===\"BUTTON\")return;const onKeyDown=event=>{if(event.key!==\"Enter\"&&event.key!==\" \")return;event.preventDefault();event.stopPropagation();if(!event.repeat)void copy(event);};element.addEventListener(\"keydown\",onKeyDown,true);return()=>element.removeEventListener(\"keydown\",onKeyDown,true);},[element,copy]);return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(Component,{...props,ref:mergedRef,role:\"button\",style:{...props.style,cursor:\"pointer\"},tabIndex:0,title:\"Скопировать почту\",\"aria-label\":\"Скопировать почту: mamichevalada@gmail.com\",onClickCapture:copy}),ownerDocument&&/*#__PURE__*/createPortal(/*#__PURE__*/_jsx(\"div\",{role:\"status\",\"aria-live\":\"polite\",\"aria-atomic\":\"true\",style:{position:\"fixed\",zIndex:1e3,left:\"50%\",bottom:24,transform:\"translateX(-50%)\",maxWidth:\"calc(100% - 32px)\",padding:feedback?\"12px 18px\":0,borderRadius:12,background:\"#131314\",color:\"#F8F7F3\",fontFamily:\"Inter, Arial, sans-serif\",fontSize:14,lineHeight:\"20px\",textAlign:\"center\",boxSizing:\"border-box\",overflowWrap:\"anywhere\",pointerEvents:feedback?\"auto\":\"none\"},children:feedback}),ownerDocument.body)]});});}/** Assign only to a media caption or a gallery containing its own caption. */export function withMediaCaption(Component){return /*#__PURE__*/forwardRef((props,ref)=>/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:`@media(max-width:767px){\n            .clario-responsive-root .case-media-caption[data-framer-name] h2,\n            .clario-responsive-root .case-media-caption[data-framer-name] h3 {\n                font-size:26px!important;line-height:32px!important;\n            }\n        }`}),/*#__PURE__*/_jsx(Component,{...props,ref:ref,className:[props.className,\"case-media-caption\"].filter(Boolean).join(\" \")})]}));}\nexport const __FramerMetadata__ = {\"exports\":{\"withHover\":{\"type\":\"reactHoc\",\"name\":\"withHover\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHomeContactAnchor\":{\"type\":\"reactHoc\",\"name\":\"withHomeContactAnchor\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRandomColor\":{\"type\":\"reactHoc\",\"name\":\"withRandomColor\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withCopyEmail\":{\"type\":\"reactHoc\",\"name\":\"withCopyEmail\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRotate\":{\"type\":\"reactHoc\",\"name\":\"withRotate\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHomeWorksAnchor\":{\"type\":\"reactHoc\",\"name\":\"withHomeWorksAnchor\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withMediaCaption\":{\"type\":\"reactHoc\",\"name\":\"withMediaCaption\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Examples.map"],"mappings":"mOAA8E,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,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