"use strict";
var __webpack_modules__ = {
    "../api-client": function(module) {
        module.exports = require("../api-client/index.js");
    },
    "../application/Plugin": function(module) {
        module.exports = require("../application/Plugin.js");
    },
    "../application": function(module) {
        module.exports = require("../application/index.js");
    },
    "../block-provider/PageLayout": function(module) {
        module.exports = require("../block-provider/PageLayout.js");
    },
    "../collection-manager": function(module) {
        module.exports = require("../collection-manager/index.js");
    },
    "../route-switch": function(module) {
        module.exports = require("../route-switch/index.js");
    },
    "../schema-component/antd/error-fallback": function(module) {
        module.exports = require("../schema-component/antd/error-fallback/index.js");
    },
    "../schema-component": function(module) {
        module.exports = require("../schema-component/index.js");
    },
    "../schema-initializer/SchemaInitializerPlugin": function(module) {
        module.exports = require("../schema-initializer/SchemaInitializerPlugin.js");
    },
    "../schema-initializer": function(module) {
        module.exports = require("../schema-initializer/index.js");
    },
    "../schema-settings": function(module) {
        module.exports = require("../schema-settings/index.js");
    },
    "../schema-templates": function(module) {
        module.exports = require("../schema-templates/index.js");
    },
    "../user": function(module) {
        module.exports = require("../user/index.js");
    },
    "./acl/ACLPlugin": function(module) {
        module.exports = require("./acl/ACLPlugin.js");
    },
    "./admin-layout/AdminLayoutPlugin": function(module) {
        module.exports = require("./admin-layout/AdminLayoutPlugin.js");
    },
    "./admin-layout/components/WelcomeCard": function(module) {
        module.exports = require("./admin-layout/components/WelcomeCard.js");
    },
    "./admin-layout": function(module) {
        module.exports = require("./admin-layout/index.js");
    },
    "./attachment-preview": function(module) {
        module.exports = require("./attachment-preview/index.js");
    },
    "./block-schema-component": function(module) {
        module.exports = require("./block-schema-component/index.js");
    },
    "./context-menu": function(module) {
        module.exports = require("./context-menu/index.js");
    },
    "./context-menu/useContextMenu": function(module) {
        module.exports = require("./context-menu/useContextMenu.js");
    },
    "./document-title": function(module) {
        module.exports = require("./document-title/index.js");
    },
    "./dynamic-page": function(module) {
        module.exports = require("./dynamic-page/index.js");
    },
    "./locale/LocalePlugin": function(module) {
        module.exports = require("./locale/LocalePlugin.js");
    },
    "./page-style": function(module) {
        module.exports = require("./page-style/index.js");
    },
    "./pinned-list/PluginPinnedList": function(module) {
        module.exports = require("./pinned-list/PluginPinnedList.js");
    },
    "./pm": function(module) {
        module.exports = require("./pm/index.js");
    },
    "./quick-access": function(module) {
        module.exports = require("./quick-access/index.js");
    },
    "./scroll-assistant": function(module) {
        module.exports = require("./scroll-assistant/index.js");
    },
    "./system-settings": function(module) {
        module.exports = require("./system-settings/index.js");
    },
    "./system-version": function(module) {
        module.exports = require("./system-version/index.js");
    },
    "./user-settings": function(module) {
        module.exports = require("./user-settings/index.js");
    },
    "@ant-design/icons": function(module) {
        module.exports = require("@ant-design/icons");
    },
    "@emotion/css": function(module) {
        module.exports = require("@emotion/css");
    },
    "@lottiefiles/dotlottie-react": function(module) {
        module.exports = require("@lottiefiles/dotlottie-react");
    },
    "@tachybase/schema": function(module) {
        module.exports = require("@tachybase/schema");
    },
    "@tachybase/sdk": function(module) {
        module.exports = require("@tachybase/sdk");
    },
    antd: function(module) {
        module.exports = require("antd");
    },
    "antd-style": function(module) {
        module.exports = require("antd-style");
    },
    "react-i18next": function(module) {
        module.exports = require("react-i18next");
    },
    "react-router-dom": function(module) {
        module.exports = require("react-router-dom");
    },
    "react/jsx-runtime": function(module) {
        module.exports = require("react/jsx-runtime");
    }
};
var __webpack_module_cache__ = {};
function __webpack_require__(moduleId) {
    var cachedModule = __webpack_module_cache__[moduleId];
    if (void 0 !== cachedModule) return cachedModule.exports;
    var module = __webpack_module_cache__[moduleId] = {
        exports: {}
    };
    __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
    return module.exports;
}
(()=>{
    __webpack_require__.n = function(module) {
        var getter = module && module.__esModule ? function() {
            return module['default'];
        } : function() {
            return module;
        };
        __webpack_require__.d(getter, {
            a: getter
        });
        return getter;
    };
})();
(()=>{
    __webpack_require__.d = function(exports1, definition) {
        for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
            enumerable: true,
            get: definition[key]
        });
    };
})();
(()=>{
    __webpack_require__.o = function(obj, prop) {
        return Object.prototype.hasOwnProperty.call(obj, prop);
    };
})();
(()=>{
    __webpack_require__.r = function(exports1) {
        if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
            value: 'Module'
        });
        Object.defineProperty(exports1, '__esModule', {
            value: true
        });
    };
})();
var __webpack_exports__ = {};
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
    AdminLayout: function() {
        return _admin_layout__WEBPACK_IMPORTED_MODULE_40__.AdminLayout;
    },
    AdminProvider: function() {
        return _admin_layout__WEBPACK_IMPORTED_MODULE_40__.AdminProvider;
    },
    AppNotFound: function() {
        return AppNotFound;
    },
    BuiltInPlugin: function() {
        return BuiltInPlugin;
    },
    NoticeArea: function() {
        return _admin_layout__WEBPACK_IMPORTED_MODULE_40__.NoticeArea;
    }
});
var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("react/jsx-runtime");
var _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("@tachybase/schema");
var _tachybase_sdk__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("@tachybase/sdk");
var _ant_design_icons__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("@ant-design/icons");
var _emotion_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("@emotion/css");
var _lottiefiles_dotlottie_react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("@lottiefiles/dotlottie-react");
var antd__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("antd");
var antd_style__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("antd-style");
var react_i18next__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("react-i18next");
var react_router_dom__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("react-router-dom");
var _api_client__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("../api-client");
var _application__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("../application");
var _application_Plugin__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("../application/Plugin");
var _block_provider_PageLayout__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("../block-provider/PageLayout");
var _collection_manager__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__("../collection-manager");
var _route_switch__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__("../route-switch");
var _schema_component__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__("../schema-component");
var _schema_component_antd_error_fallback__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__("../schema-component/antd/error-fallback");
var _schema_initializer__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__("../schema-initializer");
var _schema_initializer_SchemaInitializerPlugin__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__("../schema-initializer/SchemaInitializerPlugin");
var _schema_settings__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__("../schema-settings");
var _schema_templates__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__("../schema-templates");
var _user__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__("../user");
var _acl_ACLPlugin__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__("./acl/ACLPlugin");
var _admin_layout_AdminLayoutPlugin__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__("./admin-layout/AdminLayoutPlugin");
var _admin_layout_components_WelcomeCard__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__("./admin-layout/components/WelcomeCard");
var _attachment_preview__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__("./attachment-preview");
var _block_schema_component__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__("./block-schema-component");
var _context_menu__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__("./context-menu");
var _document_title__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__("./document-title");
var _dynamic_page__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__("./dynamic-page");
var _locale_LocalePlugin__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__("./locale/LocalePlugin");
var _page_style__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__("./page-style");
var _pinned_list_PluginPinnedList__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__("./pinned-list/PluginPinnedList");
var _pm__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__("./pm");
var _quick_access__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__("./quick-access");
var _scroll_assistant__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__("./scroll-assistant");
var _system_settings__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__("./system-settings");
var _system_version__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__("./system-version");
var _user_settings__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__("./user-settings");
var _admin_layout__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__("./admin-layout");
var _context_menu_useContextMenu__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__("./context-menu/useContextMenu");
var __WEBPACK_REEXPORT_OBJECT__ = {};
for(var __WEBPACK_IMPORT_KEY__ in _context_menu_useContextMenu__WEBPACK_IMPORTED_MODULE_41__)if ([
    "AdminProvider",
    "BuiltInPlugin",
    "NoticeArea",
    "AdminLayout",
    "AppNotFound",
    "default"
].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
    return _context_menu_useContextMenu__WEBPACK_IMPORTED_MODULE_41__[key];
}).bind(0, __WEBPACK_IMPORT_KEY__);
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
function _tagged_template_literal(strings, raw) {
    if (!raw) raw = strings.slice(0);
    return Object.freeze(Object.defineProperties(strings, {
        raw: {
            value: Object.freeze(raw)
        }
    }));
}
function _templateObject() {
    const data = _tagged_template_literal([
        "\n        display: flex;\n        justify-content: center;\n        align-items: center;\n        width: 100vw;\n        height: 100vh;\n        background-color: #f5f5f5;\n        overflow: hidden;\n      "
    ]);
    _templateObject = function() {
        return data;
    };
    return data;
}
function _templateObject1() {
    const data = _tagged_template_literal([
        "\n      top: 50%;\n      position: absolute;\n      width: 100%;\n      transform: translate(0, -50%);\n    "
    ]);
    _templateObject1 = function() {
        return data;
    };
    return data;
}
const AppSpin = ()=>/*#__PURE__*/ (0, react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
        className: (0, _emotion_css__WEBPACK_IMPORTED_MODULE_4__.css)(_templateObject()),
        children: /*#__PURE__*/ (0, react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_lottiefiles_dotlottie_react__WEBPACK_IMPORTED_MODULE_5__.DotLottieReact, {
            style: {
                width: '100%',
                maxWidth: '640px'
            },
            src: "https://assets.tachybase.com/imgs/spin.lottie",
            loop: true,
            autoplay: true
        })
    });
const useStyles = (0, antd_style__WEBPACK_IMPORTED_MODULE_7__.createStyles)((param)=>{
    let { css } = param;
    return {
        modal: css(_templateObject1())
    };
});
const useErrorProps = (app, error)=>{
    var _error_response_data_errors, _error_response_data, _error_response;
    const api = (0, _api_client__WEBPACK_IMPORTED_MODULE_10__.useAPIClient)();
    if (!error) return {};
    const err = (null == error ? void 0 : null === (_error_response = error.response) || void 0 === _error_response ? void 0 : null === (_error_response_data = _error_response.data) || void 0 === _error_response_data ? void 0 : null === (_error_response_data_errors = _error_response_data.errors) || void 0 === _error_response_data_errors ? void 0 : _error_response_data_errors[0]) || error;
    const subApp = (0, _tachybase_sdk__WEBPACK_IMPORTED_MODULE_2__.getSubAppName)(app.getPublicPath());
    switch(err.code){
        case 'USER_HAS_NO_ROLES_ERR':
            return {
                title: app.i18n.t('Permission denied'),
                subTitle: err.message,
                extra: [
                    /*#__PURE__*/ (0, react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(antd__WEBPACK_IMPORTED_MODULE_6__.Button, {
                        type: "primary",
                        onClick: ()=>{
                            api.auth.setToken(null);
                            window.location.reload();
                        },
                        children: app.i18n.t('Sign in with another account')
                    }, "try"),
                    subApp ? /*#__PURE__*/ (0, react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(antd__WEBPACK_IMPORTED_MODULE_6__.Button, {
                        onClick: ()=>window.location.href = '/admin',
                        children: app.i18n.t('Return to the main application')
                    }, "back") : null
                ]
            };
        default:
            return {};
    }
};
const AppError = (0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__.observer)((param)=>{
    let { app, error } = param;
    const props = useErrorProps(app, error);
    const { styles } = useStyles();
    return /*#__PURE__*/ (0, react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
        children: /*#__PURE__*/ (0, react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(antd__WEBPACK_IMPORTED_MODULE_6__.Result, {
            className: styles.modal,
            status: "error",
            title: app.i18n.t('App error'),
            subTitle: app.i18n.t(null == error ? void 0 : error.message),
            extra: [
                /*#__PURE__*/ (0, react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(antd__WEBPACK_IMPORTED_MODULE_6__.Button, {
                    type: "primary",
                    onClick: ()=>window.location.reload(),
                    children: app.i18n.t('Try again')
                }, "try")
            ],
            ...props
        })
    });
}, {
    displayName: 'AppError'
});
const getProps = (app)=>{
    if (app.ws.serverDown) return {
        status: 'error',
        icon: /*#__PURE__*/ (0, react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ant_design_icons__WEBPACK_IMPORTED_MODULE_3__.DisconnectOutlined, {}),
        title: "You're offline",
        subTitle: 'Please check the server status or network connection status'
    };
    if (!app.error) return {};
    if ('APP_NOT_FOUND' === app.error.code) {
        var _app_error;
        return {
            status: 'warning',
            title: 'App not found',
            subTitle: null === (_app_error = app.error) || void 0 === _app_error ? void 0 : _app_error.message
        };
    }
    if ('APP_INITIALIZING' === app.error.code) {
        var _app_error1;
        return {
            status: 'info',
            icon: /*#__PURE__*/ (0, react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ant_design_icons__WEBPACK_IMPORTED_MODULE_3__.LoadingOutlined, {}),
            title: 'App initializing',
            subTitle: null === (_app_error1 = app.error) || void 0 === _app_error1 ? void 0 : _app_error1.message
        };
    }
    if ('APP_INITIALIZED' === app.error.code) {
        var _app_error2;
        return {
            status: 'warning',
            title: 'App initialized',
            subTitle: null === (_app_error2 = app.error) || void 0 === _app_error2 ? void 0 : _app_error2.message
        };
    }
    if ('APP_ERROR' === app.error.code || 'LOAD_ERROR' === app.error.code) {
        var _app_error3;
        return {
            status: 'error',
            title: 'App error',
            subTitle: null === (_app_error3 = app.error) || void 0 === _app_error3 ? void 0 : _app_error3.message
        };
    }
    if ('APP_NOT_INSTALLED_ERROR' === app.error.code) {
        var _app_error4;
        return {
            status: 'warning',
            title: 'App not installed',
            subTitle: null === (_app_error4 = app.error) || void 0 === _app_error4 ? void 0 : _app_error4.message
        };
    }
    if ('APP_STOPPED' === app.error.code) {
        var _app_error5;
        return {
            status: 'warning',
            title: 'App stopped',
            subTitle: null === (_app_error5 = app.error) || void 0 === _app_error5 ? void 0 : _app_error5.message
        };
    }
    if ('APP_COMMANDING' === app.error.code) {
        var _app_error_command, _app_error6, _app_error7, _app_error_command1, _app_error8;
        const props = {
            status: 'info',
            icon: /*#__PURE__*/ (0, react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ant_design_icons__WEBPACK_IMPORTED_MODULE_3__.LoadingOutlined, {}),
            title: null === (_app_error6 = app.error) || void 0 === _app_error6 ? void 0 : null === (_app_error_command = _app_error6.command) || void 0 === _app_error_command ? void 0 : _app_error_command.name,
            subTitle: null === (_app_error7 = app.error) || void 0 === _app_error7 ? void 0 : _app_error7.message
        };
        const commands = {
            start: {
                title: 'App starting'
            },
            restart: {
                title: 'App restarting'
            },
            install: {
                title: 'App installing'
            },
            upgrade: {
                title: 'App upgrading'
            },
            'pm.add': {
                title: 'Adding plugin'
            },
            'pm.update': {
                title: 'Updating plugin'
            },
            'pm.enable': {
                title: 'Enabling plugin'
            },
            'pm.disable': {
                title: 'Disabling plugin'
            },
            'pm.remove': {
                title: 'Removing plugin'
            },
            refreshEventSource: {
                title: 'Refreshing event source'
            }
        };
        return {
            ...props,
            ...commands[null === (_app_error8 = app.error) || void 0 === _app_error8 ? void 0 : null === (_app_error_command1 = _app_error8.command) || void 0 === _app_error_command1 ? void 0 : _app_error_command1.name]
        };
    }
    return {};
};
const AppMaintaining = (0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__.observer)((param)=>{
    let { app } = param;
    const { icon, status, title, subTitle } = getProps(app);
    const { styles } = useStyles();
    return /*#__PURE__*/ (0, react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
        children: /*#__PURE__*/ (0, react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(antd__WEBPACK_IMPORTED_MODULE_6__.Result, {
            className: styles.modal,
            icon: icon,
            status: status,
            title: app.i18n.t(title),
            subTitle: app.i18n.t(subTitle)
        })
    });
}, {
    displayName: 'AppMaintaining'
});
const AppMaintainingDialog = (0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__.observer)((param)=>{
    let { app } = param;
    const { icon, status, title, subTitle } = getProps(app);
    const manager = app.noticeManager;
    manager.status(app.i18n.t(title) + ' ' + app.i18n.t(subTitle), _application__WEBPACK_IMPORTED_MODULE_11__.NoticeLevel.INFO);
    return null;
}, {
    displayName: 'AppMaintainingDialog'
});
const AppNotFound = ()=>{
    const { t } = (0, react_i18next__WEBPACK_IMPORTED_MODULE_8__.useTranslation)();
    const app = (0, _application__WEBPACK_IMPORTED_MODULE_11__.useApp)();
    return /*#__PURE__*/ (0, react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(antd__WEBPACK_IMPORTED_MODULE_6__.Result, {
        status: "404",
        title: "404",
        subTitle: t('Sorry, the page you visited does not exist.'),
        extra: /*#__PURE__*/ (0, react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(antd__WEBPACK_IMPORTED_MODULE_6__.Button, {
            onClick: ()=>location.href = app.adminUrl,
            type: "primary",
            children: t('Back Home')
        })
    });
};
class BuiltInPlugin extends _application_Plugin__WEBPACK_IMPORTED_MODULE_12__.Plugin {
    async afterAdd() {
        this.app.addComponents({
            AppSpin,
            AppError,
            AppMaintaining,
            AppMaintainingDialog,
            AppNotFound
        });
        await this.addPlugins();
    }
    async load() {
        this.addComponents();
        this.addRoutes();
        this.app.use(_user__WEBPACK_IMPORTED_MODULE_22__.CurrentUserProvider);
        this.app.use(_user__WEBPACK_IMPORTED_MODULE_22__.CurrentUserSettingsMenuProvider);
        this.addSystemSettingGroups();
    }
    addSystemSettingGroups() {
        this.app.systemSettingsManager.add('id-auth', {
            title: this.t('Identity and Authentication'),
            icon: 'UserOutlined',
            sort: -50
        });
        this.app.systemSettingsManager.add('data-modeling', {
            title: this.t('Data Modeling'),
            icon: 'DatabaseOutlined',
            sort: -40
        });
        this.app.systemSettingsManager.add('business-components', {
            title: this.t('Business Components'),
            icon: 'BlockOutlined',
            sort: -30
        });
        this.app.systemSettingsManager.add('security', {
            title: this.t('Security'),
            icon: 'SafetyOutlined',
            sort: -20
        });
        this.app.systemSettingsManager.add('system-services', {
            title: this.t('System Services'),
            icon: 'CloudServerOutlined',
            sort: -10
        });
    }
    addRoutes() {
        this.router.add('root', {
            path: '/',
            element: /*#__PURE__*/ (0, react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_router_dom__WEBPACK_IMPORTED_MODULE_9__.Navigate, {
                replace: true,
                to: "/admin"
            })
        });
        this.router.add('not-found', {
            path: '*',
            Component: AppNotFound
        });
        this.router.add('app', {
            path: '/:entry',
            Component: 'AdminLayout'
        });
        this.router.add('app.page', {
            path: '/:entry/:name',
            Component: 'RouteSchemaComponent'
        });
    }
    addComponents() {
        this.app.addComponents({
            ErrorFallback: _schema_component_antd_error_fallback__WEBPACK_IMPORTED_MODULE_17__.ErrorFallback,
            RouteSchemaComponent: _route_switch__WEBPACK_IMPORTED_MODULE_15__.RouteSchemaComponent,
            BlockTemplatePage: _schema_templates__WEBPACK_IMPORTED_MODULE_21__.BlockTemplatePage,
            BlockTemplateDetails: _schema_templates__WEBPACK_IMPORTED_MODULE_21__.BlockTemplateDetails,
            WelcomeCard: _admin_layout_components_WelcomeCard__WEBPACK_IMPORTED_MODULE_25__.WelcomeCard,
            PageLayout: _block_provider_PageLayout__WEBPACK_IMPORTED_MODULE_13__.PageLayout
        });
    }
    async addPlugins() {
        await this.app.pm.add(_schema_initializer__WEBPACK_IMPORTED_MODULE_18__.AssociationFilterPlugin);
        await this.app.pm.add(_locale_LocalePlugin__WEBPACK_IMPORTED_MODULE_31__.LocalePlugin, {
            name: 'builtin-locale'
        });
        await this.app.pm.add(_admin_layout_AdminLayoutPlugin__WEBPACK_IMPORTED_MODULE_24__.AdminLayoutPlugin, {
            name: 'admin-layout'
        });
        await this.app.pm.add(_system_settings__WEBPACK_IMPORTED_MODULE_37__.SystemSettingsPlugin, {
            name: 'system-setting'
        });
        await this.app.pm.add(_pinned_list_PluginPinnedList__WEBPACK_IMPORTED_MODULE_33__.PluginPinnedList, {
            name: 'pinned-list',
            config: {
                items: {
                    ui: {
                        order: 50,
                        component: 'DesignableSwitch',
                        pin: true,
                        snippet: 'ui.*',
                        belongTo: 'pinnedmenu'
                    },
                    wf: {
                        order: 100,
                        component: 'WorkflowLink',
                        pin: true,
                        snippet: 'pm.*',
                        belongTo: 'pinnedmenu'
                    },
                    ds: {
                        order: 200,
                        component: 'DatasourceLink',
                        pin: true,
                        snippet: 'pm.*',
                        belongTo: 'pinnedmenu'
                    },
                    sc: {
                        order: 400,
                        component: 'SettingsCenterDropdown',
                        pin: true,
                        snippet: 'pm.*',
                        isPublic: true,
                        belongTo: 'pinnedmenu'
                    },
                    ca: {
                        order: 300,
                        component: 'CalculatorButton',
                        pin: true,
                        isPublic: true,
                        belongTo: 'hoverbutton'
                    },
                    cm: {
                        order: 90,
                        component: 'ContextMenuButton',
                        pin: true,
                        isPublic: true,
                        belongTo: 'hoverbutton'
                    },
                    db: {
                        order: 60,
                        component: 'DesignableButton',
                        pin: true,
                        snippet: 'ui.*',
                        belongTo: 'hoverbutton'
                    },
                    saj: {
                        order: 30,
                        component: 'SearchAndJumpButton',
                        pin: true,
                        snippet: 'pm.*',
                        belongTo: 'hoverbutton'
                    },
                    ai: {
                        order: 330,
                        component: 'AIChatButton',
                        pin: true,
                        isPublic: true,
                        belongTo: 'hoverbutton'
                    }
                }
            }
        });
        await this.app.pm.add(_schema_component__WEBPACK_IMPORTED_MODULE_16__.SchemaComponentPlugin, {
            name: 'schema-component'
        });
        await this.app.pm.add(_schema_initializer_SchemaInitializerPlugin__WEBPACK_IMPORTED_MODULE_19__.SchemaInitializerPlugin, {
            name: 'schema-initializer'
        });
        await this.app.pm.add(_schema_settings__WEBPACK_IMPORTED_MODULE_20__.SchemaSettingsPlugin, {
            name: 'schema-settings'
        });
        await this.app.pm.add(_block_schema_component__WEBPACK_IMPORTED_MODULE_27__.PluginBlockSchemaComponent, {
            name: 'block-schema-component'
        });
        await this.app.pm.add(_schema_component__WEBPACK_IMPORTED_MODULE_16__.AntdSchemaComponentPlugin, {
            name: 'antd-schema-component'
        });
        await this.app.pm.add(_acl_ACLPlugin__WEBPACK_IMPORTED_MODULE_23__.ACLPlugin, {
            name: 'builtin-acl'
        });
        await this.app.pm.add(_document_title__WEBPACK_IMPORTED_MODULE_29__.RemoteDocumentTitlePlugin, {
            name: 'remote-document-title'
        });
        await this.app.pm.add(_pm__WEBPACK_IMPORTED_MODULE_34__.PMPlugin, {
            name: 'builtin-pm'
        });
        await this.app.pm.add(_collection_manager__WEBPACK_IMPORTED_MODULE_14__.CollectionPlugin, {
            name: 'builtin-collection'
        });
        await this.app.pm.add(_context_menu__WEBPACK_IMPORTED_MODULE_28__.PluginContextMenu, {
            name: 'context-menu'
        });
        await this.app.pm.add(_user_settings__WEBPACK_IMPORTED_MODULE_39__.UserSettingsPlugin, {
            name: 'user-settings'
        });
        await this.app.pm.add(_attachment_preview__WEBPACK_IMPORTED_MODULE_26__.AttachmentPreviewPlugin, {
            name: 'attachment-preview'
        });
        await this.app.pm.add(_page_style__WEBPACK_IMPORTED_MODULE_32__.PluginPageStyle, {
            name: 'page-style'
        });
        await this.app.pm.add(_quick_access__WEBPACK_IMPORTED_MODULE_35__.QuickAccessPlugin, {
            name: 'quick-access'
        });
        await this.app.pm.add(_scroll_assistant__WEBPACK_IMPORTED_MODULE_36__.ScrollAssistantPlugin, {
            name: 'scroll-assistant'
        });
        await this.app.pm.add(_dynamic_page__WEBPACK_IMPORTED_MODULE_30__.PluginDynamicPage, {
            name: 'dynamic-page'
        });
        await this.app.pm.add(_system_version__WEBPACK_IMPORTED_MODULE_38__.PluginSystemVersion, {
            name: 'system-version'
        });
    }
}
var __webpack_export_target__ = exports;
for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
    value: true
});
