"use strict";
/*
 * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
 * This devtool is neither made for production nor for readable output files.
 * It uses "eval()" calls to create a separate source file in the browser devtools.
 * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
 * or disable the default devtool with "devtool: false".
 * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
 */
(self["webpackChunkwoocommerce_rtm_custom_emails"] = self["webpackChunkwoocommerce_rtm_custom_emails"] || []).push([["defaultVendors-1011~1013-fb3bde2e133ff1f9131633ec2950cab6-SchemaField.js"],{

/***/ 35969:
/*!**********************************************************************!*\
  !*** ./node_modules/@rjsf/core/lib/components/fields/SchemaField.js ***!
  \**********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! tslib */ 70655);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ 85893);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 99196);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _rjsf_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @rjsf/utils */ 64192);\n/* harmony import */ var lodash_isObject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash/isObject */ 13218);\n/* harmony import */ var lodash_isObject__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_isObject__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var lodash_omit__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash/omit */ 57557);\n/* harmony import */ var lodash_omit__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash_omit__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var markdown_to_jsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! markdown-to-jsx */ 35576);\n\n\n\n\n\n\n\n/** The map of component type to FieldName */\nconst COMPONENT_TYPES = {\n    array: 'ArrayField',\n    boolean: 'BooleanField',\n    integer: 'NumberField',\n    number: 'NumberField',\n    object: 'ObjectField',\n    string: 'StringField',\n    null: 'NullField',\n};\n/** Computes and returns which `Field` implementation to return in order to render the field represented by the\n * `schema`. The `uiOptions` are used to alter what potential `Field` implementation is actually returned. If no\n * appropriate `Field` implementation can be found then a wrapper around `UnsupportedFieldTemplate` is used.\n *\n * @param schema - The schema from which to obtain the type\n * @param uiOptions - The UI Options that may affect the component decision\n * @param idSchema - The id that is passed to the `UnsupportedFieldTemplate`\n * @param registry - The registry from which fields and templates are obtained\n * @returns - The `Field` component that is used to render the actual field data\n */\nfunction getFieldComponent(schema, uiOptions, idSchema, registry) {\n    const field = uiOptions.field;\n    const { fields, translateString } = registry;\n    if (typeof field === 'function') {\n        return field;\n    }\n    if (typeof field === 'string' && field in fields) {\n        return fields[field];\n    }\n    const schemaType = (0,_rjsf_utils__WEBPACK_IMPORTED_MODULE_2__.getSchemaType)(schema);\n    const type = Array.isArray(schemaType) ? schemaType[0] : schemaType || '';\n    const schemaId = schema.$id;\n    let componentName = COMPONENT_TYPES[type];\n    if (schemaId && schemaId in fields) {\n        componentName = schemaId;\n    }\n    // If the type is not defined and the schema uses 'anyOf' or 'oneOf', don't\n    // render a field and let the MultiSchemaField component handle the form display\n    if (!componentName && (schema.anyOf || schema.oneOf)) {\n        return () => null;\n    }\n    return componentName in fields\n        ? fields[componentName]\n        : () => {\n            const UnsupportedFieldTemplate = (0,_rjsf_utils__WEBPACK_IMPORTED_MODULE_2__.getTemplate)('UnsupportedFieldTemplate', registry, uiOptions);\n            return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(UnsupportedFieldTemplate, { schema: schema, idSchema: idSchema, reason: translateString(_rjsf_utils__WEBPACK_IMPORTED_MODULE_2__.TranslatableString.UnknownFieldType, [String(schema.type)]), registry: registry }));\n        };\n}\n/** The `SchemaFieldRender` component is the work-horse of react-jsonschema-form, determining what kind of real field to\n * render based on the `schema`, `uiSchema` and all the other props. It also deals with rendering the `anyOf` and\n * `oneOf` fields.\n *\n * @param props - The `FieldProps` for this component\n */\nfunction SchemaFieldRender(props) {\n    const { schema: _schema, idSchema: _idSchema, uiSchema, formData, errorSchema, idPrefix, idSeparator, name, onChange, onKeyChange, onDropPropertyClick, required, registry, wasPropertyKeyModified = false, } = props;\n    const { formContext, schemaUtils, globalUiOptions } = registry;\n    const uiOptions = (0,_rjsf_utils__WEBPACK_IMPORTED_MODULE_2__.getUiOptions)(uiSchema, globalUiOptions);\n    const FieldTemplate = (0,_rjsf_utils__WEBPACK_IMPORTED_MODULE_2__.getTemplate)('FieldTemplate', registry, uiOptions);\n    const DescriptionFieldTemplate = (0,_rjsf_utils__WEBPACK_IMPORTED_MODULE_2__.getTemplate)('DescriptionFieldTemplate', registry, uiOptions);\n    const FieldHelpTemplate = (0,_rjsf_utils__WEBPACK_IMPORTED_MODULE_2__.getTemplate)('FieldHelpTemplate', registry, uiOptions);\n    const FieldErrorTemplate = (0,_rjsf_utils__WEBPACK_IMPORTED_MODULE_2__.getTemplate)('FieldErrorTemplate', registry, uiOptions);\n    const schema = schemaUtils.retrieveSchema(_schema, formData);\n    const fieldId = _idSchema[_rjsf_utils__WEBPACK_IMPORTED_MODULE_2__.ID_KEY];\n    const idSchema = (0,_rjsf_utils__WEBPACK_IMPORTED_MODULE_2__.mergeObjects)(schemaUtils.toIdSchema(schema, fieldId, formData, idPrefix, idSeparator), _idSchema);\n    /** Intermediary `onChange` handler for field components that will inject the `id` of the current field into the\n     * `onChange` chain if it is not already being provided from a deeper level in the hierarchy\n     */\n    const handleFieldComponentChange = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)((formData, newErrorSchema, id) => {\n        const theId = id || fieldId;\n        return onChange(formData, newErrorSchema, theId);\n    }, [fieldId, onChange]);\n    const FieldComponent = getFieldComponent(schema, uiOptions, idSchema, registry);\n    const disabled = Boolean(props.disabled || uiOptions.disabled);\n    const readonly = Boolean(props.readonly || uiOptions.readonly || props.schema.readOnly || schema.readOnly);\n    const uiSchemaHideError = uiOptions.hideError;\n    // Set hideError to the value provided in the uiSchema, otherwise stick with the prop to propagate to children\n    const hideError = uiSchemaHideError === undefined ? props.hideError : Boolean(uiSchemaHideError);\n    const autofocus = Boolean(props.autofocus || uiOptions.autofocus);\n    if (Object.keys(schema).length === 0) {\n        return null;\n    }\n    const displayLabel = schemaUtils.getDisplayLabel(schema, uiSchema, globalUiOptions);\n    const _a = errorSchema || {}, { __errors } = _a, fieldErrorSchema = (0,tslib__WEBPACK_IMPORTED_MODULE_6__.__rest)(_a, [\"__errors\"]);\n    // See #439: uiSchema: Don't pass consumed class names or style to child components\n    const fieldUiSchema = lodash_omit__WEBPACK_IMPORTED_MODULE_4___default()(uiSchema, ['ui:classNames', 'classNames', 'ui:style']);\n    if (_rjsf_utils__WEBPACK_IMPORTED_MODULE_2__.UI_OPTIONS_KEY in fieldUiSchema) {\n        fieldUiSchema[_rjsf_utils__WEBPACK_IMPORTED_MODULE_2__.UI_OPTIONS_KEY] = lodash_omit__WEBPACK_IMPORTED_MODULE_4___default()(fieldUiSchema[_rjsf_utils__WEBPACK_IMPORTED_MODULE_2__.UI_OPTIONS_KEY], ['classNames', 'style']);\n    }\n    const field = ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(FieldComponent, Object.assign({}, props, { onChange: handleFieldComponentChange, idSchema: idSchema, schema: schema, uiSchema: fieldUiSchema, disabled: disabled, readonly: readonly, hideError: hideError, autofocus: autofocus, errorSchema: fieldErrorSchema, formContext: formContext, rawErrors: __errors })));\n    const id = idSchema[_rjsf_utils__WEBPACK_IMPORTED_MODULE_2__.ID_KEY];\n    // If this schema has a title defined, but the user has set a new key/label, retain their input.\n    let label;\n    if (wasPropertyKeyModified) {\n        label = name;\n    }\n    else {\n        label = _rjsf_utils__WEBPACK_IMPORTED_MODULE_2__.ADDITIONAL_PROPERTY_FLAG in schema ? name : uiOptions.title || props.schema.title || schema.title || name;\n    }\n    const description = uiOptions.description || props.schema.description || schema.description || '';\n    const richDescription = uiOptions.enableMarkdownInDescription ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(markdown_to_jsx__WEBPACK_IMPORTED_MODULE_5__[\"default\"], { children: description }) : description;\n    const help = uiOptions.help;\n    const hidden = uiOptions.widget === 'hidden';\n    const classNames = ['form-group', 'field', `field-${(0,_rjsf_utils__WEBPACK_IMPORTED_MODULE_2__.getSchemaType)(schema)}`];\n    if (!hideError && __errors && __errors.length > 0) {\n        classNames.push('field-error has-error has-danger');\n    }\n    if (uiSchema === null || uiSchema === void 0 ? void 0 : uiSchema.classNames) {\n        if (true) {\n            console.warn(\"'uiSchema.classNames' is deprecated and may be removed in a major release; Use 'ui:classNames' instead.\");\n        }\n        classNames.push(uiSchema.classNames);\n    }\n    if (uiOptions.classNames) {\n        classNames.push(uiOptions.classNames);\n    }\n    const helpComponent = ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(FieldHelpTemplate, { help: help, idSchema: idSchema, schema: schema, uiSchema: uiSchema, hasErrors: !hideError && __errors && __errors.length > 0, registry: registry }));\n    /*\n     * AnyOf/OneOf errors handled by child schema\n     */\n    const errorsComponent = hideError || schema.anyOf || schema.oneOf ? undefined : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(FieldErrorTemplate, { errors: __errors, errorSchema: errorSchema, idSchema: idSchema, schema: schema, uiSchema: uiSchema, registry: registry }));\n    const fieldProps = {\n        description: ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(DescriptionFieldTemplate, { id: (0,_rjsf_utils__WEBPACK_IMPORTED_MODULE_2__.descriptionId)(id), description: richDescription, schema: schema, uiSchema: uiSchema, registry: registry })),\n        rawDescription: description,\n        help: helpComponent,\n        rawHelp: typeof help === 'string' ? help : undefined,\n        errors: errorsComponent,\n        rawErrors: hideError ? undefined : __errors,\n        id,\n        label,\n        hidden,\n        onChange,\n        onKeyChange,\n        onDropPropertyClick,\n        required,\n        disabled,\n        readonly,\n        hideError,\n        displayLabel,\n        classNames: classNames.join(' ').trim(),\n        style: uiOptions.style,\n        formContext,\n        formData,\n        schema,\n        uiSchema,\n        registry,\n    };\n    const _AnyOfField = registry.fields.AnyOfField;\n    const _OneOfField = registry.fields.OneOfField;\n    const isReplacingAnyOrOneOf = (uiSchema === null || uiSchema === void 0 ? void 0 : uiSchema['ui:field']) && (uiSchema === null || uiSchema === void 0 ? void 0 : uiSchema['ui:fieldReplacesAnyOrOneOf']) === true;\n    return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(FieldTemplate, Object.assign({}, fieldProps, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { children: [field, schema.anyOf && !isReplacingAnyOrOneOf && !schemaUtils.isSelect(schema) && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_AnyOfField, { name: name, disabled: disabled, readonly: readonly, hideError: hideError, errorSchema: errorSchema, formData: formData, formContext: formContext, idPrefix: idPrefix, idSchema: idSchema, idSeparator: idSeparator, onBlur: props.onBlur, onChange: props.onChange, onFocus: props.onFocus, options: schema.anyOf.map((_schema) => schemaUtils.retrieveSchema(lodash_isObject__WEBPACK_IMPORTED_MODULE_3___default()(_schema) ? _schema : {}, formData)), registry: registry, schema: schema, uiSchema: uiSchema })), schema.oneOf && !isReplacingAnyOrOneOf && !schemaUtils.isSelect(schema) && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_OneOfField, { name: name, disabled: disabled, readonly: readonly, hideError: hideError, errorSchema: errorSchema, formData: formData, formContext: formContext, idPrefix: idPrefix, idSchema: idSchema, idSeparator: idSeparator, onBlur: props.onBlur, onChange: props.onChange, onFocus: props.onFocus, options: schema.oneOf.map((_schema) => schemaUtils.retrieveSchema(lodash_isObject__WEBPACK_IMPORTED_MODULE_3___default()(_schema) ? _schema : {}, formData)), registry: registry, schema: schema, uiSchema: uiSchema }))] }) })));\n}\n/** The `SchemaField` component determines whether it is necessary to rerender the component based on any props changes\n * and if so, calls the `SchemaFieldRender` component with the props.\n */\nclass SchemaField extends react__WEBPACK_IMPORTED_MODULE_1__.Component {\n    shouldComponentUpdate(nextProps) {\n        return !(0,_rjsf_utils__WEBPACK_IMPORTED_MODULE_2__.deepEquals)(this.props, nextProps);\n    }\n    render() {\n        return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(SchemaFieldRender, Object.assign({}, this.props));\n    }\n}\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SchemaField);\n//# sourceMappingURL=SchemaField.js.map\n\n//# sourceURL=webpack://woocommerce-rtm-custom-emails/./node_modules/@rjsf/core/lib/components/fields/SchemaField.js?");

/***/ })

}]);