{"version":3,"file":"ResearchCodeAnimation.BxL4uSCD.mjs","names":["mask","SVG","getProps","Icon","React.forwardRef","mask","SVG","getProps","Icon","React.forwardRef","React.forwardRef","React","FramerNS","FramerMotion","useState","useRef","React.Component","__esmMin","npm_react_18_3_1_exports","init_npm_react_18_3_1","de","init_jsx_runtime","J","I","p","ce","_e","motion","init_framer_motion_DhsWWWsN","framer_motion_DhsWWWsN_exports","withCSS","cx","addPropertyControls","useSVGTemplate","framer_CKT6jEEQ_exports","RenderTarget","ControlType","init_framer_CKT6jEEQ","mask$2","SVG$2","getProps$2","Icon$2","init_D2D_yREOm","rest","props","animated","stroke","restProps","className","UO5clYVeQ","style","mask$1","SVG$1","getProps$1","Icon$1","init_oz_0V7vZB","mask","Base","MotionSVG","SVG","svg","getProps","Icon","init_HbzxRJMyi","color","width1","alpha","href","qxTvv_EBh","ezTt3ayMo","lschgej4H","_define_property","key","obj","value","compileComponent","compiled","code","loadSucrase","out","transform","mod","name","ex","Comp","v","useNearViewport","near","setNear","immediate","enabled","el","ref","io","entries","parseRatio","m","n","ResearchCodeAnimation","SITE_LIGHT_GREY","isCanvas","text","isHtml","setComp","error","setError","live","C","e","aspect","ratio","showPoster","poster","label","fill","background","emptyStyle","Boundary","SUCRASE_URL","sucrasePromise","init_ResearchCodeAnimation","args"],"sources":["https:/framerusercontent.com/modules/LAmhaAGNB6pY95cwMjf5/KQVv8Yae7gknwdziI7Kq/D2D_yREOm.js","https:/framerusercontent.com/modules/QBSSuOAlw3NS8LzLLeKV/0c5XUL0wfsMx4wVz4rtn/oz_0V7vZB.js","https:/framerusercontent.com/modules/sPPEJJGDR4eUvdon1Bel/f3XESni8XlI3ypQ6Exdb/HbzxRJMyi.js","https:/framerusercontent.com/modules/PO9wDBlMUS4aDuB6R5Z0/yP0C9nGHxPfBnQveqWVY/ResearchCodeAnimation.js"],"sourcesContent":["// Generated by Framer (6ca5d98)\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,cx,motion,withCSS}from\"framer\";import*as React from\"react\";import{forwardRef}from\"react\";const mask='url(\\'data:image/svg+xml,<svg display=\"block\" role=\"presentation\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 0 2 C 0 0.895 0.895 0 2 0 C 3.105 0 4 0.895 4 2 C 4 3.105 3.105 4 2 4 C 0.895 4 0 3.105 0 2 Z\" fill=\"transparent\" height=\"4px\" id=\"olmkBTXq7\" stroke-dasharray=\"\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" stroke=\"var(--43q7um, rgb(0,0,0))\" transform=\"translate(10 10)\" width=\"4px\"/><path d=\"M 14.121 2.83 C 15.247 3.955 15.88 5.483 15.88 7.075 C 15.88 8.667 15.247 10.195 14.121 11.32 M 5.641 11.31 C 4.514 10.185 3.881 8.657 3.881 7.065 C 3.881 5.473 4.514 3.945 5.641 2.82 M 16.951 0 C 20.855 3.905 20.855 10.235 16.951 14.14 M 2.811 14.14 C -1.093 10.235 -1.093 3.905 2.811 0\" fill=\"transparent\" height=\"14.140000000000002px\" id=\"lHm51qMhn\" stroke-dasharray=\"\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" stroke=\"var(--43q7um, rgb(0,0,0))\" transform=\"translate(2.119 4.93)\" width=\"19.878614888448624px\"/></svg>\\') alpha no-repeat center / auto var(--framer-icon-mask-mode, add), var(--framer-icon-mask, none)';const SVG=/*#__PURE__*/forwardRef((props,ref)=>{const{animated,layoutId,children,...rest}=props;return animated?/*#__PURE__*/_jsx(motion.div,{...rest,layoutId:layoutId,ref:ref}):/*#__PURE__*/_jsx(\"div\",{...rest,ref:ref});});const getProps=({height,id,stroke,width,...props})=>{return{...props,UO5clYVeQ:stroke??props.UO5clYVeQ??\"rgb(0, 0, 0)\"};};const Component=/*#__PURE__*/React.forwardRef(function(props,ref){const{style,className,layoutId,variant,UO5clYVeQ,...restProps}=getProps(props);return /*#__PURE__*/_jsx(SVG,{...restProps,className:cx(\"framer-6IZS3\",className),layoutId:layoutId,ref:ref,style:{\"--43q7um\":UO5clYVeQ,...style}});});const css=[`.framer-6IZS3 { -webkit-mask: ${mask}; aspect-ratio: 1; background-color: var(--43q7um); mask: ${mask}; width: 24px; }`];/**\n * This is a generated Framer component.\n * @framerIntrinsicWidth 24\n * @framerIntrinsicHeight 24\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n * @framerVariables {\"UO5clYVeQ\":\"stroke\"}\n * @framerImmutableVariables true\n * @framerVector {\"name\":\"Radio\",\"color\":{\"type\":\"variable\",\"value\":\"43q7um\"},\"set\":{\"localId\":\"vectorSet/T8qKXkLfy\",\"id\":\"T8qKXkLfy\",\"moduleId\":\"fiHEoJwBMFnT6QLOcpPz\"}}\n * @framerDisableUnlink true\n */const Icon=withCSS(Component,css,\"framer-6IZS3\");Icon.displayName=\"Radio\";export default Icon;addPropertyControls(Icon,{UO5clYVeQ:{defaultValue:\"rgb(0, 0, 0)\",hidden:false,title:\"Stroke\",type:ControlType.Color}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Icon\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerVariables\":\"{\\\"UO5clYVeQ\\\":\\\"stroke\\\"}\",\"framerContractVersion\":\"1\",\"framerImmutableVariables\":\"true\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerIntrinsicHeight\":\"24\",\"framerVector\":\"{\\\"name\\\":\\\"Radio\\\",\\\"color\\\":{\\\"type\\\":\\\"variable\\\",\\\"value\\\":\\\"43q7um\\\"},\\\"set\\\":{\\\"localId\\\":\\\"vectorSet/T8qKXkLfy\\\",\\\"id\\\":\\\"T8qKXkLfy\\\",\\\"moduleId\\\":\\\"fiHEoJwBMFnT6QLOcpPz\\\"}}\",\"framerIntrinsicWidth\":\"24\",\"framerDisableUnlink\":\"true\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","// Generated by Framer (6ca5d98)\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,cx,motion,withCSS}from\"framer\";import*as React from\"react\";import{forwardRef}from\"react\";const mask='url(\\'data:image/svg+xml,<svg display=\"block\" role=\"presentation\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 0 10 L 0 0\" fill=\"transparent\" height=\"10px\" id=\"BA8W4dIH5\" stroke-dasharray=\"\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" stroke=\"var(--43q7um, rgb(0,0,0))\" transform=\"translate(18 10)\" width=\"1px\"/><path d=\"M 0 16 L 0 0\" fill=\"transparent\" height=\"16px\" id=\"uthdsvfKu\" stroke-dasharray=\"\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" stroke=\"var(--43q7um, rgb(0,0,0))\" transform=\"translate(12 4)\" width=\"1px\"/><path d=\"M 0 6 L 0 0\" fill=\"transparent\" height=\"6px\" id=\"bvMimSHpx\" stroke-dasharray=\"\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" stroke=\"var(--43q7um, rgb(0,0,0))\" transform=\"translate(6 14)\" width=\"1px\"/></svg>\\') alpha no-repeat center / auto var(--framer-icon-mask-mode, add), var(--framer-icon-mask, none)';const SVG=/*#__PURE__*/forwardRef((props,ref)=>{const{animated,layoutId,children,...rest}=props;return animated?/*#__PURE__*/_jsx(motion.div,{...rest,layoutId:layoutId,ref:ref}):/*#__PURE__*/_jsx(\"div\",{...rest,ref:ref});});const getProps=({height,id,stroke,width,...props})=>{return{...props,UO5clYVeQ:stroke??props.UO5clYVeQ??\"rgb(0, 0, 0)\"};};const Component=/*#__PURE__*/React.forwardRef(function(props,ref){const{style,className,layoutId,variant,UO5clYVeQ,...restProps}=getProps(props);return /*#__PURE__*/_jsx(SVG,{...restProps,className:cx(\"framer-KOlCA\",className),layoutId:layoutId,ref:ref,style:{\"--43q7um\":UO5clYVeQ,...style}});});const css=[`.framer-KOlCA { -webkit-mask: ${mask}; aspect-ratio: 1; background-color: var(--43q7um); mask: ${mask}; width: 24px; }`];/**\n * This is a generated Framer component.\n * @framerIntrinsicWidth 24\n * @framerIntrinsicHeight 24\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n * @framerVariables {\"UO5clYVeQ\":\"stroke\"}\n * @framerImmutableVariables true\n * @framerVector {\"name\":\"Bar Chart 2\",\"color\":{\"type\":\"variable\",\"value\":\"43q7um\"},\"set\":{\"localId\":\"vectorSet/T8qKXkLfy\",\"id\":\"T8qKXkLfy\",\"moduleId\":\"fiHEoJwBMFnT6QLOcpPz\"}}\n * @framerDisableUnlink true\n */const Icon=withCSS(Component,css,\"framer-KOlCA\");Icon.displayName=\"Bar Chart 2\";export default Icon;addPropertyControls(Icon,{UO5clYVeQ:{defaultValue:\"rgb(0, 0, 0)\",hidden:false,title:\"Stroke\",type:ControlType.Color}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Icon\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerVariables\":\"{\\\"UO5clYVeQ\\\":\\\"stroke\\\"}\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerVector\":\"{\\\"name\\\":\\\"Bar Chart 2\\\",\\\"color\\\":{\\\"type\\\":\\\"variable\\\",\\\"value\\\":\\\"43q7um\\\"},\\\"set\\\":{\\\"localId\\\":\\\"vectorSet/T8qKXkLfy\\\",\\\"id\\\":\\\"T8qKXkLfy\\\",\\\"moduleId\\\":\\\"fiHEoJwBMFnT6QLOcpPz\\\"}}\",\"framerImmutableVariables\":\"true\",\"framerIntrinsicWidth\":\"24\",\"framerDisableUnlink\":\"true\",\"framerIntrinsicHeight\":\"24\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","// Generated by Framer (6ca5d98)\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,cx,motion,useSVGTemplate,withCSS}from\"framer\";import*as React from\"react\";import{forwardRef}from\"react\";const mask=\"var(--framer-icon-mask)\";const Base=/*#__PURE__*/forwardRef(function(props,ref){return /*#__PURE__*/_jsx(\"svg\",{...props,ref:ref,children:props.children});});const MotionSVG=motion.create(Base);const SVG=/*#__PURE__*/forwardRef((props,ref)=>{const{animated,layoutId,children,...rest}=props;return animated?/*#__PURE__*/_jsx(MotionSVG,{...rest,layoutId:layoutId,ref:ref,children:children}):/*#__PURE__*/_jsx(\"svg\",{...rest,ref:ref,children:children});});const svg='<svg display=\"block\" role=\"presentation\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 1.5 16.5 C 0.672 16.5 0 15.828 0 15 L 0 1.5 C 0 0.672 0.672 0 1.5 0 L 15 0 C 15.828 0 16.5 0.672 16.5 1.5 L 16.5 15 C 16.5 15.828 15.828 16.5 15 16.5 Z\" fill-opacity=\"var(--1m6trwb, 0)\" fill=\"var(--21h8s6, rgb(0, 0, 0))\" height=\"16.5px\" id=\"qUr6K2nJv\" transform=\"translate(3.75 3.75)\" width=\"16.5px\"/><path d=\"M 0 0 L 16.5 0\" fill=\"transparent\" height=\"1px\" id=\"MbfmAbWGf\" stroke-dasharray=\"\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"var(--pgex8v, 1.5)\" stroke=\"var(--21h8s6, rgb(0, 0, 0))\" transform=\"translate(3.75 12)\" width=\"16.5px\"/><path d=\"M 0 0 L 0 16.5\" fill=\"transparent\" height=\"16.5px\" id=\"mcA57vhod\" stroke-dasharray=\"\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"var(--pgex8v, 1.5)\" stroke=\"var(--21h8s6, rgb(0, 0, 0))\" transform=\"translate(12 3.75)\" width=\"1px\"/></svg>';const getProps=({alpha,color,height,id,width,width1,...props})=>{return{...props,ezTt3ayMo:color??props.ezTt3ayMo??\"rgb(0, 0, 0)\",lschgej4H:width1??props.lschgej4H??1.5,qxTvv_EBh:alpha??props.qxTvv_EBh};};const Component=/*#__PURE__*/React.forwardRef(function(props,ref){const{style,className,layoutId,variant,ezTt3ayMo,lschgej4H,qxTvv_EBh,...restProps}=getProps(props);const href=useSVGTemplate(\"465907804\",svg);return /*#__PURE__*/_jsx(SVG,{...restProps,className:cx(\"framer-ohg0r\",className),layoutId:layoutId,ref:ref,role:\"presentation\",style:{\"--1m6trwb\":qxTvv_EBh,\"--21h8s6\":ezTt3ayMo,\"--pgex8v\":lschgej4H,...style},viewBox:\"0 0 24 24\",children:/*#__PURE__*/_jsx(\"use\",{href:href})});});const css=[`.framer-ohg0r { -webkit-mask: ${mask}; aspect-ratio: 1; display: block; mask: ${mask}; width: 24px; }`];/**\n * This is a generated Framer component.\n * @framerIntrinsicWidth 24\n * @framerIntrinsicHeight 24\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n * @framerVariables {\"ezTt3ayMo\":\"color\",\"lschgej4H\":\"width1\",\"qxTvv_EBh\":\"alpha\"}\n * @framerImmutableVariables true\n * @framerVector {\"name\":\"Plus\",\"color\":{\"type\":\"variable\",\"value\":\"21h8s6\"},\"set\":{\"localId\":\"vectorSet/NGVKdicsm\",\"id\":\"NGVKdicsm\",\"moduleId\":\"omX0gWFPqDwhaiWwf6ab\"}}\n * @framerDisableUnlink true\n */const Icon=withCSS(Component,css,\"framer-ohg0r\");Icon.displayName=\"Plus\";export default Icon;addPropertyControls(Icon,{ezTt3ayMo:{defaultValue:\"rgb(0, 0, 0)\",hidden:false,title:\"Color\",type:ControlType.Color},lschgej4H:{defaultValue:1.5,displayStepper:true,hidden:false,max:6,min:0,step:.5,title:\"Width\",type:ControlType.Number},qxTvv_EBh:{defaultValue:0,displayStepper:true,hidden:false,max:1,min:0,step:.1,title:\"Alpha\",type:ControlType.Number}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Icon\",\"slots\":[],\"annotations\":{\"framerVariables\":\"{\\\"ezTt3ayMo\\\":\\\"color\\\",\\\"lschgej4H\\\":\\\"width1\\\",\\\"qxTvv_EBh\\\":\\\"alpha\\\"}\",\"framerContractVersion\":\"1\",\"framerDisableUnlink\":\"true\",\"framerIntrinsicHeight\":\"24\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerVector\":\"{\\\"name\\\":\\\"Plus\\\",\\\"color\\\":{\\\"type\\\":\\\"variable\\\",\\\"value\\\":\\\"21h8s6\\\"},\\\"set\\\":{\\\"localId\\\":\\\"vectorSet/NGVKdicsm\\\",\\\"id\\\":\\\"NGVKdicsm\\\",\\\"moduleId\\\":\\\"omX0gWFPqDwhaiWwf6ab\\\"}}\",\"framerImmutableVariables\":\"true\",\"framerIntrinsicWidth\":\"24\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","// @ts-nocheck\nfunction _define_property(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{useEffect,useRef,useState}from\"react\";import*as FramerNS from\"framer\";import*as FramerMotion from\"framer-motion\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";/**\n * Research code animation.\n *\n * Used two ways: (1) filling the image slot of a Research card or page, bound to the Research \"Animation code\" CMS field\n * (empty code renders nothing, so the uploaded image shows as before); (2) embedded in rich text (type \"/\" and pick\n * \"Code animation\") with code pasted into the Code box. It accepts either:\n *   1. A React component copied from a .tsx file (default export, imports from react / framer / framer-motion), or\n *   2. Self-contained HTML / SVG / CSS / JS (anything that starts with \"<\"), shown in a sandboxed frame.\n *\n * The code is compiled in the visitor's browser only when the animation is close to the viewport, so it costs\n * nothing on pages that don't use it. An optional fallback image shows while it loads, if it fails, or in static\n * renders. Uploaded images keep working as normal images in the rich text.\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n * @framerIntrinsicWidth 712\n * @framerIntrinsicHeight 400\n */// Site light grey: colour style \"GitBook - grey background\" (rgb 250 250 249).\nconst SITE_LIGHT_GREY=\"var(--token-c69c8909-154c-43a4-ae5a-ed0eb2e4388c, rgb(250, 250, 249))\";const SUCRASE_URL=\"https://esm.sh/sucrase@3.35.0\";let sucrasePromise=null;const loadSucrase=()=>sucrasePromise||=import(/* @vite-ignore */SUCRASE_URL);const compiled=new Map;async function compileComponent(code){if(compiled.has(code))return compiled.get(code);const{transform}=await loadSucrase();const out=transform(code,{transforms:[\"typescript\",\"jsx\",\"imports\"],jsxRuntime:\"classic\",production:true}).code;const mod={exports:{}};const req=name=>{if(name===\"react\")return React;if(name===\"framer\")return FramerNS;if(name===\"framer-motion\")return FramerMotion;throw new Error(\"This code imports “\"+name+\"”, which isn’t available here. Only react, framer and framer-motion can be imported, and the code has to be in a single file.\");};new Function(\"require\",\"module\",\"exports\",\"React\",out)(req,mod,mod.exports,React);const ex=mod.exports;const Comp=ex.default||Object.values(ex).find(v=>typeof v===\"function\");if(!Comp)throw new Error(\"No component found. Add an “export default” to the code.\");compiled.set(code,Comp);return Comp;}class Boundary extends React.Component{static getDerivedStateFromError(error){return{error};}componentDidCatch(error){this.props.onError?.(error);}render(){return this.state.error?null:this.props.children;}constructor(...args){super(...args);_define_property(this,\"state\",{error:null});}}function useNearViewport(ref,enabled,immediate){const[near,setNear]=useState(immediate);useEffect(()=>{if(!enabled||near)return;const el=ref.current;if(!el)return;if(typeof IntersectionObserver===\"undefined\"){setNear(true);return;}const io=new IntersectionObserver(entries=>{if(entries.some(e=>e.isIntersecting)){setNear(true);io.disconnect();}},{rootMargin:\"300px 0px\"});io.observe(el);return()=>io.disconnect();},[enabled,near]);return near;}function parseRatio(value){const v=String(value||\"\").trim().toLowerCase();if(!v||v===\"auto\")return undefined;const m=v.match(/^([\\d.]+)\\s*[\\/:x]\\s*([\\d.]+)$/);if(m&&Number(m[1])>0&&Number(m[2])>0)return`${m[1]} / ${m[2]}`;const n=Number(v);return n>0?String(n):undefined;}export default function ResearchCodeAnimation(props){const{code=\"\",ratio=\"16 / 9\",label=\"\",poster,fill=false,background=SITE_LIGHT_GREY,style}=props;const isCanvas=RenderTarget.current()===RenderTarget.canvas;const text=String(code||\"\").trim();const isHtml=text.startsWith(\"<\");const ref=useRef(null);const near=useNearViewport(ref,!!text,isCanvas);const[Comp,setComp]=useState(null);const[error,setError]=useState(\"\");useEffect(()=>{setComp(null);setError(\"\");if(!text||isHtml||!near)return;let live=true;compileComponent(text).then(C=>live&&setComp(()=>C)).catch(e=>{console.error(\"[ResearchCodeAnimation]\",e);live&&setError(String(e&&e.message||e));});return()=>{live=false;};},[text,isHtml,near]);const aspect=parseRatio(ratio);const showPoster=poster&&poster.src&&!(isHtml?near:Comp);return /*#__PURE__*/_jsxs(\"div\",{ref:ref,role:label?\"img\":undefined,\"aria-label\":label||undefined,style:{position:fill?\"absolute\":\"relative\",inset:fill?0:undefined,width:\"100%\",height:fill?\"100%\":undefined,aspectRatio:fill?undefined:aspect,minHeight:fill||aspect?undefined:Comp?undefined:text?120:80,overflow:\"hidden\",// Solid background whenever there is code, so nothing underneath (like the empty image placeholder) shows while it loads.\nbackground:text?background||SITE_LIGHT_GREY:undefined,...style},children:[showPoster&&/*#__PURE__*/_jsx(\"img\",{src:poster.src,srcSet:poster.srcSet,alt:\"\",style:{position:\"absolute\",inset:0,width:\"100%\",height:\"100%\",objectFit:\"contain\"}}),!text&&isCanvas&&!fill&&/*#__PURE__*/_jsx(\"div\",{style:emptyStyle,children:\"Paste code into the Code box to show an animation.\"}),text&&isHtml&&near&&/*#__PURE__*/_jsx(\"iframe\",{title:label||\"Animation\",sandbox:\"allow-scripts\",srcDoc:text,loading:\"lazy\",style:{position:\"absolute\",inset:0,width:\"100%\",height:\"100%\",border:0,background:\"transparent\"}}),Comp&&/*#__PURE__*/_jsx(\"div\",{style:fill||aspect?{position:\"absolute\",inset:0}:undefined,children:/*#__PURE__*/_jsx(Boundary,{onError:e=>setError(String(e&&e.message||e)),children:/*#__PURE__*/_jsx(Comp,{})})}),text&&!isHtml&&!Comp&&!error&&isCanvas&&!fill&&/*#__PURE__*/_jsx(\"div\",{style:emptyStyle,children:\"Loading animation…\"}),error&&isCanvas&&/*#__PURE__*/_jsx(\"div\",{style:{...emptyStyle,color:\"#b42318\",background:\"#fef3f2\"},children:error})]});}const emptyStyle={position:\"absolute\",inset:0,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",padding:16,textAlign:\"center\",font:\"500 13px/1.4 system-ui, sans-serif\",color:\"#79716b\",background:SITE_LIGHT_GREY};addPropertyControls(ResearchCodeAnimation,{code:{type:ControlType.String,title:\"Code\",displayTextArea:true,placeholder:\"Paste TSX (React component) or HTML / SVG here\",defaultValue:\"\"},ratio:{type:ControlType.String,title:\"Shape\",defaultValue:\"16 / 9\",placeholder:\"16 / 9\",description:\"Width / height, for example 16 / 9, 4 / 3 or 1 / 1. Type auto to let the code set its own height.\"},label:{type:ControlType.String,title:\"Alt text\",defaultValue:\"\",placeholder:\"Describe the animation\"},poster:{type:ControlType.ResponsiveImage,title:\"Fallback\"},fill:{type:ControlType.Boolean,title:\"Fill parent\",defaultValue:false,description:\"On to fill a card or image slot. Off for an embed in rich text.\"},background:{type:ControlType.Color,title:\"Background\",defaultValue:SITE_LIGHT_GREY,description:\"Shown behind the animation and while it loads. Defaults to the site light grey.\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ResearchCodeAnimation\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ResearchCodeAnimation.map"],"mappings":"A,qWACiLA,EAAK,6jCAAqkCC,EAAiB,iBAAY,EAAM,IAAM,CAAC,G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