"use strict";
(self["webpackChunkpost_expirator"] = self["webpackChunkpost_expirator"] || []).push([["assets_jsx_workflow-editor_components_app_jsx"],{

/***/ "./assets/jsx/components/DateOffsetPreview.jsx"
/*!*****************************************************!*\
  !*** ./assets/jsx/components/DateOffsetPreview.jsx ***!
  \*****************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   DateOffsetPreview: () => (/* binding */ DateOffsetPreview),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_url__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/url */ "@wordpress/url");
/* harmony import */ var _wordpress_url__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_url__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }



var _wp = wp,
  apiFetch = _wp.apiFetch;
__webpack_require__(/*! ./css/dateOffsetPreview.css */ "./assets/jsx/components/css/dateOffsetPreview.css");
var DateOffsetPreview = function DateOffsetPreview(_ref) {
  var offset = _ref.offset,
    label = _ref.label,
    labelDatePreview = _ref.labelDatePreview,
    labelOffsetPreview = _ref.labelOffsetPreview,
    setValidationErrorCallback = _ref.setValidationErrorCallback,
    setHasPendingValidationCallback = _ref.setHasPendingValidationCallback,
    setHasValidDataCallback = _ref.setHasValidDataCallback,
    _ref$compactView = _ref.compactView,
    compactView = _ref$compactView === void 0 ? false : _ref$compactView;
  var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(''),
    _useState2 = _slicedToArray(_useState, 2),
    offsetPreview = _useState2[0],
    setOffsetPreview = _useState2[1];
  var _useState3 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(),
    _useState4 = _slicedToArray(_useState3, 2),
    currentTime = _useState4[0],
    setCurrentTime = _useState4[1];
  var apiRequestControllerRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(new AbortController());
  var validateDateOffset = function validateDateOffset() {
    if (offset) {
      var controller = apiRequestControllerRef.current;
      if (controller) {
        controller.abort();
      }
      apiRequestControllerRef.current = new AbortController();
      var signal = apiRequestControllerRef.current.signal;
      setHasPendingValidationCallback(true);
      apiFetch({
        path: (0,_wordpress_url__WEBPACK_IMPORTED_MODULE_1__.addQueryArgs)("publishpress-future/v1/settings/validate-expire-offset"),
        method: 'POST',
        data: {
          offset: offset
        },
        signal: signal
      }).then(function (result) {
        setHasPendingValidationCallback(false);
        setHasValidDataCallback(result.isValid);
        setValidationErrorCallback(result.message);
        if (result.isValid) {
          setOffsetPreview(result.calculatedTime);
          setCurrentTime(result.currentTime);
        } else {
          setOffsetPreview('');
        }
      }).catch(function (error) {
        if (error.name === 'AbortError') {
          return;
        }
        setHasPendingValidationCallback(false);
        setHasValidDataCallback(false);
        setValidationErrorCallback(error.message);
        setOffsetPreview('');
      });
    }
  };
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
    validateDateOffset();
  }, [offset]);
  var compactClass = compactView ? ' compact' : '';
  return /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, offset && /*#__PURE__*/React.createElement("div", {
    className: 'publishpress-future-date-preview' + compactClass
  }, /*#__PURE__*/React.createElement("h4", null, label), /*#__PURE__*/React.createElement("div", {
    className: "publishpress-future-date-preview-body"
  }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
    className: "publishpress-future-date-preview-label"
  }, labelDatePreview, ": "), /*#__PURE__*/React.createElement("span", {
    className: "publishpress-future-date-preview-value"
  }, currentTime)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
    className: "publishpress-future-date-preview-label"
  }, labelOffsetPreview, ": "), /*#__PURE__*/React.createElement("span", {
    className: "publishpress-future-date-preview-value"
  }, offsetPreview)))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (DateOffsetPreview);

/***/ },

/***/ "./assets/jsx/components/css/dateOffsetPreview.css"
/*!*********************************************************!*\
  !*** ./assets/jsx/components/css/dateOffsetPreview.css ***!
  \*********************************************************/
(__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 export */ });
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ "./node_modules/style-loader/dist/runtime/styleDomAPI.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/insertBySelector.js */ "./node_modules/style-loader/dist/runtime/insertBySelector.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ "./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ "./node_modules/style-loader/dist/runtime/insertStyleElement.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ "./node_modules/style-loader/dist/runtime/styleTagTransform.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_postcss_loader_dist_cjs_js_dateOffsetPreview_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/postcss-loader/dist/cjs.js!./dateOffsetPreview.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js!./assets/jsx/components/css/dateOffsetPreview.css");

      
      
      
      
      
      
      
      
      

var options = {};

options.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());
options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());
options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head");
options.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());
options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());

var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_postcss_loader_dist_cjs_js_dateOffsetPreview_css__WEBPACK_IMPORTED_MODULE_6__["default"], options);




       /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_node_modules_postcss_loader_dist_cjs_js_dateOffsetPreview_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_node_modules_postcss_loader_dist_cjs_js_dateOffsetPreview_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_node_modules_postcss_loader_dist_cjs_js_dateOffsetPreview_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined);


/***/ },

/***/ "./assets/jsx/utils.jsx"
/*!******************************!*\
  !*** ./assets/jsx/utils.jsx ***!
  \******************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   compact: () => (/* binding */ compact),
/* harmony export */   debugLogFactory: () => (/* binding */ debugLogFactory),
/* harmony export */   getActionSettingsFromColumnData: () => (/* binding */ getActionSettingsFromColumnData),
/* harmony export */   getElementByName: () => (/* binding */ getElementByName),
/* harmony export */   getFieldByName: () => (/* binding */ getFieldByName),
/* harmony export */   getFieldValueByName: () => (/* binding */ getFieldValueByName),
/* harmony export */   getFieldValueByNameAsArrayOfInt: () => (/* binding */ getFieldValueByNameAsArrayOfInt),
/* harmony export */   getFieldValueByNameAsBool: () => (/* binding */ getFieldValueByNameAsBool),
/* harmony export */   isGutenbergEnabled: () => (/* binding */ isGutenbergEnabled),
/* harmony export */   isNumber: () => (/* binding */ isNumber),
/* harmony export */   stripTags: () => (/* binding */ stripTags)
/* harmony export */ });
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
var compact = function compact(array) {
  if (!array) {
    return [];
  }
  if (!Array.isArray(array) && _typeof(array) === 'object') {
    array = Object.values(array);
  }
  return array.filter(function (item) {
    return item !== null && item !== undefined && item !== '';
  });
};
var debugLogFactory = function debugLogFactory(config) {
  return function (description) {
    if (console && config.isDebugEnabled) {
      var _console;
      for (var _len = arguments.length, message = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
        message[_key - 1] = arguments[_key];
      }
      (_console = console).debug.apply(_console, ['[Future]', description].concat(message));
    }
  };
};
var isGutenbergEnabled = function isGutenbergEnabled() {
  return document.body.classList.contains('block-editor-page');
};
var getElementByName = function getElementByName(name) {
  return document.getElementsByName(name)[0];
};
var getFieldByName = function getFieldByName(name, postId) {
  return document.querySelector("#the-list tr#post-".concat(postId, " .column-expirationdate input#future_action_").concat(name, "-").concat(postId));
};
var getFieldValueByName = function getFieldValueByName(name, postId) {
  var field = getFieldByName(name, postId);
  if (!field) {
    return null;
  }
  return field.value;
};
var getFieldValueByNameAsArrayOfInt = function getFieldValueByNameAsArrayOfInt(name, postId) {
  var field = getFieldByName(name, postId);
  if (!field || !field.value) {
    return [];
  }
  if (typeof field.value === 'number') {
    field.value = field.value.toString();
  }
  return field.value.split(',').map(function (term) {
    return parseInt(term);
  });
};
var getFieldValueByNameAsBool = function getFieldValueByNameAsBool(name, postId) {
  var field = getFieldByName(name, postId);
  if (!field) {
    return false;
  }
  return field.value === '1' || field.value === 'true';
};
var getActionSettingsFromColumnData = function getActionSettingsFromColumnData(postId) {
  var columnData = document.querySelector("#post-expire-column-".concat(postId));
  if (!columnData) {
    return {};
  }
  return {
    enabled: columnData.dataset.actionEnabled === '1',
    action: columnData.dataset.actionType,
    date: columnData.dataset.actionDate,
    dateUnix: columnData.dataset.actionDateUnix,
    taxonomy: columnData.dataset.actionTaxonomy,
    terms: columnData.dataset.actionTerms,
    newStatus: columnData.dataset.actionNewStatus
  };
};

/**
 * This function is used to determine if a value is a number, including strings.
 *
 * @param {*} value
 * @returns
 */
var isNumber = function isNumber(value) {
  return !isNaN(value);
};
function stripTags(string) {
  if (typeof string !== 'string') {
    return '';
  }
  var div = document.createElement('div');
  div.textContent = string;
  return div.innerHTML;
}

/***/ },

/***/ "./assets/jsx/workflow-editor/components/app.jsx"
/*!*******************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/app.jsx ***!
  \*******************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ WorkflowEditorApp)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _layout_layout__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./layout/layout */ "./assets/jsx/workflow-editor/components/layout/layout.jsx");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _workflow_store__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./workflow-store */ "./assets/jsx/workflow-editor/components/workflow-store/index.jsx");
/* harmony import */ var _editor_store__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./editor-store */ "./assets/jsx/workflow-editor/components/editor-store/index.jsx");
/* harmony import */ var _data_types__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./data-types */ "./assets/jsx/workflow-editor/components/data-types/index.jsx");
/* harmony import */ var _css_index_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../css/index.css */ "./assets/jsx/workflow-editor/css/index.css");
/* harmony import */ var reactflow_dist_style_css__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! reactflow/dist/style.css */ "./node_modules/reactflow/dist/style.css");






var _window$futureWorkflo = window.futureWorkflowEditor,
  workflowId = _window$futureWorkflo.workflowId,
  nodeTypeCategories = _window$futureWorkflo.nodeTypeCategories,
  nodeTypes = _window$futureWorkflo.nodeTypes;


function WorkflowEditorApp() {
  var _useDispatch = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_2__.useDispatch)(_workflow_store__WEBPACK_IMPORTED_MODULE_3__.store),
    setupEditor = _useDispatch.setupEditor,
    setDataTypes = _useDispatch.setDataTypes;
  var _useDispatch2 = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_2__.useDispatch)(_editor_store__WEBPACK_IMPORTED_MODULE_4__.store),
    setTriggerNodes = _useDispatch2.setTriggerNodes,
    setTriggerCategories = _useDispatch2.setTriggerCategories,
    setActionCategories = _useDispatch2.setActionCategories,
    setActionNodes = _useDispatch2.setActionNodes,
    setAdvancedCategories = _useDispatch2.setAdvancedCategories,
    setAdvancedNodes = _useDispatch2.setAdvancedNodes;
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
    setupEditor(workflowId);
    setTriggerNodes(nodeTypes.triggers);
    setActionNodes(nodeTypes.actions);
    setAdvancedNodes(nodeTypes.advanced);
    setTriggerCategories(nodeTypeCategories);
    setActionCategories(nodeTypeCategories);
    setAdvancedCategories(nodeTypeCategories);
    var dataTypes = [(0,_data_types__WEBPACK_IMPORTED_MODULE_5__.PostData)(), (0,_data_types__WEBPACK_IMPORTED_MODULE_5__.BooleanData)(), (0,_data_types__WEBPACK_IMPORTED_MODULE_5__.DatetimeData)(), (0,_data_types__WEBPACK_IMPORTED_MODULE_5__.IntegerData)(), (0,_data_types__WEBPACK_IMPORTED_MODULE_5__.StringData)(), (0,_data_types__WEBPACK_IMPORTED_MODULE_5__.EmailData)(), (0,_data_types__WEBPACK_IMPORTED_MODULE_5__.InputData)(), (0,_data_types__WEBPACK_IMPORTED_MODULE_5__.WorkflowData)(), (0,_data_types__WEBPACK_IMPORTED_MODULE_5__.UserData)(), (0,_data_types__WEBPACK_IMPORTED_MODULE_5__.SiteData)(), (0,_data_types__WEBPACK_IMPORTED_MODULE_5__.NodeData)(), (0,_data_types__WEBPACK_IMPORTED_MODULE_5__.ArrayData)(), (0,_data_types__WEBPACK_IMPORTED_MODULE_5__.FutureActionData)(), (0,_data_types__WEBPACK_IMPORTED_MODULE_5__.TermsArrayData)(), (0,_data_types__WEBPACK_IMPORTED_MODULE_5__.MetaData)(), (0,_data_types__WEBPACK_IMPORTED_MODULE_5__.PostStatusData)(), (0,_data_types__WEBPACK_IMPORTED_MODULE_5__.PostTypeData)(), (0,_data_types__WEBPACK_IMPORTED_MODULE_5__.UrlData)(), (0,_data_types__WEBPACK_IMPORTED_MODULE_5__.UserRolesData)(), (0,_data_types__WEBPACK_IMPORTED_MODULE_5__.PostTermsData)()];
    setDataTypes(dataTypes);
  }, [workflowId]);
  return /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.StrictMode, null, /*#__PURE__*/React.createElement(_layout_layout__WEBPACK_IMPORTED_MODULE_1__.WorkflowEditorLayout, null));
}
;

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/action-args/argument-item.jsx"
/*!*****************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/action-args/argument-item.jsx ***!
  \*****************************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   ArgumentItem: () => (/* binding */ ArgumentItem),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _inline_setting__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../inline-setting */ "./assets/jsx/workflow-editor/components/data-fields/inline-setting/index.jsx");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _expression_builder__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../expression-builder */ "./assets/jsx/workflow-editor/components/data-fields/expression-builder/index.jsx");
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }





var ArgumentItem = function ArgumentItem(_ref) {
  var _defaultValue5, _defaultValue6, _defaultValue7;
  var name = _ref.name,
    label = _ref.label,
    popoverLabel = _ref.popoverLabel,
    defaultValue = _ref.defaultValue,
    onChange = _ref.onChange,
    _ref$variables = _ref.variables,
    variables = _ref$variables === void 0 ? [] : _ref$variables,
    onClosePopover = _ref.onClosePopover,
    isLoading = _ref.isLoading,
    autoOpen = _ref.autoOpen,
    _ref$withExpression = _ref.withExpression,
    withExpression = _ref$withExpression === void 0 ? false : _ref$withExpression;
  defaultValue = _objectSpread({
    name: "",
    value: "integer",
    type: "integer"
  }, defaultValue);
  var dataTypeOptions = [{
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Integer', 'post-expirator'),
    value: 'integer'
  }, {
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('String', 'post-expirator'),
    value: 'string'
  }, {
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Boolean', 'post-expirator'),
    value: 'boolean'
  }, {
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Object', 'post-expirator'),
    value: 'object'
  }, {
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Array', 'post-expirator'),
    value: 'array'
  }, {
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Post', 'post-expirator'),
    value: 'post'
  }, {
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('User', 'post-expirator'),
    value: 'user'
  }];
  var onChangeName = function onChangeName(value) {
    value = value.replace(/[^a-zA-Z0-9_]/g, '').trim();
    onChange(_objectSpread(_objectSpread({}, defaultValue), {}, {
      name: value
    }));
  };
  var onChangeValue = function onChangeValue(value) {
    onChange(_objectSpread(_objectSpread({}, defaultValue), {}, {
      value: value,
      type: value
    }));
  };
  var onChangeExpression = function onChangeExpression(settingName, value) {
    onChange(_objectSpread(_objectSpread({}, defaultValue), {}, {
      expression: value
    }));
  };
  var getDataTypeLabel = function getDataTypeLabel() {
    var _defaultValue, _defaultValue2, _dataTypeOptions$find;
    var dataType = ((_defaultValue = defaultValue) === null || _defaultValue === void 0 ? void 0 : _defaultValue.type) || ((_defaultValue2 = defaultValue) === null || _defaultValue2 === void 0 ? void 0 : _defaultValue2.value) || 'integer';
    return (_dataTypeOptions$find = dataTypeOptions.find(function (option) {
      return option.value === dataType;
    })) === null || _dataTypeOptions$find === void 0 ? void 0 : _dataTypeOptions$find.label;
  };
  var getExpressionPreview = function getExpressionPreview() {
    var _defaultValue3;
    return (_defaultValue3 = defaultValue) !== null && _defaultValue3 !== void 0 && (_defaultValue3 = _defaultValue3.expression) !== null && _defaultValue3 !== void 0 && _defaultValue3.expression ? "".concat(defaultValue.expression.expression) : (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('null', 'post-expirator');
  };
  var getValuePreview = function getValuePreview() {
    var _defaultValue4;
    if ((_defaultValue4 = defaultValue) !== null && _defaultValue4 !== void 0 && (_defaultValue4 = _defaultValue4.expression) !== null && _defaultValue4 !== void 0 && _defaultValue4.expression) {
      return "".concat(defaultValue.name, ": ").concat(getExpressionPreview(), " (").concat(getDataTypeLabel(), ")");
    }
    return "".concat(defaultValue.name, ": (").concat(getDataTypeLabel(), ")");
  };
  return /*#__PURE__*/React.createElement(_inline_setting__WEBPACK_IMPORTED_MODULE_2__["default"], {
    name: name,
    label: label,
    popoverLabel: popoverLabel,
    valuePreview: getValuePreview(),
    onClosePopover: onClosePopover,
    isLoading: isLoading,
    autoOpen: autoOpen
  }, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.TextControl, {
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Argument name', 'post-expirator'),
    value: defaultValue.name,
    onChange: onChangeName,
    autoFocus: autoOpen
  }), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.SelectControl, {
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Data type', 'post-expirator'),
    value: ((_defaultValue5 = defaultValue) === null || _defaultValue5 === void 0 ? void 0 : _defaultValue5.type) || ((_defaultValue6 = defaultValue) === null || _defaultValue6 === void 0 ? void 0 : _defaultValue6.value),
    options: dataTypeOptions,
    onChange: onChangeValue
  }), withExpression && /*#__PURE__*/React.createElement(_expression_builder__WEBPACK_IMPORTED_MODULE_4__["default"], {
    name: "expression",
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Value', 'post-expirator'),
    defaultValue: (_defaultValue7 = defaultValue) === null || _defaultValue7 === void 0 ? void 0 : _defaultValue7.expression,
    onChange: onChangeExpression,
    variables: variables
  }), /*#__PURE__*/React.createElement("p", {
    className: "description margin-top"
  }, (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('The argument name should only contain letters, numbers and underscores.', 'post-expirator'))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ArgumentItem);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/action-args/index.jsx"
/*!*********************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/action-args/index.jsx ***!
  \*********************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   ActionArgs: () => (/* binding */ ActionArgs),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _description_text__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../description-text */ "./assets/jsx/workflow-editor/components/data-fields/description-text.jsx");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _argument_item__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./argument-item */ "./assets/jsx/workflow-editor/components/data-fields/action-args/argument-item.jsx");
/* harmony import */ var _style_css__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./style.css */ "./assets/jsx/workflow-editor/components/data-fields/action-args/style.css");
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }







function ActionArgs(_ref) {
  var name = _ref.name,
    label = _ref.label,
    defaultValue = _ref.defaultValue,
    onChange = _ref.onChange,
    settings = _ref.settings,
    _ref$variables = _ref.variables,
    variables = _ref$variables === void 0 ? [] : _ref$variables,
    helpUrl = _ref.helpUrl,
    description = _ref.description;
  var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useState)(null),
    _useState2 = _slicedToArray(_useState, 2),
    autoOpenItem = _useState2[0],
    setAutoOpenItem = _useState2[1];
  var onChangeSetting = function onChangeSetting(_ref2) {
    var value = _ref2.value;
    if (onChange) {
      onChange(name, value);
    }
  };
  if (!defaultValue || !Array.isArray(defaultValue)) {
    defaultValue = [];
  }

  // If the args are empty or have no value, set the default value
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useEffect)(function () {
    if (defaultValue.length === 0) {
      return;
    }
    defaultValue.forEach(function (arg) {
      if (!arg.value) {
        arg.value = defaultDataType;
      }
    });
  }, []);
  var defaultDataType = 'integer';
  var onClickAddArg = function onClickAddArg() {
    onChangeSetting({
      value: [].concat(_toConsumableArray(defaultValue), [{
        name: '',
        value: defaultDataType,
        type: defaultDataType
      }])
    });
    setAutoOpenItem(defaultValue.length);
  };
  var onClickRemoveArg = function onClickRemoveArg(index) {
    onChangeSetting({
      value: defaultValue.filter(function (_, i) {
        return i !== index;
      })
    });
  };
  var onChangeArg = function onChangeArg(index, value) {
    var newArgs = defaultValue.map(function (arg, i) {
      return i === index ? value : arg;
    });
    onChangeSetting({
      value: newArgs,
      type: newArgs
    });
  };
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalVStack, {
    className: "workflow-editor-panel__row-args-container"
  }, /*#__PURE__*/React.createElement("label", {
    className: "workflow-editor-panel__row-args-label"
  }, label), defaultValue.map(function (arg, index) {
    return /*#__PURE__*/React.createElement("div", {
      key: "arg-".concat(index),
      className: "workflow-editor-panel__row-args"
    }, /*#__PURE__*/React.createElement(_argument_item__WEBPACK_IMPORTED_MODULE_4__["default"], {
      name: "args[".concat(index, "].name"),
      label: "#".concat(index + 1),
      popoverLabel: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.sprintf)((0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Argument #%s', 'post-expirator'), index + 1),
      defaultValue: arg,
      onChange: function onChange(value) {
        return onChangeArg(index, value);
      },
      autoOpen: autoOpenItem === index,
      onClosePopover: function onClosePopover() {
        return setAutoOpenItem(null);
      },
      withExpression: settings === null || settings === void 0 ? void 0 : settings.withExpression,
      variables: variables
    }), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, {
      onClick: function onClick() {
        return onClickRemoveArg(index);
      },
      isSmall: true,
      iconSize: 16,
      icon: 'trash'
    }));
  }), defaultValue.length === 0 && /*#__PURE__*/React.createElement("div", {
    className: "workflow-editor-panel__row-args-empty"
  }, (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('No arguments added to the action.', 'post-expirator')), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, {
    onClick: onClickAddArg,
    iconSize: 16,
    icon: 'plus',
    variant: "tertiary"
  }, (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Add a new argument', 'post-expirator')), description && /*#__PURE__*/React.createElement(_description_text__WEBPACK_IMPORTED_MODULE_2__.DescriptionText, {
    text: description,
    helpUrl: helpUrl
  })));
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ActionArgs);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/action-args/style.css"
/*!*********************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/action-args/style.css ***!
  \*********************************************************************************/
(__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 export */ });
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ "./node_modules/style-loader/dist/runtime/styleDomAPI.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../../../../node_modules/style-loader/dist/runtime/insertBySelector.js */ "./node_modules/style-loader/dist/runtime/insertBySelector.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ "./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ "./node_modules/style-loader/dist/runtime/insertStyleElement.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ "./node_modules/style-loader/dist/runtime/styleTagTransform.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_postcss_loader_dist_cjs_js_style_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../../../../../node_modules/css-loader/dist/cjs.js!../../../../../../node_modules/postcss-loader/dist/cjs.js!./style.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js!./assets/jsx/workflow-editor/components/data-fields/action-args/style.css");

      
      
      
      
      
      
      
      
      

var options = {};

options.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());
options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());
options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head");
options.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());
options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());

var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_postcss_loader_dist_cjs_js_style_css__WEBPACK_IMPORTED_MODULE_6__["default"], options);




       /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_node_modules_postcss_loader_dist_cjs_js_style_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_node_modules_postcss_loader_dist_cjs_js_style_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_node_modules_postcss_loader_dist_cjs_js_style_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined);


/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/ask-confirmation.jsx"
/*!********************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/ask-confirmation.jsx ***!
  \********************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   AskForConfirmation: () => (/* binding */ AskForConfirmation),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _expression_builder__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./expression-builder */ "./assets/jsx/workflow-editor/components/data-fields/expression-builder/index.jsx");
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }




function AskForConfirmation(_ref) {
  var name = _ref.name,
    label = _ref.label,
    defaultValue = _ref.defaultValue,
    onChange = _ref.onChange,
    settings = _ref.settings,
    description = _ref.description,
    _ref$variables = _ref.variables,
    variables = _ref$variables === void 0 ? [] : _ref$variables;
  var onChangeSetting = function onChangeSetting(_ref2) {
    var settingName = _ref2.settingName,
      value = _ref2.value;
    if (onChange) {
      var newSettings = _objectSpread(_objectSpread({}, defaultValue), {}, _defineProperty({}, settingName, value));
      onChange(name, newSettings);
    }
  };
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalVStack, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, {
    label: label,
    checked: (defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.enabled) || false,
    onChange: function onChange(value) {
      return onChangeSetting({
        settingName: "enabled",
        value: value
      });
    }
  }), description && /*#__PURE__*/React.createElement("p", {
    className: "description"
  }, description), (defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.enabled) && /*#__PURE__*/React.createElement(_expression_builder__WEBPACK_IMPORTED_MODULE_2__["default"], {
    name: "confirmationMessage",
    label: "Confirmation message",
    defaultValue: defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.message,
    onChange: function onChange(settingName, value) {
      return onChangeSetting({
        settingName: "message",
        value: value
      });
    },
    variables: variables
  })));
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AskForConfirmation);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/conditional-date-offset.jsx"
/*!***************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/conditional-date-offset.jsx ***!
  \***************************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   ConditionalDateOffset: () => (/* binding */ ConditionalDateOffset),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _date_offset__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./date-offset */ "./assets/jsx/workflow-editor/components/data-fields/date-offset/index.jsx");
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }




function ConditionalDateOffset(_ref) {
  var name = _ref.name,
    label = _ref.label,
    defaultValue = _ref.defaultValue,
    onChange = _ref.onChange,
    settings = _ref.settings,
    description = _ref.description,
    _ref$variables = _ref.variables,
    variables = _ref$variables === void 0 ? [] : _ref$variables;
  var onChangeSetting = function onChangeSetting(_ref2) {
    var settingName = _ref2.settingName,
      value = _ref2.value;
    if (onChange) {
      var newSettings = _objectSpread(_objectSpread({}, defaultValue), {}, _defineProperty({}, settingName, value));
      onChange(name, newSettings);
    }
  };
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalVStack, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, {
    label: label,
    checked: (defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.enabled) || false,
    onChange: function onChange(value) {
      return onChangeSetting({
        settingName: "enabled",
        value: value
      });
    }
  }), description && /*#__PURE__*/React.createElement("p", {
    className: "description"
  }, description), (defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.enabled) && /*#__PURE__*/React.createElement(_date_offset__WEBPACK_IMPORTED_MODULE_2__["default"], {
    name: name,
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("When to expire", "post-expirator"),
    defaultValue: defaultValue,
    onChange: onChange,
    settings: settings,
    description: description
  })));
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ConditionalDateOffset);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/conditional/components/add-element-button.jsx"
/*!*********************************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/conditional/components/add-element-button.jsx ***!
  \*********************************************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   AddElementButton: () => (/* binding */ AddElementButton)
/* harmony export */ });
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__);

var AddElementButton = function AddElementButton(_ref) {
  var label = _ref.label,
    handleOnClick = _ref.handleOnClick;
  return /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Button, {
    onClick: handleOnClick,
    variant: "secondary"
  }, label);
};

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/conditional/components/combinator-selector.jsx"
/*!**********************************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/conditional/components/combinator-selector.jsx ***!
  \**********************************************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   CombinatorSelector: () => (/* binding */ CombinatorSelector)
/* harmony export */ });
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__);

var CombinatorSelector = function CombinatorSelector(_ref) {
  var label = _ref.label,
    value = _ref.value,
    options = _ref.options,
    handleOnChange = _ref.handleOnChange;
  return /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.SelectControl, {
    label: label,
    value: value,
    options: options,
    onChange: handleOnChange
  });
};

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/conditional/components/condition-preview.jsx"
/*!********************************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/conditional/components/condition-preview.jsx ***!
  \********************************************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   ConditionPreview: () => (/* binding */ ConditionPreview)
/* harmony export */ });
/* harmony import */ var react_ace__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-ace */ "./node_modules/react-ace/lib/index.js");
/* harmony import */ var ace_builds_src_noconflict_mode_handlebars__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ace-builds/src-noconflict/mode-handlebars */ "./node_modules/ace-builds/src-noconflict/mode-handlebars.js");
/* harmony import */ var ace_builds_src_noconflict_mode_handlebars__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(ace_builds_src_noconflict_mode_handlebars__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var ace_builds_src_noconflict_theme_textmate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ace-builds/src-noconflict/theme-textmate */ "./node_modules/ace-builds/src-noconflict/theme-textmate.js");
/* harmony import */ var ace_builds_src_noconflict_theme_textmate__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(ace_builds_src_noconflict_theme_textmate__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var ace_builds_src_noconflict_ext_language_tools__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ace-builds/src-noconflict/ext-language_tools */ "./node_modules/ace-builds/src-noconflict/ext-language_tools.js");
/* harmony import */ var ace_builds_src_noconflict_ext_language_tools__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(ace_builds_src_noconflict_ext_language_tools__WEBPACK_IMPORTED_MODULE_3__);




var ConditionPreview = function ConditionPreview(_ref) {
  var defaultValue = _ref.defaultValue,
    editorRef = _ref.editorRef,
    editorProps = _ref.editorProps,
    editorOptions = _ref.editorOptions;
  if (!(defaultValue !== null && defaultValue !== void 0 && defaultValue.natural)) return null;
  return /*#__PURE__*/React.createElement(react_ace__WEBPACK_IMPORTED_MODULE_0__["default"], {
    ref: editorRef,
    mode: "handlebars",
    theme: "textmate",
    name: "expression-builder-natural-language",
    className: "read-only-editor settings-panel",
    wrapEnabled: true,
    value: (defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.natural) || '',
    editorProps: editorProps,
    readOnly: true,
    setOptions: editorOptions
  });
};

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/conditional/components/conditional-expression-builder.jsx"
/*!*********************************************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/conditional/components/conditional-expression-builder.jsx ***!
  \*********************************************************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   ConditionalExpressionBuilder: () => (/* binding */ ConditionalExpressionBuilder)
/* harmony export */ });
/* harmony import */ var _expression_builder__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../expression-builder */ "./assets/jsx/workflow-editor/components/data-fields/expression-builder/index.jsx");

var ConditionalExpressionBuilder = function ConditionalExpressionBuilder(_ref) {
  var value = _ref.value,
    handleOnChange = _ref.handleOnChange,
    context = _ref.context,
    readOnlyPreview = _ref.readOnlyPreview,
    singleVariableOnly = _ref.singleVariableOnly,
    _ref$autoComplete = _ref.autoComplete,
    autoComplete = _ref$autoComplete === void 0 ? false : _ref$autoComplete,
    _ref$completers = _ref.completers,
    completers = _ref$completers === void 0 ? [] : _ref$completers;
  var onChange = function onChange(name, value) {
    if (handleOnChange) {
      handleOnChange(value.expression);
    }
  };
  if (value === 'global.site') {
    value = '';
  }
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(_expression_builder__WEBPACK_IMPORTED_MODULE_0__["default"], {
    name: context.name,
    label: context.label,
    defaultValue: {
      expression: value
    },
    onChange: onChange,
    variables: context.variables,
    isInline: true,
    readOnlyPreview: readOnlyPreview || false,
    singleVariableOnly: singleVariableOnly || false,
    oneLinePreview: true,
    wrapOnPreview: false,
    wrapOnEditor: false,
    autoComplete: autoComplete,
    completers: completers
  }));
};

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/conditional/components/conditional-hoc.jsx"
/*!******************************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/conditional/components/conditional-hoc.jsx ***!
  \******************************************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   withConditional: () => (/* binding */ withConditional)
/* harmony export */ });
/* harmony import */ var react_querybuilder__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-querybuilder */ "./node_modules/react-querybuilder/dist/react-querybuilder.mjs");
/* harmony import */ var _react_querybuilder_dnd__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @react-querybuilder/dnd */ "./node_modules/@react-querybuilder/dnd/dist/react-querybuilder_dnd.mjs");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _editor_store__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../editor-store */ "./assets/jsx/workflow-editor/components/editor-store/index.jsx");
/* harmony import */ var _not_toggle__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./not-toggle */ "./assets/jsx/workflow-editor/components/data-fields/conditional/components/not-toggle.jsx");
/* harmony import */ var _add_element_button__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./add-element-button */ "./assets/jsx/workflow-editor/components/data-fields/conditional/components/add-element-button.jsx");
/* harmony import */ var _remove_element_button__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./remove-element-button */ "./assets/jsx/workflow-editor/components/data-fields/conditional/components/remove-element-button.jsx");
/* harmony import */ var _duplicate_rule_button__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./duplicate-rule-button */ "./assets/jsx/workflow-editor/components/data-fields/conditional/components/duplicate-rule-button.jsx");
/* harmony import */ var _combinator_selector__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./combinator-selector */ "./assets/jsx/workflow-editor/components/data-fields/conditional/components/combinator-selector.jsx");
/* harmony import */ var _operator_selector__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./operator-selector */ "./assets/jsx/workflow-editor/components/data-fields/conditional/components/operator-selector.jsx");
/* harmony import */ var _condition_preview__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./condition-preview */ "./assets/jsx/workflow-editor/components/data-fields/conditional/components/condition-preview.jsx");
/* harmony import */ var _hooks_useConditionalLogic__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../hooks/useConditionalLogic */ "./assets/jsx/workflow-editor/components/data-fields/conditional/hooks/useConditionalLogic.jsx");
/* harmony import */ var _hooks_useModalManagement__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../hooks/useModalManagement */ "./assets/jsx/workflow-editor/components/data-fields/conditional/hooks/useModalManagement.jsx");
/* harmony import */ var _hooks_useEditorSetup__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../hooks/useEditorSetup */ "./assets/jsx/workflow-editor/components/data-fields/conditional/hooks/useEditorSetup.jsx");
/* harmony import */ var _hooks_useLegacyVariables__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../hooks/useLegacyVariables */ "./assets/jsx/workflow-editor/components/data-fields/conditional/hooks/useLegacyVariables.jsx");
/* harmony import */ var _contexts_pro_context__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../../contexts/pro-context */ "./assets/jsx/workflow-editor/contexts/pro-context.jsx");
/* harmony import */ var _modal_footer__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./../../modal-footer */ "./assets/jsx/workflow-editor/components/data-fields/modal-footer.jsx");
/* harmony import */ var react_querybuilder_dist_query_builder_css__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! react-querybuilder/dist/query-builder.css */ "./node_modules/react-querybuilder/dist/query-builder.css");
/* harmony import */ var _css_query_builder_css__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../../../css/query-builder.css */ "./assets/jsx/workflow-editor/css/query-builder.css");
/* harmony import */ var _styles_index_css__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../styles/index.css */ "./assets/jsx/workflow-editor/components/data-fields/conditional/styles/index.css");
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }























var EDITOR_PROPS = {
  $blockScrolling: true
};
var EDITOR_OPTIONS = {
  enableBasicAutocompletion: false,
  enableLiveAutocompletion: false,
  showGutter: false,
  showPrintMargin: false,
  showLineNumbers: false,
  showInvisibles: false,
  highlightActiveLine: false
};
var QUERY_BUILDER_TRANSLATIONS = {
  addGroup: {
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Add Group', 'post-expirator')
  },
  addRule: {
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Add Rule', 'post-expirator')
  }
};
var QUERY_BUILDER_CONTROL_CLASSNAMES = {
  queryBuilder: 'queryBuilder-branches'
};

/**
 * Higher-order component for creating conditional query builders
 */
var withConditional = function withConditional(_ref) {
  var FieldComponent = _ref.FieldComponent,
    ValueComponent = _ref.ValueComponent,
    _ref$modalTitle = _ref.modalTitle,
    modalTitle = _ref$modalTitle === void 0 ? (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Condition', 'post-expirator') : _ref$modalTitle,
    _ref$modalDescription = _ref.modalDescription,
    modalDescription = _ref$modalDescription === void 0 ? (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Create rules that will continue the workflow only if certain conditions are met.', 'post-expirator') : _ref$modalDescription,
    _ref$buttonText = _ref.buttonText,
    buttonText = _ref$buttonText === void 0 ? (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Edit rules', 'post-expirator') : _ref$buttonText,
    _ref$proFeatureMessag = _ref.proFeatureMessage,
    proFeatureMessage = _ref$proFeatureMessag === void 0 ? (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Conditional logic is a Pro feature. Upgrade to create advanced conditions for your workflows.', 'post-expirator') : _ref$proFeatureMessag,
    _ref$onQueryChange = _ref.onQueryChange,
    onQueryChange = _ref$onQueryChange === void 0 ? null : _ref$onQueryChange,
    _ref$isProFeature = _ref.isProFeature,
    isProFeature = _ref$isProFeature === void 0 ? false : _ref$isProFeature,
    _ref$defaultField = _ref.defaultField,
    defaultField = _ref$defaultField === void 0 ? '' : _ref$defaultField,
    _ref$queryFields = _ref.queryFields,
    queryFields = _ref$queryFields === void 0 ? null : _ref$queryFields;
  // Return the actual component
  return function (_ref2) {
    var name = _ref2.name,
      label = _ref2.label,
      defaultValue = _ref2.defaultValue,
      onChange = _ref2.onChange,
      variables = _ref2.variables;
    var _useConditionalLogic = (0,_hooks_useConditionalLogic__WEBPACK_IMPORTED_MODULE_14__.useConditionalLogic)({
        defaultValue: defaultValue,
        name: name,
        onChange: onChange,
        variables: queryFields !== null && queryFields !== void 0 ? queryFields : variables,
        onQueryChange: onQueryChange
      }),
      query = _useConditionalLogic.query,
      setQuery = _useConditionalLogic.setQuery,
      formatCondition = _useConditionalLogic.formatCondition,
      operators = _useConditionalLogic.operators;
    var _useModalManagement = (0,_hooks_useModalManagement__WEBPACK_IMPORTED_MODULE_15__.useModalManagement)({
        onChange: onChange,
        name: name,
        formatCondition: formatCondition
      }),
      isModalOpen = _useModalManagement.isModalOpen,
      onCloseModal = _useModalManagement.onCloseModal,
      openModal = _useModalManagement.openModal;
    var _useEditorSetup = (0,_hooks_useEditorSetup__WEBPACK_IMPORTED_MODULE_16__.useEditorSetup)(),
      _useEditorSetup2 = _slicedToArray(_useEditorSetup, 1),
      editorRef = _useEditorSetup2[0];
    var _useLegacyVariables = (0,_hooks_useLegacyVariables__WEBPACK_IMPORTED_MODULE_17__.useLegacyVariables)(),
      _useLegacyVariables2 = _slicedToArray(_useLegacyVariables, 1),
      convertLegacyVariables = _useLegacyVariables2[0];
    var _useDispatch = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_5__.useDispatch)(_editor_store__WEBPACK_IMPORTED_MODULE_6__.store),
      setCurrentConditionalQuery = _useDispatch.setCurrentConditionalQuery;
    var getDefaultField = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useCallback)(function (field) {
      return defaultField;
    }, []);
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useEffect)(function () {
      convertLegacyVariables(query);
    }, []);
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useEffect)(function () {
      setCurrentConditionalQuery(query);
    }, [query]);
    var queryBuilderControlElements = {
      fieldSelector: FieldComponent,
      valueEditor: ValueComponent,
      notToggle: _not_toggle__WEBPACK_IMPORTED_MODULE_7__.NotToggle,
      addRuleAction: _add_element_button__WEBPACK_IMPORTED_MODULE_8__.AddElementButton,
      addGroupAction: _add_element_button__WEBPACK_IMPORTED_MODULE_8__.AddElementButton,
      removeGroupAction: _remove_element_button__WEBPACK_IMPORTED_MODULE_9__.RemoveElementButton,
      removeRuleAction: _remove_element_button__WEBPACK_IMPORTED_MODULE_9__.RemoveElementButton,
      cloneRuleAction: _duplicate_rule_button__WEBPACK_IMPORTED_MODULE_10__.DuplicateRuleButton,
      cloneGroupAction: _duplicate_rule_button__WEBPACK_IMPORTED_MODULE_10__.DuplicateRuleButton,
      combinatorSelector: _combinator_selector__WEBPACK_IMPORTED_MODULE_11__.CombinatorSelector,
      operatorSelector: _operator_selector__WEBPACK_IMPORTED_MODULE_12__.OperatorSelector
    };
    var queryBuilderContext = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useMemo)(function () {
      return {
        variables: variables,
        name: name,
        label: label
      };
    }, [variables, name, label]);
    var formattedCondition = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useMemo)(function () {
      return formatCondition();
    }, [formatCondition]);
    var isPro = (0,_contexts_pro_context__WEBPACK_IMPORTED_MODULE_18__.useIsPro)();
    return /*#__PURE__*/React.createElement("div", {
      className: "conditional-editor"
    }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, {
      onClick: openModal,
      variant: "secondary"
    }, buttonText), /*#__PURE__*/React.createElement(_condition_preview__WEBPACK_IMPORTED_MODULE_13__.ConditionPreview, {
      defaultValue: formattedCondition,
      editorRef: editorRef,
      editorProps: EDITOR_PROPS,
      editorOptions: EDITOR_OPTIONS,
      naturalLanguage: formattedCondition.natural
    }), !isPro && isProFeature && /*#__PURE__*/React.createElement("div", {
      className: "conditional-editor-pro-feature-message"
    }, /*#__PURE__*/React.createElement("p", {
      className: "description margin-top"
    }, proFeatureMessage)), isModalOpen && /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Modal, {
      onClose: onCloseModal,
      title: modalTitle,
      onRequestClose: onCloseModal,
      className: "workflow-editor-modal conditional-editor-modal"
    }, /*#__PURE__*/React.createElement("p", null, modalDescription), /*#__PURE__*/React.createElement(_react_querybuilder_dnd__WEBPACK_IMPORTED_MODULE_1__.QueryBuilderDnD, null, /*#__PURE__*/React.createElement(react_querybuilder__WEBPACK_IMPORTED_MODULE_0__.QueryBuilder, {
      fields: variables,
      onQueryChange: setQuery,
      query: query,
      addRuleToNewGroups: true,
      parseNumbers: "strict-limited",
      showCombinatorsBetweenRules: true,
      showNotToggle: true,
      enableDragAndDrop: true,
      showCloneButtons: true,
      controlClassnames: QUERY_BUILDER_CONTROL_CLASSNAMES,
      translations: QUERY_BUILDER_TRANSLATIONS,
      controlElements: queryBuilderControlElements,
      context: queryBuilderContext,
      getDefaultField: getDefaultField,
      operators: operators
    })), /*#__PURE__*/React.createElement(_modal_footer__WEBPACK_IMPORTED_MODULE_19__.ModalFooter, {
      onClose: onCloseModal
    })));
  };
};

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/conditional/components/conditional.jsx"
/*!**************************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/conditional/components/conditional.jsx ***!
  \**************************************************************************************************/
(__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 export */ });
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _field_expression_builder__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./field-expression-builder */ "./assets/jsx/workflow-editor/components/data-fields/conditional/components/field-expression-builder.jsx");
/* harmony import */ var _value_expression_builder__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./value-expression-builder */ "./assets/jsx/workflow-editor/components/data-fields/conditional/components/value-expression-builder.jsx");
/* harmony import */ var _conditional_hoc__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./conditional-hoc */ "./assets/jsx/workflow-editor/components/data-fields/conditional/components/conditional-hoc.jsx");




var Conditional = (0,_conditional_hoc__WEBPACK_IMPORTED_MODULE_3__.withConditional)({
  FieldComponent: _field_expression_builder__WEBPACK_IMPORTED_MODULE_1__.FieldExpressionBuilder,
  ValueComponent: _value_expression_builder__WEBPACK_IMPORTED_MODULE_2__.ValueExpressionBuilder,
  isProFeature: true,
  defaultField: '{{global.user.id}}'
});
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Conditional);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/conditional/components/duplicate-rule-button.jsx"
/*!************************************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/conditional/components/duplicate-rule-button.jsx ***!
  \************************************************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   DuplicateRuleButton: () => (/* binding */ DuplicateRuleButton)
/* harmony export */ });
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
var _excluded = ["handleOnClick"];
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }


var DuplicateRuleButton = function DuplicateRuleButton(_ref) {
  var handleOnClick = _ref.handleOnClick,
    props = _objectWithoutProperties(_ref, _excluded);
  return /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Button, {
    onClick: handleOnClick,
    variant: "secondary",
    className: "conditional-editor-modal-duplicate-rule",
    title: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Duplicate Rule', 'post-expirator')
  }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Dashicon, {
    icon: "admin-page",
    size: 16
  }));
};

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/conditional/components/field-expression-builder.jsx"
/*!***************************************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/conditional/components/field-expression-builder.jsx ***!
  \***************************************************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   FieldExpressionBuilder: () => (/* binding */ FieldExpressionBuilder)
/* harmony export */ });
/* harmony import */ var _conditional_expression_builder__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./conditional-expression-builder */ "./assets/jsx/workflow-editor/components/data-fields/conditional/components/conditional-expression-builder.jsx");

var FieldExpressionBuilder = function FieldExpressionBuilder(_ref) {
  var value = _ref.value,
    handleOnChange = _ref.handleOnChange,
    context = _ref.context;
  return /*#__PURE__*/React.createElement(_conditional_expression_builder__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpressionBuilder, {
    value: value,
    handleOnChange: handleOnChange,
    context: context,
    readOnlyPreview: true,
    singleVariableOnly: false
  });
};

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/conditional/components/not-toggle.jsx"
/*!*************************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/conditional/components/not-toggle.jsx ***!
  \*************************************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   NotToggle: () => (/* binding */ NotToggle)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _editor_store__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../editor-store */ "./assets/jsx/workflow-editor/components/editor-store/index.jsx");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__);
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }





var NotToggle = function NotToggle(_ref) {
  var checked = _ref.checked,
    handleOnChange = _ref.handleOnChange;
  var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(checked || false),
    _useState2 = _slicedToArray(_useState, 2),
    isNot = _useState2[0],
    setIsNot = _useState2[1];
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
    setIsNot(checked || false);
  }, [checked]);
  var handleToggle = function handleToggle() {
    var newValue = !isNot;
    setIsNot(newValue);
    handleOnChange(newValue);
  };
  var _useSelect = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.useSelect)(function (select) {
      return {
        currentConditionalQuery: select(_editor_store__WEBPACK_IMPORTED_MODULE_2__.store).getCurrentConditionalQuery()
      };
    }),
    currentConditionalQuery = _useSelect.currentConditionalQuery;
  return /*#__PURE__*/React.createElement(React.Fragment, null, currentConditionalQuery && currentConditionalQuery.rules.length > 0 && /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.CheckboxControl, {
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Not', 'post-expirator'),
    checked: isNot,
    onChange: handleToggle,
    className: isNot ? 'is-checked' : ''
  }));
};

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/conditional/components/operator-selector.jsx"
/*!********************************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/conditional/components/operator-selector.jsx ***!
  \********************************************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   OperatorSelector: () => (/* binding */ OperatorSelector)
/* harmony export */ });
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__);

var OperatorSelector = function OperatorSelector(_ref) {
  var label = _ref.label,
    value = _ref.value,
    options = _ref.options,
    handleOnChange = _ref.handleOnChange;
  return /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.SelectControl, {
    label: label,
    value: value,
    options: options,
    onChange: handleOnChange,
    className: "conditional-editor-modal-operator-selector"
  });
};

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/conditional/components/remove-element-button.jsx"
/*!************************************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/conditional/components/remove-element-button.jsx ***!
  \************************************************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   RemoveElementButton: () => (/* binding */ RemoveElementButton)
/* harmony export */ });
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__);

var RemoveElementButton = function RemoveElementButton(_ref) {
  var label = _ref.label,
    handleOnClick = _ref.handleOnClick;
  return /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Button, {
    onClick: handleOnClick,
    variant: "secondary",
    className: "conditional-editor-modal-remove-element"
  }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Dashicon, {
    icon: "trash",
    size: 16
  }));
};

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/conditional/components/value-expression-builder.jsx"
/*!***************************************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/conditional/components/value-expression-builder.jsx ***!
  \***************************************************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   ValueExpressionBuilder: () => (/* binding */ ValueExpressionBuilder)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../utils */ "./assets/jsx/workflow-editor/utils.jsx");
/* harmony import */ var _conditional_expression_builder__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./conditional-expression-builder */ "./assets/jsx/workflow-editor/components/data-fields/conditional/components/conditional-expression-builder.jsx");
/* harmony import */ var _expression_builder_autocompleters_post_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../expression-builder/autocompleters/post-types */ "./assets/jsx/workflow-editor/components/data-fields/expression-builder/autocompleters/post-types.jsx");
/* harmony import */ var _expression_builder_autocompleters_post_statuses__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../expression-builder/autocompleters/post-statuses */ "./assets/jsx/workflow-editor/components/data-fields/expression-builder/autocompleters/post-statuses.jsx");
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }





var ValueExpressionBuilder = function ValueExpressionBuilder(_ref) {
  var value = _ref.value,
    handleOnChange = _ref.handleOnChange,
    context = _ref.context,
    rule = _ref.rule;
  var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)([]),
    _useState2 = _slicedToArray(_useState, 2),
    completers = _useState2[0],
    setCompleters = _useState2[1];

  // Get the variable data type
  var variableDataType = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
    return (0,_utils__WEBPACK_IMPORTED_MODULE_1__.getVariableDataTypeByVariableName)(rule.field, context.variables);
  }, [rule, context]);
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
    var newCompleters = [];
    switch (variableDataType) {
      case 'post_type':
        newCompleters.push(_expression_builder_autocompleters_post_types__WEBPACK_IMPORTED_MODULE_3__["default"]);
        break;
      case 'post_status':
        newCompleters.push(_expression_builder_autocompleters_post_statuses__WEBPACK_IMPORTED_MODULE_4__["default"]);
        break;
    }
    setCompleters(newCompleters);
  }, [variableDataType]);
  if (rule.operator === 'null' || rule.operator === 'notNull' || rule.operator === 'isEmpty' || rule.operator === 'isNotEmpty') {
    return /*#__PURE__*/React.createElement("div", null);
  }
  return /*#__PURE__*/React.createElement(_conditional_expression_builder__WEBPACK_IMPORTED_MODULE_2__.ConditionalExpressionBuilder, {
    options: variableDataType,
    value: value,
    handleOnChange: handleOnChange,
    context: context,
    readOnlyPreview: false,
    autoComplete: true,
    completers: completers
  });
};

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/conditional/hooks/useConditionalLogic.jsx"
/*!*****************************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/conditional/hooks/useConditionalLogic.jsx ***!
  \*****************************************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   useConditionalLogic: () => (/* binding */ useConditionalLogic)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react_querybuilder_parseJsonLogic__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-querybuilder/parseJsonLogic */ "./node_modules/react-querybuilder/dist/parseJsonLogic.js");
/* harmony import */ var react_querybuilder_parseJsonLogic__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_querybuilder_parseJsonLogic__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var react_querybuilder__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-querybuilder */ "./node_modules/react-querybuilder/dist/chunk-WUXLNRPE.mjs");
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }



var useConditionalLogic = function useConditionalLogic(_ref) {
  var defaultValue = _ref.defaultValue,
    name = _ref.name,
    onChange = _ref.onChange,
    variables = _ref.variables;
  /**
   * Extend the default operators with our custom ones.
   * "has" and "doesNotHave" are just flipped versions of "in" / "not in",
   * but written so the value comes first and the field comes second.
   */
  var customOperators = [].concat(_toConsumableArray(react_querybuilder__WEBPACK_IMPORTED_MODULE_2__.defaultOperators), [{
    name: 'has',
    value: 'has',
    label: 'has',
    jsonLogic: function jsonLogic(field, value) {
      return {
        in: [value, {
          var: field
        }]
      };
    },
    formatValue: function formatValue(_field, value) {
      return "'".concat(value, "'");
    }
  }, {
    name: 'doesNotHave',
    value: 'doesNotHave',
    label: 'does not have',
    jsonLogic: function jsonLogic(field, value) {
      return {
        '!': {
          in: [value, {
            var: field
          }]
        }
      };
    },
    formatValue: function formatValue(_field, value) {
      return "'".concat(value, "'");
    }
  }, {
    name: 'isEmpty',
    value: 'isEmpty',
    label: 'is empty',
    jsonLogic: function jsonLogic(field) {
      return {
        isEmpty: [{
          var: field
        }]
      };
    }
  }, {
    name: 'isNotEmpty',
    value: 'isNotEmpty',
    label: 'is not empty',
    jsonLogic: function jsonLogic(field) {
      return {
        isNotEmpty: [{
          var: field
        }]
      };
    }
  }]);

  /**
   * Map JSONLogic back into querybuilder rules.
   * Without this, parseJsonLogic wouldn’t know how to turn {in: [...]} or {!:{in: [...]}}
   * into our custom operators and the data won't be included in the flow json.
   */
  var jsonLogicOperations = {
    // Handle "has" => { in: [value, { var: field }] }
    in: function _in(_ref2) {
      var _ref3 = _slicedToArray(_ref2, 2),
        value = _ref3[0],
        field = _ref3[1];
      return {
        field: field.var,
        operator: 'has',
        value: value
      };
    },
    // Handle "! in" => "doesNotHave"
    "!": function _(arg) {
      if (arg.in) {
        var _arg$in = _slicedToArray(arg.in, 2),
          value = _arg$in[0],
          field = _arg$in[1];
        return {
          field: field.var,
          operator: 'doesNotHave',
          value: value
        };
      }
    },
    // Handle "isEmpty" => { isEmpty: [{ var: field }] }
    isEmpty: function isEmpty(_ref4) {
      var _ref5 = _slicedToArray(_ref4, 1),
        field = _ref5[0];
      return {
        field: field.var,
        operator: 'isEmpty'
      };
    },
    // Handle "isNotEmpty" => { isNotEmpty: [{ var: field }] }
    isNotEmpty: function isNotEmpty(_ref6) {
      var _ref7 = _slicedToArray(_ref6, 1),
        field = _ref7[0];
      return {
        field: field.var,
        operator: 'isNotEmpty'
      };
    }
  };

  /**
   *  Override natural language formatting for our custom operators.
   * This ensures the text reads naturally ("Category does not have 'apple'")
   * instead of "Category doesNotHave 'apple'".
   */
  var customRuleProcessorNL = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (rule, options) {
    var fieldObject = options.fields.find(function (field) {
      return field.name === rule.field;
    });
    var fieldLabel = fieldObject ? fieldObject.label : rule.field;
    var formattedValue = "'".concat(rule.value, "'");
    if (rule.operator === 'doesNotHave') {
      return "".concat(fieldLabel, " does not have ").concat(formattedValue);
    } else if (rule.operator === 'has') {
      return "".concat(fieldLabel, " has ").concat(formattedValue);
    } else if (rule.operator === 'isEmpty') {
      return "".concat(fieldLabel, " is empty");
    } else if (rule.operator === 'isNotEmpty') {
      return "".concat(fieldLabel, " is not empty");
    }
    return (0,react_querybuilder__WEBPACK_IMPORTED_MODULE_2__.defaultRuleProcessorNL)(rule, options);
  }, []);

  // Initialize query state from JSONLogic, using our custom operation mapping
  var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)((0,react_querybuilder_parseJsonLogic__WEBPACK_IMPORTED_MODULE_1__.parseJsonLogic)((defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.json) || '', {
      jsonLogicOperations: jsonLogicOperations
    })),
    _useState2 = _slicedToArray(_useState, 2),
    query = _useState2[0],
    setQuery = _useState2[1];

  /**
   * Format condition for saving/export.
   * Produces both JSONLogic (for machine rules) and natural language (for display).
   */
  var formatCondition = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
    /**
     * This ensures that when we export to JSONLogic,
     * our custom operators output the right structure.
     * @param {*} rule
     * @param {*} options
     * @returns
     */
    var customRuleProcessor = function customRuleProcessor(rule, options) {
      var op = customOperators.find(function (o) {
        return o.name === rule.operator;
      });
      if (op !== null && op !== void 0 && op.jsonLogic) {
        return op.jsonLogic(rule.field, rule.value);
      }
      return (0,react_querybuilder__WEBPACK_IMPORTED_MODULE_2__.defaultRuleProcessorJsonLogic)(rule, options);
    };
    var jsonCondition = (0,react_querybuilder__WEBPACK_IMPORTED_MODULE_2__.formatQuery)(query, {
      format: 'jsonlogic',
      parseNumbers: true,
      ruleProcessor: customRuleProcessor
    });
    var naturalLanguageCondition = (0,react_querybuilder__WEBPACK_IMPORTED_MODULE_2__.formatQuery)(query, {
      format: 'natural_language',
      parseNumbers: true,
      fields: variables,
      operators: customOperators,
      ruleProcessor: customRuleProcessorNL
    });
    return _objectSpread(_objectSpread({}, defaultValue), {}, {
      json: jsonCondition,
      natural: naturalLanguageCondition
    });
  }, [query, defaultValue, onChange, name, variables]);
  return {
    query: query,
    setQuery: setQuery,
    formatCondition: formatCondition,
    operators: customOperators,
    customRuleProcessorNL: customRuleProcessorNL
  };
};

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/conditional/hooks/useEditorSetup.jsx"
/*!************************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/conditional/hooks/useEditorSetup.jsx ***!
  \************************************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   useEditorSetup: () => (/* binding */ useEditorSetup)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);

var useEditorSetup = function useEditorSetup() {
  var editorRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
    if (editorRef.current) {
      editorRef.current.editor.setOption("indentedSoftWrap", false);
    }
  }, [editorRef]);
  return [editorRef];
};

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/conditional/hooks/useLegacyVariables.jsx"
/*!****************************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/conditional/hooks/useLegacyVariables.jsx ***!
  \****************************************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   useLegacyVariables: () => (/* binding */ useLegacyVariables)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);

var useLegacyVariables = function useLegacyVariables() {
  var convertLegacyVariables = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (legacyQuery) {
    if (!legacyQuery) return;
    var wrapFieldValue = function wrapFieldValue(field) {
      if (typeof field !== 'string') return field;
      if (field.startsWith('{{') && field.endsWith('}}')) return field;
      return field;
    };
    var processRules = function processRules(rules) {
      if (!Array.isArray(rules)) return;
      rules.forEach(function (rule) {
        if (rule.rules) {
          // Recursively process nested rule groups
          processRules(rule.rules);
        } else if (rule.field) {
          // Update the field value if it's not properly wrapped
          rule.field = wrapFieldValue(rule.field);
        }
      });
    };
    if (legacyQuery.rules) {
      processRules(legacyQuery.rules);
    }
  }, []);
  return [convertLegacyVariables];
};

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/conditional/hooks/useModalManagement.jsx"
/*!****************************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/conditional/hooks/useModalManagement.jsx ***!
  \****************************************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   useModalManagement: () => (/* binding */ useModalManagement)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }

var useModalManagement = function useModalManagement(_ref) {
  var onChange = _ref.onChange,
    name = _ref.name,
    formatCondition = _ref.formatCondition,
    _ref$isModalOpenByDef = _ref.isModalOpenByDefault,
    isModalOpenByDefault = _ref$isModalOpenByDef === void 0 ? false : _ref$isModalOpenByDef;
  var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(isModalOpenByDefault),
    _useState2 = _slicedToArray(_useState, 2),
    isModalOpen = _useState2[0],
    setIsModalOpen = _useState2[1];
  var onCloseModal = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
    if (onChange) {
      onChange(name, formatCondition());
    }
    closeModal();
  }, [closeModal, onChange, name, formatCondition]);
  var openModal = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
    setIsModalOpen(true);
  }, [setIsModalOpen]);
  var closeModal = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
    setIsModalOpen(false);
  }, [setIsModalOpen]);
  return {
    isModalOpen: isModalOpen,
    onCloseModal: onCloseModal,
    openModal: openModal,
    closeModal: closeModal,
    setIsModalOpen: setIsModalOpen
  };
};

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/conditional/index.jsx"
/*!*********************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/conditional/index.jsx ***!
  \*********************************************************************************/
(__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 export */   withConditional: () => (/* reexport safe */ _components_conditional_hoc__WEBPACK_IMPORTED_MODULE_0__.withConditional)
/* harmony export */ });
/* harmony import */ var _components_conditional_hoc__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./components/conditional-hoc */ "./assets/jsx/workflow-editor/components/data-fields/conditional/components/conditional-hoc.jsx");
/* harmony import */ var _components_conditional__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./components/conditional */ "./assets/jsx/workflow-editor/components/data-fields/conditional/components/conditional.jsx");



/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_components_conditional__WEBPACK_IMPORTED_MODULE_1__["default"]);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/conditional/styles/index.css"
/*!****************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/conditional/styles/index.css ***!
  \****************************************************************************************/
(__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 export */ });
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ "./node_modules/style-loader/dist/runtime/styleDomAPI.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../../../../../node_modules/style-loader/dist/runtime/insertBySelector.js */ "./node_modules/style-loader/dist/runtime/insertBySelector.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ "./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../../../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ "./node_modules/style-loader/dist/runtime/insertStyleElement.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../../../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ "./node_modules/style-loader/dist/runtime/styleTagTransform.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_postcss_loader_dist_cjs_js_index_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../../../../../../node_modules/css-loader/dist/cjs.js!../../../../../../../node_modules/postcss-loader/dist/cjs.js!./index.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js!./assets/jsx/workflow-editor/components/data-fields/conditional/styles/index.css");

      
      
      
      
      
      
      
      
      

var options = {};

options.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());
options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());
options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head");
options.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());
options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());

var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_postcss_loader_dist_cjs_js_index_css__WEBPACK_IMPORTED_MODULE_6__["default"], options);




       /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_node_modules_postcss_loader_dist_cjs_js_index_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_node_modules_postcss_loader_dist_cjs_js_index_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_node_modules_postcss_loader_dist_cjs_js_index_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined);


/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/custom-options/index.jsx"
/*!************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/custom-options/index.jsx ***!
  \************************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   CustomOptions: () => (/* binding */ CustomOptions),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _description_text__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../description-text */ "./assets/jsx/workflow-editor/components/data-fields/description-text.jsx");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _option_item__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./option-item */ "./assets/jsx/workflow-editor/components/data-fields/custom-options/option-item.jsx");
/* harmony import */ var _style_css__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./style.css */ "./assets/jsx/workflow-editor/components/data-fields/custom-options/style.css");
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }







var DEFAULT_OPTIONS = [{
  name: 'dismiss',
  label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Dismiss', 'post-expirator'),
  hint: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Dismiss the notification', 'post-expirator')
}];
function CustomOptions(_ref) {
  var name = _ref.name,
    label = _ref.label,
    defaultValue = _ref.defaultValue,
    onChange = _ref.onChange,
    settings = _ref.settings,
    _ref$variables = _ref.variables,
    variables = _ref$variables === void 0 ? [] : _ref$variables,
    helpUrl = _ref.helpUrl,
    description = _ref.description,
    canChangeNameCallback = _ref.canChangeNameCallback,
    cantChangeNameDescription = _ref.cantChangeNameDescription,
    onNameChangeCallback = _ref.onNameChangeCallback,
    _ref$maxOptions = _ref.maxOptions,
    maxOptions = _ref$maxOptions === void 0 ? 10 : _ref$maxOptions;
  var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useState)(null),
    _useState2 = _slicedToArray(_useState, 2),
    autoOpenItem = _useState2[0],
    setAutoOpenItem = _useState2[1];
  var onChangeSetting = function onChangeSetting(_ref2) {
    var value = _ref2.value;
    if (onChange) {
      onChange(name, value);
    }
  };
  if (!defaultValue || !Array.isArray(defaultValue) || defaultValue.length === 0) {
    defaultValue = DEFAULT_OPTIONS;
  }
  var getDefaultName = function getDefaultName() {
    var index = defaultValue.length + 1;
    var name = "option".concat(index);
    while (defaultValue.some(function (option) {
      return option.name === name;
    })) {
      index++;
      name = "option".concat(index);
    }
    return {
      name: name,
      index: index
    };
  };
  var onClickAddOption = function onClickAddOption() {
    if (defaultValue.length >= maxOptions) {
      return;
    }
    var defaultName = getDefaultName();
    var name = defaultName.name;
    var nameIndex = defaultName.index;
    var defaultLabel = (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.sprintf)((0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Option %s', 'post-expirator'), nameIndex);
    onChangeSetting({
      value: [].concat(_toConsumableArray(defaultValue), [{
        name: name,
        label: defaultLabel,
        hint: ''
      }])
    });
    setAutoOpenItem(defaultValue.length);
  };
  var onClickRemoveOption = function onClickRemoveOption(index) {
    onChangeSetting({
      value: defaultValue.filter(function (_, i) {
        return i !== index;
      })
    });
  };
  var onChangeOption = function onChangeOption(index, value) {
    var newOptions = defaultValue.map(function (option, i) {
      return i === index ? value : option;
    });
    onChangeSetting({
      value: newOptions
    });
  };
  var hasOnlyOneOption = defaultValue.length === 1;
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalVStack, {
    className: "workflow-editor-panel__row-options-container"
  }, /*#__PURE__*/React.createElement("label", {
    className: "workflow-editor-panel__row-options-label"
  }, label), defaultValue.map(function (option, index) {
    return /*#__PURE__*/React.createElement("div", {
      key: "option-".concat(index),
      className: "workflow-editor-panel__row-options"
    }, /*#__PURE__*/React.createElement(_option_item__WEBPACK_IMPORTED_MODULE_4__["default"], {
      name: "options[".concat(index, "].name"),
      label: "#".concat(index + 1),
      popoverLabel: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.sprintf)((0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Option #%s', 'post-expirator'), index + 1),
      defaultValue: option,
      onChange: function onChange(value) {
        return onChangeOption(index, value);
      },
      autoOpen: autoOpenItem === index,
      onClosePopover: function onClosePopover() {
        return setAutoOpenItem(null);
      },
      withExpression: settings === null || settings === void 0 ? void 0 : settings.withExpression,
      variables: variables,
      canChangeName: canChangeNameCallback ? canChangeNameCallback(option) : true,
      cantChangeNameDescription: cantChangeNameDescription,
      onNameChangeCallback: onNameChangeCallback
    }), !hasOnlyOneOption && /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, {
      onClick: function onClick() {
        return onClickRemoveOption(index);
      },
      isSmall: true,
      iconSize: 16,
      icon: 'trash'
    }));
  }), defaultValue.length === 0 && /*#__PURE__*/React.createElement("div", {
    className: "workflow-editor-panel__row-options-empty"
  }, (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('No options added to the action.', 'post-expirator')), defaultValue.length < maxOptions && /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, {
    onClick: onClickAddOption,
    iconSize: 16,
    icon: 'plus',
    variant: "tertiary"
  }, (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Add a new option', 'post-expirator')), description && /*#__PURE__*/React.createElement(_description_text__WEBPACK_IMPORTED_MODULE_2__.DescriptionText, {
    text: description,
    helpUrl: helpUrl
  }), defaultValue.length >= maxOptions && /*#__PURE__*/React.createElement(_description_text__WEBPACK_IMPORTED_MODULE_2__.DescriptionText, {
    text: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.sprintf)((0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('You have reached the maximum number of options. You can add up to %s options.', 'post-expirator'), maxOptions)
  })));
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CustomOptions);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/custom-options/option-item.jsx"
/*!******************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/custom-options/option-item.jsx ***!
  \******************************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   OptionItem: () => (/* binding */ OptionItem),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _inline_setting__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../inline-setting */ "./assets/jsx/workflow-editor/components/data-fields/inline-setting/index.jsx");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _expression_builder__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../expression-builder */ "./assets/jsx/workflow-editor/components/data-fields/expression-builder/index.jsx");
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }




var OptionItem = function OptionItem(_ref) {
  var _defaultValue3;
  var name = _ref.name,
    label = _ref.label,
    popoverLabel = _ref.popoverLabel,
    defaultValue = _ref.defaultValue,
    onChange = _ref.onChange,
    _ref$variables = _ref.variables,
    variables = _ref$variables === void 0 ? [] : _ref$variables,
    onClosePopover = _ref.onClosePopover,
    isLoading = _ref.isLoading,
    autoOpen = _ref.autoOpen,
    _ref$withExpression = _ref.withExpression,
    withExpression = _ref$withExpression === void 0 ? false : _ref$withExpression,
    _ref$canChangeName = _ref.canChangeName,
    canChangeName = _ref$canChangeName === void 0 ? true : _ref$canChangeName,
    _ref$cantChangeNameDe = _ref.cantChangeNameDescription,
    cantChangeNameDescription = _ref$cantChangeNameDe === void 0 ? '' : _ref$cantChangeNameDe,
    onNameChangeCallback = _ref.onNameChangeCallback;
  defaultValue = _objectSpread({
    name: "",
    label: "",
    hint: ""
  }, defaultValue);
  var onChangeName = function onChangeName(value) {
    value = value.replace(/[^a-zA-Z0-9_]/g, '').trim();
    onChange(_objectSpread(_objectSpread({}, defaultValue), {}, {
      name: value
    }));
    if (onNameChangeCallback) {
      onNameChangeCallback(value);
    }
  };
  var onChangeLabel = function onChangeLabel(value) {
    onChange(_objectSpread(_objectSpread({}, defaultValue), {}, {
      label: value
    }));
  };
  var onChangeHint = function onChangeHint(value) {
    onChange(_objectSpread(_objectSpread({}, defaultValue), {}, {
      hint: value
    }));
  };
  var onChangeExpression = function onChangeExpression(settingName, value) {
    onChange(_objectSpread(_objectSpread({}, defaultValue), {}, {
      expression: value
    }));
  };
  var getExpressionPreview = function getExpressionPreview() {
    var _defaultValue;
    return (_defaultValue = defaultValue) !== null && _defaultValue !== void 0 && (_defaultValue = _defaultValue.expression) !== null && _defaultValue !== void 0 && _defaultValue.expression ? "".concat(defaultValue.expression.expression) : (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('null', 'post-expirator');
  };
  var getValuePreview = function getValuePreview() {
    var _defaultValue2;
    if ((_defaultValue2 = defaultValue) !== null && _defaultValue2 !== void 0 && (_defaultValue2 = _defaultValue2.expression) !== null && _defaultValue2 !== void 0 && _defaultValue2.expression) {
      return getExpressionPreview();
    }
    return defaultValue.label;
  };
  return /*#__PURE__*/React.createElement(_inline_setting__WEBPACK_IMPORTED_MODULE_1__["default"], {
    name: name,
    label: label,
    popoverLabel: popoverLabel,
    valuePreview: getValuePreview(),
    onClosePopover: onClosePopover,
    isLoading: isLoading,
    autoOpen: autoOpen
  }, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.TextControl, {
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Name', 'post-expirator'),
    value: defaultValue.name,
    onChange: onChangeName,
    autoFocus: autoOpen,
    readOnly: !canChangeName
  }), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.TextControl, {
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Label', 'post-expirator'),
    value: defaultValue.label,
    onChange: onChangeLabel
  }), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.TextControl, {
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Hint', 'post-expirator'),
    value: defaultValue.hint,
    onChange: onChangeHint
  }), withExpression && /*#__PURE__*/React.createElement(_expression_builder__WEBPACK_IMPORTED_MODULE_3__["default"], {
    name: "expression",
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Value', 'post-expirator'),
    defaultValue: (_defaultValue3 = defaultValue) === null || _defaultValue3 === void 0 ? void 0 : _defaultValue3.expression,
    onChange: onChangeExpression,
    variables: variables
  }), cantChangeNameDescription && !canChangeName && /*#__PURE__*/React.createElement("p", {
    className: "description margin-top"
  }, cantChangeNameDescription), canChangeName && /*#__PURE__*/React.createElement("p", {
    className: "description margin-top"
  }, (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('The option name should only contain letters, numbers and underscores.', 'post-expirator'))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (OptionItem);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/custom-options/style.css"
/*!************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/custom-options/style.css ***!
  \************************************************************************************/
(__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 export */ });
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ "./node_modules/style-loader/dist/runtime/styleDomAPI.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../../../../node_modules/style-loader/dist/runtime/insertBySelector.js */ "./node_modules/style-loader/dist/runtime/insertBySelector.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ "./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ "./node_modules/style-loader/dist/runtime/insertStyleElement.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ "./node_modules/style-loader/dist/runtime/styleTagTransform.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_postcss_loader_dist_cjs_js_style_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../../../../../node_modules/css-loader/dist/cjs.js!../../../../../../node_modules/postcss-loader/dist/cjs.js!./style.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js!./assets/jsx/workflow-editor/components/data-fields/custom-options/style.css");

      
      
      
      
      
      
      
      
      

var options = {};

options.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());
options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());
options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head");
options.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());
options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());

var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_postcss_loader_dist_cjs_js_style_css__WEBPACK_IMPORTED_MODULE_6__["default"], options);




       /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_node_modules_postcss_loader_dist_cjs_js_style_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_node_modules_postcss_loader_dist_cjs_js_style_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_node_modules_postcss_loader_dist_cjs_js_style_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined);


/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/date-offset/index.jsx"
/*!*********************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/date-offset/index.jsx ***!
  \*********************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   DateOffset: () => (/* binding */ DateOffset),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _variables_tree_select__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../variables-tree-select */ "./assets/jsx/workflow-editor/components/variables-tree-select/index.jsx");
/* harmony import */ var _components_DateOffsetPreview__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../components/DateOffsetPreview */ "./assets/jsx/components/DateOffsetPreview.jsx");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../utils */ "./assets/jsx/utils.jsx");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _expression_builder__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../expression-builder */ "./assets/jsx/workflow-editor/components/data-fields/expression-builder/index.jsx");
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }







var DateOffset = function DateOffset(_ref) {
  var name = _ref.name,
    label = _ref.label,
    defaultValue = _ref.defaultValue,
    onChange = _ref.onChange,
    _ref$variables = _ref.variables,
    variables = _ref$variables === void 0 ? [] : _ref$variables,
    settings = _ref.settings;
  var allVariables = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_5__.useMemo)(function () {
    return variables;
  }, [variables]);
  var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_5__.useState)(false),
    _useState2 = _slicedToArray(_useState, 2),
    isHelpVisible = _useState2[0],
    setIsHelpVisible = _useState2[1];
  var _useState3 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_5__.useState)(true),
    _useState4 = _slicedToArray(_useState3, 2),
    isPreviewValid = _useState4[0],
    setIsPreviewValid = _useState4[1];
  var _useState5 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_5__.useState)(''),
    _useState6 = _slicedToArray(_useState5, 2),
    previewMessage = _useState6[0],
    setPreviewMessage = _useState6[1];
  var toggleHelp = function toggleHelp() {
    return setIsHelpVisible(function (state) {
      return !state;
    });
  };
  var hideHelp = function hideHelp() {
    return setIsHelpVisible(false);
  };
  var onHasValidationError = function onHasValidationError(errorMessage) {
    if (errorMessage) {
      setPreviewMessage(errorMessage);
      setIsPreviewValid(false);
    } else {
      setPreviewMessage('');
      setIsPreviewValid(true);
    }
  };
  var onValidationStarted = function onValidationStarted() {};
  var onValidationFinished = function onValidationFinished(isValid) {
    setIsPreviewValid(isValid);
    if (isValid) {
      setPreviewMessage('');
    }
  };
  var onChangeSetting = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_5__.useCallback)(function (_ref2) {
    var settingName = _ref2.settingName,
      value = _ref2.value;
    var newValue = _objectSpread({}, defaultValue);
    newValue[settingName] = value;
    if (onChange) {
      onChange(name, newValue);
    }
  }, [defaultValue, name, onChange]);
  var dateSourceOptions = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_5__.useMemo)(function () {
    var dateSourceOptions = [{
      name: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Selected in the calendar", "post-expirator"),
      id: "calendar"
    }, {
      name: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("When the trigger is activated", "post-expirator"),
      id: "event"
    }, {
      name: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("When the step is activated", "post-expirator"),
      id: "step"
    }, {
      name: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Custom date source", "post-expirator"),
      id: "custom"
    }];

    // Filter out hidden date sources
    if (settings && settings !== null && settings !== void 0 && settings.hideDateSources) {
      dateSourceOptions = dateSourceOptions.filter(function (option) {
        return !settings.hideDateSources.includes(option.id);
      });
    }
    return dateSourceOptions;
  }, [settings]);
  var dateStrategyOptions = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_5__.useMemo)(function () {
    var dateSelectionOptions = [{
      name: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("As soon as possible", "post-expirator"),
      id: "now"
    }, {
      name: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("On a specific date", "post-expirator"),
      id: "date"
    }, {
      name: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Relative to a specific date", "post-expirator"),
      id: "offset"
    }];
    if (settings && settings !== null && settings !== void 0 && settings.showEmptyDateOption) {
      var emptyDateOptionLabel = (settings === null || settings === void 0 ? void 0 : settings.emptyDateOptionLabel) || (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Unchanged", "post-expirator");
      dateSelectionOptions = [{
        name: emptyDateOptionLabel,
        id: ""
      }].concat(_toConsumableArray(dateSelectionOptions));
    }
    if (settings && settings !== null && settings !== void 0 && settings.hideDateStrategy) {
      dateSelectionOptions = dateSelectionOptions.filter(function (option) {
        return !settings.hideDateStrategy.includes(option.id);
      });
    }
    return dateSelectionOptions;
  }, [settings]);
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalVStack, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.TreeSelect, {
    label: label,
    tree: dateStrategyOptions,
    selectedId: defaultValue.dateStrategy,
    onChange: function onChange(value) {
      return onChangeSetting({
        settingName: "dateStrategy",
        value: value
      });
    }
  })), (defaultValue.dateStrategy === 'date' || defaultValue.dateStrategy === 'offset') && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.PanelRow, null, /*#__PURE__*/React.createElement(_variables_tree_select__WEBPACK_IMPORTED_MODULE_2__.VariablesTreeSelect, {
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Date source", "post-expirator"),
    tree: dateSourceOptions,
    selectedId: defaultValue.dateSource,
    onChange: function onChange(value) {
      return onChangeSetting({
        settingName: "dateSource",
        value: value
      });
    }
  })), defaultValue.dateSource === 'calendar' && /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.DateTimePicker, {
    currentDate: defaultValue.specificDate,
    onChange: function onChange(value) {
      return onChangeSetting({
        settingName: "specificDate",
        value: value
      });
    }
  })), defaultValue.dateSource === 'custom' && /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.PanelRow, null, /*#__PURE__*/React.createElement(_expression_builder__WEBPACK_IMPORTED_MODULE_6__.ExpressionBuilder, {
    name: "customDateSource",
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Custom date source", "post-expirator"),
    defaultValue: defaultValue.customDateSource,
    onChange: function onChange(settingName, value) {
      onChangeSetting({
        settingName: 'customDateSource',
        value: value
      });
    },
    variables: allVariables,
    singleVariableOnly: false,
    readOnlyPreview: true,
    description: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Click the button to choose a custom date source from variables that can provide a date.", "post-expirator"),
    wrapOnPreview: false,
    wrapOnEditor: false,
    oneLinePreview: true
  })), defaultValue.dateStrategy === 'offset' && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.TextControl, {
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Offset", "post-expirator"),
    value: defaultValue.dateOffset,
    onChange: function onChange(value) {
      return onChangeSetting({
        settingName: "dateOffset",
        value: value
      });
    }
  })), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.PanelRow, null, /*#__PURE__*/React.createElement(_components_DateOffsetPreview__WEBPACK_IMPORTED_MODULE_3__.DateOffsetPreview, {
    offset: defaultValue.dateOffset,
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Date Preview", "post-expirator"),
    labelDatePreview: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Current Date", "post-expirator"),
    labelOffsetPreview: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Computed Date", "post-expirator"),
    setValidationErrorCallback: onHasValidationError,
    setHasPendingValidationCallback: onValidationStarted,
    setHasValidDataCallback: onValidationFinished,
    compactView: true
  })), !isPreviewValid && /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.PanelRow, null, /*#__PURE__*/React.createElement("div", {
    className: "publishpress-future-notice publishpress-future-notice-error"
  }, (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Error: ", "post-expirator"), " ", previewMessage)), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, {
    variant: "link",
    onClick: toggleHelp
  }, (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Click for more information", "post-expirator"), isHelpVisible && /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Popover, null, /*#__PURE__*/React.createElement("div", {
    className: "settings-field-help-popover"
  }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, {
    variant: "tertiary",
    icon: 'no-alt'
  }), /*#__PURE__*/React.createElement("div", {
    dangerouslySetInnerHTML: {
      __html: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.sprintf)((0,_utils__WEBPACK_IMPORTED_MODULE_4__.stripTags)((0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("For more information on formatting, see the %sPHP strtotime function%s. For example, you could enter %s+1 month%s or %s+1 week 2 days 4 hours 2 seconds%s or %snext Thursday%s. Please use only phrases in English.", "post-expirator")), "<a href='https://www.php.net/manual/en/function.strtotime.php' target='_blank'>", "</a>", "<code>", "</code>", "<code>", "</code>", "<code>", "</code>")
    }
  })))))))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (DateOffset);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/debug-data.jsx"
/*!**************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/debug-data.jsx ***!
  \**************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   DebugData: () => (/* binding */ DebugData),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _expression_builder__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./expression-builder */ "./assets/jsx/workflow-editor/components/data-fields/expression-builder/index.jsx");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__);
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }




function DebugData(_ref) {
  var _defaultValue, _defaultValue2, _defaultValue3;
  var name = _ref.name,
    label = _ref.label,
    defaultValue = _ref.defaultValue,
    onChange = _ref.onChange,
    _ref$variables = _ref.variables,
    variables = _ref$variables === void 0 ? [] : _ref$variables;
  var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useState)(),
    _useState2 = _slicedToArray(_useState, 2),
    selectedOption = _useState2[0],
    setSelectedOption = _useState2[1];
  var defaultDebugOption = {
    expression: "{{input}}"
  };
  var onChangeSetting = function onChangeSetting(name, value) {
    if (onChange) {
      onChange(name, value);
    }
  };

  // Convert legacy data to new data
  if ((_defaultValue = defaultValue) !== null && _defaultValue !== void 0 && _defaultValue.dataToOutput) {
    defaultValue = {
      expression: "{{".concat(defaultValue.dataToOutput, "}}")
    };
    if (defaultValue.expression === '{{all-input}}') {
      defaultValue.expression = "{{input}}";
    }
  }
  if ((_defaultValue2 = defaultValue) !== null && _defaultValue2 !== void 0 && _defaultValue2.expression && ((_defaultValue3 = defaultValue) === null || _defaultValue3 === void 0 ? void 0 : _defaultValue3.expression) === '{{custom-data}}') {
    defaultValue = {
      expression: defaultValue.customData
    };
  }
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useEffect)(function () {
    var _defaultValue4;
    if (((_defaultValue4 = defaultValue) === null || _defaultValue4 === void 0 ? void 0 : _defaultValue4.expression) === "{{input}}") {
      setSelectedOption("input");
    } else {
      setSelectedOption("custom-data");
    }
  }, []);
  var radioOptions = [{
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("All received input", "post-expirator"),
    value: "input"
  }, {
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Custom data", "post-expirator"),
    value: "custom-data"
  }];
  var onChangeRadio = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useCallback)(function (value) {
    setSelectedOption(value);
    if (value === "input") {
      onChangeSetting(name, {
        expression: "{{input}}"
      });
    } else {
      defaultValue.expression = '';
      onChangeSetting(name, {
        expression: defaultValue.expression
      });
    }
  }, [onChangeSetting, name, defaultValue]);
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalVStack, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.RadioControl, {
    options: radioOptions,
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Select the data to output", "post-expirator"),
    selected: selectedOption,
    onChange: onChangeRadio
  }), selectedOption === "custom-data" && /*#__PURE__*/React.createElement(_expression_builder__WEBPACK_IMPORTED_MODULE_2__.ExpressionBuilder, {
    name: name,
    label: label,
    defaultValue: defaultValue || defaultDebugOption,
    onChange: onChangeSetting,
    variables: variables
  })));
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (DebugData);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/debug-levels.jsx"
/*!****************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/debug-levels.jsx ***!
  \****************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   DebugLevels: () => (/* binding */ DebugLevels),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);



function DebugLevels(_ref) {
  var name = _ref.name,
    label = _ref.label,
    defaultValue = _ref.defaultValue,
    onChange = _ref.onChange,
    _ref$variables = _ref.variables,
    variables = _ref$variables === void 0 ? [] : _ref$variables;
  var levelsOptions = [{
    name: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Debug", "post-expirator"),
    id: "debug"
  }, {
    name: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Info", "post-expirator"),
    id: "info"
  }, {
    name: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Notice", "post-expirator"),
    id: "notice"
  }, {
    name: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Warning", "post-expirator"),
    id: "warning"
  }, {
    name: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Error", "post-expirator"),
    id: "error"
  }, {
    name: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Critical", "post-expirator"),
    id: "critical"
  }, {
    name: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Alert", "post-expirator"),
    id: "alert"
  }];
  var defaultOption = 'debug';
  var onChangeSetting = function onChangeSetting(_ref2) {
    var value = _ref2.value;
    if (onChange) {
      onChange(name, value);
    }
  };
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalVStack, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.TreeSelect, {
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Level", "post-expirator"),
    tree: levelsOptions,
    selectedId: defaultValue || defaultOption,
    onChange: function onChange(value) {
      return onChangeSetting({
        settingName: "level",
        value: value
      });
    }
  })));
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (DebugLevels);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/description-text.jsx"
/*!********************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/description-text.jsx ***!
  \********************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   DescriptionText: () => (/* binding */ DescriptionText)
/* harmony export */ });
/* harmony import */ var _help_link__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./help-link */ "./assets/jsx/workflow-editor/components/data-fields/help-link.jsx");

var DescriptionText = function DescriptionText(_ref) {
  var text = _ref.text,
    helpUrl = _ref.helpUrl,
    _ref$className = _ref.className,
    className = _ref$className === void 0 ? 'description margin-top' : _ref$className;
  return /*#__PURE__*/React.createElement("p", {
    className: className
  }, text, " ", helpUrl && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_help_link__WEBPACK_IMPORTED_MODULE_0__.HelpLink, {
    url: helpUrl
  })));
};

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/expression-builder/autocompleters/post-statuses.jsx"
/*!***************************************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/expression-builder/autocompleters/post-statuses.jsx ***!
  \***************************************************************************************************************/
(__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 export */   postStatusesAutocompleter: () => (/* binding */ postStatusesAutocompleter)
/* harmony export */ });
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__);

var postStatusesAutocompleter = {
  getCompletions: function getCompletions(editor, session, pos, prefix, callback) {
    var _futureWorkflowEditor = futureWorkflowEditor,
      postStatuses = _futureWorkflowEditor.postStatuses;
    callback(null, postStatuses.map(function (postStatus) {
      return {
        caption: postStatus.value,
        value: postStatus.value,
        meta: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Post Status', 'post-expirator')
      };
    }));
  }
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (postStatusesAutocompleter);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/expression-builder/autocompleters/post-types.jsx"
/*!************************************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/expression-builder/autocompleters/post-types.jsx ***!
  \************************************************************************************************************/
(__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 export */   postTypesAutocompleter: () => (/* binding */ postTypesAutocompleter)
/* harmony export */ });
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__);

var postTypesAutocompleter = {
  getCompletions: function getCompletions(editor, session, pos, prefix, callback) {
    var _futureWorkflowEditor = futureWorkflowEditor,
      postTypes = _futureWorkflowEditor.postTypes;
    callback(null, postTypes.map(function (postType) {
      return {
        caption: postType.value,
        value: postType.value,
        meta: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Post Type', 'post-expirator')
      };
    }));
  }
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (postTypesAutocompleter);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/expression-builder/column-item.jsx"
/*!**********************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/expression-builder/column-item.jsx ***!
  \**********************************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   ColumnItem: () => (/* binding */ ColumnItem),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }



var ColumnItemMeta = function ColumnItemMeta(_ref) {
  var _item$context;
  var item = _ref.item,
    _onClick = _ref.onClick;
  var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(''),
    _useState2 = _slicedToArray(_useState, 2),
    metaKey = _useState2[0],
    setMetaKey = _useState2[1];
  var metaDescription = (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.sprintf)( /* translators: %s is the database table name */
  (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Type the %s key and click on the button to insert it.', 'post-expirator'), ((_item$context = item.context) === null || _item$context === void 0 ? void 0 : _item$context.table) || 'meta');
  var metaItem = {
    id: "{{".concat(item.name, ".").concat(metaKey, "}}"),
    name: item.name + '.' + metaKey,
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Metadata key', 'post-expirator'),
    description: metaDescription,
    context: item.context
  };
  return /*#__PURE__*/React.createElement("div", {
    className: "column-item-form"
  }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.TextControl, {
    label: item.label,
    value: metaKey,
    onChange: function onChange(value) {
      return setMetaKey(value);
    },
    help: item.description
  }), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Button, {
    variant: "secondary",
    onClick: function onClick() {
      _onClick(metaItem);
    }
  }, (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Insert', 'post-expirator')));
};
var ColumnItemVariable = function ColumnItemVariable(_ref2) {
  var item = _ref2.item,
    currentItemPath = _ref2.currentItemPath,
    _onClick2 = _ref2.onClick,
    setCurrentDescription = _ref2.setCurrentDescription,
    setCurrentVariableId = _ref2.setCurrentVariableId,
    _onDoubleClick = _ref2.onDoubleClick,
    _ref2$path = _ref2.path,
    path = _ref2$path === void 0 ? [] : _ref2$path,
    index = _ref2.index,
    columnIndex = _ref2.columnIndex;
  var hasChildren = item.children && item.children.length > 0;
  var currentColumnIndex = path.length - 1;
  var selectedItemIndex = currentItemPath[currentColumnIndex];
  var onMouseEnter = function onMouseEnter() {
    setCurrentDescription("".concat(item.description));
    setCurrentVariableId(item.id);
  };
  var stepSlug = item.name.split('.')[0];
  var stepSlugLabel = stepSlug ? "(".concat(stepSlug, ")") : '';
  var showStepSlugLabel = columnIndex === 0 && stepSlug !== 'global';
  return /*#__PURE__*/React.createElement("div", {
    className: "column-item ".concat(selectedItemIndex === index ? 'selected' : '', " ").concat(hasChildren ? 'has-children' : ''),
    onClick: function onClick() {
      return _onClick2(path, currentColumnIndex, index);
    },
    onMouseEnter: onMouseEnter,
    onDoubleClick: function onDoubleClick() {
      return _onDoubleClick(item);
    }
  }, item.label, " ", showStepSlugLabel ? /*#__PURE__*/React.createElement("span", {
    className: "column-item-step-slug"
  }, stepSlugLabel) : '');
};
var ColumnItem = function ColumnItem(_ref3) {
  var item = _ref3.item,
    currentItemPath = _ref3.currentItemPath,
    onClick = _ref3.onClick,
    setCurrentDescription = _ref3.setCurrentDescription,
    setCurrentVariableId = _ref3.setCurrentVariableId,
    onDoubleClick = _ref3.onDoubleClick,
    _ref3$path = _ref3.path,
    path = _ref3$path === void 0 ? [] : _ref3$path,
    index = _ref3.index,
    columnIndex = _ref3.columnIndex;
  if ((item === null || item === void 0 ? void 0 : item.type) === 'meta-key-input') {
    return /*#__PURE__*/React.createElement(ColumnItemMeta, {
      item: item,
      onClick: onDoubleClick
    });
  }
  return /*#__PURE__*/React.createElement(ColumnItemVariable, {
    item: item,
    currentItemPath: currentItemPath,
    onClick: onClick,
    setCurrentDescription: setCurrentDescription,
    setCurrentVariableId: setCurrentVariableId,
    onDoubleClick: onDoubleClick,
    path: path,
    index: index,
    columnIndex: columnIndex
  });
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ColumnItem);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/expression-builder/columns-container.jsx"
/*!****************************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/expression-builder/columns-container.jsx ***!
  \****************************************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   ColumnsContainer: () => (/* binding */ ColumnsContainer),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _column_item__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./column-item */ "./assets/jsx/workflow-editor/components/data-fields/expression-builder/column-item.jsx");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _type_handlers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./type-handlers */ "./assets/jsx/workflow-editor/components/data-fields/expression-builder/type-handlers.jsx");
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }




var RenderColumns = function RenderColumns(_ref) {
  var currentItemPath = _ref.currentItemPath,
    currentItems = _ref.currentItems,
    onClick = _ref.onClick,
    setCurrentDescription = _ref.setCurrentDescription,
    onDoubleClick = _ref.onDoubleClick,
    _ref$path = _ref.path,
    path = _ref$path === void 0 ? [] : _ref$path,
    setCurrentVariableId = _ref.setCurrentVariableId,
    columnIndex = _ref.columnIndex;
  if (!currentItems) return null;
  var currentColumnIndex = path.length;
  var selectedItemIndex = currentItemPath[currentColumnIndex];
  var currentItem = (0,_type_handlers__WEBPACK_IMPORTED_MODULE_3__.processItemWithTypeHandler)(currentItems[selectedItemIndex]);
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
    className: "column",
    key: "column-".concat(path.join('-'))
  }, currentItems.map(function (item, index) {
    item = (0,_type_handlers__WEBPACK_IMPORTED_MODULE_3__.processItemWithTypeHandler)(item);
    return /*#__PURE__*/React.createElement(_column_item__WEBPACK_IMPORTED_MODULE_1__.ColumnItem, {
      key: "column-item-".concat(path.join('-'), "-").concat(index),
      item: item,
      currentItemPath: currentItemPath,
      onClick: onClick,
      setCurrentDescription: setCurrentDescription,
      setCurrentVariableId: setCurrentVariableId,
      onDoubleClick: onDoubleClick,
      path: [].concat(_toConsumableArray(path), [index]),
      index: index,
      columnIndex: currentColumnIndex
    });
  })), selectedItemIndex !== undefined && (currentItem === null || currentItem === void 0 ? void 0 : currentItem.children) && /*#__PURE__*/React.createElement(RenderColumns, {
    currentItemPath: currentItemPath,
    currentItems: currentItem.children,
    path: [].concat(_toConsumableArray(path), [selectedItemIndex]),
    onClick: onClick,
    setCurrentDescription: setCurrentDescription,
    setCurrentVariableId: setCurrentVariableId,
    onDoubleClick: onDoubleClick
  }));
};
var ColumnsContainer = function ColumnsContainer(_ref2) {
  var items = _ref2.items,
    setCurrentDescription = _ref2.setCurrentDescription,
    onDoubleClick = _ref2.onDoubleClick,
    setCurrentVariableId = _ref2.setCurrentVariableId;
  var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)([]),
    _useState2 = _slicedToArray(_useState, 2),
    currentItemPath = _useState2[0],
    setCurrentItemPath = _useState2[1];
  var onClick = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (path, currentColumnIndex, index) {
    // Remove the items from the path that are after the current column index
    var newPath = path.slice(0, currentColumnIndex + 1);
    newPath.push(index);
    setCurrentItemPath(newPath);
    var container = document.querySelector('.columns-container');
    if (container) {
      setTimeout(function () {
        container.scrollLeft = container.scrollWidth;
      }, 0);
    }
  }, [setCurrentItemPath]);
  return /*#__PURE__*/React.createElement("div", {
    className: "columns-container"
  }, /*#__PURE__*/React.createElement(RenderColumns, {
    currentItems: items,
    currentItemPath: currentItemPath,
    onClick: onClick,
    onDoubleClick: onDoubleClick,
    setCurrentDescription: setCurrentDescription,
    setCurrentVariableId: setCurrentVariableId
  }));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ColumnsContainer);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/expression-builder/index.jsx"
/*!****************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/expression-builder/index.jsx ***!
  \****************************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   ExpressionBuilder: () => (/* binding */ ExpressionBuilder),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _node_icon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../node-icon */ "./assets/jsx/workflow-editor/components/node-icon.jsx");
/* harmony import */ var _columns_container__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./columns-container */ "./assets/jsx/workflow-editor/components/data-fields/expression-builder/columns-container.jsx");
/* harmony import */ var _description_text__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../description-text */ "./assets/jsx/workflow-editor/components/data-fields/description-text.jsx");
/* harmony import */ var ace_builds__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ace-builds */ "./node_modules/ace-builds/src-noconflict/ace.js");
/* harmony import */ var ace_builds__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(ace_builds__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var react_ace__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react-ace */ "./node_modules/react-ace/lib/index.js");
/* harmony import */ var ace_builds_src_noconflict_mode_handlebars__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ace-builds/src-noconflict/mode-handlebars */ "./node_modules/ace-builds/src-noconflict/mode-handlebars.js");
/* harmony import */ var ace_builds_src_noconflict_mode_handlebars__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(ace_builds_src_noconflict_mode_handlebars__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var ace_builds_src_noconflict_theme_textmate__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ace-builds/src-noconflict/theme-textmate */ "./node_modules/ace-builds/src-noconflict/theme-textmate.js");
/* harmony import */ var ace_builds_src_noconflict_theme_textmate__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(ace_builds_src_noconflict_theme_textmate__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var ace_builds_src_noconflict_ext_language_tools__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ace-builds/src-noconflict/ext-language_tools */ "./node_modules/ace-builds/src-noconflict/ext-language_tools.js");
/* harmony import */ var ace_builds_src_noconflict_ext_language_tools__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(ace_builds_src_noconflict_ext_language_tools__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var _modal_footer__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./../modal-footer */ "./assets/jsx/workflow-editor/components/data-fields/modal-footer.jsx");
/* harmony import */ var _style_css__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./style.css */ "./assets/jsx/workflow-editor/components/data-fields/expression-builder/style.css");
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }













var ExpressionBuilder = function ExpressionBuilder(_ref) {
  var name = _ref.name,
    _ref$label = _ref.label,
    label = _ref$label === void 0 ? '' : _ref$label,
    defaultValue = _ref.defaultValue,
    onChange = _ref.onChange,
    _ref$variables = _ref.variables,
    variables = _ref$variables === void 0 ? [] : _ref$variables,
    _ref$propertyName = _ref.propertyName,
    propertyName = _ref$propertyName === void 0 ? "expression" : _ref$propertyName,
    _ref$settings = _ref.settings,
    settings = _ref$settings === void 0 ? {} : _ref$settings,
    _ref$description = _ref.description,
    description = _ref$description === void 0 ? '' : _ref$description,
    _ref$isInline = _ref.isInline,
    isInline = _ref$isInline === void 0 ? false : _ref$isInline,
    _ref$readOnlyPreview = _ref.readOnlyPreview,
    readOnlyPreview = _ref$readOnlyPreview === void 0 ? false : _ref$readOnlyPreview,
    _ref$singleVariableOn = _ref.singleVariableOnly,
    singleVariableOnly = _ref$singleVariableOn === void 0 ? false : _ref$singleVariableOn,
    _ref$wrapOnPreview = _ref.wrapOnPreview,
    wrapOnPreview = _ref$wrapOnPreview === void 0 ? false : _ref$wrapOnPreview,
    _ref$wrapOnEditor = _ref.wrapOnEditor,
    wrapOnEditor = _ref$wrapOnEditor === void 0 ? false : _ref$wrapOnEditor,
    _ref$oneLinePreview = _ref.oneLinePreview,
    oneLinePreview = _ref$oneLinePreview === void 0 ? false : _ref$oneLinePreview,
    _ref$helpUrl = _ref.helpUrl,
    helpUrl = _ref$helpUrl === void 0 ? '' : _ref$helpUrl,
    _ref$autoComplete = _ref.autoComplete,
    autoComplete = _ref$autoComplete === void 0 ? true : _ref$autoComplete,
    _ref$completers = _ref.completers,
    completers = _ref$completers === void 0 ? [] : _ref$completers,
    _ref$buttonText = _ref.buttonText,
    buttonText = _ref$buttonText === void 0 ? null : _ref$buttonText;
  var editorFullRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useRef)(null);
  var editorSmallRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useRef)(null);
  var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useState)(),
    _useState2 = _slicedToArray(_useState, 2),
    currentDescription = _useState2[0],
    setCurrentDescription = _useState2[1];
  var _useState3 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useState)(),
    _useState4 = _slicedToArray(_useState3, 2),
    currentVariableId = _useState4[0],
    setCurrentVariableId = _useState4[1];
  var _useState5 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useState)(false),
    _useState6 = _slicedToArray(_useState5, 2),
    isOpen = _useState6[0],
    setIsOpen = _useState6[1];
  if (!defaultValue) {
    defaultValue = {};
  }
  var onChangeSetting = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useCallback)(function (_ref2) {
    var settingName = _ref2.settingName,
      value = _ref2.value;
    var newValue = _objectSpread({}, defaultValue);
    newValue[settingName] = value;
    if (onChange) {
      onChange(name, newValue);
    }

    // Example: Basic linting logic (you can integrate a real linter here)
    var annotations = [];
    if (value.includes('error')) {
      annotations.push({
        row: 0,
        column: 10,
        text: "Example error: 'error' found in code",
        type: "error"
      });
    }
    if (editorFullRef.current) {
      // editorFullRef.current.editor.getSession().setAnnotations(annotations);
    }
  }, [defaultValue]);
  var onClose = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useCallback)(function () {
    setIsOpen(false);
  }, [setIsOpen]);
  var onDoubleClick = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useCallback)(function (item) {
    if (editorFullRef.current) {
      var editor = editorFullRef.current.editor;
      if (!singleVariableOnly) {
        var cursorPosition = editor.getCursorPosition();
        editor.session.insert(cursorPosition, item.id);
      } else {
        editor.session.setValue(item.id);
      }
      editor.focus();
      if (singleVariableOnly) {
        setIsOpen(false);
      }
    }
  }, [editorFullRef, singleVariableOnly]);
  var editorProps = {
    $blockScrolling: true
  };
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useEffect)(function () {
    if (wrapOnPreview && editorSmallRef.current) {
      editorSmallRef.current.editor.setOption("indentedSoftWrap", false);
    }
  }, [wrapOnPreview, editorSmallRef]);
  var expression = (defaultValue[propertyName] || '').toString();
  var placeholder = ((settings === null || settings === void 0 ? void 0 : settings.placeholder) || '').toString();
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useEffect)(function () {
    if (completers.length === 0) {
      return;
    }

    // Set completers for each editor instance individually
    if (editorFullRef.current) {
      var editor = editorFullRef.current.editor;
      editor.completers = completers;
    }
    if (editorSmallRef.current) {
      var _editor = editorSmallRef.current.editor;
      _editor.completers = completers;
    }
  }, [completers, editorFullRef, editorSmallRef]);
  return /*#__PURE__*/React.createElement("div", {
    className: "expression-builder ".concat(isOpen ? 'expression-builder-open' : '', " ").concat(isInline ? 'expression-builder-inline' : '')
  }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Button, {
    variant: "secondary",
    onClick: function onClick() {
      return setIsOpen(true);
    },
    className: "expression-builder-button",
    title: buttonText || (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Edit", "post-expirator")
  }, buttonText || (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Edit", "post-expirator")), !isInline && label && /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalHeading, {
    level: 3,
    className: "expression-builder-small-heading"
  }, label), /*#__PURE__*/React.createElement(react_ace__WEBPACK_IMPORTED_MODULE_7__["default"], {
    ref: editorSmallRef,
    mode: "handlebars",
    theme: "textmate",
    name: "expression-builder-small",
    value: expression,
    readOnly: readOnlyPreview,
    className: readOnlyPreview ? 'read-only-editor' : '',
    editorProps: editorProps,
    wrapEnabled: wrapOnPreview,
    onChange: function onChange(value) {
      return onChangeSetting({
        settingName: propertyName,
        value: value
      });
    },
    setOptions: {
      enableBasicAutocompletion: autoComplete,
      enableLiveAutocompletion: autoComplete,
      showGutter: false,
      showPrintMargin: false,
      showLineNumbers: false,
      highlightActiveLine: false
    },
    height: oneLinePreview ? '30px' : '92px',
    width: "100%",
    placeholder: placeholder
  }), description && /*#__PURE__*/React.createElement(_description_text__WEBPACK_IMPORTED_MODULE_5__.DescriptionText, {
    text: description,
    helpUrl: helpUrl
  }), isOpen && /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Modal, {
    title: label,
    onRequestClose: onClose,
    className: "workflow-editor-modal expression-builder-modal"
  }, /*#__PURE__*/React.createElement("div", {
    style: {
      minWidth: '600px',
      maxWidth: '600px'
    }
  }, singleVariableOnly && /*#__PURE__*/React.createElement("p", null, (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Select a variable from the list below.", "post-expirator")), !singleVariableOnly && /*#__PURE__*/React.createElement("p", null, (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Type your expression here or use the variables below.", "post-expirator")), /*#__PURE__*/React.createElement(react_ace__WEBPACK_IMPORTED_MODULE_7__["default"], {
    ref: editorFullRef,
    mode: "handlebars",
    theme: "textmate",
    name: "expression-builder-full",
    className: singleVariableOnly ? 'read-only-editor' : '',
    wrapEnabled: wrapOnEditor,
    onChange: function onChange(value) {
      return onChangeSetting({
        settingName: propertyName,
        value: value
      });
    },
    value: expression,
    editorProps: editorProps,
    readOnly: singleVariableOnly,
    setOptions: {
      enableBasicAutocompletion: autoComplete,
      enableLiveAutocompletion: autoComplete,
      showLineNumbers: !singleVariableOnly,
      showGutter: !singleVariableOnly,
      highlightActiveLine: !singleVariableOnly
    },
    height: singleVariableOnly ? '30px' : '35px',
    width: "100%",
    placeholder: placeholder
  }), /*#__PURE__*/React.createElement("div", {
    className: "expression-builder-modal-variables",
    style: {
      maxWidth: '600px',
      overflowX: 'auto'
    }
  }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalHeading, {
    level: 2,
    className: "components-truncate components-text components-heading block-editor-inspector-popover-header__heading"
  }, (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Variables", "post-expirator")), singleVariableOnly && /*#__PURE__*/React.createElement("p", null, (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Double-click on a variable to select it.", "post-expirator")), !singleVariableOnly && /*#__PURE__*/React.createElement("p", null, (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Double-click on any variable to add it to your expression.", "post-expirator")), currentDescription && /*#__PURE__*/React.createElement("p", {
    className: "description margin-top"
  }, /*#__PURE__*/React.createElement("code", {
    className: "expression-builder-variable-name"
  }, currentVariableId), " ", currentDescription), !currentDescription && /*#__PURE__*/React.createElement("p", {
    className: "description margin-top"
  }, (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Hover over a variable to see its description.", "post-expirator")), /*#__PURE__*/React.createElement(_columns_container__WEBPACK_IMPORTED_MODULE_4__["default"], {
    items: variables,
    setCurrentDescription: setCurrentDescription,
    setCurrentVariableId: setCurrentVariableId,
    onDoubleClick: onDoubleClick
  }))), /*#__PURE__*/React.createElement(_modal_footer__WEBPACK_IMPORTED_MODULE_11__.ModalFooter, {
    onClose: onClose
  })));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ExpressionBuilder);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/expression-builder/schemas/term-properties.jsx"
/*!**********************************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/expression-builder/schemas/term-properties.jsx ***!
  \**********************************************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   termProperties: () => (/* binding */ termProperties)
/* harmony export */ });
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__);

var termProperties = [{
  name: "name",
  type: "string",
  label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Name", "post-expirator"),
  description: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("The name of the term.", "post-expirator")
}, {
  name: "slug",
  type: "string",
  label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Slug", "post-expirator"),
  description: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("The slug of the term.", "post-expirator")
}, {
  name: "term_id",
  type: "integer",
  label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Term ID", "post-expirator"),
  description: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("The unique identifier of the term.", "post-expirator")
}, {
  name: "count",
  type: "integer",
  label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Count", "post-expirator"),
  description: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Number of posts assigned to this term.", "post-expirator")
}];

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/expression-builder/style.css"
/*!****************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/expression-builder/style.css ***!
  \****************************************************************************************/
(__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 export */ });
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ "./node_modules/style-loader/dist/runtime/styleDomAPI.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../../../../node_modules/style-loader/dist/runtime/insertBySelector.js */ "./node_modules/style-loader/dist/runtime/insertBySelector.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ "./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ "./node_modules/style-loader/dist/runtime/insertStyleElement.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ "./node_modules/style-loader/dist/runtime/styleTagTransform.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_postcss_loader_dist_cjs_js_style_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../../../../../node_modules/css-loader/dist/cjs.js!../../../../../../node_modules/postcss-loader/dist/cjs.js!./style.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js!./assets/jsx/workflow-editor/components/data-fields/expression-builder/style.css");

      
      
      
      
      
      
      
      
      

var options = {};

options.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());
options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());
options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head");
options.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());
options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());

var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_postcss_loader_dist_cjs_js_style_css__WEBPACK_IMPORTED_MODULE_6__["default"], options);




       /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_node_modules_postcss_loader_dist_cjs_js_style_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_node_modules_postcss_loader_dist_cjs_js_style_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_node_modules_postcss_loader_dist_cjs_js_style_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined);


/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/expression-builder/type-handlers.jsx"
/*!************************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/expression-builder/type-handlers.jsx ***!
  \************************************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   processItemWithTypeHandler: () => (/* binding */ processItemWithTypeHandler),
/* harmony export */   typeHandlers: () => (/* binding */ typeHandlers)
/* harmony export */ });
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils */ "./assets/jsx/workflow-editor/utils.jsx");
/* harmony import */ var _schemas_term_properties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./schemas/term-properties */ "./assets/jsx/workflow-editor/components/data-fields/expression-builder/schemas/term-properties.jsx");
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }



var typeHandlers = {
  meta: function meta(item) {
    var _item$context;
    var metaDescription = (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.sprintf)( /* translators: %s is the database table name */
    (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Type the %s key and click on the button to insert it.', 'post-expirator'), ((_item$context = item.context) === null || _item$context === void 0 ? void 0 : _item$context.table) || 'meta');
    return _objectSpread(_objectSpread({}, item), {}, {
      children: [{
        name: item.name,
        label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Metadata key', 'post-expirator'),
        description: metaDescription,
        type: 'meta-key-input',
        context: item.context
      }]
    });
  },
  post_terms: function post_terms(item) {
    var taxonomies = futureWorkflowEditor.taxonomies || [];
    var taxonomyChildren = taxonomies.map(function (taxonomy) {
      return (0,_utils__WEBPACK_IMPORTED_MODULE_1__.formatVariableStructure)(_objectSpread(_objectSpread({}, taxonomy), {}, {
        id: "{{".concat(item.name, ".").concat(taxonomy.value, "}}"),
        name: "".concat(item.name, ".").concat(taxonomy.value),
        description: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.sprintf)( /* translators: %s is the taxonomy label */
        (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("%s terms for this post.", "post-expirator"), taxonomy.label),
        type: "taxonomy_terms"
      }));
    });
    return _objectSpread(_objectSpread({}, item), {}, {
      children: taxonomyChildren
    });
  },
  taxonomy_terms: function taxonomy_terms(item) {
    var termChildren = _schemas_term_properties__WEBPACK_IMPORTED_MODULE_2__.termProperties.map(function (property) {
      return (0,_utils__WEBPACK_IMPORTED_MODULE_1__.formatVariableStructure)(_objectSpread(_objectSpread({}, property), {}, {
        id: "{{".concat(item.name, ".").concat(property.name, "}}"),
        name: "".concat(item.name, ".").concat(property.name)
      }));
    });
    return _objectSpread(_objectSpread({}, item), {}, {
      children: termChildren
    });
  }
};
var processItemWithTypeHandler = function processItemWithTypeHandler(item) {
  var handler = typeHandlers[item === null || item === void 0 ? void 0 : item.type];
  return handler ? handler(item) : item;
};

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/help-link.jsx"
/*!*************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/help-link.jsx ***!
  \*************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   HelpLink: () => (/* binding */ HelpLink)
/* harmony export */ });
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__);

var HelpLink = function HelpLink(_ref) {
  var url = _ref.url,
    label = _ref.label;
  if (!label) {
    label = (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Learn more', 'post-expirator');
  }
  return /*#__PURE__*/React.createElement("a", {
    href: url,
    target: "_blank",
    rel: "noopener noreferrer"
  }, label);
};

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/inline-setting/index.jsx"
/*!************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/inline-setting/index.jsx ***!
  \************************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   InlineSetting: () => (/* binding */ InlineSetting),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _setting_popover__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../setting-popover */ "./assets/jsx/workflow-editor/components/setting-popover/index.jsx");
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }




var InlineSetting = function InlineSetting(_ref) {
  var name = _ref.name,
    label = _ref.label,
    popoverLabel = _ref.popoverLabel,
    valuePreview = _ref.valuePreview,
    onClosePopover = _ref.onClosePopover,
    children = _ref.children,
    isLoading = _ref.isLoading,
    autoOpen = _ref.autoOpen;
  var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false),
    _useState2 = _slicedToArray(_useState, 2),
    isPopoverOpen = _useState2[0],
    setIsPopoverOpen = _useState2[1];
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
    if (autoOpen) {
      setIsPopoverOpen(true);
    }
  }, [autoOpen]);
  var closePopover = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function () {
    setIsPopoverOpen(false);
    if (onClosePopover) {
      onClosePopover();
    }
  }, [onClosePopover]);
  if (!popoverLabel) {
    popoverLabel = label;
  }
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalHStack, {
    className: "workflow-editor-panel__row"
  }, /*#__PURE__*/React.createElement("div", {
    className: "workflow-editor-panel__row-label"
  }, label), /*#__PURE__*/React.createElement("div", {
    className: "workflow-editor-panel__row-control"
  }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Button, {
    variant: "tertiary",
    onClick: function onClick() {
      return setIsPopoverOpen(true);
    },
    className: "is-compact",
    disabled: isLoading
  }, isLoading ? /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Spinner, null) : valuePreview))), isPopoverOpen && /*#__PURE__*/React.createElement(_setting_popover__WEBPACK_IMPORTED_MODULE_3__["default"], {
    onClose: closePopover,
    className: "workflow-editor-inspector-".concat(name, "-popover"),
    title: popoverLabel
  }, children));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (InlineSetting);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/integer.jsx"
/*!***********************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/integer.jsx ***!
  \***********************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   Integer: () => (/* binding */ Integer),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _description_text__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./description-text */ "./assets/jsx/workflow-editor/components/data-fields/description-text.jsx");




function Integer(_ref) {
  var name = _ref.name,
    label = _ref.label,
    defaultValue = _ref.defaultValue,
    onChange = _ref.onChange,
    settings = _ref.settings,
    _ref$variables = _ref.variables,
    variables = _ref$variables === void 0 ? [] : _ref$variables,
    helpUrl = _ref.helpUrl,
    description = _ref.description;
  var onChangeSetting = function onChangeSetting(_ref2) {
    var value = _ref2.value;
    value = parseInt(value);
    if (onChange) {
      onChange(name, value);
    }
  };
  defaultValue = parseInt(defaultValue);
  if (isNaN(defaultValue)) {
    defaultValue = 0;
  }
  var placeholder = (settings === null || settings === void 0 ? void 0 : settings.placeholder) || '';
  var handleKeyDown = function handleKeyDown(event) {
    var shiftPressed = event.shiftKey;
    var increment = shiftPressed ? 10 : 1;
    if (event.key === 'ArrowUp') {
      event.preventDefault();
      var newValue = (parseInt(defaultValue) || 0) + increment;
      onChangeSetting({
        value: newValue
      });
    } else if (event.key === 'ArrowDown') {
      event.preventDefault();
      var _newValue = (parseInt(defaultValue) || 0) - increment;
      onChangeSetting({
        value: _newValue
      });
    }
  };
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalVStack, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.TextControl, {
    label: label,
    value: defaultValue || "",
    onChange: function onChange(value) {
      return onChangeSetting({
        value: value
      });
    },
    placeholder: placeholder,
    onKeyDown: handleKeyDown
  }), description && /*#__PURE__*/React.createElement(_description_text__WEBPACK_IMPORTED_MODULE_2__.DescriptionText, {
    text: description,
    helpUrl: helpUrl
  })));
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Integer);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/interactive-custom-options/index.jsx"
/*!************************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/interactive-custom-options/index.jsx ***!
  \************************************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   InteractiveCustomOptions: () => (/* binding */ InteractiveCustomOptions)
/* harmony export */ });
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _workflow_store__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../workflow-store */ "./assets/jsx/workflow-editor/components/workflow-store/index.jsx");
/* harmony import */ var _custom_options__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../custom-options */ "./assets/jsx/workflow-editor/components/data-fields/custom-options/index.jsx");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_3__);
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }




function InteractiveCustomOptions(props) {
  /**
   * Check if the option name can be changed.
   *
   * If the option is connected to a source handle, it cannot be changed because
   * it would break the connections in the workflow.
   *
   * @param {Object} option
   * @returns {boolean}
   */
  var canChangeNameCallback = function canChangeNameCallback(option) {
    var connectedSourceHandlesOfSelectedNode = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.select)(_workflow_store__WEBPACK_IMPORTED_MODULE_1__.store).getConnectedSourceHandlesOfSelectedNode();
    if (connectedSourceHandlesOfSelectedNode.length === 0) {
      return true;
    }
    var isOptionConnected = connectedSourceHandlesOfSelectedNode.includes(option.name);
    return !isOptionConnected;
  };
  return /*#__PURE__*/React.createElement(_custom_options__WEBPACK_IMPORTED_MODULE_2__.CustomOptions, _extends({}, props, {
    canChangeNameCallback: canChangeNameCallback,
    cantChangeNameDescription: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)("This option is used to connect to another step and cannot have its name changed until the connection is removed.", "post-expirator"),
    maxOptions: 5
  }));
}

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/list-input.jsx"
/*!**************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/list-input.jsx ***!
  \**************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   ListInput: () => (/* binding */ ListInput),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _variables_tree_select__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../variables-tree-select */ "./assets/jsx/workflow-editor/components/variables-tree-select/index.jsx");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }



function ListInput(_ref) {
  var name = _ref.name,
    label = _ref.label,
    defaultValue = _ref.defaultValue,
    onChange = _ref.onChange,
    tree = _ref.tree;
  var onChangeSetting = function onChangeSetting(_ref2) {
    var settingName = _ref2.settingName,
      value = _ref2.value;
    var newValue = _objectSpread({}, defaultValue);
    newValue[settingName] = value;
    if (onChange) {
      onChange(name, newValue);
    }
  };
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalVStack, null, /*#__PURE__*/React.createElement(_variables_tree_select__WEBPACK_IMPORTED_MODULE_1__.VariablesTreeSelect, {
    tree: tree,
    label: label,
    selectedId: defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.variable,
    onChange: function onChange(value) {
      return onChangeSetting({
        settingName: "variable",
        value: value
      });
    }
  })));
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ListInput);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/list.jsx"
/*!********************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/list.jsx ***!
  \********************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   List: () => (/* binding */ List),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _list_input__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./list-input */ "./assets/jsx/workflow-editor/components/data-fields/list-input.jsx");
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }

function List(_ref) {
  var name = _ref.name,
    label = _ref.label,
    defaultValue = _ref.defaultValue,
    onChange = _ref.onChange,
    settings = _ref.settings;
  var options = settings['options'];
  if (!options) {
    console.log('No options found for list', name);
    return null;
  }
  options = options.map(function (option) {
    return {
      id: option.value,
      name: option.label,
      children: []
    };
  });
  var tree = _toConsumableArray(options);
  return /*#__PURE__*/React.createElement(_list_input__WEBPACK_IMPORTED_MODULE_0__.ListInput, {
    tree: tree,
    name: name,
    label: label,
    defaultValue: defaultValue,
    onChange: onChange
  });
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (List);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/manual-workflow-input.jsx"
/*!*************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/manual-workflow-input.jsx ***!
  \*************************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   ManualWorkflowInput: () => (/* binding */ ManualWorkflowInput),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _list_input__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./list-input */ "./assets/jsx/workflow-editor/components/data-fields/list-input.jsx");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils */ "./assets/jsx/workflow-editor/utils.jsx");
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }


function ManualWorkflowInput(_ref) {
  var name = _ref.name,
    label = _ref.label,
    defaultValue = _ref.defaultValue,
    onChange = _ref.onChange,
    variables = _ref.variables;
  variables = (0,_utils__WEBPACK_IMPORTED_MODULE_1__.filterVariablesTreeByDataType)(variables, ['workflow', 'array:integer']);
  var tree = [{
    id: "",
    name: "",
    "children": []
  }].concat(_toConsumableArray(variables));
  return /*#__PURE__*/React.createElement(_list_input__WEBPACK_IMPORTED_MODULE_0__.ListInput, {
    tree: tree,
    name: name,
    label: label,
    defaultValue: defaultValue,
    onChange: onChange
  });
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ManualWorkflowInput);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/modal-footer.jsx"
/*!****************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/modal-footer.jsx ***!
  \****************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   ModalFooter: () => (/* binding */ ModalFooter)
/* harmony export */ });
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);


var ModalFooter = function ModalFooter(_ref) {
  var onClose = _ref.onClose,
    children = _ref.children;
  return /*#__PURE__*/React.createElement("div", {
    className: "workflow-editor-modal-footer"
  }, children ? children : /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, {
    variant: "primary",
    onClick: onClose
  }, (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("OK", "post-expirator")));
};

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/post-data/index.jsx"
/*!*******************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/post-data/index.jsx ***!
  \*******************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   PostData: () => (/* binding */ PostData),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _post_date__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./post-date */ "./assets/jsx/workflow-editor/components/data-fields/post-data/post-date.jsx");
/* harmony import */ var _post_text__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./post-text */ "./assets/jsx/workflow-editor/components/data-fields/post-data/post-text.jsx");
/* harmony import */ var _post_author__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./post-author */ "./assets/jsx/workflow-editor/components/data-fields/post-data/post-author.jsx");
/* harmony import */ var _post_discussion__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./post-discussion */ "./assets/jsx/workflow-editor/components/data-fields/post-data/post-discussion.jsx");
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }






function PostData(_ref) {
  var name = _ref.name,
    label = _ref.label,
    defaultValue = _ref.defaultValue,
    onChange = _ref.onChange,
    settings = _ref.settings,
    variables = _ref.variables;
  var onChangeSetting = function onChangeSetting(_ref2) {
    var settingName = _ref2.settingName,
      value = _ref2.value;
    var newValue = _objectSpread({}, defaultValue);
    newValue[settingName] = value;
    if (onChange) {
      onChange(name, newValue);
    }
  };
  var _onClosePopover = function onClosePopover(settingName) {
    var _defaultValue$setting;
    if (!((_defaultValue$setting = defaultValue[settingName]) !== null && _defaultValue$setting !== void 0 && _defaultValue$setting.update)) {
      onChangeSetting({
        settingName: settingName,
        value: null
      });
    }
  };
  return /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalVStack, {
    className: "workflow-editor-panel"
  }, /*#__PURE__*/React.createElement(_post_date__WEBPACK_IMPORTED_MODULE_2__.PostDateControl, {
    name: "date",
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Post Date', 'post-expirator'),
    defaultValue: defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.date,
    onChange: function onChange(settingName, value) {
      return onChangeSetting({
        settingName: "date",
        value: value
      });
    },
    settings: settings,
    variables: variables,
    onClosePopover: function onClosePopover() {
      return _onClosePopover("date");
    },
    checkboxLabel: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Update the post date", "post-expirator")
  }), /*#__PURE__*/React.createElement(_post_text__WEBPACK_IMPORTED_MODULE_3__.PostTextControl, {
    name: "title",
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Post Title', 'post-expirator'),
    defaultValue: defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.title,
    onChange: function onChange(settingName, value) {
      return onChangeSetting({
        settingName: "title",
        value: value
      });
    },
    settings: settings,
    variables: variables,
    onClosePopover: function onClosePopover() {
      return _onClosePopover("title");
    },
    checkboxLabel: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Update the post title", "post-expirator")
  }), /*#__PURE__*/React.createElement(_post_text__WEBPACK_IMPORTED_MODULE_3__.PostTextControl, {
    name: "name",
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Post Slug', 'post-expirator'),
    defaultValue: defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.name,
    onChange: function onChange(settingName, value) {
      return onChangeSetting({
        settingName: "name",
        value: value
      });
    },
    settings: settings,
    variables: variables,
    onClosePopover: function onClosePopover() {
      return _onClosePopover("name");
    },
    checkboxLabel: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Update the post slug", "post-expirator")
  }), /*#__PURE__*/React.createElement(_post_text__WEBPACK_IMPORTED_MODULE_3__.PostTextControl, {
    name: "content",
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Post Content', 'post-expirator'),
    defaultValue: defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.content,
    onChange: function onChange(settingName, value) {
      return onChangeSetting({
        settingName: "content",
        value: value
      });
    },
    settings: settings,
    variables: variables,
    onClosePopover: function onClosePopover() {
      return _onClosePopover("content");
    },
    checkboxLabel: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Update the post content", "post-expirator")
  }), /*#__PURE__*/React.createElement(_post_text__WEBPACK_IMPORTED_MODULE_3__.PostTextControl, {
    name: "excerpt",
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Post Excerpt', 'post-expirator'),
    defaultValue: defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.excerpt,
    onChange: function onChange(settingName, value) {
      return onChangeSetting({
        settingName: "excerpt",
        value: value
      });
    },
    settings: settings,
    variables: variables,
    onClosePopover: function onClosePopover() {
      return _onClosePopover("excerpt");
    },
    checkboxLabel: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Update the post excerpt", "post-expirator")
  }), /*#__PURE__*/React.createElement(_post_discussion__WEBPACK_IMPORTED_MODULE_5__.PostDiscussionControl, {
    name: "discussion",
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Post Discussion', 'post-expirator'),
    defaultValue: defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.discussion,
    onChange: function onChange(settingName, value) {
      return onChangeSetting({
        settingName: "discussion",
        value: value
      });
    },
    onClosePopover: function onClosePopover() {
      return _onClosePopover("discussion");
    },
    checkboxLabel: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Update the post discussion", "post-expirator")
  }), /*#__PURE__*/React.createElement(_post_text__WEBPACK_IMPORTED_MODULE_3__.PostTextControl, {
    name: "password",
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Post Password', 'post-expirator'),
    defaultValue: defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.password,
    onChange: function onChange(settingName, value) {
      return onChangeSetting({
        settingName: "password",
        value: value
      });
    },
    settings: settings,
    variables: variables,
    onClosePopover: function onClosePopover() {
      return _onClosePopover("password");
    },
    checkboxLabel: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Update the post password", "post-expirator")
  }), /*#__PURE__*/React.createElement(_post_author__WEBPACK_IMPORTED_MODULE_4__.PostAuthorControl, {
    name: "author",
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Post Author', 'post-expirator'),
    defaultValue: defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.author,
    onChange: function onChange(settingName, value) {
      return onChangeSetting({
        settingName: "author",
        value: value
      });
    },
    settings: settings,
    variables: variables,
    onClosePopover: function onClosePopover() {
      return _onClosePopover("author");
    },
    checkboxLabel: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Update the post author", "post-expirator")
  }));
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PostData);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/post-data/post-author.jsx"
/*!*************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/post-data/post-author.jsx ***!
  \*************************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   PostAuthorControl: () => (/* binding */ PostAuthorControl),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _toggle_inline_setting__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./toggle-inline-setting */ "./assets/jsx/workflow-editor/components/data-fields/post-data/toggle-inline-setting.jsx");
/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/api-fetch */ "./node_modules/@wordpress/api-fetch/build-module/index.js");
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }





var _window$futureWorkflo = window.futureWorkflowEditor,
  apiUrl = _window$futureWorkflo.apiUrl,
  nonce = _window$futureWorkflo.nonce,
  workflowNonce = _window$futureWorkflo.workflowNonce;
var authorsPromise = null;
var cachedAuthors = null;
var getAuthors = function getAuthors() {
  if (cachedAuthors) {
    return Promise.resolve(cachedAuthors);
  }
  if (!authorsPromise) {
    authorsPromise = (0,_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_4__["default"])({
      path: "".concat(apiUrl, "/authors"),
      headers: {
        'X-WP-Nonce': nonce,
        'X-PP-Workflow-Nonce': workflowNonce
      }
    }).then(function (response) {
      cachedAuthors = response;
      return cachedAuthors;
    });
  }
  return authorsPromise;
};
var getAuthorOptions = function getAuthorOptions(authors) {
  return authors.map(function (author) {
    return {
      value: author.id,
      label: author.name
    };
  });
};
var PostAuthorControl = function PostAuthorControl(_ref) {
  var _authors$;
  var name = _ref.name,
    label = _ref.label,
    defaultValue = _ref.defaultValue,
    _onChange = _ref.onChange,
    checkboxLabel = _ref.checkboxLabel;
  var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)([]),
    _useState2 = _slicedToArray(_useState, 2),
    authors = _useState2[0],
    setAuthors = _useState2[1];
  var _useState3 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false),
    _useState4 = _slicedToArray(_useState3, 2),
    isLoading = _useState4[0],
    setIsLoading = _useState4[1];
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
    setIsLoading(true);
    getAuthors().then(setAuthors).catch(function (error) {
      dispatch('core/notices').createErrorNotice((0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Unable to load the list of authors. Please try again.', 'post-expirator'));
    }).finally(function () {
      setIsLoading(false);
    });
  }, []);
  defaultValue = _objectSpread({
    authors: [(_authors$ = authors[0]) === null || _authors$ === void 0 ? void 0 : _authors$.id],
    update: false
  }, defaultValue);
  var authorOptions = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function () {
    return getAuthorOptions(authors);
  }, [authors]);
  var valuePreview = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function () {
    if (!defaultValue.update || defaultValue.authors.length === 0) {
      return (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Do not update', 'post-expirator');
    }
    return defaultValue.authors.map(function (authorId) {
      var _authors$find;
      return (_authors$find = authors.find(function (a) {
        return parseInt(a.id) === parseInt(authorId);
      })) === null || _authors$find === void 0 ? void 0 : _authors$find.name;
    }).join(', ');
  }, [defaultValue, authors]);
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_toggle_inline_setting__WEBPACK_IMPORTED_MODULE_3__["default"], {
    name: name,
    label: label,
    valuePreview: valuePreview,
    defaultValue: defaultValue,
    checkboxLabel: checkboxLabel,
    onChange: _onChange,
    onUncheckUpdate: function onUncheckUpdate() {
      return _onChange(name, null);
    },
    isLoading: isLoading
  }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalVStack, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.SelectControl, {
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Author', 'post-expirator'),
    value: defaultValue.authors[0],
    options: authorOptions,
    onChange: function onChange(value) {
      _onChange(name, {
        authors: [value],
        update: true
      });
    }
  }))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PostAuthorControl);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/post-data/post-date.jsx"
/*!***********************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/post-data/post-date.jsx ***!
  \***********************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   PostDateControl: () => (/* binding */ PostDateControl),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _date_offset__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../date-offset */ "./assets/jsx/workflow-editor/components/data-fields/date-offset/index.jsx");
/* harmony import */ var _toggle_inline_setting__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./toggle-inline-setting */ "./assets/jsx/workflow-editor/components/data-fields/post-data/toggle-inline-setting.jsx");
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }





var formatDate = function formatDate(date) {
  if (date) {
    var dateFormat = futureWorkflowEditor.dateFormat;
    var timeFormat = futureWorkflowEditor.timeFormat;
    return wp.date.format("".concat(dateFormat, " ").concat(timeFormat), new Date(date));
  }
  return '';
};
var PostDateControl = function PostDateControl(_ref) {
  var name = _ref.name,
    label = _ref.label,
    defaultValue = _ref.defaultValue,
    onChange = _ref.onChange,
    _ref$variables = _ref.variables,
    variables = _ref$variables === void 0 ? [] : _ref$variables,
    checkboxLabel = _ref.checkboxLabel,
    onClosePopover = _ref.onClosePopover;
  var defaultSpecificDate = new Date();
  defaultSpecificDate.setDate(defaultSpecificDate.getDate() + 3);
  defaultValue = _objectSpread({
    update: false,
    dateStrategy: "date",
    dateSource: "calendar",
    specificDate: defaultSpecificDate,
    dateOffset: "+7 days"
  }, defaultValue);
  var onChangeSetting = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (_ref2) {
    var settingName = _ref2.settingName,
      value = _ref2.value;
    var newValue = _objectSpread(_objectSpread({}, defaultValue), value);
    if (onChange) {
      onChange(name, newValue);
    }
  }, [defaultValue, name, onChange]);
  var valuePreview = function valuePreview() {
    if (defaultValue.update) {
      var _defaultValue, _defaultValue2;
      if (((_defaultValue = defaultValue) === null || _defaultValue === void 0 ? void 0 : _defaultValue.dateStrategy) === "date" || ((_defaultValue2 = defaultValue) === null || _defaultValue2 === void 0 ? void 0 : _defaultValue2.dateStrategy) === "offset") {
        var _defaultValue3, _defaultValue4;
        var previewText = '';
        if ((_defaultValue3 = defaultValue) !== null && _defaultValue3 !== void 0 && _defaultValue3.specificDate && ((_defaultValue4 = defaultValue) === null || _defaultValue4 === void 0 ? void 0 : _defaultValue4.dateSource) === 'calendar') {
          previewText = formatDate(defaultValue.specificDate);
        }
        if (defaultValue.dateSource === 'event') {
          previewText = (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('When the trigger is activated', 'post-expirator');
        }
        if (defaultValue.dateSource === 'step') {
          previewText = (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('When the step is activated', 'post-expirator');
        }
        if (defaultValue.dateSource === 'custom') {
          var _defaultValue$customD;
          var expression = (_defaultValue$customD = defaultValue.customDateSource) === null || _defaultValue$customD === void 0 ? void 0 : _defaultValue$customD.expression;
          if (expression) {
            previewText = expression;
          } else {
            previewText = (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Custom date source', 'post-expirator');
          }
        }
        if (defaultValue.dateStrategy === "offset") {
          previewText += ", ".concat(defaultValue.dateOffset);
        }
        return previewText;
      }
    }
    return (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Do not update', 'post-expirator');
  };
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_toggle_inline_setting__WEBPACK_IMPORTED_MODULE_4__["default"], {
    name: name,
    label: label,
    defaultValue: defaultValue,
    valuePreview: valuePreview(),
    checkboxLabel: checkboxLabel,
    onChange: onChange,
    onUncheckUpdate: function onUncheckUpdate() {
      return onChange(name, null);
    }
  }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalVStack, null, /*#__PURE__*/React.createElement(_date_offset__WEBPACK_IMPORTED_MODULE_3__["default"], {
    name: name,
    label: label,
    defaultValue: defaultValue,
    onChange: function onChange(settingName, value) {
      return onChangeSetting({
        settingName: name,
        value: value
      });
    },
    variables: variables,
    settings: {
      hideDateStrategy: ['now']
    }
  }))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PostDateControl);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/post-data/post-discussion.jsx"
/*!*****************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/post-data/post-discussion.jsx ***!
  \*****************************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   PostDiscussionControl: () => (/* binding */ PostDiscussionControl),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _toggle_inline_setting__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./toggle-inline-setting */ "./assets/jsx/workflow-editor/components/data-fields/post-data/toggle-inline-setting.jsx");
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }




var PostDiscussionControl = function PostDiscussionControl(_ref) {
  var name = _ref.name,
    label = _ref.label,
    defaultValue = _ref.defaultValue,
    onChange = _ref.onChange,
    checkboxLabel = _ref.checkboxLabel;
  defaultValue = _objectSpread({
    update: false,
    commentStatus: "closed",
    pingStatus: "closed"
  }, defaultValue);
  var valuePreview = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function () {
    var _defaultValue = defaultValue,
      commentStatus = _defaultValue.commentStatus,
      pingStatus = _defaultValue.pingStatus;
    if (!defaultValue.update) {
      return (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Do not update', 'post-expirator');
    }
    var statusMap = {
      'open:closed': (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Comments only', 'post-expirator'),
      'closed:closed': (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Closed', 'post-expirator'),
      'closed:open': (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Pings only', 'post-expirator'),
      'open:open': (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Open', 'post-expirator')
    };
    var normalizedPingStatus = pingStatus || 'closed';
    var key = "".concat(commentStatus, ":").concat(normalizedPingStatus);
    return statusMap[key] || (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Changed...', 'post-expirator');
  }, [defaultValue]);
  var radioOptions = [{
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Open", "post-expirator"),
    value: "open",
    description: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Visitors can add new comments and replies.", "post-expirator")
  }, {
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Closed", "post-expirator"),
    value: "closed",
    description: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Visitors can not add new comments or replies. Existing comments remain visible.", "post-expirator")
  }];
  var onChangeRadio = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (value) {
    onChange(name, {
      update: true,
      commentStatus: value,
      pingStatus: defaultValue.pingStatus
    });
  }, [onChange, name, defaultValue]);
  var onChangePingbacks = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (value) {
    onChange(name, {
      update: true,
      pingStatus: value ? 'open' : 'closed',
      commentStatus: defaultValue.commentStatus
    });
  }, [onChange, name, defaultValue]);
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_toggle_inline_setting__WEBPACK_IMPORTED_MODULE_3__["default"], {
    name: name,
    label: label,
    valuePreview: valuePreview,
    defaultValue: defaultValue,
    onChange: onChange,
    checkboxLabel: checkboxLabel,
    onUncheckUpdate: function onUncheckUpdate() {
      return onChange(name, null);
    }
  }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalVStack, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.RadioControl, {
    options: radioOptions,
    selected: defaultValue.commentStatus,
    onChange: onChangeRadio
  }), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.CheckboxControl, {
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Enable pinbacks & trackbacks", "post-expirator"),
    checked: defaultValue.pingStatus === 'open',
    onChange: onChangePingbacks
  }), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.ExternalLink, {
    href: "https://wordpress.org/documentation/article/trackbacks-and-pingbacks/"
  }, (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Learn more about pinbacks & trackbacks", "post-expirator")))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PostDiscussionControl);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/post-data/post-text.jsx"
/*!***********************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/post-data/post-text.jsx ***!
  \***********************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   PostTextControl: () => (/* binding */ PostTextControl),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _toggle_inline_setting__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./toggle-inline-setting */ "./assets/jsx/workflow-editor/components/data-fields/post-data/toggle-inline-setting.jsx");
/* harmony import */ var _expression_builder__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../expression-builder */ "./assets/jsx/workflow-editor/components/data-fields/expression-builder/index.jsx");
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }





var PostTextControl = function PostTextControl(_ref) {
  var name = _ref.name,
    label = _ref.label,
    defaultValue = _ref.defaultValue,
    _onChange = _ref.onChange,
    _ref$variables = _ref.variables,
    variables = _ref$variables === void 0 ? [] : _ref$variables,
    checkboxLabel = _ref.checkboxLabel;
  defaultValue = _objectSpread({
    expression: "",
    update: false
  }, defaultValue);
  var valuePreview = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function () {
    if (!defaultValue.update) {
      return (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Do not update', 'post-expirator');
    }
    if (defaultValue.expression === '') {
      return (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Clear content', 'post-expirator');
    }
    return defaultValue.expression;
  }, [defaultValue]);
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_toggle_inline_setting__WEBPACK_IMPORTED_MODULE_3__["default"], {
    name: name,
    label: label,
    valuePreview: valuePreview,
    defaultValue: defaultValue,
    checkboxLabel: checkboxLabel,
    onChange: _onChange,
    onUncheckUpdate: function onUncheckUpdate() {
      return _onChange(name, null);
    }
  }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalVStack, null, /*#__PURE__*/React.createElement(_expression_builder__WEBPACK_IMPORTED_MODULE_4__.ExpressionBuilder, {
    name: name,
    label: label,
    defaultValue: defaultValue,
    onChange: function onChange(settingName, value) {
      return _onChange(name, value);
    },
    variables: variables
  }))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PostTextControl);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/post-data/toggle-inline-setting.jsx"
/*!***********************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/post-data/toggle-inline-setting.jsx ***!
  \***********************************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   ToggleInlineSetting: () => (/* binding */ ToggleInlineSetting),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _inline_setting__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../inline-setting */ "./assets/jsx/workflow-editor/components/data-fields/inline-setting/index.jsx");




var ToggleInlineSetting = function ToggleInlineSetting(_ref) {
  var name = _ref.name,
    label = _ref.label,
    valuePreview = _ref.valuePreview,
    onClosePopover = _ref.onClosePopover,
    checkboxLabel = _ref.checkboxLabel,
    defaultValue = _ref.defaultValue,
    onChange = _ref.onChange,
    children = _ref.children,
    onUncheckUpdate = _ref.onUncheckUpdate,
    isLoading = _ref.isLoading;
  var onChangeCheckbox = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (value) {
    defaultValue.update = value;
    onChange(name, defaultValue);
    if (!value && onUncheckUpdate) {
      onUncheckUpdate();
    }
  }, [onChange, name, defaultValue, onUncheckUpdate]);
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_inline_setting__WEBPACK_IMPORTED_MODULE_3__["default"], {
    name: name,
    label: label,
    valuePreview: valuePreview,
    onClosePopover: onClosePopover,
    isLoading: isLoading,
    children: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.CheckboxControl, {
      label: checkboxLabel,
      checked: defaultValue.update,
      onChange: onChangeCheckbox
    }), defaultValue.update && /*#__PURE__*/React.createElement(React.Fragment, null, children))
  }));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ToggleInlineSetting);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/post-filter/components/post-field-selector.jsx"
/*!**********************************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/post-filter/components/post-field-selector.jsx ***!
  \**********************************************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   PostFieldSelector: () => (/* binding */ PostFieldSelector)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _workflow_store__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../workflow-store */ "./assets/jsx/workflow-editor/components/workflow-store/index.jsx");
/* harmony import */ var _conditional_components_field_expression_builder__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../conditional/components/field-expression-builder */ "./assets/jsx/workflow-editor/components/data-fields/conditional/components/field-expression-builder.jsx");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../utils */ "./assets/jsx/workflow-editor/utils.jsx");
var _excluded = ["value", "handleOnChange", "options", "context"];
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }







/**
 * Field selector component for post queries
 */
var PostFieldSelector = function PostFieldSelector(_ref) {
  var value = _ref.value,
    handleOnChange = _ref.handleOnChange,
    options = _ref.options,
    context = _ref.context,
    props = _objectWithoutProperties(_ref, _excluded);
  var nodes = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.select)(_workflow_store__WEBPACK_IMPORTED_MODULE_4__.store).getSelectedNodes();
  var node = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.select)(_workflow_store__WEBPACK_IMPORTED_MODULE_4__.store).getNodeById(nodes[0]);
  context.variables = (0,_utils__WEBPACK_IMPORTED_MODULE_6__.getExpandedStepScopedVariables)(node);
  return /*#__PURE__*/React.createElement(_conditional_components_field_expression_builder__WEBPACK_IMPORTED_MODULE_5__.FieldExpressionBuilder, _extends({
    value: value,
    handleOnChange: handleOnChange,
    context: context,
    singleVariableOnly: false
  }, props));
};

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/post-filter/components/post-filter.jsx"
/*!**************************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/post-filter/components/post-filter.jsx ***!
  \**************************************************************************************************/
(__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 export */ });
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _conditional__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../conditional */ "./assets/jsx/workflow-editor/components/data-fields/conditional/index.jsx");
/* harmony import */ var _post_field_selector__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./post-field-selector */ "./assets/jsx/workflow-editor/components/data-fields/post-filter/components/post-field-selector.jsx");
/* harmony import */ var _post_value_selector__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./post-value-selector */ "./assets/jsx/workflow-editor/components/data-fields/post-filter/components/post-value-selector.jsx");
/* harmony import */ var react_querybuilder_parseJsonLogic__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-querybuilder/parseJsonLogic */ "./node_modules/react-querybuilder/dist/parseJsonLogic.js");
/* harmony import */ var react_querybuilder_parseJsonLogic__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_querybuilder_parseJsonLogic__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var react_querybuilder__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react-querybuilder */ "./node_modules/react-querybuilder/dist/chunk-WUXLNRPE.mjs");






var convertLegacySettingsIntoJson = function convertLegacySettingsIntoJson(defaultValue, firstPostVariable) {
  var postType = defaultValue.postType,
    postStatus = defaultValue.postStatus,
    postId = defaultValue.postId;

  // Helper function to create clauses for each field type
  var createClauses = function createClauses(values, fieldPath) {
    if (!values || values.length === 0) return null;
    var clauses = values.map(function (value) {
      return {
        "==": [{
          "var": "{{".concat(firstPostVariable, ".").concat(fieldPath, "}}")
        }, value]
      };
    });
    return {
      "or": clauses
    };
  };
  var clauses = [];
  var json = {};

  // Add post type conditions
  var typeClause = createClauses(postType, 'type');
  if (typeClause) {
    clauses.push(typeClause);
  }
  ;

  // Add post status conditions
  var statusClause = createClauses(postStatus, 'status');
  if (statusClause) {
    clauses.push(statusClause);
  }
  ;

  // Add post ID conditions
  var idClause = createClauses(postId, 'id');
  if (idClause) {
    clauses.push(idClause);
  }
  ;
  if (clauses.length > 1) {
    json = {
      "and": clauses
    };
  } else {
    json = clauses[0];
  }
  return json;
};

/**
 * Post Filter component for creating query filters
 */
var PostFilter = function PostFilter(props) {
  if (!props.defaultValue.json) {
    // Look for the first post variable in the step scoped variables
    var firstPostVariable = props.stepScopedVariables.find(function (variable) {
      return variable.type === 'post';
    });
    var jsonValue = convertLegacySettingsIntoJson(props.defaultValue, firstPostVariable.name);
    var query = (0,react_querybuilder_parseJsonLogic__WEBPACK_IMPORTED_MODULE_4__.parseJsonLogic)(jsonValue);
    props.defaultValue.json = (0,react_querybuilder__WEBPACK_IMPORTED_MODULE_5__.formatQuery)(query, {
      format: 'jsonlogic',
      parseNumbers: true
    });
    props.defaultValue.natural = (0,react_querybuilder__WEBPACK_IMPORTED_MODULE_5__.formatQuery)(query, {
      format: 'natural_language',
      parseNumbers: true,
      fields: props.variables,
      getOperators: function getOperators() {
        return react_querybuilder__WEBPACK_IMPORTED_MODULE_5__.defaultOperators;
      }
    });
  }
  return (0,_conditional__WEBPACK_IMPORTED_MODULE_1__.withConditional)({
    FieldComponent: _post_field_selector__WEBPACK_IMPORTED_MODULE_2__.PostFieldSelector,
    ValueComponent: _post_value_selector__WEBPACK_IMPORTED_MODULE_3__.PostValueSelector,
    modalTitle: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Post Filter', 'post-expirator'),
    modalDescription: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Create filters to query specific posts based on rules.', 'post-expirator'),
    buttonText: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Edit rules', 'post-expirator'),
    defaultField: ''
  })(props);
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PostFilter);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/post-filter/components/post-value-selector.jsx"
/*!**********************************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/post-filter/components/post-value-selector.jsx ***!
  \**********************************************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   PostValueSelector: () => (/* binding */ PostValueSelector)
/* harmony export */ });
/* harmony import */ var _conditional_components_value_expression_builder__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../conditional/components/value-expression-builder */ "./assets/jsx/workflow-editor/components/data-fields/conditional/components/value-expression-builder.jsx");


/**
 * Value selector component for post queries
 */
var PostValueSelector = function PostValueSelector(props) {
  return /*#__PURE__*/React.createElement(_conditional_components_value_expression_builder__WEBPACK_IMPORTED_MODULE_0__.ValueExpressionBuilder, props);
};

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/post-filter/index.jsx"
/*!*********************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/post-filter/index.jsx ***!
  \*********************************************************************************/
(__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 export */ });
/* harmony import */ var _components_post_filter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./components/post-filter */ "./assets/jsx/workflow-editor/components/data-fields/post-filter/components/post-filter.jsx");

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_components_post_filter__WEBPACK_IMPORTED_MODULE_0__["default"]);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/post-input.jsx"
/*!**************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/post-input.jsx ***!
  \**************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   PostInput: () => (/* binding */ PostInput),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _list_input__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./list-input */ "./assets/jsx/workflow-editor/components/data-fields/list-input.jsx");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils */ "./assets/jsx/workflow-editor/utils.jsx");
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }


function PostInput(_ref) {
  var name = _ref.name,
    label = _ref.label,
    defaultValue = _ref.defaultValue,
    onChange = _ref.onChange,
    variables = _ref.variables;
  variables = (0,_utils__WEBPACK_IMPORTED_MODULE_1__.filterVariablesTreeByDataType)(variables, ['post', 'array:integer']);
  var tree = [{
    id: "",
    name: "",
    "children": []
  }].concat(_toConsumableArray(variables));
  return /*#__PURE__*/React.createElement(_list_input__WEBPACK_IMPORTED_MODULE_0__.ListInput, {
    tree: tree,
    name: name,
    label: label,
    defaultValue: defaultValue,
    onChange: onChange
  });
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PostInput);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/post-query/index.jsx"
/*!********************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/post-query/index.jsx ***!
  \********************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   PostQuery: () => (/* binding */ PostQuery),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _inline_multi_select__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../inline-multi-select */ "./assets/jsx/workflow-editor/components/inline-multi-select/index.jsx");
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }





function PostQuery(_ref) {
  var _defaultValue, _defaultValue2, _defaultValue3, _defaultValue4, _defaultValue5, _defaultValue6, _defaultValue7;
  var name = _ref.name,
    label = _ref.label,
    defaultValue = _ref.defaultValue,
    onChange = _ref.onChange,
    settings = _ref.settings,
    variables = _ref.variables;
  var postTypes = futureWorkflowEditor.postTypes;
  var postStatuses = futureWorkflowEditor.postStatuses;
  var postTermsOptions = futureWorkflowEditor.postTerms;
  var onChangeSetting = function onChangeSetting(_ref2) {
    var settingName = _ref2.settingName,
      value = _ref2.value;
    var newValue = _objectSpread({}, defaultValue);
    newValue[settingName] = value;
    if (onChange) {
      onChange(name, newValue);
    }
  };
  var acceptsInput = settings && (settings === null || settings === void 0 ? void 0 : settings.acceptsInput) === true;
  var isPostTypeRequired = settings && (settings === null || settings === void 0 ? void 0 : settings.isPostTypeRequired) === true;
  var defaultPostSource = acceptsInput ? 'input' : 'custom';
  var showCustomQueryFields = ((_defaultValue = defaultValue) === null || _defaultValue === void 0 ? void 0 : _defaultValue.postSource) === 'custom' || !acceptsInput;
  var hidePostStatus = settings && (settings === null || settings === void 0 ? void 0 : settings.hidePostStatus) === true;

  // Set default setting
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useEffect)(function () {
    if (!defaultValue) {
      defaultValue = {
        postSource: defaultPostSource,
        postType: [],
        postId: [],
        postStatus: [],
        postAuthor: [],
        postTerms: []
      };
      onChangeSetting({
        settingName: "postSource",
        value: defaultPostSource
      });
    }
  }, []);
  var postTypeFieldLabel = isPostTypeRequired ? (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Post Type', 'post-expirator') + ' *' : (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Post Type', 'post-expirator');
  var descriptions = {
    postType: (settings === null || settings === void 0 ? void 0 : settings.postTypeDescription) || null,
    postId: (settings === null || settings === void 0 ? void 0 : settings.postIdDescription) || null,
    postStatus: (settings === null || settings === void 0 ? void 0 : settings.postStatusDescription) || null,
    postAuthor: (settings === null || settings === void 0 ? void 0 : settings.postAuthorDescription) || null,
    postTerms: (settings === null || settings === void 0 ? void 0 : settings.postTermsDescription) || null
  };
  var injectUserVariablesIntoPostAuthors = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useCallback)(function () {
    var userVariables = variables.filter(function (variable) {
      return variable.type === 'user';
    });
    userVariables = userVariables.map(function (variable) {
      return {
        label: variable.label,
        value: "{{".concat(variable.name, ".id}}")
      };
    });
    var postAuthors = [].concat(_toConsumableArray(userVariables), _toConsumableArray(futureWorkflowEditor.postAuthors));
    return postAuthors;
  }, [variables]);
  var postAuthorOptions = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useMemo)(function () {
    return injectUserVariablesIntoPostAuthors();
  }, [injectUserVariablesIntoPostAuthors]);
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalVStack, null, acceptsInput && /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.RadioControl, {
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Post selection', 'post-expirator'),
    selected: ((_defaultValue2 = defaultValue) === null || _defaultValue2 === void 0 ? void 0 : _defaultValue2.postSource) || defaultPostSource,
    options: [{
      label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Post received as input', 'post-expirator'),
      value: 'input'
    }, {
      label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Custom query', 'post-expirator'),
      value: 'custom'
    }],
    onChange: function onChange(value) {
      return onChangeSetting({
        settingName: "postSource",
        value: value
      });
    }
  }), showCustomQueryFields && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_inline_multi_select__WEBPACK_IMPORTED_MODULE_3__.InlineMultiSelect, {
    label: postTypeFieldLabel,
    value: ((_defaultValue3 = defaultValue) === null || _defaultValue3 === void 0 ? void 0 : _defaultValue3.postType) || [],
    suggestions: postTypes,
    expandOnFocus: true,
    autoSelectFirstMatch: true,
    onChange: function onChange(value) {
      return onChangeSetting({
        settingName: "postType",
        value: value
      });
    }
  }), (descriptions === null || descriptions === void 0 ? void 0 : descriptions.postType) && /*#__PURE__*/React.createElement("p", {
    className: "description"
  }, descriptions.postType), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.FormTokenField, {
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Post ID', 'post-expirator'),
    value: ((_defaultValue4 = defaultValue) === null || _defaultValue4 === void 0 ? void 0 : _defaultValue4.postId) || [],
    onChange: function onChange(value) {
      return onChangeSetting({
        settingName: "postId",
        value: value
      });
    }
  }), (descriptions === null || descriptions === void 0 ? void 0 : descriptions.postId) && /*#__PURE__*/React.createElement("p", {
    className: "description"
  }, descriptions.postId), !hidePostStatus && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_inline_multi_select__WEBPACK_IMPORTED_MODULE_3__.InlineMultiSelect, {
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Post Status', 'post-expirator'),
    value: ((_defaultValue5 = defaultValue) === null || _defaultValue5 === void 0 ? void 0 : _defaultValue5.postStatus) || [],
    suggestions: postStatuses,
    expandOnFocus: true,
    autoSelectFirstMatch: true,
    onChange: function onChange(value) {
      return onChangeSetting({
        settingName: "postStatus",
        value: value
      });
    }
  }), (descriptions === null || descriptions === void 0 ? void 0 : descriptions.postStatus) && /*#__PURE__*/React.createElement("p", {
    className: "description"
  }, descriptions.postStatus)), /*#__PURE__*/React.createElement(_inline_multi_select__WEBPACK_IMPORTED_MODULE_3__.InlineMultiSelect, {
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Post Author', 'post-expirator'),
    value: ((_defaultValue6 = defaultValue) === null || _defaultValue6 === void 0 ? void 0 : _defaultValue6.postAuthor) || [],
    suggestions: postAuthorOptions,
    expandOnFocus: true,
    autoSelectFirstMatch: true,
    onChange: function onChange(value) {
      return onChangeSetting({
        settingName: "postAuthor",
        value: value
      });
    }
  }), (descriptions === null || descriptions === void 0 ? void 0 : descriptions.postAuthor) && /*#__PURE__*/React.createElement("p", {
    className: "description"
  }, descriptions.postAuthor), /*#__PURE__*/React.createElement(_inline_multi_select__WEBPACK_IMPORTED_MODULE_3__.InlineMultiSelect, {
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Post Terms', 'post-expirator'),
    value: ((_defaultValue7 = defaultValue) === null || _defaultValue7 === void 0 ? void 0 : _defaultValue7.postTerms) || [],
    suggestions: postTermsOptions,
    expandOnFocus: true,
    autoSelectFirstMatch: true,
    onChange: function onChange(value) {
      return onChangeSetting({
        settingName: "postTerms",
        value: value
      });
    }
  }), (descriptions === null || descriptions === void 0 ? void 0 : descriptions.postTerms) && /*#__PURE__*/React.createElement("p", {
    className: "description"
  }, descriptions.postTerms), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.PanelRow, null, /*#__PURE__*/React.createElement("p", {
    className: "description"
  }, (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Separate multiple values with commas or Enter key.', 'post-expirator'))), isPostTypeRequired && /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.PanelRow, null, /*#__PURE__*/React.createElement("p", {
    className: "description"
  }, (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('* Required field', 'post-expirator'))))));
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PostQuery);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/post-search-query/components/post-field-selector.jsx"
/*!****************************************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/post-search-query/components/post-field-selector.jsx ***!
  \****************************************************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   PostFieldSelector: () => (/* binding */ PostFieldSelector)
/* harmony export */ });
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _query_fields__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./query-fields */ "./assets/jsx/workflow-editor/components/data-fields/post-search-query/components/query-fields.jsx");
var _excluded = ["value", "handleOnChange", "options", "context"];
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }




/**
 * Field selector component for post queries
 */
var PostFieldSelector = function PostFieldSelector(_ref) {
  var value = _ref.value,
    handleOnChange = _ref.handleOnChange,
    options = _ref.options,
    context = _ref.context,
    props = _objectWithoutProperties(_ref, _excluded);
  return /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.SelectControl, {
    value: value,
    options: _query_fields__WEBPACK_IMPORTED_MODULE_2__.queryFields,
    onChange: handleOnChange
  });
};

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/post-search-query/components/post-search-query.jsx"
/*!**************************************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/post-search-query/components/post-search-query.jsx ***!
  \**************************************************************************************************************/
(__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 export */ });
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _conditional__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../conditional */ "./assets/jsx/workflow-editor/components/data-fields/conditional/index.jsx");
/* harmony import */ var _post_field_selector__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./post-field-selector */ "./assets/jsx/workflow-editor/components/data-fields/post-search-query/components/post-field-selector.jsx");
/* harmony import */ var _post_value_selector__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./post-value-selector */ "./assets/jsx/workflow-editor/components/data-fields/post-search-query/components/post-value-selector.jsx");
/* harmony import */ var react_querybuilder_parseJsonLogic__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-querybuilder/parseJsonLogic */ "./node_modules/react-querybuilder/dist/parseJsonLogic.js");
/* harmony import */ var react_querybuilder_parseJsonLogic__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_querybuilder_parseJsonLogic__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var react_querybuilder__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react-querybuilder */ "./node_modules/react-querybuilder/dist/chunk-WUXLNRPE.mjs");
/* harmony import */ var _query_fields__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./query-fields */ "./assets/jsx/workflow-editor/components/data-fields/post-search-query/components/query-fields.jsx");







var convertLegacySettingsIntoJson = function convertLegacySettingsIntoJson(defaultValue) {
  var postType = defaultValue.postType,
    postStatus = defaultValue.postStatus,
    postId = defaultValue.postId;

  // Helper function to create clauses for each field type
  var createClauses = function createClauses(values, fieldPath) {
    if (!values || values.length === 0) return null;
    var clauses = values.map(function (value) {
      return {
        "==": [{
          "var": "post.".concat(fieldPath)
        }, value]
      };
    });
    return {
      "or": clauses
    };
  };
  var clauses = [];
  var json = {};

  // Add post type conditions
  var typeClause = createClauses(postType, 'post_type');
  if (typeClause) {
    clauses.push(typeClause);
  }
  ;

  // Add post status conditions
  var statusClause = createClauses(postStatus, 'post_status');
  if (statusClause) {
    clauses.push(statusClause);
  }
  ;

  // Add post ID conditions
  var idClause = createClauses(postId, 'ID');
  if (idClause) {
    clauses.push(idClause);
  }
  ;
  if (clauses.length > 1) {
    json = {
      "and": clauses
    };
  } else {
    json = clauses[0];
  }
  return json;
};

/**
 * Post Search Query component for filtering posts
 */
var PostSearchQuery = function PostSearchQuery(props) {
  if (!props.defaultValue.json) {
    var jsonValue = convertLegacySettingsIntoJson(props.defaultValue);
    var query = (0,react_querybuilder_parseJsonLogic__WEBPACK_IMPORTED_MODULE_4__.parseJsonLogic)(jsonValue);
    props.defaultValue.json = (0,react_querybuilder__WEBPACK_IMPORTED_MODULE_5__.formatQuery)(query, {
      format: 'jsonlogic',
      parseNumbers: true,
      fields: _query_fields__WEBPACK_IMPORTED_MODULE_6__.queryFields
    });
    props.defaultValue.natural = (0,react_querybuilder__WEBPACK_IMPORTED_MODULE_5__.formatQuery)(query, {
      format: 'natural_language',
      parseNumbers: true,
      fields: _query_fields__WEBPACK_IMPORTED_MODULE_6__.queryFields,
      getOperators: function getOperators() {
        return react_querybuilder__WEBPACK_IMPORTED_MODULE_5__.defaultOperators;
      }
    });
  }
  return (0,_conditional__WEBPACK_IMPORTED_MODULE_1__.withConditional)({
    FieldComponent: _post_field_selector__WEBPACK_IMPORTED_MODULE_2__.PostFieldSelector,
    ValueComponent: _post_value_selector__WEBPACK_IMPORTED_MODULE_3__.PostValueSelector,
    modalTitle: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Post Search Query', 'post-expirator'),
    modalDescription: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Create a search query to filter posts based on conditions.', 'post-expirator'),
    buttonText: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Edit query', 'post-expirator'),
    defaultField: '',
    queryFields: _query_fields__WEBPACK_IMPORTED_MODULE_6__.queryFields
  })(props);
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PostSearchQuery);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/post-search-query/components/post-value-selector.jsx"
/*!****************************************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/post-search-query/components/post-value-selector.jsx ***!
  \****************************************************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   PostValueSelector: () => (/* binding */ PostValueSelector)
/* harmony export */ });
/* harmony import */ var _conditional_components_value_expression_builder__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../conditional/components/value-expression-builder */ "./assets/jsx/workflow-editor/components/data-fields/conditional/components/value-expression-builder.jsx");


/**
 * Value selector component for post queries
 */
var PostValueSelector = function PostValueSelector(props) {
  return /*#__PURE__*/React.createElement(_conditional_components_value_expression_builder__WEBPACK_IMPORTED_MODULE_0__.ValueExpressionBuilder, props);
};

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/post-search-query/components/query-fields.jsx"
/*!*********************************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/post-search-query/components/query-fields.jsx ***!
  \*********************************************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   queryFields: () => (/* binding */ queryFields)
/* harmony export */ });
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__);

var queryFields = [{
  label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Post ID', 'post-expirator'),
  value: 'p.ID'
}, {
  label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Post Title', 'post-expirator'),
  value: 'p.post_title'
}, {
  label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Post Content', 'post-expirator'),
  value: 'p.post_content'
}, {
  label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Post Excerpt', 'post-expirator'),
  value: 'p.post_excerpt'
}, {
  label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Post Author', 'post-expirator'),
  value: 'p.post_author'
}, {
  label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Post Date', 'post-expirator'),
  value: 'p.post_date'
}, {
  label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Post Status', 'post-expirator'),
  value: 'p.post_status'
}, {
  label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Post Type', 'post-expirator'),
  value: 'p.post_type'
}, {
  label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Post Parent', 'post-expirator'),
  value: 'p.post_parent'
}];

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/post-search-query/index.jsx"
/*!***************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/post-search-query/index.jsx ***!
  \***************************************************************************************/
(__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 export */ });
/* harmony import */ var _components_post_search_query__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./components/post-search-query */ "./assets/jsx/workflow-editor/components/data-fields/post-search-query/components/post-search-query.jsx");

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_components_post_search_query__WEBPACK_IMPORTED_MODULE_0__["default"]);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/post-status.jsx"
/*!***************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/post-status.jsx ***!
  \***************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   PostStatus: () => (/* binding */ PostStatus),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _inline_multi_select__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../inline-multi-select */ "./assets/jsx/workflow-editor/components/inline-multi-select/index.jsx");
/* harmony import */ var _workflow_store__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../workflow-store */ "./assets/jsx/workflow-editor/components/workflow-store/index.jsx");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__);
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }








function PostStatus(_ref) {
  var _postStatuses$, _defaultValue;
  var name = _ref.name,
    label = _ref.label,
    defaultValue = _ref.defaultValue,
    onChange = _ref.onChange,
    settings = _ref.settings;
  var postStatuses = futureWorkflowEditor.postStatuses;
  var onChangeSetting = function onChangeSetting(_ref2) {
    var settingName = _ref2.settingName,
      value = _ref2.value;
    var newValue = _objectSpread({}, defaultValue);
    newValue[settingName] = value;
    if (onChange) {
      onChange(name, newValue);
    }
  };
  var defaultStatus = (_postStatuses$ = postStatuses[0]) === null || _postStatuses$ === void 0 ? void 0 : _postStatuses$.value;

  // Set default setting
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useEffect)(function () {
    if (!defaultValue) {
      defaultValue = {
        newStatus: defaultStatus
      };
      onChangeSetting({
        settingName: "status",
        value: defaultStatus
      });
    }
  }, []);
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalVStack, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.SelectControl, {
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("New Status", "post-expirator"),
    value: (_defaultValue = defaultValue) === null || _defaultValue === void 0 ? void 0 : _defaultValue.status,
    options: postStatuses,
    onChange: function onChange(value) {
      return onChangeSetting({
        settingName: "status",
        value: value
      });
    }
  })));
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PostStatus);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/ray-color.jsx"
/*!*************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/ray-color.jsx ***!
  \*************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   RayColor: () => (/* binding */ RayColor),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__);








function RayColor(_ref) {
  var name = _ref.name,
    label = _ref.label,
    defaultValue = _ref.defaultValue,
    onChange = _ref.onChange,
    _ref$variables = _ref.variables,
    variables = _ref$variables === void 0 ? [] : _ref$variables;
  var colorOptions = [{
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("No color", "post-expirator"),
    value: "default"
  }, {
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Green", "post-expirator"),
    value: "green"
  }, {
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Orange", "post-expirator"),
    value: "orange"
  }, {
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Red", "post-expirator"),
    value: "red"
  }, {
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Blue", "post-expirator"),
    value: "blue"
  }, {
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Purple", "post-expirator"),
    value: "purple"
  }, {
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Gray", "post-expirator"),
    value: "gray"
  }];
  var defaultColor = "default";
  var onChangeSetting = function onChangeSetting(_ref2) {
    var value = _ref2.value;
    if (onChange) {
      onChange(name, value);
    }
  };
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalVStack, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.SelectControl, {
    label: label,
    options: colorOptions,
    value: defaultValue || defaultColor,
    onChange: function onChange(value) {
      return onChangeSetting({
        value: value
      });
    }
  })));
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (RayColor);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/recurrence.jsx"
/*!**************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/recurrence.jsx ***!
  \**************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ Recurrence)
/* harmony export */ });
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }


var settings = window.futureWorkflowEditor;
function Recurrence(_ref) {
  var label = _ref.label,
    disabled = _ref.disabled;
  var cronScheduleOptions = settings.cronSchedules.map(function (schedule) {
    return {
      name: schedule.label,
      id: "cron_".concat(schedule.value)
    };
  });
  var recurrenceOptions = [{
    name: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Non-repeating", "post-expirator"),
    id: "single"
  }, {
    name: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Custom interval in seconds", "post-expirator"),
    id: "custom"
  }].concat(_toConsumableArray(cronScheduleOptions));
  return /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.TreeSelect, {
    label: label,
    tree: recurrenceOptions,
    disabled: disabled
  });
}

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/schedule.jsx"
/*!************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/schedule.jsx ***!
  \************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   Schedule: () => (/* binding */ Schedule),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _editor_store__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../editor-store */ "./assets/jsx/workflow-editor/components/editor-store/index.jsx");
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../constants */ "./assets/jsx/workflow-editor/constants.jsx");
/* harmony import */ var _recurrence__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./recurrence */ "./assets/jsx/workflow-editor/components/data-fields/recurrence.jsx");
/* harmony import */ var _pro_feature_field__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../pro-feature-field */ "./assets/jsx/workflow-editor/components/pro-feature-field/index.jsx");
/* harmony import */ var _expression_builder__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./expression-builder */ "./assets/jsx/workflow-editor/components/data-fields/expression-builder/index.jsx");
/* harmony import */ var _description_text__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./description-text */ "./assets/jsx/workflow-editor/components/data-fields/description-text.jsx");
/* harmony import */ var _date_offset__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./date-offset */ "./assets/jsx/workflow-editor/components/data-fields/date-offset/index.jsx");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var _contexts_pro_context__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../contexts/pro-context */ "./assets/jsx/workflow-editor/contexts/pro-context.jsx");
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }














/**
 *  When to execute:
 *   - now - As soon as possible after event
 *   - date - At a specific date
 *   - offset - After a specific date
 *
 *   Recurrence:
 *   - single - Non-repeating
 *   - custom - Interval in seconds
 *   - cron_... - Once a minute
 *   - cron_... - Daily
 *
 *   Until:
 *   - Forever
 *   - Until specific date
 *   - For a number of times
 *
 */
function Schedule(_ref) {
  var _defaultValue$uniqueI;
  var name = _ref.name,
    label = _ref.label,
    defaultValue = _ref.defaultValue,
    onChange = _ref.onChange,
    _ref$variables = _ref.variables,
    variables = _ref$variables === void 0 ? [] : _ref$variables,
    settings = _ref.settings;
  var allVariables = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useMemo)(function () {
    return variables;
  }, [variables]);
  var defaultSpecificDate = new Date();
  defaultSpecificDate.setDate(defaultSpecificDate.getDate() + 3);
  var defaultRepeatDate = new Date();
  defaultRepeatDate.setDate(defaultRepeatDate.getDate() + 7);
  defaultValue = _objectSpread({
    whenToRun: "now",
    dateSource: "calendar",
    recurrence: "single",
    repeatUntil: "forever",
    repeatInterval: "3600",
    repeatIntervalUnit: "seconds",
    repeatTimes: "5",
    repeatUntilDate: defaultRepeatDate,
    unique: true,
    priority: "10",
    specificDate: defaultSpecificDate,
    dateOffset: "+7 days"
  }, defaultValue);
  var _useSelect = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_3__.useSelect)(function (select) {
      return {
        isAdvancedSettingsEnabled: select(_editor_store__WEBPACK_IMPORTED_MODULE_4__.store).isFeatureActive(_constants__WEBPACK_IMPORTED_MODULE_5__.FEATURE_ADVANCED_SETTINGS)
      };
    }),
    isAdvancedSettingsEnabled = _useSelect.isAdvancedSettingsEnabled;
  var validDateSources = ['calendar', 'event', 'step', 'custom'];
  var isLegacyDateSource = !validDateSources.includes(defaultValue.dateSource);
  if (isLegacyDateSource) {
    defaultValue.customDateSource = defaultValue.dateSource;
    defaultValue.dateSource = 'custom';
  }
  var hidePreventDuplicateScheduling = settings === null || settings === void 0 ? void 0 : settings.hidePreventDuplicateScheduling;
  var onChangeSetting = (0,react__WEBPACK_IMPORTED_MODULE_11__.useCallback)(function (_ref2) {
    var settingName = _ref2.settingName,
      value = _ref2.value;
    var newValue = _objectSpread({}, defaultValue);
    newValue[settingName] = value;
    if (onChange) {
      onChange(name, newValue);
    }
  }, [defaultValue, name, onChange]);
  var onChangeDateOffset = (0,react__WEBPACK_IMPORTED_MODULE_11__.useCallback)(function (settingName, value) {
    value.whenToRun = value.dateStrategy;
    delete value.dateStrategy;
    if (onChange) {
      onChange(name, _objectSpread(_objectSpread({}, defaultValue), value));
    }
  }, [defaultValue, name, onChange]);
  var isPro = (0,_contexts_pro_context__WEBPACK_IMPORTED_MODULE_12__.useIsPro)();
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalVStack, null, /*#__PURE__*/React.createElement(_date_offset__WEBPACK_IMPORTED_MODULE_10__.DateOffset, {
    name: name,
    label: label,
    defaultValue: _objectSpread(_objectSpread({}, defaultValue), {}, {
      dateStrategy: defaultValue.whenToRun
    }),
    onChange: onChangeDateOffset,
    variables: variables,
    settings: {
      hideDateSources: settings === null || settings === void 0 ? void 0 : settings.hideDateSources
    }
  }), !isPro && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.PanelRow, {
    className: "margin-bottom-0"
  }, /*#__PURE__*/React.createElement(_pro_feature_field__WEBPACK_IMPORTED_MODULE_7__["default"], {
    link: "https://publishpress.com/links/future-workflow-inspector"
  }, /*#__PURE__*/React.createElement(_recurrence__WEBPACK_IMPORTED_MODULE_6__["default"], {
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Repeating Action", "post-expirator"),
    disabled: true
  }))), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.PanelRow, {
    className: "margin-top-0"
  }, /*#__PURE__*/React.createElement(_description_text__WEBPACK_IMPORTED_MODULE_9__.DescriptionText, {
    text: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Choose how often this task should repeat. Select 'Non-repeating' for a one-time action or set an interval for automatic recurrence.", "post-expirator")
  }))), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Slot, {
    name: "DateOffsetAfterDateSourceField",
    fillProps: {
      onChangeSetting: onChangeSetting,
      defaultValue: defaultValue
    }
  }), isAdvancedSettingsEnabled && /*#__PURE__*/React.createElement(React.Fragment, null, !hidePreventDuplicateScheduling && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.PanelRow, null, /*#__PURE__*/React.createElement(_expression_builder__WEBPACK_IMPORTED_MODULE_8__["default"], {
    name: "uniqueIdExpression",
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Unique Task Identifier", "post-expirator"),
    defaultValue: (_defaultValue$uniqueI = defaultValue.uniqueIdExpression) !== null && _defaultValue$uniqueI !== void 0 ? _defaultValue$uniqueI : '',
    onChange: function onChange(settingName, value) {
      onChangeSetting({
        settingName: 'uniqueIdExpression',
        value: value
      });
    },
    variables: allVariables,
    description: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Define a unique ID to detect and prevent duplicate tasks.", "post-expirator"),
    oneLinePreview: true,
    wrapOnPreview: false,
    wrapOnEditor: false,
    helpUrl: "https://publishpress.com/docs/schedule-delay/#preventing-duplicate-scheduled-tasks-task-identification-guide"
  }))))));
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Schedule);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/select.jsx"
/*!**********************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/select.jsx ***!
  \**********************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   Select: () => (/* binding */ Select),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__);

function Select(_ref) {
  var name = _ref.name,
    label = _ref.label,
    defaultValue = _ref.defaultValue,
    _onChange = _ref.onChange,
    settings = _ref.settings;
  var options = settings['options'];
  if (!options) {
    console.log('No options found for list', name);
    return null;
  }
  console.log(defaultValue);
  return /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.SelectControl, {
    label: label,
    options: options,
    value: defaultValue,
    onChange: function onChange(value) {
      return _onChange(name, value);
    }
  });
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Select);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/taxonomy-terms.jsx"
/*!******************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/taxonomy-terms.jsx ***!
  \******************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   TaxonomyTerms: () => (/* binding */ TaxonomyTerms),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _inline_multi_select__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../inline-multi-select */ "./assets/jsx/workflow-editor/components/inline-multi-select/index.jsx");
/* harmony import */ var _workflow_store__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../workflow-store */ "./assets/jsx/workflow-editor/components/workflow-store/index.jsx");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__);
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }








function TaxonomyTerms(_ref) {
  var _defaultValue, _taxonomies$, _defaultValue2, _defaultValue3, _defaultValue4, _defaultValue5, _defaultValue6;
  var name = _ref.name,
    label = _ref.label,
    defaultValue = _ref.defaultValue,
    onChange = _ref.onChange,
    settings = _ref.settings;
  var taxonomies = futureWorkflowEditor.taxonomies;
  var defaultTaxonomy = ((_defaultValue = defaultValue) === null || _defaultValue === void 0 ? void 0 : _defaultValue.taxonomy) || ((_taxonomies$ = taxonomies[0]) === null || _taxonomies$ === void 0 ? void 0 : _taxonomies$.value);
  var _useSelect = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_5__.useSelect)(function (select) {
      return {
        taxonmoyTerms: select(_workflow_store__WEBPACK_IMPORTED_MODULE_4__.store).getTaxonomyTerms(defaultTaxonomy)
      };
    }),
    taxonmoyTerms = _useSelect.taxonmoyTerms;
  var _useDispatch = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_5__.useDispatch)(_workflow_store__WEBPACK_IMPORTED_MODULE_4__.store),
    fetchTaxonomyTerms = _useDispatch.fetchTaxonomyTerms;
  var optionToSelectAll = settings && (settings === null || settings === void 0 ? void 0 : settings.optionToSelectAll) === true;
  var labelOptionToSelectAll = settings && (settings === null || settings === void 0 ? void 0 : settings.labelOptionToSelectAll);
  var onChangeSetting = function onChangeSetting(_ref2) {
    var settingName = _ref2.settingName,
      value = _ref2.value;
    var newValue = _objectSpread({}, defaultValue);
    newValue[settingName] = value;
    if (onChange) {
      onChange(name, newValue);
    }
  };

  // Set default setting
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useEffect)(function () {
    if (!defaultValue) {
      defaultValue = {
        taxonomy: defaultTaxonomy,
        terms: []
      };
      onChangeSetting({
        settingName: "taxonomy",
        value: defaultTaxonomy
      });
    }
  }, []);
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useEffect)(function () {
    fetchTaxonomyTerms(defaultTaxonomy);
  }, [defaultTaxonomy]);
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalVStack, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.SelectControl, {
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Taxonomy", "post-expirator"),
    value: (_defaultValue2 = defaultValue) === null || _defaultValue2 === void 0 ? void 0 : _defaultValue2.taxonomy,
    options: taxonomies,
    onChange: function onChange(value) {
      return onChangeSetting({
        settingName: "taxonomy",
        value: value
      });
    }
  }), optionToSelectAll && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.RadioControl, {
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Select the terms", "post-expirator"),
    selected: ((_defaultValue3 = defaultValue) === null || _defaultValue3 === void 0 ? void 0 : _defaultValue3.selectAll) || '0',
    options: [{
      label: labelOptionToSelectAll,
      value: '1'
    }, {
      label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Specific terms", "post-expirator"),
      value: '0'
    }],
    onChange: function onChange(value) {
      return onChangeSetting({
        settingName: "selectAll",
        value: value
      });
    }
  }), ((_defaultValue4 = defaultValue) === null || _defaultValue4 === void 0 ? void 0 : _defaultValue4.selectAll) !== '1' && taxonmoyTerms.length && /*#__PURE__*/React.createElement(_inline_multi_select__WEBPACK_IMPORTED_MODULE_3__["default"], {
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Terms', 'post-expirator'),
    value: ((_defaultValue5 = defaultValue) === null || _defaultValue5 === void 0 ? void 0 : _defaultValue5.terms) || [],
    suggestions: taxonmoyTerms,
    expandOnFocus: true,
    autoSelectFirstMatch: true,
    onChange: function onChange(value) {
      return onChangeSetting({
        settingName: "terms",
        value: value
      });
    }
  })), !optionToSelectAll && taxonmoyTerms.length && /*#__PURE__*/React.createElement(_inline_multi_select__WEBPACK_IMPORTED_MODULE_3__["default"], {
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Terms', 'post-expirator'),
    value: ((_defaultValue6 = defaultValue) === null || _defaultValue6 === void 0 ? void 0 : _defaultValue6.terms) || [],
    suggestions: taxonmoyTerms,
    expandOnFocus: true,
    autoSelectFirstMatch: true,
    onChange: function onChange(value) {
      return onChangeSetting({
        settingName: "terms",
        value: value
      });
    },
    className: "future-taxonomy-terms"
  })));
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (TaxonomyTerms);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/text.jsx"
/*!********************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/text.jsx ***!
  \********************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   Text: () => (/* binding */ Text),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _description_text__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./description-text */ "./assets/jsx/workflow-editor/components/data-fields/description-text.jsx");




function Text(_ref) {
  var name = _ref.name,
    label = _ref.label,
    defaultValue = _ref.defaultValue,
    onChange = _ref.onChange,
    settings = _ref.settings,
    _ref$variables = _ref.variables,
    variables = _ref$variables === void 0 ? [] : _ref$variables,
    helpUrl = _ref.helpUrl,
    description = _ref.description;
  var onChangeSetting = function onChangeSetting(_ref2) {
    var value = _ref2.value;
    if (onChange) {
      onChange(name, value);
    }
  };
  if (!defaultValue) {
    defaultValue = '';
  }
  var placeholder = (settings === null || settings === void 0 ? void 0 : settings.placeholder) || '';
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalVStack, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.TextControl, {
    label: label,
    value: defaultValue || "",
    onChange: function onChange(value) {
      return onChangeSetting({
        value: value
      });
    },
    placeholder: placeholder
  }), description && /*#__PURE__*/React.createElement(_description_text__WEBPACK_IMPORTED_MODULE_2__.DescriptionText, {
    text: description,
    helpUrl: helpUrl
  })));
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Text);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/textarea.jsx"
/*!************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/textarea.jsx ***!
  \************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   Textarea: () => (/* binding */ Textarea),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);



function Textarea(_ref) {
  var name = _ref.name,
    label = _ref.label,
    defaultValue = _ref.defaultValue,
    settings = _ref.settings,
    onChange = _ref.onChange,
    _ref$variables = _ref.variables,
    variables = _ref$variables === void 0 ? [] : _ref$variables;
  var onChangeSetting = function onChangeSetting(_ref2) {
    var value = _ref2.value;
    if (onChange) {
      onChange(name, value);
    }
  };
  if (!defaultValue) {
    defaultValue = '';
  }
  var placeholder = (settings === null || settings === void 0 ? void 0 : settings.placeholder) || '';
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalVStack, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.TextareaControl, {
    label: label,
    value: defaultValue || "",
    onChange: function onChange(value) {
      return onChangeSetting({
        value: value
      });
    },
    placeholder: placeholder
  })));
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Textarea);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/toggle.jsx"
/*!**********************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/toggle.jsx ***!
  \**********************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   Toggle: () => (/* binding */ Toggle),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);



function Toggle(_ref) {
  var name = _ref.name,
    label = _ref.label,
    defaultValue = _ref.defaultValue,
    onChange = _ref.onChange,
    settings = _ref.settings,
    description = _ref.description,
    _ref$variables = _ref.variables,
    variables = _ref$variables === void 0 ? [] : _ref$variables;
  var onChangeSetting = function onChangeSetting(_ref2) {
    var value = _ref2.value;
    if (onChange) {
      onChange(name, value);
    }
  };
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalVStack, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, {
    label: label,
    checked: defaultValue || false,
    onChange: function onChange(value) {
      return onChangeSetting({
        value: value
      });
    }
  }), description && /*#__PURE__*/React.createElement("p", {
    className: "description"
  }, description)));
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Toggle);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-fields/user-query.jsx"
/*!**************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-fields/user-query.jsx ***!
  \**************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   UserQuery: () => (/* binding */ UserQuery),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _inline_multi_select__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../inline-multi-select */ "./assets/jsx/workflow-editor/components/inline-multi-select/index.jsx");
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }





function UserQuery(_ref) {
  var _defaultValue, _settings$labels, _settings$labels2, _defaultValue2, _defaultValue3, _defaultValue4, _defaultValue5;
  var name = _ref.name,
    label = _ref.label,
    defaultValue = _ref.defaultValue,
    onChange = _ref.onChange,
    settings = _ref.settings;
  var userRoles = futureWorkflowEditor.userRoles;
  var onChangeSetting = function onChangeSetting(_ref2) {
    var settingName = _ref2.settingName,
      value = _ref2.value;
    var newValue = _objectSpread({}, defaultValue);
    newValue[settingName] = value;
    if (onChange) {
      onChange(name, newValue);
    }
  };
  var acceptsInput = settings && (settings === null || settings === void 0 ? void 0 : settings.acceptsInput) === true;
  var isUserRoleRequired = settings && (settings === null || settings === void 0 ? void 0 : settings.isUserRoleRequired) === true;
  var defaultUserSource = acceptsInput ? 'input' : 'custom';
  var showCustomQueryFields = ((_defaultValue = defaultValue) === null || _defaultValue === void 0 ? void 0 : _defaultValue.userSource) === 'custom' || !acceptsInput;

  // Set default setting
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useEffect)(function () {
    if (!defaultValue) {
      defaultValue = {
        userSource: defaultUserSource,
        userRole: [],
        userRoleAfter: [],
        userId: []
      };
      onChangeSetting({
        settingName: "userSource",
        value: defaultUserSource
      });
    }
  }, []);
  var userRoleFieldLabel = (settings === null || settings === void 0 || (_settings$labels = settings.labels) === null || _settings$labels === void 0 ? void 0 : _settings$labels.userRole) || (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('User Role', 'post-expirator');
  userRoleFieldLabel = isUserRoleRequired ? userRoleFieldLabel + ' *' : userRoleFieldLabel;
  var userRoleAfterFieldLabel = (settings === null || settings === void 0 || (_settings$labels2 = settings.labels) === null || _settings$labels2 === void 0 ? void 0 : _settings$labels2.userRoleAfter) || null;
  var descriptions = {
    userRole: (settings === null || settings === void 0 ? void 0 : settings.userRoleDescription) || null,
    userRoleAfter: (settings === null || settings === void 0 ? void 0 : settings.userRoleAfterDescription) || null,
    userId: (settings === null || settings === void 0 ? void 0 : settings.userIdDescription) || null
  };
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalVStack, null, acceptsInput && /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.RadioControl, {
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('User selection', 'post-expirator'),
    selected: ((_defaultValue2 = defaultValue) === null || _defaultValue2 === void 0 ? void 0 : _defaultValue2.userSource) || defaultUserSource,
    options: [{
      label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('User received as input', 'post-expirator'),
      value: 'input'
    }, {
      label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Custom query', 'post-expirator'),
      value: 'custom'
    }],
    onChange: function onChange(value) {
      return onChangeSetting({
        settingName: "userSource",
        value: value
      });
    }
  }), showCustomQueryFields && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_inline_multi_select__WEBPACK_IMPORTED_MODULE_3__.InlineMultiSelect, {
    label: userRoleFieldLabel,
    value: ((_defaultValue3 = defaultValue) === null || _defaultValue3 === void 0 ? void 0 : _defaultValue3.userRole) || [],
    suggestions: userRoles,
    expandOnFocus: true,
    autoSelectFirstMatch: true,
    onChange: function onChange(value) {
      return onChangeSetting({
        settingName: "userRole",
        value: value
      });
    }
  }), (descriptions === null || descriptions === void 0 ? void 0 : descriptions.userRole) && /*#__PURE__*/React.createElement("p", {
    className: "description"
  }, descriptions.userRole), userRoleAfterFieldLabel && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_inline_multi_select__WEBPACK_IMPORTED_MODULE_3__.InlineMultiSelect, {
    label: userRoleAfterFieldLabel,
    value: ((_defaultValue4 = defaultValue) === null || _defaultValue4 === void 0 ? void 0 : _defaultValue4.userRoleAfter) || [],
    suggestions: userRoles,
    expandOnFocus: true,
    autoSelectFirstMatch: true,
    onChange: function onChange(value) {
      return onChangeSetting({
        settingName: "userRoleAfter",
        value: value
      });
    }
  }), (descriptions === null || descriptions === void 0 ? void 0 : descriptions.userRoleAfter) && /*#__PURE__*/React.createElement("p", {
    className: "description"
  }, descriptions.userRoleAfter)), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.FormTokenField, {
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('User ID', 'post-expirator'),
    value: ((_defaultValue5 = defaultValue) === null || _defaultValue5 === void 0 ? void 0 : _defaultValue5.userId) || [],
    onChange: function onChange(value) {
      return onChangeSetting({
        settingName: "userId",
        value: value
      });
    }
  }), (descriptions === null || descriptions === void 0 ? void 0 : descriptions.userId) && /*#__PURE__*/React.createElement("p", {
    className: "description"
  }, descriptions.userId), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.PanelRow, null, /*#__PURE__*/React.createElement("p", {
    className: "description"
  }, (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Separate multiple values with commas or Enter key.', 'post-expirator'))), isUserRoleRequired && /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.PanelRow, null, /*#__PURE__*/React.createElement("p", {
    className: "description"
  }, (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('* Required field', 'post-expirator'))))));
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (UserQuery);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-types/array.jsx"
/*!********************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-types/array.jsx ***!
  \********************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   ArrayData: () => (/* binding */ ArrayData),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
function ArrayData() {
  return {
    name: "array",
    label: "Array",
    primitiveType: "array",
    itemsType: "mixed"
  };
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ArrayData);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-types/boolean.jsx"
/*!**********************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-types/boolean.jsx ***!
  \**********************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   BooleanData: () => (/* binding */ BooleanData),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
function BooleanData() {
  return {
    name: "boolean",
    label: "Boolean",
    primitiveType: "boolean"
  };
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (BooleanData);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-types/datetime.jsx"
/*!***********************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-types/datetime.jsx ***!
  \***********************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   DatetimeData: () => (/* binding */ DatetimeData),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
function DatetimeData() {
  return {
    name: "datetime",
    label: "Datetime",
    primitiveType: "string"
  };
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (DatetimeData);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-types/email.jsx"
/*!********************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-types/email.jsx ***!
  \********************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   EmailData: () => (/* binding */ EmailData),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
function EmailData() {
  return {
    name: "email",
    label: "Email",
    primitiveType: "string"
  };
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (EmailData);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-types/future-action.jsx"
/*!****************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-types/future-action.jsx ***!
  \****************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   FutureActionData: () => (/* binding */ FutureActionData),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
function FutureActionData() {
  return {
    name: "future_action",
    label: "Future Action",
    primitiveType: "object",
    propertiesSchema: [{
      name: "enabled",
      type: "boolean",
      label: "Enabled",
      description: "Whether the future action is enabled."
    }, {
      name: "action",
      type: "string",
      label: "Action",
      description: "The action to be performed."
    }, {
      name: "new_status",
      type: "string",
      label: "New Status",
      description: "The new status of the post."
    }, {
      name: "date",
      type: "integer",
      label: "Date",
      description: "The date when the future action will be performed in Unix timestamp format."
    }, {
      name: "date_string",
      type: "datetime",
      label: "Date String",
      description: "The date when the future action will be performed."
    }, {
      name: "terms",
      type: "terms_array",
      label: "Terms",
      description: "The terms to be used in the future action."
    }]
  };
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (FutureActionData);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-types/index.jsx"
/*!********************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-types/index.jsx ***!
  \********************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   ArrayData: () => (/* reexport safe */ _array__WEBPACK_IMPORTED_MODULE_11__["default"]),
/* harmony export */   BooleanData: () => (/* reexport safe */ _boolean__WEBPACK_IMPORTED_MODULE_5__["default"]),
/* harmony export */   DatetimeData: () => (/* reexport safe */ _datetime__WEBPACK_IMPORTED_MODULE_4__["default"]),
/* harmony export */   EmailData: () => (/* reexport safe */ _email__WEBPACK_IMPORTED_MODULE_2__["default"]),
/* harmony export */   FutureActionData: () => (/* reexport safe */ _future_action__WEBPACK_IMPORTED_MODULE_12__["default"]),
/* harmony export */   InputData: () => (/* reexport safe */ _input__WEBPACK_IMPORTED_MODULE_0__["default"]),
/* harmony export */   IntegerData: () => (/* reexport safe */ _integer__WEBPACK_IMPORTED_MODULE_3__["default"]),
/* harmony export */   MetaData: () => (/* reexport safe */ _meta__WEBPACK_IMPORTED_MODULE_18__["default"]),
/* harmony export */   NodeData: () => (/* reexport safe */ _node__WEBPACK_IMPORTED_MODULE_10__["default"]),
/* harmony export */   PostData: () => (/* reexport safe */ _post__WEBPACK_IMPORTED_MODULE_6__["default"]),
/* harmony export */   PostStatusData: () => (/* reexport safe */ _post_status__WEBPACK_IMPORTED_MODULE_14__["default"]),
/* harmony export */   PostTermsData: () => (/* reexport safe */ _post_terms__WEBPACK_IMPORTED_MODULE_19__["default"]),
/* harmony export */   PostTypeData: () => (/* reexport safe */ _post_type__WEBPACK_IMPORTED_MODULE_15__["default"]),
/* harmony export */   SiteData: () => (/* reexport safe */ _site__WEBPACK_IMPORTED_MODULE_9__["default"]),
/* harmony export */   StringData: () => (/* reexport safe */ _string__WEBPACK_IMPORTED_MODULE_1__["default"]),
/* harmony export */   TermsArrayData: () => (/* reexport safe */ _terms_array__WEBPACK_IMPORTED_MODULE_13__["default"]),
/* harmony export */   UrlData: () => (/* reexport safe */ _url__WEBPACK_IMPORTED_MODULE_16__["default"]),
/* harmony export */   UserData: () => (/* reexport safe */ _user__WEBPACK_IMPORTED_MODULE_8__["default"]),
/* harmony export */   UserRolesData: () => (/* reexport safe */ _user_roles__WEBPACK_IMPORTED_MODULE_17__["default"]),
/* harmony export */   WorkflowData: () => (/* reexport safe */ _workflow__WEBPACK_IMPORTED_MODULE_7__["default"])
/* harmony export */ });
/* harmony import */ var _input__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./input */ "./assets/jsx/workflow-editor/components/data-types/input.jsx");
/* harmony import */ var _string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./string */ "./assets/jsx/workflow-editor/components/data-types/string.jsx");
/* harmony import */ var _email__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./email */ "./assets/jsx/workflow-editor/components/data-types/email.jsx");
/* harmony import */ var _integer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./integer */ "./assets/jsx/workflow-editor/components/data-types/integer.jsx");
/* harmony import */ var _datetime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./datetime */ "./assets/jsx/workflow-editor/components/data-types/datetime.jsx");
/* harmony import */ var _boolean__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./boolean */ "./assets/jsx/workflow-editor/components/data-types/boolean.jsx");
/* harmony import */ var _post__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./post */ "./assets/jsx/workflow-editor/components/data-types/post.jsx");
/* harmony import */ var _workflow__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./workflow */ "./assets/jsx/workflow-editor/components/data-types/workflow.jsx");
/* harmony import */ var _user__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./user */ "./assets/jsx/workflow-editor/components/data-types/user.jsx");
/* harmony import */ var _site__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./site */ "./assets/jsx/workflow-editor/components/data-types/site.jsx");
/* harmony import */ var _node__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./node */ "./assets/jsx/workflow-editor/components/data-types/node.jsx");
/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./array */ "./assets/jsx/workflow-editor/components/data-types/array.jsx");
/* harmony import */ var _future_action__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./future-action */ "./assets/jsx/workflow-editor/components/data-types/future-action.jsx");
/* harmony import */ var _terms_array__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./terms-array */ "./assets/jsx/workflow-editor/components/data-types/terms-array.jsx");
/* harmony import */ var _post_status__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./post-status */ "./assets/jsx/workflow-editor/components/data-types/post-status.jsx");
/* harmony import */ var _post_type__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./post-type */ "./assets/jsx/workflow-editor/components/data-types/post-type.jsx");
/* harmony import */ var _url__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./url */ "./assets/jsx/workflow-editor/components/data-types/url.jsx");
/* harmony import */ var _user_roles__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./user-roles */ "./assets/jsx/workflow-editor/components/data-types/user-roles.jsx");
/* harmony import */ var _meta__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./meta */ "./assets/jsx/workflow-editor/components/data-types/meta.jsx");
/* harmony import */ var _post_terms__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./post-terms */ "./assets/jsx/workflow-editor/components/data-types/post-terms.jsx");





















/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-types/input.jsx"
/*!********************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-types/input.jsx ***!
  \********************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   Input: () => (/* binding */ Input),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
function Input() {
  return {
    name: "input",
    label: "Step input",
    primitiveType: "array",
    itemsType: "mixed"
  };
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Input);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-types/integer.jsx"
/*!**********************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-types/integer.jsx ***!
  \**********************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   IntegerData: () => (/* binding */ IntegerData),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
function IntegerData() {
  return {
    name: "integer",
    label: "Integer",
    primitiveType: "integer"
  };
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (IntegerData);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-types/meta.jsx"
/*!*******************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-types/meta.jsx ***!
  \*******************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   MetaData: () => (/* binding */ MetaData),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
function MetaData() {
  return {
    name: "meta",
    label: "Metadata",
    primitiveType: "object",
    propertiesSchema: [{
      name: "id",
      type: "integer",
      label: "ID",
      description: "The unique identifier for the metadata."
    }, {
      name: "key",
      type: "string",
      label: "Key",
      description: "The key of the metadata."
    }, {
      name: "value",
      type: "mixed",
      label: "Value",
      description: "The value of the metadata."
    }, {
      name: "single",
      type: "boolean",
      label: "Single",
      description: "Whether the metadata is a single value."
    }]
  };
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (MetaData);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-types/node.jsx"
/*!*******************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-types/node.jsx ***!
  \*******************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   NodeData: () => (/* binding */ NodeData),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
function NodeData() {
  return {
    name: "node",
    label: "Workflow Node",
    primitiveType: "object",
    propertiesSchema: [{
      name: "id",
      type: "integer",
      label: "ID",
      description: "The unique identifier for the node."
    }, {
      name: "name",
      type: "string",
      label: "Name",
      description: "The name of the node."
    }, {
      name: "slug",
      type: "string",
      label: "Slug",
      description: "The slug of the node."
    }, {
      name: "label",
      type: "string",
      label: "Label",
      description: "The label of the node."
    }, {
      name: "activation_timestamp",
      type: "string",
      label: "Activation Time",
      description: "The timestamp when the node was activated."
    }, {
      name: "post_id",
      type: "integer",
      label: "Post ID",
      description: "The ID of the post that triggered the node."
    }]
  };
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (NodeData);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-types/post-status.jsx"
/*!**************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-types/post-status.jsx ***!
  \**************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   PostStatusData: () => (/* binding */ PostStatusData),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
function PostStatusData() {
  return {
    name: "post_status",
    label: "Post Status",
    primitiveType: "string"
  };
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PostStatusData);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-types/post-terms.jsx"
/*!*************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-types/post-terms.jsx ***!
  \*************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   PostTermsData: () => (/* binding */ PostTermsData),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
function PostTermsData() {
  return {
    name: "post_terms",
    label: "Post Terms",
    primitiveType: "object",
    propertiesSchema: []
  };
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PostTermsData);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-types/post-type.jsx"
/*!************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-types/post-type.jsx ***!
  \************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   PostTypeData: () => (/* binding */ PostTypeData),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
function PostTypeData() {
  return {
    name: "post_type",
    label: "Post Type",
    primitiveType: "string"
  };
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PostTypeData);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-types/post.jsx"
/*!*******************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-types/post.jsx ***!
  \*******************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   PostData: () => (/* binding */ PostData),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
function PostData() {
  return {
    name: "post",
    label: "Post",
    primitiveType: "object",
    propertiesSchema: [{
      name: "title",
      type: "string",
      label: "Title",
      description: "The title of the post."
    }, {
      name: "content",
      type: "string",
      label: "Content",
      description: "The content of the post."
    }, {
      name: "content_text",
      type: "string",
      label: "Content (Plain Text)",
      description: "The content of the post in plain text."
    }, {
      name: "excerpt",
      type: "string",
      label: "Excerpt",
      description: "The excerpt of the post."
    }, {
      name: "status",
      type: "post_status",
      label: "Post Status",
      description: "The status of the post."
    }, {
      name: "type",
      type: "post_type",
      label: "Post Type",
      description: "The type of the post."
    }, {
      name: "id",
      type: "integer",
      label: "ID",
      description: "The unique identifier for the post."
    }, {
      name: "date",
      type: "datetime",
      label: "Publish Date",
      description: "The date when the post was published."
    }, {
      name: "modified",
      type: "datetime",
      label: "Modification Date",
      description: "The date when the post was last modified."
    }, {
      name: "permalink",
      type: "url",
      label: "Permalink",
      description: "The permalink of the post."
    }, {
      name: "slug",
      type: "string",
      label: "Slug",
      description: "The slug (or post name)of the post."
    }, {
      name: "author",
      type: "user",
      label: "Author",
      description: "The author of the post."
    }, {
      name: "meta",
      type: "meta",
      label: "Metadata",
      description: "The metadata of the post.",
      context: {
        table: "_postmeta"
      }
    }, {
      name: "terms",
      type: "post_terms",
      label: "Terms",
      description: "The taxonomy terms assigned to the post."
    }, {
      name: "future",
      type: "future_action",
      label: "Future Action",
      description: "The future action properties of the post."
    }]
  };
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PostData);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-types/site.jsx"
/*!*******************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-types/site.jsx ***!
  \*******************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   SiteData: () => (/* binding */ SiteData),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
function SiteData() {
  return {
    name: "site",
    label: "Site",
    primitiveType: "object",
    propertiesSchema: [{
      name: "id",
      type: "integer",
      label: "ID",
      description: "The unique identifier for the site."
    }, {
      name: "name",
      type: "string",
      label: "Name",
      description: "The name of the site."
    }, {
      name: "description",
      type: "string",
      label: "Description",
      description: "The description of the site."
    }, {
      name: "url",
      type: "string",
      label: "Site URL",
      description: "The URL of the site."
    }, {
      name: "home_url",
      type: "string",
      label: "Home URL",
      description: "The URL of the home page of the site."
    }, {
      name: "admin_email",
      type: "email",
      label: "Admin Email",
      description: "The email address of the site administrator."
    }]
  };
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SiteData);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-types/string.jsx"
/*!*********************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-types/string.jsx ***!
  \*********************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   StringData: () => (/* binding */ StringData),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
function StringData() {
  return {
    name: "string",
    label: "String",
    primitiveType: "string"
  };
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (StringData);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-types/terms-array.jsx"
/*!**************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-types/terms-array.jsx ***!
  \**************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   TermsArrayData: () => (/* binding */ TermsArrayData),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
function TermsArrayData() {
  return {
    name: "terms_array",
    label: "Terms Array",
    primitiveType: "object",
    propertiesSchema: [{
      name: "ids",
      type: "array",
      label: "List of terms IDs",
      description: "A list of terms IDs."
    }, {
      name: "labels",
      type: "array",
      label: "List of terms labels",
      description: "A list of terms labels."
    }]
  };
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (TermsArrayData);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-types/url.jsx"
/*!******************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-types/url.jsx ***!
  \******************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   UrlData: () => (/* binding */ UrlData),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
function UrlData() {
  return {
    name: "url",
    label: "URL",
    primitiveType: "string"
  };
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (UrlData);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-types/user-roles.jsx"
/*!*************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-types/user-roles.jsx ***!
  \*************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   UserRolesData: () => (/* binding */ UserRolesData),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
function UserRolesData() {
  return {
    name: "user_roles",
    label: "User Roles",
    primitiveType: "array",
    itemsType: "string"
  };
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (UserRolesData);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-types/user.jsx"
/*!*******************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-types/user.jsx ***!
  \*******************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   UserData: () => (/* binding */ UserData),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
function UserData() {
  return {
    name: "user",
    label: "User",
    primitiveType: "object",
    propertiesSchema: [{
      name: "ID",
      type: "integer",
      label: "ID",
      description: "The unique identifier for the user."
    }, {
      name: "email",
      type: "email",
      label: "Email",
      description: "The email address of the user."
    }, {
      name: "login",
      type: "string",
      label: "Login",
      description: "The login name of the user."
    }, {
      name: "display_name",
      type: "string",
      label: "Display name",
      description: "The display name of the user."
    }, {
      name: "roles",
      type: "user_roles",
      label: "Roles",
      description: "The roles of the user."
    }, {
      name: "caps",
      type: "object",
      label: "Capabilities",
      description: "The capabilities of the user."
    }, {
      name: "registered",
      type: "datetime",
      label: "Registration date",
      description: "The date when the user was registered."
    }, {
      name: "meta",
      type: "meta",
      label: "Metadata",
      description: "The metadata of the user.",
      context: {
        table: "_usermeta"
      }
    }]
  };
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (UserData);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/data-types/workflow.jsx"
/*!***********************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/data-types/workflow.jsx ***!
  \***********************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   WorkflowData: () => (/* binding */ WorkflowData),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
function WorkflowData() {
  return {
    name: "workflow",
    label: "Future Workflow",
    primitiveType: "object",
    propertiesSchema: [{
      name: "id",
      type: "integer",
      label: "ID",
      description: "The unique identifier for the workflow."
    }, {
      name: "title",
      type: "string",
      label: "Title",
      description: "The title of the workflow."
    }, {
      name: "description",
      type: "string",
      label: "Description",
      description: "The description of the workflow."
    }, {
      name: "modified_at",
      type: "datetime",
      label: "Modification Date",
      description: "The date when the workflow was last modified."
    }, {
      name: "meta",
      type: "meta",
      label: "Metadata",
      description: "The metadata of the workflow.",
      context: {
        table: "_postmeta"
      }
    }, {
      name: "execution_id",
      type: "string",
      label: "Execution ID",
      description: "The unique identifier for the workflow execution."
    }, {
      name: "execution_trace",
      type: "array",
      label: "Execution Trace",
      description: "The trace of the workflow execution.",
      items: {
        type: "string"
      }
    }]
  };
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (WorkflowData);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/edge-types/generic.jsx"
/*!**********************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/edge-types/generic.jsx ***!
  \**********************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   GenericEdge: () => (/* binding */ GenericEdge),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var reactflow__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! reactflow */ "./node_modules/@reactflow/core/dist/esm/index.mjs");
/* harmony import */ var _workflow_store__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../workflow-store */ "./assets/jsx/workflow-editor/components/workflow-store/index.jsx");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__);
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }





function GenericEdge(_ref) {
  var id = _ref.id,
    sourceX = _ref.sourceX,
    sourceY = _ref.sourceY,
    targetX = _ref.targetX,
    targetY = _ref.targetY,
    sourcePosition = _ref.sourcePosition,
    targetPosition = _ref.targetPosition,
    _ref$style = _ref.style,
    style = _ref$style === void 0 ? {} : _ref$style,
    selected = _ref.selected,
    markerEnd = _ref.markerEnd;
  var _useSelect = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_2__.useSelect)(function (select) {
      var selectedElementsCount = select(_workflow_store__WEBPACK_IMPORTED_MODULE_1__.store).getSelectedElementsCount();
      return {
        isSingularElementSelected: selectedElementsCount === 1
      };
    }),
    isSingularElementSelected = _useSelect.isSingularElementSelected;
  var _useDispatch = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_2__.useDispatch)(_workflow_store__WEBPACK_IMPORTED_MODULE_1__.store),
    removeEdge = _useDispatch.removeEdge;
  var _getBezierPath = (0,reactflow__WEBPACK_IMPORTED_MODULE_0__.getBezierPath)({
      sourceX: sourceX,
      sourceY: sourceY,
      sourcePosition: sourcePosition,
      targetX: targetX,
      targetY: targetY,
      targetPosition: targetPosition
    }),
    _getBezierPath2 = _slicedToArray(_getBezierPath, 3),
    edgePath = _getBezierPath2[0],
    labelX = _getBezierPath2[1],
    labelY = _getBezierPath2[2];
  var onEdgeClick = function onEdgeClick() {
    removeEdge(id);
  };
  var edgeStyle = _objectSpread(_objectSpread({}, style), {}, {
    strokeWidth: 2
  });
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(reactflow__WEBPACK_IMPORTED_MODULE_0__.BaseEdge, {
    path: edgePath,
    markerEnd: markerEnd,
    style: edgeStyle,
    animated: false
  }), selected && isSingularElementSelected && /*#__PURE__*/React.createElement(reactflow__WEBPACK_IMPORTED_MODULE_0__.EdgeLabelRenderer, null, /*#__PURE__*/React.createElement("div", {
    style: {
      position: 'absolute',
      transform: "translate(-50%, -50%) translate(".concat(labelX, "px,").concat(labelY, "px)"),
      fontSize: 12,
      // everything inside EdgeLabelRenderer has no pointer events by default
      // if you have an interactive element, set pointer-events: all
      pointerEvents: 'all'
    },
    className: "nodrag nopan react-flow__edge-toolbar-anchor"
  }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Popover, {
    position: "top"
  }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Toolbar, {
    className: "components-accessible-toolbar block-editor-block-contextual-toolbar react-flow__edge-toolbar"
  }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ToolbarGroup, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ToolbarButton, {
    icon: "trash",
    title: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Delete', 'web-stories'),
    onClick: onEdgeClick
  })))))));
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (GenericEdge);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/edge-types/index.jsx"
/*!********************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/edge-types/index.jsx ***!
  \********************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   GenericEdge: () => (/* reexport safe */ _generic__WEBPACK_IMPORTED_MODULE_0__["default"])
/* harmony export */ });
/* harmony import */ var _generic__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./generic */ "./assets/jsx/workflow-editor/components/edge-types/generic.jsx");


/***/ },

/***/ "./assets/jsx/workflow-editor/components/editor-notices/index.jsx"
/*!************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/editor-notices/index.jsx ***!
  \************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ EditorNotices)
/* harmony export */ });
/* harmony import */ var lodash_filter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/filter */ "./node_modules/lodash/filter.js");
/* harmony import */ var lodash_filter__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_filter__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__);
/**
 * External dependencies
 */


/**
 * WordPress dependencies
 */


function EditorNotices() {
  var _useDispatch = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_2__.useDispatch)('core/notices'),
    removeNotice = _useDispatch.removeNotice;
  var notices = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_2__.useSelect)(function (select) {
    return select('core/notices').getNotices();
  }, []);
  var dismissibleNotices = lodash_filter__WEBPACK_IMPORTED_MODULE_0___default()(notices, {
    isDismissible: true,
    type: 'default'
  });
  var nonDismissibleNotices = lodash_filter__WEBPACK_IMPORTED_MODULE_0___default()(notices, {
    isDismissible: false,
    type: 'default'
  });
  var snackbarNotices = lodash_filter__WEBPACK_IMPORTED_MODULE_0___default()(notices, {
    type: 'snackbar'
  });
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.NoticeList, {
    notices: nonDismissibleNotices,
    className: "workflow-editor-notices__notice-list"
  }), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.NoticeList, {
    notices: dismissibleNotices,
    className: "workflow-editor-notices__notice-list",
    onRemove: removeNotice
  }), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.SnackbarList, {
    notices: snackbarNotices,
    className: "workflow-editor-notices__snackbar-list",
    onRemove: removeNotice
  }));
}

/***/ },

/***/ "./assets/jsx/workflow-editor/components/editor-store/constants.jsx"
/*!**************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/editor-store/constants.jsx ***!
  \**************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   STORE_NAME: () => (/* binding */ STORE_NAME)
/* harmony export */ });
var STORE_NAME = 'publishpress-future/workflow-editor';

/***/ },

/***/ "./assets/jsx/workflow-editor/components/editor-store/index.jsx"
/*!**********************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/editor-store/index.jsx ***!
  \**********************************************************************/
(__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 export */   store: () => (/* binding */ store),
/* harmony export */   storeConfig: () => (/* binding */ storeConfig)
/* harmony export */ });
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../constants */ "./assets/jsx/workflow-editor/constants.jsx");
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./constants */ "./assets/jsx/workflow-editor/components/editor-store/constants.jsx");
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
/*
 * WordPress dependencies
 */


/*
 * Internal dependencies
 */


var isPro = futureWorkflowEditor.isPro || false;
var storeConfig = {
  activeFeatures: [],
  currentInserterTab: _constants__WEBPACK_IMPORTED_MODULE_1__.INSERTER_TAB_TRIGGERS,
  triggerCategories: [],
  triggerNodes: [],
  actionCategories: [],
  actionNodes: [],
  advancedCategories: [],
  advancedNodes: [],
  activeSidebarName: null,
  hoveredItem: null,
  panelBodyStates: {},
  isPro: isPro,
  currentConditionalQuery: null
};
var store = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.createReduxStore)(_constants__WEBPACK_IMPORTED_MODULE_2__.STORE_NAME, {
  reducer: function reducer() {
    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : storeConfig;
    var action = arguments.length > 1 ? arguments[1] : undefined;
    var newActiveSidebarName;
    switch (action.type) {
      case "SET_ACTIVE_FEATURES":
        // Update local storage for persisted features
        action.payload.forEach(function (feature) {
          if (persistentFeatures.includes(feature)) {
            setPersistedFeatureValue(feature, true);
          }
        });

        // Close the sidebar when the inserter is enabled
        newActiveSidebarName = action.payload.includes(_constants__WEBPACK_IMPORTED_MODULE_1__.FEATURE_INSERTER) ? null : state.activeSidebarName;
        if (newActiveSidebarName === null) {
          (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.dispatch)("core/interface").disableComplementaryArea(_constants__WEBPACK_IMPORTED_MODULE_1__.SLOT_SCOPE_WORKFLOW_EDITOR);
        }
        return _objectSpread(_objectSpread({}, state), {}, {
          activeFeatures: action.payload,
          activeSidebarName: newActiveSidebarName
        });
      case "TOGGLE_FEATURE":
        var feature = action.payload;
        var activeFeatures = _toConsumableArray(state.activeFeatures);
        if (activeFeatures.includes(feature)) {
          activeFeatures = activeFeatures.filter(function (f) {
            return f !== feature;
          });
        } else {
          activeFeatures.push(feature);
        }

        // Update local storage for persisted features
        persistentFeatures.forEach(function (feature) {
          if (activeFeatures.includes(feature)) {
            setPersistedFeatureValue(feature, true);
          } else {
            setPersistedFeatureValue(feature, false);
          }
        });

        // Close the sidebar when the inserter is enabled
        newActiveSidebarName = activeFeatures.includes(_constants__WEBPACK_IMPORTED_MODULE_1__.FEATURE_INSERTER) ? null : state.activeSidebarName;
        if (newActiveSidebarName === null) {
          (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.dispatch)("core/interface").disableComplementaryArea(_constants__WEBPACK_IMPORTED_MODULE_1__.SLOT_SCOPE_WORKFLOW_EDITOR);
        }
        return _objectSpread(_objectSpread({}, state), {}, {
          activeFeatures: activeFeatures,
          activeSidebarName: newActiveSidebarName
        });
      case "ENABLE_FEATURE":
        var featureToEnable = action.payload;

        // Update local storage for persisted features
        if (persistentFeatures.includes(featureToEnable)) {
          setPersistedFeatureValue(featureToEnable, true);
        }
        var newActiveFeatures = [].concat(_toConsumableArray(state.activeFeatures), [featureToEnable]);

        // Close the sidebar when the inserter is enabled
        newActiveSidebarName = newActiveFeatures.includes(_constants__WEBPACK_IMPORTED_MODULE_1__.FEATURE_INSERTER) ? null : state.activeSidebarName;
        if (newActiveSidebarName === null) {
          (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.dispatch)("core/interface").disableComplementaryArea(_constants__WEBPACK_IMPORTED_MODULE_1__.SLOT_SCOPE_WORKFLOW_EDITOR);
        }
        return _objectSpread(_objectSpread({}, state), {}, {
          activeFeatures: newActiveFeatures,
          activeSidebarName: newActiveSidebarName
        });
      case "DISABLE_FEATURE":
        var featureToDisable = action.payload;

        // Update local storage for persisted features
        if (persistentFeatures.includes(featureToDisable)) {
          setPersistedFeatureValue(featureToDisable, false);
        }
        return _objectSpread(_objectSpread({}, state), {}, {
          activeFeatures: state.activeFeatures.filter(function (f) {
            return f !== featureToDisable;
          })
        });
      case "SET_CURRENT_INSERTER_TAB":
        return _objectSpread(_objectSpread({}, state), {}, {
          currentInserterTab: action.payload
        });
      case "SET_TRIGGER_CATEGORIES":
        return _objectSpread(_objectSpread({}, state), {}, {
          triggerCategories: action.payload
        });
      case "SET_TRIGGER_NODES":
        return _objectSpread(_objectSpread({}, state), {}, {
          triggerNodes: action.payload
        });
      case "SET_ACTION_CATEGORIES":
        return _objectSpread(_objectSpread({}, state), {}, {
          actionCategories: action.payload
        });
      case "SET_ACTION_NODES":
        return _objectSpread(_objectSpread({}, state), {}, {
          actionNodes: action.payload
        });
      case "SET_ADVANCED_CATEGORIES":
        return _objectSpread(_objectSpread({}, state), {}, {
          advancedCategories: action.payload
        });
      case "SET_ADVANCED_NODES":
        return _objectSpread(_objectSpread({}, state), {}, {
          advancedNodes: action.payload
        });
      case "CLOSE_GENERAL_SIDEBAR":
        return _objectSpread(_objectSpread({}, state), {}, {
          activeSidebarName: null
        });
      case "OPEN_GENERAL_SIDEBAR":
        return _objectSpread(_objectSpread({}, state), {}, {
          activeSidebarName: action.payload,
          // Close the inserter when opening a sidebar
          activeFeatures: state.activeFeatures.filter(function (f) {
            return f !== _constants__WEBPACK_IMPORTED_MODULE_1__.FEATURE_INSERTER;
          })
        });
      case "SET_HOVERED_ITEM":
        return _objectSpread(_objectSpread({}, state), {}, {
          hoveredItem: action.payload
        });
      case "SET_PANEL_BODY_STATE":
        var newState = _objectSpread(_objectSpread({}, state), {}, {
          panelBodyStates: _objectSpread(_objectSpread({}, state.panelBodyStates), {}, _defineProperty({}, action.payload.panel, action.payload.state))
        });
        setPersistedPanelBodyState(action.payload.panel, action.payload.state);
        return newState;
      case "SET_CURRENT_CONDITIONAL_QUERY":
        return _objectSpread(_objectSpread({}, state), {}, {
          currentConditionalQuery: action.payload
        });
    }
    return state;
  },
  actions: {
    setActiveFeatures: function setActiveFeatures(activeFeatures) {
      return {
        type: "SET_ACTIVE_FEATURES",
        payload: activeFeatures
      };
    },
    toggleFeature: function toggleFeature(feature) {
      return {
        type: "TOGGLE_FEATURE",
        payload: feature
      };
    },
    disableFeature: function disableFeature(feature) {
      return {
        type: "DISABLE_FEATURE",
        payload: feature
      };
    },
    enableFeature: function enableFeature(feature) {
      return {
        type: "ENABLE_FEATURE",
        payload: feature
      };
    },
    setCurrentInserterTab: function setCurrentInserterTab(tab) {
      return {
        type: "SET_CURRENT_INSERTER_TAB",
        payload: tab
      };
    },
    setTriggerCategories: function setTriggerCategories(categories) {
      return {
        type: "SET_TRIGGER_CATEGORIES",
        payload: categories
      };
    },
    setTriggerNodes: function setTriggerNodes(nodes) {
      return {
        type: "SET_TRIGGER_NODES",
        payload: nodes
      };
    },
    setActionCategories: function setActionCategories(categories) {
      return {
        type: "SET_ACTION_CATEGORIES",
        payload: categories
      };
    },
    setActionNodes: function setActionNodes(nodes) {
      return {
        type: "SET_ACTION_NODES",
        payload: nodes
      };
    },
    setAdvancedCategories: function setAdvancedCategories(categories) {
      return {
        type: "SET_ADVANCED_CATEGORIES",
        payload: categories
      };
    },
    setAdvancedNodes: function setAdvancedNodes(nodes) {
      return {
        type: "SET_ADVANCED_NODES",
        payload: nodes
      };
    },
    closeGeneralSidebar: function closeGeneralSidebar() {
      (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.dispatch)("core/interface").disableComplementaryArea(_constants__WEBPACK_IMPORTED_MODULE_1__.SLOT_SCOPE_WORKFLOW_EDITOR);
      return {
        type: "CLOSE_GENERAL_SIDEBAR",
        payload: null
      };
    },
    openGeneralSidebar: function openGeneralSidebar(sidebar) {
      (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.dispatch)("core/interface").enableComplementaryArea(_constants__WEBPACK_IMPORTED_MODULE_1__.SLOT_SCOPE_WORKFLOW_EDITOR, sidebar);
      return {
        type: "OPEN_GENERAL_SIDEBAR",
        payload: sidebar
      };
    },
    openInserter: function openInserter() {
      return {
        type: "ENABLE_FEATURE",
        payload: _constants__WEBPACK_IMPORTED_MODULE_1__.FEATURE_INSERTER
      };
    },
    closeInserter: function closeInserter() {
      return {
        type: "DISABLE_FEATURE",
        payload: _constants__WEBPACK_IMPORTED_MODULE_1__.FEATURE_INSERTER
      };
    },
    setHoveredItem: function setHoveredItem(item) {
      return {
        type: "SET_HOVERED_ITEM",
        payload: item
      };
    },
    setPanelBodyState: function setPanelBodyState(panel, state) {
      return {
        type: "SET_PANEL_BODY_STATE",
        payload: {
          panel: panel,
          state: state
        }
      };
    },
    setCurrentConditionalQuery: function setCurrentConditionalQuery(query) {
      return {
        type: "SET_CURRENT_CONDITIONAL_QUERY",
        payload: query
      };
    }
  },
  selectors: {
    getActiveFeatures: function getActiveFeatures(state) {
      return state.activeFeatures;
    },
    isFeatureActive: function isFeatureActive(state, feature) {
      return state.activeFeatures.includes(feature);
    },
    getCurrentInserterTab: function getCurrentInserterTab(state) {
      return state.currentInserterTab;
    },
    getTriggerCategories: function getTriggerCategories(state) {
      return state.triggerCategories;
    },
    getTriggerNodes: function getTriggerNodes(state) {
      return state.triggerNodes;
    },
    getActionCategories: function getActionCategories(state) {
      return state.actionCategories;
    },
    getActionNodes: function getActionNodes(state) {
      return state.actionNodes;
    },
    getAdvancedCategories: function getAdvancedCategories(state) {
      return state.advancedCategories;
    },
    getAdvancedNodes: function getAdvancedNodes(state) {
      return state.advancedNodes;
    },
    getHoveredItem: function getHoveredItem(state) {
      return state.hoveredItem;
    },
    getPanelBodyState: function getPanelBodyState(state, panel) {
      return state.panelBodyStates[panel];
    },
    getAllNodes: function getAllNodes(state) {
      return state.triggerNodes.concat(state.actionNodes, state.advancedNodes);
    },
    getNodeTypeByName: function getNodeTypeByName(state, nodeName) {
      var allNodes = state.triggerNodes.concat(state.actionNodes, state.advancedNodes);
      return allNodes.find(function (n) {
        return n.name === nodeName;
      }) || {};
    },
    isRayDebugInstalled: function isRayDebugInstalled(state) {
      return state.advancedNodes.some(function (node) {
        return node.name === "advanced/ray.debug";
      });
    },
    isPro: function isPro(state) {
      return state.isPro;
    },
    getCurrentConditionalQuery: function getCurrentConditionalQuery(state) {
      return state.currentConditionalQuery;
    }
  }
});
(0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.register)(store);

// Persisted editor features
var LOCAL_SETTINGS_KEY = "FUTURE_PRO_WORKFLOW_PREFERENCES_" + futureWorkflowEditor.currentUserId;
var persistentFeatures = [_constants__WEBPACK_IMPORTED_MODULE_1__.FEATURE_FULLSCREEN_MODE, _constants__WEBPACK_IMPORTED_MODULE_1__.FEATURE_DEVELOPER_MODE, _constants__WEBPACK_IMPORTED_MODULE_1__.FEATURE_WELCOME_GUIDE, _constants__WEBPACK_IMPORTED_MODULE_1__.FEATURE_ADVANCED_SETTINGS, _constants__WEBPACK_IMPORTED_MODULE_1__.FEATURE_MINI_MAP, _constants__WEBPACK_IMPORTED_MODULE_1__.FEATURE_CONTROLS];
var initLocalPreferences = function initLocalPreferences() {
  var localSettings = localStorage.getItem(LOCAL_SETTINGS_KEY);
  if (localSettings === null) {
    localStorage.setItem(LOCAL_SETTINGS_KEY, JSON.stringify({
      persistentFeatures: {},
      panelBodyStates: {}
    }));
  }
};
initLocalPreferences();
var getLocalPreferences = function getLocalPreferences() {
  return JSON.parse(localStorage.getItem(LOCAL_SETTINGS_KEY));
};
var setLocalPreferences = function setLocalPreferences(settings) {
  localStorage.setItem(LOCAL_SETTINGS_KEY, JSON.stringify(settings));
};
var getPersistedFeatureValue = function getPersistedFeatureValue(feature) {
  var _localSettings$persis;
  var localSettings = getLocalPreferences();
  return (_localSettings$persis = localSettings.persistentFeatures) === null || _localSettings$persis === void 0 ? void 0 : _localSettings$persis[feature];
};
var setPersistedFeatureValue = function setPersistedFeatureValue(feature, value) {
  var localSettings = getLocalPreferences();
  if (!localSettings.persistentFeatures) {
    localSettings.persistentFeatures = {};
  }
  localSettings.persistentFeatures[feature] = value;
  setLocalPreferences(localSettings);
};
var getPersistedPanelBodyState = function getPersistedPanelBodyState() {
  var localSettings = getLocalPreferences();
  return localSettings.panelBodyStates || {};
};
var setPersistedPanelBodyState = function setPersistedPanelBodyState(panel, state) {
  var localSettings = getLocalPreferences();
  if (!localSettings.panelBodyStates) {
    localSettings.panelBodyStates = {};
  }
  localSettings.panelBodyStates[panel] = state;
  setLocalPreferences(localSettings);
};

// Enable fullscreen mode by default
var isFullscreenModeEnabled = getPersistedFeatureValue(_constants__WEBPACK_IMPORTED_MODULE_1__.FEATURE_FULLSCREEN_MODE);
if (isFullscreenModeEnabled === null || isFullscreenModeEnabled === undefined) {
  setPersistedFeatureValue(_constants__WEBPACK_IMPORTED_MODULE_1__.FEATURE_FULLSCREEN_MODE, true);
}

// Enable the welcome guide by default
var isWelcomeGuideEnabled = getPersistedFeatureValue(_constants__WEBPACK_IMPORTED_MODULE_1__.FEATURE_WELCOME_GUIDE);
if (isWelcomeGuideEnabled === null || isWelcomeGuideEnabled === undefined) {
  setPersistedFeatureValue(_constants__WEBPACK_IMPORTED_MODULE_1__.FEATURE_WELCOME_GUIDE, true);
}

// Enable controls by default
var isControlsFeatureEnabled = getPersistedFeatureValue(_constants__WEBPACK_IMPORTED_MODULE_1__.FEATURE_CONTROLS);
if (isControlsFeatureEnabled === null || isControlsFeatureEnabled === undefined) {
  setPersistedFeatureValue(_constants__WEBPACK_IMPORTED_MODULE_1__.FEATURE_CONTROLS, true);
}

// Update the store with the persisted features
persistentFeatures.forEach(function (feature) {
  if (getPersistedFeatureValue(feature)) {
    (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.dispatch)(store).enableFeature(feature);
  } else {
    (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.dispatch)(store).disableFeature(feature);
  }
});

// Update the store with the persisted panel body states
var panelBodyStates = getPersistedPanelBodyState();
if (panelBodyStates) {
  Object.keys(panelBodyStates).forEach(function (panel) {
    (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.dispatch)(store).setPanelBodyState(panel, panelBodyStates[panel]);
  });
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (store);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/flow-editor/auto-layout/constants.jsx"
/*!*************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/flow-editor/auto-layout/constants.jsx ***!
  \*************************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   AUTO_LAYOUT_DEFAULT_DIRECTION: () => (/* binding */ AUTO_LAYOUT_DEFAULT_DIRECTION),
/* harmony export */   AUTO_LAYOUT_DIRECTION_DOWN: () => (/* binding */ AUTO_LAYOUT_DIRECTION_DOWN),
/* harmony export */   AUTO_LAYOUT_DIRECTION_LEFT: () => (/* binding */ AUTO_LAYOUT_DIRECTION_LEFT),
/* harmony export */   AUTO_LAYOUT_DIRECTION_RIGHT: () => (/* binding */ AUTO_LAYOUT_DIRECTION_RIGHT),
/* harmony export */   AUTO_LAYOUT_DIRECTION_UP: () => (/* binding */ AUTO_LAYOUT_DIRECTION_UP),
/* harmony export */   CUSTOM_EVENT_AUTO_LAYOUT: () => (/* binding */ CUSTOM_EVENT_AUTO_LAYOUT)
/* harmony export */ });
var AUTO_LAYOUT_DIRECTION_RIGHT = 'RIGHT';
var AUTO_LAYOUT_DIRECTION_LEFT = 'LEFT';
var AUTO_LAYOUT_DIRECTION_DOWN = 'DOWN';
var AUTO_LAYOUT_DIRECTION_UP = 'UP';
var AUTO_LAYOUT_DEFAULT_DIRECTION = AUTO_LAYOUT_DIRECTION_DOWN;
var CUSTOM_EVENT_AUTO_LAYOUT = 'publishpress_future_workflow_editor_auto_layout';

/***/ },

/***/ "./assets/jsx/workflow-editor/components/flow-editor/auto-layout/hooks.jsx"
/*!*********************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/flow-editor/auto-layout/hooks.jsx ***!
  \*********************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   useAutoLayout: () => (/* binding */ useAutoLayout)
/* harmony export */ });
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constants */ "./assets/jsx/workflow-editor/components/flow-editor/auto-layout/constants.jsx");

var autoLayout = function autoLayout(_ref) {
  var direction = _ref.direction;
  var customEvent = new CustomEvent(_constants__WEBPACK_IMPORTED_MODULE_0__.CUSTOM_EVENT_AUTO_LAYOUT, {
    detail: {
      direction: direction
    }
  });
  document.dispatchEvent(customEvent);
};
var useAutoLayout = function useAutoLayout() {
  return autoLayout;
};

/***/ },

/***/ "./assets/jsx/workflow-editor/components/flow-editor/auto-layout/index.jsx"
/*!*********************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/flow-editor/auto-layout/index.jsx ***!
  \*********************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   AutoLayout: () => (/* binding */ AutoLayout),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constants */ "./assets/jsx/workflow-editor/components/flow-editor/auto-layout/constants.jsx");


var AutoLayout = function AutoLayout(_ref) {
  var onLayout = _ref.onLayout;
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
    var handleAutoLayout = function handleAutoLayout(event) {
      var _event$detail;
      var direction = ((_event$detail = event.detail) === null || _event$detail === void 0 ? void 0 : _event$detail.direction) || _constants__WEBPACK_IMPORTED_MODULE_1__.AUTO_LAYOUT_DEFAULT_DIRECTION;
      onLayout({
        direction: direction
      });
    };
    document.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_1__.CUSTOM_EVENT_AUTO_LAYOUT, handleAutoLayout);
    return function () {
      document.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_1__.CUSTOM_EVENT_AUTO_LAYOUT, handleAutoLayout);
    };
  }, [onLayout]);
  return null;
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AutoLayout);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/flow-editor/index.jsx"
/*!*********************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/flow-editor/index.jsx ***!
  \*********************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   FlowEditor: () => (/* binding */ FlowEditor),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _workflow_store__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../workflow-store */ "./assets/jsx/workflow-editor/components/workflow-store/index.jsx");
/* harmony import */ var _editor_store__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../editor-store */ "./assets/jsx/workflow-editor/components/editor-store/index.jsx");
/* harmony import */ var reactflow__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! reactflow */ "./node_modules/@reactflow/core/dist/esm/index.mjs");
/* harmony import */ var reactflow__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! reactflow */ "./node_modules/@reactflow/minimap/dist/esm/index.mjs");
/* harmony import */ var reactflow__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! reactflow */ "./node_modules/@reactflow/controls/dist/esm/index.mjs");
/* harmony import */ var reactflow__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! reactflow */ "./node_modules/@reactflow/background/dist/esm/index.mjs");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../constants */ "./assets/jsx/workflow-editor/constants.jsx");
/* harmony import */ var _node_types_generic__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../node-types/generic */ "./assets/jsx/workflow-editor/components/node-types/generic.jsx");
/* harmony import */ var _auto_layout_constants__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./auto-layout/constants */ "./assets/jsx/workflow-editor/components/flow-editor/auto-layout/constants.jsx");
/* harmony import */ var _settings_sidebar_constants__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../settings-sidebar/constants */ "./assets/jsx/workflow-editor/components/settings-sidebar/constants.jsx");
/* harmony import */ var _node_types_trigger__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../node-types/trigger */ "./assets/jsx/workflow-editor/components/node-types/trigger.jsx");
/* harmony import */ var _node_validator__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../node-validator */ "./assets/jsx/workflow-editor/components/node-validator/index.jsx");
/* harmony import */ var _edge_types__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../edge-types */ "./assets/jsx/workflow-editor/components/edge-types/index.jsx");
/* harmony import */ var _node_types_trigger_placeholder__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../node-types/trigger-placeholder */ "./assets/jsx/workflow-editor/components/node-types/trigger-placeholder.jsx");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../utils */ "./assets/jsx/workflow-editor/utils.jsx");
/* harmony import */ var _node_types_node_placeholder__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../node-types/node-placeholder */ "./assets/jsx/workflow-editor/components/node-types/node-placeholder.jsx");
/* harmony import */ var _auto_layout__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./auto-layout */ "./assets/jsx/workflow-editor/components/flow-editor/auto-layout/index.jsx");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_19__);
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }



















var GRID_SIZE = 10;
var FlowEditor = function FlowEditor(props) {
  var _useSelect = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.useSelect)(function (select) {
      var activeComplementaryArea = select("core/interface").getActiveComplementaryArea(_constants__WEBPACK_IMPORTED_MODULE_8__.SLOT_SCOPE_WORKFLOW_EDITOR);
      return {
        nodes: select(_workflow_store__WEBPACK_IMPORTED_MODULE_1__.store).getNodes(),
        edges: select(_workflow_store__WEBPACK_IMPORTED_MODULE_1__.store).getEdges(),
        selectedNodes: select(_workflow_store__WEBPACK_IMPORTED_MODULE_1__.store).getSelectedNodes(),
        selectedEdges: select(_workflow_store__WEBPACK_IMPORTED_MODULE_1__.store).getSelectedEdges(),
        activeComplementaryArea: activeComplementaryArea,
        hasActiveSideBar: activeComplementaryArea !== null && activeComplementaryArea !== "null/undefined",
        initialViewport: select(_workflow_store__WEBPACK_IMPORTED_MODULE_1__.store).getInitialViewport(),
        isMiniMapFeatureActive: select(_editor_store__WEBPACK_IMPORTED_MODULE_2__.store).isFeatureActive(_constants__WEBPACK_IMPORTED_MODULE_8__.FEATURE_MINI_MAP),
        isControlsFeatureActive: select(_editor_store__WEBPACK_IMPORTED_MODULE_2__.store).isFeatureActive(_constants__WEBPACK_IMPORTED_MODULE_8__.FEATURE_CONTROLS),
        isLoadingWorkflow: select(_workflow_store__WEBPACK_IMPORTED_MODULE_1__.store).isLoadingWorkflow(),
        isConnectingNodes: select(_workflow_store__WEBPACK_IMPORTED_MODULE_1__.store).isConnectingNodes(),
        getNodeTypeByName: select(_editor_store__WEBPACK_IMPORTED_MODULE_2__.store).getNodeTypeByName,
        globalVariables: select(_workflow_store__WEBPACK_IMPORTED_MODULE_1__.store).getGlobalVariables()
      };
    }),
    nodes = _useSelect.nodes,
    edges = _useSelect.edges,
    selectedNodes = _useSelect.selectedNodes,
    selectedEdges = _useSelect.selectedEdges,
    hasActiveSideBar = _useSelect.hasActiveSideBar,
    activeComplementaryArea = _useSelect.activeComplementaryArea,
    initialViewport = _useSelect.initialViewport,
    isMiniMapFeatureActive = _useSelect.isMiniMapFeatureActive,
    isControlsFeatureActive = _useSelect.isControlsFeatureActive,
    isLoadingWorkflow = _useSelect.isLoadingWorkflow,
    isConnectingNodes = _useSelect.isConnectingNodes,
    getNodeTypeByName = _useSelect.getNodeTypeByName,
    globalVariables = _useSelect.globalVariables;
  var _useDispatch = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.useDispatch)(_workflow_store__WEBPACK_IMPORTED_MODULE_1__.store),
    setNodes = _useDispatch.setNodes,
    setEdges = _useDispatch.setEdges,
    addNode = _useDispatch.addNode,
    setSelectedNodes = _useDispatch.setSelectedNodes,
    setSelectedEdges = _useDispatch.setSelectedEdges,
    removeEdge = _useDispatch.removeEdge,
    setEditedWorkflowAttribute = _useDispatch.setEditedWorkflowAttribute,
    removePlaceholderNodes = _useDispatch.removePlaceholderNodes,
    setDraggingFromHandle = _useDispatch.setDraggingFromHandle,
    setIsConnectingNodes = _useDispatch.setIsConnectingNodes,
    unselectAll = _useDispatch.unselectAll;
  var _useDispatch2 = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.useDispatch)(_editor_store__WEBPACK_IMPORTED_MODULE_2__.store),
    openGeneralSidebar = _useDispatch2.openGeneralSidebar;
  var _useDispatch3 = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.useDispatch)('core/notices'),
    createSuccessNotice = _useDispatch3.createSuccessNotice;
  var reactFlowWrapperRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_7__.useRef)(null);
  var reactFlowInstance = (0,reactflow__WEBPACK_IMPORTED_MODULE_3__.useReactFlow)();
  var _useReactFlow = (0,reactflow__WEBPACK_IMPORTED_MODULE_3__.useReactFlow)(),
    setViewport = _useReactFlow.setViewport;
  var connectingNodeId = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_7__.useRef)(null);
  var proOptions = {
    // TODO: Change this to true after we start supporting the pro version of ReactFlow.
    hideAttribution: false
  };
  var editorStyle = {
    backgroundColor: "#ffffff"
  };
  var nodeTypes = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_7__.useMemo)(function () {
    return {
      generic: _node_types_generic__WEBPACK_IMPORTED_MODULE_9__["default"],
      trigger: _node_types_trigger__WEBPACK_IMPORTED_MODULE_12__["default"],
      triggerPlaceholder: _node_types_trigger_placeholder__WEBPACK_IMPORTED_MODULE_15__.TriggerPlaceholder,
      nodePlaceholder: _node_types_node_placeholder__WEBPACK_IMPORTED_MODULE_17__["default"]
    };
  }, []);
  var edgeTypes = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_7__.useMemo)(function () {
    return {
      genericEdge: _edge_types__WEBPACK_IMPORTED_MODULE_14__.GenericEdge
    };
  }, []);

  /**
   * This is used to update the edges that are connected to the node
   * when the handles count changes. This is required to avoid the
   * edges "connected" to the node or handle that do not exist anymore.
   */
  var handleHandlesCountChanged = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_7__.useCallback)(function (event) {
    // Update all the edges that are connected to the node.
    var _event$detail = event.detail,
      nodeId = _event$detail.nodeId,
      handles = _event$detail.handles;
    var availableHandlesIds = handles.map(function (handle) {
      return handle.id;
    });
    var allEdges = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.select)(_workflow_store__WEBPACK_IMPORTED_MODULE_1__.store).getEdges();

    // Get all the edges that are connected to the node at the source handle.
    var edgesToUpdate = allEdges.filter(function (edge) {
      return edge.source === nodeId && !availableHandlesIds.includes(edge.sourceHandle);
    });

    // Remove the edges from the hidden handles.
    edgesToUpdate.forEach(function (edge) {
      removeEdge(edge.id);
      setSelectedNodes([nodeId]);
    });
  }, []);
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_7__.useEffect)(function () {
    document.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_8__.CUSTOM_EVENT_HANDLES_COUNT_CHANGED, handleHandlesCountChanged);
    return function () {
      document.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_8__.CUSTOM_EVENT_HANDLES_COUNT_CHANGED, handleHandlesCountChanged);
    };
  }, []);
  var updateFlowInEditedWorkflow = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_7__.useCallback)(function () {
    // We need to delay the update of the flow to avoid missing the changes.
    setTimeout(function () {
      setEditedWorkflowAttribute("flow", reactFlowInstance.toObject());
    }, 400);
  }, [reactFlowInstance]);
  (0,reactflow__WEBPACK_IMPORTED_MODULE_3__.useOnViewportChange)({
    onEnd: function onEnd() {
      updateFlowInEditedWorkflow();
    }
  });
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_7__.useEffect)(function () {
    if (initialViewport) {
      setViewport(initialViewport);
    }
  }, [initialViewport]);
  var onNodesChange = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_7__.useCallback)(function (changes) {
    // TODO: Try to use the changes for handling the undo/redo state.
    setNodes((0,reactflow__WEBPACK_IMPORTED_MODULE_3__.applyNodeChanges)(changes, nodes));
    changes.forEach(function (change) {
      var item = (0,_utils__WEBPACK_IMPORTED_MODULE_16__.getNodeById)(change.id, nodes);
      if (!item) {
        return;
      }
      setDefaultNodeSettings(item);
    });
    updateFlowInEditedWorkflow();
  }, [nodes]);
  var onEdgesChange = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_7__.useCallback)(function (changes) {
    // TODO: Try to use the changes for handling the undo/redo state.
    setEdges((0,reactflow__WEBPACK_IMPORTED_MODULE_3__.applyEdgeChanges)(changes, edges));
    updateFlowInEditedWorkflow();
  }, [edges]);
  var onEdgeUpdate = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_7__.useCallback)(function (oldEdge, newConnection) {
    setEdges((0,reactflow__WEBPACK_IMPORTED_MODULE_3__.updateEdge)(oldEdge, newConnection, edges));
    updateFlowInEditedWorkflow();
  }, [edges]);
  var onConnect = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_7__.useCallback)(function (params) {
    // Prevents the user from connecting a node to itself.
    if (params.source === params.target) {
      return;
    }
    params = _objectSpread(_objectSpread({}, params), {}, {
      type: 'genericEdge',
      id: "".concat(params.source, "-").concat(params.sourceHandle, "-").concat(params.target, "-").concat(params.targetHandle),
      markerEnd: {
        type: reactflow__WEBPACK_IMPORTED_MODULE_3__.MarkerType.ArrowClosed
      }
    });
    setEdges((0,reactflow__WEBPACK_IMPORTED_MODULE_3__.addEdge)(params, edges));
    setDefaultNodeSettings(params.target);
    updateFlowInEditedWorkflow();
  }, [edges, nodes, setDefaultNodeSettings, updateFlowInEditedWorkflow, setEdges, reactflow__WEBPACK_IMPORTED_MODULE_3__.addEdge]);

  // This is used to create a new node when the user connects a node to the pane.
  var onConnectStart = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_7__.useCallback)(function (event, _ref) {
    var nodeId = _ref.nodeId,
      handleId = _ref.handleId,
      handleType = _ref.handleType;
    connectingNodeId.current = nodeId;
    setDraggingFromHandle({
      sourceId: nodeId,
      handleId: handleId,
      handleType: handleType
    });
  }, []);

  // This is used to create a new node when the user connects a node to the pane.
  var onConnectEnd = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_7__.useCallback)(function (event) {
    event.stopPropagation();
    if (!connectingNodeId.current) {
      return;
    }
    var targetIsPane = event.target.classList.contains("react-flow__pane");
    if (targetIsPane && !isConnectingNodes) {
      var width = event.target.offsetWidth;

      // Convert the screen element size to the flow position.
      var offset = reactFlowInstance.screenToFlowPosition({
        x: width / 2,
        y: 0
      });
      var position = reactFlowInstance.screenToFlowPosition({
        x: event.clientX - offset.x,
        y: event.clientY
      });
      var item = {
        id: (0,_utils__WEBPACK_IMPORTED_MODULE_16__.getId)(),
        type: 'nodePlaceholder',
        data: {
          name: 'core/node-placeholder',
          elementaryType: _constants__WEBPACK_IMPORTED_MODULE_8__.NODE_TYPE_PLACEHOLDER
        },
        position: position
      };
      addNode(item);
      setDefaultNodeSettings(item);
    }
    setIsConnectingNodes(false);
  }, [reactFlowInstance.screenToFlowPosition, isConnectingNodes, addNode]);
  var isValidConnection = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_7__.useCallback)(function (connection) {
    setIsConnectingNodes(true);
    return true;
  }, []);
  var onDragOver = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_7__.useCallback)(function (event) {
    event.preventDefault();
    event.dataTransfer.dropEffect = "move";
  }, []);
  var onDrop = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_7__.useCallback)(function (event) {
    event.preventDefault();
    var position = reactFlowInstance.screenToFlowPosition({
      x: event.clientX,
      y: event.clientY
    });
    var dataTransferItem = event.dataTransfer.getData(_constants__WEBPACK_IMPORTED_MODULE_8__.EVENT_DROP_NODE);
    var item = JSON.parse(dataTransferItem);
    (0,_utils__WEBPACK_IMPORTED_MODULE_16__.createNewNode)({
      item: item,
      position: position,
      reactFlowInstance: reactFlowInstance
    });
    setDefaultNodeSettings(item);
    removePlaceholderNodes();
  }, [reactFlowInstance, nodes]);
  var setDefaultNodeSettings = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_7__.useCallback)(function (item) {
    if (typeof item === 'string') {
      var itemId = item;
      item = (0,_utils__WEBPACK_IMPORTED_MODULE_16__.getNodeById)(itemId, nodes);
      if (!item) {
        return;
      }
    }
    if (!item.data) {
      return;
    }
    var nodeType = getNodeTypeByName(item.data.name);
    if (!nodeType) {
      return;
    }
    var settingsSchema = nodeType.settingsSchema;
    if (!settingsSchema) {
      return;
    }
    var variables = (0,_utils__WEBPACK_IMPORTED_MODULE_16__.getNodeVariablesTree)(item, globalVariables);
    settingsSchema.forEach(function (schema) {
      schema === null || schema === void 0 || schema.fields.forEach(function (field) {
        if (!field.default) {
          return;
        }
        if (_typeof(field.default) !== 'object') {
          return;
        }
        Object.keys(field.default).forEach(function (key) {
          var defaultItem = field.default[key];
          if (!defaultItem.rule) {
            return;
          }
          if (defaultItem.rule === 'first') {
            if (!Array.isArray(defaultItem.dataType)) {
              defaultItem.dataType = [defaultItem.dataType];
            }
            var filteredVariables = (0,_utils__WEBPACK_IMPORTED_MODULE_16__.filterVariablesTreeByDataType)(variables, defaultItem.dataType);
            if (filteredVariables.length === 0) {
              return;
            }
            item.data.settings[field.name][key] = filteredVariables[0].id;
          }
        });
      });
    });
  }, [nodes, getNodeTypeByName, globalVariables]);
  var onNodesDelete = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_7__.useCallback)(function () {
    unselectAll();
    updateFlowInEditedWorkflow();
  });
  var onEdgesDelete = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_7__.useCallback)(function () {
    unselectAll();
    updateFlowInEditedWorkflow();
  });
  var fitView = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_7__.useCallback)(function () {
    reactFlowInstance.fitView();
  }, [reactFlowInstance]);
  (0,reactflow__WEBPACK_IMPORTED_MODULE_3__.useOnSelectionChange)({
    onChange: function onChange(_ref2) {
      var nodes = _ref2.nodes,
        edges = _ref2.edges;
      // Avoid selecting the placeholder node.
      if (nodes.length > 0 && nodes[0].type === 'triggerPlaceholder') {
        setSelectedNodes([]);
        setSelectedEdges([]);
        return;
      }
      setSelectedNodes(nodes.map(function (node) {
        return node.id;
      }));
      setSelectedEdges(edges.map(function (edge) {
        return edge.id;
      }));
      if (!hasActiveSideBar) {
        return;
      }
      if (nodes.length === 0 && edges.length === 0) {
        openGeneralSidebar(_settings_sidebar_constants__WEBPACK_IMPORTED_MODULE_11__.SIDEBAR_WORKFLOW);
      }
      if (nodes.length > 0 || edges.length > 0) {
        openGeneralSidebar(_settings_sidebar_constants__WEBPACK_IMPORTED_MODULE_11__.SIDEBAR_NODE_EDGE);
      }
    }
  });
  var onAutoLayout = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_7__.useCallback)(function () {
    createSuccessNotice((0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_19__.__)('Applying auto layout.', 'post-expirator'), {
      isDismissible: true,
      type: 'snackbar'
    });
    Promise.all(/*! import() */[__webpack_require__.e("vendors-node_modules_elkjs_lib_main_js"), __webpack_require__.e("assets_jsx_workflow-editor_components_flow-editor_auto-layout_elk_jsx")]).then(__webpack_require__.bind(__webpack_require__, /*! ./auto-layout/elk */ "./assets/jsx/workflow-editor/components/flow-editor/auto-layout/elk.jsx")).then(function (_ref3) {
      var useLayoutedElements = _ref3.useLayoutedElements;
      var applyLayout = useLayoutedElements({
        nodes: nodes,
        edges: edges,
        onLayout: function onLayout(layoutedNodes, layoutedEdges) {
          setNodes(layoutedNodes);
          setEdges(layoutedEdges);
        },
        onAnimationFrame: function onAnimationFrame() {
          fitView();
          updateFlowInEditedWorkflow();
        }
      });
      applyLayout({
        direction: _auto_layout_constants__WEBPACK_IMPORTED_MODULE_10__.AUTO_LAYOUT_DEFAULT_DIRECTION
      });
      createSuccessNotice((0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_19__.__)('Auto layout applied.', 'post-expirator'), {
        isDismissible: true,
        type: 'snackbar'
      });
    });
  }, [nodes, edges, fitView, updateFlowInEditedWorkflow]);
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_7__.useEffect)(function () {
    var sidebarIsActiveByDefault = _wordpress_element__WEBPACK_IMPORTED_MODULE_7__.Platform.select({
      web: true,
      native: false
    });
    if (sidebarIsActiveByDefault) {
      openGeneralSidebar(_settings_sidebar_constants__WEBPACK_IMPORTED_MODULE_11__.SIDEBAR_WORKFLOW);
    }
  }, []);

  // Fix the behavior when the sidebar is closed and opened again, making sure a sidebar is loaded.
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_7__.useEffect)(function () {
    if (activeComplementaryArea === "null/undefined") {
      var sidebar = selectedNodes.length > 0 || selectedEdges.length > 0 ? _settings_sidebar_constants__WEBPACK_IMPORTED_MODULE_11__.SIDEBAR_NODE_EDGE : _settings_sidebar_constants__WEBPACK_IMPORTED_MODULE_11__.SIDEBAR_WORKFLOW;
      openGeneralSidebar(sidebar);
    }
  }, [activeComplementaryArea, selectedEdges, selectedNodes]);
  return /*#__PURE__*/React.createElement("div", {
    className: "reactflow-wrapper",
    ref: reactFlowWrapperRef
  }, /*#__PURE__*/React.createElement(_auto_layout__WEBPACK_IMPORTED_MODULE_18__["default"], {
    onLayout: onAutoLayout
  }), !isLoadingWorkflow && /*#__PURE__*/React.createElement(reactflow__WEBPACK_IMPORTED_MODULE_3__.ReactFlow, {
    nodes: nodes,
    edges: edges,
    onNodesChange: onNodesChange,
    onEdgesChange: onEdgesChange,
    onEdgeUpdate: onEdgeUpdate,
    onConnectStart: onConnectStart,
    onConnectEnd: onConnectEnd,
    onConnect: onConnect,
    isValidConnection: isValidConnection,
    onDrop: onDrop,
    onDragOver: onDragOver,
    nodesDraggable: true,
    proOptions: proOptions,
    fitView: fitView,
    style: editorStyle,
    snapToGrid: true,
    snapGrid: [GRID_SIZE, GRID_SIZE],
    nodeTypes: nodeTypes,
    edgeTypes: edgeTypes,
    onNodesDelete: onNodesDelete,
    onEdgesDelete: onEdgesDelete,
    connectionLineStyle: {
      stroke: "#c2c2c2",
      strokeWidth: 2,
      strokeDasharray: '3,4'
    }
  }, isMiniMapFeatureActive && /*#__PURE__*/React.createElement(reactflow__WEBPACK_IMPORTED_MODULE_4__.MiniMap, {
    pannable: true,
    zoomable: true,
    nodeColor: function nodeColor(node) {
      if (node.type === "generic") return "#FFCC00";
    }
  }), isControlsFeatureActive && /*#__PURE__*/React.createElement(reactflow__WEBPACK_IMPORTED_MODULE_5__.Controls, null), /*#__PURE__*/React.createElement(reactflow__WEBPACK_IMPORTED_MODULE_6__.Background, {
    variant: "dots",
    color: "#ccc",
    gap: GRID_SIZE
  })), /*#__PURE__*/React.createElement(_node_validator__WEBPACK_IMPORTED_MODULE_13__["default"], null));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (FlowEditor);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/fullscreen-mode-close.jsx"
/*!*************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/fullscreen-mode-close.jsx ***!
  \*************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   FullscreenModeClose: () => (/* binding */ FullscreenModeClose)
/* harmony export */ });
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_url__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/url */ "@wordpress/url");
/* harmony import */ var _wordpress_url__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_url__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/wordpress.js");
/* harmony import */ var _workflow_store__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./workflow-store */ "./assets/jsx/workflow-editor/components/workflow-store/index.jsx");
/* harmony import */ var _editor_store__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./editor-store */ "./assets/jsx/workflow-editor/components/editor-store/index.jsx");
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../constants */ "./assets/jsx/workflow-editor/constants.jsx");








function FullscreenModeClose(_ref) {
  var showTooltip = _ref.showTooltip;
  var _useSelect = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.useSelect)(function (select) {
      var _select = select(_workflow_store__WEBPACK_IMPORTED_MODULE_5__.store),
        getPostType = _select.getPostType;
      var _select2 = select(_editor_store__WEBPACK_IMPORTED_MODULE_6__.store),
        isFeatureActive = _select2.isFeatureActive;
      return {
        isActive: isFeatureActive('fullscreenMode'),
        postType: getPostType()
      };
    }, []),
    isActive = _useSelect.isActive,
    postType = _useSelect.postType;
  if (!isActive || !postType) {
    return null;
  }
  var buttonIcon = /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Icon, {
    size: "36px",
    icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_4__["default"]
  });
  return /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__unstableMotion.div, {
    whileHover: "expand",
    className: "editor-header__back-button"
  }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, {
    className: "edit-post-fullscreen-mode-close",
    href: (0,_wordpress_url__WEBPACK_IMPORTED_MODULE_3__.addQueryArgs)('edit.php', {
      post_type: _constants__WEBPACK_IMPORTED_MODULE_7__.POST_TYPE
    }),
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Back', 'post-expirator'),
    showTooltip: showTooltip
  }, buttonIcon));
}

/***/ },

/***/ "./assets/jsx/workflow-editor/components/icons/action.jsx"
/*!****************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/icons/action.jsx ***!
  \****************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ ActionIcon)
/* harmony export */ });
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base */ "./assets/jsx/workflow-editor/components/icons/base.jsx");


/**
 * Icon VscGithubAction from 'react-icons/vsc'.
 */
function ActionIcon(_ref) {
  var _ref$size = _ref.size,
    size = _ref$size === void 0 ? 24 : _ref$size;
  return /*#__PURE__*/React.createElement(_base__WEBPACK_IMPORTED_MODULE_0__["default"], {
    size: size
  }, /*#__PURE__*/React.createElement("svg", {
    stroke: "currentColor",
    fill: "currentColor",
    strokeWidth: "0",
    viewBox: "0 0 16 16",
    height: "100%",
    width: "100%",
    xmlns: "http://www.w3.org/2000/svg"
  }, /*#__PURE__*/React.createElement("path", {
    fillRule: "evenodd",
    clipRule: "evenodd",
    d: "M3.04 10h2.58l.65 1H2.54l-.5-.5v-9l.5-.5h12l.5.5v4.77l-1-1.75V2h-11v8zm5.54 1l-1.41 3.47h2.2L15 8.7 14.27 7h-1.63l.82-1.46L12.63 4H9.76l-.92.59-2.28 5L7.47 11h1.11zm1.18-6h2.87l-1.87 3h3.51l-5.76 5.84L10.2 10H7.47l2.29-5zM6.95 7H4.04V6H7.4l-.45 1zm-.9 2H4.04V8H6.5l-.45 1z"
  })));
}

/***/ },

/***/ "./assets/jsx/workflow-editor/components/icons/base.jsx"
/*!**************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/icons/base.jsx ***!
  \**************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ BaseIcon)
/* harmony export */ });
function BaseIcon(_ref) {
  var children = _ref.children,
    size = _ref.size;
  return /*#__PURE__*/React.createElement("span", {
    className: "publishpress-icon",
    style: {
      width: "".concat(size, "px"),
      height: "".concat(size, "px"),
      display: 'inline-block'
    }
  }, children);
}

/***/ },

/***/ "./assets/jsx/workflow-editor/components/icons/braces.jsx"
/*!****************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/icons/braces.jsx ***!
  \****************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ BracesIcon)
/* harmony export */ });
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base */ "./assets/jsx/workflow-editor/components/icons/base.jsx");


/**
 * Icon BsBraces from 'react-icons/bs'.
 */
function BracesIcon(_ref) {
  var _ref$size = _ref.size,
    size = _ref$size === void 0 ? 16 : _ref$size;
  return /*#__PURE__*/React.createElement(_base__WEBPACK_IMPORTED_MODULE_0__["default"], {
    size: size
  }, /*#__PURE__*/React.createElement("svg", {
    stroke: "currentColor",
    fill: "currentColor",
    strokeWidth: "0",
    viewBox: "0 0 16 16",
    height: "100%",
    width: "100%",
    xmlns: "http://www.w3.org/2000/svg"
  }, /*#__PURE__*/React.createElement("path", {
    d: "M2.114 8.063V7.9c1.005-.102 1.497-.615 1.497-1.6V4.503c0-1.094.39-1.538 1.354-1.538h.273V2h-.376C3.25 2 2.49 2.759 2.49 4.352v1.524c0 1.094-.376 1.456-1.49 1.456v1.299c1.114 0 1.49.362 1.49 1.456v1.524c0 1.593.759 2.352 2.372 2.352h.376v-.964h-.273c-.964 0-1.354-.444-1.354-1.538V9.663c0-.984-.492-1.497-1.497-1.6M13.886 7.9v.163c-1.005.103-1.497.616-1.497 1.6v1.798c0 1.094-.39 1.538-1.354 1.538h-.273v.964h.376c1.613 0 2.372-.759 2.372-2.352v-1.524c0-1.094.376-1.456 1.49-1.456V7.332c-1.114 0-1.49-.362-1.49-1.456V4.352C13.51 2.759 12.75 2 11.138 2h-.376v.964h.273c.964 0 1.354.444 1.354 1.538V6.3c0 .984.492 1.497 1.497 1.6"
  })));
}

/***/ },

/***/ "./assets/jsx/workflow-editor/components/icons/bug.jsx"
/*!*************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/icons/bug.jsx ***!
  \*************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ BugIcon)
/* harmony export */ });
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base */ "./assets/jsx/workflow-editor/components/icons/base.jsx");


/**
 * Icon FaBug from 'react-icons/fa'.
 */
function BugIcon(_ref) {
  var _ref$size = _ref.size,
    size = _ref$size === void 0 ? 24 : _ref$size;
  return /*#__PURE__*/React.createElement(_base__WEBPACK_IMPORTED_MODULE_0__["default"], {
    size: size
  }, /*#__PURE__*/React.createElement("svg", {
    stroke: "currentColor",
    fill: "currentColor",
    strokeWidth: "0",
    viewBox: "0 0 512 512",
    height: "100%",
    width: "100%",
    xmlns: "http://www.w3.org/2000/svg"
  }, /*#__PURE__*/React.createElement("path", {
    d: "M256 0c53 0 96 43 96 96v3.6c0 15.7-12.7 28.4-28.4 28.4H188.4c-15.7 0-28.4-12.7-28.4-28.4V96c0-53 43-96 96-96zM41.4 105.4c12.5-12.5 32.8-12.5 45.3 0l64 64c.7 .7 1.3 1.4 1.9 2.1c14.2-7.3 30.4-11.4 47.5-11.4H312c17.1 0 33.2 4.1 47.5 11.4c.6-.7 1.2-1.4 1.9-2.1l64-64c12.5-12.5 32.8-12.5 45.3 0s12.5 32.8 0 45.3l-64 64c-.7 .7-1.4 1.3-2.1 1.9c6.2 12 10.1 25.3 11.1 39.5H480c17.7 0 32 14.3 32 32s-14.3 32-32 32H416c0 24.6-5.5 47.8-15.4 68.6c2.2 1.3 4.2 2.9 6 4.8l64 64c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0l-63.1-63.1c-24.5 21.8-55.8 36.2-90.3 39.6V240c0-8.8-7.2-16-16-16s-16 7.2-16 16V479.2c-34.5-3.4-65.8-17.8-90.3-39.6L86.6 502.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l64-64c1.9-1.9 3.9-3.4 6-4.8C101.5 367.8 96 344.6 96 320H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H96.3c1.1-14.1 5-27.5 11.1-39.5c-.7-.6-1.4-1.2-2.1-1.9l-64-64c-12.5-12.5-12.5-32.8 0-45.3z"
  })));
}

/***/ },

/***/ "./assets/jsx/workflow-editor/components/icons/database.jsx"
/*!******************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/icons/database.jsx ***!
  \******************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ DatabaseIcon)
/* harmony export */ });
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base */ "./assets/jsx/workflow-editor/components/icons/base.jsx");


/**
 * Icon ImDatabase from 'react-icons/im'.
 */
function DatabaseIcon(_ref) {
  var _ref$size = _ref.size,
    size = _ref$size === void 0 ? 24 : _ref$size;
  return /*#__PURE__*/React.createElement(_base__WEBPACK_IMPORTED_MODULE_0__["default"], {
    size: size
  }, /*#__PURE__*/React.createElement("svg", {
    stroke: "currentColor",
    fill: "currentColor",
    strokeWidth: "0",
    version: "1.1",
    viewBox: "0 0 16 16",
    height: "100%",
    width: "100%",
    xmlns: "http://www.w3.org/2000/svg"
  }, /*#__PURE__*/React.createElement("path", {
    d: "M8 0c-4.418 0-8 1.119-8 2.5v2c0 1.381 3.582 2.5 8 2.5s8-1.119 8-2.5v-2c0-1.381-3.582-2.5-8-2.5z"
  }), /*#__PURE__*/React.createElement("path", {
    d: "M8 8.5c-4.418 0-8-1.119-8-2.5v3c0 1.381 3.582 2.5 8 2.5s8-1.119 8-2.5v-3c0 1.381-3.582 2.5-8 2.5z"
  }), /*#__PURE__*/React.createElement("path", {
    d: "M8 13c-4.418 0-8-1.119-8-2.5v3c0 1.381 3.582 2.5 8 2.5s8-1.119 8-2.5v-3c0 1.381-3.582 2.5-8 2.5z"
  })));
}

/***/ },

/***/ "./assets/jsx/workflow-editor/components/icons/document-text.jsx"
/*!***********************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/icons/document-text.jsx ***!
  \***********************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ DocumentTextIcon)
/* harmony export */ });
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base */ "./assets/jsx/workflow-editor/components/icons/base.jsx");


/**
 * Icon HiMiniDocumentText from 'react-icons/hi'.
 */
function DocumentTextIcon(_ref) {
  var _ref$size = _ref.size,
    size = _ref$size === void 0 ? 24 : _ref$size;
  return /*#__PURE__*/React.createElement(_base__WEBPACK_IMPORTED_MODULE_0__["default"], {
    size: size
  }, /*#__PURE__*/React.createElement("svg", {
    stroke: "currentColor",
    fill: "currentColor",
    strokeWidth: "0",
    viewBox: "0 0 20 20",
    "aria-hidden": "true",
    height: "100%",
    width: "100%",
    xmlns: "http://www.w3.org/2000/svg"
  }, /*#__PURE__*/React.createElement("path", {
    fillRule: "evenodd",
    d: "M4.5 2A1.5 1.5 0 0 0 3 3.5v13A1.5 1.5 0 0 0 4.5 18h11a1.5 1.5 0 0 0 1.5-1.5V7.621a1.5 1.5 0 0 0-.44-1.06l-4.12-4.122A1.5 1.5 0 0 0 11.378 2H4.5Zm2.25 8.5a.75.75 0 0 0 0 1.5h6.5a.75.75 0 0 0 0-1.5h-6.5Zm0 3a.75.75 0 0 0 0 1.5h6.5a.75.75 0 0 0 0-1.5h-6.5Z",
    clipRule: "evenodd"
  })));
}

/***/ },

/***/ "./assets/jsx/workflow-editor/components/icons/energy.jsx"
/*!****************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/icons/energy.jsx ***!
  \****************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ EnergyIcon)
/* harmony export */ });
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base */ "./assets/jsx/workflow-editor/components/icons/base.jsx");


/**
 * Icon SIEnergy from 'react-icons/si'.
 */
function EnergyIcon(_ref) {
  var _ref$size = _ref.size,
    size = _ref$size === void 0 ? 24 : _ref$size;
  return /*#__PURE__*/React.createElement(_base__WEBPACK_IMPORTED_MODULE_0__["default"], {
    size: size
  }, /*#__PURE__*/React.createElement("svg", {
    stroke: "currentColor",
    fill: "currentColor",
    strokeWidth: "0",
    viewBox: "0 0 24 24",
    height: "100%",
    width: "100%",
    xmlns: "http://www.w3.org/2000/svg"
  }, /*#__PURE__*/React.createElement("polygon", {
    fill: "none",
    strokeWidth: "2",
    points: "4 14 10 14 7 23 9 23 20 9 14 9 18 1 7 1"
  })));
}

/***/ },

/***/ "./assets/jsx/workflow-editor/components/icons/exclamation.jsx"
/*!*********************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/icons/exclamation.jsx ***!
  \*********************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ ExclamationIcon)
/* harmony export */ });
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base */ "./assets/jsx/workflow-editor/components/icons/base.jsx");


/**
 * Icon FaExclamation from 'react-icons/fa'.
 */
function ExclamationIcon(_ref) {
  var _ref$size = _ref.size,
    size = _ref$size === void 0 ? 24 : _ref$size;
  return /*#__PURE__*/React.createElement(_base__WEBPACK_IMPORTED_MODULE_0__["default"], {
    size: size
  }, /*#__PURE__*/React.createElement("svg", {
    stroke: "currentColor",
    fill: "currentColor",
    strokeWidth: "0",
    viewBox: "0 0 192 512",
    height: "100%",
    width: "100%",
    xmlns: "http://www.w3.org/2000/svg"
  }, /*#__PURE__*/React.createElement("path", {
    d: "M176 432c0 44.112-35.888 80-80 80s-80-35.888-80-80 35.888-80 80-80 80 35.888 80 80zM25.26 25.199l13.6 272C39.499 309.972 50.041 320 62.83 320h66.34c12.789 0 23.331-10.028 23.97-22.801l13.6-272C167.425 11.49 156.496 0 142.77 0H49.23C35.504 0 24.575 11.49 25.26 25.199z"
  })));
}

/***/ },

/***/ "./assets/jsx/workflow-editor/components/icons/interactive.jsx"
/*!*********************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/icons/interactive.jsx ***!
  \*********************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ InteractiveIcon)
/* harmony export */ });
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base */ "./assets/jsx/workflow-editor/components/icons/base.jsx");


/**
 * Icon RiQuestionnaireLine from 'react-icons/ri'.
 */
function InteractiveIcon(_ref) {
  var _ref$size = _ref.size,
    size = _ref$size === void 0 ? 24 : _ref$size;
  return /*#__PURE__*/React.createElement(_base__WEBPACK_IMPORTED_MODULE_0__["default"], {
    size: size
  }, /*#__PURE__*/React.createElement("svg", {
    stroke: "currentColor",
    fill: "currentColor",
    strokeWidth: "0",
    viewBox: "0 0 24 24",
    height: "100%",
    width: "100%",
    xmlns: "http://www.w3.org/2000/svg"
  }, /*#__PURE__*/React.createElement("path", {
    d: "M5.76282 17H20V5H4V18.3851L5.76282 17ZM6.45455 19L2 22.5V4C2 3.44772 2.44772 3 3 3H21C21.5523 3 22 3.44772 22 4V18C22 18.5523 21.5523 19 21 19H6.45455ZM11 14H13V16H11V14ZM8.56731 8.81346C8.88637 7.20919 10.302 6 12 6C13.933 6 15.5 7.567 15.5 9.5C15.5 11.433 13.933 13 12 13H11V11H12C12.8284 11 13.5 10.3284 13.5 9.5C13.5 8.67157 12.8284 8 12 8C11.2723 8 10.6656 8.51823 10.5288 9.20577L8.56731 8.81346Z"
  })));
}

/***/ },

/***/ "./assets/jsx/workflow-editor/components/icons/lines-leaning.jsx"
/*!***********************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/icons/lines-leaning.jsx ***!
  \***********************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ LinesLeaningIcon)
/* harmony export */ });
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base */ "./assets/jsx/workflow-editor/components/icons/base.jsx");


/**
 * Icon FaLinesLeaning from 'react-icons/fa'.
 */
function LinesLeaningIcon(_ref) {
  var _ref$size = _ref.size,
    size = _ref$size === void 0 ? 24 : _ref$size;
  return /*#__PURE__*/React.createElement(_base__WEBPACK_IMPORTED_MODULE_0__["default"], {
    size: size
  }, /*#__PURE__*/React.createElement("svg", {
    stroke: "currentColor",
    fill: "currentColor",
    strokeWidth: "0",
    viewBox: "0 0 384 512",
    height: "100%",
    width: "100%",
    xmlns: "http://www.w3.org/2000/svg"
  }, /*#__PURE__*/React.createElement("path", {
    d: "M190.4 74.1c5.6-16.8-3.5-34.9-20.2-40.5s-34.9 3.5-40.5 20.2l-128 384c-5.6 16.8 3.5 34.9 20.2 40.5s34.9-3.5 40.5-20.2l128-384zm70.9-41.7c-17.4-2.9-33.9 8.9-36.8 26.3l-64 384c-2.9 17.4 8.9 33.9 26.3 36.8s33.9-8.9 36.8-26.3l64-384c2.9-17.4-8.9-33.9-26.3-36.8zM352 32c-17.7 0-32 14.3-32 32V448c0 17.7 14.3 32 32 32s32-14.3 32-32V64c0-17.7-14.3-32-32-32z"
  })));
}

/***/ },

/***/ "./assets/jsx/workflow-editor/components/icons/lock.jsx"
/*!**************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/icons/lock.jsx ***!
  \**************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ LockIcon)
/* harmony export */ });
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base */ "./assets/jsx/workflow-editor/components/icons/base.jsx");


/**
 * Icon FaLock from 'react-icons/fa'.
 */
function LockIcon(_ref) {
  var _ref$size = _ref.size,
    size = _ref$size === void 0 ? 24 : _ref$size;
  return /*#__PURE__*/React.createElement(_base__WEBPACK_IMPORTED_MODULE_0__["default"], {
    size: size
  }, /*#__PURE__*/React.createElement("svg", {
    stroke: "currentColor",
    fill: "currentColor",
    strokeWidth: "0",
    viewBox: "0 0 448 512",
    height: "100%",
    width: "100%",
    xmlns: "http://www.w3.org/2000/svg"
  }, /*#__PURE__*/React.createElement("path", {
    d: "M400 224h-24v-72C376 68.2 307.8 0 224 0S72 68.2 72 152v72H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48zm-104 0H152v-72c0-39.7 32.3-72 72-72s72 32.3 72 72v72z"
  })));
}

/***/ },

/***/ "./assets/jsx/workflow-editor/components/icons/mail.jsx"
/*!**************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/icons/mail.jsx ***!
  \**************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ MailIcon)
/* harmony export */ });
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base */ "./assets/jsx/workflow-editor/components/icons/base.jsx");


/**
 * Icon IoMdMail from 'react-icons/io'.
 */
function MailIcon(_ref) {
  var _ref$size = _ref.size,
    size = _ref$size === void 0 ? 24 : _ref$size;
  return /*#__PURE__*/React.createElement(_base__WEBPACK_IMPORTED_MODULE_0__["default"], {
    size: size
  }, /*#__PURE__*/React.createElement("svg", {
    stroke: "currentColor",
    fill: "currentColor",
    strokeWidth: "0",
    viewBox: "0 0 512 512",
    height: "100%",
    width: "100%",
    xmlns: "http://www.w3.org/2000/svg"
  }, /*#__PURE__*/React.createElement("path", {
    d: "M437.332 80H74.668C51.199 80 32 99.198 32 122.667v266.666C32 412.802 51.199 432 74.668 432h362.664C460.801 432 480 412.802 480 389.333V122.667C480 99.198 460.801 80 437.332 80zM432 170.667L256 288 80 170.667V128l176 117.333L432 128v42.667z"
  })));
}

/***/ },

/***/ "./assets/jsx/workflow-editor/components/icons/message.jsx"
/*!*****************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/icons/message.jsx ***!
  \*****************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ MessageIcon)
/* harmony export */ });
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base */ "./assets/jsx/workflow-editor/components/icons/base.jsx");


/**
 * Icon BiSolidMessageDetail from 'react-icons/bi'.
 */
function MessageIcon(_ref) {
  var _ref$size = _ref.size,
    size = _ref$size === void 0 ? 24 : _ref$size;
  return /*#__PURE__*/React.createElement(_base__WEBPACK_IMPORTED_MODULE_0__["default"], {
    size: size
  }, /*#__PURE__*/React.createElement("svg", {
    stroke: "currentColor",
    fill: "currentColor",
    strokeWidth: "0",
    viewBox: "0 0 24 24",
    height: "100%",
    width: "100%",
    xmlns: "http://www.w3.org/2000/svg"
  }, /*#__PURE__*/React.createElement("path", {
    d: "M20 2H4c-1.103 0-2 .894-2 1.992v12.016C2 17.106 2.897 18 4 18h3v4l6.351-4H20c1.103 0 2-.894 2-1.992V3.992A1.998 1.998 0 0 0 20 2zm-6 11H7v-2h7v2zm3-4H7V7h10v2z"
  })));
}

/***/ },

/***/ "./assets/jsx/workflow-editor/components/icons/object-group.jsx"
/*!**********************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/icons/object-group.jsx ***!
  \**********************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ ObjectGroupIcon)
/* harmony export */ });
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base */ "./assets/jsx/workflow-editor/components/icons/base.jsx");


/**
 * Icon GrObjectGroup from 'react-icons/gr'.
 */
function ObjectGroupIcon(_ref) {
  var _ref$size = _ref.size,
    size = _ref$size === void 0 ? 24 : _ref$size;
  return /*#__PURE__*/React.createElement(_base__WEBPACK_IMPORTED_MODULE_0__["default"], {
    size: size
  }, /*#__PURE__*/React.createElement("svg", {
    stroke: "currentColor",
    fill: "currentColor",
    strokeWidth: "0",
    viewBox: "0 0 24 24",
    height: "100%",
    width: "100%",
    xmlns: "http://www.w3.org/2000/svg"
  }, /*#__PURE__*/React.createElement("path", {
    fill: "none",
    strokeWidth: "2",
    d: "M1,1 L4,1 L4,4 L1,4 L1,1 Z M20,1 L23,1 L23,4 L20,4 L20,1 Z M4,2 L20,2 M4,22 L20,22 M1,20 L4,20 L4,23 L1,23 L1,20 Z M20,20 L23,20 L23,23 L20,23 L20,20 Z M2,4 L2,20 M22,4 L22,20 M7,7 L14,7 L14,13 L7,13 L7,7 Z M17,10 L17,17 L10,17 L10,15"
  })));
}

/***/ },

/***/ "./assets/jsx/workflow-editor/components/icons/play.jsx"
/*!**************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/icons/play.jsx ***!
  \**************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ PlayIcon)
/* harmony export */ });
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base */ "./assets/jsx/workflow-editor/components/icons/base.jsx");


/**
 * Icon IoMdPlay from 'react-icons/io'.
 */
function PlayIcon(_ref) {
  var _ref$size = _ref.size,
    size = _ref$size === void 0 ? 24 : _ref$size;
  return /*#__PURE__*/React.createElement(_base__WEBPACK_IMPORTED_MODULE_0__["default"], {
    size: size
  }, /*#__PURE__*/React.createElement("svg", {
    stroke: "currentColor",
    fill: "currentColor",
    strokeWidth: "0",
    viewBox: "0 0 512 512",
    height: "100%",
    width: "100%",
    xmlns: "http://www.w3.org/2000/svg"
  }, /*#__PURE__*/React.createElement("path", {
    d: "M96 52v408l320-204L96 52z"
  })));
}

/***/ },

/***/ "./assets/jsx/workflow-editor/components/icons/plus.jsx"
/*!**************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/icons/plus.jsx ***!
  \**************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ PlusIcon)
/* harmony export */ });
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base */ "./assets/jsx/workflow-editor/components/icons/base.jsx");


/**
 * Icon FiPlus from 'react-icons/fi'.
 */
function PlusIcon(_ref) {
  var _ref$size = _ref.size,
    size = _ref$size === void 0 ? 24 : _ref$size;
  return /*#__PURE__*/React.createElement(_base__WEBPACK_IMPORTED_MODULE_0__["default"], {
    size: size
  }, /*#__PURE__*/React.createElement("svg", {
    stroke: "currentColor",
    fill: "none",
    strokeWidth: "2",
    viewBox: "0 0 24 24",
    strokeLinecap: "round",
    strokeLinejoin: "round",
    height: "100%",
    width: "100%",
    xmlns: "http://www.w3.org/2000/svg"
  }, /*#__PURE__*/React.createElement("line", {
    x1: "12",
    y1: "5",
    x2: "12",
    y2: "19"
  }), /*#__PURE__*/React.createElement("line", {
    x1: "5",
    y1: "12",
    x2: "19",
    y2: "12"
  })));
}

/***/ },

/***/ "./assets/jsx/workflow-editor/components/icons/route-right.jsx"
/*!*********************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/icons/route-right.jsx ***!
  \*********************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ RouteRightIcon)
/* harmony export */ });
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base */ "./assets/jsx/workflow-editor/components/icons/base.jsx");


/**
 * Icon TbRouteAltRight from 'react-icons/tb'.
 */
function RouteRightIcon(_ref) {
  var _ref$size = _ref.size,
    size = _ref$size === void 0 ? 24 : _ref$size;
  return /*#__PURE__*/React.createElement(_base__WEBPACK_IMPORTED_MODULE_0__["default"], {
    size: size
  }, /*#__PURE__*/React.createElement("svg", {
    stroke: "currentColor",
    fill: "none",
    strokeWidth: "2",
    viewBox: "0 0 24 24",
    strokeLinecap: "round",
    strokeLinejoin: "round",
    height: "100%",
    width: "100%",
    xmlns: "http://www.w3.org/2000/svg"
  }, /*#__PURE__*/React.createElement("path", {
    d: "M16 3h5v5"
  }), /*#__PURE__*/React.createElement("path", {
    d: "M8 3h-5v5"
  }), /*#__PURE__*/React.createElement("path", {
    d: "M21 3l-7.536 7.536a5 5 0 0 0 -1.464 3.534v6.93"
  }), /*#__PURE__*/React.createElement("path", {
    d: "M6 6.01v-.01"
  }), /*#__PURE__*/React.createElement("path", {
    d: "M8 8.02v-.01"
  }), /*#__PURE__*/React.createElement("path", {
    d: "M10 10v.01"
  })));
}

/***/ },

/***/ "./assets/jsx/workflow-editor/components/icons/schedule.jsx"
/*!******************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/icons/schedule.jsx ***!
  \******************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ ScheduleIcon)
/* harmony export */ });
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base */ "./assets/jsx/workflow-editor/components/icons/base.jsx");


/**
 * Icon MdSchedule from 'react-icons/md'.
 */
function ScheduleIcon(_ref) {
  var _ref$size = _ref.size,
    size = _ref$size === void 0 ? 24 : _ref$size;
  return /*#__PURE__*/React.createElement(_base__WEBPACK_IMPORTED_MODULE_0__["default"], {
    size: size
  }, /*#__PURE__*/React.createElement("svg", {
    stroke: "currentColor",
    fill: "currentColor",
    strokeWidth: "0",
    viewBox: "0 0 24 24",
    height: "100%",
    width: "100%",
    xmlns: "http://www.w3.org/2000/svg"
  }, /*#__PURE__*/React.createElement("path", {
    fill: "none",
    d: "M0 0h24v24H0z"
  }), /*#__PURE__*/React.createElement("path", {
    d: "M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"
  }), /*#__PURE__*/React.createElement("path", {
    d: "M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"
  })));
}

/***/ },

/***/ "./assets/jsx/workflow-editor/components/icons/shop.jsx"
/*!**************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/icons/shop.jsx ***!
  \**************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ ShopIcon)
/* harmony export */ });
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base */ "./assets/jsx/workflow-editor/components/icons/base.jsx");


/**
 * Icon FaShoppingCart from 'react-icons/fa'.
 */
function ShopIcon(_ref) {
  var _ref$size = _ref.size,
    size = _ref$size === void 0 ? 24 : _ref$size;
  return /*#__PURE__*/React.createElement(_base__WEBPACK_IMPORTED_MODULE_0__["default"], {
    size: size
  }, /*#__PURE__*/React.createElement("svg", {
    stroke: "currentColor",
    fill: "currentColor",
    strokeWidth: "0",
    viewBox: "0 0 576 512",
    height: "100%",
    width: "100%",
    xmlns: "http://www.w3.org/2000/svg"
  }, /*#__PURE__*/React.createElement("path", {
    d: "M528.12 301.319l47.273-208C578.806 78.301 567.391 64 551.99 64H159.208l-9.166-44.81C147.758 8.021 137.93 0 126.529 0H24C10.745 0 0 10.745 0 24v16c0 13.255 10.745 24 24 24h69.883l70.248 343.435C147.325 417.1 136 435.222 136 456c0 30.928 25.072 56 56 56s56-25.072 56-56c0-15.674-6.447-29.835-16.824-40h209.647C430.447 426.165 424 440.326 424 456c0 30.928 25.072 56 56 56s56-25.072 56-56c0-22.172-12.888-41.332-31.579-50.405l5.517-24.276c3.413-15.018-8.002-29.319-23.403-29.319H218.117l-6.545-32h293.145c11.206 0 20.92-7.754 23.403-18.681z"
  })));
}

/***/ },

/***/ "./assets/jsx/workflow-editor/components/icons/user.jsx"
/*!**************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/icons/user.jsx ***!
  \**************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ UserIcon)
/* harmony export */ });
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base */ "./assets/jsx/workflow-editor/components/icons/base.jsx");


/**
 * Icon FaUser from 'react-icons/fa'.
 */
function UserIcon(_ref) {
  var _ref$size = _ref.size,
    size = _ref$size === void 0 ? 24 : _ref$size;
  return /*#__PURE__*/React.createElement(_base__WEBPACK_IMPORTED_MODULE_0__["default"], {
    size: size
  }, /*#__PURE__*/React.createElement("svg", {
    stroke: "currentColor",
    fill: "currentColor",
    strokeWidth: "0",
    viewBox: "0 0 448 512",
    height: "100%",
    width: "100%",
    xmlns: "http://www.w3.org/2000/svg"
  }, /*#__PURE__*/React.createElement("path", {
    d: "M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"
  })));
}

/***/ },

/***/ "./assets/jsx/workflow-editor/components/icons/warning.jsx"
/*!*****************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/icons/warning.jsx ***!
  \*****************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ WarningIcon)
/* harmony export */ });
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base */ "./assets/jsx/workflow-editor/components/icons/base.jsx");


/**
 * Icon IoMdWarning from 'react-icons/io'.
 */
function WarningIcon(_ref) {
  var _ref$size = _ref.size,
    size = _ref$size === void 0 ? 24 : _ref$size;
  return /*#__PURE__*/React.createElement(_base__WEBPACK_IMPORTED_MODULE_0__["default"], {
    size: size
  }, /*#__PURE__*/React.createElement("svg", {
    stroke: "currentColor",
    fill: "currentColor",
    strokeWidth: "0",
    viewBox: "0 0 512 512",
    height: "100%",
    width: "100%",
    xmlns: "http://www.w3.org/2000/svg"
  }, /*#__PURE__*/React.createElement("path", {
    d: "M32 464h448L256 48 32 464zm248-64h-48v-48h48v48zm0-80h-48v-96h48v96z"
  })));
}

/***/ },

/***/ "./assets/jsx/workflow-editor/components/icons/website.jsx"
/*!*****************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/icons/website.jsx ***!
  \*****************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ WebsiteIcon)
/* harmony export */ });
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base */ "./assets/jsx/workflow-editor/components/icons/base.jsx");


/**
 * Icon CgWebsite from 'react-icons/cg'.
 */
function WebsiteIcon(_ref) {
  var _ref$size = _ref.size,
    size = _ref$size === void 0 ? 24 : _ref$size;
  return /*#__PURE__*/React.createElement(_base__WEBPACK_IMPORTED_MODULE_0__["default"], {
    size: size
  }, /*#__PURE__*/React.createElement("svg", {
    stroke: "currentColor",
    fill: "none",
    strokeWidth: "0",
    viewBox: "0 0 24 24",
    height: "100%",
    width: "100%",
    xmlns: "http://www.w3.org/2000/svg"
  }, /*#__PURE__*/React.createElement("path", {
    fillRule: "evenodd",
    clipRule: "evenodd",
    d: "M14 7C13.4477 7 13 7.44772 13 8V16C13 16.5523 13.4477 17 14 17H18C18.5523 17 19 16.5523 19 16V8C19 7.44772 18.5523 7 18 7H14ZM17 9H15V15H17V9Z",
    fill: "currentColor"
  }), /*#__PURE__*/React.createElement("path", {
    d: "M6 7C5.44772 7 5 7.44772 5 8C5 8.55228 5.44772 9 6 9H10C10.5523 9 11 8.55228 11 8C11 7.44772 10.5523 7 10 7H6Z",
    fill: "currentColor"
  }), /*#__PURE__*/React.createElement("path", {
    d: "M6 11C5.44772 11 5 11.4477 5 12C5 12.5523 5.44772 13 6 13H10C10.5523 13 11 12.5523 11 12C11 11.4477 10.5523 11 10 11H6Z",
    fill: "currentColor"
  }), /*#__PURE__*/React.createElement("path", {
    d: "M5 16C5 15.4477 5.44772 15 6 15H10C10.5523 15 11 15.4477 11 16C11 16.5523 10.5523 17 10 17H6C5.44772 17 5 16.5523 5 16Z",
    fill: "currentColor"
  }), /*#__PURE__*/React.createElement("path", {
    fillRule: "evenodd",
    clipRule: "evenodd",
    d: "M4 3C2.34315 3 1 4.34315 1 6V18C1 19.6569 2.34315 21 4 21H20C21.6569 21 23 19.6569 23 18V6C23 4.34315 21.6569 3 20 3H4ZM20 5H4C3.44772 5 3 5.44772 3 6V18C3 18.5523 3.44772 19 4 19H20C20.5523 19 21 18.5523 21 18V6C21 5.44772 20.5523 5 20 5Z",
    fill: "currentColor"
  })));
}

/***/ },

/***/ "./assets/jsx/workflow-editor/components/icons/woo.jsx"
/*!*************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/icons/woo.jsx ***!
  \*************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ WooIcon)
/* harmony export */ });
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base */ "./assets/jsx/workflow-editor/components/icons/base.jsx");


/**
 * Icon SiWoo from 'react-icons/si'.
 */
function WooIcon(_ref) {
  var _ref$size = _ref.size,
    size = _ref$size === void 0 ? 24 : _ref$size;
  return /*#__PURE__*/React.createElement(_base__WEBPACK_IMPORTED_MODULE_0__["default"], {
    size: size
  }, /*#__PURE__*/React.createElement("svg", {
    stroke: "currentColor",
    fill: "currentColor",
    strokeWidth: "0",
    role: "img",
    viewBox: "0 0 24 24",
    height: "100%",
    width: "100%",
    xmlns: "http://www.w3.org/2000/svg"
  }, /*#__PURE__*/React.createElement("path", {
    d: "M2.227 4.857A2.228 2.228 0 000 7.094v7.457c0 1.236 1.001 2.237 2.237 2.237h9.253l4.229 2.355-.962-2.355h7.006c1.236 0 2.237-1 2.237-2.237V7.094c0-1.236-1-2.237-2.237-2.237zm8.08 1.311c.194.002.372.071.535.2a.769.769 0 01.304.56.851.851 0 01-.098.47c-.382.707-.696 1.894-.951 3.542-.246 1.6-.334 2.846-.275 3.739.02.245-.02.46-.118.647a.632.632 0 01-.52.353c-.255.02-.52-.098-.775-.362-.913-.933-1.639-2.326-2.169-4.18a184.085 184.085 0 00-1.413 2.825c-.578 1.11-1.069 1.678-1.481 1.708-.265.02-.49-.206-.687-.677-.5-1.286-1.04-3.768-1.619-7.448-.03-.255.02-.48.157-.657.137-.186.344-.284.618-.304.5-.04.785.196.854.706.304 2.051.638 3.788.991 5.21L5.809 8.41c.196-.373.441-.57.736-.589.431-.03.696.245.804.824.246 1.305.56 2.414.932 3.356.255-2.492.687-4.288 1.295-5.397.148-.274.363-.412.648-.431a.866.866 0 01.084-.004zm3.734 1.063c.167 0 .343.02.53.06.687.146 1.216.52 1.57 1.137.314.53.47 1.168.47 1.933 0 1.011-.254 1.933-.765 2.777-.588.981-1.354 1.472-2.305 1.472-.167 0-.344-.02-.53-.059-.697-.147-1.217-.52-1.57-1.138-.314-.54-.471-1.187-.471-1.943 0-1.01.255-1.933.765-2.767.599-.981 1.364-1.472 2.306-1.472zm6.152 0c.167 0 .343.02.53.06.696.146 1.216.52 1.57 1.137.314.53.47 1.168.47 1.933 0 1.011-.254 1.933-.765 2.777-.588.981-1.354 1.472-2.305 1.472-.167 0-.344-.02-.53-.059-.697-.147-1.217-.52-1.57-1.138-.314-.54-.471-1.187-.471-1.943 0-1.01.255-1.933.765-2.767.599-.981 1.364-1.472 2.306-1.472zm-6.107 1.645c-.307-.002-.606.201-.889.622a3.173 3.173 0 00-.52 1.168c-.05.225-.069.47-.069.716 0 .284.06.589.177.893.147.382.343.589.579.638.245.049.51-.06.795-.315.363-.323.608-.804.745-1.452.05-.225.069-.47.069-.726a2.49 2.49 0 00-.176-.893c-.148-.382-.344-.588-.58-.637a.714.714 0 00-.131-.014zm6.152 0c-.307-.002-.606.201-.889.622a3.173 3.173 0 00-.52 1.168c-.049.225-.069.47-.069.716 0 .284.06.589.177.893.147.382.344.589.579.638.245.049.51-.06.795-.315.363-.323.608-.804.745-1.452.04-.225.07-.47.07-.726a2.49 2.49 0 00-.177-.893c-.148-.382-.344-.588-.58-.637a.714.714 0 00-.131-.014Z"
  })));
}

/***/ },

/***/ "./assets/jsx/workflow-editor/components/inline-multi-select/index.jsx"
/*!*****************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/inline-multi-select/index.jsx ***!
  \*****************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   InlineMultiSelect: () => (/* binding */ InlineMultiSelect),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }


var convertListOfLabelsToValues = function convertListOfLabelsToValues(selected, suggestions) {
  if (!selected) {
    return [];
  }
  return selected.map(function (selected) {
    var suggestion = suggestions.find(function (suggestion) {
      return suggestion.label === selected;
    });
    return suggestion ? suggestion.value : selected;
  });
};
var convertListOfValuesToLabels = function convertListOfValuesToLabels(selected, suggestions) {
  if (!selected) {
    return [];
  }
  return selected.map(function (selected) {
    var suggestion = suggestions.find(function (suggestion) {
      return suggestion.value === selected;
    });
    return suggestion ? suggestion.label : selected;
  });
};
var InlineMultiSelect = function InlineMultiSelect(_ref) {
  var label = _ref.label,
    expandOnFocus = _ref.expandOnFocus,
    autoSelectFirstMatch = _ref.autoSelectFirstMatch,
    onChange = _ref.onChange,
    suggestions = _ref.suggestions,
    value = _ref.value,
    className = _ref.className;
  var defaultSelectedLabels = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
    return convertListOfValuesToLabels(value, suggestions);
  });
  var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(defaultSelectedLabels),
    _useState2 = _slicedToArray(_useState, 2),
    selectedLabels = _useState2[0],
    setSelectedLabels = _useState2[1];
  var _useState3 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(value),
    _useState4 = _slicedToArray(_useState3, 2),
    selectedValues = _useState4[0],
    setSelectedValues = _useState4[1];
  var suggestionsLabels = suggestions.map(function (suggestion) {
    return suggestion.label;
  });
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
    setSelectedLabels(convertListOfValuesToLabels(value, suggestions));
    setSelectedValues(value);
  }, [value]);
  var onValueChange = function onValueChange(labels) {
    setSelectedLabels(labels);
    var values = convertListOfLabelsToValues(labels, suggestions);
    setSelectedValues(values);
    if (onChange !== undefined) {
      onChange(values, labels);
    }
  };
  return /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.FormTokenField, {
    label: label,
    value: selectedLabels,
    suggestions: suggestionsLabels,
    __experimentalExpandOnFocus: expandOnFocus,
    __experimentalAutoSelectFirstMatch: autoSelectFirstMatch,
    onChange: onValueChange,
    className: className
  });
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (InlineMultiSelect);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/inspector-card/index.jsx"
/*!************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/inspector-card/index.jsx ***!
  \************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   InspectorCard: () => (/* binding */ InspectorCard),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _workflow_store__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../workflow-store */ "./assets/jsx/workflow-editor/components/workflow-store/index.jsx");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _setting_popover__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../setting-popover */ "./assets/jsx/workflow-editor/components/setting-popover/index.jsx");
/* harmony import */ var _contexts_pro_context__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../contexts/pro-context */ "./assets/jsx/workflow-editor/contexts/pro-context.jsx");
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }







var StepDescription = function StepDescription(_ref) {
  var _node$data, _node$data3, _node$data4;
  var node = _ref.node;
  var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_4__.useState)(false),
    _useState2 = _slicedToArray(_useState, 2),
    isPopoverOpen = _useState2[0],
    setIsPopoverOpen = _useState2[1];
  var _useState3 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_4__.useState)((_node$data = node.data) === null || _node$data === void 0 ? void 0 : _node$data.label),
    _useState4 = _slicedToArray(_useState3, 2),
    description = _useState4[0],
    setDescription = _useState4[1];
  var _useDispatch = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.useDispatch)(_workflow_store__WEBPACK_IMPORTED_MODULE_1__.store),
    updateNode = _useDispatch.updateNode;
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_4__.useEffect)(function () {
    var _node$data2;
    setIsPopoverOpen(false);
    setDescription((_node$data2 = node.data) === null || _node$data2 === void 0 ? void 0 : _node$data2.label);
  }, [node]);
  var closePopover = function closePopover() {
    setIsPopoverOpen(false);
    var newNode = {
      id: node.id,
      data: {
        label: description
      }
    };
    updateNode(newNode);
  };
  return /*#__PURE__*/React.createElement(React.Fragment, null, !((_node$data3 = node.data) !== null && _node$data3 !== void 0 && _node$data3.label) && /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, {
    variant: "link",
    onClick: function onClick() {
      setIsPopoverOpen(true);
    }
  }, (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Add a description to this step...", "post-expirator")), ((_node$data4 = node.data) === null || _node$data4 === void 0 ? void 0 : _node$data4.label) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.__experimentalVStack, null, /*#__PURE__*/React.createElement("div", {
    className: "workflow-editor-inspector-card__description"
  }, node.data.label), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, {
    variant: "link",
    onClick: function onClick() {
      setIsPopoverOpen(true);
    }
  }, (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Edit description", "post-expirator")))), isPopoverOpen && /*#__PURE__*/React.createElement(_setting_popover__WEBPACK_IMPORTED_MODULE_5__["default"], {
    onClose: closePopover,
    className: "workflow-editor-inspector-card__description-popover",
    title: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Edit description", "post-expirator")
  }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.__experimentalVStack, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.TextareaControl, {
    value: description,
    onChange: function onChange(value) {
      setDescription(value);
    },
    onKeyDown: function onKeyDown(event) {
      if (event.key === 'Escape') {
        closePopover();
      }
    }
  }))));
};
var InspectorCard = function InspectorCard(_ref2) {
  var title = _ref2.title,
    description = _ref2.description,
    icon = _ref2.icon,
    id = _ref2.id,
    slug = _ref2.slug,
    isProFeature = _ref2.isProFeature,
    node = _ref2.node;
  var isPro = (0,_contexts_pro_context__WEBPACK_IMPORTED_MODULE_6__.useIsPro)();
  var nodeAttributes = [];
  return /*#__PURE__*/React.createElement("div", {
    className: "workflow-editor-inspector-card"
  }, /*#__PURE__*/React.createElement("div", {
    className: "workflow-editor-inspector-card__content"
  }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.__experimentalVStack, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.__experimentalHStack, {
    className: "workflow-editor-inspector-card__header"
  }, /*#__PURE__*/React.createElement("span", {
    className: "workflow-editor-inspector-icon has-colors"
  }, icon), /*#__PURE__*/React.createElement("h2", {
    className: "workflow-editor-inspector-card__title"
  }, title, isProFeature && !isPro && /*#__PURE__*/React.createElement("span", {
    className: "workflow-editor-inspector-card__pro-badge"
  }, (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Pro", "post-expirator"))))), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.__experimentalVStack, null, /*#__PURE__*/React.createElement("div", {
    className: "workflow-editor-inspector-card__description"
  }, description)), isProFeature && !isPro && /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.__experimentalVStack, null, /*#__PURE__*/React.createElement("div", {
    className: "workflow-editor-inspector-card__pro-instructions"
  }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ExternalLink, {
    href: "https://publishpress.com/links/future-workflow-inspector",
    target: "_blank"
  }, (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Currently this step is being skipped. Upgrade to Pro to unlock this feature.", "post-expirator")))), node && (node === null || node === void 0 ? void 0 : node.data) && /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.__experimentalVStack, null, /*#__PURE__*/React.createElement(StepDescription, {
    node: node
  })), nodeAttributes.length > 0 && /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.__experimentalVStack, null, /*#__PURE__*/React.createElement("table", null, /*#__PURE__*/React.createElement("tbody", null, nodeAttributes.map(function (attribute) {
    return /*#__PURE__*/React.createElement("tr", {
      key: "attribute_" + attribute.id
    }, /*#__PURE__*/React.createElement("th", null, attribute.label), /*#__PURE__*/React.createElement("td", null, attribute.value));
  }))))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (InspectorCard);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/inspector-warning.jsx"
/*!*********************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/inspector-warning.jsx ***!
  \*********************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   InspectorWarning: () => (/* binding */ InspectorWarning),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
var InspectorWarning = function InspectorWarning(_ref) {
  var children = _ref.children;
  return /*#__PURE__*/React.createElement("span", {
    className: "workflow-editor-element-inspector__warning"
  }, children);
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (InspectorWarning);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/keyboard-shortcuts/constants.jsx"
/*!********************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/keyboard-shortcuts/constants.jsx ***!
  \********************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   SHORTCUT_AUTO_LAYOUT: () => (/* binding */ SHORTCUT_AUTO_LAYOUT),
/* harmony export */   SHORTCUT_FIT_VIEW: () => (/* binding */ SHORTCUT_FIT_VIEW),
/* harmony export */   SHORTCUT_SAVE_AS_CURRENT_STATUS: () => (/* binding */ SHORTCUT_SAVE_AS_CURRENT_STATUS),
/* harmony export */   SHORTCUT_TOGGLE_ADVANCED_SETTINGS: () => (/* binding */ SHORTCUT_TOGGLE_ADVANCED_SETTINGS),
/* harmony export */   SHORTCUT_TOGGLE_DEVELOPER_MODE: () => (/* binding */ SHORTCUT_TOGGLE_DEVELOPER_MODE),
/* harmony export */   SHORTCUT_TOGGLE_FULLSCREEN: () => (/* binding */ SHORTCUT_TOGGLE_FULLSCREEN),
/* harmony export */   SHORTCUT_TOGGLE_INSERTER: () => (/* binding */ SHORTCUT_TOGGLE_INSERTER),
/* harmony export */   SHORTCUT_TOGGLE_SIDEBAR: () => (/* binding */ SHORTCUT_TOGGLE_SIDEBAR)
/* harmony export */ });
var SHORTCUT_TOGGLE_FULLSCREEN = "publishpress-future/workflow-editor/toggle-fullscreen";
var SHORTCUT_FIT_VIEW = "publishpress-future/workflow-editor/fit-view";
var SHORTCUT_TOGGLE_INSERTER = "publishpress-future/workflow-editor/toggle-inserter";
var SHORTCUT_AUTO_LAYOUT = "publishpress-future/workflow-editor/auto-layout";
var SHORTCUT_TOGGLE_SIDEBAR = "publishpress-future/workflow-editor/toggle-sidebar";
var SHORTCUT_TOGGLE_DEVELOPER_MODE = "publishpress-future/workflow-editor/toggle-developer-mode";
var SHORTCUT_TOGGLE_ADVANCED_SETTINGS = "publishpress-future/workflow-editor/toggle-advanced-settings";
var SHORTCUT_SAVE_AS_CURRENT_STATUS = "publishpress-future/workflow-editor/save-as-current-status";

/***/ },

/***/ "./assets/jsx/workflow-editor/components/keyboard-shortcuts/index.jsx"
/*!****************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/keyboard-shortcuts/index.jsx ***!
  \****************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   KeyboardShortcuts: () => (/* binding */ KeyboardShortcuts)
/* harmony export */ });
/* harmony import */ var _wordpress_keyboard_shortcuts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/keyboard-shortcuts */ "./node_modules/@wordpress/keyboard-shortcuts/build-module/index.js");
/* harmony import */ var _editor_store__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../editor-store */ "./assets/jsx/workflow-editor/components/editor-store/index.jsx");
/* harmony import */ var _workflow_store__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../workflow-store */ "./assets/jsx/workflow-editor/components/workflow-store/index.jsx");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../constants */ "./assets/jsx/workflow-editor/constants.jsx");
/* harmony import */ var _flow_editor_auto_layout_constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../flow-editor/auto-layout/constants */ "./assets/jsx/workflow-editor/components/flow-editor/auto-layout/constants.jsx");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./constants */ "./assets/jsx/workflow-editor/components/keyboard-shortcuts/constants.jsx");
/* harmony import */ var reactflow__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! reactflow */ "./node_modules/@reactflow/core/dist/esm/index.mjs");
/* harmony import */ var _shortcuts__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./shortcuts */ "./assets/jsx/workflow-editor/components/keyboard-shortcuts/shortcuts.jsx");
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }










var KeyboardShortcuts = function KeyboardShortcuts() {
  var _useDispatch = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_6__.useDispatch)(_wordpress_keyboard_shortcuts__WEBPACK_IMPORTED_MODULE_0__.store),
    registerShortcut = _useDispatch.registerShortcut;
  var _useDispatch2 = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_6__.useDispatch)(_editor_store__WEBPACK_IMPORTED_MODULE_1__.store),
    toggleFeature = _useDispatch2.toggleFeature;
  var _useDispatch3 = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_6__.useDispatch)(_workflow_store__WEBPACK_IMPORTED_MODULE_2__.store),
    saveAsCurrentStatus = _useDispatch3.saveAsCurrentStatus;
  var reactflow = (0,reactflow__WEBPACK_IMPORTED_MODULE_8__.useReactFlow)();
  var _useSelect = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_6__.useSelect)(function (select) {
      return {
        isEditedWorkflowSaveable: select(_workflow_store__WEBPACK_IMPORTED_MODULE_2__.store).isEditedWorkflowSaveable
      };
    }, []),
    isEditedWorkflowSaveable = _useSelect.isEditedWorkflowSaveable;
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useEffect)(function () {
    _shortcuts__WEBPACK_IMPORTED_MODULE_9__.SHORTCUTS_CONFIG.forEach(function (shortcut) {
      registerShortcut(shortcut);
    });
  }, []);
  var handleSave = /*#__PURE__*/function () {
    var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(e) {
      return _regeneratorRuntime().wrap(function _callee$(_context) {
        while (1) switch (_context.prev = _context.next) {
          case 0:
            e.preventDefault();
            if (isEditedWorkflowSaveable) {
              _context.next = 3;
              break;
            }
            return _context.abrupt("return");
          case 3:
            _context.prev = 3;
            _context.next = 6;
            return saveAsCurrentStatus();
          case 6:
            _context.next = 11;
            break;
          case 8:
            _context.prev = 8;
            _context.t0 = _context["catch"](3);
            console.error('Failed to save workflow:', _context.t0);
          case 11:
          case "end":
            return _context.stop();
        }
      }, _callee, null, [[3, 8]]);
    }));
    return function handleSave(_x) {
      return _ref.apply(this, arguments);
    };
  }();
  (0,_wordpress_keyboard_shortcuts__WEBPACK_IMPORTED_MODULE_0__.useShortcut)(_constants__WEBPACK_IMPORTED_MODULE_7__.SHORTCUT_TOGGLE_FULLSCREEN, function () {
    return toggleFeature(_constants__WEBPACK_IMPORTED_MODULE_4__.FEATURE_FULLSCREEN_MODE);
  });
  (0,_wordpress_keyboard_shortcuts__WEBPACK_IMPORTED_MODULE_0__.useShortcut)(_constants__WEBPACK_IMPORTED_MODULE_7__.SHORTCUT_TOGGLE_DEVELOPER_MODE, function () {
    return toggleFeature(_constants__WEBPACK_IMPORTED_MODULE_4__.FEATURE_DEVELOPER_MODE);
  });
  (0,_wordpress_keyboard_shortcuts__WEBPACK_IMPORTED_MODULE_0__.useShortcut)(_constants__WEBPACK_IMPORTED_MODULE_7__.SHORTCUT_FIT_VIEW, function () {
    return reactflow.fitView();
  });
  (0,_wordpress_keyboard_shortcuts__WEBPACK_IMPORTED_MODULE_0__.useShortcut)(_constants__WEBPACK_IMPORTED_MODULE_7__.SHORTCUT_TOGGLE_INSERTER, function () {
    return toggleFeature(_constants__WEBPACK_IMPORTED_MODULE_4__.FEATURE_INSERTER);
  });
  (0,_wordpress_keyboard_shortcuts__WEBPACK_IMPORTED_MODULE_0__.useShortcut)(_constants__WEBPACK_IMPORTED_MODULE_7__.SHORTCUT_AUTO_LAYOUT, function () {
    document.dispatchEvent(new CustomEvent(_flow_editor_auto_layout_constants__WEBPACK_IMPORTED_MODULE_5__.CUSTOM_EVENT_AUTO_LAYOUT, {
      detail: {
        direction: _flow_editor_auto_layout_constants__WEBPACK_IMPORTED_MODULE_5__.AUTO_LAYOUT_DIRECTION_DOWN
      }
    }));
  });
  (0,_wordpress_keyboard_shortcuts__WEBPACK_IMPORTED_MODULE_0__.useShortcut)(_constants__WEBPACK_IMPORTED_MODULE_7__.SHORTCUT_TOGGLE_ADVANCED_SETTINGS, function () {
    return toggleFeature(_constants__WEBPACK_IMPORTED_MODULE_4__.FEATURE_ADVANCED_SETTINGS);
  });
  (0,_wordpress_keyboard_shortcuts__WEBPACK_IMPORTED_MODULE_0__.useShortcut)(_constants__WEBPACK_IMPORTED_MODULE_7__.SHORTCUT_SAVE_AS_CURRENT_STATUS, handleSave);
  return null;
};

/***/ },

/***/ "./assets/jsx/workflow-editor/components/keyboard-shortcuts/shortcuts.jsx"
/*!********************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/keyboard-shortcuts/shortcuts.jsx ***!
  \********************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   SHORTCUTS_CONFIG: () => (/* binding */ SHORTCUTS_CONFIG)
/* harmony export */ });
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constants */ "./assets/jsx/workflow-editor/components/keyboard-shortcuts/constants.jsx");

var SHORTCUTS_CONFIG = [{
  name: _constants__WEBPACK_IMPORTED_MODULE_0__.SHORTCUT_TOGGLE_FULLSCREEN,
  category: "global",
  description: "Toggle fullscreen mode",
  keyCombination: {
    modifier: "secondary",
    character: "f"
  }
}, {
  name: _constants__WEBPACK_IMPORTED_MODULE_0__.SHORTCUT_TOGGLE_DEVELOPER_MODE,
  category: "global",
  description: "Toggle developer mode",
  keyCombination: {
    modifier: "secondary",
    character: "d"
  }
}, {
  name: _constants__WEBPACK_IMPORTED_MODULE_0__.SHORTCUT_TOGGLE_ADVANCED_SETTINGS,
  category: "global",
  description: "Toggle advanced settings",
  keyCombination: {
    modifier: "secondary",
    character: "a"
  }
}, {
  name: _constants__WEBPACK_IMPORTED_MODULE_0__.SHORTCUT_FIT_VIEW,
  category: "global",
  description: "Fit view",
  keyCombination: {
    modifier: "secondary",
    character: "v"
  }
}, {
  name: _constants__WEBPACK_IMPORTED_MODULE_0__.SHORTCUT_TOGGLE_INSERTER,
  category: "global",
  description: "Toggle inserter",
  keyCombination: {
    modifier: "secondary",
    character: "i"
  }
}, {
  name: _constants__WEBPACK_IMPORTED_MODULE_0__.SHORTCUT_AUTO_LAYOUT,
  category: "global",
  description: "Auto layout",
  keyCombination: {
    modifier: "secondary",
    character: "l"
  }
}, {
  name: _constants__WEBPACK_IMPORTED_MODULE_0__.SHORTCUT_TOGGLE_SIDEBAR,
  category: "global",
  description: "Toggle sidebar",
  keyCombination: {
    modifier: "secondary",
    character: "s"
  }
}, {
  name: _constants__WEBPACK_IMPORTED_MODULE_0__.SHORTCUT_SAVE_AS_CURRENT_STATUS,
  category: "global",
  description: "Save as current status",
  keyCombination: {
    modifier: "primary",
    character: "s"
  }
}];

/***/ },

/***/ "./assets/jsx/workflow-editor/components/layout/content.jsx"
/*!******************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/layout/content.jsx ***!
  \******************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   LayoutContent: () => (/* binding */ LayoutContent)
/* harmony export */ });
/* harmony import */ var _flow_editor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../flow-editor */ "./assets/jsx/workflow-editor/components/flow-editor/index.jsx");
/* harmony import */ var _editor_notices__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../editor-notices */ "./assets/jsx/workflow-editor/components/editor-notices/index.jsx");


var LayoutContent = function LayoutContent(props) {
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_editor_notices__WEBPACK_IMPORTED_MODULE_1__["default"], null), /*#__PURE__*/React.createElement(_flow_editor__WEBPACK_IMPORTED_MODULE_0__.FlowEditor, null));
};

/***/ },

/***/ "./assets/jsx/workflow-editor/components/layout/footer.jsx"
/*!*****************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/layout/footer.jsx ***!
  \*****************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   LayoutFooter: () => (/* binding */ LayoutFooter)
/* harmony export */ });
var LayoutFooter = function LayoutFooter(props) {
  return /*#__PURE__*/React.createElement("div", null, "PublishPress Future Workflow Editor");
};

/***/ },

/***/ "./assets/jsx/workflow-editor/components/layout/header.jsx"
/*!*****************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/layout/header.jsx ***!
  \*****************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   LayoutHeader: () => (/* binding */ LayoutHeader)
/* harmony export */ });
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_interface__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/interface */ "./node_modules/@wordpress/interface/build-module/index.js");
/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/compose */ "./node_modules/@wordpress/compose/build-module/hooks/use-viewport-match/index.js");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/layout.js");
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/plus.js");
/* harmony import */ var _editor_store__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../editor-store */ "./assets/jsx/workflow-editor/components/editor-store/index.jsx");
/* harmony import */ var _workflow_store__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../workflow-store */ "./assets/jsx/workflow-editor/components/workflow-store/index.jsx");
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../constants */ "./assets/jsx/workflow-editor/constants.jsx");
/* harmony import */ var _flow_editor_auto_layout_constants__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../flow-editor/auto-layout/constants */ "./assets/jsx/workflow-editor/components/flow-editor/auto-layout/constants.jsx");
/* harmony import */ var _fullscreen_mode_close__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../fullscreen-mode-close */ "./assets/jsx/workflow-editor/components/fullscreen-mode-close.jsx");
/* harmony import */ var _more_menu_menu__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../more-menu/menu */ "./assets/jsx/workflow-editor/components/more-menu/menu.jsx");
/* harmony import */ var _left_toolbar_toolbar__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../left-toolbar/toolbar */ "./assets/jsx/workflow-editor/components/left-toolbar/toolbar.jsx");
/* harmony import */ var _left_toolbar_undo__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../left-toolbar/undo */ "./assets/jsx/workflow-editor/components/left-toolbar/undo.jsx");
/* harmony import */ var _left_toolbar_redo__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../left-toolbar/redo */ "./assets/jsx/workflow-editor/components/left-toolbar/redo.jsx");
/* harmony import */ var _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @wordpress/keycodes */ "./node_modules/@wordpress/keycodes/build-module/index.js");
/* harmony import */ var _workflow_save_draft_button__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../workflow-save-draft-button */ "./assets/jsx/workflow-editor/components/workflow-save-draft-button/index.jsx");
/* harmony import */ var _workflow_publish_button__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../workflow-publish-button */ "./assets/jsx/workflow-editor/components/workflow-publish-button/index.jsx");
/* harmony import */ var _flow_editor_auto_layout_hooks__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../flow-editor/auto-layout/hooks */ "./assets/jsx/workflow-editor/components/flow-editor/auto-layout/hooks.jsx");
/* harmony import */ var _icons_shop__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../icons/shop */ "./assets/jsx/workflow-editor/components/icons/shop.jsx");
/* harmony import */ var _contexts_pro_context__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../contexts/pro-context */ "./assets/jsx/workflow-editor/contexts/pro-context.jsx");






















var isWP65OrLater = window.futureWorkflowEditor.isWP65OrLater;
var preventDefault = function preventDefault(event) {
  event.preventDefault();
};
var LayoutHeader = function LayoutHeader() {
  var _useSelect = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.useSelect)(function (select) {
      return {
        isFullscreenActive: select(_editor_store__WEBPACK_IMPORTED_MODULE_8__.store).isFeatureActive(_constants__WEBPACK_IMPORTED_MODULE_10__.FEATURE_FULLSCREEN_MODE),
        hasReducedUI: select(_editor_store__WEBPACK_IMPORTED_MODULE_8__.store).isFeatureActive(_constants__WEBPACK_IMPORTED_MODULE_10__.FEATURE_REDUCED_UI),
        isInserterOpened: select(_editor_store__WEBPACK_IMPORTED_MODULE_8__.store).isFeatureActive(_constants__WEBPACK_IMPORTED_MODULE_10__.FEATURE_INSERTER),
        showIconLabels: select(_editor_store__WEBPACK_IMPORTED_MODULE_8__.store).isFeatureActive(_constants__WEBPACK_IMPORTED_MODULE_10__.FEATURE_SHOW_ICON_LABELS),
        isLoadingWorkflow: select(_workflow_store__WEBPACK_IMPORTED_MODULE_9__.store).isLoadingWorkflow()
      };
    }),
    isFullscreenActive = _useSelect.isFullscreenActive,
    isInserterOpened = _useSelect.isInserterOpened,
    hasReducedUI = _useSelect.hasReducedUI,
    showIconLabels = _useSelect.showIconLabels,
    isLoadingWorkflow = _useSelect.isLoadingWorkflow;
  var _useDispatch = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.useDispatch)(_editor_store__WEBPACK_IMPORTED_MODULE_8__.store),
    enableFeature = _useDispatch.enableFeature,
    disableFeature = _useDispatch.disableFeature;
  var headerClasses = 'edit-post-header editor-header ' + (hasReducedUI ? 'has-reduced-ui' : '');
  var isWideViewport = (0,_wordpress_compose__WEBPACK_IMPORTED_MODULE_3__["default"])('wide');
  var inserterButton = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_5__.useRef)();
  var openInserter = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_5__.useCallback)(function () {
    if (isInserterOpened) {
      // Focusing the inserter button closes the inserter popover
      inserterButton.current.focus();
      disableFeature(_constants__WEBPACK_IMPORTED_MODULE_10__.FEATURE_INSERTER);
      return;
    }
    enableFeature(_constants__WEBPACK_IMPORTED_MODULE_10__.FEATURE_INSERTER);
  }, [isInserterOpened, enableFeature, disableFeature]);

  /* translators: accessibility text for the editor toolbar */
  var toolbarAriaLabel = (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Document tools');
  var applyAutoLayout = (0,_flow_editor_auto_layout_hooks__WEBPACK_IMPORTED_MODULE_20__.useAutoLayout)();
  var onAutoLayoutClick = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_5__.useCallback)(function (event) {
    event.preventDefault();
    applyAutoLayout({
      direction: _flow_editor_auto_layout_constants__WEBPACK_IMPORTED_MODULE_11__.AUTO_LAYOUT_DIRECTION_DOWN
    });
  });
  var onBuyProClick = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_5__.useCallback)(function (event) {
    event.preventDefault();
    window.open('https://publishpress.com/links/future-workflow-toolbar', '_blank');
  });
  var toolbarLeftClassName = isWP65OrLater ? 'editor-document-tools__left' : 'edit-post-header-toolbar__left';
  var isPro = (0,_contexts_pro_context__WEBPACK_IMPORTED_MODULE_22__.useIsPro)();
  return /*#__PURE__*/React.createElement("div", {
    className: headerClasses
  }, isFullscreenActive && /*#__PURE__*/React.createElement(_fullscreen_mode_close__WEBPACK_IMPORTED_MODULE_12__.FullscreenModeClose, null), /*#__PURE__*/React.createElement("div", {
    className: "edit-post-header__toolbar editor-header__toolbar"
  }, /*#__PURE__*/React.createElement(_left_toolbar_toolbar__WEBPACK_IMPORTED_MODULE_14__.NavigableToolbar, {
    className: "edit-post-header-toolbar editor-document-tools",
    "aria-label": toolbarAriaLabel
  }, /*#__PURE__*/React.createElement("div", {
    className: toolbarLeftClassName
  }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToolbarItem, {
    ref: inserterButton,
    as: _wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button,
    className: "edit-post-header-toolbar__inserter-toggle",
    variant: "primary",
    isPressed: isInserterOpened,
    onMouseDown: preventDefault,
    onClick: openInserter,
    shortcut: _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_17__.displayShortcut.secondary('i'),
    icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_7__["default"]
    /* translators: button label text should, if possible, be under 16
    characters. */,
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__._x)('Toggle block inserter', 'Generic label for block inserter button'),
    showTooltip: !showIconLabels
  }, showIconLabels && (!isInserterOpened ? (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Add', 'post-expirator') : (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Close', 'post-expirator'))), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToolbarItem, {
    as: _wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button,
    className: "edit-post-header-toolbar__autolayout-down",
    onMouseDown: preventDefault,
    onClick: onAutoLayoutClick,
    icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_6__["default"],
    shortcut: _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_17__.displayShortcut.secondary('l')
    /* translators: button label text should, if possible, be under 16 characters. */,
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Auto Layout', 'post-expirator'),
    showTooltip: !showIconLabels,
    disabled: isLoadingWorkflow
  }, showIconLabels && (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Auto Layout', 'post-expirator')), !isPro && /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToolbarItem, {
    as: _wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button,
    className: "edit-post-header-toolbar__buy-pro",
    onMouseDown: preventDefault,
    onClick: onBuyProClick,
    icon: _icons_shop__WEBPACK_IMPORTED_MODULE_21__["default"]
    /* translators: button label text should, if possible, be under 16 characters. */,
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Upgrade to Pro and unlock more features', 'post-expirator'),
    showTooltip: !showIconLabels
  }, (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Upgrade to Pro', 'post-expirator'))))), /*#__PURE__*/React.createElement("div", {
    className: "edit-post-header__settings editor-header__settings"
  }, /*#__PURE__*/React.createElement(_workflow_save_draft_button__WEBPACK_IMPORTED_MODULE_18__.WorkflowSaveDraftButton, null), /*#__PURE__*/React.createElement(_workflow_publish_button__WEBPACK_IMPORTED_MODULE_19__["default"], null), /*#__PURE__*/React.createElement(_wordpress_interface__WEBPACK_IMPORTED_MODULE_2__.PinnedItems.Slot, {
    scope: _constants__WEBPACK_IMPORTED_MODULE_10__.SLOT_SCOPE_WORKFLOW_EDITOR
  }), /*#__PURE__*/React.createElement(_more_menu_menu__WEBPACK_IMPORTED_MODULE_13__.MoreMenu, null)));
};

/***/ },

/***/ "./assets/jsx/workflow-editor/components/layout/interface.jsx"
/*!********************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/layout/interface.jsx ***!
  \********************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   WorkflowEditorInterface: () => (/* binding */ WorkflowEditorInterface)
/* harmony export */ });
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_interface__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/interface */ "./node_modules/@wordpress/interface/build-module/index.js");
/* harmony import */ var _content__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./content */ "./assets/jsx/workflow-editor/components/layout/content.jsx");
/* harmony import */ var _footer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./footer */ "./assets/jsx/workflow-editor/components/layout/footer.jsx");
/* harmony import */ var _header__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./header */ "./assets/jsx/workflow-editor/components/layout/header.jsx");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/compose */ "./node_modules/@wordpress/compose/build-module/hooks/use-viewport-match/index.js");
/* harmony import */ var _workflow_store__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../workflow-store */ "./assets/jsx/workflow-editor/components/workflow-store/index.jsx");
/* harmony import */ var _editor_store__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../editor-store */ "./assets/jsx/workflow-editor/components/editor-store/index.jsx");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var _settings_sidebar_constants__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../settings-sidebar/constants */ "./assets/jsx/workflow-editor/components/settings-sidebar/constants.jsx");
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../constants */ "./assets/jsx/workflow-editor/constants.jsx");
/* harmony import */ var _editor_notices__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../editor-notices */ "./assets/jsx/workflow-editor/components/editor-notices/index.jsx");














function WorkflowEditorInterface(_ref) {
  var className = _ref.className,
    secondarySidebar = _ref.secondarySidebar;
  var isMobileViewport = (0,_wordpress_compose__WEBPACK_IMPORTED_MODULE_7__["default"])('medium', '<');
  var _useSelect = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_5__.useSelect)(function (select) {
      var activeComplementaryArea = select('core/interface').getActiveComplementaryArea(_constants__WEBPACK_IMPORTED_MODULE_12__.SLOT_SCOPE_WORKFLOW_EDITOR);
      return {
        sidebarIsOpened: activeComplementaryArea !== null && activeComplementaryArea !== 'null/undefined',
        hasFixedToolbar: false,
        hasActiveMetaboxes: false,
        showIconLabels: select(_editor_store__WEBPACK_IMPORTED_MODULE_9__.store).isFeatureActive(_constants__WEBPACK_IMPORTED_MODULE_12__.FEATURE_SHOW_ICON_LABELS),
        hasSelectedNodes: select(_workflow_store__WEBPACK_IMPORTED_MODULE_8__.store).hasSelectedNodes()
      };
    }),
    sidebarIsOpened = _useSelect.sidebarIsOpened,
    hasFixedToolbar = _useSelect.hasFixedToolbar,
    hasActiveMetaboxes = _useSelect.hasActiveMetaboxes,
    showIconLabels = _useSelect.showIconLabels,
    hasSelectedNodes = _useSelect.hasSelectedNodes;
  var _useDispatch = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_5__.useDispatch)(_editor_store__WEBPACK_IMPORTED_MODULE_9__.store),
    openGeneralSidebar = _useDispatch.openGeneralSidebar,
    closeInserter = _useDispatch.closeInserter;
  var interfaceClassNames = classnames__WEBPACK_IMPORTED_MODULE_0___default()(className, {
    'is-sidebar-opened': sidebarIsOpened,
    'has-fixed-toolbar': hasFixedToolbar,
    'has-metaboxes': hasActiveMetaboxes,
    'show-icon-labels': showIconLabels
  });
  var openSidebarPanel = function openSidebarPanel() {
    openGeneralSidebar(hasSelectedNodes ? _settings_sidebar_constants__WEBPACK_IMPORTED_MODULE_11__.SIDEBAR_NODE_EDGE : _settings_sidebar_constants__WEBPACK_IMPORTED_MODULE_11__.SIDEBAR_WORKFLOW);
  };
  return /*#__PURE__*/React.createElement(_wordpress_interface__WEBPACK_IMPORTED_MODULE_1__.InterfaceSkeleton, {
    className: interfaceClassNames,
    header: /*#__PURE__*/React.createElement(_header__WEBPACK_IMPORTED_MODULE_4__.LayoutHeader, null),
    secondarySidebar: secondarySidebar(),
    content: /*#__PURE__*/React.createElement(_content__WEBPACK_IMPORTED_MODULE_2__.LayoutContent, null),
    footer: /*#__PURE__*/React.createElement(_footer__WEBPACK_IMPORTED_MODULE_3__.LayoutFooter, null),
    actions: null,
    sidebar: (!isMobileViewport || sidebarIsOpened) && /*#__PURE__*/React.createElement(_wordpress_interface__WEBPACK_IMPORTED_MODULE_1__.ComplementaryArea.Slot, {
      scope: _constants__WEBPACK_IMPORTED_MODULE_12__.SLOT_SCOPE_WORKFLOW_EDITOR
    })
  });
}

/***/ },

/***/ "./assets/jsx/workflow-editor/components/layout/layout.jsx"
/*!*****************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/layout/layout.jsx ***!
  \*****************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   WorkflowEditorLayout: () => (/* binding */ WorkflowEditorLayout)
/* harmony export */ });
/* harmony import */ var _wordpress_interface__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/interface */ "./node_modules/@wordpress/interface/build-module/index.js");
/* harmony import */ var _interface__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./interface */ "./assets/jsx/workflow-editor/components/layout/interface.jsx");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _wordpress_plugins__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/plugins */ "@wordpress/plugins");
/* harmony import */ var _wordpress_plugins__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_plugins__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils */ "./assets/jsx/workflow-editor/utils.jsx");
/* harmony import */ var _editor_store__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../editor-store */ "./assets/jsx/workflow-editor/components/editor-store/index.jsx");
/* harmony import */ var _workflow_store__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../workflow-store */ "./assets/jsx/workflow-editor/components/workflow-store/index.jsx");
/* harmony import */ var reactflow__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! reactflow */ "./node_modules/@reactflow/core/dist/esm/index.mjs");
/* harmony import */ var _keyboard_shortcuts__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../keyboard-shortcuts */ "./assets/jsx/workflow-editor/components/keyboard-shortcuts/index.jsx");
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../constants */ "./assets/jsx/workflow-editor/constants.jsx");
/* harmony import */ var _secondary_sidebar_inserter_sidebar__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../secondary-sidebar/inserter-sidebar */ "./assets/jsx/workflow-editor/components/secondary-sidebar/inserter-sidebar.jsx");
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var _settings_sidebar_settings_sidebar__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../settings-sidebar/settings-sidebar */ "./assets/jsx/workflow-editor/components/settings-sidebar/settings-sidebar.jsx");
/* harmony import */ var _welcome_guide__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../welcome-guide */ "./assets/jsx/workflow-editor/components/welcome-guide/index.jsx");
/* harmony import */ var _loading_message__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../loading-message */ "./assets/jsx/workflow-editor/components/loading-message/index.jsx");
/* harmony import */ var _contexts_pro_context__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../contexts/pro-context */ "./assets/jsx/workflow-editor/contexts/pro-context.jsx");


















function WorkflowEditorLayout() {
  var _useSelect = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_2__.useSelect)(function (select) {
      return {
        isFullscreenActive: select(_editor_store__WEBPACK_IMPORTED_MODULE_6__.store).isFeatureActive(_constants__WEBPACK_IMPORTED_MODULE_10__.FEATURE_FULLSCREEN_MODE),
        isInserterOpened: select(_editor_store__WEBPACK_IMPORTED_MODULE_6__.store).isFeatureActive(_constants__WEBPACK_IMPORTED_MODULE_10__.FEATURE_INSERTER),
        isWelcomeGuideActive: select(_editor_store__WEBPACK_IMPORTED_MODULE_6__.store).isFeatureActive(_constants__WEBPACK_IMPORTED_MODULE_10__.FEATURE_WELCOME_GUIDE),
        isLoadingWorkflow: select(_workflow_store__WEBPACK_IMPORTED_MODULE_7__.store).isLoadingWorkflow(),
        isCreatingWorkflow: select(_workflow_store__WEBPACK_IMPORTED_MODULE_7__.store).isCreatingWorkflow()
      };
    }),
    isFullscreenActive = _useSelect.isFullscreenActive,
    isInserterOpened = _useSelect.isInserterOpened,
    isWelcomeGuideActive = _useSelect.isWelcomeGuideActive,
    isLoadingWorkflow = _useSelect.isLoadingWorkflow,
    isCreatingWorkflow = _useSelect.isCreatingWorkflow;
  var className = classnames__WEBPACK_IMPORTED_MODULE_12___default()('edit-post-layout editor-editor-interface', {
    'is-inserter-opened': isInserterOpened
  });
  var isPro = (0,_contexts_pro_context__WEBPACK_IMPORTED_MODULE_17__.useIsPro)();
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useEffect)(function () {
    var bodyClasses = ['workflow-editor'];
    bodyClasses.push(isPro ? 'is-pro' : 'is-free');
    (0,_utils__WEBPACK_IMPORTED_MODULE_5__.addBodyClasses)(bodyClasses);
    return function () {
      (0,_utils__WEBPACK_IMPORTED_MODULE_5__.removeBodyClasses)(bodyClasses);
    };
  }, []);
  var secondarySidebar = function secondarySidebar() {
    if (isInserterOpened) {
      return /*#__PURE__*/React.createElement(_secondary_sidebar_inserter_sidebar__WEBPACK_IMPORTED_MODULE_11__.InserterSidebar, null);
    }
    return null;
  };
  return /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_13__.SlotFillProvider, null, /*#__PURE__*/React.createElement(reactflow__WEBPACK_IMPORTED_MODULE_8__.ReactFlowProvider, null, /*#__PURE__*/React.createElement(_contexts_pro_context__WEBPACK_IMPORTED_MODULE_17__.ProFeaturesProvider, null, /*#__PURE__*/React.createElement(_wordpress_interface__WEBPACK_IMPORTED_MODULE_0__.FullscreenMode, {
    isActive: isFullscreenActive
  }), /*#__PURE__*/React.createElement(_keyboard_shortcuts__WEBPACK_IMPORTED_MODULE_9__.KeyboardShortcuts, null), /*#__PURE__*/React.createElement(_settings_sidebar_settings_sidebar__WEBPACK_IMPORTED_MODULE_14__.SettingsSidebar, null), (isLoadingWorkflow || isCreatingWorkflow) && /*#__PURE__*/React.createElement(_loading_message__WEBPACK_IMPORTED_MODULE_16__["default"], null), /*#__PURE__*/React.createElement(_interface__WEBPACK_IMPORTED_MODULE_1__.WorkflowEditorInterface, {
    className: className,
    secondarySidebar: secondarySidebar
  }), isWelcomeGuideActive && /*#__PURE__*/React.createElement(_welcome_guide__WEBPACK_IMPORTED_MODULE_15__["default"], null))), /*#__PURE__*/React.createElement(_wordpress_plugins__WEBPACK_IMPORTED_MODULE_4__.PluginArea, {
    scope: "future-workflow-editor"
  }));
}

/***/ },

/***/ "./assets/jsx/workflow-editor/components/left-toolbar/redo.jsx"
/*!*********************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/left-toolbar/redo.jsx ***!
  \*********************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   EditorHistoryRedo: () => (/* binding */ EditorHistoryRedo)
/* harmony export */ });
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/keycodes */ "./node_modules/@wordpress/keycodes/build-module/index.js");
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/redo.js");
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/undo.js");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var _workflow_store__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../workflow-store */ "./assets/jsx/workflow-editor/components/workflow-store/index.jsx");
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
/**
 * WordPress dependencies
 */







/**
 * Internal dependencies
 */

function Component(props, ref) {
  var hasRedo = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_2__.useSelect)(
  // (select) => select(workflowStore).hasRedo(),
  function (select) {
    return false;
  }, []);
  var _useDispatch = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_2__.useDispatch)(_workflow_store__WEBPACK_IMPORTED_MODULE_7__.store),
    redo = _useDispatch.redo;
  return /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, _extends({}, props, {
    ref: ref,
    icon: !(0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.isRTL)() ? _wordpress_icons__WEBPACK_IMPORTED_MODULE_4__["default"] : _wordpress_icons__WEBPACK_IMPORTED_MODULE_5__["default"]
    /* translators: button label text should, if possible, be under 16 characters. */,
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Redo', 'post-expirator'),
    shortcut: _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_3__.displayShortcut.primaryShift('z')
    // If there are no redo levels we don't want to actually disable this
    // button, because it will remove focus for keyboard users.
    // See: https://github.com/WordPress/gutenberg/issues/3486
    ,
    "aria-disabled": !hasRedo,
    onClick: hasRedo ? redo : undefined,
    className: "editor-history__redo"
  }));
}
var EditorHistoryRedo = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_6__.forwardRef)(Component);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/left-toolbar/toolbar.jsx"
/*!************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/left-toolbar/toolbar.jsx ***!
  \************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   NavigableToolbar: () => (/* binding */ NavigableToolbar)
/* harmony export */ });
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/dom */ "./node_modules/@wordpress/dom/build-module/index.js");
var _excluded = ["children", "focusOnMount", "__experimentalInitialIndex", "__experimentalOnIndexChange"];
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
/**
 * WordPress dependencies
 */



function getAllToolbarItemsIn(container) {
  return Array.from(container.querySelectorAll('[data-toolbar-item]'));
}
function hasFocusWithin(container) {
  return container.contains(container.ownerDocument.activeElement);
}
function focusFirstTabbableIn(container) {
  var _focus$tabbable$find = _wordpress_dom__WEBPACK_IMPORTED_MODULE_2__.focus.tabbable.find(container),
    _focus$tabbable$find2 = _slicedToArray(_focus$tabbable$find, 1),
    firstTabbable = _focus$tabbable$find2[0];
  if (firstTabbable) {
    firstTabbable.focus();
  }
}
function useToolbarFocus(ref, focusOnMount, defaultIndex, onIndexChange) {
  // Make sure we don't use modified versions of this prop
  var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(focusOnMount),
    _useState2 = _slicedToArray(_useState, 1),
    initialFocusOnMount = _useState2[0];
  var _useState3 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(defaultIndex),
    _useState4 = _slicedToArray(_useState3, 1),
    initialIndex = _useState4[0];
  var focusToolbar = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function () {
    focusFirstTabbableIn(ref.current);
  }, []);

  // TODO: Focus on toolbar when pressing alt+F10 when the toolbar is visible

  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
    if (initialFocusOnMount) {
      focusToolbar();
    }
  }, [initialFocusOnMount, focusToolbar]);
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
    // If initialIndex is passed, we focus on that toolbar item when the
    // toolbar gets mounted and initial focus is not forced.
    // We have to wait for the next browser paint because block controls aren't
    // rendered right away when the toolbar gets mounted.
    var raf = 0;
    if (initialIndex && !initialFocusOnMount) {
      raf = window.requestAnimationFrame(function () {
        var items = getAllToolbarItemsIn(ref.current);
        var index = initialIndex || 0;
        if (items[index] && hasFocusWithin(ref.current)) {
          items[index].focus();
        }
      });
    }
    return function () {
      window.cancelAnimationFrame(raf);
      if (!onIndexChange || !ref.current) return;
      // When the toolbar element is unmounted and onIndexChange is passed, we
      // pass the focused toolbar item index so it can be hydrated later.
      var items = getAllToolbarItemsIn(ref.current);
      var index = items.findIndex(function (item) {
        return item.tabIndex === 0;
      });
      onIndexChange(index);
    };
  }, [initialIndex, initialFocusOnMount]);
}
function NavigableToolbar(_ref) {
  var children = _ref.children,
    focusOnMount = _ref.focusOnMount,
    initialIndex = _ref.__experimentalInitialIndex,
    onIndexChange = _ref.__experimentalOnIndexChange,
    props = _objectWithoutProperties(_ref, _excluded);
  var ref = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useRef)();
  useToolbarFocus(ref, focusOnMount, initialIndex, onIndexChange);
  return /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.NavigableMenu, _extends({
    orientation: "horizontal",
    role: "toolbar",
    ref: ref
  }, props), children);
}

/***/ },

/***/ "./assets/jsx/workflow-editor/components/left-toolbar/undo.jsx"
/*!*********************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/left-toolbar/undo.jsx ***!
  \*********************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   EditorHistoryUndo: () => (/* binding */ EditorHistoryUndo)
/* harmony export */ });
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/keycodes */ "./node_modules/@wordpress/keycodes/build-module/index.js");
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/redo.js");
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/undo.js");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var _workflow_store__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../workflow-store */ "./assets/jsx/workflow-editor/components/workflow-store/index.jsx");
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
/**
 * WordPress dependencies
 */







/**
 * Internal dependencies
 */

function Component(props, ref) {
  var hasUndo = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_2__.useSelect)(
  // (select) => select(workflowStore).hasUndo(),
  function (select) {
    return false;
  }, []);
  var _useDispatch = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_2__.useDispatch)(_workflow_store__WEBPACK_IMPORTED_MODULE_7__.store),
    undo = _useDispatch.undo;
  return /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, _extends({}, props, {
    ref: ref,
    icon: !(0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.isRTL)() ? _wordpress_icons__WEBPACK_IMPORTED_MODULE_5__["default"] : _wordpress_icons__WEBPACK_IMPORTED_MODULE_4__["default"]
    /* translators: button label text should, if possible, be under 16 characters. */,
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Undo', 'post-expirator'),
    shortcut: _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_3__.displayShortcut.primary('z')
    // If there are no undo levels we don't want to actually disable this
    // button, because it will remove focus for keyboard users.
    // See: https://github.com/WordPress/gutenberg/issues/3486
    ,
    "aria-disabled": !hasUndo,
    onClick: hasUndo ? undo : undefined,
    className: "editor-history__undo"
  }));
}
var EditorHistoryUndo = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_6__.forwardRef)(Component);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/loading-message/index.jsx"
/*!*************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/loading-message/index.jsx ***!
  \*************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   LoadingMessage: () => (/* binding */ LoadingMessage),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__);


var LoadingMessage = function LoadingMessage() {
  return /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Modal, {
    title: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Loading...', 'post-expirator'),
    isDismissible: false
  }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Wait, we are loading the workflow...', 'post-expirator'))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (LoadingMessage);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/more-menu/menu-dropdown.jsx"
/*!***************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/more-menu/menu-dropdown.jsx ***!
  \***************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   MoreMenuDropdown: () => (/* binding */ MoreMenuDropdown)
/* harmony export */ });
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/more-vertical.js");
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__);
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }




var MoreMenuDropdown = function MoreMenuDropdown(_ref) {
  var _ref$as = _ref.as,
    DropdownComponent = _ref$as === void 0 ? _wordpress_components__WEBPACK_IMPORTED_MODULE_0__.DropdownMenu : _ref$as,
    className = _ref.className,
    _ref$label = _ref.label,
    label = _ref$label === void 0 ? (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Options', 'post-expirator') : _ref$label,
    popoverProps = _ref.popoverProps,
    toggleProps = _ref.toggleProps,
    children = _ref.children;
  return /*#__PURE__*/React.createElement(DropdownComponent, {
    className: classnames__WEBPACK_IMPORTED_MODULE_3___default()('interface-more-menu-dropdown', className),
    icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_2__["default"],
    label: label,
    popoverProps: _objectSpread(_objectSpread({
      position: 'bottom left'
    }, popoverProps), {}, {
      className: classnames__WEBPACK_IMPORTED_MODULE_3___default()('interface-more-menu-dropdown__content', popoverProps === null || popoverProps === void 0 ? void 0 : popoverProps.className)
    }),
    toggleProps: _objectSpread({
      tooltipPosition: 'bottom'
    }, toggleProps)
  }, function (onClose) {
    return children(onClose);
  });
};

/***/ },

/***/ "./assets/jsx/workflow-editor/components/more-menu/menu-feature-toggle.jsx"
/*!*********************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/more-menu/menu-feature-toggle.jsx ***!
  \*********************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   MoreMenuFeatureToggle: () => (/* binding */ MoreMenuFeatureToggle)
/* harmony export */ });
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/check.js");
/* harmony import */ var _wordpress_a11y__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/a11y */ "./node_modules/@wordpress/a11y/build-module/index.js");
/* harmony import */ var _editor_store__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../editor-store */ "./assets/jsx/workflow-editor/components/editor-store/index.jsx");
/**
 * WordPress dependencies
 */






/**
 * Internal dependencies
 */

var MoreMenuFeatureToggle = function MoreMenuFeatureToggle(_ref) {
  var scope = _ref.scope,
    label = _ref.label,
    info = _ref.info,
    messageActivated = _ref.messageActivated,
    messageDeactivated = _ref.messageDeactivated,
    shortcut = _ref.shortcut,
    feature = _ref.feature;
  var isActive = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.useSelect)(function (select) {
    return select(_editor_store__WEBPACK_IMPORTED_MODULE_5__.store).isFeatureActive(feature);
  }, [feature]);
  var _useDispatch = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.useDispatch)(_editor_store__WEBPACK_IMPORTED_MODULE_5__.store),
    toggleFeature = _useDispatch.toggleFeature;
  var speakMessage = function speakMessage() {
    if (isActive) {
      (0,_wordpress_a11y__WEBPACK_IMPORTED_MODULE_4__.speak)(messageDeactivated || (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Feature deactivated', 'post-expirator'));
    } else {
      (0,_wordpress_a11y__WEBPACK_IMPORTED_MODULE_4__.speak)(messageActivated || (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Feature activated', 'post-expirator'));
    }
  };
  return /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.MenuItem, {
    icon: isActive && _wordpress_icons__WEBPACK_IMPORTED_MODULE_3__["default"],
    isSelected: isActive,
    onClick: function onClick() {
      toggleFeature(feature);
      speakMessage();
    },
    role: "menuitemcheckbox",
    info: info,
    shortcut: shortcut
  }, label);
};

/***/ },

/***/ "./assets/jsx/workflow-editor/components/more-menu/menu-items-view.jsx"
/*!*****************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/more-menu/menu-items-view.jsx ***!
  \*****************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   MoreMenuItemsView: () => (/* binding */ MoreMenuItemsView)
/* harmony export */ });
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/compose */ "./node_modules/@wordpress/compose/build-module/hooks/use-viewport-match/index.js");
/* harmony import */ var _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/keycodes */ "./node_modules/@wordpress/keycodes/build-module/index.js");
/* harmony import */ var _menu_feature_toggle__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./menu-feature-toggle */ "./assets/jsx/workflow-editor/components/more-menu/menu-feature-toggle.jsx");
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../constants */ "./assets/jsx/workflow-editor/constants.jsx");






var MoreMenuItemsView = function MoreMenuItemsView() {
  var isLargeViewport = (0,_wordpress_compose__WEBPACK_IMPORTED_MODULE_2__["default"])('medium');
  if (!isLargeViewport) {
    return null;
  }
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.MenuGroup, {
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__._x)('View', 'noun', 'post-expirator')
  }, /*#__PURE__*/React.createElement(_menu_feature_toggle__WEBPACK_IMPORTED_MODULE_4__.MoreMenuFeatureToggle, {
    scope: "core/edit-post",
    feature: _constants__WEBPACK_IMPORTED_MODULE_5__.FEATURE_FULLSCREEN_MODE,
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Fullscreen mode', 'post-expirator'),
    info: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Work without distraction', 'post-expirator'),
    messageActivated: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Fullscreen mode activated', 'post-expirator'),
    messageDeactivated: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Fullscreen mode deactivated', 'post-expirator'),
    shortcut: _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_3__.displayShortcut.secondary('f')
  }), /*#__PURE__*/React.createElement(_menu_feature_toggle__WEBPACK_IMPORTED_MODULE_4__.MoreMenuFeatureToggle, {
    scope: "core/edit-post",
    feature: _constants__WEBPACK_IMPORTED_MODULE_5__.FEATURE_ADVANCED_SETTINGS,
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Advanced Settings', 'post-expirator'),
    info: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Display advanced settings for the workflow, triggers and steps', 'post-expirator'),
    messageActivated: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Advanced settings mode activated', 'post-expirator'),
    messageDeactivated: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Advanced settings mode deactivated', 'post-expirator'),
    shortcut: _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_3__.displayShortcut.secondary('a')
  }), /*#__PURE__*/React.createElement(_menu_feature_toggle__WEBPACK_IMPORTED_MODULE_4__.MoreMenuFeatureToggle, {
    scope: "core/edit-post",
    feature: _constants__WEBPACK_IMPORTED_MODULE_5__.FEATURE_MINI_MAP,
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Display a mini map', 'post-expirator'),
    info: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Display a mini map in the bottom of the editor, triggers and steps', 'post-expirator'),
    messageActivated: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Mini map activated', 'post-expirator'),
    messageDeactivated: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Mini map deactivated', 'post-expirator')
  }), /*#__PURE__*/React.createElement(_menu_feature_toggle__WEBPACK_IMPORTED_MODULE_4__.MoreMenuFeatureToggle, {
    scope: "core/edit-post",
    feature: _constants__WEBPACK_IMPORTED_MODULE_5__.FEATURE_CONTROLS,
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Display the controls panel', 'post-expirator'),
    info: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Display the controls panel with buttons to zoon in, zoom out, fit the view and lock the viewport', 'post-expirator'),
    messageActivated: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Mini map activated', 'post-expirator'),
    messageDeactivated: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Mini map deactivated', 'post-expirator')
  })), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.MenuGroup, {
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Tools', 'post-expirator')
  }, /*#__PURE__*/React.createElement(_menu_feature_toggle__WEBPACK_IMPORTED_MODULE_4__.MoreMenuFeatureToggle, {
    scope: "core/edit-post",
    feature: _constants__WEBPACK_IMPORTED_MODULE_5__.FEATURE_DEVELOPER_MODE,
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Developer mode', 'post-expirator'),
    info: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Work in developer mode', 'post-expirator'),
    messageActivated: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Developer mode activated', 'post-expirator'),
    messageDeactivated: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Developer mode deactivated', 'post-expirator'),
    shortcut: _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_3__.displayShortcut.secondary('d')
  }), /*#__PURE__*/React.createElement(_menu_feature_toggle__WEBPACK_IMPORTED_MODULE_4__.MoreMenuFeatureToggle, {
    scope: "core/edit-post",
    feature: _constants__WEBPACK_IMPORTED_MODULE_5__.FEATURE_WELCOME_GUIDE,
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Welcome guide', 'post-expirator'),
    info: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Display the welcome guide', 'post-expirator'),
    messageActivated: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Welcome guide activated', 'post-expirator'),
    messageDeactivated: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Welcome guide deactivated', 'post-expirator')
  }), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.MenuItem, {
    icon: "external",
    onClick: function onClick() {
      window.open('https://publishpress.com/docs-category/future/', '_blank');
    }
  }, (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Help', 'post-expirator'))));
};

/***/ },

/***/ "./assets/jsx/workflow-editor/components/more-menu/menu.jsx"
/*!******************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/more-menu/menu.jsx ***!
  \******************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   MoreMenu: () => (/* binding */ MoreMenu)
/* harmony export */ });
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _menu_dropdown__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./menu-dropdown */ "./assets/jsx/workflow-editor/components/more-menu/menu-dropdown.jsx");
/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/compose */ "./node_modules/@wordpress/compose/build-module/hooks/use-viewport-match/index.js");
/* harmony import */ var _menu_items_view__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./menu-items-view */ "./assets/jsx/workflow-editor/components/more-menu/menu-items-view.jsx");
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
/**
 * WordPress dependencies
 */

// import { MenuGroup } from '@wordpress/components';



// import PreferencesMenuItem from '../preferences-menu-item';
// import ToolsMoreMenuGroup from '../tools-more-menu-group';

var POPOVER_PROPS = {
  className: 'edit-post-more-menu__content'
};
var MoreMenu = function MoreMenu(_ref) {
  var showIconLabels = _ref.showIconLabels;
  var isLargeViewport = (0,_wordpress_compose__WEBPACK_IMPORTED_MODULE_2__["default"])('large');
  return /*#__PURE__*/React.createElement(_menu_dropdown__WEBPACK_IMPORTED_MODULE_1__.MoreMenuDropdown, {
    className: "edit-post-more-menu",
    popoverProps: POPOVER_PROPS,
    toggleProps: _objectSpread({
      showTooltip: !showIconLabels
    }, showIconLabels && {
      variant: 'tertiary'
    })
  }, function (_ref2) {
    var onClose = _ref2.onClose;
    return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_menu_items_view__WEBPACK_IMPORTED_MODULE_3__.MoreMenuItemsView, null));
  });
};

/***/ },

/***/ "./assets/jsx/workflow-editor/components/node-dev-info-panel/index.jsx"
/*!*****************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/node-dev-info-panel/index.jsx ***!
  \*****************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   NodeDevInfoPanel: () => (/* binding */ NodeDevInfoPanel),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _persistent_panel_body__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../persistent-panel-body */ "./assets/jsx/workflow-editor/components/persistent-panel-body/index.jsx");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__);
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }




var ReactJson = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.lazy)(function () {
  return __webpack_require__.e(/*! import() */ "vendors-node_modules_microlink_react-json-view_dist_main_js").then(__webpack_require__.t.bind(__webpack_require__, /*! @microlink/react-json-view */ "./node_modules/@microlink/react-json-view/dist/main.js", 23));
});
function NodeDevInfoPanel(_ref) {
  var _node$data;
  var node = _ref.node,
    nodeType = _ref.nodeType;
  var reactJSONParams = {
    collapsed: 1,
    collapseStringsAfterLength: 50,
    displayDataTypes: false,
    displayObjectSize: false,
    enableClipboard: false
  };
  var lazyLoadLoading = /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.PanelRow, null, /*#__PURE__*/React.createElement("div", null, (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Loading...', 'post-expirator')));
  return /*#__PURE__*/React.createElement(_persistent_panel_body__WEBPACK_IMPORTED_MODULE_2__["default"], {
    title: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Developer Info', 'post-expirator'),
    icon: 'admin-tools',
    className: "workflow-editor-dev-info-panel workflow-editor-dev-panel"
  }, node && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.PanelRow, null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("h3", null, (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Node', 'post-expirator')), /*#__PURE__*/React.createElement("div", {
    className: "workflow-editor-dev-info-wrapper"
  }, /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.Suspense, {
    fallback: lazyLoadLoading
  }, /*#__PURE__*/React.createElement(ReactJson, _extends({
    src: node
  }, reactJSONParams, {
    collapsed: true
  })))))), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.PanelRow, null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("h3", null, (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Node Data', 'post-expirator')), /*#__PURE__*/React.createElement("div", {
    className: "workflow-editor-dev-info-wrapper"
  }, /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.Suspense, {
    fallback: lazyLoadLoading
  }, /*#__PURE__*/React.createElement(ReactJson, _extends({
    src: node === null || node === void 0 ? void 0 : node.data
  }, reactJSONParams, {
    collapsed: true
  })))))), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.PanelRow, null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("h3", null, (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Node Settings', 'post-expirator')), /*#__PURE__*/React.createElement("div", {
    className: "workflow-editor-dev-info-wrapper"
  }, /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.Suspense, {
    fallback: lazyLoadLoading
  }, /*#__PURE__*/React.createElement(ReactJson, _extends({
    src: node === null || node === void 0 || (_node$data = node.data) === null || _node$data === void 0 ? void 0 : _node$data.settings
  }, reactJSONParams, {
    collapsed: true
  }))))))), nodeType && /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.PanelRow, null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("h3", null, (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Node Type', 'post-expirator')), /*#__PURE__*/React.createElement("div", {
    className: "workflow-editor-dev-info-wrapper"
  }, /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.Suspense, {
    fallback: lazyLoadLoading
  }, /*#__PURE__*/React.createElement(ReactJson, _extends({
    src: nodeType
  }, reactJSONParams, {
    collapsed: true
  })))))));
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (NodeDevInfoPanel);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/node-icon.jsx"
/*!*************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/node-icon.jsx ***!
  \*************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   NodeIcon: () => (/* binding */ NodeIcon),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/block-default.js");
/* harmony import */ var _icons_woo__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./icons/woo */ "./assets/jsx/workflow-editor/components/icons/woo.jsx");
/* harmony import */ var _icons_user__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./icons/user */ "./assets/jsx/workflow-editor/components/icons/user.jsx");
/* harmony import */ var _icons_bug__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./icons/bug */ "./assets/jsx/workflow-editor/components/icons/bug.jsx");
/* harmony import */ var _icons_database__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./icons/database */ "./assets/jsx/workflow-editor/components/icons/database.jsx");
/* harmony import */ var _icons_route_right__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./icons/route-right */ "./assets/jsx/workflow-editor/components/icons/route-right.jsx");
/* harmony import */ var _icons_mail__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./icons/mail */ "./assets/jsx/workflow-editor/components/icons/mail.jsx");
/* harmony import */ var _icons_message__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./icons/message */ "./assets/jsx/workflow-editor/components/icons/message.jsx");
/* harmony import */ var _icons_warning__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./icons/warning */ "./assets/jsx/workflow-editor/components/icons/warning.jsx");
/* harmony import */ var _icons_schedule__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./icons/schedule */ "./assets/jsx/workflow-editor/components/icons/schedule.jsx");
/* harmony import */ var _icons_document_text__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./icons/document-text */ "./assets/jsx/workflow-editor/components/icons/document-text.jsx");
/* harmony import */ var _icons_website__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./icons/website */ "./assets/jsx/workflow-editor/components/icons/website.jsx");
/* harmony import */ var _icons_exclamation__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./icons/exclamation */ "./assets/jsx/workflow-editor/components/icons/exclamation.jsx");
/* harmony import */ var _icons_lock__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./icons/lock */ "./assets/jsx/workflow-editor/components/icons/lock.jsx");
/* harmony import */ var _icons_shop__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./icons/shop */ "./assets/jsx/workflow-editor/components/icons/shop.jsx");
/* harmony import */ var _icons_braces__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./icons/braces */ "./assets/jsx/workflow-editor/components/icons/braces.jsx");
/* harmony import */ var _icons_action__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./icons/action */ "./assets/jsx/workflow-editor/components/icons/action.jsx");
/* harmony import */ var _icons_interactive__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./icons/interactive */ "./assets/jsx/workflow-editor/components/icons/interactive.jsx");
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
/**
 * External dependencies
 */


/**
 * WordPress dependencies
 */



















function NodeIcon(_ref) {
  var _icon;
  var icon = _ref.icon,
    _ref$showColors = _ref.showColors,
    showColors = _ref$showColors === void 0 ? false : _ref$showColors,
    className = _ref.className,
    _ref$iconSize = _ref.iconSize,
    iconSize = _ref$iconSize === void 0 ? 20 : _ref$iconSize,
    _ref$onClick = _ref.onClick,
    onClick = _ref$onClick === void 0 ? function () {} : _ref$onClick,
    _ref$style = _ref.style,
    style = _ref$style === void 0 ? {} : _ref$style;
  var iconSrc = ((_icon = icon) === null || _icon === void 0 ? void 0 : _icon.src) || icon;
  switch (iconSrc) {
    case 'block-default':
      icon = {
        src: _wordpress_icons__WEBPACK_IMPORTED_MODULE_2__["default"]
      };
      break;
    case 'document':
    case 'media-document':
      icon = {
        src: _icons_document_text__WEBPACK_IMPORTED_MODULE_12__["default"]
      };
      break;
    case 'users':
      icon = {
        src: _icons_user__WEBPACK_IMPORTED_MODULE_4__["default"]
      };
      break;
    case 'woo':
      icon = {
        src: _icons_woo__WEBPACK_IMPORTED_MODULE_3__["default"]
      };
      break;
    case 'debug':
      icon = {
        src: _icons_bug__WEBPACK_IMPORTED_MODULE_5__["default"]
      };
      break;
    case 'db-query':
      icon = {
        src: _icons_database__WEBPACK_IMPORTED_MODULE_6__["default"]
      };
      break;
    case 'route':
      icon = {
        src: _icons_route_right__WEBPACK_IMPORTED_MODULE_7__["default"]
      };
      break;
    case 'email':
      icon = {
        src: _icons_mail__WEBPACK_IMPORTED_MODULE_8__["default"]
      };
      break;
    case 'message':
      icon = {
        src: _icons_message__WEBPACK_IMPORTED_MODULE_9__["default"]
      };
      break;
    case 'error':
      icon = {
        src: 'warning'
      };
      break;
    case 'warning':
      icon = {
        src: _icons_warning__WEBPACK_IMPORTED_MODULE_10__["default"]
      };
      break;
    case 'schedule':
      icon = {
        src: _icons_schedule__WEBPACK_IMPORTED_MODULE_11__["default"]
      };
      break;
    case 'info':
      icon = {
        src: 'info'
      };
      break;
    case 'arrow-down':
      icon = {
        src: 'arrow-down'
      };
      break;
    case 'website':
      icon = {
        src: _icons_website__WEBPACK_IMPORTED_MODULE_13__["default"]
      };
      break;
    case 'exclamation':
      icon = {
        src: _icons_exclamation__WEBPACK_IMPORTED_MODULE_14__["default"]
      };
      break;
    case 'lock':
      icon = {
        src: _icons_lock__WEBPACK_IMPORTED_MODULE_15__["default"]
      };
      break;
    case 'shop':
      icon = {
        src: _icons_shop__WEBPACK_IMPORTED_MODULE_16__["default"]
      };
      break;
    case 'braces':
      icon = {
        src: _icons_braces__WEBPACK_IMPORTED_MODULE_17__["default"]
      };
      break;
    case 'action':
      icon = {
        src: _icons_action__WEBPACK_IMPORTED_MODULE_18__["default"]
      };
      break;
    case 'interactive':
      icon = {
        src: _icons_interactive__WEBPACK_IMPORTED_MODULE_19__["default"]
      };
      break;
  }
  var mergedClassName = classnames__WEBPACK_IMPORTED_MODULE_0___default()(className, 'node-icon', {
    'has-colors': showColors
  });
  var renderedIcon = /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Icon, {
    icon: icon && icon.src ? icon.src : icon,
    size: iconSize
  });
  var spanStyle = showColors ? _objectSpread(_objectSpread({}, style), {}, {
    backgroundColor: icon && icon.background,
    color: icon && icon.foreground
  }) : style;
  return /*#__PURE__*/React.createElement("span", {
    style: spanStyle,
    className: mergedClassName,
    onClick: onClick
  }, renderedIcon);
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (NodeIcon);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/node-inspector/index.jsx"
/*!************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/node-inspector/index.jsx ***!
  \************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   NodeInspector: () => (/* binding */ NodeInspector),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _workflow_store__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../workflow-store */ "./assets/jsx/workflow-editor/components/workflow-store/index.jsx");
/* harmony import */ var _editor_store__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../editor-store */ "./assets/jsx/workflow-editor/components/editor-store/index.jsx");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _node_inspector_card__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./node-inspector-card */ "./assets/jsx/workflow-editor/components/node-inspector/node-inspector-card.jsx");
/* harmony import */ var _inspector_card__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../inspector-card */ "./assets/jsx/workflow-editor/components/inspector-card/index.jsx");
/* harmony import */ var _inspector_warning__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../inspector-warning */ "./assets/jsx/workflow-editor/components/inspector-warning.jsx");
/* harmony import */ var _node_settings_panel__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./node-settings-panel */ "./assets/jsx/workflow-editor/components/node-inspector/node-settings-panel.jsx");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils */ "./assets/jsx/workflow-editor/utils.jsx");
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../constants */ "./assets/jsx/workflow-editor/constants.jsx");
/* harmony import */ var _node_validation_panel__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../node-validation-panel */ "./assets/jsx/workflow-editor/components/node-validation-panel/index.jsx");
/* harmony import */ var _node_data_flow_panel__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./node-data-flow-panel */ "./assets/jsx/workflow-editor/components/node-inspector/node-data-flow-panel.jsx");
/* harmony import */ var _icons_object_group__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../icons/object-group */ "./assets/jsx/workflow-editor/components/icons/object-group.jsx");
/* harmony import */ var _icons_lines_leaning__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../icons/lines-leaning */ "./assets/jsx/workflow-editor/components/icons/lines-leaning.jsx");
/* harmony import */ var _node_dev_info_panel__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../node-dev-info-panel */ "./assets/jsx/workflow-editor/components/node-dev-info-panel/index.jsx");
/* harmony import */ var _scrolled_to_top__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../scrolled-to-top */ "./assets/jsx/workflow-editor/components/scrolled-to-top/index.jsx");
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }



















var NodeInspector = function NodeInspector() {
  var _nodeType$settingsSch;
  var _useSelect = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.useSelect)(function (select) {
      var selectedNodes = select(_workflow_store__WEBPACK_IMPORTED_MODULE_1__.store).getSelectedNodes();
      var selectedEdges = select(_workflow_store__WEBPACK_IMPORTED_MODULE_1__.store).getSelectedEdges();
      var getNodeById = select(_workflow_store__WEBPACK_IMPORTED_MODULE_1__.store).getNodeById;
      var getEdgeById = select(_workflow_store__WEBPACK_IMPORTED_MODULE_1__.store).getEdgeById;
      var selectedNode = selectedNodes.length === 1 ? getNodeById(selectedNodes[0]) : null;
      var selectedEdge = selectedEdges.length === 1 ? getEdgeById(selectedEdges[0]) : null;
      var nodeErrors = select(_workflow_store__WEBPACK_IMPORTED_MODULE_1__.store).getNodeErrors(selectedNode === null || selectedNode === void 0 ? void 0 : selectedNode.id) || {};
      var selectedElementsCount = select(_workflow_store__WEBPACK_IMPORTED_MODULE_1__.store).getSelectedElementsCount();
      var nodeType = null;
      if (selectedNode) {
        var _selectedNode$data;
        nodeType = select(_editor_store__WEBPACK_IMPORTED_MODULE_2__.store).getNodeTypeByName(selectedNode === null || selectedNode === void 0 || (_selectedNode$data = selectedNode.data) === null || _selectedNode$data === void 0 ? void 0 : _selectedNode$data.name);
      }
      return {
        selectedNodes: selectedNodes,
        selectedEdges: selectedEdges,
        selectedElementsCount: selectedElementsCount,
        selectedNode: selectedNode,
        selectedEdge: selectedEdge,
        nodeErrors: nodeErrors,
        nodeType: nodeType
      };
    }),
    selectedNodes = _useSelect.selectedNodes,
    selectedEdges = _useSelect.selectedEdges,
    selectedElementsCount = _useSelect.selectedElementsCount,
    selectedNode = _useSelect.selectedNode,
    selectedEdge = _useSelect.selectedEdge,
    nodeErrors = _useSelect.nodeErrors,
    nodeType = _useSelect.nodeType;
  var _useSelect2 = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.useSelect)(function (select) {
      return {
        isDeveloperModeEnabled: select(_editor_store__WEBPACK_IMPORTED_MODULE_2__.store).isFeatureActive(_constants__WEBPACK_IMPORTED_MODULE_10__.FEATURE_DEVELOPER_MODE)
      };
    }),
    isDeveloperModeEnabled = _useSelect2.isDeveloperModeEnabled;
  var sidebarRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_4__.useRef)(null);
  var onlyNodesSelected = selectedNodes.length > 0 && selectedEdges.length === 0;
  var onlyEdgesSelected = selectedNodes.length === 0 && selectedEdges.length > 0;
  var nodeHasSettings = (nodeType === null || nodeType === void 0 || (_nodeType$settingsSch = nodeType.settingsSchema) === null || _nodeType$settingsSch === void 0 ? void 0 : _nodeType$settingsSch.length) > 0;
  var stepScopedVariables = (0,_utils__WEBPACK_IMPORTED_MODULE_9__.getExpandedStepScopedVariables)(selectedNode);
  var mappedNodeInputSchema = (0,_utils__WEBPACK_IMPORTED_MODULE_9__.mapNodeInputs)(selectedNode);
  var nodeOutputSchema = (0,_utils__WEBPACK_IMPORTED_MODULE_9__.getNodeOutputSchema)(selectedNode);
  var mappedNodeOutputSchema = [];
  if (nodeOutputSchema.length > 0) {
    nodeOutputSchema.forEach(function (schemaItem) {
      if (schemaItem.type === "input") {
        mappedNodeOutputSchema = mappedNodeOutputSchema.concat(mappedNodeInputSchema);
      } else {
        var _selectedNode$data2;
        mappedNodeOutputSchema.push(_objectSpread(_objectSpread({}, schemaItem), {}, {
          name: "".concat(selectedNode === null || selectedNode === void 0 || (_selectedNode$data2 = selectedNode.data) === null || _selectedNode$data2 === void 0 ? void 0 : _selectedNode$data2.slug, ".").concat(schemaItem.name)
        }));
      }
    });
  }
  (0,_scrolled_to_top__WEBPACK_IMPORTED_MODULE_16__["default"])(sidebarRef, ".interface-interface-skeleton__sidebar");
  return /*#__PURE__*/React.createElement("div", {
    ref: sidebarRef
  }, selectedElementsCount === 0 && /*#__PURE__*/React.createElement(_inspector_warning__WEBPACK_IMPORTED_MODULE_7__["default"], null, (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)("No element selected.", "post-expirator")), selectedElementsCount > 1 && !onlyNodesSelected && !onlyEdgesSelected && /*#__PURE__*/React.createElement(_inspector_warning__WEBPACK_IMPORTED_MODULE_7__["default"], null, (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)("Multiple and different elements selected.", "post-expirator")), onlyNodesSelected && selectedElementsCount > 1 && /*#__PURE__*/React.createElement(_inspector_card__WEBPACK_IMPORTED_MODULE_6__["default"], {
    title: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_3__.sprintf)((0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)("%d steps selected", "post-expirator"), selectedElementsCount),
    description: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)("Multiple steps selected.", "post-expirator"),
    icon: /*#__PURE__*/React.createElement(_icons_object_group__WEBPACK_IMPORTED_MODULE_13__["default"], {
      size: 24
    })
  }), onlyEdgesSelected && selectedElementsCount > 1 && /*#__PURE__*/React.createElement(_inspector_card__WEBPACK_IMPORTED_MODULE_6__["default"], {
    title: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_3__.sprintf)((0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)("%d connections selected", "post-expirator"), selectedElementsCount),
    description: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)("Multiple connections selected.", "post-expirator"),
    icon: /*#__PURE__*/React.createElement(_icons_lines_leaning__WEBPACK_IMPORTED_MODULE_14__["default"], {
      size: 24
    })
  }), onlyNodesSelected && selectedElementsCount === 1 && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_node_inspector_card__WEBPACK_IMPORTED_MODULE_5__["default"], {
    node: selectedNode
  }), nodeHasSettings && /*#__PURE__*/React.createElement(_node_settings_panel__WEBPACK_IMPORTED_MODULE_8__["default"], {
    node: selectedNode
  }), /*#__PURE__*/React.createElement(_node_validation_panel__WEBPACK_IMPORTED_MODULE_11__["default"], {
    errors: nodeErrors
  }), isDeveloperModeEnabled && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_node_data_flow_panel__WEBPACK_IMPORTED_MODULE_12__["default"], {
    inputSchema: mappedNodeInputSchema,
    outputSchema: mappedNodeOutputSchema,
    stepScopedVariables: stepScopedVariables
  }), /*#__PURE__*/React.createElement(_node_dev_info_panel__WEBPACK_IMPORTED_MODULE_15__["default"], {
    node: selectedNode,
    nodeType: nodeType
  })), /*#__PURE__*/React.createElement("div", {
    className: "components-tools-panel"
  })), onlyEdgesSelected && selectedElementsCount === 1 && selectedEdge && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_inspector_card__WEBPACK_IMPORTED_MODULE_6__["default"], {
    title: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)("Connection", "post-expirator"),
    description: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)("The connection between nodes in the workflow. Signifies the path along which data or control flow one node to another.", "post-expirator"),
    icon: /*#__PURE__*/React.createElement(_icons_lines_leaning__WEBPACK_IMPORTED_MODULE_14__["default"], {
      size: 24
    }),
    id: selectedEdge.id
  }), /*#__PURE__*/React.createElement("div", {
    className: "components-tools-panel"
  })));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (NodeInspector);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/node-inspector/mapped-field.jsx"
/*!*******************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/node-inspector/mapped-field.jsx ***!
  \*******************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   MappedField: () => (/* binding */ MappedField),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _data_fields_post_query__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../data-fields/post-query */ "./assets/jsx/workflow-editor/components/data-fields/post-query/index.jsx");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _data_fields_schedule__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../data-fields/schedule */ "./assets/jsx/workflow-editor/components/data-fields/schedule.jsx");
/* harmony import */ var _data_fields_debug_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../data-fields/debug-data */ "./assets/jsx/workflow-editor/components/data-fields/debug-data.jsx");
/* harmony import */ var _data_fields_ray_color__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../data-fields/ray-color */ "./assets/jsx/workflow-editor/components/data-fields/ray-color.jsx");
/* harmony import */ var _data_fields_text__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../data-fields/text */ "./assets/jsx/workflow-editor/components/data-fields/text.jsx");
/* harmony import */ var _data_fields_taxonomy_terms__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../data-fields/taxonomy-terms */ "./assets/jsx/workflow-editor/components/data-fields/taxonomy-terms.jsx");
/* harmony import */ var _data_fields_post_status__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../data-fields/post-status */ "./assets/jsx/workflow-editor/components/data-fields/post-status.jsx");
/* harmony import */ var _data_fields_textarea__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../data-fields/textarea */ "./assets/jsx/workflow-editor/components/data-fields/textarea.jsx");
/* harmony import */ var _data_fields_post_input__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../data-fields/post-input */ "./assets/jsx/workflow-editor/components/data-fields/post-input.jsx");
/* harmony import */ var _data_fields_manual_workflow_input__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../data-fields/manual-workflow-input */ "./assets/jsx/workflow-editor/components/data-fields/manual-workflow-input.jsx");
/* harmony import */ var _data_fields_list__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../data-fields/list */ "./assets/jsx/workflow-editor/components/data-fields/list.jsx");
/* harmony import */ var _data_fields_conditional__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../data-fields/conditional */ "./assets/jsx/workflow-editor/components/data-fields/conditional/index.jsx");
/* harmony import */ var _data_fields_debug_levels__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../data-fields/debug-levels */ "./assets/jsx/workflow-editor/components/data-fields/debug-levels.jsx");
/* harmony import */ var _data_fields_expression_builder__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../data-fields/expression-builder */ "./assets/jsx/workflow-editor/components/data-fields/expression-builder/index.jsx");
/* harmony import */ var _data_fields_toggle__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../data-fields/toggle */ "./assets/jsx/workflow-editor/components/data-fields/toggle.jsx");
/* harmony import */ var _data_fields_post_data__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../data-fields/post-data */ "./assets/jsx/workflow-editor/components/data-fields/post-data/index.jsx");
/* harmony import */ var _data_fields_date_offset__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../data-fields/date-offset */ "./assets/jsx/workflow-editor/components/data-fields/date-offset/index.jsx");
/* harmony import */ var _data_fields_ask_confirmation__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../data-fields/ask-confirmation */ "./assets/jsx/workflow-editor/components/data-fields/ask-confirmation.jsx");
/* harmony import */ var _data_fields_user_query__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../data-fields/user-query */ "./assets/jsx/workflow-editor/components/data-fields/user-query.jsx");
/* harmony import */ var _data_fields_post_filter__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../data-fields/post-filter */ "./assets/jsx/workflow-editor/components/data-fields/post-filter/index.jsx");
/* harmony import */ var _data_fields_post_search_query__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../data-fields/post-search-query */ "./assets/jsx/workflow-editor/components/data-fields/post-search-query/index.jsx");
/* harmony import */ var _data_fields_conditional_date_offset__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../data-fields/conditional-date-offset */ "./assets/jsx/workflow-editor/components/data-fields/conditional-date-offset.jsx");
/* harmony import */ var _data_fields_action_args__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../data-fields/action-args */ "./assets/jsx/workflow-editor/components/data-fields/action-args/index.jsx");
/* harmony import */ var _data_fields_integer__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../data-fields/integer */ "./assets/jsx/workflow-editor/components/data-fields/integer.jsx");
/* harmony import */ var _data_fields_custom_options__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../data-fields/custom-options */ "./assets/jsx/workflow-editor/components/data-fields/custom-options/index.jsx");
/* harmony import */ var _data_fields_interactive_custom_options__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../data-fields/interactive-custom-options */ "./assets/jsx/workflow-editor/components/data-fields/interactive-custom-options/index.jsx");
/* harmony import */ var _data_fields_select__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../data-fields/select */ "./assets/jsx/workflow-editor/components/data-fields/select.jsx");




























var MappedField = function MappedField(props) {
  switch (props.type) {
    case "postQuery":
      return /*#__PURE__*/React.createElement(_data_fields_post_query__WEBPACK_IMPORTED_MODULE_0__["default"], props);
    case "postStatus":
      return /*#__PURE__*/React.createElement(_data_fields_post_status__WEBPACK_IMPORTED_MODULE_7__["default"], props);
    case "taxonomyTerms":
      return /*#__PURE__*/React.createElement(_data_fields_taxonomy_terms__WEBPACK_IMPORTED_MODULE_6__["default"], props);
    case "schedule":
      return /*#__PURE__*/React.createElement(_data_fields_schedule__WEBPACK_IMPORTED_MODULE_2__["default"], props);
    case "toggle":
      return /*#__PURE__*/React.createElement(_data_fields_toggle__WEBPACK_IMPORTED_MODULE_15__["default"], props);
    case "debugData":
      return /*#__PURE__*/React.createElement(_data_fields_debug_data__WEBPACK_IMPORTED_MODULE_3__["default"], props);
    case "rayColor":
      return /*#__PURE__*/React.createElement(_data_fields_ray_color__WEBPACK_IMPORTED_MODULE_4__["default"], props);
    case "text":
      return /*#__PURE__*/React.createElement(_data_fields_text__WEBPACK_IMPORTED_MODULE_5__["default"], props);
    case "textarea":
      return /*#__PURE__*/React.createElement(_data_fields_textarea__WEBPACK_IMPORTED_MODULE_8__["default"], props);
    case "postInput":
      return /*#__PURE__*/React.createElement(_data_fields_post_input__WEBPACK_IMPORTED_MODULE_9__["default"], props);
    case "manualWorkflowInput":
      return /*#__PURE__*/React.createElement(_data_fields_manual_workflow_input__WEBPACK_IMPORTED_MODULE_10__["default"], props);
    case "list":
      return /*#__PURE__*/React.createElement(_data_fields_list__WEBPACK_IMPORTED_MODULE_11__["default"], props);
    case "conditional":
      return /*#__PURE__*/React.createElement(_data_fields_conditional__WEBPACK_IMPORTED_MODULE_12__["default"], props);
    case "debugLevels":
      return /*#__PURE__*/React.createElement(_data_fields_debug_levels__WEBPACK_IMPORTED_MODULE_13__["default"], props);
    case "expression":
      return /*#__PURE__*/React.createElement(_data_fields_expression_builder__WEBPACK_IMPORTED_MODULE_14__["default"], props);
    case "postData":
      return /*#__PURE__*/React.createElement(_data_fields_post_data__WEBPACK_IMPORTED_MODULE_16__["default"], props);
    case "dateOffset":
      return /*#__PURE__*/React.createElement(_data_fields_date_offset__WEBPACK_IMPORTED_MODULE_17__["default"], props);
    case "askForConfirmation":
      return /*#__PURE__*/React.createElement(_data_fields_ask_confirmation__WEBPACK_IMPORTED_MODULE_18__["default"], props);
    case "userQuery":
      return /*#__PURE__*/React.createElement(_data_fields_user_query__WEBPACK_IMPORTED_MODULE_19__["default"], props);
    case "postFilter":
      return /*#__PURE__*/React.createElement(_data_fields_post_filter__WEBPACK_IMPORTED_MODULE_20__["default"], props);
    case "postSearchQuery":
      return /*#__PURE__*/React.createElement(_data_fields_post_search_query__WEBPACK_IMPORTED_MODULE_21__["default"], props);
    case "conditionalDateOffset":
      return /*#__PURE__*/React.createElement(_data_fields_conditional_date_offset__WEBPACK_IMPORTED_MODULE_22__["default"], props);
    case "actionArgs":
      return /*#__PURE__*/React.createElement(_data_fields_action_args__WEBPACK_IMPORTED_MODULE_23__["default"], props);
    case "integer":
      return /*#__PURE__*/React.createElement(_data_fields_integer__WEBPACK_IMPORTED_MODULE_24__["default"], props);
    case "customOptions":
      return /*#__PURE__*/React.createElement(_data_fields_custom_options__WEBPACK_IMPORTED_MODULE_25__["default"], props);
    case "interactiveCustomOptions":
      return /*#__PURE__*/React.createElement(_data_fields_interactive_custom_options__WEBPACK_IMPORTED_MODULE_26__.InteractiveCustomOptions, props);
    case "select":
      return /*#__PURE__*/React.createElement(_data_fields_select__WEBPACK_IMPORTED_MODULE_27__["default"], props);
  }
  return /*#__PURE__*/React.createElement("div", {
    className: "description"
  }, /*#__PURE__*/React.createElement("i", {
    className: "dashicons dashicons-warning"
  }), (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.sprintf)((0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Field type %s is not implemented', 'publihspress-future-pro'), props.type));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (MappedField);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/node-inspector/node-data-flow-panel.jsx"
/*!***************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/node-inspector/node-data-flow-panel.jsx ***!
  \***************************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   NodeDataFlowPanel: () => (/* binding */ NodeDataFlowPanel),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _persistent_panel_body__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../persistent-panel-body */ "./assets/jsx/workflow-editor/components/persistent-panel-body/index.jsx");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _workflow_store__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../workflow-store */ "./assets/jsx/workflow-editor/components/workflow-store/index.jsx");
/* harmony import */ var _node_icon__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../node-icon */ "./assets/jsx/workflow-editor/components/node-icon.jsx");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__);
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }







var NodeDataFlowPanel = function NodeDataFlowPanel(_ref) {
  var _ref$inputSchema = _ref.inputSchema,
    inputSchema = _ref$inputSchema === void 0 ? [] : _ref$inputSchema,
    _ref$outputSchema = _ref.outputSchema,
    outputSchema = _ref$outputSchema === void 0 ? [] : _ref$outputSchema,
    _ref$stepScopedVariab = _ref.stepScopedVariables,
    stepScopedVariables = _ref$stepScopedVariab === void 0 ? [] : _ref$stepScopedVariab;
  var _useSelect = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_3__.useSelect)(function (select) {
      return {
        isLoadingWorkflow: select(_workflow_store__WEBPACK_IMPORTED_MODULE_4__.store).isLoadingWorkflow(),
        getDataTypeByName: select(_workflow_store__WEBPACK_IMPORTED_MODULE_4__.store).getDataTypeByName,
        globalVariables: select(_workflow_store__WEBPACK_IMPORTED_MODULE_4__.store).getGlobalVariables()
      };
    }),
    isLoadingWorkflow = _useSelect.isLoadingWorkflow,
    getDataTypeByName = _useSelect.getDataTypeByName,
    globalVariables = _useSelect.globalVariables;
  var globalVariableNames = Object.keys(globalVariables);
  if (!inputSchema) {
    inputSchema = [];
  }
  var Variable = function Variable(_ref2) {
    var schemaItem = _ref2.schemaItem,
      prefix = _ref2.prefix;
    var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_6__.useState)(false),
      _useState2 = _slicedToArray(_useState, 2),
      isOpen = _useState2[0],
      setIsOpen = _useState2[1];
    var togglePopover = function togglePopover() {
      setIsOpen(!isOpen);
    };
    var dataType = getDataTypeByName(schemaItem.type);
    var properties = null;
    if (dataType && dataType.propertiesSchema) {
      properties = dataType.propertiesSchema.map(function (property) {
        var propertyDataType = getDataTypeByName(property.type);
        if (!propertyDataType || !propertyDataType.propertiesSchema) {
          return /*#__PURE__*/React.createElement("li", {
            key: "".concat(schemaItem.name).concat(property.name, "-li")
          }, /*#__PURE__*/React.createElement("code", null, property.name));
        }
        return /*#__PURE__*/React.createElement("li", {
          key: "".concat(schemaItem.name).concat(property.name, "-li")
        }, /*#__PURE__*/React.createElement(Variable, {
          schemaItem: property
        }));
      });
    }
    return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
      className: "workflow-editor-data-flow-variable"
    }, /*#__PURE__*/React.createElement(_node_icon__WEBPACK_IMPORTED_MODULE_5__["default"], {
      icon: isOpen ? 'arrow-down' : 'arrow-right',
      onClick: togglePopover,
      style: {
        cursor: 'pointer'
      }
    }), /*#__PURE__*/React.createElement("code", null, prefix, schemaItem.name), isOpen && properties && /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Animate, {
      type: "slide-in",
      options: {
        origin: 'top'
      }
    }, function (_ref3) {
      var className = _ref3.className;
      return /*#__PURE__*/React.createElement("ul", null, properties);
    })));
  };
  return /*#__PURE__*/React.createElement(_persistent_panel_body__WEBPACK_IMPORTED_MODULE_2__["default"], {
    title: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Step Data Flow", "post-expirator"),
    className: "workflow-editor-dev-panel"
  }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.PanelRow, {
    className: "workflow-editor-inspector-card__handles-schema"
  }, /*#__PURE__*/React.createElement("h3", null, (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Inputs', 'post-expirator')), /*#__PURE__*/React.createElement("div", null, inputSchema.length > 0 && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("This step receives the following input from previous step:", "post-expirator")), /*#__PURE__*/React.createElement("ul", null, inputSchema.map(function (schemaItem, index) {
    return /*#__PURE__*/React.createElement("li", {
      key: "input-".concat(schemaItem.name, "-").concat(index)
    }, /*#__PURE__*/React.createElement(Variable, {
      schemaItem: schemaItem
    }));
  }))), inputSchema.length === 0 && (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("This step does not receive any input from previous step.", "post-expirator"))), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.PanelRow, {
    className: "workflow-editor-inspector-card__handles-schema"
  }, /*#__PURE__*/React.createElement("h3", null, (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Outputs', 'post-expirator')), /*#__PURE__*/React.createElement("div", null, outputSchema.length > 0 && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("This step outputs the following data:", "post-expirator")), /*#__PURE__*/React.createElement("ul", null, outputSchema.map(function (schemaItem, index) {
    return /*#__PURE__*/React.createElement("li", {
      key: "output-".concat(schemaItem.name, "-").concat(index)
    }, /*#__PURE__*/React.createElement(Variable, {
      schemaItem: schemaItem
    }));
  }))), outputSchema.length === 0 && (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("This step does not output any data.", "post-expirator"))), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.PanelRow, {
    className: "workflow-editor-inspector-card__handles-schema"
  }, /*#__PURE__*/React.createElement("h3", null, (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Step Scoped Variables', 'post-expirator')), /*#__PURE__*/React.createElement("div", null, stepScopedVariables.length > 0 && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("This step receives the following step scoped variables:", "post-expirator")), /*#__PURE__*/React.createElement("ul", null, stepScopedVariables.map(function (schemaItem, index) {
    return /*#__PURE__*/React.createElement("li", {
      key: "input-".concat(schemaItem.name, "-").concat(index)
    }, /*#__PURE__*/React.createElement(Variable, {
      schemaItem: schemaItem
    }));
  }))), stepScopedVariables.length === 0 && (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("This step does not have any step scoped variables.", "post-expirator"))), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.PanelRow, {
    className: "workflow-editor-inspector-card__handles-schema"
  }, /*#__PURE__*/React.createElement("h3", null, (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Global Variables', 'post-expirator')), /*#__PURE__*/React.createElement("div", null, !isLoadingWorkflow && globalVariableNames.length === 0 && /*#__PURE__*/React.createElement("div", null, (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('No global variables are declared', 'post-expirator')), !isLoadingWorkflow && globalVariableNames.length > 0 && /*#__PURE__*/React.createElement("ul", null, globalVariableNames.map(function (variableName) {
    return /*#__PURE__*/React.createElement("li", {
      key: "global-".concat(variableName)
    }, /*#__PURE__*/React.createElement(Variable, {
      schemaItem: globalVariables[variableName],
      prefix: "global."
    }));
  })))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (NodeDataFlowPanel);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/node-inspector/node-inspector-card.jsx"
/*!**************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/node-inspector/node-inspector-card.jsx ***!
  \**************************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   NodeInspectorCard: () => (/* binding */ NodeInspectorCard),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _editor_store__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../editor-store */ "./assets/jsx/workflow-editor/components/editor-store/index.jsx");
/* harmony import */ var _inspector_card__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../inspector-card */ "./assets/jsx/workflow-editor/components/inspector-card/index.jsx");
/* harmony import */ var _node_icon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../node-icon */ "./assets/jsx/workflow-editor/components/node-icon.jsx");





var NodeInspectorCard = function NodeInspectorCard(_ref) {
  var _node$data, _nodeType$icon, _node$data2;
  var node = _ref.node;
  var _useSelect = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.useSelect)(function (select) {
      return {
        getNodeTypeByName: select(_editor_store__WEBPACK_IMPORTED_MODULE_2__.store).getNodeTypeByName
      };
    }),
    getNodeTypeByName = _useSelect.getNodeTypeByName;
  var nodeType = getNodeTypeByName(node === null || node === void 0 || (_node$data = node.data) === null || _node$data === void 0 ? void 0 : _node$data.name);
  var nodeLabel = nodeType.label || (node === null || node === void 0 ? void 0 : node.data.label) || (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Node", "post-expirator");
  var nodeDescription = nodeType.description || (node === null || node === void 0 ? void 0 : node.data.description) || (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("No description", "post-expirator");
  var nodeIcon = ((_nodeType$icon = nodeType.icon) === null || _nodeType$icon === void 0 ? void 0 : _nodeType$icon.src) || "media-document";
  var nodeId = node === null || node === void 0 ? void 0 : node.id;
  var nodeSlug = node === null || node === void 0 || (_node$data2 = node.data) === null || _node$data2 === void 0 ? void 0 : _node$data2.slug;
  var Icon = /*#__PURE__*/React.createElement(_node_icon__WEBPACK_IMPORTED_MODULE_4__["default"], {
    icon: nodeIcon
  });
  return /*#__PURE__*/React.createElement(_inspector_card__WEBPACK_IMPORTED_MODULE_3__["default"], {
    title: nodeLabel,
    description: nodeDescription,
    id: nodeId,
    icon: Icon,
    slug: nodeSlug,
    isProFeature: nodeType.isProFeature,
    node: node
  });
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (NodeInspectorCard);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/node-inspector/node-settings-panel.jsx"
/*!**************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/node-inspector/node-settings-panel.jsx ***!
  \**************************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   NodeSettingsPanel: () => (/* binding */ NodeSettingsPanel),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _workflow_store__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../workflow-store */ "./assets/jsx/workflow-editor/components/workflow-store/index.jsx");
/* harmony import */ var _editor_store__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../editor-store */ "./assets/jsx/workflow-editor/components/editor-store/index.jsx");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils */ "./assets/jsx/workflow-editor/utils.jsx");
/* harmony import */ var _mapped_field__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./mapped-field */ "./assets/jsx/workflow-editor/components/node-inspector/mapped-field.jsx");
/* harmony import */ var _persistent_panel_body__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../persistent-panel-body */ "./assets/jsx/workflow-editor/components/persistent-panel-body/index.jsx");
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }








var NodeSettingsPanel = function NodeSettingsPanel(_ref) {
  var _node$data2;
  var node = _ref.node;
  var _useSelect = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_3__.useSelect)(function (select) {
      var _node$data;
      return {
        globalVariables: select(_workflow_store__WEBPACK_IMPORTED_MODULE_1__.store).getGlobalVariables(),
        nodeType: select(_editor_store__WEBPACK_IMPORTED_MODULE_2__.store).getNodeTypeByName(node === null || node === void 0 || (_node$data = node.data) === null || _node$data === void 0 ? void 0 : _node$data.name)
      };
    }),
    globalVariables = _useSelect.globalVariables,
    nodeType = _useSelect.nodeType;
  var _useDispatch = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_3__.useDispatch)(_workflow_store__WEBPACK_IMPORTED_MODULE_1__.store),
    updateNode = _useDispatch.updateNode;
  var onChangeSetting = function onChangeSetting(fieldName, value) {
    var newNode = {
      id: node.id,
      data: {
        settings: _defineProperty({}, fieldName, value)
      }
    };
    updateNode(newNode);
  };
  var nodeSettings = (_node$data2 = node.data) === null || _node$data2 === void 0 ? void 0 : _node$data2.settings;
  if (!nodeSettings) {
    nodeSettings = {};
  }
  var settingsSchema = (nodeType === null || nodeType === void 0 ? void 0 : nodeType.settingsSchema) || {};
  var variableListOptions = (0,_utils__WEBPACK_IMPORTED_MODULE_5__.getNodeVariablesTree)(node, globalVariables);
  var stepScopedVariables = (0,_utils__WEBPACK_IMPORTED_MODULE_5__.getExpandedStepScopedVariables)(node);
  var settingsPanels = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_4__.useMemo)(function () {
    return settingsSchema.map(function (settingPanel) {
      return /*#__PURE__*/React.createElement(_persistent_panel_body__WEBPACK_IMPORTED_MODULE_7__["default"], {
        title: settingPanel.label,
        key: "settings-panel-".concat(node.id, "-").concat(settingPanel.label)
      }, (settingPanel === null || settingPanel === void 0 ? void 0 : settingPanel.description) && /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.PanelRow, null, /*#__PURE__*/React.createElement("div", {
        className: "settings-field-description"
      }, settingPanel === null || settingPanel === void 0 ? void 0 : settingPanel.description)), settingPanel.fields.map(function (field) {
        var _nodeSettings;
        return /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.PanelRow, {
          key: settingPanel.label + '-' + node.id + '-' + field.name
        }, /*#__PURE__*/React.createElement(_mapped_field__WEBPACK_IMPORTED_MODULE_6__["default"], {
          type: field.type,
          name: field.name,
          description: field === null || field === void 0 ? void 0 : field.description,
          helpUrl: field === null || field === void 0 ? void 0 : field.helpUrl,
          label: field.label,
          defaultValue: (_nodeSettings = nodeSettings) === null || _nodeSettings === void 0 ? void 0 : _nodeSettings[field.name],
          onChange: onChangeSetting,
          variables: variableListOptions,
          settings: field === null || field === void 0 ? void 0 : field.settings,
          settingsSchema: settingsSchema,
          node: node,
          stepScopedVariables: stepScopedVariables
        }));
      }));
    });
  }, [settingsSchema, nodeSettings]);
  return /*#__PURE__*/React.createElement(React.Fragment, null, settingsPanels);
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (NodeSettingsPanel);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/node-types/generic.jsx"
/*!**********************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/node-types/generic.jsx ***!
  \**********************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   GenericNode: () => (/* binding */ GenericNode),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var reactflow__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! reactflow */ "./node_modules/@reactflow/core/dist/esm/index.mjs");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _node_icon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../node-icon */ "./assets/jsx/workflow-editor/components/node-icon.jsx");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _workflow_store__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../workflow-store */ "./assets/jsx/workflow-editor/components/workflow-store/index.jsx");
/* harmony import */ var _editor_store__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../editor-store */ "./assets/jsx/workflow-editor/components/editor-store/index.jsx");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var _icons_play__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../icons/play */ "./assets/jsx/workflow-editor/components/icons/play.jsx");
/* harmony import */ var _settings_sidebar_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../settings-sidebar/constants */ "./assets/jsx/workflow-editor/components/settings-sidebar/constants.jsx");
/* harmony import */ var _contexts_pro_context__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../contexts/pro-context */ "./assets/jsx/workflow-editor/contexts/pro-context.jsx");
/* harmony import */ var json_logic_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! json-logic-js */ "./node_modules/json-logic-js/logic.js");
/* harmony import */ var json_logic_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(json_logic_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../constants */ "./assets/jsx/workflow-editor/constants.jsx");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../utils */ "./assets/jsx/workflow-editor/utils.jsx");














var GenericNode = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.memo)(function (_ref) {
  var _nodeType;
  var id = _ref.id,
    data = _ref.data,
    isConnectable = _ref.isConnectable,
    selected = _ref.selected,
    nodeTypeIcon = _ref.nodeTypeIcon;
  var _useSelect = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_3__.useSelect)(function (select) {
      var nodeErrors = select(_workflow_store__WEBPACK_IMPORTED_MODULE_4__.store).getNodeErrors(id);
      var selectedElementsCount = select(_workflow_store__WEBPACK_IMPORTED_MODULE_4__.store).getSelectedElementsCount();
      return {
        nodeHasErrors: Object.keys(nodeErrors).length > 0,
        isAdvancedSettingsEnabled: true,
        isSingularElementSelected: selectedElementsCount === 1,
        getNodeTypeByName: select(_editor_store__WEBPACK_IMPORTED_MODULE_5__.store).getNodeTypeByName
      };
    }),
    nodeHasErrors = _useSelect.nodeHasErrors,
    isAdvancedSettingsEnabled = _useSelect.isAdvancedSettingsEnabled,
    isSingularElementSelected = _useSelect.isSingularElementSelected,
    getNodeTypeByName = _useSelect.getNodeTypeByName;
  var updateNodeInternals = (0,reactflow__WEBPACK_IMPORTED_MODULE_0__.useUpdateNodeInternals)();
  var isPro = (0,_contexts_pro_context__WEBPACK_IMPORTED_MODULE_10__.useIsPro)();
  var _useDispatch = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_3__.useDispatch)(_workflow_store__WEBPACK_IMPORTED_MODULE_4__.store),
    removeNode = _useDispatch.removeNode;
  var _useDispatch2 = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_3__.useDispatch)(_editor_store__WEBPACK_IMPORTED_MODULE_5__.store),
    openGeneralSidebar = _useDispatch2.openGeneralSidebar;
  var previousHandlesCountRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useRef)();
  var previousSourceHandlesRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useRef)();
  var nodeType = getNodeTypeByName(data.name);
  if (!nodeType || !nodeType.handleSchema) {
    nodeType = {
      "id": Math.floor(Math.random() * 1000000),
      "type": "generic",
      "elementaryType": "action",
      "name": data.name,
      "label": sprintf((0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_6__.__)('Unknown node: %s', 'post-expirator'), data.name),
      "description": (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_6__.__)('This is a placeholder node for a node that does not exist.', 'post-expirator'),
      "baseSlug": "deletePost",
      "initiatlAttributes": [],
      "category": "post",
      "disabled": false,
      "isDisabled": false,
      "frecency": 1,
      "icon": {
        "src": "media-document",
        "background": "#ffffff",
        "foreground": "#1e1e1e"
      },
      "version": 1,
      "settingsSchema": [],
      "outputSchema": [{
        "name": "input",
        "type": "input",
        "label": "Step input",
        "description": "The input data for this step."
      }],
      "className": "react-flow__node-unknownNode",
      "handleSchema": {
        "target": [{
          "id": "input",
          "left": "50%"
        }],
        "source": [{
          "id": "output",
          "left": "50%",
          "label": "Next"
        }]
      },
      "isProFeature": false,
      "validationSchema": {
        "connections": {
          "rules": []
        },
        "settings": {
          "rules": []
        }
      }
    };
  }
  var nodeDescription = data === null || data === void 0 ? void 0 : data.label;
  var nodeLabel = nodeType.label || (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_6__.__)('Node', 'post-expirator');
  var nodeClassName = ((_nodeType = nodeType) === null || _nodeType === void 0 ? void 0 : _nodeType.className) || 'react-flow__node-genericNode';
  var targetHandles;
  var handlesToDisplay;
  if (nodeType.handleSchema) {
    if (nodeType.handleSchema.target) {
      var originalTargetHandles = (0,_utils__WEBPACK_IMPORTED_MODULE_13__.getNodeHandleSchema)(nodeType, data, 'target');
      handlesToDisplay = filterHandlesByConditions(originalTargetHandles, data);
      (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
        if (previousHandlesCountRef.current !== handlesToDisplay.length) {
          previousHandlesCountRef.current = handlesToDisplay.length;
          var event = new CustomEvent(_constants__WEBPACK_IMPORTED_MODULE_12__.CUSTOM_EVENT_HANDLES_COUNT_CHANGED, {
            detail: {
              nodeId: id,
              handlesCount: handlesToDisplay.length,
              handles: handlesToDisplay,
              originalHandles: originalTargetHandles,
              type: 'target'
            }
          });
          document.dispatchEvent(event);
          updateNodeInternals(id);
        }
      }, [handlesToDisplay, updateNodeInternals]);
      targetHandles = handlesToDisplay.map(function (handle, index) {
        var left = calculateLeftPosition(index, handlesToDisplay.length);
        if (!(handle !== null && handle !== void 0 && handle.id)) {
          return null;
        }
        return /*#__PURE__*/React.createElement(reactflow__WEBPACK_IMPORTED_MODULE_0__.Handle, {
          key: handle.id + '_target',
          type: "target",
          position: reactflow__WEBPACK_IMPORTED_MODULE_0__.Position.Top,
          id: handle.id,
          style: {
            left: "".concat(left)
          },
          isConnectable: isConnectable,
          className: 'handle-target-' + handle.id
        });
      });
    }
  }
  var sourceHandles = null;
  var handleAreas = null;
  if (nodeType.handleSchema) {
    if (nodeType.handleSchema.source) {
      var originalSourceHandles = (0,_utils__WEBPACK_IMPORTED_MODULE_13__.getNodeHandleSchema)(nodeType, data, 'source');
      handlesToDisplay = filterHandlesByConditions(originalSourceHandles, data);
      (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
        if (previousHandlesCountRef.current !== handlesToDisplay.length) {
          previousHandlesCountRef.current = handlesToDisplay.length;
          var event = new CustomEvent(_constants__WEBPACK_IMPORTED_MODULE_12__.CUSTOM_EVENT_HANDLES_COUNT_CHANGED, {
            detail: {
              nodeId: id,
              handlesCount: handlesToDisplay.length,
              handles: handlesToDisplay,
              originalHandles: originalSourceHandles,
              type: 'source'
            }
          });
          document.dispatchEvent(event);
          updateNodeInternals(id);
        }

        // Detect if the handles ids have changed
        if (previousSourceHandlesRef.current) {
          var handlesChanged = previousSourceHandlesRef.current.some(function (prevHandle, index) {
            var currentHandle = handlesToDisplay[index];
            return !currentHandle || prevHandle.id !== currentHandle.id;
          });
          if (handlesChanged) {
            previousSourceHandlesRef.current = handlesToDisplay;
            updateNodeInternals(id);
          }
        }
        if (!previousSourceHandlesRef.current) {
          previousSourceHandlesRef.current = handlesToDisplay;
        }
      }, [handlesToDisplay, updateNodeInternals]);
      sourceHandles = handlesToDisplay.map(function (handle, index) {
        var left = calculateLeftPosition(index, handlesToDisplay.length);
        if (!(handle !== null && handle !== void 0 && handle.id)) {
          return null;
        }
        return /*#__PURE__*/React.createElement(reactflow__WEBPACK_IMPORTED_MODULE_0__.Handle, {
          key: handle.id + '_source',
          type: "source",
          position: reactflow__WEBPACK_IMPORTED_MODULE_0__.Position.Bottom,
          id: handle.id,
          style: {
            left: "".concat(left)
          },
          isConnectable: isConnectable,
          className: 'handle-source-' + handle.id
        });
      });
      handleAreas = handlesToDisplay.map(function (handle) {
        if (!(handle !== null && handle !== void 0 && handle.id)) {
          return null;
        }
        return /*#__PURE__*/React.createElement("div", {
          key: handle.id + 'handleArea',
          className: 'react-flow__node-handle-name handle-area-source-' + handle.id
        }, handle.label);
      });
    }
  }
  var topText = (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_6__.__)('Step', 'post-expirator');
  if (data.elementaryType === 'action') {
    topText = (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_6__.__)('Action', 'post-expirator');
  } else if (data.elementaryType === 'advanced') {
    topText = (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_6__.__)('Advanced', 'post-expirator');
  } else if (data.elementaryType === 'trigger') {
    topText = (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_6__.__)('Trigger', 'post-expirator');
  }
  var nodeAttributes = [];
  var onClickDeleteNode = function onClickDeleteNode() {
    removeNode(id);
  };
  var onDoubleClick = function onDoubleClick() {
    if (isSingularElementSelected) {
      openGeneralSidebar(_settings_sidebar_constants__WEBPACK_IMPORTED_MODULE_9__.SIDEBAR_NODE_EDGE);
    }
  };
  if (!nodeTypeIcon) {
    nodeTypeIcon = /*#__PURE__*/React.createElement(_icons_play__WEBPACK_IMPORTED_MODULE_8__["default"], {
      size: 8
    });
  }

  // Unfocus the tolbar button when the node is selected
  var nodeRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
    if (selected && isSingularElementSelected) {
      setTimeout(function () {
        jQuery(nodeRef.current.parentNode).focus();
      }, 100);
    }
  }, [selected, isSingularElementSelected]);
  return /*#__PURE__*/React.createElement(React.Fragment, null, selected && isSingularElementSelected && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.Popover, {
    placement: "top-start",
    offset: 14
  }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.Toolbar, {
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_6__.__)('Step actions', 'post-expirator'),
    className: "components-accessible-toolbar block-editor-block-contextual-toolbar react-flow__node-toolbar"
  }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.ToolbarGroup, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.ToolbarButton, {
    icon: 'trash',
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_6__.__)('Delete', 'post-expirator'),
    onClick: onClickDeleteNode,
    accessibleWhenDisabled: true
  }))))), /*#__PURE__*/React.createElement("div", {
    className: "react-flow__node-body " + nodeClassName,
    onDoubleClick: onDoubleClick,
    ref: nodeRef
  }, targetHandles, /*#__PURE__*/React.createElement("div", {
    className: "react-flow__node-top"
  }, nodeTypeIcon, topText, ": ", /*#__PURE__*/React.createElement("span", {
    className: "node-slug"
  }, data.slug)), /*#__PURE__*/React.createElement("div", {
    className: nodeDescription ? 'react-flow__node-inner-body with-description' : 'react-flow__node-inner-body'
  }, (nodeHasErrors || nodeType.isProFeature && !isPro) && /*#__PURE__*/React.createElement("div", {
    className: "react-flow__node-marker-wrapper"
  }, nodeType.isProFeature && !isPro && /*#__PURE__*/React.createElement("div", {
    className: "react-flow__node-pro-badge",
    title: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_6__.__)('Currently this step is being skipped. Upgrade to Pro to unlock this feature.', 'post-expirator')
  }, /*#__PURE__*/React.createElement(_node_icon__WEBPACK_IMPORTED_MODULE_2__["default"], {
    icon: 'lock',
    iconSize: 8
  })), nodeHasErrors && /*#__PURE__*/React.createElement("div", {
    className: "react-flow__node-error",
    title: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_6__.__)('This node has errors', 'post-expirator')
  }, /*#__PURE__*/React.createElement(_node_icon__WEBPACK_IMPORTED_MODULE_2__["default"], {
    icon: 'exclamation',
    iconSize: 8
  }))), /*#__PURE__*/React.createElement("div", {
    className: "react-flow__node-header"
  }, /*#__PURE__*/React.createElement(_node_icon__WEBPACK_IMPORTED_MODULE_2__["default"], {
    icon: nodeType.icon.src,
    iconSize: 14
  }), /*#__PURE__*/React.createElement("div", {
    className: "react-flow__node-label"
  }, nodeLabel)), nodeDescription && /*#__PURE__*/React.createElement("div", {
    className: "react-flow__node-description"
  }, nodeDescription), isAdvancedSettingsEnabled && nodeAttributes.length > 0 && /*#__PURE__*/React.createElement("div", {
    className: "react-flow__node-content"
  }, /*#__PURE__*/React.createElement("table", null, /*#__PURE__*/React.createElement("tbody", null, nodeAttributes.map(function (attribute) {
    return /*#__PURE__*/React.createElement("tr", {
      key: 'attribute_' + attribute.id
    }, /*#__PURE__*/React.createElement("th", null, attribute.label), /*#__PURE__*/React.createElement("td", null, attribute.value));
  }))))), /*#__PURE__*/React.createElement("div", {
    className: "react-flow__node-handle-area"
  }, handleAreas), sourceHandles));
});
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (GenericNode);
function filterHandlesByConditions(handles, data) {
  return handles === null || handles === void 0 ? void 0 : handles.filter(function (handle) {
    if (handle !== null && handle !== void 0 && handle.conditions) {
      return json_logic_js__WEBPACK_IMPORTED_MODULE_11___default().apply(handle.conditions, data.settings);
    }
    return true;
  });
}
function calculateLeftOffset(handlesCount) {
  var leftOffset = 100 / handlesCount / 2;
  return leftOffset;
}
function calculateLeftPosition(index, handlesCount) {
  var leftOffset = calculateLeftOffset(handlesCount);
  var left = leftOffset + 100 / handlesCount * index;
  return "".concat(left, "%");
}

/***/ },

/***/ "./assets/jsx/workflow-editor/components/node-types/node-placeholder.jsx"
/*!*******************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/node-types/node-placeholder.jsx ***!
  \*******************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   NodePlaceholder: () => (/* binding */ NodePlaceholder),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../constants */ "./assets/jsx/workflow-editor/constants.jsx");
/* harmony import */ var _workflow_store__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../workflow-store */ "./assets/jsx/workflow-editor/components/workflow-store/index.jsx");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _placeholder__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./placeholder */ "./assets/jsx/workflow-editor/components/node-types/placeholder.jsx");
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }






var NodePlaceholder = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.memo)(function (props) {
  var _useSelect = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useSelect)(function (select) {
      var draggingFromHandle = select(_workflow_store__WEBPACK_IMPORTED_MODULE_3__.store).getDraggingFromHandle();
      return {
        draggingFromHandle: draggingFromHandle
      };
    }),
    draggingFromHandle = _useSelect.draggingFromHandle;
  var elementaryTypes = draggingFromHandle.handleType === _constants__WEBPACK_IMPORTED_MODULE_2__.HANDLE_TYPE_SOURCE ? [_constants__WEBPACK_IMPORTED_MODULE_2__.NODE_TYPE_ACTION, _constants__WEBPACK_IMPORTED_MODULE_2__.NODE_TYPE_ADVANCED] : [_constants__WEBPACK_IMPORTED_MODULE_2__.NODE_TYPE_TRIGGER, _constants__WEBPACK_IMPORTED_MODULE_2__.NODE_TYPE_ACTION, _constants__WEBPACK_IMPORTED_MODULE_2__.NODE_TYPE_ADVANCED];
  return /*#__PURE__*/React.createElement(_placeholder__WEBPACK_IMPORTED_MODULE_5__.Placeholder, _extends({}, props, {
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Add a step', 'post-expirator'),
    popoverIsOpen: true,
    searchLabel: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Search for actions', 'post-expirator'),
    elementaryTypes: elementaryTypes
  }));
});
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (NodePlaceholder);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/node-types/placeholder.jsx"
/*!**************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/node-types/placeholder.jsx ***!
  \**************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   Placeholder: () => (/* binding */ Placeholder),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _secondary_sidebar_nodes_tab__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../secondary-sidebar/nodes-tab */ "./assets/jsx/workflow-editor/components/secondary-sidebar/nodes-tab.jsx");
/* harmony import */ var _editor_store__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../editor-store */ "./assets/jsx/workflow-editor/components/editor-store/index.jsx");
/* harmony import */ var _workflow_store__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../workflow-store */ "./assets/jsx/workflow-editor/components/workflow-store/index.jsx");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../constants */ "./assets/jsx/workflow-editor/constants.jsx");
/* harmony import */ var _secondary_sidebar_inserter_search_results__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../secondary-sidebar/inserter-search-results */ "./assets/jsx/workflow-editor/components/secondary-sidebar/inserter-search-results.jsx");
/* harmony import */ var reactflow__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! reactflow */ "./node_modules/@reactflow/core/dist/esm/index.mjs");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../utils */ "./assets/jsx/workflow-editor/utils.jsx");
/* harmony import */ var _icons_plus__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../icons/plus */ "./assets/jsx/workflow-editor/components/icons/plus.jsx");
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }












var Placeholder = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.memo)(function (_ref) {
  var id = _ref.id,
    label = _ref.label,
    _ref$popoverIsOpen = _ref.popoverIsOpen,
    popoverIsOpen = _ref$popoverIsOpen === void 0 ? false : _ref$popoverIsOpen,
    searchLabel = _ref.searchLabel,
    elementaryTypes = _ref.elementaryTypes;
  var nodeLabel = label || '';
  var nodeId = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
  var searchControlRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
  var reactFlowInstance = (0,reactflow__WEBPACK_IMPORTED_MODULE_9__.useReactFlow)();
  var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(popoverIsOpen),
    _useState2 = _slicedToArray(_useState, 2),
    inserterIsOpen = _useState2[0],
    setInserterIsOpen = _useState2[1];
  var _useState3 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(''),
    _useState4 = _slicedToArray(_useState3, 2),
    filterValue = _useState4[0],
    setFilterValue = _useState4[1];
  var _useSelect = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_6__.useSelect)(function (select) {
      var triggerNodes = select(_editor_store__WEBPACK_IMPORTED_MODULE_4__.store).getTriggerNodes();
      var actionNodes = select(_editor_store__WEBPACK_IMPORTED_MODULE_4__.store).getActionNodes();
      var advancedNodes = select(_editor_store__WEBPACK_IMPORTED_MODULE_4__.store).getAdvancedNodes();
      var items = [];
      if (!elementaryTypes) {
        items = [].concat(_toConsumableArray(triggerNodes), _toConsumableArray(actionNodes), _toConsumableArray(advancedNodes));
      } else {
        if (elementaryTypes.includes(_constants__WEBPACK_IMPORTED_MODULE_7__.NODE_TYPE_TRIGGER)) {
          items = items.concat(triggerNodes);
        }
        if (elementaryTypes.includes(_constants__WEBPACK_IMPORTED_MODULE_7__.NODE_TYPE_ACTION)) {
          items = items.concat(actionNodes);
        }
        if (elementaryTypes.includes(_constants__WEBPACK_IMPORTED_MODULE_7__.NODE_TYPE_ADVANCED)) {
          items = items.concat(advancedNodes);
        }
      }
      return {
        nodes: select(_workflow_store__WEBPACK_IMPORTED_MODULE_5__.store).getNodes(),
        edges: select(_workflow_store__WEBPACK_IMPORTED_MODULE_5__.store).getEdges(),
        items: items,
        categories: select(_editor_store__WEBPACK_IMPORTED_MODULE_4__.store).getTriggerCategories(),
        isSidebarInserterOpen: select(_editor_store__WEBPACK_IMPORTED_MODULE_4__.store).isFeatureActive(_constants__WEBPACK_IMPORTED_MODULE_7__.FEATURE_INSERTER),
        draggingFromHandle: select(_workflow_store__WEBPACK_IMPORTED_MODULE_5__.store).getDraggingFromHandle(),
        getNodeTypeByName: select(_editor_store__WEBPACK_IMPORTED_MODULE_4__.store).getNodeTypeByName
      };
    }),
    nodes = _useSelect.nodes,
    edges = _useSelect.edges,
    items = _useSelect.items,
    categories = _useSelect.categories,
    isSidebarInserterOpen = _useSelect.isSidebarInserterOpen,
    draggingFromHandle = _useSelect.draggingFromHandle,
    getNodeTypeByName = _useSelect.getNodeTypeByName;
  var _useDispatch = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_6__.useDispatch)(_workflow_store__WEBPACK_IMPORTED_MODULE_5__.store),
    setEdges = _useDispatch.setEdges,
    setDraggingFromHandle = _useDispatch.setDraggingFromHandle,
    removePlaceholderNodes = _useDispatch.removePlaceholderNodes;
  var _useDispatch2 = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_6__.useDispatch)(_editor_store__WEBPACK_IMPORTED_MODULE_4__.store),
    enableFeature = _useDispatch2.enableFeature;
  var onClickAddButton = function onClickAddButton(event) {
    event.stopPropagation();
    setInserterIsOpen(true);
  };
  var onSelectItem = function onSelectItem(item) {
    var placeholderNode = (0,_utils__WEBPACK_IMPORTED_MODULE_10__.getNodeById)(nodeId.current, nodes);
    var position = {
      x: placeholderNode.position.x,
      y: placeholderNode.position.y
    };
    var newNode = (0,_utils__WEBPACK_IMPORTED_MODULE_10__.createNewNode)({
      item: item,
      position: position,
      reactFlowInstance: reactFlowInstance
    });
    if (draggingFromHandle !== null && draggingFromHandle !== void 0 && draggingFromHandle.sourceId) {
      // Get the node type of the target node
      var nodeType = getNodeTypeByName(newNode.data.name);
      var firstTargetHandleId;
      var newEdgeParams;
      if (draggingFromHandle.handleType === _constants__WEBPACK_IMPORTED_MODULE_7__.HANDLE_TYPE_SOURCE) {
        // When dragging from a source handle we are connecting to a lower level handle, to the target handle.
        firstTargetHandleId = nodeType.handleSchema.target[0].id;
        newEdgeParams = {
          source: draggingFromHandle.sourceId,
          sourceHandle: draggingFromHandle.handleId,
          target: newNode.id,
          targetHandle: firstTargetHandleId,
          type: 'genericEdge',
          id: "".concat(draggingFromHandle.sourceId, "-").concat(draggingFromHandle.handleId, "-").concat(newNode.id, "-").concat(firstTargetHandleId),
          markerEnd: {
            type: reactflow__WEBPACK_IMPORTED_MODULE_9__.MarkerType.ArrowClosed
          }
        };
      } else {
        // When dragging from a target handle we are connecting to a higher level handle, to the source handle.
        firstTargetHandleId = nodeType.handleSchema.source[0].id;
        newEdgeParams = {
          source: newNode.id,
          sourceHandle: firstTargetHandleId,
          target: draggingFromHandle.sourceId,
          targetHandle: draggingFromHandle.handleId,
          type: 'genericEdge',
          id: "".concat(newNode.id, "-").concat(firstTargetHandleId, "-").concat(draggingFromHandle.sourceId, "-").concat(draggingFromHandle.handleId),
          markerEnd: {
            type: reactflow__WEBPACK_IMPORTED_MODULE_9__.MarkerType.ArrowClosed
          }
        };
      }
      setEdges((0,reactflow__WEBPACK_IMPORTED_MODULE_9__.addEdge)(newEdgeParams, edges));
      setDraggingFromHandle({
        sourceId: null,
        sourceHandle: null,
        handleType: null
      });
    }
  };
  var onClosePopup = function onClosePopup() {
    setInserterIsOpen(false);
    removePlaceholderNodes();
  };
  var onBrowseAll = function onBrowseAll() {
    enableFeature(_constants__WEBPACK_IMPORTED_MODULE_7__.FEATURE_INSERTER);
    removePlaceholderNodes();
  };
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
    if (!nodeId.current) {
      nodeId.current = id;
    }
    window.addEventListener('keydown', function (event) {
      if (event.key === 'Escape' || event.keyCode === 27) {
        onClosePopup();
      }
    });
  }, []);
  if (!searchLabel) {
    searchLabel = (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Search for steps', 'post-expirator');
  }
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
    if (inserterIsOpen) {
      var _searchControlRef$cur;
      (_searchControlRef$cur = searchControlRef.current) === null || _searchControlRef$cur === void 0 || _searchControlRef$cur.focus();
    } else {
      // If open the inserter by default, we remove the placeholder when it is closed
      if (popoverIsOpen) {
        removePlaceholderNodes();
      }
    }
  }, [inserterIsOpen]);
  return /*#__PURE__*/React.createElement(React.Fragment, null, inserterIsOpen && /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Popover, {
    placement: "bottom-start",
    offset: 14,
    className: "react-flow__node-inserter-popover"
  }, /*#__PURE__*/React.createElement("div", {
    className: "react-flow__node-inserter-popover-content"
  }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.SearchControl, {
    ref: searchControlRef,
    className: "block-editor-inserter__search",
    onChange: function onChange(value) {
      setFilterValue(value);
    },
    value: filterValue,
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Search for triggers and steps', 'post-expirator'),
    placeholder: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Search')
  }), !!filterValue && /*#__PURE__*/React.createElement(_secondary_sidebar_inserter_search_results__WEBPACK_IMPORTED_MODULE_8__["default"], {
    filterValue: filterValue,
    onSelect: onSelectItem,
    filterTypes: elementaryTypes
  }), !filterValue && /*#__PURE__*/React.createElement("div", {
    className: "block-editor-inserter__block-list"
  }, /*#__PURE__*/React.createElement(_secondary_sidebar_nodes_tab__WEBPACK_IMPORTED_MODULE_3__.NodesTab, {
    type: _constants__WEBPACK_IMPORTED_MODULE_7__.INSERTER_TAB_TRIGGERS,
    onSelect: onSelectItem,
    items: items,
    showMostUsedNodes: true,
    categories: []
  }))), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Button, {
    onClick: onBrowseAll,
    className: "react-flow__node-inserter-popover-close"
  }, (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Browse all'))), /*#__PURE__*/React.createElement("div", {
    className: "react-flow__node-body react-flow__node-triggerPlaceholderNode",
    onClick: onClickAddButton
  }, /*#__PURE__*/React.createElement("div", {
    className: "react-flow__node-inner-body"
  }, /*#__PURE__*/React.createElement("div", {
    className: "react-flow__node-header"
  }, /*#__PURE__*/React.createElement("div", {
    className: "icon"
  }, /*#__PURE__*/React.createElement(_icons_plus__WEBPACK_IMPORTED_MODULE_11__["default"], {
    size: 12
  })), /*#__PURE__*/React.createElement("div", {
    className: "react-flow__node-label"
  }, nodeLabel)))));
});
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Placeholder);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/node-types/trigger-placeholder.jsx"
/*!**********************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/node-types/trigger-placeholder.jsx ***!
  \**********************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   TriggerPlaceholder: () => (/* binding */ TriggerPlaceholder),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _placeholder__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./placeholder */ "./assets/jsx/workflow-editor/components/node-types/placeholder.jsx");
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../constants */ "./assets/jsx/workflow-editor/constants.jsx");
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }




var TriggerPlaceholder = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.memo)(function (props) {
  return /*#__PURE__*/React.createElement(_placeholder__WEBPACK_IMPORTED_MODULE_2__["default"], _extends({}, props, {
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Click to add a trigger', 'post-expirator'),
    popoverIsOpen: false,
    searchLabel: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Search for triggers and steps', 'post-expirator'),
    elementaryTypes: [_constants__WEBPACK_IMPORTED_MODULE_3__.NODE_TYPE_TRIGGER]
  }));
});
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (TriggerPlaceholder);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/node-types/trigger.jsx"
/*!**********************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/node-types/trigger.jsx ***!
  \**********************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   TriggerNode: () => (/* binding */ TriggerNode),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _generic__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./generic */ "./assets/jsx/workflow-editor/components/node-types/generic.jsx");
/* harmony import */ var _icons_energy__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../icons/energy */ "./assets/jsx/workflow-editor/components/icons/energy.jsx");
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }




var TriggerNode = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.memo)(function (props) {
  var icon = /*#__PURE__*/React.createElement(_icons_energy__WEBPACK_IMPORTED_MODULE_3__["default"], {
    size: 8
  });
  return /*#__PURE__*/React.createElement(_generic__WEBPACK_IMPORTED_MODULE_2__["default"], _extends({}, props, {
    nodeTypeIcon: icon
  }));
});
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (TriggerNode);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/node-validation-panel/index.jsx"
/*!*******************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/node-validation-panel/index.jsx ***!
  \*******************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   NodeValidationPanel: () => (/* binding */ NodeValidationPanel),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _node_icon__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../node-icon */ "./assets/jsx/workflow-editor/components/node-icon.jsx");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _persistent_panel_body__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../persistent-panel-body */ "./assets/jsx/workflow-editor/components/persistent-panel-body/index.jsx");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _style_css__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./style.css */ "./assets/jsx/workflow-editor/components/node-validation-panel/style.css");
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }






function NodeValidationPanel(_ref) {
  var _ref$errors = _ref.errors,
    errors = _ref$errors === void 0 ? {} : _ref$errors;
  var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_4__.useState)(false),
    _useState2 = _slicedToArray(_useState, 2),
    isDetailsOpen = _useState2[0],
    setIsDetailsOpen = _useState2[1];
  var iconSize = 18;
  var nodeErrors = Object.values(errors);
  var hasNotifications = nodeErrors.length > 0;
  return /*#__PURE__*/React.createElement(_persistent_panel_body__WEBPACK_IMPORTED_MODULE_3__["default"], {
    title: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Validation', 'post-expirator'),
    className: "workflow-editor-validation-panel"
  }, hasNotifications && /*#__PURE__*/React.createElement(React.Fragment, null, nodeErrors.map(function (error, index) {
    return /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.PanelRow, {
      key: "".concat(error.error, "-").concat(index),
      className: "workflow-editor-validation-notification workflow-editor-error"
    }, /*#__PURE__*/React.createElement(_node_icon__WEBPACK_IMPORTED_MODULE_0__["default"], {
      icon: 'error',
      size: iconSize
    }), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
      className: "workflow-editor-validation-notification-header"
    }, /*#__PURE__*/React.createElement("div", {
      className: "workflow-editor-validation-notification-message"
    }, error.message), error.details && /*#__PURE__*/React.createElement("span", {
      className: "workflow-editor-validation-notification-details-toggle",
      onClick: function onClick() {
        return setIsDetailsOpen(!isDetailsOpen);
      }
    }, /*#__PURE__*/React.createElement(_node_icon__WEBPACK_IMPORTED_MODULE_0__["default"], {
      icon: isDetailsOpen ? 'arrow-down' : 'arrow-right',
      size: iconSize
    }))), error.details && isDetailsOpen && /*#__PURE__*/React.createElement("div", {
      className: "workflow-editor-validation-notification-details"
    }, error.details)));
  })), !hasNotifications && /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.PanelRow, {
    className: "workflow-editor-validation-notification workflow-editor-success"
  }, /*#__PURE__*/React.createElement(_node_icon__WEBPACK_IMPORTED_MODULE_0__["default"], {
    icon: 'yes-alt',
    size: iconSize
  }), (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('All checks have passed for this step.', 'post-expirator')));
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (NodeValidationPanel);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/node-validation-panel/style.css"
/*!*******************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/node-validation-panel/style.css ***!
  \*******************************************************************************/
(__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 export */ });
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ "./node_modules/style-loader/dist/runtime/styleDomAPI.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../../../node_modules/style-loader/dist/runtime/insertBySelector.js */ "./node_modules/style-loader/dist/runtime/insertBySelector.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ "./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ "./node_modules/style-loader/dist/runtime/insertStyleElement.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ "./node_modules/style-loader/dist/runtime/styleTagTransform.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_postcss_loader_dist_cjs_js_style_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/postcss-loader/dist/cjs.js!./style.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js!./assets/jsx/workflow-editor/components/node-validation-panel/style.css");

      
      
      
      
      
      
      
      
      

var options = {};

options.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());
options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());
options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head");
options.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());
options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());

var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_postcss_loader_dist_cjs_js_style_css__WEBPACK_IMPORTED_MODULE_6__["default"], options);




       /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_node_modules_postcss_loader_dist_cjs_js_style_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_node_modules_postcss_loader_dist_cjs_js_style_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_node_modules_postcss_loader_dist_cjs_js_style_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined);


/***/ },

/***/ "./assets/jsx/workflow-editor/components/node-validator/index.jsx"
/*!************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/node-validator/index.jsx ***!
  \************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   NodeValidator: () => (/* binding */ NodeValidator),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _workflow_store__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../workflow-store */ "./assets/jsx/workflow-editor/components/workflow-store/index.jsx");
/* harmony import */ var _editor_store__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../editor-store */ "./assets/jsx/workflow-editor/components/editor-store/index.jsx");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils */ "./assets/jsx/workflow-editor/utils.jsx");
/* harmony import */ var validator_lib_isEmail__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! validator/lib/isEmail */ "./node_modules/validator/lib/isEmail.js");
/* harmony import */ var validator_lib_isEmail__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(validator_lib_isEmail__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var validator_lib_isInt__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! validator/lib/isInt */ "./node_modules/validator/lib/isInt.js");
/* harmony import */ var validator_lib_isInt__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(validator_lib_isInt__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/compose */ "./node_modules/@wordpress/compose/build-module/hooks/use-debounce/index.js");
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _objectDestructuringEmpty(t) { if (null == t) throw new TypeError("Cannot destructure " + t); }










function isVariable(value) {
  var trimmedValue = value.trim();
  return trimmedValue.startsWith('{{') && trimmedValue.endsWith('}}');
}
var DEBOUNCE_TIME = 250;
function NodeValidator(_ref) {
  _objectDestructuringEmpty(_ref);
  var _useSelect = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_2__.useSelect)(function (select) {
      return {
        nodes: select(_workflow_store__WEBPACK_IMPORTED_MODULE_0__.store).getNodes(),
        edges: select(_workflow_store__WEBPACK_IMPORTED_MODULE_0__.store).getEdges(),
        getNodeTypeByName: select(_editor_store__WEBPACK_IMPORTED_MODULE_1__.store).getNodeTypeByName,
        globalVariables: select(_workflow_store__WEBPACK_IMPORTED_MODULE_0__.store).getGlobalVariables()
      };
    }),
    nodes = _useSelect.nodes,
    edges = _useSelect.edges,
    getNodeTypeByName = _useSelect.getNodeTypeByName,
    globalVariables = _useSelect.globalVariables;
  var _useDispatch = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_2__.useDispatch)(_workflow_store__WEBPACK_IMPORTED_MODULE_0__.store),
    addNodeError = _useDispatch.addNodeError,
    resetNodeErrors = _useDispatch.resetNodeErrors;
  var nodeSlugs = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useMemo)(function () {
    return nodes.map(function (node) {
      return node.data.slug;
    });
  }, [nodes]);
  var isVariableValid = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useCallback)(function (node, variable, ruleData) {
    var _variable, _variable2;
    var successfulResult = {
      isValid: true,
      error: null
    };
    if ((_variable = variable) !== null && _variable !== void 0 && _variable.rule && (_variable2 = variable) !== null && _variable2 !== void 0 && _variable2.dataType) {
      return successfulResult;
    }
    if (_typeof(variable) !== 'object') {
      variable = [variable];
    }
    if (ruleData !== null && ruleData !== void 0 && ruleData.skipIfEmpty) {
      if (variable === '') {
        return successfulResult;
      }
      if (Array.isArray(variable) && variable.length === 0) {
        return successfulResult;
      }
      if (_typeof(variable) === 'object' && Object.keys(variable).length === 0) {
        return successfulResult;
      }
    }
    var contextVariables = (0,_utils__WEBPACK_IMPORTED_MODULE_5__.getNodeVariablesTree)(node, globalVariables);
    if (ruleData !== null && ruleData !== void 0 && ruleData.dataType) {
      if (!Array.isArray(ruleData.dataType)) {
        ruleData.dataType = [ruleData.dataType];
      }
      contextVariables = (0,_utils__WEBPACK_IMPORTED_MODULE_5__.filterVariablesTreeByDataType)(contextVariables, ruleData.dataType);
    }
    var onlyValidValues = true;
    var invalidVariable = '';
    var _loop = function _loop() {
        var variableItem = variable[i].trim();
        if (!variableItem.startsWith('{{')) {
          return 0; // continue
        }
        if (!variableItem.endsWith('}}')) {
          invalidVariable = variableItem;
          onlyValidValues = false;
          return 1; // break
        }
        var variableIsFound = false;
        contextVariables.forEach(function (contextVariable) {
          if (contextVariable.id === variableItem) {
            variableIsFound = true;
          }
        });
        if (!variableIsFound) {
          onlyValidValues = false;
          invalidVariable = variableItem;
          return 1; // break
        }
      },
      _ret;
    for (var i = 0; i < variable.length; i++) {
      _ret = _loop();
      if (_ret === 0) continue;
      if (_ret === 1) break;
    }
    if (onlyValidValues) {
      return successfulResult;
    }
    return {
      isValid: false,
      error: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.sprintf)((0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('The field "%s" contains an invalid variable.', 'post-expirator'), ruleData === null || ruleData === void 0 ? void 0 : ruleData.fieldLabel),
      details: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.sprintf)((0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('The variable "%s" is not available in the current context. Please, check if it is spelled correctly.', 'post-expirator'), invalidVariable)
    };
  }, [globalVariables, _utils__WEBPACK_IMPORTED_MODULE_5__.getNodeVariablesTree, _utils__WEBPACK_IMPORTED_MODULE_5__.filterVariablesTreeByDataType, getNodeTypeByName]);

  // We are doing a simple validation here. Maybe we should do a more complex one using a parser in the future.
  var isExpressionValid = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useCallback)(function (expression, ruleData) {
    var invalidExpression = false;
    var detailsMessage = '';
    var successfulResult = {
      isValid: true,
      error: null
    };
    if (!(expression !== null && expression !== void 0 && expression.includes('{{'))) {
      return successfulResult;
    }
    if (expression === '{{input}}') {
      return successfulResult;
    }
    var expressions = expression.match(/{{[^}]+}}/g);
    if (expressions) {
      expressions.forEach(function (expression) {
        var _ruleData$allowedVari;
        expression = expression.replace('{{', '').replace('}}', '');
        expression = expression.trim();

        // Remove the optional helper parts, the first and all after the second parts.
        expression = expression.split(' ');
        if (expression.length > 1) {
          expression = expression[1];
        } else {
          expression = expression[0];
        }
        var expressionParts = expression.split('.');
        var slug = expressionParts[0];
        if (slug === 'global') {
          return successfulResult;
        }
        if (ruleData !== null && ruleData !== void 0 && (_ruleData$allowedVari = ruleData.allowedVariables) !== null && _ruleData$allowedVari !== void 0 && _ruleData$allowedVari.includes(slug)) {
          return successfulResult;
        }
        if (!nodeSlugs.includes(slug)) {
          invalidExpression = true;
          detailsMessage = (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.sprintf)(
          // translators: %s is the workflow step slug.
          (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('"%s" is not a variable or step slug.', 'post-expirator'), slug);
        }
      });
    }
    if (expression.includes('{{}}')) {
      invalidExpression = true;
      detailsMessage = (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Empty placeholder is not allowed.', 'post-expirator');
    }
    var countOpenPlaceholders = function countOpenPlaceholders(expression) {
      return (expression.match(/{{/g) || []).length;
    };
    var countClosePlaceholders = function countClosePlaceholders(expression) {
      return (expression.match(/}}/g) || []).length;
    };
    if (countOpenPlaceholders(expression) > countClosePlaceholders(expression)) {
      invalidExpression = true;
      detailsMessage = (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Unclosed placeholder are not allowed.', 'post-expirator');
    }
    if (countOpenPlaceholders(expression) < countClosePlaceholders(expression)) {
      invalidExpression = true;
      detailsMessage = (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Unopened placeholder are not allowed.', 'post-expirator');
    }
    if (invalidExpression) {
      return {
        isValid: false,
        error: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.sprintf)(
        // translators: %s is the field label.
        (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Invalid expression on %s', 'post-expirator'), ruleData === null || ruleData === void 0 ? void 0 : ruleData.fieldLabel),
        details: detailsMessage
      };
    }
    return successfulResult;
  }, [nodeSlugs]);
  var isOptionsValid = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useCallback)(function (options, ruleData) {
    if (!Array.isArray(options)) {
      return {
        isValid: false,
        error: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.sprintf)(
        // translators: %s is the field label.
        (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('The field %s must be a list of options.', 'post-expirator'), ruleData === null || ruleData === void 0 ? void 0 : ruleData.fieldLabel)
      };
    }
    var successfulResult = {
      isValid: true,
      error: null
    };
    var invalidOptions = false;
    if (options.length === 0) {
      invalidOptions = true;
    }
    var detailsMessage = '';
    var optionIndex = 0;
    var optionNames = [];
    var optionLabels = [];
    options.forEach(function (option) {
      var _option$name;
      optionIndex++;
      if (!((_option$name = option.name) !== null && _option$name !== void 0 && _option$name.trim())) {
        invalidOptions = true;
        detailsMessage = (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.sprintf)(
        // translators: %s is the option name.
        (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('The option "%s" does not have a name.', 'post-expirator'), optionIndex);
      }
      if (!option.label.trim()) {
        invalidOptions = true;
        detailsMessage = (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.sprintf)(
        // translators: %s is the option name.
        (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('The option "%s" does not have a label.', 'post-expirator'), optionIndex);
      }
      if (optionNames.includes(option.name)) {
        invalidOptions = true;
        detailsMessage = (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.sprintf)(
        // translators: %s is the option name.
        (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('The option "%s" has a duplicate name.', 'post-expirator'), option.name);
      }
      if (optionLabels.includes(option.label)) {
        invalidOptions = true;
        detailsMessage = (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.sprintf)(
        // translators: %s is the option label.
        (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('The option "%s" has a duplicate label.', 'post-expirator'), option.label);
      }
      optionNames.push(option.name);
      optionLabels.push(option.label);
    });
    if (invalidOptions) {
      return {
        isValid: false,
        error: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.sprintf)(
        // translators: %s is the field label.
        (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('The field %s must be a valid list of options.', 'post-expirator'), ruleData === null || ruleData === void 0 ? void 0 : ruleData.fieldLabel),
        details: detailsMessage
      };
    }
    return successfulResult;
  }, []);
  var validateNodes = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useCallback)(function (nodes, edges, nodeSlugs) {
    nodes.forEach(function (node) {
      var _node$data, _node$data2, _validationSchema$con, _validationSchema$set;
      var nodeType = getNodeTypeByName((_node$data = node.data) === null || _node$data === void 0 ? void 0 : _node$data.name);
      var nodeSettings = ((_node$data2 = node.data) === null || _node$data2 === void 0 ? void 0 : _node$data2.settings) || {};
      var settingsSchema = nodeType === null || nodeType === void 0 ? void 0 : nodeType.settingsSchema;
      var validationSchema = nodeType === null || nodeType === void 0 ? void 0 : nodeType.validationSchema;
      resetNodeErrors(node.id);
      if (!validationSchema) {
        return;
      }
      if (validationSchema !== null && validationSchema !== void 0 && (_validationSchema$con = validationSchema.connections) !== null && _validationSchema$con !== void 0 && _validationSchema$con.rules) {
        validationSchema.connections.rules.forEach(function (ruleData) {
          switch (ruleData.rule) {
            case 'hasIncomingConnection':
              if (!(0,_utils__WEBPACK_IMPORTED_MODULE_5__.nodeHasIncomers)(node)) {
                addNodeError(node.id, 'no-incomers', (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('This step requires a connection from a previous step.', 'post-expirator'));
              }
              break;
            case 'hasOutgoingConnection':
              if (!(0,_utils__WEBPACK_IMPORTED_MODULE_5__.nodeHasOutgoers)(node)) {
                addNodeError(node.id, 'no-outgoers', (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('This step requires a connection to a following step.', 'post-expirator'));
              }
              break;
            case 'hasIncomerOfName':
              var allIncomers = (0,_utils__WEBPACK_IMPORTED_MODULE_5__.getNodeIncomersRecursively)(node);
              var hasError = false;
              if (allIncomers.length === 0) {
                hasError = true;
              } else {
                var hasIncomerOfName = false;
                allIncomers.forEach(function (incomer) {
                  var _incomer$data;
                  if (((_incomer$data = incomer.data) === null || _incomer$data === void 0 ? void 0 : _incomer$data.name) === ruleData.name) {
                    hasIncomerOfName = true;
                  }
                });
                hasError = !hasIncomerOfName;
              }
              if (hasError) {
                addNodeError(node.id, 'parent-name', ruleData.message);
              }
              break;
          }
        });
      }
      if (validationSchema !== null && validationSchema !== void 0 && (_validationSchema$set = validationSchema.settings) !== null && _validationSchema$set !== void 0 && _validationSchema$set.rules) {
        validationSchema.settings.rules.forEach(function (ruleData) {
          var _settingsSchema$find;
          var rule = ruleData.rule;
          var fieldName = (ruleData === null || ruleData === void 0 ? void 0 : ruleData.field) || '';
          var fieldNames = (fieldName === null || fieldName === void 0 ? void 0 : fieldName.split('.')) || [];
          var fieldLabel = (ruleData === null || ruleData === void 0 ? void 0 : ruleData.label) || ((_settingsSchema$find = settingsSchema.find(function (panel) {
            return panel === null || panel === void 0 ? void 0 : panel.fields.find(function (field) {
              return field.name === fieldNames[0];
            });
          })) === null || _settingsSchema$find === void 0 ? void 0 : _settingsSchema$find.label);
          var settingValue = nodeSettings;
          for (var i = 0; i < fieldNames.length; i++) {
            var _settingValue;
            settingValue = (_settingValue = settingValue) === null || _settingValue === void 0 ? void 0 : _settingValue[fieldNames[i]];
          }
          switch (rule) {
            case 'required':
              if (ruleData !== null && ruleData !== void 0 && ruleData.condition) {
                var conditionField = ruleData.condition.field;
                var conditionValue = ruleData.condition.value;
                var conditionSettingValue = nodeSettings;
                for (var _i = 0; _i < conditionField.split('.').length; _i++) {
                  var _conditionSettingValu;
                  conditionSettingValue = (_conditionSettingValu = conditionSettingValue) === null || _conditionSettingValu === void 0 ? void 0 : _conditionSettingValu[conditionField.split('.')[_i]];
                }
                if (conditionSettingValue == conditionValue && (!settingValue || settingValue == '')) {
                  addNodeError(node.id, "".concat(fieldName, "-required-if"), (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.sprintf)((0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('The field %s is required.', 'post-expirator'), fieldLabel));
                }
              } else {
                var isEmpty = function isEmpty(value) {
                  return value === '' || value === null || value === undefined || Array.isArray(value) && value.length === 0
                  // If the default value is an object with a rule, that is the default value
                  // and it was not set by the user yet.
                  || _typeof(value) === 'object' && value.rule;
                };
                if (isEmpty(settingValue)) {
                  addNodeError(node.id, "".concat(fieldName, "-required"), (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.sprintf)((0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('The field %s is required.', 'post-expirator'), fieldLabel));
                  break;
                }
              }
              break;
            case 'dataType':
              var type = ruleData.type;
              if (settingValue === undefined || settingValue === null || settingValue === '') {
                return;
              }
              if (type === 'email') {
                if (!validator_lib_isEmail__WEBPACK_IMPORTED_MODULE_6___default()(settingValue)) {
                  addNodeError(node.id, "".concat(fieldName, "-email"), (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.sprintf)((0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('The field %s must be a valid email address.', 'post-expirator'), fieldLabel));
                }
              } else if (type === 'emailList') {
                var emails = settingValue.split(',');
                var email;
                for (var _i2 = 0; _i2 < emails.length; _i2++) {
                  email = emails[_i2].trim();
                  if (!validator_lib_isEmail__WEBPACK_IMPORTED_MODULE_6___default()(email) && !isVariable(email)) {
                    addNodeError(node.id, "".concat(fieldName, "-emailList"), (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.sprintf)((0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('The field %s must be a valid email address list separated by commas.', 'post-expirator'), fieldLabel));
                    break;
                  }
                }
              } else if (type === 'integer') {
                if (!validator_lib_isInt__WEBPACK_IMPORTED_MODULE_7___default()(settingValue)) {
                  addNodeError(node.id, "".concat(fieldName, "-integer"), (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.sprintf)((0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('The field %s must be an integer.', 'post-expirator'), fieldLabel));
                }
              } else if (type === 'integerList') {
                var integer;
                for (var _i3 = 0; _i3 < settingValue.length; _i3++) {
                  integer = settingValue[_i3].trim();
                  if (!validator_lib_isInt__WEBPACK_IMPORTED_MODULE_7___default()(integer)) {
                    addNodeError(node.id, "".concat(fieldName, "-integerList"), (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.sprintf)((0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('The field %s must be an integer list separated by commas.', 'post-expirator'), fieldLabel));
                    break;
                  }
                }
              } else if (type === 'nameValuePairList') {
                if (!settingValue) {
                  return;
                }
                var property = ruleData.field;
                if (!settingValue[property]) {
                  return;
                }
                if (!Array.isArray(settingValue[property])) {
                  addNodeError(node.id, "".concat(fieldName, "-nameValuePairList"), (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.sprintf)((0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('The field %s must be a list of name-value pairs.', 'post-expirator'), fieldLabel));
                }
                settingValue[property].forEach(function (item, i) {
                  if ((item === null || item === void 0 ? void 0 : item.name) === '') {
                    addNodeError(node.id, "".concat(fieldName, "-nameValuePairList"), (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.sprintf)((0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('The field %s must be a list of name-value pairs.', 'post-expirator'), fieldLabel), (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.sprintf)((0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('The name of the pair is required on item %d.', 'post-expirator'), i + 1));
                  }
                  if ((item === null || item === void 0 ? void 0 : item.value) === '') {
                    addNodeError(node.id, "".concat(fieldName, "-nameValuePairList"), (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.sprintf)((0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('The field %s must be a list of name-value pairs.', 'post-expirator'), fieldLabel), (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.sprintf)((0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('The value of the pair is required on item %d.', 'post-expirator'), i + 1));
                  }
                });
              }
              break;
            case 'validVariable':
              var variableValidation = isVariableValid(node, settingValue, ruleData);
              if (!variableValidation.isValid) {
                addNodeError(node.id, "".concat(fieldName, "-validVariable"), variableValidation.error, variableValidation.details);
              }
              break;
            case 'validExpression':
              var expressionValidation = isExpressionValid(settingValue, ruleData);
              if (!expressionValidation.isValid) {
                addNodeError(node.id, "".concat(fieldName, "-validExpression"), expressionValidation.error, expressionValidation.details);
              }
              break;
            case 'validOptions':
              if (!Array.isArray(settingValue)) {
                addNodeError(node.id, "".concat(fieldName, "-validOptions"), (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.sprintf)((0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('The field %s must be a list of options.', 'post-expirator'), fieldLabel));
              }
              var optionsValidation = isOptionsValid(settingValue, ruleData);
              if (!optionsValidation.isValid) {
                addNodeError(node.id, "".concat(fieldName, "-validOptions"), optionsValidation.error, optionsValidation.details);
              }
              break;
            case 'hasVariableSyntax':
              if (!settingValue || settingValue === '') {
                break;
              }
              var trimmedValue = settingValue.trim();
              var hasProperSyntax = trimmedValue.startsWith('{{') && trimmedValue.endsWith('}}');
              if (!hasProperSyntax) {
                addNodeError(node.id, "".concat(fieldName, "-hasVariableSyntax"), (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.sprintf)((0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Invalid variable.', 'post-expirator'), fieldLabel), (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Please use the variable picker to select valid expression.', 'post-expirator'));
              }
              break;
          }
        });
      }
    });
  }, [getNodeTypeByName, addNodeError, resetNodeErrors, isExpressionValid]);
  var debounceValidation = (0,_wordpress_compose__WEBPACK_IMPORTED_MODULE_8__["default"])(function (nodes, edges, nodeSlugs) {
    validateNodes(nodes, edges, nodeSlugs);
  }, DEBOUNCE_TIME);
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useEffect)(function () {
    debounceValidation(nodes, edges, nodeSlugs);
    return function () {
      debounceValidation.cancel();
    };
  }, [nodes, edges, nodeSlugs, debounceValidation]);
  return;
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (NodeValidator);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/persistent-panel-body/index.jsx"
/*!*******************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/persistent-panel-body/index.jsx ***!
  \*******************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   PersistentPanelBody: () => (/* binding */ PersistentPanelBody),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _editor_store__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../editor-store */ "./assets/jsx/workflow-editor/components/editor-store/index.jsx");
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }



var PersistentPanelBody = function PersistentPanelBody(props) {
  var _newProps$id, _newProps$opened;
  var newProps = _objectSpread({}, props);
  newProps.id = (_newProps$id = newProps.id) !== null && _newProps$id !== void 0 ? _newProps$id : newProps.title.toLowerCase().replace(/ /g, '');
  var _useSelect = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.useSelect)(function (select) {
      var _select$getPanelBodyS;
      var panelBodyState = (_select$getPanelBodyS = select(_editor_store__WEBPACK_IMPORTED_MODULE_2__.store).getPanelBodyState(newProps.id)) !== null && _select$getPanelBodyS !== void 0 ? _select$getPanelBodyS : true;
      return {
        panelBodyState: panelBodyState
      };
    }),
    panelBodyState = _useSelect.panelBodyState;
  var _useDispatch = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.useDispatch)(_editor_store__WEBPACK_IMPORTED_MODULE_2__.store),
    setPanelBodyState = _useDispatch.setPanelBodyState;
  var propOnToggle = newProps.onToggle;
  delete newProps.onToggle;
  var isOpened = (_newProps$opened = newProps.opened) !== null && _newProps$opened !== void 0 ? _newProps$opened : panelBodyState;
  delete newProps.opened;
  var togglePanelState = function togglePanelState(isOpened) {
    setPanelBodyState(newProps.id, isOpened);
    if (propOnToggle) {
      propOnToggle(isOpened);
    }
    return;
  };
  return /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.PanelBody, _extends({}, props, {
    opened: isOpened,
    onToggle: togglePanelState
  }), newProps.children);
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PersistentPanelBody);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/pro-feature-button/index.jsx"
/*!****************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/pro-feature-button/index.jsx ***!
  \****************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ ProFeatureButton)
/* harmony export */ });
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_icon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../node-icon */ "./assets/jsx/workflow-editor/components/node-icon.jsx");


function ProFeatureButton(_ref) {
  var link = _ref.link;
  var onClick = function onClick() {
    window.open(link, '_blank');
  };
  return /*#__PURE__*/React.createElement("div", {
    onClick: onClick,
    style: {
      cursor: 'pointer',
      marginLeft: '8px',
      color: '#000',
      backgroundColor: '#ffb200',
      borderRadius: '50%',
      minWidth: '26px',
      minHeight: '26px',
      display: 'inline-block',
      textAlign: 'center',
      boxSizing: 'border-box',
      paddingTop: '5px'
    },
    title: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Upgrade to Pro to unlock this feature.", "post-expirator")
  }, /*#__PURE__*/React.createElement(_node_icon__WEBPACK_IMPORTED_MODULE_1__["default"], {
    icon: 'lock',
    iconSize: 14
  }));
}

/***/ },

/***/ "./assets/jsx/workflow-editor/components/pro-feature-field/index.jsx"
/*!***************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/pro-feature-field/index.jsx ***!
  \***************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ ProFeatureField)
/* harmony export */ });
/* harmony import */ var _pro_feature_button__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../pro-feature-button */ "./assets/jsx/workflow-editor/components/pro-feature-button/index.jsx");

function ProFeatureField(_ref) {
  var children = _ref.children,
    link = _ref.link;
  return /*#__PURE__*/React.createElement("div", {
    style: {
      display: 'flex',
      alignItems: 'center'
    }
  }, children, /*#__PURE__*/React.createElement(_pro_feature_button__WEBPACK_IMPORTED_MODULE_0__["default"], {
    link: link
  }));
}

/***/ },

/***/ "./assets/jsx/workflow-editor/components/scrolled-to-top/index.jsx"
/*!*************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/scrolled-to-top/index.jsx ***!
  \*************************************************************************/
(__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 export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);

var $ = window.jQuery;
var useScrollToTop = function useScrollToTop(ref, parentSelector) {
  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
    if (ref.current) {
      $(ref.current).closest(parentSelector).scrollTop(0);
    }
  }, [ref, parentSelector]);
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (useScrollToTop);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/secondary-sidebar/inserter-draggable-nodes.jsx"
/*!**********************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/secondary-sidebar/inserter-draggable-nodes.jsx ***!
  \**********************************************************************************************/
(__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 export */ });
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_draggable_chip__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node-draggable-chip */ "./assets/jsx/workflow-editor/components/secondary-sidebar/node-draggable-chip.jsx");
/**
 * WordPress dependencies
 */

/**
 * Internal dependencies
 */

var InserterDraggableNodes = function InserterDraggableNodes(_ref) {
  var isEnabled = _ref.isEnabled,
    node = _ref.node,
    icon = _ref.icon,
    children = _ref.children;
  var transferData = {
    type: 'node',
    node: node
  };
  return /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Draggable, {
    __experimentalTransferDataType: "node",
    transferData: transferData,
    __experimentalDragComponent: /*#__PURE__*/React.createElement(_node_draggable_chip__WEBPACK_IMPORTED_MODULE_1__["default"], {
      node: node,
      icon: icon
    })
  }, function (_ref2) {
    var onDraggableStart = _ref2.onDraggableStart,
      onDraggableEnd = _ref2.onDraggableEnd;
    return children({
      draggable: isEnabled,
      onDragStart: isEnabled ? onDraggableStart : undefined,
      onDragEnd: isEnabled ? onDraggableEnd : undefined
    });
  });
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (InserterDraggableNodes);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/secondary-sidebar/inserter-list-item.jsx"
/*!****************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/secondary-sidebar/inserter-list-item.jsx ***!
  \****************************************************************************************/
(__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 export */ });
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/keycodes */ "./node_modules/@wordpress/keycodes/build-module/index.js");
/* harmony import */ var _node_icon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../node-icon */ "./assets/jsx/workflow-editor/components/node-icon.jsx");
/* harmony import */ var _inserter_listbox__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./inserter-listbox */ "./assets/jsx/workflow-editor/components/secondary-sidebar/inserter-listbox/index.jsx");
/* harmony import */ var _inserter_draggable_nodes__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./inserter-draggable-nodes */ "./assets/jsx/workflow-editor/components/secondary-sidebar/inserter-draggable-nodes.jsx");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils */ "./assets/jsx/workflow-editor/utils.jsx");
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../constants */ "./assets/jsx/workflow-editor/constants.jsx");
/* harmony import */ var _contexts_pro_context__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../contexts/pro-context */ "./assets/jsx/workflow-editor/contexts/pro-context.jsx");
var _excluded = ["className", "isFirst", "item", "onSelect", "onHover", "isDraggable"];
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
/**
 * External dependencies
 */


/**
 * WordPress dependencies
 */



/**
 * Internal dependencies
 */






function InserterListItem(_ref) {
  var className = _ref.className,
    isFirst = _ref.isFirst,
    item = _ref.item,
    onSelect = _ref.onSelect,
    onHover = _ref.onHover,
    isDraggable = _ref.isDraggable,
    props = _objectWithoutProperties(_ref, _excluded);
  var isDragging = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useRef)(false);
  var itemIconStyle = item.icon ? {
    backgroundColor: item.icon.background,
    color: item.icon.foreground
  } : {};
  var node = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function () {
    return item;
  }, [item.id, item.label, item.icon, item.disabled]);
  var isPro = (0,_contexts_pro_context__WEBPACK_IMPORTED_MODULE_8__.useIsPro)();
  var classes = classnames__WEBPACK_IMPORTED_MODULE_0___default()('block-editor-block-types-list__list-item', item.isProFeature && !isPro ? 'is-pro-feature' : '');
  return /*#__PURE__*/React.createElement(_inserter_draggable_nodes__WEBPACK_IMPORTED_MODULE_5__["default"], {
    isEnabled: isDraggable && !item.disabled,
    node: node,
    icon: item.icon
  }, function (_ref2) {
    var draggable = _ref2.draggable,
      _onDragStart = _ref2.onDragStart,
      _onDragEnd = _ref2.onDragEnd;
    return /*#__PURE__*/React.createElement("div", {
      className: classes,
      draggable: draggable,
      onDragStart: function onDragStart(event) {
        isDragging.current = true;
        event.dataTransfer.setData(_constants__WEBPACK_IMPORTED_MODULE_7__.EVENT_DROP_NODE, JSON.stringify(item));
        if (_onDragStart) {
          onHover(null);
          _onDragStart(event);
        }
      },
      onDragEnd: function onDragEnd(event) {
        isDragging.current = false;
        if (_onDragEnd) {
          _onDragEnd(event);
        }
      }
    }, /*#__PURE__*/React.createElement(_inserter_listbox__WEBPACK_IMPORTED_MODULE_4__.InserterListboxItem, _extends({
      isFirst: isFirst,
      className: classnames__WEBPACK_IMPORTED_MODULE_0___default()('block-editor-block-types-list__item', className),
      disabled: item.isDisabled,
      onClick: function onClick(event) {
        event.preventDefault();
        onSelect(item, (0,_utils__WEBPACK_IMPORTED_MODULE_6__.isAppleOS)() ? event.metaKey : event.ctrlKey);
        onHover(null);
      },
      onKeyDown: function onKeyDown(event) {
        var keyCode = event.keyCode;
        if (keyCode === _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_2__.ENTER) {
          event.preventDefault();
          onSelect(item, (0,_utils__WEBPACK_IMPORTED_MODULE_6__.isAppleOS)() ? event.metaKey : event.ctrlKey);
          onHover(null);
        }
      },
      onFocus: function onFocus() {
        if (isDragging.current) {
          return;
        }
        onHover(item);
      },
      onMouseEnter: function onMouseEnter() {
        if (isDragging.current) {
          return;
        }
        onHover(item);
      },
      onMouseLeave: function onMouseLeave() {
        return onHover(null);
      },
      onBlur: function onBlur() {
        return onHover(null);
      }
    }, props), /*#__PURE__*/React.createElement("span", {
      className: "block-editor-block-types-list__item-icon",
      style: itemIconStyle
    }, /*#__PURE__*/React.createElement(_node_icon__WEBPACK_IMPORTED_MODULE_3__["default"], {
      icon: item.icon,
      showColors: true
    })), item.isProFeature && !isPro && /*#__PURE__*/React.createElement("span", {
      className: "block-editor-block-types-list__item-pro-badge"
    }, "Pro"), /*#__PURE__*/React.createElement("span", {
      className: "block-editor-block-types-list__item-title"
    }, item.label)));
  });
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.memo)(InserterListItem));

/***/ },

/***/ "./assets/jsx/workflow-editor/components/secondary-sidebar/inserter-listbox/group.jsx"
/*!********************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/secondary-sidebar/inserter-listbox/group.jsx ***!
  \********************************************************************************************/
(__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 export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_a11y__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/a11y */ "./node_modules/@wordpress/a11y/build-module/index.js");
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
/**
 * WordPress dependencies
 */



function InserterListboxGroup(props, ref) {
  var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
    _useState2 = _slicedToArray(_useState, 2),
    shouldSpeak = _useState2[0],
    setShouldSpeak = _useState2[1];
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
    if (shouldSpeak) {
      (0,_wordpress_a11y__WEBPACK_IMPORTED_MODULE_2__.speak)((0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Use left and right arrow keys to move through steps', 'post-expirator'));
    }
  }, [shouldSpeak]);
  return /*#__PURE__*/React.createElement("div", _extends({
    ref: ref,
    role: "listbox",
    "aria-orientation": "horizontal",
    onFocus: function onFocus() {
      setShouldSpeak(true);
    },
    onBlur: function onBlur(event) {
      var focusingOutsideGroup = !event.currentTarget.contains(event.relatedTarget);
      if (focusingOutsideGroup) {
        setShouldSpeak(false);
      }
    }
  }, props));
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(InserterListboxGroup));

/***/ },

/***/ "./assets/jsx/workflow-editor/components/secondary-sidebar/inserter-listbox/index.jsx"
/*!********************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/secondary-sidebar/inserter-listbox/index.jsx ***!
  \********************************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   InserterListbox: () => (/* binding */ InserterListbox),
/* harmony export */   InserterListboxGroup: () => (/* reexport safe */ _group__WEBPACK_IMPORTED_MODULE_1__["default"]),
/* harmony export */   InserterListboxItem: () => (/* reexport safe */ _item__WEBPACK_IMPORTED_MODULE_3__["default"]),
/* harmony export */   InserterListboxRow: () => (/* reexport safe */ _row__WEBPACK_IMPORTED_MODULE_2__["default"]),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _group__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./group */ "./assets/jsx/workflow-editor/components/secondary-sidebar/inserter-listbox/group.jsx");
/* harmony import */ var _row__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./row */ "./assets/jsx/workflow-editor/components/secondary-sidebar/inserter-listbox/row.jsx");
/* harmony import */ var _item__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./item */ "./assets/jsx/workflow-editor/components/secondary-sidebar/inserter-listbox/item.jsx");
/**
 * WordPress dependencies
 */




var InserterListbox = function InserterListbox(_ref) {
  var children = _ref.children;
  return /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Composite, {
    focusShift: true,
    focusWrap: "horizontal",
    render: /*#__PURE__*/React.createElement(React.Fragment, null)
  }, children);
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (InserterListbox);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/secondary-sidebar/inserter-listbox/item.jsx"
/*!*******************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/secondary-sidebar/inserter-listbox/item.jsx ***!
  \*******************************************************************************************/
(__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 export */ });
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
var _excluded = ["isFirst", "as", "children"];
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
/**
 * WordPress dependencies
 */


function InserterListboxItem(_ref, ref) {
  var isFirst = _ref.isFirst,
    Component = _ref.as,
    children = _ref.children,
    props = _objectWithoutProperties(_ref, _excluded);
  return /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Composite.Item, _extends({
    ref: ref,
    role: "option"
    // Use the Composite.Item `accessibleWhenDisabled` prop
    // over Button's `isFocusable`. The latter was shown to
    // cause an issue with tab order in the inserter list.
    ,
    accessibleWhenDisabled: true
  }, props, {
    render: function render(htmlProps) {
      var propsWithTabIndex = _objectSpread(_objectSpread({}, htmlProps), {}, {
        tabIndex: isFirst ? 0 : htmlProps.tabIndex
      });
      if (Component) {
        return /*#__PURE__*/React.createElement(Component, propsWithTabIndex, children);
      }
      if (typeof children === 'function') {
        return children(propsWithTabIndex);
      }
      return /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Button, _extends({
        __next40pxDefaultSize: true
      }, propsWithTabIndex), children);
    }
  }));
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(InserterListboxItem));

/***/ },

/***/ "./assets/jsx/workflow-editor/components/secondary-sidebar/inserter-listbox/row.jsx"
/*!******************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/secondary-sidebar/inserter-listbox/row.jsx ***!
  \******************************************************************************************/
(__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 export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
/**
 * WordPress dependencies
 */


function InserterListboxRow(props, ref) {
  return /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Composite.Group, _extends({
    role: "presentation",
    ref: ref
  }, props));
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(InserterListboxRow));

/***/ },

/***/ "./assets/jsx/workflow-editor/components/secondary-sidebar/inserter-no-results.jsx"
/*!*****************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/secondary-sidebar/inserter-no-results.jsx ***!
  \*****************************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   InserterNoResults: () => (/* binding */ InserterNoResults),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js");
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/block-default.js");
/**
 * WordPress dependencies
 */


function InserterNoResults() {
  return /*#__PURE__*/React.createElement("div", {
    className: "block-editor-inserter__no-results"
  }, /*#__PURE__*/React.createElement(_wordpress_icons__WEBPACK_IMPORTED_MODULE_1__["default"], {
    className: "block-editor-inserter__no-results-icon",
    icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_2__["default"]
  }), /*#__PURE__*/React.createElement("p", null, (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('No results found.', 'post-expirator')));
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (InserterNoResults);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/secondary-sidebar/inserter-preview-panel.jsx"
/*!********************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/secondary-sidebar/inserter-preview-panel.jsx ***!
  \********************************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   InserterPreviewPanel: () => (/* binding */ InserterPreviewPanel),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _node_icon__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../node-icon */ "./assets/jsx/workflow-editor/components/node-icon.jsx");
/* harmony import */ var _node_card__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node-card */ "./assets/jsx/workflow-editor/components/secondary-sidebar/node-card.jsx");


function InserterPreviewPanel(_ref) {
  var item = _ref.item;
  return /*#__PURE__*/React.createElement("div", {
    className: "block-editor-inserter__preview-container"
  }, /*#__PURE__*/React.createElement(_node_card__WEBPACK_IMPORTED_MODULE_1__.NodeCard, {
    node: item
  }));
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (InserterPreviewPanel);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/secondary-sidebar/inserter-search-results.jsx"
/*!*********************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/secondary-sidebar/inserter-search-results.jsx ***!
  \*********************************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   InserterSearchResults: () => (/* binding */ InserterSearchResults),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var lodash_orderBy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/orderBy */ "./node_modules/lodash/orderBy.js");
/* harmony import */ var lodash_orderBy__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_orderBy__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/isEmpty */ "./node_modules/lodash/isEmpty.js");
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/compose */ "./node_modules/@wordpress/compose/build-module/hooks/use-debounce/index.js");
/* harmony import */ var _wordpress_a11y__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/a11y */ "./node_modules/@wordpress/a11y/build-module/index.js");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var _node_types_list__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./node-types-list */ "./assets/jsx/workflow-editor/components/secondary-sidebar/node-types-list.jsx");
/* harmony import */ var _panel__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./panel */ "./assets/jsx/workflow-editor/components/secondary-sidebar/panel.jsx");
/* harmony import */ var _search_items__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./search-items */ "./assets/jsx/workflow-editor/components/secondary-sidebar/search-items.jsx");
/* harmony import */ var _inserter_no_results__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./inserter-no-results */ "./assets/jsx/workflow-editor/components/secondary-sidebar/inserter-no-results.jsx");
/* harmony import */ var _editor_store__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../editor-store */ "./assets/jsx/workflow-editor/components/editor-store/index.jsx");
/* harmony import */ var _inserter_listbox__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./inserter-listbox */ "./assets/jsx/workflow-editor/components/secondary-sidebar/inserter-listbox/index.jsx");
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
/**
 * External dependencies
 */



/**
 * WordPress dependencies
 */







/**
 * Internal dependencies
 */






var InserterSearchResults = function InserterSearchResults(_ref) {
  var filterValue = _ref.filterValue,
    onSelect = _ref.onSelect,
    onHover = _ref.onHover,
    maxNodeTypes = _ref.maxNodeTypes,
    _ref$isDraggable = _ref.isDraggable,
    isDraggable = _ref$isDraggable === void 0 ? true : _ref$isDraggable,
    filterTypes = _ref.filterTypes;
  var debouncedSpeak = (0,_wordpress_compose__WEBPACK_IMPORTED_MODULE_5__["default"])(_wordpress_a11y__WEBPACK_IMPORTED_MODULE_6__.speak, 500);
  var _useSelect = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_7__.useSelect)(function (select) {
      var actionNodes = select(_editor_store__WEBPACK_IMPORTED_MODULE_12__.store).getActionNodes();
      var actionCategories = select(_editor_store__WEBPACK_IMPORTED_MODULE_12__.store).getActionCategories();
      var triggerNodes = select(_editor_store__WEBPACK_IMPORTED_MODULE_12__.store).getTriggerNodes();
      var triggerCategories = select(_editor_store__WEBPACK_IMPORTED_MODULE_12__.store).getTriggerCategories();
      var advancedNodes = select(_editor_store__WEBPACK_IMPORTED_MODULE_12__.store).getAdvancedNodes();
      var advancedCategories = select(_editor_store__WEBPACK_IMPORTED_MODULE_12__.store).getAdvancedCategories();
      var nodeTypes = [];
      if (filterTypes && filterTypes.length) {
        nodeTypes = [].concat(_toConsumableArray(actionNodes.filter(function (node) {
          return filterTypes.includes(node.elementaryType);
        })), _toConsumableArray(triggerNodes.filter(function (node) {
          return filterTypes.includes(node.elementaryType);
        })), _toConsumableArray(advancedNodes.filter(function (node) {
          return filterTypes.includes(node.elementaryType);
        })));
      } else {
        nodeTypes = [].concat(_toConsumableArray(triggerNodes), _toConsumableArray(actionNodes), _toConsumableArray(advancedNodes));
      }
      var nodeTypeCategories = [].concat(_toConsumableArray(actionCategories), _toConsumableArray(triggerCategories), _toConsumableArray(advancedCategories));
      return {
        nodeTypes: nodeTypes,
        nodeTypeCategories: nodeTypeCategories
      };
    }),
    nodeTypes = _useSelect.nodeTypes,
    nodeTypeCategories = _useSelect.nodeTypeCategories;
  var filteredNodeTypes = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useMemo)(function () {
    var results = (0,_search_items__WEBPACK_IMPORTED_MODULE_10__.searchNodeItems)(lodash_orderBy__WEBPACK_IMPORTED_MODULE_0___default()(nodeTypes, ['frecency'], ['desc']), nodeTypeCategories, filterValue);
    return maxNodeTypes !== undefined ? results.slice(0, maxNodeTypes) : results;
  }, [filterValue, nodeTypes, nodeTypeCategories, maxNodeTypes]);

  // Announce search results on change
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useEffect)(function () {
    if (!filterValue) {
      return;
    }
    var count = filteredNodeTypes.length;
    var resultsFoundMessage = (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_3__.sprintf)( /* translators: %d: number of results. */
    (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_3__._n)('%d result found.', '%d results found.', count, 'post-expirator'), count);
    debouncedSpeak(resultsFoundMessage);
  }, [filterValue, debouncedSpeak, filteredNodeTypes]);
  var hasItems = !lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default()(filteredNodeTypes);
  return /*#__PURE__*/React.createElement(_inserter_listbox__WEBPACK_IMPORTED_MODULE_13__["default"], null, !hasItems && /*#__PURE__*/React.createElement(_inserter_no_results__WEBPACK_IMPORTED_MODULE_11__.InserterNoResults, null), !!hasItems && /*#__PURE__*/React.createElement(_panel__WEBPACK_IMPORTED_MODULE_9__["default"], {
    title: /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.VisuallyHidden, null, (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Nodes', 'post-expirator'))
  }, /*#__PURE__*/React.createElement(_node_types_list__WEBPACK_IMPORTED_MODULE_8__["default"], {
    items: filteredNodeTypes,
    onSelect: onSelect,
    onHover: onHover,
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Nodes', 'post-expirator'),
    isDraggable: isDraggable
  })));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (InserterSearchResults);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/secondary-sidebar/inserter-sidebar.jsx"
/*!**************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/secondary-sidebar/inserter-sidebar.jsx ***!
  \**************************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   InserterSidebar: () => (/* binding */ InserterSidebar)
/* harmony export */ });
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js");
/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/compose */ "./node_modules/@wordpress/compose/build-module/hooks/use-dialog/index.js");
/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/compose */ "./node_modules/@wordpress/compose/build-module/hooks/use-viewport-match/index.js");
/* harmony import */ var _editor_store__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../editor-store */ "./assets/jsx/workflow-editor/components/editor-store/index.jsx");
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../constants */ "./assets/jsx/workflow-editor/constants.jsx");
/* harmony import */ var _library__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./library */ "./assets/jsx/workflow-editor/components/secondary-sidebar/library.jsx");
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
/**
 * WordPress dependencies
 */





/**
 * Internal dependencies
 */



function InserterSidebar() {
  var _useSelect = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.useSelect)(function (select) {
      return {
        showMostUsedNodes: select(_editor_store__WEBPACK_IMPORTED_MODULE_5__.store).isFeatureActive(_constants__WEBPACK_IMPORTED_MODULE_6__.FEATURE_MOST_USED_NODES)
      };
    }, []),
    showMostUsedNodes = _useSelect.showMostUsedNodes;
  var _useDispatch = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.useDispatch)(_editor_store__WEBPACK_IMPORTED_MODULE_5__.store),
    disableFeature = _useDispatch.disableFeature;
  var closeInserter = function closeInserter() {
    disableFeature(_constants__WEBPACK_IMPORTED_MODULE_6__.FEATURE_INSERTER);
  };
  var isMobileViewport = (0,_wordpress_compose__WEBPACK_IMPORTED_MODULE_4__["default"])('medium', '<');
  var _useDialog = (0,_wordpress_compose__WEBPACK_IMPORTED_MODULE_3__["default"])({
      onClose: function onClose() {
        return closeInserter();
      }
    }),
    _useDialog2 = _slicedToArray(_useDialog, 2),
    inserterDialogRef = _useDialog2[0],
    inserterDialogProps = _useDialog2[1];
  return /*#__PURE__*/React.createElement("div", _extends({
    ref: inserterDialogRef
  }, inserterDialogProps, {
    className: "editor-inserter-sidebar"
  }), /*#__PURE__*/React.createElement("div", {
    className: "editor-inserter-sidebar__header"
  }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, {
    icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_2__["default"],
    onClick: function onClick() {
      return closeInserter();
    },
    className: "block-editor-tabbed-sidebar__close-button is-small"
  })), /*#__PURE__*/React.createElement("div", {
    className: "editor-inserter-sidebar__content"
  }, /*#__PURE__*/React.createElement(_library__WEBPACK_IMPORTED_MODULE_7__.InserterLibrary, {
    showMostUsedNodes: showMostUsedNodes,
    showInserterHelpPanel: true,
    shouldFocusNode: isMobileViewport
  })));
}

/***/ },

/***/ "./assets/jsx/workflow-editor/components/secondary-sidebar/library.jsx"
/*!*****************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/secondary-sidebar/library.jsx ***!
  \*****************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   InserterLibrary: () => (/* binding */ InserterLibrary)
/* harmony export */ });
/* harmony import */ var lodash_noop__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/noop */ "./node_modules/lodash/noop.js");
/* harmony import */ var lodash_noop__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_noop__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _menu__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./menu */ "./assets/jsx/workflow-editor/components/secondary-sidebar/menu.jsx");
/**
 * External dependencies
 */


/**
 * Internal dependencies
 */

function InserterLibrary(_ref) {
  var isAppender = _ref.isAppender,
    showInserterHelpPanel = _ref.showInserterHelpPanel,
    _ref$showMostUsedNode = _ref.showMostUsedNodes,
    showMostUsedNodes = _ref$showMostUsedNode === void 0 ? true : _ref$showMostUsedNode,
    _ref$onSelect = _ref.onSelect,
    onSelect = _ref$onSelect === void 0 ? (lodash_noop__WEBPACK_IMPORTED_MODULE_0___default()) : _ref$onSelect,
    _ref$shouldFocusNode = _ref.shouldFocusNode,
    shouldFocusNode = _ref$shouldFocusNode === void 0 ? false : _ref$shouldFocusNode;
  return /*#__PURE__*/React.createElement(_menu__WEBPACK_IMPORTED_MODULE_1__.InserterMenu, {
    onSelect: onSelect,
    isAppender: isAppender,
    showInserterHelpPanel: showInserterHelpPanel,
    showMostUsedNodes: showMostUsedNodes,
    shouldFocusNode: shouldFocusNode
  });
}

/***/ },

/***/ "./assets/jsx/workflow-editor/components/secondary-sidebar/menu.jsx"
/*!**************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/secondary-sidebar/menu.jsx ***!
  \**************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   InserterMenu: () => (/* binding */ InserterMenu)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _tips__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./tips */ "./assets/jsx/workflow-editor/components/secondary-sidebar/tips.jsx");
/* harmony import */ var _nodes_tab__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./nodes-tab */ "./assets/jsx/workflow-editor/components/secondary-sidebar/nodes-tab.jsx");
/* harmony import */ var _tabs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./tabs */ "./assets/jsx/workflow-editor/components/secondary-sidebar/tabs.jsx");
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../constants */ "./assets/jsx/workflow-editor/constants.jsx");
/* harmony import */ var _editor_store__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../editor-store */ "./assets/jsx/workflow-editor/components/editor-store/index.jsx");
/* harmony import */ var _inserter_search_results__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./inserter-search-results */ "./assets/jsx/workflow-editor/components/secondary-sidebar/inserter-search-results.jsx");
/* harmony import */ var _inserter_preview_panel__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./inserter-preview-panel */ "./assets/jsx/workflow-editor/components/secondary-sidebar/inserter-preview-panel.jsx");
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }













function InserterMenu(_ref) {
  var onSelect = _ref.onSelect,
    showInserterHelpPanel = _ref.showInserterHelpPanel,
    showMostUsedNodes = _ref.showMostUsedNodes,
    _ref$__experimentalFi = _ref.__experimentalFilterValue,
    __experimentalFilterValue = _ref$__experimentalFi === void 0 ? '' : _ref$__experimentalFi,
    _ref$shouldFocusNode = _ref.shouldFocusNode,
    shouldFocusNode = _ref$shouldFocusNode === void 0 ? true : _ref$shouldFocusNode;
  var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(__experimentalFilterValue),
    _useState2 = _slicedToArray(_useState, 2),
    filterValue = _useState2[0],
    setFilterValue = _useState2[1];
  var _useSelect = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_3__.useSelect)(function (select) {
      return {
        currentInserterTab: select(_editor_store__WEBPACK_IMPORTED_MODULE_8__.store).getCurrentInserterTab(),
        hoveredItem: select(_editor_store__WEBPACK_IMPORTED_MODULE_8__.store).getHoveredItem()
      };
    }),
    currentInserterTab = _useSelect.currentInserterTab,
    hoveredItem = _useSelect.hoveredItem;
  var _useDispatch = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_3__.useDispatch)(_editor_store__WEBPACK_IMPORTED_MODULE_8__.store),
    setCurrentInserterTab = _useDispatch.setCurrentInserterTab,
    setHoveredItem = _useDispatch.setHoveredItem;
  var onInsert = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (blocks, meta, shouldForceFocusBlock) {
    onSelect();
  }, [onSelect]);
  var onHover = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (item) {
    setHoveredItem(item);
  }, [setHoveredItem]);
  var triggersTab = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
    var items = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_3__.select)(_editor_store__WEBPACK_IMPORTED_MODULE_8__.store).getTriggerNodes();
    var categories = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_3__.select)(_editor_store__WEBPACK_IMPORTED_MODULE_8__.store).getTriggerCategories();
    return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
      className: "block-editor-inserter__block-list"
    }, /*#__PURE__*/React.createElement(_nodes_tab__WEBPACK_IMPORTED_MODULE_5__.NodesTab, {
      type: _constants__WEBPACK_IMPORTED_MODULE_7__.INSERTER_TAB_TRIGGERS,
      onInsert: onInsert,
      onHover: onHover,
      showMostUsedNodes: showMostUsedNodes,
      items: items,
      categories: categories
    })), showInserterHelpPanel && /*#__PURE__*/React.createElement("div", {
      className: "block-editor-inserter__tips"
    }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.VisuallyHidden, {
      as: "h2"
    }, (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('A tip for using the workflow editor', 'post-expirator')), /*#__PURE__*/React.createElement(_tips__WEBPACK_IMPORTED_MODULE_4__.Tips, null)));
  }, [onInsert, onHover, filterValue, showMostUsedNodes, showInserterHelpPanel]);
  var actionsTab = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
    var actionItems = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_3__.select)(_editor_store__WEBPACK_IMPORTED_MODULE_8__.store).getActionNodes();
    var advancedItems = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_3__.select)(_editor_store__WEBPACK_IMPORTED_MODULE_8__.store).getAdvancedNodes();
    var items = [].concat(_toConsumableArray(actionItems), _toConsumableArray(advancedItems));
    var categories = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_3__.select)(_editor_store__WEBPACK_IMPORTED_MODULE_8__.store).getActionCategories();
    return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
      className: "block-editor-inserter__block-list"
    }, /*#__PURE__*/React.createElement(_nodes_tab__WEBPACK_IMPORTED_MODULE_5__.NodesTab, {
      type: _constants__WEBPACK_IMPORTED_MODULE_7__.INSERTER_TAB_ACTIONS,
      onInsert: onInsert,
      onHover: onHover,
      showMostUsedNodes: showMostUsedNodes,
      items: items,
      categories: categories
    })), showInserterHelpPanel && /*#__PURE__*/React.createElement("div", {
      className: "block-editor-inserter__tips"
    }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.VisuallyHidden, {
      as: "h2"
    }, (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('A tip for using the workflow editor', 'post-expirator')), /*#__PURE__*/React.createElement(_tips__WEBPACK_IMPORTED_MODULE_4__.Tips, null)));
  }, [onInsert, onHover, filterValue, showMostUsedNodes, showInserterHelpPanel]);
  var getCurrentTab = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (tab) {
    if (tab.name === _constants__WEBPACK_IMPORTED_MODULE_7__.INSERTER_TAB_TRIGGERS) {
      return triggersTab;
    }
    if (tab.name === _constants__WEBPACK_IMPORTED_MODULE_7__.INSERTER_TAB_ACTIONS) {
      return actionsTab;
    }
  }, [triggersTab, actionsTab]);
  var onSelectTab = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (tab) {
    setCurrentInserterTab(tab);
  }, [setCurrentInserterTab]);
  return /*#__PURE__*/React.createElement("div", {
    className: "block-editor-inserter__menu"
  }, /*#__PURE__*/React.createElement("div", {
    className: "block-editor-inserter__main-area show-as-tabs"
  }, /*#__PURE__*/React.createElement("div", {
    className: "block-editor-tabbed-sidebar"
  }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.SearchControl, {
    className: "block-editor-inserter__search",
    onChange: function onChange(value) {
      if (hoveredItem) setHoveredItem(null);
      setFilterValue(value);
    },
    value: filterValue,
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Search for triggers and steps', 'post-expirator'),
    placeholder: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Search')
  }), /*#__PURE__*/React.createElement("div", {
    className: "block-editor-tabbed-sidebar__tabpanel"
  }, !!filterValue && /*#__PURE__*/React.createElement(_inserter_search_results__WEBPACK_IMPORTED_MODULE_9__["default"], {
    filterValue: filterValue,
    onSelect: onSelect,
    onHover: onHover
  }), !filterValue && /*#__PURE__*/React.createElement(_tabs__WEBPACK_IMPORTED_MODULE_6__["default"], {
    onSelect: onSelectTab,
    initialTabName: currentInserterTab
  }, getCurrentTab)))), showInserterHelpPanel && hoveredItem && /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Popover, {
    className: "block-editor-inserter__preview-container__popover",
    placement: "right-start",
    offset: 16,
    focusOnMount: false,
    animate: false
  }, /*#__PURE__*/React.createElement(_inserter_preview_panel__WEBPACK_IMPORTED_MODULE_10__["default"], {
    item: hoveredItem
  })));
}

/***/ },

/***/ "./assets/jsx/workflow-editor/components/secondary-sidebar/node-card.jsx"
/*!*******************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/secondary-sidebar/node-card.jsx ***!
  \*******************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   NodeCard: () => (/* binding */ NodeCard)
/* harmony export */ });
/* harmony import */ var _node_icon__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../node-icon */ "./assets/jsx/workflow-editor/components/node-icon.jsx");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _contexts_pro_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../contexts/pro-context */ "./assets/jsx/workflow-editor/contexts/pro-context.jsx");



function NodeCard(_ref) {
  var node = _ref.node;
  var isPro = (0,_contexts_pro_context__WEBPACK_IMPORTED_MODULE_2__.useIsPro)();
  return /*#__PURE__*/React.createElement("div", {
    className: "block-editor-block-card"
  }, /*#__PURE__*/React.createElement(_node_icon__WEBPACK_IMPORTED_MODULE_0__["default"], {
    icon: node.icon,
    showColors: true,
    className: 'block-editor-block-icon'
  }), /*#__PURE__*/React.createElement("div", {
    className: "block-editor-block-card__content"
  }, /*#__PURE__*/React.createElement("h2", {
    className: "block-editor-block-card__title"
  }, node.label, node.isProFeature && !isPro && /*#__PURE__*/React.createElement("span", {
    className: "block-editor-block-card__pro-badge"
  }, (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Pro', 'post-expirator'))), node.description && /*#__PURE__*/React.createElement("span", {
    className: "block-editor-block-card__description"
  }, node.description), node.isProFeature && !isPro && /*#__PURE__*/React.createElement("div", {
    className: "block-editor-block-card__pro-instructions"
  }, (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Currently this step is being skipped. Upgrade to Pro to unlock this feature.', 'post-expirator'))));
}

/***/ },

/***/ "./assets/jsx/workflow-editor/components/secondary-sidebar/node-draggable-chip.jsx"
/*!*****************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/secondary-sidebar/node-draggable-chip.jsx ***!
  \*****************************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ NodeDraggableChip)
/* harmony export */ });
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _node_icon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../node-icon */ "./assets/jsx/workflow-editor/components/node-icon.jsx");
/**
 * WordPress dependencies
 */




/**
 * Internal dependencies
 */

function NodeDraggableChip(_ref) {
  var node = _ref.node,
    icon = _ref.icon;
  return /*#__PURE__*/React.createElement("div", {
    className: "block-editor-block-draggable-chip-wrapper"
  }, /*#__PURE__*/React.createElement("div", {
    className: "block-editor-block-draggable-chip"
  }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Flex, {
    justify: "center",
    className: "block-editor-block-draggable-chip__content"
  }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.FlexItem, null, icon ? /*#__PURE__*/React.createElement(_node_icon__WEBPACK_IMPORTED_MODULE_2__["default"], {
    icon: icon
  }) : (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.sprintf)( /* translators: %d: Number of blocks. */
  (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__._n)('%d block', '%d blocks', count, 'post-expirator'), count)), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.FlexItem, null, node.label))));
}

/***/ },

/***/ "./assets/jsx/workflow-editor/components/secondary-sidebar/node-types-list.jsx"
/*!*************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/secondary-sidebar/node-types-list.jsx ***!
  \*************************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   NodeTypesList: () => (/* binding */ NodeTypesList),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils */ "./assets/jsx/workflow-editor/utils.jsx");
/* harmony import */ var _inserter_list_item__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./inserter-list-item */ "./assets/jsx/workflow-editor/components/secondary-sidebar/inserter-list-item.jsx");
/* harmony import */ var _inserter_listbox__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./inserter-listbox */ "./assets/jsx/workflow-editor/components/secondary-sidebar/inserter-listbox/index.jsx");
/**
 * WordPress dependencies
 */


/**
 * Internal dependencies
 */


function chunk(array, size) {
  var chunks = [];
  for (var i = 0, j = array.length; i < j; i += size) {
    chunks.push(array.slice(i, i + size));
  }
  return chunks;
}
function NodeTypesList(_ref) {
  var _ref$items = _ref.items,
    items = _ref$items === void 0 ? [] : _ref$items,
    onSelect = _ref.onSelect,
    _ref$onHover = _ref.onHover,
    onHover = _ref$onHover === void 0 ? function () {} : _ref$onHover,
    children = _ref.children,
    label = _ref.label,
    _ref$isDraggable = _ref.isDraggable,
    isDraggable = _ref$isDraggable === void 0 ? true : _ref$isDraggable;
  return /*#__PURE__*/React.createElement(_inserter_listbox__WEBPACK_IMPORTED_MODULE_2__.InserterListboxGroup, {
    className: "block-editor-block-types-list",
    "aria-label": label
  }, chunk(items, 3).map(function (row, i) {
    return /*#__PURE__*/React.createElement(_inserter_listbox__WEBPACK_IMPORTED_MODULE_2__.InserterListboxRow, {
      key: i
    }, row.map(function (item, j) {
      return /*#__PURE__*/React.createElement(_inserter_list_item__WEBPACK_IMPORTED_MODULE_1__["default"], {
        key: item.id + i + j,
        item: item,
        className: (0,_utils__WEBPACK_IMPORTED_MODULE_0__.getNodeMenuDefaultClassName)(item.id),
        onSelect: onSelect,
        onHover: onHover,
        isDraggable: isDraggable,
        isFirst: i === 0 && j === 0
      });
    }));
  }), children);
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (NodeTypesList);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/secondary-sidebar/nodes-tab.jsx"
/*!*******************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/secondary-sidebar/nodes-tab.jsx ***!
  \*******************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   NodesTab: () => (/* binding */ NodesTab)
/* harmony export */ });
/* harmony import */ var lodash_map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/map */ "./node_modules/lodash/map.js");
/* harmony import */ var lodash_map__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_map__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var lodash_flow__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/flow */ "./node_modules/lodash/flow.js");
/* harmony import */ var lodash_flow__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_flow__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var lodash_groupBy__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/groupBy */ "./node_modules/lodash/groupBy.js");
/* harmony import */ var lodash_groupBy__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_groupBy__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var lodash_orderBy__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash/orderBy */ "./node_modules/lodash/orderBy.js");
/* harmony import */ var lodash_orderBy__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_orderBy__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/compose */ "./node_modules/@wordpress/compose/build-module/hooks/use-async-list/index.js");
/* harmony import */ var _node_types_list__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./node-types-list */ "./assets/jsx/workflow-editor/components/secondary-sidebar/node-types-list.jsx");
/* harmony import */ var _panel__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./panel */ "./assets/jsx/workflow-editor/components/secondary-sidebar/panel.jsx");
/* harmony import */ var _inserter_listbox__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./inserter-listbox */ "./assets/jsx/workflow-editor/components/secondary-sidebar/inserter-listbox/index.jsx");
/**
 * External dependencies
 */





/**
 * WordPress dependencies
 */






/**
 * Internal dependencies
 */

var NodesTab = function NodesTab(_ref) {
  var items = _ref.items,
    categories = _ref.categories,
    onSelect = _ref.onSelect,
    onHover = _ref.onHover,
    showMostUsedNodes = _ref.showMostUsedNodes;
  var MAX_SUGGESTED_ITEMS = 6;

  /**
   * Shared reference to an empty array for cases where it is important to avoid
   * returning a new array reference on every invocation and rerendering the component.
   *
   * @type {Array}
   */
  var EMPTY_ARRAY = [];
  var suggestedItems = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_5__.useMemo)(function () {
    return lodash_orderBy__WEBPACK_IMPORTED_MODULE_3___default()(items, ['frecency'], ['desc']).slice(0, MAX_SUGGESTED_ITEMS);
  }, [items]);
  var itemsPerCategory = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_5__.useMemo)(function () {
    return lodash_flow__WEBPACK_IMPORTED_MODULE_1___default()(function (itemList) {
      return itemList.filter(function (item) {
        return item.category && item.category !== 'reusable';
      });
    }, function (itemList) {
      return lodash_groupBy__WEBPACK_IMPORTED_MODULE_2___default()(itemList, 'category');
    })(items);
  }, [items]);

  // Hide block preview on unmount.
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_5__.useEffect)(function () {
    return function () {
      return onHover ? onHover(null) : null;
    };
  }, []);
  var onSelectItem = function onSelectItem(item) {
    if (onSelect) {
      onSelect(item);
    }
  };

  /**
   * The inserter contains a big number of nodes and opening it is a costful operation.
   * The rendering is the most costful part of it, in order to improve the responsiveness
   * of the "opening" action, these lazy lists allow us to render the inserter category per category,
   * once all the categories are rendered, we start rendering the collections and the uncategorized block types.
   */
  var currentlyRenderedCategories = (0,_wordpress_compose__WEBPACK_IMPORTED_MODULE_6__["default"])(categories);
  // const didRenderAllCategories = categories.length === currentlyRenderedCategories.length;

  return /*#__PURE__*/React.createElement(_inserter_listbox__WEBPACK_IMPORTED_MODULE_9__["default"], null, /*#__PURE__*/React.createElement("div", null, showMostUsedNodes && suggestedItems.length > 0 && /*#__PURE__*/React.createElement(_panel__WEBPACK_IMPORTED_MODULE_8__["default"], {
    title: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__._x)('Most used', 'nodes', 'post-expirator')
  }, /*#__PURE__*/React.createElement(_node_types_list__WEBPACK_IMPORTED_MODULE_7__["default"], {
    items: suggestedItems,
    onSelect: onSelectItem,
    onHover: onHover,
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_4__._x)('Most used', 'nodes', 'post-expirator')
  })), lodash_map__WEBPACK_IMPORTED_MODULE_0___default()(currentlyRenderedCategories, function (category) {
    var categoryItems = itemsPerCategory[category.name];
    if (!categoryItems || !categoryItems.length) {
      return null;
    }
    return /*#__PURE__*/React.createElement(_panel__WEBPACK_IMPORTED_MODULE_8__["default"], {
      key: category.name,
      title: category.label,
      icon: category.icon
    }, /*#__PURE__*/React.createElement(_node_types_list__WEBPACK_IMPORTED_MODULE_7__["default"], {
      items: categoryItems,
      onSelect: onSelectItem,
      onHover: onHover,
      label: category.label
    }));
  })));
};

/***/ },

/***/ "./assets/jsx/workflow-editor/components/secondary-sidebar/panel.jsx"
/*!***************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/secondary-sidebar/panel.jsx ***!
  \***************************************************************************/
(__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 export */ });
/**
 * WordPress dependencies
 */
// import NodeIcon from './node-icon';

function InserterPanel(_ref) {
  var title = _ref.title,
    icon = _ref.icon,
    children = _ref.children;
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
    className: "block-editor-inserter__panel-header"
  }, /*#__PURE__*/React.createElement("h2", {
    className: "block-editor-inserter__panel-title"
  }, title)), /*#__PURE__*/React.createElement("div", {
    className: "block-editor-inserter__panel-content"
  }, children));
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (InserterPanel);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/secondary-sidebar/search-items.jsx"
/*!**********************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/secondary-sidebar/search-items.jsx ***!
  \**********************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   getItemSearchRank: () => (/* binding */ getItemSearchRank),
/* harmony export */   getNormalizedSearchTerms: () => (/* binding */ getNormalizedSearchTerms),
/* harmony export */   searchItems: () => (/* binding */ searchItems),
/* harmony export */   searchNodeItems: () => (/* binding */ searchNodeItems)
/* harmony export */ });
/* harmony import */ var lodash_deburr__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/deburr */ "./node_modules/lodash/deburr.js");
/* harmony import */ var lodash_deburr__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_deburr__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var lodash_differenceWith__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/differenceWith */ "./node_modules/lodash/differenceWith.js");
/* harmony import */ var lodash_differenceWith__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_differenceWith__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var lodash_find__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/find */ "./node_modules/lodash/find.js");
/* harmony import */ var lodash_find__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_find__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var lodash_words__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash/words */ "./node_modules/lodash/words.js");
/* harmony import */ var lodash_words__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_words__WEBPACK_IMPORTED_MODULE_3__);
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
/**
 * External dependencies
 */





// Default search helpers
var defaultGetName = function defaultGetName(item) {
  return item.name || '';
};
var defaultGetTitle = function defaultGetTitle(item) {
  return item.label;
};
var defaultGetDescription = function defaultGetDescription(item) {
  return item.description || '';
};
var defaultGetKeywords = function defaultGetKeywords(item) {
  return item.keywords || [];
};
var defaultGetCategory = function defaultGetCategory(item) {
  return item.category;
};

/**
 * Sanitizes the search input string.
 *
 * @param {string} input The search input to normalize.
 *
 * @return {string} The normalized search input.
 */
function normalizeSearchInput() {
  var input = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  // Disregard diacritics.
  //  Input: "média"
  input = lodash_deburr__WEBPACK_IMPORTED_MODULE_0___default()(input);

  // Accommodate leading slash, matching autocomplete expectations.
  //  Input: "/media"
  input = input.replace(/^\//, '');

  // Lowercase.
  //  Input: "MEDIA"
  input = input.toLowerCase();
  return input;
}

/**
 * Converts the search term into a list of normalized terms.
 *
 * @param {string} input The search term to normalize.
 *
 * @return {string[]} The normalized list of search terms.
 */
var getNormalizedSearchTerms = function getNormalizedSearchTerms() {
  var input = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  // Extract words.
  return lodash_words__WEBPACK_IMPORTED_MODULE_3___default()(normalizeSearchInput(input));
};
var removeMatchingTerms = function removeMatchingTerms(unmatchedTerms, unprocessedTerms) {
  return lodash_differenceWith__WEBPACK_IMPORTED_MODULE_1___default()(unmatchedTerms, getNormalizedSearchTerms(unprocessedTerms), function (unmatchedTerm, unprocessedTerm) {
    return unprocessedTerm.includes(unmatchedTerm);
  });
};
var searchNodeItems = function searchNodeItems(items, categories, searchInput) {
  var normalizedSearchTerms = getNormalizedSearchTerms(searchInput);
  if (normalizedSearchTerms.length === 0) {
    return items;
  }
  var config = {
    getCategory: function getCategory(item) {
      var _find;
      return (_find = lodash_find__WEBPACK_IMPORTED_MODULE_2___default()(categories, {
        name: item.category
      })) === null || _find === void 0 ? void 0 : _find.label;
    },
    getName: function getName(item) {
      return item.name;
    },
    getTitle: function getTitle(item) {
      return item.label;
    },
    getDescription: function getDescription(item) {
      return item.description;
    },
    getKeywords: function getKeywords(item) {
      return item.keywords || [];
    }
  };
  return searchItems(items, searchInput, config);
};

/**
 * Filters an item list given a search term.
 *
 * @param {Array}  items       Item list
 * @param {string} searchInput Search input.
 * @param {Object} config      Search Config.
 *
 * @return {Array} Filtered item list.
 */
var searchItems = function searchItems() {
  var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  var searchInput = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
  var config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  var normalizedSearchTerms = getNormalizedSearchTerms(searchInput);
  if (normalizedSearchTerms.length === 0) {
    return items;
  }
  var rankedItems = items.map(function (item) {
    return [item, getItemSearchRank(item, searchInput, config)];
  }).filter(function (_ref) {
    var _ref2 = _slicedToArray(_ref, 2),
      rank = _ref2[1];
    return rank > 0;
  });
  rankedItems.sort(function (_ref3, _ref4) {
    var _ref5 = _slicedToArray(_ref3, 2),
      rank1 = _ref5[1];
    var _ref6 = _slicedToArray(_ref4, 2),
      rank2 = _ref6[1];
    return rank2 - rank1;
  });
  return rankedItems.map(function (_ref7) {
    var _ref8 = _slicedToArray(_ref7, 1),
      item = _ref8[0];
    return item;
  });
};

/**
 * Get the search rank for a given item and a specific search term.
 * The better the match, the higher the rank.
 * If the rank equals 0, it should be excluded from the results.
 *
 * @param {Object} item       Item to filter.
 * @param {string} searchTerm Search term.
 * @param {Object} config     Search Config.
 *
 * @return {number} Search Rank.
 */
function getItemSearchRank(item, searchTerm) {
  var config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  var _config$getName = config.getName,
    getName = _config$getName === void 0 ? defaultGetName : _config$getName,
    _config$getTitle = config.getTitle,
    getTitle = _config$getTitle === void 0 ? defaultGetTitle : _config$getTitle,
    _config$getDescriptio = config.getDescription,
    getDescription = _config$getDescriptio === void 0 ? defaultGetDescription : _config$getDescriptio,
    _config$getKeywords = config.getKeywords,
    getKeywords = _config$getKeywords === void 0 ? defaultGetKeywords : _config$getKeywords,
    _config$getCategory = config.getCategory,
    getCategory = _config$getCategory === void 0 ? defaultGetCategory : _config$getCategory;
  var name = getName(item);
  var title = getTitle(item);
  var description = getDescription(item);
  var keywords = getKeywords(item);
  var category = getCategory(item);
  var normalizedSearchInput = normalizeSearchInput(searchTerm);
  var normalizedTitle = normalizeSearchInput(title);
  var rank = 0;

  // Prefers exact matches
  // Then prefers if the beginning of the title matches the search term
  // name, keywords, categories, variations match come later.
  if (normalizedSearchInput === normalizedTitle) {
    rank += 30;
  } else if (normalizedTitle.startsWith(normalizedSearchInput)) {
    rank += 20;
  } else {
    var terms = [name, title, description].concat(_toConsumableArray(keywords), [category]).join(' ');
    var normalizedSearchTerms = lodash_words__WEBPACK_IMPORTED_MODULE_3___default()(normalizedSearchInput);
    var unmatchedTerms = removeMatchingTerms(normalizedSearchTerms, terms);
    if (unmatchedTerms.length === 0) {
      rank += 10;
    }
  }

  // Give a better rank to "core" namespaced items.
  if (rank !== 0 && name.startsWith('core/')) {
    rank++;
  }
  return rank;
}

/***/ },

/***/ "./assets/jsx/workflow-editor/components/secondary-sidebar/tabs.jsx"
/*!**************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/secondary-sidebar/tabs.jsx ***!
  \**************************************************************************/
(__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 export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _tab_panel__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../tab-panel */ "./assets/jsx/workflow-editor/components/tab-panel.jsx");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../constants */ "./assets/jsx/workflow-editor/constants.jsx");
/**
 * WordPress dependencies
 */




/**
 * Internal dependencies
 */

var triggersTab = {
  name: _constants__WEBPACK_IMPORTED_MODULE_3__.INSERTER_TAB_TRIGGERS,
  /* translators: Blocks tab title in the block inserter. */
  title: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Triggers', 'post-expirator')
};
var actionsTabs = {
  name: _constants__WEBPACK_IMPORTED_MODULE_3__.INSERTER_TAB_ACTIONS,
  /* translators: Patterns tab title in the block inserter. */
  title: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Actions', 'post-expirator')
};
function InserterTabs(_ref) {
  var children = _ref.children,
    onSelect = _ref.onSelect,
    _ref$initialTabName = _ref.initialTabName,
    initialTabName = _ref$initialTabName === void 0 ? _constants__WEBPACK_IMPORTED_MODULE_3__.INSERTER_TAB_TRIGGERS : _ref$initialTabName;
  var tabs = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
    var tempTabs = [triggersTab, actionsTabs];
    return tempTabs;
  }, [triggersTab, actionsTabs]);
  return /*#__PURE__*/React.createElement(_tab_panel__WEBPACK_IMPORTED_MODULE_1__.TabPanel, {
    className: "block-editor-inserter__tabs",
    tabs: tabs,
    onSelect: onSelect,
    initialTabName: initialTabName
  }, children);
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (InserterTabs);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/secondary-sidebar/tips.jsx"
/*!**************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/secondary-sidebar/tips.jsx ***!
  \**************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   Tips: () => (/* binding */ Tips)
/* harmony export */ });
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
/**
 * WordPress dependencies
 */



var globalTips = [(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createInterpolateElement)((0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Select multiple steps by pressing <kbd>cmd</kbd> and clicking on each step in the workflow.', 'post-expirator'), {
  kbd: /*#__PURE__*/React.createElement("kbd", null)
}), (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Drag steps from the inserter and drop them directly into your workflow for easy customization.', 'post-expirator'), (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Simply double-click any step to bring up the settings sidebar for quick adjustments.', 'post-expirator'), (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Double-click the workflow pane to increase the zoom level for a closer look.', 'post-expirator'), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createInterpolateElement)((0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Hold down the <kbd>shift</kbd> key and double-click the workflow pane to decrease the zoom level.', 'post-expirator'), {
  kbd: /*#__PURE__*/React.createElement("kbd", null)
}), (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Easily add new steps by clicking on a step\'s handle and dragging it. Drop it in the workflow pane to see a floating inserter where you can type and search for the step you need.', 'post-expirator')];
function Tips() {
  var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(
    // Disable Reason: I'm not generating an HTML id.
    // eslint-disable-next-line no-restricted-syntax
    Math.floor(Math.random() * globalTips.length)),
    _useState2 = _slicedToArray(_useState, 1),
    randomIndex = _useState2[0];
  return /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Tip, null, globalTips[randomIndex]);
}

/***/ },

/***/ "./assets/jsx/workflow-editor/components/setting-popover/index.jsx"
/*!*************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/setting-popover/index.jsx ***!
  \*************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   SettingPopover: () => (/* binding */ SettingPopover),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__);
var _excluded = ["onClose", "title", "children", "className", "offset", "placement"];
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }

var SettingPopover = function SettingPopover(_ref) {
  var onClose = _ref.onClose,
    title = _ref.title,
    children = _ref.children,
    className = _ref.className,
    _ref$offset = _ref.offset,
    offset = _ref$offset === void 0 ? 40 : _ref$offset,
    _ref$placement = _ref.placement,
    placement = _ref$placement === void 0 ? "left-start" : _ref$placement,
    props = _objectWithoutProperties(_ref, _excluded);
  return /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Popover, _extends({
    onClose: onClose,
    placement: placement,
    offset: offset,
    className: "workflow-editor-setting-popover ".concat(className)
  }, props), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalVStack, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalHStack, null, /*#__PURE__*/React.createElement("h2", {
    className: "components-truncate components-text components-heading block-editor-inspector-popover-header__heading"
  }, title), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Button, {
    icon: 'no-alt',
    isSmall: true,
    className: "block-editor-inspector-popover-header__action",
    onClick: onClose
  }))), children);
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SettingPopover);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/settings-sidebar/constants.jsx"
/*!******************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/settings-sidebar/constants.jsx ***!
  \******************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   SIDEBAR_NODE_EDGE: () => (/* binding */ SIDEBAR_NODE_EDGE),
/* harmony export */   SIDEBAR_WORKFLOW: () => (/* binding */ SIDEBAR_WORKFLOW)
/* harmony export */ });
var SIDEBAR_WORKFLOW = 'future-workflow-editor/workflow';
var SIDEBAR_NODE_EDGE = 'future-workflow-editor/node-edge';

/***/ },

/***/ "./assets/jsx/workflow-editor/components/settings-sidebar/plugin-sidebar.jsx"
/*!***********************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/settings-sidebar/plugin-sidebar.jsx ***!
  \***********************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   PluginSidebarEditPost: () => (/* binding */ PluginSidebarEditPost),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_interface__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/interface */ "./node_modules/@wordpress/interface/build-module/index.js");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_keyboard_shortcuts__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/keyboard-shortcuts */ "./node_modules/@wordpress/keyboard-shortcuts/build-module/index.js");
/* harmony import */ var _workflow_store__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../workflow-store */ "./assets/jsx/workflow-editor/components/workflow-store/index.jsx");
/* harmony import */ var _editor_store__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../editor-store */ "./assets/jsx/workflow-editor/components/editor-store/index.jsx");
/* harmony import */ var _keyboard_shortcuts_constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../keyboard-shortcuts/constants */ "./assets/jsx/workflow-editor/components/keyboard-shortcuts/constants.jsx");
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../constants */ "./assets/jsx/workflow-editor/constants.jsx");
var _excluded = ["className"];
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
/**
 * WordPress dependencies
 */





/**
 * Internal dependencies
 */




function PluginSidebarEditPost(_ref) {
  var className = _ref.className,
    props = _objectWithoutProperties(_ref, _excluded);
  var _useSelect = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.useSelect)(function (select) {
      return {
        workflowTitle: select(_workflow_store__WEBPACK_IMPORTED_MODULE_4__.store).getEditedWorkflowAttribute('title'),
        shortcut: select(_wordpress_keyboard_shortcuts__WEBPACK_IMPORTED_MODULE_3__.store).getShortcutRepresentation(_keyboard_shortcuts_constants__WEBPACK_IMPORTED_MODULE_6__.SHORTCUT_TOGGLE_SIDEBAR),
        showIconLabels: select(_editor_store__WEBPACK_IMPORTED_MODULE_5__.store).isFeatureActive(_constants__WEBPACK_IMPORTED_MODULE_7__.FEATURE_SHOW_ICON_LABELS)
      };
    }, []),
    workflowTitle = _useSelect.workflowTitle,
    shortcut = _useSelect.shortcut,
    showIconLabels = _useSelect.showIconLabels;
  return /*#__PURE__*/React.createElement(_wordpress_interface__WEBPACK_IMPORTED_MODULE_0__.ComplementaryArea, _extends({
    panelClassName: className,
    className: "edit-post-sidebar",
    smallScreenTitle: workflowTitle || (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('(no name)', 'post-expirator'),
    scope: _constants__WEBPACK_IMPORTED_MODULE_7__.SLOT_SCOPE_WORKFLOW_EDITOR,
    toggleShortcut: shortcut,
    showIconLabels: showIconLabels
  }, props));
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PluginSidebarEditPost);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/settings-sidebar/settings-header.jsx"
/*!************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/settings-sidebar/settings-header.jsx ***!
  \************************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   SettingsHeader: () => (/* binding */ SettingsHeader),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _components_tab_panel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../components/tab-panel */ "./assets/jsx/workflow-editor/components/tab-panel.jsx");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _editor_store__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../editor-store */ "./assets/jsx/workflow-editor/components/editor-store/index.jsx");
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./constants */ "./assets/jsx/workflow-editor/components/settings-sidebar/constants.jsx");
/**
 * WordPress dependencies
 */




/**
 * Internal dependencies
*/


var SettingsHeader = function SettingsHeader(_ref) {
  var sidebarName = _ref.sidebarName;
  var _useDispatch = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_2__.useDispatch)(_editor_store__WEBPACK_IMPORTED_MODULE_3__.store),
    openGeneralSidebar = _useDispatch.openGeneralSidebar;
  var _useSelect = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_2__.useSelect)(function (select) {
      return {
        // translators: Default label for the Workflow sidebar tab, not selected.
        documentLabel: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__._x)('Workflow', 'noun', 'post-expirator')
      };
    }, []),
    documentLabel = _useSelect.documentLabel;

  /* Use a list so screen readers will announce how many tabs there are. */
  return /*#__PURE__*/React.createElement(_components_tab_panel__WEBPACK_IMPORTED_MODULE_0__.TabPanel, {
    tabs: [{
      name: _constants__WEBPACK_IMPORTED_MODULE_4__.SIDEBAR_WORKFLOW,
      title: documentLabel
    }, {
      name: _constants__WEBPACK_IMPORTED_MODULE_4__.SIDEBAR_NODE_EDGE,
      title: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Element', 'post-expirator')
    }],
    onSelect: function onSelect(tabName) {
      openGeneralSidebar(tabName);
    },
    initialTabName: sidebarName
  }, function () {
    return null;
  });
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SettingsHeader);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/settings-sidebar/settings-sidebar.jsx"
/*!*************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/settings-sidebar/settings-sidebar.jsx ***!
  \*************************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   SettingsSidebar: () => (/* binding */ SettingsSidebar),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/cog.js");
/* harmony import */ var _wordpress_keyboard_shortcuts__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/keyboard-shortcuts */ "./node_modules/@wordpress/keyboard-shortcuts/build-module/index.js");
/* harmony import */ var _keyboard_shortcuts_constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../keyboard-shortcuts/constants */ "./assets/jsx/workflow-editor/components/keyboard-shortcuts/constants.jsx");
/* harmony import */ var _plugin_sidebar__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./plugin-sidebar */ "./assets/jsx/workflow-editor/components/settings-sidebar/plugin-sidebar.jsx");
/* harmony import */ var _settings_header__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./settings-header */ "./assets/jsx/workflow-editor/components/settings-sidebar/settings-header.jsx");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../constants */ "./assets/jsx/workflow-editor/constants.jsx");
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./constants */ "./assets/jsx/workflow-editor/components/settings-sidebar/constants.jsx");
/* harmony import */ var _workflow_summary__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../workflow-summary */ "./assets/jsx/workflow-editor/components/workflow-summary/index.jsx");
/* harmony import */ var _node_inspector__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../node-inspector */ "./assets/jsx/workflow-editor/components/node-inspector/index.jsx");
/* harmony import */ var _editor_store__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../editor-store */ "./assets/jsx/workflow-editor/components/editor-store/index.jsx");
/* harmony import */ var _workflow_debug_ray_panel__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../workflow-debug-ray-panel */ "./assets/jsx/workflow-editor/components/workflow-debug-ray-panel/index.jsx");














var SIDEBAR_ACTIVE_BY_DEFAULT = _wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Platform.select({
  web: true,
  native: false
});
var SettingsSidebar = function SettingsSidebar() {
  var _useSelect = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.useSelect)(function (select) {
      var shortcut = select(_wordpress_keyboard_shortcuts__WEBPACK_IMPORTED_MODULE_3__.store).getShortcutRepresentation(_keyboard_shortcuts_constants__WEBPACK_IMPORTED_MODULE_4__.SHORTCUT_TOGGLE_SIDEBAR);
      var sidebarName = select('core/interface').getActiveComplementaryArea(_constants__WEBPACK_IMPORTED_MODULE_8__.SLOT_SCOPE_WORKFLOW_EDITOR);
      return {
        sidebarName: sidebarName,
        keyboardShortcut: shortcut
      };
    }),
    sidebarName = _useSelect.sidebarName,
    keyboardShortcut = _useSelect.keyboardShortcut;
  var _useSelect2 = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.useSelect)(function (select) {
      return {
        isDeveloperModeEnabled: select(_editor_store__WEBPACK_IMPORTED_MODULE_12__.store).isFeatureActive(_constants__WEBPACK_IMPORTED_MODULE_8__.FEATURE_DEVELOPER_MODE),
        isRayDebugInstalled: select(_editor_store__WEBPACK_IMPORTED_MODULE_12__.store).isRayDebugInstalled()
      };
    }),
    isDeveloperModeEnabled = _useSelect2.isDeveloperModeEnabled,
    isRayDebugInstalled = _useSelect2.isRayDebugInstalled;
  return /*#__PURE__*/React.createElement(_plugin_sidebar__WEBPACK_IMPORTED_MODULE_5__.PluginSidebarEditPost, {
    identifier: sidebarName,
    header: /*#__PURE__*/React.createElement(_settings_header__WEBPACK_IMPORTED_MODULE_6__.SettingsHeader, {
      sidebarName: sidebarName
    }),
    closeLabel: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Close settings', 'post-expirator'),
    headerClassName: "edit-post-sidebar__panel-tabs",
    className: "edit-post-sidebar__panel"
    /* translators: button label text should, if possible, be under 16 characters. */,
    title: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Settings', 'post-expirator'),
    toggleShortcut: keyboardShortcut,
    icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_2__["default"],
    isActiveByDefault: SIDEBAR_ACTIVE_BY_DEFAULT
  }, sidebarName === _constants__WEBPACK_IMPORTED_MODULE_9__.SIDEBAR_WORKFLOW && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_workflow_summary__WEBPACK_IMPORTED_MODULE_10__.WorkflowSummary, null), isDeveloperModeEnabled && isRayDebugInstalled && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_workflow_debug_ray_panel__WEBPACK_IMPORTED_MODULE_13__["default"], null))), sidebarName === _constants__WEBPACK_IMPORTED_MODULE_9__.SIDEBAR_NODE_EDGE && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_node_inspector__WEBPACK_IMPORTED_MODULE_11__.NodeInspector, null)));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SettingsSidebar);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/tab-panel.jsx"
/*!*************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/tab-panel.jsx ***!
  \*************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   TabPanel: () => (/* binding */ TabPanel),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var lodash_partial__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/partial */ "./node_modules/lodash/partial.js");
/* harmony import */ var lodash_partial__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_partial__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var lodash_noop__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/noop */ "./node_modules/lodash/noop.js");
/* harmony import */ var lodash_noop__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_noop__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var lodash_find__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash/find */ "./node_modules/lodash/find.js");
/* harmony import */ var lodash_find__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_find__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/compose */ "./node_modules/@wordpress/compose/build-module/hooks/use-instance-id/index.js");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__);
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
var _excluded = ["tabId", "onClick", "children", "selected"];
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
/**
 * External dependencies
 */





/**
 * WordPress dependencies
 */



/**
 * Internal dependencies
 */

var TabButton = function TabButton(_ref) {
  var tabId = _ref.tabId,
    onClick = _ref.onClick,
    children = _ref.children,
    selected = _ref.selected,
    rest = _objectWithoutProperties(_ref, _excluded);
  return /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Button, _extends({
    role: "tab",
    tabIndex: selected ? null : -1,
    "aria-selected": selected,
    id: tabId,
    onClick: onClick
  }, rest), children);
};

/**
 * This is a clone of the TabPanel component from @wordpress/components.
 * We need to clone it because the original TabPanel component was not working
 * correctly when the initialTabName was set to a tab that was not the first tab.
 */

function TabPanel(_ref2) {
  var _selectedTab$name;
  var className = _ref2.className,
    children = _ref2.children,
    tabs = _ref2.tabs,
    initialTabName = _ref2.initialTabName,
    _ref2$orientation = _ref2.orientation,
    orientation = _ref2$orientation === void 0 ? 'horizontal' : _ref2$orientation,
    _ref2$activeClass = _ref2.activeClass,
    activeClass = _ref2$activeClass === void 0 ? 'is-active' : _ref2$activeClass,
    _ref2$onSelect = _ref2.onSelect,
    onSelect = _ref2$onSelect === void 0 ? (lodash_noop__WEBPACK_IMPORTED_MODULE_2___default()) : _ref2$onSelect;
  var instanceId = (0,_wordpress_compose__WEBPACK_IMPORTED_MODULE_5__["default"])(TabPanel, 'tab-panel');
  var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_4__.useState)(null),
    _useState2 = _slicedToArray(_useState, 2),
    selected = _useState2[0],
    setSelected = _useState2[1];
  var handleClick = function handleClick(tabKey) {
    setSelected(tabKey);
    onSelect(tabKey);
  };
  var onNavigate = function onNavigate(childIndex, child) {
    child.click();
  };
  var selectedTab = lodash_find__WEBPACK_IMPORTED_MODULE_3___default()(tabs, {
    name: selected
  });
  var selectedId = "".concat(instanceId, "-").concat((_selectedTab$name = selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.name) !== null && _selectedTab$name !== void 0 ? _selectedTab$name : 'none');
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_4__.useEffect)(function () {
    var newSelectedTab = lodash_find__WEBPACK_IMPORTED_MODULE_3___default()(tabs, {
      name: selected
    });
    if (!newSelectedTab) {
      setSelected(initialTabName || (tabs.length > 0 ? tabs[0].name : null));
    }
  }, [tabs]);

  // Fix the initialTabName not working when set to a tab that is not the first tab.
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_4__.useEffect)(function () {
    if (initialTabName) {
      setSelected(initialTabName);
      return;
    }
    setSelected(tabs[0].name);
  }, [initialTabName]);
  return /*#__PURE__*/React.createElement("div", {
    className: className
  }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.NavigableMenu, {
    role: "tablist",
    orientation: orientation,
    onNavigate: onNavigate,
    className: "components-tab-panel__tabs block-editor-inserter__tablist-and-close-button"
  }, tabs.map(function (tab) {
    return /*#__PURE__*/React.createElement(TabButton, {
      className: classnames__WEBPACK_IMPORTED_MODULE_0___default()('components-tab-panel__tabs-item', tab.className, _defineProperty({}, activeClass, tab.name === selected)),
      tabId: "".concat(instanceId, "-").concat(tab.name),
      "aria-controls": "".concat(instanceId, "-").concat(tab.name, "-view"),
      selected: tab.name === selected,
      key: tab.name,
      onClick: lodash_partial__WEBPACK_IMPORTED_MODULE_1___default()(handleClick, tab.name)
    }, tab.title);
  })), selectedTab && /*#__PURE__*/React.createElement("div", {
    key: selectedId,
    "aria-labelledby": selectedId,
    role: "tabpanel",
    id: "".concat(selectedId, "-view"),
    className: "components-tab-panel__tab-content block-editor-inserter__tabpanel"
  }, children(selectedTab)));
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (TabPanel);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/variables-tree-select/index.jsx"
/*!*******************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/variables-tree-select/index.jsx ***!
  \*******************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   VariablesTreeSelect: () => (/* binding */ VariablesTreeSelect),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__);

function VariablesTreeSelect(_ref) {
  var label = _ref.label,
    selectedId = _ref.selectedId,
    onChange = _ref.onChange,
    tree = _ref.tree;
  return /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.TreeSelect, {
    label: label,
    tree: tree,
    selectedId: selectedId,
    onChange: onChange
  });
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (VariablesTreeSelect);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/welcome-guide/index.jsx"
/*!***********************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/welcome-guide/index.jsx ***!
  \***********************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   WelcomeGuide: () => (/* binding */ WelcomeGuide),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _editor_store__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../editor-store */ "./assets/jsx/workflow-editor/components/editor-store/index.jsx");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../constants */ "./assets/jsx/workflow-editor/constants.jsx");





var getWelcomeGuideImageUrl = function getWelcomeGuideImageUrl(imageName) {
  return futureWorkflowEditor.assetsUrl + '/images/workflow-welcome-guide/' + imageName + '?v=' + futureWorkflowEditor.pluginVersion;
};
function WelcomeGuide() {
  var _useDispatch = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_3__.useDispatch)(_editor_store__WEBPACK_IMPORTED_MODULE_2__.store),
    disableFeature = _useDispatch.disableFeature;
  var pagesContent = futureWorkflowEditor.welcomeGuidePages;
  return /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Guide, {
    className: "workflow-editor-welcome-guide",
    contentLabel: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Welcome to the workflow editor", 'post-expirator'),
    finishButtonText: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Get started", 'post-expirator'),
    onFinish: function onFinish() {
      disableFeature(_constants__WEBPACK_IMPORTED_MODULE_4__.FEATURE_WELCOME_GUIDE);
    },
    pages: pagesContent.map(function (_ref) {
      var title = _ref.title,
        content = _ref.content,
        image = _ref.image;
      return {
        content: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("h1", {
          className: "edit-post-welcome-guide__heading"
        }, title), /*#__PURE__*/React.createElement("p", {
          className: "edit-post-welcome-guide__text"
        }, content)),
        image: /*#__PURE__*/React.createElement("picture", {
          className: "edit-post-welcome-guide__image"
        }, /*#__PURE__*/React.createElement("source", {
          srcSet: getWelcomeGuideImageUrl(image + '.png'),
          media: "(prefers-reduced-motion: reduce)"
        }), /*#__PURE__*/React.createElement("img", {
          src: getWelcomeGuideImageUrl(image + '.gif'),
          width: "312",
          height: "240",
          alt: ""
        }))
      };
    })
  });
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (WelcomeGuide);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/workflow-debug-ray-panel/index.jsx"
/*!**********************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/workflow-debug-ray-panel/index.jsx ***!
  \**********************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   WorkflowDebugRayPanel: () => (/* binding */ WorkflowDebugRayPanel),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _workflow_store__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../workflow-store */ "./assets/jsx/workflow-editor/components/workflow-store/index.jsx");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _persistent_panel_body__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../persistent-panel-body */ "./assets/jsx/workflow-editor/components/persistent-panel-body/index.jsx");







var WorkflowDebugRayPanel = function WorkflowDebugRayPanel() {
  var _useSelect = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_3__.useSelect)(function (select) {
      return {
        showQueries: select(_workflow_store__WEBPACK_IMPORTED_MODULE_2__.store).getEditedWorkflowAttribute('debugRayShowQueries'),
        showEmails: select(_workflow_store__WEBPACK_IMPORTED_MODULE_2__.store).getEditedWorkflowAttribute('debugRayShowEmails'),
        showWordPressErrors: select(_workflow_store__WEBPACK_IMPORTED_MODULE_2__.store).getEditedWorkflowAttribute('debugRayShowWordPressErrors'),
        showCurrentRunningStep: select(_workflow_store__WEBPACK_IMPORTED_MODULE_2__.store).getEditedWorkflowAttribute('debugRayShowCurrentRunningStep'),
        isLoadingWorkflow: select(_workflow_store__WEBPACK_IMPORTED_MODULE_2__.store).isLoadingWorkflow()
      };
    }),
    showQueries = _useSelect.showQueries,
    showEmails = _useSelect.showEmails,
    showWordPressErrors = _useSelect.showWordPressErrors,
    showCurrentRunningStep = _useSelect.showCurrentRunningStep,
    isLoadingWorkflow = _useSelect.isLoadingWorkflow;
  var _useDispatch = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_3__.useDispatch)(_workflow_store__WEBPACK_IMPORTED_MODULE_2__.store),
    setEditedWorkflowAttribute = _useDispatch.setEditedWorkflowAttribute;
  var onChangeShowQueries = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_4__.useCallback)(function (selected) {
    setEditedWorkflowAttribute('debugRayShowQueries', selected);
  });
  var onChangeShowEmails = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_4__.useCallback)(function (selected) {
    setEditedWorkflowAttribute('debugRayShowEmails', selected);
  });
  var onChangeShowWordPressErrors = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_4__.useCallback)(function (selected) {
    setEditedWorkflowAttribute('debugRayShowWordPressErrors', selected);
  });
  var onChangeShowCurrentRunningStep = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_4__.useCallback)(function (selected) {
    setEditedWorkflowAttribute('debugRayShowCurrentRunningStep', selected);
  });
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(_persistent_panel_body__WEBPACK_IMPORTED_MODULE_5__["default"], {
    className: "edit-post-post-status workflow-editor-dev-panel",
    title: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Ray Debug', 'post-expirator'),
    initialOpen: true,
    disabled: isLoadingWorkflow
  }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.PanelRow, null, /*#__PURE__*/React.createElement("p", null, (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Enable or disable the different types of debug information that is shown in Ray when this workflow is activated.', 'post-expirator'))), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.ToggleControl, {
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Show Queries', 'post-expirator'),
    checked: showQueries,
    onChange: onChangeShowQueries
  })), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.ToggleControl, {
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Show Emails', 'post-expirator'),
    checked: showEmails,
    onChange: onChangeShowEmails
  })), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.ToggleControl, {
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Show WordPress Errors', 'post-expirator'),
    checked: showWordPressErrors,
    onChange: onChangeShowWordPressErrors
  })), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.ToggleControl, {
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Show current running step', 'post-expirator'),
    checked: showCurrentRunningStep,
    onChange: onChangeShowCurrentRunningStep
  }))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (WorkflowDebugRayPanel);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/workflow-delete-button/index.jsx"
/*!********************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/workflow-delete-button/index.jsx ***!
  \********************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   WorkflowDeleteButton: () => (/* binding */ WorkflowDeleteButton),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/compose */ "./node_modules/@wordpress/compose/build-module/hooks/use-viewport-match/index.js");
/* harmony import */ var _workflow_store__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../workflow-store */ "./assets/jsx/workflow-editor/components/workflow-store/index.jsx");





function WorkflowDeleteButton() {
  var _useSelect = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_2__.useSelect)(function (select) {
      return {
        isDeletingWorkflow: select(_workflow_store__WEBPACK_IMPORTED_MODULE_4__.store).isDeletingWorkflow()
      };
    }),
    isDeletingWorkflow = _useSelect.isDeletingWorkflow;
  var _useDispatch = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_2__.useDispatch)(_workflow_store__WEBPACK_IMPORTED_MODULE_4__.store),
    deleteWorkflow = _useDispatch.deleteWorkflow;
  var isMobileViewport = (0,_wordpress_compose__WEBPACK_IMPORTED_MODULE_3__["default"])('small', '<');
  var onClick = function onClick() {
    var alertMessage = (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Are you sure you want to delete this workflow?', 'post-expirator');
    if (window.confirm(alertMessage)) {
      deleteWorkflow();
    }
  };
  return /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Button, {
    className: "editor-post-delete-workflow is-next-40px-default-size",
    onClick: onClick,
    disabled: isDeletingWorkflow,
    variant: "secondary",
    isDestructive: true
  }, isMobileViewport ? (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Delete', 'post-expirator') : (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Move to trash', 'post-expirator'));
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (WorkflowDeleteButton);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/workflow-publish-button/index.jsx"
/*!*********************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/workflow-publish-button/index.jsx ***!
  \*********************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   WorkflowPublishButton: () => (/* binding */ WorkflowPublishButton),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/compose */ "./node_modules/@wordpress/compose/build-module/hooks/use-previous/index.js");
/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/compose */ "./node_modules/@wordpress/compose/build-module/hooks/use-viewport-match/index.js");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var _workflow_store__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../workflow-store */ "./assets/jsx/workflow-editor/components/workflow-store/index.jsx");
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
/**
 * External dependencies
 */


/**
 * WordPress dependencies
 */









function WorkflowPublishButton(_ref) {
  var _ref$showIconLabels = _ref.showIconLabels,
    showIconLabels = _ref$showIconLabels === void 0 ? false : _ref$showIconLabels;
  var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_5__.useState)(false),
    _useState2 = _slicedToArray(_useState, 2),
    forceSavedMessage = _useState2[0],
    setForceSavedMessage = _useState2[1];
  var isLargeViewport = (0,_wordpress_compose__WEBPACK_IMPORTED_MODULE_3__["default"])('small');
  var _useSelect = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useSelect)(function (select) {
      var _select = select(_workflow_store__WEBPACK_IMPORTED_MODULE_7__.store),
        isNewWorkflow = _select.isNewWorkflow,
        isCurrentWorkflowPublished = _select.isCurrentWorkflowPublished,
        isEditedWorkflowDirty = _select.isEditedWorkflowDirty,
        isSavingWorkflow = _select.isSavingWorkflow,
        isEditedWorkflowSaveable = _select.isEditedWorkflowSaveable,
        isAutosavingWorkflow = _select.isAutosavingWorkflow;
      return {
        isAutosaving: isAutosavingWorkflow(),
        isDirty: isEditedWorkflowDirty(),
        isNew: isNewWorkflow(),
        isPublished: isCurrentWorkflowPublished(),
        isSaving: isSavingWorkflow(),
        isSaveable: isEditedWorkflowSaveable()
      };
    }, []),
    isAutosaving = _useSelect.isAutosaving,
    isDirty = _useSelect.isDirty,
    isNew = _useSelect.isNew,
    isPublished = _useSelect.isPublished,
    isSaveable = _useSelect.isSaveable,
    isSaving = _useSelect.isSaving;
  var _useDispatch = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useDispatch)(_workflow_store__WEBPACK_IMPORTED_MODULE_7__.store),
    saveAsCurrentStatus = _useDispatch.saveAsCurrentStatus,
    publishWorkflow = _useDispatch.publishWorkflow;
  var wasSaving = (0,_wordpress_compose__WEBPACK_IMPORTED_MODULE_2__["default"])(isSaving);
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_5__.useEffect)(function () {
    var timeoutId;
    if (wasSaving && !isSaving) {
      setForceSavedMessage(true);
      timeoutId = setTimeout(function () {
        setForceSavedMessage(false);
      }, 1000);
    }
    return function () {
      return clearTimeout(timeoutId);
    };
  }, [isSaving]);

  /* translators: button label text should, if possible, be under 16 characters. */
  var label = !isPublished ? (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_6__.__)('Publish', 'post-expirator') : (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_6__.__)('Update', 'post-expirator');
  var shortLabel = label;
  var isSaved = forceSavedMessage || !isNew && !isDirty;
  var isSavedState = isSaving || isSaved;
  var isDisabled = isSaving || isSaved || !isSaveable;
  var text;
  if (isSaving) {
    text = isAutosaving ? (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_6__.__)('Autosaving...', 'post-expirator') : (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_6__.__)('Updating...', 'post-expirator');
  } else if (isSaved) {
    text = (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_6__.__)('Updated', 'post-expirator');
  } else if (isLargeViewport) {
    text = label;
  } else if (showIconLabels) {
    text = shortLabel;
  }
  var onClick = function onClick() {
    if (isDisabled) {
      return;
    }
    if (isPublished) {
      saveAsCurrentStatus();
    } else {
      publishWorkflow();
    }
  };

  // Use common Button instance for all saved states so that focus is not
  // lost.
  return /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, {
    className: isSaveable || isSaving ? classnames__WEBPACK_IMPORTED_MODULE_0___default()(_defineProperty({
      'editor-post-save-draft': !isSavedState,
      'editor-post-saved-state': isSavedState,
      'is-saving': isSaving,
      'is-autosaving': isAutosaving,
      'is-saved': isSaved
    }, (0,_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__unstableGetAnimateClassName)({
      type: 'loading'
    }), isSaving)) : undefined,
    onClick: onClick,
    variant: 'primary',
    label: label,
    "aria-disabled": isDisabled
  }, text);
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (WorkflowPublishButton);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/workflow-save-draft-button/index.jsx"
/*!************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/workflow-save-draft-button/index.jsx ***!
  \************************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   WorkflowSaveDraftButton: () => (/* binding */ WorkflowSaveDraftButton),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/compose */ "./node_modules/@wordpress/compose/build-module/hooks/use-previous/index.js");
/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/compose */ "./node_modules/@wordpress/compose/build-module/hooks/use-viewport-match/index.js");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js");
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/check.js");
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/cloud-upload.js");
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/cloud.js");
/* harmony import */ var _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/keycodes */ "./node_modules/@wordpress/keycodes/build-module/index.js");
/* harmony import */ var _workflow_store__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../workflow-store */ "./assets/jsx/workflow-editor/components/workflow-store/index.jsx");
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
/**
 * External dependencies
 */


/**
 * WordPress dependencies
 */









function WorkflowSaveDraftButton(_ref) {
  var forceIsDirty = _ref.forceIsDirty,
    forceIsSaving = _ref.forceIsSaving,
    _ref$showIconLabels = _ref.showIconLabels,
    showIconLabels = _ref$showIconLabels === void 0 ? false : _ref$showIconLabels;
  var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_5__.useState)(false),
    _useState2 = _slicedToArray(_useState, 2),
    forceSavedMessage = _useState2[0],
    setForceSavedMessage = _useState2[1];
  var isLargeViewport = (0,_wordpress_compose__WEBPACK_IMPORTED_MODULE_3__["default"])('small');
  var _useSelect = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useSelect)(function (select) {
      var _select = select(_workflow_store__WEBPACK_IMPORTED_MODULE_12__.store),
        isNewWorkflow = _select.isNewWorkflow,
        isCurrentWorkflowPublished = _select.isCurrentWorkflowPublished,
        isEditedWorkflowDirty = _select.isEditedWorkflowDirty,
        isSavingWorkflow = _select.isSavingWorkflow,
        isEditedWorkflowSaveable = _select.isEditedWorkflowSaveable,
        isAutosavingWorkflow = _select.isAutosavingWorkflow;
      return {
        isAutosaving: isAutosavingWorkflow(),
        isDirty: forceIsDirty || isEditedWorkflowDirty(),
        isNew: isNewWorkflow(),
        isPublished: isCurrentWorkflowPublished(),
        isSaving: forceIsSaving || isSavingWorkflow(),
        isSaveable: isEditedWorkflowSaveable()
      };
    }, [forceIsDirty, forceIsSaving]),
    isAutosaving = _useSelect.isAutosaving,
    isDirty = _useSelect.isDirty,
    isNew = _useSelect.isNew,
    isPublished = _useSelect.isPublished,
    isSaveable = _useSelect.isSaveable,
    isSaving = _useSelect.isSaving;
  var _useDispatch = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useDispatch)(_workflow_store__WEBPACK_IMPORTED_MODULE_12__.store),
    saveAsDraft = _useDispatch.saveAsDraft;
  var wasSaving = (0,_wordpress_compose__WEBPACK_IMPORTED_MODULE_2__["default"])(isSaving);
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_5__.useEffect)(function () {
    var timeoutId;
    if (wasSaving && !isSaving) {
      setForceSavedMessage(true);
      timeoutId = setTimeout(function () {
        setForceSavedMessage(false);
      }, 1000);
    }
    return function () {
      return clearTimeout(timeoutId);
    };
  }, [isSaving]);
  if (isPublished) {
    return;
  }

  /* translators: button label text should, if possible, be under 16 characters. */
  var label = (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_6__.__)('Save draft', 'post-expirator');

  /* translators: button label text should, if possible, be under 16 characters. */
  var shortLabel = (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_6__.__)('Save', 'post-expirator');
  var isSaved = forceSavedMessage || !isNew && !isDirty;
  var isSavedState = isSaving || isSaved;
  var isDisabled = isSaving || isSaved || !isSaveable;
  var text;
  if (isSaving) {
    text = isAutosaving ? (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_6__.__)('Autosaving', 'post-expirator') : (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_6__.__)('Saving', 'post-expirator');
  } else if (isSaved) {
    text = (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_6__.__)('Saved', 'post-expirator');
  } else if (isLargeViewport) {
    text = label;
  } else if (showIconLabels) {
    text = shortLabel;
  }
  var onClick = function onClick() {
    saveAsDraft();
  };

  // Use common Button instance for all saved states so that focus is not
  // lost.
  return /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, {
    className: isSaveable || isSaving ? classnames__WEBPACK_IMPORTED_MODULE_0___default()(_defineProperty({
      'editor-post-save-draft': !isSavedState,
      'editor-post-saved-state': isSavedState,
      'is-saving': isSaving,
      'is-autosaving': isAutosaving,
      'is-saved': isSaved
    }, (0,_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__unstableGetAnimateClassName)({
      type: 'loading'
    }), isSaving)) : undefined,
    onClick: isDisabled ? undefined : onClick,
    shortcut: _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_11__.displayShortcut.primary('s'),
    variant: isLargeViewport ? 'tertiary' : undefined,
    icon: isLargeViewport ? undefined : _wordpress_icons__WEBPACK_IMPORTED_MODULE_9__["default"],
    label: label,
    "aria-disabled": isDisabled
  }, isSavedState && /*#__PURE__*/React.createElement(_wordpress_icons__WEBPACK_IMPORTED_MODULE_7__["default"], {
    icon: isSaved ? _wordpress_icons__WEBPACK_IMPORTED_MODULE_8__["default"] : _wordpress_icons__WEBPACK_IMPORTED_MODULE_10__["default"]
  }), text);
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (WorkflowSaveDraftButton);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/workflow-store/actions.jsx"
/*!**************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/workflow-store/actions.jsx ***!
  \**************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   addDataType: () => (/* binding */ addDataType),
/* harmony export */   addNode: () => (/* binding */ addNode),
/* harmony export */   addNodeError: () => (/* binding */ addNodeError),
/* harmony export */   deleteWorkflow: () => (/* binding */ deleteWorkflow),
/* harmony export */   fetchTaxonomyTerms: () => (/* binding */ fetchTaxonomyTerms),
/* harmony export */   incrementBaseSlugCounts: () => (/* binding */ incrementBaseSlugCounts),
/* harmony export */   publishWorkflow: () => (/* binding */ publishWorkflow),
/* harmony export */   removeEdge: () => (/* binding */ removeEdge),
/* harmony export */   removeNode: () => (/* binding */ removeNode),
/* harmony export */   removeNodeError: () => (/* binding */ removeNodeError),
/* harmony export */   removePlaceholderNodes: () => (/* binding */ removePlaceholderNodes),
/* harmony export */   resetNodeErrors: () => (/* binding */ resetNodeErrors),
/* harmony export */   saveAsCurrentStatus: () => (/* binding */ saveAsCurrentStatus),
/* harmony export */   saveAsDraft: () => (/* binding */ saveAsDraft),
/* harmony export */   setDataTypes: () => (/* binding */ setDataTypes),
/* harmony export */   setDraggingFromHandle: () => (/* binding */ setDraggingFromHandle),
/* harmony export */   setEdges: () => (/* binding */ setEdges),
/* harmony export */   setEditedWorkflowAttribute: () => (/* binding */ setEditedWorkflowAttribute),
/* harmony export */   setFlow: () => (/* binding */ setFlow),
/* harmony export */   setGlobalVariable: () => (/* binding */ setGlobalVariable),
/* harmony export */   setInitialViewport: () => (/* binding */ setInitialViewport),
/* harmony export */   setIsConnectingNodes: () => (/* binding */ setIsConnectingNodes),
/* harmony export */   setNodes: () => (/* binding */ setNodes),
/* harmony export */   setPostType: () => (/* binding */ setPostType),
/* harmony export */   setSelectedEdges: () => (/* binding */ setSelectedEdges),
/* harmony export */   setSelectedNodes: () => (/* binding */ setSelectedNodes),
/* harmony export */   setupEditor: () => (/* binding */ setupEditor),
/* harmony export */   switchToDraft: () => (/* binding */ switchToDraft),
/* harmony export */   unselectAll: () => (/* binding */ unselectAll),
/* harmony export */   updateBaseSlugCounts: () => (/* binding */ updateBaseSlugCounts),
/* harmony export */   updateNode: () => (/* binding */ updateNode)
/* harmony export */ });
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_data_controls__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data-controls */ "./node_modules/@wordpress/data-controls/build-module/index.js");
/* harmony import */ var _name__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./name */ "./assets/jsx/workflow-editor/components/workflow-store/name.jsx");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_3__);
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
var _marked = /*#__PURE__*/_regeneratorRuntime().mark(setupEditor),
  _marked2 = /*#__PURE__*/_regeneratorRuntime().mark(saveAsDraft),
  _marked3 = /*#__PURE__*/_regeneratorRuntime().mark(saveAsCurrentStatus),
  _marked4 = /*#__PURE__*/_regeneratorRuntime().mark(publishWorkflow),
  _marked5 = /*#__PURE__*/_regeneratorRuntime().mark(switchToDraft),
  _marked6 = /*#__PURE__*/_regeneratorRuntime().mark(deleteWorkflow),
  _marked7 = /*#__PURE__*/_regeneratorRuntime().mark(fetchTaxonomyTerms);




var _window$futureWorkflo = window.futureWorkflowEditor,
  apiUrl = _window$futureWorkflo.apiUrl,
  nonce = _window$futureWorkflo.nonce,
  workflowNonce = _window$futureWorkflo.workflowNonce;
var editableAttributes = ['title', 'description', 'flow', 'status', 'debugRayShowQueries', 'debugRayShowEmails', 'debugRayShowWordPressErrors', 'debugRayShowCurrentRunningStep'];
function setupEditor(workflowId) {
  var workflow, _workflow;
  return _regeneratorRuntime().wrap(function setupEditor$(_context) {
    while (1) switch (_context.prev = _context.next) {
      case 0:
        _context.next = 2;
        return {
          type: 'LOAD_WORKFLOW_START'
        };
      case 2:
        workflowId = parseInt(workflowId, 10);
        if (!(workflowId == 0)) {
          _context.next = 19;
          break;
        }
        _context.next = 6;
        return {
          type: 'CREATE_WORKFLOW_START'
        };
      case 6:
        _context.prev = 6;
        _context.next = 9;
        return (0,_wordpress_data_controls__WEBPACK_IMPORTED_MODULE_1__.apiFetch)({
          path: "".concat(apiUrl, "/workflows"),
          method: 'POST',
          headers: {
            'X-WP-Nonce': nonce,
            'X-PP-Workflow-Nonce': workflowNonce
          }
        });
      case 9:
        workflow = _context.sent;
        _context.next = 12;
        return {
          type: 'CREATE_WORKFLOW_SUCCESS',
          payload: workflow
        };
      case 12:
        _context.next = 19;
        break;
      case 14:
        _context.prev = 14;
        _context.t0 = _context["catch"](6);
        (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.dispatch)('core/notices').createErrorNotice((0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Unable to create a new workflow. Please try again.', 'post-expirator'));
        // TODO: Show error message
        _context.next = 19;
        return {
          type: 'CREATE_WORKFLOW_FAILURE'
        };
      case 19:
        if (!(workflowId > 0)) {
          _context.next = 33;
          break;
        }
        _context.prev = 20;
        _context.next = 23;
        return (0,_wordpress_data_controls__WEBPACK_IMPORTED_MODULE_1__.apiFetch)({
          path: "".concat(apiUrl, "/workflows/").concat(workflowId),
          headers: {
            'X-WP-Nonce': nonce,
            'X-PP-Workflow-Nonce': workflowNonce
          }
        });
      case 23:
        _workflow = _context.sent;
        _context.next = 26;
        return {
          type: 'LOAD_WORKFLOW_SUCCESS',
          payload: _workflow
        };
      case 26:
        _context.next = 33;
        break;
      case 28:
        _context.prev = 28;
        _context.t1 = _context["catch"](20);
        (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.dispatch)('core/notices').createErrorNotice((0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Unable to load the workflow. Please try again.', 'post-expirator'));
        _context.next = 33;
        return {
          type: 'LOAD_WORKFLOW_FAILURE'
        };
      case 33:
      case "end":
        return _context.stop();
    }
  }, _marked, null, [[6, 14], [20, 28]]);
}
;
function addWorkflowIdToUrl(workflowId) {
  window.history.pushState({}, '', "?page=future_workflow_editor&workflow=".concat(parseInt(workflowId)));
}

// FIXME: This is not working as expected. The state we get from the store is not updated if the
// inspector is open or was not closed after the changes.
function saveAsDraft() {
  var wasNewWorkflow, editedWorkflow, workflowToSave, newWorkflow;
  return _regeneratorRuntime().wrap(function saveAsDraft$(_context2) {
    while (1) switch (_context2.prev = _context2.next) {
      case 0:
        _context2.next = 2;
        return {
          type: 'SAVE_AS_DRAFT_START'
        };
      case 2:
        _context2.prev = 2;
        _context2.next = 5;
        return (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.select)(_name__WEBPACK_IMPORTED_MODULE_2__.STORE_NAME).isNewWorkflow();
      case 5:
        wasNewWorkflow = _context2.sent;
        _context2.next = 8;
        return (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.select)(_name__WEBPACK_IMPORTED_MODULE_2__.STORE_NAME).getWorkflow();
      case 8:
        editedWorkflow = _context2.sent;
        workflowToSave = _objectSpread(_objectSpread({}, editedWorkflow), {}, {
          status: 'draft'
        });
        _context2.next = 12;
        return (0,_wordpress_data_controls__WEBPACK_IMPORTED_MODULE_1__.apiFetch)({
          path: "".concat(apiUrl, "/workflows/").concat(parseInt(editedWorkflow.id)),
          method: 'PUT',
          headers: {
            'X-WP-Nonce': nonce,
            'X-PP-Workflow-Nonce': workflowNonce
          },
          body: JSON.stringify(workflowToSave)
        });
      case 12:
        newWorkflow = _context2.sent;
        // Add the workflow id to the url, keeping current state in the history
        if (wasNewWorkflow) {
          addWorkflowIdToUrl(newWorkflow.id);
        }
        _context2.next = 16;
        return {
          type: 'SAVE_AS_DRAFT_SUCCESS',
          payload: newWorkflow
        };
      case 16:
        (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.dispatch)('core/notices').createSuccessNotice((0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Workflow saved as draft.', 'post-expirator'), {
          type: 'snackbar',
          isDismissible: true
        });
        _context2.next = 24;
        break;
      case 19:
        _context2.prev = 19;
        _context2.t0 = _context2["catch"](2);
        (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.dispatch)('core/notices').createErrorNotice((0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Unable to save workflow. Please, try again.', 'post-expirator'));
        _context2.next = 24;
        return {
          type: 'SAVE_AS_DRAFT_FAILURE'
        };
      case 24:
      case "end":
        return _context2.stop();
    }
  }, _marked2, null, [[2, 19]]);
}
function saveAsCurrentStatus() {
  var editedWorkflow, wasNewWorkflow, _editedWorkflow, workflowToSave, newWorkflow;
  return _regeneratorRuntime().wrap(function saveAsCurrentStatus$(_context3) {
    while (1) switch (_context3.prev = _context3.next) {
      case 0:
        _context3.next = 2;
        return (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.select)(_name__WEBPACK_IMPORTED_MODULE_2__.STORE_NAME).getWorkflow();
      case 2:
        editedWorkflow = _context3.sent;
        if (!(editedWorkflow.status === 'auto-draft')) {
          _context3.next = 7;
          break;
        }
        _context3.next = 6;
        return saveAsDraft();
      case 6:
        return _context3.abrupt("return");
      case 7:
        _context3.next = 9;
        return {
          type: 'SAVE_AS_CURRENT_STATUS_START'
        };
      case 9:
        _context3.prev = 9;
        _context3.next = 12;
        return (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.select)(_name__WEBPACK_IMPORTED_MODULE_2__.STORE_NAME).isNewWorkflow();
      case 12:
        wasNewWorkflow = _context3.sent;
        _context3.next = 15;
        return (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.select)(_name__WEBPACK_IMPORTED_MODULE_2__.STORE_NAME).getWorkflow();
      case 15:
        _editedWorkflow = _context3.sent;
        workflowToSave = _objectSpread({}, _editedWorkflow);
        _context3.next = 19;
        return (0,_wordpress_data_controls__WEBPACK_IMPORTED_MODULE_1__.apiFetch)({
          path: "".concat(apiUrl, "/workflows/").concat(parseInt(_editedWorkflow.id)),
          method: 'PUT',
          headers: {
            'X-WP-Nonce': nonce,
            'X-PP-Workflow-Nonce': workflowNonce
          },
          body: JSON.stringify(workflowToSave)
        });
      case 19:
        newWorkflow = _context3.sent;
        // Add the workflow id to the url, keeping current state in the history
        if (wasNewWorkflow) {
          addWorkflowIdToUrl(newWorkflow.id);
        }
        _context3.next = 23;
        return {
          type: 'SAVE_AS_CURRENT_STATUS_SUCCESS',
          payload: newWorkflow
        };
      case 23:
        (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.dispatch)('core/notices').createSuccessNotice((0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Workflow saved.', 'post-expirator'), {
          type: 'snackbar',
          isDismissible: true
        });
        _context3.next = 31;
        break;
      case 26:
        _context3.prev = 26;
        _context3.t0 = _context3["catch"](9);
        (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.dispatch)('core/notices').createErrorNotice((0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Unable to save workflow. Please, try again.', 'post-expirator'));
        _context3.next = 31;
        return {
          type: 'SAVE_AS_CURRENT_STATUS_FAILURE'
        };
      case 31:
      case "end":
        return _context3.stop();
    }
  }, _marked3, null, [[9, 26]]);
}
function publishWorkflow() {
  var wasNewWorkflow, editedWorkflow, workflowToSave, newWorkflow;
  return _regeneratorRuntime().wrap(function publishWorkflow$(_context4) {
    while (1) switch (_context4.prev = _context4.next) {
      case 0:
        _context4.next = 2;
        return {
          type: 'PUBLISH_WORKFLOW_START'
        };
      case 2:
        _context4.prev = 2;
        _context4.next = 5;
        return (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.select)(_name__WEBPACK_IMPORTED_MODULE_2__.STORE_NAME).isNewWorkflow();
      case 5:
        wasNewWorkflow = _context4.sent;
        _context4.next = 8;
        return (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.select)(_name__WEBPACK_IMPORTED_MODULE_2__.STORE_NAME).getWorkflow();
      case 8:
        editedWorkflow = _context4.sent;
        workflowToSave = _objectSpread(_objectSpread({}, editedWorkflow), {}, {
          status: 'publish'
        });
        _context4.next = 12;
        return (0,_wordpress_data_controls__WEBPACK_IMPORTED_MODULE_1__.apiFetch)({
          path: "".concat(apiUrl, "/workflows/").concat(parseInt(editedWorkflow.id)),
          method: 'PUT',
          headers: {
            'X-WP-Nonce': nonce,
            'X-PP-Workflow-Nonce': workflowNonce
          },
          body: JSON.stringify(workflowToSave)
        });
      case 12:
        newWorkflow = _context4.sent;
        // Add the workflow id to the url, keeping current state in the history
        if (wasNewWorkflow) {
          addWorkflowIdToUrl(newWorkflow.id);
        }
        _context4.next = 16;
        return {
          type: 'PUBLISH_WORKFLOW_SUCCESS',
          payload: newWorkflow
        };
      case 16:
        (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.dispatch)('core/notices').createSuccessNotice((0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Workflow published.', 'post-expirator'), {
          type: 'snackbar',
          isDismissible: true
        });
        _context4.next = 24;
        break;
      case 19:
        _context4.prev = 19;
        _context4.t0 = _context4["catch"](2);
        (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.dispatch)('core/notices').createErrorNotice((0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Unable to publish the workflow. Please, try again.', 'post-expirator'));
        _context4.next = 24;
        return {
          type: 'PUBLISH_WORKFLOW_FAILURE'
        };
      case 24:
      case "end":
        return _context4.stop();
    }
  }, _marked4, null, [[2, 19]]);
}
function switchToDraft() {
  var wasNewWorkflow, editedWorkflow, workflowToSave, newWorkflow;
  return _regeneratorRuntime().wrap(function switchToDraft$(_context5) {
    while (1) switch (_context5.prev = _context5.next) {
      case 0:
        _context5.next = 2;
        return {
          type: 'SWITCH_TO_DRAFT_START'
        };
      case 2:
        _context5.prev = 2;
        _context5.next = 5;
        return (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.select)(_name__WEBPACK_IMPORTED_MODULE_2__.STORE_NAME).isNewWorkflow();
      case 5:
        wasNewWorkflow = _context5.sent;
        _context5.next = 8;
        return (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.select)(_name__WEBPACK_IMPORTED_MODULE_2__.STORE_NAME).getWorkflow();
      case 8:
        editedWorkflow = _context5.sent;
        workflowToSave = _objectSpread(_objectSpread({}, editedWorkflow), {}, {
          status: 'draft'
        });
        _context5.next = 12;
        return (0,_wordpress_data_controls__WEBPACK_IMPORTED_MODULE_1__.apiFetch)({
          path: "".concat(apiUrl, "/workflows/").concat(parseInt(editedWorkflow.id)),
          method: 'PUT',
          headers: {
            'X-WP-Nonce': nonce,
            'X-PP-Workflow-Nonce': workflowNonce
          },
          body: JSON.stringify(workflowToSave)
        });
      case 12:
        newWorkflow = _context5.sent;
        // Add the workflow id to the url, keeping current state in the history
        if (wasNewWorkflow) {
          addWorkflowIdToUrl(newWorkflow.id);
        }
        _context5.next = 16;
        return {
          type: 'SWITCH_TO_DRAFT_SUCCESS',
          payload: newWorkflow
        };
      case 16:
        (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.dispatch)('core/notices').createSuccessNotice((0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Workflow switched to draft.', 'post-expirator'), {
          type: 'snackbar',
          isDismissible: true
        });
        _context5.next = 24;
        break;
      case 19:
        _context5.prev = 19;
        _context5.t0 = _context5["catch"](2);
        (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.dispatch)('core/notices').createErrorNotice((0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Unable to switch workflow to draft. Please, try again.', 'post-expirator'));
        _context5.next = 24;
        return {
          type: 'SWITCH_TO_DRAFT_FAILURE'
        };
      case 24:
      case "end":
        return _context5.stop();
    }
  }, _marked5, null, [[2, 19]]);
}
var setFlow = function setFlow(flow) {
  return {
    type: 'SET_FLOW',
    payload: flow
  };
};
var setPostType = function setPostType(postType) {
  return {
    type: 'SET_POST_TYPE',
    payload: postType
  };
};
var setNodes = function setNodes(nodes) {
  return {
    type: 'SET_NODES',
    payload: nodes
  };
};
var setEdges = function setEdges(edges) {
  return {
    type: 'SET_EDGES',
    payload: edges
  };
};
var setInitialViewport = function setInitialViewport(viewport) {
  return {
    type: 'SET_INITIAL_VIEWPORT',
    payload: viewport
  };
};
var setSelectedNodes = function setSelectedNodes(nodes) {
  return {
    type: 'SET_SELECTED_NODES',
    payload: nodes
  };
};
var unselectAll = function unselectAll() {
  return {
    type: 'UNSELECT_ALL'
  };
};
var setSelectedEdges = function setSelectedEdges(edges) {
  return {
    type: 'SET_SELECTED_EDGES',
    payload: edges
  };
};
var setEditedWorkflowAttribute = function setEditedWorkflowAttribute(key, value) {
  if (!editableAttributes.includes(key)) {
    throw new Error("The workflow attribute \"".concat(key, "\" is not editable."));
  }
  return {
    type: 'SET_EDITED_WORKFLOW_ATTRIBUTE',
    payload: {
      key: key,
      value: value
    }
  };
};
function deleteWorkflow() {
  var editedWorkflow, newWorkflow;
  return _regeneratorRuntime().wrap(function deleteWorkflow$(_context6) {
    while (1) switch (_context6.prev = _context6.next) {
      case 0:
        _context6.next = 2;
        return {
          type: 'DELETE_WORKFLOW_START'
        };
      case 2:
        _context6.next = 4;
        return (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.select)(_name__WEBPACK_IMPORTED_MODULE_2__.STORE_NAME).getWorkflow();
      case 4:
        editedWorkflow = _context6.sent;
        _context6.prev = 5;
        _context6.next = 8;
        return (0,_wordpress_data_controls__WEBPACK_IMPORTED_MODULE_1__.apiFetch)({
          path: "".concat(apiUrl, "/workflows/").concat(parseInt(editedWorkflow.id)),
          method: 'DELETE',
          headers: {
            'X-WP-Nonce': nonce,
            'X-PP-Workflow-Nonce': workflowNonce
          }
        });
      case 8:
        newWorkflow = _context6.sent;
        _context6.next = 11;
        return {
          type: 'DELETE_WORKFLOW_SUCCESS',
          payload: newWorkflow
        };
      case 11:
        (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.dispatch)('core/notices').createSuccessNotice((0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Workflow deleted. Redirecting...', 'post-expirator'), {
          type: 'snackbar',
          isDismissible: true
        });

        // Redirect to the workflow list
        window.location.href = "edit.php?post_type=ppfuture_workflow";
        _context6.next = 20;
        break;
      case 15:
        _context6.prev = 15;
        _context6.t0 = _context6["catch"](5);
        (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.dispatch)('core/notices').createErrorNotice((0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Unable to delete the workflow. Please, try again.', 'post-expirator'));
        _context6.next = 20;
        return {
          type: 'DELETE_WORKFLOW_FAILURE'
        };
      case 20:
      case "end":
        return _context6.stop();
    }
  }, _marked6, null, [[5, 15]]);
}
function updateNode(node) {
  return {
    type: 'UPDATE_NODE',
    payload: node
  };
}
function setDataTypes(dataTypes) {
  return {
    type: 'SET_DATA_TYPES',
    payload: dataTypes
  };
}
function addDataType(dataType) {
  return {
    type: 'ADD_DATA_TYPE',
    payload: dataType
  };
}
function setGlobalVariable(globalVariable) {
  return {
    type: 'SET_GLOBAL_VARIABLE',
    payload: globalVariable
  };
}
function fetchTaxonomyTerms(taxonomy) {
  var result;
  return _regeneratorRuntime().wrap(function fetchTaxonomyTerms$(_context7) {
    while (1) switch (_context7.prev = _context7.next) {
      case 0:
        _context7.next = 2;
        return {
          type: 'FETCH_TAXONOMY_TERMS_START'
        };
      case 2:
        _context7.prev = 2;
        _context7.next = 5;
        return (0,_wordpress_data_controls__WEBPACK_IMPORTED_MODULE_1__.apiFetch)({
          path: "".concat(apiUrl, "/terms/").concat(taxonomy),
          headers: {
            'X-WP-Nonce': nonce,
            'X-PP-Workflow-Nonce': workflowNonce
          }
        });
      case 5:
        result = _context7.sent;
        _context7.next = 8;
        return {
          type: 'FETCH_TAXONOMY_TERMS_SUCCESS',
          payload: {
            taxonomy: taxonomy,
            result: result
          }
        };
      case 8:
        _context7.next = 14;
        break;
      case 10:
        _context7.prev = 10;
        _context7.t0 = _context7["catch"](2);
        _context7.next = 14;
        return {
          type: 'FETCH_TAXONOMY_TERMS_FAILURE'
        };
      case 14:
      case "end":
        return _context7.stop();
    }
  }, _marked7, null, [[2, 10]]);
}
function incrementBaseSlugCounts(baseSlug) {
  return {
    type: 'INCREMENT_BASE_SLUG_COUNTS',
    payload: baseSlug
  };
}
function updateBaseSlugCounts(nodeSlug) {
  return {
    type: 'UPDATE_BASE_SLUG_COUNTS',
    payload: nodeSlug
  };
}
function addNodeError(nodeId, error, message) {
  var details = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';
  return {
    type: 'ADD_NODE_ERROR',
    payload: {
      nodeId: nodeId,
      error: error,
      message: message,
      details: details
    }
  };
}
function removeNodeError(nodeId, error) {
  return {
    type: 'REMOVE_NODE_ERROR',
    payload: {
      nodeId: nodeId,
      error: error
    }
  };
}
function resetNodeErrors(nodeId) {
  return {
    type: 'RESET_NODE_ERRORS',
    payload: nodeId
  };
}
function removeNode(nodeId) {
  return {
    type: 'REMOVE_NODE',
    payload: nodeId
  };
}
function removeEdge(edgeId) {
  return {
    type: 'REMOVE_EDGE',
    payload: edgeId
  };
}
function addNode(node) {
  return {
    type: 'ADD_NODE',
    payload: node
  };
}
function removePlaceholderNodes() {
  return {
    type: 'REMOVE_PLACEHOLDER_NODES'
  };
}
function setDraggingFromHandle(_ref) {
  var sourceId = _ref.sourceId,
    handleId = _ref.handleId,
    handleType = _ref.handleType;
  return {
    type: 'SET_DRAGGING_FROM_HANDLE',
    payload: {
      sourceId: sourceId,
      handleId: handleId,
      handleType: handleType
    }
  };
}
function setIsConnectingNodes(isConnecting) {
  return {
    type: 'SET_IS_CONNECTING_NODES',
    payload: isConnecting
  };
}

/***/ },

/***/ "./assets/jsx/workflow-editor/components/workflow-store/controls.jsx"
/*!***************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/workflow-store/controls.jsx ***!
  \***************************************************************************/
(__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 export */ });
/* harmony import */ var _wordpress_data_controls__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data-controls */ "./node_modules/@wordpress/data-controls/build-module/index.js");
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }

var controls = _objectSpread({}, _wordpress_data_controls__WEBPACK_IMPORTED_MODULE_0__.controls);
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (controls);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/workflow-store/index.jsx"
/*!************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/workflow-store/index.jsx ***!
  \************************************************************************/
(__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 export */   store: () => (/* binding */ store)
/* harmony export */ });
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _name__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./name */ "./assets/jsx/workflow-editor/components/workflow-store/name.jsx");
/* harmony import */ var _reducer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reducer */ "./assets/jsx/workflow-editor/components/workflow-store/reducer.jsx");
/* harmony import */ var _selectors__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./selectors */ "./assets/jsx/workflow-editor/components/workflow-store/selectors.jsx");
/* harmony import */ var _actions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./actions */ "./assets/jsx/workflow-editor/components/workflow-store/actions.jsx");
/* harmony import */ var _controls__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./controls */ "./assets/jsx/workflow-editor/components/workflow-store/controls.jsx");
/*
 * WordPress dependencies
 */


/*
 * Internal dependencies
 */





var store = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.createReduxStore)(_name__WEBPACK_IMPORTED_MODULE_1__.STORE_NAME, {
  reducer: _reducer__WEBPACK_IMPORTED_MODULE_2__["default"],
  actions: _actions__WEBPACK_IMPORTED_MODULE_4__,
  selectors: _selectors__WEBPACK_IMPORTED_MODULE_3__,
  controls: _controls__WEBPACK_IMPORTED_MODULE_5__["default"]
});
(0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.register)(store);
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (store);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/workflow-store/name.jsx"
/*!***********************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/workflow-store/name.jsx ***!
  \***********************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   STORE_NAME: () => (/* binding */ STORE_NAME)
/* harmony export */ });
var STORE_NAME = 'publishpress-future/workflow';

/***/ },

/***/ "./assets/jsx/workflow-editor/components/workflow-store/reducer.jsx"
/*!**************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/workflow-store/reducer.jsx ***!
  \**************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   DEFAULT_STATE: () => (/* binding */ DEFAULT_STATE),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__),
/* harmony export */   reducer: () => (/* binding */ reducer)
/* harmony export */ });
/* harmony import */ var reactflow__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! reactflow */ "./node_modules/@reactflow/core/dist/esm/index.mjs");
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../constants */ "./assets/jsx/workflow-editor/constants.jsx");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils */ "./assets/jsx/workflow-editor/utils.jsx");
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }



var DEFAULT_STATE = {
  postType: _constants__WEBPACK_IMPORTED_MODULE_1__.POST_TYPE,
  isLoadingWorkflow: false,
  isCreatingWorkflow: false,
  isSavingWorkflow: false,
  isNewWorkflow: true,
  isDeletingWorkflow: false,
  isAutosavingWorkflow: false,
  isEditedWorkflowEmpty: true,
  isCurrentWorkflowPublished: false,
  workflow: {
    id: 0,
    title: '',
    description: '',
    flow: {
      nodes: [],
      edges: [],
      viewport: {
        x: 0,
        y: 0,
        zoom: 2
      }
    },
    status: 'auto-draft',
    debugRayShowQueries: false,
    debugRayShowEmails: false,
    debugRayShowWordPressErrors: false,
    debugRayShowCurrentRunningStep: false
  },
  editedWorkflowAttributes: {},
  initialViewport: {
    x: 0,
    y: 0,
    zoom: 2
  },
  selectedNodes: [],
  selectedEdges: [],
  dataTypes: [],
  globalVariables: [],
  isFetchingTaxonomyTerms: false,
  taxonomyTerms: {},
  baseSlugCounts: {},
  nodeErrors: {},
  draggingFromHandle: {
    sourceId: null,
    handleId: null,
    handleType: null
  },
  isConnectingNodes: false
};
var loadWorkflowStart = function loadWorkflowStart(state, action) {
  return _objectSpread(_objectSpread({}, state), {}, {
    isLoadingWorkflow: true
  });
};

// Update the markerEnd for each edge
var normalizeMarkerEnd = function normalizeMarkerEnd(payload) {
  return payload.map(function (edge) {
    if (edge.type !== 'genericEdge') {
      return edge;
    }
    return _objectSpread(_objectSpread({}, edge), {}, {
      markerEnd: {
        type: reactflow__WEBPACK_IMPORTED_MODULE_0__.MarkerType.ArrowClosed
      }
    });
  });
};
var removeBrokenConnections = function removeBrokenConnections(nodes, edges) {
  return edges.filter(function (edge) {
    var sourceNode = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.getNodeById)(edge.source, nodes);
    var targetNode = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.getNodeById)(edge.target, nodes);
    if (!sourceNode || !targetNode) {
      return false;
    }
    return true;
  });
};
function _setInitialStateForGlobalVariables(state) {
  var workflow = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  state = setGlobalVariable(state, {
    payload: {
      name: 'site',
      label: 'Site',
      type: 'site',
      runtimeOnly: true,
      description: 'The current site.'
    }
  });
  state = setGlobalVariable(state, {
    payload: {
      name: 'workflow',
      label: 'Workflow',
      type: 'workflow',
      runtimeOnly: false,
      description: 'The current workflow.'
    }
  });
  state = setGlobalVariable(state, {
    payload: {
      name: 'user',
      label: 'Activating user',
      type: 'user',
      runtimeOnly: true,
      description: 'The current user.'
    }
  });
  state = setGlobalVariable(state, {
    payload: {
      name: 'trigger',
      label: 'Activating trigger',
      type: 'node',
      runtimeOnly: true,
      description: 'The node that activated the workflow.'
    }
  });
  state = setGlobalVariable(state, {
    payload: {
      name: 'engine_execution_id',
      label: 'Engine execution ID',
      type: 'string',
      runtimeOnly: true,
      description: 'A unique identifier assigned each time the workflow engine runs. Useful for tracking specific workflow executions and debugging.',
      priority: 35
    }
  });
  return state;
}
var loadWorkflowSuccess = function loadWorkflowSuccess(state, action) {
  var _payload$flow, _payload$flow2, _payload$flow3;
  var payload = action.payload;
  var nodes = ((_payload$flow = payload.flow) === null || _payload$flow === void 0 ? void 0 : _payload$flow.nodes) || [];
  var edges = ((_payload$flow2 = payload.flow) === null || _payload$flow2 === void 0 ? void 0 : _payload$flow2.edges) || [];
  var initialViewport = ((_payload$flow3 = payload.flow) === null || _payload$flow3 === void 0 ? void 0 : _payload$flow3.viewport) || DEFAULT_STATE.viewport;
  nodes.map(function (node) {
    var _node$data;
    var slug = node === null || node === void 0 || (_node$data = node.data) === null || _node$data === void 0 ? void 0 : _node$data.slug;
    if (!slug) {
      return;
    }
    state = updateBaseSlugCounts(state, {
      payload: slug
    });
  });
  if (!nodes.length) {
    nodes = [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.newTriggerPlaceholderNode)()];
  }
  edges = normalizeMarkerEnd(edges);
  edges = removeBrokenConnections(nodes, edges);
  state = _setInitialStateForGlobalVariables(state, payload);
  unselectAll(state);
  return _objectSpread(_objectSpread({}, state), {}, {
    isLoadingWorkflow: false,
    workflow: _objectSpread(_objectSpread({}, payload), {}, {
      flow: _objectSpread(_objectSpread({}, payload.flow), {}, {
        nodes: nodes,
        edges: edges
      })
    }),
    editedWorkflowAttributes: {},
    isNewWorkflow: payload.status === 'auto-draft',
    initialViewport: initialViewport,
    isEditedWorkflowEmpty: edges.length === 0 && nodes.length === 0,
    isCurrentWorkflowPublished: payload.status === 'publish'
  });
};
var loadWorkflowFailure = function loadWorkflowFailure(state, action) {
  return _objectSpread(_objectSpread({}, state), {}, {
    isLoadingWorkflow: false
  });
};
var createWorkflowStart = function createWorkflowStart(state, action) {
  return _objectSpread(_objectSpread({}, state), {}, {
    isCreatingWorkflow: true,
    isLoadingWorkflow: true
  });
};
var createWorkflowSuccess = function createWorkflowSuccess(state, action) {
  var payload = action.payload;
  var nodes = [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.newTriggerPlaceholderNode)()];
  state = _setInitialStateForGlobalVariables(state, {});
  return _objectSpread(_objectSpread({}, state), {}, {
    isCreatingWorkflow: false,
    isLoadingWorkflow: false,
    workflow: _objectSpread(_objectSpread({}, payload), {}, {
      flow: _objectSpread(_objectSpread({}, payload.flow), {}, {
        nodes: nodes
      })
    }),
    editedWorkflowAttributes: {},
    isNewWorkflow: payload.status === 'auto-draft',
    isEditedWorkflowEmpty: state.workflow.flow.edges.length === 0 && state.workflow.flow.nodes.length === 0,
    isCurrentWorkflowPublished: payload.status === 'publish'
  });
};
var createWorkflowFailure = function createWorkflowFailure(state, action) {
  return _objectSpread(_objectSpread({}, state), {}, {
    isCreatingWorkflow: false,
    isLoadingWorkflow: false
  });
};
var saveAsDraftStart = function saveAsDraftStart(state, action) {
  return _objectSpread(_objectSpread({}, state), {}, {
    isSavingWorkflow: true
  });
};
var saveAsDraftSuccess = function saveAsDraftSuccess(state, action) {
  var payload = action.payload;
  return _objectSpread(_objectSpread({}, state), {}, {
    isSavingWorkflow: false,
    workflow: payload,
    editedWorkflowAttributes: {},
    isNewWorkflow: payload.status === 'auto-draft',
    isEditedWorkflowEmpty: state.workflow.flow.edges.length === 0 && state.workflow.flow.nodes.length === 0,
    isCurrentWorkflowPublished: payload.status === 'publish'
  });
};
var saveAsDraftFailure = function saveAsDraftFailure(state, action) {
  return _objectSpread(_objectSpread({}, state), {}, {
    isSavingWorkflow: false
  });
};
var switchToDraftStart = function switchToDraftStart(state, action) {
  return _objectSpread(_objectSpread({}, state), {}, {
    isSavingWorkflow: true
  });
};
var switchToDraftSuccess = function switchToDraftSuccess(state, action) {
  var payload = action.payload;
  var newWorkflow = _objectSpread(_objectSpread({}, state.workflow), {}, {
    status: payload.status
  });
  return _objectSpread(_objectSpread({}, state), {}, {
    isSavingWorkflow: false,
    workflow: newWorkflow,
    isNewWorkflow: false,
    isEditedWorkflowEmpty: state.workflow.flow.edges.length === 0 && state.workflow.flow.nodes.length === 0,
    isCurrentWorkflowPublished: newWorkflow.status === 'publish',
    editedWorkflowAttributes: {}
  });
};
var switchToDraftFailure = function switchToDraftFailure(state, action) {
  return _objectSpread(_objectSpread({}, state), {}, {
    isSavingWorkflow: false
  });
};
var saveAsCurrentStatusStart = function saveAsCurrentStatusStart(state, action) {
  return _objectSpread(_objectSpread({}, state), {}, {
    isSavingWorkflow: true
  });
};
var saveAsCurrentStatusSuccess = function saveAsCurrentStatusSuccess(state, action) {
  var payload = action.payload;
  var newWorkflow = _objectSpread(_objectSpread({}, state.workflow), payload);
  return _objectSpread(_objectSpread({}, state), {}, {
    isSavingWorkflow: false,
    workflow: newWorkflow,
    isNewWorkflow: false,
    isEditedWorkflowEmpty: state.workflow.flow.edges.length === 0 && state.workflow.flow.nodes.length === 0,
    isCurrentWorkflowPublished: state.workflow.status === 'publish',
    editedWorkflowAttributes: {}
  });
};
var saveAsCurrentStatusFailure = function saveAsCurrentStatusFailure(state, action) {
  return _objectSpread(_objectSpread({}, state), {}, {
    isSavingWorkflow: false
  });
};
var publishWorkflowStart = function publishWorkflowStart(state, action) {
  return _objectSpread(_objectSpread({}, state), {}, {
    isSavingWorkflow: true
  });
};
var publishWorkflowSuccess = function publishWorkflowSuccess(state, action) {
  var payload = action.payload;
  var newWorkflow = _objectSpread(_objectSpread({}, state.workflow), {}, {
    status: payload.status
  });
  return _objectSpread(_objectSpread({}, state), {}, {
    isSavingWorkflow: false,
    workflow: newWorkflow,
    isNewWorkflow: false,
    isEditedWorkflowEmpty: state.workflow.flow.edges.length === 0 && state.workflow.flow.nodes.length === 0,
    isCurrentWorkflowPublished: newWorkflow.status === 'publish',
    editedWorkflowAttributes: {}
  });
};
var publishWorkflowFailure = function publishWorkflowFailure(state, action) {
  return _objectSpread(_objectSpread({}, state), {}, {
    isSavingWorkflow: false
  });
};
var setEditedWorkflowAttribute = function setEditedWorkflowAttribute(state, action) {
  var _action$payload = action.payload,
    key = _action$payload.key,
    value = _action$payload.value;
  return _objectSpread(_objectSpread({}, state), {}, {
    workflow: _objectSpread(_objectSpread({}, state.workflow), {}, _defineProperty({}, key, value)),
    editedWorkflowAttributes: _objectSpread(_objectSpread({}, state.editedWorkflowAttributes), {}, _defineProperty({}, key, value)),
    isEditedWorkflowEmpty: Object.keys(state.editedWorkflowAttributes).length === 0
  });
};
var setPostType = function setPostType(state, action) {
  var payload = action.payload;
  return _objectSpread(_objectSpread({}, state), {}, {
    postType: payload
  });
};
var setNodes = function setNodes(state, action) {
  var payload = action.payload;
  return _objectSpread(_objectSpread({}, state), {}, {
    workflow: _objectSpread(_objectSpread({}, state.workflow), {}, {
      flow: _objectSpread(_objectSpread({}, state.workflow.flow), {}, {
        nodes: payload
      })
    })
  });
};
var addNode = function addNode(state, action) {
  var payload = action.payload;
  var newNodes = [].concat(_toConsumableArray(state.workflow.flow.nodes), [payload]);
  return _objectSpread(_objectSpread({}, state), {}, {
    workflow: _objectSpread(_objectSpread({}, state.workflow), {}, {
      flow: _objectSpread(_objectSpread({}, state.workflow.flow), {}, {
        nodes: newNodes
      })
    })
  });
};
var setEdges = function setEdges(state, action) {
  var payload = action.payload;
  var updatedEdges = normalizeMarkerEnd(payload);
  return _objectSpread(_objectSpread({}, state), {}, {
    workflow: _objectSpread(_objectSpread({}, state.workflow), {}, {
      flow: _objectSpread(_objectSpread({}, state.workflow.flow), {}, {
        edges: updatedEdges
      })
    })
  });
};
var setInitialViewport = function setInitialViewport(state, action) {
  var payload = action.payload;
  return _objectSpread(_objectSpread({}, state), {}, {
    initialViewport: payload
  });
};
var setSelectedNodes = function setSelectedNodes(state, action) {
  var payload = action.payload;
  return _objectSpread(_objectSpread({}, state), {}, {
    selectedNodes: payload
  });
};
var setSelectedEdges = function setSelectedEdges(state, action) {
  var payload = action.payload;
  return _objectSpread(_objectSpread({}, state), {}, {
    selectedEdges: payload
  });
};
var unselectAll = function unselectAll(state, action) {
  setTimeout(function () {
    return jQuery('.react-flow__pane').trigger('click');
  }, 200);
  return _objectSpread(_objectSpread({}, state), {}, {
    selectedNodes: [],
    selectedEdges: []
  });
};
var deleteWorkflowStart = function deleteWorkflowStart(state, action) {
  return _objectSpread(_objectSpread({}, state), {}, {
    isDeletingWorkflow: true
  });
};
var deleteWorkflowSuccess = function deleteWorkflowSuccess(state, action) {
  return _objectSpread(_objectSpread({}, state), {}, {
    isDeletingWorkflow: false
  });
};
var deleteWorkflowFailure = function deleteWorkflowFailure(state, action) {
  return _objectSpread(_objectSpread({}, state), {}, {
    isDeletingWorkflow: false
  });
};
var updateNode = function updateNode(state, action) {
  var payload = action.payload;

  // Update the settings of the node with the given ID
  var updatedNodes = state.workflow.flow.nodes.map(function (node) {
    if (node.id === payload.id) {
      return _objectSpread(_objectSpread(_objectSpread({}, node), payload), {}, {
        data: _objectSpread(_objectSpread(_objectSpread({}, node.data), payload.data), {}, {
          settings: _objectSpread(_objectSpread({}, node.data.settings), payload.data.settings)
        })
      });
    }
    return node;
  });
  var newWorkflow = _objectSpread(_objectSpread({}, state.workflow), {}, {
    flow: _objectSpread(_objectSpread({}, state.workflow.flow), {}, {
      nodes: updatedNodes
    })
  });
  return _objectSpread(_objectSpread({}, state), {}, {
    workflow: newWorkflow,
    editedWorkflowAttributes: _objectSpread(_objectSpread({}, state.editedWorkflowAttributes), {}, {
      flow: _objectSpread(_objectSpread({}, state.editedWorkflowAttributes.flow), {}, {
        nodes: updatedNodes
      })
    })
  });
};
var setDataTypes = function setDataTypes(state, action) {
  var payload = action.payload;
  return _objectSpread(_objectSpread({}, state), {}, {
    dataTypes: payload
  });
};
var addDataType = function addDataType(state, action) {
  var payload = action.payload.payload;
  return _objectSpread(_objectSpread({}, state), {}, {
    dataTypes: [].concat(_toConsumableArray(state.dataTypes), [payload])
  });
};
var setGlobalVariable = function setGlobalVariable(state, action) {
  var _action$payload2 = action.payload,
    name = _action$payload2.name,
    label = _action$payload2.label,
    type = _action$payload2.type,
    value = _action$payload2.value,
    runtimeOnly = _action$payload2.runtimeOnly,
    description = _action$payload2.description,
    priority = _action$payload2.priority;
  var globalVariables = _objectSpread({}, state.globalVariables);
  globalVariables[name] = {
    name: name,
    type: type,
    value: value,
    label: label,
    runtimeOnly: runtimeOnly,
    description: description,
    priority: priority
  };
  return _objectSpread(_objectSpread({}, state), {}, {
    globalVariables: globalVariables
  });
};
var fetchTaxonomyTermsStart = function fetchTaxonomyTermsStart(state, action) {
  return _objectSpread(_objectSpread({}, state), {}, {
    isFetchingTaxonomyTerms: true
  });
};
var fetchTaxonomyTermsSuccess = function fetchTaxonomyTermsSuccess(state, action) {
  var _result$terms;
  var _action$payload3 = action.payload,
    taxonomy = _action$payload3.taxonomy,
    result = _action$payload3.result;
  var terms = (result === null || result === void 0 || (_result$terms = result.terms) === null || _result$terms === void 0 ? void 0 : _result$terms.map(function (term) {
    return {
      value: term.id,
      label: term.name
    };
  })) || [];
  var newTaxonomyTerms = _objectSpread(_objectSpread({}, state.taxonomyTerms), {}, _defineProperty({}, taxonomy, terms));
  return _objectSpread(_objectSpread({}, state), {}, {
    isFetchingTaxonomyTerms: false,
    taxonomyTerms: newTaxonomyTerms
  });
};
var fetchTaxonomyTermsFailure = function fetchTaxonomyTermsFailure(state, action) {
  return _objectSpread(_objectSpread({}, state), {}, {
    isFetchingTaxonomyTerms: false
  });
};
var incrementBaseSlugCounts = function incrementBaseSlugCounts(state, action) {
  var payload = action.payload;
  var newBaseSlugCounts = _objectSpread(_objectSpread({}, state.baseSlugCounts), {}, _defineProperty({}, payload, (state.baseSlugCounts[payload] || 0) + 1));
  return _objectSpread(_objectSpread({}, state), {}, {
    baseSlugCounts: newBaseSlugCounts
  });
};
var extractSlugParts = function extractSlugParts(slug) {
  if (!slug) {
    return {};
  }

  // The payload is a string with the format "baseSlug<count>"
  var matches = slug.match(/([a-zA-Z0-9]+)(\d+)$/);
  if (!matches) {
    return {};
  }
  return {
    baseSlug: matches[1],
    count: parseInt(matches[2])
  };
};
var calculateBaseSlugCount = function calculateBaseSlugCount(state, slug) {
  var slugParts = extractSlugParts(slug);
  var currentBaseSlugCount = state.baseSlugCounts[slugParts === null || slugParts === void 0 ? void 0 : slugParts.baseSlug] || 0;
  var baseSlugCount = (slugParts === null || slugParts === void 0 ? void 0 : slugParts.count) || 0;
  if (isNaN(baseSlugCount)) {
    return currentBaseSlugCount;
  }
  if (baseSlugCount > currentBaseSlugCount) {
    return baseSlugCount;
  }
  return currentBaseSlugCount;
};
var updateBaseSlugCounts = function updateBaseSlugCounts(state, action) {
  var payload = action.payload;
  var slugParts = extractSlugParts(payload);
  var baseSlugCount = calculateBaseSlugCount(state, payload);
  var baseSlug = slugParts === null || slugParts === void 0 ? void 0 : slugParts.baseSlug;
  if (!baseSlug) {
    return state;
  }
  if (!baseSlugCount) {
    return state;
  }
  return _objectSpread(_objectSpread({}, state), {}, {
    baseSlugCounts: _objectSpread(_objectSpread({}, state.baseSlugCounts), {}, _defineProperty({}, baseSlug, baseSlugCount))
  });
};
var addNodeError = function addNodeError(state, action) {
  var payload = action.payload;
  var theNodeErrors = state.nodeErrors[payload.nodeId] || {};
  theNodeErrors[payload.error] = {
    error: payload.error,
    message: payload.message,
    details: payload === null || payload === void 0 ? void 0 : payload.details
  };
  var nodeErrors = _objectSpread(_objectSpread({}, state.nodeErrors), {}, _defineProperty({}, payload.nodeId, theNodeErrors));
  return _objectSpread(_objectSpread({}, state), {}, {
    nodeErrors: nodeErrors
  });
};
var removeNodeError = function removeNodeError(state, action) {
  var payload = action.payload;
  var newErrors = _objectSpread({}, state.nodeErrors);
  if (!newErrors[payload.nodeId]) {
    return state;
  }
  delete newErrors[payload.nodeId][payload.error];
  return _objectSpread(_objectSpread({}, state), {}, {
    nodeErrors: newErrors
  });
};
var resetNodeErrors = function resetNodeErrors(state, action) {
  var payload = action.payload;
  var newErrors = _objectSpread({}, state.nodeErrors);
  delete newErrors[payload];
  return _objectSpread(_objectSpread({}, state), {}, {
    nodeErrors: newErrors
  });
};
var removeNode = function removeNode(state, action) {
  var payload = action.payload;

  // Remove the edges that are connected to the node
  var newEdges = state.workflow.flow.edges.filter(function (edge) {
    return edge.source !== payload && edge.target !== payload;
  });
  var newNodes = state.workflow.flow.nodes.filter(function (node) {
    return node.id !== payload;
  });
  return _objectSpread(_objectSpread({}, state), {}, {
    workflow: _objectSpread(_objectSpread({}, state.workflow), {}, {
      flow: _objectSpread(_objectSpread({}, state.workflow.flow), {}, {
        nodes: newNodes,
        edges: newEdges
      })
    }),
    selectedNodes: [],
    selectedEdges: []
  });
};
var removeEdge = function removeEdge(state, action) {
  var payload = action.payload;
  var newEdges = state.workflow.flow.edges.filter(function (edge) {
    return edge.id !== payload;
  });
  return _objectSpread(_objectSpread({}, state), {}, {
    workflow: _objectSpread(_objectSpread({}, state.workflow), {}, {
      flow: _objectSpread(_objectSpread({}, state.workflow.flow), {}, {
        edges: newEdges
      })
    }),
    selectedNodes: [],
    selectedEdges: []
  });
};
var removePlaceholderNodes = function removePlaceholderNodes(state, action) {
  var newNodes = state.workflow.flow.nodes.filter(function (node) {
    return node.data.elementaryType !== _constants__WEBPACK_IMPORTED_MODULE_1__.NODE_TYPE_PLACEHOLDER;
  });
  return _objectSpread(_objectSpread({}, state), {}, {
    workflow: _objectSpread(_objectSpread({}, state.workflow), {}, {
      flow: _objectSpread(_objectSpread({}, state.workflow.flow), {}, {
        nodes: newNodes
      })
    })
  });
};
var setDraggingFromHandle = function setDraggingFromHandle(state, action) {
  var _action$payload4 = action.payload,
    sourceId = _action$payload4.sourceId,
    handleId = _action$payload4.handleId,
    handleType = _action$payload4.handleType;
  return _objectSpread(_objectSpread({}, state), {}, {
    draggingFromHandle: {
      sourceId: sourceId,
      handleId: handleId,
      handleType: handleType
    }
  });
};
var setIsConnectingNodes = function setIsConnectingNodes(state, action) {
  return _objectSpread(_objectSpread({}, state), {}, {
    isConnectingNodes: action.payload
  });
};
var reducer = function reducer() {
  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_STATE;
  var action = arguments.length > 1 ? arguments[1] : undefined;
  switch (action.type) {
    case 'CREATE_WORKFLOW_START':
      return createWorkflowStart(state, action);
    case 'CREATE_WORKFLOW_SUCCESS':
      return createWorkflowSuccess(state, action);
    case 'CREATE_WORKFLOW_FAILURE':
      return createWorkflowFailure(state, action);
    case 'LOAD_WORKFLOW_START':
      return loadWorkflowStart(state, action);
    case 'LOAD_WORKFLOW_SUCCESS':
      return loadWorkflowSuccess(state, action);
    case 'LOAD_WORKFLOW_FAILURE':
      return loadWorkflowFailure(state, action);
    case 'SAVE_AS_DRAFT_START':
      return saveAsDraftStart(state, action);
    case 'SAVE_AS_DRAFT_SUCCESS':
      return saveAsDraftSuccess(state, action);
    case 'SAVE_AS_DRAFT_FAILURE':
      return saveAsDraftFailure(state, action);
    case 'SWITCH_TO_DRAFT_START':
      return switchToDraftStart(state, action);
    case 'SWITCH_TO_DRAFT_SUCCESS':
      return switchToDraftSuccess(state, action);
    case 'SWITCH_TO_DRAFT_FAILURE':
      return switchToDraftFailure(state, action);
    case 'SAVE_AS_CURRENT_STATUS_START':
      return saveAsCurrentStatusStart(state, action);
    case 'SAVE_AS_CURRENT_STATUS_SUCCESS':
      return saveAsCurrentStatusSuccess(state, action);
    case 'SAVE_AS_CURRENT_STATUS_FAILURE':
      return saveAsCurrentStatusFailure(state, action);
    case 'PUBLISH_WORKFLOW_START':
      return publishWorkflowStart(state, action);
    case 'PUBLISH_WORKFLOW_SUCCESS':
      return publishWorkflowSuccess(state, action);
    case 'PUBLISH_WORKFLOW_FAILURE':
      return publishWorkflowFailure(state, action);
    case 'SET_EDITED_WORKFLOW_ATTRIBUTE':
      return setEditedWorkflowAttribute(state, action);
    case 'SET_POST_TYPE':
      return setPostType(state, action);
    case 'SET_NODES':
      return setNodes(state, action);
    case 'ADD_NODE':
      return addNode(state, action);
    case 'SET_EDGES':
      return setEdges(state, action);
    case 'ADD_EDGE':
      return addEdge(state, action);
    case 'SET_INITIAL_VIEWPORT':
      return setInitialViewport(state, action);
    case 'SET_SELECTED_NODES':
      return setSelectedNodes(state, action);
    case 'SET_SELECTED_EDGES':
      return setSelectedEdges(state, action);
    case 'UNSELECT_ALL':
      return unselectAll(state, action);
    case 'DELETE_WORKFLOW_START':
      return deleteWorkflowStart(state, action);
    case 'DELETE_WORKFLOW_SUCCESS':
      return deleteWorkflowSuccess(state, action);
    case 'DELETE_WORKFLOW_FAILURE':
      return deleteWorkflowFailure(state, action);
    case 'UPDATE_NODE':
      return updateNode(state, action);
    case 'SET_DATA_TYPES':
      return setDataTypes(state, action);
    case 'ADD_DATA_TYPE':
      return addDataType(state, action);
    case 'SET_GLOBAL_VARIABLE':
      return setGlobalVariable(state, action);
    case 'FETCH_TAXONOMY_TERMS_START':
      return fetchTaxonomyTermsStart(state, action);
    case 'FETCH_TAXONOMY_TERMS_SUCCESS':
      return fetchTaxonomyTermsSuccess(state, action);
    case 'FETCH_TAXONOMY_TERMS_FAILURE':
      return fetchTaxonomyTermsFailure(state, action);
    case 'INCREMENT_BASE_SLUG_COUNTS':
      return incrementBaseSlugCounts(state, action);
    case 'UPDATE_BASE_SLUG_COUNTS':
      return updateBaseSlugCounts(state, action);
    case 'ADD_NODE_ERROR':
      return addNodeError(state, action);
    case 'REMOVE_NODE_ERROR':
      return removeNodeError(state, action);
    case 'RESET_NODE_ERRORS':
      return resetNodeErrors(state, action);
    case 'REMOVE_NODE':
      return removeNode(state, action);
    case 'REMOVE_EDGE':
      return removeEdge(state, action);
    case 'REMOVE_PLACEHOLDER_NODES':
      return removePlaceholderNodes(state, action);
    case 'SET_DRAGGING_FROM_HANDLE':
      return setDraggingFromHandle(state, action);
    case 'SET_IS_CONNECTING_NODES':
      return setIsConnectingNodes(state, action);
  }
  return state;
};
function addWorkflowIdToUrl(workflowId) {
  window.history.pushState({}, '', "?page=future_workflow_editor&workflow=".concat(parseInt(workflowId)));
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (reducer);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/workflow-store/selectors.jsx"
/*!****************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/workflow-store/selectors.jsx ***!
  \****************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   getBaseSlugCounts: () => (/* binding */ getBaseSlugCounts),
/* harmony export */   getConnectedSourceHandlesOfSelectedNode: () => (/* binding */ getConnectedSourceHandlesOfSelectedNode),
/* harmony export */   getDataTypeByName: () => (/* binding */ getDataTypeByName),
/* harmony export */   getDataTypes: () => (/* binding */ getDataTypes),
/* harmony export */   getDraggingFromHandle: () => (/* binding */ getDraggingFromHandle),
/* harmony export */   getEdgeById: () => (/* binding */ getEdgeById),
/* harmony export */   getEdges: () => (/* binding */ getEdges),
/* harmony export */   getEditedWorkflowAttribute: () => (/* binding */ getEditedWorkflowAttribute),
/* harmony export */   getEditedWorkflowAttributes: () => (/* binding */ getEditedWorkflowAttributes),
/* harmony export */   getGlobalVariable: () => (/* binding */ getGlobalVariable),
/* harmony export */   getGlobalVariables: () => (/* binding */ getGlobalVariables),
/* harmony export */   getInitialViewport: () => (/* binding */ getInitialViewport),
/* harmony export */   getNodeById: () => (/* binding */ getNodeById),
/* harmony export */   getNodeErrors: () => (/* binding */ getNodeErrors),
/* harmony export */   getNodes: () => (/* binding */ getNodes),
/* harmony export */   getPostType: () => (/* binding */ getPostType),
/* harmony export */   getRayDebugShowEmails: () => (/* binding */ getRayDebugShowEmails),
/* harmony export */   getRayDebugShowQueries: () => (/* binding */ getRayDebugShowQueries),
/* harmony export */   getRayDebugShowWordPressErrors: () => (/* binding */ getRayDebugShowWordPressErrors),
/* harmony export */   getSelectedEdges: () => (/* binding */ getSelectedEdges),
/* harmony export */   getSelectedEdgesCount: () => (/* binding */ getSelectedEdgesCount),
/* harmony export */   getSelectedElementsCount: () => (/* binding */ getSelectedElementsCount),
/* harmony export */   getSelectedNodes: () => (/* binding */ getSelectedNodes),
/* harmony export */   getSelectedNodesCount: () => (/* binding */ getSelectedNodesCount),
/* harmony export */   getTaxonomyTerms: () => (/* binding */ getTaxonomyTerms),
/* harmony export */   getWorkflow: () => (/* binding */ getWorkflow),
/* harmony export */   getWorkflowStatus: () => (/* binding */ getWorkflowStatus),
/* harmony export */   hasSelectedEdges: () => (/* binding */ hasSelectedEdges),
/* harmony export */   hasSelectedNodes: () => (/* binding */ hasSelectedNodes),
/* harmony export */   isAutosavingWorkflow: () => (/* binding */ isAutosavingWorkflow),
/* harmony export */   isConnectingNodes: () => (/* binding */ isConnectingNodes),
/* harmony export */   isCreatingWorkflow: () => (/* binding */ isCreatingWorkflow),
/* harmony export */   isCurrentWorkflowPublished: () => (/* binding */ isCurrentWorkflowPublished),
/* harmony export */   isDeletingWorkflow: () => (/* binding */ isDeletingWorkflow),
/* harmony export */   isEditedWorkflowDirty: () => (/* binding */ isEditedWorkflowDirty),
/* harmony export */   isEditedWorkflowSaveable: () => (/* binding */ isEditedWorkflowSaveable),
/* harmony export */   isLoadingWorkflow: () => (/* binding */ isLoadingWorkflow),
/* harmony export */   isNewWorkflow: () => (/* binding */ isNewWorkflow),
/* harmony export */   isPublishedWorkflow: () => (/* binding */ isPublishedWorkflow),
/* harmony export */   isSavingWorkflow: () => (/* binding */ isSavingWorkflow)
/* harmony export */ });
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils */ "./assets/jsx/workflow-editor/utils.jsx");

var getPostType = function getPostType(state) {
  return state.postType;
};
var getNodes = function getNodes(state) {
  return state.workflow.flow.nodes;
};
var getEdges = function getEdges(state) {
  return state.workflow.flow.edges;
};
var getNodeById = function getNodeById(state, id) {
  return (0,_utils__WEBPACK_IMPORTED_MODULE_0__.getNodeById)(id, state.workflow.flow.nodes);
};
var getEdgeById = function getEdgeById(state, id) {
  return state.workflow.flow.edges.find(function (edge) {
    return edge.id === id;
  });
};
var getSelectedNodes = function getSelectedNodes(state) {
  return state.selectedNodes;
};
var getSelectedEdges = function getSelectedEdges(state) {
  return state.selectedEdges;
};
var hasSelectedNodes = function hasSelectedNodes(state) {
  return state.selectedNodes.length > 0;
};
var hasSelectedEdges = function hasSelectedEdges(state) {
  return state.selectedEdges.length > 0;
};
var getWorkflowStatus = function getWorkflowStatus(state) {
  return state.workflow.status;
};
var getWorkflow = function getWorkflow(state) {
  return state.workflow;
};
var getEditedWorkflowAttributes = function getEditedWorkflowAttributes(state) {
  return state.editedWorkflowAttributes;
};
var getEditedWorkflowAttribute = function getEditedWorkflowAttribute(state, key) {
  var attributes = state.workflow;
  if (!attributes.hasOwnProperty(key)) {
    return state.workflow[key];
  }
  return state.workflow[key];
};
var isLoadingWorkflow = function isLoadingWorkflow(state) {
  return !!state.isLoadingWorkflow;
};
var isCreatingWorkflow = function isCreatingWorkflow(state) {
  return !!state.isCreatingWorkflow;
};
var isEditedWorkflowDirty = function isEditedWorkflowDirty(state) {
  return Object.keys(state.editedWorkflowAttributes).length > 0;
};
var isNewWorkflow = function isNewWorkflow(state) {
  return !!state.isNewWorkflow;
};
var getInitialViewport = function getInitialViewport(state) {
  return state.initialViewport;
};
var isSavingWorkflow = function isSavingWorkflow(state) {
  return !!state.isSavingWorkflow;
};
var isPublishedWorkflow = function isPublishedWorkflow(state) {
  return state.workflow.status === 'publish';
};
var isDeletingWorkflow = function isDeletingWorkflow(state) {
  return !!state.isDeletingWorkflow;
};
var isAutosavingWorkflow = function isAutosavingWorkflow(state) {
  return !!state.isAutosavingWorkflow;
};
var isEditedWorkflowSaveable = function isEditedWorkflowSaveable(state) {
  var title;
  if (state.editedWorkflowAttributes.hasOwnProperty('title')) {
    title = state.editedWorkflowAttributes.title;
  } else {
    title = state.workflow.title;
  }
  return Object.keys(state.editedWorkflowAttributes).length > 0 && !state.isSavingWorkflow && !state.isAutosavingWorkflow && String(title).trim() !== '';
};
var isCurrentWorkflowPublished = function isCurrentWorkflowPublished(state) {
  return state.isCurrentWorkflowPublished;
};
var getSelectedElementsCount = function getSelectedElementsCount(state) {
  return state.selectedNodes.length + state.selectedEdges.length;
};
var getSelectedNodesCount = function getSelectedNodesCount(state) {
  return state.selectedNodes.length;
};
var getSelectedEdgesCount = function getSelectedEdgesCount(state) {
  return state.selectedEdges.length;
};
var getDataTypes = function getDataTypes(state) {
  return state.dataTypes;
};
var getDataTypeByName = function getDataTypeByName(state, name) {
  return state.dataTypes.find(function (dataType) {
    return dataType.name === name;
  });
};
function getGlobalVariables(state) {
  return state.globalVariables;
}
function getGlobalVariable(state, name) {
  return state.globalVariables.find(function (variable) {
    return variable.name === name;
  });
}
function getTaxonomyTerms(state, taxnomy) {
  return state.taxonomyTerms[taxnomy] || [];
}
function getBaseSlugCounts(state) {
  return state.baseSlugCounts;
}
function getNodeErrors(state, nodeId) {
  return state.nodeErrors[nodeId] || [];
}
function getDraggingFromHandle(state) {
  return state.draggingFromHandle;
}
function isConnectingNodes(state) {
  return !!state.isConnectingNodes;
}
function getRayDebugShowQueries(state) {
  return state.rayDebug.showQueries;
}
function getRayDebugShowEmails(state) {
  return state.rayDebug.showEmails;
}
function getRayDebugShowWordPressErrors(state) {
  return state.rayDebug.showWordPressErrors;
}

/**
 * Returns the source handles of the selected node that are connected to other nodes.
 * If multiple nodes are selected, it returns the handles of the first node.
 *
 * @param {Object} state - The state of the workflow.
 * @returns {Array} The handles of the selected node.
 */
function getConnectedSourceHandlesOfSelectedNode(state) {
  var selectedNodes = getSelectedNodes(state);
  if (selectedNodes.length === 0) {
    return [];
  }
  var selectedNode = selectedNodes[0];
  var edges = getEdges(state);
  var outputEdges = edges.filter(function (edge) {
    return edge.source === selectedNode;
  });
  var sourceHandles = outputEdges.map(function (edge) {
    return edge.sourceHandle;
  });

  // Remove duplicates
  sourceHandles = sourceHandles.filter(function (handle, index, self) {
    return self.indexOf(handle) === index;
  });
  return sourceHandles;
}

/***/ },

/***/ "./assets/jsx/workflow-editor/components/workflow-summary/index.jsx"
/*!**************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/workflow-summary/index.jsx ***!
  \**************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   WorkflowSummary: () => (/* binding */ WorkflowSummary),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _workflow_store__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../workflow-store */ "./assets/jsx/workflow-editor/components/workflow-store/index.jsx");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _workflow_switch_to_draft_button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../workflow-switch-to-draft-button */ "./assets/jsx/workflow-editor/components/workflow-switch-to-draft-button/index.jsx");
/* harmony import */ var _workflow_delete_button__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../workflow-delete-button */ "./assets/jsx/workflow-editor/components/workflow-delete-button/index.jsx");
/* harmony import */ var _persistent_panel_body__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../persistent-panel-body */ "./assets/jsx/workflow-editor/components/persistent-panel-body/index.jsx");
/* harmony import */ var _scrolled_to_top__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../scrolled-to-top */ "./assets/jsx/workflow-editor/components/scrolled-to-top/index.jsx");









var WorkflowSummary = function WorkflowSummary() {
  var _useSelect = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_3__.useSelect)(function (select) {
      return {
        workflow: select(_workflow_store__WEBPACK_IMPORTED_MODULE_2__.store).getWorkflow(),
        isLoadingWorkflow: select(_workflow_store__WEBPACK_IMPORTED_MODULE_2__.store).isLoadingWorkflow()
      };
    }),
    workflow = _useSelect.workflow,
    isLoadingWorkflow = _useSelect.isLoadingWorkflow;
  var _useDispatch = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_3__.useDispatch)(_workflow_store__WEBPACK_IMPORTED_MODULE_2__.store),
    setEditedWorkflowAttribute = _useDispatch.setEditedWorkflowAttribute;
  var onChangeTitle = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_4__.useCallback)(function (title) {
    setEditedWorkflowAttribute('title', title);
  });
  var onChangeDescription = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_4__.useCallback)(function (description) {
    setEditedWorkflowAttribute('description', description);
  });
  var sidebarRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_4__.useRef)(null);
  (0,_scrolled_to_top__WEBPACK_IMPORTED_MODULE_8__["default"])(sidebarRef, '.interface-interface-skeleton__sidebar');
  return /*#__PURE__*/React.createElement("div", {
    ref: sidebarRef
  }, /*#__PURE__*/React.createElement(_persistent_panel_body__WEBPACK_IMPORTED_MODULE_7__["default"], {
    className: "edit-post-post-status",
    title: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Summary', 'post-expirator'),
    initialOpen: true,
    disabled: isLoadingWorkflow
  }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.PanelRow, {
    className: "editor-post-title__panel"
  }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.TextControl, {
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Title', 'post-expirator'),
    value: workflow.title,
    onChange: onChangeTitle,
    disabled: isLoadingWorkflow
  })), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.PanelRow, {
    className: "editor-post-description__panel"
  }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.TextareaControl, {
    label: (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Description', 'post-expirator'),
    value: workflow.description,
    onChange: onChangeDescription,
    disabled: isLoadingWorkflow
  })), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.PanelRow, {
    className: "editor-post-status__panel"
  }, /*#__PURE__*/React.createElement(_workflow_switch_to_draft_button__WEBPACK_IMPORTED_MODULE_5__.WorkflowSwitchToDraftButton, null), /*#__PURE__*/React.createElement(_workflow_delete_button__WEBPACK_IMPORTED_MODULE_6__.WorkflowDeleteButton, null))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (WorkflowSummary);

/***/ },

/***/ "./assets/jsx/workflow-editor/components/workflow-switch-to-draft-button/index.jsx"
/*!*****************************************************************************************!*\
  !*** ./assets/jsx/workflow-editor/components/workflow-switch-to-draft-button/index.jsx ***!
  \*****************************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   WorkflowSwitchToDraftButton: () => (/* binding */ WorkflowSwitchToDraftButton),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @publishpress/i18n */ "@publishpress/i18n");
/* harmony import */ var _publishpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/compose */ "./node_modules/@wordpress/compose/build-module/hooks/use-viewport-match/index.js");
/* harmony import */ var _workflow_store__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../workflow-store */ "./assets/jsx/workflow-editor/components/workflow-store/index.jsx");





function WorkflowSwitchToDraftButton() {
  var _useSelect = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_2__.useSelect)(function (select) {
      return {
        isSavingWorkflow: select(_workflow_store__WEBPACK_IMPORTED_MODULE_4__.store).isSavingWorkflow(),
        isPublishedWorkflow: select(_workflow_store__WEBPACK_IMPORTED_MODULE_4__.store).isPublishedWorkflow()
      };
    }),
    isSavingWorkflow = _useSelect.isSavingWorkflow,
    isPublishedWorkflow = _useSelect.isPublishedWorkflow;
  var _useDispatch = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_2__.useDispatch)(_workflow_store__WEBPACK_IMPORTED_MODULE_4__.store),
    switchToDraft = _useDispatch.switchToDraft;
  var isMobileViewport = (0,_wordpress_compose__WEBPACK_IMPORTED_MODULE_3__["default"])('small', '<');
  if (!isPublishedWorkflow) {
    return null;
  }
  var onSwitch = function onSwitch() {
    var alertMessage;
    if (isPublishedWorkflow) {
      alertMessage = (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Are you sure you want to unpublish this workflow?', 'post-expirator');
    }
    if (!alertMessage) {
      return;
    }
    if (window.confirm(alertMessage)) {
      switchToDraft();
    }
  };
  return /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Button, {
    className: "editor-post-switch-to-draft is-next-40px-default-size",
    onClick: onSwitch,
    disabled: isSavingWorkflow,
    variant: "secondary"
  }, isMobileViewport ? (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Draft', 'post-expirator') : (0,_publishpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Switch to draft', 'post-expirator'));
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (WorkflowSwitchToDraftButton);

/***/ },

/***/ "./assets/jsx/workflow-editor/contexts/pro-context.jsx"
/*!*************************************************************!*\
  !*** ./assets/jsx/workflow-editor/contexts/pro-context.jsx ***!
  \*************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   ProFeaturesProvider: () => (/* binding */ ProFeaturesProvider),
/* harmony export */   useIsPro: () => (/* binding */ useIsPro),
/* harmony export */   useProContext: () => (/* binding */ useProContext)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _components_editor_store__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../components/editor-store */ "./assets/jsx/workflow-editor/components/editor-store/index.jsx");




// Create the context
var ProContext = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createContext)({
  isPro: false
});
var ProFeaturesProvider = function ProFeaturesProvider(_ref) {
  var children = _ref.children;
  var isPro = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.useSelect)(function (select) {
    return select(_components_editor_store__WEBPACK_IMPORTED_MODULE_2__.store).isPro();
  }, []);
  var value = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
    return {
      isPro: isPro
    };
  }, [isPro]);
  return /*#__PURE__*/React.createElement(ProContext.Provider, {
    value: value
  }, children);
};
var useProContext = function useProContext() {
  var context = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useContext)(ProContext);
  if (context === undefined) {
    throw new Error('useProContext must be used within a ProFeaturesProvider');
  }
  return context;
};
var useIsPro = function useIsPro() {
  var _useProContext = useProContext(),
    isPro = _useProContext.isPro;
  return isPro;
};

/***/ },

/***/ "./assets/jsx/workflow-editor/css/index.css"
/*!**************************************************!*\
  !*** ./assets/jsx/workflow-editor/css/index.css ***!
  \**************************************************/
(__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 export */ });
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ "./node_modules/style-loader/dist/runtime/styleDomAPI.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/insertBySelector.js */ "./node_modules/style-loader/dist/runtime/insertBySelector.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ "./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ "./node_modules/style-loader/dist/runtime/insertStyleElement.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ "./node_modules/style-loader/dist/runtime/styleTagTransform.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_postcss_loader_dist_cjs_js_index_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/postcss-loader/dist/cjs.js!./index.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js!./assets/jsx/workflow-editor/css/index.css");

      
      
      
      
      
      
      
      
      

var options = {};

options.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());
options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());
options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head");
options.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());
options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());

var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_postcss_loader_dist_cjs_js_index_css__WEBPACK_IMPORTED_MODULE_6__["default"], options);




       /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_node_modules_postcss_loader_dist_cjs_js_index_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_node_modules_postcss_loader_dist_cjs_js_index_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_node_modules_postcss_loader_dist_cjs_js_index_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined);


/***/ },

/***/ "./assets/jsx/workflow-editor/css/query-builder.css"
/*!**********************************************************!*\
  !*** ./assets/jsx/workflow-editor/css/query-builder.css ***!
  \**********************************************************/
(__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 export */ });
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ "./node_modules/style-loader/dist/runtime/styleDomAPI.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/insertBySelector.js */ "./node_modules/style-loader/dist/runtime/insertBySelector.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ "./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ "./node_modules/style-loader/dist/runtime/insertStyleElement.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ "./node_modules/style-loader/dist/runtime/styleTagTransform.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_postcss_loader_dist_cjs_js_query_builder_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/postcss-loader/dist/cjs.js!./query-builder.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js!./assets/jsx/workflow-editor/css/query-builder.css");

      
      
      
      
      
      
      
      
      

var options = {};

options.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());
options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());
options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head");
options.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());
options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());

var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_postcss_loader_dist_cjs_js_query_builder_css__WEBPACK_IMPORTED_MODULE_6__["default"], options);




       /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_node_modules_postcss_loader_dist_cjs_js_query_builder_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_node_modules_postcss_loader_dist_cjs_js_query_builder_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_node_modules_postcss_loader_dist_cjs_js_query_builder_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined);


/***/ },

/***/ "./assets/jsx/workflow-editor/utils.jsx"
/*!**********************************************!*\
  !*** ./assets/jsx/workflow-editor/utils.jsx ***!
  \**********************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   addBodyClass: () => (/* binding */ addBodyClass),
/* harmony export */   addBodyClasses: () => (/* binding */ addBodyClasses),
/* harmony export */   createNewNode: () => (/* binding */ createNewNode),
/* harmony export */   filterVariablesTreeByDataType: () => (/* binding */ filterVariablesTreeByDataType),
/* harmony export */   formatVariableStructure: () => (/* binding */ formatVariableStructure),
/* harmony export */   getExpandedStepScopedVariables: () => (/* binding */ getExpandedStepScopedVariables),
/* harmony export */   getGlobalVariablesExpanded: () => (/* binding */ getGlobalVariablesExpanded),
/* harmony export */   getId: () => (/* binding */ getId),
/* harmony export */   getNodeById: () => (/* binding */ getNodeById),
/* harmony export */   getNodeHandleSchema: () => (/* binding */ getNodeHandleSchema),
/* harmony export */   getNodeIncomers: () => (/* binding */ getNodeIncomers),
/* harmony export */   getNodeIncomersRecursively: () => (/* binding */ getNodeIncomersRecursively),
/* harmony export */   getNodeMenuDefaultClassName: () => (/* binding */ getNodeMenuDefaultClassName),
/* harmony export */   getNodeOutgoers: () => (/* binding */ getNodeOutgoers),
/* harmony export */   getNodeOutputSchema: () => (/* binding */ getNodeOutputSchema),
/* harmony export */   getNodeSourceHandleNamesByNodeId: () => (/* binding */ getNodeSourceHandleNamesByNodeId),
/* harmony export */   getNodeType: () => (/* binding */ getNodeType),
/* harmony export */   getNodeVariablesTree: () => (/* binding */ getNodeVariablesTree),
/* harmony export */   getStepScopedVariables: () => (/* binding */ getStepScopedVariables),
/* harmony export */   getVariableDataTypeByVariableName: () => (/* binding */ getVariableDataTypeByVariableName),
/* harmony export */   getVariableLabelByVariableName: () => (/* binding */ getVariableLabelByVariableName),
/* harmony export */   incrementAndGetNodeSlug: () => (/* binding */ incrementAndGetNodeSlug),
/* harmony export */   isAppleOS: () => (/* binding */ isAppleOS),
/* harmony export */   isDynamicOutputItem: () => (/* binding */ isDynamicOutputItem),
/* harmony export */   isValidDataType: () => (/* binding */ isValidDataType),
/* harmony export */   mapNodeInputs: () => (/* binding */ mapNodeInputs),
/* harmony export */   newTriggerPlaceholderNode: () => (/* binding */ newTriggerPlaceholderNode),
/* harmony export */   nodeHasIncomers: () => (/* binding */ nodeHasIncomers),
/* harmony export */   nodeHasInput: () => (/* binding */ nodeHasInput),
/* harmony export */   nodeHasOutgoers: () => (/* binding */ nodeHasOutgoers),
/* harmony export */   nodeHasOutput: () => (/* binding */ nodeHasOutput),
/* harmony export */   removeBodyClass: () => (/* binding */ removeBodyClass),
/* harmony export */   removeBodyClasses: () => (/* binding */ removeBodyClasses),
/* harmony export */   updateFlowInEditedWorkflow: () => (/* binding */ updateFlowInEditedWorkflow)
/* harmony export */ });
/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks");
/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _components_workflow_store__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./components/workflow-store */ "./assets/jsx/workflow-editor/components/workflow-store/index.jsx");
/* harmony import */ var _components_editor_store__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./components/editor-store */ "./assets/jsx/workflow-editor/components/editor-store/index.jsx");
/* harmony import */ var reactflow__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! reactflow */ "./node_modules/@reactflow/core/dist/esm/index.mjs");
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./constants */ "./assets/jsx/workflow-editor/constants.jsx");
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }






var VARIABLE_SOURCE_NODE_INPUT = 'node-input';
var VARIABLE_SOURCE_GLOBAL = 'global';
var DEFAULT_VARIABLE_PRIORITY = 10;
function addBodyClass(className) {
  if (document.body.classList.contains(className)) return;
  document.body.classList.add(className);
}
function removeBodyClass(className) {
  if (!document.body.classList.contains(className)) return;
  document.body.classList.remove(className);
}
function addBodyClasses(classNames) {
  classNames.forEach(function (className) {
    return addBodyClass(className);
  });
}
function removeBodyClasses(classNames) {
  classNames.forEach(function (className) {
    return removeBodyClass(className);
  });
}

/**
 * Returns the block's default menu item classname from its name.
 *
 * @param {string} blockName The block name.
 *
 * @return {string} The block's default menu item class.
 */
function getNodeMenuDefaultClassName(blockName) {
  // Generated HTML classes for blocks follow the `editor-block-list-item-{name}` nomenclature.
  // Blocks provided by WordPress drop the prefixes 'core/' or 'core-' (historically used in 'core-embed/').
  var className = "editor-block-list-item-" + blockName.replace(/\//, "-").replace(/^core-/, "");
  return (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__.applyFilters)("future-pro.getNodeMenuDefaultClassName", className, blockName);
}

/**
 * Return true if platform is MacOS.
 *
 * @param {Object} _window window object by default; used for DI testing.
 *
 * @return {boolean} True if MacOS; false otherwise.
 */
function isAppleOS() {
  var _window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window;
  var platform = _window.navigator.platform;
  return platform.indexOf("Mac") !== -1 || ["iPad", "iPhone"].includes(platform);
}
function getNodeIncomers(node) {
  var nodes = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.select)(_components_workflow_store__WEBPACK_IMPORTED_MODULE_2__.store).getNodes();
  var edges = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.select)(_components_workflow_store__WEBPACK_IMPORTED_MODULE_2__.store).getEdges();
  if (!node) return [];
  return (0,reactflow__WEBPACK_IMPORTED_MODULE_4__.getIncomers)(node, nodes, edges);
}
function getNodeIncomersRecursively(node) {
  var incomers = getNodeIncomers(node);
  if (!incomers.length) {
    return [];
  }
  var allIncomers = incomers;
  incomers.forEach(function (incomer) {
    var incomerIncomers = getNodeIncomersRecursively(incomer);
    allIncomers = allIncomers.concat(incomerIncomers);
  });
  return allIncomers;
}
function nodeHasIncomers(node) {
  var incomers = getNodeIncomers(node);
  var nodeHasIncomers = (incomers === null || incomers === void 0 ? void 0 : incomers.length) > 0;
  return nodeHasIncomers;
}
function getNodeOutgoers(node) {
  var nodes = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.select)(_components_workflow_store__WEBPACK_IMPORTED_MODULE_2__.store).getNodes();
  var edges = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.select)(_components_workflow_store__WEBPACK_IMPORTED_MODULE_2__.store).getEdges();
  if (!node) return [];
  return (0,reactflow__WEBPACK_IMPORTED_MODULE_4__.getOutgoers)(node, nodes, edges);
}
function nodeHasOutgoers(node) {
  var outgoers = getNodeOutgoers(node);
  var nodeHasOutgoers = (outgoers === null || outgoers === void 0 ? void 0 : outgoers.length) > 0;
  return nodeHasOutgoers;
}
function getNodeType(node) {
  var _node$data;
  return (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.select)(_components_editor_store__WEBPACK_IMPORTED_MODULE_3__.store).getNodeTypeByName(node === null || node === void 0 || (_node$data = node.data) === null || _node$data === void 0 ? void 0 : _node$data.name);
}
function nodeHasInput(node) {
  var _incomers$filter;
  var incomers = getNodeIncomers(node);
  var nodeHasIncomers = (incomers === null || incomers === void 0 ? void 0 : incomers.length) > 0;
  return nodeHasIncomers && ((_incomers$filter = incomers.filter(function (incomer) {
    return nodeHasOutput(incomer);
  })) === null || _incomers$filter === void 0 ? void 0 : _incomers$filter.length) > 0;
}
function nodeHasOutput(node) {
  return getNodeOutputSchema(node).length > 0;
}
function isDynamicOutputItem(item) {
  if (item.type) {
    return item.type.startsWith('__dynamic__:');
  }
  return false;
}
function getNodeOutputSchema(node) {
  var nodeType = getNodeType(node);
  var outputSchema = (nodeType === null || nodeType === void 0 ? void 0 : nodeType.outputSchema) || [];
  var dynamicOutputItems = [];

  // Fill the dynamic output item
  if (outputSchema.some(isDynamicOutputItem)) {
    outputSchema = outputSchema.filter(function (item) {
      if (isDynamicOutputItem(item)) {
        var _node$data2;
        var settingName = item.type.replace('__dynamic__:', '');
        if (node !== null && node !== void 0 && (_node$data2 = node.data) !== null && _node$data2 !== void 0 && (_node$data2 = _node$data2.settings) !== null && _node$data2 !== void 0 && _node$data2[settingName]) {
          node.data.settings[settingName].forEach(function (subitem) {
            var newSubitem = _objectSpread({}, subitem);
            newSubitem.label = newSubitem.label || newSubitem.name.charAt(0).toUpperCase() + newSubitem.name.slice(1);
            newSubitem.description = newSubitem.description || item.description || __('Dynamic output item', 'post-expiration');
            if (newSubitem !== null && newSubitem !== void 0 && newSubitem.value) {
              newSubitem.type = newSubitem === null || newSubitem === void 0 ? void 0 : newSubitem.value;
              delete newSubitem.value;
            }
            dynamicOutputItems.push(newSubitem);
          });
        }

        // Remove the dynamic output item from the output schema
        return false;
      }
      return true;
    });
  }
  if (dynamicOutputItems.length) {
    outputSchema = outputSchema.concat(dynamicOutputItems);
  }
  return outputSchema;
}
function getGlobalVariablesExpanded(globalVariables) {
  var globalVariablesExpanded = [];
  Object.keys(globalVariables).forEach(function (variableName) {
    var variable = globalVariables[variableName];
    globalVariablesExpanded.push({
      name: variableName,
      type: variable.type,
      label: variable.label,
      source: VARIABLE_SOURCE_GLOBAL,
      description: variable.description,
      priority: (variable === null || variable === void 0 ? void 0 : variable.priority) || DEFAULT_VARIABLE_PRIORITY
    });
  });

  // Add "global." prefix to all global variables
  globalVariablesExpanded.forEach(function (variable) {
    variable.name = 'global.' + variable.name;
    variable.priority = (variable === null || variable === void 0 ? void 0 : variable.priority) || DEFAULT_VARIABLE_PRIORITY;
  });
  return globalVariablesExpanded;
}
function mapNodeInputs(node) {
  var previousNodes = getNodeIncomers(node);
  var mappedInput = [];
  previousNodes.forEach(function (previousNode) {
    if (!previousNode) {
      return;
    }
    var previousNodeOutputSchema = getNodeOutputSchema(previousNode);
    if (!(previousNodeOutputSchema !== null && previousNodeOutputSchema !== void 0 && previousNodeOutputSchema.length)) {
      return;
    }
    var nodeType = getNodeType(previousNode);
    previousNodeOutputSchema.forEach(function (outputItem) {
      if (outputItem.type === "input") {
        // Get the previous node outputs to bypass to this node as input
        var previousNodeInputs = mapNodeInputs(previousNode);
        previousNodeInputs.map(function (inputItem) {
          mappedInput.push(_objectSpread(_objectSpread({}, inputItem), {}, {
            name: "".concat(inputItem.name),
            type: inputItem.type,
            nodeLabel: nodeType.label,
            nodeSlug: previousNode.data.slug,
            priority: (inputItem === null || inputItem === void 0 ? void 0 : inputItem.priority) || DEFAULT_VARIABLE_PRIORITY
          }));
        });
      } else {
        mappedInput.push(_objectSpread(_objectSpread({}, outputItem), {}, {
          label: "".concat(outputItem.label),
          name: "".concat(previousNode.data.slug, ".").concat(outputItem.name),
          type: outputItem.type,
          nodeLabel: nodeType.label,
          nodeSlug: previousNode.data.slug,
          priority: (outputItem === null || outputItem === void 0 ? void 0 : outputItem.priority) || DEFAULT_VARIABLE_PRIORITY
        }));
      }
    });
  });

  // Remove duplicated inputs
  var uniqueMappedInputs = mappedInput.filter(function (input, index, self) {
    return index === self.findIndex(function (t) {
      return t.name === input.name;
    });
  } // eslint-disable-line
  );

  // Sort inputs by name
  uniqueMappedInputs.sort(function (a, b) {
    if (a.name < b.name) {
      return -1;
    }
    if (a.name > b.name) {
      return 1;
    }
    return 0;
  });
  uniqueMappedInputs.sort(function (a, b) {
    return a.priority - b.priority;
  });
  return uniqueMappedInputs;
}
function getStepScopedVariables(node) {
  var _node$data3, _nodeType$stepScopedV;
  var nodeType = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.select)(_components_editor_store__WEBPACK_IMPORTED_MODULE_3__.store).getNodeTypeByName(node === null || node === void 0 || (_node$data3 = node.data) === null || _node$data3 === void 0 ? void 0 : _node$data3.name);
  if (!(nodeType !== null && nodeType !== void 0 && (_nodeType$stepScopedV = nodeType.stepScopedVariablesSchema) !== null && _nodeType$stepScopedV !== void 0 && _nodeType$stepScopedV.length)) {
    return [];
  }
  var stepScopedVariables = nodeType.stepScopedVariablesSchema.map(function (variable) {
    return {
      name: node.data.slug + '.' + variable.name,
      label: variable.label,
      children: [],
      type: variable.type,
      itemsType: variable === null || variable === void 0 ? void 0 : variable.itemsType,
      description: variable === null || variable === void 0 ? void 0 : variable.description,
      nodeSlug: node.data.slug,
      priority: (variable === null || variable === void 0 ? void 0 : variable.priority) || DEFAULT_VARIABLE_PRIORITY,
      context: variable === null || variable === void 0 ? void 0 : variable.context
    };
  });
  return stepScopedVariables;
}
function getExpandedStepScopedVariables(node) {
  var stepScopedVariables = getStepScopedVariables(node);
  var expandedStepScopedVariables = stepScopedVariables.map(expandVariableWithChildren);
  expandedStepScopedVariables.sort(function (a, b) {
    return a.priority - b.priority;
  });
  return expandedStepScopedVariables;
}
function getNodeVariablesTree(node, globalVariables) {
  var mappedNodeInputs = mapNodeInputs(node);
  var globalVariablesToList = getGlobalVariablesExpanded(globalVariables);
  var variablesList = [].concat(_toConsumableArray(mappedNodeInputs), _toConsumableArray(globalVariablesToList));
  var expandedVariablesList = variablesList.map(expandVariableWithChildren);
  expandedVariablesList.sort(function (a, b) {
    return a.priority - b.priority;
  });
  return expandedVariablesList;
}
function formatVariableStructure(variable) {
  return {
    id: '{{' + variable.name + '}}',
    name: variable.name,
    label: variable.label,
    children: [],
    type: variable.type,
    itemsType: variable === null || variable === void 0 ? void 0 : variable.itemsType,
    description: variable === null || variable === void 0 ? void 0 : variable.description,
    nodeSlug: variable === null || variable === void 0 ? void 0 : variable.nodeSlug,
    priority: (variable === null || variable === void 0 ? void 0 : variable.priority) || DEFAULT_VARIABLE_PRIORITY,
    context: variable === null || variable === void 0 ? void 0 : variable.context
  };
}
function getVariableProperties(variable) {
  var _dataType$propertiesS;
  var getDataTypeByName = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.select)(_components_workflow_store__WEBPACK_IMPORTED_MODULE_2__.store).getDataTypeByName;
  var dataType = getDataTypeByName(variable.type);
  if (!(dataType !== null && dataType !== void 0 && (_dataType$propertiesS = dataType.propertiesSchema) !== null && _dataType$propertiesS !== void 0 && _dataType$propertiesS.length)) {
    return [];
  }
  var properties = dataType.propertiesSchema.map(function (property) {
    var propertyData = formatVariableStructure({
      name: variable.name + '.' + property.name,
      label: property.label,
      type: property === null || property === void 0 ? void 0 : property.type,
      itemsType: property === null || property === void 0 ? void 0 : property.itemsType,
      description: property === null || property === void 0 ? void 0 : property.description,
      nodeSlug: variable === null || variable === void 0 ? void 0 : variable.nodeSlug,
      children: [],
      priority: (property === null || property === void 0 ? void 0 : property.priority) || DEFAULT_VARIABLE_PRIORITY,
      context: property === null || property === void 0 ? void 0 : property.context
    });
    if (dataType.primitiveType === 'object') {
      propertyData.children = getVariableProperties(propertyData);
    }
    return propertyData;
  });
  return properties;
}
function expandVariableWithChildren(variable) {
  var getDataTypeByName = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.select)(_components_workflow_store__WEBPACK_IMPORTED_MODULE_2__.store).getDataTypeByName;
  var dataType = getDataTypeByName(variable.type);
  variable = formatVariableStructure(variable);
  if (isDynamicOutputItem(variable)) {
    return variable;
  }
  if (!dataType) {
    console.log('No data type found for variable', variable);
    return variable;
  }

  // If the variable is an object, add its properties as children
  if (dataType.primitiveType === 'object') {
    variable.children = getVariableProperties(variable);
  }
  return variable;
}
function isValidDataType(dataType, expectedDataTypes) {
  var hasValidDataType = true;
  if (expectedDataTypes !== null && expectedDataTypes !== void 0 && expectedDataTypes.length) {
    hasValidDataType = expectedDataTypes.includes(dataType === null || dataType === void 0 ? void 0 : dataType.name);
    if (!hasValidDataType) {
      hasValidDataType = expectedDataTypes.includes(dataType === null || dataType === void 0 ? void 0 : dataType.primitiveType);
    }
    if (!hasValidDataType && (dataType === null || dataType === void 0 ? void 0 : dataType.primitiveType) === 'array') {
      hasValidDataType = expectedDataTypes.includes(dataType === null || dataType === void 0 ? void 0 : dataType.itemsType);
    }
  }
  return hasValidDataType;
}
function filterVariablesTreeByDataType(variables, expectedDataTypes) {
  var getDataTypeByName = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.select)(_components_workflow_store__WEBPACK_IMPORTED_MODULE_2__.store).getDataTypeByName;
  var filteredVariables = [];
  variables.forEach(function (variable) {
    var dataType = getDataTypeByName(variable.type);
    var itemsType = variable === null || variable === void 0 ? void 0 : variable.itemsType;
    var variableHasValidDataType = isValidDataType(dataType, expectedDataTypes);
    if (variable.type === 'array' && itemsType && !variableHasValidDataType) {
      var expectedItemsDataTypes = expectedDataTypes.map(function (type) {
        if (type.startsWith('array:')) {
          return type.replace('array:', '');
        }
        return null;
      });
      var itemsDataType = getDataTypeByName(itemsType);
      variableHasValidDataType = isValidDataType(itemsDataType, expectedItemsDataTypes);
    }
    var validVariable = null;
    var validChildren = [];

    // Desn't include the variable properties if the variable itself is invalid
    if (dataType.primitiveType === 'object') {
      var properties = dataType.propertiesSchema;

      // Ignore the properties if the variable itself is valid.
      properties.forEach(function (property) {
        var propertyDataType = getDataTypeByName(property.type);
        var propertyHasValidDataType = isValidDataType(propertyDataType, expectedDataTypes);
        if (propertyHasValidDataType) {
          var filteredVariable = {
            id: variable.name + '.' + property.name,
            name: variable.name + '.' + property.name,
            label: variable.label + ' -> ' + property.label
          };
          validChildren.push(formatVariableStructure(filteredVariable));
        }
      });
      validVariable = {
        id: variable.id,
        name: variable.label,
        children: validChildren,
        type: variable.type
      };
      if (variableHasValidDataType) {
        filteredVariables.push(validVariable);
      } else if (validChildren.length) {
        filteredVariables = filteredVariables.concat(validChildren);
      }
    } else {
      if (variableHasValidDataType) {
        filteredVariables.push({
          id: variable.id,
          name: variable.label,
          children: [],
          type: variable.type
        });
      }
    }
  });
  return filteredVariables;
}
var getId = function getId() {
  var prefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "node";
  // We are subtracting the current date from the date 2024-01-01,
  // and using a 32 base number to get a smaller number
  var currentTimestamp = new Date().getTime();
  var pastTimestamp = new Date('2024-01-01 00:00:00').getTime();
  var UID = (currentTimestamp - pastTimestamp).toString(32);
  return "".concat(prefix, "_").concat(UID);
};
function incrementAndGetNodeSlug(nodeItem) {
  var nodeType = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.select)(_components_editor_store__WEBPACK_IMPORTED_MODULE_3__.store).getNodeTypeByName(nodeItem.name);
  var baseSlugCounts = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.select)(_components_workflow_store__WEBPACK_IMPORTED_MODULE_2__.store).getBaseSlugCounts();
  var baseSlug = nodeType.baseSlug;
  if (!baseSlug) {
    baseSlug = "node";
  }
  (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.dispatch)(_components_workflow_store__WEBPACK_IMPORTED_MODULE_2__.store).incrementBaseSlugCounts(baseSlug);
  var count = baseSlugCounts[baseSlug] || 0;
  return "".concat(baseSlug).concat(count + 1);
}
;
function createNewNode(_ref) {
  var _item$baseSlug;
  var item = _ref.item,
    position = _ref.position,
    reactFlowInstance = _ref.reactFlowInstance;
  var slug = incrementAndGetNodeSlug(item);
  var nodes = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.select)(_components_workflow_store__WEBPACK_IMPORTED_MODULE_2__.store).getNodes();
  var idPrefix = (_item$baseSlug = item.baseSlug) !== null && _item$baseSlug !== void 0 ? _item$baseSlug : "node";
  var newNode = {
    id: getId(idPrefix),
    type: item.type,
    position: position,
    data: {
      name: item.name,
      elementaryType: item.elementaryType,
      version: item.version,
      slug: slug,
      settings: {}
    }
  };

  // Add default settings values if specified in the node type settings schema.
  if (item.settingsSchema) {
    item.settingsSchema.forEach(function (panel) {
      panel.fields.forEach(function (field) {
        if (field.default === undefined) {
          return;
        }
        newNode.data.settings[field.name] = field.default;
      });
    });
  }
  nodes = nodes.filter(function (node) {
    return node.data.elementaryType !== _constants__WEBPACK_IMPORTED_MODULE_5__.NODE_TYPE_PLACEHOLDER;
  });
  (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.dispatch)(_components_workflow_store__WEBPACK_IMPORTED_MODULE_2__.store).setNodes(nodes.concat(newNode));
  updateFlowInEditedWorkflow(reactFlowInstance);
  return newNode;
}
function updateFlowInEditedWorkflow(reactFlowInstance) {
  // We need to delay the update of the flow to avoid missing the changes.
  setTimeout(function () {
    (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.dispatch)(_components_workflow_store__WEBPACK_IMPORTED_MODULE_2__.store).setEditedWorkflowAttribute("flow", reactFlowInstance.toObject());
  }, 400);
}
var newTriggerPlaceholderNode = function newTriggerPlaceholderNode() {
  return {
    id: getId("triggerPlaceholder"),
    type: 'triggerPlaceholder',
    position: {
      x: 0,
      y: 0
    },
    data: {
      name: 'placeholder/trigger',
      elementaryType: _constants__WEBPACK_IMPORTED_MODULE_5__.NODE_TYPE_PLACEHOLDER,
      version: 1,
      slug: 'triggerPlaceholder1'
    }
  };
};
function getNodeById(id) {
  var nodes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
  if (!nodes) {
    nodes = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.select)(_components_workflow_store__WEBPACK_IMPORTED_MODULE_2__.store).getNodes();
  }
  return nodes.find(function (node) {
    return node.id === id;
  });
}
function getVariableDataTypeByVariableName(targetVariableName, variables) {
  var plainTargetVariableName = targetVariableName.replace('{{', '').replace('}}', '');

  // Problem: the post thype, for example is a string. Should we have a sub type, or specialized type? Autocomplete type?
  var foundDataType = null;
  variables.forEach(function (variable) {
    // Check if the variable.name is the same as the targetVariableName
    if (variable.name === plainTargetVariableName) {
      foundDataType = variable.type;
    }

    // Check if the variable.name is the beginning of the targetVariableName
    if (plainTargetVariableName.startsWith(variable.name)) {
      if (variable.children.length > 0) {
        foundDataType = getVariableDataTypeByVariableName(targetVariableName, variable.children);
      }
    }
  });
  return foundDataType;
}
function getVariableLabelByVariableName(targetVariableName, variables) {
  var plainTargetVariableName = targetVariableName.replace('{{', '').replace('}}', '');
  var label = null;
  var _iterator = _createForOfIteratorHelper(variables),
    _step;
  try {
    for (_iterator.s(); !(_step = _iterator.n()).done;) {
      var variable = _step.value;
      if (!plainTargetVariableName.toLowerCase().startsWith(variable.name.toLowerCase())) {
        continue;
      }
      if (variable.name.toLowerCase() === plainTargetVariableName.toLowerCase()) {
        label = variable.label;
        break;
      }
      if (plainTargetVariableName.toLowerCase().startsWith(variable.name.toLowerCase()) && variable.children.length > 0) {
        label = variable.label + ' -> ' + getVariableLabelByVariableName(targetVariableName, variable.children);
        if (label) {
          break;
        }
      }
    }
  } catch (err) {
    _iterator.e(err);
  } finally {
    _iterator.f();
  }
  if (!label) {
    return null;
  }
  return label;
}
function getNodeHandleSchema(nodeType, data, type) {
  var _nodeType$handleSchem;
  if (!(nodeType !== null && nodeType !== void 0 && (_nodeType$handleSchem = nodeType.handleSchema) !== null && _nodeType$handleSchem !== void 0 && _nodeType$handleSchem[type])) {
    return [];
  }
  return nodeType.handleSchema[type].reduce(function (handleList, handle) {
    var _data$settings;
    if (!(handle !== null && handle !== void 0 && handle.type)) {
      return [].concat(_toConsumableArray(handleList), [handle]);
    }
    if (!handle.type.startsWith('__dynamic__:')) {
      return handleList;
    }
    var settingName = handle.type.replace('__dynamic__:', '');
    var options = data === null || data === void 0 || (_data$settings = data.settings) === null || _data$settings === void 0 ? void 0 : _data$settings[settingName];
    return [].concat(_toConsumableArray(handleList), _toConsumableArray(options.map(function (option) {
      return {
        id: option.name,
        label: option.label
      };
    })));
  }, []);
}

// Todo: Should we move all similar functions to the workflow store?
function getNodeSourceHandleNamesByNodeId(nodeId) {
  var nodes = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.select)(_components_workflow_store__WEBPACK_IMPORTED_MODULE_2__.store).getNodes();
  var node = nodes.find(function (node) {
    return node.id === nodeId;
  });
  var nodeType = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.select)(_components_editor_store__WEBPACK_IMPORTED_MODULE_3__.store).getNodeTypeByName(node.data.name);
  var sourceHandles = getNodeHandleSchema(nodeType, node.data, 'source');
  return sourceHandles.map(function (handle) {
    return handle.id;
  });
}

/***/ },

/***/ "./node_modules/css-loader/dist/cjs.js!./assets/jsx/workflow-editor/css/block-types-list.css"
/*!***************************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js!./assets/jsx/workflow-editor/css/block-types-list.css ***!
  \***************************************************************************************************/
(module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ "./node_modules/css-loader/dist/runtime/sourceMaps.js");
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
// Imports


var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
// Module
___CSS_LOADER_EXPORT___.push([module.id, `.block-editor-block-types-list > [role="presentation"] {
	overflow: hidden;
	display: flex;
	flex-wrap: wrap;
}
`, "",{"version":3,"sources":["webpack://./assets/jsx/workflow-editor/css/block-types-list.css"],"names":[],"mappings":"AAAA;CACC,gBAAgB;CAChB,aAAa;CACb,eAAe;AAChB","sourcesContent":[".block-editor-block-types-list > [role=\"presentation\"] {\n\toverflow: hidden;\n\tdisplay: flex;\n\tflex-wrap: wrap;\n}\n"],"sourceRoot":""}]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);


/***/ },

/***/ "./node_modules/css-loader/dist/cjs.js!./assets/jsx/workflow-editor/css/conditionals.css"
/*!***********************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js!./assets/jsx/workflow-editor/css/conditionals.css ***!
  \***********************************************************************************************/
(module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ "./node_modules/css-loader/dist/runtime/sourceMaps.js");
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
// Imports


var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
// Module
___CSS_LOADER_EXPORT___.push([module.id, `.edit-post-sidebar__panel .condition-natural-language {
    margin-top: 12px;
    font-family: monospace, monospace;
    background-color: #f0f0f1;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid #e0e0e1;
}

.condition-pro-features-notice {
    font-style: italic;
    margin-top: 12px;
}

.ruleGroup {
    margin: none;
    background: none;
    border: none;
}

.block-editor-inspector-popover-header__heading {
    font-size: 13px !important;
    margin-bottom: 16px !important;
}
`, "",{"version":3,"sources":["webpack://./assets/jsx/workflow-editor/css/conditionals.css"],"names":[],"mappings":"AAAA;IACI,gBAAgB;IAChB,iCAAiC;IACjC,yBAAyB;IACzB,aAAa;IACb,kBAAkB;IAClB,yBAAyB;AAC7B;;AAEA;IACI,kBAAkB;IAClB,gBAAgB;AACpB;;AAEA;IACI,YAAY;IACZ,gBAAgB;IAChB,YAAY;AAChB;;AAEA;IACI,0BAA0B;IAC1B,8BAA8B;AAClC","sourcesContent":[".edit-post-sidebar__panel .condition-natural-language {\n    margin-top: 12px;\n    font-family: monospace, monospace;\n    background-color: #f0f0f1;\n    padding: 12px;\n    border-radius: 4px;\n    border: 1px solid #e0e0e1;\n}\n\n.condition-pro-features-notice {\n    font-style: italic;\n    margin-top: 12px;\n}\n\n.ruleGroup {\n    margin: none;\n    background: none;\n    border: none;\n}\n\n.block-editor-inspector-popover-header__heading {\n    font-size: 13px !important;\n    margin-bottom: 16px !important;\n}\n"],"sourceRoot":""}]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);


/***/ },

/***/ "./node_modules/css-loader/dist/cjs.js!./assets/jsx/workflow-editor/css/custom.css"
/*!*****************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js!./assets/jsx/workflow-editor/css/custom.css ***!
  \*****************************************************************************************/
(module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ "./node_modules/css-loader/dist/runtime/sourceMaps.js");
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
// Imports


var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
// Module
___CSS_LOADER_EXPORT___.push([module.id, `.components-button svg {
    height: 100%;
}

#wpfooter {
    display: none !important;
}

.react-flow {
    width: 100% !important;
}

.components-menu-items__item-icon.has-icon-right {
    width: 24px !important;
    height: 24px !important;
}

.react-flow__node-default.selectable.selected,
.react-flow__node-default.selectable:focus,
.react-flow__node-default.selectable:focus-visible,
.react-flow__node-input.selectable.selected,
.react-flow__node-input.selectable:focus,
.react-flow__node-input.selectable:focus-visible,
.react-flow__node-output.selectable.selected,
.react-flow__node-output.selectable:focus,
.react-flow__node-output.selectable:focus-visible,
.react-flow__node-group.selectable.selected,
.react-flow__node-group.selectable:focus,
.react-flow__node-group.selectable:focus-visible {
    box-shadow: 0 0 0 2px #1a192b;
}

/* .react-flow {
    background-color: #e1e1e1 !important;
} */

.settings-field-description {
    font-size: 12px;
    color: #666;
    margin-bottom: 15px;
}

.settings-field-help-popover {
    font-size: 12px;
    color: #666;
    width: 320px;
    padding: 16px;
    position: relative;
    padding-top: 50px;
}

.settings-field-help-popover button {
    position: absolute;
    top: 10px;
    right: 10px;
}

.workflow-editor-inspector-card__handles-schema {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: flex-start;
}

.workflow-editor-inspector-card__handles-schema code {
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 12px;
    background: #ebebeb;
    color: #696969;
}

.workflow-editor-inspector-card__handles-schema h3 {
    margin-bottom: 4px !important;
}

.workflow-editor-global-variables-description {
    font-size: 12px;
    color: #666;
    margin-bottom: 15px;
}

.workflow-editor-global-variables-label {
    font-size: 11px;
    font-weight: 500;
    line-height: 1.4;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: calc(8px);
    padding: 0px;
}
.workflow-editor-global-var-list {
    margin: 0;
    padding: 5px;
    border: 1px solid var(--wp-components-color-gray-600, #949494);
}

.workflow-editor-global-var-list ul {
    list-style: disc;
    margin-left: 30px;
}

.workflow-editor-global-var-list ul li {
    margin-bottom: 0;
}

.edit-post-editor__inserter-panel-content {
    height: 100%;
}

.block-editor-inserter__content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
    overflow-y: hidden;
    position: relative;
}

.block-editor-inserter__panel-content {
    overflow-y: auto;
}

.interface-interface-skeleton__footer {
    min-height: 25px;
    padding: 3px 20px;
    box-sizing: border-box;
}

.interface-interface-skeleton__secondary-sidebar {
    box-shadow: 1px 1px 0 0 rgba(0, 0, 0, .133);
    outline: 1px solid #0000;
}

.editor-inserter-sidebar *, .editor-inserter-sidebar :after, .editor-inserter-sidebar :before {
    box-sizing: inherit;
}
`, "",{"version":3,"sources":["webpack://./assets/jsx/workflow-editor/css/custom.css"],"names":[],"mappings":"AAAA;IACI,YAAY;AAChB;;AAEA;IACI,wBAAwB;AAC5B;;AAEA;IACI,sBAAsB;AAC1B;;AAEA;IACI,sBAAsB;IACtB,uBAAuB;AAC3B;;AAEA;;;;;;;;;;;;IAYI,6BAA6B;AACjC;;AAEA;;GAEG;;AAEH;IACI,eAAe;IACf,WAAW;IACX,mBAAmB;AACvB;;AAEA;IACI,eAAe;IACf,WAAW;IACX,YAAY;IACZ,aAAa;IACb,kBAAkB;IAClB,iBAAiB;AACrB;;AAEA;IACI,kBAAkB;IAClB,SAAS;IACT,WAAW;AACf;;AAEA;IACI,aAAa;IACb,sBAAsB;IACtB,iBAAiB;IACjB,2BAA2B;IAC3B,uBAAuB;AAC3B;;AAEA;IACI,gBAAgB;IAChB,kBAAkB;IAClB,eAAe;IACf,mBAAmB;IACnB,cAAc;AAClB;;AAEA;IACI,6BAA6B;AACjC;;AAEA;IACI,eAAe;IACf,WAAW;IACX,mBAAmB;AACvB;;AAEA;IACI,eAAe;IACf,gBAAgB;IAChB,gBAAgB;IAChB,yBAAyB;IACzB,qBAAqB;IACrB,wBAAwB;IACxB,YAAY;AAChB;AACA;IACI,SAAS;IACT,YAAY;IACZ,8DAA8D;AAClE;;AAEA;IACI,gBAAgB;IAChB,iBAAiB;AACrB;;AAEA;IACI,gBAAgB;AACpB;;AAEA;IACI,YAAY;AAChB;;AAEA;IACI,aAAa;IACb,sBAAsB;IACtB,SAAS;IACT,YAAY;IACZ,kBAAkB;IAClB,kBAAkB;AACtB;;AAEA;IACI,gBAAgB;AACpB;;AAEA;IACI,gBAAgB;IAChB,iBAAiB;IACjB,sBAAsB;AAC1B;;AAEA;IACI,2CAA2C;IAC3C,wBAAwB;AAC5B;;AAEA;IACI,mBAAmB;AACvB","sourcesContent":[".components-button svg {\n    height: 100%;\n}\n\n#wpfooter {\n    display: none !important;\n}\n\n.react-flow {\n    width: 100% !important;\n}\n\n.components-menu-items__item-icon.has-icon-right {\n    width: 24px !important;\n    height: 24px !important;\n}\n\n.react-flow__node-default.selectable.selected,\n.react-flow__node-default.selectable:focus,\n.react-flow__node-default.selectable:focus-visible,\n.react-flow__node-input.selectable.selected,\n.react-flow__node-input.selectable:focus,\n.react-flow__node-input.selectable:focus-visible,\n.react-flow__node-output.selectable.selected,\n.react-flow__node-output.selectable:focus,\n.react-flow__node-output.selectable:focus-visible,\n.react-flow__node-group.selectable.selected,\n.react-flow__node-group.selectable:focus,\n.react-flow__node-group.selectable:focus-visible {\n    box-shadow: 0 0 0 2px #1a192b;\n}\n\n/* .react-flow {\n    background-color: #e1e1e1 !important;\n} */\n\n.settings-field-description {\n    font-size: 12px;\n    color: #666;\n    margin-bottom: 15px;\n}\n\n.settings-field-help-popover {\n    font-size: 12px;\n    color: #666;\n    width: 320px;\n    padding: 16px;\n    position: relative;\n    padding-top: 50px;\n}\n\n.settings-field-help-popover button {\n    position: absolute;\n    top: 10px;\n    right: 10px;\n}\n\n.workflow-editor-inspector-card__handles-schema {\n    display: flex;\n    flex-direction: column;\n    flex-wrap: nowrap;\n    justify-content: flex-start;\n    align-items: flex-start;\n}\n\n.workflow-editor-inspector-card__handles-schema code {\n    padding: 3px 6px;\n    border-radius: 4px;\n    font-size: 12px;\n    background: #ebebeb;\n    color: #696969;\n}\n\n.workflow-editor-inspector-card__handles-schema h3 {\n    margin-bottom: 4px !important;\n}\n\n.workflow-editor-global-variables-description {\n    font-size: 12px;\n    color: #666;\n    margin-bottom: 15px;\n}\n\n.workflow-editor-global-variables-label {\n    font-size: 11px;\n    font-weight: 500;\n    line-height: 1.4;\n    text-transform: uppercase;\n    display: inline-block;\n    margin-bottom: calc(8px);\n    padding: 0px;\n}\n.workflow-editor-global-var-list {\n    margin: 0;\n    padding: 5px;\n    border: 1px solid var(--wp-components-color-gray-600, #949494);\n}\n\n.workflow-editor-global-var-list ul {\n    list-style: disc;\n    margin-left: 30px;\n}\n\n.workflow-editor-global-var-list ul li {\n    margin-bottom: 0;\n}\n\n.edit-post-editor__inserter-panel-content {\n    height: 100%;\n}\n\n.block-editor-inserter__content {\n    display: flex;\n    flex-direction: column;\n    gap: 16px;\n    height: 100%;\n    overflow-y: hidden;\n    position: relative;\n}\n\n.block-editor-inserter__panel-content {\n    overflow-y: auto;\n}\n\n.interface-interface-skeleton__footer {\n    min-height: 25px;\n    padding: 3px 20px;\n    box-sizing: border-box;\n}\n\n.interface-interface-skeleton__secondary-sidebar {\n    box-shadow: 1px 1px 0 0 rgba(0, 0, 0, .133);\n    outline: 1px solid #0000;\n}\n\n.editor-inserter-sidebar *, .editor-inserter-sidebar :after, .editor-inserter-sidebar :before {\n    box-sizing: inherit;\n}\n"],"sourceRoot":""}]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);


/***/ },

/***/ "./node_modules/css-loader/dist/cjs.js!./assets/jsx/workflow-editor/css/dev.css"
/*!**************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js!./assets/jsx/workflow-editor/css/dev.css ***!
  \**************************************************************************************/
(module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ "./node_modules/css-loader/dist/runtime/sourceMaps.js");
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
// Imports


var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
// Module
___CSS_LOADER_EXPORT___.push([module.id, `.workflow-editor-dev-info-panel .components-panel__row {
    overflow: scroll;
}

.workflow-editor-dev-info-wrapper {
    min-width: 1000px;
}

.workflow-editor-dev-panel {
    background-color: #fffaf1;
}
`, "",{"version":3,"sources":["webpack://./assets/jsx/workflow-editor/css/dev.css"],"names":[],"mappings":"AAAA;IACI,gBAAgB;AACpB;;AAEA;IACI,iBAAiB;AACrB;;AAEA;IACI,yBAAyB;AAC7B","sourcesContent":[".workflow-editor-dev-info-panel .components-panel__row {\n    overflow: scroll;\n}\n\n.workflow-editor-dev-info-wrapper {\n    min-width: 1000px;\n}\n\n.workflow-editor-dev-panel {\n    background-color: #fffaf1;\n}\n"],"sourceRoot":""}]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);


/***/ },

/***/ "./node_modules/css-loader/dist/cjs.js!./assets/jsx/workflow-editor/css/guide.css"
/*!****************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js!./assets/jsx/workflow-editor/css/guide.css ***!
  \****************************************************************************************/
(module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ "./node_modules/css-loader/dist/runtime/sourceMaps.js");
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
// Imports


var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
// Module
___CSS_LOADER_EXPORT___.push([module.id, `.components-guide__container {
    max-width: 312px;
}
`, "",{"version":3,"sources":["webpack://./assets/jsx/workflow-editor/css/guide.css"],"names":[],"mappings":"AAAA;IACI,gBAAgB;AACpB","sourcesContent":[".components-guide__container {\n    max-width: 312px;\n}\n"],"sourceRoot":""}]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);


/***/ },

/***/ "./node_modules/css-loader/dist/cjs.js!./assets/jsx/workflow-editor/css/inserter.css"
/*!*******************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js!./assets/jsx/workflow-editor/css/inserter.css ***!
  \*******************************************************************************************/
(module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ "./node_modules/css-loader/dist/runtime/sourceMaps.js");
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
// Imports


var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
// Module
___CSS_LOADER_EXPORT___.push([module.id, `.edit-post-editor__inserter-panel-header {
    display: flex;
	justify-content: flex-end;
}

@media (min-width: 782px) {
    .editor-inserter-sidebar__header {
        display: none;
    }
}

.edit-post-header-toolbar .editor-document-tools__left > .edit-post-header-toolbar__inserter-toggle.is-pressed svg {
    transform: rotate(45deg);
}

`, "",{"version":3,"sources":["webpack://./assets/jsx/workflow-editor/css/inserter.css"],"names":[],"mappings":"AAAA;IACI,aAAa;CAChB,yBAAyB;AAC1B;;AAEA;IACI;QACI,aAAa;IACjB;AACJ;;AAEA;IACI,wBAAwB;AAC5B","sourcesContent":[".edit-post-editor__inserter-panel-header {\n    display: flex;\n\tjustify-content: flex-end;\n}\n\n@media (min-width: 782px) {\n    .editor-inserter-sidebar__header {\n        display: none;\n    }\n}\n\n.edit-post-header-toolbar .editor-document-tools__left > .edit-post-header-toolbar__inserter-toggle.is-pressed svg {\n    transform: rotate(45deg);\n}\n\n"],"sourceRoot":""}]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);


/***/ },

/***/ "./node_modules/css-loader/dist/cjs.js!./assets/jsx/workflow-editor/css/inspector.css"
/*!********************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js!./assets/jsx/workflow-editor/css/inspector.css ***!
  \********************************************************************************************/
(module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ "./node_modules/css-loader/dist/runtime/sourceMaps.js");
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
// Imports


var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
// Module
___CSS_LOADER_EXPORT___.push([module.id, `.edit-post-post-status .components-base-control {
    flex: auto;
}

.editor-post-title__panel,
.editor-post-description__panel {
    padding-top: 8px;
}

.editor-post-status__panel {
    margin-top: 16px;
    gap: 16px !important;
}

.editor-post-status__panel button {
    flex-grow: 1;
    justify-content: center;
}

.workflow-editor-element-inspector__warning {
    background: #fff;
    display: block;
    font-size: 13px;
    padding: 32px 36px;
    text-align: center;
    flex-grow: 1;
    justify-content: center;
}


.workflow-editor-inspector-card {
    align-items: flex-start;
    color: #1e1e1e;
    display: flex;
    padding: 16px;
}

.workflow-editor-inspector-card {
    align-items: flex-start;
    color: #1e1e1e;
    display: flex;
    padding: 16px;
}

.workflow-editor-inspector-icon {
    align-items: center;
    display: flex;
    height: 24px;
    justify-content: center;
    width: 24px;
}

.workflow-editor-inspector-card .workflow-editor-inspector-icon {
    flex: 0 0 24px;
    height: 24px;
    margin-left: 0;
    margin-right: 12px;
    width: 24px;
}

.workflow-editor-inspector-card {
    align-items: flex-start;
    color: #1e1e1e;
    display: flex;
    padding: 16px;
}

.workflow-editor-inspector-card__content {
    flex-grow: 1;
}

.workflow-editor-inspector-inspector h2, .workflow-editor-inspector-inspector h3 {
    color: #1e1e1e;
    font-size: 13px;
    margin-bottom: 1.5em;
}

.interface-complementary-area h2 {
    color: #1e1e1e;
    font-size: 13px;
    margin-bottom: 1.5em;
}

.workflow-editor-inspector-card__title.workflow-editor-inspector-card__title {
    font-size: 13px;
    line-height: 1.4;
    margin: 0;
    padding: 3px 0;
}


.workflow-editor-inspector-card__description {
    display: block;
    font-size: 13px;
    line-height: 1.4;
    margin-top: 4px;
}

.workflow-editor-inspector-icon.has-colors svg {
    fill: currentColor;
}

.workflow-editor-inspector-icon svg {
    max-height: 24px;
    max-width: 24px;
    min-height: 20px;
    min-width: 20px;
}

.workflow-editor-validation-notification {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
}

.workflow-editor-validation-panel .node-icon {
    margin-right: 5px;
}

.workflow-editor-validation-notification.workflow-editor-success .node-icon * {
    color: #46b450;
}

.workflow-editor-validation-notification.workflow-editor-error .node-icon * {
    color: #d90f0f;
}

.edit-post-sidebar__panel .components-h-stack {
    width: 100%;
}

.workflow-editor-inspector-card__content table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    margin-top: 20px;
}

.workflow-editor-inspector-card__content table th,
.workflow-editor-inspector-card__content table td {
    padding: 2px 3px;
    border: 1px solid #e1e1e1;
    text-align: left;
}

.workflow-editor-data-flow-variable ul {
    margin-left: 40px;
    margin-top: 6px;
    margin-bottom: 11px;
    padding: 2px;
}

.workflow-editor-data-flow-variable ul li {
    margin-bottom: 2px;
    list-style: disc;
    line-height: 16px;
}

.workflow-editor-data-flow-variable ul code {
    max-width: 204px;
    display: inline-block;
    overflow: auto;
    text-wrap: wrap;
}

p.settings-field-description,
p.description {
    margin-top: -14px !important;
    font-size: 12px;
    font-style: normal;
    color: rgb(117, 117, 117);
}

p.description.margin-top {
    margin-top: 8px !important;
}

.components-panel__row .components-base-control {
    width: 100%;
}

.components-form-token-field__help {
    display: none;
}

.margin-bottom-0 {
    margin-bottom: 0 !important;
}

.margin-bottom-0 .components-base-control {
    margin-bottom: 0 !important;
}

.margin-top-0 {
    margin-top: 0 !important;
}

.workflow-editor-setting-popover .components-popover__content {
    min-width: 320px;
    padding: 16px;
}


.workflow-editor-inspector-card__header {
    justify-content: flex-start !important;
}

.workflow-editor-inspector-card__content .components-v-stack {
    margin-bottom: 10px;
}

.workflow-editor-post-data.hidden-calendar .components-datetime__date {
    display: none;
}

.workflow-editor-panel {
    gap: calc(4px) !important;
}

.workflow-editor-panel__row {
    width: 100%;
}

.workflow-editor-panel__row-label {
    min-width: 0px;
    align-items: center;
    display: flex;
    flex-shrink: 0;
    hyphens: auto;
    line-height: 20px;
    min-height: 32px;
    padding: 6px 0;
    width: 38%;
}

.workflow-editor-panel__row-control {
    min-width: 0px;
    align-items: center;
    display: flex;
    flex-grow: 1;
    min-height: 32px;
    max-height: 38px;
    overflow: hidden;
    word-break: break-word;
    flex-wrap: wrap;
    hyphens: auto;
    line-height: 20px;
}

.workflow-editor-panel__row-control .components-button.is-tertiary {
    white-space: normal;
    height: 38px;
    text-align: left;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    align-items: center;
    padding: 4px 8px;
}
`, "",{"version":3,"sources":["webpack://./assets/jsx/workflow-editor/css/inspector.css"],"names":[],"mappings":"AAAA;IACI,UAAU;AACd;;AAEA;;IAEI,gBAAgB;AACpB;;AAEA;IACI,gBAAgB;IAChB,oBAAoB;AACxB;;AAEA;IACI,YAAY;IACZ,uBAAuB;AAC3B;;AAEA;IACI,gBAAgB;IAChB,cAAc;IACd,eAAe;IACf,kBAAkB;IAClB,kBAAkB;IAClB,YAAY;IACZ,uBAAuB;AAC3B;;;AAGA;IACI,uBAAuB;IACvB,cAAc;IACd,aAAa;IACb,aAAa;AACjB;;AAEA;IACI,uBAAuB;IACvB,cAAc;IACd,aAAa;IACb,aAAa;AACjB;;AAEA;IACI,mBAAmB;IACnB,aAAa;IACb,YAAY;IACZ,uBAAuB;IACvB,WAAW;AACf;;AAEA;IACI,cAAc;IACd,YAAY;IACZ,cAAc;IACd,kBAAkB;IAClB,WAAW;AACf;;AAEA;IACI,uBAAuB;IACvB,cAAc;IACd,aAAa;IACb,aAAa;AACjB;;AAEA;IACI,YAAY;AAChB;;AAEA;IACI,cAAc;IACd,eAAe;IACf,oBAAoB;AACxB;;AAEA;IACI,cAAc;IACd,eAAe;IACf,oBAAoB;AACxB;;AAEA;IACI,eAAe;IACf,gBAAgB;IAChB,SAAS;IACT,cAAc;AAClB;;;AAGA;IACI,cAAc;IACd,eAAe;IACf,gBAAgB;IAChB,eAAe;AACnB;;AAEA;IACI,kBAAkB;AACtB;;AAEA;IACI,gBAAgB;IAChB,eAAe;IACf,gBAAgB;IAChB,eAAe;AACnB;;AAEA;IACI,aAAa;IACb,mBAAmB;IACnB,uBAAuB;IACvB,2BAA2B;AAC/B;;AAEA;IACI,iBAAiB;AACrB;;AAEA;IACI,cAAc;AAClB;;AAEA;IACI,cAAc;AAClB;;AAEA;IACI,WAAW;AACf;;AAEA;IACI,WAAW;IACX,yBAAyB;IACzB,iBAAiB;IACjB,gBAAgB;AACpB;;AAEA;;IAEI,gBAAgB;IAChB,yBAAyB;IACzB,gBAAgB;AACpB;;AAEA;IACI,iBAAiB;IACjB,eAAe;IACf,mBAAmB;IACnB,YAAY;AAChB;;AAEA;IACI,kBAAkB;IAClB,gBAAgB;IAChB,iBAAiB;AACrB;;AAEA;IACI,gBAAgB;IAChB,qBAAqB;IACrB,cAAc;IACd,eAAe;AACnB;;AAEA;;IAEI,4BAA4B;IAC5B,eAAe;IACf,kBAAkB;IAClB,yBAAyB;AAC7B;;AAEA;IACI,0BAA0B;AAC9B;;AAEA;IACI,WAAW;AACf;;AAEA;IACI,aAAa;AACjB;;AAEA;IACI,2BAA2B;AAC/B;;AAEA;IACI,2BAA2B;AAC/B;;AAEA;IACI,wBAAwB;AAC5B;;AAEA;IACI,gBAAgB;IAChB,aAAa;AACjB;;;AAGA;IACI,sCAAsC;AAC1C;;AAEA;IACI,mBAAmB;AACvB;;AAEA;IACI,aAAa;AACjB;;AAEA;IACI,yBAAyB;AAC7B;;AAEA;IACI,WAAW;AACf;;AAEA;IACI,cAAc;IACd,mBAAmB;IACnB,aAAa;IACb,cAAc;IACd,aAAa;IACb,iBAAiB;IACjB,gBAAgB;IAChB,cAAc;IACd,UAAU;AACd;;AAEA;IACI,cAAc;IACd,mBAAmB;IACnB,aAAa;IACb,YAAY;IACZ,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,sBAAsB;IACtB,eAAe;IACf,aAAa;IACb,iBAAiB;AACrB;;AAEA;IACI,mBAAmB;IACnB,YAAY;IACZ,gBAAgB;IAChB,oBAAoB;IACpB,qBAAqB;IACrB,4BAA4B;IAC5B,gBAAgB;IAChB,mBAAmB;IACnB,gBAAgB;AACpB","sourcesContent":[".edit-post-post-status .components-base-control {\n    flex: auto;\n}\n\n.editor-post-title__panel,\n.editor-post-description__panel {\n    padding-top: 8px;\n}\n\n.editor-post-status__panel {\n    margin-top: 16px;\n    gap: 16px !important;\n}\n\n.editor-post-status__panel button {\n    flex-grow: 1;\n    justify-content: center;\n}\n\n.workflow-editor-element-inspector__warning {\n    background: #fff;\n    display: block;\n    font-size: 13px;\n    padding: 32px 36px;\n    text-align: center;\n    flex-grow: 1;\n    justify-content: center;\n}\n\n\n.workflow-editor-inspector-card {\n    align-items: flex-start;\n    color: #1e1e1e;\n    display: flex;\n    padding: 16px;\n}\n\n.workflow-editor-inspector-card {\n    align-items: flex-start;\n    color: #1e1e1e;\n    display: flex;\n    padding: 16px;\n}\n\n.workflow-editor-inspector-icon {\n    align-items: center;\n    display: flex;\n    height: 24px;\n    justify-content: center;\n    width: 24px;\n}\n\n.workflow-editor-inspector-card .workflow-editor-inspector-icon {\n    flex: 0 0 24px;\n    height: 24px;\n    margin-left: 0;\n    margin-right: 12px;\n    width: 24px;\n}\n\n.workflow-editor-inspector-card {\n    align-items: flex-start;\n    color: #1e1e1e;\n    display: flex;\n    padding: 16px;\n}\n\n.workflow-editor-inspector-card__content {\n    flex-grow: 1;\n}\n\n.workflow-editor-inspector-inspector h2, .workflow-editor-inspector-inspector h3 {\n    color: #1e1e1e;\n    font-size: 13px;\n    margin-bottom: 1.5em;\n}\n\n.interface-complementary-area h2 {\n    color: #1e1e1e;\n    font-size: 13px;\n    margin-bottom: 1.5em;\n}\n\n.workflow-editor-inspector-card__title.workflow-editor-inspector-card__title {\n    font-size: 13px;\n    line-height: 1.4;\n    margin: 0;\n    padding: 3px 0;\n}\n\n\n.workflow-editor-inspector-card__description {\n    display: block;\n    font-size: 13px;\n    line-height: 1.4;\n    margin-top: 4px;\n}\n\n.workflow-editor-inspector-icon.has-colors svg {\n    fill: currentColor;\n}\n\n.workflow-editor-inspector-icon svg {\n    max-height: 24px;\n    max-width: 24px;\n    min-height: 20px;\n    min-width: 20px;\n}\n\n.workflow-editor-validation-notification {\n    display: flex;\n    flex-direction: row;\n    align-items: flex-start;\n    justify-content: flex-start;\n}\n\n.workflow-editor-validation-panel .node-icon {\n    margin-right: 5px;\n}\n\n.workflow-editor-validation-notification.workflow-editor-success .node-icon * {\n    color: #46b450;\n}\n\n.workflow-editor-validation-notification.workflow-editor-error .node-icon * {\n    color: #d90f0f;\n}\n\n.edit-post-sidebar__panel .components-h-stack {\n    width: 100%;\n}\n\n.workflow-editor-inspector-card__content table {\n    width: 100%;\n    border-collapse: collapse;\n    border-spacing: 0;\n    margin-top: 20px;\n}\n\n.workflow-editor-inspector-card__content table th,\n.workflow-editor-inspector-card__content table td {\n    padding: 2px 3px;\n    border: 1px solid #e1e1e1;\n    text-align: left;\n}\n\n.workflow-editor-data-flow-variable ul {\n    margin-left: 40px;\n    margin-top: 6px;\n    margin-bottom: 11px;\n    padding: 2px;\n}\n\n.workflow-editor-data-flow-variable ul li {\n    margin-bottom: 2px;\n    list-style: disc;\n    line-height: 16px;\n}\n\n.workflow-editor-data-flow-variable ul code {\n    max-width: 204px;\n    display: inline-block;\n    overflow: auto;\n    text-wrap: wrap;\n}\n\np.settings-field-description,\np.description {\n    margin-top: -14px !important;\n    font-size: 12px;\n    font-style: normal;\n    color: rgb(117, 117, 117);\n}\n\np.description.margin-top {\n    margin-top: 8px !important;\n}\n\n.components-panel__row .components-base-control {\n    width: 100%;\n}\n\n.components-form-token-field__help {\n    display: none;\n}\n\n.margin-bottom-0 {\n    margin-bottom: 0 !important;\n}\n\n.margin-bottom-0 .components-base-control {\n    margin-bottom: 0 !important;\n}\n\n.margin-top-0 {\n    margin-top: 0 !important;\n}\n\n.workflow-editor-setting-popover .components-popover__content {\n    min-width: 320px;\n    padding: 16px;\n}\n\n\n.workflow-editor-inspector-card__header {\n    justify-content: flex-start !important;\n}\n\n.workflow-editor-inspector-card__content .components-v-stack {\n    margin-bottom: 10px;\n}\n\n.workflow-editor-post-data.hidden-calendar .components-datetime__date {\n    display: none;\n}\n\n.workflow-editor-panel {\n    gap: calc(4px) !important;\n}\n\n.workflow-editor-panel__row {\n    width: 100%;\n}\n\n.workflow-editor-panel__row-label {\n    min-width: 0px;\n    align-items: center;\n    display: flex;\n    flex-shrink: 0;\n    hyphens: auto;\n    line-height: 20px;\n    min-height: 32px;\n    padding: 6px 0;\n    width: 38%;\n}\n\n.workflow-editor-panel__row-control {\n    min-width: 0px;\n    align-items: center;\n    display: flex;\n    flex-grow: 1;\n    min-height: 32px;\n    max-height: 38px;\n    overflow: hidden;\n    word-break: break-word;\n    flex-wrap: wrap;\n    hyphens: auto;\n    line-height: 20px;\n}\n\n.workflow-editor-panel__row-control .components-button.is-tertiary {\n    white-space: normal;\n    height: 38px;\n    text-align: left;\n    display: -webkit-box;\n    -webkit-line-clamp: 2;\n    -webkit-box-orient: vertical;\n    overflow: hidden;\n    align-items: center;\n    padding: 4px 8px;\n}\n"],"sourceRoot":""}]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);


/***/ },

/***/ "./node_modules/css-loader/dist/cjs.js!./assets/jsx/workflow-editor/css/node-types.css"
/*!*********************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js!./assets/jsx/workflow-editor/css/node-types.css ***!
  \*********************************************************************************************/
(module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ "./node_modules/css-loader/dist/runtime/sourceMaps.js");
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
// Imports


var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
// Module
___CSS_LOADER_EXPORT___.push([module.id, `.react-flow__node {
    max-width: 210px;
}

.react-flow__node-body {
    border-radius: 8px;
    color: #171717;
    font-size: 10px;
    min-width: 140px;
    box-sizing: border-box;
    border: 1px solid transparent;
    cursor: pointer;
}

.react-flow__node-inner-body {
    padding: 6px;
    box-sizing: border-box;
}

.react-flow__node-header {
    text-align: center;
    width: 100%;
    position: relative;
    text-align: left;
}

.react-flow__node-header .react-flow__node-label {
    margin-left: 22px;
    margin-right: 5px;
}

.react-flow__node-header .dashicon {
    margin-right: 4px;
    position: absolute;
    left: 2px;
    top: 2px;
}

.react-flow__node-header .node-icon {
    margin-right: 4px;
    position: absolute;
    top: 1px;
    left: 2px;
}

.react-flow__node-description {
    font-size: 8px;
    line-height: 10px;
    color: #0000008a;
    margin-top: 0px;
    margin-left: 16px;
    padding: 0px 6px;
    border-radius: 6px;
    overflow-wrap: break-word;
    max-width: 140px;
    margin-bottom: 6px;
}

.react-flow__node-inner-body.with-description {
    padding-bottom: 4px;
}

.react-flow__node-slug {
    font-size: 8px;
    display: inline-block;
    height: 6px;
    line-height: 6px;
    padding: 2px;
    position: absolute;
    top: 45px;
    left: 27px;
}

.react-flow__handle {
    width: 8px !important;
    height: 8px !important;
    box-sizing: border-box;
}

.react-flow__handle.react-flow__handle-bottom {
    bottom: -4px !important;
}

.react-flow__handle.react-flow__handle-top {
    top: -4px !important;
}

.react-flow__node-top {
    font-size: 8px;
    padding: 0 8px;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    border-bottom: 1px solid silver;
    position: relative;
    padding-left: 18px;
}

.react-flow__node-top .publishpress-icon {
    margin-right: 4px;
    position: absolute;
    top: 1px;
    left: 8px;
}

.react-flow__node-inserter-popover .components-popover__content {
    width: 350px;
}

.react-flow__node-inserter-popover {
    display: flex;
    flex-direction: column;
    position: relative;
}

.react-flow__node-inserter-popover-content {
    height: 100%;
    overflow-y: auto;
    height: 340px;
}

.react-flow__node-inserter-popover-close {
    cursor: pointer;
    background-color: #000;
    color: #fff;
    display: block;
    width: 100%;
    padding: 6px;
    height: 44px;
}

/* DEFAULT STYLE FOR NODES */

.react-flow__node-genericNode,
.react-flow__node-genericTrigger,
.react-flow__node-unknownNode,
.react-flow__node-genericAction,
.react-flow__node-genericAdvanced,
.react-flow__node-queryAction,
.react-flow__node-debugAction,
.react-flow__handle {
    border-width: 1px;
    border-style: solid;
}

.react-flow__node-inner-body {
    border-bottom-width: 1px;
    border-bottom-style: solid;
}

/* GENERIC NODE */

.react-flow__node-genericNode {
    background-color: #b2b2c9;
    border-color: #b2b2c9;
}

.react-flow__node-genericNode .react-flow__handle {
    background-color: #fff;
    border-color: #b2b2c9;
}

.react-flow__node-genericNode .react-flow__node-top {
    border-color: #b2b2c9;
}

.react-flow__node-genericNode .react-flow__node-slug {
    color: #b2b2c9;
}

.react-flow__node-genericNode .react-flow__node-inner-body {
    border-bottom-color: #b2b2c9;
}

/* TRIGGER */

.react-flow__node-genericTrigger {
    background-color: #dce5df;
    border-color: #b9c0bb;
}

.react-flow__node-genericTrigger .react-flow__handle {
    background-color: #fff;
    border-color: #B594B6;
}

.react-flow__node-genericTrigger  .react-flow__node-slug {
    color: #939895;
}

.react-flow__node-genericTrigger .react-flow__node-top {
    border-color: #b9c0bb;
}

.react-flow__node-genericTrigger .react-flow__node-slug {
    color: #808882;
}

.react-flow__node-genericTrigger .react-flow__node-inner-body {
    border-bottom-color: #b9c0bb;
}

/* GENERIC ACTION */

.react-flow__node-unknownNode {
    background-color: #afafaf;
    border-color: #bbbbbb;
}

.react-flow__node-genericAction {
    background-color: #89bae4;
    border-color: #7199bc;
}

.react-flow__node-unknownNode .react-flow__handle,
.react-flow__node-genericAction .react-flow__handle {
    background-color: #fff;
    border-color: #7199bc;
}

.react-flow__node-unknownNode .react-flow__node-slug,
.react-flow__node-genericAction .react-flow__node-slug {
    color: #8a62be;
}

.react-flow__node-unknownNode .react-flow__node-top,
.react-flow__node-genericAction .react-flow__node-top {
    border-color: #7199bc;
}

.react-flow__node-unknownNode .react-flow__node-slug,
.react-flow__node-genericAction .react-flow__node-slug {
    color: #526e87;
}

.react-flow__node-genericAction .react-flow__node-inner-body {
    border-bottom-color: #7199bc;
}

/* GENERIC ADVANCED */

.react-flow__node-genericAdvanced {
    background-color: #f8ddad;
    border-color: #d3bc94;
}

.react-flow__node-genericAdvanced .react-flow__handle {
    background-color: #fff;
    border-color: #d3bc94;
}

.react-flow__node-genericAdvanced .react-flow__node-slug {
    color: #b19f80;
}

.react-flow__node-genericAdvanced .react-flow__node-top {
    border-color: #d3bc94;
}

.react-flow__node-genericAdvanced .react-flow__node-slug {
    color: #908065;
}

.react-flow__node-genericAdvanced .react-flow__node-inner-body {
    border-bottom-color: #d3bc94;
}

/* QUERY ACTION */

.react-flow__node-queryAction {
    background-color: #d8b6f2;
    border-color: #b891c2;
}

.react-flow__node-queryAction .react-flow__handle {
    background-color: #fff;
    border-color: #b891c2;
}

.react-flow__node-queryAction .react-flow__node-slug {
    color: #9079a1;
}

.react-flow__node-queryAction .react-flow__node-top {
    border-color: #b891c2;
}

.react-flow__node-queryAction .react-flow__node-slug {
    color: rgb(110, 110, 125);
}

.react-flow__node-queryAction .react-flow__node-inner-body {
    border-bottom-color: #b891c2;
}

/* DEBUG ACTION */

.react-flow__node-debugAction {
    background-color: #f0aec6;
    border-color: #cf96ab;
}

.react-flow__node-debugAction .react-flow__handle {
    background-color: #fff;
    border-color: #cf96ab;
}

.react-flow__node-debugAction .react-flow__node-slug {
    color: #916877;
}

.react-flow__node-debugAction .react-flow__node-top {
    border-color: #cf96ab;
}

.react-flow__node-debugAction .react-flow__node-inner-body {
    border-bottom-color: #cf96ab;
}

/* PLACEHOLDER FOR EMPTY FLOW */
.react-flow__node-triggerPlaceholderNode {
    background-color: #fff;
    border: 1px dashed #d2d2d2;
    cursor: pointer;
}

.react-flow__node-triggerPlaceholderNode .react-flow__node-header {
    display: flex;
    align-items: center;
}

.react-flow__node-triggerPlaceholderNode .react-flow__node-header .icon {
    color: #fff;
    background-color: #d2d2d2;
    padding: 2px;
    display: inline-block;
    width: 12px;
    height: 12px;
    box-sizing: border-box;
    position: relative;
    border-radius: 1px;
    margin-right: 6px;
}

.react-flow__node-triggerPlaceholderNode .react-flow__node-header .icon svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
}

.react-flow__node-triggerPlaceholderNode .react-flow__node-header .react-flow__node-label {
    color: #d2d2d2
}

.react-flow__node-triggerPlaceholderNode .react-flow__node-header {
    padding-left: 0;
}

.react-flow__node-triggerPlaceholderNode:hover {
    border: 1px dashed #aeaeae;
}

.react-flow__node-triggerPlaceholderNode:hover .react-flow__node-header .icon {
    background-color: #aeaeae;
}

.react-flow__node-triggerPlaceholderNode:hover .react-flow__node-header .react-flow__node-label {
    color: #aeaeae;
}

.react-flow__node-triggerPlaceholderNode .react-flow__node-inner-body {
    border-bottom: none;
}

/* SELECTED NODES */
.react-flow__node.selected {
    background-color: transparent;
}

.react-flow__node.selected .react-flow__node-body {
    border: 1px dashed #555;
}

.react-flow__node-genericNode .react-flow__node-slug {
    color: #b2b2c9;
}

/* HANDLE AREA */

.react-flow__node-handle-area {
    font-size: 6px;
    background-color: #fff;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    display: flex;
    flex-direction: row;
}

.react-flow__node-handle-name {
    padding: 4px 2px 6px 2px;
    text-align: center;
    line-height: 100%;
    flex: 1;
    border-left: 1px solid silver;
    min-width: 36px;
}

.react-flow__node-handle-name:first-child {
    border-left: 0;
}

/* Node Content */
.react-flow__node-content {
    font-size: 6px;
    margin-top: 6px;
}

.react-flow__node-content table {
    border-spacing: 0;
    width: 100%;
}

.react-flow__node-content table th {
    text-align: left;
}

.react-flow__node-content table th,
.react-flow__node-content table td {
    padding: 0 6px;
    font-size: 6px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Node Markers */
.react-flow__node-marker-wrapper {
    position: absolute;
    top: -17px;
    right: 0;
    display: flex;
    flex-direction: row;
    gap: 2px;
    justify-content: right;
}

.react-flow__node-error,
.react-flow__node-pro-badge {
    display: flex;
    border-radius: 100%;
    width: 14px;
    height: 14px;
    box-sizing: border-box;
    justify-content: center;
    vertical-align: middle;
}

.react-flow__node-pro-badge {
    background-color: #ffb200;
    color: #000;
}

.react-flow__node-pro-badge .node-icon {
    margin-top: -2px;
}

.react-flow__node-error {
    background-color: #d90f0f;
    color: #fff;
    font-size: 10px;
    text-align: center;
    line-height: 12px;
    font-family: monospace;
    font-weight: 900;
    padding-left: 0px;
}

.react-flow__node-error .node-icon {
    margin-top: 2px;
}

body.workflow-editor.is-free .react-flow__node-handle-name {
    color: #838383;
}

body.workflow-editor.is-free .react-flow__node-handle-name.handle-area-source-output,
body.workflow-editor.is-free .react-flow__node-handle-name.handle-area-source-true {
    color: #000;
}

.react-flow__node-top .node-slug {
    color: #0000008a;
}
`, "",{"version":3,"sources":["webpack://./assets/jsx/workflow-editor/css/node-types.css"],"names":[],"mappings":"AAAA;IACI,gBAAgB;AACpB;;AAEA;IACI,kBAAkB;IAClB,cAAc;IACd,eAAe;IACf,gBAAgB;IAChB,sBAAsB;IACtB,6BAA6B;IAC7B,eAAe;AACnB;;AAEA;IACI,YAAY;IACZ,sBAAsB;AAC1B;;AAEA;IACI,kBAAkB;IAClB,WAAW;IACX,kBAAkB;IAClB,gBAAgB;AACpB;;AAEA;IACI,iBAAiB;IACjB,iBAAiB;AACrB;;AAEA;IACI,iBAAiB;IACjB,kBAAkB;IAClB,SAAS;IACT,QAAQ;AACZ;;AAEA;IACI,iBAAiB;IACjB,kBAAkB;IAClB,QAAQ;IACR,SAAS;AACb;;AAEA;IACI,cAAc;IACd,iBAAiB;IACjB,gBAAgB;IAChB,eAAe;IACf,iBAAiB;IACjB,gBAAgB;IAChB,kBAAkB;IAClB,yBAAyB;IACzB,gBAAgB;IAChB,kBAAkB;AACtB;;AAEA;IACI,mBAAmB;AACvB;;AAEA;IACI,cAAc;IACd,qBAAqB;IACrB,WAAW;IACX,gBAAgB;IAChB,YAAY;IACZ,kBAAkB;IAClB,SAAS;IACT,UAAU;AACd;;AAEA;IACI,qBAAqB;IACrB,sBAAsB;IACtB,sBAAsB;AAC1B;;AAEA;IACI,uBAAuB;AAC3B;;AAEA;IACI,oBAAoB;AACxB;;AAEA;IACI,cAAc;IACd,cAAc;IACd,2BAA2B;IAC3B,4BAA4B;IAC5B,+BAA+B;IAC/B,kBAAkB;IAClB,kBAAkB;AACtB;;AAEA;IACI,iBAAiB;IACjB,kBAAkB;IAClB,QAAQ;IACR,SAAS;AACb;;AAEA;IACI,YAAY;AAChB;;AAEA;IACI,aAAa;IACb,sBAAsB;IACtB,kBAAkB;AACtB;;AAEA;IACI,YAAY;IACZ,gBAAgB;IAChB,aAAa;AACjB;;AAEA;IACI,eAAe;IACf,sBAAsB;IACtB,WAAW;IACX,cAAc;IACd,WAAW;IACX,YAAY;IACZ,YAAY;AAChB;;AAEA,4BAA4B;;AAE5B;;;;;;;;IAQI,iBAAiB;IACjB,mBAAmB;AACvB;;AAEA;IACI,wBAAwB;IACxB,0BAA0B;AAC9B;;AAEA,iBAAiB;;AAEjB;IACI,yBAAyB;IACzB,qBAAqB;AACzB;;AAEA;IACI,sBAAsB;IACtB,qBAAqB;AACzB;;AAEA;IACI,qBAAqB;AACzB;;AAEA;IACI,cAAc;AAClB;;AAEA;IACI,4BAA4B;AAChC;;AAEA,YAAY;;AAEZ;IACI,yBAAyB;IACzB,qBAAqB;AACzB;;AAEA;IACI,sBAAsB;IACtB,qBAAqB;AACzB;;AAEA;IACI,cAAc;AAClB;;AAEA;IACI,qBAAqB;AACzB;;AAEA;IACI,cAAc;AAClB;;AAEA;IACI,4BAA4B;AAChC;;AAEA,mBAAmB;;AAEnB;IACI,yBAAyB;IACzB,qBAAqB;AACzB;;AAEA;IACI,yBAAyB;IACzB,qBAAqB;AACzB;;AAEA;;IAEI,sBAAsB;IACtB,qBAAqB;AACzB;;AAEA;;IAEI,cAAc;AAClB;;AAEA;;IAEI,qBAAqB;AACzB;;AAEA;;IAEI,cAAc;AAClB;;AAEA;IACI,4BAA4B;AAChC;;AAEA,qBAAqB;;AAErB;IACI,yBAAyB;IACzB,qBAAqB;AACzB;;AAEA;IACI,sBAAsB;IACtB,qBAAqB;AACzB;;AAEA;IACI,cAAc;AAClB;;AAEA;IACI,qBAAqB;AACzB;;AAEA;IACI,cAAc;AAClB;;AAEA;IACI,4BAA4B;AAChC;;AAEA,iBAAiB;;AAEjB;IACI,yBAAyB;IACzB,qBAAqB;AACzB;;AAEA;IACI,sBAAsB;IACtB,qBAAqB;AACzB;;AAEA;IACI,cAAc;AAClB;;AAEA;IACI,qBAAqB;AACzB;;AAEA;IACI,yBAAyB;AAC7B;;AAEA;IACI,4BAA4B;AAChC;;AAEA,iBAAiB;;AAEjB;IACI,yBAAyB;IACzB,qBAAqB;AACzB;;AAEA;IACI,sBAAsB;IACtB,qBAAqB;AACzB;;AAEA;IACI,cAAc;AAClB;;AAEA;IACI,qBAAqB;AACzB;;AAEA;IACI,4BAA4B;AAChC;;AAEA,+BAA+B;AAC/B;IACI,sBAAsB;IACtB,0BAA0B;IAC1B,eAAe;AACnB;;AAEA;IACI,aAAa;IACb,mBAAmB;AACvB;;AAEA;IACI,WAAW;IACX,yBAAyB;IACzB,YAAY;IACZ,qBAAqB;IACrB,WAAW;IACX,YAAY;IACZ,sBAAsB;IACtB,kBAAkB;IAClB,kBAAkB;IAClB,iBAAiB;AACrB;;AAEA;IACI,kBAAkB;IAClB,QAAQ;IACR,SAAS;IACT,gCAAgC;IAChC,WAAW;IACX,YAAY;AAChB;;AAEA;IACI;AACJ;;AAEA;IACI,eAAe;AACnB;;AAEA;IACI,0BAA0B;AAC9B;;AAEA;IACI,yBAAyB;AAC7B;;AAEA;IACI,cAAc;AAClB;;AAEA;IACI,mBAAmB;AACvB;;AAEA,mBAAmB;AACnB;IACI,6BAA6B;AACjC;;AAEA;IACI,uBAAuB;AAC3B;;AAEA;IACI,cAAc;AAClB;;AAEA,gBAAgB;;AAEhB;IACI,cAAc;IACd,sBAAsB;IACtB,8BAA8B;IAC9B,+BAA+B;IAC/B,aAAa;IACb,mBAAmB;AACvB;;AAEA;IACI,wBAAwB;IACxB,kBAAkB;IAClB,iBAAiB;IACjB,OAAO;IACP,6BAA6B;IAC7B,eAAe;AACnB;;AAEA;IACI,cAAc;AAClB;;AAEA,iBAAiB;AACjB;IACI,cAAc;IACd,eAAe;AACnB;;AAEA;IACI,iBAAiB;IACjB,WAAW;AACf;;AAEA;IACI,gBAAgB;AACpB;;AAEA;;IAEI,cAAc;IACd,cAAc;IACd,oCAAoC;AACxC;;AAEA,iBAAiB;AACjB;IACI,kBAAkB;IAClB,UAAU;IACV,QAAQ;IACR,aAAa;IACb,mBAAmB;IACnB,QAAQ;IACR,sBAAsB;AAC1B;;AAEA;;IAEI,aAAa;IACb,mBAAmB;IACnB,WAAW;IACX,YAAY;IACZ,sBAAsB;IACtB,uBAAuB;IACvB,sBAAsB;AAC1B;;AAEA;IACI,yBAAyB;IACzB,WAAW;AACf;;AAEA;IACI,gBAAgB;AACpB;;AAEA;IACI,yBAAyB;IACzB,WAAW;IACX,eAAe;IACf,kBAAkB;IAClB,iBAAiB;IACjB,sBAAsB;IACtB,gBAAgB;IAChB,iBAAiB;AACrB;;AAEA;IACI,eAAe;AACnB;;AAEA;IACI,cAAc;AAClB;;AAEA;;IAEI,WAAW;AACf;;AAEA;IACI,gBAAgB;AACpB","sourcesContent":[".react-flow__node {\n    max-width: 210px;\n}\n\n.react-flow__node-body {\n    border-radius: 8px;\n    color: #171717;\n    font-size: 10px;\n    min-width: 140px;\n    box-sizing: border-box;\n    border: 1px solid transparent;\n    cursor: pointer;\n}\n\n.react-flow__node-inner-body {\n    padding: 6px;\n    box-sizing: border-box;\n}\n\n.react-flow__node-header {\n    text-align: center;\n    width: 100%;\n    position: relative;\n    text-align: left;\n}\n\n.react-flow__node-header .react-flow__node-label {\n    margin-left: 22px;\n    margin-right: 5px;\n}\n\n.react-flow__node-header .dashicon {\n    margin-right: 4px;\n    position: absolute;\n    left: 2px;\n    top: 2px;\n}\n\n.react-flow__node-header .node-icon {\n    margin-right: 4px;\n    position: absolute;\n    top: 1px;\n    left: 2px;\n}\n\n.react-flow__node-description {\n    font-size: 8px;\n    line-height: 10px;\n    color: #0000008a;\n    margin-top: 0px;\n    margin-left: 16px;\n    padding: 0px 6px;\n    border-radius: 6px;\n    overflow-wrap: break-word;\n    max-width: 140px;\n    margin-bottom: 6px;\n}\n\n.react-flow__node-inner-body.with-description {\n    padding-bottom: 4px;\n}\n\n.react-flow__node-slug {\n    font-size: 8px;\n    display: inline-block;\n    height: 6px;\n    line-height: 6px;\n    padding: 2px;\n    position: absolute;\n    top: 45px;\n    left: 27px;\n}\n\n.react-flow__handle {\n    width: 8px !important;\n    height: 8px !important;\n    box-sizing: border-box;\n}\n\n.react-flow__handle.react-flow__handle-bottom {\n    bottom: -4px !important;\n}\n\n.react-flow__handle.react-flow__handle-top {\n    top: -4px !important;\n}\n\n.react-flow__node-top {\n    font-size: 8px;\n    padding: 0 8px;\n    border-top-left-radius: 8px;\n    border-top-right-radius: 8px;\n    border-bottom: 1px solid silver;\n    position: relative;\n    padding-left: 18px;\n}\n\n.react-flow__node-top .publishpress-icon {\n    margin-right: 4px;\n    position: absolute;\n    top: 1px;\n    left: 8px;\n}\n\n.react-flow__node-inserter-popover .components-popover__content {\n    width: 350px;\n}\n\n.react-flow__node-inserter-popover {\n    display: flex;\n    flex-direction: column;\n    position: relative;\n}\n\n.react-flow__node-inserter-popover-content {\n    height: 100%;\n    overflow-y: auto;\n    height: 340px;\n}\n\n.react-flow__node-inserter-popover-close {\n    cursor: pointer;\n    background-color: #000;\n    color: #fff;\n    display: block;\n    width: 100%;\n    padding: 6px;\n    height: 44px;\n}\n\n/* DEFAULT STYLE FOR NODES */\n\n.react-flow__node-genericNode,\n.react-flow__node-genericTrigger,\n.react-flow__node-unknownNode,\n.react-flow__node-genericAction,\n.react-flow__node-genericAdvanced,\n.react-flow__node-queryAction,\n.react-flow__node-debugAction,\n.react-flow__handle {\n    border-width: 1px;\n    border-style: solid;\n}\n\n.react-flow__node-inner-body {\n    border-bottom-width: 1px;\n    border-bottom-style: solid;\n}\n\n/* GENERIC NODE */\n\n.react-flow__node-genericNode {\n    background-color: #b2b2c9;\n    border-color: #b2b2c9;\n}\n\n.react-flow__node-genericNode .react-flow__handle {\n    background-color: #fff;\n    border-color: #b2b2c9;\n}\n\n.react-flow__node-genericNode .react-flow__node-top {\n    border-color: #b2b2c9;\n}\n\n.react-flow__node-genericNode .react-flow__node-slug {\n    color: #b2b2c9;\n}\n\n.react-flow__node-genericNode .react-flow__node-inner-body {\n    border-bottom-color: #b2b2c9;\n}\n\n/* TRIGGER */\n\n.react-flow__node-genericTrigger {\n    background-color: #dce5df;\n    border-color: #b9c0bb;\n}\n\n.react-flow__node-genericTrigger .react-flow__handle {\n    background-color: #fff;\n    border-color: #B594B6;\n}\n\n.react-flow__node-genericTrigger  .react-flow__node-slug {\n    color: #939895;\n}\n\n.react-flow__node-genericTrigger .react-flow__node-top {\n    border-color: #b9c0bb;\n}\n\n.react-flow__node-genericTrigger .react-flow__node-slug {\n    color: #808882;\n}\n\n.react-flow__node-genericTrigger .react-flow__node-inner-body {\n    border-bottom-color: #b9c0bb;\n}\n\n/* GENERIC ACTION */\n\n.react-flow__node-unknownNode {\n    background-color: #afafaf;\n    border-color: #bbbbbb;\n}\n\n.react-flow__node-genericAction {\n    background-color: #89bae4;\n    border-color: #7199bc;\n}\n\n.react-flow__node-unknownNode .react-flow__handle,\n.react-flow__node-genericAction .react-flow__handle {\n    background-color: #fff;\n    border-color: #7199bc;\n}\n\n.react-flow__node-unknownNode .react-flow__node-slug,\n.react-flow__node-genericAction .react-flow__node-slug {\n    color: #8a62be;\n}\n\n.react-flow__node-unknownNode .react-flow__node-top,\n.react-flow__node-genericAction .react-flow__node-top {\n    border-color: #7199bc;\n}\n\n.react-flow__node-unknownNode .react-flow__node-slug,\n.react-flow__node-genericAction .react-flow__node-slug {\n    color: #526e87;\n}\n\n.react-flow__node-genericAction .react-flow__node-inner-body {\n    border-bottom-color: #7199bc;\n}\n\n/* GENERIC ADVANCED */\n\n.react-flow__node-genericAdvanced {\n    background-color: #f8ddad;\n    border-color: #d3bc94;\n}\n\n.react-flow__node-genericAdvanced .react-flow__handle {\n    background-color: #fff;\n    border-color: #d3bc94;\n}\n\n.react-flow__node-genericAdvanced .react-flow__node-slug {\n    color: #b19f80;\n}\n\n.react-flow__node-genericAdvanced .react-flow__node-top {\n    border-color: #d3bc94;\n}\n\n.react-flow__node-genericAdvanced .react-flow__node-slug {\n    color: #908065;\n}\n\n.react-flow__node-genericAdvanced .react-flow__node-inner-body {\n    border-bottom-color: #d3bc94;\n}\n\n/* QUERY ACTION */\n\n.react-flow__node-queryAction {\n    background-color: #d8b6f2;\n    border-color: #b891c2;\n}\n\n.react-flow__node-queryAction .react-flow__handle {\n    background-color: #fff;\n    border-color: #b891c2;\n}\n\n.react-flow__node-queryAction .react-flow__node-slug {\n    color: #9079a1;\n}\n\n.react-flow__node-queryAction .react-flow__node-top {\n    border-color: #b891c2;\n}\n\n.react-flow__node-queryAction .react-flow__node-slug {\n    color: rgb(110, 110, 125);\n}\n\n.react-flow__node-queryAction .react-flow__node-inner-body {\n    border-bottom-color: #b891c2;\n}\n\n/* DEBUG ACTION */\n\n.react-flow__node-debugAction {\n    background-color: #f0aec6;\n    border-color: #cf96ab;\n}\n\n.react-flow__node-debugAction .react-flow__handle {\n    background-color: #fff;\n    border-color: #cf96ab;\n}\n\n.react-flow__node-debugAction .react-flow__node-slug {\n    color: #916877;\n}\n\n.react-flow__node-debugAction .react-flow__node-top {\n    border-color: #cf96ab;\n}\n\n.react-flow__node-debugAction .react-flow__node-inner-body {\n    border-bottom-color: #cf96ab;\n}\n\n/* PLACEHOLDER FOR EMPTY FLOW */\n.react-flow__node-triggerPlaceholderNode {\n    background-color: #fff;\n    border: 1px dashed #d2d2d2;\n    cursor: pointer;\n}\n\n.react-flow__node-triggerPlaceholderNode .react-flow__node-header {\n    display: flex;\n    align-items: center;\n}\n\n.react-flow__node-triggerPlaceholderNode .react-flow__node-header .icon {\n    color: #fff;\n    background-color: #d2d2d2;\n    padding: 2px;\n    display: inline-block;\n    width: 12px;\n    height: 12px;\n    box-sizing: border-box;\n    position: relative;\n    border-radius: 1px;\n    margin-right: 6px;\n}\n\n.react-flow__node-triggerPlaceholderNode .react-flow__node-header .icon svg {\n    position: absolute;\n    top: 50%;\n    left: 50%;\n    transform: translate(-50%, -50%);\n    width: 12px;\n    height: 12px;\n}\n\n.react-flow__node-triggerPlaceholderNode .react-flow__node-header .react-flow__node-label {\n    color: #d2d2d2\n}\n\n.react-flow__node-triggerPlaceholderNode .react-flow__node-header {\n    padding-left: 0;\n}\n\n.react-flow__node-triggerPlaceholderNode:hover {\n    border: 1px dashed #aeaeae;\n}\n\n.react-flow__node-triggerPlaceholderNode:hover .react-flow__node-header .icon {\n    background-color: #aeaeae;\n}\n\n.react-flow__node-triggerPlaceholderNode:hover .react-flow__node-header .react-flow__node-label {\n    color: #aeaeae;\n}\n\n.react-flow__node-triggerPlaceholderNode .react-flow__node-inner-body {\n    border-bottom: none;\n}\n\n/* SELECTED NODES */\n.react-flow__node.selected {\n    background-color: transparent;\n}\n\n.react-flow__node.selected .react-flow__node-body {\n    border: 1px dashed #555;\n}\n\n.react-flow__node-genericNode .react-flow__node-slug {\n    color: #b2b2c9;\n}\n\n/* HANDLE AREA */\n\n.react-flow__node-handle-area {\n    font-size: 6px;\n    background-color: #fff;\n    border-bottom-left-radius: 8px;\n    border-bottom-right-radius: 8px;\n    display: flex;\n    flex-direction: row;\n}\n\n.react-flow__node-handle-name {\n    padding: 4px 2px 6px 2px;\n    text-align: center;\n    line-height: 100%;\n    flex: 1;\n    border-left: 1px solid silver;\n    min-width: 36px;\n}\n\n.react-flow__node-handle-name:first-child {\n    border-left: 0;\n}\n\n/* Node Content */\n.react-flow__node-content {\n    font-size: 6px;\n    margin-top: 6px;\n}\n\n.react-flow__node-content table {\n    border-spacing: 0;\n    width: 100%;\n}\n\n.react-flow__node-content table th {\n    text-align: left;\n}\n\n.react-flow__node-content table th,\n.react-flow__node-content table td {\n    padding: 0 6px;\n    font-size: 6px;\n    border: 1px solid rgba(0, 0, 0, 0.1);\n}\n\n/* Node Markers */\n.react-flow__node-marker-wrapper {\n    position: absolute;\n    top: -17px;\n    right: 0;\n    display: flex;\n    flex-direction: row;\n    gap: 2px;\n    justify-content: right;\n}\n\n.react-flow__node-error,\n.react-flow__node-pro-badge {\n    display: flex;\n    border-radius: 100%;\n    width: 14px;\n    height: 14px;\n    box-sizing: border-box;\n    justify-content: center;\n    vertical-align: middle;\n}\n\n.react-flow__node-pro-badge {\n    background-color: #ffb200;\n    color: #000;\n}\n\n.react-flow__node-pro-badge .node-icon {\n    margin-top: -2px;\n}\n\n.react-flow__node-error {\n    background-color: #d90f0f;\n    color: #fff;\n    font-size: 10px;\n    text-align: center;\n    line-height: 12px;\n    font-family: monospace;\n    font-weight: 900;\n    padding-left: 0px;\n}\n\n.react-flow__node-error .node-icon {\n    margin-top: 2px;\n}\n\nbody.workflow-editor.is-free .react-flow__node-handle-name {\n    color: #838383;\n}\n\nbody.workflow-editor.is-free .react-flow__node-handle-name.handle-area-source-output,\nbody.workflow-editor.is-free .react-flow__node-handle-name.handle-area-source-true {\n    color: #000;\n}\n\n.react-flow__node-top .node-slug {\n    color: #0000008a;\n}\n"],"sourceRoot":""}]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);


/***/ },

/***/ "./node_modules/css-loader/dist/cjs.js!./assets/jsx/workflow-editor/css/notices.css"
/*!******************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js!./assets/jsx/workflow-editor/css/notices.css ***!
  \******************************************************************************************/
(module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ "./node_modules/css-loader/dist/runtime/sourceMaps.js");
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
// Imports


var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
// Module
___CSS_LOADER_EXPORT___.push([module.id, `.workflow-editor-notices__snackbar-list {
    position: fixed;
    bottom: 35px;
    left: 220px;
}

.folded .workflow-editor-notices__snackbar-list {
    left: 92px;
}

.is-fullscreen-mode .workflow-editor-notices__snackbar-list {
    left: 60px;
}
`, "",{"version":3,"sources":["webpack://./assets/jsx/workflow-editor/css/notices.css"],"names":[],"mappings":"AAAA;IACI,eAAe;IACf,YAAY;IACZ,WAAW;AACf;;AAEA;IACI,UAAU;AACd;;AAEA;IACI,UAAU;AACd","sourcesContent":[".workflow-editor-notices__snackbar-list {\n    position: fixed;\n    bottom: 35px;\n    left: 220px;\n}\n\n.folded .workflow-editor-notices__snackbar-list {\n    left: 92px;\n}\n\n.is-fullscreen-mode .workflow-editor-notices__snackbar-list {\n    left: 60px;\n}\n"],"sourceRoot":""}]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);


/***/ },

/***/ "./node_modules/css-loader/dist/cjs.js!./assets/jsx/workflow-editor/css/pro-features.css"
/*!***********************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js!./assets/jsx/workflow-editor/css/pro-features.css ***!
  \***********************************************************************************************/
(module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ "./node_modules/css-loader/dist/runtime/sourceMaps.js");
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
// Imports


var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
// Module
___CSS_LOADER_EXPORT___.push([module.id, `.block-editor-block-types-list__item-pro-badge {
    background-color: #ffb200;
    color: #000;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    width: 100%;
}
.workflow-editor-inspector-card__pro-badge,
.block-editor-block-card__pro-badge {
    background-color: #ffb200;
    color: #000;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
}

.workflow-editor-inspector-card__pro-badge,
.components-popover__content .block-editor-block-card__pro-badge {
    margin-left: 8px;
}

.workflow-editor-inspector-card__pro-instructions,
.block-editor-block-card__pro-instructions {
    font-size: 12px;
    color: #757575;
    margin-top: 8px;
    line-height: 1.5;
    font-style: italic;
    font-weight: 400;
    border-top: 1px solid #e0e0e0;
    padding-top: 8px;
}

.edit-post-header-toolbar__buy-pro {
    background-color: #ffb200;
    color: #000;
    padding: 4px 10px !important;
    border-radius: 4px;
}

.edit-post-header-toolbar__buy-pro .publishpress-icon {
    width: 18px !important;
    height: 18px !important;
    margin-right: 4px;
}
`, "",{"version":3,"sources":["webpack://./assets/jsx/workflow-editor/css/pro-features.css"],"names":[],"mappings":"AAAA;IACI,yBAAyB;IACzB,WAAW;IACX,gBAAgB;IAChB,kBAAkB;IAClB,eAAe;IACf,gBAAgB;IAChB,WAAW;AACf;AACA;;IAEI,yBAAyB;IACzB,WAAW;IACX,gBAAgB;IAChB,kBAAkB;IAClB,eAAe;IACf,gBAAgB;AACpB;;AAEA;;IAEI,gBAAgB;AACpB;;AAEA;;IAEI,eAAe;IACf,cAAc;IACd,eAAe;IACf,gBAAgB;IAChB,kBAAkB;IAClB,gBAAgB;IAChB,6BAA6B;IAC7B,gBAAgB;AACpB;;AAEA;IACI,yBAAyB;IACzB,WAAW;IACX,4BAA4B;IAC5B,kBAAkB;AACtB;;AAEA;IACI,sBAAsB;IACtB,uBAAuB;IACvB,iBAAiB;AACrB","sourcesContent":[".block-editor-block-types-list__item-pro-badge {\n    background-color: #ffb200;\n    color: #000;\n    padding: 3px 8px;\n    border-radius: 4px;\n    font-size: 10px;\n    font-weight: 600;\n    width: 100%;\n}\n.workflow-editor-inspector-card__pro-badge,\n.block-editor-block-card__pro-badge {\n    background-color: #ffb200;\n    color: #000;\n    padding: 3px 8px;\n    border-radius: 4px;\n    font-size: 10px;\n    font-weight: 600;\n}\n\n.workflow-editor-inspector-card__pro-badge,\n.components-popover__content .block-editor-block-card__pro-badge {\n    margin-left: 8px;\n}\n\n.workflow-editor-inspector-card__pro-instructions,\n.block-editor-block-card__pro-instructions {\n    font-size: 12px;\n    color: #757575;\n    margin-top: 8px;\n    line-height: 1.5;\n    font-style: italic;\n    font-weight: 400;\n    border-top: 1px solid #e0e0e0;\n    padding-top: 8px;\n}\n\n.edit-post-header-toolbar__buy-pro {\n    background-color: #ffb200;\n    color: #000;\n    padding: 4px 10px !important;\n    border-radius: 4px;\n}\n\n.edit-post-header-toolbar__buy-pro .publishpress-icon {\n    width: 18px !important;\n    height: 18px !important;\n    margin-right: 4px;\n}\n"],"sourceRoot":""}]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);


/***/ },

/***/ "./node_modules/css-loader/dist/cjs.js!./assets/jsx/workflow-editor/css/toolbar.css"
/*!******************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js!./assets/jsx/workflow-editor/css/toolbar.css ***!
  \******************************************************************************************/
(module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ "./node_modules/css-loader/dist/runtime/sourceMaps.js");
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
// Imports


var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
// Module
___CSS_LOADER_EXPORT___.push([module.id, `/* .react-flow__node-toolbar {
    position: absolute;
    top: -40px;
    left: 0;
}

.react-flow__node-toolbar .components-toolbar {
    height: 30px !important;
    min-height: 20px;
}

.react-flow__node-toolbar .components-toolbar > div {
    min-width: 30px;
}

.react-flow__node-toolbar button.components-button.components-toolbar__control.has-icon {
    min-width: 30px !important;
    height: 30px !important;
} */
`, "",{"version":3,"sources":["webpack://./assets/jsx/workflow-editor/css/toolbar.css"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG","sourcesContent":["/* .react-flow__node-toolbar {\n    position: absolute;\n    top: -40px;\n    left: 0;\n}\n\n.react-flow__node-toolbar .components-toolbar {\n    height: 30px !important;\n    min-height: 20px;\n}\n\n.react-flow__node-toolbar .components-toolbar > div {\n    min-width: 30px;\n}\n\n.react-flow__node-toolbar button.components-button.components-toolbar__control.has-icon {\n    min-width: 30px !important;\n    height: 30px !important;\n} */\n"],"sourceRoot":""}]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);


/***/ },

/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js!./assets/jsx/components/css/dateOffsetPreview.css"
/*!*****************************************************************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js!./assets/jsx/components/css/dateOffsetPreview.css ***!
  \*****************************************************************************************************************************************/
(module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ "./node_modules/css-loader/dist/runtime/sourceMaps.js");
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
// Imports


var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
// Module
___CSS_LOADER_EXPORT___.push([module.id, `.publishpress-future-date-preview .publishpress-future-date-preview-value {
    font-family: monospace;
    background-color: #e7e7e7;
    padding: 4px 6px;
    display: inline-block;
    min-width: 140px;
    min-height: 20px;
}

.publishpress-future-date-preview.compact .publishpress-future-date-preview-label {
    display: block;
}

.publishpress-future-date-preview.compact {
    margin-bottom: 8px;
}

.publishpress-future-date-preview.compact h4 {
    font-size: 11px;
    font-weight: 500;
    line-height: 1.4;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: calc(8px);
    padding: 0px;
    flex-shrink: 0;
    margin-right: 12px;
    max-width: 75%;
    margin-top: 0;
}

.publishpress-future-notice.publishpress-future-notice-error {
    color: #dc3232;
}
`, "",{"version":3,"sources":["webpack://./assets/jsx/components/css/dateOffsetPreview.css"],"names":[],"mappings":"AAAA;IACI,sBAAsB;IACtB,yBAAyB;IACzB,gBAAgB;IAChB,qBAAqB;IACrB,gBAAgB;IAChB,gBAAgB;AACpB;;AAEA;IACI,cAAc;AAClB;;AAEA;IACI,kBAAkB;AACtB;;AAEA;IACI,eAAe;IACf,gBAAgB;IAChB,gBAAgB;IAChB,yBAAyB;IACzB,qBAAqB;IACrB,wBAAwB;IACxB,YAAY;IACZ,cAAc;IACd,kBAAkB;IAClB,cAAc;IACd,aAAa;AACjB;;AAEA;IACI,cAAc;AAClB","sourcesContent":[".publishpress-future-date-preview .publishpress-future-date-preview-value {\n    font-family: monospace;\n    background-color: #e7e7e7;\n    padding: 4px 6px;\n    display: inline-block;\n    min-width: 140px;\n    min-height: 20px;\n}\n\n.publishpress-future-date-preview.compact .publishpress-future-date-preview-label {\n    display: block;\n}\n\n.publishpress-future-date-preview.compact {\n    margin-bottom: 8px;\n}\n\n.publishpress-future-date-preview.compact h4 {\n    font-size: 11px;\n    font-weight: 500;\n    line-height: 1.4;\n    text-transform: uppercase;\n    display: inline-block;\n    margin-bottom: calc(8px);\n    padding: 0px;\n    flex-shrink: 0;\n    margin-right: 12px;\n    max-width: 75%;\n    margin-top: 0;\n}\n\n.publishpress-future-notice.publishpress-future-notice-error {\n    color: #dc3232;\n}\n"],"sourceRoot":""}]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);


/***/ },

/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js!./assets/jsx/workflow-editor/components/data-fields/action-args/style.css"
/*!*****************************************************************************************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js!./assets/jsx/workflow-editor/components/data-fields/action-args/style.css ***!
  \*****************************************************************************************************************************************************************/
(module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ "./node_modules/css-loader/dist/runtime/sourceMaps.js");
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
// Imports


var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
// Module
___CSS_LOADER_EXPORT___.push([module.id, `.workflow-editor-panel__row-args-container {
    gap: 0 !important;
}

.workflow-editor-panel__row-args {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 8px;
}

.workflow-editor-panel__row-args .workflow-editor-panel__row-label {
    width: 8px;
}

.workflow-editor-panel__row-args-empty {
    padding: 8px;
}

.workflow-editor-panel__row-args-label {
    font-size: 11px;
    font-weight: 500;
    line-height: 1.4;
    text-transform: uppercase;
    display: block;
    margin-bottom: 10px;
    padding: 0px;
}
`, "",{"version":3,"sources":["webpack://./assets/jsx/workflow-editor/components/data-fields/action-args/style.css"],"names":[],"mappings":"AAAA;IACI,iBAAiB;AACrB;;AAEA;IACI,aAAa;IACb,mBAAmB;IACnB,mBAAmB;IACnB,8BAA8B;IAC9B,YAAY;AAChB;;AAEA;IACI,UAAU;AACd;;AAEA;IACI,YAAY;AAChB;;AAEA;IACI,eAAe;IACf,gBAAgB;IAChB,gBAAgB;IAChB,yBAAyB;IACzB,cAAc;IACd,mBAAmB;IACnB,YAAY;AAChB","sourcesContent":[".workflow-editor-panel__row-args-container {\n    gap: 0 !important;\n}\n\n.workflow-editor-panel__row-args {\n    display: flex;\n    flex-direction: row;\n    align-items: center;\n    justify-content: space-between;\n    padding: 8px;\n}\n\n.workflow-editor-panel__row-args .workflow-editor-panel__row-label {\n    width: 8px;\n}\n\n.workflow-editor-panel__row-args-empty {\n    padding: 8px;\n}\n\n.workflow-editor-panel__row-args-label {\n    font-size: 11px;\n    font-weight: 500;\n    line-height: 1.4;\n    text-transform: uppercase;\n    display: block;\n    margin-bottom: 10px;\n    padding: 0px;\n}\n"],"sourceRoot":""}]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);


/***/ },

/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js!./assets/jsx/workflow-editor/components/data-fields/conditional/styles/index.css"
/*!************************************************************************************************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js!./assets/jsx/workflow-editor/components/data-fields/conditional/styles/index.css ***!
  \************************************************************************************************************************************************************************/
(module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ "./node_modules/css-loader/dist/runtime/sourceMaps.js");
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
// Imports


var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
// Module
___CSS_LOADER_EXPORT___.push([module.id, `.conditional-editor-modal .expression-builder-button {
    padding-left: 5px;
    padding-bottom: 4px;
}

.conditional-editor-modal-duplicate-rule,
.conditional-editor-modal-remove-element {
    width: 40px !important;
    height: 40px !important;
}

.conditional-editor-modal-operator-selector {
    height: 41px !important;
    min-height: 40px;
    margin-top: 7px;
}
`, "",{"version":3,"sources":["webpack://./assets/jsx/workflow-editor/components/data-fields/conditional/styles/index.css"],"names":[],"mappings":"AAAA;IACI,iBAAiB;IACjB,mBAAmB;AACvB;;AAEA;;IAEI,sBAAsB;IACtB,uBAAuB;AAC3B;;AAEA;IACI,uBAAuB;IACvB,gBAAgB;IAChB,eAAe;AACnB","sourcesContent":[".conditional-editor-modal .expression-builder-button {\n    padding-left: 5px;\n    padding-bottom: 4px;\n}\n\n.conditional-editor-modal-duplicate-rule,\n.conditional-editor-modal-remove-element {\n    width: 40px !important;\n    height: 40px !important;\n}\n\n.conditional-editor-modal-operator-selector {\n    height: 41px !important;\n    min-height: 40px;\n    margin-top: 7px;\n}\n"],"sourceRoot":""}]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);


/***/ },

/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js!./assets/jsx/workflow-editor/components/data-fields/custom-options/style.css"
/*!********************************************************************************************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js!./assets/jsx/workflow-editor/components/data-fields/custom-options/style.css ***!
  \********************************************************************************************************************************************************************/
(module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ "./node_modules/css-loader/dist/runtime/sourceMaps.js");
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
// Imports


var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
// Module
___CSS_LOADER_EXPORT___.push([module.id, `.workflow-editor-panel__row-options-container {
    gap: 0 !important;
}

.workflow-editor-panel__row-options {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 8px;
}

.workflow-editor-panel__row-options .workflow-editor-panel__row-label {
    width: 8px;
}

.workflow-editor-panel__row-options-empty {
    padding: 8px;
}

.workflow-editor-panel__row-options-label {
    font-size: 11px;
    font-weight: 500;
    line-height: 1.4;
    text-transform: uppercase;
    display: block;
    margin-bottom: 10px;
    padding: 0px;
}
`, "",{"version":3,"sources":["webpack://./assets/jsx/workflow-editor/components/data-fields/custom-options/style.css"],"names":[],"mappings":"AAAA;IACI,iBAAiB;AACrB;;AAEA;IACI,aAAa;IACb,mBAAmB;IACnB,mBAAmB;IACnB,8BAA8B;IAC9B,YAAY;AAChB;;AAEA;IACI,UAAU;AACd;;AAEA;IACI,YAAY;AAChB;;AAEA;IACI,eAAe;IACf,gBAAgB;IAChB,gBAAgB;IAChB,yBAAyB;IACzB,cAAc;IACd,mBAAmB;IACnB,YAAY;AAChB","sourcesContent":[".workflow-editor-panel__row-options-container {\n    gap: 0 !important;\n}\n\n.workflow-editor-panel__row-options {\n    display: flex;\n    flex-direction: row;\n    align-items: center;\n    justify-content: space-between;\n    padding: 8px;\n}\n\n.workflow-editor-panel__row-options .workflow-editor-panel__row-label {\n    width: 8px;\n}\n\n.workflow-editor-panel__row-options-empty {\n    padding: 8px;\n}\n\n.workflow-editor-panel__row-options-label {\n    font-size: 11px;\n    font-weight: 500;\n    line-height: 1.4;\n    text-transform: uppercase;\n    display: block;\n    margin-bottom: 10px;\n    padding: 0px;\n}\n"],"sourceRoot":""}]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);


/***/ },

/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js!./assets/jsx/workflow-editor/components/data-fields/expression-builder/style.css"
/*!************************************************************************************************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js!./assets/jsx/workflow-editor/components/data-fields/expression-builder/style.css ***!
  \************************************************************************************************************************************************************************/
(module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ "./node_modules/css-loader/dist/runtime/sourceMaps.js");
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
// Imports


var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
// Module
___CSS_LOADER_EXPORT___.push([module.id, `.columns-container {
    display: flex;
    flex-direction: row;
    border: 1px solid #ccc;
    overflow-x: auto;
    white-space: nowrap;
    max-height: 212px;
    overflow-y: hidden;
    overflow-x: scroll;
}

.column {
    display: flex;
    flex-direction: column;
    min-width: 150px;
    flex: 0 0 auto;
    border-right: 1px solid #ccc;
    overflow-y: scroll;
    max-height: 212px;
}

.column-item {
    cursor: pointer;
    padding: 2px 6px;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    padding-right: 20px;
}

.column-item.has-children::after {
    content: '▶';
    display: inline-block;
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    color: #ccc;
}

.column-item:hover {
    background: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
    color: var(--wp-components-color-accent-inverted, #fff);
    opacity: 0.4;
}

.selected {
    background: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
    color: var(--wp-components-color-accent-inverted, #fff);
}

.column-item.has-children.selected::after {
    color: var(--wp-components-color-accent-inverted, #fff);
}

.column-item.selected:hover {
    background: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
    color: var(--wp-components-color-accent-inverted, #fff);
    opacity: 0.8;
}

#expression-editor-full {
    border: 1px solid #ccc;
    margin-bottom: 10px;
    margin-top: 10px;
}

#expression-editor-preview {
    margin-bottom: 10px;
    border: 1px solid #ccc;
}

.ace_editor {
    border: 1px solid #ccc;
    margin-bottom: 10px;
}

.ace_editor.ace_autocomplete {
    z-index: 999999999;
    margin-top: 5px;
    padding-bottom: 5px;
}

.components-modal__screen-overlay {
    z-index: 999999998;
}

.expression-builder {
    position: relative;
    width: 100%;
}

.expression-builder .expression-builder-button {
    position: absolute;
    top: 0;
    right: 0;
    height: 24px;
    width: auto !important;
    min-width: 24px;
    display: inline-block;
    padding-top: 4px;
    padding-bottom: 23px;
    padding-left: 8px;
    padding-right: 8px;
}

.column-item-form {
    padding: 10px;
    max-width: 202px;
}

.column-item-form p {
    text-wrap: auto;
}

.expression-builder-variable-name {
    margin-left: 5px;
}

.expression-builder-inline {
    padding-top: 0 !important;
}

.expression-builder-inline .ace_editor {
    margin-top: 0 !important;
    margin-right: 40px !important;
    margin-bottom: 0 !important;
    height: 40px !important;
    width: 300px !important;
}

.expression-builder-inline > button {
    top: 0 !important;
    right: 0 !important;
    height: 40px !important;
}

.ace_editor.settings-panel {
    width: 246px !important;
    height: 180px !important;
    margin-top: 10px !important;
}

.ace_editor.read-only-editor {
    background-color: #f3f3f3 !important;
}

.ace_content {
    top: 5px;
}

#expression-builder-full .ace_content {
    top: 0 !important;
}

.expression-builder .description {
    margin-top: 10px !important;
}

.expression-builder-modal .description:last-of-type {
    min-height: 40px !important;
    margin-top: 10px !important;
}

.expression-builder-modal-variables .description code {
    color: #00458b;
    margin-left: 0;
    padding: 5px;
    font-size: 12px;
}

.expression-builder .expression-builder-small-heading {
    font-size: 11px;
    font-weight: 500;
    line-height: 1.4;
    text-transform: uppercase;
    box-sizing: border-box;
    display: block;
    padding-top: 0px;
    padding-bottom: 0px;
    max-width: 100%;
    z-index: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: rgb(30, 30, 30);
    margin-bottom: 15px;
}

.expression-builder-modal-variables .column-item-step-slug {
    color: #a3a3a3;
}
`, "",{"version":3,"sources":["webpack://./assets/jsx/workflow-editor/components/data-fields/expression-builder/style.css"],"names":[],"mappings":"AAAA;IACI,aAAa;IACb,mBAAmB;IACnB,sBAAsB;IACtB,gBAAgB;IAChB,mBAAmB;IACnB,iBAAiB;IACjB,kBAAkB;IAClB,kBAAkB;AACtB;;AAEA;IACI,aAAa;IACb,sBAAsB;IACtB,gBAAgB;IAChB,cAAc;IACd,4BAA4B;IAC5B,kBAAkB;IAClB,iBAAiB;AACrB;;AAEA;IACI,eAAe;IACf,gBAAgB;IAChB,kBAAkB;IAClB,iBAAiB;IACjB,yBAAyB;IACzB,sBAAsB;IACtB,qBAAqB;IACrB,mBAAmB;AACvB;;AAEA;IACI,YAAY;IACZ,qBAAqB;IACrB,kBAAkB;IAClB,UAAU;IACV,QAAQ;IACR,2BAA2B;IAC3B,WAAW;AACf;;AAEA;IACI,mFAAmF;IACnF,uDAAuD;IACvD,YAAY;AAChB;;AAEA;IACI,mFAAmF;IACnF,uDAAuD;AAC3D;;AAEA;IACI,uDAAuD;AAC3D;;AAEA;IACI,mFAAmF;IACnF,uDAAuD;IACvD,YAAY;AAChB;;AAEA;IACI,sBAAsB;IACtB,mBAAmB;IACnB,gBAAgB;AACpB;;AAEA;IACI,mBAAmB;IACnB,sBAAsB;AAC1B;;AAEA;IACI,sBAAsB;IACtB,mBAAmB;AACvB;;AAEA;IACI,kBAAkB;IAClB,eAAe;IACf,mBAAmB;AACvB;;AAEA;IACI,kBAAkB;AACtB;;AAEA;IACI,kBAAkB;IAClB,WAAW;AACf;;AAEA;IACI,kBAAkB;IAClB,MAAM;IACN,QAAQ;IACR,YAAY;IACZ,sBAAsB;IACtB,eAAe;IACf,qBAAqB;IACrB,gBAAgB;IAChB,oBAAoB;IACpB,iBAAiB;IACjB,kBAAkB;AACtB;;AAEA;IACI,aAAa;IACb,gBAAgB;AACpB;;AAEA;IACI,eAAe;AACnB;;AAEA;IACI,gBAAgB;AACpB;;AAEA;IACI,yBAAyB;AAC7B;;AAEA;IACI,wBAAwB;IACxB,6BAA6B;IAC7B,2BAA2B;IAC3B,uBAAuB;IACvB,uBAAuB;AAC3B;;AAEA;IACI,iBAAiB;IACjB,mBAAmB;IACnB,uBAAuB;AAC3B;;AAEA;IACI,uBAAuB;IACvB,wBAAwB;IACxB,2BAA2B;AAC/B;;AAEA;IACI,oCAAoC;AACxC;;AAEA;IACI,QAAQ;AACZ;;AAEA;IACI,iBAAiB;AACrB;;AAEA;IACI,2BAA2B;AAC/B;;AAEA;IACI,2BAA2B;IAC3B,2BAA2B;AAC/B;;AAEA;IACI,cAAc;IACd,cAAc;IACd,YAAY;IACZ,eAAe;AACnB;;AAEA;IACI,eAAe;IACf,gBAAgB;IAChB,gBAAgB;IAChB,yBAAyB;IACzB,sBAAsB;IACtB,cAAc;IACd,gBAAgB;IAChB,mBAAmB;IACnB,eAAe;IACf,UAAU;IACV,gBAAgB;IAChB,uBAAuB;IACvB,mBAAmB;IACnB,sBAAsB;IACtB,mBAAmB;AACvB;;AAEA;IACI,cAAc;AAClB","sourcesContent":[".columns-container {\n    display: flex;\n    flex-direction: row;\n    border: 1px solid #ccc;\n    overflow-x: auto;\n    white-space: nowrap;\n    max-height: 212px;\n    overflow-y: hidden;\n    overflow-x: scroll;\n}\n\n.column {\n    display: flex;\n    flex-direction: column;\n    min-width: 150px;\n    flex: 0 0 auto;\n    border-right: 1px solid #ccc;\n    overflow-y: scroll;\n    max-height: 212px;\n}\n\n.column-item {\n    cursor: pointer;\n    padding: 2px 6px;\n    position: relative;\n    user-select: none;\n    -webkit-user-select: none;\n    -moz-user-select: none;\n    -ms-user-select: none;\n    padding-right: 20px;\n}\n\n.column-item.has-children::after {\n    content: '▶';\n    display: inline-block;\n    position: absolute;\n    right: 4px;\n    top: 50%;\n    transform: translateY(-50%);\n    color: #ccc;\n}\n\n.column-item:hover {\n    background: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));\n    color: var(--wp-components-color-accent-inverted, #fff);\n    opacity: 0.4;\n}\n\n.selected {\n    background: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));\n    color: var(--wp-components-color-accent-inverted, #fff);\n}\n\n.column-item.has-children.selected::after {\n    color: var(--wp-components-color-accent-inverted, #fff);\n}\n\n.column-item.selected:hover {\n    background: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));\n    color: var(--wp-components-color-accent-inverted, #fff);\n    opacity: 0.8;\n}\n\n#expression-editor-full {\n    border: 1px solid #ccc;\n    margin-bottom: 10px;\n    margin-top: 10px;\n}\n\n#expression-editor-preview {\n    margin-bottom: 10px;\n    border: 1px solid #ccc;\n}\n\n.ace_editor {\n    border: 1px solid #ccc;\n    margin-bottom: 10px;\n}\n\n.ace_editor.ace_autocomplete {\n    z-index: 999999999;\n    margin-top: 5px;\n    padding-bottom: 5px;\n}\n\n.components-modal__screen-overlay {\n    z-index: 999999998;\n}\n\n.expression-builder {\n    position: relative;\n    width: 100%;\n}\n\n.expression-builder .expression-builder-button {\n    position: absolute;\n    top: 0;\n    right: 0;\n    height: 24px;\n    width: auto !important;\n    min-width: 24px;\n    display: inline-block;\n    padding-top: 4px;\n    padding-bottom: 23px;\n    padding-left: 8px;\n    padding-right: 8px;\n}\n\n.column-item-form {\n    padding: 10px;\n    max-width: 202px;\n}\n\n.column-item-form p {\n    text-wrap: auto;\n}\n\n.expression-builder-variable-name {\n    margin-left: 5px;\n}\n\n.expression-builder-inline {\n    padding-top: 0 !important;\n}\n\n.expression-builder-inline .ace_editor {\n    margin-top: 0 !important;\n    margin-right: 40px !important;\n    margin-bottom: 0 !important;\n    height: 40px !important;\n    width: 300px !important;\n}\n\n.expression-builder-inline > button {\n    top: 0 !important;\n    right: 0 !important;\n    height: 40px !important;\n}\n\n.ace_editor.settings-panel {\n    width: 246px !important;\n    height: 180px !important;\n    margin-top: 10px !important;\n}\n\n.ace_editor.read-only-editor {\n    background-color: #f3f3f3 !important;\n}\n\n.ace_content {\n    top: 5px;\n}\n\n#expression-builder-full .ace_content {\n    top: 0 !important;\n}\n\n.expression-builder .description {\n    margin-top: 10px !important;\n}\n\n.expression-builder-modal .description:last-of-type {\n    min-height: 40px !important;\n    margin-top: 10px !important;\n}\n\n.expression-builder-modal-variables .description code {\n    color: #00458b;\n    margin-left: 0;\n    padding: 5px;\n    font-size: 12px;\n}\n\n.expression-builder .expression-builder-small-heading {\n    font-size: 11px;\n    font-weight: 500;\n    line-height: 1.4;\n    text-transform: uppercase;\n    box-sizing: border-box;\n    display: block;\n    padding-top: 0px;\n    padding-bottom: 0px;\n    max-width: 100%;\n    z-index: 1;\n    overflow: hidden;\n    text-overflow: ellipsis;\n    white-space: nowrap;\n    color: rgb(30, 30, 30);\n    margin-bottom: 15px;\n}\n\n.expression-builder-modal-variables .column-item-step-slug {\n    color: #a3a3a3;\n}\n"],"sourceRoot":""}]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);


/***/ },

/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js!./assets/jsx/workflow-editor/components/node-validation-panel/style.css"
/*!***************************************************************************************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js!./assets/jsx/workflow-editor/components/node-validation-panel/style.css ***!
  \***************************************************************************************************************************************************************/
(module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ "./node_modules/css-loader/dist/runtime/sourceMaps.js");
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
// Imports


var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
// Module
___CSS_LOADER_EXPORT___.push([module.id, `.workflow-editor-validation-notification-header {
    position: relative;
}

.workflow-editor-validation-notification-details-toggle {
    cursor: pointer;
    position: absolute;
    right: -5px;
    top: 0;
}

.workflow-editor-validation-notification-details {
    margin-top: 10px;
    margin-left: 20px;
    color: #555555;
}

.workflow-editor-validation-notification-message {
    padding-right: 17px;
}
`, "",{"version":3,"sources":["webpack://./assets/jsx/workflow-editor/components/node-validation-panel/style.css"],"names":[],"mappings":"AAAA;IACI,kBAAkB;AACtB;;AAEA;IACI,eAAe;IACf,kBAAkB;IAClB,WAAW;IACX,MAAM;AACV;;AAEA;IACI,gBAAgB;IAChB,iBAAiB;IACjB,cAAc;AAClB;;AAEA;IACI,mBAAmB;AACvB","sourcesContent":[".workflow-editor-validation-notification-header {\n    position: relative;\n}\n\n.workflow-editor-validation-notification-details-toggle {\n    cursor: pointer;\n    position: absolute;\n    right: -5px;\n    top: 0;\n}\n\n.workflow-editor-validation-notification-details {\n    margin-top: 10px;\n    margin-left: 20px;\n    color: #555555;\n}\n\n.workflow-editor-validation-notification-message {\n    padding-right: 17px;\n}\n"],"sourceRoot":""}]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);


/***/ },

/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js!./assets/jsx/workflow-editor/css/index.css"
/*!**********************************************************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js!./assets/jsx/workflow-editor/css/index.css ***!
  \**********************************************************************************************************************************/
(module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ "./node_modules/css-loader/dist/runtime/sourceMaps.js");
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_custom_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! -!../../../../node_modules/css-loader/dist/cjs.js!./custom.css */ "./node_modules/css-loader/dist/cjs.js!./assets/jsx/workflow-editor/css/custom.css");
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_block_types_list_css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! -!../../../../node_modules/css-loader/dist/cjs.js!./block-types-list.css */ "./node_modules/css-loader/dist/cjs.js!./assets/jsx/workflow-editor/css/block-types-list.css");
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_inserter_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! -!../../../../node_modules/css-loader/dist/cjs.js!./inserter.css */ "./node_modules/css-loader/dist/cjs.js!./assets/jsx/workflow-editor/css/inserter.css");
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_inspector_css__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! -!../../../../node_modules/css-loader/dist/cjs.js!./inspector.css */ "./node_modules/css-loader/dist/cjs.js!./assets/jsx/workflow-editor/css/inspector.css");
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_types_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! -!../../../../node_modules/css-loader/dist/cjs.js!./node-types.css */ "./node_modules/css-loader/dist/cjs.js!./assets/jsx/workflow-editor/css/node-types.css");
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_dev_css__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! -!../../../../node_modules/css-loader/dist/cjs.js!./dev.css */ "./node_modules/css-loader/dist/cjs.js!./assets/jsx/workflow-editor/css/dev.css");
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_guide_css__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! -!../../../../node_modules/css-loader/dist/cjs.js!./guide.css */ "./node_modules/css-loader/dist/cjs.js!./assets/jsx/workflow-editor/css/guide.css");
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_toolbar_css__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! -!../../../../node_modules/css-loader/dist/cjs.js!./toolbar.css */ "./node_modules/css-loader/dist/cjs.js!./assets/jsx/workflow-editor/css/toolbar.css");
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_notices_css__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! -!../../../../node_modules/css-loader/dist/cjs.js!./notices.css */ "./node_modules/css-loader/dist/cjs.js!./assets/jsx/workflow-editor/css/notices.css");
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_pro_features_css__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! -!../../../../node_modules/css-loader/dist/cjs.js!./pro-features.css */ "./node_modules/css-loader/dist/cjs.js!./assets/jsx/workflow-editor/css/pro-features.css");
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_conditionals_css__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! -!../../../../node_modules/css-loader/dist/cjs.js!./conditionals.css */ "./node_modules/css-loader/dist/cjs.js!./assets/jsx/workflow-editor/css/conditionals.css");
// Imports













var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
___CSS_LOADER_EXPORT___.i(_node_modules_css_loader_dist_cjs_js_custom_css__WEBPACK_IMPORTED_MODULE_2__["default"]);
___CSS_LOADER_EXPORT___.i(_node_modules_css_loader_dist_cjs_js_block_types_list_css__WEBPACK_IMPORTED_MODULE_3__["default"]);
___CSS_LOADER_EXPORT___.i(_node_modules_css_loader_dist_cjs_js_inserter_css__WEBPACK_IMPORTED_MODULE_4__["default"]);
___CSS_LOADER_EXPORT___.i(_node_modules_css_loader_dist_cjs_js_inspector_css__WEBPACK_IMPORTED_MODULE_5__["default"]);
___CSS_LOADER_EXPORT___.i(_node_modules_css_loader_dist_cjs_js_node_types_css__WEBPACK_IMPORTED_MODULE_6__["default"]);
___CSS_LOADER_EXPORT___.i(_node_modules_css_loader_dist_cjs_js_dev_css__WEBPACK_IMPORTED_MODULE_7__["default"]);
___CSS_LOADER_EXPORT___.i(_node_modules_css_loader_dist_cjs_js_guide_css__WEBPACK_IMPORTED_MODULE_8__["default"]);
___CSS_LOADER_EXPORT___.i(_node_modules_css_loader_dist_cjs_js_toolbar_css__WEBPACK_IMPORTED_MODULE_9__["default"]);
___CSS_LOADER_EXPORT___.i(_node_modules_css_loader_dist_cjs_js_notices_css__WEBPACK_IMPORTED_MODULE_10__["default"]);
___CSS_LOADER_EXPORT___.i(_node_modules_css_loader_dist_cjs_js_pro_features_css__WEBPACK_IMPORTED_MODULE_11__["default"]);
___CSS_LOADER_EXPORT___.i(_node_modules_css_loader_dist_cjs_js_conditionals_css__WEBPACK_IMPORTED_MODULE_12__["default"]);
// Module
___CSS_LOADER_EXPORT___.push([module.id, `.reactflow-wrapper {
    height: 100%;
}

.components-notice {
    padding: 0 12px;
}

.components-notice-list .components-notice__dismiss {
    margin-top: 12px;
}
`, "",{"version":3,"sources":["webpack://./assets/jsx/workflow-editor/css/index.css"],"names":[],"mappings":"AAYA;IACI,YAAY;AAChB;;AAEA;IACI,eAAe;AACnB;;AAEA;IACI,gBAAgB;AACpB","sourcesContent":["@import url('custom.css');\n@import url('block-types-list.css');\n@import url('inserter.css');\n@import url('inspector.css');\n@import url('node-types.css');\n@import url('dev.css');\n@import url('guide.css');\n@import url('toolbar.css');\n@import url('notices.css');\n@import url('pro-features.css');\n@import url('conditionals.css');\n\n.reactflow-wrapper {\n    height: 100%;\n}\n\n.components-notice {\n    padding: 0 12px;\n}\n\n.components-notice-list .components-notice__dismiss {\n    margin-top: 12px;\n}\n"],"sourceRoot":""}]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);


/***/ },

/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js!./assets/jsx/workflow-editor/css/query-builder.css"
/*!******************************************************************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js!./assets/jsx/workflow-editor/css/query-builder.css ***!
  \******************************************************************************************************************************************/
(module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ "./node_modules/css-loader/dist/runtime/sourceMaps.js");
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
// Imports


var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
// Module
___CSS_LOADER_EXPORT___.push([module.id, `.components-checkbox-control.is-checked .components-checkbox-control__label {
    font-weight: bold;
}

.queryBuilder-dragHandle {
    font-size: 18px;
    color: #9a9a9a;
}

.queryBuilder-dragHandle:hover {
    color: #000;
}
`, "",{"version":3,"sources":["webpack://./assets/jsx/workflow-editor/css/query-builder.css"],"names":[],"mappings":"AAAA;IACI,iBAAiB;AACrB;;AAEA;IACI,eAAe;IACf,cAAc;AAClB;;AAEA;IACI,WAAW;AACf","sourcesContent":[".components-checkbox-control.is-checked .components-checkbox-control__label {\n    font-weight: bold;\n}\n\n.queryBuilder-dragHandle {\n    font-size: 18px;\n    color: #9a9a9a;\n}\n\n.queryBuilder-dragHandle:hover {\n    color: #000;\n}\n"],"sourceRoot":""}]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);


/***/ }

}]);
//# sourceMappingURL=assets_jsx_workflow-editor_components_app_jsx.js.map