(() => {
    "use strict";
    var e, t = {
        34770: (e, t, n) => {
            n.r(t)
        }, 88936: (e, t) => {
            Object.defineProperty(t, "__esModule", {value: !0}), t.EndpointsRepository = void 0;
            var n = ["getengines", "saveautomatictranslationsettings"], a = function () {
                function e() {
                }

                return e.define = function (t) {
                    e.endpoints = Object.entries(t.route).filter((function (e) {
                        var t = e[0];
                        return n.includes(t)
                    })).reduce((function (e, t) {
                        var n = t[0], a = t[1];
                        return e[n] = a.url, e
                    }), {})
                }, e.getEndpoints = function () {
                    return e.endpoints
                }, e
            }();
            t.EndpointsRepository = a
        }, 86643: function (e, t, n) {
            var a = this && this.__generator || function (e, t) {
                var n, a, r, i, o = {
                    label: 0, sent: function () {
                        if (1 & r[0]) throw r[1];
                        return r[1]
                    }, trys: [], ops: []
                };
                return i = {
                    next: l(0),
                    throw: l(1),
                    return: l(2)
                }, "function" == typeof Symbol && (i[Symbol.iterator] = function () {
                    return this
                }), i;

                function l(l) {
                    return function (u) {
                        return function (l) {
                            if (n) throw new TypeError("Generator is already executing.");
                            for (; i && (i = 0, l[0] && (o = 0)), o;) try {
                                if (n = 1, a && (r = 2 & l[0] ? a.return : l[0] ? a.throw || ((r = a.return) && r.call(a), 0) : a.next) && !(r = r.call(a, l[1])).done) return r;
                                switch (a = 0, r && (l = [2 & l[0], r.value]), l[0]) {
                                    case 0:
                                    case 1:
                                        r = l;
                                        break;
                                    case 4:
                                        return o.label++, {value: l[1], done: !1};
                                    case 5:
                                        o.label++, a = l[1], l = [0];
                                        continue;
                                    case 7:
                                        l = o.ops.pop(), o.trys.pop();
                                        continue;
                                    default:
                                        if (!((r = (r = o.trys).length > 0 && r[r.length - 1]) || 6 !== l[0] && 2 !== l[0])) {
                                            o = 0;
                                            continue
                                        }
                                        if (3 === l[0] && (!r || l[1] > r[0] && l[1] < r[3])) {
                                            o.label = l[1];
                                            break
                                        }
                                        if (6 === l[0] && o.label < r[1]) {
                                            o.label = r[1], r = l;
                                            break
                                        }
                                        if (r && o.label < r[2]) {
                                            o.label = r[2], o.ops.push(l);
                                            break
                                        }
                                        r[2] && o.ops.pop(), o.trys.pop();
                                        continue
                                }
                                l = t.call(e, o)
                            } catch (e) {
                                l = [6, e], a = 0
                            } finally {
                                n = r = 0
                            }
                            if (5 & l[0]) throw l[1];
                            return {value: l[0] ? l[1] : void 0, done: !0}
                        }([l, u])
                    }
                }
            }, r = this && this.__importDefault || function (e) {
                return e && e.__esModule ? e : {default: e}
            };
            Object.defineProperty(t, "__esModule", {value: !0}), t.useAutomaticTranslationsSelector = t.useAutomaticTranslationsDispatch = t.createStore = void 0;
            var i = r(n(27701)), o = n(28740), l = n(17040), u = n(46440), s = n(89529), c = n(43786), d = n(225),
                f = n(94120), p = n(53980), _ = n(99634), v = n(19971), E = n(81233);
            t.createStore = function (e) {
                var t;
                void 0 === e && (e = {});
                var n = (0, i.default)(), r = (0, o.configureStore)({
                    reducer: (t = {}, t[u.UTILITY_STORE] = (0, _.createUtilitySlice)(e), t[u.TRANSLATION_ENGINE_STORE] = (0, s.createTranslationEngineSlice)(), t[f.PREFERENCES_STORE] = (0, p.createPreferencesSlice)(e), t),
                    middleware: function (e) {
                        return e().concat(n)
                    }
                });
                return n.run((function () {
                    return a(this, (function (e) {
                        switch (e.label) {
                            case 0:
                                return [4, (0, c.all)([(0, c.fork)(d.watchLoadEngines), (0, c.fork)(v.watchSavingSettings), (0, c.fork)(E.watchEditorChanged)])];
                            case 1:
                                return e.sent(), [2]
                        }
                    }))
                })), r
            }, t.useAutomaticTranslationsDispatch = l.useDispatch, t.useAutomaticTranslationsSelector = l.useSelector
        }, 89529: (e, t, n) => {
            Object.defineProperty(t, "__esModule", {value: !0}), t.createTranslationEngineSlice = void 0;
            var a = n(28740), r = n(46440), i = n(50639), o = n(77281), l = n(47397), u = n(37011), s = n(24158),
                c = n(44712), d = n(90689), f = n(65506), p = n(42331), _ = n(89502);
            t.createTranslationEngineSlice = function () {
                var e;
                return (0, a.createSlice)({
                    initialState: {engines: null, isLoading: !1, loadingError: null},
                    name: r.TRANSLATION_ENGINE_STORE,
                    reducers: (e = {}, e[o.SET_ENGINES_LOADING] = function (e) {
                        (0, l.setEnginesLoadingReducer)(e)
                    }, e[i.SET_ENGINES_LOADING_ERROR] = function (e, t) {
                        (0, u.setEnginesLoadingErrorReducer)(e, t.payload)
                    }, e[s.SET_LOADED_ENGINES] = function (e, t) {
                        (0, c.setLoadedEnginesReducer)(e, t.payload)
                    }, e[d.TOGGLE_ENGINE] = function (e, t) {
                        (0, f.toggleEngineReducer)(e, t.payload)
                    }, e[p.UPDATE_FORMALITY_SETTINGS_OF_ENGINE] = function (e, t) {
                        (0, _.updateFormalitySettingsOfEngineReducer)(e, t.payload)
                    }, e)
                }).reducer
            }
        }, 99634: (e, t, n) => {
            Object.defineProperty(t, "__esModule", {value: !0}), t.createUtilitySlice = void 0;
            var a = n(28740), r = n(46440), i = n(57226), o = n(47668), l = n(11786), u = n(3772), s = n(90487),
                c = n(21327), d = n(33618), f = n(50136);
            t.createUtilitySlice = function (e) {
                var t;
                void 0 === e && (e = {});
                var n = {
                    initialState: {
                        reviewMode: e.reviewMode || null,
                        shouldTranslateAutomaticallyDrafts: e.shouldTranslateAutomaticallyDrafts || !1,
                        engines: null
                    }, savingInProgress: !1, savingError: null
                };
                return (0, a.createSlice)({
                    initialState: n,
                    name: r.UTILITY_STORE,
                    reducers: (t = {}, t[i.SET_SAVING_IN_PROGRESS] = function (e, t) {
                        (0, o.setSavingInProgressReducer)(e, t.payload)
                    }, t[l.SET_SAVING_ERROR] = function (e, t) {
                        (0, u.setSavingErrorReducer)(e, t.payload)
                    }, t[s.UPDATE_INITIAL_STATE_AFTER_SAVING] = function (e, t) {
                        (0, c.updateInitialStateAfterSavingReducer)(e, t.payload)
                    }, t[d.INITIALIZE_ENGINES] = function (e, t) {
                        (0, f.initializeEnginesReducer)(e, t.payload)
                    }, t)
                }).reducer
            }
        }, 77281: (e, t, n) => {
            Object.defineProperty(t, "__esModule", {value: !0}), t.setEnginesLoadingAction = t.SET_ENGINES_LOADING_ACTION = t.SET_ENGINES_LOADING = void 0;
            var a = n(46440);
            t.SET_ENGINES_LOADING = "setEnginesLoading", t.SET_ENGINES_LOADING_ACTION = "".concat(a.TRANSLATION_ENGINE_STORE, "/").concat(t.SET_ENGINES_LOADING), t.setEnginesLoadingAction = function () {
                return {type: t.SET_ENGINES_LOADING_ACTION}
            }
        }, 50639: (e, t, n) => {
            Object.defineProperty(t, "__esModule", {value: !0}), t.setEnginesLoadingErrorAction = t.SET_ENGINES_LOADING_ERROR_ACTION = t.SET_ENGINES_LOADING_ERROR = void 0;
            var a = n(46440);
            t.SET_ENGINES_LOADING_ERROR = "setEnginesLoadingError", t.SET_ENGINES_LOADING_ERROR_ACTION = "".concat(a.TRANSLATION_ENGINE_STORE, "/").concat(t.SET_ENGINES_LOADING_ERROR), t.setEnginesLoadingErrorAction = function (e) {
                return {type: t.SET_ENGINES_LOADING_ERROR_ACTION, payload: e}
            }
        }, 24158: (e, t, n) => {
            Object.defineProperty(t, "__esModule", {value: !0}), t.setLoadedEnginesAction = t.SET_LOADED_ENGINES_ACTION = t.SET_LOADED_ENGINES = void 0;
            var a = n(46440);
            t.SET_LOADED_ENGINES = "SET_LOADED_ENGINES", t.SET_LOADED_ENGINES_ACTION = "".concat(a.TRANSLATION_ENGINE_STORE, "/").concat(t.SET_LOADED_ENGINES), t.setLoadedEnginesAction = function (e) {
                return {type: t.SET_LOADED_ENGINES_ACTION, payload: e}
            }
        }, 33618: (e, t, n) => {
            Object.defineProperty(t, "__esModule", {value: !0}), t.initializeEnginesAction = t.INITIALIZE_ENGINES_ACTION = t.INITIALIZE_ENGINES = void 0;
            var a = n(46440);
            t.INITIALIZE_ENGINES = "initializeEngines", t.INITIALIZE_ENGINES_ACTION = "".concat(a.UTILITY_STORE, "/").concat(t.INITIALIZE_ENGINES), t.initializeEnginesAction = function (e) {
                return {type: t.INITIALIZE_ENGINES_ACTION, payload: e}
            }
        }, 90487: (e, t, n) => {
            Object.defineProperty(t, "__esModule", {value: !0}), t.updateInitialStateAfterSavingAction = t.UPDATE_INITIAL_STATE_AFTER_SAVING_ACTION = t.UPDATE_INITIAL_STATE_AFTER_SAVING = void 0;
            var a = n(46440);
            t.UPDATE_INITIAL_STATE_AFTER_SAVING = "updateInitialStateAfterSaving", t.UPDATE_INITIAL_STATE_AFTER_SAVING_ACTION = "".concat(a.UTILITY_STORE, "/").concat(t.UPDATE_INITIAL_STATE_AFTER_SAVING), t.updateInitialStateAfterSavingAction = function (e) {
                return {type: t.UPDATE_INITIAL_STATE_AFTER_SAVING_ACTION, payload: e}
            }
        }, 11786: (e, t, n) => {
            Object.defineProperty(t, "__esModule", {value: !0}), t.setSavingErrorAction = t.SET_SAVING_ERROR_ACTION = t.SET_SAVING_ERROR = void 0;
            var a = n(46440);
            t.SET_SAVING_ERROR = "setSavingError", t.SET_SAVING_ERROR_ACTION = "".concat(a.UTILITY_STORE, "/").concat(t.SET_SAVING_ERROR), t.setSavingErrorAction = function (e) {
                return {type: t.SET_SAVING_ERROR_ACTION, payload: e}
            }
        }, 57226: (e, t, n) => {
            Object.defineProperty(t, "__esModule", {value: !0}), t.setSavingInProgressAction = t.SET_SAVING_IN_PROGRESS_ACTION = t.SET_SAVING_IN_PROGRESS = void 0;
            var a = n(46440);
            t.SET_SAVING_IN_PROGRESS = "setSavingInProgress", t.SET_SAVING_IN_PROGRESS_ACTION = "".concat(a.UTILITY_STORE, "/").concat(t.SET_SAVING_IN_PROGRESS), t.setSavingInProgressAction = function (e) {
                return {type: t.SET_SAVING_IN_PROGRESS_ACTION, payload: e}
            }
        }, 37011: (e, t) => {
            Object.defineProperty(t, "__esModule", {value: !0}), t.setEnginesLoadingErrorReducer = void 0, t.setEnginesLoadingErrorReducer = function (e, t) {
                e.isLoading = !1, e.loadingError = t
            }
        }, 47397: (e, t) => {
            Object.defineProperty(t, "__esModule", {value: !0}), t.setEnginesLoadingReducer = void 0, t.setEnginesLoadingReducer = function (e) {
                e.isLoading = !0
            }
        }, 44712: (e, t) => {
            Object.defineProperty(t, "__esModule", {value: !0}), t.setLoadedEnginesReducer = void 0, t.setLoadedEnginesReducer = function (e, t) {
                e.isLoading = !1, e.loadingError = null, e.engines = t
            }
        }, 65506: (e, t) => {
            Object.defineProperty(t, "__esModule", {value: !0}), t.toggleEngineReducer = void 0, t.toggleEngineReducer = function (e, t) {
                if (e.engines) {
                    var n = e.engines.find((function (e) {
                        return e.engine === t
                    }));
                    n && (n.enabled = !n.enabled)
                }
            }
        }, 89502: (e, t) => {
            Object.defineProperty(t, "__esModule", {value: !0}), t.updateFormalitySettingsOfEngineReducer = void 0, t.updateFormalitySettingsOfEngineReducer = function (e, t) {
                var n, a = t.engineCode, r = t.formalitySettings,
                    i = null === (n = e.engines) || void 0 === n ? void 0 : n.find((function (e) {
                        return e.engine === a
                    }));
                i && (i.formalitySettings = r)
            }
        }, 50136: (e, t) => {
            Object.defineProperty(t, "__esModule", {value: !0}), t.initializeEnginesReducer = void 0, t.initializeEnginesReducer = function (e, t) {
                e.initialState.engines = t
            }
        }, 21327: (e, t) => {
            Object.defineProperty(t, "__esModule", {value: !0}), t.updateInitialStateAfterSavingReducer = void 0, t.updateInitialStateAfterSavingReducer = function (e, t) {
                e.initialState = t
            }
        }, 3772: (e, t) => {
            Object.defineProperty(t, "__esModule", {value: !0}), t.setSavingErrorReducer = void 0, t.setSavingErrorReducer = function (e, t) {
                e.savingError = t
            }
        }, 47668: (e, t) => {
            Object.defineProperty(t, "__esModule", {value: !0}), t.setSavingInProgressReducer = void 0, t.setSavingInProgressReducer = function (e, t) {
                e.savingInProgress = t
            }
        }, 22700: function (e, t, n) {
            var a = this && this.__awaiter || function (e, t, n, a) {
                return new (n || (n = Promise))((function (r, i) {
                    function o(e) {
                        try {
                            u(a.next(e))
                        } catch (e) {
                            i(e)
                        }
                    }

                    function l(e) {
                        try {
                            u(a.throw(e))
                        } catch (e) {
                            i(e)
                        }
                    }

                    function u(e) {
                        var t;
                        e.done ? r(e.value) : (t = e.value, t instanceof n ? t : new n((function (e) {
                            e(t)
                        }))).then(o, l)
                    }

                    u((a = a.apply(e, t || [])).next())
                }))
            }, r = this && this.__generator || function (e, t) {
                var n, a, r, i, o = {
                    label: 0, sent: function () {
                        if (1 & r[0]) throw r[1];
                        return r[1]
                    }, trys: [], ops: []
                };
                return i = {
                    next: l(0),
                    throw: l(1),
                    return: l(2)
                }, "function" == typeof Symbol && (i[Symbol.iterator] = function () {
                    return this
                }), i;

                function l(l) {
                    return function (u) {
                        return function (l) {
                            if (n) throw new TypeError("Generator is already executing.");
                            for (; i && (i = 0, l[0] && (o = 0)), o;) try {
                                if (n = 1, a && (r = 2 & l[0] ? a.return : l[0] ? a.throw || ((r = a.return) && r.call(a), 0) : a.next) && !(r = r.call(a, l[1])).done) return r;
                                switch (a = 0, r && (l = [2 & l[0], r.value]), l[0]) {
                                    case 0:
                                    case 1:
                                        r = l;
                                        break;
                                    case 4:
                                        return o.label++, {value: l[1], done: !1};
                                    case 5:
                                        o.label++, a = l[1], l = [0];
                                        continue;
                                    case 7:
                                        l = o.ops.pop(), o.trys.pop();
                                        continue;
                                    default:
                                        if (!((r = (r = o.trys).length > 0 && r[r.length - 1]) || 6 !== l[0] && 2 !== l[0])) {
                                            o = 0;
                                            continue
                                        }
                                        if (3 === l[0] && (!r || l[1] > r[0] && l[1] < r[3])) {
                                            o.label = l[1];
                                            break
                                        }
                                        if (6 === l[0] && o.label < r[1]) {
                                            o.label = r[1], r = l;
                                            break
                                        }
                                        if (r && o.label < r[2]) {
                                            o.label = r[2], o.ops.push(l);
                                            break
                                        }
                                        r[2] && o.ops.pop(), o.trys.pop();
                                        continue
                                }
                                l = t.call(e, o)
                            } catch (e) {
                                l = [6, e], a = 0
                            } finally {
                                n = r = 0
                            }
                            if (5 & l[0]) throw l[1];
                            return {value: l[0] ? l[1] : void 0, done: !0}
                        }([l, u])
                    }
                }
            }, i = this && this.__importDefault || function (e) {
                return e && e.__esModule ? e : {default: e}
            };
            Object.defineProperty(t, "__esModule", {value: !0}), t.apiGetEngines = void 0;
            var o = i(n(43332)), l = n(42382), u = n(88936);
            t.apiGetEngines = function () {
                return a(void 0, void 0, void 0, (function () {
                    return r(this, (function (e) {
                        return [2, o.default.get(u.EndpointsRepository.getEndpoints().getengines).then((function (e) {
                            if (e.data.status) return e.data.data;
                            throw new Error
                        })).catch((function () {
                            throw new Error((0, l.__)("Could not fetch engines data", "wpml"))
                        }))]
                    }))
                }))
            }
        }, 45329: function (e, t, n) {
            var a = this && this.__awaiter || function (e, t, n, a) {
                return new (n || (n = Promise))((function (r, i) {
                    function o(e) {
                        try {
                            u(a.next(e))
                        } catch (e) {
                            i(e)
                        }
                    }

                    function l(e) {
                        try {
                            u(a.throw(e))
                        } catch (e) {
                            i(e)
                        }
                    }

                    function u(e) {
                        var t;
                        e.done ? r(e.value) : (t = e.value, t instanceof n ? t : new n((function (e) {
                            e(t)
                        }))).then(o, l)
                    }

                    u((a = a.apply(e, t || [])).next())
                }))
            }, r = this && this.__generator || function (e, t) {
                var n, a, r, i, o = {
                    label: 0, sent: function () {
                        if (1 & r[0]) throw r[1];
                        return r[1]
                    }, trys: [], ops: []
                };
                return i = {
                    next: l(0),
                    throw: l(1),
                    return: l(2)
                }, "function" == typeof Symbol && (i[Symbol.iterator] = function () {
                    return this
                }), i;

                function l(l) {
                    return function (u) {
                        return function (l) {
                            if (n) throw new TypeError("Generator is already executing.");
                            for (; i && (i = 0, l[0] && (o = 0)), o;) try {
                                if (n = 1, a && (r = 2 & l[0] ? a.return : l[0] ? a.throw || ((r = a.return) && r.call(a), 0) : a.next) && !(r = r.call(a, l[1])).done) return r;
                                switch (a = 0, r && (l = [2 & l[0], r.value]), l[0]) {
                                    case 0:
                                    case 1:
                                        r = l;
                                        break;
                                    case 4:
                                        return o.label++, {value: l[1], done: !1};
                                    case 5:
                                        o.label++, a = l[1], l = [0];
                                        continue;
                                    case 7:
                                        l = o.ops.pop(), o.trys.pop();
                                        continue;
                                    default:
                                        if (!((r = (r = o.trys).length > 0 && r[r.length - 1]) || 6 !== l[0] && 2 !== l[0])) {
                                            o = 0;
                                            continue
                                        }
                                        if (3 === l[0] && (!r || l[1] > r[0] && l[1] < r[3])) {
                                            o.label = l[1];
                                            break
                                        }
                                        if (6 === l[0] && o.label < r[1]) {
                                            o.label = r[1], r = l;
                                            break
                                        }
                                        if (r && o.label < r[2]) {
                                            o.label = r[2], o.ops.push(l);
                                            break
                                        }
                                        r[2] && o.ops.pop(), o.trys.pop();
                                        continue
                                }
                                l = t.call(e, o)
                            } catch (e) {
                                l = [6, e], a = 0
                            } finally {
                                n = r = 0
                            }
                            if (5 & l[0]) throw l[1];
                            return {value: l[0] ? l[1] : void 0, done: !0}
                        }([l, u])
                    }
                }
            }, i = this && this.__importDefault || function (e) {
                return e && e.__esModule ? e : {default: e}
            };
            Object.defineProperty(t, "__esModule", {value: !0}), t.apiSaveAutomaticTranslationSettings = void 0;
            var o = i(n(43332)), l = n(88936), u = n(42382);
            t.apiSaveAutomaticTranslationSettings = function (e) {
                return a(void 0, void 0, void 0, (function () {
                    return r(this, (function (t) {
                        return [2, o.default.post(l.EndpointsRepository.getEndpoints().saveautomatictranslationsettings, e).then((function (e) {
                            if (e.data.status) return !0;
                            throw new Error
                        })).catch((function () {
                            throw new Error((0, u.__)("Could not save settings", "wpml"))
                        }))]
                    }))
                }))
            }
        }, 81233: function (e, t, n) {
            var a = this && this.__generator || function (e, t) {
                var n, a, r, i, o = {
                    label: 0, sent: function () {
                        if (1 & r[0]) throw r[1];
                        return r[1]
                    }, trys: [], ops: []
                };
                return i = {
                    next: l(0),
                    throw: l(1),
                    return: l(2)
                }, "function" == typeof Symbol && (i[Symbol.iterator] = function () {
                    return this
                }), i;

                function l(l) {
                    return function (u) {
                        return function (l) {
                            if (n) throw new TypeError("Generator is already executing.");
                            for (; i && (i = 0, l[0] && (o = 0)), o;) try {
                                if (n = 1, a && (r = 2 & l[0] ? a.return : l[0] ? a.throw || ((r = a.return) && r.call(a), 0) : a.next) && !(r = r.call(a, l[1])).done) return r;
                                switch (a = 0, r && (l = [2 & l[0], r.value]), l[0]) {
                                    case 0:
                                    case 1:
                                        r = l;
                                        break;
                                    case 4:
                                        return o.label++, {value: l[1], done: !1};
                                    case 5:
                                        o.label++, a = l[1], l = [0];
                                        continue;
                                    case 7:
                                        l = o.ops.pop(), o.trys.pop();
                                        continue;
                                    default:
                                        if (!((r = (r = o.trys).length > 0 && r[r.length - 1]) || 6 !== l[0] && 2 !== l[0])) {
                                            o = 0;
                                            continue
                                        }
                                        if (3 === l[0] && (!r || l[1] > r[0] && l[1] < r[3])) {
                                            o.label = l[1];
                                            break
                                        }
                                        if (6 === l[0] && o.label < r[1]) {
                                            o.label = r[1], r = l;
                                            break
                                        }
                                        if (r && o.label < r[2]) {
                                            o.label = r[2], o.ops.push(l);
                                            break
                                        }
                                        r[2] && o.ops.pop(), o.trys.pop();
                                        continue
                                }
                                l = t.call(e, o)
                            } catch (e) {
                                l = [6, e], a = 0
                            } finally {
                                n = r = 0
                            }
                            if (5 & l[0]) throw l[1];
                            return {value: l[0] ? l[1] : void 0, done: !0}
                        }([l, u])
                    }
                }
            };
            Object.defineProperty(t, "__esModule", {value: !0}), t.watchEditorChanged = void 0;
            var r = n(43786), i = n(78796), o = n(30098), l = n(43171);
            t.watchEditorChanged = function () {
                var e;
                return a(this, (function (t) {
                    switch (t.label) {
                        case 0:
                            return [4, (0, r.call)(i.listenToLegacyAction, "editor-mode")];
                        case 1:
                            e = t.sent(), t.label = 2;
                        case 2:
                            t.trys.push([2, , 10, 12]), t.label = 3;
                        case 3:
                            return [4, (0, r.take)(e)];
                        case 4:
                            return "ATE" !== t.sent() ? [3, 6] : [4, (0, r.put)((0, o.enableAteAction)())];
                        case 5:
                            return t.sent(), [3, 8];
                        case 6:
                            return [4, (0, r.put)((0, l.disableAteAction)())];
                        case 7:
                            t.sent(), t.label = 8;
                        case 8:
                            return [3, 3];
                        case 9:
                            return [3, 12];
                        case 10:
                            return [4, (0, r.cancelled)()];
                        case 11:
                            return t.sent() && e.close(), [7];
                        case 12:
                            return [2]
                    }
                }))
            }
        }, 225: function (e, t, n) {
            var a = this && this.__generator || function (e, t) {
                var n, a, r, i, o = {
                    label: 0, sent: function () {
                        if (1 & r[0]) throw r[1];
                        return r[1]
                    }, trys: [], ops: []
                };
                return i = {
                    next: l(0),
                    throw: l(1),
                    return: l(2)
                }, "function" == typeof Symbol && (i[Symbol.iterator] = function () {
                    return this
                }), i;

                function l(l) {
                    return function (u) {
                        return function (l) {
                            if (n) throw new TypeError("Generator is already executing.");
                            for (; i && (i = 0, l[0] && (o = 0)), o;) try {
                                if (n = 1, a && (r = 2 & l[0] ? a.return : l[0] ? a.throw || ((r = a.return) && r.call(a), 0) : a.next) && !(r = r.call(a, l[1])).done) return r;
                                switch (a = 0, r && (l = [2 & l[0], r.value]), l[0]) {
                                    case 0:
                                    case 1:
                                        r = l;
                                        break;
                                    case 4:
                                        return o.label++, {value: l[1], done: !1};
                                    case 5:
                                        o.label++, a = l[1], l = [0];
                                        continue;
                                    case 7:
                                        l = o.ops.pop(), o.trys.pop();
                                        continue;
                                    default:
                                        if (!((r = (r = o.trys).length > 0 && r[r.length - 1]) || 6 !== l[0] && 2 !== l[0])) {
                                            o = 0;
                                            continue
                                        }
                                        if (3 === l[0] && (!r || l[1] > r[0] && l[1] < r[3])) {
                                            o.label = l[1];
                                            break
                                        }
                                        if (6 === l[0] && o.label < r[1]) {
                                            o.label = r[1], r = l;
                                            break
                                        }
                                        if (r && o.label < r[2]) {
                                            o.label = r[2], o.ops.push(l);
                                            break
                                        }
                                        r[2] && o.ops.pop(), o.trys.pop();
                                        continue
                                }
                                l = t.call(e, o)
                            } catch (e) {
                                l = [6, e], a = 0
                            } finally {
                                n = r = 0
                            }
                            if (5 & l[0]) throw l[1];
                            return {value: l[0] ? l[1] : void 0, done: !0}
                        }([l, u])
                    }
                }
            };
            Object.defineProperty(t, "__esModule", {value: !0}), t.watchLoadEngines = void 0;
            var r = n(43786), i = n(79040), o = n(1406);
            t.watchLoadEngines = function () {
                return a(this, (function (e) {
                    switch (e.label) {
                        case 0:
                            return [4, (0, r.takeLatest)(i.LOAD_ENGINES_ACTION, o.loadEnginesWorker)];
                        case 1:
                            return e.sent(), [2]
                    }
                }))
            }
        }, 19971: function (e, t, n) {
            var a = this && this.__generator || function (e, t) {
                var n, a, r, i, o = {
                    label: 0, sent: function () {
                        if (1 & r[0]) throw r[1];
                        return r[1]
                    }, trys: [], ops: []
                };
                return i = {
                    next: l(0),
                    throw: l(1),
                    return: l(2)
                }, "function" == typeof Symbol && (i[Symbol.iterator] = function () {
                    return this
                }), i;

                function l(l) {
                    return function (u) {
                        return function (l) {
                            if (n) throw new TypeError("Generator is already executing.");
                            for (; i && (i = 0, l[0] && (o = 0)), o;) try {
                                if (n = 1, a && (r = 2 & l[0] ? a.return : l[0] ? a.throw || ((r = a.return) && r.call(a), 0) : a.next) && !(r = r.call(a, l[1])).done) return r;
                                switch (a = 0, r && (l = [2 & l[0], r.value]), l[0]) {
                                    case 0:
                                    case 1:
                                        r = l;
                                        break;
                                    case 4:
                                        return o.label++, {value: l[1], done: !1};
                                    case 5:
                                        o.label++, a = l[1], l = [0];
                                        continue;
                                    case 7:
                                        l = o.ops.pop(), o.trys.pop();
                                        continue;
                                    default:
                                        if (!((r = (r = o.trys).length > 0 && r[r.length - 1]) || 6 !== l[0] && 2 !== l[0])) {
                                            o = 0;
                                            continue
                                        }
                                        if (3 === l[0] && (!r || l[1] > r[0] && l[1] < r[3])) {
                                            o.label = l[1];
                                            break
                                        }
                                        if (6 === l[0] && o.label < r[1]) {
                                            o.label = r[1], r = l;
                                            break
                                        }
                                        if (r && o.label < r[2]) {
                                            o.label = r[2], o.ops.push(l);
                                            break
                                        }
                                        r[2] && o.ops.pop(), o.trys.pop();
                                        continue
                                }
                                l = t.call(e, o)
                            } catch (e) {
                                l = [6, e], a = 0
                            } finally {
                                n = r = 0
                            }
                            if (5 & l[0]) throw l[1];
                            return {value: l[0] ? l[1] : void 0, done: !0}
                        }([l, u])
                    }
                }
            };
            Object.defineProperty(t, "__esModule", {value: !0}), t.watchSavingSettings = void 0;
            var r = n(43786), i = n(98583), o = n(57441);
            t.watchSavingSettings = function () {
                return a(this, (function (e) {
                    switch (e.label) {
                        case 0:
                            return [4, (0, r.takeLatest)(i.SAVE_SETTINGS_ACTION, o.saveSettingsWorker)];
                        case 1:
                            return e.sent(), [2]
                    }
                }))
            }
        }, 1406: function (e, t, n) {
            var a = this && this.__generator || function (e, t) {
                var n, a, r, i, o = {
                    label: 0, sent: function () {
                        if (1 & r[0]) throw r[1];
                        return r[1]
                    }, trys: [], ops: []
                };
                return i = {
                    next: l(0),
                    throw: l(1),
                    return: l(2)
                }, "function" == typeof Symbol && (i[Symbol.iterator] = function () {
                    return this
                }), i;

                function l(l) {
                    return function (u) {
                        return function (l) {
                            if (n) throw new TypeError("Generator is already executing.");
                            for (; i && (i = 0, l[0] && (o = 0)), o;) try {
                                if (n = 1, a && (r = 2 & l[0] ? a.return : l[0] ? a.throw || ((r = a.return) && r.call(a), 0) : a.next) && !(r = r.call(a, l[1])).done) return r;
                                switch (a = 0, r && (l = [2 & l[0], r.value]), l[0]) {
                                    case 0:
                                    case 1:
                                        r = l;
                                        break;
                                    case 4:
                                        return o.label++, {value: l[1], done: !1};
                                    case 5:
                                        o.label++, a = l[1], l = [0];
                                        continue;
                                    case 7:
                                        l = o.ops.pop(), o.trys.pop();
                                        continue;
                                    default:
                                        if (!((r = (r = o.trys).length > 0 && r[r.length - 1]) || 6 !== l[0] && 2 !== l[0])) {
                                            o = 0;
                                            continue
                                        }
                                        if (3 === l[0] && (!r || l[1] > r[0] && l[1] < r[3])) {
                                            o.label = l[1];
                                            break
                                        }
                                        if (6 === l[0] && o.label < r[1]) {
                                            o.label = r[1], r = l;
                                            break
                                        }
                                        if (r && o.label < r[2]) {
                                            o.label = r[2], o.ops.push(l);
                                            break
                                        }
                                        r[2] && o.ops.pop(), o.trys.pop();
                                        continue
                                }
                                l = t.call(e, o)
                            } catch (e) {
                                l = [6, e], a = 0
                            } finally {
                                n = r = 0
                            }
                            if (5 & l[0]) throw l[1];
                            return {value: l[0] ? l[1] : void 0, done: !0}
                        }([l, u])
                    }
                }
            };
            Object.defineProperty(t, "__esModule", {value: !0}), t.loadEnginesWorker = void 0;
            var r = n(22700), i = n(43786), o = n(42382), l = n(77281), u = n(50639), s = n(24158), c = n(33618);
            t.loadEnginesWorker = function () {
                var e, t, n;
                return a(this, (function (a) {
                    switch (a.label) {
                        case 0:
                            return [4, (0, i.put)((0, l.setEnginesLoadingAction)())];
                        case 1:
                            a.sent(), a.label = 2;
                        case 2:
                            return a.trys.push([2, 6, , 8]), [4, (0, i.call)(r.apiGetEngines)];
                        case 3:
                            return e = a.sent(), [4, (0, i.put)((0, s.setLoadedEnginesAction)(e))];
                        case 4:
                            return a.sent(), [4, (0, i.put)((0, c.initializeEnginesAction)(e))];
                        case 5:
                            return a.sent(), [3, 8];
                        case 6:
                            return t = a.sent(), n = t instanceof Error ? t.message : (0, o.__)("Could not fetch engines data", "wpml"), [4, (0, i.put)((0, u.setEnginesLoadingErrorAction)(n))];
                        case 7:
                            return a.sent(), [3, 8];
                        case 8:
                            return [2]
                    }
                }))
            }
        }, 57441: function (e, t, n) {
            var a = this && this.__generator || function (e, t) {
                var n, a, r, i, o = {
                    label: 0, sent: function () {
                        if (1 & r[0]) throw r[1];
                        return r[1]
                    }, trys: [], ops: []
                };
                return i = {
                    next: l(0),
                    throw: l(1),
                    return: l(2)
                }, "function" == typeof Symbol && (i[Symbol.iterator] = function () {
                    return this
                }), i;

                function l(l) {
                    return function (u) {
                        return function (l) {
                            if (n) throw new TypeError("Generator is already executing.");
                            for (; i && (i = 0, l[0] && (o = 0)), o;) try {
                                if (n = 1, a && (r = 2 & l[0] ? a.return : l[0] ? a.throw || ((r = a.return) && r.call(a), 0) : a.next) && !(r = r.call(a, l[1])).done) return r;
                                switch (a = 0, r && (l = [2 & l[0], r.value]), l[0]) {
                                    case 0:
                                    case 1:
                                        r = l;
                                        break;
                                    case 4:
                                        return o.label++, {value: l[1], done: !1};
                                    case 5:
                                        o.label++, a = l[1], l = [0];
                                        continue;
                                    case 7:
                                        l = o.ops.pop(), o.trys.pop();
                                        continue;
                                    default:
                                        if (!((r = (r = o.trys).length > 0 && r[r.length - 1]) || 6 !== l[0] && 2 !== l[0])) {
                                            o = 0;
                                            continue
                                        }
                                        if (3 === l[0] && (!r || l[1] > r[0] && l[1] < r[3])) {
                                            o.label = l[1];
                                            break
                                        }
                                        if (6 === l[0] && o.label < r[1]) {
                                            o.label = r[1], r = l;
                                            break
                                        }
                                        if (r && o.label < r[2]) {
                                            o.label = r[2], o.ops.push(l);
                                            break
                                        }
                                        r[2] && o.ops.pop(), o.trys.pop();
                                        continue
                                }
                                l = t.call(e, o)
                            } catch (e) {
                                l = [6, e], a = 0
                            } finally {
                                n = r = 0
                            }
                            if (5 & l[0]) throw l[1];
                            return {value: l[0] ? l[1] : void 0, done: !0}
                        }([l, u])
                    }
                }
            };
            Object.defineProperty(t, "__esModule", {value: !0}), t.saveSettingsWorker = void 0;
            var r = n(43786), i = n(57226), o = n(52935), l = n(98120), u = n(45329), s = n(11786), c = n(71818),
                d = n(90487), f = n(44645), p = n(33015), _ = n(69471), v = n(48684);
            t.saveSettingsWorker = function () {
                var e, t, n, E, m, g, h, b;
                return a(this, (function (a) {
                    switch (a.label) {
                        case 0:
                            return [4, (0, r.put)((0, i.setSavingInProgressAction)(!0))];
                        case 1:
                            return a.sent(), [4, (0, r.put)((0, s.setSavingErrorAction)(null))];
                        case 2:
                            return a.sent(), [4, (0, r.select)(f.hasReviewModeBeenUpdatedSelector)];
                        case 3:
                            return e = a.sent(), [4, (0, r.select)((function (e) {
                                return (0, o.selectReviewMode)(e.preferences)
                            }))];
                        case 4:
                            return t = a.sent(), [4, (0, r.select)(p.hasDraftsOptionBeenUpdatedSelector)];
                        case 5:
                            return n = a.sent(), [4, (0, r.select)((function (e) {
                                return (0, l.selectShouldTranslateAutomaticallyDrafts)(e.preferences)
                            }))];
                        case 6:
                            return E = a.sent(), [4, (0, r.select)(_.hasEnginesBeenUpdatedSelector)];
                        case 7:
                            return m = a.sent(), [4, (0, r.select)(c.getEnginesSelector)];
                        case 8:
                            if (null === (g = a.sent().engines)) return [2];
                            h = {}, e && (h.reviewMode = t), n && (h.shouldTranslateAutomaticallyDrafts = E), m && (h.engines = g), a.label = 9;
                        case 9:
                            return a.trys.push([9, 12, 15, 17]), [4, (0, r.call)(u.apiSaveAutomaticTranslationSettings, h)];
                        case 10:
                            return a.sent(), [4, (0, r.put)((0, d.updateInitialStateAfterSavingAction)({
                                reviewMode: t,
                                shouldTranslateAutomaticallyDrafts: E,
                                engines: g
                            }))];
                        case 11:
                            return a.sent(), m && ((y = new BroadcastChannel(v.TranslationEngineChannel)).postMessage(!0), y.close()), [3, 17];
                        case 12:
                            return (b = a.sent()) instanceof Error ? [4, (0, r.put)((0, s.setSavingErrorAction)(b.message))] : [3, 14];
                        case 13:
                            a.sent(), a.label = 14;
                        case 14:
                            return [3, 17];
                        case 15:
                            return [4, (0, r.put)((0, i.setSavingInProgressAction)(!1))];
                        case 16:
                            return a.sent(), [7];
                        case 17:
                            return [4, 1];
                        case 18:
                            return a.sent(), [2]
                    }
                    var y
                }))
            }
        }, 92052: function (e, t, n) {
            var a = this && this.__importDefault || function (e) {
                return e && e.__esModule ? e : {default: e}
            };
            Object.defineProperty(t, "__esModule", {value: !0}), t.App = void 0;
            var r = a(n(96540)), i = n(42382);
            n(34770);
            var o = n(33256), l = n(73159), u = n(86643), s = n(19533), c = n(34243);
            t.App = function () {
                if (!(0, u.useAutomaticTranslationsSelector)((function (e) {
                    return (0, s.selectIsAteEnabled)(e.preferences)
                }))) return null;
                var e = r.default.createElement("h3", null, (0, i.__)("Automatic translation", "wpml"));
                return r.default.createElement(l.Section, {header: e}, r.default.createElement(c.PopoverTooltipInit, null), r.default.createElement(o.AutomaticTranslationsContent, null))
            }
        }, 33256: function (e, t, n) {
            var a = this && this.__importDefault || function (e) {
                return e && e.__esModule ? e : {default: e}
            };
            Object.defineProperty(t, "__esModule", {value: !0}), t.AutomaticTranslationsContent = void 0;
            var r = a(n(96540)), i = n(11018), o = n(9425), l = a(n(32985)), u = a(n(9285));
            t.AutomaticTranslationsContent = function () {
                return r.default.createElement("div", {className: "automatic-translation-section"}, r.default.createElement("div", {className: "automatic-translation-section__review-mode"}, r.default.createElement("div", null, r.default.createElement(i.ReviewOptions, null))), r.default.createElement("div", null, r.default.createElement("div", null, r.default.createElement(o.Engines, null))), r.default.createElement("div", null, r.default.createElement("div", null, r.default.createElement(l.default, null))), r.default.createElement("div", null, r.default.createElement("div", {className: "save-btn-wrapper"}, r.default.createElement(u.default, null))))
            }
        }, 54497: function (e, t, n) {
            var a = this && this.__importDefault || function (e) {
                return e && e.__esModule ? e : {default: e}
            };
            Object.defineProperty(t, "__esModule", {value: !0});
            var r = a(n(96540)), i = n(42382), o = a(n(99104));
            t.default = function () {
                var e = (0, o.default)(), t = e.hasAnythingToSave, n = e.onSave, a = e.savingStatus, l = a.message,
                    u = a.inProgress, s = a.isSaveSuccessful, c = a.areEnginesLoaded;
                return r.default.createElement(r.default.Fragment, null, l && r.default.createElement("span", {className: "save-message ".concat(s ? "success" : "error")}, l), u && r.default.createElement("span", null, (0, i.__)("Saving...", "wpml")), r.default.createElement("button", {
                    className: "wpml-button base-btn",
                    disabled: !t || u || !c,
                    onClick: n
                }, (0, i.__)("Save settings", "wpml")))
            }
        }, 11115: (e, t, n) => {
            Object.defineProperty(t, "__esModule", {value: !0});
            var a = n(42382);
            t.default = function () {
                return (0, a.__)("Settings saved", "wpml")
            }
        }, 9285: function (e, t, n) {
            var a = this && this.__importDefault || function (e) {
                return e && e.__esModule ? e : {default: e}
            };
            Object.defineProperty(t, "__esModule", {value: !0}), t.getSuccessMessage = void 0;
            var r = a(n(54497)), i = a(n(11115));
            t.getSuccessMessage = i.default, t.default = r.default
        }, 99104: function (e, t, n) {
            var a = this && this.__importDefault || function (e) {
                return e && e.__esModule ? e : {default: e}
            };
            Object.defineProperty(t, "__esModule", {value: !0});
            var r = n(86643), i = a(n(49701)), o = n(50797), l = n(98583), u = n(71818);
            t.default = function () {
                var e = (0, r.useAutomaticTranslationsDispatch)(), t = (0, i.default)(), n = t.message,
                    a = t.setHasClickedSave, s = t.inProgress, c = t.isSaveSuccessful;
                return {
                    hasAnythingToSave: (0, r.useAutomaticTranslationsSelector)(o.hasAnythingToSaveSelector),
                    onSave: function () {
                        a(!0), e((0, l.saveSettingsAction)())
                    },
                    savingStatus: {
                        message: n,
                        inProgress: s,
                        isSaveSuccessful: c,
                        areEnginesLoaded: null !== (0, r.useAutomaticTranslationsSelector)(u.getEnginesSelector).engines
                    }
                }
            }
        }, 49701: function (e, t, n) {
            var a = this && this.__importDefault || function (e) {
                return e && e.__esModule ? e : {default: e}
            };
            Object.defineProperty(t, "__esModule", {value: !0});
            var r = n(96540), i = n(86643), o = n(43892), l = n(42382), u = a(n(11115));
            t.default = function () {
                var e = (0, r.useState)(null), t = e[0], n = e[1], a = (0, r.useState)(!1), s = a[0], c = a[1],
                    d = (0, i.useAutomaticTranslationsSelector)(o.savingSettingsStatusSelector), f = d.inProgress,
                    p = d.error;
                return (0, r.useEffect)((function () {
                    if (s && !f) {
                        n(p ? (0, l.__)("Some error occurred", "wpml") : (0, u.default)());
                        var e = setTimeout((function () {
                            n(null), c(!1)
                        }), 2e3);
                        return function () {
                            return clearTimeout(e)
                        }
                    }
                }), [f, p, s]), {message: t, setHasClickedSave: c, inProgress: f, isSaveSuccessful: !p}
            }
        }, 73159: function (e, t, n) {
            var a = this && this.__importDefault || function (e) {
                return e && e.__esModule ? e : {default: e}
            };
            Object.defineProperty(t, "__esModule", {value: !0}), t.Section = void 0;
            var r = a(n(96540));
            t.Section = function (e) {
                var t = e.header, n = e.children;
                return r.default.createElement("div", {className: "wpml-section"}, r.default.createElement("div", {className: "wpml-section-header"}, t), r.default.createElement("div", {className: "wpml-section-content"}, n))
            }
        }, 9425: function (e, t, n) {
            var a = this && this.__createBinding || (Object.create ? function (e, t, n, a) {
                void 0 === a && (a = n);
                var r = Object.getOwnPropertyDescriptor(t, n);
                r && !("get" in r ? !t.__esModule : r.writable || r.configurable) || (r = {
                    enumerable: !0,
                    get: function () {
                        return t[n]
                    }
                }), Object.defineProperty(e, a, r)
            } : function (e, t, n, a) {
                void 0 === a && (a = n), e[a] = t[n]
            }), r = this && this.__setModuleDefault || (Object.create ? function (e, t) {
                Object.defineProperty(e, "default", {enumerable: !0, value: t})
            } : function (e, t) {
                e.default = t
            }), i = this && this.__importStar || function (e) {
                if (e && e.__esModule) return e;
                var t = {};
                if (null != e) for (var n in e) "default" !== n && Object.prototype.hasOwnProperty.call(e, n) && a(t, e, n);
                return r(t, e), t
            }, o = this && this.__spreadArray || function (e, t, n) {
                if (n || 2 === arguments.length) for (var a, r = 0, i = t.length; r < i; r++) !a && r in t || (a || (a = Array.prototype.slice.call(t, 0, r)), a[r] = t[r]);
                return e.concat(a || Array.prototype.slice.call(t))
            }, l = this && this.__importDefault || function (e) {
                return e && e.__esModule ? e : {default: e}
            };
            Object.defineProperty(t, "__esModule", {value: !0}), t.Engines = void 0;
            var u = i(n(96540)), s = n(86643), c = n(71818), d = n(79040), f = n(42382), p = l(n(56960)),
                _ = l(n(61043)), v = n(24158);
            t.Engines = function () {
                var e = (0, s.useAutomaticTranslationsDispatch)(),
                    t = (0, s.useAutomaticTranslationsSelector)(c.getEnginesSelector), n = t.engines, a = t.isLoading,
                    r = t.loadingError;
                (0, u.useEffect)((function () {
                    n || a || r || e((0, d.loadEnginesAction)())
                }), [n, a, r]);
                var i = function () {
                    if (a) return u.default.createElement(u.default.Fragment, null, (0, f.__)("Loading...", "wpml"));
                    if (r) return u.default.createElement(u.default.Fragment, null, (0, f.__)("Failed to load engines", "wpml"));
                    if (!n) return u.default.createElement(u.default.Fragment, null, (0, f.__)("Loading...", "wpml"));
                    for (var t = new Map, i = 0, l = 0, s = n; l < s.length; l++) {
                        var c = s[l];
                        c.enabled && (t.set(c.engine, i), i++)
                    }
                    return u.default.createElement(u.default.Fragment, null, u.default.createElement("div", {className: "drag-instructions"}, (0, f.__)("Drag your default engine to the top and order the rest by priority.", "wpml")), u.default.createElement(_.default, {
                        onDragEnd: function (t, a) {
                            var r = o([], n, !0), i = r.splice(t, 1)[0];
                            r.splice(a, 0, i), e((0, v.setLoadedEnginesAction)(r))
                        }, nodeSelector: ".engine-item", handleSelector: ".engine-item", lineClassName: "dragline"
                    }, u.default.createElement("ul", {className: "engines-ul"}, n.map((function (e) {
                        var n = t.get(e.engine);
                        return u.default.createElement(p.default, {key: e.engine, engine: e, displayIndex: n})
                    })))))
                }();
                return u.default.createElement("div", {
                    className: "wpml-engines-list",
                    "data-testid": "wpml-engines-list"
                }, u.default.createElement("div", null, u.default.createElement("strong", null, (0, f.__)("Which translation engines do you want to use?", "wpml")), u.default.createElement("p", null, (0, f.__)("Automatic translation engines differ in translation style and supported language pairs. If your preferred translation engine does not support a language pair that you want to use, we fall back to your next preferred engine that does support it.", "wpml"))), i)
            }
        }, 81272: function (e, t, n) {
            var a = this && this.__importDefault || function (e) {
                return e && e.__esModule ? e : {default: e}
            };
            Object.defineProperty(t, "__esModule", {value: !0});
            var r = n(42382), i = a(n(96540)), o = n(63749), l = n(72481), u = n(11444), s = n(25217), c = n(99465),
                d = function () {
                    var e = (0, r.__)("WPML AI (beta) automatically detects the formality of your content and translates with the same formality.", "wpml");
                    return i.default.createElement(c.PopoverTooltip, {
                        content: e,
                        className: "wpml-tooltip-button"
                    }, i.default.createElement("span", null, (0, r.__)("Auto-formality", "wpml")))
                };
            t.default = function () {
                var e = (0, u.useVisibilityContext)().toggle, t = (0, s.useEngineContext)().engine;
                if (!t.enabled || !t.formalityAvailable) return null;
                if ("llm" === t.engine) return i.default.createElement(d, null);
                var n = function (e) {
                        var t;
                        return void 0 !== (null === (t = null == e ? void 0 : e.formalitySettings) || void 0 === t ? void 0 : t.find((function (e) {
                            return e.enabled
                        })))
                    }(t),
                    a = n ? (0, r.sprintf)((0, r.__)("Choose the tone of automatic translations for %s", "wpml"), t.formalName) : (0, r.__)("Your site doesn't use languages that offer formality settings.", "wpml"),
                    c = (0, o.withTooltip)(l.BaseButton);
                return i.default.createElement(c, {
                    tooltipText: a,
                    additionalAttr: {"data-tooltip-class-name": "edit-formality-tooltip"},
                    onClick: function () {
                        e()
                    },
                    disabled: !n,
                    className: "edit-formality"
                }, i.default.createElement("span", null, (0, r.__)("Edit formality", "wpml")))
            }
        }, 25217: function (e, t, n) {
            var a = this && this.__assign || function () {
                return a = Object.assign || function (e) {
                    for (var t, n = 1, a = arguments.length; n < a; n++) for (var r in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
                    return e
                }, a.apply(this, arguments)
            }, r = this && this.__createBinding || (Object.create ? function (e, t, n, a) {
                void 0 === a && (a = n);
                var r = Object.getOwnPropertyDescriptor(t, n);
                r && !("get" in r ? !t.__esModule : r.writable || r.configurable) || (r = {
                    enumerable: !0,
                    get: function () {
                        return t[n]
                    }
                }), Object.defineProperty(e, a, r)
            } : function (e, t, n, a) {
                void 0 === a && (a = n), e[a] = t[n]
            }), i = this && this.__setModuleDefault || (Object.create ? function (e, t) {
                Object.defineProperty(e, "default", {enumerable: !0, value: t})
            } : function (e, t) {
                e.default = t
            }), o = this && this.__importStar || function (e) {
                if (e && e.__esModule) return e;
                var t = {};
                if (null != e) for (var n in e) "default" !== n && Object.prototype.hasOwnProperty.call(e, n) && r(t, e, n);
                return i(t, e), t
            };
            Object.defineProperty(t, "__esModule", {value: !0}), t.useEngineContext = t.EngineProvider = void 0;
            var l = o(n(96540)), u = n(86643), s = n(42331), c = (0, l.createContext)(void 0);
            t.useEngineContext = function () {
                var e = (0, l.useContext)(c);
                if (!e) throw new Error("useEngineContext must be used within an EngineProvider");
                return e
            }, t.EngineProvider = function (e) {
                var t = e.engine, n = e.children, r = (0, l.useState)(t), i = r[0], o = r[1],
                    d = (0, u.useAutomaticTranslationsDispatch)();
                return l.default.createElement(c.Provider, {
                    value: {
                        initialEngine: t,
                        engine: i,
                        setFormalityLevel: function (e, t) {
                            o(function (e, t, n) {
                                if (!e.formalitySettings) return e;
                                var r = e.formalitySettings.map((function (e) {
                                    return e.languageCode === t ? a(a({}, e), {currentLevel: n}) : e
                                }));
                                return a(a({}, e), {formalitySettings: r})
                            }(i, e, t))
                        },
                        cancel: function () {
                            o(t)
                        },
                        update: function () {
                            d((0, s.updateFormalitySettingsOfEngineAction)({
                                engineCode: i.engine,
                                formalitySettings: i.formalitySettings
                            }))
                        }
                    }
                }, n)
            }
        }, 56960: function (e, t, n) {
            var a = this && this.__importDefault || function (e) {
                return e && e.__esModule ? e : {default: e}
            };
            Object.defineProperty(t, "__esModule", {value: !0});
            var r = a(n(96540)), i = n(42382), o = n(86643), l = n(90689), u = a(n(81272)), s = n(11444),
                c = a(n(66877)), d = n(25217), f = function (e) {
                    var t = e.engine, n = e.displayIndex, a = (0, o.useAutomaticTranslationsDispatch)();
                    return r.default.createElement(d.EngineProvider, {engine: t}, r.default.createElement("li", {
                        "aria-label": t.formalName,
                        className: "engine-item".concat(t.enabled ? " on" : "").concat(0 === n ? " default-engine" : "")
                    }, r.default.createElement("div", {className: "engine-item-credits"}, r.default.createElement("i", {className: "otgs-ico otgs-ico-drag"})), r.default.createElement("div", {className: "engine-item-title"}, r.default.createElement("span", {className: "engine-item-name"}, t.formalName), r.default.createElement("span", {className: "engine-credits"}, (0, i.sprintf)((0, i.__)("%d credits per word", "wpml"), t.cost))), t.enabled && r.default.createElement("div", {className: "engine-item-badge".concat(0 === n ? " default" : "")}, r.default.createElement("span", null, void 0 !== n ? n > 0 ? (0, i.sprintf)((0, i.__)("Backup %d", "wpml"), n) : (0, i.__)("Default", "wpml") : null)), r.default.createElement(u.default, null), r.default.createElement("label", {
                        htmlFor: t.engine,
                        className: "wpml-on-off-switch"
                    }, r.default.createElement("input", {
                        id: t.engine,
                        type: "checkbox",
                        checked: t.enabled,
                        onChange: function () {
                            a((0, l.toggleEngineAction)(t.engine))
                        }
                    }), r.default.createElement("span", {
                        "aria-hidden": !t.enabled,
                        className: "on"
                    }, (0, i.__)("ON", "wpml")), r.default.createElement("span", {
                        "aria-hidden": t.enabled,
                        className: "off"
                    }, (0, i.__)("OFF", "wpml")), r.default.createElement("span", {className: "visually-hidden"}, t.formalName)), r.default.createElement(c.default, null)))
                };
            t.default = function (e) {
                var t = e.engine, n = e.displayIndex;
                return r.default.createElement(s.VisibilityProvider, null, r.default.createElement(f, {
                    displayIndex: n,
                    engine: t
                }))
            }
        }, 72844: function (e, t, n) {
            var a = this && this.__importDefault || function (e) {
                return e && e.__esModule ? e : {default: e}
            };
            Object.defineProperty(t, "__esModule", {value: !0});
            var r = a(n(96540)), i = n(25217), o = n(42382), l = n(17265);
            t.default = function () {
                return "deepl" !== (0, i.useEngineContext)().engine.engine ? null : r.default.createElement(l.Link, {
                    href: "https://wpml.org/documentation/automatic-translation/translate-your-wordpress-site-with-deepl/#deepl-formality",
                    openInNewTab: !0,
                    label: (0, o.__)("Documentation", "wpml"),
                    className: "wpml-external-link"
                }, r.default.createElement("span", null, (0, o.__)("DeepL's formality and how it helps get good translations", "wpml")))
            }
        }, 40188: function (e, t, n) {
            var a = this && this.__importDefault || function (e) {
                return e && e.__esModule ? e : {default: e}
            };
            Object.defineProperty(t, "__esModule", {value: !0});
            var r = a(n(96540)), i = n(11444), o = n(42382);
            t.default = function () {
                var e = (0, i.useVisibilityContext)().toggle;
                return r.default.createElement("button", {
                    className: "edit-btn",
                    onClick: e
                }, r.default.createElement("span", null, (0, o.__)("Edit button", "wpml")))
            }
        }, 31495: function (e, t, n) {
            var a = this && this.__importDefault || function (e) {
                return e && e.__esModule ? e : {default: e}
            };
            Object.defineProperty(t, "__esModule", {value: !0});
            var r = a(n(96540)), i = n(11444), o = n(25217), l = a(n(25738)), u = a(n(32005));
            t.default = function (e) {
                var t = e.formalitySetting, n = (0, o.useEngineContext)().setFormalityLevel;
                if (!(0, i.useVisibilityContext)().opened) return null;
                var a = function (e) {
                    n(t.languageCode, e.target.value)
                }, s = function (e) {
                    return "formality-level-".concat(t.languageCode, "-").concat(e)
                };
                return r.default.createElement("div", {className: "edit-formality-content"}, t.availableLevels.map((function (e) {
                    return r.default.createElement("div", {key: "formality-level-".concat(e)}, r.default.createElement("label", {
                        className: "wpml-radio",
                        htmlFor: s(e)
                    }, r.default.createElement("input", {
                        type: "radio",
                        id: s(e),
                        name: "formality-level-".concat(t.languageCode),
                        value: e,
                        checked: t.currentLevel === e,
                        onChange: a
                    }), r.default.createElement("span", null, (0, l.default)(e))))
                })), r.default.createElement(u.default, {formalitySetting: t}))
            }
        }, 32005: function (e, t, n) {
            var a = this && this.__importDefault || function (e) {
                return e && e.__esModule ? e : {default: e}
            };
            Object.defineProperty(t, "__esModule", {value: !0});
            var r = a(n(96540)), i = n(42382), o = n(79692);
            t.default = function (e) {
                var t = e.formalitySetting, n = (0, o.getExamples)(t);
                if (0 === n.length) return null;
                var a = (0, i.sprintf)((0, i.__)("Examples for %s", "wpml"), t.languageCode);
                return r.default.createElement("div", {
                    className: "formality-example",
                    "aria-label": a,
                    role: "region"
                }, r.default.createElement("span", {className: "formality-example-title"}, " ", (0, i.__)("For example:", "wpml")), r.default.createElement("ul", null, n.map((function (e) {
                    return r.default.createElement("li", {key: e}, e)
                }))))
            }
        }, 7045: function (e, t, n) {
            var a = this && this.__createBinding || (Object.create ? function (e, t, n, a) {
                void 0 === a && (a = n);
                var r = Object.getOwnPropertyDescriptor(t, n);
                r && !("get" in r ? !t.__esModule : r.writable || r.configurable) || (r = {
                    enumerable: !0,
                    get: function () {
                        return t[n]
                    }
                }), Object.defineProperty(e, a, r)
            } : function (e, t, n, a) {
                void 0 === a && (a = n), e[a] = t[n]
            }), r = this && this.__setModuleDefault || (Object.create ? function (e, t) {
                Object.defineProperty(e, "default", {enumerable: !0, value: t})
            } : function (e, t) {
                e.default = t
            }), i = this && this.__importStar || function (e) {
                if (e && e.__esModule) return e;
                var t = {};
                if (null != e) for (var n in e) "default" !== n && Object.prototype.hasOwnProperty.call(e, n) && a(t, e, n);
                return r(t, e), t
            }, o = this && this.__importDefault || function (e) {
                return e && e.__esModule ? e : {default: e}
            };
            Object.defineProperty(t, "__esModule", {value: !0});
            var l = i(n(96540)), u = o(n(31495)), s = o(n(40188)), c = n(11444), d = n(42382), f = n(86643),
                p = n(39094), _ = o(n(25738));
            t.default = function (e) {
                var t = e.formalitySetting, n = (0, f.useAutomaticTranslationsSelector)((function (e) {
                    return (0, p.activeLanguagesSelector)(e.preferences.languages)
                })), a = function (e) {
                    var t;
                    return (null === (t = n[e]) || void 0 === t ? void 0 : t.name) || e
                }, r = (0, l.useState)(!1), i = r[0], o = r[1];
                return l.default.createElement("li", {
                    "aria-label": (0, d.sprintf)((0, d.__)("Formality settings for %s", "wpml"), t.languageCode),
                    className: "formality-box-item".concat(i ? " expanded" : "")
                }, l.default.createElement("div", null, l.default.createElement("img", {
                    src: function (e) {
                        var t;
                        return (null === (t = n[e]) || void 0 === t ? void 0 : t.flagUrl) || ""
                    }(t.languageCode),
                    alt: "".concat(a(t.languageCode), " Flag"),
                    style: {width: "18px", height: "12px"}
                }), l.default.createElement("span", {className: "language-name"}, a(t.languageCode))), l.default.createElement("span", {
                    className: "formality-level",
                    "aria-label": (0, d.sprintf)((0, d.__)("Formality level for %s", "wpml"), t.languageCode)
                }, (0, _.default)(t.currentLevel)), l.default.createElement(c.VisibilityProvider, {
                    onOpenedChange: function (e) {
                        o(e)
                    }
                }, l.default.createElement(s.default, null), l.default.createElement(u.default, {formalitySetting: t})))
            }
        }, 66877: function (e, t, n) {
            var a = this && this.__importDefault || function (e) {
                return e && e.__esModule ? e : {default: e}
            };
            Object.defineProperty(t, "__esModule", {value: !0});
            var r = a(n(96540)), i = n(11444), o = n(30718), l = n(42382), u = a(n(7045)), s = n(72481), c = n(96982),
                d = n(25217), f = n(86643), p = n(39094), _ = a(n(72844));
            t.default = function () {
                var e = (0, f.useAutomaticTranslationsSelector)((function (e) {
                        return (0, p.activeLanguagesSelector)(e.preferences.languages)
                    })), t = (0, d.useEngineContext)(), n = t.engine, a = t.cancel, v = t.update,
                    E = (0, i.useVisibilityContext)(), m = E.opened, g = E.toggle;
                if (!m) return null;
                var h = function () {
                    a(), g()
                }, b = function (e) {
                    for (var t = [], n = [], a = 0, r = e.formalitySettings; a < r.length; a++) {
                        var i = r[a];
                        i.enabled ? t.push(i) : n.push(i)
                    }
                    return {supportedLanguages: t, unsupportedLanguages: n}
                }(n), y = b.supportedLanguages, S = b.unsupportedLanguages, T = (0, c.withOutline)(s.BaseButton);
                return r.default.createElement(o.Modal, {
                    onClose: h,
                    className: "formality-modal"
                }, r.default.createElement("h3", {className: "modal-title"}, (0, l.sprintf)((0, l.__)("Set formality for %s", "wpml"), n.formalName)), r.default.createElement("p", {className: "sub-title"}, (0, l.sprintf)((0, l.__)("%d of your target languages can be translated using either a formal or informal tone.\n The tone which gives the best translation for each language is set by default.", "wpml"), y.length)), r.default.createElement(_.default, null), r.default.createElement("ul", {className: "formality-box"}, y.map((function (e) {
                    return r.default.createElement(u.default, {formalitySetting: e, key: e.languageCode})
                }))), S.length > 0 && r.default.createElement("p", null, (0, l.sprintf)((0, l.__)("%s doesn't yet support formality options for %s.", "wpml"), n.formalName, S.map((function (t) {
                    return function (t) {
                        var n;
                        return (null === (n = e[t]) || void 0 === n ? void 0 : n.name) || t
                    }(t.languageCode)
                })).join(", "))), r.default.createElement("div", {className: "actions"}, r.default.createElement(T, {onClick: h}, (0, l.__)("Cancel", "wpml")), r.default.createElement(s.BaseButton, {
                    onClick: function () {
                        v(), g()
                    }
                }, (0, l.__)("Update", "wpml"))))
            }
        }, 79692: function (e, t, n) {
            var a = this && this.__importDefault || function (e) {
                return e && e.__esModule ? e : {default: e}
            };
            Object.defineProperty(t, "__esModule", {value: !0}), t.getExamples = void 0;
            var r = a(n(25738)), i = [{
                original: "You can't do it",
                translations: {
                    fr: {more: "Vous ne pouvez pas le faire", less: "Tu ne peux pas le faire."},
                    es: {more: "Usted no puede hacerlo", less: "No puedes hacerlo"},
                    it: {more: "Lei non può farlo", less: "Non puoi farlo"},
                    de: {more: "Sie können es nicht tun", less: "Du kannst es nicht tun"},
                    "pt-pt": {more: "Não pode fazer isso", less: "Não podes fazer isso"},
                    "pt-br": {more: "Não pode fazer isso", less: "Não podes fazer isso"},
                    ru: {more: "Вы не можете это сделать", less: "Ты не можешь это сделать"},
                    nl: {more: "U kunt het niet doen", less: "Je kunt het niet doen"},
                    ja: {more: "あなたにはそれができません", less: "君にはそれができない"},
                    pl: {more: "Pan nie może tego zrobić", less: "Nie możesz tego zrobić"}
                }
            }, {
                original: "You don't understand",
                translations: {
                    fr: {more: "Vous ne comprenez pas.", less: "Tu ne comprends pas"},
                    es: {more: "Usted no entiende", less: "No entiendes"},
                    it: {more: "Lei non capisce", less: "Non capisci"},
                    de: {more: "Sie verstehen nicht", less: "Du verstehst nicht"},
                    "pt-pt": {more: "Não entende", less: "Não entendes"},
                    "pt-br": {more: "Não entende", less: "Não entendes"},
                    ru: {more: "Вы не понимаете", less: "Ты не понимаешь"},
                    nl: {more: "U begrijpt het niet", less: "Je begrijpt het niet"},
                    ja: {more: "あなたは理解していません", less: "君は理解していない"},
                    pl: {more: "Pan nie rozumie", less: "Nie rozumiesz"}
                }
            }];
            t.getExamples = function (e) {
                for (var t = [], n = function (n) {
                    if (!n.translations[e.languageCode]) return "continue";
                    var a = n.translations[e.languageCode], i = e.availableLevels.map((function (e) {
                        return e in a ? "".concat(a[e], " (").concat((0, r.default)(e).toLowerCase(), ")") : null
                    })).filter((function (e) {
                        return null !== e
                    })).join(" - ");
                    t.push('"'.concat(n.original, '" - ').concat(i))
                }, a = 0, o = i; a < o.length; a++) n(o[a]);
                return t
            }
        }, 25738: (e, t, n) => {
            Object.defineProperty(t, "__esModule", {value: !0});
            var a = n(42382);
            t.default = function (e) {
                switch (e) {
                    case"default":
                        return (0, a.__)("Default", "wpml");
                    case"more":
                        return (0, a.__)("Formal", "wpml");
                    case"less":
                        return (0, a.__)("Informal", "wpml");
                    default:
                        return e
                }
            }
        }, 11018: function (e, t, n) {
            var a = this && this.__importDefault || function (e) {
                return e && e.__esModule ? e : {default: e}
            };
            Object.defineProperty(t, "__esModule", {value: !0}), t.ReviewOptions = void 0;
            var r = a(n(96540)), i = n(77960), o = n(86643), l = n(52935), u = n(96840);
            t.ReviewOptions = function () {
                var e = (0, o.useAutomaticTranslationsDispatch)(),
                    t = (0, o.useAutomaticTranslationsSelector)((function (e) {
                        return (0, l.selectReviewMode)(e.preferences)
                    }));
                return r.default.createElement(i.ReviewOptions, {
                    currentReviewOption: t, onChange: function (t) {
                        e((0, u.setReviewModeAction)(t))
                    }
                })
            }
        }, 32985: function (e, t, n) {
            var a = this && this.__importDefault || function (e) {
                return e && e.__esModule ? e : {default: e}
            };
            Object.defineProperty(t, "__esModule", {value: !0}), t.getHeader = void 0;
            var r = a(n(96540)), i = n(42382), o = n(86643), l = n(98120), u = n(25571), s = n(51016), c = [{
                value: "0",
                label: (0, i.__)("Don't translate drafts. Only translate when I publish content.", "wpml")
            }, {
                value: "1",
                label: (0, i.__)("Translate drafts as I save them (consumes a bit more translation credits).", "wpml")
            }], d = function () {
                return (0, i.__)("Do you want to translate drafts automatically?", "wpml")
            };
            t.getHeader = d, t.default = function () {
                var e = (0, o.useAutomaticTranslationsDispatch)(),
                    t = (0, o.useAutomaticTranslationsSelector)((function (e) {
                        return (0, l.selectShouldTranslateAutomaticallyDrafts)(e.preferences) ? "1" : "0"
                    })), n = (0, o.useAutomaticTranslationsSelector)((function (e) {
                        return (0, s.selectIsTranslateEverythingEnabled)(e.preferences)
                    }));
                return r.default.createElement("div", {
                    id: "translate-everything-drafts",
                    className: "wpml-settings-translate-everything-drafts"
                }, r.default.createElement("div", null, r.default.createElement("strong", {className: "automatic-translation-section__subtitle"}, d()), c.map((function (n) {
                    return r.default.createElement("div", {key: n.value}, r.default.createElement("div", null, r.default.createElement("label", {htmlFor: "option-".concat(n.value)}, r.default.createElement("input", {
                        type: "radio",
                        id: "option-".concat(n.value),
                        className: "wpml-radio-native",
                        value: n.value,
                        checked: n.value === t,
                        onChange: function (t) {
                            return n = "1" === t.target.value, void e((0, u.setShouldTranslateAutomaticallyDraftsAction)(n));
                            var n
                        }
                    }), r.default.createElement("span", null, n.label))))
                })), !n && r.default.createElement("div", null, r.default.createElement("div", null, r.default.createElement("p", {
                    className: "wpml-description-text",
                    dangerouslySetInnerHTML: {__html: (0, i.sprintf)((0, i.__)('This feature is only available when you enable "Translate Everything Automatically" from the %sTranslation Dashboard%s.', "wpml"), '<a href="'.concat("/wp-admin/admin.php?page=tm%2Fmenu%2Fmain.php", '">'), "</a>")}
                })))))
            }
        }, 13211: function (e, t, n) {
            var a = this && this.__importDefault || function (e) {

            };
            Object.defineProperty(t, "__esModule", {value: !0});
            var r = a(n(96540)), i = n(17040), o = n(5338), l = n(86643), u = n(88936), s = n(92052), c = window;
            u.EndpointsRepository.define(c.wpmlEndpoints);
            var d = document.getElementById("automatic-translations-section");
            if (d) {
                var f = (0, o.createRoot)(d), p = (0, l.createStore)(c.wpmlScriptData);
                f.render(r.default.createElement(r.default.StrictMode, null, r.default.createElement(i.Provider, {store: p}, r.default.createElement(s.App, null))))
            }
        }, 43171: (e, t, n) => {
            Object.defineProperty(t, "__esModule", {value: !0}), t.disableAteAction = t.DISABLE_ATE_ACTION = t.DISABLE_ATE = void 0;
            var a = n(94120);
            t.DISABLE_ATE = "disableAte", t.DISABLE_ATE_ACTION = "".concat(a.PREFERENCES_STORE, "/").concat(t.DISABLE_ATE), t.disableAteAction = function () {
                return {type: t.DISABLE_ATE_ACTION}
            }
        }, 30098: (e, t, n) => {
            Object.defineProperty(t, "__esModule", {value: !0}), t.enableAteAction = t.ENABLE_ATE_ACTION = t.ENABLE_ATE = void 0;
            var a = n(94120);
            t.ENABLE_ATE = "enableAte", t.ENABLE_ATE_ACTION = "".concat(a.PREFERENCES_STORE, "/").concat(t.ENABLE_ATE), t.enableAteAction = function () {
                return {type: t.ENABLE_ATE_ACTION}
            }
        }, 96840: (e, t, n) => {
            Object.defineProperty(t, "__esModule", {value: !0}), t.setReviewModeAction = t.SET_REVIEW_MODE_ACTION = t.SET_REVIEW_MODE = void 0;
            var a = n(94120);
            t.SET_REVIEW_MODE = "setReviewMode", t.SET_REVIEW_MODE_ACTION = "".concat(a.PREFERENCES_STORE, "/").concat(t.SET_REVIEW_MODE), t.setReviewModeAction = function (e) {
                return {type: t.SET_REVIEW_MODE_ACTION, payload: e}
            }
        }, 25571: (e, t, n) => {
            Object.defineProperty(t, "__esModule", {value: !0}), t.setShouldTranslateAutomaticallyDraftsAction = t.SET_SHOULD_TRANSLATE_AUTOMATICALLY_DRAFTS_ACTION = t.SET_SHOULD_TRANSLATE_AUTOMATICALLY_DRAFTS = void 0;
            var a = n(94120);
            t.SET_SHOULD_TRANSLATE_AUTOMATICALLY_DRAFTS = "setShouldTranslateAutomaticallyDrafts", t.SET_SHOULD_TRANSLATE_AUTOMATICALLY_DRAFTS_ACTION = "".concat(a.PREFERENCES_STORE, "/").concat(t.SET_SHOULD_TRANSLATE_AUTOMATICALLY_DRAFTS), t.setShouldTranslateAutomaticallyDraftsAction = function (e) {
                return {type: t.SET_SHOULD_TRANSLATE_AUTOMATICALLY_DRAFTS_ACTION, payload: e}
            }
        }, 19533: (e, t) => {
            Object.defineProperty(t, "__esModule", {value: !0}), t.selectIsAteEnabled = void 0, t.selectIsAteEnabled = function (e) {
                return e.ate.isEnabled
            }
        }, 51016: (e, t) => {
            Object.defineProperty(t, "__esModule", {value: !0}), t.selectIsTranslateEverythingEnabled = void 0, t.selectIsTranslateEverythingEnabled = function (e) {
                return e.ate.isTranslateEverythingEnabled
            }
        }, 52935: (e, t) => {
            Object.defineProperty(t, "__esModule", {value: !0}), t.selectReviewMode = void 0, t.selectReviewMode = function (e) {
                return e.ate.reviewMode
            }
        }, 98120: (e, t) => {
            Object.defineProperty(t, "__esModule", {value: !0}), t.selectShouldTranslateAutomaticallyDrafts = void 0, t.selectShouldTranslateAutomaticallyDrafts = function (e) {
                return e.ate.shouldTranslateAutomaticallyDrafts
            }
        }, 53980: (e, t, n) => {
            Object.defineProperty(t, "__esModule", {value: !0}), t.createPreferencesSlice = void 0;
            var a = n(28740), r = n(88420), i = n(92979), o = n(33369), l = n(94120), u = n(30098), s = n(25338),
                c = n(96840), d = n(25571), f = n(87507), p = n(43171), _ = n(97483);
            t.createPreferencesSlice = function (e) {
                var t, n, v, E, m = {
                    ate: {
                        isEnabled: (null == e ? void 0 : e.isAteEnabled) || !1,
                        isEnabling: !1,
                        isTranslateEverythingEnabled: (null == e ? void 0 : e.isTranslateEverythingEnabled) || !1,
                        reviewMode: (null == e ? void 0 : e.reviewMode) || null,
                        useAteForOldTranslationsCreatedWithCte: (null == e ? void 0 : e.useAteForOldTranslationsCreatedWithCte) || !1,
                        shouldTranslateAutomaticallyDrafts: (null == e ? void 0 : e.shouldTranslateAutomaticallyDrafts) || !1
                    },
                    languages: {
                        languages: (null == e ? void 0 : e.languages) || {},
                        from: (null === (n = null == e ? void 0 : e.languagesSettings) || void 0 === n ? void 0 : n.from) || "",
                        to: (null === (v = null == e ? void 0 : e.languagesSettings) || void 0 === v ? void 0 : v.to) || [],
                        default: (null === (E = null == e ? void 0 : e.languagesSettings) || void 0 === E ? void 0 : E.default) || ""
                    }
                };
                return (0, a.createSlice)({
                    initialState: m,
                    name: l.PREFERENCES_STORE,
                    reducers: (t = {}, t[u.ENABLE_ATE] = function (e) {
                        (0, r.enableAteReducer)(e)
                    }, t[p.DISABLE_ATE] = function (e) {
                        (0, _.disableAteReducer)(e)
                    }, t[o.SET_ENABLING_ATE] = function (e, t) {
                        (0, i.setEnablingAteReducer)(e, t.payload)
                    }, t[c.SET_REVIEW_MODE] = function (e, t) {
                        (0, s.setReviewModeReducer)(e, t.payload)
                    }, t[d.SET_SHOULD_TRANSLATE_AUTOMATICALLY_DRAFTS] = function (e, t) {
                        (0, f.setShouldTranslateAutomaticallyDraftsReducer)(e, t.payload)
                    }, t)
                }).reducer
            }
        }, 94120: (e, t) => {
            Object.defineProperty(t, "__esModule", {value: !0}), t.PREFERENCES_STORE = void 0, t.PREFERENCES_STORE = "preferences"
        }, 33369: (e, t, n) => {
            Object.defineProperty(t, "__esModule", {value: !0}), t.setEnablingAteAction = t.SET_ENABLING_ATE_ACTION = t.SET_ENABLING_ATE = void 0;
            var a = n(94120);
            t.SET_ENABLING_ATE = "setEnablingAte", t.SET_ENABLING_ATE_ACTION = "".concat(a.PREFERENCES_STORE, "/").concat(t.SET_ENABLING_ATE), t.setEnablingAteAction = function (e) {
                return {type: t.SET_ENABLING_ATE_ACTION, payload: e}
            }
        }, 97483: (e, t) => {
            Object.defineProperty(t, "__esModule", {value: !0}), t.disableAteReducer = void 0, t.disableAteReducer = function (e) {
                e.ate.isEnabled = !1
            }
        }, 88420: (e, t) => {
            Object.defineProperty(t, "__esModule", {value: !0}), t.enableAteReducer = void 0, t.enableAteReducer = function (e) {
                e.ate.isEnabled = !0
            }
        }, 92979: (e, t) => {
            Object.defineProperty(t, "__esModule", {value: !0}), t.setEnablingAteReducer = void 0, t.setEnablingAteReducer = function (e, t) {
                e.ate.isEnabling = t
            }
        }, 25338: (e, t) => {
            Object.defineProperty(t, "__esModule", {value: !0}), t.setReviewModeReducer = void 0, t.setReviewModeReducer = function (e, t) {
                e.ate.reviewMode = t
            }
        }, 87507: (e, t) => {
            Object.defineProperty(t, "__esModule", {value: !0}), t.setShouldTranslateAutomaticallyDraftsReducer = void 0, t.setShouldTranslateAutomaticallyDraftsReducer = function (e, t) {
                e.ate.shouldTranslateAutomaticallyDrafts = t
            }
        }, 39094: (e, t) => {
            Object.defineProperty(t, "__esModule", {value: !0}), t.activeLanguagesSelector = void 0, t.activeLanguagesSelector = function (e) {
                return e.languages
            }
        }, 79040: (e, t, n) => {
            Object.defineProperty(t, "__esModule", {value: !0}), t.loadEnginesAction = t.LOAD_ENGINES_ACTION = t.LOAD_ENGINES = void 0;
            var a = n(46440);
            t.LOAD_ENGINES = "loadEngines", t.LOAD_ENGINES_ACTION = "".concat(a.TRANSLATION_ENGINE_STORE, "/").concat(t.LOAD_ENGINES), t.loadEnginesAction = function () {
                return {type: t.LOAD_ENGINES_ACTION}
            }
        }, 98583: (e, t, n) => {
            Object.defineProperty(t, "__esModule", {value: !0}), t.saveSettingsAction = t.SAVE_SETTINGS_ACTION = t.SAVE_SETTINGS = void 0;
            var a = n(46440);
            t.SAVE_SETTINGS = "saveSettings", t.SAVE_SETTINGS_ACTION = "".concat(a.TRANSLATION_ENGINE_STORE, "/").concat(t.SAVE_SETTINGS), t.saveSettingsAction = function () {
                return {type: t.SAVE_SETTINGS_ACTION}
            }
        }, 90689: (e, t, n) => {
            Object.defineProperty(t, "__esModule", {value: !0}), t.toggleEngineAction = t.TOGGLE_ENGINE_ACTION = t.TOGGLE_ENGINE = void 0;
            var a = n(46440);
            t.TOGGLE_ENGINE = "toggleEngine", t.TOGGLE_ENGINE_ACTION = "".concat(a.TRANSLATION_ENGINE_STORE, "/").concat(t.TOGGLE_ENGINE), t.toggleEngineAction = function (e) {
                return {type: t.TOGGLE_ENGINE_ACTION, payload: e}
            }
        }, 42331: (e, t, n) => {
            Object.defineProperty(t, "__esModule", {value: !0}), t.updateFormalitySettingsOfEngineAction = t.UPDATE_FORMALITY_SETTINGS_OF_ENGINE_ACTION = t.UPDATE_FORMALITY_SETTINGS_OF_ENGINE = void 0;
            var a = n(46440);
            t.UPDATE_FORMALITY_SETTINGS_OF_ENGINE = "updateFormalitySettingsOfEngine", t.UPDATE_FORMALITY_SETTINGS_OF_ENGINE_ACTION = "".concat(a.TRANSLATION_ENGINE_STORE, "/").concat(t.UPDATE_FORMALITY_SETTINGS_OF_ENGINE), t.updateFormalitySettingsOfEngineAction = function (e) {
                return {type: t.UPDATE_FORMALITY_SETTINGS_OF_ENGINE_ACTION, payload: e}
            }
        }, 71818: (e, t) => {
            Object.defineProperty(t, "__esModule", {value: !0}), t.getEnginesSelector = void 0, t.getEnginesSelector = function (e) {
                return e.translationEngine
            }
        }, 50797: (e, t, n) => {
            Object.defineProperty(t, "__esModule", {value: !0}), t.hasAnythingToSaveSelector = void 0;
            var a = n(44645), r = n(33015), i = n(69471);
            t.hasAnythingToSaveSelector = function (e) {
                return (0, a.hasReviewModeBeenUpdatedSelector)(e) || (0, r.hasDraftsOptionBeenUpdatedSelector)(e) || (0, i.hasEnginesBeenUpdatedSelector)(e)
            }
        }, 33015: (e, t) => {
            Object.defineProperty(t, "__esModule", {value: !0}), t.hasDraftsOptionBeenUpdatedSelector = void 0, t.hasDraftsOptionBeenUpdatedSelector = function (e) {
                return e.utility.initialState.shouldTranslateAutomaticallyDrafts !== e.preferences.ate.shouldTranslateAutomaticallyDrafts
            }
        }, 69471: (e, t, n) => {
            Object.defineProperty(t, "__esModule", {value: !0}), t.hasEnginesBeenUpdatedSelector = void 0;
            var a = n(38110);
            t.hasEnginesBeenUpdatedSelector = function (e) {
                return !(0, a.isEqual)(e.utility.initialState.engines, e.translationEngine.engines)
            }
        }, 44645: (e, t) => {
            Object.defineProperty(t, "__esModule", {value: !0}), t.hasReviewModeBeenUpdatedSelector = void 0, t.hasReviewModeBeenUpdatedSelector = function (e) {
                return e.utility.initialState.reviewMode !== e.preferences.ate.reviewMode
            }
        }, 43892: (e, t, n) => {
            Object.defineProperty(t, "__esModule", {value: !0}), t.savingSettingsStatusSelector = void 0;
            var a = n(28740);
            t.savingSettingsStatusSelector = (0, a.createSelector)((function (e) {
                return e.utility.savingInProgress
            }), (function (e) {
                return e.utility.savingError
            }), (function (e, t) {
                return {inProgress: e, error: t}
            }))
        }, 48684: (e, t) => {
            Object.defineProperty(t, "__esModule", {value: !0}), t.TranslationEngineChannel = void 0, t.TranslationEngineChannel = "translation-engine-channel"
        }, 46440: (e, t) => {
            Object.defineProperty(t, "__esModule", {value: !0}), t.UTILITY_STORE = t.TRANSLATION_ENGINE_STORE = void 0, t.TRANSLATION_ENGINE_STORE = "translationEngine", t.UTILITY_STORE = "utility"
        }, 78796: (e, t, n) => {
            Object.defineProperty(t, "__esModule", {value: !0}), t.listenToLegacyAction = void 0;
            var a = n(27701);
            t.listenToLegacyAction = function (e) {
                var t = "WPML-";
                return (0, a.eventChannel)((function (n) {
                    var a = function (e) {
                        n(e.detail)
                    };
                    return document.addEventListener(t + e, a), function () {
                        document.removeEventListener(t + e, a)
                    }
                }))
            }
        }, 43332: function (e, t, n) {
            var a, r, i = this && this.__assign || function () {
                return i = Object.assign || function (e) {
                    for (var t, n = 1, a = arguments.length; n < a; n++) for (var r in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
                    return e
                }, i.apply(this, arguments)
            }, o = this && this.__importDefault || function (e) {
                return e && e.__esModule ? e : {default: e}
            };
            Object.defineProperty(t, "__esModule", {value: !0}), t.AxiosError = void 0;
            var l = o(n(86425)), u = n(86425);
            Object.defineProperty(t, "AxiosError", {
                enumerable: !0, get: function () {
                    return u.AxiosError
                }
            });
            var s = (null === (a = window.wpmlEndpoints) || void 0 === a ? void 0 : a.nonce) || (null === (r = window.wpmlUpdates) || void 0 === r ? void 0 : r.nonce) || "window.[wpmlEndpoints|wpmlUpdates].nonce not found.",
                c = function (e) {
                    return i(i({}, e), {headers: i(i({}, e.headers || {}), {"X-WP-Nonce": s})})
                }, d = l.default.create();
            d.get = function (e, t) {
                return void 0 === t && (t = {}), l.default.get(e, c(t))
            }, d.post = function (e, t, n) {
                return void 0 === t && (t = void 0), void 0 === n && (n = {}), l.default.post(e, t, c(n))
            }, t.default = d
        }, 72481: function (e, t, n) {
            var a = this && this.__importDefault || function (e) {
                return e && e.__esModule ? e : {default: e}
            };
            Object.defineProperty(t, "__esModule", {value: !0}), t.BaseButton = void 0;
            var r = a(n(96540));
            t.BaseButton = function (e) {
                var t = e.onClick, n = e.disabled, a = e.className, i = e.style, o = e.children, l = e.testId,
                    u = e.ariaLabel, s = e.ariaControls, c = e.ariaExpanded, d = e.ariaDisabled;
                return a = "wpml-button base-btn ".concat(null != a ? a : ""), r.default.createElement("button", {
                    onClick: function (e) {
                        d || "function" == typeof t && t(e)
                    },
                    disabled: null != n && n,
                    className: a,
                    style: i,
                    "data-testid": l,
                    "aria-label": u,
                    "aria-controls": s,
                    "aria-expanded": c,
                    "aria-disabled": d
                }, o)
            }
        }, 47599: function (e, t, n) {
            var a = this && this.__importDefault || function (e) {
                return e && e.__esModule ? e : {default: e}
            };
            Object.defineProperty(t, "__esModule", {value: !0}), t.TextButton = void 0;
            var r = a(n(96540)), i = n(72481);
            t.TextButton = function (e) {
                var t = e.onClick, n = e.disabled, a = e.className, o = e.style, l = e.children, u = e.ariaLabel,
                    s = e.testId, c = e.ariaControls, d = e.ariaExpanded, f = e.ariaDisabled;
                return r.default.createElement(i.BaseButton, {
                    onClick: t,
                    disabled: null != n && n,
                    style: o,
                    className: "text-button ".concat(null != a ? a : ""),
                    ariaLabel: u,
                    testId: s,
                    ariaControls: c,
                    ariaExpanded: d,
                    ariaDisabled: f
                }, l)
            }
        }, 96982: function (e, t, n) {
            var a = this && this.__assign || function () {
                return a = Object.assign || function (e) {
                    for (var t, n = 1, a = arguments.length; n < a; n++) for (var r in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
                    return e
                }, a.apply(this, arguments)
            }, r = this && this.__rest || function (e, t) {
                var n = {};
                for (var a in e) Object.prototype.hasOwnProperty.call(e, a) && t.indexOf(a) < 0 && (n[a] = e[a]);
                if (null != e && "function" == typeof Object.getOwnPropertySymbols) {
                    var r = 0;
                    for (a = Object.getOwnPropertySymbols(e); r < a.length; r++) t.indexOf(a[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, a[r]) && (n[a[r]] = e[a[r]])
                }
                return n
            }, i = this && this.__importDefault || function (e) {
                return e && e.__esModule ? e : {default: e}
            };
            Object.defineProperty(t, "__esModule", {value: !0}), t.withOutline = void 0;
            var o = i(n(96540));
            t.withOutline = function (e) {
                return function (t) {
                    var n = t.className, i = t.children, l = r(t, ["className", "children"]);
                    return o.default.createElement(e, a({className: "wpml-button--outlined ".concat(null != n ? n : "")}, l), i)
                }
            }
        }, 63749: function (e, t, n) {
            var a = this && this.__assign || function () {
                return a = Object.assign || function (e) {
                    for (var t, n = 1, a = arguments.length; n < a; n++) for (var r in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
                    return e
                }, a.apply(this, arguments)
            }, r = this && this.__rest || function (e, t) {
                var n = {};
                for (var a in e) Object.prototype.hasOwnProperty.call(e, a) && t.indexOf(a) < 0 && (n[a] = e[a]);
                if (null != e && "function" == typeof Object.getOwnPropertySymbols) {
                    var r = 0;
                    for (a = Object.getOwnPropertySymbols(e); r < a.length; r++) t.indexOf(a[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, a[r]) && (n[a[r]] = e[a[r]])
                }
                return n
            }, i = this && this.__importDefault || function (e) {
                return e && e.__esModule ? e : {default: e}
            };
            Object.defineProperty(t, "__esModule", {value: !0}), t.withTooltip = void 0;
            var o = i(n(96540)), l = n(99465);
            t.withTooltip = function (e) {
                return function (t) {
                    var n = t.tooltipText, i = void 0 === n ? null : n, u = t.testId, s = void 0 === u ? null : u,
                        c = t.className, d = void 0 === c ? "" : c, f = t.children, p = t.additionalAttr,
                        _ = void 0 === p ? {} : p,
                        v = r(t, ["tooltipText", "testId", "className", "children", "additionalAttr"]),
                        E = "tooltip-content";
                    return s && (E = s), o.default.createElement(l.PopoverTooltip, {
                        content: i,
                        testId: E,
                        className: "wpml-tooltip-button",
                        additionalAttr: _
                    }, o.default.createElement(e, a({className: d, testId: "with-tooltip-" + s}, v), f))
                }
            }
        }, 17265: function (e, t, n) {
            var a = this && this.__importDefault || function (e) {
                return e && e.__esModule ? e : {default: e}
            };
            Object.defineProperty(t, "__esModule", {value: !0}), t.Link = void 0;
            var r = a(n(96540));
            t.Link = function (e) {
                var t = e.className, n = void 0 === t ? "" : t, a = e.label, i = void 0 === a ? "" : a, o = e.href,
                    l = e.openInNewTab, u = e.children;
                return r.default.createElement("a", {
                    className: n,
                    href: o,
                    target: l ? "_blank" : "_self",
                    "aria-label": i
                }, u)
            }
        }, 30718: function (e, t, n) {
            var a = this && this.__importDefault || function (e) {
                return e && e.__esModule ? e : {default: e}
            };
            Object.defineProperty(t, "__esModule", {value: !0}), t.Modal = void 0;
            var r = a(n(96540)), i = n(47599), o = n(42382);
            t.Modal = function (e) {
                var t = e.children, n = e.onClose, a = e.className, l = e.dataTestId, u = e.ariaLabel,
                    s = e.ariaLabelledBy;
                return r.default.createElement("div", {
                    className: "dashboard-modal ".concat(null != a ? a : ""),
                    "data-testid": l,
                    role: "dialog",
                    "aria-label": u,
                    "aria-labelledby": s
                }, r.default.createElement("div", {className: "modal-body"}, r.default.createElement(i.TextButton, {
                    className: "modal-close",
                    onClick: n,
                    "aria-label": (0, o.__)("Close modal", "wpml"),
                    testId: "modal-close"
                }, r.default.createElement("i", {className: "otgs-ico otgs-ico-cancel"})), r.default.createElement("div", {className: "modal-content"}, t)))
            }
        }, 11444: function (e, t, n) {
            var a = this && this.__createBinding || (Object.create ? function (e, t, n, a) {
                void 0 === a && (a = n);
                var r = Object.getOwnPropertyDescriptor(t, n);
                r && !("get" in r ? !t.__esModule : r.writable || r.configurable) || (r = {
                    enumerable: !0,
                    get: function () {
                        return t[n]
                    }
                }), Object.defineProperty(e, a, r)
            } : function (e, t, n, a) {
                void 0 === a && (a = n), e[a] = t[n]
            }), r = this && this.__setModuleDefault || (Object.create ? function (e, t) {
                Object.defineProperty(e, "default", {enumerable: !0, value: t})
            } : function (e, t) {
                e.default = t
            }), i = this && this.__importStar || function (e) {
                if (e && e.__esModule) return e;
                var t = {};
                if (null != e) for (var n in e) "default" !== n && Object.prototype.hasOwnProperty.call(e, n) && a(t, e, n);
                return r(t, e), t
            };
            Object.defineProperty(t, "__esModule", {value: !0}), t.useVisibilityContext = t.VisibilityProvider = void 0;
            var o = i(n(96540)), l = (0, o.createContext)(void 0);
            t.useVisibilityContext = function () {
                var e = (0, o.useContext)(l);
                if (!e) throw new Error("useVisibilityContext must be used within a VisibilityProvider");
                return e
            }, t.VisibilityProvider = function (e) {
                var t = e.children, n = e.onOpenedChange, a = (0, o.useState)(!1), r = a[0], i = a[1];
                return (0, o.useEffect)((function () {
                    n && n(r)
                }), [r, n]), o.default.createElement(l.Provider, {
                    value: {
                        opened: r, toggle: function () {
                            i((function (e) {
                                return !e
                            }))
                        }
                    }
                }, t)
            }
        }, 99465: function (e, t, n) {
            var a = this && this.__assign || function () {
                return a = Object.assign || function (e) {
                    for (var t, n = 1, a = arguments.length; n < a; n++) for (var r in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
                    return e
                }, a.apply(this, arguments)
            }, r = this && this.__importDefault || function (e) {
                return e && e.__esModule ? e : {default: e}
            };
            Object.defineProperty(t, "__esModule", {value: !0}), t.PopoverTooltip = void 0;
            var i = r(n(96540)), o = n(34243);
            t.PopoverTooltip = function (e) {
                var t = e.id, n = e.content, r = e.html, l = void 0 !== r && r, u = e.children, s = e.testId,
                    c = void 0 === s ? null : s, d = e.className, f = e.containerClassName, p = e.tag, _ = e.theme,
                    v = void 0 === _ ? "dark" : _, E = e.additionalAttr, m = void 0 === E ? {} : E, g = p || "span",
                    h = "wpml-popover-tooltip wpml-theme-".concat(v, " ").concat(f),
                    b = l ? {"data-tooltip-html": n} : {"data-tooltip-content": n};
                return n || t ? i.default.createElement(g, a({className: d}, b, {
                    "data-tooltip-id": t || o.PopoverTooltipId,
                    "data-tooltip-variant": v,
                    "data-testid": c,
                    "data-tooltip-class-name": h
                }, m), u) : i.default.createElement(g, {className: d}, u)
            }
        }, 34243: function (e, t, n) {
            var a = this && this.__importDefault || function (e) {
                return e && e.__esModule ? e : {default: e}
            };
            Object.defineProperty(t, "__esModule", {value: !0}), t.PopoverTooltipInit = t.PopoverTooltipId = void 0;
            var r = a(n(96540)), i = n(57580);
            t.PopoverTooltipId = "wpml-react-tooltip", t.PopoverTooltipInit = function (e) {
                var n = e.id, a = e.JSXContent, o = void 0 === a ? null : a;
                return r.default.createElement(i.Tooltip, {opacity: 1, id: n || t.PopoverTooltipId, clickable: !0}, o)
            }
        }, 77960: function (e, t, n) {
            var a = this && this.__importDefault || function (e) {
                return e && e.__esModule ? e : {default: e}
            };
            Object.defineProperty(t, "__esModule", {value: !0}), t.ReviewOptions = void 0;
            var r = a(n(96540)), i = n(42382), o = n(38601), l = n(99465),
                u = ["before-publish", "publish-and-review", "no-review"];
            t.ReviewOptions = function (e) {
                var t = e.onChange, n = e.currentReviewOption, a = e.hasAvailableReviewersDifferentThanMe,
                    s = void 0 === a || a, c = e.additionalContent;
                return r.default.createElement(r.default.Fragment, null, r.default.createElement("h4", {id: "review-mode-heading"}, (0, i.__)("What would you like to do after WPML finishes translating your content automatically?", "wpml")), c, u.map((function (e, a) {
                    var i = (0, o.getReviewOptionLabelTooltip)(e);
                    return r.default.createElement("div", {
                        className: "wpml-dashboard__TranslateContentSection__automatic-translation-review-option",
                        key: a
                    }, r.default.createElement("label", {
                        className: "wpml-radio review-options-label",
                        htmlFor: "automatic-translation-review-mode-".concat(e)
                    }, r.default.createElement("input", {
                        type: "radio",
                        name: "automatic-translation-review-mode",
                        id: "automatic-translation-review-mode-".concat(e),
                        "data-testid": "automatic-translation-review-mode-".concat(e),
                        value: e,
                        checked: n === e,
                        onChange: function (e) {
                            u.includes(e.target.value) && t(e.target.value)
                        }
                    }), r.default.createElement("div", null, r.default.createElement("div", {className: "label-wrapper"}, r.default.createElement("b", null, (0, o.getReviewOptionLabel)(e), " "), r.default.createElement(r.default.Fragment, null, (null == i ? void 0 : i.labelTooltipText) && r.default.createElement(l.PopoverTooltip, {
                        testId: "review-option",
                        additionalAttr: {
                            id: "review-option-tooltip",
                            "data-tooltip-place": "top-end",
                            "data-tooltip-class-name": "review-option-tooltip"
                        },
                        content: i.labelTooltipText
                    }, (null == i ? void 0 : i.labelTooltip) && r.default.createElement("span", {className: "wpml-blue-badge with-icon"}, i.labelTooltip)))), r.default.createElement("span", null, (0, o.getReviewOptionDescription)(e, s)))))
                })))
            }
        }, 38601: (e, t, n) => {
            Object.defineProperty(t, "__esModule", {value: !0}), t.getReviewOptionDescription = t.getReviewOptionLabelTooltip = t.getReviewOptionLabel = void 0;
            var a = n(42382), r = {
                "before-publish": {
                    label: (0, a.__)("Wait for review", "wpml"),
                    labelTooltip: (0, a.__)("Recommended with DeepL, Google and Microsoft", "wpml"),
                    labelTooltipText: (0, a.__)("DeepL, Google, and Microsoft deliver great translations, but we recommend a human review to confirm they are correct. WPML AI provides Better Than Human Translations that understand context, so you can confidently skip the review process.", "wpml"),
                    adminTranslatorDescription: (0, a.__)("WPML keeps translations unpublished, so you can review them first.", "wpml"),
                    availableTranslatorsDescription: (0, a.__)("Your translators review and approve translations before publishing.", "wpml")
                },
                "publish-and-review": {
                    label: (0, a.__)("Publish and mark for review", "wpml"),
                    adminTranslatorDescription: (0, a.__)("WPML publishes translations immediately but flags them for you to check at your convenience.", "wpml"),
                    availableTranslatorsDescription: (0, a.__)("WPML publishes translations immediately but flags them for translators to review later.", "wpml")
                },
                "no-review": {
                    label: (0, a.__)("Publish without review", "wpml"),
                    labelTooltip: (0, a.__)("Recommended with WPML AI", "wpml"),
                    labelTooltipText: (0, a.__)("WPML AI provides Better Than Human Translations that rarely need improvements, so you can confidently skip the review process. For other translation engines, a human review is recommended to confirm accuracy.", "wpml"),
                    adminTranslatorDescription: (0, a.__)("WPML publishes translations immediately, skipping the review process.", "wpml"),
                    availableTranslatorsDescription: (0, a.__)("WPML publishes translations immediately, skipping the review process.", "wpml")
                }
            };
            t.getReviewOptionLabel = function (e) {
                return e in r ? r[e].label : ""
            }, t.getReviewOptionLabelTooltip = function (e) {
                return e in r ? {labelTooltip: r[e].labelTooltip, labelTooltipText: r[e].labelTooltipText} : void 0
            }, t.getReviewOptionDescription = function (e, t) {
                if (void 0 === t && (t = !1), e in r) return t ? r[e].availableTranslatorsDescription : r[e].adminTranslatorDescription
            }
        }, 42382: function (e, t, n) {
            var a = this && this.__importDefault || function (e) {
                return e && e.__esModule ? e : {default: e}
            };
            Object.defineProperty(t, "__esModule", {value: !0}), t.createInterpolateElement = t._n = t.__ = t.sprintf = void 0;
            var r = n(84754);
            Object.defineProperty(t, "sprintf", {
                enumerable: !0, get: function () {
                    return r.sprintf
                }
            }), Object.defineProperty(t, "__", {
                enumerable: !0, get: function () {
                    return r.__
                }
            }), Object.defineProperty(t, "_n", {
                enumerable: !0, get: function () {
                    return r._n
                }
            });
            var i = n(77693);
            Object.defineProperty(t, "createInterpolateElement", {
                enumerable: !0, get: function () {
                    return a(i).default
                }
            })
        }, 77693: (e, t, n) => {
            n.r(t), n.d(t, {default: () => p});
            var a = n(96540);
            let r, i, o, l;
            const u = /<(\/)?(\w+)\s*(\/)?>/g;

            function s(e, t, n, a, r) {
                return {element: e, tokenStart: t, tokenLength: n, prevOffset: a, leadingTextStart: r, children: []}
            }

            function c(e) {
                const t = function () {
                    const e = u.exec(r);
                    if (null === e) return ["no-more-tokens"];
                    const t = e.index, [n, a, i, o] = e, l = n.length;
                    return o ? ["self-closed", i, t, l] : a ? ["closer", i, t, l] : ["opener", i, t, l]
                }(), [n, c, p, _] = t, v = l.length, E = p > i ? i : null;
                if (!e[c]) return d(), !1;
                switch (n) {
                    case"no-more-tokens":
                        if (0 !== v) {
                            const {leadingTextStart: e, tokenStart: t} = l.pop();
                            o.push(r.substr(e, t))
                        }
                        return d(), !1;
                    case"self-closed":
                        return 0 === v ? (null !== E && o.push(r.substr(E, p - E)), o.push(e[c]), i = p + _, !0) : (f(s(e[c], p, _)), i = p + _, !0);
                    case"opener":
                        return l.push(s(e[c], p, _, p + _, E)), i = p + _, !0;
                    case"closer":
                        if (1 === v) return function (e) {
                            const {
                                element: t,
                                leadingTextStart: n,
                                prevOffset: i,
                                tokenStart: u,
                                children: s
                            } = l.pop(), c = e ? r.substr(i, e - i) : r.substr(i);
                            c && s.push(c), null !== n && o.push(r.substr(n, u - n)), o.push((0, a.cloneElement)(t, null, ...s))
                        }(p), i = p + _, !0;
                        const t = l.pop(), n = r.substr(t.prevOffset, p - t.prevOffset);
                        t.children.push(n), t.prevOffset = p + _;
                        const u = s(t.element, t.tokenStart, t.tokenLength, p + _);
                        return u.children = t.children, f(u), i = p + _, !0;
                    default:
                        return d(), !1
                }
            }

            function d() {
                const e = r.length - i;
                0 !== e && o.push(r.substr(i, e))
            }

            function f(e) {
                const {element: t, tokenStart: n, tokenLength: i, prevOffset: o, children: u} = e, s = l[l.length - 1],
                    c = r.substr(s.prevOffset, n - s.prevOffset);
                c && s.children.push(c), s.children.push((0, a.cloneElement)(t, null, ...u)), s.prevOffset = o || n + i
            }

            const p = (e, t) => {
                if (r = e, i = 0, o = [], l = [], u.lastIndex = 0, !(e => {
                    const t = "object" == typeof e, n = t && Object.values(e);
                    return t && n.length && n.every((e => (0, a.isValidElement)(e)))
                })(t)) throw new TypeError("The conversionMap provided is not valid. It must be an object with values that are React Elements");
                do {
                } while (c(t));
                return (0, a.createElement)(a.Fragment, null, ...o)
            }
        }, 38110: e => {
            e.exports = lodash
        }, 84754: e => {
            e.exports = window.wp.i18n
        }
    }, n = {};

    function a(e) {
        var r = n[e];
        if (void 0 !== r) return r.exports;
        var i = n[e] = {exports: {}};
        return t[e].call(i.exports, i, i.exports, a), i.exports
    }

    a.m = t, e = [], a.O = (t, n, r, i) => {
        if (!n) {
            var o = 1 / 0;
            for (c = 0; c < e.length; c++) {
                for (var [n, r, i] = e[c], l = !0, u = 0; u < n.length; u++) (!1 & i || o >= i) && Object.keys(a.O).every((e => a.O[e](n[u]))) ? n.splice(u--, 1) : (l = !1, i < o && (o = i));
                if (l) {
                    e.splice(c--, 1);
                    var s = r();
                    void 0 !== s && (t = s)
                }
            }
            return t
        }
        i = i || 0;
        for (var c = e.length; c > 0 && e[c - 1][2] > i; c--) e[c] = e[c - 1];
        e[c] = [n, r, i]
    }, a.n = e => {
        var t = e && e.__esModule ? () => e.default : () => e;
        return a.d(t, {a: t}), t
    }, a.d = (e, t) => {
        for (var n in t) a.o(t, n) && !a.o(e, n) && Object.defineProperty(e, n, {enumerable: !0, get: t[n]})
    }, a.g = function () {
        if ("object" == typeof globalThis) return globalThis;
        try {
            return this || new Function("return this")()
        } catch (e) {
            if ("object" == typeof window) return window
        }
    }(), a.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t), a.r = e => {
        "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {value: "Module"}), Object.defineProperty(e, "__esModule", {value: !0})
    }, a.j = 245, (() => {
        var e = {245: 0};
        a.O.j = t => 0 === e[t];
        var t = (t, n) => {
            var r, i, [o, l, u] = n, s = 0;
            if (o.some((t => 0 !== e[t]))) {
                for (r in l) a.o(l, r) && (a.m[r] = l[r]);
                if (u) var c = u(a)
            }
            for (t && t(n); s < o.length; s++) i = o[s], a.o(e, i) && e[i] && e[i][0](), e[i] = 0;
            return a.O(c)
        }, n = globalThis.webpackChunkwpml = globalThis.webpackChunkwpml || [];
        n.forEach(t.bind(null, 0)), n.push = t.bind(null, n.push.bind(n))
    })();
    var r = a.O(void 0, [843], (() => a(13211)));
    r = a.O(r)
})();