{"version":3,"file":"SenjaEmbed.CijErbRF.mjs","names":[],"sources":["https:/framerusercontent.com/modules/ckGZj3yYY0eOgQQMpSdE/XoiTqeCsSacI3s8yz5sO/SenjaEmbed.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useEffect}from\"react\";export default function SenjaEmbed(props){let builderUrl=\"https://widget.senja.io/embed/frame.js\";let className=\"senja-frame-embed\";let lazy=props.lazy;let id=props.widgetUrl;if(props.embedType==\"js\"){builderUrl=\"https://static.senja.io/dist/platform.js\";className=\"senja-embed\";}if(id){const regex=/widget\\.senja\\.io\\/widget\\/([^\\s\\/?]+)/;const match=id.match(regex);if(match[1])id=match[1];}useEffect(()=>{let script=document.querySelector(`script[src=\"${builderUrl}\"]`);if(!script){script=document.createElement(\"script\");script.src=builderUrl;script.async=true;script.type=\"text/javascript\";document.body.append(script);}},[]);return /*#__PURE__*/ _jsx(\"div\",{className:className,\"data-lazyload\":lazy,\"data-id\":id});};addPropertyControls(SenjaEmbed,{widgetUrl:{type:ControlType.String,title:\"Widget URL\"},lazy:{type:ControlType.Boolean,title:\"Lazy Load\"},embedType:{type:ControlType.Enum,options:[\"js\",\"frame\"],optionTitles:[\"JS\",\"iFrame\"],defaultValue:\"frame\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SenjaEmbed\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SenjaEmbed.map"],"mappings":"0KAA4H,SAAwB,EAAW,EAAM,CAAC,IAAI,EAAW,yCAA6C,EAAU,oBAAwB,EAAK,EAAM,KAAS,EAAG,EAAM,UAAmH,GAAtG,EAAM,WAAW,OAAM,EAAW,2CAA2C,EAAU,eAAkB,EAAG,CAAsD,IAAM,EAAM,EAAG,MAAxD,yCAAoE,CAAI,EAAM,KAAG,EAAG,EAAM,IAAkP,OAA9O,MAAc,CAAC,IAAI,EAAO,SAAS,cAAc,eAAe,EAAW,IAAI,CAAK,IAAQ,EAAO,SAAS,cAAc,SAAS,CAAC,EAAO,IAAI,EAAW,EAAO,MAAM,GAAK,EAAO,KAAK,kBAAkB,SAAS,KAAK,OAAO,EAAO,GAAI,EAAE,CAAC,CAAsB,EAAK,MAAM,CAAW,YAAU,gBAAgB,EAAK,UAAU,EAAG,CAAC,kBAAhyB,IAAoD,IAA6B,CAAktB,EAAoB,EAAW,CAAC,UAAU,CAAC,KAAK,EAAY,OAAO,MAAM,aAAa,CAAC,KAAK,CAAC,KAAK,EAAY,QAAQ,MAAM,YAAY,CAAC,UAAU,CAAC,KAAK,EAAY,KAAK,QAAQ,CAAC,KAAK,QAAQ,CAAC,aAAa,CAAC,KAAK,SAAS,CAAC,aAAa,QAAQ,CAAC,CAAC"}