import{__esmMin as e}from"./rolldown-runtime.BOLAW3nA.mjs";import{init_jsx_runtime as t,init_npm_react_18_2 as n,init_ssg_sandbox_shims as r,p as i,pe as a,ue as o,window as s,ye as c}from"./react.Bj0meKUR.mjs";import{ControlType as l,addPropertyControls as u,init_framer_44VOAY3F as d}from"./framer.BpaiJwmD.mjs";import{containerStyles as f,emptyStateStyle as p,init_colorFromToken as m,init_constants as h,init_isBrowser as g,init_isMotionValue as _,init_propUtils as v,init_useAutoMotionValue as y,init_useConstant as b,init_useControlledState as x,init_useFontControls as S,init_useOnChange as C,init_useOnNavigationTargetChange as w,init_useRenderTarget as T,init_useUniqueClassName as E,init_variantUtils as D,useIsOnCanvas as O}from"./propUtils.DnwMJ6p1.mjs";var k=e((()=>{h(),w(),b(),m(),_(),E(),D(),g(),C(),y(),S(),T(),x(),v()}));function A({type:e,url:t,html:n,style:r={}}){return e===`url`&&t?i(M,{url:t,style:r}):e===`html`&&n?i(P,{html:n,style:r}):i(j,{style:r})}function j({style:e}){return i(`div`,{style:{minHeight:V(e),...p,overflow:`hidden`,...e},children:i(`div`,{style:W,children:`To embed a website or widget, add it to the properties\xA0panel.`})})}function M({url:e,style:t}){let n=!t.height;/[a-z]+:\/\//.test(e)||(e=`https://`+e);let r=O(),[a,s]=c(r?void 0:!1);if(o(()=>{if(!r)return;let t=!0;s(void 0);async function n(){let n=await fetch(`https://api.framer.com/functions/check-iframe-url?url=`+encodeURIComponent(e));if(n.status==200){let{isBlocked:e}=await n.json();t&&s(e)}else{let e=await n.text();console.error(e),s(Error(`This site can’t be reached.`))}}return n().catch(e=>{console.error(e),s(e)}),()=>{t=!1}},[e]),r&&n)return i(B,{message:`URL embeds do not support auto height.`,style:t});if(!e.startsWith(`https://`))return i(B,{message:`Unsupported protocol.`,style:t});if(a===void 0)return i(z,{});if(a instanceof Error)return i(B,{message:a.message,style:t});if(a===!0){let n=`Can’t embed ${e} due to its content security policy.`;return i(B,{message:n,style:t})}return i(`iframe`,{src:e,style:{...H,...t},loading:`lazy`,fetchPriority:r?`low`:`auto`,referrerPolicy:`no-referrer`,sandbox:N(r)})}function N(e){let t=[`allow-same-origin`,`allow-scripts`];return e||t.push(`allow-downloads`,`allow-forms`,`allow-modals`,`allow-orientation-lock`,`allow-pointer-lock`,`allow-popups`,`allow-popups-to-escape-sandbox`,`allow-presentation`,`allow-storage-access-by-user-activation`,`allow-top-navigation-by-user-activation`),t.join(` `)}function P({html:e,...t}){if(e.includes(`<\/script>`)){let n=e.includes(``),r=e.includes(``);return i(n||r?I:F,{html:e,...t})}return i(L,{html:e,...t})}function F({html:e,style:t}){let n=a(),[r,l]=c(0);o(()=>{let e=n.current?.contentWindow;function t(t){if(t.source!==e)return;let n=t.data;if(typeof n!=`object`||!n)return;let r=n.embedHeight;typeof r==`number`&&l(r)}return s.addEventListener(`message`,t),e?.postMessage(`getEmbedHeight`,`*`),()=>{s.removeEventListener(`message`,t)}},[]);let u=`
${e}