{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/F6IzcnH090BibK8JiJh0/YiH6Irb8csUljprMirUP/Typeform.js"],
  "sourcesContent": ["import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useRef, useEffect } from \"react\";\nimport { addPropertyControls, ControlType, withCSS } from \"framer\";\nimport { motion } from \"framer-motion\";\nimport { containerStyles } from \"https://framer.com/m/framer/default-utils.js@^0.45.0\";\nimport { createWidget } from \"https://cdn.skypack.dev/@typeform/embed@1.32.0\";\nimport { emptyStateStyle, stateParagraphStyle, stateTitleStyle } from \"https://framer.com/m/framer/integrations-styles.js@0.2.0\";\nconst Widget = withCSS(function Widget({\n  id,\n  style,\n  onSubmit,\n  hideFooter,\n  hideHeaders,\n  ...props\n}) {\n  const container = useRef(null);\n  useEffect(() => {\n    if (container.current) {\n      const widget = createWidget(id, {\n        width: \"100%\",\n        height: \"100%\",\n        container: container.current,\n        transitiveSearchParams: [\"utm_source\", \"utm_medium\", \"utm_campaign\"],\n        onSubmit,\n        hideFooter,\n        hideHeaders\n      });\n      return () => {\n        widget.unmount();\n      };\n    }\n  }, [id, onSubmit, hideFooter, hideHeaders]);\n  return /*#__PURE__*/_jsx(\"div\", {\n    style: style,\n    className: \"framer-typeform\",\n    ref: container,\n    ...props\n  });\n}, [\".framer-typeform div, .framer-typeform iframe { width: 100%; height: 100%; border: none !important; }\"]); /**\n                                                                                                               * TYPEFORM\n                                                                                                               *\n                                                                                                               * @framerIntrinsicWidth 800\n                                                                                                               * @framerIntrinsicHeight 600\n                                                                                                               *\n                                                                                                               * @framerSupportedLayoutWidth fixed\n                                                                                                               * @framerSupportedLayoutHeight fixed\n                                                                                                               */\nexport default function Typeform({\n  formId,\n  style,\n  onSubmit,\n  hideFooter,\n  hideHeaders,\n  ...props\n}) {\n  function handleSubmit(e) {\n    if (onSubmit !== undefined) {\n      onSubmit(e);\n    }\n    if (globalThis.__send_framer_conversion__) {\n      globalThis.__send_framer_conversion__(\"typeform\");\n    }\n  }\n  return formId ? /*#__PURE__*/_jsx(motion.div, {\n    style: {\n      ...containerStyles,\n      ...style\n    },\n    ...props,\n    children: /*#__PURE__*/_jsx(Widget, {\n      id: formId,\n      style: {\n        width: \"100%\",\n        height: \"100%\"\n      },\n      onSubmit: handleSubmit,\n      hideFooter: hideFooter,\n      hideHeaders: hideHeaders\n    })\n  }) : /*#__PURE__*/_jsxs(motion.div, {\n    style: {\n      ...emptyStateStyle,\n      ...style\n    },\n    ...props,\n    children: [/*#__PURE__*/_jsx(\"h1\", {\n      style: stateTitleStyle,\n      children: \"Typeform\"\n    }), /*#__PURE__*/_jsx(\"p\", {\n      style: stateParagraphStyle,\n      children: \"Set a form ID in the Properties.\"\n    })]\n  });\n}\n;\naddPropertyControls(Typeform, {\n  formId: {\n    title: \"ID\",\n    type: ControlType.String,\n    placeholder: \"12ABCD34\",\n    defaultValue: \"R2s5BM\",\n    description: \"Create a [Typeform](https://www.typeform.com/) account, add a form and copy its ID. [Learn more\u2026](https://www.framer.com/sites/integrations/typeform/)\"\n  },\n  hideFooter: {\n    title: \"Footer\",\n    type: ControlType.Boolean,\n    enabledTitle: \"Hide\",\n    disabledTitle: \"Show\",\n    defaultValue: false\n  },\n  hideHeaders: {\n    title: \"Headers\",\n    type: ControlType.Boolean,\n    enabledTitle: \"Hide\",\n    disabledTitle: \"Show\",\n    defaultValue: false\n  },\n  onSubmit: {\n    type: ControlType.EventHandler\n  }\n});\nexport const __FramerMetadata__ = {\n  \"exports\": {\n    \"default\": {\n      \"type\": \"reactComponent\",\n      \"name\": \"Typeform\",\n      \"slots\": [],\n      \"annotations\": {\n        \"framerSupportedLayoutWidth\": \"fixed\",\n        \"framerIntrinsicHeight\": \"600\",\n        \"framerSupportedLayoutHeight\": \"fixed\",\n        \"framerIntrinsicWidth\": \"800\",\n        \"framerContractVersion\": \"1\"\n      }\n    },\n    \"__FramerMetadata__\": {\n      \"type\": \"variable\"\n    }\n  }\n};\n//# sourceMappingURL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U,kCACZ,CAAC,CAAC,CACJ,CAAC,CACH,CAEAC,EAAoBV,EAAU,CAC5B,OAAQ,CACN,MAAO,KACP,KAAMW,EAAY,OAClB,YAAa,WACb,aAAc,SACd,YAAa,6JACf,EACA,WAAY,CACV,MAAO,SACP,KAAMA,EAAY,QAClB,aAAc,OACd,cAAe,OACf,aAAc,EAChB,EACA,YAAa,CACX,MAAO,UACP,KAAMA,EAAY,QAClB,aAAc,OACd,cAAe,OACf,aAAc,EAChB,EACA,SAAU,CACR,KAAMA,EAAY,YACpB,CACF,CAAC",
  "names": ["init_shims", "Widget", "withCSS", "id", "style", "onSubmit", "hideFooter", "hideHeaders", "props", "container", "pe", "ue", "widget", "createWidget", "p", "Typeform", "formId", "handleSubmit", "e", "motion", "containerStyles", "u", "emptyStateStyle", "stateTitleStyle", "stateParagraphStyle", "addPropertyControls", "ControlType"]
}
