{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/VTUDdizacRHpwbkOamr7/AykinQJbgwl92LvMGZwu/constants.js", "ssg:https://framerusercontent.com/modules/afBE9Yx1W6bY5q32qPxe/m3q7puE2tbo1S2C0s0CT/useRenderTarget.js", "ssg:https://framerusercontent.com/modules/5SM58HxZHxjjv7aLMOgQ/WXz9i6mVki0bBCrKdqB3/propUtils.js", "ssg:https://framerusercontent.com/modules/NEd4VmDdsxM3StIUbddO/1de6WpgIbCrKkRcPfQcW/YouTube.js"],
  "sourcesContent": ["import { ControlType } from \"framer\";\nexport const fontStack = `\"Inter\", system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"`;\nexport const containerStyles = {\n    position: \"relative\",\n    width: \"100%\",\n    height: \"100%\",\n    display: \"flex\",\n    justifyContent: \"center\",\n    alignItems: \"center\"\n};\nexport const emptyStateStyle = {\n    ...containerStyles,\n    borderRadius: 6,\n    background: \"rgba(136, 85, 255, 0.3)\",\n    color: \"#85F\",\n    border: \"1px dashed #85F\",\n    flexDirection: \"column\"\n};\nexport const defaultEvents = {\n    onClick: {\n        type: ControlType.EventHandler\n    },\n    onMouseEnter: {\n        type: ControlType.EventHandler\n    },\n    onMouseLeave: {\n        type: ControlType.EventHandler\n    }\n};\nexport const fontSizeOptions = {\n    type: ControlType.Number,\n    title: \"Font Size\",\n    min: 2,\n    max: 200,\n    step: 1,\n    displayStepper: true\n};\nexport const fontControls = {\n    font: {\n        type: ControlType.Boolean,\n        title: \"Font\",\n        defaultValue: false,\n        disabledTitle: \"Default\",\n        enabledTitle: \"Custom\"\n    },\n    fontFamily: {\n        type: ControlType.String,\n        title: \"Family\",\n        placeholder: \"Inter\",\n        hidden: ({ font  })=>!font\n    },\n    fontWeight: {\n        type: ControlType.Enum,\n        title: \"Weight\",\n        options: [\n            100,\n            200,\n            300,\n            400,\n            500,\n            600,\n            700,\n            800,\n            900\n        ],\n        optionTitles: [\n            \"Thin\",\n            \"Extra-light\",\n            \"Light\",\n            \"Regular\",\n            \"Medium\",\n            \"Semi-bold\",\n            \"Bold\",\n            \"Extra-bold\",\n            \"Black\", \n        ],\n        hidden: ({ font  })=>!font\n    }\n};\n// @TODO check if we're missing anything here \u2014 there doesn't seem to be a reliable browser API for this\nexport const localeOptions = {\n    af: \"Afrikaans\",\n    sq: \"Albanian\",\n    an: \"Aragonese\",\n    ar: \"Arabic (Standard)\",\n    \"ar-dz\": \"Arabic (Algeria)\",\n    \"ar-bh\": \"Arabic (Bahrain)\",\n    \"ar-eg\": \"Arabic (Egypt)\",\n    \"ar-iq\": \"Arabic (Iraq)\",\n    \"ar-jo\": \"Arabic (Jordan)\",\n    \"ar-kw\": \"Arabic (Kuwait)\",\n    \"ar-lb\": \"Arabic (Lebanon)\",\n    \"ar-ly\": \"Arabic (Libya)\",\n    \"ar-ma\": \"Arabic (Morocco)\",\n    \"ar-om\": \"Arabic (Oman)\",\n    \"ar-qa\": \"Arabic (Qatar)\",\n    \"ar-sa\": \"Arabic (Saudi Arabia)\",\n    \"ar-sy\": \"Arabic (Syria)\",\n    \"ar-tn\": \"Arabic (Tunisia)\",\n    \"ar-ae\": \"Arabic (U.A.E.)\",\n    \"ar-ye\": \"Arabic (Yemen)\",\n    hy: \"Armenian\",\n    as: \"Assamese\",\n    ast: \"Asturian\",\n    az: \"Azerbaijani\",\n    eu: \"Basque\",\n    bg: \"Bulgarian\",\n    be: \"Belarusian\",\n    bn: \"Bengali\",\n    bs: \"Bosnian\",\n    br: \"Breton\",\n    my: \"Burmese\",\n    ca: \"Catalan\",\n    ch: \"Chamorro\",\n    ce: \"Chechen\",\n    zh: \"Chinese\",\n    \"zh-hk\": \"Chinese (Hong Kong)\",\n    \"zh-cn\": \"Chinese (PRC)\",\n    \"zh-sg\": \"Chinese (Singapore)\",\n    \"zh-tw\": \"Chinese (Taiwan)\",\n    cv: \"Chuvash\",\n    co: \"Corsican\",\n    cr: \"Cree\",\n    hr: \"Croatian\",\n    cs: \"Czech\",\n    da: \"Danish\",\n    nl: \"Dutch (Standard)\",\n    \"nl-be\": \"Dutch (Belgian)\",\n    en: \"English\",\n    \"en-au\": \"English (Australia)\",\n    \"en-bz\": \"English (Belize)\",\n    \"en-ca\": \"English (Canada)\",\n    \"en-ie\": \"English (Ireland)\",\n    \"en-jm\": \"English (Jamaica)\",\n    \"en-nz\": \"English (New Zealand)\",\n    \"en-ph\": \"English (Philippines)\",\n    \"en-za\": \"English (South Africa)\",\n    \"en-tt\": \"English (Trinidad & Tobago)\",\n    \"en-gb\": \"English (United Kingdom)\",\n    \"en-us\": \"English (United States)\",\n    \"en-zw\": \"English (Zimbabwe)\",\n    eo: \"Esperanto\",\n    et: \"Estonian\",\n    fo: \"Faeroese\",\n    fa: \"Farsi\",\n    fj: \"Fijian\",\n    fi: \"Finnish\",\n    fr: \"French (Standard)\",\n    \"fr-be\": \"French (Belgium)\",\n    \"fr-ca\": \"French (Canada)\",\n    \"fr-fr\": \"French (France)\",\n    \"fr-lu\": \"French (Luxembourg)\",\n    \"fr-mc\": \"French (Monaco)\",\n    \"fr-ch\": \"French (Switzerland)\",\n    fy: \"Frisian\",\n    fur: \"Friulian\",\n    gd: \"Gaelic (Scots)\",\n    \"gd-ie\": \"Gaelic (Irish)\",\n    gl: \"Galacian\",\n    ka: \"Georgian\",\n    de: \"German (Standard)\",\n    \"de-at\": \"German (Austria)\",\n    \"de-de\": \"German (Germany)\",\n    \"de-li\": \"German (Liechtenstein)\",\n    \"de-lu\": \"German (Luxembourg)\",\n    \"de-ch\": \"German (Switzerland)\",\n    el: \"Greek\",\n    gu: \"Gujurati\",\n    ht: \"Haitian\",\n    he: \"Hebrew\",\n    hi: \"Hindi\",\n    hu: \"Hungarian\",\n    is: \"Icelandic\",\n    id: \"Indonesian\",\n    iu: \"Inuktitut\",\n    ga: \"Irish\",\n    it: \"Italian (Standard)\",\n    \"it-ch\": \"Italian (Switzerland)\",\n    ja: \"Japanese\",\n    kn: \"Kannada\",\n    ks: \"Kashmiri\",\n    kk: \"Kazakh\",\n    km: \"Khmer\",\n    ky: \"Kirghiz\",\n    tlh: \"Klingon\",\n    ko: \"Korean\",\n    \"ko-kp\": \"Korean (North Korea)\",\n    \"ko-kr\": \"Korean (South Korea)\",\n    la: \"Latin\",\n    lv: \"Latvian\",\n    lt: \"Lithuanian\",\n    lb: \"Luxembourgish\",\n    mk: \"FYRO Macedonian\",\n    ms: \"Malay\",\n    ml: \"Malayalam\",\n    mt: \"Maltese\",\n    mi: \"Maori\",\n    mr: \"Marathi\",\n    mo: \"Moldavian\",\n    nv: \"Navajo\",\n    ng: \"Ndonga\",\n    ne: \"Nepali\",\n    no: \"Norwegian\",\n    nb: \"Norwegian (Bokmal)\",\n    nn: \"Norwegian (Nynorsk)\",\n    oc: \"Occitan\",\n    or: \"Oriya\",\n    om: \"Oromo\",\n    \"fa-ir\": \"Persian/Iran\",\n    pl: \"Polish\",\n    pt: \"Portuguese\",\n    \"pt-br\": \"Portuguese (Brazil)\",\n    pa: \"Punjabi\",\n    \"pa-in\": \"Punjabi (India)\",\n    \"pa-pk\": \"Punjabi (Pakistan)\",\n    qu: \"Quechua\",\n    rm: \"Rhaeto-Romanic\",\n    ro: \"Romanian\",\n    \"ro-mo\": \"Romanian (Moldavia)\",\n    ru: \"Russian\",\n    \"ru-mo\": \"Russian (Moldavia)\",\n    sz: \"Sami (Lappish)\",\n    sg: \"Sango\",\n    sa: \"Sanskrit\",\n    sc: \"Sardinian\",\n    sd: \"Sindhi\",\n    si: \"Singhalese\",\n    sr: \"Serbian\",\n    sk: \"Slovak\",\n    sl: \"Slovenian\",\n    so: \"Somani\",\n    sb: \"Sorbian\",\n    es: \"Spanish\",\n    \"es-ar\": \"Spanish (Argentina)\",\n    \"es-bo\": \"Spanish (Bolivia)\",\n    \"es-cl\": \"Spanish (Chile)\",\n    \"es-co\": \"Spanish (Colombia)\",\n    \"es-cr\": \"Spanish (Costa Rica)\",\n    \"es-do\": \"Spanish (Dominican Republic)\",\n    \"es-ec\": \"Spanish (Ecuador)\",\n    \"es-sv\": \"Spanish (El Salvador)\",\n    \"es-gt\": \"Spanish (Guatemala)\",\n    \"es-hn\": \"Spanish (Honduras)\",\n    \"es-mx\": \"Spanish (Mexico)\",\n    \"es-ni\": \"Spanish (Nicaragua)\",\n    \"es-pa\": \"Spanish (Panama)\",\n    \"es-py\": \"Spanish (Paraguay)\",\n    \"es-pe\": \"Spanish (Peru)\",\n    \"es-pr\": \"Spanish (Puerto Rico)\",\n    \"es-es\": \"Spanish (Spain)\",\n    \"es-uy\": \"Spanish (Uruguay)\",\n    \"es-ve\": \"Spanish (Venezuela)\",\n    sx: \"Sutu\",\n    sw: \"Swahili\",\n    sv: \"Swedish\",\n    \"sv-fi\": \"Swedish (Finland)\",\n    \"sv-sv\": \"Swedish (Sweden)\",\n    ta: \"Tamil\",\n    tt: \"Tatar\",\n    te: \"Teluga\",\n    th: \"Thai\",\n    tig: \"Tigre\",\n    ts: \"Tsonga\",\n    tn: \"Tswana\",\n    tr: \"Turkish\",\n    tk: \"Turkmen\",\n    uk: \"Ukrainian\",\n    hsb: \"Upper Sorbian\",\n    ur: \"Urdu\",\n    ve: \"Venda\",\n    vi: \"Vietnamese\",\n    vo: \"Volapuk\",\n    wa: \"Walloon\",\n    cy: \"Welsh\",\n    xh: \"Xhosa\",\n    ji: \"Yiddish\",\n    zu: \"Zulu\"\n};\n\nexport const __FramerMetadata__ = {\"exports\":{\"fontSizeOptions\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"fontControls\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"localeOptions\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"fontStack\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"emptyStateStyle\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"containerStyles\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"defaultEvents\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}}}}\n//# sourceMappingURL=./constants.map", "import { useMemo } from \"react\";\nimport { RenderTarget } from \"framer\";\nexport function useRenderTarget() {\n    const currentRenderTarget = useMemo(()=>RenderTarget.current()\n    , []);\n    return currentRenderTarget;\n}\nexport function useIsInPreview() {\n    const inPreview = useMemo(()=>RenderTarget.current() === RenderTarget.preview\n    , []);\n    return inPreview;\n}\nexport function useIsOnCanvas() {\n    const onCanvas = useMemo(()=>RenderTarget.current() === RenderTarget.canvas\n    , []);\n    return onCanvas;\n}\n\nexport const __FramerMetadata__ = {\"exports\":{\"useIsInPreview\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useRenderTarget\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useIsOnCanvas\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}}}}\n//# sourceMappingURL=./useRenderTarget.map", "import { useMemo } from \"react\";\nimport { ControlType } from \"framer\";\nexport function useRadius(props) {\n    const { borderRadius , isMixedBorderRadius , topLeftRadius , topRightRadius , bottomRightRadius , bottomLeftRadius ,  } = props;\n    const radiusValue = useMemo(()=>isMixedBorderRadius ? `${topLeftRadius}px ${topRightRadius}px ${bottomRightRadius}px ${bottomLeftRadius}px` : `${borderRadius}px`\n    , [\n        borderRadius,\n        isMixedBorderRadius,\n        topLeftRadius,\n        topRightRadius,\n        bottomRightRadius,\n        bottomLeftRadius, \n    ]);\n    return radiusValue;\n}\nexport const borderRadiusControl = {\n    borderRadius: {\n        title: \"Radius\",\n        type: ControlType.FusedNumber,\n        toggleKey: \"isMixedBorderRadius\",\n        toggleTitles: [\n            \"Radius\",\n            \"Radius per corner\"\n        ],\n        valueKeys: [\n            \"topLeftRadius\",\n            \"topRightRadius\",\n            \"bottomRightRadius\",\n            \"bottomLeftRadius\", \n        ],\n        valueLabels: [\n            \"TL\",\n            \"TR\",\n            \"BR\",\n            \"BL\"\n        ],\n        min: 0\n    }\n};\nexport function usePadding(props) {\n    const { padding , paddingPerSide , paddingTop , paddingRight , paddingBottom , paddingLeft ,  } = props;\n    const paddingValue = useMemo(()=>paddingPerSide ? `${paddingTop}px ${paddingRight}px ${paddingBottom}px ${paddingLeft}px` : padding\n    , [\n        padding,\n        paddingPerSide,\n        paddingTop,\n        paddingRight,\n        paddingBottom,\n        paddingLeft, \n    ]);\n    return paddingValue;\n}\nexport const paddingControl = {\n    padding: {\n        type: ControlType.FusedNumber,\n        toggleKey: \"paddingPerSide\",\n        toggleTitles: [\n            \"Padding\",\n            \"Padding per side\"\n        ],\n        valueKeys: [\n            \"paddingTop\",\n            \"paddingRight\",\n            \"paddingBottom\",\n            \"paddingLeft\", \n        ],\n        valueLabels: [\n            \"T\",\n            \"R\",\n            \"B\",\n            \"L\"\n        ],\n        min: 0,\n        title: \"Padding\"\n    }\n};\n\nexport const __FramerMetadata__ = {\"exports\":{\"borderRadiusControl\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useRadius\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"RadiusProps\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"PaddingProps\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"usePadding\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"paddingControl\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}}}}\n//# sourceMappingURL=./propUtils.map", "import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useReducer,useState}from\"react\";import{ControlType,addPropertyControls}from\"framer\";import{useIsOnCanvas,emptyStateStyle,containerStyles,defaultEvents,useRadius,borderRadiusControl}from\"https://framer.com/m/framer/default-utils.js@^0.45.0\";var PlayOptions;(function(PlayOptions){PlayOptions[\"Normal\"]=\"Off\";PlayOptions[\"Auto\"]=\"On\";PlayOptions[\"Loop\"]=\"Loop\";})(PlayOptions||(PlayOptions={}));var ThumbnailOptions;(function(ThumbnailOptions){ThumbnailOptions[\"High\"]=\"High Quality\";ThumbnailOptions[\"Medium\"]=\"Medium Quality\";ThumbnailOptions[\"Low\"]=\"Low Quality\";ThumbnailOptions[\"Off\"]=\"Off\";})(ThumbnailOptions||(ThumbnailOptions={}));var ThumbnailFormat;(function(ThumbnailFormat){ThumbnailFormat[\"WebP\"]=\"webp\";ThumbnailFormat[\"JPG\"]=\"jpg\";})(ThumbnailFormat||(ThumbnailFormat={}));/**\n * @framerIntrinsicWidth 560\n * @framerIntrinsicHeight 315\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n *\n * @framerComponentPresetProps isRed, borderRadius\n */export function Youtube({url,play,shouldMute,thumbnail,isRed,onClick,onMouseEnter,onMouseLeave,onMouseDown,onMouseUp,title,...props}){const onCanvas=useIsOnCanvas();const isAutoplay=play!==\"Off\";const showThumbnail=onCanvas||thumbnail!==\"Off\"&&!isAutoplay;const[isPreloading,preloadVideo]=useReducer(()=>true,false);const[showVideo,startVideo]=useReducer(()=>true,!showThumbnail);const[isHovered,setHovered]=useState(false);const borderRadius=useRadius(props);const hasBorderRadius=borderRadius!==\"0px 0px 0px 0px\"&&borderRadius!==\"0px\";if(url===\"\"){return /*#__PURE__*/_jsx(Instructions,{});}const parsedURL=parseVideoURL(url);if(parsedURL===undefined){return /*#__PURE__*/_jsx(ErrorMessage,{message:\"Invalid Youtube URL.\"});}const[videoId,embedURL]=parsedURL;// https://developers.google.com/youtube/player_parameters\nconst searchParams=embedURL.searchParams;searchParams.set(\"iv_load_policy\",\"3\");searchParams.set(\"rel\",\"0\");searchParams.set(\"modestbranding\",\"1\");searchParams.set(\"playsinline\",\"1\");if(!showVideo){// if a browser does not support `loading=lazy`, make sure the video doesn't start playing in the background\nsearchParams.set(\"autoplay\",\"0\");}else if(isAutoplay||// when there is no thumbnail, we don't want to autoplay, unless video is started\nshowThumbnail&&showVideo){searchParams.set(\"autoplay\",\"1\");}if(isAutoplay&&shouldMute){searchParams.set(\"mute\",\"1\");}if(play===\"Loop\"){searchParams.set(\"loop\",\"1\");searchParams.set(\"playlist\",videoId);}if(!isRed){searchParams.set(\"color\",\"white\");}const iframeProps={title:title||\"Youtube Video\",allow:\"presentation; fullscreen; accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\",src:embedURL.href,frameBorder:\"0\",onClick,onMouseEnter,onMouseLeave,onMouseDown,onMouseUp};return /*#__PURE__*/_jsxs(\"article\",{onPointerEnter:()=>setHovered(true),onPointerLeave:()=>setHovered(false),onPointerOver:preloadVideo,onKeyDown:startVideo,onClick:startVideo,style:{...wrapperStyle,borderRadius,transform:// Safari sometimes struggles to render border-radius:\n// - on the canvas when changing from 0 to any other value\n// - or when rendering an iframe\nhasBorderRadius&&(showVideo||onCanvas)?\"translateZ(0.000001px)\":\"unset\",cursor:\"pointer\",overflow:\"hidden\"},role:\"presentation\",children:[isPreloading&&/*#__PURE__*/_jsx(\"link\",{rel:\"preconnect\",href:\"https://www.youtube.com\"}),isPreloading&&/*#__PURE__*/_jsx(\"link\",{rel:\"preconnect\",href:\"https://www.google.com\"}),/*#__PURE__*/_jsx(\"div\",{style:{...videoStyle,background:showThumbnail?`center / cover url(${getThumbnailURL(videoId,thumbnail,getWebPSupported()?\"webp\":\"jpg\")}) no-repeat`:undefined}}),!onCanvas?/*#__PURE__*/_jsx(\"iframe\",{loading:!showVideo?\"lazy\":undefined,style:!showVideo?{...videoStyle,display:\"none\"}:videoStyle,...iframeProps}):null,showVideo?null:/*#__PURE__*/_jsx(PlayButton,{onClick:startVideo,isHovered:isHovered,isRed:isRed})]});}Youtube.displayName=\"YouTube\";addPropertyControls(Youtube,{url:{type:ControlType.String,title:\"Video\"},play:{type:ControlType.Enum,title:\"Autoplay\",options:Object.values(PlayOptions)},shouldMute:{title:\"Mute\",type:ControlType.Boolean,enabledTitle:\"Yes\",disabledTitle:\"No\",hidden(props){return props.play===\"Off\";}},thumbnail:{title:\"Thumbnail\",description:\"Showing a thumbnail improves performance.\",type:ControlType.Enum,options:Object.values(ThumbnailOptions),hidden(props){return props.play!==\"Off\";}},isRed:{title:\"Color\",type:ControlType.Boolean,enabledTitle:\"Red\",disabledTitle:\"White\"},...borderRadiusControl,...defaultEvents});const defaultProps={url:\"https://youtu.be/smPos0mJvh8\",play:\"Off\",shouldMute:true,thumbnail:\"Medium Quality\",isRed:true};Youtube.defaultProps=defaultProps;function parseVideoURL(urlString){let url;try{url=new URL(urlString);}catch{const embedURL=getEmbedURL(urlString);return[urlString,embedURL];}if(url.hostname===\"youtube.com\"||url.hostname===\"www.youtube.com\"||url.hostname===\"youtube-nocookie.com\"||url.hostname===\"www.youtube-nocookie.com\"){const pathSegments=url.pathname.slice(1).split(\"/\");// https://www.youtube.com/watch?v=Fop2oskTug8\nif(pathSegments[0]===\"watch\"){const videoId=url.searchParams.get(\"v\");const embedURL=getEmbedURL(videoId);return[videoId,embedURL];}// https://www.youtube.com/embed/Fop2oskTug8\nif(pathSegments[0]===\"embed\"){const videoId=pathSegments[1];return[videoId,url];}}// https://youtu.be/Fop2oskTug8\nif(url.hostname===\"youtu.be\"){const videoId=url.pathname.slice(1);const embedURL=getEmbedURL(videoId);return[videoId,embedURL];}}function getEmbedURL(videoId){return new URL(`https://www.youtube.com/embed/${videoId}`);}function getThumbnailURL(videoId,res,format=\"jpg\"){// https://gist.github.com/a1ip/be4514c1fd392a8c13b05e082c4da363\nconst useWebP=format===\"webp\";const pre=useWebP?\"https://i.ytimg.com/vi_webp/\":\"https://i.ytimg.com/vi/\";const ext=useWebP?\"webp\":\"jpg\";switch(res){case\"Low Quality\":return`${pre}${videoId}/hqdefault.${ext}`;case\"Medium Quality\":return`${pre}${videoId}/sddefault.${ext}`;case\"High Quality\":return`${pre}${videoId}/maxresdefault.${ext}`;default:return`${pre}${videoId}/0.${ext}`;}}let _getWebPSupported;// https://stackoverflow.com/a/27232658\nfunction getWebPSupported(){// We're going to default to webp because it's pretty widely supported by now\nif(!window){return true;}if(_getWebPSupported!==undefined){return _getWebPSupported;}const element=document.createElement(\"canvas\");if(element.getContext&&element.getContext(\"2d\")){// was able or not to get WebP representation\nreturn _getWebPSupported=element.toDataURL(\"image/webp\").indexOf(\"data:image/webp\")===0;}else{// very old browser like IE 8, canvas not supported\nreturn _getWebPSupported=false;}}// Helper components\nfunction Instructions(){return /*#__PURE__*/_jsx(\"div\",{style:{...emptyStateStyle,overflow:\"hidden\"},children:/*#__PURE__*/_jsx(\"div\",{style:centerTextStyle,children:\"To embed a Youtube video, add the URL to the properties\\xa0panel.\"})});}function ErrorMessage({message}){return /*#__PURE__*/_jsx(\"div\",{className:\"framerInternalUI-errorPlaceholder\",style:{...containerStyles,overflow:\"hidden\"},children:/*#__PURE__*/_jsxs(\"div\",{style:centerTextStyle,children:[\"Error: \",message]})});}function PlayButton({onClick,isHovered,isRed}){return /*#__PURE__*/_jsx(\"button\",{onClick:onClick,\"aria-label\":\"Play\",style:buttonStyle,children:/*#__PURE__*/_jsxs(\"svg\",{height:\"100%\",version:\"1.1\",viewBox:\"0 0 68 48\",width:\"100%\",children:[/*#__PURE__*/_jsx(\"path\",{d:\"M66.52,7.74c-0.78-2.93-2.49-5.41-5.42-6.19C55.79,.13,34,0,34,0S12.21,.13,6.9,1.55 C3.97,2.33,2.27,4.81,1.48,7.74C0.06,13.05,0,24,0,24s0.06,10.95,1.48,16.26c0.78,2.93,2.49,5.41,5.42,6.19 C12.21,47.87,34,48,34,48s21.79-0.13,27.1-1.55c2.93-0.78,4.64-3.26,5.42-6.19C67.94,34.95,68,24,68,24S67.94,13.05,66.52,7.74z\",fill:isHovered?isRed?\"#f00\":\"#000\":\"#212121\",fillOpacity:isHovered?isRed?1:.8:.8,style:{transition:\"fill .1s cubic-bezier(0.4, 0, 1, 1), fill-opacity .1s cubic-bezier(0.4, 0, 1, 1)\"}}),/*#__PURE__*/_jsx(\"path\",{d:\"M 45,24 27,14 27,34\",fill:\"#fff\"})]})});}const buttonStyle={position:\"absolute\",top:\"50%\",left:\"50%\",transform:\"translate(-50%, -50%)\",width:68,height:48,padding:0,border:\"none\",background:\"transparent\",cursor:\"pointer\"};const wrapperStyle={position:\"relative\",width:\"100%\",height:\"100%\"};const centerTextStyle={textAlign:\"center\",minWidth:140};const videoStyle={position:\"absolute\",top:0,left:0,height:\"100%\",width:\"100%\"};\nexport const __FramerMetadata__ = {\"exports\":{\"Youtube\":{\"type\":\"reactComponent\",\"name\":\"Youtube\",\"slots\":[],\"annotations\":{\"framerComponentPresetProps\":\"isRed, borderRadius\",\"framerIntrinsicHeight\":\"315\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerIntrinsicWidth\":\"560\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./YouTube.map"],
  "mappings": "qKAEO,IAAMA,EAAkB,CAC3B,SAAU,WACV,MAAO,OACP,OAAQ,OACR,QAAS,OACT,eAAgB,SAChB,WAAY,QAChB,EACaC,EAAkB,CAC3B,GAAGD,EACH,aAAc,EACd,WAAY,0BACZ,MAAO,OACP,OAAQ,kBACR,cAAe,QACnB,EACaE,EAAgB,CACzB,QAAS,CACL,KAAMC,EAAY,YACtB,EACA,aAAc,CACV,KAAMA,EAAY,YACtB,EACA,aAAc,CACV,KAAMA,EAAY,YACtB,CACJ,EACaC,GAAkB,CAC3B,KAAMD,EAAY,OAClB,MAAO,YACP,IAAK,EACL,IAAK,IACL,KAAM,EACN,eAAgB,EACpB,EACaE,GAAe,CACxB,KAAM,CACF,KAAMF,EAAY,QAClB,MAAO,OACP,aAAc,GACd,cAAe,UACf,aAAc,QAClB,EACA,WAAY,CACR,KAAMA,EAAY,OAClB,MAAO,SACP,YAAa,QACb,OAAQ,CAAC,CAAE,KAAAG,CAAM,IAAI,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CAAO,CAAC,CAAC,CAAC,CAAC,CAAE,CAAC,SAASnB,GAAW,CAAC,QAAApC,EAAQ,UAAAgB,EAAU,MAAAjB,CAAK,EAAE,CAAC,OAAoBuB,EAAK,SAAS,CAAC,QAAQtB,EAAQ,aAAa,OAAO,MAAMyD,GAAY,SAAsB1B,EAAM,MAAM,CAAC,OAAO,OAAO,QAAQ,MAAM,QAAQ,YAAY,MAAM,OAAO,SAAS,CAAcT,EAAK,OAAO,CAAC,EAAE,wTAAwT,KAAKN,EAAUjB,EAAM,OAAO,OAAO,UAAU,YAAYiB,GAAUjB,EAAM,EAAK,GAAG,MAAM,CAAC,WAAW,kFAAkF,CAAC,CAAC,EAAeuB,EAAK,OAAO,CAAC,EAAE,sBAAsB,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAE,CAAC,IAAMmC,GAAY,CAAC,SAAS,WAAW,IAAI,MAAM,KAAK,MAAM,UAAU,wBAAwB,MAAM,GAAG,OAAO,GAAG,QAAQ,EAAE,OAAO,OAAO,WAAW,cAAc,OAAO,SAAS,EAAQzB,GAAa,CAAC,SAAS,WAAW,MAAM,OAAO,OAAO,MAAM,EAAQsB,EAAgB,CAAC,UAAU,SAAS,SAAS,GAAG,EAAQrB,EAAW,CAAC,SAAS,WAAW,IAAI,EAAE,KAAK,EAAE,OAAO,OAAO,MAAM,MAAM",
  "names": ["containerStyles", "emptyStateStyle", "defaultEvents", "ControlType", "fontSizeOptions", "fontControls", "font", "useIsOnCanvas", "se", "RenderTarget", "useRadius", "props", "borderRadius", "isMixedBorderRadius", "topLeftRadius", "topRightRadius", "bottomRightRadius", "bottomLeftRadius", "se", "borderRadiusControl", "ControlType", "paddingControl", "ControlType", "PlayOptions", "ThumbnailOptions", "ThumbnailFormat", "Youtube", "url", "play", "shouldMute", "thumbnail", "isRed", "onClick", "onMouseEnter", "onMouseLeave", "onMouseDown", "onMouseUp", "title", "props", "onCanvas", "useIsOnCanvas", "isAutoplay", "showThumbnail", "isPreloading", "preloadVideo", "le", "showVideo", "startVideo", "isHovered", "setHovered", "ye", "borderRadius", "useRadius", "hasBorderRadius", "p", "Instructions", "parsedURL", "parseVideoURL", "ErrorMessage", "videoId", "embedURL", "searchParams", "iframeProps", "u", "wrapperStyle", "videoStyle", "getThumbnailURL", "getWebPSupported", "PlayButton", "addPropertyControls", "ControlType", "borderRadiusControl", "defaultEvents", "defaultProps", "urlString", "getEmbedURL", "pathSegments", "res", "format", "useWebP", "pre", "ext", "_getWebPSupported", "window", "element", "emptyStateStyle", "centerTextStyle", "message", "containerStyles", "buttonStyle"]
}
