{"version":3,"file":"OutputEmbed.BwIAthiv.mjs","names":["useRef","useState","__esmMin","init_npm_react_18_3_1","init_ssg_sandbox_shims","window","_e","p","ce","de","init_framer_DDfsYcI0","addPropertyControls","ControlType","useIsStaticRenderer","OutputEmbed","props","isStatic","frame","height","setHeight","page","onMessage","event","ORIGIN","data","HEIGHT_MESSAGE","query","theme","title","style","init_OutputEmbed","init_jsx_runtime"],"sources":["https:/framerusercontent.com/modules/rj0c8qFxF9CRbw7Si8iz/5541yIYm04gxAYqQzz5U/OutputEmbed.js"],"sourcesContent":["// Output's status page or changelog inside a page of meetoutput.com, as tall as\n// the page it shows. It frames app.meetoutput.com/status or /changelog with\n// ?embed=1, which posts its height here (the app repo: src/status/embed.ts and\n// infra/framer/OutputEmbed.tsx). Only meetoutput.com and Framer may frame them.\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useRef,useState}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";const ORIGIN=\"https://app.meetoutput.com\";const HEIGHT_MESSAGE=\"output-embed:height\";/**\n * Output status or changelog\n *\n * @framerIntrinsicWidth 720\n * @framerIntrinsicHeight 760\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight auto\n */export default function OutputEmbed(props){const{page=\"status\",theme=\"light\",style}=props;const isStatic=useIsStaticRenderer();const frame=useRef(null);const[height,setHeight]=useState(page===\"status\"?760:900);useEffect(()=>{if(isStatic||typeof window===\"undefined\")return;const onMessage=event=>{if(event.origin!==ORIGIN||event.source!==frame.current?.contentWindow)return;const data=event.data;if(data?.type!==HEIGHT_MESSAGE||typeof data.height!==\"number\")return;setHeight(Math.max(200,Math.min(2e4,Math.ceil(data.height))));};window.addEventListener(\"message\",onMessage);return()=>window.removeEventListener(\"message\",onMessage);},[isStatic]);const query=new URLSearchParams({embed:\"1\"});if(theme!==\"auto\")query.set(\"theme\",theme);const title=page===\"status\"?\"Output Status\":\"Output Changelog\";if(isStatic){return /*#__PURE__*/_jsxs(\"div\",{style:{...style,width:\"100%\",height:520,borderRadius:16,background:\"#f2f3f4\",display:\"grid\",placeItems:\"center\",color:\"#8a8f98\",fontFamily:\"Inter, sans-serif\",fontSize:14},children:[title,\": app.meetoutput.com/\",page]});}return /*#__PURE__*/_jsx(\"iframe\",{ref:frame,title:title,src:`${ORIGIN}/${page}?${query.toString()}`,referrerPolicy:\"no-referrer\",style:{...style,width:\"100%\",height,border:\"none\",background:\"transparent\",display:\"block\"}});}addPropertyControls(OutputEmbed,{page:{type:ControlType.Enum,title:\"Page\",options:[\"status\",\"changelog\"],optionTitles:[\"Status\",\"Changelog\"],defaultValue:\"status\"},theme:{type:ControlType.Enum,title:\"Theme\",options:[\"light\",\"dark\",\"auto\"],optionTitles:[\"Light\",\"Dark\",\"Visitor's\"],defaultValue:\"light\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"OutputEmbed\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"720\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"760\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./OutputEmbed.map"],"mappings":"A,2MAWG,SAAwBc,EAAY,EAAM,CAAC,GAAK,CAAC,OAAK,SAAS,QAAM,QAAQ,SAAOC,EAAYC,EAASH,EAAoB,EAAQI,EAAMjB,EAAO,IAAI,EAAO,CAACkB,EAAOC,GAAWlB,EAASmB,IAAO,SAAS,IAAI,GAAG,EAAEZ,MAAc,CAAC,GAAGQ,GAAiBX,IAAS,OAAY,OAAO,IAAMgB,EAAU,GAAO,CAAC,GAAGC,EAAM,SAASC,GAAQD,EAAM,SAASL,EAAM,SAAS,cAAc,OAAO,IAAMO,EAAKF,EAAM,KAAQE,GAAM,OAAOC,GAAgB,OAAOD,EAAK,QAAS,UAAgBL,EAAU,KAAK,IAAI,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