: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
/******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({
/***/ "./node_modules/@emotion/memoize/dist/emotion-memoize.esm.js":
/*!*******************************************************************!*\
!*** ./node_modules/@emotion/memoize/dist/emotion-memoize.esm.js ***!
\*******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
var cache = Object.create(null);
if (cache[arg] === undefined) cache[arg] = fn(arg);
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (memoize);
/***/ "./node_modules/@linaria/react/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js":
/*!***********************************************************************************************************!*\
!*** ./node_modules/@linaria/react/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js ***!
\***********************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony import */ var _emotion_memoize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @emotion/memoize */ "./node_modules/@emotion/memoize/dist/emotion-memoize.esm.js");
var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23
var isPropValid = /* #__PURE__ */(0,_emotion_memoize__WEBPACK_IMPORTED_MODULE_0__["default"])(function (prop) {
return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111
&& prop.charCodeAt(1) === 110
&& prop.charCodeAt(2) < 91;
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isPropValid);
/***/ "./scripts/constants/defaultFormOptions.ts":
/*!*************************************************!*\
!*** ./scripts/constants/defaultFormOptions.ts ***!
\*************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "DEFAULT_OPTIONS": () => (/* binding */ DEFAULT_OPTIONS),
/* harmony export */ "isDefaultForm": () => (/* binding */ isDefaultForm)
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
var REGISTRATION_FORM = 'REGISTRATION_FORM';
var CONTACT_US_FORM = 'CONTACT_US_FORM';
var NEWSLETTER_FORM = 'NEWSLETTER_FORM';
var SUPPORT_FORM = 'SUPPORT_FORM';
var EVENT_FORM = 'EVENT_FORM';
label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Templates', 'leadin'),
label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Registration Form', 'leadin'),
label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Contact us Form', 'leadin'),
label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Newsletter sign-up Form', 'leadin'),
label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Support Form', 'leadin'),
label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Event Registration Form', 'leadin'),
function isDefaultForm(value) {
return value === REGISTRATION_FORM || value === CONTACT_US_FORM || value === NEWSLETTER_FORM || value === SUPPORT_FORM || value === EVENT_FORM;
/***/ "./scripts/constants/leadinConfig.ts":
/*!*******************************************!*\
!*** ./scripts/constants/leadinConfig.ts ***!
\*******************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "accountName": () => (/* binding */ accountName),
/* harmony export */ "activationTime": () => (/* binding */ activationTime),
/* harmony export */ "adminUrl": () => (/* binding */ adminUrl),
/* harmony export */ "connectionStatus": () => (/* binding */ connectionStatus),
/* harmony export */ "contentEmbed": () => (/* binding */ contentEmbed),
/* harmony export */ "decryptError": () => (/* binding */ decryptError),
/* harmony export */ "deviceId": () => (/* binding */ deviceId),
/* harmony export */ "didDisconnect": () => (/* binding */ didDisconnect),
/* harmony export */ "env": () => (/* binding */ env),
/* harmony export */ "formsScript": () => (/* binding */ formsScript),
/* harmony export */ "formsScriptPayload": () => (/* binding */ formsScriptPayload),
/* harmony export */ "hublet": () => (/* binding */ hublet),
/* harmony export */ "hubspotBaseUrl": () => (/* binding */ hubspotBaseUrl),
/* harmony export */ "hubspotNonce": () => (/* binding */ hubspotNonce),
/* harmony export */ "iframeUrl": () => (/* binding */ iframeUrl),
/* harmony export */ "impactLink": () => (/* binding */ impactLink),
/* harmony export */ "lastAuthorizeTime": () => (/* binding */ lastAuthorizeTime),
/* harmony export */ "lastDeauthorizeTime": () => (/* binding */ lastDeauthorizeTime),
/* harmony export */ "lastDisconnectTime": () => (/* binding */ lastDisconnectTime),
/* harmony export */ "leadinPluginVersion": () => (/* binding */ leadinPluginVersion),
/* harmony export */ "leadinQueryParams": () => (/* binding */ leadinQueryParams),
/* harmony export */ "locale": () => (/* binding */ locale),
/* harmony export */ "loginUrl": () => (/* binding */ loginUrl),
/* harmony export */ "meetingsScript": () => (/* binding */ meetingsScript),
/* harmony export */ "phpVersion": () => (/* binding */ phpVersion),
/* harmony export */ "pluginPath": () => (/* binding */ pluginPath),
/* harmony export */ "plugins": () => (/* binding */ plugins),
/* harmony export */ "portalDomain": () => (/* binding */ portalDomain),
/* harmony export */ "portalEmail": () => (/* binding */ portalEmail),
/* harmony export */ "portalId": () => (/* binding */ portalId),
/* harmony export */ "redirectNonce": () => (/* binding */ redirectNonce),
/* harmony export */ "refreshToken": () => (/* binding */ refreshToken),
/* harmony export */ "requiresContentEmbedScope": () => (/* binding */ requiresContentEmbedScope),
/* harmony export */ "restNonce": () => (/* binding */ restNonce),
/* harmony export */ "restUrl": () => (/* binding */ restUrl),
/* harmony export */ "reviewSkippedDate": () => (/* binding */ reviewSkippedDate),
/* harmony export */ "theme": () => (/* binding */ theme),
/* harmony export */ "trackConsent": () => (/* binding */ trackConsent),
/* harmony export */ "wpVersion": () => (/* binding */ wpVersion)
var _window$leadinConfig = window.leadinConfig,
accountName = _window$leadinConfig.accountName,
adminUrl = _window$leadinConfig.adminUrl,
activationTime = _window$leadinConfig.activationTime,
connectionStatus = _window$leadinConfig.connectionStatus,
deviceId = _window$leadinConfig.deviceId,
didDisconnect = _window$leadinConfig.didDisconnect,
env = _window$leadinConfig.env,
formsScript = _window$leadinConfig.formsScript,
meetingsScript = _window$leadinConfig.meetingsScript,
formsScriptPayload = _window$leadinConfig.formsScriptPayload,
hublet = _window$leadinConfig.hublet,
hubspotBaseUrl = _window$leadinConfig.hubspotBaseUrl,
hubspotNonce = _window$leadinConfig.hubspotNonce,
iframeUrl = _window$leadinConfig.iframeUrl,
impactLink = _window$leadinConfig.impactLink,
lastAuthorizeTime = _window$leadinConfig.lastAuthorizeTime,
lastDeauthorizeTime = _window$leadinConfig.lastDeauthorizeTime,
lastDisconnectTime = _window$leadinConfig.lastDisconnectTime,
leadinPluginVersion = _window$leadinConfig.leadinPluginVersion,
leadinQueryParams = _window$leadinConfig.leadinQueryParams,
locale = _window$leadinConfig.locale,
loginUrl = _window$leadinConfig.loginUrl,
phpVersion = _window$leadinConfig.phpVersion,
pluginPath = _window$leadinConfig.pluginPath,
plugins = _window$leadinConfig.plugins,
portalDomain = _window$leadinConfig.portalDomain,
portalEmail = _window$leadinConfig.portalEmail,
portalId = _window$leadinConfig.portalId,
redirectNonce = _window$leadinConfig.redirectNonce,
restNonce = _window$leadinConfig.restNonce,
restUrl = _window$leadinConfig.restUrl,
refreshToken = _window$leadinConfig.refreshToken,
reviewSkippedDate = _window$leadinConfig.reviewSkippedDate,
theme = _window$leadinConfig.theme,
trackConsent = _window$leadinConfig.trackConsent,
wpVersion = _window$leadinConfig.wpVersion,
contentEmbed = _window$leadinConfig.contentEmbed,
requiresContentEmbedScope = _window$leadinConfig.requiresContentEmbedScope,
decryptError = _window$leadinConfig.decryptError;
/***/ "./scripts/elementor/Common/ConnectPluginBanner.tsx":
/*!**********************************************************!*\
!*** ./scripts/elementor/Common/ConnectPluginBanner.tsx ***!
\**********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (/* binding */ ConnectPluginBanner)
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
/* harmony import */ var _ElementorBanner__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ElementorBanner */ "./scripts/elementor/Common/ElementorBanner.tsx");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
function ConnectPluginBanner() {
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ElementorBanner__WEBPACK_IMPORTED_MODULE_1__["default"], {
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("b", {
dangerouslySetInnerHTML: {
__html: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('The HubSpot plugin is not connected right now To use HubSpot tools on your WordPress site, %1$sconnect the plugin now%2$s').replace('%1$s', '<a class="leadin-banner__link" href="admin.php?page=leadin&bannerClick=true">').replace('%2$s', '</a>')
/***/ "./scripts/elementor/Common/ElementorBanner.tsx":
/*!******************************************************!*\
!*** ./scripts/elementor/Common/ElementorBanner.tsx ***!
\******************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (/* binding */ ElementorBanner)
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
function ElementorBanner(_ref) {
var _ref$type = _ref.type,
type = _ref$type === void 0 ? 'warning' : _ref$type,
children = _ref.children;
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
className: "elementor-control-content",
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
className: "elementor-control-raw-html elementor-panel-alert elementor-panel-alert-".concat(type),
/***/ "./scripts/elementor/Common/ElementorButton.tsx":
/*!******************************************************!*\
!*** ./scripts/elementor/Common/ElementorButton.tsx ***!
\******************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (/* binding */ ElementorButton)
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
/* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
var _excluded = ["children"];
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
var Container = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_1__.styled)('div')({
function ElementorButton(_ref) {
var children = _ref.children,
params = _objectWithoutProperties(_ref, _excluded);
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Container, {
className: "elementor-button-wrapper",
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", _objectSpread(_objectSpread({
className: "elementor-button elementor-button-default",
__webpack_require__(/*! ./ElementorButton.linaria.css!=!../../../node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./ElementorButton.tsx */ "./scripts/elementor/Common/ElementorButton.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/elementor/Common/ElementorButton.tsx");
/***/ "./scripts/elementor/FormWidget/ElementorFormSelect.tsx":
/*!**************************************************************!*\
!*** ./scripts/elementor/FormWidget/ElementorFormSelect.tsx ***!
\**************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (/* binding */ ElementorFormSelectContainer)
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
/* harmony import */ var _Common_ElementorBanner__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Common/ElementorBanner */ "./scripts/elementor/Common/ElementorBanner.tsx");
/* harmony import */ var _shared_UIComponents_UISpinner__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../shared/UIComponents/UISpinner */ "./scripts/shared/UIComponents/UISpinner.tsx");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
/* harmony import */ var _hooks_useForms__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./hooks/useForms */ "./scripts/elementor/FormWidget/hooks/useForms.ts");
/* harmony import */ var _utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../utils/backgroundAppUtils */ "./scripts/utils/backgroundAppUtils.ts");
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function ElementorFormSelect(_ref) {
var formId = _ref.formId,
setAttributes = _ref.setAttributes;
var _useForms = (0,_hooks_useForms__WEBPACK_IMPORTED_MODULE_7__["default"])(),
hasError = _useForms.hasError,
loading = _useForms.loading;
return loading ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_shared_UIComponents_UISpinner__WEBPACK_IMPORTED_MODULE_4__["default"], {})
}) : hasError ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Common_ElementorBanner__WEBPACK_IMPORTED_MODULE_3__["default"], {
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('Please refresh your forms or try again in a few minutes', 'leadin')
}) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("select", {
onChange: function onChange(event) {
var selectedForm = forms.find(function (form) {
return form.value === event.target.value;
portalId: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.portalId,
formId: selectedForm.value,
formName: selectedForm.label
children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("option", {
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('Search for a form', 'leadin')
}), forms.map(function (form) {
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("option", {
function ElementorFormSelectWrapper(props) {
var isBackgroundAppReady = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__.useBackgroundAppContext)();
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
children: !isBackgroundAppReady ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_shared_UIComponents_UISpinner__WEBPACK_IMPORTED_MODULE_4__["default"], {})
}) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(ElementorFormSelect, _objectSpread({}, props))
function ElementorFormSelectContainer(props) {
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__.BackgroudAppContext.Provider, {
value: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.refreshToken && (0,_utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_8__.getOrCreateBackgroundApp)(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.refreshToken),
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(ElementorFormSelectWrapper, _objectSpread({}, props))
/***/ "./scripts/elementor/FormWidget/FormControlController.tsx":
/*!****************************************************************!*\
!*** ./scripts/elementor/FormWidget/FormControlController.tsx ***!
\****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (/* binding */ FormControlController)
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
/* harmony import */ var _Common_ConnectPluginBanner__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Common/ConnectPluginBanner */ "./scripts/elementor/Common/ConnectPluginBanner.tsx");
/* harmony import */ var _ElementorFormSelect__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ElementorFormSelect */ "./scripts/elementor/FormWidget/ElementorFormSelect.tsx");
NotConnected: 'NotConnected'
function FormControlController(attributes, setValue) {
var render = function render() {
if (_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.connectionStatus === ConnectionStatus.Connected) {
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ElementorFormSelect__WEBPACK_IMPORTED_MODULE_4__["default"], {
formId: attributes.formId,
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Common_ConnectPluginBanner__WEBPACK_IMPORTED_MODULE_3__["default"], {});
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
/***/ "./scripts/elementor/FormWidget/FormWidgetController.tsx":
/*!***************************************************************!*\
!*** ./scripts/elementor/FormWidget/FormWidgetController.tsx ***!
\***************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (/* binding */ FormWidgetController)
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
/* harmony import */ var _shared_Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../shared/Common/ErrorHandler */ "./scripts/shared/Common/ErrorHandler.tsx");
/* harmony import */ var _shared_Form_FormEdit__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../shared/Form/FormEdit */ "./scripts/shared/Form/FormEdit.tsx");
/* harmony import */ var _shared_enums_connectionStatus__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../shared/enums/connectionStatus */ "./scripts/shared/enums/connectionStatus.ts");
function FormWidgetController(attributes, setValue) {
var render = function render() {
if (_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.connectionStatus === _shared_enums_connectionStatus__WEBPACK_IMPORTED_MODULE_5__["default"].Connected) {
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_shared_Form_FormEdit__WEBPACK_IMPORTED_MODULE_4__["default"], {
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_shared_Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_3__["default"], {
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {