From 1c22148d7b620301c59a750f0838bfcd9a95a9ce Mon Sep 17 00:00:00 2001 From: Bastian Allgeier Date: Mon, 27 Jun 2022 10:02:22 +0200 Subject: [PATCH] Upgrade to 3.7.0 --- kirby/.editorconfig | 0 kirby/CONTRIBUTING.md | 0 kirby/LICENSE.md | 0 kirby/README.md | 0 kirby/SECURITY.md | 0 kirby/assets/whoops.css | 0 kirby/bootstrap.php | 0 kirby/cacert.pem | 0 kirby/composer.json | 32 +- kirby/composer.lock | 76 +- kirby/config/aliases.php | 1 + kirby/config/api/authentication.php | 0 kirby/config/api/collections.php | 0 kirby/config/api/models.php | 0 kirby/config/api/models/File.php | 7 - kirby/config/api/models/FileBlueprint.php | 0 kirby/config/api/models/FileVersion.php | 0 kirby/config/api/models/Language.php | 0 kirby/config/api/models/Page.php | 15 +- kirby/config/api/models/PageBlueprint.php | 0 kirby/config/api/models/Role.php | 0 kirby/config/api/models/Site.php | 0 kirby/config/api/models/SiteBlueprint.php | 0 kirby/config/api/models/System.php | 0 kirby/config/api/models/Translation.php | 0 kirby/config/api/models/User.php | 0 kirby/config/api/models/UserBlueprint.php | 0 kirby/config/api/routes.php | 0 kirby/config/api/routes/auth.php | 0 kirby/config/api/routes/files.php | 0 kirby/config/api/routes/languages.php | 0 kirby/config/api/routes/lock.php | 47 - kirby/config/api/routes/pages.php | 15 +- kirby/config/api/routes/roles.php | 10 +- kirby/config/api/routes/site.php | 15 +- kirby/config/api/routes/system.php | 0 kirby/config/api/routes/translations.php | 0 kirby/config/api/routes/users.php | 0 kirby/config/areas/account.php | 4 +- kirby/config/areas/account/dialogs.php | 0 kirby/config/areas/account/dropdowns.php | 0 kirby/config/areas/account/views.php | 5 +- kirby/config/areas/files/dialogs.php | 13 +- kirby/config/areas/files/dropdowns.php | 0 kirby/config/areas/installation.php | 3 +- kirby/config/areas/languages.php | 4 +- kirby/config/areas/languages/dialogs.php | 46 +- kirby/config/areas/languages/views.php | 3 +- kirby/config/areas/login.php | 3 +- kirby/config/areas/site.php | 5 +- kirby/config/areas/site/dialogs.php | 114 +- kirby/config/areas/site/dropdowns.php | 0 kirby/config/areas/site/searches.php | 10 +- kirby/config/areas/site/views.php | 3 +- kirby/config/areas/system.php | 4 +- kirby/config/areas/system/dialogs.php | 53 +- kirby/config/areas/system/views.php | 18 +- kirby/config/areas/users.php | 4 +- kirby/config/areas/users/dialogs.php | 64 +- kirby/config/areas/users/dropdowns.php | 0 kirby/config/areas/users/searches.php | 6 +- kirby/config/areas/users/views.php | 7 +- kirby/config/blocks/code/code.php | 0 kirby/config/blocks/code/code.yml | 0 kirby/config/blocks/gallery/gallery.php | 0 kirby/config/blocks/gallery/gallery.yml | 0 kirby/config/blocks/heading/heading.php | 0 kirby/config/blocks/heading/heading.yml | 0 kirby/config/blocks/image/image.php | 4 +- kirby/config/blocks/image/image.yml | 0 kirby/config/blocks/line/line.php | 0 kirby/config/blocks/line/line.yml | 0 kirby/config/blocks/list/list.php | 0 kirby/config/blocks/list/list.yml | 0 kirby/config/blocks/markdown/markdown.php | 0 kirby/config/blocks/markdown/markdown.yml | 0 kirby/config/blocks/quote/quote.php | 0 kirby/config/blocks/quote/quote.yml | 0 kirby/config/blocks/table/table.yml | 0 kirby/config/blocks/text/text.php | 0 kirby/config/blocks/text/text.yml | 0 kirby/config/blocks/video/video.php | 8 +- kirby/config/blocks/video/video.yml | 0 kirby/config/blueprints/blocks/code.yml | 0 kirby/config/blueprints/blocks/heading.yml | 0 kirby/config/blueprints/blocks/image.yml | 0 kirby/config/blueprints/blocks/quote.yml | 0 kirby/config/blueprints/blocks/table.yml | 0 kirby/config/blueprints/blocks/text.yml | 0 kirby/config/blueprints/blocks/video.yml | 0 kirby/config/blueprints/files/default.yml | 0 kirby/config/blueprints/pages/default.yml | 0 kirby/config/blueprints/site.yml | 0 kirby/config/components.php | 29 +- kirby/config/fields/checkboxes.php | 0 kirby/config/fields/date.php | 0 kirby/config/fields/email.php | 0 kirby/config/fields/files.php | 0 kirby/config/fields/gap.php | 0 kirby/config/fields/headline.php | 0 kirby/config/fields/hidden.php | 0 kirby/config/fields/info.php | 0 kirby/config/fields/line.php | 0 kirby/config/fields/list.php | 0 kirby/config/fields/mixins/datetime.php | 0 kirby/config/fields/mixins/filepicker.php | 0 kirby/config/fields/mixins/layout.php | 0 kirby/config/fields/mixins/min.php | 0 kirby/config/fields/mixins/options.php | 0 kirby/config/fields/mixins/pagepicker.php | 0 kirby/config/fields/mixins/picker.php | 0 kirby/config/fields/mixins/upload.php | 0 kirby/config/fields/mixins/userpicker.php | 0 kirby/config/fields/multiselect.php | 0 kirby/config/fields/number.php | 0 kirby/config/fields/pages.php | 3 +- kirby/config/fields/radio.php | 0 kirby/config/fields/range.php | 0 kirby/config/fields/select.php | 0 kirby/config/fields/slug.php | 0 kirby/config/fields/structure.php | 11 + kirby/config/fields/tags.php | 0 kirby/config/fields/tel.php | 0 kirby/config/fields/text.php | 0 kirby/config/fields/textarea.php | 0 kirby/config/fields/time.php | 0 kirby/config/fields/toggle.php | 0 kirby/config/fields/toggles.php | 41 + kirby/config/fields/url.php | 0 kirby/config/fields/users.php | 3 +- kirby/config/fields/writer.php | 0 kirby/config/helpers.php | 1472 ++++++++--------- kirby/config/methods.php | 2 +- kirby/config/presets/files.php | 4 +- kirby/config/presets/page.php | 6 +- kirby/config/presets/pages.php | 8 +- kirby/config/routes.php | 0 kirby/config/sections/fields.php | 0 kirby/config/sections/files.php | 85 +- kirby/config/sections/info.php | 0 kirby/config/sections/mixins/details.php | 36 + kirby/config/sections/mixins/empty.php | 0 kirby/config/sections/mixins/headline.php | 12 +- kirby/config/sections/mixins/help.php | 0 kirby/config/sections/mixins/layout.php | 117 +- kirby/config/sections/mixins/max.php | 0 kirby/config/sections/mixins/min.php | 0 kirby/config/sections/mixins/pagination.php | 5 +- kirby/config/sections/mixins/parent.php | 0 kirby/config/sections/mixins/search.php | 19 + kirby/config/sections/mixins/sort.php | 53 + kirby/config/sections/pages.php | 136 +- kirby/config/sections/stats.php | 62 + kirby/config/setup.php | 0 kirby/config/tags.php | 0 kirby/config/templates/emails/auth/login.php | 0 .../templates/emails/auth/password-reset.php | 0 .../parsedown-extra/ParsedownExtra.php | 0 kirby/dependencies/parsedown/Parsedown.php | 0 kirby/dependencies/spyc/COPYING | 0 kirby/dependencies/spyc/Spyc.php | 0 kirby/i18n/rules/LICENSE | 0 kirby/i18n/rules/ar.json | 0 kirby/i18n/rules/az.json | 0 kirby/i18n/rules/bg.json | 0 kirby/i18n/rules/cs.json | 0 kirby/i18n/rules/da.json | 0 kirby/i18n/rules/de.json | 0 kirby/i18n/rules/el.json | 0 kirby/i18n/rules/eo.json | 0 kirby/i18n/rules/et.json | 0 kirby/i18n/rules/fa.json | 0 kirby/i18n/rules/fi.json | 0 kirby/i18n/rules/fr.json | 0 kirby/i18n/rules/hi.json | 0 kirby/i18n/rules/hr.json | 0 kirby/i18n/rules/hu.json | 0 kirby/i18n/rules/hy.json | 0 kirby/i18n/rules/is_IS.json | 0 kirby/i18n/rules/it.json | 0 kirby/i18n/rules/iu.json | 0 kirby/i18n/rules/ja.json | 0 kirby/i18n/rules/ka.json | 0 kirby/i18n/rules/ko.json | 0 kirby/i18n/rules/lt.json | 0 kirby/i18n/rules/lv.json | 0 kirby/i18n/rules/mk.json | 0 kirby/i18n/rules/my.json | 0 kirby/i18n/rules/nb.json | 0 kirby/i18n/rules/pl.json | 0 kirby/i18n/rules/pt_BR.json | 0 kirby/i18n/rules/rm.json | 0 kirby/i18n/rules/ru.json | 0 kirby/i18n/rules/sr.json | 0 kirby/i18n/rules/sv_SE.json | 0 kirby/i18n/rules/tr.json | 0 kirby/i18n/rules/uk.json | 0 kirby/i18n/rules/vi.json | 0 kirby/i18n/rules/zh.json | 0 kirby/i18n/translations/bg.json | 22 +- kirby/i18n/translations/ca.json | 22 +- kirby/i18n/translations/cs.json | 22 +- kirby/i18n/translations/da.json | 22 +- kirby/i18n/translations/de.json | 22 +- kirby/i18n/translations/el.json | 22 +- kirby/i18n/translations/en.json | 22 +- kirby/i18n/translations/eo.json | 22 +- kirby/i18n/translations/es_419.json | 22 +- kirby/i18n/translations/es_ES.json | 22 +- kirby/i18n/translations/fa.json | 22 +- kirby/i18n/translations/fi.json | 22 +- kirby/i18n/translations/fr.json | 22 +- kirby/i18n/translations/hu.json | 22 +- kirby/i18n/translations/id.json | 22 +- kirby/i18n/translations/is_IS.json | 22 +- kirby/i18n/translations/it.json | 22 +- kirby/i18n/translations/ko.json | 22 +- kirby/i18n/translations/lt.json | 22 +- kirby/i18n/translations/nb.json | 22 +- kirby/i18n/translations/nl.json | 22 +- kirby/i18n/translations/pl.json | 22 +- kirby/i18n/translations/pt_BR.json | 22 +- kirby/i18n/translations/pt_PT.json | 22 +- kirby/i18n/translations/ru.json | 26 +- kirby/i18n/translations/sk.json | 22 +- kirby/i18n/translations/sv_SE.json | 22 +- kirby/i18n/translations/tr.json | 22 +- kirby/kirby.pub | 0 kirby/panel/dist/apple-touch-icon.png | Bin kirby/panel/dist/css/style.css | 2 +- kirby/panel/dist/favicon.png | Bin kirby/panel/dist/favicon.svg | 0 kirby/panel/dist/img/icons.svg | 117 +- kirby/panel/dist/js/index.js | 2 +- kirby/panel/dist/js/plugins.js | 0 kirby/panel/dist/js/vendor.js | 6 +- kirby/router.php | 0 kirby/src/Api/Api.php | 31 +- kirby/src/Api/Collection.php | 0 kirby/src/Api/Model.php | 0 kirby/src/Cache/ApcuCache.php | 0 kirby/src/Cache/Cache.php | 0 kirby/src/Cache/FileCache.php | 0 kirby/src/Cache/MemCached.php | 0 kirby/src/Cache/MemoryCache.php | 0 kirby/src/Cache/NullCache.php | 0 kirby/src/Cache/Value.php | 0 kirby/src/Cms/Api.php | 2 +- kirby/src/Cms/App.php | 278 +++- kirby/src/Cms/AppCaches.php | 0 kirby/src/Cms/AppErrors.php | 5 +- kirby/src/Cms/AppPlugins.php | 12 + kirby/src/Cms/AppTranslations.php | 16 - kirby/src/Cms/AppUsers.php | 0 kirby/src/Cms/Auth.php | 5 +- kirby/src/Cms/Auth/Challenge.php | 0 kirby/src/Cms/Auth/EmailChallenge.php | 0 kirby/src/Cms/Auth/Status.php | 0 kirby/src/Cms/Block.php | 43 +- kirby/src/Cms/BlockConverter.php | 280 ---- kirby/src/Cms/Blocks.php | 29 +- kirby/src/Cms/Blueprint.php | 0 kirby/src/Cms/Collection.php | 0 kirby/src/Cms/Collections.php | 0 kirby/src/Cms/Content.php | 21 +- kirby/src/Cms/ContentLock.php | 0 kirby/src/Cms/ContentLocks.php | 0 kirby/src/Cms/ContentTranslation.php | 10 +- kirby/src/Cms/Core.php | 7 +- kirby/src/Cms/Email.php | 0 kirby/src/Cms/Environment.php | 222 --- kirby/src/Cms/Event.php | 0 kirby/src/Cms/Field.php | 0 kirby/src/Cms/Fieldset.php | 0 kirby/src/Cms/Fieldsets.php | 2 +- kirby/src/Cms/File.php | 43 +- kirby/src/Cms/FileActions.php | 0 kirby/src/Cms/FileBlueprint.php | 0 kirby/src/Cms/FileModifications.php | 0 kirby/src/Cms/FilePermissions.php | 0 kirby/src/Cms/FilePicker.php | 0 kirby/src/Cms/FileRules.php | 0 kirby/src/Cms/FileVersion.php | 0 kirby/src/Cms/Files.php | 14 +- kirby/src/Cms/Find.php | 0 kirby/src/Cms/HasChildren.php | 0 kirby/src/Cms/HasFiles.php | 0 kirby/src/Cms/HasMethods.php | 0 kirby/src/Cms/HasSiblings.php | 0 kirby/src/Cms/Helpers.php | 87 + kirby/src/Cms/Html.php | 119 ++ kirby/src/Cms/Ingredients.php | 0 kirby/src/Cms/Item.php | 6 +- kirby/src/Cms/Items.php | 4 +- kirby/src/Cms/Language.php | 2 +- kirby/src/Cms/LanguageRouter.php | 0 kirby/src/Cms/LanguageRoutes.php | 0 kirby/src/Cms/LanguageRules.php | 0 kirby/src/Cms/Languages.php | 0 kirby/src/Cms/Layout.php | 0 kirby/src/Cms/LayoutColumn.php | 0 kirby/src/Cms/LayoutColumns.php | 0 kirby/src/Cms/Layouts.php | 3 +- kirby/src/Cms/Loader.php | 0 kirby/src/Cms/Media.php | 0 kirby/src/Cms/Model.php | 0 kirby/src/Cms/ModelPermissions.php | 0 kirby/src/Cms/ModelWithContent.php | 17 +- kirby/src/Cms/Nest.php | 0 kirby/src/Cms/NestCollection.php | 0 kirby/src/Cms/NestObject.php | 0 kirby/src/Cms/Page.php | 45 +- kirby/src/Cms/PageActions.php | 3 +- kirby/src/Cms/PageBlueprint.php | 0 kirby/src/Cms/PagePermissions.php | 0 kirby/src/Cms/PagePicker.php | 0 kirby/src/Cms/PageRules.php | 0 kirby/src/Cms/PageSiblings.php | 0 kirby/src/Cms/Pages.php | 108 +- kirby/src/Cms/Pagination.php | 8 +- kirby/src/Cms/Permissions.php | 2 +- kirby/src/Cms/Picker.php | 2 +- kirby/src/Cms/Plugin.php | 7 +- kirby/src/Cms/PluginAssets.php | 0 kirby/src/Cms/R.php | 0 kirby/src/Cms/Responder.php | 150 +- kirby/src/Cms/Response.php | 0 kirby/src/Cms/Role.php | 0 kirby/src/Cms/Roles.php | 0 kirby/src/Cms/S.php | 0 kirby/src/Cms/Search.php | 0 kirby/src/Cms/Section.php | 0 kirby/src/Cms/Site.php | 4 +- kirby/src/Cms/SiteActions.php | 0 kirby/src/Cms/SiteBlueprint.php | 0 kirby/src/Cms/SitePermissions.php | 0 kirby/src/Cms/SiteRules.php | 0 kirby/src/Cms/Structure.php | 0 kirby/src/Cms/StructureObject.php | 0 kirby/src/Cms/System.php | 128 +- kirby/src/Cms/Template.php | 0 kirby/src/Cms/Translation.php | 0 kirby/src/Cms/Translations.php | 0 kirby/src/Cms/Url.php | 0 kirby/src/Cms/User.php | 6 +- kirby/src/Cms/UserActions.php | 0 kirby/src/Cms/UserBlueprint.php | 0 kirby/src/Cms/UserPermissions.php | 0 kirby/src/Cms/UserPicker.php | 0 kirby/src/Cms/UserRules.php | 0 kirby/src/Cms/Users.php | 3 +- kirby/src/Cms/Visitor.php | 0 kirby/src/Data/Data.php | 0 kirby/src/Data/Handler.php | 0 kirby/src/Data/Json.php | 0 kirby/src/Data/PHP.php | 0 kirby/src/Data/Txt.php | 0 kirby/src/Data/Xml.php | 0 kirby/src/Data/Yaml.php | 0 kirby/src/Database/Database.php | 0 kirby/src/Database/Db.php | 0 kirby/src/Database/Query.php | 0 kirby/src/Database/Sql.php | 0 kirby/src/Database/Sql/Mysql.php | 0 kirby/src/Database/Sql/Sqlite.php | 0 kirby/src/Email/Body.php | 0 kirby/src/Email/Email.php | 0 kirby/src/Email/PHPMailer.php | 0 .../src/Exception/BadMethodCallException.php | 0 kirby/src/Exception/DuplicateException.php | 0 kirby/src/Exception/ErrorPageException.php | 0 kirby/src/Exception/Exception.php | 8 +- .../Exception/InvalidArgumentException.php | 0 kirby/src/Exception/LogicException.php | 0 kirby/src/Exception/NotFoundException.php | 0 kirby/src/Exception/PermissionException.php | 0 kirby/src/Filesystem/Asset.php | 0 kirby/src/Filesystem/Dir.php | 0 kirby/src/Filesystem/F.php | 28 + kirby/src/Filesystem/File.php | 0 kirby/src/Filesystem/Filename.php | 0 kirby/src/Filesystem/IsFile.php | 0 kirby/src/Filesystem/Mime.php | 0 kirby/src/Form/Field.php | 0 kirby/src/Form/Field/BlocksField.php | 10 +- kirby/src/Form/Field/LayoutField.php | 9 +- kirby/src/Form/FieldClass.php | 3 +- kirby/src/Form/Fields.php | 0 kirby/src/Form/Form.php | 0 kirby/src/Form/Mixin/EmptyState.php | 0 kirby/src/Form/Mixin/Max.php | 0 kirby/src/Form/Mixin/Min.php | 0 kirby/src/Form/Options.php | 3 + kirby/src/Form/OptionsApi.php | 0 kirby/src/Form/OptionsQuery.php | 0 kirby/src/Form/Validations.php | 0 kirby/src/Http/Cookie.php | 28 + kirby/src/Http/Environment.php | 1039 ++++++++++++ .../Http/Exceptions/NextRouteException.php | 0 kirby/src/Http/Header.php | 2 +- kirby/src/Http/Idn.php | 0 kirby/src/Http/Params.php | 0 kirby/src/Http/Path.php | 0 kirby/src/Http/Query.php | 0 kirby/src/Http/Remote.php | 0 kirby/src/Http/Request.php | 70 +- kirby/src/Http/Request/Auth.php | 61 + kirby/src/Http/Request/Auth/BasicAuth.php | 17 +- kirby/src/Http/Request/Auth/BearerAuth.php | 39 +- kirby/src/Http/Request/Auth/SessionAuth.php | 48 + kirby/src/Http/Request/Body.php | 0 kirby/src/Http/Request/Data.php | 0 kirby/src/Http/Request/Files.php | 0 kirby/src/Http/Request/Query.php | 0 kirby/src/Http/Response.php | 17 + kirby/src/Http/Route.php | 0 kirby/src/Http/Router.php | 54 +- kirby/src/Http/Server.php | 339 +--- kirby/src/Http/Uri.php | 45 +- kirby/src/Http/Url.php | 5 +- kirby/src/Http/Visitor.php | 8 +- kirby/src/Image/Camera.php | 0 kirby/src/Image/Darkroom.php | 0 kirby/src/Image/Darkroom/GdLib.php | 0 kirby/src/Image/Darkroom/ImageMagick.php | 0 kirby/src/Image/Dimensions.php | 0 kirby/src/Image/Exif.php | 0 kirby/src/Image/Image.php | 0 kirby/src/Image/Location.php | 0 kirby/src/Panel/Dialog.php | 0 kirby/src/Panel/Document.php | 31 +- kirby/src/Panel/Dropdown.php | 5 +- kirby/src/Panel/Field.php | 28 +- kirby/src/Panel/File.php | 72 +- kirby/src/Panel/Home.php | 17 +- kirby/src/Panel/Json.php | 0 kirby/src/Panel/Model.php | 10 +- kirby/src/Panel/Page.php | 29 +- kirby/src/Panel/Panel.php | 41 +- kirby/src/Panel/Plugins.php | 0 kirby/src/Panel/Redirect.php | 0 kirby/src/Panel/Search.php | 0 kirby/src/Panel/Site.php | 0 kirby/src/Panel/User.php | 17 +- kirby/src/Panel/View.php | 21 +- kirby/src/Parsley/Element.php | 0 kirby/src/Parsley/Inline.php | 4 +- kirby/src/Parsley/Parsley.php | 0 kirby/src/Parsley/Schema.php | 0 kirby/src/Parsley/Schema/Blocks.php | 0 kirby/src/Parsley/Schema/Plain.php | 0 kirby/src/Sane/DomHandler.php | 0 kirby/src/Sane/Handler.php | 0 kirby/src/Sane/Html.php | 0 kirby/src/Sane/Sane.php | 0 kirby/src/Sane/Svg.php | 0 kirby/src/Sane/Svgz.php | 0 kirby/src/Sane/Xml.php | 0 kirby/src/Session/AutoSession.php | 0 kirby/src/Session/FileSessionStore.php | 0 kirby/src/Session/Session.php | 0 kirby/src/Session/SessionData.php | 0 kirby/src/Session/SessionStore.php | 0 kirby/src/Session/Sessions.php | 0 kirby/src/Text/KirbyTag.php | 0 kirby/src/Text/KirbyTags.php | 0 kirby/src/Text/Markdown.php | 0 kirby/src/Text/SmartyPants.php | 0 kirby/src/Toolkit/A.php | 0 kirby/src/Toolkit/Collection.php | 0 kirby/src/Toolkit/Component.php | 0 kirby/src/Toolkit/Config.php | 0 kirby/src/Toolkit/Controller.php | 0 kirby/src/Toolkit/Date.php | 26 + kirby/src/Toolkit/Dom.php | 0 kirby/src/Toolkit/Escape.php | 0 kirby/src/Toolkit/Facade.php | 0 kirby/src/Toolkit/Html.php | 12 +- kirby/src/Toolkit/I18n.php | 16 - kirby/src/Toolkit/Iterator.php | 0 kirby/src/Toolkit/Locale.php | 0 kirby/src/Toolkit/Obj.php | 0 kirby/src/Toolkit/Pagination.php | 0 kirby/src/Toolkit/Properties.php | 0 kirby/src/Toolkit/Query.php | 0 kirby/src/Toolkit/Silo.php | 0 kirby/src/Toolkit/Str.php | 202 ++- kirby/src/Toolkit/Tpl.php | 0 kirby/src/Toolkit/V.php | 119 +- kirby/src/Toolkit/View.php | 0 kirby/src/Toolkit/Xml.php | 3 +- kirby/vendor/autoload.php | 5 + kirby/vendor/claviska/simpleimage/LICENSE.md | 0 .../vendor/claviska/simpleimage/composer.json | 0 .../simpleimage/src/claviska/SimpleImage.php | 0 kirby/vendor/composer/ClassLoader.php | 2 +- kirby/vendor/composer/InstalledVersions.php | 16 +- kirby/vendor/composer/LICENSE | 0 kirby/vendor/composer/autoload_classmap.php | 9 +- kirby/vendor/composer/autoload_files.php | 2 +- kirby/vendor/composer/autoload_namespaces.php | 2 +- kirby/vendor/composer/autoload_psr4.php | 2 +- kirby/vendor/composer/autoload_real.php | 40 +- kirby/vendor/composer/autoload_static.php | 7 +- kirby/vendor/composer/installed.json | 66 +- kirby/vendor/composer/installed.php | 52 +- kirby/vendor/filp/whoops/LICENSE.md | 0 kirby/vendor/filp/whoops/composer.json | 0 .../src/Whoops/Exception/ErrorException.php | 0 .../whoops/src/Whoops/Exception/Formatter.php | 0 .../whoops/src/Whoops/Exception/Frame.php | 0 .../src/Whoops/Exception/FrameCollection.php | 0 .../whoops/src/Whoops/Exception/Inspector.php | 0 .../src/Whoops/Handler/CallbackHandler.php | 0 .../whoops/src/Whoops/Handler/Handler.php | 0 .../src/Whoops/Handler/HandlerInterface.php | 0 .../Whoops/Handler/JsonResponseHandler.php | 0 .../src/Whoops/Handler/PlainTextHandler.php | 0 .../src/Whoops/Handler/PrettyPageHandler.php | 0 .../src/Whoops/Handler/XmlResponseHandler.php | 0 .../whoops/src/Whoops/Resources/css/prism.css | 0 .../src/Whoops/Resources/css/whoops.base.css | 0 .../src/Whoops/Resources/js/clipboard.min.js | 0 .../whoops/src/Whoops/Resources/js/prism.js | 0 .../src/Whoops/Resources/js/whoops.base.js | 0 .../src/Whoops/Resources/js/zepto.min.js | 0 .../Resources/views/env_details.html.php | 0 .../Resources/views/frame_code.html.php | 0 .../Resources/views/frame_list.html.php | 0 .../Resources/views/frames_container.html.php | 0 .../views/frames_description.html.php | 0 .../Whoops/Resources/views/header.html.php | 0 .../Resources/views/header_outer.html.php | 0 .../Whoops/Resources/views/layout.html.php | 0 .../Resources/views/panel_details.html.php | 0 .../views/panel_details_outer.html.php | 0 .../Resources/views/panel_left.html.php | 0 .../Resources/views/panel_left_outer.html.php | 0 kirby/vendor/filp/whoops/src/Whoops/Run.php | 0 .../filp/whoops/src/Whoops/RunInterface.php | 0 .../src/Whoops/Util/HtmlDumperOutput.php | 0 .../filp/whoops/src/Whoops/Util/Misc.php | 0 .../whoops/src/Whoops/Util/SystemFacade.php | 0 .../whoops/src/Whoops/Util/TemplateHelper.php | 0 .../laminas/laminas-escaper/COPYRIGHT.md | 0 .../vendor/laminas/laminas-escaper/LICENSE.md | 0 .../laminas/laminas-escaper/composer.json | 0 .../laminas/laminas-escaper/composer.lock | 0 .../laminas/laminas-escaper/src/Escaper.php | 0 .../src/Exception/ExceptionInterface.php | 0 .../Exception/InvalidArgumentException.php | 0 .../src/Exception/RuntimeException.php | 0 kirby/vendor/league/color-extractor/LICENSE | 0 .../league/color-extractor/composer.json | 0 .../src/League/ColorExtractor/Color.php | 0 .../League/ColorExtractor/ColorExtractor.php | 0 .../src/League/ColorExtractor/Palette.php | 0 .../vendor/michelf/php-smartypants/License.md | 0 .../Michelf/SmartyPants.inc.php | 0 .../php-smartypants/Michelf/SmartyPants.php | 0 .../Michelf/SmartyPantsTypographer.inc.php | 0 .../Michelf/SmartyPantsTypographer.php | 0 .../michelf/php-smartypants/composer.json | 0 kirby/vendor/phpmailer/phpmailer/LICENSE | 0 .../vendor/phpmailer/phpmailer/composer.json | 6 +- .../phpmailer/phpmailer/get_oauth_token.php | 44 +- .../phpmailer/language/phpmailer.lang-af.php | 0 .../phpmailer/language/phpmailer.lang-ar.php | 0 .../phpmailer/language/phpmailer.lang-az.php | 0 .../phpmailer/language/phpmailer.lang-ba.php | 0 .../phpmailer/language/phpmailer.lang-be.php | 0 .../phpmailer/language/phpmailer.lang-bg.php | 0 .../phpmailer/language/phpmailer.lang-ca.php | 0 .../phpmailer/language/phpmailer.lang-ch.php | 27 - .../phpmailer/language/phpmailer.lang-cs.php | 0 .../phpmailer/language/phpmailer.lang-da.php | 0 .../phpmailer/language/phpmailer.lang-de.php | 0 .../phpmailer/language/phpmailer.lang-el.php | 0 .../phpmailer/language/phpmailer.lang-eo.php | 0 .../phpmailer/language/phpmailer.lang-es.php | 0 .../phpmailer/language/phpmailer.lang-et.php | 0 .../phpmailer/language/phpmailer.lang-fa.php | 0 .../phpmailer/language/phpmailer.lang-fi.php | 0 .../phpmailer/language/phpmailer.lang-fo.php | 0 .../phpmailer/language/phpmailer.lang-fr.php | 0 .../phpmailer/language/phpmailer.lang-gl.php | 0 .../phpmailer/language/phpmailer.lang-he.php | 0 .../phpmailer/language/phpmailer.lang-hi.php | 0 .../phpmailer/language/phpmailer.lang-hr.php | 0 .../phpmailer/language/phpmailer.lang-hu.php | 0 .../phpmailer/language/phpmailer.lang-hy.php | 0 .../phpmailer/language/phpmailer.lang-id.php | 0 .../phpmailer/language/phpmailer.lang-it.php | 0 .../phpmailer/language/phpmailer.lang-ja.php | 0 .../phpmailer/language/phpmailer.lang-ka.php | 0 .../phpmailer/language/phpmailer.lang-ko.php | 0 .../phpmailer/language/phpmailer.lang-lt.php | 0 .../phpmailer/language/phpmailer.lang-lv.php | 0 .../phpmailer/language/phpmailer.lang-mg.php | 0 .../phpmailer/language/phpmailer.lang-mn.php | 27 + .../phpmailer/language/phpmailer.lang-ms.php | 0 .../phpmailer/language/phpmailer.lang-nb.php | 0 .../phpmailer/language/phpmailer.lang-nl.php | 0 .../phpmailer/language/phpmailer.lang-pl.php | 0 .../phpmailer/language/phpmailer.lang-pt.php | 0 .../language/phpmailer.lang-pt_br.php | 0 .../phpmailer/language/phpmailer.lang-ro.php | 0 .../phpmailer/language/phpmailer.lang-ru.php | 0 .../phpmailer/language/phpmailer.lang-sk.php | 0 .../phpmailer/language/phpmailer.lang-sl.php | 0 .../phpmailer/language/phpmailer.lang-sr.php | 0 .../language/phpmailer.lang-sr_latn.php | 0 .../phpmailer/language/phpmailer.lang-sv.php | 0 .../phpmailer/language/phpmailer.lang-tl.php | 0 .../phpmailer/language/phpmailer.lang-tr.php | 0 .../phpmailer/language/phpmailer.lang-uk.php | 0 .../phpmailer/language/phpmailer.lang-vi.php | 0 .../phpmailer/language/phpmailer.lang-zh.php | 0 .../language/phpmailer.lang-zh_cn.php | 0 .../phpmailer/phpmailer/src/Exception.php | 0 .../vendor/phpmailer/phpmailer/src/OAuth.php | 2 +- .../phpmailer/src/OAuthTokenProvider.php | 44 + .../phpmailer/phpmailer/src/PHPMailer.php | 97 +- kirby/vendor/phpmailer/phpmailer/src/POP3.php | 2 +- kirby/vendor/phpmailer/phpmailer/src/SMTP.php | 9 +- kirby/vendor/psr/log/LICENSE | 0 .../vendor/psr/log/Psr/Log/AbstractLogger.php | 0 .../log/Psr/Log/InvalidArgumentException.php | 0 kirby/vendor/psr/log/Psr/Log/LogLevel.php | 0 .../psr/log/Psr/Log/LoggerAwareInterface.php | 0 .../psr/log/Psr/Log/LoggerAwareTrait.php | 0 .../psr/log/Psr/Log/LoggerInterface.php | 0 kirby/vendor/psr/log/Psr/Log/LoggerTrait.php | 0 kirby/vendor/psr/log/Psr/Log/NullLogger.php | 0 kirby/vendor/psr/log/composer.json | 0 .../vendor/symfony/polyfill-intl-idn/Idn.php | 0 .../vendor/symfony/polyfill-intl-idn/Info.php | 0 .../vendor/symfony/polyfill-intl-idn/LICENSE | 0 .../Resources/unidata/DisallowedRanges.php | 0 .../Resources/unidata/Regex.php | 0 .../Resources/unidata/deviation.php | 0 .../Resources/unidata/disallowed.php | 0 .../unidata/disallowed_STD3_mapped.php | 0 .../unidata/disallowed_STD3_valid.php | 0 .../Resources/unidata/ignored.php | 0 .../Resources/unidata/mapped.php | 0 .../Resources/unidata/virama.php | 0 .../symfony/polyfill-intl-idn/bootstrap.php | 0 .../symfony/polyfill-intl-idn/bootstrap80.php | 0 .../symfony/polyfill-intl-idn/composer.json | 2 +- .../symfony/polyfill-intl-normalizer/LICENSE | 0 .../polyfill-intl-normalizer/Normalizer.php | 0 .../Resources/stubs/Normalizer.php | 0 .../unidata/canonicalComposition.php | 0 .../unidata/canonicalDecomposition.php | 0 .../Resources/unidata/combiningClass.php | 0 .../unidata/compatibilityDecomposition.php | 0 .../polyfill-intl-normalizer/bootstrap.php | 0 .../polyfill-intl-normalizer/bootstrap80.php | 0 .../polyfill-intl-normalizer/composer.json | 2 +- .../vendor/symfony/polyfill-mbstring/LICENSE | 0 .../symfony/polyfill-mbstring/Mbstring.php | 2 +- .../Resources/unidata/lowerCase.php | 0 .../Resources/unidata/titleCaseRegexp.php | 0 .../Resources/unidata/upperCase.php | 0 .../symfony/polyfill-mbstring/bootstrap.php | 0 .../symfony/polyfill-mbstring/bootstrap80.php | 0 .../symfony/polyfill-mbstring/composer.json | 2 +- kirby/views/browser.php | 0 kirby/views/fatal.php | 0 kirby/views/panel.php | 5 +- kirby/views/php.php | 0 kirby/views/snippets/footer.php | 0 kirby/views/snippets/header.php | 0 674 files changed, 5052 insertions(+), 3082 deletions(-) mode change 100644 => 100755 kirby/.editorconfig mode change 100644 => 100755 kirby/CONTRIBUTING.md mode change 100644 => 100755 kirby/LICENSE.md mode change 100644 => 100755 kirby/README.md mode change 100644 => 100755 kirby/SECURITY.md mode change 100644 => 100755 kirby/assets/whoops.css mode change 100644 => 100755 kirby/bootstrap.php mode change 100644 => 100755 kirby/cacert.pem mode change 100644 => 100755 kirby/composer.json mode change 100644 => 100755 kirby/composer.lock mode change 100644 => 100755 kirby/config/aliases.php mode change 100644 => 100755 kirby/config/api/authentication.php mode change 100644 => 100755 kirby/config/api/collections.php mode change 100644 => 100755 kirby/config/api/models.php mode change 100644 => 100755 kirby/config/api/models/File.php mode change 100644 => 100755 kirby/config/api/models/FileBlueprint.php mode change 100644 => 100755 kirby/config/api/models/FileVersion.php mode change 100644 => 100755 kirby/config/api/models/Language.php mode change 100644 => 100755 kirby/config/api/models/Page.php mode change 100644 => 100755 kirby/config/api/models/PageBlueprint.php mode change 100644 => 100755 kirby/config/api/models/Role.php mode change 100644 => 100755 kirby/config/api/models/Site.php mode change 100644 => 100755 kirby/config/api/models/SiteBlueprint.php mode change 100644 => 100755 kirby/config/api/models/System.php mode change 100644 => 100755 kirby/config/api/models/Translation.php mode change 100644 => 100755 kirby/config/api/models/User.php mode change 100644 => 100755 kirby/config/api/models/UserBlueprint.php mode change 100644 => 100755 kirby/config/api/routes.php mode change 100644 => 100755 kirby/config/api/routes/auth.php mode change 100644 => 100755 kirby/config/api/routes/files.php mode change 100644 => 100755 kirby/config/api/routes/languages.php mode change 100644 => 100755 kirby/config/api/routes/lock.php mode change 100644 => 100755 kirby/config/api/routes/pages.php mode change 100644 => 100755 kirby/config/api/routes/roles.php mode change 100644 => 100755 kirby/config/api/routes/site.php mode change 100644 => 100755 kirby/config/api/routes/system.php mode change 100644 => 100755 kirby/config/api/routes/translations.php mode change 100644 => 100755 kirby/config/api/routes/users.php mode change 100644 => 100755 kirby/config/areas/account.php mode change 100644 => 100755 kirby/config/areas/account/dialogs.php mode change 100644 => 100755 kirby/config/areas/account/dropdowns.php mode change 100644 => 100755 kirby/config/areas/account/views.php mode change 100644 => 100755 kirby/config/areas/files/dialogs.php mode change 100644 => 100755 kirby/config/areas/files/dropdowns.php mode change 100644 => 100755 kirby/config/areas/installation.php mode change 100644 => 100755 kirby/config/areas/languages.php mode change 100644 => 100755 kirby/config/areas/languages/dialogs.php mode change 100644 => 100755 kirby/config/areas/languages/views.php mode change 100644 => 100755 kirby/config/areas/login.php mode change 100644 => 100755 kirby/config/areas/site.php mode change 100644 => 100755 kirby/config/areas/site/dialogs.php mode change 100644 => 100755 kirby/config/areas/site/dropdowns.php mode change 100644 => 100755 kirby/config/areas/site/searches.php mode change 100644 => 100755 kirby/config/areas/site/views.php mode change 100644 => 100755 kirby/config/areas/system.php mode change 100644 => 100755 kirby/config/areas/system/dialogs.php mode change 100644 => 100755 kirby/config/areas/system/views.php mode change 100644 => 100755 kirby/config/areas/users.php mode change 100644 => 100755 kirby/config/areas/users/dialogs.php mode change 100644 => 100755 kirby/config/areas/users/dropdowns.php mode change 100644 => 100755 kirby/config/areas/users/searches.php mode change 100644 => 100755 kirby/config/areas/users/views.php mode change 100644 => 100755 kirby/config/blocks/code/code.php mode change 100644 => 100755 kirby/config/blocks/code/code.yml mode change 100644 => 100755 kirby/config/blocks/gallery/gallery.php mode change 100644 => 100755 kirby/config/blocks/gallery/gallery.yml mode change 100644 => 100755 kirby/config/blocks/heading/heading.php mode change 100644 => 100755 kirby/config/blocks/heading/heading.yml mode change 100644 => 100755 kirby/config/blocks/image/image.php mode change 100644 => 100755 kirby/config/blocks/image/image.yml mode change 100644 => 100755 kirby/config/blocks/line/line.php mode change 100644 => 100755 kirby/config/blocks/line/line.yml mode change 100644 => 100755 kirby/config/blocks/list/list.php mode change 100644 => 100755 kirby/config/blocks/list/list.yml mode change 100644 => 100755 kirby/config/blocks/markdown/markdown.php mode change 100644 => 100755 kirby/config/blocks/markdown/markdown.yml mode change 100644 => 100755 kirby/config/blocks/quote/quote.php mode change 100644 => 100755 kirby/config/blocks/quote/quote.yml mode change 100644 => 100755 kirby/config/blocks/table/table.yml mode change 100644 => 100755 kirby/config/blocks/text/text.php mode change 100644 => 100755 kirby/config/blocks/text/text.yml mode change 100644 => 100755 kirby/config/blocks/video/video.php mode change 100644 => 100755 kirby/config/blocks/video/video.yml mode change 100644 => 100755 kirby/config/blueprints/blocks/code.yml mode change 100644 => 100755 kirby/config/blueprints/blocks/heading.yml mode change 100644 => 100755 kirby/config/blueprints/blocks/image.yml mode change 100644 => 100755 kirby/config/blueprints/blocks/quote.yml mode change 100644 => 100755 kirby/config/blueprints/blocks/table.yml mode change 100644 => 100755 kirby/config/blueprints/blocks/text.yml mode change 100644 => 100755 kirby/config/blueprints/blocks/video.yml mode change 100644 => 100755 kirby/config/blueprints/files/default.yml mode change 100644 => 100755 kirby/config/blueprints/pages/default.yml mode change 100644 => 100755 kirby/config/blueprints/site.yml mode change 100644 => 100755 kirby/config/components.php mode change 100644 => 100755 kirby/config/fields/checkboxes.php mode change 100644 => 100755 kirby/config/fields/date.php mode change 100644 => 100755 kirby/config/fields/email.php mode change 100644 => 100755 kirby/config/fields/files.php mode change 100644 => 100755 kirby/config/fields/gap.php mode change 100644 => 100755 kirby/config/fields/headline.php mode change 100644 => 100755 kirby/config/fields/hidden.php mode change 100644 => 100755 kirby/config/fields/info.php mode change 100644 => 100755 kirby/config/fields/line.php mode change 100644 => 100755 kirby/config/fields/list.php mode change 100644 => 100755 kirby/config/fields/mixins/datetime.php mode change 100644 => 100755 kirby/config/fields/mixins/filepicker.php mode change 100644 => 100755 kirby/config/fields/mixins/layout.php mode change 100644 => 100755 kirby/config/fields/mixins/min.php mode change 100644 => 100755 kirby/config/fields/mixins/options.php mode change 100644 => 100755 kirby/config/fields/mixins/pagepicker.php mode change 100644 => 100755 kirby/config/fields/mixins/picker.php mode change 100644 => 100755 kirby/config/fields/mixins/upload.php mode change 100644 => 100755 kirby/config/fields/mixins/userpicker.php mode change 100644 => 100755 kirby/config/fields/multiselect.php mode change 100644 => 100755 kirby/config/fields/number.php mode change 100644 => 100755 kirby/config/fields/pages.php mode change 100644 => 100755 kirby/config/fields/radio.php mode change 100644 => 100755 kirby/config/fields/range.php mode change 100644 => 100755 kirby/config/fields/select.php mode change 100644 => 100755 kirby/config/fields/slug.php mode change 100644 => 100755 kirby/config/fields/structure.php mode change 100644 => 100755 kirby/config/fields/tags.php mode change 100644 => 100755 kirby/config/fields/tel.php mode change 100644 => 100755 kirby/config/fields/text.php mode change 100644 => 100755 kirby/config/fields/textarea.php mode change 100644 => 100755 kirby/config/fields/time.php mode change 100644 => 100755 kirby/config/fields/toggle.php create mode 100755 kirby/config/fields/toggles.php mode change 100644 => 100755 kirby/config/fields/url.php mode change 100644 => 100755 kirby/config/fields/users.php mode change 100644 => 100755 kirby/config/fields/writer.php mode change 100644 => 100755 kirby/config/helpers.php mode change 100644 => 100755 kirby/config/methods.php mode change 100644 => 100755 kirby/config/presets/files.php mode change 100644 => 100755 kirby/config/presets/page.php mode change 100644 => 100755 kirby/config/presets/pages.php mode change 100644 => 100755 kirby/config/routes.php mode change 100644 => 100755 kirby/config/sections/fields.php mode change 100644 => 100755 kirby/config/sections/files.php mode change 100644 => 100755 kirby/config/sections/info.php create mode 100755 kirby/config/sections/mixins/details.php mode change 100644 => 100755 kirby/config/sections/mixins/empty.php mode change 100644 => 100755 kirby/config/sections/mixins/headline.php mode change 100644 => 100755 kirby/config/sections/mixins/help.php mode change 100644 => 100755 kirby/config/sections/mixins/layout.php mode change 100644 => 100755 kirby/config/sections/mixins/max.php mode change 100644 => 100755 kirby/config/sections/mixins/min.php mode change 100644 => 100755 kirby/config/sections/mixins/pagination.php mode change 100644 => 100755 kirby/config/sections/mixins/parent.php create mode 100755 kirby/config/sections/mixins/search.php create mode 100755 kirby/config/sections/mixins/sort.php mode change 100644 => 100755 kirby/config/sections/pages.php create mode 100755 kirby/config/sections/stats.php mode change 100644 => 100755 kirby/config/setup.php mode change 100644 => 100755 kirby/config/tags.php mode change 100644 => 100755 kirby/config/templates/emails/auth/login.php mode change 100644 => 100755 kirby/config/templates/emails/auth/password-reset.php mode change 100644 => 100755 kirby/dependencies/parsedown-extra/ParsedownExtra.php mode change 100644 => 100755 kirby/dependencies/parsedown/Parsedown.php mode change 100644 => 100755 kirby/dependencies/spyc/COPYING mode change 100644 => 100755 kirby/dependencies/spyc/Spyc.php mode change 100644 => 100755 kirby/i18n/rules/LICENSE mode change 100644 => 100755 kirby/i18n/rules/ar.json mode change 100644 => 100755 kirby/i18n/rules/az.json mode change 100644 => 100755 kirby/i18n/rules/bg.json mode change 100644 => 100755 kirby/i18n/rules/cs.json mode change 100644 => 100755 kirby/i18n/rules/da.json mode change 100644 => 100755 kirby/i18n/rules/de.json mode change 100644 => 100755 kirby/i18n/rules/el.json mode change 100644 => 100755 kirby/i18n/rules/eo.json mode change 100644 => 100755 kirby/i18n/rules/et.json mode change 100644 => 100755 kirby/i18n/rules/fa.json mode change 100644 => 100755 kirby/i18n/rules/fi.json mode change 100644 => 100755 kirby/i18n/rules/fr.json mode change 100644 => 100755 kirby/i18n/rules/hi.json mode change 100644 => 100755 kirby/i18n/rules/hr.json mode change 100644 => 100755 kirby/i18n/rules/hu.json mode change 100644 => 100755 kirby/i18n/rules/hy.json mode change 100644 => 100755 kirby/i18n/rules/is_IS.json mode change 100644 => 100755 kirby/i18n/rules/it.json mode change 100644 => 100755 kirby/i18n/rules/iu.json mode change 100644 => 100755 kirby/i18n/rules/ja.json mode change 100644 => 100755 kirby/i18n/rules/ka.json mode change 100644 => 100755 kirby/i18n/rules/ko.json mode change 100644 => 100755 kirby/i18n/rules/lt.json mode change 100644 => 100755 kirby/i18n/rules/lv.json mode change 100644 => 100755 kirby/i18n/rules/mk.json mode change 100644 => 100755 kirby/i18n/rules/my.json mode change 100644 => 100755 kirby/i18n/rules/nb.json mode change 100644 => 100755 kirby/i18n/rules/pl.json mode change 100644 => 100755 kirby/i18n/rules/pt_BR.json mode change 100644 => 100755 kirby/i18n/rules/rm.json mode change 100644 => 100755 kirby/i18n/rules/ru.json mode change 100644 => 100755 kirby/i18n/rules/sr.json mode change 100644 => 100755 kirby/i18n/rules/sv_SE.json mode change 100644 => 100755 kirby/i18n/rules/tr.json mode change 100644 => 100755 kirby/i18n/rules/uk.json mode change 100644 => 100755 kirby/i18n/rules/vi.json mode change 100644 => 100755 kirby/i18n/rules/zh.json mode change 100644 => 100755 kirby/i18n/translations/bg.json mode change 100644 => 100755 kirby/i18n/translations/ca.json mode change 100644 => 100755 kirby/i18n/translations/cs.json mode change 100644 => 100755 kirby/i18n/translations/da.json mode change 100644 => 100755 kirby/i18n/translations/de.json mode change 100644 => 100755 kirby/i18n/translations/el.json mode change 100644 => 100755 kirby/i18n/translations/en.json mode change 100644 => 100755 kirby/i18n/translations/eo.json mode change 100644 => 100755 kirby/i18n/translations/es_419.json mode change 100644 => 100755 kirby/i18n/translations/es_ES.json mode change 100644 => 100755 kirby/i18n/translations/fa.json mode change 100644 => 100755 kirby/i18n/translations/fi.json mode change 100644 => 100755 kirby/i18n/translations/fr.json mode change 100644 => 100755 kirby/i18n/translations/hu.json mode change 100644 => 100755 kirby/i18n/translations/id.json mode change 100644 => 100755 kirby/i18n/translations/is_IS.json mode change 100644 => 100755 kirby/i18n/translations/it.json mode change 100644 => 100755 kirby/i18n/translations/ko.json mode change 100644 => 100755 kirby/i18n/translations/lt.json mode change 100644 => 100755 kirby/i18n/translations/nb.json mode change 100644 => 100755 kirby/i18n/translations/nl.json mode change 100644 => 100755 kirby/i18n/translations/pl.json mode change 100644 => 100755 kirby/i18n/translations/pt_BR.json mode change 100644 => 100755 kirby/i18n/translations/pt_PT.json mode change 100644 => 100755 kirby/i18n/translations/ru.json mode change 100644 => 100755 kirby/i18n/translations/sk.json mode change 100644 => 100755 kirby/i18n/translations/sv_SE.json mode change 100644 => 100755 kirby/i18n/translations/tr.json mode change 100644 => 100755 kirby/kirby.pub mode change 100644 => 100755 kirby/panel/dist/apple-touch-icon.png mode change 100644 => 100755 kirby/panel/dist/css/style.css mode change 100644 => 100755 kirby/panel/dist/favicon.png mode change 100644 => 100755 kirby/panel/dist/favicon.svg mode change 100644 => 100755 kirby/panel/dist/img/icons.svg mode change 100644 => 100755 kirby/panel/dist/js/index.js mode change 100644 => 100755 kirby/panel/dist/js/plugins.js mode change 100644 => 100755 kirby/panel/dist/js/vendor.js mode change 100644 => 100755 kirby/router.php mode change 100644 => 100755 kirby/src/Api/Api.php mode change 100644 => 100755 kirby/src/Api/Collection.php mode change 100644 => 100755 kirby/src/Api/Model.php mode change 100644 => 100755 kirby/src/Cache/ApcuCache.php mode change 100644 => 100755 kirby/src/Cache/Cache.php mode change 100644 => 100755 kirby/src/Cache/FileCache.php mode change 100644 => 100755 kirby/src/Cache/MemCached.php mode change 100644 => 100755 kirby/src/Cache/MemoryCache.php mode change 100644 => 100755 kirby/src/Cache/NullCache.php mode change 100644 => 100755 kirby/src/Cache/Value.php mode change 100644 => 100755 kirby/src/Cms/Api.php mode change 100644 => 100755 kirby/src/Cms/App.php mode change 100644 => 100755 kirby/src/Cms/AppCaches.php mode change 100644 => 100755 kirby/src/Cms/AppErrors.php mode change 100644 => 100755 kirby/src/Cms/AppPlugins.php mode change 100644 => 100755 kirby/src/Cms/AppTranslations.php mode change 100644 => 100755 kirby/src/Cms/AppUsers.php mode change 100644 => 100755 kirby/src/Cms/Auth.php mode change 100644 => 100755 kirby/src/Cms/Auth/Challenge.php mode change 100644 => 100755 kirby/src/Cms/Auth/EmailChallenge.php mode change 100644 => 100755 kirby/src/Cms/Auth/Status.php mode change 100644 => 100755 kirby/src/Cms/Block.php delete mode 100644 kirby/src/Cms/BlockConverter.php mode change 100644 => 100755 kirby/src/Cms/Blocks.php mode change 100644 => 100755 kirby/src/Cms/Blueprint.php mode change 100644 => 100755 kirby/src/Cms/Collection.php mode change 100644 => 100755 kirby/src/Cms/Collections.php mode change 100644 => 100755 kirby/src/Cms/Content.php mode change 100644 => 100755 kirby/src/Cms/ContentLock.php mode change 100644 => 100755 kirby/src/Cms/ContentLocks.php mode change 100644 => 100755 kirby/src/Cms/ContentTranslation.php mode change 100644 => 100755 kirby/src/Cms/Core.php mode change 100644 => 100755 kirby/src/Cms/Email.php delete mode 100644 kirby/src/Cms/Environment.php mode change 100644 => 100755 kirby/src/Cms/Event.php mode change 100644 => 100755 kirby/src/Cms/Field.php mode change 100644 => 100755 kirby/src/Cms/Fieldset.php mode change 100644 => 100755 kirby/src/Cms/Fieldsets.php mode change 100644 => 100755 kirby/src/Cms/File.php mode change 100644 => 100755 kirby/src/Cms/FileActions.php mode change 100644 => 100755 kirby/src/Cms/FileBlueprint.php mode change 100644 => 100755 kirby/src/Cms/FileModifications.php mode change 100644 => 100755 kirby/src/Cms/FilePermissions.php mode change 100644 => 100755 kirby/src/Cms/FilePicker.php mode change 100644 => 100755 kirby/src/Cms/FileRules.php mode change 100644 => 100755 kirby/src/Cms/FileVersion.php mode change 100644 => 100755 kirby/src/Cms/Files.php mode change 100644 => 100755 kirby/src/Cms/Find.php mode change 100644 => 100755 kirby/src/Cms/HasChildren.php mode change 100644 => 100755 kirby/src/Cms/HasFiles.php mode change 100644 => 100755 kirby/src/Cms/HasMethods.php mode change 100644 => 100755 kirby/src/Cms/HasSiblings.php create mode 100755 kirby/src/Cms/Helpers.php mode change 100644 => 100755 kirby/src/Cms/Html.php mode change 100644 => 100755 kirby/src/Cms/Ingredients.php mode change 100644 => 100755 kirby/src/Cms/Item.php mode change 100644 => 100755 kirby/src/Cms/Items.php mode change 100644 => 100755 kirby/src/Cms/Language.php mode change 100644 => 100755 kirby/src/Cms/LanguageRouter.php mode change 100644 => 100755 kirby/src/Cms/LanguageRoutes.php mode change 100644 => 100755 kirby/src/Cms/LanguageRules.php mode change 100644 => 100755 kirby/src/Cms/Languages.php mode change 100644 => 100755 kirby/src/Cms/Layout.php mode change 100644 => 100755 kirby/src/Cms/LayoutColumn.php mode change 100644 => 100755 kirby/src/Cms/LayoutColumns.php mode change 100644 => 100755 kirby/src/Cms/Layouts.php mode change 100644 => 100755 kirby/src/Cms/Loader.php mode change 100644 => 100755 kirby/src/Cms/Media.php mode change 100644 => 100755 kirby/src/Cms/Model.php mode change 100644 => 100755 kirby/src/Cms/ModelPermissions.php mode change 100644 => 100755 kirby/src/Cms/ModelWithContent.php mode change 100644 => 100755 kirby/src/Cms/Nest.php mode change 100644 => 100755 kirby/src/Cms/NestCollection.php mode change 100644 => 100755 kirby/src/Cms/NestObject.php mode change 100644 => 100755 kirby/src/Cms/Page.php mode change 100644 => 100755 kirby/src/Cms/PageActions.php mode change 100644 => 100755 kirby/src/Cms/PageBlueprint.php mode change 100644 => 100755 kirby/src/Cms/PagePermissions.php mode change 100644 => 100755 kirby/src/Cms/PagePicker.php mode change 100644 => 100755 kirby/src/Cms/PageRules.php mode change 100644 => 100755 kirby/src/Cms/PageSiblings.php mode change 100644 => 100755 kirby/src/Cms/Pages.php mode change 100644 => 100755 kirby/src/Cms/Pagination.php mode change 100644 => 100755 kirby/src/Cms/Permissions.php mode change 100644 => 100755 kirby/src/Cms/Picker.php mode change 100644 => 100755 kirby/src/Cms/Plugin.php mode change 100644 => 100755 kirby/src/Cms/PluginAssets.php mode change 100644 => 100755 kirby/src/Cms/R.php mode change 100644 => 100755 kirby/src/Cms/Responder.php mode change 100644 => 100755 kirby/src/Cms/Response.php mode change 100644 => 100755 kirby/src/Cms/Role.php mode change 100644 => 100755 kirby/src/Cms/Roles.php mode change 100644 => 100755 kirby/src/Cms/S.php mode change 100644 => 100755 kirby/src/Cms/Search.php mode change 100644 => 100755 kirby/src/Cms/Section.php mode change 100644 => 100755 kirby/src/Cms/Site.php mode change 100644 => 100755 kirby/src/Cms/SiteActions.php mode change 100644 => 100755 kirby/src/Cms/SiteBlueprint.php mode change 100644 => 100755 kirby/src/Cms/SitePermissions.php mode change 100644 => 100755 kirby/src/Cms/SiteRules.php mode change 100644 => 100755 kirby/src/Cms/Structure.php mode change 100644 => 100755 kirby/src/Cms/StructureObject.php mode change 100644 => 100755 kirby/src/Cms/System.php mode change 100644 => 100755 kirby/src/Cms/Template.php mode change 100644 => 100755 kirby/src/Cms/Translation.php mode change 100644 => 100755 kirby/src/Cms/Translations.php mode change 100644 => 100755 kirby/src/Cms/Url.php mode change 100644 => 100755 kirby/src/Cms/User.php mode change 100644 => 100755 kirby/src/Cms/UserActions.php mode change 100644 => 100755 kirby/src/Cms/UserBlueprint.php mode change 100644 => 100755 kirby/src/Cms/UserPermissions.php mode change 100644 => 100755 kirby/src/Cms/UserPicker.php mode change 100644 => 100755 kirby/src/Cms/UserRules.php mode change 100644 => 100755 kirby/src/Cms/Users.php mode change 100644 => 100755 kirby/src/Cms/Visitor.php mode change 100644 => 100755 kirby/src/Data/Data.php mode change 100644 => 100755 kirby/src/Data/Handler.php mode change 100644 => 100755 kirby/src/Data/Json.php mode change 100644 => 100755 kirby/src/Data/PHP.php mode change 100644 => 100755 kirby/src/Data/Txt.php mode change 100644 => 100755 kirby/src/Data/Xml.php mode change 100644 => 100755 kirby/src/Data/Yaml.php mode change 100644 => 100755 kirby/src/Database/Database.php mode change 100644 => 100755 kirby/src/Database/Db.php mode change 100644 => 100755 kirby/src/Database/Query.php mode change 100644 => 100755 kirby/src/Database/Sql.php mode change 100644 => 100755 kirby/src/Database/Sql/Mysql.php mode change 100644 => 100755 kirby/src/Database/Sql/Sqlite.php mode change 100644 => 100755 kirby/src/Email/Body.php mode change 100644 => 100755 kirby/src/Email/Email.php mode change 100644 => 100755 kirby/src/Email/PHPMailer.php mode change 100644 => 100755 kirby/src/Exception/BadMethodCallException.php mode change 100644 => 100755 kirby/src/Exception/DuplicateException.php mode change 100644 => 100755 kirby/src/Exception/ErrorPageException.php mode change 100644 => 100755 kirby/src/Exception/Exception.php mode change 100644 => 100755 kirby/src/Exception/InvalidArgumentException.php mode change 100644 => 100755 kirby/src/Exception/LogicException.php mode change 100644 => 100755 kirby/src/Exception/NotFoundException.php mode change 100644 => 100755 kirby/src/Exception/PermissionException.php mode change 100644 => 100755 kirby/src/Filesystem/Asset.php mode change 100644 => 100755 kirby/src/Filesystem/Dir.php mode change 100644 => 100755 kirby/src/Filesystem/F.php mode change 100644 => 100755 kirby/src/Filesystem/File.php mode change 100644 => 100755 kirby/src/Filesystem/Filename.php mode change 100644 => 100755 kirby/src/Filesystem/IsFile.php mode change 100644 => 100755 kirby/src/Filesystem/Mime.php mode change 100644 => 100755 kirby/src/Form/Field.php mode change 100644 => 100755 kirby/src/Form/Field/BlocksField.php mode change 100644 => 100755 kirby/src/Form/Field/LayoutField.php mode change 100644 => 100755 kirby/src/Form/FieldClass.php mode change 100644 => 100755 kirby/src/Form/Fields.php mode change 100644 => 100755 kirby/src/Form/Form.php mode change 100644 => 100755 kirby/src/Form/Mixin/EmptyState.php mode change 100644 => 100755 kirby/src/Form/Mixin/Max.php mode change 100644 => 100755 kirby/src/Form/Mixin/Min.php mode change 100644 => 100755 kirby/src/Form/Options.php mode change 100644 => 100755 kirby/src/Form/OptionsApi.php mode change 100644 => 100755 kirby/src/Form/OptionsQuery.php mode change 100644 => 100755 kirby/src/Form/Validations.php mode change 100644 => 100755 kirby/src/Http/Cookie.php create mode 100755 kirby/src/Http/Environment.php mode change 100644 => 100755 kirby/src/Http/Exceptions/NextRouteException.php mode change 100644 => 100755 kirby/src/Http/Header.php mode change 100644 => 100755 kirby/src/Http/Idn.php mode change 100644 => 100755 kirby/src/Http/Params.php mode change 100644 => 100755 kirby/src/Http/Path.php mode change 100644 => 100755 kirby/src/Http/Query.php mode change 100644 => 100755 kirby/src/Http/Remote.php mode change 100644 => 100755 kirby/src/Http/Request.php create mode 100755 kirby/src/Http/Request/Auth.php mode change 100644 => 100755 kirby/src/Http/Request/Auth/BasicAuth.php mode change 100644 => 100755 kirby/src/Http/Request/Auth/BearerAuth.php create mode 100755 kirby/src/Http/Request/Auth/SessionAuth.php mode change 100644 => 100755 kirby/src/Http/Request/Body.php mode change 100644 => 100755 kirby/src/Http/Request/Data.php mode change 100644 => 100755 kirby/src/Http/Request/Files.php mode change 100644 => 100755 kirby/src/Http/Request/Query.php mode change 100644 => 100755 kirby/src/Http/Response.php mode change 100644 => 100755 kirby/src/Http/Route.php mode change 100644 => 100755 kirby/src/Http/Router.php mode change 100644 => 100755 kirby/src/Http/Server.php mode change 100644 => 100755 kirby/src/Http/Uri.php mode change 100644 => 100755 kirby/src/Http/Url.php mode change 100644 => 100755 kirby/src/Http/Visitor.php mode change 100644 => 100755 kirby/src/Image/Camera.php mode change 100644 => 100755 kirby/src/Image/Darkroom.php mode change 100644 => 100755 kirby/src/Image/Darkroom/GdLib.php mode change 100644 => 100755 kirby/src/Image/Darkroom/ImageMagick.php mode change 100644 => 100755 kirby/src/Image/Dimensions.php mode change 100644 => 100755 kirby/src/Image/Exif.php mode change 100644 => 100755 kirby/src/Image/Image.php mode change 100644 => 100755 kirby/src/Image/Location.php mode change 100644 => 100755 kirby/src/Panel/Dialog.php mode change 100644 => 100755 kirby/src/Panel/Document.php mode change 100644 => 100755 kirby/src/Panel/Dropdown.php mode change 100644 => 100755 kirby/src/Panel/Field.php mode change 100644 => 100755 kirby/src/Panel/File.php mode change 100644 => 100755 kirby/src/Panel/Home.php mode change 100644 => 100755 kirby/src/Panel/Json.php mode change 100644 => 100755 kirby/src/Panel/Model.php mode change 100644 => 100755 kirby/src/Panel/Page.php mode change 100644 => 100755 kirby/src/Panel/Panel.php mode change 100644 => 100755 kirby/src/Panel/Plugins.php mode change 100644 => 100755 kirby/src/Panel/Redirect.php mode change 100644 => 100755 kirby/src/Panel/Search.php mode change 100644 => 100755 kirby/src/Panel/Site.php mode change 100644 => 100755 kirby/src/Panel/User.php mode change 100644 => 100755 kirby/src/Panel/View.php mode change 100644 => 100755 kirby/src/Parsley/Element.php mode change 100644 => 100755 kirby/src/Parsley/Inline.php mode change 100644 => 100755 kirby/src/Parsley/Parsley.php mode change 100644 => 100755 kirby/src/Parsley/Schema.php mode change 100644 => 100755 kirby/src/Parsley/Schema/Blocks.php mode change 100644 => 100755 kirby/src/Parsley/Schema/Plain.php mode change 100644 => 100755 kirby/src/Sane/DomHandler.php mode change 100644 => 100755 kirby/src/Sane/Handler.php mode change 100644 => 100755 kirby/src/Sane/Html.php mode change 100644 => 100755 kirby/src/Sane/Sane.php mode change 100644 => 100755 kirby/src/Sane/Svg.php mode change 100644 => 100755 kirby/src/Sane/Svgz.php mode change 100644 => 100755 kirby/src/Sane/Xml.php mode change 100644 => 100755 kirby/src/Session/AutoSession.php mode change 100644 => 100755 kirby/src/Session/FileSessionStore.php mode change 100644 => 100755 kirby/src/Session/Session.php mode change 100644 => 100755 kirby/src/Session/SessionData.php mode change 100644 => 100755 kirby/src/Session/SessionStore.php mode change 100644 => 100755 kirby/src/Session/Sessions.php mode change 100644 => 100755 kirby/src/Text/KirbyTag.php mode change 100644 => 100755 kirby/src/Text/KirbyTags.php mode change 100644 => 100755 kirby/src/Text/Markdown.php mode change 100644 => 100755 kirby/src/Text/SmartyPants.php mode change 100644 => 100755 kirby/src/Toolkit/A.php mode change 100644 => 100755 kirby/src/Toolkit/Collection.php mode change 100644 => 100755 kirby/src/Toolkit/Component.php mode change 100644 => 100755 kirby/src/Toolkit/Config.php mode change 100644 => 100755 kirby/src/Toolkit/Controller.php mode change 100644 => 100755 kirby/src/Toolkit/Date.php mode change 100644 => 100755 kirby/src/Toolkit/Dom.php mode change 100644 => 100755 kirby/src/Toolkit/Escape.php mode change 100644 => 100755 kirby/src/Toolkit/Facade.php mode change 100644 => 100755 kirby/src/Toolkit/Html.php mode change 100644 => 100755 kirby/src/Toolkit/I18n.php mode change 100644 => 100755 kirby/src/Toolkit/Iterator.php mode change 100644 => 100755 kirby/src/Toolkit/Locale.php mode change 100644 => 100755 kirby/src/Toolkit/Obj.php mode change 100644 => 100755 kirby/src/Toolkit/Pagination.php mode change 100644 => 100755 kirby/src/Toolkit/Properties.php mode change 100644 => 100755 kirby/src/Toolkit/Query.php mode change 100644 => 100755 kirby/src/Toolkit/Silo.php mode change 100644 => 100755 kirby/src/Toolkit/Str.php mode change 100644 => 100755 kirby/src/Toolkit/Tpl.php mode change 100644 => 100755 kirby/src/Toolkit/V.php mode change 100644 => 100755 kirby/src/Toolkit/View.php mode change 100644 => 100755 kirby/src/Toolkit/Xml.php mode change 100644 => 100755 kirby/vendor/autoload.php mode change 100644 => 100755 kirby/vendor/claviska/simpleimage/LICENSE.md mode change 100644 => 100755 kirby/vendor/claviska/simpleimage/composer.json mode change 100644 => 100755 kirby/vendor/claviska/simpleimage/src/claviska/SimpleImage.php mode change 100644 => 100755 kirby/vendor/composer/ClassLoader.php mode change 100644 => 100755 kirby/vendor/composer/InstalledVersions.php mode change 100644 => 100755 kirby/vendor/composer/LICENSE mode change 100644 => 100755 kirby/vendor/composer/autoload_classmap.php mode change 100644 => 100755 kirby/vendor/composer/autoload_files.php mode change 100644 => 100755 kirby/vendor/composer/autoload_namespaces.php mode change 100644 => 100755 kirby/vendor/composer/autoload_psr4.php mode change 100644 => 100755 kirby/vendor/composer/autoload_real.php mode change 100644 => 100755 kirby/vendor/composer/autoload_static.php mode change 100644 => 100755 kirby/vendor/composer/installed.json mode change 100644 => 100755 kirby/vendor/composer/installed.php mode change 100644 => 100755 kirby/vendor/filp/whoops/LICENSE.md mode change 100644 => 100755 kirby/vendor/filp/whoops/composer.json mode change 100644 => 100755 kirby/vendor/filp/whoops/src/Whoops/Exception/ErrorException.php mode change 100644 => 100755 kirby/vendor/filp/whoops/src/Whoops/Exception/Formatter.php mode change 100644 => 100755 kirby/vendor/filp/whoops/src/Whoops/Exception/Frame.php mode change 100644 => 100755 kirby/vendor/filp/whoops/src/Whoops/Exception/FrameCollection.php mode change 100644 => 100755 kirby/vendor/filp/whoops/src/Whoops/Exception/Inspector.php mode change 100644 => 100755 kirby/vendor/filp/whoops/src/Whoops/Handler/CallbackHandler.php mode change 100644 => 100755 kirby/vendor/filp/whoops/src/Whoops/Handler/Handler.php mode change 100644 => 100755 kirby/vendor/filp/whoops/src/Whoops/Handler/HandlerInterface.php mode change 100644 => 100755 kirby/vendor/filp/whoops/src/Whoops/Handler/JsonResponseHandler.php mode change 100644 => 100755 kirby/vendor/filp/whoops/src/Whoops/Handler/PlainTextHandler.php mode change 100644 => 100755 kirby/vendor/filp/whoops/src/Whoops/Handler/PrettyPageHandler.php mode change 100644 => 100755 kirby/vendor/filp/whoops/src/Whoops/Handler/XmlResponseHandler.php mode change 100644 => 100755 kirby/vendor/filp/whoops/src/Whoops/Resources/css/prism.css mode change 100644 => 100755 kirby/vendor/filp/whoops/src/Whoops/Resources/css/whoops.base.css mode change 100644 => 100755 kirby/vendor/filp/whoops/src/Whoops/Resources/js/clipboard.min.js mode change 100644 => 100755 kirby/vendor/filp/whoops/src/Whoops/Resources/js/prism.js mode change 100644 => 100755 kirby/vendor/filp/whoops/src/Whoops/Resources/js/whoops.base.js mode change 100644 => 100755 kirby/vendor/filp/whoops/src/Whoops/Resources/js/zepto.min.js mode change 100644 => 100755 kirby/vendor/filp/whoops/src/Whoops/Resources/views/env_details.html.php mode change 100644 => 100755 kirby/vendor/filp/whoops/src/Whoops/Resources/views/frame_code.html.php mode change 100644 => 100755 kirby/vendor/filp/whoops/src/Whoops/Resources/views/frame_list.html.php mode change 100644 => 100755 kirby/vendor/filp/whoops/src/Whoops/Resources/views/frames_container.html.php mode change 100644 => 100755 kirby/vendor/filp/whoops/src/Whoops/Resources/views/frames_description.html.php mode change 100644 => 100755 kirby/vendor/filp/whoops/src/Whoops/Resources/views/header.html.php mode change 100644 => 100755 kirby/vendor/filp/whoops/src/Whoops/Resources/views/header_outer.html.php mode change 100644 => 100755 kirby/vendor/filp/whoops/src/Whoops/Resources/views/layout.html.php mode change 100644 => 100755 kirby/vendor/filp/whoops/src/Whoops/Resources/views/panel_details.html.php mode change 100644 => 100755 kirby/vendor/filp/whoops/src/Whoops/Resources/views/panel_details_outer.html.php mode change 100644 => 100755 kirby/vendor/filp/whoops/src/Whoops/Resources/views/panel_left.html.php mode change 100644 => 100755 kirby/vendor/filp/whoops/src/Whoops/Resources/views/panel_left_outer.html.php mode change 100644 => 100755 kirby/vendor/filp/whoops/src/Whoops/Run.php mode change 100644 => 100755 kirby/vendor/filp/whoops/src/Whoops/RunInterface.php mode change 100644 => 100755 kirby/vendor/filp/whoops/src/Whoops/Util/HtmlDumperOutput.php mode change 100644 => 100755 kirby/vendor/filp/whoops/src/Whoops/Util/Misc.php mode change 100644 => 100755 kirby/vendor/filp/whoops/src/Whoops/Util/SystemFacade.php mode change 100644 => 100755 kirby/vendor/filp/whoops/src/Whoops/Util/TemplateHelper.php mode change 100644 => 100755 kirby/vendor/laminas/laminas-escaper/COPYRIGHT.md mode change 100644 => 100755 kirby/vendor/laminas/laminas-escaper/LICENSE.md mode change 100644 => 100755 kirby/vendor/laminas/laminas-escaper/composer.json mode change 100644 => 100755 kirby/vendor/laminas/laminas-escaper/composer.lock mode change 100644 => 100755 kirby/vendor/laminas/laminas-escaper/src/Escaper.php mode change 100644 => 100755 kirby/vendor/laminas/laminas-escaper/src/Exception/ExceptionInterface.php mode change 100644 => 100755 kirby/vendor/laminas/laminas-escaper/src/Exception/InvalidArgumentException.php mode change 100644 => 100755 kirby/vendor/laminas/laminas-escaper/src/Exception/RuntimeException.php mode change 100644 => 100755 kirby/vendor/league/color-extractor/LICENSE mode change 100644 => 100755 kirby/vendor/league/color-extractor/composer.json mode change 100644 => 100755 kirby/vendor/league/color-extractor/src/League/ColorExtractor/Color.php mode change 100644 => 100755 kirby/vendor/league/color-extractor/src/League/ColorExtractor/ColorExtractor.php mode change 100644 => 100755 kirby/vendor/league/color-extractor/src/League/ColorExtractor/Palette.php mode change 100644 => 100755 kirby/vendor/michelf/php-smartypants/License.md mode change 100644 => 100755 kirby/vendor/michelf/php-smartypants/Michelf/SmartyPants.inc.php mode change 100644 => 100755 kirby/vendor/michelf/php-smartypants/Michelf/SmartyPants.php mode change 100644 => 100755 kirby/vendor/michelf/php-smartypants/Michelf/SmartyPantsTypographer.inc.php mode change 100644 => 100755 kirby/vendor/michelf/php-smartypants/Michelf/SmartyPantsTypographer.php mode change 100644 => 100755 kirby/vendor/michelf/php-smartypants/composer.json mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/LICENSE mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/composer.json mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/get_oauth_token.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-af.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-ar.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-az.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-ba.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-be.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-bg.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-ca.php delete mode 100644 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-ch.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-cs.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-da.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-de.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-el.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-eo.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-es.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-et.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-fa.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-fi.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-fo.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-fr.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-gl.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-he.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-hi.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-hr.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-hu.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-hy.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-id.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-it.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-ja.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-ka.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-ko.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-lt.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-lv.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-mg.php create mode 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-mn.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-ms.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-nb.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-nl.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-pl.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-pt.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-pt_br.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-ro.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-ru.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-sk.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-sl.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-sr.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-sr_latn.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-sv.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-tl.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-tr.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-uk.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-vi.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh_cn.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/src/Exception.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/src/OAuth.php create mode 100755 kirby/vendor/phpmailer/phpmailer/src/OAuthTokenProvider.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/src/PHPMailer.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/src/POP3.php mode change 100644 => 100755 kirby/vendor/phpmailer/phpmailer/src/SMTP.php mode change 100644 => 100755 kirby/vendor/psr/log/LICENSE mode change 100644 => 100755 kirby/vendor/psr/log/Psr/Log/AbstractLogger.php mode change 100644 => 100755 kirby/vendor/psr/log/Psr/Log/InvalidArgumentException.php mode change 100644 => 100755 kirby/vendor/psr/log/Psr/Log/LogLevel.php mode change 100644 => 100755 kirby/vendor/psr/log/Psr/Log/LoggerAwareInterface.php mode change 100644 => 100755 kirby/vendor/psr/log/Psr/Log/LoggerAwareTrait.php mode change 100644 => 100755 kirby/vendor/psr/log/Psr/Log/LoggerInterface.php mode change 100644 => 100755 kirby/vendor/psr/log/Psr/Log/LoggerTrait.php mode change 100644 => 100755 kirby/vendor/psr/log/Psr/Log/NullLogger.php mode change 100644 => 100755 kirby/vendor/psr/log/composer.json mode change 100644 => 100755 kirby/vendor/symfony/polyfill-intl-idn/Idn.php mode change 100644 => 100755 kirby/vendor/symfony/polyfill-intl-idn/Info.php mode change 100644 => 100755 kirby/vendor/symfony/polyfill-intl-idn/LICENSE mode change 100644 => 100755 kirby/vendor/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php mode change 100644 => 100755 kirby/vendor/symfony/polyfill-intl-idn/Resources/unidata/Regex.php mode change 100644 => 100755 kirby/vendor/symfony/polyfill-intl-idn/Resources/unidata/deviation.php mode change 100644 => 100755 kirby/vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed.php mode change 100644 => 100755 kirby/vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed_STD3_mapped.php mode change 100644 => 100755 kirby/vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed_STD3_valid.php mode change 100644 => 100755 kirby/vendor/symfony/polyfill-intl-idn/Resources/unidata/ignored.php mode change 100644 => 100755 kirby/vendor/symfony/polyfill-intl-idn/Resources/unidata/mapped.php mode change 100644 => 100755 kirby/vendor/symfony/polyfill-intl-idn/Resources/unidata/virama.php mode change 100644 => 100755 kirby/vendor/symfony/polyfill-intl-idn/bootstrap.php mode change 100644 => 100755 kirby/vendor/symfony/polyfill-intl-idn/bootstrap80.php mode change 100644 => 100755 kirby/vendor/symfony/polyfill-intl-idn/composer.json mode change 100644 => 100755 kirby/vendor/symfony/polyfill-intl-normalizer/LICENSE mode change 100644 => 100755 kirby/vendor/symfony/polyfill-intl-normalizer/Normalizer.php mode change 100644 => 100755 kirby/vendor/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php mode change 100644 => 100755 kirby/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/canonicalComposition.php mode change 100644 => 100755 kirby/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/canonicalDecomposition.php mode change 100644 => 100755 kirby/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/combiningClass.php mode change 100644 => 100755 kirby/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/compatibilityDecomposition.php mode change 100644 => 100755 kirby/vendor/symfony/polyfill-intl-normalizer/bootstrap.php mode change 100644 => 100755 kirby/vendor/symfony/polyfill-intl-normalizer/bootstrap80.php mode change 100644 => 100755 kirby/vendor/symfony/polyfill-intl-normalizer/composer.json mode change 100644 => 100755 kirby/vendor/symfony/polyfill-mbstring/LICENSE mode change 100644 => 100755 kirby/vendor/symfony/polyfill-mbstring/Mbstring.php mode change 100644 => 100755 kirby/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php mode change 100644 => 100755 kirby/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php mode change 100644 => 100755 kirby/vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php mode change 100644 => 100755 kirby/vendor/symfony/polyfill-mbstring/bootstrap.php mode change 100644 => 100755 kirby/vendor/symfony/polyfill-mbstring/bootstrap80.php mode change 100644 => 100755 kirby/vendor/symfony/polyfill-mbstring/composer.json mode change 100644 => 100755 kirby/views/browser.php mode change 100644 => 100755 kirby/views/fatal.php mode change 100644 => 100755 kirby/views/panel.php mode change 100644 => 100755 kirby/views/php.php mode change 100644 => 100755 kirby/views/snippets/footer.php mode change 100644 => 100755 kirby/views/snippets/header.php diff --git a/kirby/.editorconfig b/kirby/.editorconfig old mode 100644 new mode 100755 diff --git a/kirby/CONTRIBUTING.md b/kirby/CONTRIBUTING.md old mode 100644 new mode 100755 diff --git a/kirby/LICENSE.md b/kirby/LICENSE.md old mode 100644 new mode 100755 diff --git a/kirby/README.md b/kirby/README.md old mode 100644 new mode 100755 diff --git a/kirby/SECURITY.md b/kirby/SECURITY.md old mode 100644 new mode 100755 diff --git a/kirby/assets/whoops.css b/kirby/assets/whoops.css old mode 100644 new mode 100755 diff --git a/kirby/bootstrap.php b/kirby/bootstrap.php old mode 100644 new mode 100755 diff --git a/kirby/cacert.pem b/kirby/cacert.pem old mode 100644 new mode 100755 diff --git a/kirby/composer.json b/kirby/composer.json old mode 100644 new mode 100755 index f851047..5520e4b --- a/kirby/composer.json +++ b/kirby/composer.json @@ -3,7 +3,7 @@ "description": "The Kirby 3 core", "license": "proprietary", "type": "kirby-cms", - "version": "3.6.6", + "version": "3.7.0", "keywords": [ "kirby", "cms", @@ -23,24 +23,41 @@ "forum": "https://forum.getkirby.com", "source": "https://github.com/getkirby/kirby" }, - "_comment": "TODO: psr/log is not used by Kirby; drop pinned version when Kirby no longer supports PHP 7", "require": { "php": ">=7.4.0 <8.2.0", + "ext-SimpleXML": "*", "ext-ctype": "*", + "ext-curl": "*", + "ext-dom": "*", + "ext-filter": "*", + "ext-hash": "*", + "ext-iconv": "*", + "ext-json": "*", + "ext-libxml": "*", "ext-mbstring": "*", + "ext-openssl": "*", "claviska/simpleimage": "3.6.5", "filp/whoops": "2.14.5", "getkirby/composer-installer": "^1.2.1", "laminas/laminas-escaper": "2.10.0", "michelf/php-smartypants": "1.8.1", - "phpmailer/phpmailer": "6.5.4", - "psr/log": "1.1.4", - "symfony/polyfill-intl-idn": "1.25.0", - "symfony/polyfill-mbstring": "1.25.0" + "phpmailer/phpmailer": "6.6.3", + "symfony/polyfill-intl-idn": "1.26.0", + "symfony/polyfill-mbstring": "1.26.0" }, "replace": { "symfony/polyfill-php72": "*" }, + "suggest": { + "ext-PDO": "Support for using databases", + "ext-apcu": "Support for the Apcu cache driver", + "ext-exif": "Support for exif information from images", + "ext-fileinfo": "Improved mime type detection for files", + "ext-intl": "Improved i18n number formatting", + "ext-memcached": "Support for the Memcached cache driver", + "ext-zip": "Support for ZIP archive file functions", + "ext-zlib": "Sanitization and validation for svgz files" + }, "autoload": { "psr-4": { "Kirby\\": "src/" @@ -58,6 +75,9 @@ "getkirby/composer-installer": true }, "optimize-autoloader": true, + "platform": { + "php": "7.4.0" + }, "platform-check": false }, "extra": { diff --git a/kirby/composer.lock b/kirby/composer.lock old mode 100644 new mode 100755 index bcf573a..779d384 --- a/kirby/composer.lock +++ b/kirby/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "cb6bffc372828b6d36107d104c0b2a3e", + "content-hash": "ead899493289b7d37fa3cef5819364eb", "packages": [ { "name": "claviska/simpleimage", @@ -349,16 +349,16 @@ }, { "name": "phpmailer/phpmailer", - "version": "v6.5.4", + "version": "v6.6.3", "source": { "type": "git", "url": "https://github.com/PHPMailer/PHPMailer.git", - "reference": "c0d9f7dd3c2aa247ca44791e9209233829d82285" + "reference": "9400f305a898f194caff5521f64e5dfa926626f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/c0d9f7dd3c2aa247ca44791e9209233829d82285", - "reference": "c0d9f7dd3c2aa247ca44791e9209233829d82285", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/9400f305a898f194caff5521f64e5dfa926626f3", + "reference": "9400f305a898f194caff5521f64e5dfa926626f3", "shasum": "" }, "require": { @@ -370,8 +370,8 @@ "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "doctrine/annotations": "^1.2", - "php-parallel-lint/php-console-highlighter": "^0.5.0", - "php-parallel-lint/php-parallel-lint": "^1.3.1", + "php-parallel-lint/php-console-highlighter": "^1.0.0", + "php-parallel-lint/php-parallel-lint": "^1.3.2", "phpcompatibility/php-compatibility": "^9.3.5", "roave/security-advisories": "dev-latest", "squizlabs/php_codesniffer": "^3.6.2", @@ -415,7 +415,7 @@ "description": "PHPMailer is a full-featured email creation and transfer class for PHP", "support": { "issues": "https://github.com/PHPMailer/PHPMailer/issues", - "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.5.4" + "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.6.3" }, "funding": [ { @@ -423,7 +423,7 @@ "type": "github" } ], - "time": "2022-02-17T08:19:04+00:00" + "time": "2022-06-20T09:21:02+00:00" }, { "name": "psr/log", @@ -477,16 +477,16 @@ }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "749045c69efb97c70d25d7463abba812e91f3a44" + "reference": "59a8d271f00dd0e4c2e518104cc7963f655a1aa8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/749045c69efb97c70d25d7463abba812e91f3a44", - "reference": "749045c69efb97c70d25d7463abba812e91f3a44", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/59a8d271f00dd0e4c2e518104cc7963f655a1aa8", + "reference": "59a8d271f00dd0e4c2e518104cc7963f655a1aa8", "shasum": "" }, "require": { @@ -500,7 +500,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -544,7 +544,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.26.0" }, "funding": [ { @@ -560,20 +560,20 @@ "type": "tidelift" } ], - "time": "2021-09-14T14:02:44+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8" + "reference": "219aa369ceff116e673852dce47c3a41794c14bd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8", - "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/219aa369ceff116e673852dce47c3a41794c14bd", + "reference": "219aa369ceff116e673852dce47c3a41794c14bd", "shasum": "" }, "require": { @@ -585,7 +585,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -628,7 +628,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.26.0" }, "funding": [ { @@ -644,20 +644,20 @@ "type": "tidelift" } ], - "time": "2021-02-19T12:13:01+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825" + "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825", - "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", "shasum": "" }, "require": { @@ -672,7 +672,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -711,7 +711,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" }, "funding": [ { @@ -727,7 +727,7 @@ "type": "tidelift" } ], - "time": "2021-11-30T18:21:41+00:00" + "time": "2022-05-24T11:49:31+00:00" } ], "packages-dev": [], @@ -738,9 +738,21 @@ "prefer-lowest": false, "platform": { "php": ">=7.4.0 <8.2.0", + "ext-simplexml": "*", "ext-ctype": "*", - "ext-mbstring": "*" + "ext-curl": "*", + "ext-dom": "*", + "ext-filter": "*", + "ext-hash": "*", + "ext-iconv": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-openssl": "*" }, "platform-dev": [], - "plugin-api-version": "2.1.0" + "platform-overrides": { + "php": "7.4.0" + }, + "plugin-api-version": "2.3.0" } diff --git a/kirby/config/aliases.php b/kirby/config/aliases.php old mode 100644 new mode 100755 index 7366e6c..a9a4a4f --- a/kirby/config/aliases.php +++ b/kirby/config/aliases.php @@ -7,6 +7,7 @@ return [ 'file' => 'Kirby\Cms\File', 'files' => 'Kirby\Cms\Files', 'find' => 'Kirby\Cms\Find', + 'helpers' => 'Kirby\Cms\Helpers', 'html' => 'Kirby\Cms\Html', 'kirby' => 'Kirby\Cms\App', 'page' => 'Kirby\Cms\Page', diff --git a/kirby/config/api/authentication.php b/kirby/config/api/authentication.php old mode 100644 new mode 100755 diff --git a/kirby/config/api/collections.php b/kirby/config/api/collections.php old mode 100644 new mode 100755 diff --git a/kirby/config/api/models.php b/kirby/config/api/models.php old mode 100644 new mode 100755 diff --git a/kirby/config/api/models/File.php b/kirby/config/api/models/File.php old mode 100644 new mode 100755 index 64fde1d..d8d2fac --- a/kirby/config/api/models/File.php +++ b/kirby/config/api/models/File.php @@ -29,13 +29,6 @@ return [ }, 'niceSize' => fn (File $file) => $file->niceSize(), 'options' => fn (File $file) => $file->panel()->options(), - 'panelIcon' => function (File $file) { - // TODO: remove in 3.7.0 - // @codeCoverageIgnoreStart - deprecated('The API field file.panelIcon has been deprecated and will be removed in 3.7.0. Use file.panelImage instead'); - return $file->panel()->image(); - // @codeCoverageIgnoreEnd - }, 'panelImage' => fn (File $file) => $file->panel()->image(), 'panelUrl' => fn (File $file) => $file->panel()->url(true), 'prev' => fn (File $file) => $file->prev(), diff --git a/kirby/config/api/models/FileBlueprint.php b/kirby/config/api/models/FileBlueprint.php old mode 100644 new mode 100755 diff --git a/kirby/config/api/models/FileVersion.php b/kirby/config/api/models/FileVersion.php old mode 100644 new mode 100755 diff --git a/kirby/config/api/models/Language.php b/kirby/config/api/models/Language.php old mode 100644 new mode 100755 diff --git a/kirby/config/api/models/Page.php b/kirby/config/api/models/Page.php old mode 100644 new mode 100755 index d188e3d..50a1de2 --- a/kirby/config/api/models/Page.php +++ b/kirby/config/api/models/Page.php @@ -1,5 +1,6 @@ fn (Page $page) => $page->isSortable(), /** * @deprecated 3.6.0 - * @todo Throw deprecated warning in 3.7.0 * @todo Remove in 3.8.0 * @codeCoverageIgnore */ 'next' => function (Page $page) { + Helpers::deprecated('The API field page.next has been deprecated and will be removed in 3.8.0.'); + return $page ->nextAll() ->filter('intendedTemplate', $page->intendedTemplate()) @@ -36,24 +38,17 @@ return [ }, 'num' => fn (Page $page) => $page->num(), 'options' => fn (Page $page) => $page->panel()->options(['preview']), - /** - * @todo Remove in 3.7.0 - * @codeCoverageIgnore - */ - 'panelIcon' => function (Page $page) { - deprecated('The API field page.panelIcon has been deprecated and will be removed in 3.7.0. Use page.panelImage instead'); - return $page->panel()->image(); - }, 'panelImage' => fn (Page $page) => $page->panel()->image(), 'parent' => fn (Page $page) => $page->parent(), 'parents' => fn (Page $page) => $page->parents()->flip(), /** * @deprecated 3.6.0 - * @todo Throw deprecated warning in 3.7.0 * @todo Remove in 3.8.0 * @codeCoverageIgnore */ 'prev' => function (Page $page) { + Helpers::deprecated('The API field page.prev has been deprecated and will be removed in 3.8.0.'); + return $page ->prevAll() ->filter('intendedTemplate', $page->intendedTemplate()) diff --git a/kirby/config/api/models/PageBlueprint.php b/kirby/config/api/models/PageBlueprint.php old mode 100644 new mode 100755 diff --git a/kirby/config/api/models/Role.php b/kirby/config/api/models/Role.php old mode 100644 new mode 100755 diff --git a/kirby/config/api/models/Site.php b/kirby/config/api/models/Site.php old mode 100644 new mode 100755 diff --git a/kirby/config/api/models/SiteBlueprint.php b/kirby/config/api/models/SiteBlueprint.php old mode 100644 new mode 100755 diff --git a/kirby/config/api/models/System.php b/kirby/config/api/models/System.php old mode 100644 new mode 100755 diff --git a/kirby/config/api/models/Translation.php b/kirby/config/api/models/Translation.php old mode 100644 new mode 100755 diff --git a/kirby/config/api/models/User.php b/kirby/config/api/models/User.php old mode 100644 new mode 100755 diff --git a/kirby/config/api/models/UserBlueprint.php b/kirby/config/api/models/UserBlueprint.php old mode 100644 new mode 100755 diff --git a/kirby/config/api/routes.php b/kirby/config/api/routes.php old mode 100644 new mode 100755 diff --git a/kirby/config/api/routes/auth.php b/kirby/config/api/routes/auth.php old mode 100644 new mode 100755 diff --git a/kirby/config/api/routes/files.php b/kirby/config/api/routes/files.php old mode 100644 new mode 100755 diff --git a/kirby/config/api/routes/languages.php b/kirby/config/api/routes/languages.php old mode 100644 new mode 100755 diff --git a/kirby/config/api/routes/lock.php b/kirby/config/api/routes/lock.php old mode 100644 new mode 100755 index bbe9bad..935d5fe --- a/kirby/config/api/routes/lock.php +++ b/kirby/config/api/routes/lock.php @@ -5,29 +5,6 @@ * Content Lock Routes */ return [ - [ - 'pattern' => '(:all)/lock', - 'method' => 'GET', - /** - * @deprecated 3.6.0 - * @todo Remove in 3.7.0 - */ - 'action' => function (string $path) { - deprecated('The `GET (:all)/lock` API endpoint has been deprecated and will be removed in 3.7.0'); - - if ($lock = $this->parent($path)->lock()) { - return [ - 'supported' => true, - 'locked' => $lock->get() - ]; - } - - return [ - 'supported' => false, - 'locked' => null - ]; - } - ], [ 'pattern' => '(:all)/lock', 'method' => 'PATCH', @@ -46,30 +23,6 @@ return [ } } ], - [ - 'pattern' => '(:all)/unlock', - 'method' => 'GET', - /** - * @deprecated 3.6.0 - * @todo Remove in 3.7.0 - */ - 'action' => function (string $path) { - deprecated('The `GET (:all)/unlock` API endpoint has been deprecated and will be removed in 3.7.0'); - - - if ($lock = $this->parent($path)->lock()) { - return [ - 'supported' => true, - 'unlocked' => $lock->isUnlocked() - ]; - } - - return [ - 'supported' => false, - 'unlocked' => null - ]; - } - ], [ 'pattern' => '(:all)/unlock', 'method' => 'PATCH', diff --git a/kirby/config/api/routes/pages.php b/kirby/config/api/routes/pages.php old mode 100644 new mode 100755 index 247f970..525fdc4 --- a/kirby/config/api/routes/pages.php +++ b/kirby/config/api/routes/pages.php @@ -1,5 +1,6 @@ [ - 'pages/(:any)/blueprints', - /** - * @deprecated - * @todo remove in 3.7.0 - */ - 'pages/(:any)/children/blueprints', - ], + 'pattern' => 'pages/(:any)/blueprints', 'method' => 'GET', 'action' => function (string $id) { - // @codeCoverageIgnoreStart - if ($this->route->pattern() === 'pages/([a-zA-Z0-9\.\-_%= \+\@\(\)]+)/children/blueprints') { - deprecated('`GET pages/(:any)/children/blueprints` API endpoint has been deprecated and will be removed in 3.7.0. Use `GET pages/(:any)/blueprints` instead'); - } - // @codeCoverageIgnoreEnd return $this->page($id)->blueprints($this->requestQuery('section')); } ], diff --git a/kirby/config/api/routes/roles.php b/kirby/config/api/routes/roles.php old mode 100644 new mode 100755 index ab9505b..bd91952 --- a/kirby/config/api/routes/roles.php +++ b/kirby/config/api/routes/roles.php @@ -8,13 +8,15 @@ return [ 'pattern' => 'roles', 'method' => 'GET', 'action' => function () { - switch (get('canBe')) { + $kirby = $this->kirby(); + + switch ($kirby->request()->get('canBe')) { case 'changed': - return $this->kirby()->roles()->canBeChanged(); + return $kirby->roles()->canBeChanged(); case 'created': - return $this->kirby()->roles()->canBeCreated(); + return $kirby->roles()->canBeCreated(); default: - return $this->kirby()->roles(); + return $kirby->roles(); } } ], diff --git a/kirby/config/api/routes/site.php b/kirby/config/api/routes/site.php old mode 100644 new mode 100755 index 59e8cab..890707e --- a/kirby/config/api/routes/site.php +++ b/kirby/config/api/routes/site.php @@ -1,5 +1,6 @@ [ - 'site/blueprints', - /** - * @deprecated - * @todo remove in 3.7.0 - */ - 'site/children/blueprints', - ], + 'pattern' => 'site/blueprints', 'method' => 'GET', 'action' => function () { - // @codeCoverageIgnoreStart - if ($this->route->pattern() === 'site/children/blueprints') { - deprecated('`GET site/children/blueprints` API endpoint has been deprecated and will be removed in 3.7.0. Use `GET site/blueprints` instead.'); - } - // @codeCoverageIgnoreEnd return $this->site()->blueprints($this->requestQuery('section')); } ], diff --git a/kirby/config/api/routes/system.php b/kirby/config/api/routes/system.php old mode 100644 new mode 100755 diff --git a/kirby/config/api/routes/translations.php b/kirby/config/api/routes/translations.php old mode 100644 new mode 100755 diff --git a/kirby/config/api/routes/users.php b/kirby/config/api/routes/users.php old mode 100644 new mode 100755 diff --git a/kirby/config/areas/account.php b/kirby/config/areas/account.php old mode 100644 new mode 100755 index b2f629f..304aca2 --- a/kirby/config/areas/account.php +++ b/kirby/config/areas/account.php @@ -1,9 +1,11 @@ 'account', - 'label' => t('view.account'), + 'label' => I18n::translate('view.account'), 'search' => 'users', 'dialogs' => require __DIR__ . '/account/dialogs.php', 'dropdowns' => require __DIR__ . '/account/dropdowns.php', diff --git a/kirby/config/areas/account/dialogs.php b/kirby/config/areas/account/dialogs.php old mode 100644 new mode 100755 diff --git a/kirby/config/areas/account/dropdowns.php b/kirby/config/areas/account/dropdowns.php old mode 100644 new mode 100755 diff --git a/kirby/config/areas/account/views.php b/kirby/config/areas/account/views.php old mode 100644 new mode 100755 index 98818ba..e85ef77 --- a/kirby/config/areas/account/views.php +++ b/kirby/config/areas/account/views.php @@ -1,5 +1,6 @@ 'account', 'action' => fn () => [ 'component' => 'k-account-view', - 'props' => kirby()->user()->panel()->props(), + 'props' => App::instance()->user()->panel()->props(), ], ], 'account.file' => [ @@ -21,7 +22,7 @@ return [ 'pattern' => 'logout', 'auth' => false, 'action' => function () { - if ($user = kirby()->user()) { + if ($user = App::instance()->user()) { $user->logout(); } Panel::go('login'); diff --git a/kirby/config/areas/files/dialogs.php b/kirby/config/areas/files/dialogs.php old mode 100644 new mode 100755 index 4c51ef0..9a37449 --- a/kirby/config/areas/files/dialogs.php +++ b/kirby/config/areas/files/dialogs.php @@ -4,6 +4,7 @@ use Kirby\Cms\Find; use Kirby\Panel\Field; use Kirby\Panel\Panel; use Kirby\Toolkit\Escape; +use Kirby\Toolkit\I18n; /** * Shared file dialogs @@ -21,7 +22,7 @@ return [ 'props' => [ 'fields' => [ 'name' => [ - 'label' => t('name'), + 'label' => I18n::translate('name'), 'type' => 'slug', 'required' => true, 'icon' => 'title', @@ -30,7 +31,7 @@ return [ 'preselect' => true ] ], - 'submitButton' => t('rename'), + 'submitButton' => I18n::translate('rename'), 'value' => [ 'name' => $file->name(), ] @@ -39,7 +40,7 @@ return [ }, 'submit' => function (string $path, string $filename) { $file = Find::file($path, $filename); - $renamed = $file->changeName(get('name')); + $renamed = $file->changeName($file->kirby()->request()->get('name')); $oldUrl = $file->panel()->url(true); $newUrl = $renamed->panel()->url(true); $response = [ @@ -70,7 +71,7 @@ return [ 'fields' => [ 'position' => Field::filePosition($file) ], - 'submitButton' => t('change'), + 'submitButton' => I18n::translate('change'), 'value' => [ 'position' => $file->sort()->isEmpty() ? $file->siblings(false)->count() + 1 : $file->sort()->toInt(), ] @@ -81,7 +82,7 @@ return [ $file = Find::file($path, $filename); $files = $file->siblings()->sorted(); $ids = $files->keys(); - $newIndex = (int)(get('position')) - 1; + $newIndex = (int)($file->kirby()->request()->get('position')) - 1; $oldIndex = $files->indexOf($file); array_splice($ids, $oldIndex, 1); @@ -101,7 +102,7 @@ return [ return [ 'component' => 'k-remove-dialog', 'props' => [ - 'text' => tt('file.delete.confirm', [ + 'text' => I18n::template('file.delete.confirm', [ 'filename' => Escape::html($file->filename()) ]), ] diff --git a/kirby/config/areas/files/dropdowns.php b/kirby/config/areas/files/dropdowns.php old mode 100644 new mode 100755 diff --git a/kirby/config/areas/installation.php b/kirby/config/areas/installation.php old mode 100644 new mode 100755 index 9568e36..1440b19 --- a/kirby/config/areas/installation.php +++ b/kirby/config/areas/installation.php @@ -1,11 +1,12 @@ 'settings', - 'label' => t('view.installation'), + 'label' => I18n::translate('view.installation'), 'views' => [ 'installation' => [ 'pattern' => 'installation', diff --git a/kirby/config/areas/languages.php b/kirby/config/areas/languages.php old mode 100644 new mode 100755 index ce0be15..a454043 --- a/kirby/config/areas/languages.php +++ b/kirby/config/areas/languages.php @@ -1,9 +1,11 @@ 'globe', - 'label' => t('view.languages'), + 'label' => I18n::translate('view.languages'), 'menu' => true, 'dialogs' => require __DIR__ . '/languages/dialogs.php', 'views' => require __DIR__ . '/languages/views.php' diff --git a/kirby/config/areas/languages/dialogs.php b/kirby/config/areas/languages/dialogs.php old mode 100644 new mode 100755 index d4bd5ed..ad927f7 --- a/kirby/config/areas/languages/dialogs.php +++ b/kirby/config/areas/languages/dialogs.php @@ -1,19 +1,21 @@ [ - 'label' => t('language.name'), + 'label' => I18n::translate('language.name'), 'type' => 'text', 'required' => true, 'icon' => 'title' ], 'code' => [ - 'label' => t('language.code'), + 'label' => I18n::translate('language.code'), 'type' => 'text', 'required' => true, 'counter' => false, @@ -21,18 +23,18 @@ $languageDialogFields = [ 'width' => '1/2' ], 'direction' => [ - 'label' => t('language.direction'), + 'label' => I18n::translate('language.direction'), 'type' => 'select', 'required' => true, 'empty' => false, 'options' => [ - ['value' => 'ltr', 'text' => t('language.direction.ltr')], - ['value' => 'rtl', 'text' => t('language.direction.rtl')] + ['value' => 'ltr', 'text' => I18n::translate('language.direction.ltr')], + ['value' => 'rtl', 'text' => I18n::translate('language.direction.rtl')] ], 'width' => '1/2' ], 'locale' => [ - 'label' => t('language.locale'), + 'label' => I18n::translate('language.locale'), 'type' => 'text', ], ]; @@ -47,7 +49,7 @@ return [ 'component' => 'k-language-dialog', 'props' => [ 'fields' => $languageDialogFields, - 'submitButton' => t('language.create'), + 'submitButton' => I18n::translate('language.create'), 'value' => [ 'code' => '', 'direction' => 'ltr', @@ -58,12 +60,16 @@ return [ ]; }, 'submit' => function () { - kirby()->languages()->create([ - 'code' => get('code'), - 'direction' => get('direction'), - 'locale' => get('locale'), - 'name' => get('name'), + $kirby = App::instance(); + + $data = $kirby->request()->get([ + 'code', + 'direction', + 'locale', + 'name' ]); + $kirby->languages()->create($data); + return [ 'event' => 'language.create' ]; @@ -78,7 +84,7 @@ return [ return [ 'component' => 'k-remove-dialog', 'props' => [ - 'text' => tt('language.delete.confirm', [ + 'text' => I18n::template('language.delete.confirm', [ 'name' => Escape::html($language->name()) ]) ] @@ -116,7 +122,7 @@ return [ $fields['locale'] = [ 'label' => $fields['locale']['label'], 'type' => 'info', - 'text' => t('language.locale.warning') + 'text' => I18n::translate('language.locale.warning') ]; } @@ -124,7 +130,7 @@ return [ 'component' => 'k-language-dialog', 'props' => [ 'fields' => $fields, - 'submitButton' => t('save'), + 'submitButton' => I18n::translate('save'), 'value' => [ 'code' => $language->code(), 'direction' => $language->direction(), @@ -136,11 +142,11 @@ return [ ]; }, 'submit' => function (string $id) { - $language = Find::language($id)->update([ - 'direction' => get('direction'), - 'locale' => get('locale'), - 'name' => get('name'), - ]); + $kirby = App::instance(); + + $data = $kirby->request()->get(['direction', 'locale', 'name']); + $language = Find::language($id)->update($data); + return [ 'event' => 'language.update' ]; diff --git a/kirby/config/areas/languages/views.php b/kirby/config/areas/languages/views.php old mode 100644 new mode 100755 index f5bf842..d824ebf --- a/kirby/config/areas/languages/views.php +++ b/kirby/config/areas/languages/views.php @@ -1,12 +1,13 @@ [ 'pattern' => 'languages', 'action' => function () { - $kirby = kirby(); + $kirby = App::instance(); return [ 'component' => 'k-languages-view', diff --git a/kirby/config/areas/login.php b/kirby/config/areas/login.php old mode 100644 new mode 100755 index d323fda..590a7c4 --- a/kirby/config/areas/login.php +++ b/kirby/config/areas/login.php @@ -1,11 +1,12 @@ 'user', - 'label' => t('login'), + 'label' => I18n::translate('login'), 'views' => [ 'login' => [ 'pattern' => 'login', diff --git a/kirby/config/areas/site.php b/kirby/config/areas/site.php old mode 100644 new mode 100755 index 0e04445..a246f7e --- a/kirby/config/areas/site.php +++ b/kirby/config/areas/site.php @@ -1,13 +1,14 @@ function () use ($kirby) { - return $kirby->site()->title()->or(t('view.site'))->toString(); + return $kirby->site()->title()->or(I18n::translate('view.site'))->toString(); }, 'icon' => 'home', - 'label' => $kirby->site()->blueprint()->title() ?? t('view.site'), + 'label' => $kirby->site()->blueprint()->title() ?? I18n::translate('view.site'), 'menu' => true, 'dialogs' => require __DIR__ . '/site/dialogs.php', 'dropdowns' => require __DIR__ . '/site/dropdowns.php', diff --git a/kirby/config/areas/site/dialogs.php b/kirby/config/areas/site/dialogs.php old mode 100644 new mode 100755 index 2c4c9fa..a8632b9 --- a/kirby/config/areas/site/dialogs.php +++ b/kirby/config/areas/site/dialogs.php @@ -1,11 +1,13 @@ [ 'position' => Field::pagePosition($page), ], - 'submitButton' => t('change'), + 'submitButton' => I18n::translate('change'), 'value' => [ 'position' => $page->panel()->position() ] @@ -41,7 +43,13 @@ return [ ]; }, 'submit' => function (string $id) { - Find::page($id)->changeStatus('listed', get('position')); + $request = App::instance()->request(); + + Find::page($id)->changeStatus( + 'listed', + $request->get('position') + ); + return [ 'event' => 'page.sort', ]; @@ -75,7 +83,7 @@ return [ return [ 'component' => 'k-error-dialog', 'props' => [ - 'message' => t('error.page.changeStatus.incomplete'), + 'message' => I18n::translate('error.page.changeStatus.incomplete'), 'details' => $errors, ] ]; @@ -84,7 +92,7 @@ return [ $fields = [ 'status' => [ - 'label' => t('page.changeStatus.select'), + 'label' => I18n::translate('page.changeStatus.select'), 'type' => 'radio', 'required' => true, 'options' => $states @@ -105,7 +113,7 @@ return [ 'component' => 'k-form-dialog', 'props' => [ 'fields' => $fields, - 'submitButton' => t('change'), + 'submitButton' => I18n::translate('change'), 'value' => [ 'status' => $status, 'position' => $position @@ -114,7 +122,13 @@ return [ ]; }, 'submit' => function (string $id) { - Find::page($id)->changeStatus(get('status'), get('position')); + $request = App::instance()->request(); + + Find::page($id)->changeStatus( + $request->get('status'), + $request->get('position') + ); + return [ 'event' => 'page.changeStatus', ]; @@ -145,7 +159,7 @@ return [ 'required' => true ]) ], - 'submitButton' => t('change'), + 'submitButton' => I18n::translate('change'), 'value' => [ 'template' => $page->intendedTemplate()->name() ] @@ -153,7 +167,10 @@ return [ ]; }, 'submit' => function (string $id) { - Find::page($id)->changeTemplate(get('template')); + $request = App::instance()->request(); + + Find::page($id)->changeTemplate($request->get('template')); + return [ 'event' => 'page.changeTemplate', ]; @@ -164,9 +181,11 @@ return [ 'page.changeTitle' => [ 'pattern' => 'pages/(:any)/changeTitle', 'load' => function (string $id) { + $request = App::instance()->request(); + $page = Find::page($id); $permissions = $page->permissions(); - $select = get('select', 'title'); + $select = $request->get('select', 'title'); return [ 'component' => 'k-form-dialog', @@ -183,13 +202,13 @@ return [ 'path' => $page->parent() ? '/' . $page->parent()->id() . '/' : '/', 'disabled' => $permissions->can('changeSlug') === false, 'wizard' => [ - 'text' => t('page.changeSlug.fromTitle'), + 'text' => I18n::translate('page.changeSlug.fromTitle'), 'field' => 'title' ] ]) ], 'autofocus' => false, - 'submitButton' => t('change'), + 'submitButton' => I18n::translate('change'), 'value' => [ 'title' => $page->title()->value(), 'slug' => $page->slug(), @@ -198,9 +217,11 @@ return [ ]; }, 'submit' => function (string $id) { + $request = App::instance()->request(); + $page = Find::page($id); - $title = trim(get('title', '')); - $slug = trim(get('slug', '')); + $title = trim($request->get('title', '')); + $slug = trim($request->get('slug', '')); // basic input validation before we move on if (Str::length($title) === 0) { @@ -256,17 +277,20 @@ return [ 'page.create' => [ 'pattern' => 'pages/create', 'load' => function () { + $kirby = App::instance(); + $request = $kirby->request(); + // the parent model for the new page - $parent = get('parent', 'site'); + $parent = $request->get('parent', 'site'); // the view on which the add button is located // this is important to find the right section // and provide the correct templates for the new page - $view = get('view', $parent); + $view = $request->get('view', $parent); // templates will be fetched depending on the // section settings in the blueprint - $section = get('section'); + $section = $request->get('section'); // this is the parent model $model = Find::parent($parent); @@ -300,7 +324,7 @@ return [ // only show template field if > 1 templates available // or when in debug mode - if (count($blueprints) > 1 || option('debug') === true) { + if (count($blueprints) > 1 || $kirby->option('debug') === true) { $fields['template'] = Field::template($blueprints, [ 'required' => true ]); @@ -310,7 +334,7 @@ return [ 'component' => 'k-form-dialog', 'props' => [ 'fields' => $fields, - 'submitButton' => t('page.draft.create'), + 'submitButton' => I18n::translate('page.draft.create'), 'value' => [ 'parent' => $parent, 'slug' => '', @@ -321,7 +345,8 @@ return [ ]; }, 'submit' => function () { - $title = trim(get('title', '')); + $request = App::instance()->request(); + $title = trim($request->get('title', '')); if (Str::length($title) === 0) { throw new InvalidArgumentException([ @@ -329,10 +354,10 @@ return [ ]); } - $page = Find::parent(get('parent', 'site'))->createChild([ + $page = Find::parent($request->get('parent', 'site'))->createChild([ 'content' => ['title' => $title], - 'slug' => get('slug'), - 'template' => get('template'), + 'slug' => $request->get('slug'), + 'template' => $request->get('template'), ]); return [ @@ -347,7 +372,7 @@ return [ 'pattern' => 'pages/(:any)/delete', 'load' => function (string $id) { $page = Find::page($id); - $text = tt('page.delete.confirm', [ + $text = I18n::template('page.delete.confirm', [ 'title' => Escape::html($page->title()->value()) ]); @@ -359,16 +384,16 @@ return [ 'info' => [ 'type' => 'info', 'theme' => 'negative', - 'text' => t('page.delete.confirm.subpages') + 'text' => I18n::translate('page.delete.confirm.subpages') ], 'check' => [ - 'label' => t('page.delete.confirm.title'), + 'label' => I18n::translate('page.delete.confirm.title'), 'type' => 'text', 'counter' => false ] ], 'size' => 'medium', - 'submitButton' => t('delete'), + 'submitButton' => I18n::translate('delete'), 'text' => $text, 'theme' => 'negative', ] @@ -383,12 +408,17 @@ return [ ]; }, 'submit' => function (string $id) { + $request = App::instance()->request(); + $page = Find::page($id); $redirect = false; $referrer = Panel::referrer(); $url = $page->panel()->url(true); - if ($page->childrenAndDrafts()->count() > 0 && get('check') !== $page->title()->value()) { + if ( + $page->childrenAndDrafts()->count() > 0 && + $request->get('check') !== $page->title()->value() + ) { throw new InvalidArgumentException(['key' => 'page.delete.confirm']); } @@ -425,7 +455,7 @@ return [ 'required' => true, 'path' => $page->parent() ? '/' . $page->parent()->id() . '/' : '/', 'wizard' => [ - 'text' => t('page.changeSlug.fromTitle'), + 'text' => I18n::translate('page.changeSlug.fromTitle'), 'field' => 'title' ] ]) @@ -433,7 +463,7 @@ return [ if ($hasFiles === true) { $fields['files'] = [ - 'label' => t('page.duplicate.files'), + 'label' => I18n::translate('page.duplicate.files'), 'type' => 'toggle', 'required' => true, 'width' => $toggleWidth @@ -442,7 +472,7 @@ return [ if ($hasChildren === true) { $fields['children'] = [ - 'label' => t('page.duplicate.pages'), + 'label' => I18n::translate('page.duplicate.pages'), 'type' => 'toggle', 'required' => true, 'width' => $toggleWidth @@ -453,21 +483,23 @@ return [ 'component' => 'k-form-dialog', 'props' => [ 'fields' => $fields, - 'submitButton' => t('duplicate'), + 'submitButton' => I18n::translate('duplicate'), 'value' => [ 'children' => false, 'files' => false, - 'slug' => $page->slug() . '-' . Str::slug(t('page.duplicate.appendix')), - 'title' => $page->title() . ' ' . t('page.duplicate.appendix') + 'slug' => $page->slug() . '-' . Str::slug(I18n::translate('page.duplicate.appendix')), + 'title' => $page->title() . ' ' . I18n::translate('page.duplicate.appendix') ] ] ]; }, 'submit' => function (string $id) { - $newPage = Find::page($id)->duplicate(get('slug'), [ - 'children' => (bool)get('children'), - 'files' => (bool)get('files'), - 'title' => (string)get('title'), + $request = App::instance()->request(); + + $newPage = Find::page($id)->duplicate($request->get('slug'), [ + 'children' => (bool)$request->get('children'), + 'files' => (bool)$request->get('files'), + 'title' => (string)$request->get('title'), ]); return [ @@ -511,15 +543,17 @@ return [ 'preselect' => true ]) ], - 'submitButton' => t('rename'), + 'submitButton' => I18n::translate('rename'), 'value' => [ - 'title' => site()->title()->value() + 'title' => App::instance()->site()->title()->value() ] ] ]; }, 'submit' => function () { - site()->changeTitle(get('title')); + $kirby = App::instance(); + + $kirby->site()->changeTitle($kirby->request()->get('title')); return [ 'event' => 'site.changeTitle', ]; diff --git a/kirby/config/areas/site/dropdowns.php b/kirby/config/areas/site/dropdowns.php old mode 100644 new mode 100755 diff --git a/kirby/config/areas/site/searches.php b/kirby/config/areas/site/searches.php old mode 100644 new mode 100755 index 14b5479..0bdfd26 --- a/kirby/config/areas/site/searches.php +++ b/kirby/config/areas/site/searches.php @@ -1,13 +1,15 @@ [ - 'label' => t('pages'), + 'label' => I18n::translate('pages'), 'icon' => 'page', 'query' => function (string $query = null) { - $pages = site() + $pages = App::instance()->site() ->index(true) ->search($query) ->filter('isReadable', true) @@ -28,10 +30,10 @@ return [ } ], 'files' => [ - 'label' => t('files'), + 'label' => I18n::translate('files'), 'icon' => 'image', 'query' => function (string $query = null) { - $files = site() + $files = App::instance()->site() ->index(true) ->filter('isReadable', true) ->files() diff --git a/kirby/config/areas/site/views.php b/kirby/config/areas/site/views.php old mode 100644 new mode 100755 index eb6bdee..d0fcf85 --- a/kirby/config/areas/site/views.php +++ b/kirby/config/areas/site/views.php @@ -1,5 +1,6 @@ [ 'pattern' => 'site', - 'action' => fn () => site()->panel()->view() + 'action' => fn () => App::instance()->site()->panel()->view() ], 'site.file' => [ 'pattern' => 'site/files/(:any)', diff --git a/kirby/config/areas/system.php b/kirby/config/areas/system.php old mode 100644 new mode 100755 index da7bccd..8fed5b2 --- a/kirby/config/areas/system.php +++ b/kirby/config/areas/system.php @@ -1,9 +1,11 @@ 'settings', - 'label' => t('view.system'), + 'label' => I18n::translate('view.system'), 'menu' => true, 'dialogs' => require __DIR__ . '/system/dialogs.php', 'views' => require __DIR__ . '/system/views.php' diff --git a/kirby/config/areas/system/dialogs.php b/kirby/config/areas/system/dialogs.php old mode 100644 new mode 100755 index 5566078..7cefd18 --- a/kirby/config/areas/system/dialogs.php +++ b/kirby/config/areas/system/dialogs.php @@ -1,8 +1,46 @@ [ + 'load' => function () { + $license = App::instance()->system()->license(); + + // @codeCoverageIgnoreStart + // the system is registered but the license + // key is only visible for admins + if ($license === true) { + $license = 'Kirby 3'; + } + // @codeCoverageIgnoreEnd + + return [ + 'component' => 'k-form-dialog', + 'props' => [ + 'size' => 'medium', + 'fields' => [ + 'license' => [ + 'type' => 'info', + 'label' => I18n::translate('license'), + 'text' => $license ? $license : I18n::translate('license.unregistered.label'), + 'theme' => $license ? 'code' : 'negative', + 'help' => $license ? + // @codeCoverageIgnoreStart + '' . I18n::translate('license.manage') . ' →' : + // @codeCoverageIgnoreEnd + '' . I18n::translate('license.buy') . ' →' + ] + ], + 'submitButton' => false, + 'cancelButton' => false, + ] + ]; + } + ], // license registration 'registration' => [ 'load' => function () { @@ -11,18 +49,18 @@ return [ 'props' => [ 'fields' => [ 'license' => [ - 'label' => t('license.register.label'), + 'label' => I18n::translate('license.register.label'), 'type' => 'text', 'required' => true, 'counter' => false, 'placeholder' => 'K3-', - 'help' => t('license.register.help') + 'help' => I18n::translate('license.register.help') ], 'email' => Field::email([ 'required' => true ]) ], - 'submitButton' => t('license.register'), + 'submitButton' => I18n::translate('license.register'), 'value' => [ 'license' => null, 'email' => null @@ -32,10 +70,15 @@ return [ }, 'submit' => function () { // @codeCoverageIgnoreStart - kirby()->system()->register(get('license'), get('email')); + $kirby = App::instance(); + $kirby->system()->register( + $kirby->request()->get('license'), + $kirby->request()->get('email') + ); + return [ 'event' => 'system.register', - 'message' => t('license.register.success') + 'message' => I18n::translate('license.register.success') ]; // @codeCoverageIgnoreEnd } diff --git a/kirby/config/areas/system/views.php b/kirby/config/areas/system/views.php old mode 100644 new mode 100755 index 2fa2658..7b2c265 --- a/kirby/config/areas/system/views.php +++ b/kirby/config/areas/system/views.php @@ -1,12 +1,12 @@ [ 'pattern' => 'system', 'action' => function () { - $kirby = kirby(); + $kirby = App::instance(); $system = $kirby->system(); $license = $system->license(); @@ -24,8 +24,10 @@ return [ return [ 'author' => $plugin->authorsNames(), 'license' => $plugin->license(), - 'link' => $plugin->link(), - 'name' => $plugin->name(), + 'name' => [ + 'text' => $plugin->name(), + 'href' => $plugin->link(), + ], 'version' => $plugin->version(), ]; }); @@ -38,8 +40,14 @@ return [ 'plugins' => $plugins, 'php' => phpversion(), 'server' => $system->serverSoftware(), - 'https' => Server::https(), + 'https' => $kirby->environment()->https(), 'version' => $kirby->version(), + 'urls' => [ + 'content' => $system->exposedFileUrl('content'), + 'git' => $system->exposedFileUrl('git'), + 'kirby' => $system->exposedFileUrl('kirby'), + 'site' => $system->exposedFileUrl('site') + ] ] ]; } diff --git a/kirby/config/areas/users.php b/kirby/config/areas/users.php old mode 100644 new mode 100755 index fd61535..830d1fe --- a/kirby/config/areas/users.php +++ b/kirby/config/areas/users.php @@ -1,9 +1,11 @@ 'users', - 'label' => t('view.users'), + 'label' => I18n::translate('view.users'), 'search' => 'users', 'menu' => true, 'dialogs' => require __DIR__ . '/users/dialogs.php', diff --git a/kirby/config/areas/users/dialogs.php b/kirby/config/areas/users/dialogs.php old mode 100644 new mode 100755 index 2e8d9e6..d3b8e2c --- a/kirby/config/areas/users/dialogs.php +++ b/kirby/config/areas/users/dialogs.php @@ -1,11 +1,13 @@ [ 'pattern' => 'users/create', 'load' => function () { - $kirby = kirby(); + $kirby = App::instance(); return [ 'component' => 'k-form-dialog', 'props' => [ @@ -33,7 +35,7 @@ return [ 'required' => true ]) ], - 'submitButton' => t('create'), + 'submitButton' => I18n::translate('create'), 'value' => [ 'name' => '', 'email' => '', @@ -45,13 +47,16 @@ return [ ]; }, 'submit' => function () { - kirby()->users()->create([ - 'name' => get('name'), - 'email' => get('email'), - 'password' => get('password'), - 'language' => get('translation'), - 'role' => get('role') + $kirby = App::instance(); + + $kirby->users()->create([ + 'name' => $kirby->request()->get('name'), + 'email' => $kirby->request()->get('email'), + 'password' => $kirby->request()->get('password'), + 'language' => $kirby->request()->get('translation'), + 'role' => $kirby->request()->get('role') ]); + return [ 'event' => 'user.create' ]; @@ -69,13 +74,13 @@ return [ 'props' => [ 'fields' => [ 'email' => [ - 'label' => t('email'), + 'label' => I18n::translate('email'), 'required' => true, 'type' => 'email', 'preselect' => true ] ], - 'submitButton' => t('change'), + 'submitButton' => I18n::translate('change'), 'value' => [ 'email' => $user->email() ] @@ -83,7 +88,10 @@ return [ ]; }, 'submit' => function (string $id) { - Find::user($id)->changeEmail(get('email')); + $request = App::instance()->request(); + + Find::user($id)->changeEmail($request->get('email')); + return [ 'event' => 'user.changeEmail' ]; @@ -102,7 +110,7 @@ return [ 'fields' => [ 'translation' => Field::translation(['required' => true]) ], - 'submitButton' => t('change'), + 'submitButton' => I18n::translate('change'), 'value' => [ 'translation' => $user->language() ] @@ -110,7 +118,9 @@ return [ ]; }, 'submit' => function (string $id) { - Find::user($id)->changeLanguage(get('translation')); + $request = App::instance()->request(); + + Find::user($id)->changeLanguage($request->get('translation')); return [ 'event' => 'user.changeLanguage', @@ -135,7 +145,7 @@ return [ 'preselect' => true ]) ], - 'submitButton' => t('rename'), + 'submitButton' => I18n::translate('rename'), 'value' => [ 'name' => $user->name()->value() ] @@ -143,7 +153,9 @@ return [ ]; }, 'submit' => function (string $id) { - Find::user($id)->changeName(get('name')); + $request = App::instance()->request(); + + Find::user($id)->changeName($request->get('name')); return [ 'event' => 'user.changeName' @@ -162,20 +174,22 @@ return [ 'props' => [ 'fields' => [ 'password' => Field::password([ - 'label' => t('user.changePassword.new'), + 'label' => I18n::translate('user.changePassword.new'), ]), 'passwordConfirmation' => Field::password([ - 'label' => t('user.changePassword.new.confirm'), + 'label' => I18n::translate('user.changePassword.new.confirm'), ]) ], - 'submitButton' => t('change'), + 'submitButton' => I18n::translate('change'), ] ]; }, 'submit' => function (string $id) { + $request = App::instance()->request(); + $user = Find::user($id); - $password = get('password'); - $passwordConfirmation = get('passwordConfirmation'); + $password = $request->get('password'); + $passwordConfirmation = $request->get('passwordConfirmation'); // validate the password UserRules::validPassword($user, $password ?? ''); @@ -207,11 +221,11 @@ return [ 'props' => [ 'fields' => [ 'role' => Field::role([ - 'label' => t('user.changeRole.select'), + 'label' => I18n::translate('user.changeRole.select'), 'required' => true, ]) ], - 'submitButton' => t('user.changeRole'), + 'submitButton' => I18n::translate('user.changeRole'), 'value' => [ 'role' => $user->role()->name() ] @@ -219,7 +233,9 @@ return [ ]; }, 'submit' => function (string $id) { - $user = Find::user($id)->changeRole(get('role')); + $request = App::instance()->request(); + + $user = Find::user($id)->changeRole($request->get('role')); return [ 'event' => 'user.changeRole', @@ -238,7 +254,7 @@ return [ return [ 'component' => 'k-remove-dialog', 'props' => [ - 'text' => tt($i18nPrefix . '.delete.confirm', [ + 'text' => I18n::template($i18nPrefix . '.delete.confirm', [ 'email' => Escape::html($user->email()) ]) ] diff --git a/kirby/config/areas/users/dropdowns.php b/kirby/config/areas/users/dropdowns.php old mode 100644 new mode 100755 diff --git a/kirby/config/areas/users/searches.php b/kirby/config/areas/users/searches.php old mode 100644 new mode 100755 index 879db7f..e2bf106 --- a/kirby/config/areas/users/searches.php +++ b/kirby/config/areas/users/searches.php @@ -1,13 +1,15 @@ [ - 'label' => t('users'), + 'label' => I18n::translate('users'), 'icon' => 'users', 'query' => function (string $query = null) { - $users = kirby()->users()->search($query)->limit(10); + $users = App::instance()->users()->search($query)->limit(10); $results = []; foreach ($users as $user) { diff --git a/kirby/config/areas/users/views.php b/kirby/config/areas/users/views.php old mode 100644 new mode 100755 index 7d1a71b..9ce73d0 --- a/kirby/config/areas/users/views.php +++ b/kirby/config/areas/users/views.php @@ -1,5 +1,6 @@ [ 'pattern' => 'users', 'action' => function () { - $kirby = kirby(); - $role = get('role'); + $kirby = App::instance(); + $role = $kirby->request()->get('role'); $roles = $kirby->roles()->toArray(fn ($role) => [ 'id' => $role->id(), 'title' => $role->title(), @@ -32,7 +33,7 @@ return [ $users = $users->paginate([ 'limit' => 20, - 'page' => get('page') + 'page' => $kirby->request()->get('page') ]); return [ diff --git a/kirby/config/blocks/code/code.php b/kirby/config/blocks/code/code.php old mode 100644 new mode 100755 diff --git a/kirby/config/blocks/code/code.yml b/kirby/config/blocks/code/code.yml old mode 100644 new mode 100755 diff --git a/kirby/config/blocks/gallery/gallery.php b/kirby/config/blocks/gallery/gallery.php old mode 100644 new mode 100755 diff --git a/kirby/config/blocks/gallery/gallery.yml b/kirby/config/blocks/gallery/gallery.yml old mode 100644 new mode 100755 diff --git a/kirby/config/blocks/heading/heading.php b/kirby/config/blocks/heading/heading.php old mode 100644 new mode 100755 diff --git a/kirby/config/blocks/heading/heading.yml b/kirby/config/blocks/heading/heading.yml old mode 100644 new mode 100755 diff --git a/kirby/config/blocks/image/image.php b/kirby/config/blocks/image/image.php old mode 100644 new mode 100755 index 17221c3..e1902ec --- a/kirby/config/blocks/image/image.php +++ b/kirby/config/blocks/image/image.php @@ -17,9 +17,9 @@ if ($block->location() == 'web') { ?> - $ratio, 'data-crop' => $crop], ' ') ?>> + $ratio, 'data-crop' => $crop], null, ' ') ?>> isNotEmpty()): ?> - + <?= $alt->esc() ?> diff --git a/kirby/config/blocks/image/image.yml b/kirby/config/blocks/image/image.yml old mode 100644 new mode 100755 diff --git a/kirby/config/blocks/line/line.php b/kirby/config/blocks/line/line.php old mode 100644 new mode 100755 diff --git a/kirby/config/blocks/line/line.yml b/kirby/config/blocks/line/line.yml old mode 100644 new mode 100755 diff --git a/kirby/config/blocks/list/list.php b/kirby/config/blocks/list/list.php old mode 100644 new mode 100755 diff --git a/kirby/config/blocks/list/list.yml b/kirby/config/blocks/list/list.yml old mode 100644 new mode 100755 diff --git a/kirby/config/blocks/markdown/markdown.php b/kirby/config/blocks/markdown/markdown.php old mode 100644 new mode 100755 diff --git a/kirby/config/blocks/markdown/markdown.yml b/kirby/config/blocks/markdown/markdown.yml old mode 100644 new mode 100755 diff --git a/kirby/config/blocks/quote/quote.php b/kirby/config/blocks/quote/quote.php old mode 100644 new mode 100755 diff --git a/kirby/config/blocks/quote/quote.yml b/kirby/config/blocks/quote/quote.yml old mode 100644 new mode 100755 diff --git a/kirby/config/blocks/table/table.yml b/kirby/config/blocks/table/table.yml old mode 100644 new mode 100755 diff --git a/kirby/config/blocks/text/text.php b/kirby/config/blocks/text/text.php old mode 100644 new mode 100755 diff --git a/kirby/config/blocks/text/text.yml b/kirby/config/blocks/text/text.yml old mode 100644 new mode 100755 diff --git a/kirby/config/blocks/video/video.php b/kirby/config/blocks/video/video.php old mode 100644 new mode 100755 index 9d0bfd3..1808946 --- a/kirby/config/blocks/video/video.php +++ b/kirby/config/blocks/video/video.php @@ -1,5 +1,9 @@ - -url())): ?> + +url())): ?>
caption()->isNotEmpty()): ?> diff --git a/kirby/config/blocks/video/video.yml b/kirby/config/blocks/video/video.yml old mode 100644 new mode 100755 diff --git a/kirby/config/blueprints/blocks/code.yml b/kirby/config/blueprints/blocks/code.yml old mode 100644 new mode 100755 diff --git a/kirby/config/blueprints/blocks/heading.yml b/kirby/config/blueprints/blocks/heading.yml old mode 100644 new mode 100755 diff --git a/kirby/config/blueprints/blocks/image.yml b/kirby/config/blueprints/blocks/image.yml old mode 100644 new mode 100755 diff --git a/kirby/config/blueprints/blocks/quote.yml b/kirby/config/blueprints/blocks/quote.yml old mode 100644 new mode 100755 diff --git a/kirby/config/blueprints/blocks/table.yml b/kirby/config/blueprints/blocks/table.yml old mode 100644 new mode 100755 diff --git a/kirby/config/blueprints/blocks/text.yml b/kirby/config/blueprints/blocks/text.yml old mode 100644 new mode 100755 diff --git a/kirby/config/blueprints/blocks/video.yml b/kirby/config/blueprints/blocks/video.yml old mode 100644 new mode 100755 diff --git a/kirby/config/blueprints/files/default.yml b/kirby/config/blueprints/files/default.yml old mode 100644 new mode 100755 diff --git a/kirby/config/blueprints/pages/default.yml b/kirby/config/blueprints/pages/default.yml old mode 100644 new mode 100755 diff --git a/kirby/config/blueprints/site.yml b/kirby/config/blueprints/site.yml old mode 100644 new mode 100755 diff --git a/kirby/config/components.php b/kirby/config/components.php old mode 100644 new mode 100755 index 06b6830..b60d34c --- a/kirby/config/components.php +++ b/kirby/config/components.php @@ -4,12 +4,12 @@ use Kirby\Cms\App; use Kirby\Cms\Collection; use Kirby\Cms\File; use Kirby\Cms\FileVersion; +use Kirby\Cms\Helpers; use Kirby\Cms\Template; use Kirby\Data\Data; use Kirby\Email\PHPMailer as Emailer; use Kirby\Filesystem\F; use Kirby\Filesystem\Filename; -use Kirby\Http\Server; use Kirby\Http\Uri; use Kirby\Http\Url; use Kirby\Image\Darkroom; @@ -39,9 +39,12 @@ return [ * @param mixed $variable * @param bool $echo * @return string + * + * @deprecated 3.7.0 Disable `dump()` via `KIRBY_HELPER_DUMP` instead and create your own function + * @todo move to `Helpers::dump()`, remove component in 3.8.0 */ 'dump' => function (App $kirby, $variable, bool $echo = true) { - if (Server::cli() === true) { + if ($kirby->environment()->cli() === true) { $output = print_r($variable, true) . PHP_EOL; } else { $output = '
' . print_r($variable, true) . '
'; @@ -138,13 +141,19 @@ return [ * @param array $options Markdown options * @param bool $inline Whether to wrap the text in `

` tags (deprecated: set via $options['inline'] instead) * @return string - * @todo add deprecation warning for $inline parameter in 3.7.0 * @todo remove $inline parameter in in 3.8.0 */ 'markdown' => function (App $kirby, string $text = null, array $options = [], bool $inline = false): string { static $markdown; static $config; + // warning for deprecated fourth parameter + if (func_num_args() === 4 && isset($options['inline']) === false) { + // @codeCoverageIgnoreStart + Helpers::deprecated('markdown component: the $inline parameter is deprecated and will be removed in Kirby 3.8.0. Use $options[\'inline\'] instead.'); + // @codeCoverageIgnoreEnd + } + // support for the deprecated fourth argument $options['inline'] ??= $inline; @@ -155,7 +164,7 @@ return [ $config = $options; } - return $markdown->parse($text, $options['inline']); + return $markdown->parse($text, $options['inline'] ?? false); }, /** @@ -332,8 +341,8 @@ return [ */ 'thumb' => function (App $kirby, string $src, string $dst, array $options): string { $darkroom = Darkroom::factory( - option('thumbs.driver', 'gd'), - option('thumbs', []) + $kirby->option('thumbs.driver', 'gd'), + $kirby->option('thumbs', []) ); $options = $darkroom->preprocess($src, $options); $root = (new Filename($src, $dst, $options))->toString(); @@ -371,7 +380,13 @@ return [ if ($kirby->multilang() === true) { $parts = Str::split($path, '#'); - if ($page = page($parts[0] ?? null)) { + if ($parts[0] ?? null) { + $page = $kirby->site()->find($parts[0]); + } else { + $page = $kirby->site()->page(); + } + + if ($page) { $path = $page->url($language); if (isset($parts[1]) === true) { diff --git a/kirby/config/fields/checkboxes.php b/kirby/config/fields/checkboxes.php old mode 100644 new mode 100755 diff --git a/kirby/config/fields/date.php b/kirby/config/fields/date.php old mode 100644 new mode 100755 diff --git a/kirby/config/fields/email.php b/kirby/config/fields/email.php old mode 100644 new mode 100755 diff --git a/kirby/config/fields/files.php b/kirby/config/fields/files.php old mode 100644 new mode 100755 diff --git a/kirby/config/fields/gap.php b/kirby/config/fields/gap.php old mode 100644 new mode 100755 diff --git a/kirby/config/fields/headline.php b/kirby/config/fields/headline.php old mode 100644 new mode 100755 diff --git a/kirby/config/fields/hidden.php b/kirby/config/fields/hidden.php old mode 100644 new mode 100755 diff --git a/kirby/config/fields/info.php b/kirby/config/fields/info.php old mode 100644 new mode 100755 diff --git a/kirby/config/fields/line.php b/kirby/config/fields/line.php old mode 100644 new mode 100755 diff --git a/kirby/config/fields/list.php b/kirby/config/fields/list.php old mode 100644 new mode 100755 diff --git a/kirby/config/fields/mixins/datetime.php b/kirby/config/fields/mixins/datetime.php old mode 100644 new mode 100755 diff --git a/kirby/config/fields/mixins/filepicker.php b/kirby/config/fields/mixins/filepicker.php old mode 100644 new mode 100755 diff --git a/kirby/config/fields/mixins/layout.php b/kirby/config/fields/mixins/layout.php old mode 100644 new mode 100755 diff --git a/kirby/config/fields/mixins/min.php b/kirby/config/fields/mixins/min.php old mode 100644 new mode 100755 diff --git a/kirby/config/fields/mixins/options.php b/kirby/config/fields/mixins/options.php old mode 100644 new mode 100755 diff --git a/kirby/config/fields/mixins/pagepicker.php b/kirby/config/fields/mixins/pagepicker.php old mode 100644 new mode 100755 diff --git a/kirby/config/fields/mixins/picker.php b/kirby/config/fields/mixins/picker.php old mode 100644 new mode 100755 diff --git a/kirby/config/fields/mixins/upload.php b/kirby/config/fields/mixins/upload.php old mode 100644 new mode 100755 diff --git a/kirby/config/fields/mixins/userpicker.php b/kirby/config/fields/mixins/userpicker.php old mode 100644 new mode 100755 diff --git a/kirby/config/fields/multiselect.php b/kirby/config/fields/multiselect.php old mode 100644 new mode 100755 diff --git a/kirby/config/fields/number.php b/kirby/config/fields/number.php old mode 100644 new mode 100755 diff --git a/kirby/config/fields/pages.php b/kirby/config/fields/pages.php old mode 100644 new mode 100755 index 389d75e..3f42c4b --- a/kirby/config/fields/pages.php +++ b/kirby/config/fields/pages.php @@ -1,5 +1,6 @@ function ($value = null) { $pages = []; - $kirby = kirby(); + $kirby = App::instance(); foreach (Data::decode($value, 'yaml') as $id) { if (is_array($id) === true) { diff --git a/kirby/config/fields/radio.php b/kirby/config/fields/radio.php old mode 100644 new mode 100755 diff --git a/kirby/config/fields/range.php b/kirby/config/fields/range.php old mode 100644 new mode 100755 diff --git a/kirby/config/fields/select.php b/kirby/config/fields/select.php old mode 100644 new mode 100755 diff --git a/kirby/config/fields/slug.php b/kirby/config/fields/slug.php old mode 100644 new mode 100755 diff --git a/kirby/config/fields/structure.php b/kirby/config/fields/structure.php old mode 100644 new mode 100755 index 240406f..f26b9ac --- a/kirby/config/fields/structure.php +++ b/kirby/config/fields/structure.php @@ -106,6 +106,7 @@ return [ }, 'columns' => function () { $columns = []; + $mobile = 0; if (empty($this->columns)) { foreach ($this->fields as $field) { @@ -133,6 +134,10 @@ return [ continue; } + if (($columnProps['mobile'] ?? false) === true) { + $mobile++; + } + $columns[$columnName] = array_merge($columnProps, [ 'type' => $field['type'], 'label' => $field['label'] ?? $field['name'] @@ -140,6 +145,12 @@ return [ } } + // make the first column visible on mobile + // if no other mobile columns are defined + if ($mobile === 0) { + $columns[array_key_first($columns)]['mobile'] = true; + } + return $columns; } ], diff --git a/kirby/config/fields/tags.php b/kirby/config/fields/tags.php old mode 100644 new mode 100755 diff --git a/kirby/config/fields/tel.php b/kirby/config/fields/tel.php old mode 100644 new mode 100755 diff --git a/kirby/config/fields/text.php b/kirby/config/fields/text.php old mode 100644 new mode 100755 diff --git a/kirby/config/fields/textarea.php b/kirby/config/fields/textarea.php old mode 100644 new mode 100755 diff --git a/kirby/config/fields/time.php b/kirby/config/fields/time.php old mode 100644 new mode 100755 diff --git a/kirby/config/fields/toggle.php b/kirby/config/fields/toggle.php old mode 100644 new mode 100755 diff --git a/kirby/config/fields/toggles.php b/kirby/config/fields/toggles.php new file mode 100755 index 0000000..694dd21 --- /dev/null +++ b/kirby/config/fields/toggles.php @@ -0,0 +1,41 @@ + ['options'], + 'props' => [ + /** + * Unset inherited props + */ + 'after' => null, + 'before' => null, + 'icon' => null, + 'placeholder' => null, + + /** + * Toggles will automatically span the full width of the field. With the grow option, you can disable this behaviour for a more compact layout. + */ + 'grow' => function (bool $grow = true) { + return $grow; + }, + /** + * If `false` all labels will be hidden for icon-only toggles. + */ + 'labels' => function (bool $labels = true) { + return $labels; + }, + /** + * A toggle can be deactivated on click. If reset is `false` deactivating a toggle is no longer possible. + */ + 'reset' => function (bool $reset = true) { + return $reset; + } + ], + 'computed' => [ + 'default' => function () { + return $this->sanitizeOption($this->default); + }, + 'value' => function () { + return $this->sanitizeOption($this->value) ?? ''; + }, + ] +]; diff --git a/kirby/config/fields/url.php b/kirby/config/fields/url.php old mode 100644 new mode 100755 diff --git a/kirby/config/fields/users.php b/kirby/config/fields/users.php old mode 100644 new mode 100755 index 9608c9e..91964df --- a/kirby/config/fields/users.php +++ b/kirby/config/fields/users.php @@ -1,5 +1,6 @@ function ($value = null) { $users = []; - $kirby = kirby(); + $kirby = App::instance(); foreach (Data::decode($value, 'yaml') as $email) { if (is_array($email) === true) { diff --git a/kirby/config/fields/writer.php b/kirby/config/fields/writer.php old mode 100644 new mode 100755 diff --git a/kirby/config/helpers.php b/kirby/config/helpers.php old mode 100644 new mode 100755 index df2b14c..9e6adab --- a/kirby/config/helpers.php +++ b/kirby/config/helpers.php @@ -1,154 +1,108 @@ collection($name); +if (Helpers::hasOverride('attr') === false) { // @codeCoverageIgnore + /** + * Generates a list of HTML attributes + * + * @param array|null $attr A list of attributes as key/value array + * @param string|null $before An optional string that will be prepended if the result is not empty + * @param string|null $after An optional string that will be appended if the result is not empty + * @return string|null + */ + function attr(?array $attr = null, ?string $before = null, ?string $after = null): ?string + { + return Html::attr($attr, null, $before, $after); + } } -/** - * Checks / returns a CSRF token - * - * @param string|null $check Pass a token here to compare it to the one in the session - * @return string|bool Either the token or a boolean check result - */ -function csrf(?string $check = null) -{ - $session = App::instance()->session(); +if (Helpers::hasOverride('collection') === false) { // @codeCoverageIgnore + /** + * Returns the result of a collection by name + * + * @param string $name + * @return \Kirby\Cms\Collection|null + */ + function collection(string $name) + { + return App::instance()->collection($name); + } +} - // no arguments, generate/return a token - // (check explicitly if there have been no arguments at all; - // checking for null introduces a security issue because null could come - // from user input or bugs in the calling code!) - if (func_num_args() === 0) { - $token = $session->get('kirby.csrf'); - - if (is_string($token) !== true) { - $token = bin2hex(random_bytes(32)); - $session->set('kirby.csrf', $token); +if (Helpers::hasOverride('csrf') === false) { // @codeCoverageIgnore + /** + * Checks / returns a CSRF token + * + * @param string|null $check Pass a token here to compare it to the one in the session + * @return string|bool Either the token or a boolean check result + */ + function csrf(?string $check = null) + { + // check explicitly if there have been no arguments at all; + // checking for null introduces a security issue because null could come + // from user input or bugs in the calling code! + if (func_num_args() === 0) { + return App::instance()->csrf(); } - return $token; + return App::instance()->csrf($check); } - - // argument has been passed, check the token - if ( - is_string($check) === true && - is_string($session->get('kirby.csrf')) === true - ) { - return hash_equals($session->get('kirby.csrf'), $check) === true; - } - - return false; } -/** - * Creates one or multiple CSS link tags - * - * @param string|array $url Relative or absolute URLs, an array of URLs or `@auto` for automatic template css loading - * @param string|array $options Pass an array of attributes for the link tag or a media attribute string - * @return string|null - */ -function css($url, $options = null): ?string -{ - if (is_array($url) === true) { - $links = A::map($url, fn ($url) => css($url, $options)); - return implode(PHP_EOL, $links); +if (Helpers::hasOverride('css') === false) { // @codeCoverageIgnore + /** + * Creates one or multiple CSS link tags + * + * @param string|array $url Relative or absolute URLs, an array of URLs or `@auto` for automatic template css loading + * @param string|array $options Pass an array of attributes for the link tag or a media attribute string + * @return string|null + */ + function css($url, $options = null): ?string + { + return Html::css($url, $options); } - - if (is_string($options) === true) { - $options = ['media' => $options]; - } - - $kirby = App::instance(); - - if ($url === '@auto') { - if (!$url = Url::toTemplateAsset('css/templates', 'css')) { - return null; - } - } - - // only valid value for 'rel' is 'alternate stylesheet', if 'title' is given as well - if ( - ($options['rel'] ?? '') !== 'alternate stylesheet' || - ($options['title'] ?? '') === '' - ) { - $options['rel'] = 'stylesheet'; - } - - $url = ($kirby->component('css'))($kirby, $url, $options); - $url = Url::to($url); - $attr = array_merge((array)$options, [ - 'href' => $url - ]); - - return ''; } -/** - * Triggers a deprecation warning if debug mode is active - * @since 3.3.0 - * - * @param string $message - * @return bool Whether the warning was triggered - */ -function deprecated(string $message): bool -{ - if (App::instance()->option('debug') === true) { - return trigger_error($message, E_USER_DEPRECATED) === true; +if (Helpers::hasOverride('deprecated') === false) { // @codeCoverageIgnore + /** + * Triggers a deprecation warning if debug mode is active + * @since 3.3.0 + * + * @param string $message + * @return bool Whether the warning was triggered + */ + function deprecated(string $message): bool + { + return Helpers::deprecated($message); } - - return false; } -if (function_exists('dump') === false) { +if (Helpers::hasOverride('dump') === false) { // @codeCoverageIgnore /** * Simple object and variable dumper * to help with debugging. @@ -159,12 +113,11 @@ if (function_exists('dump') === false) { */ function dump($variable, bool $echo = true): string { - $kirby = App::instance(); - return ($kirby->component('dump'))($kirby, $variable, $echo); + return Helpers::dump($variable, $echo); } } -if (function_exists('e') === false) { +if (Helpers::hasOverride('e') === false) { // @codeCoverageIgnore /** * Smart version of echo with an if condition as first argument * @@ -174,782 +127,645 @@ if (function_exists('e') === false) { */ function e($condition, $value, $alternative = null) { - echo r($condition, $value, $alternative); + echo $condition ? $value : $alternative; } } -/** - * Escape context specific output - * - * @param string $string Untrusted data - * @param string $context Location of output (`html`, `attr`, `js`, `css`, `url` or `xml`) - * @return string Escaped data - */ -function esc(string $string, string $context = 'html'): string -{ - if (method_exists('Kirby\Toolkit\Escape', $context) === true) { - return Escape::$context($string); - } - - return $string; -} - - -/** - * Shortcut for $kirby->request()->get() - * - * @param mixed $key The key to look for. Pass false or null to return the entire request array. - * @param mixed $default Optional default value, which should be returned if no element has been found - * @return mixed - */ -function get($key = null, $default = null) -{ - return App::instance()->request()->get($key, $default); -} - -/** - * Embeds a Github Gist - * - * @param string $url - * @param string|null $file - * @return string - */ -function gist(string $url, ?string $file = null): string -{ - return kirbytag([ - 'gist' => $url, - 'file' => $file, - ]); -} - -/** - * Redirects to the given Urls - * Urls can be relative or absolute. - * - * @param string $url - * @param int $code - * @return void - */ -function go(string $url = '/', int $code = 302) -{ - die(Response::redirect($url, $code)); -} - -/** - * Shortcut for html() - * - * @param string|null $string unencoded text - * @param bool $keepTags - * @return string - */ -function h(?string $string, bool $keepTags = false) -{ - return Html::encode($string, $keepTags); -} - -/** - * Creates safe html by encoding special characters - * - * @param string|null $string unencoded text - * @param bool $keepTags - * @return string - */ -function html(?string $string, bool $keepTags = false) -{ - return Html::encode($string, $keepTags); -} - -/** - * Return an image from any page - * specified by the path - * - * Example: - * - * - * @param string|null $path - * @return \Kirby\Cms\File|null - */ -function image(?string $path = null) -{ - if ($path === null) { - return page()->image(); - } - - $uri = dirname($path); - $filename = basename($path); - - if ($uri === '.') { - $uri = null; - } - - switch ($uri) { - case '/': - $parent = site(); - break; - case null: - $parent = page(); - break; - default: - $parent = page($uri); - break; - } - - if ($parent) { - return $parent->image($filename); - } else { - return null; +if (Helpers::hasOverride('esc') === false) { // @codeCoverageIgnore + /** + * Escape context specific output + * + * @param string $string Untrusted data + * @param string $context Location of output (`html`, `attr`, `js`, `css`, `url` or `xml`) + * @return string Escaped data + */ + function esc(string $string, string $context = 'html'): string + { + return Str::esc($string, $context); } } -/** - * Runs a number of validators on a set of data and checks if the data is invalid - * - * @param array $data - * @param array $rules - * @param array $messages - * @return array - */ -function invalid(array $data = [], array $rules = [], array $messages = []): array -{ - $errors = []; - - foreach ($rules as $field => $validations) { - $validationIndex = -1; - - // See: http://php.net/manual/en/types.comparisons.php - // only false for: null, undefined variable, '', [] - $value = $data[$field] ?? null; - $filled = $value !== null && $value !== '' && $value !== []; - $message = $messages[$field] ?? $field; - - // True if there is an error message for each validation method. - $messageArray = is_array($message); - - foreach ($validations as $method => $options) { - // If the index is numeric, there is no option - // and `$value` is sent directly as a `$options` parameter - if (is_numeric($method) === true) { - $method = $options; - $options = [$value]; - } else { - if (is_array($options) === false) { - $options = [$options]; - } - - array_unshift($options, $value); - } - - $validationIndex++; - - if ($method === 'required') { - if ($filled) { - // Field is required and filled. - continue; - } - } elseif ($filled) { - if (V::$method(...$options) === true) { - // Field is filled and passes validation method. - continue; - } - } else { - // If a field is not required and not filled, no validation should be done. - continue; - } - - // If no continue was called we have a failed validation. - if ($messageArray) { - $errors[$field][] = $message[$validationIndex] ?? $field; - } else { - $errors[$field] = $message; - } - } +if (Helpers::hasOverride('get') === false) { // @codeCoverageIgnore + /** + * Shortcut for $kirby->request()->get() + * + * @param mixed $key The key to look for. Pass false or null to return the entire request array. + * @param mixed $default Optional default value, which should be returned if no element has been found + * @return mixed + */ + function get($key = null, $default = null) + { + return App::instance()->request()->get($key, $default); } - - return $errors; } -/** - * Creates a script tag to load a javascript file - * - * @param string|array $url - * @param string|array $options - * @return string|null - */ -function js($url, $options = null): ?string -{ - if (is_array($url) === true) { - $scripts = A::map($url, fn ($url) => js($url, $options)); - return implode(PHP_EOL, $scripts); +if (Helpers::hasOverride('gist') === false) { // @codeCoverageIgnore + /** + * Embeds a Github Gist + * + * @param string $url + * @param string|null $file + * @return string + */ + function gist(string $url, ?string $file = null): string + { + return App::instance()->kirbytag([ + 'gist' => $url, + 'file' => $file, + ]); } +} - if (is_bool($options) === true) { - $options = ['async' => $options]; +if (Helpers::hasOverride('go') === false) { // @codeCoverageIgnore + /** + * Redirects to the given Urls + * Urls can be relative or absolute. + * + * @param string $url + * @param int $code + * @return void + */ + function go(string $url = '/', int $code = 302) + { + Response::go($url, $code); } +} - $kirby = App::instance(); - - if ($url === '@auto') { - if (!$url = Url::toTemplateAsset('js/templates', 'js')) { - return null; - } +if (Helpers::hasOverride('h') === false) { // @codeCoverageIgnore + /** + * Shortcut for html() + * + * @param string|null $string unencoded text + * @param bool $keepTags + * @return string + */ + function h(?string $string, bool $keepTags = false): string + { + return Html::encode($string, $keepTags); } - - $url = ($kirby->component('js'))($kirby, $url, $options); - $url = Url::to($url); - $attr = array_merge((array)$options, ['src' => $url]); - - return ''; } -/** - * Returns the Kirby object in any situation - * - * @return \Kirby\Cms\App - */ -function kirby() -{ - return App::instance(); -} - -/** - * Makes it possible to use any defined Kirbytag as standalone function - * - * @param string|array $type - * @param string|null $value - * @param array $attr - * @param array $data - * @return string - */ -function kirbytag($type, ?string $value = null, array $attr = [], array $data = []): string -{ - if (is_array($type) === true) { - $kirbytag = $type; - $type = key($kirbytag); - $value = current($kirbytag); - $attr = $kirbytag; - - // check data attribute and separate from attr data if exists - if (isset($attr['data']) === true) { - $data = $attr['data']; - unset($attr['data']); - } +if (Helpers::hasOverride('html') === false) { // @codeCoverageIgnore + /** + * Creates safe html by encoding special characters + * + * @param string|null $string unencoded text + * @param bool $keepTags + * @return string + */ + function html(?string $string, bool $keepTags = false): string + { + return Html::encode($string, $keepTags); } - - return App::instance()->kirbytag($type, $value, $attr, $data); } -/** - * Parses KirbyTags in the given string. Shortcut - * for `$kirby->kirbytags($text, $data)` - * - * @param string|null $text - * @param array $data - * @return string - */ -function kirbytags(?string $text = null, array $data = []): string -{ - return App::instance()->kirbytags($text, $data); +if (Helpers::hasOverride('image') === false) { // @codeCoverageIgnore + /** + * Return an image from any page + * specified by the path + * + * Example: + * + * + * @param string|null $path + * @return \Kirby\Cms\File|null + */ + function image(?string $path = null) + { + return App::instance()->image($path); + } } -/** - * Parses KirbyTags and Markdown in the - * given string. Shortcut for `$kirby->kirbytext()` - * - * @param string|null $text - * @param array $data - * @return string - */ -function kirbytext(?string $text = null, array $data = []): string -{ - return App::instance()->kirbytext($text, $data); +if (Helpers::hasOverride('invalid') === false) { // @codeCoverageIgnore + /** + * Runs a number of validators on a set of data and checks if the data is invalid + * + * @param array $data + * @param array $rules + * @param array $messages + * @return array + */ + function invalid(array $data = [], array $rules = [], array $messages = []): array + { + return V::invalid($data, $rules, $messages); + } } -/** - * Parses KirbyTags and inline Markdown in the - * given string. - * @since 3.1.0 - * - * @param string|null $text - * @param array $data - * @return string - */ -function kirbytextinline(?string $text = null, array $data = []): string -{ - return App::instance()->kirbytext($text, $data, true); +if (Helpers::hasOverride('js') === false) { // @codeCoverageIgnore + /** + * Creates a script tag to load a javascript file + * + * @param string|array $url + * @param string|array $options + * @return string|null + */ + function js($url, $options = null): ?string + { + return Html::js($url, $options); + } } -/** - * Shortcut for `kirbytext()` helper - * - * @param string|null $text - * @param array $data - * @return string - */ -function kt(?string $text = null, array $data = []): string -{ - return kirbytext($text, $data); +if (Helpers::hasOverride('kirby') === false) { // @codeCoverageIgnore + /** + * Returns the Kirby object in any situation + * + * @return \Kirby\Cms\App + */ + function kirby() + { + return App::instance(); + } } -/** - * Shortcut for `kirbytextinline()` helper - * @since 3.1.0 - * - * @param string|null $text - * @param array $data - * @return string - */ -function kti(?string $text = null, array $data = []): string -{ - return kirbytextinline($text, $data); +if (Helpers::hasOverride('kirbytag') === false) { // @codeCoverageIgnore + /** + * Makes it possible to use any defined Kirbytag as standalone function + * + * @param string|array $type + * @param string|null $value + * @param array $attr + * @param array $data + * @return string + */ + function kirbytag($type, ?string $value = null, array $attr = [], array $data = []): string + { + return App::instance()->kirbytag($type, $value, $attr, $data); + } } -/** - * A super simple class autoloader - * - * @param array $classmap - * @param string|null $base - * @return void - */ -function load(array $classmap, ?string $base = null) -{ - // convert all classnames to lowercase - $classmap = array_change_key_case($classmap); +if (Helpers::hasOverride('kirbytags') === false) { // @codeCoverageIgnore + /** + * Parses KirbyTags in the given string. Shortcut + * for `$kirby->kirbytags($text, $data)` + * + * @param string|null $text + * @param array $data + * @return string + */ + function kirbytags(?string $text = null, array $data = []): string + { + return App::instance()->kirbytags($text, $data); + } +} - spl_autoload_register(function ($class) use ($classmap, $base) { - $class = strtolower($class); +if (Helpers::hasOverride('kirbytext') === false) { // @codeCoverageIgnore + /** + * Parses KirbyTags and Markdown in the + * given string. Shortcut for `$kirby->kirbytext()` + * + * @param string|null $text + * @param array $data + * @return string + */ + function kirbytext(?string $text = null, array $data = []): string + { + return App::instance()->kirbytext($text, $data); + } +} - if (!isset($classmap[$class])) { - return false; +if (Helpers::hasOverride('kirbytextinline') === false) { // @codeCoverageIgnore + /** + * Parses KirbyTags and inline Markdown in the + * given string. + * @since 3.1.0 + * + * @param string|null $text + * @param array $options + * @return string + */ + function kirbytextinline(?string $text = null, array $options = []): string + { + $options['markdown']['inline'] = true; + return App::instance()->kirbytext($text, $options); + } +} + +if (Helpers::hasOverride('kt') === false) { // @codeCoverageIgnore + /** + * Shortcut for `kirbytext()` helper + * + * @param string|null $text + * @param array $data + * @return string + */ + function kt(?string $text = null, array $data = []): string + { + return App::instance()->kirbytext($text, $data); + } +} + +if (Helpers::hasOverride('kti') === false) { // @codeCoverageIgnore + /** + * Shortcut for `kirbytextinline()` helper + * @since 3.1.0 + * + * @param string|null $text + * @param array $options + * @return string + */ + function kti(?string $text = null, array $options = []): string + { + $options['markdown']['inline'] = true; + return App::instance()->kirbytext($text, $options); + } +} + +if (Helpers::hasOverride('load') === false) { // @codeCoverageIgnore + /** + * A super simple class autoloader + * + * @param array $classmap + * @param string|null $base + * @return void + */ + function load(array $classmap, ?string $base = null): void + { + F::loadClasses($classmap, $base); + } +} + +if (Helpers::hasOverride('markdown') === false) { // @codeCoverageIgnore + /** + * Parses markdown in the given string. Shortcut for + * `$kirby->markdown($text)` + * + * @param string|null $text + * @param array $options + * @return string + */ + function markdown(?string $text = null, array $options = []): string + { + return App::instance()->markdown($text, $options); + } +} + +if (Helpers::hasOverride('option') === false) { // @codeCoverageIgnore + /** + * Shortcut for `$kirby->option($key, $default)` + * + * @param string $key + * @param mixed $default + * @return mixed + */ + function option(string $key, $default = null) + { + return App::instance()->option($key, $default); + } +} + +if (Helpers::hasOverride('page') === false) { // @codeCoverageIgnore + /** + * Fetches a single page by id or + * the current page when no id is specified + * + * @param string|null $id + * @return \Kirby\Cms\Page|null + */ + function page(?string $id = null) + { + if (empty($id) === true) { + return App::instance()->site()->page(); } - if ($base) { - include $base . '/' . $classmap[$class]; - } else { - include $classmap[$class]; - } - }); -} - -/** - * Parses markdown in the given string. Shortcut for - * `$kirby->markdown($text)` - * - * @param string|null $text - * @param array $options - * @return string - */ -function markdown(?string $text = null, array $options = []): string -{ - return App::instance()->markdown($text, $options); -} - -/** - * Shortcut for `$kirby->option($key, $default)` - * - * @param string $key - * @param mixed $default - * @return mixed - */ -function option(string $key, $default = null) -{ - return App::instance()->option($key, $default); -} - -/** - * Fetches a single page or multiple pages by - * id or the current page when no id is specified - * - * @param string|array ...$id - * @return \Kirby\Cms\Page|\Kirby\Cms\Pages|null - * @todo reduce to one parameter in 3.7.0 (also change return and return type) - */ -function page(...$id) -{ - if (empty($id) === true) { - return App::instance()->site()->page(); + return App::instance()->site()->find($id); } - - if (count($id) > 1) { - // @codeCoverageIgnoreStart - deprecated('Passing multiple parameters to the `page()` helper has been deprecated. Please use the `pages()` helper instead.'); - // @codeCoverageIgnoreEnd - } - - return App::instance()->site()->find(...$id); } -/** - * Helper to build page collections - * - * @param string|array ...$id - * @return \Kirby\Cms\Page|\Kirby\Cms\Pages|null - * @todo return only Pages|null in 3.7.0, wrap in Pages for single passed id - */ -function pages(...$id) -{ - if (count($id) === 1 && is_array($id[0]) === false) { - // @codeCoverageIgnoreStart - deprecated('Passing a single id to the `pages()` helper will return a Kirby\Cms\Pages collection with a single element instead of the single Kirby\Cms\Page object itself - starting in 3.7.0.'); - // @codeCoverageIgnoreEnd - } - - return App::instance()->site()->find(...$id); -} - -/** - * Returns a single param from the URL - * - * @param string $key - * @param string|null $fallback - * @return string|null - */ -function param(string $key, ?string $fallback = null): ?string -{ - return App::instance()->request()->url()->params()->$key ?? $fallback; -} - -/** - * Returns all params from the current Url - * - * @return array - */ -function params(): array -{ - return App::instance()->request()->url()->params()->toArray(); -} - -/** - * Smart version of return with an if condition as first argument - * - * @param mixed $condition - * @param mixed $value The string to be returned if the condition is true - * @param mixed $alternative An alternative string which should be returned when the condition is false - * @return mixed - */ -function r($condition, $value, $alternative = null) -{ - return $condition ? $value : $alternative; -} - -/** - * Creates a micro-router and executes - * the routing action immediately - * @since 3.6.0 - * - * @param string|null $path - * @param string $method - * @param array $routes - * @param \Closure|null $callback - * @return mixed - */ -function router(?string $path = null, string $method = 'GET', array $routes = [], ?Closure $callback = null) -{ - return (new Router($routes))->call($path, $method, $callback); -} - -/** - * Returns the current site object - * - * @return \Kirby\Cms\Site - */ -function site() -{ - return App::instance()->site(); -} - -/** - * Determines the size/length of numbers, strings, arrays and countable objects - * - * @param mixed $value - * @return int - * @throws \Kirby\Exception\InvalidArgumentException - */ -function size($value): int -{ - if (is_numeric($value)) { - return (int)$value; - } - - if (is_string($value)) { - return Str::length(trim($value)); - } - - if (is_array($value)) { - return count($value); - } - - if (is_object($value)) { - if (is_a($value, 'Countable') === true) { - return count($value); +if (Helpers::hasOverride('pages') === false) { // @codeCoverageIgnore + /** + * Helper to build pages collection + * + * @param string|array ...$id + * @return \Kirby\Cms\Pages|null + */ + function pages(...$id) + { + // ensure that a list of string arguments and an array + // as the first argument are treated the same + if (count($id) === 1 && is_array($id[0]) === true) { + $id = $id[0]; } - if (is_a($value, 'Kirby\Toolkit\Collection') === true) { - return $value->count(); - } + // always passes $id an array; ensures we get a + // collection even if only one ID is passed + return App::instance()->site()->find($id); } - - throw new InvalidArgumentException('Could not determine the size of the given value'); } -/** - * Enhances the given string with - * smartypants. Shortcut for `$kirby->smartypants($text)` - * - * @param string|null $text - * @return string - */ -function smartypants(?string $text = null): string -{ - return App::instance()->smartypants($text); -} - -/** - * Embeds a snippet from the snippet folder - * - * @param string|array $name - * @param array|object $data - * @param bool $return - * @return string - */ -function snippet($name, $data = [], bool $return = false) -{ - if (is_object($data) === true) { - $data = ['item' => $data]; +if (Helpers::hasOverride('param') === false) { // @codeCoverageIgnore + /** + * Returns a single param from the URL + * + * @param string $key + * @param string|null $fallback + * @return string|null + */ + function param(string $key, ?string $fallback = null): ?string + { + return App::instance()->request()->url()->params()->$key ?? $fallback; } +} - $snippet = App::instance()->snippet($name, $data); - - if ($return === true) { - return $snippet; +if (Helpers::hasOverride('params') === false) { // @codeCoverageIgnore + /** + * Returns all params from the current Url + * + * @return array + */ + function params(): array + { + return App::instance()->request()->url()->params()->toArray(); } - - echo $snippet; } -/** - * Includes an SVG file by absolute or - * relative file path. - * - * @param string|\Kirby\Cms\File $file - * @return string|false - */ -function svg($file) -{ - // support for Kirby's file objects - if (is_a($file, 'Kirby\Cms\File') === true && $file->extension() === 'svg') { - return $file->read(); +if (Helpers::hasOverride('r') === false) { // @codeCoverageIgnore + /** + * Smart version of return with an if condition as first argument + * + * @param mixed $condition + * @param mixed $value The string to be returned if the condition is true + * @param mixed $alternative An alternative string which should be returned when the condition is false + * @return mixed + */ + function r($condition, $value, $alternative = null) + { + return $condition ? $value : $alternative; } +} - if (is_string($file) === false) { - return false; +if (Helpers::hasOverride('router') === false) { // @codeCoverageIgnore + /** + * Creates a micro-router and executes + * the routing action immediately + * @since 3.6.0 + * + * @param string|null $path + * @param string $method + * @param array $routes + * @param \Closure|null $callback + * @return mixed + */ + function router(?string $path = null, string $method = 'GET', array $routes = [], ?Closure $callback = null) + { + return Router::execute($path, $method, $routes, $callback); } +} - $extension = F::extension($file); - - // check for valid svg files - if ($extension !== 'svg') { - return false; +if (Helpers::hasOverride('site') === false) { // @codeCoverageIgnore + /** + * Returns the current site object + * + * @return \Kirby\Cms\Site + */ + function site() + { + return App::instance()->site(); } +} - // try to convert relative paths to absolute - if (file_exists($file) === false) { - $root = App::instance()->root(); - $file = realpath($root . '/' . $file); +if (Helpers::hasOverride('size') === false) { // @codeCoverageIgnore + /** + * Determines the size/length of numbers, strings, arrays and countable objects + * + * @param mixed $value + * @return int + * @throws \Kirby\Exception\InvalidArgumentException + */ + function size($value): int + { + return Helpers::size($value); } - - return F::read($file); } -/** - * Returns translate string for key from translation file - * - * @param string|array $key - * @param string|null $fallback - * @param string|null $locale - * @return array|string|null - */ -function t($key, string $fallback = null, string $locale = null) -{ - return I18n::translate($key, $fallback, $locale); -} - -/** - * Translates a count - * - * @param string $key - * @param int $count - * @param string|null $locale - * @param bool $formatNumber If set to `false`, the count is not formatted - * @return mixed - */ -function tc(string $key, int $count, string $locale = null, bool $formatNumber = true) -{ - return I18n::translateCount($key, $count, $locale, $formatNumber); -} - -/** - * Rounds the minutes of the given date - * by the defined step - * - * @param string|null $date - * @param int|array|null $step array of `unit` and `size` to round to nearest - * @return int|null - */ -function timestamp(?string $date = null, $step = null): ?int -{ - if ($date = Date::optional($date)) { - if ($step !== null) { - $step = Date::stepConfig($step, [ - 'unit' => 'minute', - 'size' => 1 - ]); - $date->round($step['unit'], $step['size']); - } - - return $date->timestamp(); +if (Helpers::hasOverride('smartypants') === false) { // @codeCoverageIgnore + /** + * Enhances the given string with + * smartypants. Shortcut for `$kirby->smartypants($text)` + * + * @param string|null $text + * @return string + */ + function smartypants(?string $text = null): string + { + return App::instance()->smartypants($text); } - - return null; } -/** - * Translate by key and then replace - * placeholders in the text - * - * @param string $key - * @param string|array|null $fallback - * @param array|null $replace - * @param string|null $locale - * @return string - */ -function tt(string $key, $fallback = null, ?array $replace = null, ?string $locale = null) -{ - return I18n::template($key, $fallback, $replace, $locale); +if (Helpers::hasOverride('snippet') === false) { // @codeCoverageIgnore + /** + * Embeds a snippet from the snippet folder + * + * @param string|array $name + * @param array|object $data + * @param bool $return + * @return string|null + */ + function snippet($name, $data = [], bool $return = false): ?string + { + return App::instance()->snippet($name, $data, $return); + } } -/** - * Builds a Twitter link - * - * @param string $username - * @param string|null $text - * @param string|null $title - * @param string|null $class - * @return string - */ -function twitter(string $username, ?string $text = null, ?string $title = null, ?string $class = null): string -{ - return kirbytag([ - 'twitter' => $username, - 'text' => $text, - 'title' => $title, - 'class' => $class - ]); +if (Helpers::hasOverride('svg') === false) { // @codeCoverageIgnore + /** + * Includes an SVG file by absolute or + * relative file path. + * + * @param string|\Kirby\Cms\File $file + * @return string|false + */ + function svg($file) + { + return Html::svg($file); + } } -/** - * Shortcut for url() - * - * @param string|null $path - * @param array|string|null $options - * @return string - */ -function u(?string $path = null, $options = null): string -{ - return Url::to($path, $options); +if (Helpers::hasOverride('t') === false) { // @codeCoverageIgnore + /** + * Returns translate string for key from translation file + * + * @param string|array $key + * @param string|null $fallback + * @param string|null $locale + * @return array|string|null + */ + function t($key, string $fallback = null, string $locale = null) + { + return I18n::translate($key, $fallback, $locale); + } } -/** - * Builds an absolute URL for a given path - * - * @param string|null $path - * @param array|string|null $options - * @return string - */ -function url(?string $path = null, $options = null): string -{ - return Url::to($path, $options); +if (Helpers::hasOverride('tc') === false) { // @codeCoverageIgnore + /** + * Translates a count + * + * @param string $key + * @param int $count + * @param string|null $locale + * @param bool $formatNumber If set to `false`, the count is not formatted + * @return mixed + */ + function tc( + string $key, + int $count, + string $locale = null, + bool $formatNumber = true + ) { + return I18n::translateCount($key, $count, $locale, $formatNumber); + } } -/** - * Creates a compliant v4 UUID - * Taken from: https://github.com/symfony/polyfill - * - * @return string - */ -function uuid(): string -{ - $uuid = bin2hex(random_bytes(16)); - - return sprintf( - '%08s-%04s-4%03s-%04x-%012s', - // 32 bits for "time_low" - substr($uuid, 0, 8), - // 16 bits for "time_mid" - substr($uuid, 8, 4), - // 16 bits for "time_hi_and_version", - // four most significant bits holds version number 4 - substr($uuid, 13, 3), - // 16 bits: - // * 8 bits for "clk_seq_hi_res", - // * 8 bits for "clk_seq_low", - // two most significant bits holds zero and one for variant DCE1.1 - hexdec(substr($uuid, 16, 4)) & 0x3fff | 0x8000, - // 48 bits for "node" - substr($uuid, 20, 12) - ); +if (Helpers::hasOverride('timestamp') === false) { // @codeCoverageIgnore + /** + * Rounds the minutes of the given date + * by the defined step + * + * @param string|null $date + * @param int|array|null $step array of `unit` and `size` to round to nearest + * @return int|null + */ + function timestamp(?string $date = null, $step = null): ?int + { + return Date::roundedTimestamp($date, $step); + } } - -/** - * Creates a video embed via iframe for Youtube or Vimeo - * videos. The embed Urls are automatically detected from - * the given Url. - * - * @param string $url - * @param array $options - * @param array $attr - * @return string|null - */ -function video(string $url, array $options = [], array $attr = []): ?string -{ - return Html::video($url, $options, $attr); +if (Helpers::hasOverride('tt') === false) { // @codeCoverageIgnore + /** + * Translate by key and then replace + * placeholders in the text + * + * @param string $key + * @param string|array|null $fallback + * @param array|null $replace + * @param string|null $locale + * @return string + */ + function tt(string $key, $fallback = null, ?array $replace = null, ?string $locale = null): string + { + return I18n::template($key, $fallback, $replace, $locale); + } } -/** - * Embeds a Vimeo video by URL in an iframe - * - * @param string $url - * @param array $options - * @param array $attr - * @return string|null - */ -function vimeo(string $url, array $options = [], array $attr = []): ?string -{ - return Html::vimeo($url, $options, $attr); +if (Helpers::hasOverride('twitter') === false) { // @codeCoverageIgnore + /** + * Builds a Twitter link + * + * @param string $username + * @param string|null $text + * @param string|null $title + * @param string|null $class + * @return string + */ + function twitter(string $username, ?string $text = null, ?string $title = null, ?string $class = null): string + { + return App::instance()->kirbytag([ + 'twitter' => $username, + 'text' => $text, + 'title' => $title, + 'class' => $class + ]); + } } -/** - * The widont function makes sure that there are no - * typographical widows at the end of a paragraph – - * that's a single word in the last line - * - * @param string|null $string - * @return string - */ -function widont(string $string = null): string -{ - return Str::widont($string); +if (Helpers::hasOverride('u') === false) { // @codeCoverageIgnore + /** + * Shortcut for url() + * + * @param string|null $path + * @param array|string|null $options + * @return string + */ + function u(?string $path = null, $options = null): string + { + return Url::to($path, $options); + } } -/** - * Embeds a Youtube video by URL in an iframe - * - * @param string $url - * @param array $options - * @param array $attr - * @return string|null - */ -function youtube(string $url, array $options = [], array $attr = []): ?string -{ - return Html::youtube($url, $options, $attr); +if (Helpers::hasOverride('url') === false) { // @codeCoverageIgnore + /** + * Builds an absolute URL for a given path + * + * @param string|null $path + * @param array|string|null $options + * @return string + */ + function url(?string $path = null, $options = null): string + { + return Url::to($path, $options); + } +} + +if (Helpers::hasOverride('uuid') === false) { // @codeCoverageIgnore + /** + * Creates a compliant v4 UUID + * + * @return string + */ + function uuid(): string + { + return Str::uuid(); + } +} + +if (Helpers::hasOverride('video') === false) { // @codeCoverageIgnore + /** + * Creates a video embed via iframe for Youtube or Vimeo + * videos. The embed Urls are automatically detected from + * the given Url. + * + * @param string $url + * @param array $options + * @param array $attr + * @return string|null + */ + function video(string $url, array $options = [], array $attr = []): ?string + { + return Html::video($url, $options, $attr); + } +} + +if (Helpers::hasOverride('vimeo') === false) { // @codeCoverageIgnore + /** + * Embeds a Vimeo video by URL in an iframe + * + * @param string $url + * @param array $options + * @param array $attr + * @return string|null + */ + function vimeo(string $url, array $options = [], array $attr = []): ?string + { + return Html::vimeo($url, $options, $attr); + } +} + +if (Helpers::hasOverride('widont') === false) { // @codeCoverageIgnore + /** + * The widont function makes sure that there are no + * typographical widows at the end of a paragraph – + * that's a single word in the last line + * + * @param string|null $string + * @return string + */ + function widont(string $string = null): string + { + return Str::widont($string); + } +} + +if (Helpers::hasOverride('youtube') === false) { // @codeCoverageIgnore + /** + * Embeds a Youtube video by URL in an iframe + * + * @param string $url + * @param array $options + * @param array $attr + * @return string|null + */ + function youtube(string $url, array $options = [], array $attr = []): ?string + { + return Html::youtube($url, $options, $attr); + } } diff --git a/kirby/config/methods.php b/kirby/config/methods.php old mode 100644 new mode 100755 index 585b1ef..d49f799 --- a/kirby/config/methods.php +++ b/kirby/config/methods.php @@ -341,7 +341,7 @@ return function (App $app) { * @param string $context Location of output (`html`, `attr`, `js`, `css`, `url` or `xml`) */ 'escape' => function (Field $field, string $context = 'html') { - $field->value = esc($field->value, $context); + $field->value = Str::esc($field->value, $context); return $field; }, diff --git a/kirby/config/presets/files.php b/kirby/config/presets/files.php old mode 100644 new mode 100755 index fe0a7e5..9299701 --- a/kirby/config/presets/files.php +++ b/kirby/config/presets/files.php @@ -1,9 +1,11 @@ [ - 'headline' => $props['headline'] ?? t('files'), + 'headline' => $props['headline'] ?? I18n::translate('files'), 'type' => 'files', 'layout' => $props['layout'] ?? 'cards', 'template' => $props['template'] ?? null, diff --git a/kirby/config/presets/page.php b/kirby/config/presets/page.php old mode 100644 new mode 100755 index 62df5de..49d2daf --- a/kirby/config/presets/page.php +++ b/kirby/config/presets/page.php @@ -1,5 +1,7 @@ t('pages'), + 'headline' => I18n::translate('pages'), 'type' => 'pages', 'status' => 'all', 'layout' => 'list', @@ -34,7 +36,7 @@ return function ($props) { if ($files !== false) { $sidebar['files'] = $section([ - 'headline' => t('files'), + 'headline' => I18n::translate('files'), 'type' => 'files', 'layout' => 'list' ], $files); diff --git a/kirby/config/presets/pages.php b/kirby/config/presets/pages.php old mode 100644 new mode 100755 index 5bba76b..ff590bc --- a/kirby/config/presets/pages.php +++ b/kirby/config/presets/pages.php @@ -1,5 +1,7 @@ [ + 'details', 'empty', 'headline', 'help', @@ -13,44 +14,10 @@ return [ 'max', 'pagination', 'parent', + 'search', + 'sort' ], 'props' => [ - /** - * Enables/disables reverse sorting - */ - 'flip' => function (bool $flip = false) { - return $flip; - }, - /** - * Image options to control the source and look of file previews - */ - 'image' => function ($image = null) { - return $image ?? []; - }, - /** - * Optional info text setup. Info text is shown on the right (lists, cardlets) or below (cards) the filename. - */ - 'info' => function ($info = null) { - return I18n::translate($info, $info); - }, - /** - * The size option controls the size of cards. By default cards are auto-sized and the cards grid will always fill the full width. With a size you can disable auto-sizing. Available sizes: `tiny`, `small`, `medium`, `large`, `huge` - */ - 'size' => function (string $size = 'auto') { - return $size; - }, - /** - * Enables/disables manual sorting - */ - 'sortable' => function (bool $sortable = true) { - return $sortable; - }, - /** - * Overwrites manual sorting and sorts by the given field and sorting direction (i.e. `filename desc`) - */ - 'sortBy' => function (string $sortBy = null) { - return $sortBy; - }, /** * Filters all files by template and also sets the template, which will be used for all uploads */ @@ -87,6 +54,12 @@ return [ // filter out all protected files $files = $files->filter('isReadable', true); + // search + if ($this->search === true && empty($this->searchterm) === false) { + $files = $files->search($this->searchterm); + } + + // sort if ($this->sortBy) { $files = $files->sort(...$files::sortArgs($this->sortBy)); } else { @@ -117,12 +90,15 @@ return [ foreach ($this->files as $file) { $panel = $file->panel(); - $data[] = [ + $item = [ 'dragText' => $panel->dragText('auto', $dragTextAbsolute), 'extension' => $file->extension(), 'filename' => $file->filename(), 'id' => $file->id(), - 'image' => $panel->image($this->image, $this->layout), + 'image' => $panel->image( + $this->image, + $this->layout === 'table' ? 'list' : $this->layout + ), 'info' => $file->toSafeString($this->info ?? false), 'link' => $panel->url(true), 'mime' => $file->mime(), @@ -131,6 +107,12 @@ return [ 'text' => $file->toSafeString($this->text), 'url' => $file->url(), ]; + + if ($this->layout === 'table') { + $item = $this->columnsValues($item, $file); + } + + $data[] = $item; } return $data; @@ -166,32 +148,9 @@ return [ ] ]; }, - 'link' => function () { - $modelLink = $this->model->panel()->url(true); - $parentLink = $this->parent->panel()->url(true); - - if ($modelLink !== $parentLink) { - return $parentLink; - } - }, 'pagination' => function () { return $this->pagination(); }, - 'sortable' => function () { - if ($this->sortable === false) { - return false; - } - - if ($this->sortBy !== null) { - return false; - } - - if ($this->flip === true) { - return false; - } - - return true; - }, 'upload' => function () { if ($this->isFull() === true) { return false; @@ -228,13 +187,15 @@ return [ 'options' => [ 'accept' => $this->accept, 'apiUrl' => $this->parent->apiUrl(true), + 'columns' => $this->columns, 'empty' => $this->empty, 'headline' => $this->headline, 'help' => $this->help, 'layout' => $this->layout, - 'link' => $this->link, + 'link' => $this->link(), 'max' => $this->max, 'min' => $this->min, + 'search' => $this->search, 'size' => $this->size, 'sortable' => $this->sortable, 'upload' => $this->upload diff --git a/kirby/config/sections/info.php b/kirby/config/sections/info.php old mode 100644 new mode 100755 diff --git a/kirby/config/sections/mixins/details.php b/kirby/config/sections/mixins/details.php new file mode 100755 index 0000000..1f2f58b --- /dev/null +++ b/kirby/config/sections/mixins/details.php @@ -0,0 +1,36 @@ + [ + /** + * Image options to control the source and look of preview + */ + 'image' => function ($image = null) { + return $image ?? []; + }, + /** + * Optional info text setup. Info text is shown on the right (lists, cardlets) or below (cards) the title. + */ + 'info' => function ($info = null) { + return I18n::translate($info, $info); + }, + /** + * Setup for the main text in the list or cards. By default this will display the title. + */ + 'text' => function ($text = '{{ model.title }}') { + return I18n::translate($text, $text); + } + ], + 'methods' => [ + 'link' => function () { + $modelLink = $this->model->panel()->url(true); + $parentLink = $this->parent->panel()->url(true); + + if ($modelLink !== $parentLink) { + return $parentLink; + } + } + ] +]; diff --git a/kirby/config/sections/mixins/empty.php b/kirby/config/sections/mixins/empty.php old mode 100644 new mode 100755 diff --git a/kirby/config/sections/mixins/headline.php b/kirby/config/sections/mixins/headline.php old mode 100644 new mode 100755 index 6d589e6..5e426f9 --- a/kirby/config/sections/mixins/headline.php +++ b/kirby/config/sections/mixins/headline.php @@ -1,18 +1,26 @@ [ /** * The headline for the section. This can be a simple string or a template with additional info from the parent page. - * @todo deprecate in 3.7 + * @todo remove in 3.9.0 */ 'headline' => function ($headline = null) { + // TODO: add deprecation notive in 3.8.0 + // if ($headline !== null) { + // Helpers::deprecated('`headline` prop for sections has been deprecated and will be removed in Kirby 3.9.0. Use `label` instead.'); + // } + return I18n::translate($headline, $headline); }, /** - * label is the new official replacement for headline + * The label for the section. This can be a simple string or + * a template with additional info from the parent page. + * Replaces the `headline` prop. */ 'label' => function ($label = null) { return I18n::translate($label, $label); diff --git a/kirby/config/sections/mixins/help.php b/kirby/config/sections/mixins/help.php old mode 100644 new mode 100755 diff --git a/kirby/config/sections/mixins/layout.php b/kirby/config/sections/mixins/layout.php old mode 100644 new mode 100755 index c545429..83f7b9a --- a/kirby/config/sections/mixins/layout.php +++ b/kirby/config/sections/mixins/layout.php @@ -1,14 +1,125 @@ [ + /** + * Columns config for `layout: table` + */ + 'columns' => function (array $columns = null) { + return $columns ?? []; + }, /** * Section layout. - * Available layout methods: `list`, `cardlets`, `cards`. + * Available layout methods: `list`, `cardlets`, `cards`, `table`. */ 'layout' => function (string $layout = 'list') { - $layouts = ['list', 'cardlets', 'cards']; + $layouts = ['list', 'cardlets', 'cards', 'table']; return in_array($layout, $layouts) ? $layout : 'list'; + }, + /** + * The size option controls the size of cards. By default cards are auto-sized and the cards grid will always fill the full width. With a size you can disable auto-sizing. Available sizes: `tiny`, `small`, `medium`, `large`, `huge` + */ + 'size' => function (string $size = 'auto') { + return $size; + }, + ], + 'computed' => [ + 'columns' => function () { + $columns = []; + + if ($this->layout !== 'table') { + return []; + } + + if ($this->image !== false) { + $columns['image'] = [ + 'label' => ' ', + 'mobile' => true, + 'type' => 'image', + 'width' => 'var(--table-row-height)' + ]; + } + + if ($this->text) { + $columns['title'] = [ + 'label' => I18n::translate('title'), + 'mobile' => true, + 'type' => 'url', + ]; + } + + if ($this->info) { + $columns['info'] = [ + 'label' => I18n::translate('info'), + 'type' => 'text', + ]; + } + + foreach ($this->columns as $columnName => $column) { + if ($column === true) { + $column = []; + } + + if ($column === false) { + continue; + } + + // fallback for labels + $column['label'] ??= Str::ucfirst($columnName); + + // make sure to translate labels + $column['label'] = I18n::translate($column['label'], $column['label']); + + // keep the original column name as id + $column['id'] = $columnName; + + // add the custom column to the array with a key that won't + // override the system columns + $columns[$columnName . 'Cell'] = $column; + } + + if ($this->type === 'pages') { + $columns['flag'] = [ + 'label' => ' ', + 'mobile' => true, + 'type' => 'flag', + 'width' => 'var(--table-row-height)', + ]; + } + + return $columns; + }, + ], + 'methods' => [ + 'columnsValues' => function (array $item, $model) { + $item['title'] = [ + 'text' => $item['text'], + 'href' => $model->panel()->url(true) + ]; + + foreach ($this->columns as $columnName => $column) { + // don't overwrite essential columns + if (isset($item[$columnName]) === true) { + continue; + } + + if (empty($column['value']) === false) { + if ($column['type'] ?? false === 'html') { + $value = $model->toString($column['value']); + } else { + $value = $model->toSafeString($column['value']); + } + } else { + $value = $model->content()->get($column['id'] ?? $columnName)->value(); + } + + $item[$columnName] = $value; + } + + return $item; } - ] + ], ]; diff --git a/kirby/config/sections/mixins/max.php b/kirby/config/sections/mixins/max.php old mode 100644 new mode 100755 diff --git a/kirby/config/sections/mixins/min.php b/kirby/config/sections/mixins/min.php old mode 100644 new mode 100755 diff --git a/kirby/config/sections/mixins/pagination.php b/kirby/config/sections/mixins/pagination.php old mode 100644 new mode 100755 index 8bf3dee..491245a --- a/kirby/config/sections/mixins/pagination.php +++ b/kirby/config/sections/mixins/pagination.php @@ -1,5 +1,6 @@ function (int $page = null) { - return get('page', $page); + return App::instance()->request()->get('page', $page); }, ], 'methods' => [ @@ -31,6 +32,6 @@ return [ 'page' => $pagination->page(), 'total' => $pagination->total(), ]; - }, + } ] ]; diff --git a/kirby/config/sections/mixins/parent.php b/kirby/config/sections/mixins/parent.php old mode 100644 new mode 100755 diff --git a/kirby/config/sections/mixins/search.php b/kirby/config/sections/mixins/search.php new file mode 100755 index 0000000..566a8e6 --- /dev/null +++ b/kirby/config/sections/mixins/search.php @@ -0,0 +1,19 @@ + [ + /** + * Enable/disable the search in the sections + */ + 'search' => function (bool $search = false): bool { + return $search; + } + ], + 'computed' => [ + 'searchterm' => function (): ?string { + return App::instance()->request()->get('searchterm'); + } + ] +]; diff --git a/kirby/config/sections/mixins/sort.php b/kirby/config/sections/mixins/sort.php new file mode 100755 index 0000000..e9bbb28 --- /dev/null +++ b/kirby/config/sections/mixins/sort.php @@ -0,0 +1,53 @@ + [ + /** + * Enables/disables reverse sorting + */ + 'flip' => function (bool $flip = false) { + return $flip; + }, + /** + * Enables/disables manual sorting + */ + 'sortable' => function (bool $sortable = true) { + return $sortable; + }, + /** + * Overwrites manual sorting and sorts by the given field and sorting direction (i.e. `date desc`) + */ + 'sortBy' => function (string $sortBy = null) { + return $sortBy; + }, + ], + 'computed' => [ + 'sortable' => function () { + if ($this->sortable === false) { + return false; + } + + if ( + $this->type === 'pages' && + in_array($this->status, ['listed', 'published', 'all']) === false + ) { + return false; + } + + // don't allow sorting while search filter is active + if (empty($this->query) === false) { + return false; + } + + if ($this->sortBy !== null) { + return false; + } + + if ($this->flip === true) { + return false; + } + + return true; + } + ] +]; diff --git a/kirby/config/sections/pages.php b/kirby/config/sections/pages.php old mode 100644 new mode 100755 index 541f7c0..f4c98da --- a/kirby/config/sections/pages.php +++ b/kirby/config/sections/pages.php @@ -7,6 +7,7 @@ use Kirby\Toolkit\I18n; return [ 'mixins' => [ + 'details', 'empty', 'headline', 'help', @@ -14,7 +15,9 @@ return [ 'min', 'max', 'pagination', - 'parent' + 'parent', + 'search', + 'sort' ], 'props' => [ /** @@ -24,42 +27,6 @@ return [ 'create' => function ($create = null) { return $create; }, - /** - * Enables/disables reverse sorting - */ - 'flip' => function (bool $flip = false) { - return $flip; - }, - /** - * Image options to control the source and look of page previews - */ - 'image' => function ($image = null) { - return $image ?? []; - }, - /** - * Optional info text setup. Info text is shown on the right (lists) or below (cards) the page title. - */ - 'info' => function ($info = null) { - return I18n::translate($info, $info); - }, - /** - * The size option controls the size of cards. By default cards are auto-sized and the cards grid will always fill the full width. With a size you can disable auto-sizing. Available sizes: `tiny`, `small`, `medium`, `large`, `huge` - */ - 'size' => function (string $size = 'auto') { - return $size; - }, - /** - * Enables/disables manual sorting - */ - 'sortable' => function (bool $sortable = true) { - return $sortable; - }, - /** - * Overwrites manual sorting and sorts by the given field and sorting direction (i.e. `date desc`) - */ - 'sortBy' => function (string $sortBy = null) { - return $sortBy; - }, /** * Filters pages by their status. Available status settings: `draft`, `unlisted`, `listed`, `published`, `all`. */ @@ -79,19 +46,16 @@ return [ */ 'templates' => function ($templates = null) { return A::wrap($templates ?? $this->template); - }, - /** - * Setup for the main text in the list or cards. By default this will display the page title. - */ - 'text' => function ($text = '{{ page.title }}') { - return I18n::translate($text, $text); } ], 'computed' => [ 'parent' => function () { $parent = $this->parentModel(); - if (is_a($parent, 'Kirby\Cms\Site') === false && is_a($parent, 'Kirby\Cms\Page') === false) { + if ( + is_a($parent, 'Kirby\Cms\Site') === false && + is_a($parent, 'Kirby\Cms\Page') === false + ) { throw new InvalidArgumentException('The parent is invalid. You must choose the site or a page as parent.'); } @@ -115,20 +79,28 @@ return [ $pages = $this->parent->childrenAndDrafts(); } - // loop for the best performance - foreach ($pages->data as $id => $page) { - + // filters pages that are protected and not in the templates list + // internal `filter()` method used instead of foreach loop that previously included `unset()` + // because `unset()` is updating the original data, `filter()` is just filtering + // also it has been tested that there is no performance difference + // even in 0.1 seconds on 100k virtual pages + $pages = $pages->filter(function ($page) { // remove all protected pages if ($page->isReadable() === false) { - unset($pages->data[$id]); - continue; + return false; } // filter by all set templates if ($this->templates && in_array($page->intendedTemplate()->name(), $this->templates) === false) { - unset($pages->data[$id]); - continue; + return false; } + + return true; + }); + + // search + if ($this->search === true && empty($this->searchterm) === false) { + $pages = $pages->search($this->searchterm); } // sort @@ -156,27 +128,36 @@ return [ 'data' => function () { $data = []; - foreach ($this->pages as $item) { - $panel = $item->panel(); - $permissions = $item->permissions(); + foreach ($this->pages as $page) { + $panel = $page->panel(); + $permissions = $page->permissions(); - $data[] = [ + $item = [ 'dragText' => $panel->dragText(), - 'id' => $item->id(), - 'image' => $panel->image($this->image, $this->layout), - 'info' => $item->toSafeString($this->info ?? false), + 'id' => $page->id(), + 'image' => $panel->image( + $this->image, + $this->layout === 'table' ? 'list' : $this->layout + ), + 'info' => $page->toSafeString($this->info ?? false), 'link' => $panel->url(true), - 'parent' => $item->parentId(), + 'parent' => $page->parentId(), 'permissions' => [ 'sort' => $permissions->can('sort'), 'changeSlug' => $permissions->can('changeSlug'), 'changeStatus' => $permissions->can('changeStatus'), 'changeTitle' => $permissions->can('changeTitle'), ], - 'status' => $item->status(), - 'template' => $item->intendedTemplate()->name(), - 'text' => $item->toSafeString($this->text), + 'status' => $page->status(), + 'template' => $page->intendedTemplate()->name(), + 'text' => $page->toSafeString($this->text), ]; + + if ($this->layout === 'table') { + $item = $this->columnsValues($item, $page); + } + + $data[] = $item; } return $data; @@ -224,35 +205,8 @@ return [ return true; }, - 'link' => function () { - $modelLink = $this->model->panel()->url(true); - $parentLink = $this->parent->panel()->url(true); - - if ($modelLink !== $parentLink) { - return $parentLink; - } - }, 'pagination' => function () { return $this->pagination(); - }, - 'sortable' => function () { - if (in_array($this->status, ['listed', 'published', 'all']) === false) { - return false; - } - - if ($this->sortable === false) { - return false; - } - - if ($this->sortBy !== null) { - return false; - } - - if ($this->flip === true) { - return false; - } - - return true; } ], 'methods' => [ @@ -291,13 +245,15 @@ return [ 'errors' => $this->errors, 'options' => [ 'add' => $this->add, + 'columns' => $this->columns, 'empty' => $this->empty, 'headline' => $this->headline, 'help' => $this->help, 'layout' => $this->layout, - 'link' => $this->link, + 'link' => $this->link(), 'max' => $this->max, 'min' => $this->min, + 'search' => $this->search, 'size' => $this->size, 'sortable' => $this->sortable ], diff --git a/kirby/config/sections/stats.php b/kirby/config/sections/stats.php new file mode 100755 index 0000000..662d3f6 --- /dev/null +++ b/kirby/config/sections/stats.php @@ -0,0 +1,62 @@ + [ + 'headline', + ], + 'props' => [ + /** + * Array or query string for reports. Each report needs a `label` and `value` and can have additional `info`, `link` and `theme` settings. + */ + 'reports' => function ($reports = null) { + if ($reports === null) { + return []; + } + + if (is_string($reports) === true) { + $reports = $this->model()->query($reports); + } + + if (is_array($reports) === false) { + return []; + } + + return $reports; + }, + /** + * The size of the report cards. Available sizes: `tiny`, `small`, `medium`, `large` + */ + 'size' => function (string $size = 'large') { + return $size; + } + ], + 'computed' => [ + 'reports' => function () { + $reports = []; + $model = $this->model(); + $value = fn ($value) => $value === null ? null : $model->toString($value); + + foreach ($this->reports as $report) { + if (is_string($report) === true) { + $report = $model->query($report); + } + + if (is_array($report) === false) { + continue; + } + + $reports[] = [ + 'label' => I18n::translate($report['label'], $report['label']), + 'value' => $value($report['value'] ?? null), + 'info' => $value($report['info'] ?? null), + 'link' => $value($report['link'] ?? null), + 'theme' => $value($report['theme'] ?? null) + ]; + } + + return $reports; + } + ] +]; diff --git a/kirby/config/setup.php b/kirby/config/setup.php old mode 100644 new mode 100755 diff --git a/kirby/config/tags.php b/kirby/config/tags.php old mode 100644 new mode 100755 diff --git a/kirby/config/templates/emails/auth/login.php b/kirby/config/templates/emails/auth/login.php old mode 100644 new mode 100755 diff --git a/kirby/config/templates/emails/auth/password-reset.php b/kirby/config/templates/emails/auth/password-reset.php old mode 100644 new mode 100755 diff --git a/kirby/dependencies/parsedown-extra/ParsedownExtra.php b/kirby/dependencies/parsedown-extra/ParsedownExtra.php old mode 100644 new mode 100755 diff --git a/kirby/dependencies/parsedown/Parsedown.php b/kirby/dependencies/parsedown/Parsedown.php old mode 100644 new mode 100755 diff --git a/kirby/dependencies/spyc/COPYING b/kirby/dependencies/spyc/COPYING old mode 100644 new mode 100755 diff --git a/kirby/dependencies/spyc/Spyc.php b/kirby/dependencies/spyc/Spyc.php old mode 100644 new mode 100755 diff --git a/kirby/i18n/rules/LICENSE b/kirby/i18n/rules/LICENSE old mode 100644 new mode 100755 diff --git a/kirby/i18n/rules/ar.json b/kirby/i18n/rules/ar.json old mode 100644 new mode 100755 diff --git a/kirby/i18n/rules/az.json b/kirby/i18n/rules/az.json old mode 100644 new mode 100755 diff --git a/kirby/i18n/rules/bg.json b/kirby/i18n/rules/bg.json old mode 100644 new mode 100755 diff --git a/kirby/i18n/rules/cs.json b/kirby/i18n/rules/cs.json old mode 100644 new mode 100755 diff --git a/kirby/i18n/rules/da.json b/kirby/i18n/rules/da.json old mode 100644 new mode 100755 diff --git a/kirby/i18n/rules/de.json b/kirby/i18n/rules/de.json old mode 100644 new mode 100755 diff --git a/kirby/i18n/rules/el.json b/kirby/i18n/rules/el.json old mode 100644 new mode 100755 diff --git a/kirby/i18n/rules/eo.json b/kirby/i18n/rules/eo.json old mode 100644 new mode 100755 diff --git a/kirby/i18n/rules/et.json b/kirby/i18n/rules/et.json old mode 100644 new mode 100755 diff --git a/kirby/i18n/rules/fa.json b/kirby/i18n/rules/fa.json old mode 100644 new mode 100755 diff --git a/kirby/i18n/rules/fi.json b/kirby/i18n/rules/fi.json old mode 100644 new mode 100755 diff --git a/kirby/i18n/rules/fr.json b/kirby/i18n/rules/fr.json old mode 100644 new mode 100755 diff --git a/kirby/i18n/rules/hi.json b/kirby/i18n/rules/hi.json old mode 100644 new mode 100755 diff --git a/kirby/i18n/rules/hr.json b/kirby/i18n/rules/hr.json old mode 100644 new mode 100755 diff --git a/kirby/i18n/rules/hu.json b/kirby/i18n/rules/hu.json old mode 100644 new mode 100755 diff --git a/kirby/i18n/rules/hy.json b/kirby/i18n/rules/hy.json old mode 100644 new mode 100755 diff --git a/kirby/i18n/rules/is_IS.json b/kirby/i18n/rules/is_IS.json old mode 100644 new mode 100755 diff --git a/kirby/i18n/rules/it.json b/kirby/i18n/rules/it.json old mode 100644 new mode 100755 diff --git a/kirby/i18n/rules/iu.json b/kirby/i18n/rules/iu.json old mode 100644 new mode 100755 diff --git a/kirby/i18n/rules/ja.json b/kirby/i18n/rules/ja.json old mode 100644 new mode 100755 diff --git a/kirby/i18n/rules/ka.json b/kirby/i18n/rules/ka.json old mode 100644 new mode 100755 diff --git a/kirby/i18n/rules/ko.json b/kirby/i18n/rules/ko.json old mode 100644 new mode 100755 diff --git a/kirby/i18n/rules/lt.json b/kirby/i18n/rules/lt.json old mode 100644 new mode 100755 diff --git a/kirby/i18n/rules/lv.json b/kirby/i18n/rules/lv.json old mode 100644 new mode 100755 diff --git a/kirby/i18n/rules/mk.json b/kirby/i18n/rules/mk.json old mode 100644 new mode 100755 diff --git a/kirby/i18n/rules/my.json b/kirby/i18n/rules/my.json old mode 100644 new mode 100755 diff --git a/kirby/i18n/rules/nb.json b/kirby/i18n/rules/nb.json old mode 100644 new mode 100755 diff --git a/kirby/i18n/rules/pl.json b/kirby/i18n/rules/pl.json old mode 100644 new mode 100755 diff --git a/kirby/i18n/rules/pt_BR.json b/kirby/i18n/rules/pt_BR.json old mode 100644 new mode 100755 diff --git a/kirby/i18n/rules/rm.json b/kirby/i18n/rules/rm.json old mode 100644 new mode 100755 diff --git a/kirby/i18n/rules/ru.json b/kirby/i18n/rules/ru.json old mode 100644 new mode 100755 diff --git a/kirby/i18n/rules/sr.json b/kirby/i18n/rules/sr.json old mode 100644 new mode 100755 diff --git a/kirby/i18n/rules/sv_SE.json b/kirby/i18n/rules/sv_SE.json old mode 100644 new mode 100755 diff --git a/kirby/i18n/rules/tr.json b/kirby/i18n/rules/tr.json old mode 100644 new mode 100755 diff --git a/kirby/i18n/rules/uk.json b/kirby/i18n/rules/uk.json old mode 100644 new mode 100755 diff --git a/kirby/i18n/rules/vi.json b/kirby/i18n/rules/vi.json old mode 100644 new mode 100755 diff --git a/kirby/i18n/rules/zh.json b/kirby/i18n/rules/zh.json old mode 100644 new mode 100755 diff --git a/kirby/i18n/translations/bg.json b/kirby/i18n/translations/bg.json old mode 100644 new mode 100755 index e44802d..e050b4e --- a/kirby/i18n/translations/bg.json +++ b/kirby/i18n/translations/bg.json @@ -49,6 +49,9 @@ "email": "Email", "email.placeholder": "mail@example.com", + "entries": "Entries", + "entry": "Entry", + "environment": "Environment", "error.access.code": "Invalid code", @@ -294,6 +297,7 @@ "hide": "Hide", "hour": "Hour", "import": "Import", + "info": "Info", "insert": "\u0412\u043c\u044a\u043a\u043d\u0438", "insert.after": "Insert after", "insert.before": "Insert before", @@ -336,10 +340,12 @@ "license": "\u041b\u0438\u0446\u0435\u043d\u0437 \u0437\u0430 Kirby", "license.buy": "Купи лиценз", "license.register": "Регистрирай", + "license.manage": "Manage your licenses", "license.register.help": "You received your license code after the purchase via email. Please copy and paste it to register.", "license.register.label": "Please enter your license code", "license.register.success": "Thank you for supporting Kirby", "license.unregistered": "Това е нерегистрирана демо версия на Kirby", + "license.unregistered.label": "Unregistered", "link": "\u0412\u0440\u044a\u0437\u043a\u0430", "link.text": "Текстова връзка", @@ -469,20 +475,28 @@ "section.required": "The section is required", + "security": "Security", "select": "Избери", + "server": "Server", "settings": "Настройки", "show": "Show", + "site.blueprint": "The site has no blueprint yet. You can define the setup in /site/blueprints/site.yml", "size": "Размер", "slug": "URL-\u0434\u043e\u0431\u0430\u0432\u043a\u0430", "sort": "Сортирай", + + "stats.empty": "No reports", + "system.issues.content": "The content folder seems to be exposed", + "system.issues.debug": "Debugging must be turned off in production", + "system.issues.git": "The .git folder seems to be exposed", + "system.issues.https": "We recommend HTTPS for all your sites", + "system.issues.kirby": "The kirby folder seems to be exposed", + "system.issues.site": "The site folder seems to be exposed", + "title": "Заглавие", "template": "Образец", "today": "Днес", - "server": "Server", - - "site.blueprint": "The site has no blueprint yet. You can define the setup in /site/blueprints/site.yml", - "toolbar.button.code": "Код", "toolbar.button.bold": "\u041f\u043e\u043b\u0443\u0447\u0435\u0440 \u0448\u0440\u0438\u0444\u0442", "toolbar.button.email": "Email", diff --git a/kirby/i18n/translations/ca.json b/kirby/i18n/translations/ca.json old mode 100644 new mode 100755 index 1fd47c0..026491e --- a/kirby/i18n/translations/ca.json +++ b/kirby/i18n/translations/ca.json @@ -49,6 +49,9 @@ "email": "Email", "email.placeholder": "mail@exemple.com", + "entries": "Entries", + "entry": "Entry", + "environment": "Environment", "error.access.code": "Codi invàlid", @@ -294,6 +297,7 @@ "hide": "Hide", "hour": "Hora", "import": "Import", + "info": "Info", "insert": "Insertar", "insert.after": "Insert after", "insert.before": "Insert before", @@ -336,10 +340,12 @@ "license": "Llic\u00e8ncia Kirby", "license.buy": "Comprar una llicència", "license.register": "Registrar", + "license.manage": "Manage your licenses", "license.register.help": "Heu rebut el codi de la vostra llicència després de la compra, per correu electrònic. Copieu-lo i enganxeu-lo per registrar-vos.", "license.register.label": "Si us plau, introdueixi el seu codi de llicència", "license.register.success": "Gràcies per donar suport a Kirby", "license.unregistered": "Aquesta és una demo no registrada de Kirby", + "license.unregistered.label": "Unregistered", "link": "Enlla\u00e7", "link.text": "Enllaç de text", @@ -469,20 +475,28 @@ "section.required": "La secció és obligatòria", + "security": "Security", "select": "Seleccionar", + "server": "Server", "settings": "Configuració", "show": "Show", + "site.blueprint": "The site has no blueprint yet. You can define the setup in /site/blueprints/site.yml", "size": "Tamany", "slug": "URL-ap\u00e8ndix", "sort": "Ordenar", + + "stats.empty": "No reports", + "system.issues.content": "The content folder seems to be exposed", + "system.issues.debug": "Debugging must be turned off in production", + "system.issues.git": "The .git folder seems to be exposed", + "system.issues.https": "We recommend HTTPS for all your sites", + "system.issues.kirby": "The kirby folder seems to be exposed", + "system.issues.site": "The site folder seems to be exposed", + "title": "Títol", "template": "Plantilla", "today": "Avui", - "server": "Server", - - "site.blueprint": "The site has no blueprint yet. You can define the setup in /site/blueprints/site.yml", - "toolbar.button.code": "Codi", "toolbar.button.bold": "Negreta", "toolbar.button.email": "Email", diff --git a/kirby/i18n/translations/cs.json b/kirby/i18n/translations/cs.json old mode 100644 new mode 100755 index a5670b6..ba19b77 --- a/kirby/i18n/translations/cs.json +++ b/kirby/i18n/translations/cs.json @@ -49,6 +49,9 @@ "email": "Email", "email.placeholder": "mail@example.com", + "entries": "Entries", + "entry": "Entry", + "environment": "Prostředí", "error.access.code": "Neplatný kód", @@ -294,6 +297,7 @@ "hide": "Skrýt", "hour": "Hodina", "import": "Import", + "info": "Info", "insert": "Vlo\u017eit", "insert.after": "Vložit za", "insert.before": "Vložit před", @@ -336,10 +340,12 @@ "license": "Kirby licence", "license.buy": "Zakoupit licenci", "license.register": "Registrovat", + "license.manage": "Manage your licenses", "license.register.help": "Licenční kód jste po zakoupení obdrželi na email. Vložte prosím kód a zaregistrujte Vaší kopii.", "license.register.label": "Zadejte prosím licenční kód", "license.register.success": "Děkujeme Vám za podporu Kirby", "license.unregistered": "Toto je neregistrovaná kopie Kirby", + "license.unregistered.label": "Unregistered", "link": "Odkaz", "link.text": "Text odkazu", @@ -469,20 +475,28 @@ "section.required": "Sekce musí být vyplněna", + "security": "Security", "select": "Vybrat", + "server": "Server", "settings": "Nastavení", "show": "Zobrazit", + "site.blueprint": "Hlavní panel nemá blueprint. Blueprint můžete definovat v /site/blueprints/site.yml", "size": "Velikost", "slug": "P\u0159\u00edpona URL", "sort": "Řadit", + + "stats.empty": "No reports", + "system.issues.content": "The content folder seems to be exposed", + "system.issues.debug": "Debugging must be turned off in production", + "system.issues.git": "The .git folder seems to be exposed", + "system.issues.https": "We recommend HTTPS for all your sites", + "system.issues.kirby": "The kirby folder seems to be exposed", + "system.issues.site": "The site folder seems to be exposed", + "title": "Název", "template": "\u0160ablona", "today": "Dnes", - "server": "Server", - - "site.blueprint": "Hlavní panel nemá blueprint. Blueprint můžete definovat v /site/blueprints/site.yml", - "toolbar.button.code": "Kód", "toolbar.button.bold": "Tu\u010dn\u00fd text", "toolbar.button.email": "Email", diff --git a/kirby/i18n/translations/da.json b/kirby/i18n/translations/da.json old mode 100644 new mode 100755 index 1534032..e71e9c5 --- a/kirby/i18n/translations/da.json +++ b/kirby/i18n/translations/da.json @@ -49,6 +49,9 @@ "email": "Email", "email.placeholder": "mail@eksempel.dk", + "entries": "Entries", + "entry": "Entry", + "environment": "Miljø", "error.access.code": "Ugyldig kode", @@ -294,6 +297,7 @@ "hide": "Skjul", "hour": "Time", "import": "Importer", + "info": "Info", "insert": "Inds\u00e6t", "insert.after": "Indsæt efter", "insert.before": "Indsæt før", @@ -336,10 +340,12 @@ "license": "Kirby licens", "license.buy": "Køb en licens", "license.register": "Registrer", + "license.manage": "Manage your licenses", "license.register.help": "Du modtog din licenskode efter købet via email. Venligst kopier og indsæt den for at registrere.", "license.register.label": "Indtast venligst din licenskode", "license.register.success": "Tak for din støtte af Kirby", "license.unregistered": "Dette er en uregistreret demo af Kirby", + "license.unregistered.label": "Unregistered", "link": "Link", "link.text": "Link tekst", @@ -469,20 +475,28 @@ "section.required": "Sektionen er påkrævet", + "security": "Security", "select": "Vælg", + "server": "Server", "settings": "Indstillinger", "show": "Vis", + "site.blueprint": "Sitet har intet blueprint endnu. Du kan definere opsætningen i /site/blueprints/site.yml", "size": "Størrelse", "slug": "URL-appendiks", "sort": "Sorter", + + "stats.empty": "No reports", + "system.issues.content": "The content folder seems to be exposed", + "system.issues.debug": "Debugging must be turned off in production", + "system.issues.git": "The .git folder seems to be exposed", + "system.issues.https": "We recommend HTTPS for all your sites", + "system.issues.kirby": "The kirby folder seems to be exposed", + "system.issues.site": "The site folder seems to be exposed", + "title": "Titel", "template": "Skabelon", "today": "Idag", - "server": "Server", - - "site.blueprint": "Sitet har intet blueprint endnu. Du kan definere opsætningen i /site/blueprints/site.yml", - "toolbar.button.code": "Kode", "toolbar.button.bold": "Fed tekst", "toolbar.button.email": "Email", diff --git a/kirby/i18n/translations/de.json b/kirby/i18n/translations/de.json old mode 100644 new mode 100755 index ebee7ca..ae1052e --- a/kirby/i18n/translations/de.json +++ b/kirby/i18n/translations/de.json @@ -49,6 +49,9 @@ "email": "E-Mail", "email.placeholder": "mail@beispiel.de", + "entries": "Einträge", + "entry": "Eintrag", + "environment": "Umgebung", "error.access.code": "Ungültiger Code", @@ -294,6 +297,7 @@ "hide": "Verbergen", "hour": "Stunde", "import": "Importieren", + "info": "Info", "insert": "Einf\u00fcgen", "insert.after": "Danach einfügen", "insert.before": "Davor einfügen", @@ -336,10 +340,12 @@ "license": "Lizenz", "license.buy": "Kaufe eine Lizenz", "license.register": "Registrieren", + "license.manage": "Verwalte deine Lizenzen", "license.register.help": "Den Lizenzcode findest du in der Bestätigungsmail zu deinem Kauf. Bitte kopiere und füge ihn ein, um Kirby zu registrieren.", "license.register.label": "Bitte gib deinen Lizenzcode ein", "license.register.success": "Vielen Dank für deine Unterstützung", "license.unregistered": "Dies ist eine unregistrierte Kirby-Demo", + "license.unregistered.label": "Unregistriert", "link": "Link", "link.text": "Linktext", @@ -469,20 +475,28 @@ "section.required": "Der Bereich ist Pflicht", + "security": "Sicherheit", "select": "Auswählen", + "server": "Server", "settings": "Einstellungen", "show": "Anzeigen", + "site.blueprint": "Du kannst zusätzliche Felder und Bereiche für die Seite in /site/blueprints/site.yml anlegen", "size": "Größe", "slug": "URL-Anhang", "sort": "Sortieren", + + "stats.empty": "Keine Daten", + "system.issues.content": "Der content Ordner scheint öffentlich zugänglich zu sein", + "system.issues.debug": "Debugging muss im öffentlichen Betrieb ausgeschaltet sein", + "system.issues.git": "Der .git Ordner scheint öffentlich zugänglich zu sein", + "system.issues.https": "Wir empfehlen HTTPS für alle deine Seiten", + "system.issues.kirby": "Der kirby Ordner scheint öffentlich zugänglich zu sein", + "system.issues.site": "Der site Ordner scheint öffentlich zugänglich zu sein", + "title": "Titel", "template": "Vorlage", "today": "Heute", - "server": "Server", - - "site.blueprint": "Du kannst zusätzliche Felder und Bereiche für die Seite in /site/blueprints/site.yml anlegen", - "toolbar.button.code": "Code", "toolbar.button.bold": "Fetter Text", "toolbar.button.email": "E-Mail", diff --git a/kirby/i18n/translations/el.json b/kirby/i18n/translations/el.json old mode 100644 new mode 100755 index b0dc5d0..2a249d5 --- a/kirby/i18n/translations/el.json +++ b/kirby/i18n/translations/el.json @@ -49,6 +49,9 @@ "email": "Διεύθυνση ηλεκτρονικού ταχυδρομείου", "email.placeholder": "mail@example.com", + "entries": "Entries", + "entry": "Entry", + "environment": "Environment", "error.access.code": "Mη έγκυρος κωδικός", @@ -294,6 +297,7 @@ "hide": "Hide", "hour": "Ώρα", "import": "Import", + "info": "Info", "insert": "\u0395\u03b9\u03c3\u03b1\u03b3\u03c9\u03b3\u03ae", "insert.after": "Insert after", "insert.before": "Insert before", @@ -336,10 +340,12 @@ "license": "\u0386\u03b4\u03b5\u03b9\u03b1 \u03a7\u03c1\u03ae\u03c3\u03b7\u03c2 \u03c4\u03bf\u03c5 Kirby", "license.buy": "Αγοράστε μια άδεια", "license.register": "Εγγραφή", + "license.manage": "Manage your licenses", "license.register.help": "Έχετε λάβει τον κωδικό άδειας χρήσης μετά την αγορά μέσω ηλεκτρονικού ταχυδρομείου. Παρακαλώ αντιγράψτε και επικολλήστε τον για να εγγραφείτε.", "license.register.label": "Παρακαλώ εισαγάγετε τον κωδικό άδειας χρήσης", "license.register.success": "Σας ευχαριστούμε για την υποστήριξη του Kirby", "license.unregistered": "Αυτό είναι ένα μη καταχωρημένο demo του Kirby", + "license.unregistered.label": "Unregistered", "link": "\u03a3\u03cd\u03bd\u03b4\u03b5\u03c3\u03bc\u03bf\u03c2", "link.text": "\u039a\u03b5\u03af\u03bc\u03b5\u03bd\u03bf \u03c3\u03c5\u03bd\u03b4\u03ad\u03c3\u03bc\u03bf\u03c5", @@ -469,20 +475,28 @@ "section.required": "The section is required", + "security": "Security", "select": "Επιλογή", + "server": "Server", "settings": "Ρυθμίσεις", "show": "Show", + "site.blueprint": "The site has no blueprint yet. You can define the setup in /site/blueprints/site.yml", "size": "Μέγεθος", "slug": "\u0395\u03c0\u03af\u03b8\u03b5\u03bc\u03b1 URL", "sort": "Ταξινόμηση", + + "stats.empty": "No reports", + "system.issues.content": "The content folder seems to be exposed", + "system.issues.debug": "Debugging must be turned off in production", + "system.issues.git": "The .git folder seems to be exposed", + "system.issues.https": "We recommend HTTPS for all your sites", + "system.issues.kirby": "The kirby folder seems to be exposed", + "system.issues.site": "The site folder seems to be exposed", + "title": "Τίτλος", "template": "\u03a0\u03c1\u03cc\u03c4\u03c5\u03c0\u03bf", "today": "Σήμερα", - "server": "Server", - - "site.blueprint": "The site has no blueprint yet. You can define the setup in /site/blueprints/site.yml", - "toolbar.button.code": "Κώδικας", "toolbar.button.bold": "\u0388\u03bd\u03c4\u03bf\u03bd\u03b7 \u03b3\u03c1\u03b1\u03c6\u03ae", "toolbar.button.email": "Email", diff --git a/kirby/i18n/translations/en.json b/kirby/i18n/translations/en.json old mode 100644 new mode 100755 index 7b328f4..9f97c6f --- a/kirby/i18n/translations/en.json +++ b/kirby/i18n/translations/en.json @@ -49,6 +49,9 @@ "email": "Email", "email.placeholder": "mail@example.com", + "entries": "Entries", + "entry": "Entry", + "environment": "Environment", "error.access.code": "Invalid code", @@ -294,6 +297,7 @@ "hide": "Hide", "hour": "Hour", "import": "Import", + "info": "Info", "insert": "Insert", "insert.after": "Insert after", "insert.before": "Insert before", @@ -336,10 +340,12 @@ "license": "License", "license.buy": "Buy a license", "license.register": "Register", + "license.manage": "Manage your licenses", "license.register.help": "You received your license code after the purchase via email. Please copy and paste it to register.", "license.register.label": "Please enter your license code", "license.register.success": "Thank you for supporting Kirby", "license.unregistered": "This is an unregistered demo of Kirby", + "license.unregistered.label": "Unregistered", "link": "Link", "link.text": "Link text", @@ -469,20 +475,28 @@ "section.required": "The section is required", + "security": "Security", "select": "Select", + "server": "Server", "settings": "Settings", "show": "Show", + "site.blueprint": "The site has no blueprint yet. You can define the setup in /site/blueprints/site.yml", "size": "Size", "slug": "URL appendix", "sort": "Sort", + + "stats.empty": "No reports", + "system.issues.content": "The content folder seems to be exposed", + "system.issues.debug": "Debugging must be turned off in production", + "system.issues.git": "The .git folder seems to be exposed", + "system.issues.https": "We recommend HTTPS for all your sites", + "system.issues.kirby": "The kirby folder seems to be exposed", + "system.issues.site": "The site folder seems to be exposed", + "title": "Title", "template": "Template", "today": "Today", - "server": "Server", - - "site.blueprint": "The site has no blueprint yet. You can define the setup in /site/blueprints/site.yml", - "toolbar.button.code": "Code", "toolbar.button.bold": "Bold", "toolbar.button.email": "Email", diff --git a/kirby/i18n/translations/eo.json b/kirby/i18n/translations/eo.json old mode 100644 new mode 100755 index 835d15e..f7bb72f --- a/kirby/i18n/translations/eo.json +++ b/kirby/i18n/translations/eo.json @@ -49,6 +49,9 @@ "email": "Retpoŝto", "email.placeholder": "retpoŝto@ekzemplo.com", + "entries": "Entries", + "entry": "Entry", + "environment": "Medio", "error.access.code": "Nevalida kodo", @@ -294,6 +297,7 @@ "hide": "Kaŝi", "hour": "Horo", "import": "Importi", + "info": "Info", "insert": "Enmeti", "insert.after": "Enmeti post", "insert.before": "Enmeti antaŭ", @@ -336,10 +340,12 @@ "license": "Permisilo", "license.buy": "Aĉeti permisilon", "license.register": "Registriĝi", + "license.manage": "Manage your licenses", "license.register.help": "Vi ricevis vian kodon de permisilo retpoŝte, post aĉeti ĝin. Bonvolu kopii kaj alglui ĝin por registriĝi.", "license.register.label": "Bonvolu entajpi vian kodon de permisilo", "license.register.success": "Dankon pro subteni Kirby", "license.unregistered": "Ĉi tiu estas neregistrita kopio de Kirby", + "license.unregistered.label": "Unregistered", "link": "Ligilo", "link.text": "Ligila teksto", @@ -469,20 +475,28 @@ "section.required": "La sekcio estas deviga", + "security": "Security", "select": "Elekti", + "server": "Servilo", "settings": "Agordoj", "show": "Montri", + "site.blueprint": "La retejo ankoraŭ ne havas planon. Vi povas difini planon ĉe /site/blueprints/site.yml", "size": "Grando", "slug": "URL-nomo", "sort": "Ordigi", + + "stats.empty": "No reports", + "system.issues.content": "The content folder seems to be exposed", + "system.issues.debug": "Debugging must be turned off in production", + "system.issues.git": "The .git folder seems to be exposed", + "system.issues.https": "We recommend HTTPS for all your sites", + "system.issues.kirby": "The kirby folder seems to be exposed", + "system.issues.site": "The site folder seems to be exposed", + "title": "Titolo", "template": "Ŝablono", "today": "Hodiaŭ", - "server": "Servilo", - - "site.blueprint": "La retejo ankoraŭ ne havas planon. Vi povas difini planon ĉe /site/blueprints/site.yml", - "toolbar.button.code": "Kodo", "toolbar.button.bold": "Grasa", "toolbar.button.email": "Retpoŝto", diff --git a/kirby/i18n/translations/es_419.json b/kirby/i18n/translations/es_419.json old mode 100644 new mode 100755 index cc85712..52b619a --- a/kirby/i18n/translations/es_419.json +++ b/kirby/i18n/translations/es_419.json @@ -49,6 +49,9 @@ "email": "Correo Electrónico", "email.placeholder": "correo@ejemplo.com", + "entries": "Entries", + "entry": "Entry", + "environment": "Ambiente", "error.access.code": "Código inválido", @@ -294,6 +297,7 @@ "hide": "Hide", "hour": "Hora", "import": "Import", + "info": "Info", "insert": "Insertar", "insert.after": "Insert after", "insert.before": "Insert before", @@ -336,10 +340,12 @@ "license": "Licencia", "license.buy": "Comprar una licencia", "license.register": "Registrar", + "license.manage": "Manage your licenses", "license.register.help": "Recibió su código de licencia después de la compra por correo electrónico. Por favor copie y pegue para registrarse.", "license.register.label": "Por favor, ingresa tu código de licencia", "license.register.success": "Gracias por apoyar a Kirby", "license.unregistered": "Este es un demo no registrado de Kirby", + "license.unregistered.label": "Unregistered", "link": "Enlace", "link.text": "Texto de Enlace", @@ -469,20 +475,28 @@ "section.required": "Esta sección es requerida", + "security": "Security", "select": "Seleccionar", + "server": "Server", "settings": "Ajustes", "show": "Show", + "site.blueprint": "The site has no blueprint yet. You can define the setup in /site/blueprints/site.yml", "size": "Tamaño", "slug": "Apéndice URL", "sort": "Ordenar", + + "stats.empty": "No reports", + "system.issues.content": "The content folder seems to be exposed", + "system.issues.debug": "Debugging must be turned off in production", + "system.issues.git": "The .git folder seems to be exposed", + "system.issues.https": "We recommend HTTPS for all your sites", + "system.issues.kirby": "The kirby folder seems to be exposed", + "system.issues.site": "The site folder seems to be exposed", + "title": "Título", "template": "Plantilla", "today": "Hoy", - "server": "Server", - - "site.blueprint": "The site has no blueprint yet. You can define the setup in /site/blueprints/site.yml", - "toolbar.button.code": "Código", "toolbar.button.bold": "Negrita", "toolbar.button.email": "Email", diff --git a/kirby/i18n/translations/es_ES.json b/kirby/i18n/translations/es_ES.json old mode 100644 new mode 100755 index 1fc7575..e8706b3 --- a/kirby/i18n/translations/es_ES.json +++ b/kirby/i18n/translations/es_ES.json @@ -49,6 +49,9 @@ "email": "Correo electrónico", "email.placeholder": "correo@ejemplo.com", + "entries": "Entries", + "entry": "Entry", + "environment": "Ambiente", "error.access.code": "Código inválido", @@ -294,6 +297,7 @@ "hide": "Hide", "hour": "Hora", "import": "Import", + "info": "Info", "insert": "Insertar", "insert.after": "Insert after", "insert.before": "Insert before", @@ -336,10 +340,12 @@ "license": "Licencia", "license.buy": "Comprar una licencia", "license.register": "Registro", + "license.manage": "Manage your licenses", "license.register.help": "Recibió su código de licencia después de la compra por correo electrónico. Por favor copie y pegue para registrarse.", "license.register.label": "Por favor ingrese su código de licencia", "license.register.success": "Gracias por apoyar a Kirby", "license.unregistered": "Esta es una demo no registrada de Kirby", + "license.unregistered.label": "Unregistered", "link": "Enlace", "link.text": "Texto del enlace", @@ -469,20 +475,28 @@ "section.required": "Esta sección es requerida", + "security": "Security", "select": "Seleccionar", + "server": "Server", "settings": "Ajustes", "show": "Show", + "site.blueprint": "The site has no blueprint yet. You can define the setup in /site/blueprints/site.yml", "size": "Tamaño", "slug": "Apéndice URL", "sort": "Ordenar", + + "stats.empty": "No reports", + "system.issues.content": "The content folder seems to be exposed", + "system.issues.debug": "Debugging must be turned off in production", + "system.issues.git": "The .git folder seems to be exposed", + "system.issues.https": "We recommend HTTPS for all your sites", + "system.issues.kirby": "The kirby folder seems to be exposed", + "system.issues.site": "The site folder seems to be exposed", + "title": "Titulo", "template": "Plantilla", "today": "Hoy", - "server": "Server", - - "site.blueprint": "The site has no blueprint yet. You can define the setup in /site/blueprints/site.yml", - "toolbar.button.code": "Código", "toolbar.button.bold": "Negritas", "toolbar.button.email": "Correo electrónico", diff --git a/kirby/i18n/translations/fa.json b/kirby/i18n/translations/fa.json old mode 100644 new mode 100755 index 8836a12..3f6e2fc --- a/kirby/i18n/translations/fa.json +++ b/kirby/i18n/translations/fa.json @@ -49,6 +49,9 @@ "email": "\u067e\u0633\u062a \u0627\u0644\u06a9\u062a\u0631\u0648\u0646\u06cc\u06a9", "email.placeholder": "mail@example.com", + "entries": "Entries", + "entry": "Entry", + "environment": "Environment", "error.access.code": "Invalid code", @@ -294,6 +297,7 @@ "hide": "Hide", "hour": "ساعت", "import": "Import", + "info": "Info", "insert": "\u062f\u0631\u062c", "insert.after": "Insert after", "insert.before": "Insert before", @@ -336,10 +340,12 @@ "license": "\u0645\u062c\u0648\u0632", "license.buy": "خرید مجوز", "license.register": "ثبت", + "license.manage": "Manage your licenses", "license.register.help": "پس از خرید از طریق ایمیل، کد مجوز خود را دریافت کردید. لطفا برای ثبت‌نام آن را کپی و اینجا پیست کنید.", "license.register.label": "لطفا کد مجوز خود را وارد کنید", "license.register.success": "با تشکر از شما برای حمایت از کربی", "license.unregistered": "این یک نسخه آزمایشی ثبت نشده از کربی است", + "license.unregistered.label": "Unregistered", "link": "\u067e\u06cc\u0648\u0646\u062f", "link.text": "\u0645\u062a\u0646 \u067e\u06cc\u0648\u0646\u062f", @@ -469,20 +475,28 @@ "section.required": "The section is required", + "security": "Security", "select": "انتخاب", + "server": "Server", "settings": "تنظیمات", "show": "Show", + "site.blueprint": "The site has no blueprint yet. You can define the setup in /site/blueprints/site.yml", "size": "اندازه", "slug": "پسوند Url", "sort": "ترتیب", + + "stats.empty": "No reports", + "system.issues.content": "The content folder seems to be exposed", + "system.issues.debug": "Debugging must be turned off in production", + "system.issues.git": "The .git folder seems to be exposed", + "system.issues.https": "We recommend HTTPS for all your sites", + "system.issues.kirby": "The kirby folder seems to be exposed", + "system.issues.site": "The site folder seems to be exposed", + "title": "عنوان", "template": "\u0642\u0627\u0644\u0628 \u0635\u0641\u062d\u0647", "today": "امروز", - "server": "Server", - - "site.blueprint": "The site has no blueprint yet. You can define the setup in /site/blueprints/site.yml", - "toolbar.button.code": "کد", "toolbar.button.bold": "\u0645\u062a\u0646 \u0628\u0627 \u062d\u0631\u0648\u0641 \u062f\u0631\u0634\u062a", "toolbar.button.email": "\u067e\u0633\u062a \u0627\u0644\u06a9\u062a\u0631\u0648\u0646\u06cc\u06a9", diff --git a/kirby/i18n/translations/fi.json b/kirby/i18n/translations/fi.json old mode 100644 new mode 100755 index 2fe0b2e..49b70c1 --- a/kirby/i18n/translations/fi.json +++ b/kirby/i18n/translations/fi.json @@ -49,6 +49,9 @@ "email": "S\u00e4hk\u00f6posti", "email.placeholder": "nimi@osoite.fi", + "entries": "Entries", + "entry": "Entry", + "environment": "Ympäristö", "error.access.code": "Väärä koodi", @@ -294,6 +297,7 @@ "hide": "Piilota", "hour": "Tunti", "import": "Tuo", + "info": "Info", "insert": "Lis\u00e4\u00e4", "insert.after": "Lisää eteen", "insert.before": "Lisää jälkeen", @@ -336,10 +340,12 @@ "license": "Lisenssi", "license.buy": "Osta lisenssi", "license.register": "Rekisteröi", + "license.manage": "Manage your licenses", "license.register.help": "Lisenssiavain on lähetetty oston jälkeen sähköpostiisi. Kopioi ja liitä avain tähän.", "license.register.label": "Anna lisenssiavain", "license.register.success": "Kiitos kun tuet Kirbyä", "license.unregistered": "Tämä on rekisteröimätön demo Kirbystä", + "license.unregistered.label": "Unregistered", "link": "Linkki", "link.text": "Linkin teksti", @@ -469,20 +475,28 @@ "section.required": "Osio on pakollinen", + "security": "Security", "select": "Valitse", + "server": "Palvelin", "settings": "Asetukset", "show": "Näytä", + "site.blueprint": "Tällä sivustolla ei ole vielä suunnitelmaa. Voit määrittää suunnitelman tiedostoon /site/blueprints/site.yml", "size": "Koko", "slug": "URL-tunniste", "sort": "Järjestele", + + "stats.empty": "No reports", + "system.issues.content": "The content folder seems to be exposed", + "system.issues.debug": "Debugging must be turned off in production", + "system.issues.git": "The .git folder seems to be exposed", + "system.issues.https": "We recommend HTTPS for all your sites", + "system.issues.kirby": "The kirby folder seems to be exposed", + "system.issues.site": "The site folder seems to be exposed", + "title": "Nimi", "template": "Sivupohja", "today": "Tänään", - "server": "Palvelin", - - "site.blueprint": "Tällä sivustolla ei ole vielä suunnitelmaa. Voit määrittää suunnitelman tiedostoon /site/blueprints/site.yml", - "toolbar.button.code": "Koodi", "toolbar.button.bold": "Lihavointi", "toolbar.button.email": "S\u00e4hk\u00f6posti", diff --git a/kirby/i18n/translations/fr.json b/kirby/i18n/translations/fr.json old mode 100644 new mode 100755 index 5d267e5..ccee09c --- a/kirby/i18n/translations/fr.json +++ b/kirby/i18n/translations/fr.json @@ -49,6 +49,9 @@ "email": "Courriel", "email.placeholder": "mail@example.com", + "entries": "Entrées", + "entry": "Entrée", + "environment": "Environnement", "error.access.code": "Code incorrect", @@ -294,6 +297,7 @@ "hide": "Masquer", "hour": "Heure", "import": "Importer", + "info": "Info", "insert": "Insérer", "insert.after": "Insérer après", "insert.before": "Insérer avant", @@ -336,10 +340,12 @@ "license": "Licence", "license.buy": "Acheter une licence", "license.register": "S’enregistrer", + "license.manage": "Manage your licenses", "license.register.help": "Vous avez reçu votre numéro de licence par courriel après l'achat. Veuillez le copier et le coller ici pour l'enregistrer.", "license.register.label": "Veuillez saisir votre numéro de licence", "license.register.success": "Merci pour votre soutien à Kirby", "license.unregistered": "Ceci est une démo non enregistrée de Kirby", + "license.unregistered.label": "Non enregistré", "link": "Lien", "link.text": "Texte du lien", @@ -469,20 +475,28 @@ "section.required": "Cette section est obligatoire", + "security": "Sécurité", "select": "Sélectionner", + "server": "Serveur", "settings": "Paramètres", "show": "Afficher", + "site.blueprint": "Ce site n’a pas encore de blueprint. Vous pouvez en définir les paramètres dans /site/blueprints/site.yml", "size": "Poids", "slug": "Identifiant de l’URL", "sort": "Trier", + + "stats.empty": "Aucun rapport", + "system.issues.content": "Le dossier content semble exposé", + "system.issues.debug": "Le débogage doit être désactivé en production", + "system.issues.git": "Le dossier .git semble exposé", + "system.issues.https": "Nous recommandons HTTPS pour tous vos sites", + "system.issues.kirby": "Le dossier kirby semble exposé", + "system.issues.site": "Le dossier site semble exposé", + "title": "Titre", "template": "Modèle", "today": "Aujourd’hui", - "server": "Serveur", - - "site.blueprint": "Ce site n’a pas encore de blueprint. Vous pouvez en définir les paramètres dans /site/blueprints/site.yml", - "toolbar.button.code": "Code", "toolbar.button.bold": "Gras", "toolbar.button.email": "Courriel", diff --git a/kirby/i18n/translations/hu.json b/kirby/i18n/translations/hu.json old mode 100644 new mode 100755 index 8cfe260..aee0b7e --- a/kirby/i18n/translations/hu.json +++ b/kirby/i18n/translations/hu.json @@ -49,6 +49,9 @@ "email": "Email", "email.placeholder": "mail@pelda.hu", + "entries": "Entries", + "entry": "Entry", + "environment": "Környezet", "error.access.code": "Érvénytelen kód", @@ -294,6 +297,7 @@ "hide": "Elrejtés", "hour": "Óra", "import": "Importálás", + "info": "Info", "insert": "Beilleszt", "insert.after": "Beszúrás mögé", "insert.before": "Beszúrás elé", @@ -336,10 +340,12 @@ "license": "Kirby licenc", "license.buy": "Licenc vásárlása", "license.register": "Regisztráció", + "license.manage": "Manage your licenses", "license.register.help": "A vásárlás után emailben küldjük el a licenc-kódot. Regisztrációhoz másold ide a kapott kódot.", "license.register.label": "Kérlek írd be a licenc-kódot", "license.register.success": "Köszönjük, hogy támogatod a Kirby-t", "license.unregistered": "Jelenleg a Kirby nem regisztrált próbaverzióját használod", + "license.unregistered.label": "Unregistered", "link": "Link", "link.text": "Link szövege", @@ -469,20 +475,28 @@ "section.required": "Ez a szakasz kötelező", + "security": "Security", "select": "Kiválasztás", + "server": "Szerver", "settings": "Beállítások", "show": "Mutat", + "site.blueprint": "Ehhez a weblaphoz még nem tartozik oldalsablon. Itt hozhatod létre: /site/blueprints/site.yml", "size": "Méret", "slug": "URL n\u00e9v", "sort": "Rendezés", + + "stats.empty": "No reports", + "system.issues.content": "The content folder seems to be exposed", + "system.issues.debug": "Debugging must be turned off in production", + "system.issues.git": "The .git folder seems to be exposed", + "system.issues.https": "We recommend HTTPS for all your sites", + "system.issues.kirby": "The kirby folder seems to be exposed", + "system.issues.site": "The site folder seems to be exposed", + "title": "Cím", "template": "Sablon", "today": "Ma", - "server": "Szerver", - - "site.blueprint": "Ehhez a weblaphoz még nem tartozik oldalsablon. Itt hozhatod létre: /site/blueprints/site.yml", - "toolbar.button.code": "Kód", "toolbar.button.bold": "F\u00e9lk\u00f6v\u00e9r sz\u00f6veg", "toolbar.button.email": "Email", diff --git a/kirby/i18n/translations/id.json b/kirby/i18n/translations/id.json old mode 100644 new mode 100755 index c9404bd..596e92a --- a/kirby/i18n/translations/id.json +++ b/kirby/i18n/translations/id.json @@ -49,6 +49,9 @@ "email": "Surel", "email.placeholder": "surel@contoh.com", + "entries": "Entries", + "entry": "Entry", + "environment": "Environment", "error.access.code": "Kode tidak valid", @@ -294,6 +297,7 @@ "hide": "Sembunyikan", "hour": "Jam", "import": "Import", + "info": "Info", "insert": "Sisipkan", "insert.after": "Sisipkan setelah", "insert.before": "Sisipkan sebelum", @@ -336,10 +340,12 @@ "license": "Lisensi Kirby", "license.buy": "Beli lisensi", "license.register": "Daftar", + "license.manage": "Manage your licenses", "license.register.help": "Anda menerima kode lisensi via surel setelah pembelian. Salin dan tempel kode tersebut untuk mendaftarkan.", "license.register.label": "Masukkan kode lisensi Anda", "license.register.success": "Terima kasih atas dukungan untuk Kirby", "license.unregistered": "Ini adalah demo tidak diregistrasi dari Kirby", + "license.unregistered.label": "Unregistered", "link": "Tautan", "link.text": "Teks tautan", @@ -469,20 +475,28 @@ "section.required": "Bagian ini wajib", + "security": "Security", "select": "Pilih", + "server": "Server", "settings": "Pengaturan", "show": "Tampilkan", + "site.blueprint": "Situs ini belum memiliki cetak biru. Anda dapat mendefinisikannya di /site/blueprints/site.yml", "size": "Ukuran", "slug": "Akhiran URL", "sort": "Urutkan", + + "stats.empty": "No reports", + "system.issues.content": "The content folder seems to be exposed", + "system.issues.debug": "Debugging must be turned off in production", + "system.issues.git": "The .git folder seems to be exposed", + "system.issues.https": "We recommend HTTPS for all your sites", + "system.issues.kirby": "The kirby folder seems to be exposed", + "system.issues.site": "The site folder seems to be exposed", + "title": "Judul", "template": "Templat", "today": "Hari ini", - "server": "Server", - - "site.blueprint": "Situs ini belum memiliki cetak biru. Anda dapat mendefinisikannya di /site/blueprints/site.yml", - "toolbar.button.code": "Kode", "toolbar.button.bold": "Tebal", "toolbar.button.email": "Surel", diff --git a/kirby/i18n/translations/is_IS.json b/kirby/i18n/translations/is_IS.json old mode 100644 new mode 100755 index ee26848..59fab9b --- a/kirby/i18n/translations/is_IS.json +++ b/kirby/i18n/translations/is_IS.json @@ -49,6 +49,9 @@ "email": "Netfang", "email.placeholder": "nafn@netfang.is", + "entries": "Entries", + "entry": "Entry", + "environment": "Umhverfi", "error.access.code": "Ógildur kóði", @@ -294,6 +297,7 @@ "hide": "Fela", "hour": "Klukkustund", "import": "Hlaða inn", + "info": "Info", "insert": "Setja inn", "insert.after": "Setja eftir", "insert.before": "Setja fyrir", @@ -336,10 +340,12 @@ "license": "Leyfi", "license.buy": "Kaupa leyfi", "license.register": "Skr\u00E1 Kirby", + "license.manage": "Manage your licenses", "license.register.help": "Þú fékkst sendan tölvupóst með leyfiskóðanum þegar þú keyptir leyfi. Vinsamlegast afritaðu hann og settu hann hingað til að skrá þig.", "license.register.label": "Vinsamlegast settu inn leyfiskóðan", "license.register.success": "Þakka þér fyrir að velja Kirby", "license.unregistered": "Þetta er óskráð prufueintak af Kirby", + "license.unregistered.label": "Unregistered", "link": "Tengill", "link.text": "Tengilstexti", @@ -469,20 +475,28 @@ "section.required": "Þetta svæði er nauðsynlegt", + "security": "Security", "select": "Velja", + "server": "Vefþjónn", "settings": "Stillingar", "show": "Sýna", + "site.blueprint": "Þessi vefur hefur ekki skipan (e. blueprint) ennþá. Þú mátt skilgreina skipanina í /site/blueprints/site.yml", "size": "Stærð", "slug": "Slögg", "sort": "Raða", + + "stats.empty": "No reports", + "system.issues.content": "The content folder seems to be exposed", + "system.issues.debug": "Debugging must be turned off in production", + "system.issues.git": "The .git folder seems to be exposed", + "system.issues.https": "We recommend HTTPS for all your sites", + "system.issues.kirby": "The kirby folder seems to be exposed", + "system.issues.site": "The site folder seems to be exposed", + "title": "Titill", "template": "Sniðmát", "today": "Núna", - "server": "Vefþjónn", - - "site.blueprint": "Þessi vefur hefur ekki skipan (e. blueprint) ennþá. Þú mátt skilgreina skipanina í /site/blueprints/site.yml", - "toolbar.button.code": "Kóðasnið", "toolbar.button.bold": "Feitletrun", "toolbar.button.email": "Netfang", diff --git a/kirby/i18n/translations/it.json b/kirby/i18n/translations/it.json old mode 100644 new mode 100755 index 42d5db4..60151cb --- a/kirby/i18n/translations/it.json +++ b/kirby/i18n/translations/it.json @@ -49,6 +49,9 @@ "email": "Email", "email.placeholder": "mail@esempio.com", + "entries": "Entries", + "entry": "Entry", + "environment": "Ambiente", "error.access.code": "Codice non valido", @@ -294,6 +297,7 @@ "hide": "Nascondi", "hour": "Ora", "import": "Importa", + "info": "Info", "insert": "Inserisci", "insert.after": "Inserisci dopo", "insert.before": "Inserisci prima", @@ -336,10 +340,12 @@ "license": "Licenza di Kirby", "license.buy": "Acquista una licenza", "license.register": "Registra", + "license.manage": "Manage your licenses", "license.register.help": "Hai ricevuto il codice di licenza tramite email dopo l'acquisto. Per favore inseriscilo per registrare Kirby.", "license.register.label": "Inserisci il codice di licenza", "license.register.success": "Ti ringraziamo per aver supportato Kirby", "license.unregistered": "Questa è una versione demo di Kirby non registrata", + "license.unregistered.label": "Unregistered", "link": "Link", "link.text": "Testo del link", @@ -469,20 +475,28 @@ "section.required": "La sezione è obbligatoria", + "security": "Security", "select": "Seleziona", + "server": "Server", "settings": "Impostazioni", "show": "Mostra", + "site.blueprint": "Il sito non ha ancora un \"blueprint\". Puoi impostarne uno in /site/blueprints/site.yml", "size": "Dimensioni", "slug": "URL", "sort": "Ordina", + + "stats.empty": "No reports", + "system.issues.content": "The content folder seems to be exposed", + "system.issues.debug": "Debugging must be turned off in production", + "system.issues.git": "The .git folder seems to be exposed", + "system.issues.https": "We recommend HTTPS for all your sites", + "system.issues.kirby": "The kirby folder seems to be exposed", + "system.issues.site": "The site folder seems to be exposed", + "title": "Titolo", "template": "Template", "today": "Oggi", - "server": "Server", - - "site.blueprint": "Il sito non ha ancora un \"blueprint\". Puoi impostarne uno in /site/blueprints/site.yml", - "toolbar.button.code": "Codice", "toolbar.button.bold": "Grassetto", "toolbar.button.email": "Email", diff --git a/kirby/i18n/translations/ko.json b/kirby/i18n/translations/ko.json old mode 100644 new mode 100755 index ade311f..561a9b2 --- a/kirby/i18n/translations/ko.json +++ b/kirby/i18n/translations/ko.json @@ -49,6 +49,9 @@ "email": "\uc774\uba54\uc77c \uc8fc\uc18c", "email.placeholder": "mail@example.com", + "entries": "Entries", + "entry": "Entry", + "environment": "구동 환경", "error.access.code": "코드가 올바르지 않습니다.", @@ -294,6 +297,7 @@ "hide": "숨기기", "hour": "시", "import": "가져오기", + "info": "Info", "insert": "\uc0bd\uc785", "insert.after": "뒤에 삽입", "insert.before": "앞에 삽입", @@ -336,10 +340,12 @@ "license": "라이선스", "license.buy": "라이선스 구매", "license.register": "등록", + "license.manage": "Manage your licenses", "license.register.help": "Kirby를 등록하려면 이메일로 전송받은 라이선스 코드와 이메일 주소를 입력하세요.", "license.register.label": "라이선스 코드를 입력하세요.", "license.register.success": "Kirby와 함께해주셔서 감사합니다.", "license.unregistered": "Kirby가 등록되지 않았습니다.", + "license.unregistered.label": "Unregistered", "link": "\uc77c\ubc18 \ub9c1\ud06c", "link.text": "\ubb38\uc790", @@ -469,20 +475,28 @@ "section.required": "섹션이 필요합니다.", + "security": "Security", "select": "선택", + "server": "서버", "settings": "설정", "show": "보기", + "site.blueprint": "블루프린트(/site/blueprints/site.yml)를 설정하세요.", "size": "크기", "slug": "고유 주소", "sort": "정렬", + + "stats.empty": "No reports", + "system.issues.content": "The content folder seems to be exposed", + "system.issues.debug": "최종 결과물에서는 디버깅 모드를 해제하세요.", + "system.issues.git": "The .git folder seems to be exposed", + "system.issues.https": "모든 사이트에 HTTPS를 권장합니다.", + "system.issues.kirby": "The kirby folder seems to be exposed", + "system.issues.site": "The site folder seems to be exposed", + "title": "제목", "template": "\ud15c\ud50c\ub9bf", "today": "오늘", - "server": "서버", - - "site.blueprint": "블루프린트(/site/blueprints/site.yml)를 설정하세요.", - "toolbar.button.code": "코드", "toolbar.button.bold": "강조", "toolbar.button.email": "이메일 주소", diff --git a/kirby/i18n/translations/lt.json b/kirby/i18n/translations/lt.json old mode 100644 new mode 100755 index cccd7f0..8741d72 --- a/kirby/i18n/translations/lt.json +++ b/kirby/i18n/translations/lt.json @@ -49,6 +49,9 @@ "email": "El. paštas", "email.placeholder": "mail@example.com", + "entries": "Entries", + "entry": "Entry", + "environment": "Environment", "error.access.code": "Neteisinas kodas", @@ -294,6 +297,7 @@ "hide": "Paslėpti", "hour": "Valanda", "import": "Importuoti", + "info": "Info", "insert": "Įterpti", "insert.after": "Įterpti po", "insert.before": "Įterpti prieš", @@ -336,10 +340,12 @@ "license": "Licenzija", "license.buy": "Pirkti licenziją", "license.register": "Registruoti", + "license.manage": "Manage your licenses", "license.register.help": "Licenzijos kodą gavote el. paštu po apmokėjimo. Prašome įterpti čia, kad sistema būtų užregistruota.", "license.register.label": "Prašome įrašyti jūsų licenzijos kodą", "license.register.success": "Ačiū, kad palaikote Kirby", "license.unregistered": "Tai neregistruota Kirby demo versija", + "license.unregistered.label": "Unregistered", "link": "Nuoroda", "link.text": "Nuorodos tekstas", @@ -469,20 +475,28 @@ "section.required": "Sekcija privaloma", + "security": "Security", "select": "Pasirinkti", + "server": "Server", "settings": "Nustatymai", "show": "Rodyti", + "site.blueprint": "Svetainė neturi blueprint. Jūs galite nustatyti jį /site/blueprints/site.yml", "size": "Dydis", "slug": "URL pabaiga", "sort": "Rikiuoti", + + "stats.empty": "No reports", + "system.issues.content": "The content folder seems to be exposed", + "system.issues.debug": "Debugging must be turned off in production", + "system.issues.git": "The .git folder seems to be exposed", + "system.issues.https": "We recommend HTTPS for all your sites", + "system.issues.kirby": "The kirby folder seems to be exposed", + "system.issues.site": "The site folder seems to be exposed", + "title": "Pavadinimas", "template": "Puslapio šablonas", "today": "Šiandien", - "server": "Server", - - "site.blueprint": "Svetainė neturi blueprint. Jūs galite nustatyti jį /site/blueprints/site.yml", - "toolbar.button.code": "Kodas", "toolbar.button.bold": "Bold", "toolbar.button.email": "El. paštas", diff --git a/kirby/i18n/translations/nb.json b/kirby/i18n/translations/nb.json old mode 100644 new mode 100755 index 19a67a6..a4f9048 --- a/kirby/i18n/translations/nb.json +++ b/kirby/i18n/translations/nb.json @@ -49,6 +49,9 @@ "email": "Epost", "email.placeholder": "epost@eksempel.no", + "entries": "Entries", + "entry": "Entry", + "environment": "Miljø", "error.access.code": "Ugyldig kode", @@ -294,6 +297,7 @@ "hide": "Skjul", "hour": "Tid", "import": "Importer", + "info": "Info", "insert": "Sett Inn", "insert.after": "Sett inn etter", "insert.before": "Sett inn før", @@ -336,10 +340,12 @@ "license": "Kirby lisens", "license.buy": "Kjøp lisens", "license.register": "Registrer", + "license.manage": "Manage your licenses", "license.register.help": "Du skal ha mottatt din lisenskode for kjøpet via e-post. Vennligst kopier og lim inn denne for å registrere deg.", "license.register.label": "Vennligst skriv inn din lisenskode", "license.register.success": "Takk for at du støtter Kirby", "license.unregistered": "Dette er en uregistrert demo av Kirby", + "license.unregistered.label": "Unregistered", "link": "Adresse", "link.text": "Koblingstekst", @@ -469,20 +475,28 @@ "section.required": "Denne seksjonen er påkrevd", + "security": "Security", "select": "Velg", + "server": "Server", "settings": "Innstillinger", "show": "Vis", + "site.blueprint": "Denne siden har ikke en blueprint enda. Du kan definere oppsettet i /site/blueprints/site.yml", "size": "Størrelse", "slug": "URL-appendiks", "sort": "Sortere", + + "stats.empty": "No reports", + "system.issues.content": "The content folder seems to be exposed", + "system.issues.debug": "Debugging must be turned off in production", + "system.issues.git": "The .git folder seems to be exposed", + "system.issues.https": "We recommend HTTPS for all your sites", + "system.issues.kirby": "The kirby folder seems to be exposed", + "system.issues.site": "The site folder seems to be exposed", + "title": "Tittel", "template": "Mal", "today": "I dag", - "server": "Server", - - "site.blueprint": "Denne siden har ikke en blueprint enda. Du kan definere oppsettet i /site/blueprints/site.yml", - "toolbar.button.code": "Kode", "toolbar.button.bold": "Fet tekst", "toolbar.button.email": "Epost", diff --git a/kirby/i18n/translations/nl.json b/kirby/i18n/translations/nl.json old mode 100644 new mode 100755 index ee7af92..e9fee94 --- a/kirby/i18n/translations/nl.json +++ b/kirby/i18n/translations/nl.json @@ -49,6 +49,9 @@ "email": "E-mailadres", "email.placeholder": "mail@voorbeeld.nl", + "entries": "Entries", + "entry": "Entry", + "environment": "Omgeving", "error.access.code": "Ongeldige code", @@ -294,6 +297,7 @@ "hide": "Verberg", "hour": "Uur", "import": "Importeer", + "info": "Info", "insert": "Toevoegen", "insert.after": "Voeg toe na", "insert.before": "Voeg toe voor", @@ -336,10 +340,12 @@ "license": "Licentie", "license.buy": "Koop een licentie", "license.register": "Registreren", + "license.manage": "Manage your licenses", "license.register.help": "Je hebt de licentie via e-mail gekregen nadat je de aankoop hebt gedaan. Kopieer en plak de licentie om te registreren. ", "license.register.label": "Vul je licentie in", "license.register.success": "Bedankt dat je Kirby ondersteunt", "license.unregistered": "Dit is een niet geregistreerde demo van Kirby", + "license.unregistered.label": "Unregistered", "link": "Link", "link.text": "Linktekst", @@ -469,20 +475,28 @@ "section.required": "De sectie is verplicht", + "security": "Security", "select": "Selecteren", + "server": "Server", "settings": "Opties", "show": "Toon", + "site.blueprint": "Deze website heeft nog geen ontwerp. Je kan het ontwerp hier plaatsen/site/blueprints/site.yml", "size": "Grootte", "slug": "URL-toevoeging", "sort": "Sorteren", + + "stats.empty": "No reports", + "system.issues.content": "The content folder seems to be exposed", + "system.issues.debug": "Debugging must be turned off in production", + "system.issues.git": "The .git folder seems to be exposed", + "system.issues.https": "We recommend HTTPS for all your sites", + "system.issues.kirby": "The kirby folder seems to be exposed", + "system.issues.site": "The site folder seems to be exposed", + "title": "Titel", "template": "Template", "today": "Vandaag", - "server": "Server", - - "site.blueprint": "Deze website heeft nog geen ontwerp. Je kan het ontwerp hier plaatsen/site/blueprints/site.yml", - "toolbar.button.code": "Code", "toolbar.button.bold": "Dikgedrukte tekst", "toolbar.button.email": "E-mailadres", diff --git a/kirby/i18n/translations/pl.json b/kirby/i18n/translations/pl.json old mode 100644 new mode 100755 index 688f58a..5b776b6 --- a/kirby/i18n/translations/pl.json +++ b/kirby/i18n/translations/pl.json @@ -49,6 +49,9 @@ "email": "Email", "email.placeholder": "mail@example.com", + "entries": "Entries", + "entry": "Entry", + "environment": "Środowisko", "error.access.code": "Nieprawidłowy kod", @@ -294,6 +297,7 @@ "hide": "Ukryj", "hour": "Godzina", "import": "Importuj", + "info": "Info", "insert": "Wstaw", "insert.after": "Wstaw po", "insert.before": "Wstaw przed", @@ -336,10 +340,12 @@ "license": "Licencja", "license.buy": "Kup licencję", "license.register": "Zarejestruj", + "license.manage": "Manage your licenses", "license.register.help": "Po zakupieniu licencji otrzymałaś/-eś mailem klucz. Skopiuj go i wklej tutaj, aby dokonać rejestracji.", "license.register.label": "Wprowadź swój kod licencji", "license.register.success": "Dziękujemy za wspieranie Kirby", "license.unregistered": "To jest niezarejestrowana wersja demonstracyjna Kirby", + "license.unregistered.label": "Unregistered", "link": "Link", "link.text": "Tekst linku", @@ -469,20 +475,28 @@ "section.required": "Sekcja jest wymagana", + "security": "Security", "select": "Wybierz", + "server": "Serwer", "settings": "Ustawienia", "show": "Pokaż", + "site.blueprint": "Ta strona nie ma jeszcze wzorca. Możesz go zdefiniować w /site/blueprints/site.yml", "size": "Rozmiar", "slug": "Końcówka URL", "sort": "Sortuj", + + "stats.empty": "No reports", + "system.issues.content": "The content folder seems to be exposed", + "system.issues.debug": "Debugging must be turned off in production", + "system.issues.git": "The .git folder seems to be exposed", + "system.issues.https": "We recommend HTTPS for all your sites", + "system.issues.kirby": "The kirby folder seems to be exposed", + "system.issues.site": "The site folder seems to be exposed", + "title": "Tytuł", "template": "Szablon", "today": "Dzisiaj", - "server": "Serwer", - - "site.blueprint": "Ta strona nie ma jeszcze wzorca. Możesz go zdefiniować w /site/blueprints/site.yml", - "toolbar.button.code": "Kod", "toolbar.button.bold": "Pogrubienie", "toolbar.button.email": "Email", diff --git a/kirby/i18n/translations/pt_BR.json b/kirby/i18n/translations/pt_BR.json old mode 100644 new mode 100755 index f18cdae..6181eca --- a/kirby/i18n/translations/pt_BR.json +++ b/kirby/i18n/translations/pt_BR.json @@ -49,6 +49,9 @@ "email": "Email", "email.placeholder": "mail@exemplo.com", + "entries": "Entries", + "entry": "Entry", + "environment": "Ambiente", "error.access.code": "Código inválido", @@ -294,6 +297,7 @@ "hide": "Ocultar", "hour": "Hora", "import": "Importar", + "info": "Info", "insert": "Inserir", "insert.after": "Inserir após", "insert.before": "Inserir antes", @@ -336,10 +340,12 @@ "license": "Licen\u00e7a do Kirby ", "license.buy": "Comprar licença", "license.register": "Registrar", + "license.manage": "Manage your licenses", "license.register.help": "Você recebeu o código da sua licença por email ao efetuar sua compra. Por favor, copie e cole o código para completar seu registro.", "license.register.label": "Por favor, digite o código da sua licença", "license.register.success": "Obrigado por apoiar o Kirby", "license.unregistered": "Esta é uma cópia de demonstração não registrada do Kirby", + "license.unregistered.label": "Unregistered", "link": "Link", "link.text": "Texto do link", @@ -469,20 +475,28 @@ "section.required": "Esta seção é obrigatória", + "security": "Security", "select": "Selecionar", + "server": "Servidor", "settings": "Configurações", "show": "Mostrar", + "site.blueprint": "Este site não tem planta. Você pode definir sua planta em /site/blueprints/site.yml", "size": "Tamanho", "slug": "Anexo de URL", "sort": "Ordenar", + + "stats.empty": "No reports", + "system.issues.content": "The content folder seems to be exposed", + "system.issues.debug": "Debugging must be turned off in production", + "system.issues.git": "The .git folder seems to be exposed", + "system.issues.https": "We recommend HTTPS for all your sites", + "system.issues.kirby": "The kirby folder seems to be exposed", + "system.issues.site": "The site folder seems to be exposed", + "title": "Título", "template": "Tema", "today": "Hoje", - "server": "Servidor", - - "site.blueprint": "Este site não tem planta. Você pode definir sua planta em /site/blueprints/site.yml", - "toolbar.button.code": "Código", "toolbar.button.bold": "Negrito", "toolbar.button.email": "Email", diff --git a/kirby/i18n/translations/pt_PT.json b/kirby/i18n/translations/pt_PT.json old mode 100644 new mode 100755 index 026c581..a2a20f1 --- a/kirby/i18n/translations/pt_PT.json +++ b/kirby/i18n/translations/pt_PT.json @@ -49,6 +49,9 @@ "email": "Email", "email.placeholder": "mail@exemplo.pt", + "entries": "Entries", + "entry": "Entry", + "environment": "Ambiente", "error.access.code": "Código inválido", @@ -294,6 +297,7 @@ "hide": "Ocultar", "hour": "Hora", "import": "Importar", + "info": "Info", "insert": "Inserir", "insert.after": "Inserir após", "insert.before": "Inserir antes", @@ -336,10 +340,12 @@ "license": "Licen\u00e7a do Kirby ", "license.buy": "Comprar uma licença", "license.register": "Registrar", + "license.manage": "Manage your licenses", "license.register.help": "Recebeu o código da sua licença por email após a compra. Por favor, copie e cole-o para completar o registro.", "license.register.label": "Por favor, digite o código da sua licença", "license.register.success": "Obrigado por apoiar o Kirby", "license.unregistered": "Esta é uma demonstração não registrada do Kirby", + "license.unregistered.label": "Unregistered", "link": "Link", "link.text": "Texto do link", @@ -469,20 +475,28 @@ "section.required": "Esta seção é necessária", + "security": "Security", "select": "Selecionar", + "server": "Servidor", "settings": "Configurações", "show": "Mostrar", + "site.blueprint": "Este site não tem planta. Você pode definir sua planta em /site/blueprints/site.yml", "size": "Tamanho", "slug": "URL", "sort": "Ordenar", + + "stats.empty": "No reports", + "system.issues.content": "The content folder seems to be exposed", + "system.issues.debug": "Debugging must be turned off in production", + "system.issues.git": "The .git folder seems to be exposed", + "system.issues.https": "We recommend HTTPS for all your sites", + "system.issues.kirby": "The kirby folder seems to be exposed", + "system.issues.site": "The site folder seems to be exposed", + "title": "Título", "template": "Tema", "today": "Hoje", - "server": "Servidor", - - "site.blueprint": "Este site não tem planta. Você pode definir sua planta em /site/blueprints/site.yml", - "toolbar.button.code": "Código", "toolbar.button.bold": "Negrito", "toolbar.button.email": "Email", diff --git a/kirby/i18n/translations/ru.json b/kirby/i18n/translations/ru.json old mode 100644 new mode 100755 index eab4f2b..f4acd25 --- a/kirby/i18n/translations/ru.json +++ b/kirby/i18n/translations/ru.json @@ -49,6 +49,9 @@ "email": "Email", "email.placeholder": "mail@example.com", + "entries": "Записи", + "entry": "Запись", + "environment": "Среда", "error.access.code": "Неверный код", @@ -294,6 +297,7 @@ "hide": "Скрыть", "hour": "Час", "import": "Импортировать", + "info": "Info", "insert": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c", "insert.after": "Вставить ниже", "insert.before": "Вставить выше", @@ -336,10 +340,12 @@ "license": "Лицензия", "license.buy": "Купить лицензию", "license.register": "Зарегистрировать", + "license.manage": "Manage your licenses", "license.register.help": "После покупки вы получили по эл. почте код лицензии. Пожалуйста скопируйте и вставьте сюда чтобы зарегистрировать.", "license.register.label": "Пожалуйста вставьте код лицензии", "license.register.success": "Спасибо за поддержку Kirby", "license.unregistered": "Это незарегистрированная версия Kirby", + "license.unregistered.label": "Не зарегистрировано", "link": "\u0421\u0441\u044b\u043b\u043a\u0430", "link.text": "\u0422\u0435\u043a\u0441\u0442 \u0441\u0441\u044b\u043b\u043a\u0438", @@ -359,9 +365,9 @@ "login.code.label.password-reset": "Код для сброса пароля", "login.code.placeholder.email": "000 000", "login.code.text.email": "Если ваш Email уже зарегистрирован, запрашиваемый код был отправлен на него.", - "login.email.login.body": "Привет, {user.nameOrEmail}!\n\nНедавно вы запросили код для входа в Панель управления {site}.\nСледующий код входа будет действителен в течение {timeout} минут:\n\n{code}\n\nЕсли вы не запрашивали код для входа, проигнорируйте это письмо или обратитесь к администратору, если у вас есть вопросы.\nВ целях безопасности НЕ ПЕРЕСЫЛАЙТЕ это письмо.", + "login.email.login.body": "Привет, {user.nameOrEmail}!\n\nНедавно вы запросили код для входа на «{site}».\nСледующий код входа будет действителен в течение {timeout} минут:\n\n{code}\n\nЕсли вы не запрашивали код для входа, проигнорируйте это письмо или обратитесь к администратору, если у вас есть вопросы.\nВ целях безопасности НЕ ПЕРЕСЫЛАЙТЕ это письмо.", "login.email.login.subject": "Ваш код для входа", - "login.email.password-reset.body": "Привет, {user.nameOrEmail}!\n\nНедавно вы запросили сброс пароля для входа в Панель управления {site}.\nСледующий код входа будет действителен в течение {timeout} минут:\n\n{code}\n\nЕсли вы не запрашивали сброс пароля, проигнорируйте это письмо или обратитесь к администратору, если у вас есть вопросы.\nВ целях безопасности НЕ ПЕРЕСЫЛАЙТЕ это письмо.", + "login.email.password-reset.body": "Привет, {user.nameOrEmail}!\n\nНедавно вы запросили сброс пароля для входа на «{site}».\nСледующий код входа будет действителен в течение {timeout} минут:\n\n{code}\n\nЕсли вы не запрашивали сброс пароля, проигнорируйте это письмо или обратитесь к администратору, если у вас есть вопросы.\nВ целях безопасности НЕ ПЕРЕСЫЛАЙТЕ это письмо.", "login.email.password-reset.subject": "Ваш код для сброса пароля", "login.remember": "Сохранять вход активным", "login.reset": "Сбросить пароль", @@ -469,20 +475,28 @@ "section.required": "Секция обязательна", + "security": "Безопасность", "select": "Выбрать", + "server": "Сервер", "settings": "Настройка", "show": "Показать", + "site.blueprint": "У сайта пока нет разметки. Вы можете определить новые секции и поля разметки в /site/blueprints/site.yml", "size": "Размер", "slug": "Понятная ссылка", "sort": "Сортировать", + + "stats.empty": "Нет уведомлений", + "system.issues.content": "Похоже, к папке content есть несанкционированный доступ", + "system.issues.debug": "Включен режим отладки (debugging). Используйте его только при разработке.", + "system.issues.git": "Похоже, к папке .git есть несанкционированный доступ", + "system.issues.https": "Рекомендуется использовать HTTPS на всех сайтах", + "system.issues.kirby": "Похоже, к папке kirby есть несанкционированный доступ", + "system.issues.site": "Похоже, к папке site есть несанкционированный доступ", + "title": "Название", "template": "\u0428\u0430\u0431\u043b\u043e\u043d", "today": "Сегодня", - "server": "Сервер", - - "site.blueprint": "У сайта пока нет разметки. Вы можете определить новые секции и поля разметки в /site/blueprints/site.yml", - "toolbar.button.code": "Код", "toolbar.button.bold": "\u0416\u0438\u0440\u043d\u044b\u0439 \u0448\u0440\u0438\u0444\u0442", "toolbar.button.email": "Email", diff --git a/kirby/i18n/translations/sk.json b/kirby/i18n/translations/sk.json old mode 100644 new mode 100755 index 023c27e..a7d53d2 --- a/kirby/i18n/translations/sk.json +++ b/kirby/i18n/translations/sk.json @@ -49,6 +49,9 @@ "email": "E-mail", "email.placeholder": "mail@example.com", + "entries": "Entries", + "entry": "Entry", + "environment": "Environment", "error.access.code": "Neplatný kód", @@ -294,6 +297,7 @@ "hide": "Hide", "hour": "Hodina", "import": "Import", + "info": "Info", "insert": "Vložiť", "insert.after": "Insert after", "insert.before": "Insert before", @@ -336,10 +340,12 @@ "license": "Licencia", "license.buy": "Zakúpiť licenciu", "license.register": "Registrovať", + "license.manage": "Manage your licenses", "license.register.help": "Licenčný kód vám bol doručený e-mailom po úspešnom nákupe. Prosím, skopírujte a prilepte ho na uskutočnenie registrácie.", "license.register.label": "Prosím, zadajte váš licenčný kód", "license.register.success": "Ďakujeme za vašu podporu Kirby", "license.unregistered": "Toto je neregistrované demo Kirby", + "license.unregistered.label": "Unregistered", "link": "Odkaz", "link.text": "Text odkazu", @@ -469,20 +475,28 @@ "section.required": "The section is required", + "security": "Security", "select": "Zvoliť", + "server": "Server", "settings": "Nastavenia", "show": "Show", + "site.blueprint": "The site has no blueprint yet. You can define the setup in /site/blueprints/site.yml", "size": "Veľkosť", "slug": "URL appendix", "sort": "Zoradiť", + + "stats.empty": "No reports", + "system.issues.content": "The content folder seems to be exposed", + "system.issues.debug": "Debugging must be turned off in production", + "system.issues.git": "The .git folder seems to be exposed", + "system.issues.https": "We recommend HTTPS for all your sites", + "system.issues.kirby": "The kirby folder seems to be exposed", + "system.issues.site": "The site folder seems to be exposed", + "title": "Titulok", "template": "Šablóna", "today": "Dnes", - "server": "Server", - - "site.blueprint": "The site has no blueprint yet. You can define the setup in /site/blueprints/site.yml", - "toolbar.button.code": "Kód", "toolbar.button.bold": "Tučný", "toolbar.button.email": "E-mail", diff --git a/kirby/i18n/translations/sv_SE.json b/kirby/i18n/translations/sv_SE.json old mode 100644 new mode 100755 index 1437052..0645ef8 --- a/kirby/i18n/translations/sv_SE.json +++ b/kirby/i18n/translations/sv_SE.json @@ -49,6 +49,9 @@ "email": "E-postadress", "email.placeholder": "namn@exempel.se", + "entries": "Entries", + "entry": "Entry", + "environment": "Miljö", "error.access.code": "Ogiltig kod", @@ -294,6 +297,7 @@ "hide": "Göm", "hour": "Timme", "import": "Importera", + "info": "Info", "insert": "Infoga", "insert.after": "Infoga efter", "insert.before": "Infoga före", @@ -336,10 +340,12 @@ "license": "Licens", "license.buy": "Köp en licens", "license.register": "Registrera", + "license.manage": "Manage your licenses", "license.register.help": "Du fick din licenskod via e-post efter inköpet. Kopiera och klistra in den för att registrera licensen.", "license.register.label": "Ange din licenskod", "license.register.success": "Tack för att du stödjer Kirby", "license.unregistered": "Detta är en oregistrerad demo av Kirby", + "license.unregistered.label": "Unregistered", "link": "L\u00e4nk", "link.text": "L\u00e4nktext", @@ -469,20 +475,28 @@ "section.required": "Sektionen krävs", + "security": "Security", "select": "Välj", + "server": "Server", "settings": "Inställningar", "show": "Visa", + "site.blueprint": "Webbplatsen har ingen blueprint än. Du kan skapa en i /site/blueprints/site.yml", "size": "Storlek", "slug": "URL-appendix", "sort": "Sortera", + + "stats.empty": "No reports", + "system.issues.content": "The content folder seems to be exposed", + "system.issues.debug": "Debugging must be turned off in production", + "system.issues.git": "The .git folder seems to be exposed", + "system.issues.https": "We recommend HTTPS for all your sites", + "system.issues.kirby": "The kirby folder seems to be exposed", + "system.issues.site": "The site folder seems to be exposed", + "title": "Titel", "template": "Mall", "today": "Idag", - "server": "Server", - - "site.blueprint": "Webbplatsen har ingen blueprint än. Du kan skapa en i /site/blueprints/site.yml", - "toolbar.button.code": "Kod", "toolbar.button.bold": "Fet", "toolbar.button.email": "E-post", diff --git a/kirby/i18n/translations/tr.json b/kirby/i18n/translations/tr.json old mode 100644 new mode 100755 index 43675e2..bd54b68 --- a/kirby/i18n/translations/tr.json +++ b/kirby/i18n/translations/tr.json @@ -49,6 +49,9 @@ "email": "E-Posta", "email.placeholder": "eposta@ornek.com", + "entries": "Girdiler", + "entry": "Girdi", + "environment": "Ortam", "error.access.code": "Geçersiz kod", @@ -294,6 +297,7 @@ "hide": "Gizle", "hour": "Saat", "import": "İçe aktar", + "info": "Bilgi", "insert": "Ekle", "insert.after": "Sonrasına ekle", "insert.before": "Öncesine ekle", @@ -336,10 +340,12 @@ "license": "Lisans", "license.buy": "Bir lisans satın al", "license.register": "Kayıt Ol", + "license.manage": "Manage your licenses", "license.register.help": "Satın alma işleminden sonra e-posta yoluyla lisans kodunuzu aldınız. Lütfen kayıt olmak için kodu kopyalayıp yapıştırın.", "license.register.label": "Lütfen lisans kodunu giriniz", "license.register.success": "Kirby'yi desteklediğiniz için teşekkürler", "license.unregistered": "Bu Kirby'nin kayıtsız bir demosu", + "license.unregistered.label": "Kayıtsız", "link": "Ba\u011flant\u0131", "link.text": "Ba\u011flant\u0131 yaz\u0131s\u0131", @@ -469,20 +475,28 @@ "section.required": "Bölüm gereklidir", + "security": "Güvenlik", "select": "Seç", + "server": "Sunucu", "settings": "Ayarlar", "show": "Göster", + "site.blueprint": "Sitenin henüz bir planı yok. Kurulumu /site/blueprints/site.yml'de tanımlayabilirsiniz.", "size": "Boyut", "slug": "Web Adres Uzantısı", "sort": "Sırala", + + "stats.empty": "Rapor yok", + "system.issues.content": "İçerik klasörü açığa çıkmış görünüyor", + "system.issues.debug": "Canlı modda hata ayıklama kapatılmalıdır", + "system.issues.git": ".git klasörü açığa çıkmış görünüyor", + "system.issues.https": "Tüm siteleriniz için HTTPS'yi öneriyoruz", + "system.issues.kirby": "Kirby klasörü açığa çıkmış görünüyor", + "system.issues.site": "Site klasörü açığa çıkmış görünüyor", + "title": "Başlık", "template": "\u015eablon", "today": "Bugün", - "server": "Sunucu", - - "site.blueprint": "Sitenin henüz bir planı yok. Kurulumu /site/blueprints/site.yml'de tanımlayabilirsiniz.", - "toolbar.button.code": "Kod", "toolbar.button.bold": "Kalın Yazı", "toolbar.button.email": "E-Posta", diff --git a/kirby/kirby.pub b/kirby/kirby.pub old mode 100644 new mode 100755 diff --git a/kirby/panel/dist/apple-touch-icon.png b/kirby/panel/dist/apple-touch-icon.png old mode 100644 new mode 100755 diff --git a/kirby/panel/dist/css/style.css b/kirby/panel/dist/css/style.css old mode 100644 new mode 100755 index 19f38c2..caefa01 --- a/kirby/panel/dist/css/style.css +++ b/kirby/panel/dist/css/style.css @@ -1 +1 @@ -:root{--color-backdrop:rgba(0, 0, 0, .6);--color-black:#000;--color-dark:#313740;--color-light:var(--color-gray-200);--color-white:#fff;--color-gray-100:#f7f7f7;--color-gray-200:#efefef;--color-gray-300:#ddd;--color-gray-400:#ccc;--color-gray-500:#999;--color-gray-600:#777;--color-gray-700:#555;--color-gray-800:#333;--color-gray-900:#111;--color-gray:var(--color-gray-600);--color-red-200:#edc1c1;--color-red-300:#e3a0a0;--color-red-400:#d16464;--color-red-600:#c82829;--color-red:var(--color-red-600);--color-orange-200:#f2d4bf;--color-orange-300:#ebbe9e;--color-orange-400:#de935f;--color-orange-600:#f4861f;--color-orange:var(--color-orange-600);--color-yellow-200:#f9e8c7;--color-yellow-300:#f7e2b8;--color-yellow-400:#f0c674;--color-yellow-600:#cca000;--color-yellow:var(--color-yellow-600);--color-green-200:#dce5c2;--color-green-300:#c6d49d;--color-green-400:#a7bd68;--color-green-600:#5d800d;--color-green:var(--color-green-600);--color-aqua-200:#d0e5e2;--color-aqua-300:#bbd9d5;--color-aqua-400:#8abeb7;--color-aqua-600:#398e93;--color-aqua:var(--color-aqua-600);--color-blue-200:#cbd7e5;--color-blue-300:#b1c2d8;--color-blue-400:#7e9abf;--color-blue-600:#4271ae;--color-blue:var(--color-blue-600);--color-purple-200:#e0d4e4;--color-purple-300:#d4c3d9;--color-purple-400:#b294bb;--color-purple-600:#9c48b9;--color-purple:var(--color-purple-600);--container:80rem;--font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";--font-mono:"SFMono-Regular", Consolas, Liberation Mono, Menlo, Courier, monospace;--font-normal:400;--font-bold:600;--leading-none:1;--leading-tight:1.25;--leading-snug:1.375;--leading-normal:1.5;--leading-relaxed:1.625;--leading-loose:2;--rounded-xs:1px;--rounded-sm:.125rem;--rounded:.25rem;--shadow:0 1px 3px 0 rgba(0, 0, 0, .1), 0 1px 2px 0 rgba(0, 0, 0, .06);--shadow-md:0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -1px rgba(0, 0, 0, .06);--shadow-lg:0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -2px rgba(0, 0, 0, .05);--shadow-xl:0 20px 25px -5px rgba(0, 0, 0, .1), 0 10px 10px -5px rgba(0, 0, 0, .04);--shadow-outline:currentColor 0 0 0 2px;--shadow-inset:inset 0 2px 4px 0 rgba(0, 0, 0, .06);--spacing-0:0;--spacing-px:1px;--spacing-2px:2px;--spacing-1:.25rem;--spacing-2:.5rem;--spacing-3:.75rem;--spacing-4:1rem;--spacing-5:1.25rem;--spacing-6:1.5rem;--spacing-8:2rem;--spacing-10:2.5rem;--spacing-12:3rem;--spacing-16:4rem;--spacing-20:5rem;--spacing-24:6rem;--spacing-36:9rem;--text-xs:.75rem;--text-sm:.875rem;--text-base:1rem;--text-lg:1.125rem;--text-xl:1.25rem;--text-2xl:1.5rem;--text-3xl:1.75rem;--text-4xl:2.5rem;--text-5xl:3rem;--text-6xl:4rem;--color-background:var(--color-light);--color-border:var(--color-gray-400);--color-focus:var(--color-blue-600);--color-focus-light:var(--color-blue-400);--color-focus-outline:rgba(113, 143, 183, .25);--color-negative:var(--color-red-600);--color-negative-light:var(--color-red-400);--color-negative-outline:rgba(212, 110, 110, .25);--color-notice:var(--color-orange-600);--color-notice-light:var(--color-orange-400);--color-positive:var(--color-green-600);--color-positive-light:var(--color-green-400);--color-positive-outline:rgba(128, 149, 65, .25);--color-text:var(--color-gray-900);--color-text-light:var(--color-gray-600);--z-offline:1200;--z-fatal:1100;--z-loader:1000;--z-notification:900;--z-dialog:800;--z-navigation:700;--z-dropdown:600;--z-drawer:500;--z-dropzone:400;--z-toolbar:300;--z-content:200;--z-background:100;--bg-pattern:repeating-conic-gradient( rgba(0, 0, 0, 0) 0% 25%, rgba(0, 0, 0, .2) 0% 50% ) 50% / 20px 20px;--shadow-sticky:rgba(0, 0, 0, .05) 0 2px 5px;--shadow-dropdown:var(--shadow-lg);--shadow-item:var(--shadow);--field-input-padding:.5rem;--field-input-height:2.25rem;--field-input-line-height:1.25rem;--field-input-font-size:var(--text-base);--field-input-color-before:var(--color-gray-700);--field-input-color-after:var(--color-gray-700);--field-input-border:1px solid var(--color-border);--field-input-focus-border:1px solid var(--color-focus);--field-input-focus-outline:2px solid var(--color-focus-outline);--field-input-invalid-border:1px solid var(--color-negative-outline);--field-input-invalid-outline:0;--field-input-invalid-focus-border:1px solid var(--color-negative);--field-input-invalid-focus-outline:2px solid var(--color-negative-outline);--field-input-background:var(--color-white);--field-input-disabled-color:var(--color-gray-500);--field-input-disabled-background:var(--color-white);--field-input-disabled-border:1px solid var(--color-gray-300);--font-family-sans:var(--font-sans);--font-family-mono:var(--font-mono);--font-size-tiny:var(--text-xs);--font-size-small:var(--text-sm);--font-size-medium:var(--text-base);--font-size-large:var(--text-xl);--font-size-huge:var(--text-2xl);--font-size-monster:var(--text-3xl);--box-shadow-dropdown:var(--shadow-dropdown);--box-shadow-item:var(--shadow);--box-shadow-focus:var(--shadow-xl)}*,:after,:before{margin:0;padding:0;box-sizing:border-box}noscript{padding:1.5rem;display:flex;align-items:center;justify-content:center;height:100vh;text-align:center}html{font-family:var(--font-sans);background:var(--color-background)}body,html{color:var(--color-gray-900);height:100%;overflow:hidden}a{color:inherit;text-decoration:none}li{list-style:none}b,strong{font-weight:var(--font-bold)}@keyframes LoadingCursor{to{cursor:progress}}@keyframes Spin{to{transform:rotate(360deg)}}.k-dialog{position:relative;background:var(--color-background);width:100%;box-shadow:var(--shadow-lg);border-radius:var(--rounded-xs);line-height:1;max-height:calc(100vh - 3rem);margin:1.5rem;display:flex;flex-direction:column}@media screen and (min-width:20rem){.k-dialog[data-size=small]{width:20rem}}@media screen and (min-width:22rem){.k-dialog[data-size=default]{width:22rem}}@media screen and (min-width:30rem){.k-dialog[data-size=medium]{width:30rem}}@media screen and (min-width:40rem){.k-dialog[data-size=large]{width:40rem}}.k-dialog-notification{padding:.75rem 1.5rem;background:var(--color-gray-900);width:100%;line-height:1.25rem;color:var(--color-white);display:flex;flex-shrink:0;align-items:center}.k-dialog-notification[data-theme]{background:var(--theme-light);color:var(--color-black)}.k-dialog-notification p{flex-grow:1;word-wrap:break-word;overflow:hidden}[dir=ltr] .k-dialog-notification .k-button{margin-left:1rem}[dir=rtl] .k-dialog-notification .k-button{margin-right:1rem}.k-dialog-notification .k-button{display:flex}.k-dialog-body{padding:1.5rem}.k-dialog-body .k-fieldset{padding-bottom:.5rem}[dir=ltr] .k-dialog-footer,[dir=rtl] .k-dialog-footer{border-bottom-right-radius:var(--rounded-xs);border-bottom-left-radius:var(--rounded-xs)}.k-dialog-footer{padding:0;border-top:1px solid var(--color-gray-300);line-height:1;flex-shrink:0}.k-dialog-footer .k-button-group{display:flex;margin:0;justify-content:space-between}.k-dialog-footer .k-button-group .k-button{padding:.75rem 1rem;line-height:1.25rem}[dir=ltr] .k-dialog-footer .k-button-group .k-button:first-child{text-align:left}[dir=rtl] .k-dialog-footer .k-button-group .k-button:first-child{text-align:right}[dir=ltr] .k-dialog-footer .k-button-group .k-button:first-child{padding-left:1.5rem}[dir=rtl] .k-dialog-footer .k-button-group .k-button:first-child{padding-right:1.5rem}[dir=ltr] .k-dialog-footer .k-button-group .k-button:last-child{text-align:right}[dir=rtl] .k-dialog-footer .k-button-group .k-button:last-child{text-align:left}[dir=ltr] .k-dialog-footer .k-button-group .k-button:last-child{padding-right:1.5rem}[dir=rtl] .k-dialog-footer .k-button-group .k-button:last-child{padding-left:1.5rem}.k-dialog-pagination{margin-bottom:-1.5rem;display:flex;justify-content:center;align-items:center}.k-dialog-search{margin-bottom:.75rem}.k-dialog-search.k-input{background:rgba(0,0,0,.075);padding:0 1rem;height:36px;border-radius:var(--rounded-xs)}.k-error-details{background:var(--color-white);display:block;overflow:auto;padding:1rem;font-size:var(--text-sm);line-height:1.25em;margin-top:.75rem}.k-error-details dt{color:var(--color-negative-light);margin-bottom:.25rem}.k-error-details dd{overflow:hidden;overflow-wrap:break-word;text-overflow:ellipsis}.k-error-details dd:not(:last-of-type){margin-bottom:1.5em}.k-error-details li:not(:last-child){border-bottom:1px solid var(--color-background);padding-bottom:.25rem;margin-bottom:.25rem}.k-files-dialog .k-list-item{cursor:pointer}[dir=ltr] .k-pages-dialog-navbar{padding-right:38px}[dir=rtl] .k-pages-dialog-navbar{padding-left:38px}.k-pages-dialog-navbar{display:flex;align-items:center;justify-content:center;margin-bottom:.5rem}.k-pages-dialog-navbar .k-button{width:38px}.k-pages-dialog-navbar .k-button[disabled]{opacity:0}.k-pages-dialog-navbar .k-headline{flex-grow:1;text-align:center}.k-pages-dialog .k-list-item{cursor:pointer}.k-pages-dialog .k-list-item .k-button[data-theme=disabled],.k-pages-dialog .k-list-item .k-button[disabled]{opacity:.25}.k-pages-dialog .k-list-item .k-button[data-theme=disabled]:hover{opacity:1}.k-users-dialog .k-list-item{cursor:pointer}.k-drawer{--drawer-header-height:2.5rem;--drawer-header-padding:1.5rem;position:fixed;top:0;right:0;bottom:0;left:0;z-index:var(--z-toolbar);display:flex;align-items:stretch;justify-content:flex-end;background:rgba(0,0,0,.2)}.k-drawer-box{position:relative;flex-basis:50rem;display:flex;flex-direction:column;background:var(--color-background);box-shadow:var(--shadow-xl)}[dir=ltr] .k-drawer-header{padding-left:var(--drawer-header-padding)}[dir=rtl] .k-drawer-header{padding-right:var(--drawer-header-padding)}.k-drawer-header{flex-shrink:0;height:var(--drawer-header-height);display:flex;align-items:center;line-height:1;justify-content:space-between;background:var(--color-white);font-size:var(--text-sm)}.k-drawer-title{padding:0 .75rem}[dir=ltr] .k-drawer-breadcrumb,[dir=ltr] .k-drawer-title{margin-left:-.75rem}[dir=rtl] .k-drawer-breadcrumb,[dir=rtl] .k-drawer-title{margin-right:-.75rem}.k-drawer-breadcrumb,.k-drawer-title{display:flex;flex-grow:1;align-items:center;min-width:0;font-size:var(--text-sm);font-weight:var(--font-normal)}[dir=ltr] .k-drawer-breadcrumb li:not(:last-child) .k-button:after{right:-.75rem}[dir=rtl] .k-drawer-breadcrumb li:not(:last-child) .k-button:after{left:-.75rem}.k-drawer-breadcrumb li:not(:last-child) .k-button:after{position:absolute;width:1.5rem;display:inline-flex;justify-content:center;align-items:center;content:"\203a";color:var(--color-gray-500);height:var(--drawer-header-height)}[dir=ltr] .k-drawer-breadcrumb .k-icon,[dir=ltr] .k-drawer-title .k-icon{margin-right:.5rem}[dir=rtl] .k-drawer-breadcrumb .k-icon,[dir=rtl] .k-drawer-title .k-icon{margin-left:.5rem}.k-drawer-breadcrumb .k-icon,.k-drawer-title .k-icon{width:1rem;color:var(--color-gray-500)}.k-drawer-breadcrumb .k-button{display:inline-flex;align-items:center;height:var(--drawer-header-height);padding-left:.75rem;padding-right:.75rem}.k-drawer-breadcrumb .k-button-text{opacity:1}[dir=ltr] .k-drawer-breadcrumb .k-button .k-button-icon~.k-button-text{padding-left:0}[dir=rtl] .k-drawer-breadcrumb .k-button .k-button-icon~.k-button-text{padding-right:0}[dir=ltr] .k-drawer-tabs{margin-right:.75rem}[dir=rtl] .k-drawer-tabs{margin-left:.75rem}.k-drawer-tabs{display:flex;align-items:center;line-height:1}.k-drawer-tab.k-button{height:var(--drawer-header-height);padding-left:.75rem;padding-right:.75rem;display:flex;align-items:center;font-size:var(--text-xs)}.k-drawer-tab.k-button[aria-current]:after{position:absolute;bottom:-1px;left:.75rem;right:.75rem;content:"";background:var(--color-black);height:2px}[dir=ltr] .k-drawer-options{padding-right:.75rem}[dir=rtl] .k-drawer-options{padding-left:.75rem}.k-drawer-option.k-button{width:var(--drawer-header-height);height:var(--drawer-header-height);color:var(--color-gray-500);line-height:1}.k-drawer-option.k-button:focus,.k-drawer-option.k-button:hover{color:var(--color-black)}.k-drawer-body{padding:1.5rem;flex-grow:1;background:var(--color-background)}.k-drawer[data-nested=true]{background:0 0}.k-calendar-input{--cell-padding:.25rem .5rem;padding:.5rem;background:var(--color-gray-900);color:var(--color-light);border-radius:var(--rounded-xs)}.k-calendar-table{table-layout:fixed;width:100%;min-width:15rem;padding-top:.5rem}.k-calendar-input>nav{display:flex;direction:ltr}.k-calendar-input>nav .k-button{padding:.5rem}.k-calendar-selects{flex-grow:1;display:flex;align-items:center;justify-content:center}[dir=ltr] .k-calendar-selects{direction:ltr}[dir=rtl] .k-calendar-selects{direction:rtl}.k-calendar-selects .k-select-input{padding:0 .5rem;font-weight:var(--font-normal);font-size:var(--text-sm)}.k-calendar-selects .k-select-input:focus-within{color:var(--color-focus-light)!important}.k-calendar-input th{padding:.5rem 0;color:var(--color-gray-500);font-size:var(--text-xs);font-weight:400;text-align:center}.k-calendar-day .k-button{width:2rem;height:2rem;margin-left:auto;margin-right:auto;color:var(--color-white);line-height:1.75rem;display:flex;justify-content:center;border-radius:50%;border:2px solid transparent}.k-calendar-day .k-button .k-button-text{opacity:1}.k-calendar-table .k-button:hover{color:var(--color-white)}.k-calendar-day:hover .k-button:not([data-disabled=true]){border-color:#ffffff40}.k-calendar-day[aria-current=date] .k-button{text-decoration:underline}.k-calendar-day[aria-selected=date] .k-button{border-color:currentColor;font-weight:600;color:var(--color-focus-light)}.k-calendar-today{text-align:center;padding-top:.5rem}.k-calendar-today .k-button{font-size:var(--text-xs);padding:1rem;text-decoration:underline}.k-calendar-today .k-button-text{opacity:1;vertical-align:baseline}.k-counter{font-size:var(--text-xs);color:var(--color-gray-900);font-weight:var(--font-bold)}.k-counter[data-invalid=true]{box-shadow:none;border:0;color:var(--color-negative)}[dir=ltr] .k-counter-rules{padding-left:.5rem}[dir=rtl] .k-counter-rules{padding-right:.5rem}.k-counter-rules{color:var(--color-gray-600);font-weight:var(--font-normal)}.k-form-submitter{display:none}.k-form-buttons[data-theme]{background:var(--theme-light)}.k-form-buttons .k-view{display:flex;justify-content:space-between;align-items:center}.k-form-button.k-button{font-weight:500;white-space:nowrap;line-height:1;height:2.5rem;display:flex;padding:0 1rem;align-items:center}[dir=ltr] .k-form-button:first-child{margin-left:-1rem}[dir=rtl] .k-form-button:first-child{margin-right:-1rem}[dir=ltr] .k-form-button:last-child{margin-right:-1rem}[dir=rtl] .k-form-button:last-child{margin-left:-1rem}[dir=ltr] .k-form-lock-info{margin-right:3rem}[dir=rtl] .k-form-lock-info{margin-left:3rem}.k-form-lock-info{display:flex;font-size:var(--text-sm);align-items:center;line-height:1.5em;padding:.625rem 0}[dir=ltr] .k-form-lock-info>.k-icon{margin-right:.5rem}[dir=rtl] .k-form-lock-info>.k-icon{margin-left:.5rem}.k-form-lock-buttons{display:flex;flex-shrink:0}.k-form-lock-loader{animation:Spin 4s linear infinite}.k-form-lock-loader .k-icon-loader{display:flex}.k-form-indicator-toggle{color:var(--color-notice-light)}.k-form-indicator-info{font-size:var(--text-sm);font-weight:var(--font-bold);padding:.75rem 1rem .25rem;line-height:1.25em;width:15rem}.k-field-label{font-weight:var(--font-bold);display:block;padding:0 0 .75rem;flex-grow:1;line-height:1.25rem}[dir=ltr] .k-field-label abbr{padding-left:.25rem}[dir=rtl] .k-field-label abbr{padding-right:.25rem}.k-field-label abbr{text-decoration:none;color:var(--color-gray-500)}.k-field-header{position:relative;display:flex;align-items:baseline}[dir=ltr] .k-field-options{right:0}[dir=rtl] .k-field-options{left:0}.k-field-options{position:absolute;top:calc(-.5rem - 1px)}.k-field-options.k-button-group .k-dropdown{height:auto}.k-field-options.k-button-group .k-field-options-button.k-button{padding:.75rem;display:flex}.k-field[data-disabled=true]{cursor:not-allowed}.k-field[data-disabled=true] *{pointer-events:none}.k-field[data-disabled=true] .k-text[data-theme=help] *{pointer-events:initial}.k-field-counter{display:none}.k-field:focus-within>.k-field-header>.k-field-counter{display:block}.k-field-help{padding-top:.5rem}.k-fieldset{border:0}.k-fieldset .k-grid{grid-row-gap:2.25rem}@media screen and (min-width:30em){.k-fieldset .k-grid{grid-column-gap:1.5rem}}.k-sections>.k-column[data-width="1/3"] .k-fieldset .k-grid,.k-sections>.k-column[data-width="1/4"] .k-fieldset .k-grid{grid-template-columns:repeat(1,1fr)}.k-sections>.k-column[data-width="1/3"] .k-fieldset .k-grid .k-column,.k-sections>.k-column[data-width="1/4"] .k-fieldset .k-grid .k-column{grid-column-start:initial}.k-input{display:flex;align-items:center;line-height:1;border:0;outline:0;background:0 0}.k-input-element{flex-grow:1}.k-input-icon{display:flex;justify-content:center;align-items:center;line-height:0}.k-input[data-disabled=true]{pointer-events:none}[data-disabled=true] .k-input-icon{color:var(--color-gray-600)}.k-input[data-theme=field]{line-height:1;border:var(--field-input-border);background:var(--field-input-background)}.k-input[data-theme=field]:focus-within{border:var(--field-input-focus-border);box-shadow:var(--color-focus-outline) 0 0 0 2px}.k-input[data-theme=field][data-disabled=true]{background:var(--color-background)}.k-input[data-theme=field] .k-input-icon{width:var(--field-input-height);align-self:stretch;display:flex;align-items:center;flex-shrink:0}.k-input[data-theme=field] .k-input-after,.k-input[data-theme=field] .k-input-before{align-self:stretch;display:flex;align-items:center;flex-shrink:0;padding:0 var(--field-input-padding)}[dir=ltr] .k-input[data-theme=field] .k-input-before{padding-right:0}[dir=ltr] .k-input[data-theme=field] .k-input-after,[dir=rtl] .k-input[data-theme=field] .k-input-before{padding-left:0}.k-input[data-theme=field] .k-input-before{color:var(--field-input-color-before)}[dir=rtl] .k-input[data-theme=field] .k-input-after{padding-right:0}.k-input[data-theme=field] .k-input-after{color:var(--field-input-color-after)}.k-input[data-theme=field] .k-input-icon>.k-dropdown{width:100%;height:100%}.k-input[data-theme=field] .k-input-icon-button{width:100%;height:100%;display:flex;align-items:center;justify-content:center;flex-shrink:0}.k-input[data-theme=field] .k-number-input,.k-input[data-theme=field] .k-select-input,.k-input[data-theme=field] .k-text-input{padding:var(--field-input-padding);line-height:var(--field-input-line-height)}.k-input[data-theme=field] .k-date-input .k-select-input,.k-input[data-theme=field] .k-time-input .k-select-input{padding-left:0;padding-right:0}[dir=ltr] .k-input[data-theme=field] .k-date-input .k-select-input:first-child,[dir=ltr] .k-input[data-theme=field] .k-time-input .k-select-input:first-child{padding-left:var(--field-input-padding)}[dir=rtl] .k-input[data-theme=field] .k-date-input .k-select-input:first-child,[dir=rtl] .k-input[data-theme=field] .k-time-input .k-select-input:first-child{padding-right:var(--field-input-padding)}.k-input[data-theme=field] .k-date-input .k-select-input:focus-within,.k-input[data-theme=field] .k-time-input .k-select-input:focus-within{color:var(--color-focus);font-weight:var(--font-bold)}[dir=ltr] .k-input[data-theme=field].k-time-input .k-time-input-meridiem{padding-left:var(--field-input-padding)}[dir=rtl] .k-input[data-theme=field].k-time-input .k-time-input-meridiem{padding-right:var(--field-input-padding)}.k-input[data-theme=field][data-type=checkboxes] .k-checkboxes-input li,.k-input[data-theme=field][data-type=checkboxes] .k-radio-input li,.k-input[data-theme=field][data-type=radio] .k-checkboxes-input li,.k-input[data-theme=field][data-type=radio] .k-radio-input li{min-width:0;overflow-wrap:break-word}[dir=ltr] .k-input[data-theme=field][data-type=checkboxes] .k-input-before{border-right:1px solid var(--color-background)}[dir=ltr] .k-input[data-theme=field][data-type=checkboxes] .k-input-element+.k-input-after,[dir=ltr] .k-input[data-theme=field][data-type=checkboxes] .k-input-element+.k-input-icon,[dir=rtl] .k-input[data-theme=field][data-type=checkboxes] .k-input-before{border-left:1px solid var(--color-background)}[dir=ltr] .k-input[data-theme=field][data-type=checkboxes] .k-checkboxes-input li,[dir=rtl] .k-input[data-theme=field][data-type=checkboxes] .k-input-element+.k-input-after,[dir=rtl] .k-input[data-theme=field][data-type=checkboxes] .k-input-element+.k-input-icon{border-right:1px solid var(--color-background)}.k-input[data-theme=field][data-type=checkboxes] .k-input-element{overflow:hidden}[dir=ltr] .k-input[data-theme=field][data-type=checkboxes] .k-checkboxes-input{margin-right:-1px}[dir=rtl] .k-input[data-theme=field][data-type=checkboxes] .k-checkboxes-input{margin-left:-1px}.k-input[data-theme=field][data-type=checkboxes] .k-checkboxes-input{display:grid;grid-template-columns:1fr;margin-bottom:-1px}@media screen and (min-width:65em){.k-input[data-theme=field][data-type=checkboxes] .k-checkboxes-input{grid-template-columns:repeat(var(--columns),1fr)}}[dir=rtl] .k-input[data-theme=field][data-type=checkboxes] .k-checkboxes-input li{border-left:1px solid var(--color-background)}.k-input[data-theme=field][data-type=checkboxes] .k-checkboxes-input li,.k-input[data-theme=field][data-type=radio] .k-radio-input li{border-bottom:1px solid var(--color-background)}.k-input[data-theme=field][data-type=checkboxes] .k-checkboxes-input label{display:block;line-height:var(--field-input-line-height);padding:var(--field-input-padding) var(--field-input-padding)}[dir=ltr] .k-input[data-theme=field][data-type=checkboxes] .k-checkbox-input-icon,[dir=ltr] .k-input[data-theme=field][data-type=radio] .k-radio-input label:before{left:var(--field-input-padding)}[dir=rtl] .k-input[data-theme=field][data-type=checkboxes] .k-checkbox-input-icon,[dir=rtl] .k-input[data-theme=field][data-type=radio] .k-radio-input label:before{right:var(--field-input-padding)}.k-input[data-theme=field][data-type=checkboxes] .k-checkbox-input-icon{top:calc((var(--field-input-height) - var(--field-input-font-size))/2);margin-top:0}[dir=ltr] .k-input[data-theme=field][data-type=radio] .k-input-before{border-right:1px solid var(--color-background)}[dir=ltr] .k-input[data-theme=field][data-type=radio] .k-input-element+.k-input-after,[dir=ltr] .k-input[data-theme=field][data-type=radio] .k-input-element+.k-input-icon,[dir=rtl] .k-input[data-theme=field][data-type=radio] .k-input-before{border-left:1px solid var(--color-background)}[dir=ltr] .k-input[data-theme=field][data-type=radio] .k-radio-input li,[dir=rtl] .k-input[data-theme=field][data-type=radio] .k-input-element+.k-input-after,[dir=rtl] .k-input[data-theme=field][data-type=radio] .k-input-element+.k-input-icon{border-right:1px solid var(--color-background)}.k-input[data-theme=field][data-type=radio] .k-input-element{overflow:hidden}[dir=ltr] .k-input[data-theme=field][data-type=radio] .k-radio-input{margin-right:-1px}[dir=rtl] .k-input[data-theme=field][data-type=radio] .k-radio-input{margin-left:-1px}.k-input[data-theme=field][data-type=radio] .k-radio-input{display:grid;grid-template-columns:1fr;margin-bottom:-1px}@media screen and (min-width:65em){.k-input[data-theme=field][data-type=radio] .k-radio-input{grid-template-columns:repeat(var(--columns),1fr)}}[dir=rtl] .k-input[data-theme=field][data-type=radio] .k-radio-input li{border-left:1px solid var(--color-background)}.k-input[data-theme=field][data-type=radio] .k-radio-input label{display:block;flex-grow:1;min-height:var(--field-input-height);line-height:var(--field-input-line-height);padding:calc((var(--field-input-height) - var(--field-input-line-height))/2) var(--field-input-padding)}.k-input[data-theme=field][data-type=radio] .k-radio-input label:before{top:calc((var(--field-input-height) - 1rem)/2);margin-top:-1px}.k-input[data-theme=field][data-type=radio] .k-radio-input .k-radio-input-info{display:block;font-size:var(--text-sm);color:var(--color-gray-600);line-height:var(--field-input-line-height);padding-top:calc(var(--field-input-line-height)/10)}.k-input[data-theme=field][data-type=radio] .k-radio-input .k-icon{width:var(--field-input-height);height:var(--field-input-height);display:flex;align-items:center;justify-content:center}.k-input[data-theme=field][data-type=range] .k-range-input{padding:var(--field-input-padding)}.k-input[data-theme=field][data-type=multiselect],.k-input[data-theme=field][data-type=select]{position:relative}[dir=ltr] .k-input[data-theme=field][data-type=select] .k-input-icon{right:0}[dir=rtl] .k-input[data-theme=field][data-type=select] .k-input-icon{left:0}.k-input[data-theme=field][data-type=select] .k-input-icon{position:absolute;top:0;bottom:0}.k-input[data-theme=field][data-type=tags] .k-tags-input{padding:.25rem .25rem 0}[dir=ltr] .k-input[data-theme=field][data-type=tags] .k-tag{margin-right:.25rem}[dir=rtl] .k-input[data-theme=field][data-type=tags] .k-tag{margin-left:.25rem}.k-input[data-theme=field][data-type=tags] .k-tag{margin-bottom:.25rem;height:auto;min-height:1.75rem;font-size:var(--text-sm)}.k-input[data-theme=field][data-type=tags] .k-tags-input input{font-size:var(--text-sm);padding:0 .25rem;height:1.75rem;line-height:1;margin-bottom:.25rem}.k-input[data-theme=field][data-type=tags] .k-tags-input .k-dropdown-content{top:calc(100% + .5rem + 2px)}.k-input[data-theme=field][data-type=tags] .k-tags-input .k-dropdown-content[data-dropup]{top:calc(100% + .5rem + 2px);bottom:initial;margin-bottom:initial}.k-input[data-theme=field][data-type=multiselect] .k-multiselect-input{padding:.25rem 2rem 0 .25rem;min-height:2.25rem}[dir=ltr] .k-input[data-theme=field][data-type=multiselect] .k-tag{margin-right:.25rem}[dir=rtl] .k-input[data-theme=field][data-type=multiselect] .k-tag{margin-left:.25rem}.k-input[data-theme=field][data-type=multiselect] .k-tag{margin-bottom:.25rem;height:1.75rem;font-size:var(--text-sm)}[dir=ltr] .k-input[data-theme=field][data-type=multiselect] .k-input-icon{right:0}[dir=rtl] .k-input[data-theme=field][data-type=multiselect] .k-input-icon{left:0}.k-input[data-theme=field][data-type=multiselect] .k-input-icon{position:absolute;top:0;bottom:0;pointer-events:none}.k-input[data-theme=field][data-type=textarea] .k-textarea-input-native{padding:.25rem var(--field-input-padding);line-height:1.5rem}[dir=ltr] .k-input[data-theme=field][data-type=toggle] .k-input-before{padding-right:calc(var(--field-input-padding)/2)}[dir=rtl] .k-input[data-theme=field][data-type=toggle] .k-input-before{padding-left:calc(var(--field-input-padding)/2)}[dir=ltr] .k-input[data-theme=field][data-type=toggle] .k-toggle-input{padding-left:var(--field-input-padding)}[dir=rtl] .k-input[data-theme=field][data-type=toggle] .k-toggle-input{padding-right:var(--field-input-padding)}.k-input[data-theme=field][data-type=toggle] .k-toggle-input-label{padding:0 var(--field-input-padding)0 .75rem;line-height:var(--field-input-height)}.k-login-code-form .k-user-info{height:38px;margin-bottom:2.25rem;padding:.5rem;background:var(--color-white);border-radius:var(--rounded-xs);box-shadow:var(--shadow)}.k-times{padding:var(--spacing-4) var(--spacing-6);display:grid;line-height:1;grid-template-columns:1fr 1fr;grid-gap:var(--spacing-6)}.k-times .k-icon{width:1rem;margin-bottom:var(--spacing-2)}.k-times-slot .k-button{padding:var(--spacing-1) var(--spacing-3) var(--spacing-1)0;font-variant-numeric:tabular-nums;white-space:nowrap}.k-times .k-times-slot hr{position:relative;opacity:1;margin:var(--spacing-2)0;border:0;height:1px;top:1px;background:var(--color-dark)}[dir=ltr] .k-upload input{left:-3000px}[dir=rtl] .k-upload input{right:-3000px}.k-upload input{position:absolute;top:0}.k-upload-dialog .k-headline{margin-bottom:.75rem}.k-upload-error-list,.k-upload-list{line-height:1.5em;font-size:var(--text-sm)}.k-upload-list-filename{color:var(--color-gray-600)}.k-upload-error-list li{padding:.75rem;background:var(--color-white);border-radius:var(--rounded-xs)}.k-upload-error-list li:not(:last-child){margin-bottom:2px}.k-upload-error-filename{color:var(--color-negative);font-weight:var(--font-bold)}.k-upload-error-message{color:var(--color-gray-600)}.k-writer-toolbar{position:absolute;display:flex;background:var(--color-black);height:30px;transform:translate(-50%) translateY(-.75rem);z-index:calc(var(--z-dropdown) + 1);box-shadow:var(--shadow);color:var(--color-white);border-radius:var(--rounded)}.k-writer-toolbar-button.k-button{display:flex;align-items:center;justify-content:center;height:30px;width:30px;font-size:var(--text-sm)!important;color:currentColor;line-height:1}.k-writer-toolbar-button.k-button:hover{background:rgba(255,255,255,.15)}.k-writer-toolbar-button.k-writer-toolbar-button-active{color:var(--color-blue-300)}.k-writer-toolbar-button.k-writer-toolbar-nodes{width:auto;padding:0 .75rem}[dir=ltr] .k-writer-toolbar .k-dropdown+.k-writer-toolbar-button{border-left:1px solid var(--color-gray-700)}[dir=rtl] .k-writer-toolbar .k-dropdown+.k-writer-toolbar-button{border-right:1px solid var(--color-gray-700)}[dir=ltr] .k-writer-toolbar-button.k-writer-toolbar-nodes:after{margin-left:.5rem}[dir=rtl] .k-writer-toolbar-button.k-writer-toolbar-nodes:after{margin-right:.5rem}.k-writer-toolbar-button.k-writer-toolbar-nodes:after{content:"";border-top:4px solid var(--color-white);border-left:4px solid transparent;border-right:4px solid transparent}.k-writer-toolbar .k-dropdown-content{color:var(--color-black);background:var(--color-white);margin-top:.5rem}.k-writer-toolbar .k-dropdown-content .k-dropdown-item[aria-current]{color:var(--color-focus);font-weight:500}.k-writer{position:relative;width:100%;grid-template-areas:"content";display:grid}.k-writer .ProseMirror{overflow-wrap:break-word;word-wrap:break-word;word-break:break-word;white-space:pre-wrap;font-variant-ligatures:none;line-height:inherit;grid-area:content}.k-writer .ProseMirror:focus{outline:0}.k-writer .ProseMirror *{caret-color:currentColor}.k-writer .ProseMirror a{color:var(--color-focus);text-decoration:underline}.k-writer .ProseMirror>:last-child{margin-bottom:0}.k-writer .ProseMirror h1,.k-writer .ProseMirror h2,.k-writer .ProseMirror h3,.k-writer .ProseMirror ol,.k-writer .ProseMirror p,.k-writer .ProseMirror ul{margin-bottom:.75rem}.k-writer .ProseMirror h1{font-size:var(--text-3xl);line-height:1.25em}.k-writer .ProseMirror h2{font-size:var(--text-2xl);line-height:1.25em}.k-writer .ProseMirror h3{font-size:var(--text-xl);line-height:1.25em}.k-writer .ProseMirror h1 strong,.k-writer .ProseMirror h2 strong,.k-writer .ProseMirror h3 strong{font-weight:700}.k-writer .ProseMirror strong{font-weight:600}.k-writer .ProseMirror code{position:relative;font-size:.925em;display:inline-block;line-height:1.325;padding:.05em .325em;background:var(--color-gray-300);border-radius:var(--rounded)}[dir=ltr] .k-writer .ProseMirror ol,[dir=ltr] .k-writer .ProseMirror ul{padding-left:1.75rem}[dir=rtl] .k-writer .ProseMirror ol,[dir=rtl] .k-writer .ProseMirror ul{padding-right:1.75rem}.k-writer .ProseMirror ul>li{list-style:disc}.k-writer .ProseMirror ul ul>li{list-style:circle}.k-writer .ProseMirror ul ul ul>li{list-style:square}.k-writer .ProseMirror ol>li{list-style:decimal}.k-writer .ProseMirror li>ol,.k-writer .ProseMirror li>p,.k-writer .ProseMirror li>ul{margin:0}.k-writer-code pre{-moz-tab-size:2;-o-tab-size:2;tab-size:2;font-size:var(--text-sm);line-height:2em;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;white-space:pre}.k-writer .ProseMirror code,.k-writer-code code{font-family:var(--font-mono)}.k-writer[data-placeholder][data-empty=true]:before{grid-area:content;content:attr(data-placeholder);line-height:inherit;color:var(--color-gray-500);pointer-events:none;white-space:pre-wrap;word-wrap:break-word}.k-login-alert{padding:.5rem .75rem;display:flex;justify-content:space-between;align-items:center;min-height:38px;margin-bottom:2rem;background:var(--color-negative);color:var(--color-white);font-size:var(--text-sm);border-radius:var(--rounded-xs);box-shadow:var(--shadow-lg);cursor:pointer}.k-checkbox-input{position:relative;cursor:pointer}.k-checkbox-input-native{position:absolute;-webkit-appearance:none;-moz-appearance:none;appearance:none;width:0;height:0;opacity:0}[dir=ltr] .k-checkbox-input-label{padding-left:1.75rem}[dir=rtl] .k-checkbox-input-label{padding-right:1.75rem}.k-checkbox-input-label{display:block}[dir=ltr] .k-checkbox-input-icon{left:0}[dir=rtl] .k-checkbox-input-icon{right:0}.k-checkbox-input-icon{position:absolute;width:1rem;height:1rem;border:2px solid var(--color-gray-500)}.k-checkbox-input-icon svg{position:absolute;width:12px;height:12px;display:none}.k-checkbox-input-icon path{stroke:var(--color-white)}.k-checkbox-input-native:checked+.k-checkbox-input-icon{border-color:var(--color-gray-900);background:var(--color-gray-900)}[data-disabled=true] .k-checkbox-input-native:checked+.k-checkbox-input-icon{border-color:var(--color-gray-600);background:var(--color-gray-600)}.k-checkbox-input-native:checked+.k-checkbox-input-icon svg{display:block}.k-checkbox-input-native:focus+.k-checkbox-input-icon{border-color:var(--color-blue-600)}.k-checkbox-input-native:focus:checked+.k-checkbox-input-icon{background:var(--color-focus)}.k-text-input{width:100%;border:0;background:0 0;font:inherit;color:inherit;font-variant-numeric:tabular-nums}.k-text-input::-moz-placeholder{color:var(--color-gray-500)}.k-text-input::placeholder{color:var(--color-gray-500)}.k-text-input:focus{outline:0}.k-text-input:invalid{box-shadow:none;outline:0}.k-list-input .ProseMirror{line-height:1.5em}.k-list-input .ProseMirror ol>li::marker{font-size:var(--text-sm);color:var(--color-gray-500)}.k-multiselect-input{display:flex;flex-wrap:wrap;position:relative;font-size:var(--text-sm);min-height:2.25rem;line-height:1}.k-multiselect-input .k-sortable-ghost{background:var(--color-focus)}.k-multiselect-input .k-dropdown-content,.k-multiselect-input[data-layout=list] .k-tag{width:100%}.k-multiselect-search{margin-top:0!important;color:var(--color-white);background:var(--color-gray-900);border-bottom:1px dashed rgba(255,255,255,.2)}.k-multiselect-search>.k-button-text{flex:1;opacity:1!important}.k-multiselect-search input{width:100%;color:var(--color-white);background:0 0;border:0;outline:0;padding:.25rem 0;font:inherit}.k-multiselect-options{position:relative;max-height:275px;padding:.5rem 0}.k-multiselect-option{position:relative}.k-multiselect-option.selected{color:var(--color-positive-light)}.k-multiselect-option.disabled:not(.selected) .k-icon{opacity:0}.k-multiselect-option b{color:var(--color-focus-light);font-weight:700}[dir=ltr] .k-multiselect-value{margin-left:.25rem}[dir=rtl] .k-multiselect-value{margin-right:.25rem}.k-multiselect-value{color:var(--color-gray-500)}.k-multiselect-value:before{content:" ("}.k-multiselect-value:after{content:")"}[dir=ltr] .k-multiselect-input[data-layout=list] .k-tag{margin-right:0!important}[dir=rtl] .k-multiselect-input[data-layout=list] .k-tag{margin-left:0!important}.k-multiselect-more{width:100%;padding:.75rem;color:#fffc;text-align:center;border-top:1px dashed rgba(255,255,255,.2)}.k-multiselect-more:hover{color:var(--color-white)}.k-number-input{width:100%;border:0;background:0 0;font:inherit;color:inherit}.k-number-input::-moz-placeholder{color:var(--color-gray-500)}.k-number-input::placeholder{color:var(--color-gray-500)}.k-number-input:focus{outline:0}.k-number-input:invalid{box-shadow:none;outline:0}[dir=ltr] .k-radio-input li{padding-left:1.75rem}[dir=rtl] .k-radio-input li{padding-right:1.75rem}.k-radio-input li{position:relative;line-height:1.5rem}.k-radio-input input{position:absolute;width:0;height:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;opacity:0}.k-radio-input label{cursor:pointer;align-items:center}[dir=ltr] .k-radio-input label:before{left:0}[dir=rtl] .k-radio-input label:before{right:0}.k-radio-input label:before{position:absolute;top:.175em;content:"";width:1rem;height:1rem;border-radius:50%;border:2px solid var(--color-gray-500);box-shadow:var(--color-white) 0 0 0 2px inset}.k-radio-input input:checked+label:before{border-color:var(--color-gray-900);background:var(--color-gray-900)}[data-disabled=true] .k-radio-input input:checked+label:before{border-color:var(--color-gray-600);background:var(--color-gray-600)}.k-radio-input input:focus+label:before{border-color:var(--color-blue-600)}.k-radio-input input:focus:checked+label:before{background:var(--color-focus)}.k-radio-input-text{display:block}.k-range-input{--range-thumb-size:16px;--range-thumb-border:4px solid var(--color-gray-900);--range-thumb-border-disabled:4px solid var(--color-gray-600);--range-thumb-background:var(--color-background);--range-thumb-focus-border:4px solid var(--color-focus);--range-thumb-focus-background:var(--color-background);--range-track-height:4px;--range-track-background:var(--color-border);--range-track-color:var(--color-gray-900);--range-track-color-disabled:var(--color-gray-600);--range-track-focus-color:var(--color-focus);display:flex;align-items:center}.k-range-input-native{--min:0;--max:100;--value:0;--range:calc(var(--max) - var(--min));--ratio:calc((var(--value) - var(--min)) / var(--range));--position:calc( .5 * var(--range-thumb-size) + var(--ratio) * calc(100% - var(--range-thumb-size)) );-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;height:var(--range-thumb-size);background:0 0;font-size:var(--text-sm);line-height:1}.k-range-input-native::-webkit-slider-thumb{-webkit-appearance:none;appearance:none}.k-range-input-native::-webkit-slider-runnable-track{border:0;border-radius:var(--range-track-height);width:100%;height:var(--range-track-height);background:var(--range-track-background)}.k-range-input-native::-moz-range-track{border:0;border-radius:var(--range-track-height);width:100%;height:var(--range-track-height);background:var(--range-track-background)}.k-range-input-native::-ms-track{border:0;border-radius:var(--range-track-height);width:100%;height:var(--range-track-height);background:var(--range-track-background)}.k-range-input-native::-webkit-slider-runnable-track{background:linear-gradient(var(--range-track-color),var(--range-track-color))0/var(--position) 100%no-repeat var(--range-track-background)}.k-range-input-native::-moz-range-progress{height:var(--range-track-height);background:var(--range-track-color)}.k-range-input-native::-ms-fill-lower{height:var(--range-track-height);background:var(--range-track-color)}.k-range-input-native::-webkit-slider-thumb{margin-top:calc(.5*(var(--range-track-height) - var(--range-thumb-size)));box-sizing:border-box;width:var(--range-thumb-size);height:var(--range-thumb-size);background:var(--range-thumb-background);border:var(--range-thumb-border);border-radius:50%;cursor:pointer}.k-range-input-native::-moz-range-thumb{box-sizing:border-box;width:var(--range-thumb-size);height:var(--range-thumb-size);background:var(--range-thumb-background);border:var(--range-thumb-border);border-radius:50%;cursor:pointer}.k-range-input-native::-ms-thumb{box-sizing:border-box;width:var(--range-thumb-size);height:var(--range-thumb-size);background:var(--range-thumb-background);border:var(--range-thumb-border);border-radius:50%;cursor:pointer;margin-top:0}.k-range-input-native::-ms-tooltip{display:none}.k-range-input-native:focus{outline:0}.k-range-input-native:focus::-webkit-slider-runnable-track{border:0;border-radius:var(--range-track-height);width:100%;height:var(--range-track-height);background:var(--range-track-background);background:linear-gradient(var(--range-track-focus-color),var(--range-track-focus-color))0/var(--position) 100%no-repeat var(--range-track-background)}.k-range-input-native:focus::-moz-range-progress{height:var(--range-track-height);background:var(--range-track-focus-color)}.k-range-input-native:focus::-ms-fill-lower{height:var(--range-track-height);background:var(--range-track-focus-color)}.k-range-input-native:focus::-webkit-slider-thumb{background:var(--range-thumb-focus-background);border:var(--range-thumb-focus-border)}.k-range-input-native:focus::-moz-range-thumb{background:var(--range-thumb-focus-background);border:var(--range-thumb-focus-border)}.k-range-input-native:focus::-ms-thumb{background:var(--range-thumb-focus-background);border:var(--range-thumb-focus-border)}[dir=ltr] .k-range-input-tooltip{margin-left:1rem}[dir=rtl] .k-range-input-tooltip{margin-right:1rem}.k-range-input-tooltip{position:relative;max-width:20%;display:flex;align-items:center;color:var(--color-white);font-size:var(--text-xs);line-height:1;text-align:center;border-radius:var(--rounded-xs);background:var(--color-gray-900);padding:0 .25rem;white-space:nowrap}[dir=ltr] .k-range-input-tooltip:after{left:-5px}[dir=rtl] .k-range-input-tooltip:after{right:-5px}[dir=ltr] .k-range-input-tooltip:after{border-right:5px solid var(--color-gray-900)}[dir=rtl] .k-range-input-tooltip:after{border-left:5px solid var(--color-gray-900)}.k-range-input-tooltip:after{position:absolute;top:50%;width:0;height:0;transform:translateY(-50%);border-top:5px solid transparent;border-bottom:5px solid transparent;content:""}.k-range-input-tooltip>*{padding:4px}[data-disabled=true] .k-range-input-native::-webkit-slider-runnable-track{background:linear-gradient(var(--range-track-color-disabled),var(--range-track-color-disabled))0/var(--position) 100%no-repeat var(--range-track-background)}[data-disabled=true] .k-range-input-native::-moz-range-progress{height:var(--range-track-height);background:var(--range-track-color-disabled)}[data-disabled=true] .k-range-input-native::-ms-fill-lower{height:var(--range-track-height);background:var(--range-track-color-disabled)}[data-disabled=true] .k-range-input-native::-webkit-slider-thumb{border:var(--range-thumb-border-disabled)}[data-disabled=true] .k-range-input-native::-moz-range-thumb{border:var(--range-thumb-border-disabled)}[data-disabled=true] .k-range-input-native::-ms-thumb{border:var(--range-thumb-border-disabled)}[data-disabled=true] .k-range-input-tooltip{background:var(--color-gray-600)}[dir=ltr] [data-disabled=true] .k-range-input-tooltip:after{border-right:5px solid var(--color-gray-600)}[dir=rtl] [data-disabled=true] .k-range-input-tooltip:after{border-left:5px solid var(--color-gray-600)}.k-select-input{position:relative;display:block;cursor:pointer;overflow:hidden}.k-select-input-native{position:absolute;top:0;right:0;bottom:0;left:0;opacity:0;width:100%;font:inherit;z-index:1;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-weight:var(--font-normal)}.k-select-input-native[disabled]{cursor:default}.k-tags-input{display:flex;flex-wrap:wrap}.k-tags-input .k-sortable-ghost{background:var(--color-focus)}.k-tags-input-element{flex-grow:1;flex-basis:0;min-width:0}.k-tags-input:focus-within .k-tags-input-element{flex-basis:4rem}.k-tags-input-element input{font:inherit;border:0;width:100%;background:0 0}.k-tags-input-element input:focus{outline:0}[dir=ltr] .k-tags-input[data-layout=list] .k-tag{margin-right:0!important}[dir=rtl] .k-tags-input[data-layout=list] .k-tag{margin-left:0!important}.k-tags-input[data-layout=list] .k-tag{width:100%}.k-textarea-input[data-size=small]{--size:7.5rem}.k-textarea-input[data-size=medium]{--size:15rem}.k-textarea-input[data-size=large]{--size:30rem}.k-textarea-input[data-size=huge]{--size:45rem}.k-textarea-input-wrapper{position:relative}.k-textarea-input-native{resize:none;border:0;width:100%;background:0 0;font:inherit;line-height:1.5em;color:inherit;min-height:var(--size)}.k-textarea-input-native::-moz-placeholder{color:var(--color-gray-500)}.k-textarea-input-native::placeholder{color:var(--color-gray-500)}.k-textarea-input-native:focus{outline:0}.k-textarea-input-native:invalid{box-shadow:none;outline:0}.k-textarea-input-native[data-font=monospace]{font-family:var(--font-mono)}.k-toolbar{margin-bottom:.25rem;color:#aaa}.k-textarea-input:focus-within .k-toolbar{position:sticky;top:0;left:0;right:0;z-index:1;box-shadow:#0000000d 0 2px 5px;border-bottom:1px solid rgba(0,0,0,.1);color:#000}.k-toggle-input{--toggle-background:var(--color-white);--toggle-color:var(--color-gray-500);--toggle-active-color:var(--color-gray-900);--toggle-focus-color:var(--color-focus);--toggle-height:16px;display:flex;align-items:center}.k-toggle-input-native{position:relative;height:var(--toggle-height);width:calc(var(--toggle-height)*2);border-radius:var(--toggle-height);border:2px solid var(--toggle-color);box-shadow:inset 0 0 0 2px var(--toggle-background),inset calc(var(--toggle-height)*-1) 0 0 2px var(--toggle-background);background-color:var(--toggle-color);outline:0;transition:all ease-in-out .1s;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;flex-shrink:0}.k-toggle-input-native:checked{border-color:var(--toggle-active-color);box-shadow:inset 0 0 0 2px var(--toggle-background),inset var(--toggle-height) 0 0 2px var(--toggle-background);background-color:var(--toggle-active-color)}.k-toggle-input-native[disabled]{border-color:var(--color-border);box-shadow:inset 0 0 0 2px var(--color-background),inset calc(var(--toggle-height)*-1) 0 0 2px var(--color-background);background-color:var(--color-border)}.k-toggle-input-native[disabled]:checked{box-shadow:inset 0 0 0 2px var(--color-background),inset var(--toggle-height) 0 0 2px var(--color-background)}.k-toggle-input-native:focus:checked{border:2px solid var(--color-focus);background-color:var(--toggle-focus-color)}.k-toggle-input-native::-ms-check{opacity:0}.k-toggle-input-label{cursor:pointer;flex-grow:1}.k-blocks-field{position:relative}.k-date-field-body{display:flex;flex-wrap:wrap;line-height:1;border:var(--field-input-border);background:var(--color-gray-300);gap:1px;--multiplier:calc(25rem - 100%)}.k-date-field-body:focus-within{border:var(--field-input-focus-border);box-shadow:var(--color-focus-outline) 0 0 0 2px}.k-date-field[data-disabled] .k-date-field-body{background:0 0}.k-date-field-body>.k-input[data-theme=field]{border:0;box-shadow:none;border-radius:var(--rounded-sm)}.k-date-field-body>.k-input[data-invalid=true],.k-date-field-body>.k-input[data-invalid=true]:focus-within{border:0!important;box-shadow:none!important}.k-date-field-body>*{flex-grow:1;flex-basis:calc(var(--multiplier)*999);max-width:100%}.k-date-field-body .k-input[data-type=date]{min-width:60%}.k-date-field-body .k-input[data-type=time]{min-width:30%}.k-files-field[data-disabled=true] *{pointer-events:all!important}body{counter-reset:headline-counter}.k-headline-field{position:relative;padding-top:1.5rem}.k-fieldset>.k-grid .k-column:first-child .k-headline-field{padding-top:0}[dir=ltr] .k-headline-field .k-headline[data-numbered]:before{padding-right:.25rem}[dir=rtl] .k-headline-field .k-headline[data-numbered]:before{padding-left:.25rem}.k-headline-field .k-headline[data-numbered]:before{counter-increment:headline-counter;content:counter(headline-counter,decimal-leading-zero);color:var(--color-focus);font-weight:400}.k-info-field .k-headline{padding-bottom:.75rem;line-height:1.25rem}.k-layout-column{position:relative;height:100%;display:flex;flex-direction:column;background:var(--color-white);min-height:6rem}.k-layout-column:focus{outline:0}.k-layout-column .k-blocks{background:0 0;box-shadow:none;padding:0;height:100%;background:var(--color-white);min-height:4rem}.k-layout-column .k-blocks[data-empty=true]{min-height:6rem}.k-layout-column .k-blocks-list{display:flex;flex-direction:column;height:100%}.k-layout-column .k-blocks .k-block-container:last-of-type{flex-grow:1}.k-layout-column .k-blocks-empty{position:absolute;top:0;right:0;bottom:0;left:0;justify-content:center;opacity:0;transition:opacity .3s;border:0}.k-layout-column .k-blocks-empty:hover{opacity:1}[dir=ltr] .k-layout-column .k-blocks-empty.k-empty .k-icon{border-right:0}[dir=rtl] .k-layout-column .k-blocks-empty.k-empty .k-icon{border-left:0}.k-layout-column .k-blocks-empty.k-empty .k-icon{width:1rem}[dir=ltr] .k-layout{padding-right:var(--layout-toolbar-width)}[dir=rtl] .k-layout{padding-left:var(--layout-toolbar-width)}.k-layout{--layout-border-color:var(--color-gray-300);--layout-toolbar-width:2rem;position:relative;background:#fff;box-shadow:var(--shadow)}[dir=ltr] [data-disabled=true] .k-layout{padding-right:0}[dir=rtl] [data-disabled=true] .k-layout{padding-left:0}.k-layout:not(:last-of-type){margin-bottom:1px}.k-layout:focus{outline:0}[dir=ltr] .k-layout-toolbar{right:0}[dir=rtl] .k-layout-toolbar{left:0}[dir=ltr] .k-layout-toolbar{border-left:1px solid var(--color-light)}[dir=rtl] .k-layout-toolbar{border-right:1px solid var(--color-light)}.k-layout-toolbar{position:absolute;top:0;bottom:0;width:var(--layout-toolbar-width);display:flex;flex-direction:column;font-size:var(--text-sm);background:var(--color-gray-100);color:var(--color-gray-500)}.k-layout-toolbar:hover{color:var(--color-black)}.k-layout-toolbar-button{width:var(--layout-toolbar-width);height:var(--layout-toolbar-width)}.k-layout-toolbar .k-sort-handle{margin-top:auto;color:currentColor}.k-layout-columns.k-grid{grid-gap:1px;background:var(--layout-border-color);background:var(--color-gray-300)}.k-layout:not(:first-child) .k-layout-columns.k-grid{border-top:0}.k-layouts .k-sortable-ghost{position:relative;box-shadow:#11111140 0 5px 10px;outline:2px solid var(--color-focus);cursor:grabbing;cursor:-webkit-grabbing;z-index:1}.k-layout-selector.k-dialog{background:#313740;color:var(--color-white)}.k-layout-selector .k-headline{line-height:1;margin-top:-.25rem;margin-bottom:1.5rem}.k-layout-selector ul{display:grid;grid-template-columns:repeat(3,1fr);grid-gap:1.5rem}.k-layout-selector-option .k-grid{height:5rem;grid-gap:2px;box-shadow:var(--shadow);cursor:pointer}.k-layout-selector-option:hover{outline:2px solid var(--color-green-300);outline-offset:2px}.k-layout-selector-option:last-child{margin-bottom:0}.k-layout-selector-option .k-column{display:flex;background:rgba(255,255,255,.2);justify-content:center;font-size:var(--text-xs);align-items:center}.k-layout-add-button{display:flex;align-items:center;width:100%;color:var(--color-gray-500);justify-content:center;padding:.75rem 0}.k-layout-add-button:hover{color:var(--color-black)}.k-line-field{position:relative;border:0;height:3rem;width:auto}.k-line-field:after{position:absolute;content:"";top:50%;margin-top:-1px;left:0;right:0;height:1px;background:var(--color-border)}.k-list-field .k-list-input{padding:.375rem .5rem .375rem .75rem}.k-pages-field[data-disabled=true] *{pointer-events:all!important}.k-structure-field{--item-height:38px}.k-structure-table{position:relative;table-layout:fixed;width:100%;background:#fff;font-size:var(--text-sm);border-spacing:0;box-shadow:var(--shadow)}[dir=ltr] .k-structure-table td,[dir=ltr] .k-structure-table th{border-right:1px solid var(--color-background)}[dir=rtl] .k-structure-table td,[dir=rtl] .k-structure-table th{border-left:1px solid var(--color-background)}.k-structure-table td,.k-structure-table th{line-height:1.25em;overflow:hidden;text-overflow:ellipsis}.k-structure-table th,.k-structure-table tr:not(:last-child) td{border-bottom:1px solid var(--color-background)}.k-structure-table td:last-child{overflow:visible}[dir=ltr] .k-structure-table th{text-align:left}[dir=rtl] .k-structure-table th{text-align:right}.k-structure-table th{position:sticky;top:0;left:0;right:0;width:100%;height:var(--item-height);padding:0 .75rem;background:#fff;color:var(--color-gray-600);font-weight:400;z-index:1}[dir=ltr] .k-structure-table td:last-child,[dir=ltr] .k-structure-table th:last-child{border-right:0}[dir=rtl] .k-structure-table td:last-child,[dir=rtl] .k-structure-table th:last-child{border-left:0}.k-structure-table td:last-child,.k-structure-table th:last-child{width:var(--item-height)}.k-structure-table tbody tr:hover td{background:rgba(239,239,239,.25)}@media screen and (max-width:65em){.k-structure-table td,.k-structure-table th{display:none}.k-structure-table td:first-child,.k-structure-table td:last-child,.k-structure-table td:nth-child(2),.k-structure-table th:first-child,.k-structure-table th:last-child,.k-structure-table th:nth-child(2){display:table-cell}.k-structure-table td.k-structure-table-column:nth-child(2),.k-structure-table th.k-structure-table-column:nth-child(2){width:auto!important}}.k-structure-table .k-structure-table-column[data-align]{text-align:var(--align)}.k-structure-table .k-structure-table-column[data-align=right]>.k-input{flex-direction:column;align-items:flex-end}.k-structure-table .k-sort-handle,.k-structure-table .k-structure-table-index,.k-structure-table .k-structure-table-options,.k-structure-table .k-structure-table-options-button{width:var(--item-height);height:var(--item-height)}.k-structure-table .k-structure-table-index{text-align:center}.k-structure-table .k-structure-table-index-number{font-size:var(--text-xs);color:var(--color-gray-500);padding-top:.15rem}.k-structure-table .k-sort-handle,.k-structure-table[data-sortable=true] tr:hover .k-structure-table-index-number{display:none}.k-structure-table[data-sortable=true] tr:hover .k-sort-handle{display:flex!important}.k-structure-table .k-structure-table-options{position:relative;text-align:center}.k-structure-table .k-structure-table-text{padding:0 .75rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.k-structure-table .k-sortable-ghost{background:var(--color-white);box-shadow:#11111140 0 5px 10px;outline:2px solid var(--color-focus);margin-bottom:2px;cursor:grabbing;cursor:-webkit-grabbing}[data-disabled=true] .k-structure-table{background:var(--color-background)}[dir=ltr] [data-disabled=true] .k-structure-table td,[dir=ltr] [data-disabled=true] .k-structure-table th{border-right:1px solid var(--color-border)}[dir=rtl] [data-disabled=true] .k-structure-table td,[dir=rtl] [data-disabled=true] .k-structure-table th{border-left:1px solid var(--color-border)}[data-disabled=true] .k-structure-table td,[data-disabled=true] .k-structure-table th{background:var(--color-background);border-bottom:1px solid var(--color-border)}[data-disabled=true] .k-structure-table td:last-child{overflow:hidden;text-overflow:ellipsis}.k-structure-table .k-sortable-row-fallback{opacity:0!important}.k-structure-backdrop{position:absolute;top:0;right:0;bottom:0;left:0;z-index:2;height:100vh}.k-structure-form{position:relative;z-index:3;border-radius:var(--rounded-xs);margin-bottom:1px;box-shadow:#1111110d 0 0 0 3px;border:1px solid var(--color-border);background:var(--color-background)}.k-structure-form-fields{padding:1.5rem 1.5rem 2rem}.k-structure-form-buttons{border-top:1px solid var(--color-border);display:flex;justify-content:space-between}.k-structure-form-buttons .k-pagination{display:none}@media screen and (min-width:65em){.k-structure-form-buttons .k-pagination{display:flex}}.k-structure-form-buttons .k-pagination>.k-button,.k-structure-form-buttons .k-pagination>span{padding:.875rem 1rem!important}.k-structure-form-cancel-button,.k-structure-form-submit-button{padding:.875rem 1.5rem;line-height:1rem;display:flex}.k-field-counter{display:none}.k-text-field:focus-within .k-field-counter{display:block}.k-users-field[data-disabled=true] *{pointer-events:all!important}.k-writer-field-input{line-height:1.5em;padding:.375rem .5rem}.k-toolbar{background:var(--color-white);border-bottom:1px solid var(--color-background);height:38px}.k-toolbar-wrapper{position:absolute;top:0;left:0;right:0;max-width:100%}.k-toolbar-buttons{display:flex}.k-toolbar-divider{width:1px;background:var(--color-background)}.k-toolbar-button{width:36px;height:36px}.k-toolbar-button:hover{background:rgba(239,239,239,.5)}.k-date-field-preview{padding:0 .75rem}.k-url-field-preview{padding:0 .75rem;overflow:hidden;text-overflow:ellipsis}.k-url-field-preview a{color:var(--color-focus);text-decoration:underline;transition:color .3s;white-space:nowrap;max-width:100%}.k-url-field-preview a:hover{color:var(--color-black)}.k-files-field-preview{display:grid;grid-gap:.5rem;grid-template-columns:repeat(auto-fill,1.525rem);padding:0 .75rem}.k-files-field-preview li{line-height:0}.k-files-field-preview li .k-icon{--size:.85rem;height:100%}.k-list-field-preview{padding:.325rem .75rem;line-height:1.5em}[dir=ltr] .k-list-field-preview ol,[dir=ltr] .k-list-field-preview ul{margin-left:1rem}[dir=rtl] .k-list-field-preview ol,[dir=rtl] .k-list-field-preview ul{margin-right:1rem}.k-list-field-preview ul>li{list-style:disc}.k-list-field-preview ol ul>li,.k-list-field-preview ul ul>li{list-style:circle}.k-list-field-preview ol>li{list-style:decimal}.k-list-field-preview ol>li::marker{color:var(--color-gray-500);font-size:var(--text-xs)}.k-pages-field-preview{padding:0 .25rem 0 .75rem;display:flex}[dir=ltr] .k-pages-field-preview li{margin-right:.5rem}[dir=rtl] .k-pages-field-preview li{margin-left:.5rem}.k-pages-field-preview li{line-height:0}.k-pages-field-preview .k-link{display:flex;align-items:stretch;background:var(--color-background);box-shadow:var(--shadow)}.k-pages-field-preview-image{width:1.525rem;height:1.525rem}.k-pages-field-preview-image .k-icon{--size:.85rem}[dir=ltr] .k-pages-field-preview figcaption{border-left:0}[dir=rtl] .k-pages-field-preview figcaption{border-right:0}.k-pages-field-preview figcaption{flex-grow:1;line-height:1.5em;padding:0 .5rem;border:1px solid var(--color-border);border-radius:var(--rounded-xs);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.k-time-field-preview{padding:0 .75rem}.k-toggle-field-preview label{padding:0 .25rem 0 .75rem;display:flex;height:38px;cursor:pointer;overflow:hidden;white-space:nowrap}[dir=ltr] .k-toggle-field-preview .k-toggle-input-label{padding-left:.5rem}[dir=ltr] [data-align=right] .k-toggle-field-preview .k-toggle-input-label,[dir=rtl] .k-toggle-field-preview .k-toggle-input-label{padding-right:.5rem}[dir=rtl] [data-align=right] .k-toggle-field-preview .k-toggle-input-label{padding-left:.5rem}[dir=ltr] .k-toggle-field-preview .k-toggle-input{padding-left:.75rem;padding-right:.25rem}.k-toggle-field-preview .k-toggle-input{padding-top:0;padding-bottom:0}[dir=ltr] [data-align=right] .k-toggle-field-preview .k-toggle-input,[dir=rtl] .k-toggle-field-preview .k-toggle-input{padding-left:.25rem;padding-right:.75rem}[dir=rtl] [data-align=right] .k-toggle-field-preview .k-toggle-input{padding-right:.25rem;padding-left:.75rem}[data-align=right] .k-toggle-field-preview .k-toggle-input{flex-direction:row-reverse}.k-users-field-preview{padding:0 .25rem 0 .75rem;display:flex}[dir=ltr] .k-users-field-preview li{margin-right:.5rem}[dir=rtl] .k-users-field-preview li{margin-left:.5rem}.k-users-field-preview li{line-height:0}.k-users-field-preview .k-link{display:flex;align-items:stretch;background:var(--color-background);box-shadow:var(--shadow)}.k-users-field-preview-avatar{width:1.525rem;height:1.525rem;color:var(--color-gray-500)!important}.k-users-field-preview-avatar.k-image{display:block}[dir=ltr] .k-users-field-preview figcaption{border-left:0}[dir=rtl] .k-users-field-preview figcaption{border-right:0}.k-users-field-preview figcaption{flex-grow:1;line-height:1.5em;padding-left:.5rem;padding-right:.5rem;border:1px solid var(--color-border);border-radius:var(--rounded-xs);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.k-writer-field-preview{padding:.325rem .75rem;line-height:1.5em}.k-writer-field-preview p:not(:last-child){margin-bottom:1.5em}.k-aspect-ratio{position:relative;display:block;overflow:hidden;padding-bottom:100%}.k-aspect-ratio>*{position:absolute!important;top:0;right:0;bottom:0;left:0;height:100%;width:100%;-o-object-fit:contain;object-fit:contain}.k-aspect-ratio[data-cover=true]>*{-o-object-fit:cover;object-fit:cover}.k-bar{display:flex;align-items:center;justify-content:space-between;line-height:1}.k-bar-slot{flex-grow:1}.k-bar-slot[data-position=center]{text-align:center}[dir=ltr] .k-bar-slot[data-position=right]{text-align:right}[dir=rtl] .k-bar-slot[data-position=right]{text-align:left}.k-box{word-wrap:break-word;font-size:var(--text-sm)}[dir=ltr] .k-box:not([data-theme=none]){border-left:2px solid var(--color-gray-500)}[dir=rtl] .k-box:not([data-theme=none]){border-right:2px solid var(--color-gray-500)}.k-box:not([data-theme=none]){background:var(--color-gray-300);border-radius:var(--rounded-xs);line-height:1.25rem;padding:.5rem 1.5rem}.k-box[data-theme=code]{background:var(--color-gray-900);border:1px solid var(--color-black);color:var(--color-light);font-family:Input,Menlo,monospace;font-size:var(--text-sm);line-height:1.5}.k-box[data-theme=button]{padding:0}[dir=ltr] .k-box[data-theme=button] .k-button{text-align:left}[dir=rtl] .k-box[data-theme=button] .k-button{text-align:right}.k-box[data-theme=button] .k-button{padding:0 .75rem;height:2.25rem;width:100%;display:flex;align-items:center;line-height:2rem}[dir=ltr] .k-box[data-theme=info],[dir=ltr] .k-box[data-theme=negative],[dir=ltr] .k-box[data-theme=notice],[dir=ltr] .k-box[data-theme=positive]{border-left-color:var(--theme-light)}[dir=rtl] .k-box[data-theme=info],[dir=rtl] .k-box[data-theme=negative],[dir=rtl] .k-box[data-theme=notice],[dir=rtl] .k-box[data-theme=positive]{border-right-color:var(--theme-light)}.k-box[data-theme=info],.k-box[data-theme=negative],.k-box[data-theme=notice],.k-box[data-theme=positive]{border:0;background:var(--theme-bg)}[dir=ltr] .k-box[data-theme=empty]{border-left:0}[dir=rtl] .k-box[data-theme=empty]{border-right:0}.k-box[data-theme=empty]{text-align:center;padding:3rem 1.5rem;display:flex;justify-content:center;align-items:center;flex-direction:column;background:var(--color-background);border:1px dashed var(--color-border)}.k-box[data-theme=empty] .k-icon{margin-bottom:.5rem;color:var(--color-gray-500)}.k-box[data-theme=empty],.k-box[data-theme=empty] p{color:var(--color-gray-600)}.k-collection-help{padding:.5rem .75rem}.k-collection-footer{display:flex;justify-content:space-between;margin-left:-.75rem;margin-right:-.75rem}.k-collection-pagination{line-height:1.25rem;flex-shrink:0;min-height:2.75rem}.k-collection-pagination .k-pagination .k-button{padding:.5rem .75rem;line-height:1.125rem}.k-column{min-width:0;grid-column-start:span 12}.k-column[data-sticky=true]>div{position:sticky;top:4vh;z-index:2}@media screen and (min-width:65em){.k-column[data-width="1/1"],.k-column[data-width="12/12"],.k-column[data-width="2/2"],.k-column[data-width="3/3"],.k-column[data-width="4/4"],.k-column[data-width="6/6"]{grid-column-start:span 12}.k-column[data-width="11/12"]{grid-column-start:span 11}.k-column[data-width="10/12"],.k-column[data-width="5/6"]{grid-column-start:span 10}.k-column[data-width="3/4"],.k-column[data-width="9/12"]{grid-column-start:span 9}.k-column[data-width="2/3"],.k-column[data-width="4/6"],.k-column[data-width="8/12"]{grid-column-start:span 8}.k-column[data-width="7/12"]{grid-column-start:span 7}.k-column[data-width="1/2"],.k-column[data-width="2/4"],.k-column[data-width="3/6"],.k-column[data-width="6/12"]{grid-column-start:span 6}.k-column[data-width="5/12"]{grid-column-start:span 5}.k-column[data-width="1/3"],.k-column[data-width="2/6"],.k-column[data-width="4/12"]{grid-column-start:span 4}.k-column[data-width="1/4"],.k-column[data-width="3/12"]{grid-column-start:span 3}.k-column[data-width="1/6"],.k-column[data-width="2/12"]{grid-column-start:span 2}.k-column[data-width="1/12"]{grid-column-start:span 1}}.k-column[data-disabled=true]{cursor:not-allowed;opacity:.4}.k-column[data-disabled=true] *{pointer-events:none}.k-column[data-disabled=true] .k-text[data-theme=help] *{pointer-events:initial}.k-dropzone{position:relative}.k-dropzone:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;display:none;pointer-events:none;z-index:1}.k-dropzone[data-over=true]:after{display:block;outline:1px solid var(--color-focus);box-shadow:var(--color-focus-outline) 0 0 0 3px}.k-empty{display:flex;align-items:stretch;border-radius:var(--rounded-xs);color:var(--color-gray-600);border:1px dashed var(--color-border)}button.k-empty{width:100%}button.k-empty:focus{outline:0}.k-empty p{font-size:var(--text-sm);color:var(--color-gray-600)}.k-empty>.k-icon{color:var(--color-gray-500)}.k-empty[data-layout=cardlets],.k-empty[data-layout=cards]{text-align:center;padding:1.5rem;justify-content:center;flex-direction:column}.k-empty[data-layout=cardlets] .k-icon,.k-empty[data-layout=cards] .k-icon{margin-bottom:1rem}.k-empty[data-layout=cardlets] .k-icon svg,.k-empty[data-layout=cards] .k-icon svg{width:2rem;height:2rem}.k-empty[data-layout=list]{min-height:38px}[dir=ltr] .k-empty[data-layout=list]>.k-icon{border-right:1px solid rgba(0,0,0,.05)}[dir=rtl] .k-empty[data-layout=list]>.k-icon{border-left:1px solid rgba(0,0,0,.05)}.k-empty[data-layout=list]>.k-icon{width:36px;min-height:36px}.k-empty[data-layout=list]>p{line-height:1.25rem;padding:.5rem .75rem}.k-file-preview{background:var(--color-gray-800)}.k-file-preview-layout{display:grid;grid-template-columns:50%auto}.k-file-preview-layout>*{min-width:0}.k-file-preview-image{position:relative;display:flex;align-items:center;justify-content:center;background:var(--bg-pattern)}.k-file-preview-image-link{display:block;width:100%;padding:min(4vw,3rem);outline:0}.k-file-preview-image-link[data-tabbed=true]{box-shadow:none;outline:2px solid var(--color-focus);outline-offset:-2px}.k-file-preview-details{padding:1.5rem;flex-grow:1}.k-file-preview-details ul{line-height:1.5em;max-width:50rem;display:grid;grid-gap:1.5rem 3rem;grid-template-columns:repeat(auto-fill,minmax(100px,1fr))}.k-file-preview-details h3{font-size:var(--text-sm);font-weight:500;color:var(--color-gray-500)}.k-file-preview-details a,.k-file-preview-details p{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#ffffffbf;font-size:var(--text-sm)}@media screen and (min-width:30em){.k-file-preview-details ul{grid-template-columns:repeat(auto-fill,minmax(200px,1fr))}}@media screen and (max-width:65em){.k-file-preview-layout{padding:0!important}}@media screen and (min-width:65em){.k-file-preview-layout{grid-template-columns:33.333%auto;align-items:center}.k-file-preview-details{padding:3rem}}@media screen and (min-width:90em){.k-file-preview-layout{grid-template-columns:25%auto}}.k-grid{--columns:12;display:grid;grid-column-gap:0;grid-row-gap:0;grid-template-columns:1fr}@media screen and (min-width:30em){.k-grid[data-gutter=small]{grid-column-gap:1rem;grid-row-gap:1rem}.k-grid[data-gutter=huge],.k-grid[data-gutter=large],.k-grid[data-gutter=medium]{grid-column-gap:1.5rem;grid-row-gap:1.5rem}}@media screen and (min-width:65em){.k-grid{grid-template-columns:repeat(var(--columns),1fr)}.k-grid[data-gutter=large]{grid-column-gap:3rem}.k-grid[data-gutter=huge]{grid-column-gap:4.5rem}}@media screen and (min-width:90em){.k-grid[data-gutter=large]{grid-column-gap:4.5rem}.k-grid[data-gutter=huge]{grid-column-gap:6rem}}@media screen and (min-width:120em){.k-grid[data-gutter=large]{grid-column-gap:6rem}.k-grid[data-gutter=huge]{grid-column-gap:7.5rem}}.k-header{padding-top:4vh;margin-bottom:2rem;border-bottom:1px solid var(--color-border)}.k-header .k-headline{min-height:1.25em;margin-bottom:.5rem;word-wrap:break-word}.k-header .k-header-buttons{margin-top:-.5rem;height:3.25rem}.k-header .k-headline-editable{cursor:pointer}[dir=ltr] .k-header .k-headline-editable .k-icon{margin-left:.5rem}[dir=rtl] .k-header .k-headline-editable .k-icon{margin-right:.5rem}.k-header .k-headline-editable .k-icon{color:var(--color-gray-500);opacity:0;transition:opacity .3s;display:inline-block}.k-header .k-headline-editable:hover .k-icon{opacity:1}.k-panel-inside{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column}.k-panel-inside:focus{outline:0}.k-panel-header{z-index:var(--z-navigation);flex-shrink:0}.k-panel-view{flex-grow:1;padding-bottom:6rem}.k-item{position:relative;background:var(--color-white);border-radius:var(--rounded-sm);box-shadow:var(--shadow);display:grid;grid-template-columns:auto;line-height:1}.k-item a:focus,.k-item:focus{outline:0}.k-item:focus-within{box-shadow:var(--shadow-outline)}.k-item-sort-handle.k-sort-handle{position:absolute;opacity:0;width:1.25rem;height:1.5rem;z-index:2;border-radius:1px}.k-item:hover .k-item-sort-handle{opacity:1}.k-item-figure{grid-area:figure}.k-item-content{grid-area:content;overflow:hidden}.k-item-info,.k-item-title{font-size:var(--text-sm);font-weight:400;text-overflow:ellipsis;white-space:nowrap;line-height:1.125rem;overflow:hidden}.k-item-info{grid-area:info;color:var(--color-gray-500)}.k-item-title-link.k-link[data-=true]{box-shadow:none}.k-item-title-link:after{position:absolute;content:"";top:0;right:0;bottom:0;left:0;z-index:1}.k-item-footer{grid-area:footer;display:flex;justify-content:space-between;align-items:center;min-width:0}[dir=ltr] .k-item-label{margin-right:.5rem}[dir=rtl] .k-item-label{margin-left:.5rem}.k-item-buttons{position:relative;display:flex;justify-content:flex-end;flex-shrink:0;flex-grow:1}.k-item-buttons>.k-button,.k-item-buttons>.k-dropdown{position:relative;width:38px;height:38px;display:flex!important;align-items:center;justify-content:center;line-height:1}.k-item-buttons>.k-button{z-index:1}.k-item-buttons>.k-options-dropdown>.k-options-dropdown-toggle{z-index:var(--z-toolbar)}.k-list-item{display:flex;align-items:center;height:38px}[dir=ltr] .k-list-item .k-item-sort-handle{left:-1.5rem}[dir=rtl] .k-list-item .k-item-sort-handle{right:-1.5rem}.k-list-item .k-item-sort-handle{width:1.5rem}[dir=ltr] .k-list-item .k-item-figure{border-top-left-radius:var(--rounded-sm)}[dir=rtl] .k-list-item .k-item-figure{border-top-right-radius:var(--rounded-sm)}[dir=ltr] .k-list-item .k-item-figure{border-bottom-left-radius:var(--rounded-sm)}[dir=rtl] .k-list-item .k-item-figure{border-bottom-right-radius:var(--rounded-sm)}.k-list-item .k-item-figure{width:38px}[dir=ltr] .k-list-item .k-item-content{margin-left:.75rem}[dir=rtl] .k-list-item .k-item-content{margin-right:.75rem}.k-list-item .k-item-content{display:flex;flex-grow:1;flex-shrink:2;justify-content:space-between;align-items:center}.k-list-item .k-item-info,.k-list-item .k-item-title{flex-grow:1;line-height:1.5rem}[dir=ltr] .k-list-item .k-item-title{margin-right:.5rem}[dir=rtl] .k-list-item .k-item-title{margin-left:.5rem}.k-list-item .k-item-title{flex-shrink:1}[dir=ltr] .k-list-item .k-item-info{text-align:right}[dir=rtl] .k-list-item .k-item-info{text-align:left}[dir=ltr] .k-list-item .k-item-info{margin-right:.5rem}[dir=rtl] .k-list-item .k-item-info{margin-left:.5rem}.k-list-item .k-item-info{flex-shrink:2;justify-self:end}.k-list-item .k-item-buttons,.k-list-item .k-item-footer{flex-shrink:0}.k-item:not(.k-list-item) .k-item-sort-handle{margin:.25rem;background:var(--color-background);box-shadow:var(--shadow-md)}[dir=ltr] .k-item:not(.k-list-item) .k-item-label{margin-left:-2px}[dir=rtl] .k-item:not(.k-list-item) .k-item-label{margin-right:-2px}.k-item:not(.k-list-item) .k-item-content{padding:.625rem .75rem}.k-cardlets-item{height:6rem;grid-template-rows:auto 38px;grid-template-areas:"content""footer"}.k-cardlets-item[data-has-figure=true]{grid-template-columns:6rem auto;grid-template-areas:"figure content""figure footer"}[dir=ltr] .k-cardlets-item .k-item-figure{border-top-left-radius:var(--rounded-sm)}[dir=rtl] .k-cardlets-item .k-item-figure{border-top-right-radius:var(--rounded-sm)}[dir=ltr] .k-cardlets-item .k-item-figure{border-bottom-left-radius:var(--rounded-sm)}[dir=rtl] .k-cardlets-item .k-item-figure{border-bottom-right-radius:var(--rounded-sm)}.k-cardlets-item .k-item-footer{padding-top:.5rem;padding-bottom:.5rem}.k-cards-item{grid-template-columns:auto;grid-template-rows:auto 1fr;grid-template-areas:"figure""content";--item-content-wrapper:0}[dir=ltr] .k-cards-item .k-item-figure,[dir=rtl] .k-cards-item .k-item-figure{border-top-right-radius:var(--rounded-sm);border-top-left-radius:var(--rounded-sm)}.k-cards-item .k-item-content{padding:.5rem .75rem!important;overflow:hidden}.k-cards-item .k-item-info,.k-cards-item .k-item-title{line-height:1.375rem;white-space:normal}.k-cards-item .k-item-info:after,.k-cards-item .k-item-title:after{display:inline-block;content:"\a0";width:var(--item-content-wrapper)}.k-cards-item[data-has-flag=true],.k-cards-item[data-has-options=true]{--item-content-wrapper:38px}.k-cards-item[data-has-flag=true][data-has-options=true]{--item-content-wrapper:76px}.k-cards-item[data-has-info=true] .k-item-title:after{display:none}[dir=ltr] .k-cards-item .k-item-footer{right:0}[dir=rtl] .k-cards-item .k-item-footer{left:0}.k-cards-item .k-item-footer{position:absolute;bottom:0;width:auto}.k-item-figure{overflow:hidden;flex-shrink:0}.k-cards-items{--min:13rem;--max:1fr;--gap:1.5rem;--column-gap:var(--gap);--row-gap:var(--gap);display:grid;grid-column-gap:var(--column-gap);grid-row-gap:var(--row-gap);grid-template-columns:repeat(auto-fill,minmax(var(--min),var(--max)))}@media screen and (min-width:30em){.k-cards-items[data-size=tiny]{--min:10rem}.k-cards-items[data-size=small]{--min:16rem}.k-cards-items[data-size=medium]{--min:24rem}.k-cards-items[data-size=huge],.k-cards-items[data-size=large],.k-column[data-width="1/4"] .k-cards-items,.k-column[data-width="1/5"] .k-cards-items,.k-column[data-width="1/6"] .k-cards-items{--min:1fr}}@media screen and (min-width:65em){.k-cards-items[data-size=large]{--min:32rem}}.k-cardlets-items{display:grid;grid-template-columns:repeat(auto-fill,minmax(16rem,1fr));grid-gap:.5rem}.k-list-items .k-list-item:not(:last-child){margin-bottom:2px}.k-overlay{position:fixed;top:0;right:0;bottom:0;left:0;width:100%;height:100%;z-index:var(--z-dialog);transform:translate(0)}.k-overlay[data-centered=true]{display:flex;align-items:center;justify-content:center}.k-overlay[data-dimmed=true]{background:var(--color-backdrop)}.k-overlay-loader{color:var(--color-white)}.k-panel[data-loading=true]{animation:LoadingCursor .5s}.k-panel[data-dragging=true],.k-panel[data-loading=true]:after{-webkit-user-select:none;-moz-user-select:none;user-select:none}.k-tabs{position:relative;background:#e9e9e9;border-top:1px solid var(--color-border);border-left:1px solid var(--color-border);border-right:1px solid var(--color-border)}.k-tabs nav{display:flex;justify-content:center;margin-left:-1px;margin-right:-1px}[dir=ltr] .k-tab-button.k-button{border-left:1px solid transparent}[dir=rtl] .k-tab-button.k-button{border-right:1px solid transparent}[dir=ltr] .k-tab-button.k-button{border-right:1px solid var(--color-border)}[dir=rtl] .k-tab-button.k-button{border-left:1px solid var(--color-border)}.k-tab-button.k-button{position:relative;z-index:1;display:inline-flex;justify-content:center;align-items:center;padding:.625rem .75rem;font-size:var(--text-xs);text-transform:uppercase;text-align:center;font-weight:500;flex-grow:1;flex-shrink:1;flex-direction:column;max-width:15rem}@media screen and (min-width:30em){.k-tab-button.k-button{flex-direction:row}[dir=ltr] .k-tab-button.k-button .k-icon{margin-right:.5rem}[dir=rtl] .k-tab-button.k-button .k-icon{margin-left:.5rem}}[dir=ltr] .k-tab-button.k-button>.k-button-text{padding-left:0}[dir=rtl] .k-tab-button.k-button>.k-button-text{padding-right:0}.k-tab-button.k-button>.k-button-text{padding-top:.375rem;font-size:10px;overflow:hidden;max-width:10rem;text-overflow:ellipsis;opacity:1}@media screen and (min-width:30em){.k-tab-button.k-button>.k-button-text{font-size:var(--text-xs);padding-top:0}}[dir=ltr] .k-tab-button:last-child{border-right:1px solid transparent}[dir=rtl] .k-tab-button:last-child{border-left:1px solid transparent}[dir=ltr] .k-tab-button[aria-current]{border-right:1px solid var(--color-border)}[dir=rtl] .k-tab-button[aria-current]{border-left:1px solid var(--color-border)}.k-tab-button[aria-current]{position:relative;background:var(--color-background);pointer-events:none}[dir=ltr] .k-tab-button[aria-current]:first-child{border-left:1px solid var(--color-border)}[dir=rtl] .k-tab-button[aria-current]:first-child{border-right:1px solid var(--color-border)}.k-tab-button[aria-current]:after,.k-tab-button[aria-current]:before{position:absolute;content:""}.k-tab-button[aria-current]:before{left:-1px;right:-1px;top:-1px;height:2px;background:var(--color-black)}.k-tab-button[aria-current]:after{left:0;right:0;bottom:-1px;height:1px;background:var(--color-background)}[dir=ltr] .k-tabs-dropdown{right:0}[dir=rtl] .k-tabs-dropdown{left:0}.k-tabs-dropdown{top:100%}[dir=ltr] .k-tabs-badge{right:2px}[dir=rtl] .k-tabs-badge{left:2px}.k-tabs-badge{position:absolute;top:3px;font-variant-numeric:tabular-nums;line-height:1.5;padding:0 .25rem;border-radius:2px;font-size:10px;box-shadow:var(--shadow-md)}.k-tabs[data-theme=notice] .k-tabs-badge{background:var(--theme-light);color:var(--color-black)}.k-view{padding-left:1.5rem;padding-right:1.5rem;margin:0 auto;max-width:100rem}@media screen and (min-width:30em){.k-view{padding-left:3rem;padding-right:3rem}}@media screen and (min-width:90em){.k-view{padding-left:6rem;padding-right:6rem}}.k-view[data-align=center]{height:100vh;display:flex;align-items:center;justify-content:center;padding:0 3rem;overflow:auto}.k-view[data-align=center]>*{flex-basis:22.5rem}.k-fatal{position:fixed;top:0;right:0;bottom:0;left:0;background:var(--color-backdrop);display:flex;z-index:var(--z-fatal);align-items:center;justify-content:center;padding:1.5rem}.k-fatal-box{width:100%;height:100%;display:flex;flex-direction:column;color:var(--color-black);background:var(--color-red-400);box-shadow:var(--shadow-xl);border-radius:var(--rounded)}.k-fatal-box .k-headline{line-height:1;font-size:var(--text-sm);padding:.75rem}.k-fatal-box .k-button{padding:.75rem}.k-fatal-iframe{border:0;width:100%;flex-grow:1;background:var(--color-white)}.k-headline{--size:var(--text-base);font-size:var(--size);font-weight:var(--font-bold);line-height:1.5em}.k-headline[data-size=small]{--size:var(--text-sm)}.k-headline[data-size=large]{--size:var(--text-xl);font-weight:var(--font-normal)}@media screen and (min-width:65em){.k-headline[data-size=large]{--size:var(--text-2xl)}}.k-headline[data-size=huge]{--size:var(--text-2xl);line-height:1.15em}@media screen and (min-width:65em){.k-headline[data-size=huge]{--size:var(--text-3xl)}}.k-headline[data-theme]{color:var(--theme)}[dir=ltr] .k-headline abbr{padding-left:.25rem}[dir=rtl] .k-headline abbr{padding-right:.25rem}.k-headline abbr{color:var(--color-gray-500);text-decoration:none}.k-icon{--size:1rem;position:relative;line-height:0;display:flex;align-items:center;justify-content:center;flex-shrink:0;font-size:var(--size)}.k-icon[data-size=medium]{--size:2rem}.k-icon[data-size=large]{--size:3rem}.k-icon svg{width:var(--size);height:var(--size);-moz-transform:scale(1)}.k-icon svg *{fill:currentColor}.k-icon[data-back=black]{color:var(--color-white)}.k-icon[data-back=white]{color:var(--color-gray-900)}.k-icon[data-back=pattern]{color:var(--color-white)}[data-disabled=true] .k-icon[data-back=pattern] svg{opacity:1}.k-icon-emoji{display:block;line-height:1;font-style:normal;font-size:var(--size)}@media only screen and (-webkit-min-device-pixel-ratio:2),not all,only screen and (min-resolution:192dpi),only screen and (min-resolution:2dppx){.k-icon-emoji{font-size:1.25em}}.k-icons{position:absolute;width:0;height:0}.k-image span{position:relative;display:block;line-height:0;padding-bottom:100%}.k-image img{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;-o-object-fit:contain;object-fit:contain}[dir=ltr] .k-image-error{left:50%}[dir=rtl] .k-image-error{right:50%}.k-image-error{position:absolute;top:50%;transform:translate(-50%,-50%);color:var(--color-white);font-size:.9em}.k-image-error svg *{fill:#ffffff4d}.k-image[data-cover=true] img{-o-object-fit:cover;object-fit:cover}.k-image[data-back=black] span{background:var(--color-gray-900)}.k-image[data-back=white] span{background:var(--color-white);color:var(--color-gray-900)}.k-image[data-back=white] .k-image-error{background:var(--color-gray-900);color:var(--color-white)}.k-image[data-back=pattern] span{background:var(--color-gray-800) var(--bg-pattern)}.k-loader{z-index:1}.k-loader-icon{animation:Spin .9s linear infinite}.k-offline-warning{position:fixed;top:0;right:0;bottom:0;left:0;z-index:var(--z-offline);background:var(--color-backdrop);display:flex;align-items:center;justify-content:center;line-height:1}.k-offline-warning p{display:flex;align-items:center;gap:.5rem;background:var(--color-white);box-shadow:var(--shadow);padding:.75rem;border-radius:var(--rounded)}.k-offline-warning p .k-icon{color:var(--color-red-400)}.k-progress{-webkit-appearance:none;width:100%;height:.5rem;border-radius:5rem;background:var(--color-border);overflow:hidden;border:0}.k-progress::-webkit-progress-bar{border:0;background:var(--color-border);height:.5rem;border-radius:20px}.k-progress::-webkit-progress-value{border-radius:inherit;background:var(--color-focus);-webkit-transition:width .3s;transition:width .3s}.k-progress::-moz-progress-bar{border-radius:inherit;background:var(--color-focus);-moz-transition:width .3s;transition:width .3s}[dir=ltr] .k-registration,[dir=ltr] .k-registration p{margin-right:1rem}[dir=rtl] .k-registration,[dir=rtl] .k-registration p{margin-left:1rem}.k-registration{display:flex;align-items:center}.k-registration p{color:var(--color-negative-light);font-size:var(--text-sm);font-weight:600}@media screen and (max-width:90em){.k-registration p{display:none}}.k-registration .k-button{color:var(--color-white)}.k-sort-handle{cursor:move;cursor:grab;cursor:-webkit-grab;color:var(--color-gray-900);justify-content:center;align-items:center;line-height:0;width:2rem;height:2rem;display:flex;will-change:opacity,color;transition:opacity .3s;z-index:1}.k-sort-handle svg{width:1rem;height:1rem}.k-sort-handle:active{cursor:grabbing;cursor:-webkit-grabbing}.k-status-icon svg{width:14px;height:14px}.k-status-icon .k-icon{color:var(--theme-light)}.k-status-icon .k-button-text{color:var(--color-black)}.k-status-icon[data-disabled=true]{opacity:1!important}.k-status-icon[data-disabled=true] .k-icon{color:var(--color-gray-400);opacity:.5}.k-text{line-height:1.5em}[dir=ltr] .k-text ol,[dir=ltr] .k-text ul{margin-left:1rem}[dir=rtl] .k-text ol,[dir=rtl] .k-text ul{margin-right:1rem}.k-text li{list-style:inherit}.k-text p,.k-text>ol,.k-text>ul{margin-bottom:1.5em}.k-text a{text-decoration:underline}.k-text>:last-child{margin-bottom:0}.k-text[data-size=tiny]{font-size:var(--text-xs)}.k-text[data-size=small]{font-size:var(--text-sm)}.k-text[data-size=medium]{font-size:var(--text-base)}.k-text[data-size=large]{font-size:var(--text-xl)}.k-text[data-align]{text-align:var(--align)}.k-text[data-theme=help]{font-size:var(--text-sm);color:var(--color-gray-600);line-height:1.25rem}.k-dialog-body .k-text{word-wrap:break-word}.k-user-info{display:flex;align-items:center;line-height:1;font-size:var(--text-sm)}[dir=ltr] .k-user-info .k-image{margin-right:.75rem}[dir=rtl] .k-user-info .k-image{margin-left:.75rem}.k-user-info .k-image{width:1.5rem}[dir=ltr] .k-user-info .k-icon{margin-right:.75rem}[dir=rtl] .k-user-info .k-icon{margin-left:.75rem}.k-user-info .k-icon{width:1.5rem;height:1.5rem;background:var(--color-black);color:var(--color-white)}.k-breadcrumb{padding-left:.5rem;padding-right:.5rem}.k-breadcrumb-dropdown{height:2.5rem;width:2.5rem;display:flex;align-items:center;justify-content:center}.k-breadcrumb ol{display:none;align-items:center}@media screen and (min-width:30em){.k-breadcrumb ol{display:flex}.k-breadcrumb-dropdown{display:none}}.k-breadcrumb li,.k-breadcrumb-link{display:flex;align-items:center;min-width:0}.k-breadcrumb-link{font-size:var(--text-sm);align-self:stretch;padding-top:.625rem;padding-bottom:.625rem;line-height:1.25rem}.k-breadcrumb li{flex-shrink:3}.k-breadcrumb li:last-child{flex-shrink:1}.k-breadcrumb li:not(:last-child):after{content:"/";padding-left:.5rem;padding-right:.5rem;opacity:.5;flex-shrink:0}.k-breadcrumb li:not(:first-child):not(:last-child){max-width:15vw}[dir=ltr] .k-breadcrumb-icon{margin-right:.5rem}[dir=rtl] .k-breadcrumb-icon{margin-left:.5rem}.k-breadcrumb-link-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}button{line-height:inherit;border:0;font-family:var(--font-sans);font-size:1rem;color:currentColor;background:0 0;cursor:pointer}button::-moz-focus-inner{padding:0;border:0}.k-button{display:inline-block;position:relative;font-size:var(--text-sm);transition:color .3s;outline:0}.k-button:focus,.k-button:hover{outline:0}.k-button *{vertical-align:middle}.k-button[data-responsive=true] .k-button-text{display:none}@media screen and (min-width:30em){.k-button[data-responsive=true] .k-button-text{display:inline}}.k-button[data-theme]{color:var(--theme)}.k-button-icon{display:inline-flex;align-items:center;line-height:0}[dir=ltr] .k-button-icon~.k-button-text{padding-left:.5rem}[dir=rtl] .k-button-icon~.k-button-text{padding-right:.5rem}.k-button-text{opacity:.75}.k-button:focus .k-button-text,.k-button:hover .k-button-text{opacity:1}.k-button-text b,.k-button-text span{vertical-align:baseline}.k-button[data-disabled=true]{opacity:.5;pointer-events:none;cursor:default}.k-card-options>.k-button[data-disabled=true]{display:inline-flex}.k-button-group{--padding-x:.75rem;--padding-y:1rem;--line-height:1rem;font-size:0;margin:0 calc(var(--padding-x)*-1)}.k-button-group>.k-dropdown{height:calc(var(--line-height) + (var(--padding-y)*2));display:inline-block}.k-button-group>.k-button,.k-button-group>.k-dropdown>.k-button{padding:var(--padding-y) var(--padding-x);line-height:var(--line-height)}.k-button-group .k-dropdown-content{top:calc(100% + 1px);margin:0 var(--padding-x)}.k-dropdown{position:relative}[dir=ltr] .k-dropdown-content{text-align:left}[dir=rtl] .k-dropdown-content{text-align:right}.k-dropdown-content{position:absolute;top:100%;background:var(--color-black);color:var(--color-white);z-index:var(--z-dropdown);box-shadow:var(--shadow-lg);border-radius:var(--rounded-xs);margin-bottom:6rem}[dir=ltr] .k-dropdown-content[data-align=left]{left:0}[dir=ltr] .k-dropdown-content[data-align=right],[dir=rtl] .k-dropdown-content[data-align=left]{right:0}[dir=rtl] .k-dropdown-content[data-align=right]{left:0}.k-dropdown-content>.k-dropdown-item:first-child{margin-top:.5rem}.k-dropdown-content>.k-dropdown-item:last-child{margin-bottom:.5rem}.k-dropdown-content[data-dropup=true]{top:auto;bottom:100%;margin-bottom:.5rem}.k-dropdown-content hr{border-color:currentColor;opacity:.2;margin:.5rem 1rem}.k-dropdown-content[data-theme=light]{background:var(--color-white);color:var(--color-black)}.k-dropdown-item{white-space:nowrap;line-height:1;display:flex;width:100%;align-items:center;font-size:var(--text-sm);padding:6px 16px}.k-dropdown-item:focus{outline:0;box-shadow:var(--shadow-outline)}[dir=ltr] .k-dropdown-item .k-button-figure{padding-right:.5rem}[dir=rtl] .k-dropdown-item .k-button-figure{padding-left:.5rem}.k-dropdown-item .k-button-figure{text-align:center}.k-link{outline:0}.k-options-dropdown,.k-options-dropdown-toggle{display:flex;justify-content:center;align-items:center;height:38px}.k-options-dropdown-toggle{min-width:38px;padding:0 .75rem}.k-pagination{-webkit-user-select:none;-moz-user-select:none;user-select:none;direction:ltr}.k-pagination .k-button{padding:1rem}.k-pagination-details{white-space:nowrap}.k-pagination>span{font-size:var(--text-sm)}.k-pagination[data-align]{text-align:var(--align)}[dir=ltr] .k-dropdown-content.k-pagination-selector{left:50%}[dir=rtl] .k-dropdown-content.k-pagination-selector{right:50%}.k-dropdown-content.k-pagination-selector{position:absolute;top:100%;transform:translate(-50%);background:var(--color-black)}[dir=ltr] .k-dropdown-content.k-pagination-selector{direction:ltr}[dir=rtl] .k-dropdown-content.k-pagination-selector{direction:rtl}.k-pagination-settings{display:flex;align-items:center;justify-content:space-between}.k-pagination-settings .k-button{line-height:1}[dir=ltr] .k-pagination-settings label{border-right:1px solid rgba(255,255,255,.35)}[dir=rtl] .k-pagination-settings label{border-left:1px solid rgba(255,255,255,.35)}.k-pagination-settings label{display:flex;align-items:center;padding:.625rem 1rem;font-size:var(--text-xs)}[dir=ltr] .k-pagination-settings label span{margin-right:.5rem}[dir=rtl] .k-pagination-settings label span{margin-left:.5rem}.k-prev-next{direction:ltr}.k-search{max-width:30rem;margin:2.5rem auto;box-shadow:var(--shadow-lg)}.k-search-input{background:var(--color-light);display:flex}.k-search-types{flex-shrink:0;display:flex}[dir=ltr] .k-search-types>.k-button{padding-left:1rem}[dir=rtl] .k-search-types>.k-button{padding-right:1rem}.k-search-types>.k-button{font-size:var(--text-base);line-height:1;height:2.5rem}.k-search-types>.k-button .k-icon{height:2.5rem}.k-search-types>.k-button .k-button-text{opacity:1;font-weight:500}.k-search-input input{background:0 0;flex-grow:1;font:inherit;padding:.75rem;border:0;height:2.5rem}.k-search-close{width:3rem;line-height:1}.k-search-close .k-icon-loader{animation:Spin 2s linear infinite}.k-search input:focus{outline:0}.k-search-results{padding:.5rem 1rem 1rem;background:var(--color-light)}.k-search .k-item:not(:last-child){margin-bottom:.25rem}.k-search .k-item[data-selected=true]{outline:2px solid var(--color-focus)}.k-search .k-item-info,.k-search-empty{font-size:var(--text-xs)}.k-search-empty{text-align:center;color:var(--color-gray-600)}.k-tag{position:relative;font-size:var(--text-sm);line-height:1;cursor:pointer;background-color:var(--color-gray-900);color:var(--color-light);border-radius:var(--rounded-sm);display:flex;align-items:center;justify-content:space-between;-webkit-user-select:none;-moz-user-select:none;user-select:none}.k-tag:focus{outline:0;background-color:var(--color-focus);color:#fff}.k-tag-text{padding:.3rem .75rem .375rem;line-height:var(--leading-tight)}[dir=ltr] .k-tag-toggle{border-left:1px solid rgba(255,255,255,.15)}[dir=rtl] .k-tag-toggle{border-right:1px solid rgba(255,255,255,.15)}.k-tag-toggle{color:#ffffffb3;width:1.75rem;height:100%;display:flex;flex-shrink:0;align-items:center;justify-content:center}.k-tag-toggle:hover{background:rgba(255,255,255,.2);color:#fff}[data-disabled=true] .k-tag{background-color:var(--color-gray-600)}[data-disabled=true] .k-tag .k-tag-toggle{display:none}.k-topbar{--bg:var(--color-gray-900);position:relative;color:var(--color-white);flex-shrink:0;height:2.5rem;line-height:1;background:var(--bg)}.k-topbar-wrapper{position:relative;display:flex;align-items:center;margin-left:-.75rem;margin-right:-.75rem}[dir=ltr] .k-topbar-wrapper:after{left:100%}[dir=rtl] .k-topbar-wrapper:after{right:100%}.k-topbar-wrapper:after{position:absolute;content:"";height:2.5rem;background:var(--bg);width:3rem}.k-topbar-menu{flex-shrink:0}.k-topbar-menu ul{padding:.5rem 0}.k-topbar .k-button[data-theme]{color:var(--theme-light)}.k-topbar .k-button-text{opacity:1}.k-topbar-menu-button{display:flex;align-items:center}.k-topbar-menu .k-link[aria-current]{color:var(--color-focus);font-weight:500}.k-topbar-button{padding:.75rem;line-height:1;font-size:var(--text-sm)}.k-topbar-button .k-button-text{display:flex}[dir=ltr] .k-topbar-view-button{padding-right:0}[dir=rtl] .k-topbar-view-button{padding-left:0}.k-topbar-view-button{flex-shrink:0;display:flex;align-items:center}[dir=ltr] .k-topbar-view-button .k-icon{margin-right:.5rem}[dir=rtl] .k-topbar-view-button .k-icon{margin-left:.5rem}[dir=ltr] .k-topbar-signals{right:0}[dir=rtl] .k-topbar-signals{left:0}.k-topbar-signals{position:absolute;top:0;background:var(--bg);height:2.5rem;display:flex;align-items:center}.k-topbar-signals:before{position:absolute;content:"";top:-.5rem;bottom:0;width:.5rem;background:-webkit-linear-gradient(inline-start,rgba(17,17,17,0),#111)}.k-topbar-signals .k-button{line-height:1}.k-topbar-notification{font-weight:var(--font-bold);line-height:1;display:flex}@media screen and (max-width:30em){.k-topbar .k-button[data-theme=negative] .k-button-text{display:none}}.k-section,.k-sections{padding-bottom:3rem}.k-section-header{position:relative;display:flex;align-items:baseline;z-index:1}.k-section-header .k-headline{line-height:1.25rem;padding-bottom:.75rem;min-height:2rem}[dir=ltr] .k-section-header .k-button-group{right:0}[dir=rtl] .k-section-header .k-button-group{left:0}.k-section-header .k-button-group{position:absolute;top:-.875rem}.k-info-section-headline{margin-bottom:.5rem}.k-pages-section[data-processing=true],.k-files-section[data-processing=true]{pointer-events:none}.k-fields-issue-headline{margin-bottom:.5rem}.k-fields-section input[type=submit]{display:none}[data-locked=true] .k-fields-section{opacity:.2;pointer-events:none}.k-user-profile{background:var(--color-white)}.k-user-profile>.k-view{padding-top:3rem;padding-bottom:3rem;display:flex;align-items:center;line-height:0}[dir=ltr] .k-user-profile .k-button-group{margin-left:.75rem}[dir=rtl] .k-user-profile .k-button-group{margin-right:.75rem}.k-user-profile .k-button-group{overflow:hidden}.k-user-profile .k-button-group .k-button{display:block;padding-top:.25rem;padding-bottom:.25rem;overflow:hidden;white-space:nowrap}.k-user-view-image .k-icon,.k-user-view-image .k-image{width:5rem;height:5rem;line-height:0}.k-user-view-image[data-disabled=true]{opacity:1}.k-user-view-image .k-image{display:block}.k-user-view-image .k-button-text{opacity:1}.k-user-name-placeholder{color:var(--color-gray-500);transition:color .3s}.k-header[data-editable=true] .k-user-name-placeholder:hover{color:var(--color-gray-900)}.k-error-view{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center}.k-error-view-content{line-height:1.5em;max-width:25rem;text-align:center}.k-error-view-icon{color:var(--color-negative);display:inline-block}.k-error-view-content p:not(:last-child){margin-bottom:.75rem}.k-installation-view .k-button{display:block;margin-top:1.5rem}.k-installation-view .k-headline{margin-bottom:.75rem}.k-installation-issues{line-height:1.5em;font-size:var(--text-sm)}[dir=ltr] .k-installation-issues li{padding-left:3.5rem}[dir=rtl] .k-installation-issues li{padding-right:3.5rem}.k-installation-issues li{position:relative;padding:1.5rem;background:var(--color-white)}[dir=ltr] .k-installation-issues .k-icon{left:1.5rem}[dir=rtl] .k-installation-issues .k-icon{right:1.5rem}.k-installation-issues .k-icon{position:absolute;top:calc(1.5rem + 2px)}.k-installation-issues .k-icon svg *{fill:var(--color-negative)}.k-installation-issues li:not(:last-child){margin-bottom:2px}.k-installation-issues li code{font:inherit;color:var(--color-negative)}[dir=ltr] .k-installation-view .k-button[type=submit]{margin-left:-1rem}[dir=rtl] .k-installation-view .k-button[type=submit]{margin-right:-1rem}.k-installation-view .k-button[type=submit]{padding:1rem}.k-languages-view .k-header{margin-bottom:1.5rem}.k-languages-view-section-header{margin-bottom:.5rem}.k-languages-view-section{margin-bottom:3rem}.k-login-fields{position:relative}[dir=ltr] .k-login-toggler{right:0}[dir=rtl] .k-login-toggler{left:0}.k-login-toggler{position:absolute;top:0;z-index:1;text-decoration:underline;font-size:.875rem}.k-login-form label abbr{visibility:hidden}.k-login-buttons{display:flex;align-items:center;justify-content:flex-end;padding:1.5rem 0}[dir=ltr] .k-login-button{margin-right:-1rem}[dir=rtl] .k-login-button{margin-left:-1rem}.k-login-button{padding:.5rem 1rem;font-weight:500;transition:opacity .3s}.k-login-button span{opacity:1}.k-login-button[disabled]{opacity:.25}.k-login-back-button,.k-login-checkbox{display:flex;align-items:center;flex-grow:1}[dir=ltr] .k-login-back-button{margin-left:-1rem}[dir=rtl] .k-login-back-button{margin-right:-1rem}.k-login-checkbox{padding:.5rem 0;font-size:var(--text-sm);cursor:pointer}.k-login-checkbox .k-checkbox-text{opacity:.75;transition:opacity .3s}.k-login-checkbox:focus span,.k-login-checkbox:hover span{opacity:1}.k-password-reset-view .k-user-info{height:38px;margin-bottom:2.25rem;padding:.5rem;background:var(--color-white);border-radius:var(--rounded-xs);box-shadow:var(--shadow)}.k-system-view .k-header{margin-bottom:1.5rem}.k-system-view-section-header{margin-bottom:.5rem}.k-system-view-section{margin-bottom:3rem}.k-system-info-box{display:grid;grid-gap:1px;font-size:var(--text-sm)}@media screen and (min-width:45rem){.k-system-info-box{grid-template-columns:repeat(var(--columns),1fr)}}.k-system-info-box li,.k-system-plugins td,.k-system-plugins th{padding:.75rem;background:var(--color-white)}.k-system-info-box dt{font-size:var(--text-sm);color:var(--color-gray-600);margin-bottom:.25rem}.k-system-warning{color:var(--color-negative);font-weight:var(--font-bold);display:inline-flex}.k-system-warning .k-button-text{opacity:1}.k-system-plugins{width:100%;font-variant-numeric:tabular-nums;table-layout:fixed;border-spacing:1px}.k-system-plugins td,.k-system-plugins th{text-align:left;font-weight:var(--font-normal);font-size:var(--text-sm);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.k-system-plugins .desk{display:none}@media screen and (min-width:45rem){.k-system-plugins .desk{display:table-cell}}.k-system-plugins th{color:var(--color-gray-600)}.k-block-type-code-editor{position:relative;font-size:var(--text-sm);line-height:1.5em;background:#000;border-radius:var(--rounded);padding:.5rem .75rem 3rem;color:#fff;font-family:var(--font-mono)}.k-block-type-code-editor .k-editor{white-space:pre-wrap;line-height:1.75em}[dir=ltr] .k-block-type-code-editor-language{right:0}[dir=ltr] .k-block-type-code-editor-language .k-icon,[dir=rtl] .k-block-type-code-editor-language{left:0}.k-block-type-code-editor-language{font-size:var(--text-sm);position:absolute;bottom:0}[dir=rtl] .k-block-type-code-editor-language .k-icon{right:0}.k-block-type-code-editor-language .k-icon{position:absolute;top:0;height:1.5rem;display:flex;width:2rem;z-index:0}.k-block-type-code-editor-language .k-select-input{position:relative;padding:.325rem .75rem .5rem 2rem;z-index:1;font-size:var(--text-xs)}.k-block-type-default .k-block-title{line-height:1.5em}.k-block-type-gallery ul{display:grid;grid-gap:.75rem;grid-template-columns:repeat(auto-fit,minmax(6rem,1fr));line-height:0;align-items:center;justify-content:center;cursor:pointer}.k-block-type-gallery li:empty{padding-bottom:100%;background:var(--color-background)}.k-block-type-gallery li{display:flex;position:relative;align-items:center;justify-content:center}.k-block-type-gallery li img{flex-grow:1;max-width:100%}.k-block-type-heading-input{line-height:1.25em;font-weight:var(--font-bold)}.k-block-type-heading-input[data-level=h1]{font-size:var(--text-3xl);line-height:1.125em}.k-block-type-heading-input[data-level=h2]{font-size:var(--text-2xl)}.k-block-type-heading-input[data-level=h3]{font-size:var(--text-xl)}.k-block-type-heading-input[data-level=h4]{font-size:var(--text-lg)}.k-block-type-heading-input[data-level=h5]{line-height:1.5em;font-size:var(--text-base)}.k-block-type-heading-input[data-level=h6]{line-height:1.5em;font-size:var(--text-sm)}.k-block-type-heading-input .ProseMirror strong{font-weight:700}.k-block-type-image .k-block-figure-container{display:block;text-align:center;line-height:0}.k-block-type-image-auto{max-width:100%;max-height:30rem}.k-block-type-line hr{margin-top:.75rem;margin-bottom:.75rem;border:0;border-top:2px solid var(--color-gray-400)}.k-block-type-markdown-input{position:relative;font-size:var(--text-sm);line-height:1.5em;background:var(--color-background);border-radius:var(--rounded);padding:.5rem .5rem 0;font-family:var(--font-mono)}[dir=ltr] .k-block-type-quote-editor{padding-left:1rem}[dir=rtl] .k-block-type-quote-editor{padding-right:1rem}[dir=ltr] .k-block-type-quote-editor{border-left:2px solid var(--color-black)}[dir=rtl] .k-block-type-quote-editor{border-right:2px solid var(--color-black)}.k-block-type-quote-text{font-size:var(--text-xl);margin-bottom:.25rem;line-height:1.25em}.k-block-type-quote-citation{font-style:italic;font-size:var(--text-sm);color:var(--color-gray-600)}.k-block-type-table-preview{cursor:pointer;width:100%;border:1px solid var(--color-gray-300);border-spacing:0;border-radius:var(--rounded-sm);overflow:hidden;table-layout:fixed;--item-height:38px}[dir=ltr] .k-block-type-table-preview td,[dir=ltr] .k-block-type-table-preview th{text-align:left}[dir=rtl] .k-block-type-table-preview td,[dir=rtl] .k-block-type-table-preview th{text-align:right}.k-block-type-table-preview td{line-height:1.5em;font-size:var(--text-sm);height:var(--item-height);padding:0 .75rem}.k-block-type-table-preview th{line-height:1.5em;padding:.5rem .75rem}.k-block-type-table-preview td [class$=-field-preview],.k-block-type-table-preview td>*{padding:0}.k-block-type-table-preview th,.k-block-type-table-preview tr:not(:last-child) td{border-bottom:1px solid var(--color-gray-300)}.k-block-type-table-preview th{background:var(--color-gray-100);font-family:var(--font-mono);font-size:var(--text-xs)}.k-block-type-table-preview-empty{color:var(--color-gray-600);font-size:var(--text-sm)}.k-block-type-table-preview [data-align]{text-align:var(--align)}.k-block-type-text-input{font-size:var(--text-base);line-height:1.5em;height:100%}.k-block-container-type-text,.k-block-type-text,.k-block-type-text .k-writer .ProseMirror{height:100%}.k-block-container{position:relative;padding:.75rem;background:var(--color-white)}.k-block-container:not(:last-of-type){border-bottom:1px dashed rgba(0,0,0,.1)}.k-block-container:focus{outline:0}.k-block-container[data-batched=true],.k-block-container[data-selected=true]{z-index:2;border-bottom-color:transparent}.k-block-container[data-batched=true]:after{position:absolute;top:0;right:0;bottom:0;left:0;content:"";background:rgba(238,242,246,.375);mix-blend-mode:multiply;border:1px solid var(--color-focus)}.k-block-container[data-selected=true]{box-shadow:var(--color-focus) 0 0 0 1px,var(--color-focus-outline) 0 0 0 3px}[dir=ltr] .k-block-container .k-block-options{right:.75rem}[dir=rtl] .k-block-container .k-block-options{left:.75rem}.k-block-container .k-block-options{display:none;position:absolute;top:0;margin-top:calc(-1.75rem + 2px)}.k-block-container[data-last-in-batch=true]>.k-block-options,.k-block-container[data-selected=true]>.k-block-options{display:flex}.k-block-container[data-hidden=true] .k-block{opacity:.25}.k-drawer-options .k-button[data-disabled=true]{vertical-align:middle;display:inline-grid}[data-disabled=true] .k-block-container{background:var(--color-background)}.k-block-importer.k-dialog{background:#313740;color:var(--color-white)}.k-block-importer .k-dialog-body{padding:0}.k-block-importer label{display:block;padding:var(--spacing-6) var(--spacing-6)0;color:var(--color-gray-400)}.k-block-importer label kbd{background:rgba(0,0,0,.5);font-family:var(--font-mono);letter-spacing:.1em;padding:.25rem;border-radius:var(--rounded);margin:0 .25rem}.k-block-importer textarea{width:100%;height:20rem;background:0 0;font:inherit;color:var(--color-white);border:0;padding:var(--spacing-6);resize:none}.k-block-importer textarea:focus{outline:0}.k-blocks{background:var(--color-white);box-shadow:var(--shadow)}[data-disabled=true] .k-blocks{background:var(--color-background)}.k-blocks[data-multi-select-key=true] .k-block-container>*{pointer-events:none}.k-blocks[data-empty=true]{padding:0;background:0 0;box-shadow:none}.k-blocks .k-sortable-ghost{outline:2px solid var(--color-focus);box-shadow:#11111140 0 5px 10px;cursor:grabbing;cursor:-webkit-grabbing}.k-blocks-list>.k-blocks-empty{display:flex;align-items:center}.k-blocks-list>.k-blocks-empty:not(:only-child){display:none}.k-block-figure{cursor:pointer}.k-block-figure iframe{border:0;pointer-events:none;background:var(--color-black)}.k-block-figure figcaption{padding-top:.5rem;color:var(--color-gray-600);font-size:var(--text-sm);text-align:center}.k-block-figure-empty.k-button{display:flex;width:100%;height:6rem;border-radius:var(--rounded-sm);align-items:center;justify-content:center;color:var(--color-gray-600);background:var(--color-background)}.k-block-options{display:flex;align-items:center;background:var(--color-white);z-index:var(--z-dropdown);box-shadow:#0000001a -2px 0 5px,var(--shadow),var(--shadow-xl);color:var(--color-black);border-radius:var(--rounded)}[dir=ltr] .k-block-options-button{border-right:1px solid var(--color-background)}[dir=rtl] .k-block-options-button{border-left:1px solid var(--color-background)}.k-block-options-button{--block-options-button-size:30px;width:var(--block-options-button-size);height:var(--block-options-button-size);line-height:1;display:inline-flex;align-items:center;justify-content:center}[dir=ltr] .k-block-options-button:first-child{border-top-left-radius:var(--rounded)}[dir=rtl] .k-block-options-button:first-child{border-top-right-radius:var(--rounded)}[dir=ltr] .k-block-options-button:first-child{border-bottom-left-radius:var(--rounded)}[dir=rtl] .k-block-options-button:first-child{border-bottom-right-radius:var(--rounded)}[dir=ltr] .k-block-options-button:last-child{border-top-right-radius:var(--rounded)}[dir=rtl] .k-block-options-button:last-child{border-top-left-radius:var(--rounded)}[dir=ltr] .k-block-options-button:last-child{border-bottom-right-radius:var(--rounded)}[dir=rtl] .k-block-options-button:last-child{border-bottom-left-radius:var(--rounded)}[dir=ltr] .k-block-options-button:last-of-type{border-right:0}[dir=rtl] .k-block-options-button:last-of-type{border-left:0}.k-block-options-button[aria-current]{color:var(--color-focus)}.k-block-options-button:hover{background:var(--color-gray-100)}.k-block-options .k-dropdown-content{margin-top:.5rem}.k-block-selector.k-dialog{background:var(--color-dark);color:var(--color-white)}.k-block-selector .k-headline{margin-bottom:1rem}.k-block-selector details:not(:last-of-type){margin-bottom:1.5rem}.k-block-selector summary{font-size:var(--text-xs);cursor:pointer;color:var(--color-gray-400)}.k-block-selector details:only-of-type summary{pointer-events:none}.k-block-selector summary:focus{outline:0}.k-block-selector summary:focus-visible{color:var(--color-green-400)}.k-block-types{display:grid;grid-gap:2px;margin-top:.75rem;grid-template-columns:repeat(1,1fr)}[dir=ltr] .k-block-types .k-button{text-align:left}[dir=rtl] .k-block-types .k-button{text-align:right}.k-block-types .k-button{display:flex;align-items:flex-start;background:rgba(0,0,0,.5);width:100%;padding:0 .75rem 0 0;line-height:1.5em}.k-block-types .k-button:focus{outline:2px solid var(--color-green-300)}.k-block-types .k-button .k-button-text{padding:.5rem 0 .5rem .5rem}.k-block-types .k-button .k-icon{width:38px;height:38px}.k-clipboard-hint{padding-top:1.5rem;font-size:var(--text-xs);color:var(--color-gray-400)}.k-clipboard-hint kbd{background:rgba(0,0,0,.5);font-family:var(--font-mono);letter-spacing:.1em;padding:.25rem;border-radius:var(--rounded);margin:0 .25rem}[dir=ltr] .k-block-title{padding-right:.75rem}[dir=rtl] .k-block-title{padding-left:.75rem}.k-block-title{display:flex;align-items:center;min-width:0;font-size:var(--text-sm);line-height:1}[dir=ltr] .k-block-icon{margin-right:.5rem}[dir=rtl] .k-block-icon{margin-left:.5rem}.k-block-icon{width:1rem;color:var(--color-gray-500)}[dir=ltr] .k-block-name{margin-right:.5rem}[dir=rtl] .k-block-name{margin-left:.5rem}.k-block-label{color:var(--color-gray-600);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}[data-align=left]{--align:start}[data-align=center]{--align:center}[data-align=right]{--align:end}[data-invalid=true]{border:1px solid var(--color-negative-outline);box-shadow:var(--color-negative-outline) 0 0 3px 2px}[data-invalid=true]:focus-within{border:var(--field-input-invalid-focus-border)!important;box-shadow:var(--color-negative-outline) 0 0 0 2px!important}[data-tabbed=true]{box-shadow:var(--shadow-outline)}[data-theme=positive],[data-theme=success]{--theme:var(--color-positive);--theme-light:var(--color-positive-light);--theme-bg:var(--color-green-300)}[data-theme=error],[data-theme=negative]{--theme:var(--color-negative);--theme-light:var(--color-negative-light);--theme-bg:var(--color-red-300)}[data-theme=notice]{--theme:var(--color-notice);--theme-light:var(--color-notice-light);--theme-bg:var(--color-orange-300)}[data-theme=info]{--theme:var(--color-focus);--theme-light:var(--color-focus-light);--theme-bg:var(--color-blue-200)}.scroll-x,.scroll-x-auto,.scroll-y,.scroll-y-auto{-webkit-overflow-scrolling:touch;transform:translate(0)}.scroll-x,.scroll-x-auto{overflow-x:scroll;overflow-y:hidden}.scroll-x-auto{overflow-x:auto}.scroll-y,.scroll-y-auto{overflow-x:hidden;overflow-y:scroll}.scroll-y-auto{overflow-y:auto}.k-offscreen,.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0} +:root{--color-backdrop:rgba(0, 0, 0, .6);--color-black:#000;--color-dark:#313740;--color-light:var(--color-gray-200);--color-white:#fff;--color-gray-100:#f7f7f7;--color-gray-200:#efefef;--color-gray-300:#ddd;--color-gray-400:#ccc;--color-gray-500:#999;--color-gray-600:#777;--color-gray-700:#555;--color-gray-800:#333;--color-gray-900:#111;--color-gray:var(--color-gray-600);--color-red-200:#edc1c1;--color-red-300:#e3a0a0;--color-red-400:#d16464;--color-red-600:#c82829;--color-red:var(--color-red-600);--color-orange-200:#f2d4bf;--color-orange-300:#ebbe9e;--color-orange-400:#de935f;--color-orange-600:#f4861f;--color-orange:var(--color-orange-600);--color-yellow-200:#f9e8c7;--color-yellow-300:#f7e2b8;--color-yellow-400:#f0c674;--color-yellow-600:#cca000;--color-yellow:var(--color-yellow-600);--color-green-200:#dce5c2;--color-green-300:#c6d49d;--color-green-400:#a7bd68;--color-green-600:#5d800d;--color-green:var(--color-green-600);--color-aqua-200:#d0e5e2;--color-aqua-300:#bbd9d5;--color-aqua-400:#8abeb7;--color-aqua-600:#398e93;--color-aqua:var(--color-aqua-600);--color-blue-200:#cbd7e5;--color-blue-300:#b1c2d8;--color-blue-400:#7e9abf;--color-blue-600:#4271ae;--color-blue:var(--color-blue-600);--color-purple-200:#e0d4e4;--color-purple-300:#d4c3d9;--color-purple-400:#b294bb;--color-purple-600:#9c48b9;--color-purple:var(--color-purple-600);--container:80rem;--font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";--font-mono:"SFMono-Regular", Consolas, Liberation Mono, Menlo, Courier, monospace;--font-normal:400;--font-bold:600;--leading-none:1;--leading-tight:1.25;--leading-snug:1.375;--leading-normal:1.5;--leading-relaxed:1.625;--leading-loose:2;--rounded-xs:1px;--rounded-sm:.125rem;--rounded:.25rem;--rounded-md:.375rem;--shadow:0 1px 3px 0 rgba(0, 0, 0, .1), 0 1px 2px 0 rgba(0, 0, 0, .06);--shadow-md:0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -1px rgba(0, 0, 0, .06);--shadow-lg:0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -2px rgba(0, 0, 0, .05);--shadow-xl:0 20px 25px -5px rgba(0, 0, 0, .1), 0 10px 10px -5px rgba(0, 0, 0, .04);--shadow-outline:currentColor 0 0 0 2px;--shadow-inset:inset 0 2px 4px 0 rgba(0, 0, 0, .06);--spacing-0:0;--spacing-px:1px;--spacing-2px:2px;--spacing-1:.25rem;--spacing-2:.5rem;--spacing-3:.75rem;--spacing-4:1rem;--spacing-5:1.25rem;--spacing-6:1.5rem;--spacing-8:2rem;--spacing-10:2.5rem;--spacing-12:3rem;--spacing-16:4rem;--spacing-20:5rem;--spacing-24:6rem;--spacing-36:9rem;--text-xs:.75rem;--text-sm:.875rem;--text-base:1rem;--text-lg:1.125rem;--text-xl:1.25rem;--text-2xl:1.5rem;--text-3xl:1.75rem;--text-4xl:2.5rem;--text-5xl:3rem;--text-6xl:4rem;--color-background:var(--color-light);--color-border:var(--color-gray-400);--color-focus:var(--color-blue-600);--color-focus-light:var(--color-blue-400);--color-focus-outline:rgba(113, 143, 183, .25);--color-negative:var(--color-red-600);--color-negative-light:var(--color-red-400);--color-negative-outline:rgba(212, 110, 110, .25);--color-notice:var(--color-orange-600);--color-notice-light:var(--color-orange-400);--color-positive:var(--color-green-600);--color-positive-light:var(--color-green-400);--color-positive-outline:rgba(128, 149, 65, .25);--color-text:var(--color-gray-900);--color-text-light:var(--color-gray-600);--z-offline:1200;--z-fatal:1100;--z-loader:1000;--z-notification:900;--z-dialog:800;--z-navigation:700;--z-dropdown:600;--z-drawer:500;--z-dropzone:400;--z-toolbar:300;--z-content:200;--z-background:100;--bg-pattern:repeating-conic-gradient( rgba(0, 0, 0, 0) 0% 25%, rgba(0, 0, 0, .2) 0% 50% ) 50% / 20px 20px;--shadow-sticky:rgba(0, 0, 0, .05) 0 2px 5px;--shadow-dropdown:var(--shadow-lg);--shadow-item:var(--shadow);--field-input-padding:.5rem;--field-input-height:2.25rem;--field-input-line-height:1.25rem;--field-input-font-size:var(--text-base);--field-input-color-before:var(--color-gray-700);--field-input-color-after:var(--color-gray-700);--field-input-border:1px solid var(--color-border);--field-input-focus-border:1px solid var(--color-focus);--field-input-focus-outline:2px solid var(--color-focus-outline);--field-input-invalid-border:1px solid var(--color-negative-outline);--field-input-invalid-outline:0;--field-input-invalid-focus-border:1px solid var(--color-negative);--field-input-invalid-focus-outline:2px solid var(--color-negative-outline);--field-input-background:var(--color-white);--field-input-disabled-color:var(--color-gray-500);--field-input-disabled-background:var(--color-white);--field-input-disabled-border:1px solid var(--color-gray-300);--font-family-sans:var(--font-sans);--font-family-mono:var(--font-mono);--font-size-tiny:var(--text-xs);--font-size-small:var(--text-sm);--font-size-medium:var(--text-base);--font-size-large:var(--text-xl);--font-size-huge:var(--text-2xl);--font-size-monster:var(--text-3xl);--box-shadow-dropdown:var(--shadow-dropdown);--box-shadow-item:var(--shadow);--box-shadow-focus:var(--shadow-xl)}*,:after,:before{margin:0;padding:0;box-sizing:border-box}noscript{padding:1.5rem;display:flex;align-items:center;justify-content:center;height:100vh;text-align:center}html{font-family:var(--font-sans);background:var(--color-background)}body,html{color:var(--color-gray-900);height:100%;overflow:hidden}a{color:inherit;text-decoration:none}li{list-style:none}b,strong{font-weight:var(--font-bold)}@keyframes LoadingCursor{to{cursor:progress}}@keyframes Spin{to{transform:rotate(360deg)}}.k-dialog{position:relative;background:var(--color-background);width:100%;box-shadow:var(--shadow-lg);border-radius:var(--rounded-md);line-height:1;max-height:calc(100vh - 3rem);margin:1.5rem;display:flex;flex-direction:column}@media screen and (min-width:20rem){.k-dialog[data-size=small]{width:20rem}}@media screen and (min-width:22rem){.k-dialog[data-size=default]{width:22rem}}@media screen and (min-width:30rem){.k-dialog[data-size=medium]{width:30rem}}@media screen and (min-width:40rem){.k-dialog[data-size=large]{width:40rem}}[dir=ltr] .k-dialog-notification,[dir=rtl] .k-dialog-notification{border-top-right-radius:var(--rounded);border-top-left-radius:var(--rounded)}.k-dialog-notification{padding:.75rem 1.5rem;background:var(--color-gray-900);width:100%;margin-top:-1px;line-height:1.25rem;color:var(--color-white);display:flex;flex-shrink:0;align-items:center}.k-dialog-notification[data-theme]{background:var(--theme-light);color:var(--color-black)}.k-dialog-notification p{flex-grow:1;word-wrap:break-word;overflow:hidden}[dir=ltr] .k-dialog-notification .k-button{margin-left:1rem}[dir=rtl] .k-dialog-notification .k-button{margin-right:1rem}.k-dialog-notification .k-button{display:flex}.k-dialog-body{padding:1.5rem}.k-dialog-body .k-fieldset{padding-bottom:.5rem}.k-dialog-footer{padding:0;border-top:1px solid var(--color-gray-300);line-height:1;flex-shrink:0}.k-dialog-footer .k-button-group{display:flex;margin:0;justify-content:space-between}.k-dialog-footer .k-button-group .k-button{padding:.75rem 1rem;line-height:1.25rem}[dir=ltr] .k-dialog-footer .k-button-group .k-button:first-child{text-align:left}[dir=rtl] .k-dialog-footer .k-button-group .k-button:first-child{text-align:right}[dir=ltr] .k-dialog-footer .k-button-group .k-button:first-child{padding-left:1.5rem}[dir=rtl] .k-dialog-footer .k-button-group .k-button:first-child{padding-right:1.5rem}[dir=ltr] .k-dialog-footer .k-button-group .k-button:last-child{text-align:right}[dir=rtl] .k-dialog-footer .k-button-group .k-button:last-child{text-align:left}[dir=ltr] .k-dialog-footer .k-button-group .k-button:last-child{padding-right:1.5rem}[dir=rtl] .k-dialog-footer .k-button-group .k-button:last-child{padding-left:1.5rem}.k-dialog .k-pagination{margin-bottom:-1.5rem;display:flex;justify-content:center;align-items:center}.k-dialog-search{margin-bottom:.75rem}.k-dialog-search.k-input{background:rgba(0,0,0,.075);padding:0 1rem;height:36px;border-radius:var(--rounded)}.k-error-details{background:var(--color-white);display:block;overflow:auto;padding:1rem;font-size:var(--text-sm);line-height:1.25em;margin-top:.75rem}.k-error-details dt{color:var(--color-negative-light);margin-bottom:.25rem}.k-error-details dd{overflow:hidden;overflow-wrap:break-word;text-overflow:ellipsis}.k-error-details dd:not(:last-of-type){margin-bottom:1.5em}.k-error-details li:not(:last-child){border-bottom:1px solid var(--color-background);padding-bottom:.25rem;margin-bottom:.25rem}.k-files-dialog .k-list-item{cursor:pointer}[dir=ltr] .k-pages-dialog-navbar{padding-right:38px}[dir=rtl] .k-pages-dialog-navbar{padding-left:38px}.k-pages-dialog-navbar{display:flex;align-items:center;justify-content:center;margin-bottom:.5rem}.k-pages-dialog-navbar .k-button{width:38px}.k-pages-dialog-navbar .k-button[disabled]{opacity:0}.k-pages-dialog-navbar .k-headline{flex-grow:1;text-align:center}.k-pages-dialog .k-list-item{cursor:pointer}.k-pages-dialog .k-list-item .k-button[data-theme=disabled],.k-pages-dialog .k-list-item .k-button[disabled]{opacity:.25}.k-pages-dialog .k-list-item .k-button[data-theme=disabled]:hover{opacity:1}.k-users-dialog .k-list-item{cursor:pointer}.k-drawer{--drawer-header-height:2.5rem;--drawer-header-padding:1.5rem;position:fixed;top:0;right:0;bottom:0;left:0;z-index:var(--z-toolbar);display:flex;align-items:stretch;justify-content:flex-end;background:rgba(0,0,0,.2)}.k-drawer-box{position:relative;flex-basis:50rem;display:flex;flex-direction:column;background:var(--color-background);box-shadow:var(--shadow-xl)}[dir=ltr] .k-drawer-header{padding-left:var(--drawer-header-padding)}[dir=rtl] .k-drawer-header{padding-right:var(--drawer-header-padding)}.k-drawer-header{flex-shrink:0;height:var(--drawer-header-height);display:flex;align-items:center;line-height:1;justify-content:space-between;background:var(--color-white);font-size:var(--text-sm)}.k-drawer-title{padding:0 .75rem}[dir=ltr] .k-drawer-breadcrumb,[dir=ltr] .k-drawer-title{margin-left:-.75rem}[dir=rtl] .k-drawer-breadcrumb,[dir=rtl] .k-drawer-title{margin-right:-.75rem}.k-drawer-breadcrumb,.k-drawer-title{display:flex;flex-grow:1;align-items:center;min-width:0;font-size:var(--text-sm);font-weight:var(--font-normal)}[dir=ltr] .k-drawer-breadcrumb li:not(:last-child) .k-button:after{right:-.75rem}[dir=rtl] .k-drawer-breadcrumb li:not(:last-child) .k-button:after{left:-.75rem}.k-drawer-breadcrumb li:not(:last-child) .k-button:after{position:absolute;width:1.5rem;display:inline-flex;justify-content:center;align-items:center;content:"\203a";color:var(--color-gray-500);height:var(--drawer-header-height)}[dir=ltr] .k-drawer-breadcrumb .k-icon,[dir=ltr] .k-drawer-title .k-icon{margin-right:.5rem}[dir=rtl] .k-drawer-breadcrumb .k-icon,[dir=rtl] .k-drawer-title .k-icon{margin-left:.5rem}.k-drawer-breadcrumb .k-icon,.k-drawer-title .k-icon{width:1rem;color:var(--color-gray-500)}.k-drawer-breadcrumb .k-button{display:inline-flex;align-items:center;height:var(--drawer-header-height);padding-left:.75rem;padding-right:.75rem}.k-drawer-breadcrumb .k-button-text{opacity:1}[dir=ltr] .k-drawer-breadcrumb .k-button .k-button-icon~.k-button-text{padding-left:0}[dir=rtl] .k-drawer-breadcrumb .k-button .k-button-icon~.k-button-text{padding-right:0}[dir=ltr] .k-drawer-tabs{margin-right:.75rem}[dir=rtl] .k-drawer-tabs{margin-left:.75rem}.k-drawer-tabs{display:flex;align-items:center;line-height:1}.k-drawer-tab.k-button{height:var(--drawer-header-height);padding-left:.75rem;padding-right:.75rem;display:flex;align-items:center;font-size:var(--text-xs)}.k-drawer-tab.k-button[aria-current]:after{position:absolute;bottom:-1px;left:.75rem;right:.75rem;content:"";background:var(--color-black);height:2px}[dir=ltr] .k-drawer-options{padding-right:.75rem}[dir=rtl] .k-drawer-options{padding-left:.75rem}.k-drawer-option.k-button{width:var(--drawer-header-height);height:var(--drawer-header-height);color:var(--color-gray-500);line-height:1}.k-drawer-option.k-button:focus,.k-drawer-option.k-button:hover{color:var(--color-black)}.k-drawer-body{padding:1.5rem;flex-grow:1;background:var(--color-background)}.k-drawer[data-nested=true]{background:0 0}.k-drawer-body .k-table th,.k-drawer-body .k-textarea-input:focus-within .k-toolbar{top:-1.5rem}.k-calendar-input{--cell-padding:.25rem .5rem;padding:.5rem;color:var(--color-light);border-radius:var(--rounded-xs)}.k-calendar-table{table-layout:fixed;width:100%;min-width:15rem;padding-top:.5rem}.k-calendar-input>nav{display:flex;direction:ltr}.k-calendar-input>nav .k-button{padding:.5rem}.k-calendar-selects{flex-grow:1;display:flex;align-items:center;justify-content:center}[dir=ltr] .k-calendar-selects{direction:ltr}[dir=rtl] .k-calendar-selects{direction:rtl}.k-calendar-selects .k-select-input{padding:0 .5rem;font-weight:var(--font-normal);font-size:var(--text-sm)}.k-calendar-selects .k-select-input:focus-within{color:var(--color-focus-light)!important}.k-calendar-input th{padding:.5rem 0;color:var(--color-gray-500);font-size:var(--text-xs);font-weight:400;text-align:center}.k-calendar-day .k-button{width:2rem;height:2rem;margin-left:auto;margin-right:auto;color:var(--color-white);line-height:1.75rem;display:flex;justify-content:center;border-radius:50%;border:2px solid transparent}.k-calendar-day .k-button .k-button-text{opacity:1}.k-calendar-table .k-button:hover{color:var(--color-white)}.k-calendar-day:hover .k-button:not([data-disabled=true]){border-color:#ffffff40}.k-calendar-day[aria-current=date] .k-button{text-decoration:underline}.k-calendar-day[aria-selected=date] .k-button{border-color:currentColor;font-weight:600;color:var(--color-focus-light)}.k-calendar-today{text-align:center;padding-top:.5rem}.k-calendar-today .k-button{font-size:var(--text-xs);padding:1rem;text-decoration:underline}.k-calendar-today .k-button-text{opacity:1;vertical-align:baseline}.k-counter{font-size:var(--text-xs);color:var(--color-gray-900);font-weight:var(--font-bold)}.k-counter[data-invalid=true]{box-shadow:none;border:0;color:var(--color-negative)}[dir=ltr] .k-counter-rules{padding-left:.5rem}[dir=rtl] .k-counter-rules{padding-right:.5rem}.k-counter-rules{color:var(--color-gray-600);font-weight:var(--font-normal)}.k-form-submitter{display:none}.k-form-buttons[data-theme]{background:var(--theme-light)}.k-form-buttons .k-view{display:flex;justify-content:space-between;align-items:center}.k-form-button.k-button{font-weight:500;white-space:nowrap;line-height:1;height:2.5rem;display:flex;padding:0 1rem;align-items:center}[dir=ltr] .k-form-button:first-child{margin-left:-1rem}[dir=rtl] .k-form-button:first-child{margin-right:-1rem}[dir=ltr] .k-form-button:last-child{margin-right:-1rem}[dir=rtl] .k-form-button:last-child{margin-left:-1rem}[dir=ltr] .k-form-lock-info{margin-right:3rem}[dir=rtl] .k-form-lock-info{margin-left:3rem}.k-form-lock-info{display:flex;font-size:var(--text-sm);align-items:center;line-height:1.5em;padding:.625rem 0}[dir=ltr] .k-form-lock-info>.k-icon{margin-right:.5rem}[dir=rtl] .k-form-lock-info>.k-icon{margin-left:.5rem}.k-form-lock-buttons{display:flex;flex-shrink:0}.k-form-lock-loader{animation:Spin 4s linear infinite}.k-form-lock-loader .k-icon-loader{display:flex}.k-form-indicator-toggle{color:var(--color-notice-light)}.k-form-indicator-info{font-size:var(--text-sm);font-weight:var(--font-bold);padding:.75rem 1rem .25rem;line-height:1.25em;width:15rem}.k-field-label{font-weight:var(--font-bold);display:block;padding:0 0 .75rem;flex-grow:1;line-height:1.25rem}[dir=ltr] .k-field-label abbr{padding-left:.25rem}[dir=rtl] .k-field-label abbr{padding-right:.25rem}.k-field-label abbr{text-decoration:none;color:var(--color-gray-500)}.k-field-header{position:relative;display:flex;align-items:baseline}[dir=ltr] .k-field-options{right:0}[dir=rtl] .k-field-options{left:0}.k-field-options{position:absolute;top:calc(-.5rem - 1px)}.k-field-options.k-button-group .k-dropdown{height:auto}.k-field-options.k-button-group .k-field-options-button.k-button{padding:.75rem;display:flex}.k-field[data-disabled=true]{cursor:not-allowed}.k-field[data-disabled=true] *{pointer-events:none}.k-field[data-disabled=true] .k-text[data-theme=help] *{pointer-events:initial}.k-field:focus-within>.k-field-header>.k-field-counter{display:block}.k-field-help{padding-top:.5rem}.k-fieldset{border:0}.k-fieldset .k-grid{grid-row-gap:2.25rem}@media screen and (min-width:30em){.k-fieldset .k-grid{grid-column-gap:1.5rem}}.k-sections>.k-column[data-width="1/3"] .k-fieldset .k-grid,.k-sections>.k-column[data-width="1/4"] .k-fieldset .k-grid{grid-template-columns:repeat(1,1fr)}.k-sections>.k-column[data-width="1/3"] .k-fieldset .k-grid .k-column,.k-sections>.k-column[data-width="1/4"] .k-fieldset .k-grid .k-column{grid-column-start:initial}.k-input{display:flex;align-items:center;line-height:1;border:0;outline:0;background:0 0}.k-input-element{flex-grow:1}.k-input-icon{display:flex;justify-content:center;align-items:center;line-height:0}.k-input[data-disabled=true]{pointer-events:none}[data-disabled=true] .k-input-icon{color:var(--color-gray-600)}.k-input[data-theme=field]{line-height:1;border:var(--field-input-border);background:var(--field-input-background);border-radius:var(--rounded)}.k-input[data-theme=field]:focus-within{border:var(--field-input-focus-border);box-shadow:var(--color-focus-outline) 0 0 0 2px}.k-input[data-theme=field][data-disabled=true]{background:var(--color-background)}.k-input[data-theme=field] .k-input-icon{width:var(--field-input-height);align-self:stretch;display:flex;align-items:center;flex-shrink:0}.k-input[data-theme=field] .k-input-after,.k-input[data-theme=field] .k-input-before{align-self:stretch;display:flex;align-items:center;flex-shrink:0;padding:0 var(--field-input-padding)}[dir=ltr] .k-input[data-theme=field] .k-input-before{padding-right:0}[dir=ltr] .k-input[data-theme=field] .k-input-after,[dir=rtl] .k-input[data-theme=field] .k-input-before{padding-left:0}.k-input[data-theme=field] .k-input-before{color:var(--field-input-color-before)}[dir=rtl] .k-input[data-theme=field] .k-input-after{padding-right:0}.k-input[data-theme=field] .k-input-after{color:var(--field-input-color-after)}.k-input[data-theme=field] .k-input-icon>.k-dropdown{width:100%;height:100%}.k-input[data-theme=field] .k-input-icon-button{width:100%;height:100%;display:flex;align-items:center;justify-content:center;flex-shrink:0}.k-input[data-theme=field] .k-number-input,.k-input[data-theme=field] .k-select-input,.k-input[data-theme=field] .k-text-input{padding:var(--field-input-padding);line-height:var(--field-input-line-height)}.k-input[data-theme=field] .k-date-input .k-select-input,.k-input[data-theme=field] .k-time-input .k-select-input{padding-left:0;padding-right:0}[dir=ltr] .k-input[data-theme=field] .k-date-input .k-select-input:first-child,[dir=ltr] .k-input[data-theme=field] .k-time-input .k-select-input:first-child{padding-left:var(--field-input-padding)}[dir=rtl] .k-input[data-theme=field] .k-date-input .k-select-input:first-child,[dir=rtl] .k-input[data-theme=field] .k-time-input .k-select-input:first-child{padding-right:var(--field-input-padding)}.k-input[data-theme=field] .k-date-input .k-select-input:focus-within,.k-input[data-theme=field] .k-time-input .k-select-input:focus-within{color:var(--color-focus);font-weight:var(--font-bold)}[dir=ltr] .k-input[data-theme=field].k-time-input .k-time-input-meridiem{padding-left:var(--field-input-padding)}[dir=rtl] .k-input[data-theme=field].k-time-input .k-time-input-meridiem{padding-right:var(--field-input-padding)}.k-input[data-theme=field][data-type=checkboxes] .k-checkboxes-input li,.k-input[data-theme=field][data-type=checkboxes] .k-radio-input li,.k-input[data-theme=field][data-type=radio] .k-checkboxes-input li,.k-input[data-theme=field][data-type=radio] .k-radio-input li{min-width:0;overflow-wrap:break-word}[dir=ltr] .k-input[data-theme=field][data-type=checkboxes] .k-input-before{border-right:1px solid var(--color-background)}[dir=ltr] .k-input[data-theme=field][data-type=checkboxes] .k-input-element+.k-input-after,[dir=ltr] .k-input[data-theme=field][data-type=checkboxes] .k-input-element+.k-input-icon,[dir=rtl] .k-input[data-theme=field][data-type=checkboxes] .k-input-before{border-left:1px solid var(--color-background)}[dir=ltr] .k-input[data-theme=field][data-type=checkboxes] .k-checkboxes-input li,[dir=rtl] .k-input[data-theme=field][data-type=checkboxes] .k-input-element+.k-input-after,[dir=rtl] .k-input[data-theme=field][data-type=checkboxes] .k-input-element+.k-input-icon{border-right:1px solid var(--color-background)}.k-input[data-theme=field][data-type=checkboxes] .k-input-element{overflow:hidden}[dir=ltr] .k-input[data-theme=field][data-type=checkboxes] .k-checkboxes-input{margin-right:-1px}[dir=rtl] .k-input[data-theme=field][data-type=checkboxes] .k-checkboxes-input{margin-left:-1px}.k-input[data-theme=field][data-type=checkboxes] .k-checkboxes-input{display:grid;grid-template-columns:1fr;margin-bottom:-1px}@media screen and (min-width:65em){.k-input[data-theme=field][data-type=checkboxes] .k-checkboxes-input{grid-template-columns:repeat(var(--columns),1fr)}}[dir=rtl] .k-input[data-theme=field][data-type=checkboxes] .k-checkboxes-input li{border-left:1px solid var(--color-background)}.k-input[data-theme=field][data-type=checkboxes] .k-checkboxes-input li,.k-input[data-theme=field][data-type=radio] .k-radio-input li{border-bottom:1px solid var(--color-background)}.k-input[data-theme=field][data-type=checkboxes] .k-checkboxes-input label{display:block;line-height:var(--field-input-line-height);padding:var(--field-input-padding) var(--field-input-padding)}[dir=ltr] .k-input[data-theme=field][data-type=checkboxes] .k-checkbox-input-icon,[dir=ltr] .k-input[data-theme=field][data-type=radio] .k-radio-input label:before{left:var(--field-input-padding)}[dir=rtl] .k-input[data-theme=field][data-type=checkboxes] .k-checkbox-input-icon,[dir=rtl] .k-input[data-theme=field][data-type=radio] .k-radio-input label:before{right:var(--field-input-padding)}.k-input[data-theme=field][data-type=checkboxes] .k-checkbox-input-icon{top:calc((var(--field-input-height) - var(--field-input-font-size))/2);margin-top:0}[dir=ltr] .k-input[data-theme=field][data-type=radio] .k-input-before{border-right:1px solid var(--color-background)}[dir=ltr] .k-input[data-theme=field][data-type=radio] .k-input-element+.k-input-after,[dir=ltr] .k-input[data-theme=field][data-type=radio] .k-input-element+.k-input-icon,[dir=rtl] .k-input[data-theme=field][data-type=radio] .k-input-before{border-left:1px solid var(--color-background)}[dir=ltr] .k-input[data-theme=field][data-type=radio] .k-radio-input li,[dir=rtl] .k-input[data-theme=field][data-type=radio] .k-input-element+.k-input-after,[dir=rtl] .k-input[data-theme=field][data-type=radio] .k-input-element+.k-input-icon{border-right:1px solid var(--color-background)}.k-input[data-theme=field][data-type=radio] .k-input-element{overflow:hidden}[dir=ltr] .k-input[data-theme=field][data-type=radio] .k-radio-input{margin-right:-1px}[dir=rtl] .k-input[data-theme=field][data-type=radio] .k-radio-input{margin-left:-1px}.k-input[data-theme=field][data-type=radio] .k-radio-input{display:grid;grid-template-columns:1fr;margin-bottom:-1px}@media screen and (min-width:65em){.k-input[data-theme=field][data-type=radio] .k-radio-input{grid-template-columns:repeat(var(--columns),1fr)}}[dir=rtl] .k-input[data-theme=field][data-type=radio] .k-radio-input li{border-left:1px solid var(--color-background)}.k-input[data-theme=field][data-type=radio] .k-radio-input label{display:block;flex-grow:1;min-height:var(--field-input-height);line-height:var(--field-input-line-height);padding:calc((var(--field-input-height) - var(--field-input-line-height))/2) var(--field-input-padding)}.k-input[data-theme=field][data-type=radio] .k-radio-input label:before{top:calc((var(--field-input-height) - 1rem)/2);margin-top:-1px}.k-input[data-theme=field][data-type=radio] .k-radio-input .k-radio-input-info{display:block;font-size:var(--text-sm);color:var(--color-gray-600);line-height:var(--field-input-line-height);padding-top:calc(var(--field-input-line-height)/10)}.k-input[data-theme=field][data-type=radio] .k-radio-input .k-icon{width:var(--field-input-height);height:var(--field-input-height);display:flex;align-items:center;justify-content:center}.k-input[data-theme=field][data-type=range] .k-range-input{padding:var(--field-input-padding)}.k-input[data-theme=field][data-type=multiselect],.k-input[data-theme=field][data-type=select]{position:relative}[dir=ltr] .k-input[data-theme=field][data-type=select] .k-input-icon{right:0}[dir=rtl] .k-input[data-theme=field][data-type=select] .k-input-icon{left:0}.k-input[data-theme=field][data-type=select] .k-input-icon{position:absolute;top:0;bottom:0}.k-input[data-theme=field][data-type=tags] .k-tags-input{padding:.25rem .25rem 0}[dir=ltr] .k-input[data-theme=field][data-type=tags] .k-tag{margin-right:.25rem}[dir=rtl] .k-input[data-theme=field][data-type=tags] .k-tag{margin-left:.25rem}.k-input[data-theme=field][data-type=tags] .k-tag{margin-bottom:.25rem;height:auto;min-height:1.75rem;font-size:var(--text-sm)}.k-input[data-theme=field][data-type=tags] .k-tags-input input{font-size:var(--text-sm);padding:0 .25rem;height:1.75rem;line-height:1;margin-bottom:.25rem}.k-input[data-theme=field][data-type=tags] .k-tags-input .k-dropdown-content{top:calc(100% + .5rem + 2px)}.k-input[data-theme=field][data-type=tags] .k-tags-input .k-dropdown-content[data-dropup]{top:calc(100% + .5rem + 2px);bottom:initial;margin-bottom:initial}.k-input[data-theme=field][data-type=multiselect] .k-multiselect-input{padding:.25rem 2rem 0 .25rem;min-height:2.25rem}[dir=ltr] .k-input[data-theme=field][data-type=multiselect] .k-tag{margin-right:.25rem}[dir=rtl] .k-input[data-theme=field][data-type=multiselect] .k-tag{margin-left:.25rem}.k-input[data-theme=field][data-type=multiselect] .k-tag{margin-bottom:.25rem;height:1.75rem;font-size:var(--text-sm)}[dir=ltr] .k-input[data-theme=field][data-type=multiselect] .k-input-icon{right:0}[dir=rtl] .k-input[data-theme=field][data-type=multiselect] .k-input-icon{left:0}.k-input[data-theme=field][data-type=multiselect] .k-input-icon{position:absolute;top:0;bottom:0;pointer-events:none}.k-input[data-theme=field][data-type=textarea] .k-textarea-input-native{padding:.25rem var(--field-input-padding);line-height:1.5rem}[dir=ltr] .k-input[data-theme=field][data-type=toggle] .k-input-before{padding-right:calc(var(--field-input-padding)/2)}[dir=rtl] .k-input[data-theme=field][data-type=toggle] .k-input-before{padding-left:calc(var(--field-input-padding)/2)}[dir=ltr] .k-input[data-theme=field][data-type=toggle] .k-toggle-input{padding-left:var(--field-input-padding)}[dir=rtl] .k-input[data-theme=field][data-type=toggle] .k-toggle-input{padding-right:var(--field-input-padding)}.k-input[data-theme=field][data-type=toggle] .k-toggle-input-label{padding:0 var(--field-input-padding)0 .75rem;line-height:var(--field-input-height)}.k-login-code-form .k-user-info{height:38px;margin-bottom:2.25rem;padding:.5rem;background:var(--color-white);border-radius:var(--rounded-xs);box-shadow:var(--shadow)}.k-times{padding:var(--spacing-4) var(--spacing-6);display:grid;line-height:1;grid-template-columns:1fr 1fr;grid-gap:var(--spacing-6)}.k-times .k-icon{width:1rem;margin-bottom:var(--spacing-2)}.k-times-slot .k-button{padding:var(--spacing-1) var(--spacing-3) var(--spacing-1)0;font-variant-numeric:tabular-nums;white-space:nowrap}.k-times .k-times-slot hr{position:relative;opacity:1;margin:var(--spacing-2)0;border:0;height:1px;top:1px;background:var(--color-dark)}[dir=ltr] .k-upload input{left:-3000px}[dir=rtl] .k-upload input{right:-3000px}.k-upload input{position:absolute;top:0}.k-upload-dialog .k-headline{margin-bottom:.75rem}.k-upload-error-list,.k-upload-list{line-height:1.5em;font-size:var(--text-sm)}.k-upload-list-filename{color:var(--color-gray-600)}.k-upload-error-list li{padding:.75rem;background:var(--color-white);border-radius:var(--rounded-xs)}.k-upload-error-list li:not(:last-child){margin-bottom:2px}.k-upload-error-filename{color:var(--color-negative);font-weight:var(--font-bold)}.k-upload-error-message{color:var(--color-gray-600)}.k-writer-toolbar{position:absolute;display:flex;background:var(--color-black);height:30px;transform:translate(-50%) translateY(-.75rem);z-index:calc(var(--z-dropdown) + 1);box-shadow:var(--shadow);color:var(--color-white);border-radius:var(--rounded)}.k-writer-toolbar-button.k-button{display:flex;align-items:center;justify-content:center;height:30px;width:30px;font-size:var(--text-sm)!important;color:currentColor;line-height:1}.k-writer-toolbar-button.k-button:hover{background:rgba(255,255,255,.15)}.k-writer-toolbar-button.k-writer-toolbar-button-active{color:var(--color-blue-300)}.k-writer-toolbar-button.k-writer-toolbar-nodes{width:auto;padding:0 .75rem}[dir=ltr] .k-writer-toolbar .k-dropdown+.k-writer-toolbar-button{border-left:1px solid var(--color-gray-700)}[dir=rtl] .k-writer-toolbar .k-dropdown+.k-writer-toolbar-button{border-right:1px solid var(--color-gray-700)}[dir=ltr] .k-writer-toolbar-button.k-writer-toolbar-nodes:after{margin-left:.5rem}[dir=rtl] .k-writer-toolbar-button.k-writer-toolbar-nodes:after{margin-right:.5rem}.k-writer-toolbar-button.k-writer-toolbar-nodes:after{content:"";border-top:4px solid var(--color-white);border-left:4px solid transparent;border-right:4px solid transparent}.k-writer-toolbar .k-dropdown-content{color:var(--color-black);background:var(--color-white);margin-top:.5rem}.k-writer-toolbar .k-dropdown-content .k-dropdown-item[aria-current]{color:var(--color-focus);font-weight:500}.k-writer{position:relative;width:100%;grid-template-areas:"content";display:grid}.k-writer .ProseMirror{overflow-wrap:break-word;word-wrap:break-word;word-break:break-word;white-space:pre-wrap;font-variant-ligatures:none;line-height:inherit;grid-area:content}.k-writer .ProseMirror:focus{outline:0}.k-writer .ProseMirror *{caret-color:currentColor}.k-writer .ProseMirror a{color:var(--color-focus);text-decoration:underline}.k-writer .ProseMirror>:last-child{margin-bottom:0}.k-writer .ProseMirror h1,.k-writer .ProseMirror h2,.k-writer .ProseMirror h3,.k-writer .ProseMirror ol,.k-writer .ProseMirror p,.k-writer .ProseMirror ul{margin-bottom:.75rem}.k-writer .ProseMirror h1{font-size:var(--text-3xl);line-height:1.25em}.k-writer .ProseMirror h2{font-size:var(--text-2xl);line-height:1.25em}.k-writer .ProseMirror h3{font-size:var(--text-xl);line-height:1.25em}.k-writer .ProseMirror h1 strong,.k-writer .ProseMirror h2 strong,.k-writer .ProseMirror h3 strong{font-weight:700}.k-writer .ProseMirror strong{font-weight:600}.k-writer .ProseMirror code{position:relative;font-size:.925em;display:inline-block;line-height:1.325;padding:.05em .325em;background:var(--color-gray-300);border-radius:var(--rounded)}[dir=ltr] .k-writer .ProseMirror ol,[dir=ltr] .k-writer .ProseMirror ul{padding-left:1.75rem}[dir=rtl] .k-writer .ProseMirror ol,[dir=rtl] .k-writer .ProseMirror ul{padding-right:1.75rem}.k-writer .ProseMirror ul>li{list-style:disc}.k-writer .ProseMirror ul ul>li{list-style:circle}.k-writer .ProseMirror ul ul ul>li{list-style:square}.k-writer .ProseMirror ol>li{list-style:decimal}.k-writer .ProseMirror li>ol,.k-writer .ProseMirror li>p,.k-writer .ProseMirror li>ul{margin:0}.k-writer-code pre{-moz-tab-size:2;-o-tab-size:2;tab-size:2;font-size:var(--text-sm);line-height:2em;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;white-space:pre}.k-writer .ProseMirror code,.k-writer-code code{font-family:var(--font-mono)}.k-writer[data-placeholder][data-empty=true]:before{grid-area:content;content:attr(data-placeholder);line-height:inherit;color:var(--color-gray-500);pointer-events:none;white-space:pre-wrap;word-wrap:break-word}.k-login-alert{padding:.5rem .75rem;display:flex;justify-content:space-between;align-items:center;min-height:38px;margin-bottom:2rem;background:var(--color-negative);color:var(--color-white);font-size:var(--text-sm);border-radius:var(--rounded-xs);box-shadow:var(--shadow-lg);cursor:pointer}.k-structure-backdrop{position:absolute;top:0;right:0;bottom:0;left:0;z-index:2;height:100vh}.k-structure-form section{position:relative;z-index:3;border-radius:var(--rounded-xs);margin-bottom:1px;box-shadow:#1111110d 0 0 0 3px;border:1px solid var(--color-border);background:var(--color-background)}.k-structure-form-fields{padding:1.5rem 1.5rem 2rem}.k-structure-form-buttons{border-top:1px solid var(--color-border);display:flex;justify-content:space-between}.k-structure-form-buttons .k-pagination{display:none}@media screen and (min-width:65em){.k-structure-form-buttons .k-pagination{display:flex}}.k-structure-form-buttons .k-pagination>.k-button,.k-structure-form-buttons .k-pagination>span{padding:.875rem 1rem!important}.k-structure-form-cancel-button,.k-structure-form-submit-button{padding:.875rem 1.5rem;line-height:1rem;display:flex}[dir=ltr] .k-toolbar,[dir=rtl] .k-toolbar{border-top-right-radius:var(--rounded);border-top-left-radius:var(--rounded)}.k-toolbar{background:var(--color-white);border-bottom:1px solid var(--color-background);height:38px}.k-toolbar-wrapper{position:absolute;top:0;left:0;right:0;max-width:100%}.k-toolbar-buttons{display:flex}.k-toolbar-divider{width:1px;background:var(--color-background)}.k-toolbar-button{width:36px;height:36px}.k-toolbar-button:hover{background:rgba(239,239,239,.5)}.k-checkbox-input{position:relative;cursor:pointer}[dir=ltr] .k-checkbox-input-label{padding-left:1.75rem}[dir=rtl] .k-checkbox-input-label{padding-right:1.75rem}.k-checkbox-input-label{display:block}[dir=ltr] .k-checkbox-input-icon{left:0}[dir=rtl] .k-checkbox-input-icon{right:0}.k-checkbox-input-icon{position:absolute;width:1rem;height:1rem;border-radius:var(--rounded);border:2px solid var(--color-gray-500)}.k-checkbox-input-icon svg{position:absolute;width:12px;height:12px;display:none}.k-checkbox-input-icon path{stroke:var(--color-white)}.k-checkbox-input-native:checked+.k-checkbox-input-icon{border-color:var(--color-gray-900);background:var(--color-gray-900)}[data-disabled=true] .k-checkbox-input-native:checked+.k-checkbox-input-icon{border-color:var(--color-gray-600);background:var(--color-gray-600)}.k-checkbox-input-native:checked+.k-checkbox-input-icon svg{display:block}.k-checkbox-input-native:focus+.k-checkbox-input-icon{border-color:var(--color-blue-600)}.k-checkbox-input-native:focus:checked+.k-checkbox-input-icon{background:var(--color-focus)}.k-text-input{width:100%;border:0;background:0 0;font:inherit;color:inherit;font-variant-numeric:tabular-nums}.k-text-input::-moz-placeholder{color:var(--color-gray-500)}.k-text-input::placeholder{color:var(--color-gray-500)}.k-text-input:focus{outline:0}.k-text-input:invalid{box-shadow:none;outline:0}.k-list-input .ProseMirror{line-height:1.5em}.k-list-input .ProseMirror ol>li::marker{font-size:var(--text-sm);color:var(--color-gray-500)}.k-multiselect-input{display:flex;flex-wrap:wrap;position:relative;font-size:var(--text-sm);min-height:2.25rem;line-height:1}.k-multiselect-input .k-sortable-ghost{background:var(--color-focus)}.k-multiselect-input .k-dropdown-content,.k-multiselect-input[data-layout=list] .k-tag{width:100%}.k-multiselect-search{margin-top:0!important;color:var(--color-white);background:var(--color-gray-900);border-bottom:1px dashed rgba(255,255,255,.2)}.k-multiselect-search>.k-button-text{flex:1;opacity:1!important}.k-multiselect-search input{width:100%;color:var(--color-white);background:0 0;border:0;outline:0;padding:.25rem 0;font:inherit}.k-multiselect-options{position:relative;max-height:275px;padding:.5rem 0}.k-multiselect-option{position:relative}.k-multiselect-option.selected{color:var(--color-positive-light)}.k-multiselect-option.disabled:not(.selected) .k-icon{opacity:0}.k-multiselect-option b{color:var(--color-focus-light);font-weight:700}[dir=ltr] .k-multiselect-value{margin-left:.25rem}[dir=rtl] .k-multiselect-value{margin-right:.25rem}.k-multiselect-value{color:var(--color-gray-500)}.k-multiselect-value:before{content:" ("}.k-multiselect-value:after{content:")"}[dir=ltr] .k-multiselect-input[data-layout=list] .k-tag{margin-right:0!important}[dir=rtl] .k-multiselect-input[data-layout=list] .k-tag{margin-left:0!important}.k-multiselect-more{width:100%;padding:.75rem;color:#fffc;text-align:center;border-top:1px dashed rgba(255,255,255,.2)}.k-multiselect-more:hover{color:var(--color-white)}.k-number-input{width:100%;border:0;background:0 0;font:inherit;color:inherit}.k-number-input::-moz-placeholder{color:var(--color-gray-500)}.k-number-input::placeholder{color:var(--color-gray-500)}.k-number-input:focus{outline:0}.k-number-input:invalid{box-shadow:none;outline:0}[dir=ltr] .k-radio-input li{padding-left:1.75rem}[dir=rtl] .k-radio-input li{padding-right:1.75rem}.k-radio-input li{position:relative;line-height:1.5rem}.k-radio-input input{position:absolute;width:0;height:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;opacity:0}.k-radio-input label{cursor:pointer;align-items:center}[dir=ltr] .k-radio-input label:before{left:0}[dir=rtl] .k-radio-input label:before{right:0}.k-radio-input label:before{position:absolute;top:.175em;content:"";width:1rem;height:1rem;border-radius:50%;border:2px solid var(--color-gray-500);box-shadow:var(--color-white) 0 0 0 2px inset}.k-radio-input input:checked+label:before{border-color:var(--color-gray-900);background:var(--color-gray-900)}[data-disabled=true] .k-radio-input input:checked+label:before{border-color:var(--color-gray-600);background:var(--color-gray-600)}.k-radio-input input:focus+label:before{border-color:var(--color-blue-600)}.k-radio-input input:focus:checked+label:before{background:var(--color-focus)}.k-radio-input-text{display:block}.k-range-input{--range-thumb-size:16px;--range-thumb-border:4px solid var(--color-gray-900);--range-thumb-border-disabled:4px solid var(--color-gray-600);--range-thumb-background:var(--color-background);--range-thumb-focus-border:4px solid var(--color-focus);--range-thumb-focus-background:var(--color-background);--range-track-height:4px;--range-track-background:var(--color-border);--range-track-color:var(--color-gray-900);--range-track-color-disabled:var(--color-gray-600);--range-track-focus-color:var(--color-focus);display:flex;align-items:center}.k-range-input-native{--min:0;--max:100;--value:0;--range:calc(var(--max) - var(--min));--ratio:calc((var(--value) - var(--min)) / var(--range));--position:calc( .5 * var(--range-thumb-size) + var(--ratio) * calc(100% - var(--range-thumb-size)) );-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;height:var(--range-thumb-size);background:0 0;font-size:var(--text-sm);line-height:1}.k-range-input-native::-webkit-slider-thumb{-webkit-appearance:none;appearance:none}.k-range-input-native::-webkit-slider-runnable-track{border:0;border-radius:var(--range-track-height);width:100%;height:var(--range-track-height);background:var(--range-track-background)}.k-range-input-native::-moz-range-track{border:0;border-radius:var(--range-track-height);width:100%;height:var(--range-track-height);background:var(--range-track-background)}.k-range-input-native::-ms-track{border:0;border-radius:var(--range-track-height);width:100%;height:var(--range-track-height);background:var(--range-track-background)}.k-range-input-native::-webkit-slider-runnable-track{background:linear-gradient(var(--range-track-color),var(--range-track-color))0/var(--position) 100%no-repeat var(--range-track-background)}.k-range-input-native::-moz-range-progress{height:var(--range-track-height);background:var(--range-track-color)}.k-range-input-native::-ms-fill-lower{height:var(--range-track-height);background:var(--range-track-color)}.k-range-input-native::-webkit-slider-thumb{margin-top:calc(.5*(var(--range-track-height) - var(--range-thumb-size)));box-sizing:border-box;width:var(--range-thumb-size);height:var(--range-thumb-size);background:var(--range-thumb-background);border:var(--range-thumb-border);border-radius:50%;cursor:pointer}.k-range-input-native::-moz-range-thumb{box-sizing:border-box;width:var(--range-thumb-size);height:var(--range-thumb-size);background:var(--range-thumb-background);border:var(--range-thumb-border);border-radius:50%;cursor:pointer}.k-range-input-native::-ms-thumb{box-sizing:border-box;width:var(--range-thumb-size);height:var(--range-thumb-size);background:var(--range-thumb-background);border:var(--range-thumb-border);border-radius:50%;cursor:pointer;margin-top:0}.k-range-input-native::-ms-tooltip{display:none}.k-range-input-native:focus{outline:0}.k-range-input-native:focus::-webkit-slider-runnable-track{border:0;border-radius:var(--range-track-height);width:100%;height:var(--range-track-height);background:var(--range-track-background);background:linear-gradient(var(--range-track-focus-color),var(--range-track-focus-color))0/var(--position) 100%no-repeat var(--range-track-background)}.k-range-input-native:focus::-moz-range-progress{height:var(--range-track-height);background:var(--range-track-focus-color)}.k-range-input-native:focus::-ms-fill-lower{height:var(--range-track-height);background:var(--range-track-focus-color)}.k-range-input-native:focus::-webkit-slider-thumb{background:var(--range-thumb-focus-background);border:var(--range-thumb-focus-border)}.k-range-input-native:focus::-moz-range-thumb{background:var(--range-thumb-focus-background);border:var(--range-thumb-focus-border)}.k-range-input-native:focus::-ms-thumb{background:var(--range-thumb-focus-background);border:var(--range-thumb-focus-border)}[dir=ltr] .k-range-input-tooltip{margin-left:1rem}[dir=rtl] .k-range-input-tooltip{margin-right:1rem}.k-range-input-tooltip{position:relative;max-width:20%;display:flex;align-items:center;color:var(--color-white);font-size:var(--text-xs);line-height:1;text-align:center;border-radius:var(--rounded-xs);background:var(--color-gray-900);padding:0 .25rem;white-space:nowrap}[dir=ltr] .k-range-input-tooltip:after{left:-5px}[dir=rtl] .k-range-input-tooltip:after{right:-5px}[dir=ltr] .k-range-input-tooltip:after{border-right:5px solid var(--color-gray-900)}[dir=rtl] .k-range-input-tooltip:after{border-left:5px solid var(--color-gray-900)}.k-range-input-tooltip:after{position:absolute;top:50%;width:0;height:0;transform:translateY(-50%);border-top:5px solid transparent;border-bottom:5px solid transparent;content:""}.k-range-input-tooltip>*{padding:4px}[data-disabled=true] .k-range-input-native::-webkit-slider-runnable-track{background:linear-gradient(var(--range-track-color-disabled),var(--range-track-color-disabled))0/var(--position) 100%no-repeat var(--range-track-background)}[data-disabled=true] .k-range-input-native::-moz-range-progress{height:var(--range-track-height);background:var(--range-track-color-disabled)}[data-disabled=true] .k-range-input-native::-ms-fill-lower{height:var(--range-track-height);background:var(--range-track-color-disabled)}[data-disabled=true] .k-range-input-native::-webkit-slider-thumb{border:var(--range-thumb-border-disabled)}[data-disabled=true] .k-range-input-native::-moz-range-thumb{border:var(--range-thumb-border-disabled)}[data-disabled=true] .k-range-input-native::-ms-thumb{border:var(--range-thumb-border-disabled)}[data-disabled=true] .k-range-input-tooltip{background:var(--color-gray-600)}[dir=ltr] [data-disabled=true] .k-range-input-tooltip:after{border-right:5px solid var(--color-gray-600)}[dir=rtl] [data-disabled=true] .k-range-input-tooltip:after{border-left:5px solid var(--color-gray-600)}.k-select-input{position:relative;display:block;cursor:pointer;overflow:hidden}.k-select-input-native{position:absolute;top:0;right:0;bottom:0;left:0;opacity:0;width:100%;font:inherit;z-index:1;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-weight:var(--font-normal)}.k-select-input-native[disabled]{cursor:default}.k-tags-input{display:flex;flex-wrap:wrap}.k-tags-input .k-tag{border-radius:var(--rounded-sm)}.k-tags-input .k-sortable-ghost{background:var(--color-focus)}.k-tags-input-element{flex-grow:1;flex-basis:0;min-width:0}.k-tags-input:focus-within .k-tags-input-element{flex-basis:4rem}.k-tags-input-element input{font:inherit;border:0;width:100%;background:0 0}.k-tags-input-element input:focus{outline:0}[dir=ltr] .k-tags-input[data-layout=list] .k-tag{margin-right:0!important}[dir=rtl] .k-tags-input[data-layout=list] .k-tag{margin-left:0!important}.k-tags-input[data-layout=list] .k-tag{width:100%}.k-textarea-input[data-size=small]{--size:7.5rem}.k-textarea-input[data-size=medium]{--size:15rem}.k-textarea-input[data-size=large]{--size:30rem}.k-textarea-input[data-size=huge]{--size:45rem}.k-textarea-input-wrapper{position:relative}.k-textarea-input-native{resize:none;border:0;width:100%;background:0 0;font:inherit;line-height:1.5em;color:inherit;min-height:var(--size)}.k-textarea-input-native::-moz-placeholder{color:var(--color-gray-500)}.k-textarea-input-native::placeholder{color:var(--color-gray-500)}.k-textarea-input-native:focus{outline:0}.k-textarea-input-native:invalid{box-shadow:none;outline:0}.k-textarea-input-native[data-font=monospace]{font-family:var(--font-mono)}.k-toolbar{margin-bottom:.25rem;color:#aaa}.k-textarea-input:focus-within .k-toolbar{position:sticky;top:0;left:0;right:0;z-index:1;box-shadow:#0000000d 0 2px 5px;border-bottom:1px solid rgba(0,0,0,.1);color:#000}.k-toggle-input{--toggle-background:var(--color-white);--toggle-color:var(--color-gray-500);--toggle-active-color:var(--color-gray-900);--toggle-focus-color:var(--color-focus);--toggle-height:16px;display:flex;align-items:center}.k-toggle-input-native{position:relative;height:var(--toggle-height);width:calc(var(--toggle-height)*2);border-radius:var(--toggle-height);border:2px solid var(--toggle-color);box-shadow:inset 0 0 0 2px var(--toggle-background),inset calc(var(--toggle-height)*-1) 0 0 2px var(--toggle-background);background-color:var(--toggle-color);outline:0;transition:all ease-in-out .1s;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;flex-shrink:0}.k-toggle-input-native:checked{border-color:var(--toggle-active-color);box-shadow:inset 0 0 0 2px var(--toggle-background),inset var(--toggle-height) 0 0 2px var(--toggle-background);background-color:var(--toggle-active-color)}.k-toggle-input-native[disabled]{border-color:var(--color-border);box-shadow:inset 0 0 0 2px var(--color-background),inset calc(var(--toggle-height)*-1) 0 0 2px var(--color-background);background-color:var(--color-border)}.k-toggle-input-native[disabled]:checked{box-shadow:inset 0 0 0 2px var(--color-background),inset var(--toggle-height) 0 0 2px var(--color-background)}.k-toggle-input-native:focus:checked{border:2px solid var(--color-focus);background-color:var(--toggle-focus-color)}.k-toggle-input-native::-ms-check{opacity:0}.k-toggle-input-label{cursor:pointer;flex-grow:1}.k-input[data-type=toggles]{display:inline-flex}.k-input[data-type=toggles].grow{display:flex}.k-toggles-input{display:grid;grid-template-columns:repeat(var(--options),minmax(0,1fr));gap:1px;border-radius:var(--rounded);line-height:1;background:var(--color-border);overflow:hidden}.k-toggles-input li{height:var(--field-input-height);background:var(--color-white)}.k-toggles-input label{align-items:center;background:var(--color-white);cursor:pointer;display:flex;font-size:var(--text-sm);justify-content:center;line-height:1.25;padding:0 var(--spacing-3);height:100%}[dir=ltr] .k-toggles-input .k-icon+.k-toggles-text{margin-left:var(--spacing-2)}[dir=rtl] .k-toggles-input .k-icon+.k-toggles-text{margin-right:var(--spacing-2)}.k-toggles-input input:focus:not(:checked)+label{background:var(--color-gray-200)}.k-toggles-input input:checked+label{background:var(--color-black);color:var(--color-white)}.k-blocks-field{position:relative}.k-date-field-body{display:flex;flex-wrap:wrap;line-height:1;border:var(--field-input-border);background:var(--color-gray-300);gap:1px;border-radius:var(--rounded);--multiplier:calc(25rem - 100%)}.k-date-field-body:focus-within{border:var(--field-input-focus-border);box-shadow:var(--color-focus-outline) 0 0 0 2px}.k-date-field[data-disabled] .k-date-field-body{background:0 0}.k-date-field-body>.k-input[data-theme=field]{border:0;box-shadow:none;border-radius:var(--rounded)}.k-date-field-body>.k-input[data-invalid=true],.k-date-field-body>.k-input[data-invalid=true]:focus-within{border:0!important;box-shadow:none!important}.k-date-field-body>*{flex-grow:1;flex-basis:calc(var(--multiplier)*999);max-width:100%}.k-date-field-body .k-input[data-type=date]{min-width:60%}.k-date-field-body .k-input[data-type=time]{min-width:30%}.k-files-field[data-disabled=true] *{pointer-events:all!important}body{counter-reset:headline-counter}.k-headline-field{position:relative;padding-top:1.5rem}.k-fieldset>.k-grid .k-column:first-child .k-headline-field{padding-top:0}[dir=ltr] .k-headline-field .k-headline[data-numbered]:before{padding-right:.25rem}[dir=rtl] .k-headline-field .k-headline[data-numbered]:before{padding-left:.25rem}.k-headline-field .k-headline[data-numbered]:before{counter-increment:headline-counter;content:counter(headline-counter,decimal-leading-zero);color:var(--color-focus);font-weight:400}.k-info-field .k-headline{padding-bottom:.75rem;line-height:1.25rem}.k-layout-column{position:relative;height:100%;display:flex;flex-direction:column;background:var(--color-white);min-height:6rem}.k-layout-column:focus{outline:0}.k-layout-column .k-blocks{background:0 0;box-shadow:none;padding:0;height:100%;background:var(--color-white);min-height:4rem}.k-layout-column .k-blocks[data-empty=true]{min-height:6rem}.k-layout-column .k-blocks-list{display:flex;flex-direction:column;height:100%}.k-layout-column .k-blocks .k-block-container:last-of-type{flex-grow:1}.k-layout-column .k-blocks-empty{position:absolute;top:0;right:0;bottom:0;left:0;justify-content:center;opacity:0;transition:opacity .3s;border:0}.k-layout-column .k-blocks-empty:hover{opacity:1}[dir=ltr] .k-layout-column .k-blocks-empty.k-empty .k-icon{border-right:0}[dir=rtl] .k-layout-column .k-blocks-empty.k-empty .k-icon{border-left:0}.k-layout-column .k-blocks-empty.k-empty .k-icon{width:1rem}[dir=ltr] .k-layout{padding-right:var(--layout-toolbar-width)}[dir=rtl] .k-layout{padding-left:var(--layout-toolbar-width)}.k-layout{--layout-border-color:var(--color-gray-300);--layout-toolbar-width:2rem;position:relative;background:#fff;box-shadow:var(--shadow)}[dir=ltr] [data-disabled=true] .k-layout{padding-right:0}[dir=rtl] [data-disabled=true] .k-layout{padding-left:0}.k-layout:not(:last-of-type){margin-bottom:1px}.k-layout:focus{outline:0}[dir=ltr] .k-layout-toolbar{right:0}[dir=rtl] .k-layout-toolbar{left:0}[dir=ltr] .k-layout-toolbar{border-left:1px solid var(--color-light)}[dir=rtl] .k-layout-toolbar{border-right:1px solid var(--color-light)}.k-layout-toolbar{position:absolute;top:0;bottom:0;width:var(--layout-toolbar-width);display:flex;flex-direction:column;font-size:var(--text-sm);background:var(--color-gray-100);color:var(--color-gray-500)}.k-layout-toolbar:hover{color:var(--color-black)}.k-layout-toolbar-button{width:var(--layout-toolbar-width);height:var(--layout-toolbar-width)}.k-layout-toolbar .k-sort-handle{margin-top:auto;color:currentColor}.k-layout-columns.k-grid{grid-gap:1px;background:var(--layout-border-color);background:var(--color-gray-300)}.k-layout:not(:first-child) .k-layout-columns.k-grid{border-top:0}.k-layouts .k-sortable-ghost{position:relative;box-shadow:#11111140 0 5px 10px;outline:2px solid var(--color-focus);cursor:grabbing;cursor:-webkit-grabbing;z-index:1}.k-layout-selector.k-dialog{background:#313740;color:var(--color-white)}.k-layout-selector .k-headline{line-height:1;margin-top:-.25rem;margin-bottom:1.5rem}.k-layout-selector ul{display:grid;grid-template-columns:repeat(3,1fr);grid-gap:1.5rem}.k-layout-selector-option .k-grid{height:5rem;grid-gap:2px;box-shadow:var(--shadow);cursor:pointer}.k-layout-selector-option:hover{outline:2px solid var(--color-green-300);outline-offset:2px}.k-layout-selector-option:last-child{margin-bottom:0}.k-layout-selector-option .k-column{display:flex;background:rgba(255,255,255,.2);justify-content:center;font-size:var(--text-xs);align-items:center}.k-layout-add-button{display:flex;align-items:center;width:100%;color:var(--color-gray-500);justify-content:center;padding:.75rem 0}.k-layout-add-button:hover{color:var(--color-black)}.k-line-field{position:relative;border:0;height:3rem;width:auto}.k-line-field:after{position:absolute;content:"";top:50%;margin-top:-1px;left:0;right:0;height:1px;background:var(--color-border)}.k-list-field .k-list-input{padding:.375rem .5rem .375rem .75rem}.k-pages-field[data-disabled=true] *{pointer-events:all!important}.k-structure-field:not([data-disabled=true]) td.k-table-column{cursor:pointer}.k-field-counter{display:none}.k-text-field:focus-within .k-field-counter{display:block}.k-users-field[data-disabled=true] *{pointer-events:all!important}.k-writer-field-input{line-height:1.5em;padding:.375rem .5rem}.k-aspect-ratio{position:relative;display:block;overflow:hidden;padding-bottom:100%}.k-aspect-ratio>*{position:absolute!important;top:0;right:0;bottom:0;left:0;height:100%;width:100%;-o-object-fit:contain;object-fit:contain}.k-aspect-ratio[data-cover=true]>*{-o-object-fit:cover;object-fit:cover}.k-bar{display:flex;align-items:center;justify-content:space-between;line-height:1}.k-bar-slot{flex-grow:1}.k-bar-slot[data-position=center]{text-align:center}[dir=ltr] .k-bar-slot[data-position=right]{text-align:right}[dir=rtl] .k-bar-slot[data-position=right]{text-align:left}.k-box{word-wrap:break-word;font-size:var(--text-sm)}.k-box:not([data-theme=none]){background:var(--color-white);border-radius:var(--rounded);line-height:1.25rem;padding:.5rem .75rem}.k-box[data-theme=code]{background:var(--color-gray-900);border:1px solid var(--color-black);color:var(--color-light);font-family:Input,Menlo,monospace;font-size:var(--text-sm);line-height:1.5}.k-box[data-theme=button]{padding:0}[dir=ltr] .k-box[data-theme=button] .k-button{text-align:left}[dir=rtl] .k-box[data-theme=button] .k-button{text-align:right}.k-box[data-theme=button] .k-button{padding:0 .75rem;height:2.25rem;width:100%;display:flex;align-items:center;line-height:2rem}[dir=ltr] .k-box[data-theme=info],[dir=ltr] .k-box[data-theme=negative],[dir=ltr] .k-box[data-theme=notice],[dir=ltr] .k-box[data-theme=positive]{border-left-color:var(--theme-light)}[dir=rtl] .k-box[data-theme=info],[dir=rtl] .k-box[data-theme=negative],[dir=rtl] .k-box[data-theme=notice],[dir=rtl] .k-box[data-theme=positive]{border-right-color:var(--theme-light)}.k-box[data-theme=info],.k-box[data-theme=negative],.k-box[data-theme=notice],.k-box[data-theme=positive]{border:0;background:var(--theme-bg)}[dir=ltr] .k-box[data-theme=empty]{border-left:0}[dir=rtl] .k-box[data-theme=empty]{border-right:0}.k-box[data-theme=empty]{text-align:center;padding:3rem 1.5rem;display:flex;justify-content:center;align-items:center;flex-direction:column;background:var(--color-background);border:1px dashed var(--color-border)}.k-box[data-theme=empty] .k-icon{margin-bottom:.5rem;color:var(--color-gray-500)}.k-box[data-theme=empty],.k-box[data-theme=empty] p{color:var(--color-gray-600)}.k-bubble{display:flex;padding:0 .5rem;white-space:nowrap;align-items:center;line-height:1.5;font-size:var(--text-xs);height:1.525rem;background:var(--color-light);color:var(--color-black);border-radius:var(--rounded);overflow:hidden}[dir=ltr] .k-bubble .k-item-figure{margin-left:-.5rem}[dir=rtl] .k-bubble .k-item-figure{margin-right:-.5rem}[dir=ltr] .k-bubble .k-item-figure{margin-right:var(--spacing-2)}[dir=rtl] .k-bubble .k-item-figure{margin-left:var(--spacing-2)}.k-bubble .k-item-figure{width:1.525rem;height:1.525rem}.k-bubbles{display:flex;gap:.25rem}.k-collection-help{padding:.5rem .75rem}.k-collection-footer{display:flex;justify-content:space-between;margin-left:-.75rem;margin-right:-.75rem}.k-collection-pagination{line-height:1.25rem;flex-shrink:0;min-height:2.75rem}.k-collection-pagination .k-pagination .k-button{padding:.5rem .75rem;line-height:1.125rem}.k-column{min-width:0;grid-column-start:span 12}.k-column[data-sticky=true]>div{position:sticky;top:4vh;z-index:2}@media screen and (min-width:65em){.k-column[data-width="1/1"],.k-column[data-width="12/12"],.k-column[data-width="2/2"],.k-column[data-width="3/3"],.k-column[data-width="4/4"],.k-column[data-width="6/6"]{grid-column-start:span 12}.k-column[data-width="11/12"]{grid-column-start:span 11}.k-column[data-width="10/12"],.k-column[data-width="5/6"]{grid-column-start:span 10}.k-column[data-width="3/4"],.k-column[data-width="9/12"]{grid-column-start:span 9}.k-column[data-width="2/3"],.k-column[data-width="4/6"],.k-column[data-width="8/12"]{grid-column-start:span 8}.k-column[data-width="7/12"]{grid-column-start:span 7}.k-column[data-width="1/2"],.k-column[data-width="2/4"],.k-column[data-width="3/6"],.k-column[data-width="6/12"]{grid-column-start:span 6}.k-column[data-width="5/12"]{grid-column-start:span 5}.k-column[data-width="1/3"],.k-column[data-width="2/6"],.k-column[data-width="4/12"]{grid-column-start:span 4}.k-column[data-width="1/4"],.k-column[data-width="3/12"]{grid-column-start:span 3}.k-column[data-width="1/6"],.k-column[data-width="2/12"]{grid-column-start:span 2}.k-column[data-width="1/12"]{grid-column-start:span 1}}.k-column[data-disabled=true]{cursor:not-allowed;opacity:.4}.k-column[data-disabled=true] *{pointer-events:none}.k-column[data-disabled=true] .k-text[data-theme=help] *{pointer-events:initial}.k-dropzone{position:relative}.k-dropzone:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;display:none;pointer-events:none;z-index:1}.k-dropzone[data-over=true]:after{display:block;outline:1px solid var(--color-focus);box-shadow:var(--color-focus-outline) 0 0 0 3px}.k-empty{display:flex;align-items:stretch;border-radius:var(--rounded);color:var(--color-gray-600);border:1px dashed var(--color-border)}button.k-empty{width:100%}button.k-empty:focus{outline:0}.k-empty p{font-size:var(--text-sm);color:var(--color-gray-600)}.k-empty>.k-icon{color:var(--color-gray-500)}.k-empty[data-layout=cardlets],.k-empty[data-layout=cards]{text-align:center;padding:1.5rem;justify-content:center;flex-direction:column}.k-empty[data-layout=cardlets] .k-icon,.k-empty[data-layout=cards] .k-icon{margin-bottom:1rem}.k-empty[data-layout=cardlets] .k-icon svg,.k-empty[data-layout=cards] .k-icon svg{width:2rem;height:2rem}.k-empty[data-layout=list],.k-empty[data-layout=table]{min-height:38px}[dir=ltr] .k-empty[data-layout=list]>.k-icon,[dir=ltr] .k-empty[data-layout=table]>.k-icon{border-right:1px solid rgba(0,0,0,.05)}[dir=rtl] .k-empty[data-layout=list]>.k-icon,[dir=rtl] .k-empty[data-layout=table]>.k-icon{border-left:1px solid rgba(0,0,0,.05)}.k-empty[data-layout=list]>.k-icon,.k-empty[data-layout=table]>.k-icon{width:36px;min-height:36px}.k-empty[data-layout=list]>p,.k-empty[data-layout=table]>p{line-height:1.25rem;padding:.5rem .75rem}.k-file-preview{background:var(--color-gray-800)}.k-file-preview-layout{display:grid;grid-template-columns:50%auto}.k-file-preview-layout>*{min-width:0}.k-file-preview-image{position:relative;display:flex;align-items:center;justify-content:center;background:var(--bg-pattern)}.k-file-preview-image-link{display:block;width:100%;padding:min(4vw,3rem);outline:0}.k-file-preview-image-link[data-tabbed=true]{box-shadow:none;outline:2px solid var(--color-focus);outline-offset:-2px}.k-file-preview-details{padding:1.5rem;flex-grow:1}.k-file-preview-details ul{line-height:1.5em;max-width:50rem;display:grid;grid-gap:1.5rem 3rem;grid-template-columns:repeat(auto-fill,minmax(100px,1fr))}.k-file-preview-details h3{font-size:var(--text-sm);font-weight:500;color:var(--color-gray-500)}.k-file-preview-details a,.k-file-preview-details p{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#ffffffbf;font-size:var(--text-sm)}@media screen and (min-width:30em){.k-file-preview-details ul{grid-template-columns:repeat(auto-fill,minmax(200px,1fr))}}@media screen and (max-width:65em){.k-file-preview-layout{padding:0!important}}@media screen and (min-width:65em){.k-file-preview-layout{grid-template-columns:33.333%auto;align-items:center}.k-file-preview-details{padding:3rem}}@media screen and (min-width:90em){.k-file-preview-layout{grid-template-columns:25%auto}}.k-grid{--columns:12;display:grid;grid-column-gap:0;grid-row-gap:0;grid-template-columns:1fr}@media screen and (min-width:30em){.k-grid[data-gutter=small]{grid-column-gap:1rem;grid-row-gap:1rem}.k-grid[data-gutter=huge],.k-grid[data-gutter=large],.k-grid[data-gutter=medium]{grid-column-gap:1.5rem;grid-row-gap:1.5rem}}@media screen and (min-width:65em){.k-grid{grid-template-columns:repeat(var(--columns),1fr)}.k-grid[data-gutter=large]{grid-column-gap:3rem}.k-grid[data-gutter=huge]{grid-column-gap:4.5rem}}@media screen and (min-width:90em){.k-grid[data-gutter=large]{grid-column-gap:4.5rem}.k-grid[data-gutter=huge]{grid-column-gap:6rem}}@media screen and (min-width:120em){.k-grid[data-gutter=large]{grid-column-gap:6rem}.k-grid[data-gutter=huge]{grid-column-gap:7.5rem}}.k-header{padding-top:4vh;margin-bottom:2rem;border-bottom:1px solid var(--color-border)}.k-header[data-tabs=true]{border-bottom:0}.k-header .k-headline{min-height:1.25em;margin-bottom:.5rem;word-wrap:break-word}.k-header .k-header-buttons{margin-top:-.5rem;height:3.25rem}.k-header .k-headline-editable{cursor:pointer}[dir=ltr] .k-header .k-headline-editable .k-icon{margin-left:.5rem}[dir=rtl] .k-header .k-headline-editable .k-icon{margin-right:.5rem}.k-header .k-headline-editable .k-icon{color:var(--color-gray-500);opacity:0;transition:opacity .3s;display:inline-block}.k-header .k-headline-editable:hover .k-icon{opacity:1}.k-panel-inside{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column}.k-panel-inside:focus{outline:0}.k-panel-header{z-index:var(--z-navigation);flex-shrink:0}.k-panel-view{flex-grow:1;padding-bottom:6rem}.k-item{position:relative;background:var(--color-white);border-radius:var(--rounded);box-shadow:var(--shadow);display:grid;grid-template-columns:auto;line-height:1}.k-item a:focus,.k-item:focus{outline:0}.k-item:focus-within{box-shadow:var(--shadow-outline)}.k-item-sort-handle.k-sort-handle{position:absolute;opacity:0;width:1.25rem;height:1.5rem;z-index:2;border-radius:1px}.k-item:hover .k-item-sort-handle{opacity:1}.k-item-figure{grid-area:figure}.k-item-content{grid-area:content;overflow:hidden}.k-item-info,.k-item-title{font-size:var(--text-sm);font-weight:400;text-overflow:ellipsis;white-space:nowrap;line-height:1.125rem;overflow:hidden}.k-item-info{grid-area:info;color:var(--color-gray-500)}.k-item-title-link.k-link[data-=true]{box-shadow:none}.k-item-title-link:after{position:absolute;content:"";top:0;right:0;bottom:0;left:0;z-index:1}.k-item-footer{grid-area:footer;display:flex;justify-content:space-between;align-items:center;min-width:0}[dir=ltr] .k-item-label{margin-right:.5rem}[dir=rtl] .k-item-label{margin-left:.5rem}.k-item-buttons{position:relative;display:flex;justify-content:flex-end;flex-shrink:0;flex-grow:1}.k-item-buttons>.k-button,.k-item-buttons>.k-dropdown{position:relative;width:38px;height:38px;display:flex!important;align-items:center;justify-content:center;line-height:1}.k-item-buttons>.k-button{z-index:1}.k-item-buttons>.k-options-dropdown>.k-options-dropdown-toggle{z-index:var(--z-toolbar)}.k-list-item{display:flex;align-items:center;height:38px}[dir=ltr] .k-list-item .k-item-sort-handle{left:-1.5rem}[dir=rtl] .k-list-item .k-item-sort-handle{right:-1.5rem}.k-list-item .k-item-sort-handle{width:1.5rem}[dir=ltr] .k-list-item .k-item-figure{border-top-left-radius:var(--rounded)}[dir=rtl] .k-list-item .k-item-figure{border-top-right-radius:var(--rounded)}[dir=ltr] .k-list-item .k-item-figure{border-bottom-left-radius:var(--rounded)}[dir=rtl] .k-list-item .k-item-figure{border-bottom-right-radius:var(--rounded)}.k-list-item .k-item-figure{width:38px}[dir=ltr] .k-list-item .k-item-content{margin-left:.75rem}[dir=rtl] .k-list-item .k-item-content{margin-right:.75rem}.k-list-item .k-item-content{display:flex;flex-grow:1;flex-shrink:2;justify-content:space-between;align-items:center}.k-list-item .k-item-info,.k-list-item .k-item-title{flex-grow:1;line-height:1.5rem}[dir=ltr] .k-list-item .k-item-title{margin-right:.5rem}[dir=rtl] .k-list-item .k-item-title{margin-left:.5rem}.k-list-item .k-item-title{flex-shrink:1}[dir=ltr] .k-list-item .k-item-info{text-align:right}[dir=rtl] .k-list-item .k-item-info{text-align:left}[dir=ltr] .k-list-item .k-item-info{margin-right:.5rem}[dir=rtl] .k-list-item .k-item-info{margin-left:.5rem}.k-list-item .k-item-info{flex-shrink:2;justify-self:end}.k-list-item .k-item-buttons,.k-list-item .k-item-footer{flex-shrink:0}.k-item:not(.k-list-item) .k-item-sort-handle{margin:var(--spacing-2);background:var(--color-background);box-shadow:var(--shadow-lg);border-radius:var(--rounded-sm)}[dir=ltr] .k-item:not(.k-list-item) .k-item-label{margin-left:-2px}[dir=rtl] .k-item:not(.k-list-item) .k-item-label{margin-right:-2px}.k-item:not(.k-list-item) .k-item-content{padding:.625rem .75rem}.k-cardlets-item{height:6rem;grid-template-rows:auto 38px;grid-template-areas:"content""footer"}.k-cardlets-item[data-has-figure=true]{grid-template-columns:6rem auto;grid-template-areas:"figure content""figure footer"}[dir=ltr] .k-cardlets-item .k-item-figure{border-top-left-radius:var(--rounded)}[dir=rtl] .k-cardlets-item .k-item-figure{border-top-right-radius:var(--rounded)}[dir=ltr] .k-cardlets-item .k-item-figure{border-bottom-left-radius:var(--rounded)}[dir=rtl] .k-cardlets-item .k-item-figure{border-bottom-right-radius:var(--rounded)}.k-cardlets-item .k-item-footer{padding-top:.5rem;padding-bottom:.5rem}.k-cards-item{grid-template-columns:auto;grid-template-rows:auto 1fr;grid-template-areas:"figure""content";--item-content-wrapper:0}[dir=ltr] .k-cards-item .k-item-figure,[dir=rtl] .k-cards-item .k-item-figure{border-top-right-radius:var(--rounded);border-top-left-radius:var(--rounded)}.k-cards-item .k-item-content{padding:.5rem .75rem!important;overflow:hidden}.k-cards-item .k-item-info,.k-cards-item .k-item-title{line-height:1.375rem;white-space:normal}.k-cards-item .k-item-info:after,.k-cards-item .k-item-title:after{display:inline-block;content:"\a0";width:var(--item-content-wrapper)}.k-cards-item[data-has-flag=true],.k-cards-item[data-has-options=true]{--item-content-wrapper:38px}.k-cards-item[data-has-flag=true][data-has-options=true]{--item-content-wrapper:76px}.k-cards-item[data-has-info=true] .k-item-title:after{display:none}[dir=ltr] .k-cards-item .k-item-footer{right:0}[dir=rtl] .k-cards-item .k-item-footer{left:0}.k-cards-item .k-item-footer{position:absolute;bottom:0;width:auto}.k-item-figure{overflow:hidden;flex-shrink:0}.k-cards-items{--min:13rem;--max:1fr;--gap:1.5rem;--column-gap:var(--gap);--row-gap:var(--gap);display:grid;grid-column-gap:var(--column-gap);grid-row-gap:var(--row-gap);grid-template-columns:repeat(auto-fill,minmax(var(--min),var(--max)))}@media screen and (min-width:30em){.k-cards-items[data-size=tiny]{--min:10rem}.k-cards-items[data-size=small]{--min:16rem}.k-cards-items[data-size=medium]{--min:24rem}.k-cards-items[data-size=huge],.k-cards-items[data-size=large],.k-column[data-width="1/4"] .k-cards-items,.k-column[data-width="1/5"] .k-cards-items,.k-column[data-width="1/6"] .k-cards-items{--min:1fr}}@media screen and (min-width:65em){.k-cards-items[data-size=large]{--min:32rem}}.k-cardlets-items{display:grid;grid-template-columns:repeat(auto-fill,minmax(16rem,1fr));grid-gap:.5rem}.k-list-items .k-list-item:not(:last-child){margin-bottom:2px}.k-overlay{position:fixed;top:0;right:0;bottom:0;left:0;width:100%;height:100%;z-index:var(--z-dialog);transform:translateZ(0)}.k-overlay[data-centered=true]{display:flex;align-items:center;justify-content:center}.k-overlay[data-dimmed=true]{background:var(--color-backdrop)}.k-overlay-loader{color:var(--color-white)}.k-panel[data-loading=true]{animation:LoadingCursor .5s}.k-panel[data-dragging=true],.k-panel[data-loading=true]:after{-webkit-user-select:none;-moz-user-select:none;user-select:none}.k-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(14rem,1fr));grid-gap:var(--spacing-2px)}.k-stat{display:flex;flex-direction:column;background:var(--color-white);box-shadow:var(--shadow);padding:var(--spacing-3) var(--spacing-6);line-height:var(--leading-normal);border-radius:var(--rounded)}.k-stat.k-link:hover,.k-stat[data-click=true]:hover{cursor:pointer;background:var(--color-gray-100)}.k-stat dd,.k-stat dt{display:block}.k-stat-value{font-size:var(--value);margin-bottom:var(--spacing-1);order:1}.k-stat-info,.k-stat-label{font-size:var(--text-xs)}.k-stat-label{order:2}.k-stat-info{order:3;color:var(--theme, var(--color-gray-500))}.k-stats[data-size=small]{--value:var(--text-base)}.k-stats[data-size=medium]{--value:var(--text-xl)}.k-stats[data-size=large]{--value:var(--text-2xl)}.k-stats[data-size=huge]{--value:var(--text-3xl)}.k-table{--table-row-height:38px;position:relative;table-layout:fixed;background:var(--color-white);font-size:var(--text-sm);border-spacing:0;box-shadow:var(--shadow);border-radius:var(--rounded);font-variant-numeric:tabular-nums}.k-table td,.k-table th{height:var(--table-row-height);overflow:hidden;text-overflow:ellipsis;line-height:1.25em}.k-table,.k-table td{width:100%}[dir=ltr] .k-table th:first-child{border-top-left-radius:var(--rounded)}[dir=rtl] .k-table th:first-child{border-top-right-radius:var(--rounded)}[dir=ltr] .k-table th:last-child{border-top-right-radius:var(--rounded)}[dir=rtl] .k-table th:last-child{border-top-left-radius:var(--rounded)}[dir=ltr] .k-table td:last-child,[dir=ltr] .k-table th:last-child{border-right:0}[dir=rtl] .k-table td:last-child,[dir=rtl] .k-table th:last-child{border-left:0}.k-table td:last-child,.k-table th:last-child{height:var(--table-row-height)}.k-table th,.k-table tr:not(:last-child) td{border-bottom:1px solid var(--color-background)}.k-table td:last-child{overflow:visible}[dir=ltr] .k-table td,[dir=ltr] .k-table th{border-right:1px solid var(--color-background)}[dir=rtl] .k-table td,[dir=rtl] .k-table th{border-left:1px solid var(--color-background)}.k-table tbody tr:hover td{background:rgba(239,239,239,.25)}.k-table-column[data-align]{text-align:var(--align)}.k-table-column[data-align=right]>.k-input{flex-direction:column;align-items:flex-end}.k-table th{position:sticky;top:0;left:0;right:0;width:100%;padding:0 .75rem;z-index:1;font-family:var(--font-mono);font-size:var(--text-xs);font-weight:400;color:var(--color-gray-600);background:var(--color-gray-100)}[dir=ltr] .k-table th{text-align:left}[dir=rtl] .k-table th{text-align:right}.k-table th:after{content:"";position:absolute;top:100%;left:0;right:0;height:.5rem;background:linear-gradient(to bottom,rgba(#000,.05),rgba(#000,0));z-index:2}.k-table .k-sort-handle,.k-table-index{display:grid;place-items:center;width:100%;height:var(--table-row-height)}.k-table .k-sort-handle,.k-table tr:hover .k-table-index-column[data-sortable=true] .k-table-index{display:none}.k-table tr:hover .k-sort-handle{display:grid!important}.k-table-row-ghost{background:var(--color-white);box-shadow:#11111140 0 5px 10px;outline:2px solid var(--color-focus);margin-bottom:2px;cursor:grabbing;cursor:-webkit-grabbing}.k-table-row-fallback{opacity:0!important}td.k-table-index-column,td.k-table-options-column,th.k-table-index-column,th.k-table-options-column{width:var(--table-row-height);text-align:center!important}.k-table-index{font-size:var(--text-xs);color:var(--color-gray-500);line-height:1.1em}.k-table-empty{color:var(--color-gray-600);font-size:var(--text-sm)}[data-disabled=true] .k-table{background:var(--color-background)}[dir=ltr] [data-disabled=true] .k-table td,[dir=ltr] [data-disabled=true] .k-table th{border-right:1px solid var(--color-border)}[dir=rtl] [data-disabled=true] .k-table td,[dir=rtl] [data-disabled=true] .k-table th{border-left:1px solid var(--color-border)}[data-disabled=true] .k-table td,[data-disabled=true] .k-table th{background:var(--color-background);border-bottom:1px solid var(--color-border)}[data-disabled=true] .k-table td:last-child{overflow:hidden;text-overflow:ellipsis}@media screen and (max-width:65em){.k-table td:not([data-mobile]),.k-table th:not([data-mobile]){display:none}}.k-tabs{position:relative;background:#e9e9e9;border:1px solid var(--color-border);border-radius:var(--rounded)}.k-tabs nav{display:flex;justify-content:center;margin-left:-1px;margin-right:-1px}[dir=ltr] .k-tab-button.k-button{border-left:1px solid transparent}[dir=rtl] .k-tab-button.k-button{border-right:1px solid transparent}[dir=ltr] .k-tab-button.k-button{border-right:1px solid var(--color-border)}[dir=rtl] .k-tab-button.k-button{border-left:1px solid var(--color-border)}.k-tab-button.k-button{position:relative;z-index:1;display:inline-flex;justify-content:center;align-items:center;padding:.625rem .75rem;font-size:var(--text-xs);text-transform:uppercase;text-align:center;font-weight:500;flex-grow:1;flex-shrink:1;flex-direction:column;max-width:15rem}@media screen and (min-width:30em){.k-tab-button.k-button{flex-direction:row}[dir=ltr] .k-tab-button.k-button .k-icon{margin-right:.5rem}[dir=rtl] .k-tab-button.k-button .k-icon{margin-left:.5rem}}[dir=ltr] .k-tab-button.k-button>.k-button-text{padding-left:0}[dir=rtl] .k-tab-button.k-button>.k-button-text{padding-right:0}.k-tab-button.k-button>.k-button-text{padding-top:.375rem;font-size:10px;overflow:hidden;max-width:10rem;text-overflow:ellipsis;opacity:1}@media screen and (min-width:30em){.k-tab-button.k-button>.k-button-text{font-size:var(--text-xs);padding-top:0}}[dir=ltr] .k-tab-button:last-child{border-right:1px solid transparent}[dir=rtl] .k-tab-button:last-child{border-left:1px solid transparent}[dir=ltr] .k-tab-button[aria-current]{border-right:1px solid var(--color-border)}[dir=rtl] .k-tab-button[aria-current]{border-left:1px solid var(--color-border)}.k-tab-button[aria-current]{position:relative;background:var(--color-background);pointer-events:none}[dir=ltr] .k-tab-button[aria-current]:first-child{border-left:1px solid var(--color-border)}[dir=rtl] .k-tab-button[aria-current]:first-child{border-right:1px solid var(--color-border)}.k-tab-button[aria-current]:after,.k-tab-button[aria-current]:before{position:absolute;content:""}.k-tab-button[aria-current]:before{left:-1px;right:-1px;top:-1px;height:2px;background:var(--color-black)}.k-tab-button[aria-current]:after{left:0;right:0;bottom:-1px;height:1px;background:var(--color-background)}[dir=ltr] .k-tabs-dropdown{right:0}[dir=rtl] .k-tabs-dropdown{left:0}.k-tabs-dropdown{top:100%}[dir=ltr] .k-tabs-badge{right:2px}[dir=rtl] .k-tabs-badge{left:2px}.k-tabs-badge{position:absolute;top:3px;font-variant-numeric:tabular-nums;line-height:1.5;padding:0 .25rem;border-radius:2px;font-size:10px;box-shadow:var(--shadow-md)}.k-tabs[data-theme=notice] .k-tabs-badge{background:var(--theme-light);color:var(--color-black)}.k-view{padding-left:1.5rem;padding-right:1.5rem;margin:0 auto;max-width:100rem}@media screen and (min-width:30em){.k-view{padding-left:3rem;padding-right:3rem}}@media screen and (min-width:90em){.k-view{padding-left:6rem;padding-right:6rem}}.k-view[data-align=center]{height:100vh;display:flex;align-items:center;justify-content:center;padding:0 3rem;overflow:auto}.k-view[data-align=center]>*{flex-basis:22.5rem}.k-fatal{position:fixed;top:0;right:0;bottom:0;left:0;background:var(--color-backdrop);display:flex;z-index:var(--z-fatal);align-items:center;justify-content:center;padding:1.5rem}.k-fatal-box{width:100%;height:100%;display:flex;flex-direction:column;color:var(--color-black);background:var(--color-red-400);box-shadow:var(--shadow-xl);border-radius:var(--rounded)}.k-fatal-box .k-headline{line-height:1;font-size:var(--text-sm);padding:.75rem}.k-fatal-box .k-button{padding:.75rem}.k-fatal-iframe{border:0;width:100%;flex-grow:1;background:var(--color-white)}.k-headline{--size:var(--text-base);font-size:var(--size);font-weight:var(--font-bold);line-height:1.5em}.k-headline[data-size=small]{--size:var(--text-sm)}.k-headline[data-size=large]{--size:var(--text-xl);font-weight:var(--font-normal)}@media screen and (min-width:65em){.k-headline[data-size=large]{--size:var(--text-2xl)}}.k-headline[data-size=huge]{--size:var(--text-2xl);line-height:1.15em}@media screen and (min-width:65em){.k-headline[data-size=huge]{--size:var(--text-3xl)}}.k-headline[data-theme]{color:var(--theme)}[dir=ltr] .k-headline abbr{padding-left:.25rem}[dir=rtl] .k-headline abbr{padding-right:.25rem}.k-headline abbr{color:var(--color-gray-500);text-decoration:none}.k-icon{--size:1rem;position:relative;line-height:0;display:flex;align-items:center;justify-content:center;flex-shrink:0;font-size:var(--size)}.k-icon[data-size=medium]{--size:2rem}.k-icon[data-size=large]{--size:3rem}.k-icon svg{width:var(--size);height:var(--size);-moz-transform:scale(1)}.k-icon svg *{fill:currentColor}.k-icon[data-back=black]{color:var(--color-white)}.k-icon[data-back=white]{color:var(--color-gray-900)}.k-icon[data-back=pattern]{color:var(--color-white)}[data-disabled=true] .k-icon[data-back=pattern] svg{opacity:1}.k-icon-emoji{display:block;line-height:1;font-style:normal;font-size:var(--size)}@media only screen and (-webkit-min-device-pixel-ratio:2),not all,only screen and (min-resolution:192dpi),only screen and (min-resolution:2dppx){.k-icon-emoji{font-size:1.25em}}.k-icons{position:absolute;width:0;height:0}.k-image span{position:relative;display:block;line-height:0;padding-bottom:100%}.k-image img{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;-o-object-fit:contain;object-fit:contain}[dir=ltr] .k-image-error{left:50%}[dir=rtl] .k-image-error{right:50%}.k-image-error{position:absolute;top:50%;transform:translate(-50%,-50%);color:var(--color-white);font-size:.9em}.k-image-error svg *{fill:#ffffff4d}.k-image[data-cover=true] img{-o-object-fit:cover;object-fit:cover}.k-image[data-back=black] span{background:var(--color-gray-900)}.k-image[data-back=white] span{background:var(--color-white);color:var(--color-gray-900)}.k-image[data-back=white] .k-image-error{background:var(--color-gray-900);color:var(--color-white)}.k-image[data-back=pattern] span{background:var(--color-gray-800) var(--bg-pattern)}.k-loader{z-index:1}.k-loader-icon{animation:Spin .9s linear infinite}.k-offline-warning{position:fixed;top:0;right:0;bottom:0;left:0;z-index:var(--z-offline);background:var(--color-backdrop);display:flex;align-items:center;justify-content:center;line-height:1}.k-offline-warning p{display:flex;align-items:center;gap:.5rem;background:var(--color-white);box-shadow:var(--shadow);padding:.75rem;border-radius:var(--rounded)}.k-offline-warning p .k-icon{color:var(--color-red-400)}.k-progress{-webkit-appearance:none;width:100%;height:.5rem;border-radius:5rem;background:var(--color-border);overflow:hidden;border:0}.k-progress::-webkit-progress-bar{border:0;background:var(--color-border);height:.5rem;border-radius:20px}.k-progress::-webkit-progress-value{border-radius:inherit;background:var(--color-focus);-webkit-transition:width .3s;transition:width .3s}.k-progress::-moz-progress-bar{border-radius:inherit;background:var(--color-focus);-moz-transition:width .3s;transition:width .3s}[dir=ltr] .k-registration,[dir=ltr] .k-registration p{margin-right:1rem}[dir=rtl] .k-registration,[dir=rtl] .k-registration p{margin-left:1rem}.k-registration{display:flex;align-items:center}.k-registration p{color:var(--color-negative-light);font-size:var(--text-sm);font-weight:600}@media screen and (max-width:90em){.k-registration p{display:none}}.k-registration .k-button{color:var(--color-white)}.k-sort-handle{cursor:move;cursor:grab;cursor:-webkit-grab;color:var(--color-gray-900);justify-content:center;align-items:center;line-height:0;width:2rem;height:2rem;display:flex;will-change:opacity,color;transition:opacity .3s;z-index:1}.k-sort-handle svg{width:1rem;height:1rem}.k-sort-handle:active{cursor:grabbing;cursor:-webkit-grabbing}.k-status-icon svg{width:14px;height:14px}.k-status-icon .k-icon{color:var(--theme-light)}.k-status-icon .k-button-text{color:var(--color-black)}.k-status-icon[data-disabled=true]{opacity:1!important}.k-status-icon[data-disabled=true] .k-icon{color:var(--color-gray-400);opacity:.5}.k-text{line-height:1.5em}[dir=ltr] .k-text ol,[dir=ltr] .k-text ul{margin-left:1rem}[dir=rtl] .k-text ol,[dir=rtl] .k-text ul{margin-right:1rem}.k-text li{list-style:inherit}.k-text p,.k-text>ol,.k-text>ul{margin-bottom:1.5em}.k-text a{text-decoration:underline}.k-text>:last-child{margin-bottom:0}.k-text[data-size=tiny]{font-size:var(--text-xs)}.k-text[data-size=small]{font-size:var(--text-sm)}.k-text[data-size=medium]{font-size:var(--text-base)}.k-text[data-size=large]{font-size:var(--text-xl)}.k-text[data-align]{text-align:var(--align)}.k-text[data-theme=help]{font-size:var(--text-sm);color:var(--color-gray-600);line-height:1.25rem}.k-dialog-body .k-text{word-wrap:break-word}.k-user-info{display:flex;align-items:center;line-height:1;font-size:var(--text-sm)}[dir=ltr] .k-user-info .k-image{margin-right:.75rem}[dir=rtl] .k-user-info .k-image{margin-left:.75rem}.k-user-info .k-image{width:1.5rem}[dir=ltr] .k-user-info .k-icon{margin-right:.75rem}[dir=rtl] .k-user-info .k-icon{margin-left:.75rem}.k-user-info .k-icon{width:1.5rem;height:1.5rem;background:var(--color-black);color:var(--color-white)}.k-breadcrumb{padding-left:.5rem;padding-right:.5rem}.k-breadcrumb-dropdown{height:2.5rem;width:2.5rem;display:flex;align-items:center;justify-content:center}.k-breadcrumb ol{display:none;align-items:center}@media screen and (min-width:30em){.k-breadcrumb ol{display:flex}.k-breadcrumb-dropdown{display:none}}.k-breadcrumb li,.k-breadcrumb-link{display:flex;align-items:center;min-width:0}.k-breadcrumb-link{font-size:var(--text-sm);align-self:stretch;padding-top:.625rem;padding-bottom:.625rem;line-height:1.25rem}.k-breadcrumb li{flex-shrink:3}.k-breadcrumb li:last-child{flex-shrink:1}.k-breadcrumb li:not(:last-child):after{content:"/";padding-left:.5rem;padding-right:.5rem;opacity:.5;flex-shrink:0}.k-breadcrumb li:not(:first-child):not(:last-child){max-width:15vw}[dir=ltr] .k-breadcrumb-icon{margin-right:.5rem}[dir=rtl] .k-breadcrumb-icon{margin-left:.5rem}.k-breadcrumb-link-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}button{line-height:inherit;border:0;font-family:var(--font-sans);font-size:1rem;color:currentColor;background:0 0;cursor:pointer}button::-moz-focus-inner{padding:0;border:0}.k-button{display:inline-block;position:relative;font-size:var(--text-sm);transition:color .3s;outline:0}.k-button:focus,.k-button:hover{outline:0}.k-button *{vertical-align:middle}.k-button[data-responsive=true] .k-button-text{display:none}@media screen and (min-width:30em){.k-button[data-responsive=true] .k-button-text{display:inline}}.k-button[data-theme]{color:var(--theme)}.k-button-icon{display:inline-flex;align-items:center;line-height:0}[dir=ltr] .k-button-icon~.k-button-text{padding-left:.5rem}[dir=rtl] .k-button-icon~.k-button-text{padding-right:.5rem}.k-button-text{opacity:.75}.k-button:focus .k-button-text,.k-button:hover .k-button-text{opacity:1}.k-button-text b,.k-button-text span{vertical-align:baseline}.k-button[data-disabled=true]{opacity:.5;pointer-events:none;cursor:default}.k-card-options>.k-button[data-disabled=true]{display:inline-flex}.k-button-group{--padding-x:.75rem;--padding-y:1rem;--line-height:1rem;font-size:0;margin:0 calc(var(--padding-x)*-1)}.k-button-group>.k-dropdown{height:calc(var(--line-height) + (var(--padding-y)*2));display:inline-block}.k-button-group>.k-button,.k-button-group>.k-dropdown>.k-button{padding:var(--padding-y) var(--padding-x);line-height:var(--line-height)}.k-button-group .k-dropdown-content{top:calc(100% + 1px);margin:0 var(--padding-x)}.k-dropdown{position:relative}[dir=ltr] .k-dropdown-content{text-align:left}[dir=rtl] .k-dropdown-content{text-align:right}.k-dropdown-content{position:absolute;top:100%;background:var(--color-black);color:var(--color-white);z-index:var(--z-dropdown);box-shadow:var(--shadow-lg);border-radius:var(--rounded);margin-bottom:6rem}[dir=ltr] .k-dropdown-content[data-align=left]{left:0}[dir=ltr] .k-dropdown-content[data-align=right],[dir=rtl] .k-dropdown-content[data-align=left]{right:0}[dir=rtl] .k-dropdown-content[data-align=right]{left:0}.k-dropdown-content>.k-dropdown-item:first-child{margin-top:.5rem}.k-dropdown-content>.k-dropdown-item:last-child{margin-bottom:.5rem}.k-dropdown-content[data-dropup=true]{top:auto;bottom:100%;margin-bottom:.5rem}.k-dropdown-content hr{border-color:currentColor;opacity:.2;margin:.5rem 1rem}.k-dropdown-content[data-theme=light]{background:var(--color-white);color:var(--color-black)}.k-dropdown-item{white-space:nowrap;line-height:1;display:flex;width:100%;align-items:center;font-size:var(--text-sm);padding:6px 16px}.k-dropdown-item:focus{outline:0;box-shadow:var(--shadow-outline)}[dir=ltr] .k-dropdown-item .k-button-figure{padding-right:.5rem}[dir=rtl] .k-dropdown-item .k-button-figure{padding-left:.5rem}.k-dropdown-item .k-button-figure{text-align:center}.k-link{outline:0}.k-options-dropdown,.k-options-dropdown-toggle{display:flex;justify-content:center;align-items:center;height:38px}.k-options-dropdown-toggle{min-width:38px;padding:0 .75rem}.k-pagination{-webkit-user-select:none;-moz-user-select:none;user-select:none;direction:ltr}.k-pagination .k-button{padding:1rem}.k-pagination-details{white-space:nowrap}.k-pagination>span{font-size:var(--text-sm)}.k-pagination[data-align]{text-align:var(--align)}[dir=ltr] .k-dropdown-content.k-pagination-selector{left:50%}[dir=rtl] .k-dropdown-content.k-pagination-selector{right:50%}.k-dropdown-content.k-pagination-selector{position:absolute;top:100%;transform:translate(-50%);background:var(--color-black)}[dir=ltr] .k-dropdown-content.k-pagination-selector{direction:ltr}[dir=rtl] .k-dropdown-content.k-pagination-selector{direction:rtl}.k-pagination-settings{display:flex;align-items:center;justify-content:space-between}.k-pagination-settings .k-button{line-height:1}[dir=ltr] .k-pagination-settings label{border-right:1px solid rgba(255,255,255,.35)}[dir=rtl] .k-pagination-settings label{border-left:1px solid rgba(255,255,255,.35)}.k-pagination-settings label{display:flex;align-items:center;padding:.625rem 1rem;font-size:var(--text-xs)}[dir=ltr] .k-pagination-settings label span{margin-right:.5rem}[dir=rtl] .k-pagination-settings label span{margin-left:.5rem}.k-prev-next{direction:ltr}.k-search{max-width:30rem;margin:2.5rem auto;box-shadow:var(--shadow-lg);background:var(--color-light);border-radius:var(--rounded)}.k-search-input{display:flex}.k-search-types{flex-shrink:0;display:flex}[dir=ltr] .k-search-types>.k-button{padding-left:1rem}[dir=rtl] .k-search-types>.k-button{padding-right:1rem}.k-search-types>.k-button{font-size:var(--text-base);line-height:1;height:2.5rem}.k-search-types>.k-button .k-icon{height:2.5rem}.k-search-types>.k-button .k-button-text{opacity:1;font-weight:500}.k-search-input input{background:0 0;flex-grow:1;font:inherit;padding:.75rem;border:0;height:2.5rem}.k-search-close{width:3rem;line-height:1}.k-search-close .k-icon-loader{animation:Spin 2s linear infinite}.k-search input:focus{outline:0}.k-search-results{padding:.5rem 1rem 1rem}.k-search .k-item:not(:last-child){margin-bottom:.25rem}.k-search .k-item[data-selected=true]{outline:2px solid var(--color-focus)}.k-search .k-item-info,.k-search-empty{font-size:var(--text-xs)}.k-search-empty{text-align:center;color:var(--color-gray-600)}.k-tag{position:relative;font-size:var(--text-sm);line-height:1;cursor:pointer;background-color:var(--color-gray-900);color:var(--color-light);border-radius:var(--rounded);display:flex;align-items:center;justify-content:space-between;-webkit-user-select:none;-moz-user-select:none;user-select:none}.k-tag:focus{outline:0;background-color:var(--color-focus);color:#fff}.k-tag-text{padding:.3rem .75rem .375rem;line-height:var(--leading-tight)}[dir=ltr] .k-tag-toggle{padding-right:1px}[dir=rtl] .k-tag-toggle{padding-left:1px}[dir=ltr] .k-tag-toggle{border-left:1px solid rgba(255,255,255,.15)}[dir=rtl] .k-tag-toggle{border-right:1px solid rgba(255,255,255,.15)}.k-tag-toggle{color:#ffffffb3;width:1.75rem;height:100%}.k-tag-toggle:hover{background:rgba(255,255,255,.2);color:#fff}[data-disabled=true] .k-tag{background-color:var(--color-gray-600)}[data-disabled=true] .k-tag .k-tag-toggle{display:none}.k-topbar{--bg:var(--color-gray-900);position:relative;color:var(--color-white);flex-shrink:0;height:2.5rem;line-height:1;background:var(--bg)}.k-topbar-wrapper{position:relative;display:flex;align-items:center;margin-left:-.75rem;margin-right:-.75rem}[dir=ltr] .k-topbar-wrapper:after{left:100%}[dir=rtl] .k-topbar-wrapper:after{right:100%}.k-topbar-wrapper:after{position:absolute;content:"";height:2.5rem;background:var(--bg);width:3rem}.k-topbar-menu{flex-shrink:0}.k-topbar-menu ul{padding:.5rem 0}.k-topbar .k-button[data-theme]{color:var(--theme-light)}.k-topbar .k-button-text{opacity:1}.k-topbar-menu-button{display:flex;align-items:center}.k-topbar-menu .k-link[aria-current]{color:var(--color-focus);font-weight:500}.k-topbar-button{padding:.75rem;line-height:1;font-size:var(--text-sm)}.k-topbar-button .k-button-text{display:flex}[dir=ltr] .k-topbar-view-button{padding-right:0}[dir=rtl] .k-topbar-view-button{padding-left:0}.k-topbar-view-button{flex-shrink:0;display:flex;align-items:center}[dir=ltr] .k-topbar-view-button .k-icon{margin-right:.5rem}[dir=rtl] .k-topbar-view-button .k-icon{margin-left:.5rem}[dir=ltr] .k-topbar-signals{right:0}[dir=rtl] .k-topbar-signals{left:0}.k-topbar-signals{position:absolute;top:0;background:var(--bg);height:2.5rem;display:flex;align-items:center}.k-topbar-signals:before{position:absolute;content:"";top:-.5rem;bottom:0;width:.5rem;background:-webkit-linear-gradient(inline-start,rgba(17,17,17,0),#111)}.k-topbar-signals .k-button{line-height:1}.k-topbar-notification{font-weight:var(--font-bold);line-height:1;display:flex}@media screen and (max-width:30em){.k-topbar .k-button[data-theme=negative] .k-button-text{display:none}}.k-section,.k-sections{padding-bottom:3rem}.k-section-header{position:relative;display:flex;align-items:baseline;z-index:1}[dir=ltr] .k-section-header .k-headline{padding-right:var(--spacing-3)}[dir=rtl] .k-section-header .k-headline{padding-left:var(--spacing-3)}.k-section-header .k-headline{line-height:1.25rem;min-height:2rem;flex-grow:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}[dir=ltr] .k-section-header .k-button-group{right:0}[dir=rtl] .k-section-header .k-button-group{left:0}.k-section-header .k-button-group{position:absolute;top:calc(-.5rem - 1px)}.k-section-header .k-button-group>.k-button{padding:.75rem;display:inline-flex}.k-fields-issue-headline{margin-bottom:.5rem}.k-fields-section input[type=submit]{display:none}[data-locked=true] .k-fields-section{opacity:.2;pointer-events:none}.k-models-section[data-processing=true]{pointer-events:none}.k-models-section-search.k-input{margin-bottom:var(--spacing-3);background:var(--color-gray-300);padding:var(--spacing-2) var(--spacing-3);height:var(--field-input-height);border-radius:var(--rounded);font-size:var(--text-sm)}.k-info-section-headline{margin-bottom:.5rem}.k-user-profile{background:var(--color-white)}.k-user-profile>.k-view{padding-top:3rem;padding-bottom:3rem;display:flex;align-items:center;line-height:0}[dir=ltr] .k-user-profile .k-button-group{margin-left:.75rem}[dir=rtl] .k-user-profile .k-button-group{margin-right:.75rem}.k-user-profile .k-button-group{overflow:hidden}.k-user-profile .k-button-group .k-button{display:block;padding-top:.25rem;padding-bottom:.25rem;overflow:hidden;white-space:nowrap}.k-user-view-image .k-icon,.k-user-view-image .k-image{width:5rem;height:5rem;border-radius:var(--rounded);line-height:0;overflow:hidden}.k-user-view-image[data-disabled=true]{opacity:1}.k-user-view-image .k-image{display:block}.k-user-view-image .k-button-text{opacity:1}.k-user-name-placeholder{color:var(--color-gray-500);transition:color .3s}.k-header[data-editable=true] .k-user-name-placeholder:hover{color:var(--color-gray-900)}.k-error-view{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center}.k-error-view-content{line-height:1.5em;max-width:25rem;text-align:center}.k-error-view-icon{color:var(--color-negative);display:inline-block}.k-error-view-content p:not(:last-child){margin-bottom:.75rem}.k-installation-view .k-button{display:block;margin-top:1.5rem}.k-installation-view .k-headline{margin-bottom:.75rem}.k-installation-issues{line-height:1.5em;font-size:var(--text-sm)}[dir=ltr] .k-installation-issues li{padding-left:3.5rem}[dir=rtl] .k-installation-issues li{padding-right:3.5rem}.k-installation-issues li{position:relative;padding:1.5rem;background:var(--color-white)}[dir=ltr] .k-installation-issues .k-icon{left:1.5rem}[dir=rtl] .k-installation-issues .k-icon{right:1.5rem}.k-installation-issues .k-icon{position:absolute;top:calc(1.5rem + 2px)}.k-installation-issues .k-icon svg *{fill:var(--color-negative)}.k-installation-issues li:not(:last-child){margin-bottom:2px}.k-installation-issues li code{font:inherit;color:var(--color-negative)}[dir=ltr] .k-installation-view .k-button[type=submit]{margin-left:-1rem}[dir=rtl] .k-installation-view .k-button[type=submit]{margin-right:-1rem}.k-installation-view .k-button[type=submit]{padding:1rem}.k-languages-view .k-header{margin-bottom:1.5rem}.k-languages-view-section-header{margin-bottom:.5rem}.k-languages-view-section{margin-bottom:3rem}.k-login-fields{position:relative}[dir=ltr] .k-login-toggler{right:0}[dir=rtl] .k-login-toggler{left:0}.k-login-toggler{position:absolute;top:0;z-index:1;text-decoration:underline;font-size:.875rem}.k-login-form label abbr{visibility:hidden}.k-login-buttons{display:flex;align-items:center;justify-content:flex-end;padding:1.5rem 0}[dir=ltr] .k-login-button{margin-right:-1rem}[dir=rtl] .k-login-button{margin-left:-1rem}.k-login-button{padding:.5rem 1rem;font-weight:500;transition:opacity .3s}.k-login-button span{opacity:1}.k-login-button[disabled]{opacity:.25}.k-login-back-button,.k-login-checkbox{display:flex;align-items:center;flex-grow:1}[dir=ltr] .k-login-back-button{margin-left:-1rem}[dir=rtl] .k-login-back-button{margin-right:-1rem}.k-login-checkbox{padding:.5rem 0;font-size:var(--text-sm);cursor:pointer}.k-login-checkbox .k-checkbox-text{opacity:.75;transition:opacity .3s}.k-login-checkbox:focus span,.k-login-checkbox:hover span{opacity:1}.k-password-reset-view .k-user-info{height:38px;margin-bottom:2.25rem;padding:.5rem;background:var(--color-white);border-radius:var(--rounded-xs);box-shadow:var(--shadow)}.k-system-view .k-header{margin-bottom:1.5rem}.k-system-view-section-header{margin-bottom:.5rem;display:flex;justify-content:space-between}.k-system-view-section{margin-bottom:3rem}.k-system-info [data-theme] .k-stat-value{color:var(--theme)}.k-block-type-code-editor{position:relative;font-size:var(--text-sm);line-height:1.5em;background:#000;border-radius:var(--rounded);padding:.5rem .75rem 3rem;color:#fff;font-family:var(--font-mono)}.k-block-type-code-editor .k-editor{white-space:pre-wrap;line-height:1.75em}[dir=ltr] .k-block-type-code-editor-language{right:0}[dir=ltr] .k-block-type-code-editor-language .k-icon,[dir=rtl] .k-block-type-code-editor-language{left:0}.k-block-type-code-editor-language{font-size:var(--text-sm);position:absolute;bottom:0}[dir=rtl] .k-block-type-code-editor-language .k-icon{right:0}.k-block-type-code-editor-language .k-icon{position:absolute;top:0;height:1.5rem;display:flex;width:2rem;z-index:0}.k-block-type-code-editor-language .k-select-input{position:relative;padding:.325rem .75rem .5rem 2rem;z-index:1;font-size:var(--text-xs)}.k-block-type-default .k-block-title{line-height:1.5em}.k-block-type-gallery ul{display:grid;grid-gap:.75rem;grid-template-columns:repeat(auto-fit,minmax(6rem,1fr));line-height:0;align-items:center;justify-content:center;cursor:pointer}.k-block-type-gallery li:empty{padding-bottom:100%;background:var(--color-background)}.k-block-type-gallery li{display:flex;position:relative;align-items:center;justify-content:center}.k-block-type-gallery li img{flex-grow:1;max-width:100%}.k-block-type-heading-input{line-height:1.25em;font-weight:var(--font-bold)}.k-block-type-heading-input[data-level=h1]{font-size:var(--text-3xl);line-height:1.125em}.k-block-type-heading-input[data-level=h2]{font-size:var(--text-2xl)}.k-block-type-heading-input[data-level=h3]{font-size:var(--text-xl)}.k-block-type-heading-input[data-level=h4]{font-size:var(--text-lg)}.k-block-type-heading-input[data-level=h5]{line-height:1.5em;font-size:var(--text-base)}.k-block-type-heading-input[data-level=h6]{line-height:1.5em;font-size:var(--text-sm)}.k-block-type-heading-input .ProseMirror strong{font-weight:700}.k-block-type-image .k-block-figure-container{display:block;text-align:center;line-height:0}.k-block-type-image-auto{max-width:100%;max-height:30rem}.k-block-type-line hr{margin-top:.75rem;margin-bottom:.75rem;border:0;border-top:2px solid var(--color-gray-400)}.k-block-type-markdown-input{position:relative;font-size:var(--text-sm);line-height:1.5em;background:var(--color-background);border-radius:var(--rounded);padding:.5rem .5rem 0;font-family:var(--font-mono)}[dir=ltr] .k-block-type-quote-editor{padding-left:1rem}[dir=rtl] .k-block-type-quote-editor{padding-right:1rem}[dir=ltr] .k-block-type-quote-editor{border-left:2px solid var(--color-black)}[dir=rtl] .k-block-type-quote-editor{border-right:2px solid var(--color-black)}.k-block-type-quote-text{font-size:var(--text-xl);margin-bottom:.25rem;line-height:1.25em}.k-block-type-quote-citation{font-style:italic;font-size:var(--text-sm);color:var(--color-gray-600)}.k-block-type-table-preview{cursor:pointer;border:1px solid var(--color-gray-300);border-spacing:0;border-radius:var(--rounded-sm);overflow:hidden}[dir=ltr] .k-block-type-table-preview td,[dir=ltr] .k-block-type-table-preview th{text-align:left}[dir=rtl] .k-block-type-table-preview td,[dir=rtl] .k-block-type-table-preview th{text-align:right}.k-block-type-table-preview td,.k-block-type-table-preview th{line-height:1.5em;font-size:var(--text-sm)}.k-block-type-table-preview th{padding:.5rem .75rem}.k-block-type-table-preview td:not(.k-table-index-column){padding:0 .75rem}.k-block-type-table-preview td [class$=-field-preview],.k-block-type-table-preview td>*{padding:0}.k-block-type-text-input{font-size:var(--text-base);line-height:1.5em;height:100%}.k-block-container-type-text,.k-block-type-text,.k-block-type-text .k-writer .ProseMirror{height:100%}.k-block-container{position:relative;padding:.75rem;background:var(--color-white);border-radius:var(--rounded)}.k-block-container:not(:last-of-type){border-bottom:1px dashed rgba(0,0,0,.1)}.k-block-container:focus{outline:0}.k-block-container[data-batched=true],.k-block-container[data-selected=true]{z-index:2;border-bottom-color:transparent}.k-block-container[data-batched=true]:after{position:absolute;top:0;right:0;bottom:0;left:0;content:"";background:rgba(238,242,246,.375);mix-blend-mode:multiply;border:1px solid var(--color-focus)}.k-block-container[data-selected=true]{box-shadow:var(--color-focus) 0 0 0 1px,var(--color-focus-outline) 0 0 0 3px}[dir=ltr] .k-block-container .k-block-options{right:.75rem}[dir=rtl] .k-block-container .k-block-options{left:.75rem}.k-block-container .k-block-options{display:none;position:absolute;top:0;margin-top:calc(-1.75rem + 2px)}.k-block-container[data-last-in-batch=true]>.k-block-options,.k-block-container[data-selected=true]>.k-block-options{display:flex}.k-block-container[data-hidden=true] .k-block{opacity:.25}.k-drawer-options .k-button[data-disabled=true]{vertical-align:middle;display:inline-grid}[data-disabled=true] .k-block-container{background:var(--color-background)}.k-block-importer.k-dialog{background:#313740;color:var(--color-white)}.k-block-importer .k-dialog-body{padding:0}.k-block-importer label{display:block;padding:var(--spacing-6) var(--spacing-6)0;color:var(--color-gray-400)}.k-block-importer label kbd{background:rgba(0,0,0,.5);font-family:var(--font-mono);letter-spacing:.1em;padding:.25rem;border-radius:var(--rounded);margin:0 .25rem}.k-block-importer textarea{width:100%;height:20rem;background:0 0;font:inherit;color:var(--color-white);border:0;padding:var(--spacing-6);resize:none}.k-block-importer textarea:focus{outline:0}.k-blocks{background:var(--color-white);box-shadow:var(--shadow);border-radius:var(--rounded)}[data-disabled=true] .k-blocks{background:var(--color-background)}.k-blocks[data-multi-select-key=true] .k-block-container>*{pointer-events:none}.k-blocks[data-empty=true]{padding:0;background:0 0;box-shadow:none}.k-blocks .k-sortable-ghost{outline:2px solid var(--color-focus);box-shadow:#11111140 0 5px 10px;cursor:grabbing;cursor:-webkit-grabbing}.k-blocks-list>.k-blocks-empty{display:flex;align-items:center}.k-blocks-list>.k-blocks-empty:not(:only-child){display:none}.k-block-figure{cursor:pointer}.k-block-figure iframe{border:0;pointer-events:none;background:var(--color-black)}.k-block-figure figcaption{padding-top:.5rem;color:var(--color-gray-600);font-size:var(--text-sm);text-align:center}.k-block-figure-empty.k-button{display:flex;width:100%;height:6rem;border-radius:var(--rounded-sm);align-items:center;justify-content:center;color:var(--color-gray-600);background:var(--color-background)}.k-block-options{display:flex;align-items:center;background:var(--color-white);z-index:var(--z-dropdown);box-shadow:#0000001a -2px 0 5px,var(--shadow),var(--shadow-xl);color:var(--color-black);border-radius:var(--rounded)}[dir=ltr] .k-block-options-button{border-right:1px solid var(--color-background)}[dir=rtl] .k-block-options-button{border-left:1px solid var(--color-background)}.k-block-options-button{--block-options-button-size:30px;width:var(--block-options-button-size);height:var(--block-options-button-size);line-height:1;display:inline-flex;align-items:center;justify-content:center}[dir=ltr] .k-block-options-button:first-child{border-top-left-radius:var(--rounded)}[dir=rtl] .k-block-options-button:first-child{border-top-right-radius:var(--rounded)}[dir=ltr] .k-block-options-button:first-child{border-bottom-left-radius:var(--rounded)}[dir=rtl] .k-block-options-button:first-child{border-bottom-right-radius:var(--rounded)}[dir=ltr] .k-block-options-button:last-child{border-top-right-radius:var(--rounded)}[dir=rtl] .k-block-options-button:last-child{border-top-left-radius:var(--rounded)}[dir=ltr] .k-block-options-button:last-child{border-bottom-right-radius:var(--rounded)}[dir=rtl] .k-block-options-button:last-child{border-bottom-left-radius:var(--rounded)}[dir=ltr] .k-block-options-button:last-of-type{border-right:0}[dir=rtl] .k-block-options-button:last-of-type{border-left:0}.k-block-options-button[aria-current]{color:var(--color-focus)}.k-block-options-button:hover{background:var(--color-gray-100)}.k-block-options .k-dropdown-content{margin-top:.5rem}.k-block-selector.k-dialog{background:var(--color-dark);color:var(--color-white)}.k-block-selector .k-headline{margin-bottom:1rem}.k-block-selector details:not(:last-of-type){margin-bottom:1.5rem}.k-block-selector summary{font-size:var(--text-xs);cursor:pointer;color:var(--color-gray-400)}.k-block-selector details:only-of-type summary{pointer-events:none}.k-block-selector summary:focus{outline:0}.k-block-selector summary:focus-visible{color:var(--color-green-400)}.k-block-types{display:grid;grid-gap:2px;margin-top:.75rem;grid-template-columns:repeat(1,1fr)}[dir=ltr] .k-block-types .k-button{text-align:left}[dir=rtl] .k-block-types .k-button{text-align:right}.k-block-types .k-button{display:flex;align-items:flex-start;border-radius:var(--rounded);background:rgba(0,0,0,.5);width:100%;padding:0 .75rem 0 0;line-height:1.5em}.k-block-types .k-button:focus{outline:2px solid var(--color-green-300)}.k-block-types .k-button .k-button-text{padding:.5rem 0 .5rem .5rem}.k-block-types .k-button .k-icon{width:38px;height:38px}.k-clipboard-hint{padding-top:1.5rem;font-size:var(--text-xs);color:var(--color-gray-400)}.k-clipboard-hint kbd{background:rgba(0,0,0,.5);font-family:var(--font-mono);letter-spacing:.1em;padding:.25rem;border-radius:var(--rounded);margin:0 .25rem}[dir=ltr] .k-block-title{padding-right:.75rem}[dir=rtl] .k-block-title{padding-left:.75rem}.k-block-title{display:flex;align-items:center;min-width:0;font-size:var(--text-sm);line-height:1}[dir=ltr] .k-block-icon{margin-right:.5rem}[dir=rtl] .k-block-icon{margin-left:.5rem}.k-block-icon{width:1rem;color:var(--color-gray-500)}[dir=ltr] .k-block-name{margin-right:.5rem}[dir=rtl] .k-block-name{margin-left:.5rem}.k-block-label{color:var(--color-gray-600);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.k-bubbles-field-preview{padding:.325rem .75rem}.k-text-field-preview{padding:.325rem .75rem;overflow-x:hidden;text-overflow:ellipsis;white-space:nowrap}.k-url-field-preview{padding:.325rem .75rem}.k-url-field-preview a{color:var(--color-focus);text-decoration:underline;transition:color .3s;white-space:nowrap;max-width:100%}.k-url-field-preview a:hover{color:var(--color-black)}.k-flag-field-preview{height:var(--table-row-height);width:var(--table-row-height);display:flex;justify-content:center;align-items:center}.k-html-field-preview{padding:.325rem .75rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.5em}.k-html-field-preview p:not(:last-child){margin-bottom:1.5em}[dir=ltr] .k-html-field-preview ol,[dir=ltr] .k-html-field-preview ul{margin-left:1rem}[dir=rtl] .k-html-field-preview ol,[dir=rtl] .k-html-field-preview ul{margin-right:1rem}.k-html-field-preview ul>li{list-style:disc}.k-html-field-preview ol ul>li,.k-html-field-preview ul ul>li{list-style:circle}.k-html-field-preview ol>li{list-style:decimal}.k-html-field-preview ol>li::marker{color:var(--color-gray-500);font-size:var(--text-xs)}.k-toggle-field-preview label{padding:0 .25rem 0 .75rem;display:flex;height:38px;cursor:pointer;overflow:hidden;white-space:nowrap}[dir=ltr] .k-toggle-field-preview .k-toggle-input-label{padding-left:.5rem}[dir=ltr] [data-align=right] .k-toggle-field-preview .k-toggle-input-label,[dir=rtl] .k-toggle-field-preview .k-toggle-input-label{padding-right:.5rem}[dir=rtl] [data-align=right] .k-toggle-field-preview .k-toggle-input-label{padding-left:.5rem}[dir=ltr] .k-toggle-field-preview .k-toggle-input{padding-left:.75rem;padding-right:.25rem}.k-toggle-field-preview .k-toggle-input{padding-top:0;padding-bottom:0}[dir=ltr] [data-align=right] .k-toggle-field-preview .k-toggle-input,[dir=rtl] .k-toggle-field-preview .k-toggle-input{padding-left:.25rem;padding-right:.75rem}[dir=rtl] [data-align=right] .k-toggle-field-preview .k-toggle-input{padding-right:.25rem;padding-left:.75rem}[data-align=right] .k-toggle-field-preview .k-toggle-input{flex-direction:row-reverse}[data-align=left]{--align:start}[data-align=center]{--align:center}[data-align=right]{--align:end}[data-invalid=true]{border:1px solid var(--color-negative-outline);box-shadow:var(--color-negative-outline) 0 0 3px 2px}[data-invalid=true]:focus-within{border:var(--field-input-invalid-focus-border)!important;box-shadow:var(--color-negative-outline) 0 0 0 2px!important}[data-tabbed=true]{box-shadow:var(--shadow-outline);border-radius:var(--rounded)}[data-theme=positive],[data-theme=success]{--theme:var(--color-positive);--theme-light:var(--color-positive-light);--theme-bg:var(--color-green-300)}[data-theme=error],[data-theme=negative]{--theme:var(--color-negative);--theme-light:var(--color-negative-light);--theme-bg:var(--color-red-300)}[data-theme=notice]{--theme:var(--color-notice);--theme-light:var(--color-notice-light);--theme-bg:var(--color-orange-300)}[data-theme=info]{--theme:var(--color-focus);--theme-light:var(--color-focus-light);--theme-bg:var(--color-blue-200)}.scroll-x,.scroll-x-auto,.scroll-y,.scroll-y-auto{-webkit-overflow-scrolling:touch;transform:translateZ(0)}.scroll-x,.scroll-x-auto{overflow-x:scroll;overflow-y:hidden}.scroll-x-auto{overflow-x:auto}.scroll-y,.scroll-y-auto{overflow-x:hidden;overflow-y:scroll}.scroll-y-auto{overflow-y:auto}.input-hidden{position:absolute;-webkit-appearance:none;-moz-appearance:none;appearance:none;width:0;height:0;opacity:0}.k-offscreen,.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0} diff --git a/kirby/panel/dist/favicon.png b/kirby/panel/dist/favicon.png old mode 100644 new mode 100755 diff --git a/kirby/panel/dist/favicon.svg b/kirby/panel/dist/favicon.svg old mode 100644 new mode 100755 diff --git a/kirby/panel/dist/img/icons.svg b/kirby/panel/dist/img/icons.svg old mode 100644 new mode 100755 index 7bcd793..d0eba91 --- a/kirby/panel/dist/img/icons.svg +++ b/kirby/panel/dist/img/icons.svg @@ -24,12 +24,18 @@ + + + + + + @@ -60,6 +66,10 @@ + + + + @@ -140,6 +150,15 @@ + + + + + + + + + @@ -175,69 +194,35 @@ - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - + - - - - - - + + + + - - - - + - - - + + + + + + + + + + + @@ -248,6 +233,11 @@ + + + + + @@ -255,6 +245,9 @@ + + + @@ -422,6 +415,10 @@ + + + + @@ -456,6 +453,9 @@ + + + @@ -466,6 +466,9 @@ + + + @@ -573,6 +576,9 @@ + + + @@ -626,6 +632,9 @@ + + + diff --git a/kirby/panel/dist/js/index.js b/kirby/panel/dist/js/index.js old mode 100644 new mode 100755 index d43dc48..40c1363 --- a/kirby/panel/dist/js/index.js +++ b/kirby/panel/dist/js/index.js @@ -1 +1 @@ -var t=Object.defineProperty,e=Object.defineProperties,n=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,r=(e,n,s)=>n in e?t(e,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[n]=s,a=(t,e)=>{for(var n in e||(e={}))i.call(e,n)&&r(t,n,e[n]);if(s)for(var n of s(e))o.call(e,n)&&r(t,n,e[n]);return t},l=(t,s)=>e(t,n(s));import{V as u,a as c,m as d,d as p,c as h,b as f,I as m,P as g,S as k,F as v,N as b,s as y,l as $,w as _,e as w,f as x,t as S,g as C,h as O,i as E,j as T,k as A,n as M,D as I,o as L,E as j,p as D,q as B,r as P,T as N,u as q,v as R,x as F,y as z,z as Y,A as H,B as U,C as K,G as J,H as G,J as V}from"./vendor.js";var W=t=>({changeName:async(e,n,s)=>t.patch(e+"/files/"+n+"/name",{name:s}),delete:async(e,n)=>t.delete(e+"/files/"+n),async get(e,n,s){let i=await t.get(e+"/files/"+n,s);return!0===Array.isArray(i.content)&&(i.content={}),i},link(t,e,n){return"/"+this.url(t,e,n)},update:async(e,n,s)=>t.patch(e+"/files/"+n,s),url(t,e,n){let s=t+"/files/"+e;return n&&(s+="/"+n),s}}),X=t=>({async blueprint(e){return t.get("pages/"+this.id(e)+"/blueprint")},async blueprints(e,n){return t.get("pages/"+this.id(e)+"/blueprints",{section:n})},async changeSlug(e,n){return t.patch("pages/"+this.id(e)+"/slug",{slug:n})},async changeStatus(e,n,s){return t.patch("pages/"+this.id(e)+"/status",{status:n,position:s})},async changeTemplate(e,n){return t.patch("pages/"+this.id(e)+"/template",{template:n})},async changeTitle(e,n){return t.patch("pages/"+this.id(e)+"/title",{title:n})},async children(e,n){return t.post("pages/"+this.id(e)+"/children/search",n)},async create(e,n){return null===e||"/"===e?t.post("site/children",n):t.post("pages/"+this.id(e)+"/children",n)},async delete(e,n){return t.delete("pages/"+this.id(e),n)},async duplicate(e,n,s){return t.post("pages/"+this.id(e)+"/duplicate",{slug:n,children:s.children||!1,files:s.files||!1})},async get(e,n){let s=await t.get("pages/"+this.id(e),n);return!0===Array.isArray(s.content)&&(s.content={}),s},id:t=>t.replace(/\//g,"+"),async files(e,n){return t.post("pages/"+this.id(e)+"/files/search",n)},link(t){return"/"+this.url(t)},async preview(t){return(await this.get(this.id(t),{select:"previewUrl"})).previewUrl},async search(e,n){return e?t.post("pages/"+this.id(e)+"/children/search?select=id,title,hasChildren",n):t.post("site/children/search?select=id,title,hasChildren",n)},async update(e,n){return t.patch("pages/"+this.id(e),n)},url(t,e){let n=null===t?"pages":"pages/"+String(t).replace(/\//g,"+");return e&&(n+="/"+e),n}});var Z=t=>({running:0,async request(e,n,s=!1){n=Object.assign(n||{},{credentials:"same-origin",cache:"no-store",headers:a({"x-requested-with":"xmlhttprequest","content-type":"application/json"},n.headers)}),t.methodOverwrite&&"GET"!==n.method&&"POST"!==n.method&&(n.headers["x-http-method-override"]=n.method,n.method="POST"),n=t.onPrepare(n);const i=e+"/"+JSON.stringify(n);t.onStart(i,s),this.running++;const o=await fetch([t.endpoint,e].join(t.endpoint.endsWith("/")||e.startsWith("/")?"":"/"),n);try{const e=await async function(t){const e=await t.text();let n;try{n=JSON.parse(e)}catch(s){return window.panel.$vue.$api.onParserError({html:e}),!1}return n}(o);if(o.status<200||o.status>299)throw e;if("error"===e.status)throw e;let n=e;return e.data&&"model"===e.type&&(n=e.data),this.running--,t.onComplete(i),t.onSuccess(e),n}catch(r){throw this.running--,t.onComplete(i),t.onError(r),r}},async get(t,e,n,s=!1){return e&&(t+="?"+Object.keys(e).filter((t=>void 0!==e[t]&&null!==e[t])).map((t=>t+"="+e[t])).join("&")),this.request(t,Object.assign(n||{},{method:"GET"}),s)},async post(t,e,n,s="POST",i=!1){return this.request(t,Object.assign(n||{},{method:s,body:JSON.stringify(e)}),i)},async patch(t,e,n,s=!1){return this.post(t,e,n,"PATCH",s)},async delete(t,e,n,s=!1){return this.post(t,e,n,"DELETE",s)}}),Q=t=>({blueprint:async e=>t.get("users/"+e+"/blueprint"),blueprints:async(e,n)=>t.get("users/"+e+"/blueprints",{section:n}),changeEmail:async(e,n)=>t.patch("users/"+e+"/email",{email:n}),changeLanguage:async(e,n)=>t.patch("users/"+e+"/language",{language:n}),changeName:async(e,n)=>t.patch("users/"+e+"/name",{name:n}),changePassword:async(e,n)=>t.patch("users/"+e+"/password",{password:n}),changeRole:async(e,n)=>t.patch("users/"+e+"/role",{role:n}),create:async e=>t.post("users",e),delete:async e=>t.delete("users/"+e),deleteAvatar:async e=>t.delete("users/"+e+"/avatar"),link(t,e){return"/"+this.url(t,e)},async list(e){return t.post(this.url(null,"search"),e)},get:async(e,n)=>t.get("users/"+e,n),async roles(e){return(await t.get(this.url(e,"roles"))).data.map((t=>({info:t.description||`(${window.panel.$t("role.description.placeholder")})`,text:t.title,value:t.name})))},search:async e=>t.post("users/search",e),update:async(e,n)=>t.patch("users/"+e,n),url(t,e){let n=t?"users/"+t:"users";return e&&(n+="/"+e),n}}),tt={install(t,e){t.prototype.$api=t.$api=((t={})=>{const e=a(a({},{endpoint:"/api",methodOverwrite:!0,onPrepare:t=>t,onStart(){},onComplete(){},onSuccess(){},onParserError(){},onError(t){throw window.console.log(t.message),t}}),t.config||{});let n=a(a(a({},e),Z(e)),t);return n.auth=(t=>({async login(e){const n={long:e.remember||!1,email:e.email,password:e.password};return t.post("auth/login",n)},logout:async()=>t.post("auth/logout"),user:async e=>t.get("auth",e),verifyCode:async e=>t.post("auth/code",{code:e})}))(n),n.files=W(n),n.languages=(t=>({create:async e=>t.post("languages",e),delete:async e=>t.delete("languages/"+e),get:async e=>t.get("languages/"+e),list:async()=>t.get("languages"),update:async(e,n)=>t.patch("languages/"+e,n)}))(n),n.pages=X(n),n.roles=(t=>({list:async e=>t.get("roles",e),get:async e=>t.get("roles/"+e)}))(n),n.system=(t=>({get:async(e={view:"panel"})=>t.get("system",e),install:async e=>(await t.post("system/install",e)).user,register:async e=>t.post("system/register",e)}))(n),n.site=(t=>({blueprint:async()=>t.get("site/blueprint"),blueprints:async()=>t.get("site/blueprints"),changeTitle:async e=>t.patch("site/title",{title:e}),children:async e=>t.post("site/children/search",e),get:async(e={view:"panel"})=>t.get("site",e),update:async e=>t.post("site",e)}))(n),n.translations=(t=>({list:async()=>t.get("translations"),get:async e=>t.get("translations/"+e)}))(n),n.users=Q(n),n.files.rename=n.files.changeName,n.pages.slug=n.pages.changeSlug,n.pages.status=n.pages.changeStatus,n.pages.template=n.pages.changeTemplate,n.pages.title=n.pages.changeTitle,n.site.title=n.site.changeTitle,n.system.info=n.system.get,n})({config:{endpoint:window.panel.$urls.api,onComplete:n=>{t.$api.requests=t.$api.requests.filter((t=>t!==n)),0===t.$api.requests.length&&e.dispatch("isLoading",!1)},onError:e=>{window.panel.$config.debug&&window.console.error(e),403!==e.code||"Unauthenticated"!==e.message&&"access.panel"!==e.key||t.prototype.$go("/logout")},onParserError:({html:t,silent:n})=>{e.dispatch("fatal",{html:t,silent:n})},onPrepare:t=>(window.panel.$language&&(t.headers["x-language"]=window.panel.$language.code),t.headers["x-csrf"]=window.panel.$system.csrf,t),onStart:(n,s=!1)=>{!1===s&&e.dispatch("isLoading",!0),t.$api.requests.push(n)},onSuccess:()=>{clearInterval(t.$api.ping),t.$api.ping=setInterval(t.$api.auth.user,3e5)}},ping:null,requests:[]}),t.$api.ping=setInterval(t.$api.auth.user,3e5)}},et={name:"Fiber",data:()=>({component:null,state:window.fiber,key:null}),created(){this.$fiber.init(this.state,{base:document.querySelector("base").href,headers:()=>({"X-CSRF":this.state.$system.csrf}),onFatal({text:t,options:e}){this.$store.dispatch("fatal",{html:t,silent:e.silent})},onFinish:()=>{0===this.$api.requests.length&&this.$store.dispatch("isLoading",!1)},onPushState:t=>{window.history.pushState(t,"",t.$url)},onReplaceState:t=>{window.history.replaceState(t,"",t.$url)},onStart:({silent:t})=>{!0!==t&&this.$store.dispatch("isLoading",!0)},onSwap:async(t,e)=>{e=a({navigate:!0,replace:!1},e),this.setGlobals(t),this.setTitle(t),this.setTranslation(t),this.component=t.$view.component,this.state=t,this.key=!0===e.replace?this.key:t.$view.timestamp,!0===e.navigate&&this.navigate()},query:()=>{var t;return{language:null==(t=this.state.$language)?void 0:t.code}}}),window.addEventListener("popstate",this.$reload)},methods:{navigate(){this.$store.dispatch("navigate")},setGlobals(t){["$config","$direction","$language","$languages","$license","$menu","$multilang","$permissions","$searches","$system","$translation","$urls","$user","$view"].forEach((e=>{void 0!==t[e]?u.prototype[e]=window.panel[e]=t[e]:u.prototype[e]=t[e]=window.panel[e]}))},setTitle(t){t.$view.title?document.title=t.$view.title+" | "+t.$system.title:document.title=t.$system.title},setTranslation(t){t.$translation&&(document.documentElement.lang=t.$translation.code)}},render(t){if(this.component)return t(this.component,{key:this.key,props:this.state.$view.props})}};function nt(t){if(void 0!==t)return JSON.parse(JSON.stringify(t))}function st(t,e){for(const n of Object.keys(e))e[n]instanceof Object&&Object.assign(e[n],st(t[n]||{},e[n]));return Object.assign(t||{},e),t}var it={clone:nt,merge:st};const ot=(t,e)=>{localStorage.setItem("kirby$content$"+t,JSON.stringify(e))};var rt={namespaced:!0,state:{current:null,models:{},status:{enabled:!0}},getters:{exists:t=>e=>Object.prototype.hasOwnProperty.call(t.models,e),hasChanges:(t,e)=>t=>{const n=e.model(t).changes;return Object.keys(n).length>0},isCurrent:t=>e=>t.current===e,id:t=>e=>(e=e||t.current,window.panel.$language?e+"?language="+window.panel.$language.code:e),model:(t,e)=>n=>(n=n||t.current,!0===e.exists(n)?t.models[n]:{api:null,originals:{},values:{},changes:{}}),originals:(t,e)=>t=>nt(e.model(t).originals),values:(t,e)=>t=>a(a({},e.originals(t)),e.changes(t)),changes:(t,e)=>t=>nt(e.model(t).changes)},mutations:{CLEAR(t){Object.keys(t.models).forEach((e=>{t.models[e].changes={}})),Object.keys(localStorage).forEach((t=>{t.startsWith("kirby$content$")&&localStorage.removeItem(t)}))},CREATE(t,[e,n]){if(!n)return!1;let s=t.models[e]?t.models[e].changes:n.changes;u.set(t.models,e,{api:n.api,originals:n.originals,changes:s||{}})},CURRENT(t,e){t.current=e},MOVE(t,[e,n]){const s=nt(t.models[e]);u.delete(t.models,e),u.set(t.models,n,s);const i=localStorage.getItem("kirby$content$"+e);localStorage.removeItem("kirby$content$"+e),localStorage.setItem("kirby$content$"+n,i)},REMOVE(t,e){u.delete(t.models,e),localStorage.removeItem("kirby$content$"+e)},REVERT(t,e){t.models[e]&&(u.set(t.models[e],"changes",{}),localStorage.removeItem("kirby$content$"+e))},STATUS(t,e){u.set(t.status,"enabled",e)},UPDATE(t,[e,n,s]){if(!t.models[e])return!1;void 0===s&&(s=null),s=nt(s);const i=JSON.stringify(s);JSON.stringify(t.models[e].originals[n])==i?u.delete(t.models[e].changes,n):u.set(t.models[e].changes,n,s),ot(e,{api:t.models[e].api,originals:t.models[e].originals,changes:t.models[e].changes})}},actions:{init(t){Object.keys(localStorage).filter((t=>t.startsWith("kirby$content$"))).map((t=>t.split("kirby$content$")[1])).forEach((e=>{const n=localStorage.getItem("kirby$content$"+e);t.commit("CREATE",[e,JSON.parse(n)])})),Object.keys(localStorage).filter((t=>t.startsWith("kirby$form$"))).map((t=>t.split("kirby$form$")[1])).forEach((e=>{const n=localStorage.getItem("kirby$form$"+e);let s=null;try{s=JSON.parse(n)}catch(o){}if(!s||!s.api)return localStorage.removeItem("kirby$form$"+e),!1;const i={api:s.api,originals:s.originals,changes:s.values};t.commit("CREATE",[e,i]),ot(e,i),localStorage.removeItem("kirby$form$"+e)}))},clear(t){t.commit("CLEAR")},create(t,e){const n=nt(e.content);Array.isArray(e.ignore)&&e.ignore.forEach((t=>delete n[t])),e.id=t.getters.id(e.id);const s={api:e.api,originals:n,changes:{}};t.commit("CREATE",[e.id,s]),t.dispatch("current",e.id)},current(t,e){t.commit("CURRENT",e)},disable(t){t.commit("STATUS",!1)},enable(t){t.commit("STATUS",!0)},move(t,[e,n]){e=t.getters.id(e),n=t.getters.id(n),t.commit("MOVE",[e,n])},remove(t,e){t.commit("REMOVE",e),t.getters.isCurrent(e)&&t.commit("CURRENT",null)},revert(t,e){e=e||t.state.current,t.commit("REVERT",e)},async save(t,e){if(e=e||t.state.current,t.getters.isCurrent(e)&&!1===t.state.status.enabled)return!1;t.dispatch("disable");const n=t.getters.model(e),s=a(a({},n.originals),n.changes);try{await u.$api.patch(n.api,s),t.commit("CREATE",[e,l(a({},n),{originals:s})]),t.dispatch("revert",e)}finally{t.dispatch("enable")}},update(t,[e,n,s]){s=s||t.state.current,t.commit("UPDATE",[s,e,n])}}},at={namespaced:!0,state:{open:[]},mutations:{CLOSE(t,e){t.open=e?t.open.filter((t=>t.id!==e)):[]},GOTO(t,e){t.open=t.open.slice(0,t.open.findIndex((t=>t.id===e))+1)},OPEN(t,e){t.open.push(e)}},actions:{close(t,e){t.commit("CLOSE",e)},goto(t,e){t.commit("GOTO",e)},open(t,e){t.commit("OPEN",e)}}},lt={timer:null,namespaced:!0,state:{type:null,message:null,details:null,timeout:null},mutations:{SET(t,e){t.type=e.type,t.message=e.message,t.details=e.details,t.timeout=e.timeout},UNSET(t){t.type=null,t.message=null,t.details=null,t.timeout=null}},actions:{close(t){clearTimeout(this.timer),t.commit("UNSET")},deprecated(t,e){console.warn("Deprecated: "+e)},error(t,e){let n=e;"string"==typeof e&&(n={message:e}),e instanceof Error&&(n={message:e.message},window.panel.$config.debug&&window.console.error(e)),t.dispatch("dialog",{component:"k-error-dialog",props:n},{root:!0}),t.dispatch("close")},open(t,e){t.dispatch("close"),t.commit("SET",e),e.timeout&&(this.timer=setTimeout((()=>{t.dispatch("close")}),e.timeout))},success(t,e){"string"==typeof e&&(e={message:e}),t.dispatch("open",a({type:"success",timeout:4e3},e))}}};u.use(c);var ut=new c.Store({strict:!1,state:{dialog:null,drag:null,fatal:!1,isLoading:!1},mutations:{SET_DIALOG(t,e){t.dialog=e},SET_DRAG(t,e){t.drag=e},SET_FATAL(t,e){t.fatal=e},SET_LOADING(t,e){t.isLoading=e}},actions:{dialog(t,e){t.commit("SET_DIALOG",e)},drag(t,e){t.commit("SET_DRAG",e)},fatal(t,e){!1!==e?(console.error("The JSON response could not be parsed"),window.panel.$config.debug&&console.info(e.html),e.silent||t.commit("SET_FATAL",e.html)):t.commit("SET_FATAL",!1)},isLoading(t,e){t.commit("SET_LOADING",!0===e)},navigate(t){t.dispatch("dialog",null),t.dispatch("drawers/close")}},modules:{content:rt,drawers:at,notification:lt}}),ct={install(t){window.panel=window.panel||{},window.onunhandledrejection=t=>{t.preventDefault(),ut.dispatch("notification/error",t.reason)},window.panel.deprecated=t=>{ut.dispatch("notification/deprecated",t)},window.panel.error=t.config.errorHandler=t=>{ut.dispatch("notification/error",t)}}},dt={install(t){const e=d(),n={$on:e.on,$off:e.off,$emit:e.emit,click(t){n.$emit("click",t)},copy(t){n.$emit("copy",t)},dragenter(t){n.entered=t.target,n.prevent(t),n.$emit("dragenter",t)},dragleave(t){n.prevent(t),n.entered===t.target&&n.$emit("dragleave",t)},drop(t){n.prevent(t),n.$emit("drop",t)},entered:null,focus(t){n.$emit("focus",t)},keydown(e){let s=["keydown"];(e.metaKey||e.ctrlKey)&&s.push("cmd"),!0===e.altKey&&s.push("alt"),!0===e.shiftKey&&s.push("shift");let i=t.prototype.$helper.string.lcfirst(e.key);const o={escape:"esc",arrowUp:"up",arrowDown:"down",arrowLeft:"left",arrowRight:"right"};o[i]&&(i=o[i]),!1===["alt","control","shift","meta"].includes(i)&&s.push(i),n.$emit(s.join("."),e),n.$emit("keydown",e)},keyup(t){n.$emit("keyup",t)},online(t){n.$emit("online",t)},offline(t){n.$emit("offline",t)},paste(t){n.$emit("paste",t)},prevent(t){t.stopPropagation(),t.preventDefault()}};window.addEventListener("online",n.online),window.addEventListener("offline",n.offline),window.addEventListener("dragenter",n.dragenter,!1),window.addEventListener("dragover",n.prevent,!1),window.addEventListener("dragexit",n.prevent,!1),window.addEventListener("dragleave",n.dragleave,!1),window.addEventListener("drop",n.drop,!1),window.addEventListener("keydown",n.keydown,!1),window.addEventListener("keyup",n.keyup,!1),document.addEventListener("click",n.click,!1),document.addEventListener("copy",n.copy,!0),document.addEventListener("focus",n.focus,!0),document.addEventListener("paste",n.paste,!0),t.prototype.$events=n}};class pt{constructor(t={}){this.options=a({base:"/",headers:()=>({}),onFatal:()=>{},onFinish:()=>{},onPushState:()=>{},onReplaceState:()=>{},onStart:()=>{},onSwap:()=>{},query:()=>({})},t),this.state={}}init(t={},e={}){this.options=a(a({},this.options),e),this.setState(t)}arrayToString(t){return!1===Array.isArray(t)?String(t):t.join(",")}body(t){return"object"==typeof t?JSON.stringify(t):t}async fetch(t,e){return fetch(t,e)}async go(t,e){try{const n=await this.request(t,e);return!1!==n&&this.setState(n,e)}catch(n){if(!0!==(null==e?void 0:e.silent))throw n}}query(t={},e={}){let n=new URLSearchParams(e);return"object"!=typeof t&&(t={}),Object.entries(t).forEach((([t,e])=>{null!==e&&n.set(t,e)})),Object.entries(this.options.query()).forEach((([t,e])=>{var s,i;null!==(e=null!=(i=null!=(s=n.get(t))?s:e)?i:null)&&n.set(t,e)})),n}redirect(t){window.location.href=t}reload(t={}){return this.go(window.location.href,l(a({},t),{replace:!0}))}async request(t="",e={}){var n;const s=!!(e=a({globals:!1,method:"GET",only:[],query:{},silent:!1,type:"$view"},e)).globals&&this.arrayToString(e.globals),i=this.arrayToString(e.only);this.options.onStart(e);try{const r=this.url(t,e.query);if(new URL(r).origin!==location.origin)return this.redirect(r),!1;const u=await this.fetch(r,{method:e.method,body:this.body(e.body),credentials:"same-origin",cache:"no-store",headers:a(l(a({},this.options.headers()),{"X-Fiber":!0,"X-Fiber-Globals":s,"X-Fiber-Only":i,"X-Fiber-Referrer":(null==(n=this.state.$view)?void 0:n.path)||null}),e.headers)});if(!1===u.headers.has("X-Fiber"))return this.redirect(u.url),!1;const c=await u.text();let d;try{d=JSON.parse(c)}catch(o){return this.options.onFatal({url:r,path:t,options:e,response:u,text:c}),!1}if(!d[e.type])throw Error(`The ${e.type} could not be loaded`);const p=d[e.type];if(p.error)throw Error(p.error);return"$view"===e.type?i.length?st(this.state,d):d:p}finally{this.options.onFinish(e)}}async setState(t,e={}){return"object"==typeof t&&(this.state=nt(t),!0===e.replace||this.url(this.state.$url).href===window.location.href?this.options.onReplaceState(this.state,e):this.options.onPushState(this.state,e),this.options.onSwap(this.state,e),this.state)}url(t="",e={}){return(t="string"==typeof t&&null===t.match(/^https?:\/\//)?new URL(this.options.base+t.replace(/^\//,"")):new URL(t)).search=this.query(e,t.search),t}}const ht=async function(t){return a({cancel:null,submit:null,props:{}},t)},ft=async function(t,e={}){let n=null,s=null;"function"==typeof e?(n=e,e={}):(n=e.submit,s=e.cancel);let i=await this.$fiber.request("dialogs/"+t,l(a({},e),{type:"$dialog"}));return"object"==typeof i&&(i.submit=n||null,i.cancel=s||null,i)};async function mt(t,e={}){let n=null;if(n="object"==typeof t?await ht.call(this,t):await ft.call(this,t,e),!n)return!1;if(!n.component||!1===this.$helper.isComponent(n.component))throw Error("The dialog component does not exist");return n.props=n.props||{},this.$store.dispatch("dialog",n),n}function gt(t,e={}){return async n=>{const s=await this.$fiber.request("dropdowns/"+t,l(a({},e),{type:"$dropdown"}));if(!s)return!1;if(!1===Array.isArray(s.options)||0===s.options.length)throw Error("The dropdown is empty");s.options.map((t=>(t.dialog&&(t.click=()=>{const e="string"==typeof t.dialog?t.dialog:t.dialog.url,n="object"==typeof t.dialog?t.dialog:{};return this.$dialog(e,n)}),t))),n(s.options)}}async function kt(t,e,n={}){return await this.$fiber.request("search/"+t,a({query:{query:e},type:"$search"},n))}var vt={install(t){const e=new pt;t.prototype.$fiber=window.panel.$fiber=e,t.prototype.$dialog=window.panel.$dialog=mt,t.prototype.$dropdown=window.panel.$dropdown=gt,t.prototype.$go=window.panel.$go=e.go.bind(e),t.prototype.$reload=window.panel.$reload=e.reload.bind(e),t.prototype.$request=window.panel.$request=e.request.bind(e),t.prototype.$search=window.panel.$search=kt,t.prototype.$url=window.panel.$url=e.url.bind(e)}};var bt={read:function(t){if(!t)return null;if("string"==typeof t)return t;if(t instanceof ClipboardEvent){t.preventDefault();const e=t.clipboardData.getData("text/html")||t.clipboardData.getData("text/plain")||null;if(e)return e.replace(/\u00a0/g," ")}return null},write:function(t,e){if("string"!=typeof t&&(t=JSON.stringify(t,null,2)),e&&e instanceof ClipboardEvent)return e.preventDefault(),e.clipboardData.setData("text/plain",t),!0;const n=document.createElement("textarea");if(n.value=t,document.body.append(n),navigator.userAgent.match(/ipad|ipod|iphone/i)){n.contentEditable=!0,n.readOnly=!0;const t=document.createRange();t.selectNodeContents(n);const e=window.getSelection();e.removeAllRanges(),e.addRange(t),n.setSelectionRange(0,999999)}else n.select();return document.execCommand("copy"),n.remove(),!0}};function yt(t){if("string"==typeof t){if("pattern"===(t=t.toLowerCase()))return"var(--color-gray-800) var(--bg-pattern)";if(!1===t.startsWith("#")&&!1===t.startsWith("var(")){const e="--color-"+t;if(window.getComputedStyle(document.documentElement).getPropertyValue(e))return`var(${e})`}return t}}var $t=(t,e)=>{let n=null;return function(){clearTimeout(n),n=setTimeout((()=>t.apply(this,arguments)),e)}};function _t(t,e=!1){if(!t.match("youtu"))return!1;let n=null;try{n=new URL(t)}catch(d){return!1}const s=n.pathname.split("/").filter((t=>""!==t)),i=s[0],o=s[1],r="https://"+(!0===e?"www.youtube-nocookie.com":n.host)+"/embed",a=t=>!!t&&null!==t.match(/^[a-zA-Z0-9_-]+$/);let l=n.searchParams,u=null;switch(s.join("/")){case"embed/videoseries":case"playlist":a(l.get("list"))&&(u=r+"/videoseries");break;case"watch":a(l.get("v"))&&(u=r+"/"+l.get("v"),l.has("t")&&l.set("start",l.get("t")),l.delete("v"),l.delete("t"));break;default:n.host.includes("youtu.be")&&a(i)?(u="https://www.youtube.com/embed/"+i,l.has("t")&&l.set("start",l.get("t")),l.delete("t")):"embed"===i&&a(o)&&(u=r+"/"+o)}if(!u)return!1;const c=l.toString();return c.length&&(u+="?"+c),u}function wt(t,e=!1){let n=null;try{n=new URL(t)}catch(l){return!1}const s=n.pathname.split("/").filter((t=>""!==t));let i=n.searchParams,o=null;switch(!0===e&&i.append("dnt",1),n.host){case"vimeo.com":case"www.vimeo.com":o=s[0];break;case"player.vimeo.com":o=s[1]}if(!o||!o.match(/^[0-9]*$/))return!1;let r="https://player.vimeo.com/video/"+o;const a=i.toString();return a.length&&(r+="?"+a),r}var xt={youtube:_t,vimeo:wt,video:function(t,e=!1){return t.includes("youtu")?_t(t,e):!!t.includes("vimeo")&&wt(t,e)}},St=t=>void 0!==u.options.components[t],Ct=t=>!!t.dataTransfer&&(!!t.dataTransfer.types&&(!0===t.dataTransfer.types.includes("Files")&&!1===t.dataTransfer.types.includes("text/plain")));var Ot={metaKey:function(){return window.navigator.userAgent.indexOf("Mac")>-1?"cmd":"ctrl"}},Et=(t="3/2",e="100%",n=!0)=>{const s=String(t).split("/");if(2!==s.length)return e;const i=Number(s[0]),o=Number(s[1]);let r=100;return 0!==i&&0!==o&&(r=n?r/i*o:r/o*i,r=parseFloat(String(r)).toFixed(2)),r+"%"},Tt=t=>{var e=(t=t||{}).desc?-1:1,n=-e,s=/^0/,i=/\s+/g,o=/^\s+|\s+$/g,r=/[^\x00-\x80]/,a=/^0x[0-9a-f]+$/i,l=/(0x[\da-fA-F]+|(^[\+\-]?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?(?=\D|\s|$))|\d+)/g,u=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,c=t.insensitive?function(t){return function(t){if(t.toLocaleLowerCase)return t.toLocaleLowerCase();return t.toLowerCase()}(""+t).replace(o,"")}:function(t){return(""+t).replace(o,"")};function d(t){return t.replace(l,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0")}function p(t,e){return(!t.match(s)||1===e)&&parseFloat(t)||t.replace(i," ").replace(o,"")||0}return function(t,s){var i=c(t),o=c(s);if(!i&&!o)return 0;if(!i&&o)return n;if(i&&!o)return e;var l=d(i),h=d(o),f=parseInt(i.match(a),16)||1!==l.length&&Date.parse(i),m=parseInt(o.match(a),16)||f&&o.match(u)&&Date.parse(o)||null;if(m){if(fm)return e}for(var g=l.length,k=h.length,v=0,b=Math.max(g,k);v0)return e;if(_<0)return n;if(v===b-1)return 0}else{if(y<$)return n;if(y>$)return e}}return 0}};function At(t){const e={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return String(t).replace(/[&<>"'`=/]/g,(t=>e[t]))}function Mt(t,e={}){const n=(t,e={})=>{var s;const i=At(t.shift()),o=null!=(s=e[i])?s:null;return null===o?Object.prototype.hasOwnProperty.call(e,i)||"…":0===t.length?o:n(t,o)},s="[{]{1,2}[\\s]?",i="[\\s]?[}]{1,2}";return(t=t.replace(new RegExp(`${s}(.*?)${i}`,"gi"),((t,s)=>n(s.split("."),e)))).replace(new RegExp(`${s}.*${i}`,"gi"),"…")}function It(t){const e=String(t);return e.charAt(0).toUpperCase()+e.slice(1)}RegExp.escape=function(t){return t.replace(new RegExp("[-/\\\\^$*+?.()[\\]{}]","gu"),"\\$&")};var Lt={camelToKebab:function(t){return t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()},escapeHTML:At,hasEmoji:function(t){if("string"!=typeof t)return!1;const e=t.match(/(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff]|[\u0023-\u0039]\ufe0f?\u20e3|\u3299|\u3297|\u303d|\u3030|\u24c2|\ud83c[\udd70-\udd71]|\ud83c[\udd7e-\udd7f]|\ud83c\udd8e|\ud83c[\udd91-\udd9a]|\ud83c[\udde6-\uddff]|[\ud83c\ude01-\ude02]|\ud83c\ude1a|\ud83c\ude2f|[\ud83c\ude32-\ude3a]|[\ud83c\ude50-\ude51]|\u203c|\u2049|[\u25aa-\u25ab]|\u25b6|\u25c0|[\u25fb-\u25fe]|\u00a9|\u00ae|\u2122|\u2139|\ud83c\udc04|[\u2600-\u26FF]|\u2b05|\u2b06|\u2b07|\u2b1b|\u2b1c|\u2b50|\u2b55|\u231a|\u231b|\u2328|\u23cf|[\u23e9-\u23f3]|[\u23f8-\u23fa]|\ud83c\udccf|\u2934|\u2935|[\u2190-\u21ff])/i);return null!==e&&null!==e.length},lcfirst:function(t){const e=String(t);return e.charAt(0).toLowerCase()+e.slice(1)},pad:function(t,e=2){t=String(t);let n="";for(;n.length]+)>)/gi,"")},template:Mt,ucfirst:It,ucwords:function(t){return String(t).split(/ /g).map((t=>It(t))).join(" ")},uuid:function(){let t,e,n="";for(t=0;t<32;t++)e=16*Math.random()|0,8!=t&&12!=t&&16!=t&&20!=t||(n+="-"),n+=(12==t?4:16==t?3&e|8:e).toString(16);return n}},jt=(t,e)=>{const n=Object.assign({url:"/",field:"file",method:"POST",attributes:{},complete:function(){},error:function(){},success:function(){},progress:function(){}},e),s=new FormData;s.append(n.field,t,t.name),n.attributes&&Object.keys(n.attributes).forEach((t=>{s.append(t,n.attributes[t])}));const i=new XMLHttpRequest,o=e=>{if(!e.lengthComputable||!n.progress)return;let s=Math.max(0,Math.min(100,e.loaded/e.total*100));n.progress(i,t,Math.ceil(s))};i.upload.addEventListener("loadstart",o),i.upload.addEventListener("progress",o),i.addEventListener("load",(e=>{let s=null;try{s=JSON.parse(e.target.response)}catch(o){s={status:"error",message:"The file could not be uploaded"}}"error"===s.status?n.error(i,t,s):(n.success(i,t,s),n.progress(i,t,100))})),i.addEventListener("error",(e=>{const s=JSON.parse(e.target.response);n.error(i,t,s),n.progress(i,t,100)})),i.open(n.method,n.url,!0),n.headers&&Object.keys(n.headers).forEach((t=>{const e=n.headers[t];i.setRequestHeader(t,e)})),i.send(s)},Dt={install(t){Array.prototype.sortBy=function(e){const n=t.prototype.$helper.sort(),s=e.split(" "),i=s[0],o=s[1]||"asc";return this.sort(((t,e)=>{const s=String(t[i]).toLowerCase(),r=String(e[i]).toLowerCase();return"desc"===o?n(r,s):n(s,r)}))},t.prototype.$helper={clipboard:bt,clone:it.clone,color:yt,embed:xt,isComponent:St,isUploadEvent:Ct,debounce:$t,keyboard:Ot,object:it,pad:Lt.pad,ratio:Et,slug:Lt.slug,sort:Tt,string:Lt,upload:jt,uuid:Lt.uuid},t.prototype.$esc=Lt.escapeHTML}},Bt={install(t){t.$t=t.prototype.$t=window.panel.$t=(t,e,n=null)=>{if("string"!=typeof t)return;const s=window.panel.$translation.data[t]||n;return"string"!=typeof s?s:Mt(s,e)},t.directive("direction",{inserted(t,e,n){!0!==n.context.disabled?t.dir=n.context.$direction:t.dir=null}})}};p.extend(h),p.extend(((t,e,n)=>{n.interpret=(t,e="date")=>{const s={date:{"YYYY-MM-DD":!0,"YYYY-MM-D":!0,"YYYY-MM-":!0,"YYYY-MM":!0,"YYYY-M-DD":!0,"YYYY-M-D":!0,"YYYY-M-":!0,"YYYY-M":!0,"YYYY-":!0,YYYYMMDD:!0,"MMM DD YYYY":!1,"MMM D YYYY":!1,"MMM DD YY":!1,"MMM D YY":!1,"MMM DD":!1,"MMM D":!1,"DD MMMM YYYY":!1,"DD MMMM YY":!1,"DD MMMM":!1,"D MMMM YYYY":!1,"D MMMM YY":!1,"D MMMM":!1,"DD MMM YYYY":!1,"D MMM YYYY":!1,"DD MMM YY":!1,"D MMM YY":!1,"DD MMM":!1,"D MMM":!1,"DD MM YYYY":!1,"DD M YYYY":!1,"D MM YYYY":!1,"D M YYYY":!1,"DD MM YY":!1,"D MM YY":!1,"DD M YY":!1,"D M YY":!1,YYYY:!0,MMMM:!0,MMM:!0,"DD MM":!1,"DD M":!1,"D MM":!1,"D M":!1,DD:!1,D:!1},time:{"HH:mm:ss a":!1,"HH:mm:ss":!1,"HH:mm a":!1,"HH:mm":!1,"HH a":!1,HH:!1}};if("string"==typeof t&&""!==t)for(const i in s[e]){const o=n(t,i,s[e][i]);if(!0===o.isValid())return o}return null}})),p.extend(((t,e,n)=>{const s=t=>"date"===t?"YYYY-MM-DD":"time"===t?"HH:mm:ss":"YYYY-MM-DD HH:mm:ss";e.prototype.toISO=function(t="datetime"){return this.format(s(t))},n.iso=function(t,e="datetime"){const i=n(t,s(e));return i&&i.isValid()?i:null}})),p.extend(((t,e)=>{e.prototype.merge=function(t,e="date"){let n=this.clone();if(!t||!t.isValid())return this;if("string"==typeof e){const t={date:["year","month","date"],time:["hour","minute","second"]};if(!1===Object.prototype.hasOwnProperty.call(t,e))throw new Error("Invalid merge unit alias");e=t[e]}for(const s of e)n=n.set(s,t.get(s));return n}})),p.extend(((t,e,n)=>{n.pattern=t=>new class{constructor(t,e){this.dayjs=t,this.pattern=e;const n={year:["YY","YYYY"],month:["M","MM","MMM","MMMM"],day:["D","DD"],hour:["h","hh","H","HH"],minute:["m","mm"],second:["s","ss"],meridiem:["a"]};this.parts=this.pattern.split(/\W/).map(((t,e)=>{const s=this.pattern.indexOf(t);return{index:e,unit:Object.keys(n)[Object.values(n).findIndex((e=>e.includes(t)))],start:s,end:s+(t.length-1)}}))}at(t,e=t){const n=this.parts.filter((n=>n.start<=t&&n.end>=e-1));return n[0]?n[0]:this.parts.filter((e=>e.start<=t)).pop()}format(t){return t&&t.isValid()?t.format(this.pattern):null}}(n,t)})),p.extend(((t,e)=>{e.prototype.round=function(t="date",e=1){const n=["second","minute","hour","date","month","year"];if("day"===t&&(t="date"),!1===n.includes(t))throw new Error("Invalid rounding unit");if(["date","month","year"].includes(t)&&1!==e||"hour"===t&&24%e!=0||["second","minute"].includes(t)&&60%e!=0)throw"Invalid rounding size for "+t;let s=this.clone();const i=n.indexOf(t),o=n.slice(0,i),r=o.pop();if(o.forEach((t=>s=s.startOf(t))),r){const e={month:12,date:s.daysInMonth(),hour:24,minute:60,second:60}[r];Math.round(s.get(r)/e)*e===e&&(s=s.add(1,"date"===t?"day":t)),s=s.startOf(t)}return s=s.set(t,Math.round(s.get(t)/e)*e),s}})),p.extend(((t,e,n)=>{e.prototype.validate=function(t,e,s="day"){if(!this.isValid())return!1;if(!t)return!0;t=n.iso(t);const i={min:"isAfter",max:"isBefore"}[e];return this.isSame(t,s)||this[i](t,s)}}));var Pt={install(t){t.prototype.$library={autosize:f,dayjs:p}}},Nt={props:{blueprint:String,lock:[Boolean,Object],help:String,name:String,parent:String,timestamp:Number},methods:{load(){return this.$api.get(this.parent+"/sections/"+this.name)}}},qt={install(t){const e=a({},t.options.components),n={section:Nt};for(const[s,i]of Object.entries(window.panel.plugins.components))i.template||i.render||i.extends?("string"==typeof(null==i?void 0:i.extends)&&(e[i.extends]?i.extends=e[i.extends].extend({options:i,components:a(a({},e),i.components||{})}):i.extends=null),i.template&&(i.render=null),i.mixins&&(i.mixins=i.mixins.map((t=>"string"==typeof t?n[t]:t))),e[s]&&window.console.warn(`Plugin is replacing "${s}"`),t.component(s,i),e[s]=t.options.components[s]):ut.dispatch("notification/error",`Neither template or render method provided nor extending a component when loading plugin component "${s}". The component has not been registered.`);for(const s of window.panel.plugins.use)t.use(s)}};function Rt(t,e,n,s,i,o,r,a){var l,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),s&&(u.functional=!0),o&&(u._scopeId="data-v-"+o),r?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(r)},u._ssrRegister=l):i&&(l=a?function(){i.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:i),l)if(u.functional){u._injectStyles=l;var c=u.render;u.render=function(t,e){return l.call(e),c(t,e)}}else{var d=u.beforeCreate;u.beforeCreate=d?[].concat(d,l):[l]}return{exports:t,options:u}}const Ft={props:{autofocus:{type:Boolean,default:!0},cancelButton:{type:[String,Boolean],default:!0},icon:{type:String,default:"check"},size:{type:String,default:"default"},submitButton:{type:[String,Boolean],default:!0},theme:String,visible:Boolean},data:()=>({notification:null}),computed:{buttons(){let t=[];return this.cancelButton&&t.push({icon:"cancel",text:this.cancelButtonLabel,class:"k-dialog-button-cancel",click:this.cancel}),this.submitButtonConfig&&t.push({icon:this.icon,text:this.submitButtonLabel,theme:this.theme,class:"k-dialog-button-submit",click:this.submit}),t},cancelButtonLabel(){return!1!==this.cancelButton&&(!0===this.cancelButton||0===this.cancelButton.length?this.$t("cancel"):this.cancelButton)},submitButtonConfig(){return void 0!==this.$attrs.button?this.$attrs.button:void 0===this.submitButton||this.submitButton},submitButtonLabel(){return!0===this.submitButton||0===this.submitButton.length?this.$t("confirm"):this.submitButton}},created(){this.$events.$on("keydown.esc",this.close,!1)},destroyed(){this.$events.$off("keydown.esc",this.close,!1)},mounted(){this.visible&&this.$nextTick(this.open)},methods:{onOverlayClose(){this.notification=null,this.$emit("close"),this.$events.$off("keydown.esc",this.close),this.$store.dispatch("dialog",!1)},open(){this.$store.state.dialog||this.$store.dispatch("dialog",!0),this.notification=null,this.$refs.overlay.open(),this.$emit("open"),this.$events.$on("keydown.esc",this.close)},close(){this.$refs.overlay&&this.$refs.overlay.close()},cancel(){this.$emit("cancel"),this.close()},focus(){var t;if(null==(t=this.$refs.dialog)?void 0:t.querySelector){const t=this.$refs.dialog.querySelector(".k-dialog-button-cancel");"function"==typeof(null==t?void 0:t.focus)&&t.focus()}},error(t){this.notification={message:t,type:"error"}},submit(){this.$emit("submit")},success(t){this.notification={message:t,type:"success"}}}},zt={};var Yt=Rt(Ft,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-overlay",{ref:"overlay",attrs:{autofocus:t.autofocus,centered:!0},on:{close:t.onOverlayClose,ready:function(e){return t.$emit("ready")}}},[n("div",{ref:"dialog",staticClass:"k-dialog",class:t.$vnode.data.staticClass,attrs:{"data-size":t.size},on:{mousedown:function(t){t.stopPropagation()}}},[t.notification?n("div",{staticClass:"k-dialog-notification",attrs:{"data-theme":t.notification.type}},[n("p",[t._v(t._s(t.notification.message))]),n("k-button",{attrs:{icon:"cancel"},on:{click:function(e){t.notification=null}}})],1):t._e(),n("div",{staticClass:"k-dialog-body scroll-y-auto"},[t._t("default")],2),t.$slots.footer||t.buttons.length?n("footer",{staticClass:"k-dialog-footer"},[t._t("footer",(function(){return[n("k-button-group",{attrs:{buttons:t.buttons}})]}))],2):t._e()])])}),[],!1,Ht,null,null,null);function Ht(t){for(let e in zt)this[e]=zt[e]}var Ut=function(){return Yt.exports}(),Kt={props:{autofocus:{type:Boolean,default:!0},cancelButton:{type:[String,Boolean],default:!0},icon:String,submitButton:{type:[String,Boolean],default:!0},size:String,theme:String,visible:Boolean},methods:{close(){this.$refs.dialog.close(),this.$emit("close")},error(t){this.$refs.dialog.error(t)},open(){this.$refs.dialog.open(),this.$emit("open")},success(t){this.$refs.dialog.close(),t.route&&this.$go(t.route),t.message&&this.$store.dispatch("notification/success",t.message),t.event&&("string"==typeof t.event&&(t.event=[t.event]),t.event.forEach((e=>{this.$events.$emit(e,t)}))),!1!==Object.prototype.hasOwnProperty.call(t,"emit")&&!1===t.emit||this.$emit("success")}}};const Jt={};var Gt=Rt({mixins:[Kt],props:{details:[Object,Array],message:String,size:{type:String,default:"medium"}},computed:{detailsList(){return Array.isArray(this.details)?this.details:Object.values(this.details||{})}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",staticClass:"k-error-dialog",attrs:{"cancel-button":!1,size:t.size,visible:!0},on:{cancel:function(e){return t.$emit("cancel")},close:function(e){return t.$emit("close")},submit:function(e){return t.$refs.dialog.close()}}},[n("k-text",[t._v(t._s(t.message))]),t.detailsList.length?n("dl",{staticClass:"k-error-details"},[t._l(t.detailsList,(function(e,s){return[n("dt",{key:"detail-label-"+s},[t._v(" "+t._s(e.label)+" ")]),n("dd",{key:"detail-message-"+s},["object"==typeof e.message?[n("ul",t._l(e.message,(function(e,s){return n("li",{key:s},[t._v(" "+t._s(e)+" ")])})),0)]:[t._v(" "+t._s(e.message)+" ")]],2)]}))],2):t._e()],1)}),[],!1,Vt,null,null,null);function Vt(t){for(let e in Jt)this[e]=Jt[e]}var Wt=function(){return Gt.exports}();const Xt={};var Zt=Rt({props:{code:Number,component:String,path:String,props:Object,referrer:String},methods:{close(){this.$refs.dialog.close()},onCancel(){"function"==typeof this.$store.state.dialog.cancel&&this.$store.state.dialog.cancel({dialog:this})},async onSubmit(t){let e=null;try{if("function"==typeof this.$store.state.dialog.submit)e=await this.$store.state.dialog.submit({dialog:this,value:t});else{if(!this.path)throw"The dialog needs a submit action or a dialog route path to be submitted";e=await this.$request(this.path,{body:t,method:"POST",type:"$dialog",headers:{"X-Fiber-Referrer":this.referrer}})}if(!1===e)return!1;this.close(),this.$store.dispatch("notification/success",":)"),e.event&&("string"==typeof e.event&&(e.event=[e.event]),e.event.forEach((t=>{this.$events.$emit(t,e)}))),e.dispatch&&Object.keys(e.dispatch).forEach((t=>{const n=e.dispatch[t];this.$store.dispatch(t,!0===Array.isArray(n)?[...n]:n)})),e.redirect?this.$go(e.redirect):this.$reload(e.reload||{})}catch(n){this.$refs.dialog.error(n)}}}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)(t.component,t._b({ref:"dialog",tag:"component",attrs:{visible:!0},on:{cancel:t.onCancel,submit:t.onSubmit}},"component",t.props,!1))}),[],!1,Qt,null,null,null);function Qt(t){for(let e in Xt)this[e]=Xt[e]}var te=function(){return Zt.exports}(),ee={data:()=>({models:[],issue:null,selected:{},options:{endpoint:null,max:null,multiple:!0,parent:null,selected:[],search:!0},search:null,pagination:{limit:20,page:1,total:0}}),computed:{checkedIcon(){return!0===this.multiple?"check":"circle-filled"},items(){return this.models.map(this.item)},multiple(){return!0===this.options.multiple&&1!==this.options.max}},watch:{search(){this.updateSearch()}},created(){this.updateSearch=$t(this.updateSearch,200)},methods:{async fetch(){const t=a({page:this.pagination.page,search:this.search},this.fetchData||{});try{const e=await this.$api.get(this.options.endpoint,t);this.models=e.data,this.pagination=e.pagination,this.onFetched&&this.onFetched(e)}catch(e){this.models=[],this.issue=e.message}},async open(t,e){this.pagination.page=0,this.search=null;let n=!0;Array.isArray(t)?(this.models=t,n=!1):(this.models=[],e=t),this.options=a(a({},this.options),e),this.selected={},this.options.selected.forEach((t=>{this.$set(this.selected,t,{id:t})})),n&&await this.fetch(),this.$refs.dialog.open()},paginate(t){this.pagination.page=t.page,this.pagination.limit=t.limit,this.fetch()},submit(){this.$emit("submit",Object.values(this.selected)),this.$refs.dialog.close()},isSelected(t){return void 0!==this.selected[t.id]},item:t=>t,toggle(t){!1!==this.options.multiple&&1!==this.options.max||(this.selected={}),!0!==this.isSelected(t)?this.options.max&&this.options.max<=Object.keys(this.selected).length||this.$set(this.selected,t.id,t):this.$delete(this.selected,t.id)},toggleBtn(t){const e=this.isSelected(t);return{icon:e?this.checkedIcon:"circle-outline",tooltip:e?this.$t("remove"):this.$t("select"),theme:e?"positive":null}},updateSearch(){this.pagination.page=0,this.fetch()}}};const ne={};var se=Rt({mixins:[ee]},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",staticClass:"k-files-dialog",attrs:{size:"medium"},on:{cancel:function(e){return t.$emit("cancel")},submit:t.submit}},[t.issue?[n("k-box",{attrs:{text:t.issue,theme:"negative"}})]:[t.options.search?n("k-input",{staticClass:"k-dialog-search",attrs:{autofocus:!0,placeholder:t.$t("search")+" …",type:"text",icon:"search"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}}):t._e(),t.items.length?[n("k-items",{attrs:{link:!1,items:t.items,layout:"list",sortable:!1},on:{item:t.toggle},scopedSlots:t._u([{key:"options",fn:function(e){var s=e.item;return[n("k-button",t._b({on:{click:function(e){return t.toggle(s)}}},"k-button",t.toggleBtn(s),!1))]}}],null,!1,4112065674)}),n("k-pagination",t._b({staticClass:"k-dialog-pagination",attrs:{details:!0,dropdown:!1,align:"center"},on:{paginate:t.paginate}},"k-pagination",t.pagination,!1))]:n("k-empty",{attrs:{icon:"image"}},[t._v(" "+t._s(t.$t("dialog.files.empty"))+" ")])]],2)}),[],!1,ie,null,null,null);function ie(t){for(let e in ne)this[e]=ne[e]}var oe=function(){return se.exports}();const re={mixins:[Kt],props:{fields:{type:[Array,Object],default:()=>[]},novalidate:{type:Boolean,default:!0},size:{type:String,default:"medium"},submitButton:{type:[String,Boolean],default:()=>window.panel.$t("save")},text:{type:String},theme:{type:String,default:"positive"},value:{type:Object,default:()=>({})}},data(){return{model:this.value}},computed:{hasFields(){return Object.keys(this.fields).length>0}},watch:{value(t,e){t!==e&&(this.model=t)}}},ae={};var le=Rt(re,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",t._b({ref:"dialog",on:{cancel:function(e){return t.$emit("cancel")},close:function(e){return t.$emit("close")},ready:function(e){return t.$emit("ready")},submit:function(e){return t.$refs.form.submit()}}},"k-dialog",t.$props,!1),[t.text?[n("k-text",{domProps:{innerHTML:t._s(t.text)}})]:t._e(),t.hasFields?n("k-form",{ref:"form",attrs:{value:t.model,fields:t.fields,novalidate:t.novalidate},on:{input:function(e){return t.$emit("input",e)},submit:function(e){return t.$emit("submit",e)}}}):n("k-box",{attrs:{theme:"negative"}},[t._v(" This form dialog has no fields ")])],2)}),[],!1,ue,null,null,null);function ue(t){for(let e in ae)this[e]=ae[e]}var ce=function(){return le.exports}();const de={};var pe=Rt({extends:ce,watch:{"model.name"(t){this.fields.code.disabled||this.onNameChanges(t)},"model.code"(t){this.fields.code.disabled||(this.model.code=this.$helper.slug(t,[this.$system.ascii]),this.onCodeChanges(this.model.code))}},methods:{onCodeChanges(t){if(!t)return this.model.locale=null;if(t.length>=2)if(-1!==t.indexOf("-")){let e=t.split("-"),n=[e[0],e[1].toUpperCase()];this.model.locale=n.join("_")}else{let e=this.$system.locales||[];(null==e?void 0:e[t])?this.model.locale=e[t]:this.model.locale=null}},onNameChanges(t){this.model.code=this.$helper.slug(t,[this.model.rules,this.$system.ascii]).substr(0,2)}}},undefined,undefined,!1,he,null,null,null);function he(t){for(let e in de)this[e]=de[e]}var fe=function(){return pe.exports}();const me={};var ge=Rt({mixins:[ee],data(){const t=ee.data();return l(a({},t),{model:{title:null,parent:null},options:l(a({},t.options),{parent:null})})},computed:{fetchData(){return{parent:this.options.parent}}},methods:{back(){this.options.parent=this.model.parent,this.pagination.page=1,this.fetch()},go(t){this.options.parent=t.id,this.pagination.page=1,this.fetch()},onFetched(t){this.model=t.model}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",staticClass:"k-pages-dialog",attrs:{size:"medium"},on:{cancel:function(e){return t.$emit("cancel")},submit:t.submit}},[t.issue?[n("k-box",{attrs:{text:t.issue,theme:"negative"}})]:[t.model?n("header",{staticClass:"k-pages-dialog-navbar"},[n("k-button",{attrs:{disabled:!t.model.id,tooltip:t.$t("back"),icon:"angle-left"},on:{click:t.back}}),n("k-headline",[t._v(t._s(t.model.title))])],1):t._e(),t.options.search?n("k-input",{staticClass:"k-dialog-search",attrs:{autofocus:!0,placeholder:t.$t("search")+" …",type:"text",icon:"search"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}}):t._e(),t.items.length?[n("k-items",{attrs:{items:t.items,link:!1,layout:"list",sortable:!1},on:{item:t.toggle},scopedSlots:t._u([{key:"options",fn:function(e){var s=e.item;return[n("k-button",t._b({on:{click:function(e){return t.toggle(s)}}},"k-button",t.toggleBtn(s),!1)),s?n("k-button",{attrs:{disabled:!s.hasChildren,tooltip:t.$t("open"),icon:"angle-right"},on:{click:function(e){return e.stopPropagation(),t.go(s)}}}):t._e()]}}],null,!1,3385025206)}),n("k-pagination",t._b({staticClass:"k-dialog-pagination",attrs:{details:!0,dropdown:!1,align:"center"},on:{paginate:t.paginate}},"k-pagination",t.pagination,!1))]:n("k-empty",{attrs:{icon:"page"}},[t._v(" "+t._s(t.$t("dialog.pages.empty"))+" ")])]],2)}),[],!1,ke,null,null,null);function ke(t){for(let e in me)this[e]=me[e]}var ve=function(){return ge.exports}();const be={mixins:[Kt],props:{icon:{type:String,default:"trash"},submitButton:{type:[String,Boolean],default:()=>window.panel.$t("delete")},text:String,theme:{type:String,default:"negative"}}},ye={};var $e=Rt(be,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("k-text-dialog",t._g(t._b({ref:"dialog"},"k-text-dialog",t.$props,!1),t.$listeners),[t._t("default")],2)}),[],!1,_e,null,null,null);function _e(t){for(let e in ye)this[e]=ye[e]}var we=function(){return $e.exports}();const xe={};var Se=Rt({mixins:[Kt],props:{text:String}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",t._g(t._b({ref:"dialog"},"k-dialog",t.$props,!1),t.$listeners),[t._t("default",(function(){return[t.text?n("k-text",{domProps:{innerHTML:t._s(t.text)}}):n("k-box",{attrs:{theme:"negative"}},[t._v(" This dialog does not define any text ")])]}))],2)}),[],!1,Ce,null,null,null);function Ce(t){for(let e in xe)this[e]=xe[e]}var Oe=function(){return Se.exports}();const Ee={};var Te=Rt({mixins:[ee],methods:{item:t=>l(a({},t),{key:t.email,info:t.info!==t.text?t.info:null})}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",staticClass:"k-users-dialog",attrs:{size:"medium"},on:{cancel:function(e){return t.$emit("cancel")},submit:t.submit}},[t.issue?[n("k-box",{attrs:{text:t.issue,theme:"negative"}})]:[t.options.search?n("k-input",{staticClass:"k-dialog-search",attrs:{autofocus:!0,placeholder:t.$t("search")+" …",type:"text",icon:"search"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}}):t._e(),t.items.length?[n("k-items",{attrs:{items:t.items,link:!1,layout:"list",sortable:!1},on:{item:t.toggle},scopedSlots:t._u([{key:"options",fn:function(e){var s=e.item;return[n("k-button",t._b({on:{click:function(e){return t.toggle(s)}}},"k-button",t.toggleBtn(s),!1))]}}],null,!1,409892637)}),n("k-pagination",t._b({staticClass:"k-dialog-pagination",attrs:{details:!0,dropdown:!1,align:"center"},on:{paginate:t.paginate}},"k-pagination",t.pagination,!1))]:n("k-empty",{attrs:{icon:"users"}},[t._v(" "+t._s(t.$t("dialog.users.empty"))+" ")])]],2)}),[],!1,Ae,null,null,null);function Ae(t){for(let e in Ee)this[e]=Ee[e]}var Me=function(){return Te.exports}();const Ie={};var Le=Rt({inheritAttrs:!1,props:{id:String,icon:String,tab:String,tabs:Object,title:String},data:()=>({click:!1}),computed:{breadcrumb(){return this.$store.state.drawers.open},hasTabs(){return this.tabs&&Object.keys(this.tabs).length>1},index(){return this.breadcrumb.findIndex((t=>t.id===this._uid))},nested(){return this.index>0}},watch:{index(){-1===this.index&&this.close()}},destroyed(){this.$store.dispatch("drawers/close",this._uid)},methods:{close(){this.$refs.overlay.close()},goTo(t){if(t===this._uid)return!0;this.$store.dispatch("drawers/goto",t)},mouseup(){!0===this.click&&this.close(),this.click=!1},mousedown(t=!1){this.click=t,!0===this.click&&this.$store.dispatch("drawers/close")},onClose(){this.$store.dispatch("drawers/close",this._uid),this.$emit("close")},onOpen(){this.$store.dispatch("drawers/open",{id:this._uid,icon:this.icon,title:this.title}),this.$emit("open")},open(){this.$refs.overlay.open()}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-overlay",{ref:"overlay",attrs:{dimmed:!1},on:{close:t.onClose,open:t.onOpen}},[n("div",{staticClass:"k-drawer",attrs:{"data-id":t.id,"data-nested":t.nested},on:{mousedown:function(e){return e.stopPropagation(),t.mousedown(!0)},mouseup:t.mouseup}},[n("div",{staticClass:"k-drawer-box",on:{mousedown:function(e){return e.stopPropagation(),t.mousedown(!1)}}},[n("header",{staticClass:"k-drawer-header"},[1===t.breadcrumb.length?n("h2",{staticClass:"k-drawer-title"},[n("k-icon",{attrs:{type:t.icon}}),t._v(" "+t._s(t.title)+" ")],1):n("ul",{staticClass:"k-drawer-breadcrumb"},t._l(t.breadcrumb,(function(e){return n("li",{key:e.id},[n("k-button",{attrs:{icon:e.icon,text:e.title},on:{click:function(n){return t.goTo(e.id)}}})],1)})),0),t.hasTabs?n("nav",{staticClass:"k-drawer-tabs"},t._l(t.tabs,(function(e){return n("k-button",{key:e.name,staticClass:"k-drawer-tab",attrs:{current:t.tab==e.name,text:e.label},on:{click:function(n){return n.stopPropagation(),t.$emit("tab",e.name)}}})})),1):t._e(),n("nav",{staticClass:"k-drawer-options"},[t._t("options"),n("k-button",{staticClass:"k-drawer-option",attrs:{icon:"check"},on:{click:t.close}})],2)]),n("div",{staticClass:"k-drawer-body scroll-y-auto"},[t._t("default")],2)])])])}),[],!1,je,null,null,null);function je(t){for(let e in Ie)this[e]=Ie[e]}var De=function(){return Le.exports}(),Be=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-drawer",{ref:"drawer",staticClass:"k-form-drawer",attrs:{id:t.id,icon:t.icon,tabs:t.tabs,tab:t.tab,title:t.title},on:{close:function(e){return t.$emit("close")},open:function(e){return t.$emit("open")},tab:function(e){t.tab=e}},scopedSlots:t._u([{key:"options",fn:function(){return[t._t("options")]},proxy:!0},{key:"default",fn:function(){return[0===Object.keys(t.fields).length?n("k-box",{attrs:{theme:"info"}},[t._v(" "+t._s(t.empty)+" ")]):n("k-form",{ref:"form",attrs:{autofocus:!0,fields:t.fields,value:t.$helper.clone(t.value)},on:{input:function(e){return t.$emit("input",e)}}})]},proxy:!0}],null,!0)})};const Pe={};var Ne=Rt({inheritAttrs:!1,props:{empty:{type:String,default:()=>"Missing field setup"},icon:String,id:String,tabs:Object,title:String,type:String,value:Object},data:()=>({tab:null}),computed:{fields(){const t=this.tab||null;return(this.tabs[t]||this.firstTab).fields||{}},firstTab(){return Object.values(this.tabs)[0]}},methods:{close(){this.$refs.drawer.close()},focus(t){var e;"function"==typeof(null==(e=this.$refs.form)?void 0:e.focus)&&this.$refs.form.focus(t)},open(t,e=!0){this.$refs.drawer.open(),this.tab=t||this.firstTab.name,!1!==e&&setTimeout((()=>{let t=Object.values(this.fields).filter((t=>!0===t.autofocus))[0]||null;this.focus(t)}),1)}}},Be,[],!1,qe,null,null,null);function qe(t){for(let e in Pe)this[e]=Pe[e]}var Re=function(){return Ne.exports}();const Fe={props:{html:{type:Boolean,default:!1},limit:{type:Number,default:10},skip:{type:Array,default:()=>[]},options:Array,query:String},data:()=>({matches:[],selected:{text:null}}),methods:{close(){this.$refs.dropdown.close()},onSelect(t){this.$emit("select",t),this.$refs.dropdown.close()},search(t){if(t.length<1)return;const e=new RegExp(RegExp.escape(t),"ig");this.matches=this.options.filter((t=>!!t.text&&(-1===this.skip.indexOf(t.value)&&null!==t.text.match(e)))).slice(0,this.limit),this.$emit("search",t,this.matches),this.$refs.dropdown.open()}}},ze={};var Ye=Rt(Fe,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dropdown",{staticClass:"k-autocomplete"},[t._t("default"),n("k-dropdown-content",t._g({ref:"dropdown",attrs:{autofocus:!0}},t.$listeners),t._l(t.matches,(function(e,s){return n("k-dropdown-item",t._b({key:s,on:{mousedown:function(n){return t.onSelect(e)},keydown:[function(n){return!n.type.indexOf("key")&&t._k(n.keyCode,"tab",9,n.key,"Tab")?null:(n.preventDefault(),t.onSelect(e))},function(n){return!n.type.indexOf("key")&&t._k(n.keyCode,"enter",13,n.key,"Enter")?null:(n.preventDefault(),t.onSelect(e))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])||"button"in e&&0!==e.button?null:(e.preventDefault(),t.close.apply(null,arguments))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"backspace",void 0,e.key,void 0)?null:(e.preventDefault(),t.close.apply(null,arguments))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"delete",[8,46],e.key,["Backspace","Delete","Del"])?null:(e.preventDefault(),t.close.apply(null,arguments))}]}},"k-dropdown-item",e,!1),[n("span",{domProps:{innerHTML:t._s(t.html?e.text:t.$esc(e.text))}})])})),1),t._v(" "+t._s(t.query)+" ")],2)}),[],!1,He,null,null,null);function He(t){for(let e in ze)this[e]=ze[e]}var Ue=function(){return Ye.exports}();const Ke={props:{disabled:Boolean,max:String,min:String,value:String},data(){return this.data(this.value)},computed:{numberOfDays(){return this.toDate().daysInMonth()},firstWeekday(){const t=this.toDate().day();return t>0?t:7},weekdays(){return["mon","tue","wed","thu","fri","sat","sun"].map((t=>this.$t("days."+t)))},weeks(){const t=this.firstWeekday-1;return Math.ceil((this.numberOfDays+t)/7)},monthnames(){return["january","february","march","april","may","june","july","august","september","october","november","december"].map((t=>this.$t("months."+t)))},months(){var t=[];return this.monthnames.forEach(((e,n)=>{const s=this.toDate(1,n);t.push({value:n,text:e,disabled:s.isBefore(this.current.min,"month")||s.isAfter(this.current.max,"month")})})),t},years(){var t,e,n,s;const i=null!=(e=null==(t=this.current.min)?void 0:t.get("year"))?e:this.current.year-20,o=null!=(s=null==(n=this.current.max)?void 0:n.get("year"))?s:this.current.year+20;return this.toOptions(i,o)}},watch:{value(t){const e=this.data(t);this.dt=e.dt,this.current=e.current}},methods:{data(t){const e=this.$library.dayjs.iso(t),n=this.$library.dayjs();return{dt:e,current:{month:(null!=e?e:n).month(),year:(null!=e?e:n).year(),min:this.$library.dayjs.iso(this.min),max:this.$library.dayjs.iso(this.max)}}},days(t){let e=[];const n=7*(t-1)+1,s=n+7;for(let i=n;ithis.numberOfDays;e.push(n?"":t)}return e},isDisabled(t){const e=this.toDate(t);return this.disabled||e.isBefore(this.current.min,"day")||e.isAfter(this.current.max,"day")},isSelected(t){return this.toDate(t).isSame(this.dt,"day")},isToday(t){const e=this.$library.dayjs();return this.toDate(t).isSame(e,"day")},onInput(){var t;this.$emit("input",(null==(t=this.dt)?void 0:t.toISO("date"))||null)},onNext(){const t=this.toDate().add(1,"month");this.show(t)},onPrev(){const t=this.toDate().subtract(1,"month");this.show(t)},select(t){const e="today"===t?this.$library.dayjs().merge(this.toDate(),"time"):this.toDate(t);this.dt=e,this.show(e),this.onInput()},show(t){this.current.year=t.year(),this.current.month=t.month()},toDate(t=1,e=this.current.month){return this.$library.dayjs(`${this.current.year}-${e+1}-${t}`)},toOptions(t,e){for(var n=[],s=t;s<=e;s++)n.push({value:s,text:this.$helper.pad(s)});return n}}},Je={};var Ge=Rt(Ke,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-calendar-input"},[n("nav",[n("k-button",{attrs:{icon:"angle-left"},on:{click:t.onPrev}}),n("span",{staticClass:"k-calendar-selects"},[n("k-select-input",{attrs:{options:t.months,disabled:t.disabled,required:!0},model:{value:t.current.month,callback:function(e){t.$set(t.current,"month",t._n(e))},expression:"current.month"}}),n("k-select-input",{attrs:{options:t.years,disabled:t.disabled,required:!0},model:{value:t.current.year,callback:function(e){t.$set(t.current,"year",t._n(e))},expression:"current.year"}})],1),n("k-button",{attrs:{icon:"angle-right"},on:{click:t.onNext}})],1),n("table",{staticClass:"k-calendar-table"},[n("thead",[n("tr",t._l(t.weekdays,(function(e){return n("th",{key:"weekday_"+e},[t._v(" "+t._s(e)+" ")])})),0)]),n("tbody",t._l(t.weeks,(function(e){return n("tr",{key:"week_"+e},t._l(t.days(e),(function(e,s){return n("td",{key:"day_"+s,staticClass:"k-calendar-day",attrs:{"aria-current":!!t.isToday(e)&&"date","aria-selected":!!t.isSelected(e)&&"date"}},[e?n("k-button",{attrs:{disabled:t.isDisabled(e),text:e},on:{click:function(n){return t.select(e)}}}):t._e()],1)})),0)})),0),n("tfoot",[n("tr",[n("td",{staticClass:"k-calendar-today",attrs:{colspan:"7"}},[n("k-button",{attrs:{text:t.$t("today")},on:{click:function(e){return t.select("today")}}})],1)])])])])}),[],!1,Ve,null,null,null);function Ve(t){for(let e in Je)this[e]=Je[e]}var We=function(){return Ge.exports}();const Xe={props:{count:Number,min:Number,max:Number,required:{type:Boolean,default:!1}},computed:{valid(){return!1===this.required&&0===this.count||(!0!==this.required||0!==this.count)&&(!(this.min&&this.countthis.max))}}},Ze={};var Qe=Rt(Xe,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{staticClass:"k-counter",attrs:{"data-invalid":!t.valid}},[n("span",[t._v(t._s(t.count))]),t.min&&t.max?n("span",{staticClass:"k-counter-rules"},[t._v("("+t._s(t.min)+"–"+t._s(t.max)+")")]):t.min?n("span",{staticClass:"k-counter-rules"},[t._v("≥ "+t._s(t.min))]):t.max?n("span",{staticClass:"k-counter-rules"},[t._v("≤ "+t._s(t.max))]):t._e()])}),[],!1,tn,null,null,null);function tn(t){for(let e in Ze)this[e]=Ze[e]}var en=function(){return Qe.exports}();const nn={props:{disabled:Boolean,config:Object,fields:{type:[Array,Object],default:()=>({})},novalidate:{type:Boolean,default:!1},value:{type:Object,default:()=>({})}},data(){return{errors:{},listeners:l(a({},this.$listeners),{submit:this.onSubmit})}},methods:{focus(t){var e,n;null==(n=null==(e=this.$refs.fields)?void 0:e.focus)||n.call(e,t)},onSubmit(){this.$emit("submit",this.value)},submit(){this.$refs.submitter.click()}}},sn={};var on=Rt(nn,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("form",{ref:"form",staticClass:"k-form",attrs:{method:"POST",autocomplete:"off",novalidate:""},on:{submit:function(e){return e.preventDefault(),t.onSubmit.apply(null,arguments)}}},[t._t("header"),t._t("default",(function(){return[n("k-fieldset",t._g({ref:"fields",attrs:{disabled:t.disabled,fields:t.fields,novalidate:t.novalidate},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}},t.listeners))]})),t._t("footer"),n("input",{ref:"submitter",staticClass:"k-form-submitter",attrs:{type:"submit"}})],2)}),[],!1,rn,null,null,null);function rn(t){for(let e in sn)this[e]=sn[e]}var an=function(){return on.exports}();const ln={props:{lock:[Boolean,Object]},data:()=>({isRefreshing:null,isLocking:null}),computed:{hasChanges(){return this.$store.getters["content/hasChanges"]()},isDisabled(){return!1===this.$store.state.content.status.enabled},isLocked(){return"lock"===this.lockState},isUnlocked(){return"unlock"===this.lockState},mode(){return null!==this.lockState?this.lockState:!0===this.hasChanges?"changes":null},lockState(){return this.supportsLocking&&this.lock?this.lock.state:null},supportsLocking(){return!1!==this.lock},theme(){return"lock"===this.mode?"negative":"unlock"===this.mode?"info":"notice"}},watch:{hasChanges:{handler(t,e){!0===this.supportsLocking&&!1===this.isLocked&&!1===this.isUnlocked&&(!0===t?(this.onLock(),this.isLocking=setInterval(this.onLock,3e4)):e&&(clearInterval(this.isLocking),this.onLock(!1)))},immediate:!0},isLocked(t){!1===t&&this.$events.$emit("model.reload")}},created(){this.supportsLocking&&(this.isRefreshing=setInterval(this.check,1e4)),this.$events.$on("keydown.cmd.s",this.onSave)},destroyed(){clearInterval(this.isRefreshing),clearInterval(this.isLocking),this.$events.$off("keydown.cmd.s",this.onSave)},methods:{check(){this.$reload({navigate:!1,only:"$view.props.lock",silent:!0})},async onLock(t=!0){const e=[this.$view.path+"/lock",null,null,!0];if(!0===t)try{await this.$api.patch(...e)}catch(n){clearInterval(this.isLocking),this.$store.dispatch("content/revert")}else clearInterval(this.isLocking),await this.$api.delete(...e)},onDownload(){let t="";const e=this.$store.getters["content/changes"]();Object.keys(e).forEach((n=>{t+=n+": \n\n"+e[n],t+="\n\n----\n\n"}));let n=document.createElement("a");n.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(t)),n.setAttribute("download",this.$view.path+".txt"),n.style.display="none",document.body.appendChild(n),n.click(),document.body.removeChild(n)},async onResolve(){await this.onUnlock(!1),this.$store.dispatch("content/revert")},onRevert(){this.$refs.revert.open()},async onSave(t){if(!t)return!1;t.preventDefault&&t.preventDefault();try{await this.$store.dispatch("content/save"),this.$events.$emit("model.update"),this.$store.dispatch("notification/success",":)")}catch(e){if(403===e.code)return;e.details&&Object.keys(e.details).length>0?this.$store.dispatch("notification/error",{message:this.$t("error.form.incomplete"),details:e.details}):this.$store.dispatch("notification/error",{message:this.$t("error.form.notSaved"),details:[{label:"Exception: "+e.exception,message:e.message}]})}},async onUnlock(t=!0){const e=[this.$view.path+"/unlock",null,null,!0];!0===t?await this.$api.patch(...e):await this.$api.delete(...e),this.$reload({silent:!0})},revert(){this.$store.dispatch("content/revert"),this.$refs.revert.close()}}},un={};var cn=Rt(ln,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("nav",{staticClass:"k-form-buttons",attrs:{"data-theme":t.theme}},["unlock"===t.mode?n("k-view",[n("p",{staticClass:"k-form-lock-info"},[t._v(" "+t._s(t.$t("lock.isUnlocked"))+" ")]),n("span",{staticClass:"k-form-lock-buttons"},[n("k-button",{staticClass:"k-form-button",attrs:{text:t.$t("download"),icon:"download"},on:{click:t.onDownload}}),n("k-button",{staticClass:"k-form-button",attrs:{text:t.$t("confirm"),icon:"check"},on:{click:t.onResolve}})],1)]):"lock"===t.mode?n("k-view",[n("p",{staticClass:"k-form-lock-info"},[n("k-icon",{attrs:{type:"lock"}}),n("span",{domProps:{innerHTML:t._s(t.$t("lock.isLocked",{email:t.$esc(t.lock.data.email)}))}})],1),t.lock.data.unlockable?n("k-button",{staticClass:"k-form-button",attrs:{text:t.$t("lock.unlock"),icon:"unlock"},on:{click:function(e){return t.onUnlock()}}}):n("k-icon",{staticClass:"k-form-lock-loader",attrs:{type:"loader"}})],1):"changes"===t.mode?n("k-view",[n("k-button",{staticClass:"k-form-button",attrs:{disabled:t.isDisabled,text:t.$t("revert"),icon:"undo"},on:{click:t.onRevert}}),n("k-button",{staticClass:"k-form-button",attrs:{disabled:t.isDisabled,text:t.$t("save"),icon:"check"},on:{click:t.onSave}})],1):t._e(),n("k-dialog",{ref:"revert",attrs:{"submit-button":t.$t("revert"),icon:"undo",theme:"negative"},on:{submit:t.revert}},[n("k-text",{domProps:{innerHTML:t._s(t.$t("revert.confirm"))}})],1)],1)}),[],!1,dn,null,null,null);function dn(t){for(let e in un)this[e]=un[e]}var pn=function(){return cn.exports}();const hn={};var fn=Rt({data:()=>({isOpen:!1,options:[]}),computed:{hasChanges(){return this.ids.length>0},ids(){return Object.keys(this.store).filter((t=>{var e;return Object.keys((null==(e=this.store[t])?void 0:e.changes)||{}).length>0}))},store(){return this.$store.state.content.models}},methods:{async toggle(){if(!1===this.$refs.list.isOpen)try{await this.$dropdown("changes",{method:"POST",body:{ids:this.ids}})((t=>{this.options=t}))}catch(t){return this.$store.dispatch("notification/success",this.$t("lock.unsaved.empty")),this.$store.dispatch("content/clear"),!1}this.$refs.list&&this.$refs.list.toggle()}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.hasChanges?n("k-dropdown",{staticClass:"k-form-indicator"},[n("k-button",{staticClass:"k-form-indicator-toggle k-topbar-button",attrs:{icon:"edit"},on:{click:t.toggle}}),n("k-dropdown-content",{ref:"list",attrs:{align:"right",theme:"light"}},[n("p",{staticClass:"k-form-indicator-info"},[t._v(t._s(t.$t("lock.unsaved"))+":")]),n("hr"),t._l(t.options,(function(e){return n("k-dropdown-item",t._b({key:e.id},"k-dropdown-item",e,!1),[t._v(" "+t._s(e.text)+" ")])}))],2)],1):t._e()}),[],!1,mn,null,null,null);function mn(t){for(let e in hn)this[e]=hn[e]}var gn=function(){return fn.exports}(),kn={props:{after:String}},vn={props:{autofocus:Boolean}},bn={props:{before:String}},yn={props:{disabled:Boolean}},$n={props:{help:String}},_n={props:{id:{type:[Number,String],default(){return this._uid}}}},wn={props:{invalid:Boolean}},xn={props:{label:String}},Sn={props:{name:[Number,String]}},Cn={props:{required:Boolean}};const On={mixins:[yn,$n,xn,Sn,Cn],props:{counter:[Boolean,Object],endpoints:Object,input:[String,Number],translate:Boolean,type:String}},En={};var Tn=Rt({mixins:[On],inheritAttrs:!1,computed:{labelText(){return this.label||" "}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:"k-field k-field-name-"+t.name,attrs:{"data-disabled":t.disabled,"data-translate":t.translate},on:{focusin:function(e){return t.$emit("focus",e)},focusout:function(e){return t.$emit("blur",e)}}},[t._t("header",(function(){return[n("header",{staticClass:"k-field-header"},[t._t("label",(function(){return[n("label",{staticClass:"k-field-label",attrs:{for:t.input}},[t._v(" "+t._s(t.labelText)+" "),t.required?n("abbr",{attrs:{title:t.$t("field.required")}},[t._v("*")]):t._e()])]})),t._t("options"),t._t("counter",(function(){return[t.counter?n("k-counter",t._b({staticClass:"k-field-counter",attrs:{required:t.required}},"k-counter",t.counter,!1)):t._e()]}))],2)]})),t._t("default"),t._t("footer",(function(){return[t.help||t.$slots.help?n("footer",{staticClass:"k-field-footer"},[t._t("help",(function(){return[t.help?n("k-text",{staticClass:"k-field-help",attrs:{theme:"help"},domProps:{innerHTML:t._s(t.help)}}):t._e()]}))],2):t._e()]}))],2)}),[],!1,An,null,null,null);function An(t){for(let e in En)this[e]=En[e]}var Mn=function(){return Tn.exports}();const In={props:{config:Object,disabled:Boolean,fields:{type:[Array,Object],default:()=>[]},novalidate:{type:Boolean,default:!1},value:{type:Object,default:()=>({})}},data:()=>({errors:{}}),methods:{focus(t){if(t)return void(this.hasField(t)&&"function"==typeof this.$refs[t][0].focus&&this.$refs[t][0].focus());const e=Object.keys(this.$refs)[0];this.focus(e)},hasFieldType(t){return this.$helper.isComponent(`k-${t}-field`)},hasField(t){var e;return null==(e=this.$refs[t])?void 0:e[0]},meetsCondition(t){if(!t.when)return!0;let e=!0;return Object.keys(t.when).forEach((n=>{this.value[n.toLowerCase()]!==t.when[n]&&(e=!1)})),e},onInvalid(t,e,n,s){this.errors[s]=e,this.$emit("invalid",this.errors)},hasErrors(){return Object.keys(this.errors).length}}},Ln={};var jn=Rt(In,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("fieldset",{staticClass:"k-fieldset"},[n("k-grid",[t._l(t.fields,(function(e,s){return["hidden"!==e.type&&t.meetsCondition(e)?n("k-column",{key:e.signature,attrs:{width:e.width}},[n("k-error-boundary",[t.hasFieldType(e.type)?n("k-"+e.type+"-field",t._b({ref:s,refInFor:!0,tag:"component",attrs:{"form-data":t.value,name:s,novalidate:t.novalidate,disabled:t.disabled||e.disabled},on:{input:function(n){return t.$emit("input",t.value,e,s)},focus:function(n){return t.$emit("focus",n,e,s)},invalid:function(n,i){return t.onInvalid(n,i,e,s)},submit:function(n){return t.$emit("submit",n,e,s)}},model:{value:t.value[s],callback:function(e){t.$set(t.value,s,e)},expression:"value[fieldName]"}},"component",e,!1)):n("k-box",{attrs:{theme:"negative"}},[n("k-text",{attrs:{size:"small"}},[t._v(" The field type "),n("strong",[t._v('"'+t._s(s)+'"')]),t._v(" does not exist ")])],1)],1)],1):t._e()]}))],2)],1)}),[],!1,Dn,null,null,null);function Dn(t){for(let e in Ln)this[e]=Ln[e]}var Bn=function(){return jn.exports}();const Pn={mixins:[kn,bn,yn,wn],props:{autofocus:Boolean,type:String,icon:[String,Boolean],theme:String,novalidate:{type:Boolean,default:!1},value:{type:[String,Boolean,Number,Object,Array],default:null}}},Nn={};var qn=Rt({mixins:[Pn],inheritAttrs:!1,data(){return{isInvalid:this.invalid,listeners:l(a({},this.$listeners),{invalid:(t,e)=>{this.isInvalid=t,this.$emit("invalid",t,e)}})}},computed:{inputProps(){return a(a({},this.$props),this.$attrs)}},methods:{blur(t){(null==t?void 0:t.relatedTarget)&&!1===this.$el.contains(t.relatedTarget)&&this.trigger(null,"blur")},focus(t){this.trigger(t,"focus")},select(t){this.trigger(t,"select")},trigger(t,e){var n,s,i;if("INPUT"===(null==(n=null==t?void 0:t.target)?void 0:n.tagName)&&"function"==typeof(null==(s=null==t?void 0:t.target)?void 0:s[e]))return void t.target[e]();if("function"==typeof(null==(i=this.$refs.input)?void 0:i[e]))return void this.$refs.input[e]();const o=this.$el.querySelector("input, select, textarea");"function"==typeof(null==o?void 0:o[e])&&o[e]()}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-input",attrs:{"data-disabled":t.disabled,"data-invalid":!t.novalidate&&t.isInvalid,"data-theme":t.theme,"data-type":t.type}},[t.$slots.before||t.before?n("span",{staticClass:"k-input-before",on:{click:t.focus}},[t._t("before",(function(){return[t._v(t._s(t.before))]}))],2):t._e(),n("span",{staticClass:"k-input-element",on:{click:function(e){return e.stopPropagation(),t.focus.apply(null,arguments)}}},[t._t("default",(function(){return[n("k-"+t.type+"-input",t._g(t._b({ref:"input",tag:"component",attrs:{value:t.value}},"component",t.inputProps,!1),t.listeners))]}))],2),t.$slots.after||t.after?n("span",{staticClass:"k-input-after",on:{click:t.focus}},[t._t("after",(function(){return[t._v(t._s(t.after))]}))],2):t._e(),t.$slots.icon||t.icon?n("span",{staticClass:"k-input-icon",on:{click:t.focus}},[t._t("icon",(function(){return[n("k-icon",{attrs:{type:t.icon}})]}))],2):t._e()])}),[],!1,Rn,null,null,null);function Rn(t){for(let e in Nn)this[e]=Nn[e]}var Fn=function(){return qn.exports}();const zn={};var Yn=Rt({props:{methods:Array},data:()=>({currentForm:null,isLoading:!1,issue:"",user:{email:"",password:"",remember:!1}}),computed:{canToggle(){return null!==this.codeMode&&!0===this.methods.includes("password")&&(!0===this.methods.includes("password-reset")||!0===this.methods.includes("code"))},codeMode(){return!0===this.methods.includes("password-reset")?"password-reset":!0===this.methods.includes("code")?"code":null},fields(){let t={email:{autofocus:!0,label:this.$t("email"),type:"email",required:!0,link:!1}};return"email-password"===this.form&&(t.password={label:this.$t("password"),type:"password",minLength:8,required:!0,autocomplete:"current-password",counter:!1}),t},form(){return this.currentForm?this.currentForm:"password"===this.methods[0]?"email-password":"email"},isResetForm(){return"password-reset"===this.codeMode&&"email"===this.form},toggleText(){return this.$t("login.toggleText."+this.codeMode+"."+this.formOpposite(this.form))}},methods:{formOpposite:t=>"email-password"===t?"email":"email-password",async login(){this.issue=null,this.isLoading=!0;let t=Object.assign({},this.user);"email"===this.currentForm&&(t.password=null),!0===this.isResetForm&&(t.remember=!1);try{await this.$api.auth.login(t),this.$reload({globals:["$system","$translation"]})}catch(e){this.issue=e.message}finally{this.isLoading=!1}},toggleForm(){this.currentForm=this.formOpposite(this.form),this.$refs.fieldset.focus("email")}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("form",{staticClass:"k-login-form",on:{submit:function(e){return e.preventDefault(),t.login.apply(null,arguments)}}},[n("h1",{staticClass:"sr-only"},[t._v(" "+t._s(t.$t("login"))+" ")]),t.issue?n("k-login-alert",{on:{click:function(e){t.issue=null}}},[t._v(" "+t._s(t.issue)+" ")]):t._e(),n("div",{staticClass:"k-login-fields"},[!0===t.canToggle?n("button",{staticClass:"k-login-toggler",attrs:{type:"button"},on:{click:t.toggleForm}},[t._v(" "+t._s(t.toggleText)+" ")]):t._e(),n("k-fieldset",{ref:"fieldset",attrs:{novalidate:!0,fields:t.fields},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}})],1),n("div",{staticClass:"k-login-buttons"},[!1===t.isResetForm?n("span",{staticClass:"k-login-checkbox"},[n("k-checkbox-input",{attrs:{value:t.user.remember,label:t.$t("login.remember")},on:{input:function(e){t.user.remember=e}}})],1):t._e(),n("k-button",{staticClass:"k-login-button",attrs:{icon:"check",type:"submit"}},[t._v(" "+t._s(t.$t("login"+(t.isResetForm?".reset":"")))+" "),t.isLoading?[t._v(" … ")]:t._e()],2)],1)],1)}),[],!1,Hn,null,null,null);function Hn(t){for(let e in zn)this[e]=zn[e]}var Un=function(){return Yn.exports}();const Kn={};var Jn=Rt({props:{methods:Array,pending:Object},data:()=>({code:"",isLoadingBack:!1,isLoadingLogin:!1,issue:""}),computed:{mode(){return!0===this.methods.includes("password-reset")?"password-reset":"login"}},methods:{async back(){this.isLoadingBack=!0,this.$go("/logout")},async login(){this.issue=null,this.isLoadingLogin=!0;try{await this.$api.auth.verifyCode(this.code),this.$store.dispatch("notification/success",this.$t("welcome")),"password-reset"===this.mode?this.$go("reset-password"):this.$reload()}catch(t){this.issue=t.message}finally{this.isLoadingLogin=!1}}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("form",{staticClass:"k-login-form k-login-code-form",on:{submit:function(e){return e.preventDefault(),t.login.apply(null,arguments)}}},[n("h1",{staticClass:"sr-only"},[t._v(" "+t._s(t.$t("login"))+" ")]),t.issue?n("k-login-alert",{on:{click:function(e){t.issue=null}}},[t._v(" "+t._s(t.issue)+" ")]):t._e(),n("k-user-info",{attrs:{user:t.pending.email}}),n("k-text-field",{attrs:{autofocus:!0,counter:!1,help:t.$t("login.code.text."+t.pending.challenge),label:t.$t("login.code.label."+t.mode),novalidate:!0,placeholder:t.$t("login.code.placeholder."+t.pending.challenge),required:!0,autocomplete:"one-time-code",icon:"unlock",name:"code"},model:{value:t.code,callback:function(e){t.code=e},expression:"code"}}),n("div",{staticClass:"k-login-buttons"},[n("k-button",{staticClass:"k-login-button k-login-back-button",attrs:{icon:"angle-left"},on:{click:t.back}},[t._v(" "+t._s(t.$t("back"))+" "),t.isLoadingBack?[t._v(" … ")]:t._e()],2),n("k-button",{staticClass:"k-login-button",attrs:{icon:"check",type:"submit"}},[t._v(" "+t._s(t.$t("login"+("password-reset"===t.mode?".reset":"")))+" "),t.isLoadingLogin?[t._v(" … ")]:t._e()],2)],1)],1)}),[],!1,Gn,null,null,null);function Gn(t){for(let e in Kn)this[e]=Kn[e]}var Vn=function(){return Jn.exports}();const Wn={};var Xn=Rt({props:{display:{type:String,default:"HH:mm"},value:String},computed:{day(){return this.formatTimes([6,7,8,9,10,11,"-",12,13,14,15,16,17])},night(){return this.formatTimes([18,19,20,21,22,23,"-",0,1,2,3,4,5])}},methods:{formatTimes(t){return t.map((t=>{if("-"===t)return t;const e=this.$library.dayjs(t+":00","H:mm");return{display:e.format(this.display),select:e.toISO("time")}}))},select(t){this.$emit("input",t)}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-times"},[n("div",{staticClass:"k-times-slot"},[n("k-icon",{attrs:{type:"sun"}}),n("ul",t._l(t.day,(function(e){return n("li",{key:e.select},["-"===e?n("hr"):n("k-button",{on:{click:function(n){return t.select(e.select)}}},[t._v(t._s(e.display))])],1)})),0)],1),n("div",{staticClass:"k-times-slot"},[n("k-icon",{attrs:{type:"moon"}}),n("ul",t._l(t.night,(function(e){return n("li",{key:e.select},["-"===e?n("hr"):n("k-button",{on:{click:function(n){return t.select(e.select)}}},[t._v(t._s(e.display))])],1)})),0)],1)])}),[],!1,Zn,null,null,null);function Zn(t){for(let e in Wn)this[e]=Wn[e]}var Qn=function(){return Xn.exports}();const ts={props:{accept:{type:String,default:"*"},attributes:{type:Object},max:{type:Number},method:{type:String,default:"POST"},multiple:{type:Boolean,default:!0},url:{type:String}},data(){return{options:this.$props,completed:{},errors:[],files:[],total:0}},computed:{limit(){return!1===this.options.multiple?1:this.options.max}},methods:{open(t){this.params(t),setTimeout((()=>{this.$refs.input.click()}),1)},params(t){this.options=Object.assign({},this.$props,t)},select(t){this.upload(t.target.files)},drop(t,e){this.params(e),this.upload(t)},upload(t){this.$refs.dialog.open(),this.files=[...t],this.completed={},this.errors=[],this.hasErrors=!1,this.limit&&(this.files=this.files.slice(0,this.limit)),this.total=this.files.length,this.files.forEach((t=>{this.$helper.upload(t,{url:this.options.url,attributes:this.options.attributes,method:this.options.method,headers:{"X-CSRF":window.panel.$system.csrf},progress:(t,e,n)=>{var s,i;null==(i=null==(s=this.$refs[e.name])?void 0:s[0])||i.set(n)},success:(t,e,n)=>{this.complete(e,n.data)},error:(t,e,n)=>{this.errors.push({file:e,message:n.message}),this.complete(e,n.data)}})}))},complete(t,e){if(this.completed[t.name]=e,Object.keys(this.completed).length==this.total){if(this.$refs.input.value="",this.errors.length>0)return this.$forceUpdate(),void this.$emit("error",this.files);setTimeout((()=>{this.$refs.dialog.close(),this.$emit("success",this.files,Object.values(this.completed))}),250)}}}},es={};var ns=Rt(ts,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-upload"},[n("input",{ref:"input",attrs:{accept:t.options.accept,multiple:t.options.multiple,"aria-hidden":"true",type:"file",tabindex:"-1"},on:{change:t.select,click:function(t){t.stopPropagation()}}}),n("k-dialog",{ref:"dialog",staticClass:"k-upload-dialog",attrs:{"cancel-button":!1,"submit-button":!1,size:"medium"},scopedSlots:t._u([{key:"footer",fn:function(){return[t.errors.length>0?[n("k-button-group",{attrs:{buttons:[{icon:"check",text:t.$t("confirm"),click:function(){return t.$refs.dialog.close()}}]}})]:t._e()]},proxy:!0}])},[t.errors.length>0?[n("k-headline",[t._v(t._s(t.$t("upload.errors")))]),n("ul",{staticClass:"k-upload-error-list"},t._l(t.errors,(function(e,s){return n("li",{key:"error-"+s},[n("p",{staticClass:"k-upload-error-filename"},[t._v(" "+t._s(e.file.name)+" ")]),n("p",{staticClass:"k-upload-error-message"},[t._v(" "+t._s(e.message)+" ")])])})),0)]:[n("k-headline",[t._v(t._s(t.$t("upload.progress")))]),n("ul",{staticClass:"k-upload-list"},t._l(t.files,(function(e,s){return n("li",{key:"file-"+s},[n("k-progress",{ref:e.name,refInFor:!0}),n("p",{staticClass:"k-upload-list-filename"},[t._v(" "+t._s(e.name)+" ")]),n("p",[t._v(t._s(t.errors[e.name]))])],1)})),0)]],2)],1)}),[],!1,ss,null,null,null);function ss(t){for(let e in es)this[e]=es[e]}var is=function(){return ns.exports}();var os=t=>({$from:e})=>((t,e)=>{for(let n=t.depth;n>0;n--){const s=t.node(n);if(e(s))return{pos:n>0?t.before(n):0,start:t.start(n),depth:n,node:s}}})(e,t),rs=t=>e=>{if((t=>t instanceof b)(e)){const{node:n,$from:s}=e;if(((t,e)=>Array.isArray(t)&&t.indexOf(e.type)>-1||e.type===t)(t,n))return{node:n,pos:s.pos,depth:s.depth}}},as=(t,e,n={})=>{const s=rs(e)(t.selection)||os((t=>t.type===e))(t.selection);return Object.keys(n).length&&s?s.node.hasMarkup(e,a(a({},s.node.attrs),n)):!!s};function ls(t=null,e=null){if(!t||!e)return!1;const n=t.parent.childAfter(t.parentOffset);if(!n.node)return!1;const s=n.node.marks.find((t=>t.type===e));if(!s)return!1;let i=t.index(),o=t.start()+n.offset,r=i+1,a=o+n.node.nodeSize;for(;i>0&&s.isInSet(t.parent.child(i-1).marks);)i-=1,o-=t.parent.child(i).nodeSize;for(;r{i=[...i,...t.marks]}));const o=i.find((t=>t.type.name===e.name));return o?o.attrs:{}},getNodeAttrs:function(t,e){const{from:n,to:s}=t.selection;let i=[];t.doc.nodesBetween(n,s,(t=>{i=[...i,t]}));const o=i.reverse().find((t=>t.type.name===e.name));return o?o.attrs:{}},markInputRule:function(t,e,n){return new m(t,((t,s,i,o)=>{const r=n instanceof Function?n(s):n,{tr:a}=t,l=s.length-1;let u=o,c=i;if(s[l]){const n=i+s[0].indexOf(s[l-1]),r=n+s[l-1].length-1,d=n+s[l-1].lastIndexOf(s[l]),p=d+s[l].length,h=function(t,e,n){let s=[];return n.doc.nodesBetween(t,e,((t,e)=>{s=[...s,...t.marks.map((n=>({start:e,end:e+t.nodeSize,mark:n})))]})),s}(i,o,t).filter((t=>{const{excluded:n}=t.mark.type;return n.find((t=>t.name===e.name))})).filter((t=>t.end>n));if(h.length)return!1;pn&&a.delete(n,d),c=n,u=c+s[l].length}return a.addMark(c,u,e.create(r)),a.removeStoredMark(e),a}))},markIsActive:function(t,e){const{from:n,$from:s,to:i,empty:o}=t.selection;return o?!!e.isInSet(t.storedMarks||s.marks()):!!t.doc.rangeHasMark(n,i,e)},markPasteRule:function(t,e,n){const s=(i,o)=>{const r=[];return i.forEach((i=>{var a;if(i.isText){const{text:s,marks:l}=i;let u,c=0;const d=!!l.filter((t=>"link"===t.type.name))[0];for(;!d&&null!==(u=t.exec(s));)if((null==(a=null==o?void 0:o.type)?void 0:a.allowsMarkType(e))&&u[1]){const t=u.index,s=t+u[0].length,o=t+u[0].indexOf(u[1]),a=o+u[1].length,l=n instanceof Function?n(u):n;t>0&&r.push(i.cut(c,t)),r.push(i.cut(o,a).mark(e.create(l).addToSet(i.marks))),c=s}cnew k(s(t.content),t.openStart,t.openEnd)}})},minMax:function(t=0,e=0,n=0){return Math.min(Math.max(parseInt(t,10),e),n)},nodeIsActive:as,nodeInputRule:function(t,e,n){return new m(t,((t,s,i,o)=>{const r=n instanceof Function?n(s):n,{tr:a}=t;return s[0]&&a.replaceWith(i-1,o,e.create(r)),a}))},pasteRule:function(t,e,n){const s=i=>{const o=[];return i.forEach((i=>{if(i.isText){const{text:s}=i;let r,a=0;do{if(r=t.exec(s),r){const t=r.index,s=t+r[0].length,l=n instanceof Function?n(r[0]):n;t>0&&o.push(i.cut(a,t)),o.push(i.cut(t,s).mark(e.create(l).addToSet(i.marks))),a=s}}while(r);anew k(s(t.content),t.openStart,t.openEnd)}})},removeMark:function(t){return(e,n)=>{const{tr:s,selection:i}=e;let{from:o,to:r}=i;const{$from:a,empty:l}=i;if(l){const e=ls(a,t);o=e.from,r=e.to}return s.removeMark(o,r,t),n(s)}},toggleBlockType:function(t,e,n={}){return(s,i,o)=>as(s,t,n)?y(e)(s,i,o):y(t,n)(s,i,o)},toggleList:function(t,e){return(n,s,i)=>{const{schema:o,selection:r}=n,{$from:a,$to:l}=r,u=a.blockRange(l);if(!u)return!1;const c=os((t=>us(t,o)))(r);if(u.depth>=1&&c&&u.depth-c.depth<=1){if(c.node.type===t)return $(e)(n,s,i);if(us(c.node,o)&&t.validContent(c.node.content)){const{tr:e}=n;return e.setNodeMarkup(c.pos,t),s&&s(e),!1}}return _(t)(n,s,i)}},updateMark:function(t,e){return(n,s)=>{const{tr:i,selection:o,doc:r}=n,{ranges:a,empty:l}=o;if(l){const{from:n,to:s}=ls(o.$from,t);r.rangeHasMark(n,s,t)&&i.removeMark(n,s,t),i.addMark(n,s,t.create(e))}else a.forEach((n=>{const{$to:s,$from:o}=n;r.rangeHasMark(o.pos,s.pos,t)&&i.removeMark(o.pos,s.pos,t),i.addMark(o.pos,s.pos,t.create(e))}));return s(i)}}};class ds{constructor(t=[],e){t.forEach((t=>{t.bindEditor(e),t.init()})),this.extensions=t}commands({schema:t,view:e}){return this.extensions.filter((t=>t.commands)).reduce(((n,s)=>{const{name:i,type:o}=s,r={},l=s.commands(a({schema:t,utils:cs},["node","mark"].includes(o)?{type:t[`${o}s`][i]}:{})),u=(t,n)=>{r[t]=t=>{if("function"!=typeof n||!e.editable)return!1;e.focus();const s=n(t);return"function"==typeof s?s(e.state,e.dispatch,e):s}};return"object"==typeof l?Object.entries(l).forEach((([t,e])=>{u(t,e)})):u(i,l),a(a({},n),r)}),{})}buttons(t="mark"){const e={};return this.extensions.filter((e=>e.type===t)).filter((t=>t.button)).forEach((t=>{Array.isArray(t.button)?t.button.forEach((t=>{e[t.id||t.name]=t})):e[t.name]=t.button})),e}getAllowedExtensions(t){return t instanceof Array||!t?t instanceof Array?this.extensions.filter((e=>!t.includes(e.name))):this.extensions:[]}getFromExtensions(t,e,n=this.extensions){return n.filter((t=>["extension"].includes(t.type))).filter((e=>e[t])).map((n=>n[t](l(a({},e),{utils:cs}))))}getFromNodesAndMarks(t,e,n=this.extensions){return n.filter((t=>["node","mark"].includes(t.type))).filter((e=>e[t])).map((n=>n[t](l(a({},e),{type:e.schema[`${n.type}s`][n.name],utils:cs}))))}inputRules({schema:t,excludedExtensions:e}){const n=this.getAllowedExtensions(e);return[...this.getFromExtensions("inputRules",{schema:t},n),...this.getFromNodesAndMarks("inputRules",{schema:t},n)].reduce(((t,e)=>[...t,...e]),[])}keymaps({schema:t}){return[...this.getFromExtensions("keys",{schema:t}),...this.getFromNodesAndMarks("keys",{schema:t})].map((t=>M(t)))}get marks(){return this.extensions.filter((t=>"mark"===t.type)).reduce(((t,{name:e,schema:n})=>l(a({},t),{[e]:n})),{})}get nodes(){return this.extensions.filter((t=>"node"===t.type)).reduce(((t,{name:e,schema:n})=>l(a({},t),{[e]:n})),{})}get options(){const{view:t}=this;return this.extensions.reduce(((e,n)=>l(a({},e),{[n.name]:new Proxy(n.options,{set(e,n,s){const i=e[n]!==s;return Object.assign(e,{[n]:s}),i&&t.updateState(t.state),!0}})})),{})}pasteRules({schema:t,excludedExtensions:e}){const n=this.getAllowedExtensions(e);return[...this.getFromExtensions("pasteRules",{schema:t},n),...this.getFromNodesAndMarks("pasteRules",{schema:t},n)].reduce(((t,e)=>[...t,...e]),[])}plugins({schema:t}){return[...this.getFromExtensions("plugins",{schema:t}),...this.getFromNodesAndMarks("plugins",{schema:t})].reduce(((t,e)=>[...t,...e]),[]).map((t=>t instanceof g?t:new g(t)))}}class ps{constructor(t={}){this.options=a(a({},this.defaults),t)}init(){return null}bindEditor(t=null){this.editor=t}get name(){return null}get type(){return"extension"}get defaults(){return{}}plugins(){return[]}inputRules(){return[]}pasteRules(){return[]}keys(){return{}}}class hs extends ps{constructor(t={}){super(t)}get type(){return"node"}get schema(){return null}commands(){return{}}}class fs extends hs{get defaults(){return{inline:!1}}get name(){return"doc"}get schema(){return{content:this.options.inline?"paragraph+":"block+"}}}class ms extends hs{get button(){return{id:this.name,icon:"paragraph",label:window.panel.$t("toolbar.button.paragraph"),name:this.name}}commands({utils:t,type:e}){return{paragraph:()=>t.setBlockType(e)}}get schema(){return{content:"inline*",group:"block",draggable:!1,parseDOM:[{tag:"p"}],toDOM:()=>["p",0]}}get name(){return"paragraph"}}class gs extends hs{get name(){return"text"}get schema(){return{group:"inline"}}}class ks extends class{emit(t,...e){this._callbacks=this._callbacks||{};const n=this._callbacks[t];return n&&n.forEach((t=>t.apply(this,e))),this}off(t,e){if(arguments.length){const n=this._callbacks?this._callbacks[t]:null;n&&(e?this._callbacks[t]=n.filter((t=>t!==e)):delete this._callbacks[t])}else this._callbacks={};return this}on(t,e){return this._callbacks=this._callbacks||{},this._callbacks[t]=this._callbacks[t]||[],this._callbacks[t].push(e),this}}{constructor(t={}){super(),this.defaults={autofocus:!1,content:"",disableInputRules:!1,disablePasteRules:!1,editable:!0,element:null,extensions:[],emptyDocument:{type:"doc",content:[]},events:{},inline:!1,parseOptions:{},topNode:"doc",useBuiltInExtensions:!0},this.init(t)}blur(){this.view.dom.blur()}get builtInExtensions(){return this.options.useBuiltInExtensions?[new fs({inline:this.options.inline}),new gs,new ms]:[]}buttons(t){return this.extensions.buttons(t)}clearContent(t=!1){this.setContent(this.options.emptyDocument,t)}command(t,...e){this.commands[t]&&this.commands[t](...e)}createCommands(){return this.extensions.commands({schema:this.schema,view:this.view})}createDocument(t,e=this.options.parseOptions){if(null===t)return this.schema.nodeFromJSON(this.options.emptyDocument);if("object"==typeof t)try{return this.schema.nodeFromJSON(t)}catch(n){return window.console.warn("Invalid content.","Passed value:",t,"Error:",n),this.schema.nodeFromJSON(this.options.emptyDocument)}if("string"==typeof t){const n=`

${t}
`,s=(new window.DOMParser).parseFromString(n,"text/html").body.firstElementChild;return I.fromSchema(this.schema).parse(s,e)}return!1}createEvents(){const t=this.options.events||{};return Object.entries(t).forEach((([t,e])=>{this.on(t,e)})),t}createExtensions(){return new ds([...this.builtInExtensions,...this.options.extensions],this)}createFocusEvents(){const t=(t,e,n=!0)=>{this.focused=n,this.emit(n?"focus":"blur",{event:e,state:t.state,view:t});const s=this.state.tr.setMeta("focused",n);this.view.dispatch(s)};return new g({props:{attributes:{tabindex:0},handleDOMEvents:{focus:(e,n)=>{t(e,n,!0)},blur:(e,n)=>{t(e,n,!1)}}}})}createInputRules(){return this.extensions.inputRules({schema:this.schema,excludedExtensions:this.options.disableInputRules})}createKeymaps(){return this.extensions.keymaps({schema:this.schema})}createMarks(){return this.extensions.marks}createNodes(){return this.extensions.nodes}createPasteRules(){return this.extensions.pasteRules({schema:this.schema,excludedExtensions:this.options.disablePasteRules})}createPlugins(){return this.extensions.plugins({schema:this.schema})}createSchema(){return new L({topNode:this.options.topNode,nodes:this.nodes,marks:this.marks})}createState(){return j.create({schema:this.schema,doc:this.createDocument(this.options.content),plugins:[...this.plugins,D({rules:this.inputRules}),...this.pasteRules,...this.keymaps,M({Backspace:q}),M(R),this.createFocusEvents()]})}createView(){return new B(this.element,{dispatchTransaction:this.dispatchTransaction.bind(this),editable:()=>this.options.editable,handlePaste:(t,e)=>{if("function"==typeof this.events.paste){const t=e.clipboardData.getData("text/html"),n=e.clipboardData.getData("text/plain");if(!0===this.events.paste(e,t,n))return!0}},handleDrop:(...t)=>{this.emit("drop",...t)},state:this.createState()})}destroy(){this.view&&this.view.destroy()}dispatchTransaction(t){const e=this.state,n=this.state.apply(t);this.view.updateState(n),this.selection={from:this.state.selection.from,to:this.state.selection.to},this.setActiveNodesAndMarks();const s={editor:this,getHTML:this.getHTML.bind(this),getJSON:this.getJSON.bind(this),state:this.state,transaction:t};this.emit("transaction",s),!t.docChanged&&t.getMeta("preventUpdate")||this.emit("update",s);const{from:i,to:o}=this.state.selection,r=!e||!e.selection.eq(n.selection);this.emit(n.selection.empty?"deselect":"select",l(a({},s),{from:i,hasChanged:r,to:o}))}focus(t=null){if(this.view.focused&&null===t||!1===t)return;const{from:e,to:n}=this.selectionAtPosition(t);this.setSelection(e,n),setTimeout((()=>this.view.focus()),10)}getHTML(){const t=document.createElement("div"),e=P.fromSchema(this.schema).serializeFragment(this.state.doc.content);return t.appendChild(e),this.options.inline&&t.querySelector("p")?t.querySelector("p").innerHTML:t.innerHTML}getJSON(){return this.state.doc.toJSON()}getMarkAttrs(t=null){return this.activeMarkAttrs[t]}getSchemaJSON(){return JSON.parse(JSON.stringify({nodes:this.nodes,marks:this.marks}))}init(t={}){this.options=a(a({},this.defaults),t),this.element=this.options.element,this.focused=!1,this.selection={from:0,to:0},this.events=this.createEvents(),this.extensions=this.createExtensions(),this.nodes=this.createNodes(),this.marks=this.createMarks(),this.schema=this.createSchema(),this.keymaps=this.createKeymaps(),this.inputRules=this.createInputRules(),this.pasteRules=this.createPasteRules(),this.plugins=this.createPlugins(),this.view=this.createView(),this.commands=this.createCommands(),this.setActiveNodesAndMarks(),!1!==this.options.autofocus&&this.focus(this.options.autofocus),this.emit("init",{view:this.view,state:this.state}),this.extensions.view=this.view}isEditable(){return this.options.editable}isEmpty(){if(this.state)return 0===this.state.doc.textContent.length}get isActive(){return Object.entries(a(a({},this.activeMarks),this.activeNodes)).reduce(((t,[e,n])=>l(a({},t),{[e]:(t={})=>n(t)})),{})}removeMark(t){if(this.schema.marks[t])return cs.removeMark(this.schema.marks[t])(this.state,this.view.dispatch)}selectionAtPosition(t=null){if(this.selection&&null===t)return this.selection;if("start"===t||!0===t)return{from:0,to:0};if("end"===t){const{doc:t}=this.state;return{from:t.content.size,to:t.content.size}}return{from:t,to:t}}setActiveNodesAndMarks(){this.activeMarks=Object.values(this.schema.marks).filter((t=>cs.markIsActive(this.state,t))).map((t=>t.name)),this.activeMarkAttrs=Object.entries(this.schema.marks).reduce(((t,[e,n])=>l(a({},t),{[e]:cs.getMarkAttrs(this.state,n)})),{}),this.activeNodes=Object.values(this.schema.nodes).filter((t=>cs.nodeIsActive(this.state,t))).map((t=>t.name)),this.activeNodeAttrs=Object.entries(this.schema.nodes).reduce(((t,[e,n])=>l(a({},t),{[e]:cs.getNodeAttrs(this.state,n)})),{})}setContent(t={},e=!1,n){const{doc:s,tr:i}=this.state,o=this.createDocument(t,n),r=N.create(s,0,s.content.size),a=i.setSelection(r).replaceSelectionWith(o,!1).setMeta("preventUpdate",!e);this.view.dispatch(a)}setSelection(t=0,e=0){const{doc:n,tr:s}=this.state,i=cs.minMax(t,0,n.content.size),o=cs.minMax(e,0,n.content.size),r=N.create(n,i,o),a=s.setSelection(r);this.view.dispatch(a)}get state(){return this.view?this.view.state:null}toggleMark(t){if(this.schema.marks[t])return cs.toggleMark(this.schema.marks[t])(this.state,this.view.dispatch)}updateMark(t,e){if(this.schema.marks[t])return cs.updateMark(this.schema.marks[t],e)(this.state,this.view.dispatch)}}const vs={};var bs=Rt({data:()=>({link:{href:null,title:null,target:!1}}),computed:{fields(){return{href:{label:this.$t("url"),type:"text",icon:"url"},title:{label:this.$t("title"),type:"text",icon:"title"},target:{label:this.$t("open.newWindow"),type:"toggle",text:[this.$t("no"),this.$t("yes")]}}}},methods:{open(t){this.link=a({title:null,target:!1},t),this.link.target=Boolean(this.link.target),this.$refs.dialog.open()},submit(){this.$emit("submit",l(a({},this.link),{target:this.link.target?"_blank":null})),this.$refs.dialog.close()}}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("k-form-dialog",{ref:"dialog",attrs:{fields:t.fields,"submit-button":t.$t("confirm"),size:"medium"},on:{close:function(e){return t.$emit("close")},submit:t.submit},model:{value:t.link,callback:function(e){t.link=e},expression:"link"}})}),[],!1,ys,null,null,null);function ys(t){for(let e in vs)this[e]=vs[e]}var $s=function(){return bs.exports}();const _s={};var ws=Rt({data:()=>({email:{email:null,title:null}}),computed:{fields(){return{href:{label:this.$t("email"),type:"email",icon:"email"},title:{label:this.$t("title"),type:"text",icon:"title"}}}},methods:{open(t){this.email=a({title:null},t),this.$refs.dialog.open()},submit(){this.$emit("submit",this.email),this.$refs.dialog.close()}}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("k-form-dialog",{ref:"dialog",attrs:{fields:t.fields,"submit-button":t.$t("confirm"),size:"medium"},on:{close:function(e){return t.$emit("close")},submit:t.submit},model:{value:t.email,callback:function(e){t.email=e},expression:"email"}})}),[],!1,xs,null,null,null);function xs(t){for(let e in _s)this[e]=_s[e]}var Ss=function(){return ws.exports}();class Cs extends ps{constructor(t={}){super(t)}command(){return()=>{}}remove(){this.editor.removeMark(this.name)}get schema(){return null}get type(){return"mark"}toggle(){return this.editor.toggleMark(this.name)}update(t){this.editor.updateMark(this.name,t)}}class Os extends Cs{get button(){return{icon:"code",label:window.panel.$t("toolbar.button.code")}}commands(){return()=>this.toggle()}inputRules({type:t,utils:e}){return[e.markInputRule(/(?:`)([^`]+)(?:`)$/,t)]}keys(){return{"Mod-`":()=>this.toggle()}}get name(){return"code"}pasteRules({type:t,utils:e}){return[e.markPasteRule(/(?:`)([^`]+)(?:`)/g,t)]}get schema(){return{excludes:"_",parseDOM:[{tag:"code"}],toDOM:()=>["code",0]}}}class Es extends Cs{get button(){return{icon:"bold",label:window.panel.$t("toolbar.button.bold")}}commands(){return()=>this.toggle()}inputRules({type:t,utils:e}){return[e.markInputRule(/(?:\*\*|__)([^*_]+)(?:\*\*|__)$/,t)]}keys(){return{"Mod-b":()=>this.toggle()}}get name(){return"bold"}pasteRules({type:t,utils:e}){return[e.markPasteRule(/(?:\*\*|__)([^*_]+)(?:\*\*|__)/g,t)]}get schema(){return{parseDOM:[{tag:"strong"},{tag:"b",getAttrs:t=>"normal"!==t.style.fontWeight&&null},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}],toDOM:()=>["strong",0]}}}class Ts extends Cs{get button(){return{icon:"italic",label:window.panel.$t("toolbar.button.italic")}}commands(){return()=>this.toggle()}inputRules({type:t,utils:e}){return[e.markInputRule(/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/,t),e.markInputRule(/(?:^|\s)((?:_)((?:[^_]+))(?:_))$/,t)]}keys(){return{"Mod-i":()=>this.toggle()}}get name(){return"italic"}pasteRules({type:t,utils:e}){return[e.markPasteRule(/_([^_]+)_/g,t),e.markPasteRule(/\*([^*]+)\*/g,t)]}get schema(){return{parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style=italic"}],toDOM:()=>["em",0]}}}class As extends Cs{get button(){return{icon:"url",label:window.panel.$t("toolbar.button.link")}}commands(){return{link:()=>{this.editor.emit("link",this.editor)},insertLink:(t={})=>{if(t.href)return this.update(t)},removeLink:()=>this.remove(),toggleLink:(t={})=>{var e;(null==(e=t.href)?void 0:e.length)>0?this.editor.command("insertLink",t):this.editor.command("removeLink")}}}get defaults(){return{target:null}}get name(){return"link"}pasteRules({type:t,utils:e}){return[e.pasteRule(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z]{2,}\b([-a-zA-Z0-9@:%_+.~#?&//=,]*)/gi,t,(t=>({href:t})))]}plugins(){return[{props:{handleClick:(t,e,n)=>{const s=this.editor.getMarkAttrs("link");s.href&&!0===n.altKey&&n.target instanceof HTMLAnchorElement&&(n.stopPropagation(),window.open(s.href,s.target))}}}]}get schema(){return{attrs:{href:{default:null},target:{default:null},title:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]:not([href^='mailto:'])",getAttrs:t=>({href:t.getAttribute("href"),target:t.getAttribute("target"),title:t.getAttribute("title")})}],toDOM:t=>["a",l(a({},t.attrs),{rel:"noopener noreferrer"}),0]}}}class Ms extends Cs{get button(){return{icon:"email",label:"Email"}}commands(){return{email:()=>{this.editor.emit("email")},insertEmail:(t={})=>{if(t.href)return this.update(t)},removeEmail:()=>this.remove(),toggleEmail:(t={})=>{var e;(null==(e=t.href)?void 0:e.length)>0?this.editor.command("insertEmail",t):this.editor.command("removeEmail")}}}get defaults(){return{target:null}}get name(){return"email"}pasteRules({type:t,utils:e}){return[e.pasteRule(/^[\w-.]+@([\w-]+\.)+[\w-]{2,4}$/gi,t,(t=>({href:t})))]}plugins(){return[{props:{handleClick:(t,e,n)=>{const s=this.editor.getMarkAttrs("email");s.href&&!0===n.altKey&&n.target instanceof HTMLAnchorElement&&(n.stopPropagation(),window.open(s.href))}}}]}get schema(){return{attrs:{href:{default:null},title:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href^='mailto:']",getAttrs:t=>({href:t.getAttribute("href").replace("mailto:",""),title:t.getAttribute("title")})}],toDOM:t=>["a",l(a({},t.attrs),{href:"mailto:"+t.attrs.href}),0]}}}class Is extends Cs{get button(){return{icon:"strikethrough",label:window.panel.$t("toolbar.button.strike")}}commands(){return()=>this.toggle()}inputRules({type:t,utils:e}){return[e.markInputRule(/~([^~]+)~$/,t)]}keys(){return{"Mod-d":()=>this.toggle()}}get name(){return"strike"}pasteRules({type:t,utils:e}){return[e.markPasteRule(/~([^~]+)~/g,t)]}get schema(){return{parseDOM:[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",getAttrs:t=>"line-through"===t}],toDOM:()=>["s",0]}}}class Ls extends Cs{get button(){return{icon:"underline",label:window.panel.$t("toolbar.button.underline")}}commands(){return()=>this.toggle()}keys(){return{"Mod-u":()=>this.toggle()}}get name(){return"underline"}get schema(){return{parseDOM:[{tag:"u"},{style:"text-decoration",getAttrs:t=>"underline"===t}],toDOM:()=>["u",0]}}}class js extends hs{get button(){return{id:this.name,icon:"list-bullet",label:window.panel.$t("toolbar.button.ul"),name:this.name,when:["listItem","bulletList","orderedList"]}}commands({type:t,schema:e,utils:n}){return()=>n.toggleList(t,e.nodes.listItem)}inputRules({type:t,utils:e}){return[e.wrappingInputRule(/^\s*([-+*])\s$/,t)]}keys({type:t,schema:e,utils:n}){return{"Shift-Ctrl-8":n.toggleList(t,e.nodes.listItem)}}get name(){return"bulletList"}get schema(){return{content:"listItem+",group:"block",parseDOM:[{tag:"ul"}],toDOM:()=>["ul",0]}}}class Ds extends hs{commands({utils:t,type:e}){return()=>this.createHardBreak(t,e)}createHardBreak(t,e){return t.chainCommands(t.exitCode,((t,n)=>(n(t.tr.replaceSelectionWith(e.create()).scrollIntoView()),!0)))}get defaults(){return{enter:!1,text:!1}}keys({utils:t,type:e}){const n=this.createHardBreak(t,e);let s={"Mod-Enter":n,"Shift-Enter":n};return this.options.enter&&(s.Enter=n),s}get name(){return"hardBreak"}get schema(){return{inline:!0,group:"inline",selectable:!1,parseDOM:[{tag:"br"}],toDOM:()=>["br"]}}}class Bs extends hs{get button(){return this.options.levels.map((t=>({id:`h${t}`,command:`h${t}`,icon:`h${t}`,label:window.panel.$t("toolbar.button.heading."+t),attrs:{level:t},name:this.name,when:["heading","paragraph"]})))}commands({type:t,schema:e,utils:n}){let s={toggleHeading:s=>n.toggleBlockType(t,e.nodes.paragraph,s)};return this.options.levels.forEach((i=>{s[`h${i}`]=()=>n.toggleBlockType(t,e.nodes.paragraph,{level:i})})),s}get defaults(){return{levels:[1,2,3,4,5,6]}}inputRules({type:t,utils:e}){return this.options.levels.map((n=>e.textblockTypeInputRule(new RegExp(`^(#{1,${n}})\\s$`),t,(()=>({level:n})))))}keys({type:t,utils:e}){return this.options.levels.reduce(((n,s)=>a(a({},n),{[`Shift-Ctrl-${s}`]:e.setBlockType(t,{level:s})})),{})}get name(){return"heading"}get schema(){return{attrs:{level:{default:1}},content:"inline*",group:"block",defining:!0,draggable:!1,parseDOM:this.options.levels.map((t=>({tag:`h${t}`,attrs:{level:t}}))),toDOM:t=>[`h${t.attrs.level}`,0]}}}class Ps extends hs{commands({type:t}){return()=>(e,n)=>n(e.tr.replaceSelectionWith(t.create()))}inputRules({type:t,utils:e}){return[e.nodeInputRule(/^(?:---|___\s|\*\*\*\s)$/,t)]}get name(){return"horizontalRule"}get schema(){return{group:"block",parseDOM:[{tag:"hr"}],toDOM:()=>["hr"]}}}class Ns extends hs{keys({type:t,utils:e}){return{Enter:e.splitListItem(t),"Shift-Tab":e.liftListItem(t),Tab:e.sinkListItem(t)}}get name(){return"listItem"}get schema(){return{content:"paragraph block*",defining:!0,draggable:!1,parseDOM:[{tag:"li"}],toDOM:()=>["li",0]}}}class qs extends hs{get button(){return{id:this.name,icon:"list-numbers",label:window.panel.$t("toolbar.button.ol"),name:this.name,when:["listItem","bulletList","orderedList"]}}commands({type:t,schema:e,utils:n}){return()=>n.toggleList(t,e.nodes.listItem)}inputRules({type:t,utils:e}){return[e.wrappingInputRule(/^(\d+)\.\s$/,t,(t=>({order:+t[1]})),((t,e)=>e.childCount+e.attrs.order===+t[1]))]}keys({type:t,schema:e,utils:n}){return{"Shift-Ctrl-9":n.toggleList(t,e.nodes.listItem)}}get name(){return"orderedList"}get schema(){return{attrs:{order:{default:1}},content:"listItem+",group:"block",parseDOM:[{tag:"ol",getAttrs:t=>({order:t.hasAttribute("start")?+t.getAttribute("start"):1})}],toDOM:t=>1===t.attrs.order?["ol",0]:["ol",{start:t.attrs.order},0]}}}class Rs extends ps{commands(){return{undo:()=>F,redo:()=>z,undoDepth:()=>Y,redoDepth:()=>H}}get defaults(){return{depth:"",newGroupDelay:""}}keys(){return{"Mod-z":F,"Mod-y":z,"Shift-Mod-z":z,"Mod-я":F,"Shift-Mod-я":z}}get name(){return"history"}plugins(){return[U({depth:this.options.depth,newGroupDelay:this.options.newGroupDelay})]}}class Fs extends ps{commands(){return{insertHtml:t=>(e,n)=>{let s=document.createElement("div");s.innerHTML=t.trim();const i=I.fromSchema(e.schema).parse(s);n(e.tr.replaceSelectionWith(i).scrollIntoView())}}}}class zs extends ps{constructor(t={}){super(t)}close(){this.visible=!1,this.emit()}emit(){this.editor.emit("toolbar",{marks:this.marks,nodes:this.nodes,nodeAttrs:this.nodeAttrs,position:this.position,visible:this.visible})}init(){this.position={left:0,bottom:0},this.visible=!1,this.editor.on("blur",(()=>{this.close()})),this.editor.on("deselect",(()=>{this.close()})),this.editor.on("select",(({hasChanged:t})=>{!1!==t?this.open():this.emit()}))}get marks(){return this.editor.activeMarks}get nodes(){return this.editor.activeNodes}get nodeAttrs(){return this.editor.activeNodeAttrs}open(){this.visible=!0,this.reposition(),this.emit()}reposition(){const{from:t,to:e}=this.editor.selection,n=this.editor.view.coordsAtPos(t),s=this.editor.view.coordsAtPos(e,!0),i=this.editor.element.getBoundingClientRect();let o=(n.left+s.left)/2-i.left,r=Math.round(i.bottom-n.top);return this.position={bottom:r,left:o}}get type(){return"toolbar"}}const Ys={props:{activeMarks:{type:Array,default:()=>[]},activeNodes:{type:Array,default:()=>[]},activeNodeAttrs:{type:[Array,Object],default:()=>[]},editor:{type:Object,required:!0},marks:{type:Array},isParagraphNodeHidden:{type:Boolean,default:!1}},computed:{activeButton(){return Object.values(this.nodeButtons).find((t=>this.isButtonActive(t)))||!1},hasVisibleButtons(){const t=Object.keys(this.nodeButtons);return t.length>1||1===t.length&&!1===t.includes("paragraph")},markButtons(){return this.buttons("mark")},nodeButtons(){let t=this.buttons("node");return!0===this.isParagraphNodeHidden&&t.paragraph&&delete t.paragraph,t}},methods:{buttons(t){const e=this.editor.buttons(t);let n=this.sorting;!1!==n&&!1!==Array.isArray(n)||(n=Object.keys(e));let s={};return n.forEach((t=>{e[t]&&(s[t]=e[t])})),s},command(t,...e){this.$emit("command",t,...e)},isButtonActive(t){if("paragraph"===t.name)return 1===this.activeNodes.length&&this.activeNodes.includes(t.name);let e=!0;if(t.attrs){const n=Object.values(this.activeNodeAttrs).find((e=>JSON.stringify(e)===JSON.stringify(t.attrs)));e=Boolean(n||!1)}return!0===e&&this.activeNodes.includes(t.name)},isButtonCurrent(t){return!!this.activeButton&&this.activeButton.id===t.id},isButtonDisabled(t){var e;if(null==(e=this.activeButton)?void 0:e.when){return!1===this.activeButton.when.includes(t.name)}return!1},needDividerAfterNode(t){let e=["paragraph"],n=Object.keys(this.nodeButtons);return(n.includes("bulletList")||n.includes("orderedList"))&&e.push("h6"),e.includes(t.id)}}},Hs={};var Us=Rt(Ys,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-writer-toolbar"},[t.hasVisibleButtons?n("k-dropdown",{nativeOn:{mousedown:function(t){t.preventDefault()}}},[n("k-button",{class:{"k-writer-toolbar-button k-writer-toolbar-nodes":!0,"k-writer-toolbar-button-active":!!t.activeButton},attrs:{icon:t.activeButton.icon||"title"},on:{click:function(e){return t.$refs.nodes.toggle()}}}),n("k-dropdown-content",{ref:"nodes"},[t._l(t.nodeButtons,(function(e,s){return[n("k-dropdown-item",{key:s,attrs:{current:t.isButtonCurrent(e),disabled:t.isButtonDisabled(e),icon:e.icon},on:{click:function(n){return t.command(e.command||s)}}},[t._v(" "+t._s(e.label)+" ")]),t.needDividerAfterNode(e)?n("hr",{key:s+"-divider"}):t._e()]}))],2)],1):t._e(),t._l(t.markButtons,(function(e,s){return n("k-button",{key:s,class:{"k-writer-toolbar-button":!0,"k-writer-toolbar-button-active":t.activeMarks.includes(s)},attrs:{icon:e.icon,tooltip:e.label},on:{mousedown:function(n){return n.preventDefault(),t.command(e.command||s)}}})}))],2)}),[],!1,Ks,null,null,null);function Ks(t){for(let e in Hs)this[e]=Hs[e]}const Js={props:{autofocus:Boolean,breaks:Boolean,code:Boolean,disabled:Boolean,emptyDocument:{type:Object,default:()=>({type:"doc",content:[]})},headings:[Array,Boolean],inline:{type:Boolean,default:!1},marks:{type:[Array,Boolean],default:!0},nodes:{type:[Array,Boolean],default:()=>["heading","bulletList","orderedList"]},paste:{type:Function,default:()=>()=>!1},placeholder:String,spellcheck:Boolean,extensions:Array,value:{type:String,default:""}}},Gs={};var Vs=Rt({components:{"k-writer-email-dialog":Ss,"k-writer-link-dialog":$s,"k-writer-toolbar":function(){return Us.exports}()},mixins:[Js],data(){return{editor:null,json:{},html:this.value,isEmpty:!0,toolbar:!1}},computed:{isParagraphNodeHidden(){return!0===Array.isArray(this.nodes)&&3!==this.nodes.length&&!1===this.nodes.includes("paragraph")}},watch:{value(t,e){t!==e&&t!==this.html&&(this.html=t,this.editor.setContent(this.html))}},mounted(){this.editor=new ks({autofocus:this.autofocus,content:this.value,editable:!this.disabled,element:this.$el,emptyDocument:this.emptyDocument,events:{link:t=>{this.$refs.linkDialog.open(t.getMarkAttrs("link"))},email:()=>{this.$refs.emailDialog.open(this.editor.getMarkAttrs("email"))},paste:this.paste,toolbar:t=>{this.toolbar=t,this.toolbar.visible&&this.$nextTick((()=>{this.onToolbarOpen()}))},update:t=>{const e=JSON.stringify(this.editor.getJSON());e!==JSON.stringify(this.json)&&(this.json=e,this.isEmpty=t.editor.isEmpty(),this.html=t.editor.getHTML(),this.isEmpty&&(0===t.editor.activeNodes.length||t.editor.activeNodes.includes("paragraph"))&&(this.html=""),this.$emit("input",this.html))}},extensions:[...this.createMarks(),...this.createNodes(),new Rs,new Fs,new zs,...this.extensions||[]],inline:this.inline}),this.isEmpty=this.editor.isEmpty(),this.json=this.editor.getJSON()},beforeDestroy(){this.editor.destroy()},methods:{filterExtensions(t,e,n){!1===e?e=[]:!0!==e&&!1!==Array.isArray(e)||(e=Object.keys(t));let s=[];return e.forEach((e=>{t[e]&&s.push(t[e])})),"function"==typeof n&&(s=n(e,s)),s},command(t,...e){this.editor.command(t,...e)},createMarks(){return this.filterExtensions({bold:new Es,italic:new Ts,strike:new Is,underline:new Ls,code:new Os,link:new As,email:new Ms},this.marks)},createNodes(){const t=new Ds({text:!0,enter:this.inline});return!0===this.inline?[t]:this.filterExtensions({bulletList:new js,orderedList:new qs,heading:new Bs,horizontalRule:new Ps,listItem:new Ns},this.nodes,((e,n)=>((e.includes("bulletList")||e.includes("orderedList"))&&n.push(new Ns),n.push(t),n)))},getHTML(){return this.editor.getHTML()},focus(){this.editor.focus()},onToolbarOpen(){if(this.$refs.toolbar){const t=this.$el.clientWidth,e=this.$refs.toolbar.$el.clientWidth;let n=this.toolbar.position.left;n-e/2<0&&(n=n+(e/2-n)-20),n+e/2>t&&(n=n-(n+e/2-t)+20),n!==this.toolbar.position.left&&(this.$refs.toolbar.$el.style.left=n+"px")}}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"direction",rawName:"v-direction"}],ref:"editor",staticClass:"k-writer",attrs:{"data-empty":t.isEmpty,"data-placeholder":t.placeholder,spellcheck:t.spellcheck}},[t.editor?[t.toolbar.visible?n("k-writer-toolbar",{ref:"toolbar",style:{bottom:t.toolbar.position.bottom+"px","inset-inline-start":t.toolbar.position.left+"px"},attrs:{editor:t.editor,"active-marks":t.toolbar.marks,"active-nodes":t.toolbar.nodes,"active-node-attrs":t.toolbar.nodeAttrs,"is-paragraph-node-hidden":t.isParagraphNodeHidden},on:{command:function(e){return t.editor.command(e)}}}):t._e(),n("k-writer-link-dialog",{ref:"linkDialog",on:{close:function(e){return t.editor.focus()},submit:function(e){return t.editor.command("toggleLink",e)}}}),n("k-writer-email-dialog",{ref:"emailDialog",on:{close:function(e){return t.editor.focus()},submit:function(e){return t.editor.command("toggleEmail",e)}}})]:t._e()],2)}),[],!1,Ws,null,null,null);function Ws(t){for(let e in Gs)this[e]=Gs[e]}var Xs=function(){return Vs.exports}();const Zs={};var Qs=Rt({},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-login-alert",on:{click:function(e){return t.$emit("click")}}},[n("span",[t._t("default")],2),n("k-icon",{attrs:{type:"alert"}})],1)}),[],!1,ti,null,null,null);function ti(t){for(let e in Zs)this[e]=Zs[e]}var ei=function(){return Qs.exports}();const ni={mixins:[vn,yn,_n,xn,Cn],inheritAttrs:!1,props:{value:Boolean},watch:{value(){this.onInvalid()}},mounted(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus(){this.$refs.input.focus()},onChange(t){this.$emit("input",t)},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},select(){this.focus()}},validations(){return{value:{required:!this.required||K.required}}}},si={};var ii=Rt(ni,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("label",{staticClass:"k-checkbox-input",on:{click:function(t){t.stopPropagation()}}},[n("input",{ref:"input",staticClass:"k-checkbox-input-native",attrs:{id:t.id,disabled:t.disabled,type:"checkbox"},domProps:{checked:t.value},on:{change:function(e){return t.onChange(e.target.checked)}}}),n("span",{staticClass:"k-checkbox-input-icon",attrs:{"aria-hidden":"true"}},[n("svg",{attrs:{width:"12",height:"10",viewBox:"0 0 12 10",xmlns:"http://www.w3.org/2000/svg"}},[n("path",{attrs:{d:"M1 5l3.3 3L11 1","stroke-width":"2",fill:"none","fill-rule":"evenodd"}})])]),n("span",{staticClass:"k-checkbox-input-label",domProps:{innerHTML:t._s(t.label)}})])}),[],!1,oi,null,null,null);function oi(t){for(let e in si)this[e]=si[e]}var ri=function(){return ii.exports}();const ai={mixins:[vn,yn,_n,Cn],props:{columns:Number,max:Number,min:Number,options:Array,value:{type:[Array,Object],default:()=>[]}}},li={};var ui=Rt({mixins:[ai],inheritAttrs:!1,data(){return{selected:this.valueToArray(this.value)}},watch:{value(t){this.selected=this.valueToArray(t)},selected(){this.onInvalid()}},mounted(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus(){this.$el.querySelector("input").focus()},onInput(t,e){if(!0===e)this.selected.push(t);else{const e=this.selected.indexOf(t);-1!==e&&this.selected.splice(e,1)}this.$emit("input",this.selected)},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},select(){this.focus()},valueToArray:t=>!0===Array.isArray(t)?t:"string"==typeof t?String(t).split(","):"object"==typeof t?Object.values(t):void 0},validations(){return{selected:{required:!this.required||K.required,min:!this.min||K.minLength(this.min),max:!this.max||K.maxLength(this.max)}}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("ul",{staticClass:"k-checkboxes-input",style:"--columns:"+t.columns},t._l(t.options,(function(e,s){return n("li",{key:s},[n("k-checkbox-input",{attrs:{id:t.id+"-"+s,label:e.text,value:-1!==t.selected.indexOf(e.value)},on:{input:function(n){return t.onInput(e.value,n)}}})],1)})),0)}),[],!1,ci,null,null,null);function ci(t){for(let e in li)this[e]=li[e]}var di=function(){return ui.exports}();const pi={mixins:[vn,yn,_n,Cn],props:{display:{type:String,default:"DD.MM.YYYY"},max:String,min:String,step:{type:Object,default:()=>({size:1,unit:"day"})},type:{type:String,default:"date"},value:String}},hi={};var fi=Rt({mixins:[pi],inheritAttrs:!1,data:()=>({dt:null,formatted:null}),computed:{inputType:()=>"date",pattern(){return this.$library.dayjs.pattern(this.display)},rounding(){return a(a({},this.$options.props.step.default()),this.step)}},watch:{value:{handler(t,e){if(t!==e){const e=this.toDatetime(t);this.commit(e)}},immediate:!0}},created(){this.$events.$on("keydown.cmd.s",this.onBlur)},destroyed(){this.$events.$off("keydown.cmd.s",this.onBlur)},methods:{alter(t){let e=this.parse()||this.round(this.$library.dayjs()),n=this.rounding.unit,s=this.rounding.size;const i=this.selection();null!==i&&("meridiem"===i.unit?(t="pm"===e.format("a")?"subtract":"add",n="hour",s=12):(n=i.unit,n!==this.rounding.unit&&(s=1))),e=e[t](s,n).round(this.rounding.unit,this.rounding.size),this.commit(e),this.emit(e),this.$nextTick((()=>this.select(i)))},commit(t){this.dt=t,this.formatted=this.pattern.format(t),this.$emit("invalid",this.$v.$invalid,this.$v)},emit(t){this.$emit("input",this.toISO(t))},focus(){this.$refs.input.focus()},onArrowDown(){this.alter("subtract")},onArrowUp(){this.alter("add")},onBlur(){const t=this.parse();this.commit(t),this.emit(t)},onEnter(){this.onBlur(),this.$nextTick((()=>this.$emit("submit")))},onInput(t){const e=this.parse(),n=this.pattern.format(e);if(!t||n==t)return this.commit(e),this.emit(e)},onTab(t){""!=this.$refs.input.value&&(this.onBlur(),this.$nextTick((()=>{const e=this.selection();if(this.$refs.input&&e.start===this.$refs.input.selectionStart&&e.end===this.$refs.input.selectionEnd-1)if(t.shiftKey){if(0===e.index)return;this.selectPrev(e.index)}else{if(e.index===this.pattern.parts.length-1)return;this.selectNext(e.index)}else t.shiftKey?this.selectLast():this.selectFirst();t.preventDefault()})))},parse(){let t=this.$refs.input.value;return t=this.$library.dayjs.interpret(t,this.inputType),this.round(t)},round(t){return(null==t?void 0:t.round(this.rounding.unit,this.rounding.size))||null},select(t){var e;t||(t=this.selection()),null==(e=this.$refs.input)||e.setSelectionRange(t.start,t.end+1)},selectFirst(){this.select(this.pattern.parts[0])},selectLast(){this.select(this.pattern.parts[this.pattern.parts.length-1])},selectNext(t){this.select(this.pattern.parts[t+1])},selectPrev(t){this.select(this.pattern.parts[t-1])},selection(){return this.pattern.at(this.$refs.input.selectionStart,this.$refs.input.selectionEnd)},toDatetime(t){return this.round(this.$library.dayjs.iso(t,this.inputType))},toISO(t){return(null==t?void 0:t.toISO(this.inputType))||null}},validations(){return{value:{min:!this.dt||!this.min||(()=>this.dt.validate(this.min,"min",this.rounding.unit)),max:!this.dt||!this.max||(()=>this.dt.validate(this.max,"max",this.rounding.unit)),required:!this.required||(()=>!!this.dt)}}}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("input",{directives:[{name:"model",rawName:"v-model",value:t.formatted,expression:"formatted"},{name:"direction",rawName:"v-direction"}],ref:"input",class:"k-text-input k-"+t.type+"-input",attrs:{id:t.id,autofocus:t.autofocus,disabled:t.disabled,placeholder:t.display,required:t.required,autocomplete:"off",spellcheck:"false",type:"text"},domProps:{value:t.formatted},on:{blur:t.onBlur,focus:function(e){return t.$emit("focus")},input:[function(e){e.target.composing||(t.formatted=e.target.value)},function(e){return t.onInput(e.target.value)}],keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"])?null:(e.stopPropagation(),e.preventDefault(),t.onArrowDown.apply(null,arguments))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"up",38,e.key,["Up","ArrowUp"])?null:(e.stopPropagation(),e.preventDefault(),t.onArrowUp.apply(null,arguments))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:(e.stopPropagation(),e.preventDefault(),t.onEnter.apply(null,arguments))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"tab",9,e.key,"Tab")?null:t.onTab.apply(null,arguments)}]}})}),[],!1,mi,null,null,null);function mi(t){for(let e in hi)this[e]=hi[e]}var gi=function(){return fi.exports}();const ki={mixins:[vn,yn,_n,Sn,Cn],props:{autocomplete:{type:[Boolean,String],default:"off"},maxlength:Number,minlength:Number,pattern:String,placeholder:String,preselect:Boolean,spellcheck:{type:[Boolean,String],default:"off"},type:{type:String,default:"text"},value:String}},vi={};var bi=Rt({mixins:[ki],inheritAttrs:!1,data(){return{listeners:l(a({},this.$listeners),{input:t=>this.onInput(t.target.value)})}},watch:{value(){this.onInvalid()}},mounted(){this.onInvalid(),this.$props.autofocus&&this.focus(),this.$props.preselect&&this.select()},methods:{focus(){this.$refs.input.focus()},onInput(t){this.$emit("input",t)},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},select(){this.$refs.input.select()}},validations(){return{value:{required:!this.required||K.required,minLength:!this.minlength||K.minLength(this.minlength),maxLength:!this.maxlength||K.maxLength(this.maxlength),email:"email"!==this.type||K.email,url:"url"!==this.type||K.url,pattern:!this.pattern||(t=>!this.required&&!t||!this.$refs.input.validity.patternMismatch)}}}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("input",t._g(t._b({directives:[{name:"direction",rawName:"v-direction"}],ref:"input",staticClass:"k-text-input"},"input",{autocomplete:t.autocomplete,autofocus:t.autofocus,disabled:t.disabled,id:t.id,minlength:t.minlength,name:t.name,pattern:t.pattern,placeholder:t.placeholder,required:t.required,spellcheck:t.spellcheck,type:t.type,value:t.value},!1),t.listeners))}),[],!1,yi,null,null,null);function yi(t){for(let e in vi)this[e]=vi[e]}var $i=function(){return bi.exports}();const _i={mixins:[ki],props:{autocomplete:{type:String,default:"email"},placeholder:{type:String,default:()=>window.panel.$t("email.placeholder")},type:{type:String,default:"email"}}};const wi={};var xi=Rt({extends:$i,mixins:[_i]},undefined,undefined,!1,Si,null,null,null);function Si(t){for(let e in wi)this[e]=wi[e]}var Ci=function(){return xi.exports}();class Oi extends fs{get schema(){return{content:"bulletList|orderedList"}}}const Ei={inheritAttrs:!1,props:{autofocus:Boolean,marks:{type:[Array,Boolean],default:!0},value:String},data(){return{list:this.value,html:this.value}},computed:{extensions:()=>[new Oi({inline:!0})]},watch:{value(t){t!==this.html&&(this.list=t,this.html=t)}},methods:{focus(){this.$refs.input.focus()},onInput(t){let e=(new DOMParser).parseFromString(t,"text/html").querySelector("ul, ol");e&&0!==e.textContent.trim().length?(this.list=t,this.html=t.replace(/(

|<\/p>)/gi,""),this.$emit("input",this.html)):this.$emit("input",this.list="")}}},Ti={};var Ai=Rt(Ei,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("k-writer",t._b({ref:"input",staticClass:"k-list-input",attrs:{extensions:t.extensions,nodes:["bulletList","orderedList"],value:t.list},on:{input:t.onInput}},"k-writer",t.$props,!1))}),[],!1,Mi,null,null,null);function Mi(t){for(let e in Ti)this[e]=Ti[e]}var Ii=function(){return Ai.exports}();const Li={mixins:[yn,_n,Cn],props:{max:Number,min:Number,layout:String,options:{type:Array,default:()=>[]},search:[Object,Boolean],separator:{type:String,default:","},sort:Boolean,value:{type:Array,required:!0,default:()=>[]}}},ji={};var Di=Rt({mixins:[Li],inheritAttrs:!1,data(){return{state:this.value,q:null,limit:!0,scrollTop:0}},computed:{draggable(){return this.state.length>1&&!this.sort},dragOptions(){return{disabled:!this.draggable,draggable:".k-tag",delay:1}},emptyLabel(){return this.q?this.$t("search.results.none"):this.$t("options.none")},filtered(){var t;return(null==(t=this.q)?void 0:t.length)>=(this.search.min||0)?this.options.filter((t=>this.isFiltered(t))).map((t=>l(a({},t),{display:this.toHighlightedString(t.text),info:this.toHighlightedString(t.value)}))):this.options.map((t=>l(a({},t),{display:t.text,info:t.value})))},more(){return!this.max||this.state.lengththis.options.findIndex((e=>e.value===t.value));return t.sort(((t,n)=>e(t)-e(n)))},visible(){return this.limit?this.filtered.slice(0,this.search.display||this.filtered.length):this.filtered}},watch:{value(t){this.state=t,this.onInvalid()}},mounted(){this.onInvalid(),this.$events.$on("click",this.close),this.$events.$on("keydown.cmd.s",this.close)},destroyed(){this.$events.$off("click",this.close),this.$events.$off("keydown.cmd.s",this.close)},methods:{add(t){!0===this.more&&(this.state.push(t),this.onInput())},blur(){this.close()},close(){!0===this.$refs.dropdown.isOpen&&(this.$refs.dropdown.close(),this.limit=!0)},escape(){this.q?this.q=null:this.close()},focus(){this.$refs.dropdown.open()},index(t){return this.state.findIndex((e=>e.value===t.value))},isFiltered(t){return String(t.text).match(this.regex)||String(t.value).match(this.regex)},isSelected(t){return-1!==this.index(t)},navigate(t){var e,n,s;"prev"===t&&(t="previous"),null==(s=null==(n=null==(e=document.activeElement)?void 0:e[t+"Sibling"])?void 0:n.focus)||s.call(n)},onClose(){!1===this.$refs.dropdown.isOpen&&(document.activeElement===this.$parent.$el&&(this.q=null),this.$parent.$el.focus())},onInput(){this.$emit("input",this.sorted)},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},onOpen(){this.$nextTick((()=>{var t,e;null==(e=null==(t=this.$refs.search)?void 0:t.focus)||e.call(t),this.$refs.dropdown.$el.querySelector(".k-multiselect-options").scrollTop=this.scrollTop}))},remove(t){this.state.splice(this.index(t),1),this.onInput()},select(t){this.scrollTop=this.$refs.dropdown.$el.querySelector(".k-multiselect-options").scrollTop,t={text:t.text,value:t.value},this.isSelected(t)?this.remove(t):this.add(t)},toHighlightedString(t){return(t=this.$helper.string.stripHTML(t)).replace(this.regex,"$1")}},validations(){return{state:{required:!this.required||K.required,minLength:!this.min||K.minLength(this.min),maxLength:!this.max||K.maxLength(this.max)}}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-draggable",{staticClass:"k-multiselect-input",attrs:{list:t.state,options:t.dragOptions,"data-layout":t.layout,element:"k-dropdown"},on:{end:t.onInput},nativeOn:{click:function(e){return t.$refs.dropdown.toggle.apply(null,arguments)}},scopedSlots:t._u([{key:"footer",fn:function(){return[n("k-dropdown-content",{ref:"dropdown",on:{open:t.onOpen,close:t.onClose},nativeOn:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:(e.stopPropagation(),t.close.apply(null,arguments))}}},[t.search?n("k-dropdown-item",{staticClass:"k-multiselect-search",attrs:{icon:"search"}},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.q,expression:"q"}],ref:"search",attrs:{placeholder:t.search.min?t.$t("search.min",{min:t.search.min}):t.$t("search")+" …"},domProps:{value:t.q},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:(e.stopPropagation(),t.escape.apply(null,arguments))},input:function(e){e.target.composing||(t.q=e.target.value)}}})]):t._e(),n("div",{staticClass:"k-multiselect-options scroll-y-auto"},[t._l(t.visible,(function(e){return n("k-dropdown-item",{key:e.value,class:{"k-multiselect-option":!0,selected:t.isSelected(e),disabled:!t.more},attrs:{icon:t.isSelected(e)?"check":"circle-outline"},on:{click:function(n){return n.preventDefault(),t.select(e)}},nativeOn:{keydown:[function(n){return!n.type.indexOf("key")&&t._k(n.keyCode,"enter",13,n.key,"Enter")?null:(n.preventDefault(),n.stopPropagation(),t.select(e))},function(n){return!n.type.indexOf("key")&&t._k(n.keyCode,"space",32,n.key,[" ","Spacebar"])?null:(n.preventDefault(),n.stopPropagation(),t.select(e))}]}},[n("span",{domProps:{innerHTML:t._s(e.display)}}),n("span",{staticClass:"k-multiselect-value",domProps:{innerHTML:t._s(e.info)}})])})),0===t.filtered.length?n("k-dropdown-item",{staticClass:"k-multiselect-option",attrs:{disabled:!0}},[t._v(" "+t._s(t.emptyLabel)+" ")]):t._e()],2),t.visible.lengththis.onInput(t.target.value),blur:this.onBlur})}},watch:{value(t){this.number=t},number:{immediate:!0,handler(){this.onInvalid()}}},mounted(){this.$props.autofocus&&this.focus(),this.$props.preselect&&this.select()},methods:{decimals(){const t=Number(this.step||0);return Math.floor(t)===t?0:-1!==t.toString().indexOf("e")?parseInt(t.toFixed(16).split(".")[1].split("").reverse().join("")).toString().length:t.toString().split(".")[1].length||0},format(t){if(isNaN(t)||""===t)return"";const e=this.decimals();return t=e?parseFloat(t).toFixed(e):Number.isInteger(this.step)?parseInt(t):parseFloat(t)},clean(){this.number=this.format(this.number)},emit(t){t=parseFloat(t),isNaN(t)&&(t=""),t!==this.value&&this.$emit("input",t)},focus(){this.$refs.input.focus()},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},onInput(t){this.number=t,this.emit(t)},onBlur(){this.clean(),this.emit(this.number)},select(){this.$refs.input.select()}},validations(){return{value:{required:!this.required||K.required,min:!this.min||K.minValue(this.min),max:!this.max||K.maxValue(this.max)}}}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("input",t._g(t._b({ref:"input",staticClass:"k-number-input",attrs:{step:t.stepNumber,type:"number"},domProps:{value:t.number},on:{keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"s",void 0,e.key,void 0)?null:e.ctrlKey?t.clean.apply(null,arguments):null},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"s",void 0,e.key,void 0)?null:e.metaKey?t.clean.apply(null,arguments):null}]}},"input",{autofocus:t.autofocus,disabled:t.disabled,id:t.id,max:t.max,min:t.min,name:t.name,placeholder:t.placeholder,required:t.required},!1),t.listeners))}),[],!1,Fi,null,null,null);function Fi(t){for(let e in qi)this[e]=qi[e]}var zi=function(){return Ri.exports}();const Yi={mixins:[ki],props:{autocomplete:{type:String,default:"new-password"},type:{type:String,default:"password"}}};const Hi={};var Ui=Rt({extends:$i,mixins:[Yi]},undefined,undefined,!1,Ki,null,null,null);function Ki(t){for(let e in Hi)this[e]=Hi[e]}var Ji=function(){return Ui.exports}();const Gi={mixins:[vn,yn,_n,Cn],props:{columns:Number,options:Array,value:[String,Number,Boolean]}},Vi={};var Wi=Rt({mixins:[Gi],inheritAttrs:!1,watch:{value(){this.onInvalid()}},mounted(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus(){this.$el.querySelector("input").focus()},onInput(t){this.$emit("input",t)},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},select(){this.focus()}},validations(){return{value:{required:!this.required||K.required}}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("ul",{staticClass:"k-radio-input",style:"--columns:"+t.columns},t._l(t.options,(function(e,s){return n("li",{key:s},[n("input",{staticClass:"k-radio-input-native",attrs:{id:t.id+"-"+s,name:t.id,type:"radio"},domProps:{value:e.value,checked:t.value===e.value},on:{change:function(n){return t.onInput(e.value)}}}),e.info?n("label",{attrs:{for:t.id+"-"+s}},[n("span",{staticClass:"k-radio-input-text",domProps:{innerHTML:t._s(e.text)}}),n("span",{staticClass:"k-radio-input-info",domProps:{innerHTML:t._s(e.info)}})]):n("label",{attrs:{for:t.id+"-"+s},domProps:{innerHTML:t._s(e.text)}}),e.icon?n("k-icon",{attrs:{type:e.icon}}):t._e()],1)})),0)}),[],!1,Xi,null,null,null);function Xi(t){for(let e in Vi)this[e]=Vi[e]}var Zi=function(){return Wi.exports}();const Qi={mixins:[vn,yn,_n,Sn,Cn],props:{default:[Number,String],max:{type:Number,default:100},min:{type:Number,default:0},step:{type:Number,default:1},tooltip:{type:[Boolean,Object],default:()=>({before:null,after:null})},value:[Number,String]}},to={};var eo=Rt({mixins:[Qi],inheritAttrs:!1,data(){return{listeners:l(a({},this.$listeners),{input:t=>this.onInput(t.target.value)})}},computed:{baseline(){return this.min<0?0:this.min},label(){return this.required||this.value||0===this.value?this.format(this.position):"–"},position(){return this.value||0===this.value?this.value:this.default||this.baseline}},watch:{position(){this.onInvalid()}},mounted(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus(){this.$refs.input.focus()},format(t){const e=document.lang?document.lang.replace("_","-"):"en",n=this.step.toString().split("."),s=n.length>1?n[1].length:0;return new Intl.NumberFormat(e,{minimumFractionDigits:s}).format(t)},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},onInput(t){this.$emit("input",t)}},validations(){return{position:{required:!this.required||K.required,min:!this.min||K.minValue(this.min),max:!this.max||K.maxValue(this.max)}}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("label",{staticClass:"k-range-input"},[n("input",t._g(t._b({ref:"input",staticClass:"k-range-input-native",style:"--min: "+t.min+"; --max: "+t.max+"; --value: "+t.position,attrs:{type:"range"},domProps:{value:t.position}},"input",{autofocus:t.autofocus,disabled:t.disabled,id:t.id,max:t.max,min:t.min,name:t.name,required:t.required,step:t.step},!1),t.listeners)),t.tooltip?n("span",{staticClass:"k-range-input-tooltip"},[t.tooltip.before?n("span",{staticClass:"k-range-input-tooltip-before"},[t._v(t._s(t.tooltip.before))]):t._e(),n("span",{staticClass:"k-range-input-tooltip-text"},[t._v(t._s(t.label))]),t.tooltip.after?n("span",{staticClass:"k-range-input-tooltip-after"},[t._v(t._s(t.tooltip.after))]):t._e()]):t._e()])}),[],!1,no,null,null,null);function no(t){for(let e in to)this[e]=to[e]}var so=function(){return eo.exports}();const io={mixins:[vn,yn,_n,Sn,Cn],props:{ariaLabel:String,default:String,empty:{type:[Boolean,String],default:!0},placeholder:String,options:{type:Array,default:()=>[]},value:{type:[String,Number,Boolean],default:""}}},oo={};var ro=Rt({mixins:[io],inheritAttrs:!1,data(){return{selected:this.value,listeners:l(a({},this.$listeners),{click:t=>this.onClick(t),change:t=>this.onInput(t.target.value),input:()=>{}})}},computed:{emptyOption(){return this.placeholder||"—"},hasEmptyOption(){return!1!==this.empty&&!(this.required&&this.default)},label(){const t=this.text(this.selected);return""===this.selected||null===this.selected||null===t?this.emptyOption:t}},watch:{value(t){this.selected=t,this.onInvalid()}},mounted(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus(){this.$refs.input.focus()},onClick(t){t.stopPropagation(),this.$emit("click",t)},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},onInput(t){this.selected=t,this.$emit("input",this.selected)},select(){this.focus()},text(t){let e=null;return this.options.forEach((n=>{n.value==t&&(e=n.text)})),e}},validations(){return{selected:{required:!this.required||K.required}}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{staticClass:"k-select-input",attrs:{"data-disabled":t.disabled,"data-empty":""===t.selected}},[n("select",t._g({ref:"input",staticClass:"k-select-input-native",attrs:{id:t.id,autofocus:t.autofocus,"aria-label":t.ariaLabel,disabled:t.disabled,name:t.name,required:t.required},domProps:{value:t.selected}},t.listeners),[t.hasEmptyOption?n("option",{attrs:{disabled:t.required,value:""}},[t._v(" "+t._s(t.emptyOption)+" ")]):t._e(),t._l(t.options,(function(e){return n("option",{key:e.value,attrs:{disabled:e.disabled},domProps:{value:e.value}},[t._v(" "+t._s(e.text)+" ")])}))],2),t._v(" "+t._s(t.label)+" ")])}),[],!1,ao,null,null,null);function ao(t){for(let e in oo)this[e]=oo[e]}var lo=function(){return ro.exports}();const uo={mixins:[ki],props:{allow:{type:String,default:""},formData:{type:Object,default:()=>({})},sync:{type:String}}},co={};var po=Rt({extends:$i,mixins:[uo],data(){return{slug:this.sluggify(this.value),slugs:this.$language?this.$language.rules:this.$system.slugs,syncValue:null}},watch:{formData:{handler(t){return!this.disabled&&(!(!this.sync||void 0===t[this.sync])&&(t[this.sync]!=this.syncValue&&(this.syncValue=t[this.sync],void this.onInput(this.sluggify(this.syncValue)))))},deep:!0,immediate:!0},value(t){(t=this.sluggify(t))!==this.slug&&(this.slug=t,this.$emit("input",this.slug))}},methods:{sluggify(t){return this.$helper.slug(t,[this.slugs,this.$system.ascii],this.allow)},onInput(t){this.slug=this.sluggify(t),this.$emit("input",this.slug)}}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("input",t._g(t._b({directives:[{name:"direction",rawName:"v-direction"}],ref:"input",staticClass:"k-text-input",attrs:{autocomplete:"off",spellcheck:"false",type:"text"},domProps:{value:t.slug}},"input",{autofocus:t.autofocus,disabled:t.disabled,id:t.id,minlength:t.minlength,name:t.name,pattern:t.pattern,placeholder:t.placeholder,required:t.required},!1),t.listeners))}),[],!1,ho,null,null,null);function ho(t){for(let e in co)this[e]=co[e]}var fo=function(){return po.exports}();const mo={mixins:[vn,yn,_n,Sn,Cn],props:{accept:{type:String,default:"all"},icon:{type:[String,Boolean],default:"tag"},layout:String,max:Number,min:Number,options:{type:Array,default:()=>[]},separator:{type:String,default:","},value:{type:Array,default:()=>[]}}},go={};var ko=Rt({mixins:[mo],inheritAttrs:!1,data(){return{tags:this.prepareTags(this.value),selected:null,newTag:null,tagOptions:this.options.map((t=>{var e;return(null==(e=this.icon)?void 0:e.length)>0&&(t.icon=this.icon),t}),this)}},computed:{dragOptions(){return{delay:1,disabled:!this.draggable,draggable:".k-tag"}},draggable(){return this.tags.length>1},skip(){return this.tags.map((t=>t.value))}},watch:{value(t){this.tags=this.prepareTags(t),this.onInvalid()}},mounted(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{addString(t){if(t)if((t=t.trim()).includes(this.separator))t.split(this.separator).forEach((t=>{this.addString(t)}));else if(0!==t.length)if("options"===this.accept){const e=this.options.filter((e=>e.text===t))[0];if(!e)return;this.addTag(e)}else this.addTag({text:t,value:t})},addTag(t){this.addTagToIndex(t),this.$refs.autocomplete.close(),this.$refs.input.focus()},addTagToIndex(t){if("options"===this.accept){if(!this.options.filter((e=>e.value===t.value))[0])return}-1===this.index(t)&&(!this.max||this.tags.length=this.tags.length)return;break;case"first":e=0;break;case"last":e=this.tags.length-1;break;default:e=t}let s=this.tags[e];if(s){let t=this.$refs[s.value];if(null==t?void 0:t[0])return{ref:t[0],tag:s,index:e}}return!1},index(t){return this.tags.findIndex((e=>e.value===t.value))},onInput(){this.$emit("input",this.tags)},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},leaveInput(t){0===t.target.selectionStart&&t.target.selectionStart===t.target.selectionEnd&&0!==this.tags.length&&(this.$refs.autocomplete.close(),this.navigate("last"),t.preventDefault())},navigate(t){var e=this.get(t);e?(e.ref.focus(),this.selectTag(e.tag)):"next"===t&&(this.$refs.input.focus(),this.selectTag(null))},prepareTags:t=>!1===Array.isArray(t)?[]:t.map((t=>"string"==typeof t?{text:t,value:t}:t)),remove(t){const e=this.get("prev"),n=this.get("next");this.tags.splice(this.index(t),1),this.onInput(),e?(this.selectTag(e.tag),e.ref.focus()):n?this.selectTag(n.tag):(this.selectTag(null),this.$refs.input.focus())},select(){this.focus()},selectTag(t){this.selected=t},tab(t){var e;(null==(e=this.newTag)?void 0:e.length)>0&&(t.preventDefault(),this.addString(this.newTag))},type(t){this.newTag=t,this.$refs.autocomplete.search(t)}},validations(){return{tags:{required:!this.required||K.required,minLength:!this.min||K.minLength(this.min),maxLength:!this.max||K.maxLength(this.max)}}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-draggable",{directives:[{name:"direction",rawName:"v-direction"}],ref:"box",staticClass:"k-tags-input",attrs:{list:t.tags,"data-layout":t.layout,options:t.dragOptions},on:{end:t.onInput},scopedSlots:t._u([{key:"footer",fn:function(){return[n("span",{staticClass:"k-tags-input-element"},[n("k-autocomplete",{ref:"autocomplete",attrs:{html:!0,options:t.options,skip:t.skip},on:{select:t.addTag,leave:function(e){return t.$refs.input.focus()}}},[n("input",{directives:[{name:"model",rawName:"v-model.trim",value:t.newTag,expression:"newTag",modifiers:{trim:!0}}],ref:"input",attrs:{id:t.id,autofocus:t.autofocus,disabled:t.disabled||t.max&&t.tags.length>=t.max,name:t.name,autocomplete:"off",type:"text"},domProps:{value:t.newTag},on:{input:[function(e){e.target.composing||(t.newTag=e.target.value.trim())},function(e){return t.type(e.target.value)}],blur:[t.blurInput,function(e){return t.$forceUpdate()}],keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"s",void 0,e.key,void 0)?null:e.metaKey?t.blurInput.apply(null,arguments):null},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])||"button"in e&&0!==e.button||e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.leaveInput.apply(null,arguments)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")||e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.enter.apply(null,arguments)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"tab",9,e.key,"Tab")||e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.tab.apply(null,arguments)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"backspace",void 0,e.key,void 0)||e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.leaveInput.apply(null,arguments)}]}})])],1)]},proxy:!0}])},t._l(t.tags,(function(e,s){return n("k-tag",{key:s,ref:e.value,refInFor:!0,attrs:{removable:!t.disabled,name:"tag"},on:{remove:function(n){return t.remove(e)}},nativeOn:{click:function(t){t.stopPropagation()},blur:function(e){return t.selectTag(null)},focus:function(n){return t.selectTag(e)},keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])||"button"in e&&0!==e.button?null:t.navigate("prev")},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"right",39,e.key,["Right","ArrowRight"])||"button"in e&&2!==e.button?null:t.navigate("next")}],dblclick:function(n){return t.edit(e)}}},[n("span",{domProps:{innerHTML:t._s(e.text)}})])})),1)}),[],!1,vo,null,null,null);function vo(t){for(let e in go)this[e]=go[e]}var bo=function(){return ko.exports}();const yo={mixins:[ki],props:{autocomplete:{type:String,default:"tel"},type:{type:String,default:"tel"}}};const $o={};var _o=Rt({extends:$i,mixins:[yo]},undefined,undefined,!1,wo,null,null,null);function wo(t){for(let e in $o)this[e]=$o[e]}var xo=function(){return _o.exports}();const So={mixins:[vn,yn,_n,Sn,Cn],props:{buttons:{type:[Boolean,Array],default:!0},endpoints:Object,font:String,maxlength:Number,minlength:Number,placeholder:String,preselect:Boolean,size:String,spellcheck:{type:[Boolean,String],default:"off"},theme:String,uploads:[Boolean,Object,Array],value:String}},Co={};var Oo=Rt({mixins:[So],inheritAttrs:!1,data:()=>({over:!1}),watch:{value(){this.onInvalid(),this.$nextTick((()=>{this.resize()}))}},mounted(){this.$nextTick((()=>{this.$library.autosize(this.$refs.input)})),this.onInvalid(),this.$props.autofocus&&this.focus(),this.$props.preselect&&this.select()},methods:{cancel(){this.$refs.input.focus()},dialog(t){if(!this.$refs[t+"Dialog"])throw"Invalid toolbar dialog";this.$refs[t+"Dialog"].open(this.$refs.input,this.selection())},focus(){this.$refs.input.focus()},insert(t){const e=this.$refs.input,n=e.value;setTimeout((()=>{if(e.focus(),document.execCommand("insertText",!1,t),e.value===n){const n=e.value.slice(0,e.selectionStart)+t+e.value.slice(e.selectionEnd);e.value=n,this.$emit("input",n)}})),this.resize()},insertFile(t){(null==t?void 0:t.length)>0&&this.insert(t.map((t=>t.dragText)).join("\n\n"))},insertUpload(t,e){this.insert(e.map((t=>t.dragText)).join("\n\n")),this.$events.$emit("model.update")},onClick(){this.$refs.toolbar&&this.$refs.toolbar.close()},onCommand(t,e){"function"==typeof this[t]?"function"==typeof e?this[t](e(this.$refs.input,this.selection())):this[t](e):window.console.warn(t+" is not a valid command")},onDrop(t){if(this.uploads&&this.$helper.isUploadEvent(t))return this.$refs.fileUpload.drop(t.dataTransfer.files,{url:this.$urls.api+"/"+this.endpoints.field+"/upload",multiple:!1});const e=this.$store.state.drag;"text"===(null==e?void 0:e.type)&&(this.focus(),this.insert(e.data))},onFocus(t){this.$emit("focus",t)},onInput(t){this.$emit("input",t.target.value)},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},onOut(){this.$refs.input.blur(),this.over=!1},onOver(t){if(this.uploads&&this.$helper.isUploadEvent(t))return t.dataTransfer.dropEffect="copy",this.focus(),void(this.over=!0);const e=this.$store.state.drag;"text"===(null==e?void 0:e.type)&&(t.dataTransfer.dropEffect="copy",this.focus(),this.over=!0)},onShortcut(t){!1!==this.buttons&&"Meta"!==t.key&&"Control"!==t.key&&this.$refs.toolbar&&this.$refs.toolbar.shortcut(t.key,t)},onSubmit(t){return this.$emit("submit",t)},prepend(t){this.insert(t+" "+this.selection())},resize(){this.$library.autosize.update(this.$refs.input)},select(){this.$refs.select()},selectFile(){this.$refs.fileDialog.open({endpoint:this.endpoints.field+"/files",multiple:!1})},selection(){const t=this.$refs.input,e=t.selectionStart,n=t.selectionEnd;return t.value.substring(e,n)},uploadFile(){this.$refs.fileUpload.open({url:this.$urls.api+"/"+this.endpoints.field+"/upload",multiple:!1})},wrap(t){this.insert(t+this.selection()+t)}},validations(){return{value:{required:!this.required||K.required,minLength:!this.minlength||K.minLength(this.minlength),maxLength:!this.maxlength||K.maxLength(this.maxlength)}}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-textarea-input",attrs:{"data-over":t.over,"data-size":t.size,"data-theme":t.theme}},[n("div",{staticClass:"k-textarea-input-wrapper"},[t.buttons&&!t.disabled?n("k-toolbar",{ref:"toolbar",attrs:{buttons:t.buttons,disabled:t.disabled,uploads:t.uploads},on:{command:t.onCommand},nativeOn:{mousedown:function(t){t.preventDefault()}}}):t._e(),n("textarea",t._b({directives:[{name:"direction",rawName:"v-direction"}],ref:"input",staticClass:"k-textarea-input-native",attrs:{"data-font":t.font},on:{click:t.onClick,focus:t.onFocus,input:t.onInput,keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:e.metaKey?t.onSubmit.apply(null,arguments):null},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:e.ctrlKey?t.onSubmit.apply(null,arguments):null},function(e){return e.metaKey?t.onShortcut.apply(null,arguments):null},function(e){return e.ctrlKey?t.onShortcut.apply(null,arguments):null}],dragover:t.onOver,dragleave:t.onOut,drop:t.onDrop}},"textarea",{autofocus:t.autofocus,disabled:t.disabled,id:t.id,minlength:t.minlength,name:t.name,placeholder:t.placeholder,required:t.required,spellcheck:t.spellcheck,value:t.value},!1))],1),n("k-toolbar-email-dialog",{ref:"emailDialog",on:{cancel:t.cancel,submit:function(e){return t.insert(e)}}}),n("k-toolbar-link-dialog",{ref:"linkDialog",on:{cancel:t.cancel,submit:function(e){return t.insert(e)}}}),n("k-files-dialog",{ref:"fileDialog",on:{cancel:t.cancel,submit:function(e){return t.insertFile(e)}}}),t.uploads?n("k-upload",{ref:"fileUpload",on:{success:t.insertUpload}}):t._e()],1)}),[],!1,Eo,null,null,null);function Eo(t){for(let e in Co)this[e]=Co[e]}var To=function(){return Oo.exports}();const Ao={props:{display:{type:String,default:"HH:mm"},max:String,min:String,step:{type:Object,default:()=>({size:5,unit:"minute"})},type:{type:String,default:"time"},value:String}};const Mo={};var Io=Rt({mixins:[gi,Ao],computed:{inputType:()=>"time"}},undefined,undefined,!1,Lo,null,null,null);function Lo(t){for(let e in Mo)this[e]=Mo[e]}var jo=function(){return Io.exports}();const Do={props:{autofocus:Boolean,disabled:Boolean,id:[Number,String],text:{type:[Array,String]},required:Boolean,value:Boolean}},Bo={};var Po=Rt({mixins:[Do],inheritAttrs:!1,computed:{label(){const t=this.text||[this.$t("off"),this.$t("on")];return Array.isArray(t)?this.value?t[1]:t[0]:t}},watch:{value(){this.onInvalid()}},mounted(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus(){this.$refs.input.focus()},onEnter(t){"Enter"===t.key&&this.$refs.input.click()},onInput(t){this.$emit("input",t)},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},select(){this.$refs.input.focus()}},validations(){return{value:{required:!this.required||K.required}}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("label",{staticClass:"k-toggle-input",attrs:{"data-disabled":t.disabled}},[n("input",{ref:"input",staticClass:"k-toggle-input-native",attrs:{id:t.id,disabled:t.disabled,type:"checkbox"},domProps:{checked:t.value},on:{change:function(e){return t.onInput(e.target.checked)}}}),n("span",{staticClass:"k-toggle-input-label",domProps:{innerHTML:t._s(t.label)}})])}),[],!1,No,null,null,null);function No(t){for(let e in Bo)this[e]=Bo[e]}var qo=function(){return Po.exports}();const Ro={mixins:[ki],props:{autocomplete:{type:String,default:"url"},type:{type:String,default:"url"}}};const Fo={};var zo=Rt({extends:$i,mixins:[Ro]},undefined,undefined,!1,Yo,null,null,null);function Yo(t){for(let e in Fo)this[e]=Fo[e]}var Ho=function(){return zo.exports}();const Uo={mixins:[On],inheritAttrs:!1,props:{autofocus:Boolean,empty:String,fieldsets:Object,fieldsetGroups:Object,group:String,max:{type:Number,default:null},value:{type:Array,default:()=>[]}},data:()=>({opened:[]}),computed:{hasFieldsets(){return Object.keys(this.fieldsets).length},isEmpty(){return 0===this.value.length},isFull(){return null!==this.max&&this.value.length>=this.max}},methods:{focus(){this.$refs.blocks.focus()}}},Ko={};var Jo=Rt(Uo,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-blocks-field",scopedSlots:t._u([{key:"options",fn:function(){return[t.hasFieldsets?n("k-dropdown",[n("k-button",{attrs:{icon:"dots"},on:{click:function(e){return t.$refs.options.toggle()}}}),n("k-dropdown-content",{ref:"options",attrs:{align:"right"}},[n("k-dropdown-item",{attrs:{disabled:t.isFull,icon:"add"},on:{click:function(e){return t.$refs.blocks.choose(t.value.length)}}},[t._v(" "+t._s(t.$t("add"))+" ")]),n("hr"),n("k-dropdown-item",{attrs:{disabled:t.isEmpty,icon:"template"},on:{click:function(e){return t.$refs.blocks.copyAll()}}},[t._v(" "+t._s(t.$t("copy.all"))+" ")]),n("k-dropdown-item",{attrs:{disabled:t.isFull,icon:"download"},on:{click:function(e){return t.$refs.blocks.pasteboard()}}},[t._v(" "+t._s(t.$t("paste"))+" ")]),n("hr"),n("k-dropdown-item",{attrs:{disabled:t.isEmpty,icon:"trash"},on:{click:function(e){return t.$refs.blocks.confirmToRemoveAll()}}},[t._v(" "+t._s(t.$t("delete.all"))+" ")])],1)],1):t._e()]},proxy:!0}])},"k-field",t.$props,!1),[n("k-blocks",t._g({ref:"blocks",attrs:{autofocus:t.autofocus,compact:!1,empty:t.empty,endpoints:t.endpoints,fieldsets:t.fieldsets,"fieldset-groups":t.fieldsetGroups,group:t.group,max:t.max,value:t.value},on:{close:function(e){t.opened=e},open:function(e){t.opened=e}}},t.$listeners))],1)}),[],!1,Go,null,null,null);function Go(t){for(let e in Ko)this[e]=Ko[e]}var Vo=function(){return Jo.exports}(),Wo={props:{counter:{type:Boolean,default:!0}},computed:{counterOptions(){var t,e;if(null===this.value||this.disabled||!1===this.counter)return!1;let n=0;return this.value&&(n=Array.isArray(this.value)?this.value.length:String(this.value).length),{count:n,min:null!=(t=this.min)?t:this.minlength,max:null!=(e=this.max)?e:this.maxlength}}}};const Xo={};var Zo=Rt({mixins:[On,Pn,ai,Wo],inheritAttrs:!1,methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-checkboxes-field",attrs:{counter:t.counterOptions}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"checkboxes"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,Qo,null,null,null);function Qo(t){for(let e in Xo)this[e]=Xo[e]}var tr=function(){return Zo.exports}();const er={mixins:[On,Pn,pi],inheritAttrs:!1,props:{calendar:{type:Boolean,default:!0},icon:{type:String,default:"calendar"},time:{type:[Boolean,Object],default:()=>({})},times:{type:Boolean,default:!0}},data(){return{isInvalid:!1,iso:this.toIso(this.value)}},computed:{isEmpty(){return this.time?null===this.iso.date&&this.iso.time:null===this.iso.date}},watch:{value(t,e){t!==e&&(this.iso=this.toIso(t))}},methods:{focus(){this.$refs.dateInput.focus()},now(){const t=this.$library.dayjs();return{date:t.toISO("date"),time:this.time?t.toISO("time"):"00:00:00"}},onInput(){if(this.isEmpty)return this.$emit("input","");const t=this.$library.dayjs.iso(this.iso.date+" "+this.iso.time);(t||null!==this.iso.date&&null!==this.iso.time)&&this.$emit("input",(null==t?void 0:t.toISO())||"")},onCalendarInput(t){var e;null==(e=this.$refs.calendar)||e.close(),this.onDateInput(t)},onDateInput(t){t&&!this.iso.time&&(this.iso.time=this.now().time),this.iso.date=t,this.onInput()},onDateInvalid(t){this.isInvalid=t},onTimeInput(t){t&&!this.iso.date&&(this.iso.date=this.now().date),this.iso.time=t,this.onInput()},onTimesInput(t){var e;null==(e=this.$refs.times)||e.close(),this.onTimeInput(t+":00")},toIso(t){const e=this.$library.dayjs.iso(t);return{date:(null==e?void 0:e.toISO("date"))||null,time:(null==e?void 0:e.toISO("time"))||null}}}},nr={};var sr=Rt(er,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-date-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[n("div",{ref:"body",staticClass:"k-date-field-body",attrs:{"data-invalid":!t.novalidate&&t.isInvalid,"data-theme":"field"}},[n("k-input",t._b({ref:"dateInput",attrs:{id:t._uid,autofocus:t.autofocus,disabled:t.disabled,display:t.display,max:t.max,min:t.min,required:t.required,value:t.value,theme:"field",type:"date"},on:{invalid:t.onDateInvalid,input:t.onDateInput,submit:function(e){return t.$emit("submit")}},scopedSlots:t._u([t.calendar?{key:"icon",fn:function(){return[n("k-dropdown",[n("k-button",{staticClass:"k-input-icon-button",attrs:{icon:t.icon,tooltip:t.$t("date.select")},on:{click:function(e){return t.$refs.calendar.toggle()}}}),n("k-dropdown-content",{ref:"calendar",attrs:{align:"right"}},[n("k-calendar",{attrs:{value:t.value,min:t.min,max:t.max},on:{input:t.onCalendarInput}})],1)],1)]},proxy:!0}:null],null,!0)},"k-input",t.$props,!1)),t.time?n("k-input",{ref:"timeInput",attrs:{disabled:t.disabled,display:t.time.display,required:t.required,step:t.time.step,value:t.iso.time,icon:t.time.icon,theme:"field",type:"time"},on:{input:t.onTimeInput,submit:function(e){return t.$emit("submit")}},scopedSlots:t._u([t.times?{key:"icon",fn:function(){return[n("k-dropdown",[n("k-button",{staticClass:"k-input-icon-button",attrs:{icon:t.time.icon||"clock",tooltip:t.$t("time.select")},on:{click:function(e){return t.$refs.times.toggle()}}}),n("k-dropdown-content",{ref:"times",attrs:{align:"right"}},[n("k-times",{attrs:{display:t.time.display,value:t.value},on:{input:t.onTimesInput}})],1)],1)]},proxy:!0}:null],null,!0)}):t._e()],1)])}),[],!1,ir,null,null,null);function ir(t){for(let e in nr)this[e]=nr[e]}var or=function(){return sr.exports}();const rr={mixins:[On,Pn,_i],inheritAttrs:!1,props:{link:{type:Boolean,default:!0},icon:{type:String,default:"email"}},computed:{mailto(){var t;return(null==(t=this.value)?void 0:t.length)>0?"mailto:"+this.value:null}},methods:{focus(){this.$refs.input.focus()}}},ar={};var lr=Rt(rr,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-email-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"email"},scopedSlots:t._u([{key:"icon",fn:function(){return[t.link?n("k-button",{staticClass:"k-input-icon-button",attrs:{icon:t.icon,link:t.mailto,tooltip:t.$t("open"),tabindex:"-1",target:"_blank"}}):t._e()]},proxy:!0}])},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,ur,null,null,null);function ur(t){for(let e in ar)this[e]=ar[e]}var cr=function(){return lr.exports}(),dr={mixins:[On],inheritAttrs:!1,props:{empty:String,info:String,link:Boolean,layout:{type:String,default:"list"},max:Number,multiple:Boolean,parent:String,search:Boolean,size:String,text:String,value:{type:Array,default:()=>[]}},data(){return{selected:this.value}},computed:{btnIcon(){return!this.multiple&&this.selected.length>0?"refresh":"add"},btnLabel(){return!this.multiple&&this.selected.length>0?this.$t("change"):this.$t("add")},isInvalid(){return!(!this.required||0!==this.selected.length)||(!!(this.min&&this.selected.lengththis.max))},items(){return this.models.map(this.item)},more(){return!this.max||this.max>this.selected.length}},watch:{value(t){this.selected=t}},methods:{focus(){},item:t=>t,onInput(){this.$emit("input",this.selected)},open(){if(this.disabled)return!1;this.$refs.selector.open({endpoint:this.endpoints.field,max:this.max,multiple:this.multiple,search:this.search,selected:this.selected.map((t=>t.id))})},remove(t){this.selected.splice(t,1),this.onInput()},removeById(t){this.selected=this.selected.filter((e=>e.id!==t)),this.onInput()},select(t){0!==t.length?(this.selected=this.selected.filter((e=>t.filter((t=>t.id===e.id)).length>0)),t.forEach((t=>{0===this.selected.filter((e=>t.id===e.id)).length&&this.selected.push(t)})),this.onInput()):this.selected=[]}}};const pr={mixins:[dr],props:{uploads:[Boolean,Object,Array]},computed:{moreUpload(){return!this.disabled&&this.more&&this.uploads},options(){return this.uploads?{icon:this.btnIcon,text:this.btnLabel,options:[{icon:"check",text:this.$t("select"),click:"open"},{icon:"upload",text:this.$t("upload"),click:"upload"}]}:{options:[{icon:"check",text:this.$t("select"),click:()=>this.open()}]}},uploadParams(){return{accept:this.uploads.accept,max:this.max,multiple:this.multiple,url:this.$urls.api+"/"+this.endpoints.field+"/upload"}}},created(){this.$events.$on("file.delete",this.removeById)},destroyed(){this.$events.$off("file.delete",this.removeById)},methods:{drop(t){return!1!==this.uploads&&this.$refs.fileUpload.drop(t,this.uploadParams)},prompt(t){if(t.stopPropagation(),this.disabled)return!1;this.moreUpload?this.$refs.options.toggle():this.open()},onAction(t){if(this.moreUpload)switch(t){case"open":return this.open();case"upload":return this.$refs.fileUpload.open(this.uploadParams)}},isSelected(t){return this.selected.find((e=>e.id===t.id))},upload(t,e){!1===this.multiple&&(this.selected=[]),e.forEach((t=>{this.isSelected(t)||this.selected.push(t)})),this.onInput(),this.$events.$emit("model.update")}}},hr={};var fr=Rt(pr,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-files-field",scopedSlots:t._u([t.more&&!t.disabled?{key:"options",fn:function(){return[n("k-button-group",{staticClass:"k-field-options"},[n("k-options-dropdown",t._b({ref:"options",on:{action:t.onAction}},"k-options-dropdown",t.options,!1))],1)]},proxy:!0}:null],null,!0)},"k-field",t.$props,!1),[n("k-dropzone",{attrs:{disabled:!t.moreUpload},on:{drop:t.drop}},[t.selected.length?[n("k-items",{attrs:{items:t.selected,layout:t.layout,link:t.link,size:t.size,sortable:!t.disabled&&t.selected.length>1},on:{sort:t.onInput,sortChange:function(e){return t.$emit("change",e)}},scopedSlots:t._u([{key:"options",fn:function(e){var s=e.index;return[t.disabled?t._e():n("k-button",{attrs:{tooltip:t.$t("remove"),icon:"remove"},on:{click:function(e){return t.remove(s)}}})]}}],null,!1,1805525116)})]:n("k-empty",{attrs:{layout:t.layout,"data-invalid":t.isInvalid,icon:"image"},on:{click:t.prompt}},[t._v(" "+t._s(t.empty||t.$t("field.files.empty"))+" ")])],2),n("k-files-dialog",{ref:"selector",on:{submit:t.select}}),n("k-upload",{ref:"fileUpload",on:{success:t.upload}})],1)}),[],!1,mr,null,null,null);function mr(t){for(let e in hr)this[e]=hr[e]}var gr=function(){return fr.exports}();const kr={};var vr=Rt({},(function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"k-field k-gap-field"})}),[],!1,br,null,null,null);function br(t){for(let e in kr)this[e]=kr[e]}var yr=function(){return vr.exports}();const $r={mixins:[$n,xn],props:{numbered:Boolean}},_r={};var wr=Rt($r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-headline-field"},[n("k-headline",{attrs:{"data-numbered":t.numbered,size:"large"}},[t._v(" "+t._s(t.label)+" ")]),t.help?n("footer",{staticClass:"k-field-footer"},[t.help?n("k-text",{staticClass:"k-field-help",attrs:{theme:"help"},domProps:{innerHTML:t._s(t.help)}}):t._e()],1):t._e()],1)}),[],!1,xr,null,null,null);function xr(t){for(let e in _r)this[e]=_r[e]}var Sr=function(){return wr.exports}();const Cr={};var Or=Rt({mixins:[$n,xn],props:{text:String,theme:{type:String,default:"info"}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-field k-info-field"},[n("k-headline",[t._v(t._s(t.label))]),n("k-box",{attrs:{theme:t.theme}},[n("k-text",{domProps:{innerHTML:t._s(t.text)}})],1),t.help?n("footer",{staticClass:"k-field-footer"},[t.help?n("k-text",{staticClass:"k-field-help",attrs:{theme:"help"},domProps:{innerHTML:t._s(t.help)}}):t._e()],1):t._e()],1)}),[],!1,Er,null,null,null);function Er(t){for(let e in Cr)this[e]=Cr[e]}var Tr=function(){return Or.exports}();const Ar={props:{blocks:Array,endpoints:Object,fieldsetGroups:Object,fieldsets:Object,id:String,isSelected:Boolean,width:String}},Mr={};var Ir=Rt(Ar,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-column k-layout-column",attrs:{id:t.id,"data-width":t.width,tabindex:"0"},on:{dblclick:function(e){return t.$refs.blocks.choose(t.blocks.length)}}},[n("k-blocks",{ref:"blocks",attrs:{endpoints:t.endpoints,"fieldset-groups":t.fieldsetGroups,fieldsets:t.fieldsets,value:t.blocks,group:"layout"},on:{input:function(e){return t.$emit("input",e)}},nativeOn:{dblclick:function(t){t.stopPropagation()}}})],1)}),[],!1,Lr,null,null,null);function Lr(t){for(let e in Mr)this[e]=Mr[e]}const jr={components:{"k-layout-column":function(){return Ir.exports}()},props:{attrs:[Array,Object],columns:Array,disabled:Boolean,endpoints:Object,fieldsetGroups:Object,fieldsets:Object,id:String,isSelected:Boolean,settings:Object},computed:{tabs(){let t=this.settings.tabs;return Object.entries(t).forEach((([e,n])=>{Object.entries(n.fields).forEach((([n])=>{t[e].fields[n].endpoints={field:this.endpoints.field+"/fields/"+n,section:this.endpoints.section,model:this.endpoints.model}}))})),t}}},Dr={};var Br=Rt(jr,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("section",{staticClass:"k-layout",attrs:{"data-selected":t.isSelected,tabindex:"0"},on:{click:function(e){return t.$emit("select")}}},[n("k-grid",{staticClass:"k-layout-columns"},t._l(t.columns,(function(e,s){return n("k-layout-column",t._b({key:e.id,attrs:{endpoints:t.endpoints,"fieldset-groups":t.fieldsetGroups,fieldsets:t.fieldsets},on:{input:function(n){return t.$emit("updateColumn",{column:e,columnIndex:s,blocks:n})}}},"k-layout-column",e,!1))})),1),t.disabled?t._e():n("nav",{staticClass:"k-layout-toolbar"},[t.settings?n("k-button",{staticClass:"k-layout-toolbar-button",attrs:{tooltip:t.$t("settings"),icon:"settings"},on:{click:function(e){return t.$refs.drawer.open()}}}):t._e(),n("k-dropdown",[n("k-button",{staticClass:"k-layout-toolbar-button",attrs:{icon:"angle-down"},on:{click:function(e){return t.$refs.options.toggle()}}}),n("k-dropdown-content",{ref:"options",attrs:{align:"right"}},[n("k-dropdown-item",{attrs:{icon:"angle-up"},on:{click:function(e){return t.$emit("prepend")}}},[t._v(" "+t._s(t.$t("insert.before"))+" ")]),n("k-dropdown-item",{attrs:{icon:"angle-down"},on:{click:function(e){return t.$emit("append")}}},[t._v(" "+t._s(t.$t("insert.after"))+" ")]),n("hr"),t.settings?n("k-dropdown-item",{attrs:{icon:"settings"},on:{click:function(e){return t.$refs.drawer.open()}}},[t._v(" "+t._s(t.$t("settings"))+" ")]):t._e(),n("k-dropdown-item",{attrs:{icon:"copy"},on:{click:function(e){return t.$emit("duplicate")}}},[t._v(" "+t._s(t.$t("duplicate"))+" ")]),n("hr"),n("k-dropdown-item",{attrs:{icon:"trash"},on:{click:function(e){return t.$refs.confirmRemoveDialog.open()}}},[t._v(" "+t._s(t.$t("field.layout.delete"))+" ")])],1)],1),n("k-sort-handle")],1),t.settings?n("k-form-drawer",{ref:"drawer",staticClass:"k-layout-drawer",attrs:{tabs:t.tabs,title:t.$t("settings"),value:t.attrs,icon:"settings"},on:{input:function(e){return t.$emit("updateAttrs",e)}}}):t._e(),n("k-remove-dialog",{ref:"confirmRemoveDialog",attrs:{text:t.$t("field.layout.delete.confirm")},on:{submit:function(e){return t.$emit("remove")}}})],1)}),[],!1,Pr,null,null,null);function Pr(t){for(let e in Dr)this[e]=Dr[e]}var Nr=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[t.rows.length?[n("k-draggable",t._b({staticClass:"k-layouts",on:{sort:t.save}},"k-draggable",t.draggableOptions,!1),t._l(t.rows,(function(e,s){return n("k-layout",t._b({key:e.id,attrs:{disabled:t.disabled,endpoints:t.endpoints,"fieldset-groups":t.fieldsetGroups,fieldsets:t.fieldsets,"is-selected":t.selected===e.id,settings:t.settings},on:{append:function(e){return t.selectLayout(s+1)},duplicate:function(n){return t.duplicateLayout(s,e)},prepend:function(e){return t.selectLayout(s)},remove:function(n){return t.removeLayout(e)},select:function(n){t.selected=e.id},updateAttrs:function(e){return t.updateAttrs(s,e)},updateColumn:function(n){return t.updateColumn(Object.assign({},{layout:e,layoutIndex:s},n))}}},"k-layout",e,!1))})),1),t.disabled?t._e():n("k-button",{staticClass:"k-layout-add-button",attrs:{icon:"add"},on:{click:function(e){return t.selectLayout(t.rows.length)}}})]:[n("k-empty",{staticClass:"k-layout-empty",attrs:{icon:"dashboard"},on:{click:function(e){return t.selectLayout(0)}}},[t._v(" "+t._s(t.empty||t.$t("field.layout.empty"))+" ")])],n("k-dialog",{ref:"selector",staticClass:"k-layout-selector",attrs:{"cancel-button":!1,"submit-button":!1,size:"medium"}},[n("k-headline",[t._v(t._s(t.$t("field.layout.select")))]),n("ul",t._l(t.layouts,(function(e,s){return n("li",{key:s,staticClass:"k-layout-selector-option"},[n("k-grid",{nativeOn:{click:function(n){return t.addLayout(e)}}},t._l(e,(function(t,e){return n("k-column",{key:e,attrs:{width:t}})})),1)],1)})),0)],1)],2)};const qr={components:{"k-layout":function(){return Br.exports}()},props:{disabled:Boolean,empty:String,endpoints:Object,fieldsetGroups:Object,fieldsets:Object,layouts:Array,max:Number,settings:Object,value:Array},data(){return{currentLayout:null,nextIndex:null,rows:this.value,selected:null}},computed:{draggableOptions(){return{id:this._uid,handle:!0,list:this.rows}}},watch:{value(){this.rows=this.value}},methods:{async addLayout(t){let e=await this.$api.post(this.endpoints.field+"/layout",{columns:t});this.rows.splice(this.nextIndex,0,e),this.layouts.length>1&&this.$refs.selector.close(),this.save()},duplicateLayout(t,e){let n=l(a({},this.$helper.clone(e)),{id:this.$helper.uuid()});n.columns=n.columns.map((t=>(t.id=this.$helper.uuid(),t.blocks=t.blocks.map((t=>(t.id=this.$helper.uuid(),t))),t))),this.rows.splice(t+1,0,n),this.save()},removeLayout(t){const e=this.rows.findIndex((e=>e.id===t.id));-1!==e&&this.$delete(this.rows,e),this.save()},save(){this.$emit("input",this.rows)},selectLayout(t){this.nextIndex=t,1!==this.layouts.length?this.$refs.selector.open():this.addLayout(this.layouts[0])},updateColumn(t){this.rows[t.layoutIndex].columns[t.columnIndex].blocks=t.blocks,this.save()},updateAttrs(t,e){this.rows[t].attrs=e,this.save()}}},Rr={};var Fr=Rt(qr,Nr,[],!1,zr,null,null,null);function zr(t){for(let e in Rr)this[e]=Rr[e]}const Yr={};var Hr=Rt({components:{"k-block-layouts":function(){return Fr.exports}()},mixins:[On],inheritAttrs:!1,props:{empty:String,fieldsetGroups:Object,fieldsets:Object,layouts:{type:Array,default:()=>[["1/1"]]},settings:Object,value:{type:Array,default:()=>[]}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-layout-field"},"k-field",t.$props,!1),[n("k-block-layouts",t._b({on:{input:function(e){return t.$emit("input",e)}}},"k-block-layouts",t.$props,!1))],1)}),[],!1,Ur,null,null,null);function Ur(t){for(let e in Yr)this[e]=Yr[e]}var Kr=function(){return Hr.exports}();const Jr={};var Gr=Rt({},(function(){var t=this.$createElement;return(this._self._c||t)("hr",{staticClass:"k-line-field"})}),[],!1,Vr,null,null,null);function Vr(t){for(let e in Jr)this[e]=Jr[e]}var Wr=function(){return Gr.exports}();const Xr={mixins:[On,Pn],inheritAttrs:!1,props:{marks:[Array,Boolean],value:String},methods:{focus(){this.$refs.input.focus()}}},Zr={};var Qr=Rt(Xr,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-list-field",attrs:{input:t._uid,counter:!1}},"k-field",t.$props,!1),[n("k-input",t._b({ref:"input",attrs:{id:t._uid,marks:t.marks,value:t.value,type:"list",theme:"field"},on:{input:function(e){return t.$emit("input",e)}}},"k-input",t.$props,!1))],1)}),[],!1,ta,null,null,null);function ta(t){for(let e in Zr)this[e]=Zr[e]}var ea=function(){return Qr.exports}();const na={};var sa=Rt({mixins:[On,Pn,Li,Wo],inheritAttrs:!1,props:{icon:{type:String,default:"angle-down"}},mounted(){this.$refs.input.$el.setAttribute("tabindex",0)},methods:{blur(t){this.$refs.input.blur(t)},focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-multiselect-field",attrs:{input:t._uid,counter:t.counterOptions},on:{blur:t.blur},nativeOn:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:(e.preventDefault(),t.focus.apply(null,arguments))}}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"multiselect"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,ia,null,null,null);function ia(t){for(let e in na)this[e]=na[e]}var oa=function(){return sa.exports}();const ra={};var aa=Rt({mixins:[On,Pn,Ni],inheritAttrs:!1,methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-number-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"number"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,la,null,null,null);function la(t){for(let e in ra)this[e]=ra[e]}var ua=function(){return aa.exports}();const ca={};var da=Rt({mixins:[dr]},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-pages-field",scopedSlots:t._u([{key:"options",fn:function(){return[n("k-button-group",{staticClass:"k-field-options"},[t.more&&!t.disabled?n("k-button",{staticClass:"k-field-options-button",attrs:{icon:t.btnIcon,text:t.btnLabel},on:{click:t.open}}):t._e()],1)]},proxy:!0}])},"k-field",t.$props,!1),[t.selected.length?[n("k-items",{attrs:{items:t.selected,layout:t.layout,link:t.link,size:t.size,sortable:!t.disabled&&t.selected.length>1},on:{sort:t.onInput,sortChange:function(e){return t.$emit("change",e)}},scopedSlots:t._u([{key:"options",fn:function(e){var s=e.index;return[t.disabled?t._e():n("k-button",{attrs:{tooltip:t.$t("remove"),icon:"remove"},on:{click:function(e){return t.remove(s)}}})]}}],null,!1,1805525116)})]:n("k-empty",{attrs:{layout:t.layout,"data-invalid":t.isInvalid,icon:"page"},on:{click:t.open}},[t._v(" "+t._s(t.empty||t.$t("field.pages.empty"))+" ")]),n("k-pages-dialog",{ref:"selector",on:{submit:t.select}})],2)}),[],!1,pa,null,null,null);function pa(t){for(let e in ca)this[e]=ca[e]}var ha=function(){return da.exports}();const fa={};var ma=Rt({mixins:[On,Pn,Yi,Wo],inheritAttrs:!1,props:{minlength:{type:Number,default:8},icon:{type:String,default:"key"}},methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-password-field",attrs:{input:t._uid,counter:t.counterOptions},scopedSlots:t._u([{key:"options",fn:function(){return[t._t("options")]},proxy:!0}],null,!0)},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"password"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,ga,null,null,null);function ga(t){for(let e in fa)this[e]=fa[e]}var ka=function(){return ma.exports}();const va={};var ba=Rt({mixins:[On,Pn,Gi],inheritAttrs:!1,methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-radio-field"},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"radio"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,ya,null,null,null);function ya(t){for(let e in va)this[e]=va[e]}var $a=function(){return ba.exports}();const _a={};var wa=Rt({mixins:[Pn,On,Qi],inheritAttrs:!1,methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-range-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"range"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,xa,null,null,null);function xa(t){for(let e in _a)this[e]=_a[e]}var Sa=function(){return wa.exports}();const Ca={};var Oa=Rt({mixins:[On,Pn,io],inheritAttrs:!1,props:{icon:{type:String,default:"angle-down"}},methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-select-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"select"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,Ea,null,null,null);function Ea(t){for(let e in Ca)this[e]=Ca[e]}var Ta=function(){return Oa.exports}();const Aa={mixins:[On,Pn,uo],inheritAttrs:!1,props:{icon:{type:String,default:"url"},path:{type:String},wizard:{type:[Boolean,Object],default:!1}},data(){return{slug:this.value}},computed:{preview(){return void 0!==this.help?this.help:void 0!==this.path?this.path+this.value:null}},watch:{value(){this.slug=this.value}},methods:{focus(){this.$refs.input.focus()},onWizard(){var t;this.formData[null==(t=this.wizard)?void 0:t.field]&&(this.slug=this.formData[this.wizard.field])}}},Ma={};var Ia=Rt(Aa,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-slug-field",attrs:{input:t._uid,help:t.preview},scopedSlots:t._u([t.wizard&&t.wizard.text?{key:"options",fn:function(){return[n("k-button",{attrs:{text:t.wizard.text,icon:"wand"},on:{click:t.onWizard}})]},proxy:!0}:null],null,!0)},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,value:t.slug,theme:"field",type:"slug"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,La,null,null,null);function La(t){for(let e in Ma)this[e]=Ma[e]}var ja=function(){return Ia.exports}(),Da={mixins:[On],methods:{columnIsEmpty:t=>null==t||""===t||("object"==typeof t&&0===Object.keys(t).length&&t.constructor===Object||void 0!==t.length&&0===t.length),displayText(t,e){switch(t.type){case"user":return e.email;case"date":{const n=this.$library.dayjs(e),s=!0===t.time?"YYYY-MM-DD HH:mm":"YYYY-MM-DD";return n.isValid()?n.format(s):""}case"tags":case"multiselect":return e.map((t=>t.text)).join(", ");case"checkboxes":return e.map((e=>{let n=e;return t.options.forEach((t=>{t.value===e&&(n=t.text)})),n})).join(", ");case"radio":case"select":{const n=t.options.filter((t=>t.value===e))[0];return n?n.text:null}}return"object"==typeof e&&null!==e?"…":null==e?void 0:e.toString()},previewExists(t){return this.$helper.isComponent(`k-${t}-field-preview`)},width(t){return t?this.$helper.ratio(t,"auto",!1):"auto"}}};const Ba={mixins:[Da],inheritAttrs:!1,props:{columns:Object,duplicate:{type:Boolean,default:!0},empty:String,fields:Object,limit:Number,max:Number,min:Number,prepend:{type:Boolean,default:!1},sortable:{type:Boolean,default:!0},sortBy:String,value:{type:Array,default:()=>[]}},data(){return{autofocus:null,items:this.makeItems(this.value),currentIndex:null,currentModel:null,trash:null,page:1}},computed:{dragOptions(){return{disabled:!this.isSortable,fallbackClass:"k-sortable-row-fallback"}},formFields(){let t={};return Object.keys(this.fields).forEach((e=>{let n=this.fields[e];n.section=this.name,n.endpoints={field:this.endpoints.field+"+"+e,section:this.endpoints.section,model:this.endpoints.model},null===this.autofocus&&!0===n.autofocus&&(this.autofocus=e),t[e]=n})),t},more(){return!0!==this.disabled&&!(this.max&&this.items.length>=this.max)},isInvalid(){return!0!==this.disabled&&(!!(this.min&&this.items.lengththis.max))},isSortable(){return!this.sortBy&&(!this.limit&&(!0!==this.disabled&&(!(this.items.length<=1)&&!1!==this.sortable)))},pagination(){let t=0;return this.limit&&(t=(this.page-1)*this.limit),{page:this.page,offset:t,limit:this.limit,total:this.items.length,align:"center",details:!0}},paginatedItems(){return this.limit?this.items.slice(this.pagination.offset,this.pagination.offset+this.limit):this.items}},watch:{value(t){t!=this.items&&(this.items=this.makeItems(t))}},methods:{add(){if(!0===this.disabled)return!1;if(null!==this.currentIndex)return this.escape(),!1;let t={};Object.keys(this.fields).forEach((e=>{const n=this.fields[e];null!==n.default?t[e]=this.$helper.clone(n.default):t[e]=null})),this.currentIndex="new",this.currentModel=t,this.createForm()},addItem(t){!0===this.prepend?this.items.unshift(t):this.items.push(t)},beforePaginate(){return this.save(this.currentModel)},close(){this.currentIndex=null,this.currentModel=null,this.$events.$off("keydown.esc",this.escape),this.$events.$off("keydown.cmd.s",this.submit),this.$store.dispatch("content/enable")},confirmRemove(t){this.close(),this.trash=t+this.pagination.offset,this.$refs.remove.open()},createForm(t){this.$events.$on("keydown.esc",this.escape),this.$events.$on("keydown.cmd.s",this.submit),this.$store.dispatch("content/disable"),this.$nextTick((()=>{var e;null==(e=this.$refs.form)||e.focus(t||this.autofocus)}))},duplicateItem(t){this.addItem(this.items[t+this.pagination.offset]),this.onInput()},escape(){if("new"===this.currentIndex){let t=Object.values(this.currentModel),e=!0;if(t.forEach((t=>{!1===this.columnIsEmpty(t)&&(e=!1)})),!0===e)return void this.close()}this.submit()},focus(){var t,e;null==(e=null==(t=this.$refs.add)?void 0:t.focus)||e.call(t)},indexOf(t){return this.limit?(this.page-1)*this.limit+t+1:t+1},isActive(t){return this.currentIndex===t},jump(t,e){this.open(t+this.pagination.offset,e)},makeItems(t){return!1===Array.isArray(t)?[]:this.sort(t)},onInput(){this.$emit("input",this.items)},open(t,e){this.currentIndex=t,this.currentModel=this.$helper.clone(this.items[t]),this.createForm(e)},paginate(t){this.open(t.offset)},paginateItems(t){this.page=t.page},remove(){if(null===this.trash)return!1;this.items.splice(this.trash,1),this.trash=null,this.$refs.remove.close(),this.onInput(),0===this.paginatedItems.length&&this.page>1&&this.page--,this.items=this.sort(this.items)},sort(t){return this.sortBy?t.sortBy(this.sortBy):t},async save(){if(null!==this.currentIndex&&void 0!==this.currentIndex)try{return await this.validate(this.currentModel),"new"===this.currentIndex?this.addItem(this.currentModel):this.items[this.currentIndex]=this.currentModel,this.items=this.sort(this.items),this.onInput(),!0}catch(t){throw this.$store.dispatch("notification/error",{message:this.$t("error.form.incomplete"),details:t}),t}},async submit(){try{await this.save(),this.close()}catch(t){}},async validate(t){const e=await this.$api.post(this.endpoints.field+"/validate",t);if(e.length>0)throw e;return!0},update(t,e,n){this.items[t][e]=n,this.onInput()}}},Pa={};var Na=Rt(Ba,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-structure-field",nativeOn:{click:function(t){t.stopPropagation()}},scopedSlots:t._u([{key:"options",fn:function(){return[t.more&&null===t.currentIndex?n("k-button",{ref:"add",attrs:{id:t._uid,text:t.$t("add"),icon:"add"},on:{click:t.add}}):t._e()]},proxy:!0}])},"k-field",t.$props,!1),[null!==t.currentIndex?[n("div",{staticClass:"k-structure-backdrop",on:{click:t.escape}}),n("section",{staticClass:"k-structure-form"},[n("k-form",{ref:"form",staticClass:"k-structure-form-fields",attrs:{fields:t.formFields},on:{input:t.onInput,submit:t.submit},model:{value:t.currentModel,callback:function(e){t.currentModel=e},expression:"currentModel"}}),n("footer",{staticClass:"k-structure-form-buttons"},[n("k-button",{staticClass:"k-structure-form-cancel-button",attrs:{text:t.$t("cancel"),icon:"cancel"},on:{click:t.close}}),"new"!==t.currentIndex?n("k-pagination",{attrs:{dropdown:!1,total:t.items.length,limit:1,page:t.currentIndex+1,details:!0,validate:t.beforePaginate},on:{paginate:t.paginate}}):t._e(),n("k-button",{staticClass:"k-structure-form-submit-button",attrs:{text:t.$t("new"!==t.currentIndex?"confirm":"add"),icon:"check"},on:{click:t.submit}})],1)],1)]:0===t.items.length?n("k-empty",{attrs:{"data-invalid":t.isInvalid,icon:"list-bullet"},on:{click:t.add}},[t._v(" "+t._s(t.empty||t.$t("field.structure.empty"))+" ")]):[n("table",{staticClass:"k-structure-table",attrs:{"data-invalid":t.isInvalid,"data-sortable":t.isSortable}},[n("thead",[n("tr",[n("th",{staticClass:"k-structure-table-index"},[t._v("#")]),t._l(t.columns,(function(e,s){return n("th",{key:s+"-header",staticClass:"k-structure-table-column",style:"width:"+t.width(e.width),attrs:{"data-align":e.align}},[t._v(" "+t._s(e.label)+" ")])})),t.disabled?t._e():n("th")],2)]),n("k-draggable",{directives:[{name:"direction",rawName:"v-direction"}],attrs:{list:t.items,"data-disabled":t.disabled,options:t.dragOptions,handle:!0,element:"tbody"},on:{end:t.onInput}},t._l(t.paginatedItems,(function(e,s){return n("tr",{key:s,on:{click:function(t){t.stopPropagation()}}},[n("td",{staticClass:"k-structure-table-index"},[t.isSortable?n("k-sort-handle"):t._e(),n("span",{staticClass:"k-structure-table-index-number"},[t._v(t._s(t.indexOf(s)))])],1),t._l(t.columns,(function(i,o){return n("td",{key:o,staticClass:"k-structure-table-column",style:"width:"+t.width(i.width),attrs:{title:i.label,"data-align":i.align},on:{click:function(e){return t.jump(s,o)}}},[!1===t.columnIsEmpty(e[o])?[t.previewExists(i.type)?n("k-"+i.type+"-field-preview",{tag:"component",attrs:{value:e[o],column:i,field:t.fields[o]},on:{input:function(e){return t.update(s,o,e)}}}):[n("p",{staticClass:"k-structure-table-text"},[t._v(" "+t._s(i.before)+" "+t._s(t.displayText(t.fields[o],e[o])||"–")+" "+t._s(i.after)+" ")])]]:t._e()],2)})),t.disabled?t._e():n("td",{staticClass:"k-structure-table-options"},[t.duplicate&&t.more&&null===t.currentIndex?[n("k-button",{key:s,ref:"actionsToggle",refInFor:!0,staticClass:"k-structure-table-options-button",attrs:{icon:"dots"},on:{click:function(e){t.$refs[s+"-actions"][0].toggle()}}}),n("k-dropdown-content",{ref:s+"-actions",refInFor:!0,attrs:{align:"right"}},[n("k-dropdown-item",{attrs:{icon:"copy"},on:{click:function(e){return t.duplicateItem(s)}}},[t._v(" "+t._s(t.$t("duplicate"))+" ")]),n("k-dropdown-item",{attrs:{icon:"remove"},on:{click:function(e){return t.confirmRemove(s)}}},[t._v(" "+t._s(t.$t("remove"))+" ")])],1)]:[n("k-button",{staticClass:"k-structure-table-options-button",attrs:{tooltip:t.$t("remove"),icon:"remove"},on:{click:function(e){return t.confirmRemove(s)}}})]],2)],2)})),0)],1),t.limit?n("k-pagination",t._b({on:{paginate:t.paginateItems}},"k-pagination",t.pagination,!1)):t._e(),t.disabled?t._e():n("k-dialog",{ref:"remove",attrs:{"submit-button":t.$t("delete"),theme:"negative"},on:{submit:t.remove}},[n("k-text",[t._v(t._s(t.$t("field.structure.delete.confirm")))])],1)]],2)}),[],!1,qa,null,null,null);function qa(t){for(let e in Pa)this[e]=Pa[e]}var Ra=function(){return Na.exports}();const Fa={};var za=Rt({mixins:[On,Pn,mo,Wo],inheritAttrs:!1,methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-tags-field",attrs:{input:t._uid,counter:t.counterOptions}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"tags"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,Ya,null,null,null);function Ya(t){for(let e in Fa)this[e]=Fa[e]}var Ha=function(){return za.exports}();const Ua={};var Ka=Rt({mixins:[On,Pn,yo],inheritAttrs:!1,props:{icon:{type:String,default:"phone"}},methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-tel-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"tel"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,Ja,null,null,null);function Ja(t){for(let e in Ua)this[e]=Ua[e]}var Ga=function(){return Ka.exports}();const Va={};var Wa=Rt({mixins:[On,Pn,ki,Wo],inheritAttrs:!1,methods:{focus(){this.$refs.input.focus()},select(){this.$refs.input.select()}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-text-field",attrs:{input:t._uid,counter:t.counterOptions},scopedSlots:t._u([{key:"options",fn:function(){return[t._t("options")]},proxy:!0}],null,!0)},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,Xa,null,null,null);function Xa(t){for(let e in Va)this[e]=Va[e]}var Za=function(){return Wa.exports}();const Qa={};var tl=Rt({mixins:[On,Pn,So,Wo],inheritAttrs:!1,methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-textarea-field",attrs:{input:t._uid,counter:t.counterOptions}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,type:"textarea",theme:"field"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,el,null,null,null);function el(t){for(let e in Qa)this[e]=Qa[e]}var nl=function(){return tl.exports}();const sl={mixins:[On,Pn,Ao],inheritAttrs:!1,props:{icon:{type:String,default:"clock"},times:{type:Boolean,default:!0}},methods:{focus(){this.$refs.input.focus()},select(t){var e;this.$emit("input",t),null==(e=this.$refs.times)||e.close()}}},il={};var ol=Rt(sl,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-time-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[n("k-input",t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"time"},on:{input:function(e){return t.$emit("input",e||"")}},scopedSlots:t._u([t.times?{key:"icon",fn:function(){return[n("k-dropdown",[n("k-button",{staticClass:"k-input-icon-button",attrs:{icon:t.icon||"clock",tooltip:t.$t("time.select")},on:{click:function(e){return t.$refs.times.toggle()}}}),n("k-dropdown-content",{ref:"times",attrs:{align:"right"}},[n("k-times",{attrs:{display:t.display,value:t.value},on:{input:t.select}})],1)],1)]},proxy:!0}:null],null,!0)},"k-input",t.$props,!1))],1)}),[],!1,rl,null,null,null);function rl(t){for(let e in il)this[e]=il[e]}var al=function(){return ol.exports}();const ll={};var ul=Rt({mixins:[On,Pn,Do],inheritAttrs:!1,methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-toggle-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"toggle"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,cl,null,null,null);function cl(t){for(let e in ll)this[e]=ll[e]}var dl=function(){return ul.exports}();const pl={mixins:[On,Pn,Ro],inheritAttrs:!1,props:{link:{type:Boolean,default:!0},icon:{type:String,default:"url"}},methods:{focus(){this.$refs.input.focus()}}},hl={};var fl=Rt(pl,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-url-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"url"},scopedSlots:t._u([{key:"icon",fn:function(){return[t.link?n("k-button",{staticClass:"k-input-icon-button",attrs:{icon:t.icon,link:t.value,tooltip:t.$t("open"),tabindex:"-1",target:"_blank"}}):t._e()]},proxy:!0}])},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,ml,null,null,null);function ml(t){for(let e in hl)this[e]=hl[e]}var gl=function(){return fl.exports}();const kl={};var vl=Rt({mixins:[dr]},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-users-field",scopedSlots:t._u([{key:"options",fn:function(){return[n("k-button-group",{staticClass:"k-field-options"},[t.more&&!t.disabled?n("k-button",{staticClass:"k-field-options-button",attrs:{icon:t.btnIcon,text:t.btnLabel},on:{click:t.open}}):t._e()],1)]},proxy:!0}])},"k-field",t.$props,!1),[t.selected.length?[n("k-items",{attrs:{items:t.selected,layout:t.layout,link:t.link,size:t.size,sortable:!t.disabled&&t.selected.length>1},on:{sort:t.onInput,sortChange:function(e){return t.$emit("change",e)}},scopedSlots:t._u([{key:"options",fn:function(e){var s=e.index;return[t.disabled?t._e():n("k-button",{attrs:{tooltip:t.$t("remove"),icon:"remove"},on:{click:function(e){return t.remove(s)}}})]}}],null,!1,1805525116)})]:n("k-empty",{attrs:{"data-invalid":t.isInvalid,icon:"users"},on:{click:t.open}},[t._v(" "+t._s(t.empty||t.$t("field.users.empty"))+" ")]),n("k-users-dialog",{ref:"selector",on:{submit:t.select}})],2)}),[],!1,bl,null,null,null);function bl(t){for(let e in kl)this[e]=kl[e]}var yl=function(){return vl.exports}();const $l={};var _l=Rt({mixins:[On,Pn,Js],inheritAttrs:!1,methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-writer-field",attrs:{input:t._uid,counter:!1}},"k-field",t.$props,!1),[n("k-input",t._b({attrs:{after:t.after,before:t.before,icon:t.icon,theme:"field"}},"k-input",t.$props,!1),[n("k-writer",t._b({ref:"input",staticClass:"k-writer-field-input",attrs:{value:t.value},on:{input:function(e){return t.$emit("input",e)}}},"k-writer",t.$props,!1))],1)],1)}),[],!1,wl,null,null,null);function wl(t){for(let e in $l)this[e]=$l[e]}var xl=function(){return _l.exports}();const Sl=function(t){this.command("insert",((e,n)=>{let s=[];return n.split("\n").forEach(((e,n)=>{let i="ol"===t?n+1+".":"-";s.push(i+" "+e)})),s.join("\n")}))},Cl={layout:["headlines","bold","italic","|","link","email","file","|","code","ul","ol"],props:{buttons:{type:[Boolean,Array],default:!0},uploads:[Boolean,Object,Array]},data(){let t={},e={},n=[],s=this.commands();return!1===this.buttons?t:(Array.isArray(this.buttons)&&(n=this.buttons),!0!==Array.isArray(this.buttons)&&(n=this.$options.layout),n.forEach(((n,i)=>{if("|"===n)t["divider-"+i]={divider:!0};else if(s[n]){let i=s[n];t[n]=i,i.shortcut&&(e[i.shortcut]=n)}})),{layout:t,shortcuts:e})},methods:{command(t,e){"function"==typeof t?t.apply(this):this.$emit("command",t,e)},close(){Object.keys(this.$refs).forEach((t=>{const e=this.$refs[t][0];"function"==typeof(null==e?void 0:e.close)&&e.close()}))},fileCommandSetup(){let t={label:this.$t("toolbar.button.file"),icon:"attachment"};return!1===this.uploads?t.command="selectFile":t.dropdown={select:{label:this.$t("toolbar.button.file.select"),icon:"check",command:"selectFile"},upload:{label:this.$t("toolbar.button.file.upload"),icon:"upload",command:"uploadFile"}},t},commands(){return{headlines:{label:this.$t("toolbar.button.headings"),icon:"title",dropdown:{h1:{label:this.$t("toolbar.button.heading.1"),icon:"title",command:"prepend",args:"#"},h2:{label:this.$t("toolbar.button.heading.2"),icon:"title",command:"prepend",args:"##"},h3:{label:this.$t("toolbar.button.heading.3"),icon:"title",command:"prepend",args:"###"}}},bold:{label:this.$t("toolbar.button.bold"),icon:"bold",command:"wrap",args:"**",shortcut:"b"},italic:{label:this.$t("toolbar.button.italic"),icon:"italic",command:"wrap",args:"*",shortcut:"i"},link:{label:this.$t("toolbar.button.link"),icon:"url",shortcut:"k",command:"dialog",args:"link"},email:{label:this.$t("toolbar.button.email"),icon:"email",shortcut:"e",command:"dialog",args:"email"},file:this.fileCommandSetup(),code:{label:this.$t("toolbar.button.code"),icon:"code",command:"wrap",args:"`"},ul:{label:this.$t("toolbar.button.ul"),icon:"list-bullet",command(){return Sl.apply(this,["ul"])}},ol:{label:this.$t("toolbar.button.ol"),icon:"list-numbers",command(){return Sl.apply(this,["ol"])}}}},shortcut(t,e){if(this.shortcuts[t]){const n=this.layout[this.shortcuts[t]];if(!n)return!1;e.preventDefault(),this.command(n.command,n.args)}}}},Ol={};var El=Rt(Cl,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("nav",{staticClass:"k-toolbar"},[n("div",{staticClass:"k-toolbar-wrapper"},[n("div",{staticClass:"k-toolbar-buttons"},[t._l(t.layout,(function(e,s){return[e.divider?[n("span",{key:s,staticClass:"k-toolbar-divider"})]:e.dropdown?[n("k-dropdown",{key:s},[n("k-button",{key:s,staticClass:"k-toolbar-button",attrs:{icon:e.icon,tooltip:e.label,tabindex:"-1"},on:{click:function(e){t.$refs[s+"-dropdown"][0].toggle()}}}),n("k-dropdown-content",{ref:s+"-dropdown",refInFor:!0},t._l(e.dropdown,(function(e,s){return n("k-dropdown-item",{key:s,attrs:{icon:e.icon},on:{click:function(n){return t.command(e.command,e.args)}}},[t._v(" "+t._s(e.label)+" ")])})),1)],1)]:[n("k-button",{key:s,staticClass:"k-toolbar-button",attrs:{icon:e.icon,tooltip:e.label,tabindex:"-1"},on:{click:function(n){return t.command(e.command,e.args)}}})]]}))],2)])])}),[],!1,Tl,null,null,null);function Tl(t){for(let e in Ol)this[e]=Ol[e]}var Al=function(){return El.exports}();const Ml={};var Il=Rt({data(){return{value:{email:null,text:null},fields:{email:{label:this.$t("email"),type:"email"},text:{label:this.$t("link.text"),type:"text"}}}},computed:{kirbytext(){return this.$config.kirbytext}},methods:{open(t,e){this.value.text=e,this.$refs.dialog.open()},cancel(){this.$emit("cancel")},createKirbytext(){var t;const e=this.value.email||"";return(null==(t=this.value.text)?void 0:t.length)>0?`(email: ${e} text: ${this.value.text})`:`(email: ${e})`},createMarkdown(){var t;const e=this.value.email||"";return(null==(t=this.value.text)?void 0:t.length)>0?`[${this.value.text}](mailto:${e})`:`<${e}>`},submit(){this.$emit("submit",this.kirbytext?this.createKirbytext():this.createMarkdown()),this.value={email:null,text:null},this.$refs.dialog.close()}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{"submit-button":t.$t("insert")},on:{close:t.cancel,submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}})],1)}),[],!1,Ll,null,null,null);function Ll(t){for(let e in Ml)this[e]=Ml[e]}var jl=function(){return Il.exports}();const Dl={};var Bl=Rt({data(){return{value:{url:null,text:null},fields:{url:{label:this.$t("link"),type:"text",placeholder:this.$t("url.placeholder"),icon:"url"},text:{label:this.$t("link.text"),type:"text"}}}},computed:{kirbytext(){return this.$config.kirbytext}},methods:{open(t,e){this.value.text=e,this.$refs.dialog.open()},cancel(){this.$emit("cancel")},createKirbytext(){return this.value.text.length>0?`(link: ${this.value.url} text: ${this.value.text})`:`(link: ${this.value.url})`},createMarkdown(){return this.value.text.length>0?`[${this.value.text}](${this.value.url})`:`<${this.value.url}>`},submit(){this.$emit("submit",this.kirbytext?this.createKirbytext():this.createMarkdown()),this.value={url:null,text:null},this.$refs.dialog.close()}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{"submit-button":t.$t("insert")},on:{close:t.cancel,submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}})],1)}),[],!1,Pl,null,null,null);function Pl(t){for(let e in Dl)this[e]=Dl[e]}var Nl=function(){return Bl.exports}();const ql={};var Rl=Rt({props:{field:Object,value:String},computed:{text(){var t;const e=this.$library.dayjs.iso(this.value);if(e){let n=this.field.display;return(null==(t=this.field.time)?void 0:t.display)&&(n+=" "+this.field.time.display),e.format(n)}return""}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("p",{staticClass:"k-date-field-preview"},[t._v(" "+t._s(t.text)+" ")])])}),[],!1,Fl,null,null,null);function Fl(t){for(let e in ql)this[e]=ql[e]}var zl=function(){return Rl.exports}();const Yl={};var Hl=Rt({props:{column:{type:Object,default:()=>({})},value:String},computed:{link(){return this.value}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("p",{staticClass:"k-url-field-preview"},[t._v(" "+t._s(t.column.before)+" "),n("k-link",{attrs:{to:t.link,target:"_blank"},nativeOn:{click:function(t){t.stopPropagation()}}},[t._v(" "+t._s(t.value)+" ")]),t._v(" "+t._s(t.column.after)+" ")],1)}),[],!1,Ul,null,null,null);function Ul(t){for(let e in Yl)this[e]=Yl[e]}var Kl=function(){return Hl.exports}();const Jl={};var Gl=Rt({extends:Kl,computed:{link(){var t;return(null==(t=this.value)?void 0:t.length)>0?"mailto:"+this.value:null}}},undefined,undefined,!1,Vl,null,null,null);function Vl(t){for(let e in Jl)this[e]=Jl[e]}var Wl=function(){return Gl.exports}();const Xl={};var Zl=Rt({props:{value:Array}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.value?n("ul",{staticClass:"k-files-field-preview"},t._l(t.value,(function(t){return n("li",{key:t.url},[n("k-link",{attrs:{title:t.filename,to:t.link},nativeOn:{click:function(t){t.stopPropagation()}}},[n("k-item-image",{attrs:{image:t.image,layout:"list"}})],1)],1)})),0):t._e()}),[],!1,Ql,null,null,null);function Ql(t){for(let e in Xl)this[e]=Xl[e]}var tu=function(){return Zl.exports}();const eu={};var nu=Rt({inheritAttrs:!1,props:{value:String}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{staticClass:"k-list-field-preview",domProps:{innerHTML:t._s(t.value)}})}),[],!1,su,null,null,null);function su(t){for(let e in eu)this[e]=eu[e]}var iu=function(){return nu.exports}();const ou={};var ru=Rt({props:{value:Array}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.value?n("ul",{staticClass:"k-pages-field-preview"},t._l(t.value,(function(e){return n("li",{key:e.id},[n("figure",[n("k-link",{attrs:{title:e.id,to:e.link},nativeOn:{click:function(t){t.stopPropagation()}}},[n("k-item-image",{staticClass:"k-pages-field-preview-image",attrs:{image:e.image,layout:"list"}}),n("figcaption",[t._v(" "+t._s(e.text)+" ")])],1)],1)])})),0):t._e()}),[],!1,au,null,null,null);function au(t){for(let e in ou)this[e]=ou[e]}var lu=function(){return ru.exports}();const uu={};var cu=Rt({props:{field:Object,value:String},computed:{text(){const t=this.$library.dayjs.iso(this.value,"time");return(null==t?void 0:t.format(this.field.display))||""}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("p",{staticClass:"k-time-field-preview"},[t._v(" "+t._s(t.text)+" ")])])}),[],!1,du,null,null,null);function du(t){for(let e in uu)this[e]=uu[e]}var pu=function(){return cu.exports}();const hu={props:{field:Object,value:Boolean,column:Object},computed:{text(){return!1!==this.column.text?this.field.text:null}}},fu={};var mu=Rt(hu,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("k-input",{staticClass:"k-toggle-field-preview",attrs:{text:t.text,type:"toggle"},on:{input:function(e){return t.$emit("input",e)}},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}})}),[],!1,gu,null,null,null);function gu(t){for(let e in fu)this[e]=fu[e]}var ku=function(){return mu.exports}();const vu={};var bu=Rt({props:{value:Array}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.value?n("ul",{staticClass:"k-users-field-preview"},t._l(t.value,(function(e){return n("li",{key:e.email},[n("figure",[n("k-link",{attrs:{title:e.email,to:e.link},nativeOn:{click:function(t){t.stopPropagation()}}},[e.avatar?n("k-image",{staticClass:"k-users-field-preview-avatar",attrs:{src:e.avatar.url,back:"pattern"}}):n("k-icon",{staticClass:"k-users-field-preview-avatar",attrs:{type:"user",back:"pattern"}}),n("figcaption",[t._v(" "+t._s(e.username)+" ")])],1)],1)])})),0):t._e()}),[],!1,yu,null,null,null);function yu(t){for(let e in vu)this[e]=vu[e]}var $u=function(){return bu.exports}();const _u={};var wu=Rt({inheritAttrs:!1,props:{value:String}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{staticClass:"k-writer-field-preview",domProps:{innerHTML:t._s(t.value)}})}),[],!1,xu,null,null,null);function xu(t){for(let e in _u)this[e]=_u[e]}var Su=function(){return wu.exports}();const Cu={props:{cover:Boolean,ratio:String},computed:{ratioPadding(){return this.$helper.ratio(this.ratio)}}},Ou={};var Eu=Rt(Cu,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("span",{staticClass:"k-aspect-ratio",style:{"padding-bottom":t.ratioPadding},attrs:{"data-cover":t.cover}},[t._t("default")],2)}),[],!1,Tu,null,null,null);function Tu(t){for(let e in Ou)this[e]=Ou[e]}var Au=function(){return Eu.exports}();const Mu={};var Iu=Rt({},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-bar"},[t.$slots.left?n("div",{staticClass:"k-bar-slot",attrs:{"data-position":"left"}},[t._t("left")],2):t._e(),t.$slots.center?n("div",{staticClass:"k-bar-slot",attrs:{"data-position":"center"}},[t._t("center")],2):t._e(),t.$slots.right?n("div",{staticClass:"k-bar-slot",attrs:{"data-position":"right"}},[t._t("right")],2):t._e()])}),[],!1,Lu,null,null,null);function Lu(t){for(let e in Mu)this[e]=Mu[e]}var ju=function(){return Iu.exports}();const Du={props:{theme:{type:String,default:"none"},text:String,html:{type:Boolean,default:!1}}},Bu={};var Pu=Rt(Du,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",t._g({staticClass:"k-box",attrs:{"data-theme":t.theme}},t.$listeners),[t._t("default",(function(){return[t.html?n("k-text",{domProps:{innerHTML:t._s(t.text)}}):n("k-text",[t._v(" "+t._s(t.text)+" ")])]}))],2)}),[],!1,Nu,null,null,null);function Nu(t){for(let e in Bu)this[e]=Bu[e]}var qu=function(){return Pu.exports}();const Ru={props:{help:String,items:{type:[Array,Object],default:()=>[]},layout:{type:String,default:"list"},size:String,sortable:Boolean,pagination:{type:[Boolean,Object],default:()=>!1}},computed:{hasPagination(){return!1!==this.pagination&&(!0!==this.paginationOptions.hide&&!(this.pagination.total<=this.pagination.limit))},hasFooter(){return!(!this.hasPagination&&!this.help)},paginationOptions(){const t="object"!=typeof this.pagination?{}:this.pagination;return a({limit:10,details:!0,keys:!1,total:0,hide:!1},t)}},watch:{$props(){this.$forceUpdate()}},methods:{onOption(...t){this.$emit("action",...t),this.$emit("option",...t)}}},Fu={};var zu=Rt(Ru,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-collection"},[n("k-items",{attrs:{items:t.items,layout:t.layout,size:t.size,sortable:t.sortable},on:{option:t.onOption,sort:function(e){return t.$emit("sort",e)},change:function(e){return t.$emit("change",e)}}}),t.hasFooter?n("footer",{staticClass:"k-collection-footer"},[t.help?n("k-text",{staticClass:"k-collection-help",attrs:{theme:"help"},domProps:{innerHTML:t._s(t.help)}}):t._e(),n("div",{staticClass:"k-collection-pagination"},[t.hasPagination?n("k-pagination",t._b({on:{paginate:function(e){return t.$emit("paginate",e)}}},"k-pagination",t.paginationOptions,!1)):t._e()],1)],1):t._e()],1)}),[],!1,Yu,null,null,null);function Yu(t){for(let e in Fu)this[e]=Fu[e]}var Hu=function(){return zu.exports}();const Uu={props:{width:String,sticky:Boolean}},Ku={};var Ju=Rt(Uu,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-column",attrs:{"data-width":t.width,"data-sticky":t.sticky}},[n("div",[t._t("default")],2)])}),[],!1,Gu,null,null,null);function Gu(t){for(let e in Ku)this[e]=Ku[e]}var Vu=function(){return Ju.exports}();const Wu={props:{disabled:{type:Boolean,default:!1}},data:()=>({files:[],dragging:!1,over:!1}),methods:{cancel(){this.reset()},reset(){this.dragging=!1,this.over=!1},onDrop(t){return!0===this.disabled||!1===this.$helper.isUploadEvent(t)?this.reset():(this.$events.$emit("dropzone.drop"),this.files=t.dataTransfer.files,this.$emit("drop",this.files),void this.reset())},onEnter(t){!1===this.disabled&&this.$helper.isUploadEvent(t)&&(this.dragging=!0)},onLeave(){this.reset()},onOver(t){!1===this.disabled&&this.$helper.isUploadEvent(t)&&(t.dataTransfer.dropEffect="copy",this.over=!0)}}},Xu={};var Zu=Rt(Wu,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{staticClass:"k-dropzone",attrs:{"data-dragging":t.dragging,"data-over":t.over},on:{dragenter:t.onEnter,dragleave:t.onLeave,dragover:t.onOver,drop:t.onDrop}},[t._t("default")],2)}),[],!1,Qu,null,null,null);function Qu(t){for(let e in Xu)this[e]=Xu[e]}var tc=function(){return Zu.exports}();const ec={};var nc=Rt({props:{text:String,icon:String,layout:{type:String,default:"list"}},computed:{element(){return void 0!==this.$listeners.click?"button":"div"}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n(t.element,t._g({tag:"component",staticClass:"k-empty",attrs:{"data-layout":t.layout,type:"button"===t.element&&"button"}},t.$listeners),[t.icon?n("k-icon",{attrs:{type:t.icon}}):t._e(),n("p",[t._t("default")],2)],1)}),[],!1,sc,null,null,null);function sc(t){for(let e in ec)this[e]=ec[e]}var ic=function(){return nc.exports}();const oc={};var rc=Rt({props:{details:Array,image:Object,url:String}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-file-preview"},[n("k-view",{staticClass:"k-file-preview-layout"},[n("div",{staticClass:"k-file-preview-image"},[n("k-link",{staticClass:"k-file-preview-image-link",attrs:{to:t.url,title:t.$t("open"),target:"_blank"}},[n("k-item-image",{attrs:{image:t.image,layout:"cards"}})],1)],1),n("div",{staticClass:"k-file-preview-details"},[n("ul",t._l(t.details,(function(e){return n("li",{key:e.title},[n("h3",[t._v(t._s(e.title))]),n("p",[e.link?n("k-link",{attrs:{to:e.link,tabindex:"-1",target:"_blank"}},[t._v(" /"+t._s(e.text)+" ")]):[t._v(" "+t._s(e.text)+" ")]],2)])})),0)])])],1)}),[],!1,ac,null,null,null);function ac(t){for(let e in oc)this[e]=oc[e]}var lc=function(){return rc.exports}();const uc={};var cc=Rt({props:{gutter:String}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{staticClass:"k-grid",attrs:{"data-gutter":t.gutter}},[t._t("default")],2)}),[],!1,dc,null,null,null);function dc(t){for(let e in uc)this[e]=uc[e]}var pc=function(){return cc.exports}();const hc={props:{editable:Boolean,tab:String,tabs:{type:Array,default:()=>[]}},computed:{tabsWithBadges(){const t=Object.keys(this.$store.getters["content/changes"]());return this.tabs.map((e=>{let n=[];return Object.values(e.columns).forEach((t=>{Object.values(t.sections).forEach((t=>{"fields"===t.type&&Object.keys(t.fields).forEach((t=>{n.push(t)}))}))})),e.badge=n.filter((e=>t.includes(e.toLowerCase()))).length,e}))}}},fc={};var mc=Rt(hc,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("header",{staticClass:"k-header",attrs:{"data-editable":t.editable}},[n("k-headline",{attrs:{tag:"h1",size:"huge"}},[t.editable&&t.$listeners.edit?n("span",{staticClass:"k-headline-editable",on:{click:function(e){return t.$emit("edit")}}},[t._t("default"),n("k-icon",{attrs:{type:"edit"}})],2):t._t("default")],2),t.$slots.left||t.$slots.right?n("k-bar",{staticClass:"k-header-buttons",scopedSlots:t._u([{key:"left",fn:function(){return[t._t("left")]},proxy:!0},{key:"right",fn:function(){return[t._t("right")]},proxy:!0}],null,!0)}):t._e(),n("k-tabs",{attrs:{tab:t.tab,tabs:t.tabsWithBadges,theme:"notice"}})],1)}),[],!1,gc,null,null,null);function gc(t){for(let e in fc)this[e]=fc[e]}var kc=function(){return mc.exports}();const vc={};var bc=Rt({inheritAttrs:!1},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-panel",{staticClass:"k-panel-inside",attrs:{tabindex:"0"}},[n("header",{staticClass:"k-panel-header"},[n("k-topbar",{attrs:{breadcrumb:t.$view.breadcrumb,license:t.$license,menu:t.$menu,view:t.$view}})],1),n("main",{staticClass:"k-panel-view scroll-y"},[t._t("default")],2),t._t("footer")],2)}),[],!1,yc,null,null,null);function yc(t){for(let e in vc)this[e]=vc[e]}var $c=function(){return bc.exports}(),_c=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("article",t._b({staticClass:"k-item",class:!!t.layout&&"k-"+t.layout+"-item",attrs:{"data-has-figure":t.hasFigure,"data-has-flag":Boolean(t.flag),"data-has-info":Boolean(t.info),"data-has-options":Boolean(t.options),tabindex:"-1"},on:{click:function(e){return t.$emit("click",e)},dragstart:function(e){return t.$emit("drag",e)}}},"article",t.data,!1),[t._t("image",(function(){return[t.hasFigure?n("k-item-image",{attrs:{image:t.image,layout:t.layout,width:t.width}}):t._e()]})),t.sortable?n("k-sort-handle",{staticClass:"k-item-sort-handle"}):t._e(),n("header",{staticClass:"k-item-content"},[t._t("default",(function(){return[n("h3",{staticClass:"k-item-title"},[!1!==t.link?n("k-link",{staticClass:"k-item-title-link",attrs:{target:t.target,to:t.link}},[n("span",{domProps:{innerHTML:t._s(t.title)}})]):n("span",{domProps:{innerHTML:t._s(t.title)}})],1),t.info?n("p",{staticClass:"k-item-info",domProps:{innerHTML:t._s(t.info)}}):t._e()]}))],2),t.flag||t.options||t.$slots.options?n("footer",{staticClass:"k-item-footer"},[n("nav",{staticClass:"k-item-buttons",on:{click:function(t){t.stopPropagation()}}},[t.flag?n("k-status-icon",t._b({},"k-status-icon",t.flag,!1)):t._e(),t._t("options",(function(){return[t.options?n("k-options-dropdown",{staticClass:"k-item-options-dropdown",attrs:{options:t.options},on:{option:t.onOption}}):t._e()]}))],2)]):t._e()],2)};const wc={inheritAttrs:!1,props:{data:Object,flag:Object,image:[Object,Boolean],info:String,layout:{type:String,default:"list"},link:{type:[Boolean,String,Function]},options:{type:[Array,Function,String]},sortable:Boolean,target:String,text:String,width:String},computed:{hasFigure(){return!1!==this.image&&Object.keys(this.image).length>0},title(){return this.text||"-"}},methods:{onOption(t){this.$emit("action",t),this.$emit("option",t)}}},xc={};var Sc=Rt(wc,_c,[],!1,Cc,null,null,null);function Cc(t){for(let e in xc)this[e]=xc[e]}var Oc=function(){return Sc.exports}();const Ec={inheritAttrs:!1,props:{image:[Object,Boolean],layout:{type:String,default:"list"},width:String},computed:{back(){return this.image.back||"black"},ratio(){return"cards"===this.layout&&this.image.ratio||"1/1"},size(){switch(this.layout){case"cards":return"large";case"cardlets":return"medium";default:return"regular"}},sizes(){switch(this.width){case"1/2":case"2/4":return"(min-width: 30em) and (max-width: 65em) 59em, (min-width: 65em) 44em, 27em";case"1/3":return"(min-width: 30em) and (max-width: 65em) 59em, (min-width: 65em) 29.333em, 27em";case"1/4":return"(min-width: 30em) and (max-width: 65em) 59em, (min-width: 65em) 22em, 27em";case"2/3":return"(min-width: 30em) and (max-width: 65em) 59em, (min-width: 65em) 27em, 27em";case"3/4":return"(min-width: 30em) and (max-width: 65em) 59em, (min-width: 65em) 66em, 27em";default:return"(min-width: 30em) and (max-width: 65em) 59em, (min-width: 65em) 88em, 27em"}}}},Tc={};var Ac=Rt(Ec,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.image?n("div",{staticClass:"k-item-figure",style:{background:t.$helper.color(t.back)}},[t.image.src?n("k-image",{staticClass:"k-item-image",attrs:{cover:t.image.cover,ratio:t.ratio,sizes:t.sizes,src:t.image.src,srcset:t.image.srcset}}):n("k-aspect-ratio",{attrs:{ratio:t.ratio}},[n("k-icon",{staticClass:"k-item-icon",attrs:{color:t.$helper.color(t.image.color),size:t.size,type:t.image.icon}})],1)],1):t._e()}),[],!1,Mc,null,null,null);function Mc(t){for(let e in Tc)this[e]=Tc[e]}var Ic=function(){return Ac.exports}();const Lc={inheritAttrs:!1,props:{items:{type:Array,default:()=>[]},layout:{type:String,default:"list"},link:{type:Boolean,default:!0},image:{type:[Object,Boolean],default:()=>({})},sortable:Boolean,empty:{type:[String,Object]},size:{type:String,default:"default"}},computed:{dragOptions(){return{sort:this.sortable,disabled:!1===this.sortable,draggable:".k-draggable-item"}}},methods:{onDragStart(t,e){this.$store.dispatch("drag",{type:"text",data:e})},imageOptions(t){let e=this.image,n=t.image;return!1!==e&&!1!==n&&("object"!=typeof e&&(e={}),"object"!=typeof n&&(n={}),a(a({},n),e))}}},jc={};var Dc=Rt(Lc,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-draggable",{staticClass:"k-items",class:"k-"+t.layout+"-items",attrs:{handle:!0,options:t.dragOptions,"data-layout":t.layout,"data-size":t.size,list:t.items},on:{change:function(e){return t.$emit("change",e)},end:function(e){return t.$emit("sort",t.items,e)}}},[t._t("default",(function(){return t._l(t.items,(function(e,s){return n("k-item",t._b({key:e.id||s,class:{"k-draggable-item":t.sortable&&e.sortable},attrs:{image:t.imageOptions(e),layout:t.layout,link:!!t.link&&e.link,sortable:t.sortable&&e.sortable,width:e.column},on:{click:function(n){return t.$emit("item",e,s)},drag:function(n){return t.onDragStart(n,e.dragText)},flag:function(n){return t.$emit("flag",e,s)},option:function(n){return t.$emit("option",n,e,s)}},nativeOn:{mouseover:function(n){return t.$emit("hover",n,e,s)}},scopedSlots:t._u([{key:"options",fn:function(){return[t._t("options",null,{item:e,index:s})]},proxy:!0}],null,!0)},"k-item",e,!1))}))}))],2)}),[],!1,Bc,null,null,null);function Bc(t){for(let e in jc)this[e]=jc[e]}var Pc=function(){return Dc.exports}();const Nc={inheritAttrs:!0,props:{autofocus:{type:Boolean,default:!0},centered:{type:Boolean,default:!1},dimmed:{type:Boolean,default:!0},loading:{type:Boolean,default:!1}},data:()=>({isOpen:!1,scrollTop:0}),methods:{close(){!1!==this.isOpen&&(this.isOpen=!1,this.$emit("close"),this.restoreScrollPosition(),this.$events.$off("keydown.esc",this.close))},focus(){var t,e;let n=this.$refs.overlay.querySelector("\n [autofocus],\n [data-autofocus]\n ");return null===n&&(n=this.$refs.overlay.querySelector("\n input,\n textarea,\n select,\n button\n ")),"function"==typeof(null==n?void 0:n.focus)?n.focus():"function"==typeof(null==(e=null==(t=this.$slots.default[0])?void 0:t.context)?void 0:e.focus)?this.$slots.default[0].context.focus():void 0},open(){!0!==this.isOpen&&(this.storeScrollPosition(),this.isOpen=!0,this.$emit("open"),this.$events.$on("keydown.esc",this.close),setTimeout((()=>{!0===this.autofocus&&this.focus(),document.querySelector(".k-overlay > *").addEventListener("mousedown",(t=>t.stopPropagation())),this.$emit("ready")}),1))},restoreScrollPosition(){const t=document.querySelector(".k-panel-view");(null==t?void 0:t.scrollTop)&&(t.scrollTop=this.scrollTop)},storeScrollPosition(){const t=document.querySelector(".k-panel-view");(null==t?void 0:t.scrollTop)?this.scrollTop=t.scrollTop:this.scrollTop=0}}},qc={};var Rc=Rt(Nc,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.isOpen?n("portal",[n("div",t._g({ref:"overlay",staticClass:"k-overlay",class:t.$vnode.data.staticClass,attrs:{"data-centered":t.loading||t.centered,"data-dimmed":t.dimmed,"data-loading":t.loading,dir:t.$translation.direction},on:{mousedown:t.close}},t.$listeners),[t.loading?n("k-loader",{staticClass:"k-overlay-loader"}):t._t("default",null,{close:t.close,isOpen:t.isOpen})],2)]):t._e()}),[],!1,Fc,null,null,null);function Fc(t){for(let e in qc)this[e]=qc[e]}var zc=function(){return Rc.exports}();const Yc={};var Hc=Rt({computed:{defaultLanguage(){return!!this.$language&&this.$language.default},dialog(){return this.$helper.clone(this.$store.state.dialog)},language(){return this.$language?this.$language.code:null},role(){return this.$user?this.$user.role:null},user(){return this.$user?this.$user.id:null}},created(){this.$events.$on("drop",this.drop)},destroyed(){this.$events.$off("drop",this.drop)},methods:{drop(){this.$store.dispatch("drag",null)}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-panel",attrs:{"data-dragging":t.$store.state.drag,"data-loading":t.$store.state.isLoading,"data-language":t.language,"data-language-default":t.defaultLanguage,"data-role":t.role,"data-translation":t.$translation.code,"data-user":t.user,dir:t.$translation.direction}},[t._t("default"),t.$store.state.dialog&&t.$store.state.dialog.props?[n("k-fiber-dialog",t._b({},"k-fiber-dialog",t.dialog,!1))]:t._e(),!1!==t.$store.state.fatal?n("k-fatal",{attrs:{html:t.$store.state.fatal}}):t._e(),!1===t.$system.isLocal?n("k-offline-warning"):t._e(),n("k-icons")],2)}),[],!1,Uc,null,null,null);function Uc(t){for(let e in Yc)this[e]=Yc[e]}var Kc=function(){return Hc.exports}();const Jc={};var Gc=Rt({props:{tab:String,tabs:Array,theme:String},data(){return{size:null,visibleTabs:this.tabs,invisibleTabs:[]}},computed:{current(){return(this.tabs.find((t=>t.name===this.tab))||this.tabs[0]||{}).name}},watch:{tabs:{handler(t){this.visibleTabs=t,this.invisibleTabs=[],this.resize(!0)},immediate:!0}},created(){window.addEventListener("resize",this.resize)},destroyed(){window.removeEventListener("resize",this.resize)},methods:{resize(t){if(this.tabs&&!(this.tabs.length<=1)){if(this.tabs.length<=3)return this.visibleTabs=this.tabs,void(this.invisibleTabs=[]);if(window.innerWidth>=700){if("large"===this.size&&!t)return;this.visibleTabs=this.tabs,this.invisibleTabs=[],this.size="large"}else{if("small"===this.size&&!t)return;this.visibleTabs=this.tabs.slice(0,2),this.invisibleTabs=this.tabs.slice(2),this.size="small"}}}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.tabs&&t.tabs.length>1?n("div",{staticClass:"k-tabs",attrs:{"data-theme":t.theme}},[n("nav",[t._l(t.visibleTabs,(function(e){return n("k-button",{key:e.name,staticClass:"k-tab-button",attrs:{link:e.link,current:t.current===e.name,icon:e.icon,tooltip:e.label}},[t._v(" "+t._s(e.label||e.text||e.name)+" "),e.badge?n("span",{staticClass:"k-tabs-badge"},[t._v(" "+t._s(e.badge)+" ")]):t._e()])})),t.invisibleTabs.length?n("k-button",{staticClass:"k-tab-button k-tabs-dropdown-button",attrs:{text:t.$t("more"),icon:"dots"},on:{click:function(e){return e.stopPropagation(),t.$refs.more.toggle()}}}):t._e()],2),t.invisibleTabs.length?n("k-dropdown-content",{ref:"more",staticClass:"k-tabs-dropdown",attrs:{align:"right"}},t._l(t.invisibleTabs,(function(e){return n("k-dropdown-item",{key:"more-"+e.name,attrs:{link:e.link,current:t.tab===e.name,icon:e.icon,tooltip:e.label}},[t._v(" "+t._s(e.label||e.text||e.name)+" ")])})),1):t._e()],1):t._e()}),[],!1,Vc,null,null,null);function Vc(t){for(let e in Jc)this[e]=Jc[e]}var Wc=function(){return Gc.exports}();const Xc={};var Zc=Rt({props:{align:String}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{staticClass:"k-view",attrs:{"data-align":t.align}},[t._t("default")],2)}),[],!1,Qc,null,null,null);function Qc(t){for(let e in Xc)this[e]=Xc[e]}var td=function(){return Zc.exports}();const ed={components:{draggable:J},props:{data:Object,element:String,handle:[String,Boolean],list:[Array,Object],move:Function,options:Object},data(){return{listeners:l(a({},this.$listeners),{start:t=>{this.$store.dispatch("drag",{}),this.$listeners.start&&this.$listeners.start(t)},end:t=>{this.$store.dispatch("drag",null),this.$listeners.end&&this.$listeners.end(t)}})}},computed:{dragOptions(){let t=!1;return t=!0===this.handle?".k-sort-handle":this.handle,a({fallbackClass:"k-sortable-fallback",fallbackOnBody:!0,forceFallback:!0,ghostClass:"k-sortable-ghost",handle:t,scroll:document.querySelector(".k-panel-view")},this.options)}}},nd={};var sd=Rt(ed,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("draggable",t._g(t._b({staticClass:"k-draggable",attrs:{"component-data":t.data,tag:t.element,list:t.list,move:t.move},scopedSlots:t._u([{key:"footer",fn:function(){return[t._t("footer")]},proxy:!0}],null,!0)},"draggable",t.dragOptions,!1),t.listeners),[t._t("default")],2)}),[],!1,id,null,null,null);function id(t){for(let e in nd)this[e]=nd[e]}var od=function(){return sd.exports}();const rd={};var ad=Rt({data:()=>({error:null}),errorCaptured(t){return this.$config.debug&&window.console.warn(t),this.error=t,!1},render(t){return this.error?this.$slots.error?this.$slots.error[0]:this.$scopedSlots.error?this.$scopedSlots.error({error:this.error}):t("k-box",{attrs:{theme:"negative"}},this.error.message||this.error):this.$slots.default[0]}},undefined,undefined,!1,ld,null,null,null);function ld(t){for(let e in rd)this[e]=rd[e]}var ud=function(){return ad.exports}();const cd={};var dd=Rt({props:{html:String},mounted(){try{let t=this.$refs.iframe.contentWindow.document;t.open(),t.write(this.html),t.close()}catch(t){console.error(t)}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-fatal"},[n("div",{staticClass:"k-fatal-box"},[n("k-bar",{scopedSlots:t._u([{key:"left",fn:function(){return[n("k-headline",[t._v(" The JSON response could not be parsed ")])]},proxy:!0},{key:"right",fn:function(){return[n("k-button",{attrs:{icon:"cancel",text:"Close"},on:{click:function(e){return t.$store.dispatch("fatal",!1)}}})]},proxy:!0}])}),n("iframe",{ref:"iframe",staticClass:"k-fatal-iframe"})],1)])}),[],!1,pd,null,null,null);function pd(t){for(let e in cd)this[e]=cd[e]}var hd=function(){return dd.exports}();const fd={};var md=Rt({props:{link:String,size:{type:String},tag:{type:String,default:"h2"},theme:{type:String}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n(t.tag,t._g({tag:"component",staticClass:"k-headline",attrs:{"data-theme":t.theme,"data-size":t.size}},t.$listeners),[t.link?n("k-link",{attrs:{to:t.link}},[t._t("default")],2):t._t("default")],2)}),[],!1,gd,null,null,null);function gd(t){for(let e in fd)this[e]=fd[e]}var kd=function(){return md.exports}();const vd={};var bd=Rt({props:{alt:String,color:String,back:String,size:String,type:String},computed:{isEmoji(){return this.$helper.string.hasEmoji(this.type)}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{class:"k-icon k-icon-"+t.type,style:{background:t.$helper.color(t.back)},attrs:{"aria-label":t.alt,role:t.alt?"img":null,"aria-hidden":!t.alt,"data-back":t.back,"data-size":t.size}},[t.isEmoji?n("span",{staticClass:"k-icon-emoji"},[t._v(t._s(t.type))]):n("svg",{style:{color:t.$helper.color(t.color)},attrs:{viewBox:"0 0 16 16"}},[n("use",{attrs:{"xlink:href":"#icon-"+t.type}})])])}),[],!1,yd,null,null,null);function yd(t){for(let e in vd)this[e]=vd[e]}var $d=function(){return bd.exports}(),_d=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("svg",{staticClass:"k-icons",attrs:{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",overflow:"hidden"}},[n("defs",t._l(t.$options.icons,(function(e,s){return n("symbol",{key:s,attrs:{id:"icon-"+s,viewBox:"0 0 16 16"},domProps:{innerHTML:t._s(e)}})})),0)])},wd=[];const xd={icons:window.panel.plugins.icons},Sd={};var Cd=Rt(xd,_d,wd,!1,Od,null,null,null);function Od(t){for(let e in Sd)this[e]=Sd[e]}var Ed=function(){return Cd.exports}();const Td={props:{alt:String,back:String,cover:Boolean,ratio:String,sizes:String,src:String,srcset:String},data:()=>({loaded:{type:Boolean,default:!1},error:{type:Boolean,default:!1}}),computed:{ratioPadding(){return this.$helper.ratio(this.ratio||"1/1")}},created(){let t=new Image;t.onload=()=>{this.loaded=!0,this.$emit("load")},t.onerror=()=>{this.error=!0,this.$emit("error")},t.src=this.src}},Ad={};var Md=Rt(Td,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",t._g({staticClass:"k-image",attrs:{"data-ratio":t.ratio,"data-back":t.back,"data-cover":t.cover}},t.$listeners),[n("span",{style:"padding-bottom:"+t.ratioPadding},[t.loaded?n("img",{key:t.src,attrs:{alt:t.alt||"",src:t.src,srcset:t.srcset,sizes:t.sizes},on:{dragstart:function(t){t.preventDefault()}}}):t._e(),t.loaded||t.error?t._e():n("k-loader",{attrs:{position:"center",theme:"light"}}),!t.loaded&&t.error?n("k-icon",{staticClass:"k-image-error",attrs:{type:"cancel"}}):t._e()],1)])}),[],!1,Id,null,null,null);function Id(t){for(let e in Ad)this[e]=Ad[e]}var Ld=function(){return Md.exports}();const jd={};var Dd=Rt({},(function(){var t=this.$createElement,e=this._self._c||t;return e("span",{staticClass:"k-loader"},[e("k-icon",{staticClass:"k-loader-icon",attrs:{type:"loader"}})],1)}),[],!1,Bd,null,null,null);function Bd(t){for(let e in jd)this[e]=jd[e]}var Pd=function(){return Dd.exports}();const Nd={};var qd=Rt({data:()=>({offline:!1}),created(){this.$events.$on("offline",this.isOffline),this.$events.$on("online",this.isOnline)},destroyed(){this.$events.$off("offline",this.isOffline),this.$events.$off("online",this.isOnline)},methods:{isOnline(){this.offline=!1},isOffline(){this.offline=!0}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.offline?n("div",{staticClass:"k-offline-warning"},[n("p",[n("k-icon",{attrs:{type:"bolt"}}),t._v(" "+t._s(t.$t("error.offline")))],1)]):t._e()}),[],!1,Rd,null,null,null);function Rd(t){for(let e in Nd)this[e]=Nd[e]}var Fd=function(){return qd.exports}();const zd=(t,e=!1)=>{if(t>=0&&t<=100)return!0;if(e)throw new Error("value has to be between 0 and 100");return!1},Yd={};var Hd=Rt({props:{value:{type:Number,default:0,validator:zd}},data(){return{state:this.value}},watch:{value(t){this.state=t}},methods:{set(t){zd(t,!0),this.state=t}}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("progress",{staticClass:"k-progress",attrs:{max:"100"},domProps:{value:t.state}},[t._v(t._s(t.state)+"%")])}),[],!1,Ud,null,null,null);function Ud(t){for(let e in Yd)this[e]=Yd[e]}var Kd=function(){return Hd.exports}();const Jd={};var Gd=Rt({},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-registration"},[n("p",[t._v(t._s(t.$t("license.unregistered")))]),n("k-button",{staticClass:"k-topbar-button",attrs:{responsive:!0,tooltip:t.$t("license.unregistered"),icon:"key"},on:{click:function(e){return t.$dialog("registration")}}},[t._v(" "+t._s(t.$t("license.register"))+" ")]),n("k-button",{staticClass:"k-topbar-button",attrs:{responsive:!0,link:"https://getkirby.com/buy",target:"_blank",icon:"cart"}},[t._v(" "+t._s(t.$t("license.buy"))+" ")])],1)}),[],!1,Vd,null,null,null);function Vd(t){for(let e in Jd)this[e]=Jd[e]}var Wd=function(){return Gd.exports}();const Xd={};var Zd=Rt({props:{icon:{type:String,default:"sort"}}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("k-icon",{staticClass:"k-sort-handle",attrs:{type:t.icon,"aria-hidden":"true"}})}),[],!1,Qd,null,null,null);function Qd(t){for(let e in Xd)this[e]=Xd[e]}var tp=function(){return Zd.exports}();const ep={props:{click:{type:Function,default:()=>{}},disabled:Boolean,responsive:Boolean,status:String,text:String,tooltip:String},computed:{icon(){return"draft"===this.status?"circle-outline":"unlisted"===this.status?"circle-half":"circle"},theme(){return"draft"===this.status?"negative":"unlisted"===this.status?"info":"positive"},title(){let t=this.tooltip||this.text;return this.disabled&&(t+=` (${this.$t("disabled")})`),t}},methods:{onClick(){this.click(),this.$emit("click")}}},np={};var sp=Rt(ep,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("k-button",{class:"k-status-icon k-status-icon-"+t.status,attrs:{disabled:t.disabled,icon:t.icon,responsive:t.responsive,text:t.text,theme:t.theme,tooltip:t.title},on:{click:t.onClick}})}),[],!1,ip,null,null,null);function ip(t){for(let e in np)this[e]=np[e]}var op=function(){return sp.exports}();const rp={};var ap=Rt({props:{align:String,size:String,theme:String}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{staticClass:"k-text",attrs:{"data-align":t.align,"data-size":t.size,"data-theme":t.theme}},[t._t("default")],2)}),[],!1,lp,null,null,null);function lp(t){for(let e in rp)this[e]=rp[e]}var up=function(){return ap.exports}();const cp={};var dp=Rt({props:{user:[Object,String]}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-user-info"},[t.user.avatar?n("k-image",{attrs:{cover:!0,src:t.user.avatar.url,ratio:"1/1"}}):n("k-icon",{attrs:{type:"user"}}),t._v(" "+t._s(t.user.name||t.user.email||t.user)+" ")],1)}),[],!1,pp,null,null,null);function pp(t){for(let e in cp)this[e]=cp[e]}var hp=function(){return dp.exports}();const fp={};var mp=Rt({props:{crumbs:{type:Array,default:()=>[]},label:{type:String,default:"Breadcrumb"},view:Object},computed:{dropdown(){return this.segments.map((t=>l(a({},t),{text:t.label,icon:"angle-right"})))},segments(){return[{link:this.view.link,label:this.view.breadcrumbLabel,icon:this.view.icon,loading:this.$store.state.isLoading},...this.crumbs]}},methods:{isLast(t){return this.crumbs.length-1===t}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("nav",{staticClass:"k-breadcrumb",attrs:{"aria-label":t.label}},[n("k-dropdown",{staticClass:"k-breadcrumb-dropdown"},[n("k-button",{attrs:{icon:"road-sign"},on:{click:function(e){return t.$refs.dropdown.toggle()}}}),n("k-dropdown-content",{ref:"dropdown",attrs:{options:t.dropdown,theme:"light"}})],1),n("ol",t._l(t.segments,(function(e,s){return n("li",{key:s},[n("k-link",{staticClass:"k-breadcrumb-link",attrs:{title:e.text||e.label,to:e.link,"aria-current":!!t.isLast(s)&&"page"}},[e.loading?n("k-loader",{staticClass:"k-breadcrumb-icon"}):e.icon?n("k-icon",{staticClass:"k-breadcrumb-icon",attrs:{type:e.icon}}):t._e(),n("span",{staticClass:"k-breadcrumb-link-text"},[t._v(" "+t._s(e.text||e.label)+" ")])],1)],1)})),0)],1)}),[],!1,gp,null,null,null);function gp(t){for(let e in fp)this[e]=fp[e]}var kp=function(){return mp.exports}();const vp={inheritAttrs:!1,props:{autofocus:Boolean,click:Function,current:[String,Boolean],disabled:Boolean,icon:String,id:[String,Number],link:String,responsive:Boolean,rel:String,role:String,target:String,tabindex:String,text:[String,Number],theme:String,tooltip:String,type:{type:String,default:"button"}},computed:{component(){return!0===this.disabled?"k-button-disabled":this.link?"k-button-link":"k-button-native"}},methods:{focus(){this.$refs.button.focus&&this.$refs.button.focus()},tab(){this.$refs.button.tab&&this.$refs.button.tab()},untab(){this.$refs.button.untab&&this.$refs.button.untab()}}},bp={};var yp=Rt(vp,(function(){var t=this,e=t.$createElement;return(t._self._c||e)(t.component,t._g(t._b({ref:"button",tag:"component"},"component",t.$props,!1),t.$listeners),[t.text?[t._v(" "+t._s(t.text)+" ")]:t._t("default")],2)}),[],!1,$p,null,null,null);function $p(t){for(let e in bp)this[e]=bp[e]}var _p=function(){return yp.exports}();const wp={inheritAttrs:!1,props:{icon:String,id:[String,Number],responsive:Boolean,theme:String,tooltip:String}},xp={};var Sp=Rt(wp,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{staticClass:"k-button",attrs:{id:t.id,"data-disabled":!0,"data-responsive":t.responsive,"data-theme":t.theme,title:t.tooltip}},[t.icon?n("k-icon",{staticClass:"k-button-icon",attrs:{type:t.icon,alt:t.tooltip}}):t._e(),t.$slots.default?n("span",{staticClass:"k-button-text"},[t._t("default")],2):t._e()],1)}),[],!1,Cp,null,null,null);function Cp(t){for(let e in xp)this[e]=xp[e]}var Op=function(){return Sp.exports}();const Ep={};var Tp=Rt({props:{buttons:Array}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-button-group"},[t.$slots.default?t._t("default"):t._l(t.buttons,(function(e,s){return n("k-button",t._b({key:s},"k-button",e,!1))}))],2)}),[],!1,Ap,null,null,null);function Ap(t){for(let e in Ep)this[e]=Ep[e]}var Mp=function(){return Tp.exports}();const Ip={inheritAttrs:!1,props:{autofocus:Boolean,current:[String,Boolean],icon:String,id:[String,Number],link:String,rel:String,responsive:Boolean,role:String,target:String,tabindex:String,theme:String,tooltip:String},methods:{focus(){this.$el.focus()}}},Lp={};var jp=Rt(Ip,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-link",t._g({staticClass:"k-button",attrs:{id:t.id,"aria-current":t.current,autofocus:t.autofocus,"data-theme":t.theme,"data-responsive":t.responsive,rel:t.rel,role:t.role,tabindex:t.tabindex,target:t.target,title:t.tooltip,to:t.link}},t.$listeners),[t.icon?n("k-icon",{staticClass:"k-button-icon",attrs:{type:t.icon,alt:t.tooltip}}):t._e(),t.$slots.default?n("span",{staticClass:"k-button-text"},[t._t("default")],2):t._e()],1)}),[],!1,Dp,null,null,null);function Dp(t){for(let e in Lp)this[e]=Lp[e]}var Bp=function(){return jp.exports}(),Pp={mounted(){this.$el.addEventListener("keyup",this.onTab,!0),this.$el.addEventListener("blur",this.onUntab,!0)},destroyed(){this.$el.removeEventListener("keyup",this.onTab,!0),this.$el.removeEventListener("blur",this.onUntab,!0)},methods:{focus(){this.$el.focus&&this.$el.focus()},onTab(t){9===t.keyCode&&this.$el.setAttribute("data-tabbed",!0)},onUntab(){this.$el.removeAttribute("data-tabbed")},tab(){this.$el.focus(),this.$el.setAttribute("data-tabbed",!0)},untab(){this.$el.removeAttribute("data-tabbed")}}};const Np={mixins:[Pp],inheritAttrs:!1,props:{autofocus:Boolean,click:{type:Function,default:()=>{}},current:[String,Boolean],icon:String,id:[String,Number],responsive:Boolean,role:String,tabindex:String,theme:String,tooltip:String,type:{type:String,default:"button"}}},qp={};var Rp=Rt(Np,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("button",t._g({staticClass:"k-button",attrs:{id:t.id,"aria-current":t.current,autofocus:t.autofocus,"data-theme":t.theme,"data-responsive":t.responsive,role:t.role,tabindex:t.tabindex,title:t.tooltip,type:t.type},on:{click:t.click}},t.$listeners),[t.icon?n("k-icon",{staticClass:"k-button-icon",attrs:{type:t.icon,alt:t.tooltip}}):t._e(),t.$slots.default?n("span",{staticClass:"k-button-text"},[t._t("default")],2):t._e()],1)}),[],!1,Fp,null,null,null);function Fp(t){for(let e in qp)this[e]=qp[e]}var zp=function(){return Rp.exports}();const Yp={};var Hp=Rt({},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("span",{staticClass:"k-dropdown",on:{click:function(t){t.stopPropagation()}}},[t._t("default")],2)}),[],!1,Up,null,null,null);function Up(t){for(let e in Yp)this[e]=Yp[e]}var Kp=function(){return Hp.exports}();let Jp=null;const Gp={};var Vp=Rt({props:{align:{type:String,default:"left"},options:[Array,Function,String],theme:{type:String,default:"dark"}},data:()=>({current:-1,dropup:!1,isOpen:!1,items:[]}),methods:{async fetchOptions(t){if(!this.options)return t(this.items);"string"==typeof this.options?this.$dropdown(this.options)(t):"function"==typeof this.options?this.options(t):Array.isArray(this.options)&&t(this.options)},onOptionClick(t){"function"==typeof t.click?t.click.call(this):t.click&&this.$emit("action",t.click)},open(){this.reset(),Jp&&Jp!==this&&Jp.close(),this.fetchOptions((t=>{this.$events.$on("keydown",this.navigate),this.$events.$on("click",this.close),this.items=t,this.isOpen=!0,Jp=this,this.onOpen(),this.$emit("open")}))},reset(){this.current=-1,this.$events.$off("keydown",this.navigate),this.$events.$off("click",this.close)},close(){this.reset(),this.isOpen=Jp=!1,this.$emit("close")},toggle(){this.isOpen?this.close():this.open()},focus(t=0){var e;(null==(e=this.$children[t])?void 0:e.focus)&&(this.current=t,this.$children[t].focus())},onOpen(){this.dropup=!1,this.$nextTick((()=>{if(this.$el){let t=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,e=50,n=this.$el.getBoundingClientRect().top||0,s=this.$el.clientHeight;n+s>t-e&&s+2*ethis.$children.length-1){const t=this.$children.filter((t=>!1===t.disabled));this.current=this.$children.indexOf(t[t.length-1]);break}if(this.$children[this.current]&&!1===this.$children[this.current].disabled){this.focus(this.current);break}}break;case"Tab":for(;;){if(this.current++,this.current>this.$children.length-1){this.close(),this.$emit("leave",t.code);break}if(this.$children[this.current]&&!1===this.$children[this.current].disabled)break}}}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.isOpen?n("div",{staticClass:"k-dropdown-content",attrs:{"data-align":t.align,"data-dropup":t.dropup,"data-theme":t.theme}},[t._t("default",(function(){return[t._l(t.items,(function(e,s){return["-"===e?n("hr",{key:t._uid+"-item-"+s}):n("k-dropdown-item",t._b({key:t._uid+"-item-"+s,ref:t._uid+"-item-"+s,refInFor:!0,on:{click:function(n){return t.onOptionClick(e)}}},"k-dropdown-item",e,!1),[t._v(" "+t._s(e.text)+" ")])]}))]}))],2):t._e()}),[],!1,Wp,null,null,null);function Wp(t){for(let e in Gp)this[e]=Gp[e]}var Xp=function(){return Vp.exports}();const Zp={inheritAttrs:!1,props:{disabled:Boolean,icon:String,image:[String,Object],link:String,target:String,theme:String,upload:String,current:[String,Boolean]},data(){return{listeners:l(a({},this.$listeners),{click:t=>{this.$parent.close(),this.$emit("click",t)}})}},methods:{focus(){this.$refs.button.focus()},tab(){this.$refs.button.tab()}}},Qp={};var th=Rt(Zp,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("k-button",t._g(t._b({ref:"button",staticClass:"k-dropdown-item"},"k-button",t.$props,!1),t.listeners),[t._t("default")],2)}),[],!1,eh,null,null,null);function eh(t){for(let e in Qp)this[e]=Qp[e]}var nh=function(){return th.exports}();const sh={mixins:[Pp],props:{disabled:Boolean,rel:String,tabindex:[String,Number],target:String,title:String,to:[String,Function]},data(){return{relAttr:"_blank"===this.target?"noreferrer noopener":this.rel,listeners:l(a({},this.$listeners),{click:this.onClick})}},computed:{href(){return"function"==typeof this.to?"":"/"!==this.to[0]||this.target?this.to:this.$url(this.to)}},methods:{isRoutable(t){return!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&(!t.defaultPrevented&&((void 0===t.button||0===t.button)&&(!this.target&&!("string"==typeof this.href&&this.href.indexOf("://")>0))))},onClick(t){if(!0===this.disabled)return t.preventDefault(),!1;"function"==typeof this.to&&(t.preventDefault(),this.to()),this.isRoutable(t)&&(t.preventDefault(),this.$go(this.to)),this.$emit("click",t)}}},ih={};var oh=Rt(sh,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.to&&!t.disabled?n("a",t._g({ref:"link",staticClass:"k-link",attrs:{href:t.href,rel:t.relAttr,tabindex:t.tabindex,target:t.target,title:t.title}},t.listeners),[t._t("default")],2):n("span",{staticClass:"k-link",attrs:{title:t.title,"data-disabled":""}},[t._t("default")],2)}),[],!1,rh,null,null,null);function rh(t){for(let e in ih)this[e]=ih[e]}var ah=function(){return oh.exports}();const lh={};var uh=Rt({computed:{defaultLanguage(){return this.$languages.find((t=>!0===t.default))},language(){return this.$language},languages(){return this.$languages.filter((t=>!1===t.default))}},methods:{change(t){this.$emit("change",t),this.$go(window.location,{query:{language:t.code}})}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.languages.length?n("k-dropdown",{staticClass:"k-languages-dropdown"},[n("k-button",{attrs:{text:t.language.name,responsive:!0,icon:"globe"},on:{click:function(e){return t.$refs.languages.toggle()}}}),t.languages?n("k-dropdown-content",{ref:"languages"},[n("k-dropdown-item",{on:{click:function(e){return t.change(t.defaultLanguage)}}},[t._v(" "+t._s(t.defaultLanguage.name)+" ")]),n("hr"),t._l(t.languages,(function(e){return n("k-dropdown-item",{key:e.code,on:{click:function(n){return t.change(e)}}},[t._v(" "+t._s(e.name)+" ")])}))],2):t._e()],1):t._e()}),[],!1,ch,null,null,null);function ch(t){for(let e in lh)this[e]=lh[e]}var dh=function(){return uh.exports}();const ph={props:{align:{type:String,default:"right"},icon:{type:String,default:"dots"},options:{type:[Array,Function,String],default:()=>[]},text:{type:[Boolean,String],default:!0},theme:{type:String,default:"dark"}},computed:{hasSingleOption(){return Array.isArray(this.options)&&1===this.options.length}},methods:{onAction(t,e,n){this.$emit("action",t,e,n),this.$emit("option",t,e,n)},toggle(){this.$refs.options.toggle()}}},hh={};var fh=Rt(ph,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.hasSingleOption?n("k-button",t._b({staticClass:"k-options-dropdown-toggle",attrs:{icon:t.options[0].icon||t.icon,tooltip:t.options[0].tooltip||t.options[0].text},on:{click:function(e){return t.onAction(t.options[0].option||t.options[0].click,t.options[0],0)}}},"k-button",t.options[0],!1),[!0===t.text?[t._v(" "+t._s(t.options[0].text)+" ")]:!1!==t.text?[t._v(" "+t._s(t.text)+" ")]:t._e()],2):t.options.length?n("k-dropdown",{staticClass:"k-options-dropdown"},[n("k-button",{staticClass:"k-options-dropdown-toggle",attrs:{icon:t.icon,tooltip:t.$t("options")},on:{click:function(e){return t.$refs.options.toggle()}}},[t.text&&!0!==t.text?[t._v(" "+t._s(t.text)+" ")]:t._e()],2),n("k-dropdown-content",{ref:"options",staticClass:"k-options-dropdown-content",attrs:{align:t.align,options:t.options},on:{action:t.onAction}})],1):t._e()}),[],!1,mh,null,null,null);function mh(t){for(let e in hh)this[e]=hh[e]}var gh=function(){return fh.exports}();const kh={props:{align:{type:String,default:"left"},details:{type:Boolean,default:!1},dropdown:{type:Boolean,default:!0},keys:{type:Boolean,default:!1},limit:{type:Number,default:10},page:{type:Number,default:1},pageLabel:{type:String,default:()=>window.panel.$t("pagination.page")},total:{type:Number,default:0},prevLabel:{type:String,default:()=>window.panel.$t("prev")},nextLabel:{type:String,default:()=>window.panel.$t("next")},validate:{type:Function,default:()=>Promise.resolve()}},data(){return{currentPage:this.page}},computed:{show(){return this.pages>1},start(){return(this.currentPage-1)*this.limit+1},end(){let t=this.start-1+this.limit;return t>this.total?this.total:t},detailsText(){return 1===this.limit?this.start+" / ":this.start+"-"+this.end+" / "},pages(){return Math.ceil(this.total/this.limit)},hasPrev(){return this.start>1},hasNext(){return this.endthis.limit},offset(){return this.start-1}},watch:{page(t){this.currentPage=parseInt(t)}},created(){!0===this.keys&&window.addEventListener("keydown",this.navigate,!1)},destroyed(){window.removeEventListener("keydown",this.navigate,!1)},methods:{async goTo(t){try{await this.validate(t),t<1&&(t=1),t>this.pages&&(t=this.pages),this.currentPage=t,this.$refs.dropdown&&this.$refs.dropdown.close(),this.$emit("paginate",{page:this.currentPage,start:this.start,end:this.end,limit:this.limit,offset:this.offset})}catch(e){}},prev(){this.goTo(this.currentPage-1)},next(){this.goTo(this.currentPage+1)},navigate(t){switch(t.code){case"ArrowLeft":this.prev();break;case"ArrowRight":this.next()}}}},vh={};var bh=Rt(kh,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.show?n("nav",{staticClass:"k-pagination",attrs:{"data-align":t.align}},[t.show?n("k-button",{attrs:{disabled:!t.hasPrev,tooltip:t.prevLabel,icon:"angle-left"},on:{click:t.prev}}):t._e(),t.details?[t.dropdown?[n("k-dropdown",[n("k-button",{staticClass:"k-pagination-details",attrs:{disabled:!t.hasPages},on:{click:function(e){return t.$refs.dropdown.toggle()}}},[t.total>1?[t._v(" "+t._s(t.detailsText)+" ")]:t._e(),t._v(" "+t._s(t.total)+" ")],2),n("k-dropdown-content",{ref:"dropdown",staticClass:"k-pagination-selector",on:{open:function(e){t.$nextTick((function(){return t.$refs.page.focus()}))}}},[n("div",{staticClass:"k-pagination-settings"},[n("label",{attrs:{for:"k-pagination-page"}},[n("span",[t._v(t._s(t.pageLabel)+":")]),n("select",{ref:"page",attrs:{id:"k-pagination-page"}},t._l(t.pages,(function(e){return n("option",{key:e,domProps:{selected:t.page===e,value:e}},[t._v(" "+t._s(e)+" ")])})),0)]),n("k-button",{attrs:{icon:"check"},on:{click:function(e){return t.goTo(t.$refs.page.value)}}})],1)])],1)]:[n("span",{staticClass:"k-pagination-details"},[t.total>1?[t._v(" "+t._s(t.detailsText)+" ")]:t._e(),t._v(" "+t._s(t.total)+" ")],2)]]:t._e(),t.show?n("k-button",{attrs:{disabled:!t.hasNext,tooltip:t.nextLabel,icon:"angle-right"},on:{click:t.next}}):t._e()],2):t._e()}),[],!1,yh,null,null,null);function yh(t){for(let e in vh)this[e]=vh[e]}var $h=function(){return bh.exports}();const _h={props:{prev:{type:[Boolean,Object],default:!1},next:{type:[Boolean,Object],default:!1}},computed:{buttons(){return[l(a({},this.button(this.prev)),{icon:"angle-left"}),l(a({},this.button(this.next)),{icon:"angle-right"})]}},methods:{button:t=>t||{disabled:!0,link:"#"}}},wh={};var xh=Rt(_h,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("k-button-group",{staticClass:"k-prev-next",attrs:{buttons:t.buttons}})}),[],!1,Sh,null,null,null);function Sh(t){for(let e in wh)this[e]=wh[e]}var Ch=function(){return xh.exports}();const Oh={};var Eh=Rt({props:{types:{type:Object,default:()=>({})},type:String},data(){return{isLoading:!1,hasResults:!0,items:[],currentType:this.getType(this.type),q:null,selected:-1}},watch:{q(t,e){t!==e&&this.search(this.q)},currentType(t,e){t!==e&&this.search(this.q)},type(){this.currentType=this.getType(this.type)}},created(){this.search=$t(this.search,250),this.$events.$on("keydown.cmd.shift.f",this.open)},destroyed(){this.$events.$off("keydown.cmd.shift.f",this.open)},methods:{changeType(t){this.currentType=this.getType(t),this.$nextTick((()=>{this.$refs.input.focus()}))},close(){this.$refs.overlay.close(),this.hasResults=!0,this.items=[],this.q=null},getType(t){return this.types[t]||this.types[Object.keys(this.types)[0]]},navigate(t){this.$go(t.link),this.close()},onDown(){this.selected=0&&this.select(this.selected-1)},open(){this.$refs.overlay.open()},async search(t){this.isLoading=!0,this.$refs.types&&this.$refs.types.close();try{if(null===t||""===t)throw Error("Empty query");const e=await this.$search(this.currentType.id,t);if(!1===e)throw Error("JSON parsing failed");this.items=e.results}catch(e){this.items=[]}finally{this.select(-1),this.isLoading=!1,this.hasResults=this.items.length>0}},select(t){if(this.selected=t,this.$refs.items){const e=this.$refs.items.$el.querySelectorAll(".k-item");[...e].forEach((t=>delete t.dataset.selected)),t>=0&&(e[t].dataset.selected=!0)}}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-overlay",{ref:"overlay"},[n("div",{staticClass:"k-search",attrs:{role:"search"}},[n("div",{staticClass:"k-search-input"},[n("k-dropdown",{staticClass:"k-search-types"},[n("k-button",{attrs:{icon:t.currentType.icon,text:t.currentType.label},on:{click:function(e){return t.$refs.types.toggle()}}}),n("k-dropdown-content",{ref:"types"},t._l(t.types,(function(e,s){return n("k-dropdown-item",{key:s,attrs:{icon:e.icon},on:{click:function(e){return t.changeType(s)}}},[t._v(" "+t._s(e.label)+" ")])})),1)],1),n("input",{directives:[{name:"model",rawName:"v-model",value:t.q,expression:"q"}],ref:"input",attrs:{placeholder:t.$t("search")+" …","aria-label":t.$t("search"),autofocus:!0,type:"text"},domProps:{value:t.q},on:{input:[function(e){e.target.composing||(t.q=e.target.value)},function(e){t.hasResults=!0}],keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"])?null:(e.preventDefault(),t.onDown.apply(null,arguments))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"up",38,e.key,["Up","ArrowUp"])?null:(e.preventDefault(),t.onUp.apply(null,arguments))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"tab",9,e.key,"Tab")?null:(e.preventDefault(),t.onTab.apply(null,arguments))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.onEnter.apply(null,arguments)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close.apply(null,arguments)}]}}),n("k-button",{staticClass:"k-search-close",attrs:{icon:t.isLoading?"loader":"cancel",tooltip:t.$t("close")},on:{click:t.close}})],1),!t.q||t.hasResults&&!t.items.length?t._e():n("div",{staticClass:"k-search-results"},[t.items.length?n("k-items",{ref:"items",attrs:{items:t.items},on:{hover:t.onHover},nativeOn:{mouseout:function(e){return t.select(-1)}}}):t.hasResults?t._e():n("p",{staticClass:"k-search-empty"},[t._v(" "+t._s(t.$t("search.results.none"))+" ")])],1)])])}),[],!1,Th,null,null,null);function Th(t){for(let e in Oh)this[e]=Oh[e]}var Ah=function(){return Eh.exports}();const Mh={props:{removable:Boolean},methods:{remove(){this.removable&&this.$emit("remove")},focus(){this.$refs.button.focus()}}},Ih={};var Lh=Rt(Mh,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{ref:"button",staticClass:"k-tag",attrs:{tabindex:"0"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"delete",[8,46],e.key,["Backspace","Delete","Del"])?null:(e.preventDefault(),t.remove.apply(null,arguments))}}},[n("span",{staticClass:"k-tag-text"},[t._t("default")],2),t.removable?n("span",{staticClass:"k-tag-toggle",on:{click:t.remove}},[t._v("×")]):t._e()])}),[],!1,jh,null,null,null);function jh(t){for(let e in Ih)this[e]=Ih[e]}var Dh=function(){return Lh.exports}();const Bh={props:{breadcrumb:Array,license:Boolean,menu:Array,title:String,view:Object},computed:{notification(){return this.$store.state.notification.type&&"error"!==this.$store.state.notification.type?this.$store.state.notification:null}}},Ph={};var Nh=Rt(Bh,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-topbar"},[n("k-view",[n("div",{staticClass:"k-topbar-wrapper"},[n("k-dropdown",{staticClass:"k-topbar-menu"},[n("k-button",{staticClass:"k-topbar-button k-topbar-menu-button",attrs:{tooltip:t.$t("menu"),icon:"bars"},on:{click:function(e){return t.$refs.menu.toggle()}}},[n("k-icon",{attrs:{type:"angle-down"}})],1),n("k-dropdown-content",{ref:"menu",staticClass:"k-topbar-menu",attrs:{options:t.menu,theme:"light"}})],1),n("k-breadcrumb",{staticClass:"k-topbar-breadcrumb",attrs:{crumbs:t.breadcrumb,view:t.view}}),n("div",{staticClass:"k-topbar-signals"},[t.notification?n("k-button",{staticClass:"k-topbar-notification k-topbar-button",attrs:{text:t.notification.message,theme:"positive"},on:{click:function(e){return t.$store.dispatch("notification/close")}}}):t.license?t._e():n("k-registration"),n("k-form-indicator"),n("k-button",{staticClass:"k-topbar-button",attrs:{tooltip:t.$t("search"),icon:"search"},on:{click:function(e){return t.$refs.search.open()}}})],1)],1)]),n("k-search",{ref:"search",attrs:{type:t.$view.search||"pages",types:t.$searches}})],1)}),[],!1,qh,null,null,null);function qh(t){for(let e in Ph)this[e]=Ph[e]}var Rh=function(){return Nh.exports}();const Fh={props:{empty:String,blueprint:String,lock:[Boolean,Object],parent:String,tab:Object},computed:{content(){return this.$store.getters["content/values"]()}},methods:{exists(t){return this.$helper.isComponent(`k-${t}-section`)},meetsCondition(t){if(!t.when)return!0;let e=!0;return Object.keys(t.when).forEach((n=>{this.content[n.toLowerCase()]!==t.when[n]&&(e=!1)})),e}}},zh={};var Yh=Rt(Fh,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return 0===t.tab.columns.length?n("k-box",{attrs:{html:!0,text:t.empty,theme:"info"}}):n("k-grid",{staticClass:"k-sections",attrs:{gutter:"large"}},t._l(t.tab.columns,(function(e,s){return n("k-column",{key:t.parent+"-column-"+s,attrs:{width:e.width,sticky:e.sticky}},[t._l(e.sections,(function(i,o){return[t.meetsCondition(i)?[t.exists(i.type)?n("k-"+i.type+"-section",t._b({key:t.parent+"-column-"+s+"-section-"+o+"-"+t.blueprint,tag:"component",class:"k-section k-section-name-"+i.name,attrs:{column:e.width,lock:t.lock,name:i.name,parent:t.parent,timestamp:t.$view.timestamp},on:{submit:function(e){return t.$emit("submit",e)}}},"component",i,!1)):[n("k-box",{key:t.parent+"-column-"+s+"-section-"+o,attrs:{text:t.$t("error.section.type.invalid",{type:i.type}),theme:"negative"}})]]:t._e()]}))],2)})),1)}),[],!1,Hh,null,null,null);function Hh(t){for(let e in zh)this[e]=zh[e]}var Uh=function(){return Yh.exports}();const Kh={};var Jh=Rt({mixins:[Nt],data:()=>({headline:null,text:null,theme:null}),async created(){const t=await this.load();this.headline=t.headline,this.text=t.text,this.theme=t.theme||"info"}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("section",{staticClass:"k-info-section"},[n("k-headline",{staticClass:"k-info-section-headline"},[t._v(" "+t._s(t.headline)+" ")]),n("k-box",{attrs:{theme:t.theme}},[n("k-text",{domProps:{innerHTML:t._s(t.text)}})],1)],1)}),[],!1,Gh,null,null,null);function Gh(t){for(let e in Kh)this[e]=Kh[e]}var Vh=function(){return Jh.exports}(),Wh={inheritAttrs:!1,props:{blueprint:String,column:String,parent:String,name:String,timestamp:Number},data:()=>({data:[],error:null,isLoading:!1,isProcessing:!1,options:{empty:null,headline:null,help:null,layout:"list",link:null,max:null,min:null,size:null,sortable:null},pagination:{page:null}}),computed:{headline(){return this.options.headline||" "},help(){return this.options.help},isInvalid(){return!!(this.options.min&&this.data.lengththis.options.max)},paginationId(){return"kirby$pagination$"+this.parent+"/"+this.name}},watch:{timestamp(){this.reload()}},methods:{items:t=>t,async load(t){t||(this.isLoading=!0),this.isProcessing=!0,null===this.pagination.page&&(this.pagination.page=localStorage.getItem(this.paginationId)||1);try{const t=await this.$api.get(this.parent+"/sections/"+this.name,{page:this.pagination.page});this.options=t.options,this.pagination=t.pagination,this.data=this.items(t.data)}catch(e){this.error=e.message}finally{this.isProcessing=!1,this.isLoading=!1}},paginate(t){localStorage.setItem(this.paginationId,t.page),this.pagination=t,this.reload()},async reload(){await this.load(!0)}}};const Xh={};var Zh=Rt({mixins:[Wh],computed:{add(){return this.options.add&&this.$permissions.pages.create}},created(){this.load(),this.$events.$on("page.changeStatus",this.reload),this.$events.$on("page.sort",this.reload)},destroyed(){this.$events.$off("page.changeStatus",this.reload),this.$events.$off("page.sort",this.reload)},methods:{create(){this.add&&this.$dialog("pages/create",{query:{parent:this.options.link||this.parent,view:this.parent,section:this.name}})},items(t){return t.map((e=>{const n=!1!==e.permissions.changeStatus;return e.flag={status:e.status,tooltip:this.$t("page.status"),disabled:!n,click:()=>{this.$dialog(e.link+"/changeStatus")}},e.sortable=e.permissions.sort&&this.options.sortable,e.deletable=t.length>this.options.min,e.column=this.column,e.options=this.$dropdown(e.link,{query:{view:"list",delete:e.deletable,sort:e.sortable}}),e.data={"data-id":e.id,"data-status":e.status,"data-template":e.template},e}))},async sort(t){let e=null;if(t.added&&(e="added"),t.moved&&(e="moved"),e){this.isProcessing=!0;const s=t[e].element,i=t[e].newIndex+1+this.pagination.offset;try{await this.$api.pages.status(s.id,"listed",i),this.$store.dispatch("notification/success",":)"),this.$events.$emit("page.sort",s)}catch(n){this.$store.dispatch("notification/error",{message:n.message,details:n.details}),await this.reload()}finally{this.isProcessing=!1}}},update(){this.reload(),this.$events.$emit("model.update")}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return!1===t.isLoading?n("section",{staticClass:"k-pages-section",attrs:{"data-processing":t.isProcessing}},[n("header",{staticClass:"k-section-header"},[n("k-headline",{attrs:{link:t.options.link}},[t._v(" "+t._s(t.headline)+" "),t.options.min?n("abbr",{attrs:{title:t.$t("section.required")}},[t._v("*")]):t._e()]),t.add?n("k-button-group",{attrs:{buttons:[{text:t.$t("add"),icon:"add",click:t.create}]}}):t._e()],1),t.error?[n("k-box",{attrs:{theme:"negative"}},[n("k-text",{attrs:{size:"small"}},[n("strong",[t._v(" "+t._s(t.$t("error.section.notLoaded",{name:t.name}))+": ")]),t._v(" "+t._s(t.error)+" ")])],1)]:[t.data.length?n("k-collection",{attrs:{layout:t.options.layout,help:t.help,items:t.data,pagination:t.pagination,sortable:!t.isProcessing&&t.options.sortable,size:t.options.size,"data-invalid":t.isInvalid},on:{change:t.sort,paginate:t.paginate}}):[n("k-empty",t._g({attrs:{layout:t.options.layout,"data-invalid":t.isInvalid,icon:"page"}},t.add?{click:t.create}:{}),[t._v(" "+t._s(t.options.empty||t.$t("pages.empty"))+" ")]),n("footer",{staticClass:"k-collection-footer"},[t.help?n("k-text",{staticClass:"k-collection-help",attrs:{theme:"help"},domProps:{innerHTML:t._s(t.help)}}):t._e()],1)]]],2):t._e()}),[],!1,Qh,null,null,null);function Qh(t){for(let e in Xh)this[e]=Xh[e]}var tf=function(){return Zh.exports}();const ef={};var nf=Rt({mixins:[Wh],computed:{add(){return!(!this.$permissions.files.create||!1===this.options.upload)&&this.options.upload}},created(){this.load(),this.$events.$on("model.update",this.reload),this.$events.$on("file.sort",this.reload)},destroyed(){this.$events.$off("model.update",this.reload),this.$events.$off("file.sort",this.reload)},methods:{action(t,e){"replace"===t&&this.replace(e)},drop(t){if(!1===this.add)return!1;this.$refs.upload.drop(t,l(a({},this.add),{url:this.$urls.api+"/"+this.add.api}))},items(t){return t.map((e=>(e.sortable=this.options.sortable,e.column=this.column,e.options=this.$dropdown(e.link,{query:{view:"list",update:this.options.sortable,delete:t.length>this.options.min}}),e.data={"data-id":e.id,"data-template":e.template},e)))},replace(t){this.$refs.upload.open({url:this.$urls.api+"/"+t.link,accept:"."+t.extension+","+t.mime,multiple:!1})},async sort(t){if(!1===this.options.sortable)return!1;this.isProcessing=!0,t=t.map((t=>t.id));try{await this.$api.patch(this.options.apiUrl+"/files/sort",{files:t,index:this.pagination.offset}),this.$store.dispatch("notification/success",":)"),this.$events.$emit("file.sort")}catch(e){this.reload(),this.$store.dispatch("notification/error",e.message)}finally{this.isProcessing=!1}},update(){this.$events.$emit("model.update")},upload(){if(!1===this.add)return!1;this.$refs.upload.open(l(a({},this.add),{url:this.$urls.api+"/"+this.add.api}))},uploaded(){this.$events.$emit("file.create"),this.$events.$emit("model.update"),this.$store.dispatch("notification/success",":)")}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return!1===t.isLoading?n("section",{staticClass:"k-files-section",attrs:{"data-processing":t.isProcessing}},[n("header",{staticClass:"k-section-header"},[n("k-headline",[t._v(" "+t._s(t.headline)+" "),t.options.min?n("abbr",{attrs:{title:t.$t("section.required")}},[t._v("*")]):t._e()]),t.add?n("k-button-group",{attrs:{buttons:[{text:t.$t("add"),icon:"upload",click:t.upload}]}}):t._e()],1),t.error?[n("k-box",{attrs:{theme:"negative"}},[n("k-text",{attrs:{size:"small"}},[n("strong",[t._v(t._s(t.$t("error.section.notLoaded",{name:t.name}))+":")]),t._v(" "+t._s(t.error)+" ")])],1)]:[n("k-dropzone",{attrs:{disabled:!1===t.add},on:{drop:t.drop}},[t.data.length?n("k-collection",{attrs:{help:t.help,items:t.data,layout:t.options.layout,pagination:t.pagination,sortable:!t.isProcessing&&t.options.sortable,size:t.options.size,"data-invalid":t.isInvalid},on:{sort:t.sort,paginate:t.paginate,action:t.action}}):[n("k-empty",t._g({attrs:{layout:t.options.layout,"data-invalid":t.isInvalid,icon:"image"}},t.add?{click:t.upload}:{}),[t._v(" "+t._s(t.options.empty||t.$t("files.empty"))+" ")]),n("footer",{staticClass:"k-collection-footer"},[t.help?n("k-text",{staticClass:"k-collection-help",attrs:{theme:"help"},domProps:{innerHTML:t._s(t.help)}}):t._e()],1)]],2),n("k-upload",{ref:"upload",on:{success:t.uploaded,error:t.reload}})]],2):t._e()}),[],!1,sf,null,null,null);function sf(t){for(let e in ef)this[e]=ef[e]}var of=function(){return nf.exports}();const rf={};var af=Rt({mixins:[Nt],inheritAttrs:!1,data:()=>({fields:{},isLoading:!0,issue:null}),computed:{values(){return this.$store.getters["content/values"]()}},watch:{timestamp(){this.fetch()}},created(){this.input=$t(this.input,50),this.fetch()},methods:{input(t,e,n){this.$store.dispatch("content/update",[n,t[n]])},async fetch(){try{const t=await this.load();this.fields=t.fields,Object.keys(this.fields).forEach((t=>{this.fields[t].section=this.name,this.fields[t].endpoints={field:this.parent+"/fields/"+t,section:this.parent+"/sections/"+this.name,model:this.parent}}))}catch(t){this.issue=t}finally{this.isLoading=!1}},onSubmit(t){this.$events.$emit("keydown.cmd.s",t)}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.isLoading?t._e():n("section",{staticClass:"k-fields-section"},[t.issue?[n("k-headline",{staticClass:"k-fields-issue-headline"},[t._v(" Error ")]),n("k-box",{attrs:{text:t.issue.message,html:!1,theme:"negative"}})]:t._e(),n("k-form",{attrs:{fields:t.fields,validate:!0,value:t.values,disabled:t.lock&&"lock"===t.lock.state},on:{input:t.input,submit:t.onSubmit}})],2)}),[],!1,lf,null,null,null);function lf(t){for(let e in rf)this[e]=rf[e]}var uf=function(){return af.exports}();const cf={props:{blueprint:String,next:Object,prev:Object,permissions:{type:Object,default:()=>({})},lock:{type:[Boolean,Object]},model:{type:Object,default:()=>({})},tab:{type:Object,default:()=>({columns:[]})},tabs:{type:Array,default:()=>[]}},computed:{id(){return this.model.link},isLocked(){var t;return"lock"===(null==(t=this.lock)?void 0:t.state)},protectedFields:()=>[]},watch:{"model.id":{handler(){this.content()},immediate:!0}},created(){this.$events.$on("model.reload",this.reload),this.$events.$on("keydown.left",this.toPrev),this.$events.$on("keydown.right",this.toNext)},destroyed(){this.$events.$off("model.reload",this.reload),this.$events.$off("keydown.left",this.toPrev),this.$events.$off("keydown.right",this.toNext)},methods:{content(){this.$store.dispatch("content/create",{id:this.id,api:this.id,content:this.model.content,ignore:this.protectedFields})},async reload(){await this.$reload(),this.content()},toPrev(t){this.prev&&"body"===t.target.localName&&this.$go(this.prev.link)},toNext(t){this.next&&"body"===t.target.localName&&this.$go(this.next.link)}}};const df={};var pf=Rt(cf,undefined,undefined,!1,hf,null,null,null);function hf(t){for(let e in df)this[e]=df[e]}var ff=function(){return pf.exports}();const mf={};var gf=Rt({extends:ff,computed:{avatarOptions(){return[{icon:"upload",text:this.$t("change"),click:()=>this.$refs.upload.open()},{icon:"trash",text:this.$t("delete"),click:this.deleteAvatar}]},buttons(){return[{icon:"email",text:`${this.$t("email")}: ${this.model.email}`,disabled:!this.permissions.changeEmail||this.isLocked,click:()=>this.$dialog(this.id+"/changeEmail")},{icon:"bolt",text:`${this.$t("role")}: ${this.model.role}`,disabled:!this.permissions.changeRole||this.isLocked,click:()=>this.$dialog(this.id+"/changeRole")},{icon:"globe",text:`${this.$t("language")}: ${this.model.language}`,disabled:!this.permissions.changeLanguage||this.isLocked,click:()=>this.$dialog(this.id+"/changeLanguage")}]},uploadApi(){return this.$urls.api+"/"+this.id+"/avatar"}},methods:{async deleteAvatar(){await this.$api.users.deleteAvatar(this.model.id),this.avatar=null,this.$store.dispatch("notification/success",":)"),this.$reload()},onAvatar(){this.model.avatar?this.$refs.picture.toggle():this.$refs.upload.open()},uploadedAvatar(){this.$store.dispatch("notification/success",":)"),this.$reload()}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-inside",{scopedSlots:t._u([{key:"footer",fn:function(){return[n("k-form-buttons",{attrs:{lock:t.lock}})]},proxy:!0}])},[n("div",{staticClass:"k-user-view",attrs:{"data-locked":t.isLocked,"data-id":t.model.id,"data-template":t.blueprint}},[n("div",{staticClass:"k-user-profile"},[n("k-view",[n("k-dropdown",[n("k-button",{staticClass:"k-user-view-image",attrs:{tooltip:t.$t("avatar"),disabled:t.isLocked},on:{click:t.onAvatar}},[t.model.avatar?n("k-image",{attrs:{cover:!0,src:t.model.avatar,ratio:"1/1"}}):n("k-icon",{attrs:{back:"gray-900",color:"gray-200",type:"user"}})],1),t.model.avatar?n("k-dropdown-content",{ref:"picture",attrs:{options:t.avatarOptions}}):t._e()],1),n("k-button-group",{attrs:{buttons:t.buttons}})],1)],1),n("k-view",[n("k-header",{attrs:{editable:t.permissions.changeName&&!t.isLocked,tab:t.tab.name,tabs:t.tabs},on:{edit:function(e){return t.$dialog(t.id+"/changeName")}},scopedSlots:t._u([{key:"left",fn:function(){return[n("k-button-group",[n("k-dropdown",{staticClass:"k-user-view-options"},[n("k-button",{attrs:{disabled:t.isLocked,text:t.$t("settings"),icon:"cog"},on:{click:function(e){return t.$refs.settings.toggle()}}}),n("k-dropdown-content",{ref:"settings",attrs:{options:t.$dropdown(t.id)}})],1),n("k-languages-dropdown")],1)]},proxy:!0},{key:"right",fn:function(){return[t.model.account?t._e():n("k-prev-next",{attrs:{prev:t.prev,next:t.next}})]},proxy:!0}])},[t.model.name&&0!==t.model.name.length?[t._v(" "+t._s(t.model.name)+" ")]:n("span",{staticClass:"k-user-name-placeholder"},[t._v(" "+t._s(t.$t("name"))+" … ")])],2),n("k-sections",{attrs:{blueprint:t.blueprint,empty:t.$t("user.blueprint",{blueprint:t.$esc(t.blueprint)}),lock:t.lock,parent:t.id,tab:t.tab}}),n("k-upload",{ref:"upload",attrs:{url:t.uploadApi,multiple:!1,accept:"image/*"},on:{success:t.uploadedAvatar}})],1)],1)])}),[],!1,kf,null,null,null);function kf(t){for(let e in mf)this[e]=mf[e]}var vf=function(){return gf.exports}();const bf={};var yf=Rt({extends:vf,prevnext:!1},undefined,undefined,!1,$f,null,null,null);function $f(t){for(let e in bf)this[e]=bf[e]}var _f=function(){return yf.exports}();const wf={};var xf=Rt({props:{error:String,layout:String}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-"+t.layout,{tag:"component"},[n("k-view",{staticClass:"k-error-view"},[n("div",{staticClass:"k-error-view-content"},[n("k-text",[n("p",[n("k-icon",{staticClass:"k-error-view-icon",attrs:{type:"alert"}})],1),t._t("default",(function(){return[n("p",[t._v(" "+t._s(t.error)+" ")])]}))],2)],1)])],1)}),[],!1,Sf,null,null,null);function Sf(t){for(let e in wf)this[e]=wf[e]}var Cf=function(){return xf.exports}();const Of={};var Ef=Rt({extends:ff,props:{preview:Object},methods:{action(t){if("replace"===t)this.$refs.upload.open({url:this.$urls.api+"/"+this.id,accept:"."+this.model.extension+","+this.model.mime,multiple:!1})},onUpload(){this.$store.dispatch("notification/success",":)"),this.$reload()}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-inside",{scopedSlots:t._u([{key:"footer",fn:function(){return[n("k-form-buttons",{attrs:{lock:t.lock}})]},proxy:!0}])},[n("div",{staticClass:"k-file-view",attrs:{"data-locked":t.isLocked,"data-id":t.model.id,"data-template":t.blueprint}},[n("k-file-preview",t._b({},"k-file-preview",t.preview,!1)),n("k-view",{staticClass:"k-file-content"},[n("k-header",{attrs:{editable:t.permissions.changeName&&!t.isLocked,tab:t.tab.name,tabs:t.tabs},on:{edit:function(e){return t.$dialog(t.id+"/changeName")}},scopedSlots:t._u([{key:"left",fn:function(){return[n("k-button-group",[n("k-button",{staticClass:"k-file-view-options",attrs:{link:t.preview.url,responsive:!0,text:t.$t("open"),icon:"open",target:"_blank"}}),n("k-dropdown",{staticClass:"k-file-view-options"},[n("k-button",{attrs:{disabled:t.isLocked,responsive:!0,text:t.$t("settings"),icon:"cog"},on:{click:function(e){return t.$refs.settings.toggle()}}}),n("k-dropdown-content",{ref:"settings",attrs:{options:t.$dropdown(t.id)},on:{action:t.action}})],1),n("k-languages-dropdown")],1)]},proxy:!0},{key:"right",fn:function(){return[n("k-prev-next",{attrs:{prev:t.prev,next:t.next}})]},proxy:!0}])},[t._v(" "+t._s(t.model.filename)+" ")]),n("k-sections",{attrs:{blueprint:t.blueprint,empty:t.$t("file.blueprint",{blueprint:t.$esc(t.blueprint)}),lock:t.lock,parent:t.id,tab:t.tab}}),n("k-upload",{ref:"upload",on:{success:t.onUpload}})],1)],1)])}),[],!1,Tf,null,null,null);function Tf(t){for(let e in Of)this[e]=Of[e]}var Af=function(){return Ef.exports}();const Mf={props:{isInstallable:Boolean,isInstalled:Boolean,isOk:Boolean,requirements:Object,translations:Array},data(){return{user:{name:"",email:"",language:this.$translation.code,password:"",role:"admin"}}},computed:{fields(){return{email:{label:this.$t("email"),type:"email",link:!1,autofocus:!0,required:!0},password:{label:this.$t("password"),type:"password",placeholder:this.$t("password")+" …",required:!0},language:{label:this.$t("language"),type:"select",options:this.translations,icon:"globe",empty:!1,required:!0}}},isReady(){return this.isOk&&this.isInstallable},isComplete(){return this.isOk&&this.isInstalled}},methods:{async install(){try{await this.$api.system.install(this.user),await this.$reload({globals:["$system","$translation"]}),this.$store.dispatch("notification/success",this.$t("welcome")+"!")}catch(t){this.$store.dispatch("notification/error",t)}}}},If={};var Lf=Rt(Mf,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-panel",[n("k-view",{staticClass:"k-installation-view",attrs:{align:"center"}},[t.isComplete?n("k-text",[n("k-headline",[t._v(t._s(t.$t("installation.completed")))]),n("k-link",{attrs:{to:"/login"}},[t._v(" "+t._s(t.$t("login"))+" ")])],1):t.isReady?n("form",{on:{submit:function(e){return e.preventDefault(),t.install.apply(null,arguments)}}},[n("h1",{staticClass:"sr-only"},[t._v(" "+t._s(t.$t("installation"))+" ")]),n("k-fieldset",{attrs:{fields:t.fields,novalidate:!0},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}}),n("k-button",{attrs:{text:t.$t("install"),type:"submit",icon:"check"}})],1):n("div",[n("k-headline",[t._v(" "+t._s(t.$t("installation.issues.headline"))+" ")]),n("ul",{staticClass:"k-installation-issues"},[!1===t.isInstallable?n("li",[n("k-icon",{attrs:{type:"alert"}}),n("span",{domProps:{innerHTML:t._s(t.$t("installation.disabled"))}})],1):t._e(),!1===t.requirements.php?n("li",[n("k-icon",{attrs:{type:"alert"}}),n("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.php"))}})],1):t._e(),!1===t.requirements.server?n("li",[n("k-icon",{attrs:{type:"alert"}}),n("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.server"))}})],1):t._e(),!1===t.requirements.mbstring?n("li",[n("k-icon",{attrs:{type:"alert"}}),n("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.mbstring"))}})],1):t._e(),!1===t.requirements.curl?n("li",[n("k-icon",{attrs:{type:"alert"}}),n("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.curl"))}})],1):t._e(),!1===t.requirements.accounts?n("li",[n("k-icon",{attrs:{type:"alert"}}),n("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.accounts"))}})],1):t._e(),!1===t.requirements.content?n("li",[n("k-icon",{attrs:{type:"alert"}}),n("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.content"))}})],1):t._e(),!1===t.requirements.media?n("li",[n("k-icon",{attrs:{type:"alert"}}),n("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.media"))}})],1):t._e(),!1===t.requirements.sessions?n("li",[n("k-icon",{attrs:{type:"alert"}}),n("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.sessions"))}})],1):t._e()]),n("k-button",{attrs:{text:t.$t("retry"),icon:"refresh"},on:{click:t.$reload}})],1)],1)],1)}),[],!1,jf,null,null,null);function jf(t){for(let e in If)this[e]=If[e]}var Df=function(){return Lf.exports}();const Bf={};var Pf=Rt({props:{languages:{type:Array,default:()=>[]}},computed:{languagesCollection(){return this.languages.map((t=>l(a({},t),{image:{back:"black",color:"gray",icon:"globe"},link:()=>{this.$dialog(`languages/${t.id}/update`)},options:[{icon:"edit",text:this.$t("edit"),click(){this.$dialog(`languages/${t.id}/update`)}},{icon:"trash",text:this.$t("delete"),disabled:t.default&&1!==this.languages.length,click(){this.$dialog(`languages/${t.id}/delete`)}}]})))},primaryLanguage(){return this.languagesCollection.filter((t=>t.default))},secondaryLanguages(){return this.languagesCollection.filter((t=>!1===t.default))}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-inside",[n("k-view",{staticClass:"k-languages-view"},[n("k-header",[t._v(" "+t._s(t.$t("view.languages"))+" "),n("k-button-group",{attrs:{slot:"left"},slot:"left"},[n("k-button",{attrs:{text:t.$t("language.create"),icon:"add"},on:{click:function(e){return t.$dialog("languages/create")}}})],1)],1),n("section",{staticClass:"k-languages"},[t.languages.length>0?[n("section",{staticClass:"k-languages-view-section"},[n("header",{staticClass:"k-languages-view-section-header"},[n("k-headline",[t._v(t._s(t.$t("languages.default")))])],1),n("k-collection",{attrs:{items:t.primaryLanguage}})],1),n("section",{staticClass:"k-languages-view-section"},[n("header",{staticClass:"k-languages-view-section-header"},[n("k-headline",[t._v(t._s(t.$t("languages.secondary")))])],1),t.secondaryLanguages.length?n("k-collection",{attrs:{items:t.secondaryLanguages}}):n("k-empty",{attrs:{icon:"globe"},on:{click:function(e){return t.$dialog("languages/create")}}},[t._v(" "+t._s(t.$t("languages.secondary.empty"))+" ")])],1)]:0===t.languages.length?[n("k-empty",{attrs:{icon:"globe"},on:{click:function(e){return t.$dialog("languages/create")}}},[t._v(" "+t._s(t.$t("languages.empty"))+" ")])]:t._e()],2)],1)],1)}),[],!1,Nf,null,null,null);function Nf(t){for(let e in Bf)this[e]=Bf[e]}var qf=function(){return Pf.exports}(),Rf=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-panel",["login"===t.form?n("k-view",{staticClass:"k-login-view",attrs:{align:"center"}},[n("k-login-plugin",{attrs:{methods:t.methods}})],1):"code"===t.form?n("k-view",{staticClass:"k-login-code-view",attrs:{align:"center"}},[n("k-login-code",t._b({},"k-login-code",t.$props,!1))],1):t._e()],1)},Ff=[];const zf={components:{"k-login-plugin":window.panel.plugins.login||Un},props:{methods:Array,pending:Object},computed:{form(){return this.pending.email?"code":this.$user?null:"login"}},created(){this.$store.dispatch("content/clear")}},Yf={};var Hf=Rt(zf,Rf,Ff,!1,Uf,null,null,null);function Uf(t){for(let e in Yf)this[e]=Yf[e]}var Kf=function(){return Hf.exports}();const Jf={};var Gf=Rt({extends:ff,props:{status:Object},computed:{protectedFields:()=>["title"]}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-inside",{scopedSlots:t._u([{key:"footer",fn:function(){return[n("k-form-buttons",{attrs:{lock:t.lock}})]},proxy:!0}])},[n("k-view",{staticClass:"k-page-view",attrs:{"data-locked":t.isLocked,"data-id":t.model.id,"data-template":t.blueprint}},[n("k-header",{attrs:{editable:t.permissions.changeTitle&&!t.isLocked,tab:t.tab.name,tabs:t.tabs},on:{edit:function(e){return t.$dialog(t.id+"/changeTitle")}},scopedSlots:t._u([{key:"left",fn:function(){return[n("k-button-group",[t.permissions.preview&&t.model.previewUrl?n("k-button",{staticClass:"k-page-view-preview",attrs:{link:t.model.previewUrl,responsive:!0,text:t.$t("open"),icon:"open",target:"_blank"}}):t._e(),t.status?n("k-status-icon",{attrs:{status:t.model.status,disabled:!t.permissions.changeStatus||t.isLocked,responsive:!0,text:t.status.label},on:{click:function(e){return t.$dialog(t.id+"/changeStatus")}}}):t._e(),n("k-dropdown",{staticClass:"k-page-view-options"},[n("k-button",{attrs:{disabled:!0===t.isLocked,responsive:!0,text:t.$t("settings"),icon:"cog"},on:{click:function(e){return t.$refs.settings.toggle()}}}),n("k-dropdown-content",{ref:"settings",attrs:{options:t.$dropdown(t.id)}})],1),n("k-languages-dropdown")],1)]},proxy:!0},{key:"right",fn:function(){return[t.model.id?n("k-prev-next",{attrs:{prev:t.prev,next:t.next}}):t._e()]},proxy:!0}])},[t._v(" "+t._s(t.model.title)+" ")]),n("k-sections",{attrs:{blueprint:t.blueprint,empty:t.$t("page.blueprint",{blueprint:t.$esc(t.blueprint)}),lock:t.lock,parent:t.id,tab:t.tab}})],1)],1)}),[],!1,Vf,null,null,null);function Vf(t){for(let e in Jf)this[e]=Jf[e]}var Wf=function(){return Gf.exports}();const Xf={};var Zf=Rt({props:{id:String},computed:{view(){return"k-"+this.id+"-plugin-view"}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-inside",[n(t.view,{tag:"component"})],1)}),[],!1,Qf,null,null,null);function Qf(t){for(let e in Xf)this[e]=Xf[e]}var tm=function(){return Zf.exports}();const em={};var nm=Rt({data:()=>({isLoading:!1,issue:"",values:{password:null,passwordConfirmation:null}}),computed:{fields(){return{password:{autofocus:!0,label:this.$t("user.changePassword.new"),icon:"key",type:"password"},passwordConfirmation:{label:this.$t("user.changePassword.new.confirm"),icon:"key",type:"password"}}}},mounted(){this.$store.dispatch("title",this.$t("view.resetPassword"))},methods:{async submit(){if(!this.values.password||this.values.password.length<8)return this.issue=this.$t("error.user.password.invalid"),!1;if(this.values.password!==this.values.passwordConfirmation)return this.issue=this.$t("error.user.password.notSame"),!1;this.isLoading=!0;try{await this.$api.users.changePassword(this.$user.id,this.values.password),this.$store.dispatch("notification/success",":)"),this.$go("/")}catch(t){this.issue=t.message}finally{this.isLoading=!1}}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-inside",[n("k-view",{staticClass:"k-password-reset-view",attrs:{align:"center"}},[n("k-form",{attrs:{fields:t.fields,"submit-button":t.$t("change")},on:{submit:t.submit},scopedSlots:t._u([{key:"header",fn:function(){return[n("h1",{staticClass:"sr-only"},[t._v(" "+t._s(t.$t("view.resetPassword"))+" ")]),t.issue?n("k-login-alert",{on:{click:function(e){t.issue=null}}},[t._v(" "+t._s(t.issue)+" ")]):t._e(),n("k-user-info",{attrs:{user:t.$user}})]},proxy:!0},{key:"footer",fn:function(){return[n("div",{staticClass:"k-login-buttons"},[n("k-button",{staticClass:"k-login-button",attrs:{icon:"check",type:"submit"}},[t._v(" "+t._s(t.$t("change"))+" "),t.isLoading?[t._v(" … ")]:t._e()],2)],1)]},proxy:!0}]),model:{value:t.values,callback:function(e){t.values=e},expression:"values"}})],1)],1)}),[],!1,sm,null,null,null);function sm(t){for(let e in em)this[e]=em[e]}var im=function(){return nm.exports}();const om={};var rm=Rt({extends:ff,computed:{protectedFields:()=>["title"]}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-inside",{scopedSlots:t._u([{key:"footer",fn:function(){return[n("k-form-buttons",{attrs:{lock:t.lock}})]},proxy:!0}])},[n("k-view",{staticClass:"k-site-view",attrs:{"data-locked":t.isLocked,"data-id":"/","data-template":"site"}},[n("k-header",{attrs:{editable:t.permissions.changeTitle&&!t.isLocked,tabs:t.tabs,tab:t.tab.name},on:{edit:function(e){return t.$dialog("site/changeTitle")}},scopedSlots:t._u([{key:"left",fn:function(){return[n("k-button-group",[n("k-button",{staticClass:"k-site-view-preview",attrs:{link:t.model.previewUrl,responsive:!0,text:t.$t("open"),icon:"open",target:"_blank"}}),n("k-languages-dropdown")],1)]},proxy:!0}])},[t._v(" "+t._s(t.model.title)+" ")]),n("k-sections",{attrs:{blueprint:t.blueprint,empty:t.$t("site.blueprint"),lock:t.lock,tab:t.tab,parent:"site"},on:{submit:function(e){return t.$emit("submit",e)}}})],1)],1)}),[],!1,am,null,null,null);function am(t){for(let e in om)this[e]=om[e]}var lm=function(){return rm.exports}();const um={props:{debug:Boolean,license:String,php:String,plugins:Array,server:String,https:Boolean,version:String}},cm={};var dm=Rt(um,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-inside",[n("k-view",{staticClass:"k-system-view"},[n("k-header",[t._v(" "+t._s(t.$t("view.system"))+" ")]),n("section",{staticClass:"k-system-view-section"},[n("header",{staticClass:"k-system-view-section-header"},[n("k-headline",[t._v("Kirby")])],1),n("ul",{staticClass:"k-system-info-box",staticStyle:{"--columns":"2"}},[n("li",[n("dl",[n("dt",[t._v(t._s(t.$t("license")))]),n("dd",[t.$license?[t._v(" "+t._s(t.license)+" ")]:n("k-button",{staticClass:"k-system-warning",on:{click:function(e){return t.$dialog("registration")}}},[t._v(" "+t._s(t.$t("license.unregistered"))+" ")])],2)])]),n("li",[n("dl",[n("dt",[t._v(t._s(t.$t("version")))]),n("dd",{attrs:{dir:"ltr"}},[n("k-link",{attrs:{to:"https://github.com/getkirby/kirby/releases/tag/"+t.version}},[t._v(" "+t._s(t.version)+" ")])],1)])])])]),n("section",{staticClass:"k-system-view-section"},[n("header",{staticClass:"k-system-view-section-header"},[n("k-headline",[t._v(t._s(t.$t("environment")))])],1),n("ul",{staticClass:"k-system-info-box",staticStyle:{"--columns":"4"}},[n("li",[n("dl",[n("dt",[t._v(t._s(t.$t("debugging")))]),n("dd",{class:{"k-system-warning":t.debug}},[t._v(" "+t._s(t.debug?t.$t("on"):t.$t("off"))+" ")])])]),n("li",[n("dl",[n("dt",[t._v("HTTPS")]),n("dd",{class:{"k-system-warning":!t.https}},[t._v(" "+t._s(t.https?t.$t("on"):t.$t("off"))+" ")])])]),n("li",[n("dl",[n("dt",[t._v("PHP")]),n("dd",[t._v(" "+t._s(t.php)+" ")])])]),n("li",[n("dl",[n("dt",[t._v(t._s(t.$t("server")))]),n("dd",[t._v(" "+t._s(t.server||"?")+" ")])])])])]),t.plugins.length?n("section",{staticClass:"k-system-view-section"},[n("header",{staticClass:"k-system-view-section-header"},[n("k-headline",{attrs:{link:"https://getkirby.com/plugins"}},[t._v(" "+t._s(t.$t("plugins"))+" ")])],1),n("table",{staticClass:"k-system-plugins"},[n("tr",[n("th",[t._v(" "+t._s(t.$t("name"))+" ")]),n("th",{staticClass:"desk"},[t._v(" "+t._s(t.$t("author"))+" ")]),n("th",{staticClass:"desk"},[t._v(" "+t._s(t.$t("license"))+" ")]),n("th",{staticStyle:{width:"8rem"}},[t._v(" "+t._s(t.$t("version"))+" ")])]),t._l(t.plugins,(function(e){return n("tr",{key:e.name},[n("td",[e.link?n("k-link",{attrs:{to:e.link}},[t._v(" "+t._s(e.name)+" ")]):[t._v(" "+t._s(e.name)+" ")]],2),n("td",{staticClass:"desk"},[t._v(" "+t._s(e.author||"-")+" ")]),n("td",{staticClass:"desk"},[t._v(" "+t._s(e.license||"-")+" ")]),n("td",{staticStyle:{width:"8rem"}},[t._v(" "+t._s(e.version||"-")+" ")])])}))],2)]):t._e()],1)],1)}),[],!1,pm,null,null,null);function pm(t){for(let e in cm)this[e]=cm[e]}var hm=function(){return dm.exports}();const fm={};var mm=Rt({props:{role:Object,roles:Array,search:String,title:String,users:Object},computed:{items(){return this.users.data.map((t=>(t.options=this.$dropdown(t.link),t)))}},methods:{paginate(t){this.$reload({query:{page:t.page}})}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-inside",[n("k-view",{staticClass:"k-users-view"},[n("k-header",{scopedSlots:t._u([{key:"left",fn:function(){return[n("k-button-group",{attrs:{buttons:[{disabled:!1===t.$permissions.users.create,text:t.$t("user.create"),icon:"add",click:function(){return t.$dialog("users/create")}}]}})]},proxy:!0},{key:"right",fn:function(){return[n("k-button-group",[n("k-dropdown",[n("k-button",{attrs:{responsive:!0,text:t.$t("role")+": "+(t.role?t.role.title:t.$t("role.all")),icon:"funnel"},on:{click:function(e){return t.$refs.roles.toggle()}}}),n("k-dropdown-content",{ref:"roles",attrs:{align:"right"}},[n("k-dropdown-item",{attrs:{icon:"bolt",link:"/users"}},[t._v(" "+t._s(t.$t("role.all"))+" ")]),n("hr"),t._l(t.roles,(function(e){return n("k-dropdown-item",{key:e.id,attrs:{link:"/users/?role="+e.id,icon:"bolt"}},[t._v(" "+t._s(e.title)+" ")])}))],2)],1)],1)]},proxy:!0}])},[t._v(" "+t._s(t.$t("view.users"))+" ")]),t.users.data.length>0?[n("k-collection",{attrs:{items:t.items,pagination:t.users.pagination},on:{paginate:t.paginate}})]:0===t.users.pagination.total?[n("k-empty",{attrs:{icon:"users"}},[t._v(" "+t._s(t.$t("role.empty"))+" ")])]:t._e()],2)],1)}),[],!1,gm,null,null,null);function gm(t){for(let e in fm)this[e]=fm[e]}var km=function(){return mm.exports}();const vm={};var bm=Rt({computed:{placeholder(){return this.field("code",{}).placeholder},languages(){return this.field("language",{options:[]}).options}},methods:{focus(){this.$refs.code.focus()}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-block-type-code-editor"},[n("k-input",{ref:"code",attrs:{buttons:!1,placeholder:t.placeholder,spellcheck:!1,value:t.content.code,type:"textarea"},on:{input:function(e){return t.update({code:e})}}}),t.languages.length?n("div",{staticClass:"k-block-type-code-editor-language"},[n("k-icon",{attrs:{type:"code"}}),n("k-input",{ref:"language",attrs:{empty:!1,options:t.languages,value:t.content.language,type:"select"},on:{input:function(e){return t.update({language:e})}}})],1):t._e()],1)}),[],!1,ym,null,null,null);function ym(t){for(let e in vm)this[e]=vm[e]}var $m=function(){return bm.exports}(),_m=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:$m});const wm={};var xm=Rt({},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("k-block-title",{attrs:{content:t.content,fieldset:t.fieldset},on:{dblclick:function(e){return t.$emit("open")}}})}),[],!1,Sm,null,null,null);function Sm(t){for(let e in wm)this[e]=wm[e]}var Cm=function(){return xm.exports}(),Om=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Cm});const Em={};var Tm=Rt({},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("ul",{on:{dblclick:t.open}},[0===t.content.images.length?[n("li"),n("li"),n("li"),n("li"),n("li")]:t._l(t.content.images,(function(t){return n("li",{key:t.id},[n("img",{attrs:{src:t.url,srcset:t.image.srcset,alt:t.alt}})])}))],2)}),[],!1,Am,null,null,null);function Am(t){for(let e in Em)this[e]=Em[e]}var Mm=function(){return Tm.exports}(),Im=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Mm});const Lm={};var jm=Rt({computed:{textField(){return this.field("text",{marks:!0})}},methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-block-type-heading-input",attrs:{"data-level":t.content.level}},[n("k-writer",{ref:"input",attrs:{inline:!0,marks:t.textField.marks,placeholder:t.textField.placeholder,value:t.content.text},on:{input:function(e){return t.update({text:e})}}})],1)}),[],!1,Dm,null,null,null);function Dm(t){for(let e in Lm)this[e]=Lm[e]}var Bm=function(){return jm.exports}(),Pm=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Bm});const Nm={};var qm=Rt({computed:{captionMarks(){return this.field("caption",{marks:!0}).marks},crop(){return this.content.crop||!1},src(){var t;return"web"===this.content.location?this.content.src:!!(null==(t=this.content.image[0])?void 0:t.url)&&this.content.image[0].url},ratio(){return this.content.ratio||!1}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-block-figure",{attrs:{caption:t.content.caption,"caption-marks":t.captionMarks,"empty-text":t.$t("field.blocks.image.placeholder")+" …","is-empty":!t.src,"empty-icon":"image"},on:{open:t.open,update:t.update}},[t.src?[t.ratio?n("k-aspect-ratio",{attrs:{ratio:t.ratio,cover:t.crop}},[n("img",{attrs:{alt:t.content.alt,src:t.src}})]):n("img",{staticClass:"k-block-type-image-auto",attrs:{alt:t.content.alt,src:t.src}})]:t._e()],2)}),[],!1,Rm,null,null,null);function Rm(t){for(let e in Nm)this[e]=Nm[e]}var Fm=function(){return qm.exports}(),zm=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Fm});const Ym={};var Hm=Rt({},(function(){var t=this;t.$createElement;return t._self._c,t._m(0)}),[function(){var t=this.$createElement,e=this._self._c||t;return e("div",[e("hr")])}],!1,Um,null,null,null);function Um(t){for(let e in Ym)this[e]=Ym[e]}var Km=function(){return Hm.exports}(),Jm=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Km});const Gm={};var Vm=Rt({computed:{marks(){return this.field("text",{}).marks}},methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("k-input",{ref:"input",staticClass:"k-block-type-list-input",attrs:{marks:t.marks,value:t.content.text,type:"list"},on:{input:function(e){return t.update({text:e})}}})}),[],!1,Wm,null,null,null);function Wm(t){for(let e in Gm)this[e]=Gm[e]}var Xm=function(){return Vm.exports}(),Zm=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Xm});const Qm={};var tg=Rt({computed:{placeholder(){return this.field("text",{}).placeholder}},methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("k-input",{ref:"input",staticClass:"k-block-type-markdown-input",attrs:{buttons:!1,placeholder:t.placeholder,spellcheck:!1,value:t.content.text,type:"textarea"},on:{input:function(e){return t.update({text:e})}}})}),[],!1,eg,null,null,null);function eg(t){for(let e in Qm)this[e]=Qm[e]}var ng=function(){return tg.exports}(),sg=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:ng});const ig={};var og=Rt({computed:{citationField(){return this.field("citation",{})},textField(){return this.field("text",{})}},methods:{focus(){this.$refs.text.focus()}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-block-type-quote-editor"},[n("k-writer",{ref:"text",staticClass:"k-block-type-quote-text",attrs:{inline:!0,marks:t.textField.marks,placeholder:t.textField.placeholder,value:t.content.text},on:{input:function(e){return t.update({text:e})}}}),n("k-writer",{ref:"citation",staticClass:"k-block-type-quote-citation",attrs:{inline:!0,marks:t.citationField.marks,placeholder:t.citationField.placeholder,value:t.content.citation},on:{input:function(e){return t.update({citation:e})}}})],1)}),[],!1,rg,null,null,null);function rg(t){for(let e in ig)this[e]=ig[e]}var ag=function(){return og.exports}(),lg=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:ag});const ug={};var cg=Rt({mixins:[Da],inheritAttrs:!1,computed:{columns(){return this.table.columns||this.fields},columnsCount(){return Object.keys(this.columns).length},fields(){return this.table.fields||{}},rows(){return this.content.rows||[]},table(){let t=null;return Object.values(this.fieldset.tabs).forEach((e=>{e.fields.rows&&(t=e.fields.rows)})),t||{}}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("table",{staticClass:"k-block-type-table-preview",on:{dblclick:t.open}},[n("tr",t._l(t.columns,(function(e,s){return n("th",{key:s,style:"width:"+t.width(e.width),attrs:{"data-align":e.align}},[t._v(" "+t._s(e.label)+" ")])})),0),0===t.rows.length?n("tr",[n("td",{attrs:{colspan:t.columnsCount}},[n("small",{staticClass:"k-block-type-table-preview-empty"},[t._v(t._s(t.$t("field.structure.empty")))])])]):t._l(t.rows,(function(e,s){return n("tr",{key:s},t._l(t.columns,(function(i,o){return n("td",{key:s+"-"+o,style:"width:"+t.width(i.width),attrs:{"data-align":i.align}},[!1===t.columnIsEmpty(e[o])?[t.previewExists(i.type)?n("k-"+i.type+"-field-preview",{tag:"component",attrs:{value:e[o],column:i,field:t.fields[o]}}):[n("p",{staticClass:"k-structure-table-text"},[t._v(" "+t._s(i.before)+" "+t._s(t.displayText(t.fields[o],e[o])||"–")+" "+t._s(i.after)+" ")])]]:t._e()],2)})),0)}))],2)}),[],!1,dg,null,null,null);function dg(t){for(let e in ug)this[e]=ug[e]}var pg=function(){return cg.exports}(),hg=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:pg});const fg={};var mg=Rt({props:{endpoints:Object},computed:{textField(){return this.field("text",{})}},methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("k-writer",{ref:"input",staticClass:"k-block-type-text-input",attrs:{inline:t.textField.inline,marks:t.textField.marks,nodes:t.textField.nodes,placeholder:t.textField.placeholder,value:t.content.text},on:{input:function(e){return t.update({text:e})}}})}),[],!1,gg,null,null,null);function gg(t){for(let e in fg)this[e]=fg[e]}var kg=function(){return mg.exports}(),vg=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:kg});const bg={};var yg=Rt({computed:{captionMarks(){return this.field("caption",{marks:!0}).marks},video(){return this.$helper.embed.video(this.content.url,!0)}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-block-figure",{attrs:{caption:t.content.caption,"caption-marks":t.captionMarks,"empty-text":t.$t("field.blocks.video.placeholder")+" …","is-empty":!t.video,"empty-icon":"video"},on:{open:t.open,update:t.update}},[n("k-aspect-ratio",{attrs:{ratio:"16/9"}},[t.video?n("iframe",{attrs:{src:t.video,referrerpolicy:"strict-origin-when-cross-origin"}}):t._e()])],1)}),[],!1,$g,null,null,null);function $g(t){for(let e in bg)this[e]=bg[e]}var _g=function(){return yg.exports}(),wg=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:_g});const xg={inheritAttrs:!1,props:{attrs:[Array,Object],content:[Array,Object],endpoints:Object,fieldset:Object,id:String,isBatched:Boolean,isFull:Boolean,isHidden:Boolean,isLastInBatch:Boolean,isSelected:Boolean,name:String,next:Object,prev:Object,type:String},data:()=>({skipFocus:!1}),computed:{className(){let t=["k-block-type-"+this.type];return this.fieldset.preview!==this.type&&t.push("k-block-type-"+this.fieldset.preview),!1===this.wysiwyg&&t.push("k-block-type-default"),t},customComponent(){return this.wysiwyg?this.wysiwygComponent:"k-block-type-default"},isEditable(){return!1!==this.fieldset.editable},listeners(){return l(a({},this.$listeners),{confirmToRemove:this.confirmToRemove,open:this.open})},tabs(){let t=this.fieldset.tabs;return Object.entries(t).forEach((([e,n])=>{Object.entries(n.fields).forEach((([n])=>{t[e].fields[n].section=this.name,t[e].fields[n].endpoints={field:this.endpoints.field+"/fieldsets/"+this.type+"/fields/"+n,section:this.endpoints.section,model:this.endpoints.model}}))})),t},wysiwyg(){return!1!==this.wysiwygComponent},wysiwygComponent(){if(!1===this.fieldset.preview)return!1;let t;return this.fieldset.preview&&(t="k-block-type-"+this.fieldset.preview,this.$helper.isComponent(t))?t:(t="k-block-type-"+this.type,!!this.$helper.isComponent(t)&&t)}},methods:{close(){this.$refs.drawer.close()},confirmToRemove(){this.$refs.removeDialog.open()},focus(){!0!==this.skipFocus&&("function"==typeof this.$refs.editor.focus?this.$refs.editor.focus():this.$refs.container.focus())},onFocusIn(t){var e,n;(null==(n=null==(e=this.$refs.options)?void 0:e.$el)?void 0:n.contains(t.target))||this.$emit("focus",t)},goTo(t){t&&(this.skipFocus=!0,this.close(),this.$nextTick((()=>{t.$refs.container.focus(),t.open(),this.skipFocus=!1})))},open(){this.$refs.drawer&&this.$refs.drawer.open()},remove(){this.$refs.removeDialog.close(),this.$emit("remove",this.id)}}},Sg={};var Cg=Rt(xg,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{ref:"container",staticClass:"k-block-container",class:"k-block-container-type-"+t.type,attrs:{"data-batched":t.isBatched,"data-disabled":t.fieldset.disabled,"data-hidden":t.isHidden,"data-id":t.id,"data-last-in-batch":t.isLastInBatch,"data-selected":t.isSelected,"data-translate":t.fieldset.translate,tabindex:"0"},on:{keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"])?null:e.ctrlKey&&e.shiftKey?(e.preventDefault(),t.$emit("sortDown")):null},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"up",38,e.key,["Up","ArrowUp"])?null:e.ctrlKey&&e.shiftKey?(e.preventDefault(),t.$emit("sortUp")):null}],focus:function(e){return t.$emit("focus")},focusin:t.onFocusIn}},[n("div",{staticClass:"k-block",class:t.className},[n(t.customComponent,t._g(t._b({ref:"editor",tag:"component"},"component",t.$props,!1),t.listeners))],1),n("k-block-options",t._g({ref:"options",attrs:{"is-batched":t.isBatched,"is-editable":t.isEditable,"is-full":t.isFull,"is-hidden":t.isHidden}},t.listeners)),t.isEditable&&!t.isBatched?n("k-form-drawer",{ref:"drawer",staticClass:"k-block-drawer",attrs:{id:t.id,icon:t.fieldset.icon||"box",tabs:t.tabs,title:t.fieldset.name,value:t.content},on:{close:function(e){return t.focus()},input:function(e){return t.$emit("update",e)}},scopedSlots:t._u([{key:"options",fn:function(){return[t.isHidden?n("k-button",{staticClass:"k-drawer-option",attrs:{icon:"hidden"},on:{click:function(e){return t.$emit("show")}}}):t._e(),n("k-button",{staticClass:"k-drawer-option",attrs:{disabled:!t.prev,icon:"angle-left"},on:{click:function(e){return e.preventDefault(),e.stopPropagation(),t.goTo(t.prev)}}}),n("k-button",{staticClass:"k-drawer-option",attrs:{disabled:!t.next,icon:"angle-right"},on:{click:function(e){return e.preventDefault(),e.stopPropagation(),t.goTo(t.next)}}}),n("k-button",{staticClass:"k-drawer-option",attrs:{icon:"trash"},on:{click:function(e){return e.preventDefault(),e.stopPropagation(),t.confirmToRemove.apply(null,arguments)}}})]},proxy:!0}],null,!1,2211169536)}):t._e(),n("k-remove-dialog",{ref:"removeDialog",attrs:{text:t.$t("field.blocks.delete.confirm")},on:{submit:t.remove}})],1)}),[],!1,Og,null,null,null);function Og(t){for(let e in Sg)this[e]=Sg[e]}var Eg=function(){return Cg.exports}();const Tg={};var Ag=Rt({inheritAttrs:!1,computed:{shortcut(){return this.$helper.keyboard.metaKey()+"+v"}},methods:{close(){this.$refs.dialog.close()},open(){this.$refs.dialog.open()},onPaste(t){this.$emit("paste",t),this.close()}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",staticClass:"k-block-importer",attrs:{"cancel-button":!1,"submit-button":!1,size:"large"}},[n("label",{attrs:{for:"pasteboard"},domProps:{innerHTML:t._s(t.$t("field.blocks.fieldsets.paste",{shortcut:t.shortcut}))}}),n("textarea",{attrs:{id:"pasteboard"},on:{paste:function(e){return e.preventDefault(),t.onPaste.apply(null,arguments)}}})])}),[],!1,Mg,null,null,null);function Mg(t){for(let e in Tg)this[e]=Tg[e]}const Ig={components:{"k-block-pasteboard":function(){return Ag.exports}()},inheritAttrs:!1,props:{autofocus:Boolean,empty:String,endpoints:Object,fieldsets:Object,fieldsetGroups:Object,group:String,max:{type:Number,default:null},value:{type:Array,default:()=>[]}},data(){return{isMultiSelectKey:!1,batch:[],blocks:this.value,current:null,isFocussed:!1}},computed:{draggableOptions(){return{id:this._uid,handle:".k-sort-handle",list:this.blocks,move:this.move,delay:10,data:{fieldsets:this.fieldsets,isFull:this.isFull},options:{group:this.group}}},hasFieldsets(){return Object.keys(this.fieldsets).length},isEditing(){return this.$store.state.dialog||this.$store.state.drawers.open.length>0},isEmpty(){return 0===this.blocks.length},isFull(){return null!==this.max&&this.blocks.length>=this.max},selected(){return this.current},selectedOrBatched(){return this.batch.length>0?this.batch:this.selected?[this.selected]:[]}},watch:{value(){this.blocks=this.value}},created(){this.$events.$on("copy",this.copy),this.$events.$on("focus",this.onOutsideFocus),this.$events.$on("keydown",this.onKey),this.$events.$on("keyup",this.onKey),this.$events.$on("paste",this.onPaste)},destroyed(){this.$events.$off("copy",this.copy),this.$events.$off("focus",this.onOutsideFocus),this.$events.$off("keydown",this.onKey),this.$events.$off("keyup",this.onKey),this.$events.$off("paste",this.onPaste)},mounted(){!0===this.$props.autofocus&&this.focus()},methods:{append(t,e){if("string"!=typeof t){if(Array.isArray(t)){let n=this.$helper.clone(t).map((t=>(t.id=this.$helper.uuid(),t)));const s=Object.keys(this.fieldsets);if(n=n.filter((t=>s.includes(t.type))),this.max){const t=this.max-this.blocks.length;n=n.slice(0,t)}this.blocks.splice(e,0,...n),this.save()}}else this.add(t,e)},async add(t="text",e){const n=await this.$api.get(this.endpoints.field+"/fieldsets/"+t);this.blocks.splice(e,0,n),this.save(),this.$nextTick((()=>{this.focusOrOpen(n)}))},addToBatch(t){null!==this.selected&&!1===this.batch.includes(this.selected)&&(this.batch.push(this.selected),this.current=null),!1===this.batch.includes(t.id)&&this.batch.push(t.id)},choose(t){if(1===Object.keys(this.fieldsets).length){const e=Object.values(this.fieldsets)[0].type;this.add(e,t)}else this.$refs.selector.open(t)},chooseToConvert(t){this.$refs.selector.open(t,{disabled:[t.type],headline:this.$t("field.blocks.changeType"),event:"convert"})},click(t){this.$emit("click",t)},confirmToRemoveAll(){this.$refs.removeAll.open()},confirmToRemoveSelected(){this.$refs.removeSelected.open()},copy(t){if(!0===this.isEditing)return!1;if(0===this.blocks.length)return!1;if(0===this.selectedOrBatched.length)return!1;if(!0===this.isInputEvent(t))return!1;let e=[];if(this.blocks.forEach((t=>{this.selectedOrBatched.includes(t.id)&&e.push(t)})),0===e.length)return!1;this.$helper.clipboard.write(e,t),t instanceof ClipboardEvent==!1&&(this.batch=this.selectedOrBatched),this.$store.dispatch("notification/success",`${e.length} copied!`)},copyAll(){this.selectAll(),this.copy(),this.deselectAll()},async convert(t,e){var n;const s=this.findIndex(e.id);if(-1===s)return!1;const i=t=>{var e;let n={};for(const s of Object.values(null!=(e=null==t?void 0:t.tabs)?e:{}))n=a(a({},n),s.fields);return n},o=this.blocks[s],r=await this.$api.get(this.endpoints.field+"/fieldsets/"+t),u=this.fieldsets[o.type],c=this.fieldsets[t];if(!c)return!1;let d=r.content;const p=i(c),h=i(u);for(const[a,l]of Object.entries(p)){const t=h[a];(null==t?void 0:t.type)===l.type&&(null==(n=null==o?void 0:o.content)?void 0:n[a])&&(d[a]=o.content[a])}this.blocks[s]=l(a({},r),{id:o.id,content:d}),this.save()},deselectAll(){this.batch=[],this.current=null},async duplicate(t,e){const n=l(a({},this.$helper.clone(t)),{id:this.$helper.uuid()});this.blocks.splice(e+1,0,n),this.save()},fieldset(t){return this.fieldsets[t.type]||{icon:"box",name:t.type,tabs:{content:{fields:{}}},type:t.type}},find(t){return this.blocks.find((e=>e.id===t))},findIndex(t){return this.blocks.findIndex((e=>e.id===t))},focus(t){(null==t?void 0:t.id)&&this.$refs["block-"+t.id]?this.$refs["block-"+t.id][0].focus():this.blocks[0]&&this.focus(this.blocks[0])},focusOrOpen(t){this.fieldsets[t.type].wysiwyg?this.focus(t):this.open(t)},hide(t){this.$set(t,"isHidden",!0),this.save()},isBatched(t){return this.batch.includes(t.id)},isInputEvent(){const t=document.querySelector(":focus");return t&&t.matches("input, textarea, [contenteditable], .k-writer")},isLastInBatch(t){const[e]=this.batch.slice(-1);return e&&t.id===e},isOnlyInstance:()=>1===document.querySelectorAll(".k-blocks").length,isSelected(t){return this.selected&&this.selected===t.id},move(t){if(t.from!==t.to){const e=t.draggedContext.element,n=t.relatedContext.component.componentData||t.relatedContext.component.$parent.componentData;if(!1===Object.keys(n.fieldsets).includes(e.type))return!1;if(!0===n.isFull)return!1}return!0},onKey(t){this.isMultiSelectKey=t.metaKey||t.ctrlKey||t.altKey},onOutsideFocus(t){if("function"==typeof t.target.closest&&t.target.closest(".k-dialog"))return;const e=document.querySelector(".k-overlay:last-of-type");if(!1===this.$el.contains(t.target)&&(!e||!1===e.contains(t.target)))return this.select(null);if(e){const e=this.$el.closest(".k-layout-column");if(!1===(null==e?void 0:e.contains(t.target)))return this.select(null)}},onPaste(t){var e;return!0!==this.isInputEvent(t)&&(!0===this.isEditing?!0===(null==(e=this.$refs.selector)?void 0:e.isOpen())&&this.paste(t):(0!==this.selectedOrBatched.length||!0===this.isOnlyInstance())&&this.paste(t))},open(t){this.$refs["block-"+t.id]&&this.$refs["block-"+t.id][0].open()},async paste(t){const e=this.$helper.clipboard.read(t),n=await this.$api.post(this.endpoints.field+"/paste",{html:e});let s=this.selectedOrBatched[this.selectedOrBatched.length-1],i=this.findIndex(s);-1===i&&(i=this.blocks.length),this.append(n,i+1)},pasteboard(){this.$refs.pasteboard.open()},prevNext(t){if(this.blocks[t]){let e=this.blocks[t];if(this.$refs["block-"+e.id])return this.$refs["block-"+e.id][0]}},remove(t){var e;const n=this.findIndex(t.id);-1!==n&&((null==(e=this.selected)?void 0:e.id)===t.id&&this.select(null),this.$delete(this.blocks,n),this.save())},removeAll(){this.batch=[],this.blocks=[],this.save(),this.$refs.removeAll.close()},removeSelected(){this.batch.forEach((t=>{const e=this.findIndex(t);-1!==e&&this.$delete(this.blocks,e)})),this.deselectAll(),this.save(),this.$refs.removeSelected.close()},save(){this.$emit("input",this.blocks)},select(t,e=null){if(e&&this.isMultiSelectKey&&this.onKey(e),t&&this.isMultiSelectKey)return this.addToBatch(t),void(this.current=null);this.batch=[],this.current=t?t.id:null},selectAll(){this.batch=Object.values(this.blocks).map((t=>t.id))},show(t){this.$set(t,"isHidden",!1),this.save()},sort(t,e,n){if(n<0)return;let s=this.$helper.clone(this.blocks);s.splice(e,1),s.splice(n,0,t),this.blocks=s,this.save(),this.$nextTick((()=>{this.focus(t)}))},update(t,e){const n=this.findIndex(t.id);-1!==n&&Object.entries(e).forEach((([t,e])=>{this.$set(this.blocks[n].content,t,e)})),this.save()}}},Lg={};var jg=Rt(Ig,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{ref:"wrapper",staticClass:"k-blocks",attrs:{"data-empty":0===t.blocks.length,"data-multi-select-key":t.isMultiSelectKey},on:{focusin:function(e){t.focussed=!0},focusout:function(e){t.focussed=!1}}},[t.hasFieldsets?[n("k-draggable",t._b({staticClass:"k-blocks-list",on:{sort:t.save},scopedSlots:t._u([{key:"footer",fn:function(){return[n("k-empty",{staticClass:"k-blocks-empty",attrs:{icon:"box"},on:{click:function(e){return t.choose(t.blocks.length)}}},[t._v(" "+t._s(t.empty||t.$t("field.blocks.empty"))+" ")])]},proxy:!0}],null,!1,2413899928)},"k-draggable",t.draggableOptions,!1),t._l(t.blocks,(function(e,s){return n("k-block",t._b({key:e.id,ref:"block-"+e.id,refInFor:!0,attrs:{endpoints:t.endpoints,fieldset:t.fieldset(e),"is-batched":t.isBatched(e),"is-last-in-batch":t.isLastInBatch(e),"is-full":t.isFull,"is-hidden":!0===e.isHidden,"is-selected":t.isSelected(e),next:t.prevNext(s+1),prev:t.prevNext(s-1)},on:{append:function(e){return t.append(e,s+1)},blur:function(e){return t.select(null)},choose:function(e){return t.choose(e)},chooseToAppend:function(e){return t.choose(s+1)},chooseToConvert:function(n){return t.chooseToConvert(e)},chooseToPrepend:function(e){return t.choose(s)},copy:function(e){return t.copy()},confirmToRemoveSelected:t.confirmToRemoveSelected,duplicate:function(n){return t.duplicate(e,s)},focus:function(n){return t.select(e)},hide:function(n){return t.hide(e)},paste:function(e){return t.pasteboard()},prepend:function(e){return t.add(e,s)},remove:function(n){return t.remove(e)},sortDown:function(n){return t.sort(e,s,s+1)},sortUp:function(n){return t.sort(e,s,s-1)},show:function(n){return t.show(e)},update:function(n){return t.update(e,n)}},nativeOn:{click:function(n){return n.stopPropagation(),t.select(e,n)}}},"k-block",e,!1))})),1),n("k-block-selector",{ref:"selector",attrs:{fieldsets:t.fieldsets,"fieldset-groups":t.fieldsetGroups},on:{add:t.add,convert:t.convert,paste:function(e){return t.paste(e)}}}),n("k-remove-dialog",{ref:"removeAll",attrs:{text:t.$t("field.blocks.delete.confirm.all")},on:{submit:t.removeAll}}),n("k-remove-dialog",{ref:"removeSelected",attrs:{text:t.$t("field.blocks.delete.confirm.selected")},on:{submit:t.removeSelected}}),n("k-block-pasteboard",{ref:"pasteboard",on:{paste:function(e){return t.paste(e)}}})]:[n("k-box",{attrs:{theme:"info"}},[t._v(" No fieldsets yet ")])]],2)}),[],!1,Dg,null,null,null);function Dg(t){for(let e in Lg)this[e]=Lg[e]}var Bg=function(){return jg.exports}();const Pg={inheritAttrs:!1,props:{caption:String,captionMarks:[Boolean,Array],cover:{type:Boolean,default:!0},isEmpty:Boolean,emptyIcon:String,emptyText:String,ratio:String},computed:{ratioPadding(){return this.$helper.ratio(this.ratio||"16/9")}}},Ng={};var qg=Rt(Pg,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("figure",{staticClass:"k-block-figure"},[t.isEmpty?n("k-button",{staticClass:"k-block-figure-empty",attrs:{icon:t.emptyIcon,text:t.emptyText},on:{click:function(e){return t.$emit("open")}}}):n("span",{staticClass:"k-block-figure-container",on:{dblclick:function(e){return t.$emit("open")}}},[t._t("default")],2),t.caption?n("figcaption",[n("k-writer",{attrs:{inline:!0,marks:t.captionMarks,value:t.caption},on:{input:function(e){return t.$emit("update",{caption:e})}}})],1):t._e()],1)}),[],!1,Rg,null,null,null);function Rg(t){for(let e in Ng)this[e]=Ng[e]}var Fg=function(){return qg.exports}();const zg={props:{isBatched:Boolean,isEditable:Boolean,isFull:Boolean,isHidden:Boolean},methods:{open(){this.$refs.options.open()}}},Yg={};var Hg=Rt(zg,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dropdown",{staticClass:"k-block-options"},[t.isBatched?[n("k-button",{staticClass:"k-block-options-button",attrs:{tooltip:t.$t("copy"),icon:"template"},on:{click:function(e){return e.preventDefault(),t.$emit("copy")}}}),n("k-button",{staticClass:"k-block-options-button",attrs:{tooltip:t.$t("remove"),icon:"trash"},on:{click:function(e){return e.preventDefault(),t.$emit("confirmToRemoveSelected")}}})]:[t.isEditable?n("k-button",{staticClass:"k-block-options-button",attrs:{tooltip:t.$t("edit"),icon:"edit"},on:{click:function(e){return t.$emit("open")}}}):t._e(),n("k-button",{staticClass:"k-block-options-button",attrs:{disabled:t.isFull,tooltip:t.$t("insert.after"),icon:"add"},on:{click:function(e){return t.$emit("chooseToAppend")}}}),n("k-button",{staticClass:"k-block-options-button",attrs:{tooltip:t.$t("delete"),icon:"trash"},on:{click:function(e){return t.$emit("confirmToRemove")}}}),n("k-button",{staticClass:"k-block-options-button",attrs:{tooltip:t.$t("more"),icon:"dots"},on:{click:function(e){return t.$refs.options.toggle()}}}),n("k-button",{staticClass:"k-block-options-button k-sort-handle",attrs:{tooltip:t.$t("sort"),icon:"sort"},on:{keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"up",38,e.key,["Up","ArrowUp"])?null:(e.preventDefault(),t.$emit("sortUp"))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"])?null:(e.preventDefault(),t.$emit("sortDown"))}]}}),n("k-dropdown-content",{ref:"options",attrs:{align:"right"}},[n("k-dropdown-item",{attrs:{disabled:t.isFull,icon:"angle-up"},on:{click:function(e){return t.$emit("chooseToPrepend")}}},[t._v(" "+t._s(t.$t("insert.before"))+" ")]),n("k-dropdown-item",{attrs:{disabled:t.isFull,icon:"angle-down"},on:{click:function(e){return t.$emit("chooseToAppend")}}},[t._v(" "+t._s(t.$t("insert.after"))+" ")]),n("hr"),t.isEditable?n("k-dropdown-item",{attrs:{icon:"edit"},on:{click:function(e){return t.$emit("open")}}},[t._v(" "+t._s(t.$t("edit"))+" ")]):t._e(),n("k-dropdown-item",{attrs:{icon:"refresh"},on:{click:function(e){return t.$emit("chooseToConvert")}}},[t._v(" "+t._s(t.$t("field.blocks.changeType"))+" ")]),n("hr"),n("k-dropdown-item",{attrs:{icon:"template"},on:{click:function(e){return t.$emit("copy")}}},[t._v(" "+t._s(t.$t("copy"))+" ")]),n("k-dropdown-item",{attrs:{icon:"download"},on:{click:function(e){return t.$emit("paste")}}},[t._v(" "+t._s(t.$t("paste.after"))+" ")]),n("hr"),n("k-dropdown-item",{attrs:{icon:t.isHidden?"preview":"hidden"},on:{click:function(e){return t.$emit(t.isHidden?"show":"hide")}}},[t._v(" "+t._s(!0===t.isHidden?t.$t("show"):t.$t("hide"))+" ")]),n("k-dropdown-item",{attrs:{disabled:t.isFull,icon:"copy"},on:{click:function(e){return t.$emit("duplicate")}}},[t._v(" "+t._s(t.$t("duplicate"))+" ")]),n("hr"),n("k-dropdown-item",{attrs:{icon:"trash"},on:{click:function(e){return t.$emit("confirmToRemove")}}},[t._v(" "+t._s(t.$t("delete"))+" ")])],1)]],2)}),[],!1,Ug,null,null,null);function Ug(t){for(let e in Yg)this[e]=Yg[e]}var Kg=function(){return Hg.exports}();const Jg={};var Gg=Rt({inheritAttrs:!1,props:{endpoint:String,fieldsets:Object,fieldsetGroups:Object},data(){return{dialogIsOpen:!1,disabled:[],headline:null,payload:null,event:"add",groups:this.createGroups()}},computed:{shortcut(){return this.$helper.keyboard.metaKey()+"+v"}},methods:{add(t){this.$emit(this.event,t,this.payload),this.$refs.dialog.close()},close(){this.$refs.dialog.close()},createGroups(){let t={},e=0;const n=this.fieldsetGroups||{blocks:{label:this.$t("field.blocks.fieldsets.label"),sets:Object.keys(this.fieldsets)}};return Object.keys(n).forEach((s=>{let i=n[s];i.open=!1!==i.open,i.fieldsets=i.sets.filter((t=>this.fieldsets[t])).map((t=>(e++,l(a({},this.fieldsets[t]),{index:e})))),0!==i.fieldsets.length&&(t[s]=i)})),t},isOpen(){return this.dialogIsOpen},navigate(t){var e,n;null==(n=null==(e=this.$refs["fieldset-"+t])?void 0:e[0])||n.focus()},onClose(){this.dialogIsOpen=!1,this.$events.$off("paste",this.close)},onOpen(){this.dialogIsOpen=!0,this.$events.$on("paste",this.close)},open(t,e={}){const n=a({event:"add",disabled:[],headline:null},e);this.event=n.event,this.disabled=n.disabled,this.headline=n.headline,this.payload=t,this.$refs.dialog.open()}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",staticClass:"k-block-selector",attrs:{"cancel-button":!1,"submit-button":!1,size:"medium"},on:{open:t.onOpen,close:t.onClose}},[t.headline?n("k-headline",[t._v(" "+t._s(t.headline)+" ")]):t._e(),t._l(t.groups,(function(e,s){return n("details",{key:s,attrs:{open:e.open}},[n("summary",[t._v(t._s(e.label))]),n("div",{staticClass:"k-block-types"},t._l(e.fieldsets,(function(e){return n("k-button",{key:e.name,ref:"fieldset-"+e.index,refInFor:!0,attrs:{disabled:t.disabled.includes(e.type),icon:e.icon||"box",text:e.name},on:{keydown:[function(n){return!n.type.indexOf("key")&&t._k(n.keyCode,"up",38,n.key,["Up","ArrowUp"])?null:t.navigate(e.index-1)},function(n){return!n.type.indexOf("key")&&t._k(n.keyCode,"down",40,n.key,["Down","ArrowDown"])?null:t.navigate(e.index+1)}],click:function(n){return t.add(e.type)}}})})),1)])})),n("p",{staticClass:"k-clipboard-hint",domProps:{innerHTML:t._s(t.$t("field.blocks.fieldsets.paste",{shortcut:t.shortcut}))}})],2)}),[],!1,Vg,null,null,null);function Vg(t){for(let e in Jg)this[e]=Jg[e]}var Wg=function(){return Gg.exports}();const Xg={};var Zg=Rt({inheritAttrs:!1,props:{fieldset:Object,content:Object},computed:{icon(){return this.fieldset.icon||"box"},label(){if(!this.fieldset.label||0===this.fieldset.label.length)return!1;if(this.fieldset.label===this.fieldset.name)return!1;const t=this.$helper.string.template(this.fieldset.label,this.content);return"…"!==t&&t},name(){return this.fieldset.name}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",t._g({staticClass:"k-block-title"},t.$listeners),[n("k-icon",{staticClass:"k-block-icon",attrs:{type:t.icon}}),n("span",{staticClass:"k-block-name"},[t._v(" "+t._s(t.name)+" ")]),t.label?n("span",{staticClass:"k-block-label"},[t._v(" "+t._s(t.label)+" ")]):t._e()],1)}),[],!1,Qg,null,null,null);function Qg(t){for(let e in Xg)this[e]=Xg[e]}var tk=function(){return Zg.exports}();const ek={};var nk=Rt({inheritAttrs:!1,props:{content:[Object,Array],fieldset:Object},methods:{field(t,e=null){let n=null;return Object.values(this.fieldset.tabs).forEach((e=>{e.fields[t]&&(n=e.fields[t])})),n||e},open(){this.$emit("open")},update(t){this.$emit("update",a(a({},this.content),t))}}},undefined,undefined,!1,sk,null,null,null);function sk(t){for(let e in ek)this[e]=ek[e]}var ik=function(){return nk.exports}();u.component("k-block",Eg),u.component("k-blocks",Bg),u.component("k-block-figure",Fg),u.component("k-block-options",Kg),u.component("k-block-selector",Wg),u.component("k-block-title",tk),u.component("k-block-type",ik);const ok={"./Types/Code.vue":_m,"./Types/Default.vue":Om,"./Types/Gallery.vue":Im,"./Types/Heading.vue":Pm,"./Types/Image.vue":zm,"./Types/Line.vue":Jm,"./Types/List.vue":Zm,"./Types/Markdown.vue":sg,"./Types/Quote.vue":lg,"./Types/Table.vue":hg,"./Types/Text.vue":vg,"./Types/Video.vue":wg};Object.keys(ok).map((t=>{const e=t.match(/\/([a-zA-Z]*)\.vue/)[1].toLowerCase();let n=ok[t].default;n.extends=ik,u.component("k-block-type-"+e,n)})),u.component("k-dialog",Ut),u.component("k-error-dialog",Wt),u.component("k-fiber-dialog",te),u.component("k-files-dialog",oe),u.component("k-form-dialog",ce),u.component("k-language-dialog",fe),u.component("k-pages-dialog",ve),u.component("k-remove-dialog",we),u.component("k-text-dialog",Oe),u.component("k-users-dialog",Me),u.component("k-drawer",De),u.component("k-form-drawer",Re),u.component("k-calendar",We),u.component("k-counter",en),u.component("k-autocomplete",Ue),u.component("k-form",an),u.component("k-form-buttons",pn),u.component("k-form-indicator",gn),u.component("k-field",Mn),u.component("k-fieldset",Bn),u.component("k-input",Fn),u.component("k-login",Un),u.component("k-login-code",Vn),u.component("k-times",Qn),u.component("k-upload",is),u.component("k-writer",Xs),u.component("k-login-alert",ei),u.component("k-checkbox-input",ri),u.component("k-checkboxes-input",di),u.component("k-date-input",gi),u.component("k-email-input",Ci),u.component("k-list-input",Ii),u.component("k-multiselect-input",Pi),u.component("k-number-input",zi),u.component("k-password-input",Ji),u.component("k-radio-input",Zi),u.component("k-range-input",so),u.component("k-select-input",lo),u.component("k-slug-input",fo),u.component("k-tags-input",bo),u.component("k-tel-input",xo),u.component("k-text-input",$i),u.component("k-textarea-input",To),u.component("k-time-input",jo),u.component("k-toggle-input",qo),u.component("k-url-input",Ho),u.component("k-blocks-field",Vo),u.component("k-checkboxes-field",tr),u.component("k-date-field",or),u.component("k-email-field",cr),u.component("k-files-field",gr),u.component("k-gap-field",yr),u.component("k-headline-field",Sr),u.component("k-info-field",Tr),u.component("k-layout-field",Kr),u.component("k-line-field",Wr),u.component("k-list-field",ea),u.component("k-multiselect-field",oa),u.component("k-number-field",ua),u.component("k-pages-field",ha),u.component("k-password-field",ka),u.component("k-radio-field",$a),u.component("k-range-field",Sa),u.component("k-select-field",Ta),u.component("k-slug-field",ja),u.component("k-structure-field",Ra),u.component("k-tags-field",Ha),u.component("k-text-field",Za),u.component("k-textarea-field",nl),u.component("k-tel-field",Ga),u.component("k-time-field",al),u.component("k-toggle-field",dl),u.component("k-url-field",gl),u.component("k-users-field",yl),u.component("k-writer-field",xl),u.component("k-toolbar",Al),u.component("k-toolbar-email-dialog",jl),u.component("k-toolbar-link-dialog",Nl),u.component("k-date-field-preview",zl),u.component("k-email-field-preview",Wl),u.component("k-files-field-preview",tu),u.component("k-list-field-preview",iu),u.component("k-pages-field-preview",lu),u.component("k-toggle-field-preview",ku),u.component("k-time-field-preview",pu),u.component("k-url-field-preview",Kl),u.component("k-users-field-preview",$u),u.component("k-writer-field-preview",Su),u.component("k-aspect-ratio",Au),u.component("k-bar",ju),u.component("k-box",qu),u.component("k-collection",Hu),u.component("k-column",Vu),u.component("k-dropzone",tc),u.component("k-empty",ic),u.component("k-file-preview",lc),u.component("k-grid",pc),u.component("k-header",kc),u.component("k-inside",$c),u.component("k-item",Oc),u.component("k-item-image",Ic),u.component("k-items",Pc),u.component("k-overlay",zc),u.component("k-panel",Kc),u.component("k-tabs",Wc),u.component("k-view",td),u.component("k-draggable",od),u.component("k-error-boundary",ud),u.component("k-fatal",hd),u.component("k-headline",kd),u.component("k-icon",$d),u.component("k-icons",Ed),u.component("k-image",Ld),u.component("k-loader",Pd),u.component("k-offline-warning",Fd),u.component("k-progress",Kd),u.component("k-registration",Wd),u.component("k-status-icon",op),u.component("k-sort-handle",tp),u.component("k-text",up),u.component("k-user-info",hp),u.component("k-breadcrumb",kp),u.component("k-button",_p),u.component("k-button-disabled",Op),u.component("k-button-group",Mp),u.component("k-button-link",Bp),u.component("k-button-native",zp),u.component("k-dropdown",Kp),u.component("k-dropdown-content",Xp),u.component("k-dropdown-item",nh),u.component("k-languages-dropdown",dh),u.component("k-link",ah),u.component("k-options-dropdown",gh),u.component("k-pagination",$h),u.component("k-prev-next",Ch),u.component("k-search",Ah),u.component("k-tag",Dh),u.component("k-topbar",Rh),u.component("k-sections",Uh),u.component("k-info-section",Vh),u.component("k-pages-section",tf),u.component("k-files-section",of),u.component("k-fields-section",uf),u.component("k-account-view",_f),u.component("k-error-view",Cf),u.component("k-file-view",Af),u.component("k-installation-view",Df),u.component("k-languages-view",qf),u.component("k-login-view",Kf),u.component("k-page-view",Wf),u.component("k-plugin-view",tm),u.component("k-reset-password-view",im),u.component("k-site-view",lm),u.component("k-system-view",hm),u.component("k-users-view",km),u.component("k-user-view",vf);u.config.productionTip=!1,u.config.devtools=!0,u.use(ct),u.use(Dt),u.use(Pt),u.use(qt),u.use(dt),u.use(Bt),u.use(vt),u.use(tt,ut),u.use(G),u.use(V),new u({store:ut,created(){window.panel.$vue=window.panel.app=this,window.panel.plugins.created.forEach((t=>t(this))),this.$store.dispatch("content/init")},render:t=>t(et)}).$mount("#app"); +var t=Object.defineProperty,e=Object.defineProperties,n=Object.getOwnPropertyDescriptors,i=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,r=(e,n,i)=>n in e?t(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i,a=(t,e)=>{for(var n in e||(e={}))s.call(e,n)&&r(t,n,e[n]);if(i)for(var n of i(e))o.call(e,n)&&r(t,n,e[n]);return t},l=(t,i)=>e(t,n(i));import{V as u,a as c,m as d,d as p,c as h,b as f,I as m,P as g,S as k,F as v,N as b,s as y,l as $,w as _,e as x,f as w,t as S,g as C,h as O,i as E,j as A,k as T,n as I,D as M,o as L,E as j,p as D,q as B,r as P,T as N,u as q,v as F,x as R,y as z,z as Y,A as H,B as U,C as K,G as J,H as G,J as V}from"./vendor.js";var W=t=>({changeName:async(e,n,i)=>t.patch(e+"/files/"+n+"/name",{name:i}),delete:async(e,n)=>t.delete(e+"/files/"+n),async get(e,n,i){let s=await t.get(e+"/files/"+n,i);return!0===Array.isArray(s.content)&&(s.content={}),s},link(t,e,n){return"/"+this.url(t,e,n)},update:async(e,n,i)=>t.patch(e+"/files/"+n,i),url(t,e,n){let i=t+"/files/"+e;return n&&(i+="/"+n),i}}),X=t=>({async blueprint(e){return t.get("pages/"+this.id(e)+"/blueprint")},async blueprints(e,n){return t.get("pages/"+this.id(e)+"/blueprints",{section:n})},async changeSlug(e,n){return t.patch("pages/"+this.id(e)+"/slug",{slug:n})},async changeStatus(e,n,i){return t.patch("pages/"+this.id(e)+"/status",{status:n,position:i})},async changeTemplate(e,n){return t.patch("pages/"+this.id(e)+"/template",{template:n})},async changeTitle(e,n){return t.patch("pages/"+this.id(e)+"/title",{title:n})},async children(e,n){return t.post("pages/"+this.id(e)+"/children/search",n)},async create(e,n){return null===e||"/"===e?t.post("site/children",n):t.post("pages/"+this.id(e)+"/children",n)},async delete(e,n){return t.delete("pages/"+this.id(e),n)},async duplicate(e,n,i){return t.post("pages/"+this.id(e)+"/duplicate",{slug:n,children:i.children||!1,files:i.files||!1})},async get(e,n){let i=await t.get("pages/"+this.id(e),n);return!0===Array.isArray(i.content)&&(i.content={}),i},id:t=>t.replace(/\//g,"+"),async files(e,n){return t.post("pages/"+this.id(e)+"/files/search",n)},link(t){return"/"+this.url(t)},async preview(t){return(await this.get(this.id(t),{select:"previewUrl"})).previewUrl},async search(e,n){return e?t.post("pages/"+this.id(e)+"/children/search?select=id,title,hasChildren",n):t.post("site/children/search?select=id,title,hasChildren",n)},async update(e,n){return t.patch("pages/"+this.id(e),n)},url(t,e){let n=null===t?"pages":"pages/"+String(t).replace(/\//g,"+");return e&&(n+="/"+e),n}});var Z=t=>({running:0,async request(e,n,i=!1){n=Object.assign(n||{},{credentials:"same-origin",cache:"no-store",headers:a({"x-requested-with":"xmlhttprequest","content-type":"application/json"},n.headers)}),t.methodOverwrite&&"GET"!==n.method&&"POST"!==n.method&&(n.headers["x-http-method-override"]=n.method,n.method="POST"),n=t.onPrepare(n);const s=e+"/"+JSON.stringify(n);t.onStart(s,i),this.running++;const o=await fetch([t.endpoint,e].join(t.endpoint.endsWith("/")||e.startsWith("/")?"":"/"),n);try{const e=await async function(t){const e=await t.text();let n;try{n=JSON.parse(e)}catch(i){return window.panel.$vue.$api.onParserError({html:e}),!1}return n}(o);if(o.status<200||o.status>299)throw e;if("error"===e.status)throw e;let n=e;return e.data&&"model"===e.type&&(n=e.data),this.running--,t.onComplete(s),t.onSuccess(e),n}catch(r){throw this.running--,t.onComplete(s),t.onError(r),r}},async get(t,e,n,i=!1){return e&&(t+="?"+Object.keys(e).filter((t=>void 0!==e[t]&&null!==e[t])).map((t=>t+"="+e[t])).join("&")),this.request(t,Object.assign(n||{},{method:"GET"}),i)},async post(t,e,n,i="POST",s=!1){return this.request(t,Object.assign(n||{},{method:i,body:JSON.stringify(e)}),s)},async patch(t,e,n,i=!1){return this.post(t,e,n,"PATCH",i)},async delete(t,e,n,i=!1){return this.post(t,e,n,"DELETE",i)}}),Q=t=>({blueprint:async e=>t.get("users/"+e+"/blueprint"),blueprints:async(e,n)=>t.get("users/"+e+"/blueprints",{section:n}),changeEmail:async(e,n)=>t.patch("users/"+e+"/email",{email:n}),changeLanguage:async(e,n)=>t.patch("users/"+e+"/language",{language:n}),changeName:async(e,n)=>t.patch("users/"+e+"/name",{name:n}),changePassword:async(e,n)=>t.patch("users/"+e+"/password",{password:n}),changeRole:async(e,n)=>t.patch("users/"+e+"/role",{role:n}),create:async e=>t.post("users",e),delete:async e=>t.delete("users/"+e),deleteAvatar:async e=>t.delete("users/"+e+"/avatar"),link(t,e){return"/"+this.url(t,e)},async list(e){return t.post(this.url(null,"search"),e)},get:async(e,n)=>t.get("users/"+e,n),async roles(e){return(await t.get(this.url(e,"roles"))).data.map((t=>({info:t.description||`(${window.panel.$t("role.description.placeholder")})`,text:t.title,value:t.name})))},search:async e=>t.post("users/search",e),update:async(e,n)=>t.patch("users/"+e,n),url(t,e){let n=t?"users/"+t:"users";return e&&(n+="/"+e),n}}),tt={install(t,e){t.prototype.$api=t.$api=((t={})=>{const e=a(a({},{endpoint:"/api",methodOverwrite:!0,onPrepare:t=>t,onStart(){},onComplete(){},onSuccess(){},onParserError(){},onError(t){throw window.console.log(t.message),t}}),t.config||{});let n=a(a(a({},e),Z(e)),t);return n.auth=(t=>({async login(e){const n={long:e.remember||!1,email:e.email,password:e.password};return t.post("auth/login",n)},logout:async()=>t.post("auth/logout"),user:async e=>t.get("auth",e),verifyCode:async e=>t.post("auth/code",{code:e})}))(n),n.files=W(n),n.languages=(t=>({create:async e=>t.post("languages",e),delete:async e=>t.delete("languages/"+e),get:async e=>t.get("languages/"+e),list:async()=>t.get("languages"),update:async(e,n)=>t.patch("languages/"+e,n)}))(n),n.pages=X(n),n.roles=(t=>({list:async e=>t.get("roles",e),get:async e=>t.get("roles/"+e)}))(n),n.system=(t=>({get:async(e={view:"panel"})=>t.get("system",e),install:async e=>(await t.post("system/install",e)).user,register:async e=>t.post("system/register",e)}))(n),n.site=(t=>({blueprint:async()=>t.get("site/blueprint"),blueprints:async()=>t.get("site/blueprints"),changeTitle:async e=>t.patch("site/title",{title:e}),children:async e=>t.post("site/children/search",e),get:async(e={view:"panel"})=>t.get("site",e),update:async e=>t.post("site",e)}))(n),n.translations=(t=>({list:async()=>t.get("translations"),get:async e=>t.get("translations/"+e)}))(n),n.users=Q(n),n})({config:{endpoint:window.panel.$urls.api,onComplete:n=>{t.$api.requests=t.$api.requests.filter((t=>t!==n)),0===t.$api.requests.length&&e.dispatch("isLoading",!1)},onError:e=>{window.panel.$config.debug&&window.console.error(e),403!==e.code||"Unauthenticated"!==e.message&&"access.panel"!==e.key||t.prototype.$go("/logout")},onParserError:({html:t,silent:n})=>{e.dispatch("fatal",{html:t,silent:n})},onPrepare:t=>(window.panel.$language&&(t.headers["x-language"]=window.panel.$language.code),t.headers["x-csrf"]=window.panel.$system.csrf,t),onStart:(n,i=!1)=>{!1===i&&e.dispatch("isLoading",!0),t.$api.requests.push(n)},onSuccess:()=>{clearInterval(t.$api.ping),t.$api.ping=setInterval(t.$api.auth.user,3e5)}},ping:null,requests:[]}),t.$api.ping=setInterval(t.$api.auth.user,3e5)}},et={name:"Fiber",data:()=>({component:null,state:window.fiber,key:null}),created(){this.$fiber.init(this.state,{base:document.querySelector("base").href,headers:()=>({"X-CSRF":this.state.$system.csrf}),onFatal({text:t,options:e}){this.$store.dispatch("fatal",{html:t,silent:e.silent})},onFinish:()=>{0===this.$api.requests.length&&this.$store.dispatch("isLoading",!1)},onPushState:t=>{window.history.pushState(t,"",t.$url)},onReplaceState:t=>{window.history.replaceState(t,"",t.$url)},onStart:({silent:t})=>{!0!==t&&this.$store.dispatch("isLoading",!0)},onSwap:async(t,e)=>{e=a({navigate:!0,replace:!1},e),this.setGlobals(t),this.setTitle(t),this.setTranslation(t),this.component=t.$view.component,this.state=t,this.key=!0===e.replace?this.key:t.$view.timestamp,!0===e.navigate&&this.navigate()},query:()=>{var t;return{language:null==(t=this.state.$language)?void 0:t.code}}}),window.addEventListener("popstate",this.$reload)},methods:{navigate(){this.$store.dispatch("navigate")},setGlobals(t){["$config","$direction","$language","$languages","$license","$menu","$multilang","$permissions","$searches","$system","$translation","$urls","$user","$view"].forEach((e=>{void 0!==t[e]?u.prototype[e]=window.panel[e]=t[e]:u.prototype[e]=t[e]=window.panel[e]}))},setTitle(t){t.$view.title?document.title=t.$view.title+" | "+t.$system.title:document.title=t.$system.title},setTranslation(t){t.$translation&&(document.documentElement.lang=t.$translation.code)}},render(t){if(this.component)return t(this.component,{key:this.key,props:this.state.$view.props})}};function nt(t){if(void 0!==t)return JSON.parse(JSON.stringify(t))}function it(t,e){for(const n of Object.keys(e))e[n]instanceof Object&&Object.assign(e[n],it(t[n]||{},e[n]));return Object.assign(t||{},e),t}var st={clone:nt,isEmpty:function(t){return null==t||""===t||("object"==typeof t&&0===Object.keys(t).length&&t.constructor===Object||void 0!==t.length&&0===t.length)},merge:it};const ot=(t,e)=>{localStorage.setItem("kirby$content$"+t,JSON.stringify(e))};var rt={namespaced:!0,state:{current:null,models:{},status:{enabled:!0}},getters:{exists:t=>e=>Object.prototype.hasOwnProperty.call(t.models,e),hasChanges:(t,e)=>t=>{const n=e.model(t).changes;return Object.keys(n).length>0},isCurrent:t=>e=>t.current===e,id:t=>e=>(e=e||t.current,window.panel.$language?e+"?language="+window.panel.$language.code:e),model:(t,e)=>n=>(n=n||t.current,!0===e.exists(n)?t.models[n]:{api:null,originals:{},values:{},changes:{}}),originals:(t,e)=>t=>nt(e.model(t).originals),values:(t,e)=>t=>a(a({},e.originals(t)),e.changes(t)),changes:(t,e)=>t=>nt(e.model(t).changes)},mutations:{CLEAR(t){Object.keys(t.models).forEach((e=>{t.models[e].changes={}})),Object.keys(localStorage).forEach((t=>{t.startsWith("kirby$content$")&&localStorage.removeItem(t)}))},CREATE(t,[e,n]){if(!n)return!1;let i=t.models[e]?t.models[e].changes:n.changes;u.set(t.models,e,{api:n.api,originals:n.originals,changes:i||{}})},CURRENT(t,e){t.current=e},MOVE(t,[e,n]){const i=nt(t.models[e]);u.delete(t.models,e),u.set(t.models,n,i);const s=localStorage.getItem("kirby$content$"+e);localStorage.removeItem("kirby$content$"+e),localStorage.setItem("kirby$content$"+n,s)},REMOVE(t,e){u.delete(t.models,e),localStorage.removeItem("kirby$content$"+e)},REVERT(t,e){t.models[e]&&(u.set(t.models[e],"changes",{}),localStorage.removeItem("kirby$content$"+e))},STATUS(t,e){u.set(t.status,"enabled",e)},UPDATE(t,[e,n,i]){if(!t.models[e])return!1;void 0===i&&(i=null),i=nt(i);const s=JSON.stringify(i);JSON.stringify(t.models[e].originals[n])==s?u.delete(t.models[e].changes,n):u.set(t.models[e].changes,n,i),ot(e,{api:t.models[e].api,originals:t.models[e].originals,changes:t.models[e].changes})}},actions:{init(t){Object.keys(localStorage).filter((t=>t.startsWith("kirby$content$"))).map((t=>t.split("kirby$content$")[1])).forEach((e=>{const n=localStorage.getItem("kirby$content$"+e);t.commit("CREATE",[e,JSON.parse(n)])})),Object.keys(localStorage).filter((t=>t.startsWith("kirby$form$"))).map((t=>t.split("kirby$form$")[1])).forEach((e=>{const n=localStorage.getItem("kirby$form$"+e);let i=null;try{i=JSON.parse(n)}catch(o){}if(!i||!i.api)return localStorage.removeItem("kirby$form$"+e),!1;const s={api:i.api,originals:i.originals,changes:i.values};t.commit("CREATE",[e,s]),ot(e,s),localStorage.removeItem("kirby$form$"+e)}))},clear(t){t.commit("CLEAR")},create(t,e){const n=nt(e.content);Array.isArray(e.ignore)&&e.ignore.forEach((t=>delete n[t])),e.id=t.getters.id(e.id);const i={api:e.api,originals:n,changes:{}};t.commit("CREATE",[e.id,i]),t.dispatch("current",e.id)},current(t,e){t.commit("CURRENT",e)},disable(t){t.commit("STATUS",!1)},enable(t){t.commit("STATUS",!0)},move(t,[e,n]){e=t.getters.id(e),n=t.getters.id(n),t.commit("MOVE",[e,n])},remove(t,e){t.commit("REMOVE",e),t.getters.isCurrent(e)&&t.commit("CURRENT",null)},revert(t,e){e=e||t.state.current,t.commit("REVERT",e)},async save(t,e){if(e=e||t.state.current,t.getters.isCurrent(e)&&!1===t.state.status.enabled)return!1;t.dispatch("disable");const n=t.getters.model(e),i=a(a({},n.originals),n.changes);try{await u.$api.patch(n.api,i),t.commit("CREATE",[e,l(a({},n),{originals:i})]),t.dispatch("revert",e)}finally{t.dispatch("enable")}},update(t,[e,n,i]){i=i||t.state.current,t.commit("UPDATE",[i,e,n])}}},at={namespaced:!0,state:{open:[]},mutations:{CLOSE(t,e){t.open=e?t.open.filter((t=>t.id!==e)):[]},GOTO(t,e){t.open=t.open.slice(0,t.open.findIndex((t=>t.id===e))+1)},OPEN(t,e){t.open.push(e)}},actions:{close(t,e){t.commit("CLOSE",e)},goto(t,e){t.commit("GOTO",e)},open(t,e){t.commit("OPEN",e)}}},lt={timer:null,namespaced:!0,state:{type:null,message:null,details:null,timeout:null},mutations:{SET(t,e){t.type=e.type,t.message=e.message,t.details=e.details,t.timeout=e.timeout},UNSET(t){t.type=null,t.message=null,t.details=null,t.timeout=null}},actions:{close(t){clearTimeout(this.timer),t.commit("UNSET")},deprecated(t,e){console.warn("Deprecated: "+e)},error(t,e){let n=e;"string"==typeof e&&(n={message:e}),e instanceof Error&&(n={message:e.message},window.panel.$config.debug&&window.console.error(e)),t.dispatch("dialog",{component:"k-error-dialog",props:n},{root:!0}),t.dispatch("close")},open(t,e){t.dispatch("close"),t.commit("SET",e),e.timeout&&(this.timer=setTimeout((()=>{t.dispatch("close")}),e.timeout))},success(t,e){"string"==typeof e&&(e={message:e}),t.dispatch("open",a({type:"success",timeout:4e3},e))}}};u.use(c);var ut=new c.Store({strict:!1,state:{dialog:null,drag:null,fatal:!1,isLoading:!1},mutations:{SET_DIALOG(t,e){t.dialog=e},SET_DRAG(t,e){t.drag=e},SET_FATAL(t,e){t.fatal=e},SET_LOADING(t,e){t.isLoading=e}},actions:{dialog(t,e){t.commit("SET_DIALOG",e)},drag(t,e){t.commit("SET_DRAG",e)},fatal(t,e){!1!==e?(console.error("The JSON response could not be parsed"),window.panel.$config.debug&&console.info(e.html),e.silent||t.commit("SET_FATAL",e.html)):t.commit("SET_FATAL",!1)},isLoading(t,e){t.commit("SET_LOADING",!0===e)},navigate(t){t.dispatch("dialog",null),t.dispatch("drawers/close")}},modules:{content:rt,drawers:at,notification:lt}}),ct={install(t){window.panel=window.panel||{},window.onunhandledrejection=t=>{t.preventDefault(),ut.dispatch("notification/error",t.reason)},window.panel.deprecated=t=>{ut.dispatch("notification/deprecated",t)},window.panel.error=t.config.errorHandler=t=>{ut.dispatch("notification/error",t)}}},dt={install(t){const e=d(),n={$on:e.on,$off:e.off,$emit:e.emit,click(t){n.$emit("click",t)},copy(t){n.$emit("copy",t)},dragenter(t){n.entered=t.target,n.prevent(t),n.$emit("dragenter",t)},dragleave(t){n.prevent(t),n.entered===t.target&&n.$emit("dragleave",t)},drop(t){n.prevent(t),n.$emit("drop",t)},entered:null,focus(t){n.$emit("focus",t)},keydown(e){let i=["keydown"];(e.metaKey||e.ctrlKey)&&i.push("cmd"),!0===e.altKey&&i.push("alt"),!0===e.shiftKey&&i.push("shift");let s=t.prototype.$helper.string.lcfirst(e.key);const o={escape:"esc",arrowUp:"up",arrowDown:"down",arrowLeft:"left",arrowRight:"right"};o[s]&&(s=o[s]),!1===["alt","control","shift","meta"].includes(s)&&i.push(s),n.$emit(i.join("."),e),n.$emit("keydown",e)},keyup(t){n.$emit("keyup",t)},online(t){n.$emit("online",t)},offline(t){n.$emit("offline",t)},paste(t){n.$emit("paste",t)},prevent(t){t.stopPropagation(),t.preventDefault()}};window.addEventListener("online",n.online),window.addEventListener("offline",n.offline),window.addEventListener("dragenter",n.dragenter,!1),window.addEventListener("dragover",n.prevent,!1),window.addEventListener("dragexit",n.prevent,!1),window.addEventListener("dragleave",n.dragleave,!1),window.addEventListener("drop",n.drop,!1),window.addEventListener("keydown",n.keydown,!1),window.addEventListener("keyup",n.keyup,!1),document.addEventListener("click",n.click,!1),document.addEventListener("copy",n.copy,!0),document.addEventListener("focus",n.focus,!0),document.addEventListener("paste",n.paste,!0),t.prototype.$events=n}};class pt{constructor(t={}){this.options=a({base:"/",headers:()=>({}),onFatal:()=>{},onFinish:()=>{},onPushState:()=>{},onReplaceState:()=>{},onStart:()=>{},onSwap:()=>{},query:()=>({})},t),this.state={}}init(t={},e={}){this.options=a(a({},this.options),e),this.setState(t)}arrayToString(t){return!1===Array.isArray(t)?String(t):t.join(",")}body(t){return"object"==typeof t?JSON.stringify(t):t}async fetch(t,e){return fetch(t,e)}async go(t,e){try{const n=await this.request(t,e);return!1!==n&&this.setState(n,e)}catch(n){if(!0!==(null==e?void 0:e.silent))throw n}}query(t={},e={}){let n=new URLSearchParams(e);return"object"!=typeof t&&(t={}),Object.entries(t).forEach((([t,e])=>{null!==e&&n.set(t,e)})),Object.entries(this.options.query()).forEach((([t,e])=>{var i,s;null!==(e=null!=(s=null!=(i=n.get(t))?i:e)?s:null)&&n.set(t,e)})),n}redirect(t){window.location.href=t}reload(t={}){return this.go(window.location.href,l(a({},t),{replace:!0}))}async request(t="",e={}){var n;const i=!!(e=a({globals:!1,method:"GET",only:[],query:{},silent:!1,type:"$view"},e)).globals&&this.arrayToString(e.globals),s=this.arrayToString(e.only);this.options.onStart(e);try{const r=this.url(t,e.query);if(new URL(r).origin!==location.origin)return this.redirect(r),!1;const u=await this.fetch(r,{method:e.method,body:this.body(e.body),credentials:"same-origin",cache:"no-store",headers:a(l(a({},this.options.headers()),{"X-Fiber":!0,"X-Fiber-Globals":i,"X-Fiber-Only":s,"X-Fiber-Referrer":(null==(n=this.state.$view)?void 0:n.path)||null}),e.headers)});if(!1===u.headers.has("X-Fiber"))return this.redirect(u.url),!1;const c=await u.text();let d;try{d=JSON.parse(c)}catch(o){return this.options.onFatal({url:r,path:t,options:e,response:u,text:c}),!1}if(!d[e.type])throw Error(`The ${e.type} could not be loaded`);const p=d[e.type];if(p.error)throw Error(p.error);return"$view"===e.type?s.length?it(this.state,d):d:p}finally{this.options.onFinish(e)}}async setState(t,e={}){return"object"==typeof t&&(this.state=nt(t),!0===e.replace||this.url(this.state.$url).href===window.location.href?this.options.onReplaceState(this.state,e):this.options.onPushState(this.state,e),this.options.onSwap(this.state,e),this.state)}url(t="",e={}){return(t="string"==typeof t&&null===t.match(/^https?:\/\//)?new URL(this.options.base+t.replace(/^\//,"")):new URL(t)).search=this.query(e,t.search),t}}const ht=async function(t){return a({cancel:null,submit:null,props:{}},t)},ft=async function(t,e={}){let n=null,i=null;"function"==typeof e?(n=e,e={}):(n=e.submit,i=e.cancel);let s=await this.$fiber.request("dialogs/"+t,l(a({},e),{type:"$dialog"}));return"object"==typeof s&&(s.submit=n||null,s.cancel=i||null,s)};async function mt(t,e={}){let n=null;if(n="object"==typeof t?await ht.call(this,t):await ft.call(this,t,e),!n)return!1;if(!n.component||!1===this.$helper.isComponent(n.component))throw Error("The dialog component does not exist");return n.props=n.props||{},this.$store.dispatch("dialog",n),n}function gt(t,e={}){return async n=>{const i=await this.$fiber.request("dropdowns/"+t,l(a({},e),{type:"$dropdown"}));if(!i)return!1;if(!1===Array.isArray(i.options)||0===i.options.length)throw Error("The dropdown is empty");i.options.map((t=>(t.dialog&&(t.click=()=>{const e="string"==typeof t.dialog?t.dialog:t.dialog.url,n="object"==typeof t.dialog?t.dialog:{};return this.$dialog(e,n)}),t))),n(i.options)}}async function kt(t,e,n={}){return await this.$fiber.request("search/"+t,a({query:{query:e},type:"$search"},n))}var vt={install(t){const e=new pt;t.prototype.$fiber=window.panel.$fiber=e,t.prototype.$dialog=window.panel.$dialog=mt,t.prototype.$dropdown=window.panel.$dropdown=gt,t.prototype.$go=window.panel.$go=e.go.bind(e),t.prototype.$reload=window.panel.$reload=e.reload.bind(e),t.prototype.$request=window.panel.$request=e.request.bind(e),t.prototype.$search=window.panel.$search=kt,t.prototype.$url=window.panel.$url=e.url.bind(e)}};var bt={read:function(t){if(!t)return null;if("string"==typeof t)return t;if(t instanceof ClipboardEvent){t.preventDefault();const e=t.clipboardData.getData("text/html")||t.clipboardData.getData("text/plain")||null;if(e)return e.replace(/\u00a0/g," ")}return null},write:function(t,e){if("string"!=typeof t&&(t=JSON.stringify(t,null,2)),e&&e instanceof ClipboardEvent)return e.preventDefault(),e.clipboardData.setData("text/plain",t),!0;const n=document.createElement("textarea");if(n.value=t,document.body.append(n),navigator.userAgent.match(/ipad|ipod|iphone/i)){n.contentEditable=!0,n.readOnly=!0;const t=document.createRange();t.selectNodeContents(n);const e=window.getSelection();e.removeAllRanges(),e.addRange(t),n.setSelectionRange(0,999999)}else n.select();return document.execCommand("copy"),n.remove(),!0}};function yt(t){if("string"==typeof t){if("pattern"===(t=t.toLowerCase()))return"var(--color-gray-800) var(--bg-pattern)";if(!1===t.startsWith("#")&&!1===t.startsWith("var(")){const e="--color-"+t;if(window.getComputedStyle(document.documentElement).getPropertyValue(e))return`var(${e})`}return t}}var $t=(t,e)=>{let n=null;return function(){clearTimeout(n),n=setTimeout((()=>t.apply(this,arguments)),e)}};function _t(t,e=!1){if(!t.match("youtu"))return!1;let n=null;try{n=new URL(t)}catch(d){return!1}const i=n.pathname.split("/").filter((t=>""!==t)),s=i[0],o=i[1],r="https://"+(!0===e?"www.youtube-nocookie.com":n.host)+"/embed",a=t=>!!t&&null!==t.match(/^[a-zA-Z0-9_-]+$/);let l=n.searchParams,u=null;switch(i.join("/")){case"embed/videoseries":case"playlist":a(l.get("list"))&&(u=r+"/videoseries");break;case"watch":a(l.get("v"))&&(u=r+"/"+l.get("v"),l.has("t")&&l.set("start",l.get("t")),l.delete("v"),l.delete("t"));break;default:n.host.includes("youtu.be")&&a(s)?(u="https://www.youtube.com/embed/"+s,l.has("t")&&l.set("start",l.get("t")),l.delete("t")):"embed"===s&&a(o)&&(u=r+"/"+o)}if(!u)return!1;const c=l.toString();return c.length&&(u+="?"+c),u}function xt(t,e=!1){let n=null;try{n=new URL(t)}catch(l){return!1}const i=n.pathname.split("/").filter((t=>""!==t));let s=n.searchParams,o=null;switch(!0===e&&s.append("dnt",1),n.host){case"vimeo.com":case"www.vimeo.com":o=i[0];break;case"player.vimeo.com":o=i[1]}if(!o||!o.match(/^[0-9]*$/))return!1;let r="https://player.vimeo.com/video/"+o;const a=s.toString();return a.length&&(r+="?"+a),r}var wt={youtube:_t,vimeo:xt,video:function(t,e=!1){return t.includes("youtu")?_t(t,e):!!t.includes("vimeo")&&xt(t,e)}},St=t=>void 0!==u.options.components[t],Ct=t=>!!t.dataTransfer&&(!!t.dataTransfer.types&&(!0===t.dataTransfer.types.includes("Files")&&!1===t.dataTransfer.types.includes("text/plain")));var Ot={metaKey:function(){return window.navigator.userAgent.indexOf("Mac")>-1?"cmd":"ctrl"}},Et=(t="3/2",e="100%",n=!0)=>{const i=String(t).split("/");if(2!==i.length)return e;const s=Number(i[0]),o=Number(i[1]);let r=100;return 0!==s&&0!==o&&(r=n?r/s*o:r/o*s,r=parseFloat(String(r)).toFixed(2)),r+"%"},At=t=>{var e=(t=t||{}).desc?-1:1,n=-e,i=/^0/,s=/\s+/g,o=/^\s+|\s+$/g,r=/[^\x00-\x80]/,a=/^0x[0-9a-f]+$/i,l=/(0x[\da-fA-F]+|(^[\+\-]?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?(?=\D|\s|$))|\d+)/g,u=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,c=t.insensitive?function(t){return function(t){if(t.toLocaleLowerCase)return t.toLocaleLowerCase();return t.toLowerCase()}(""+t).replace(o,"")}:function(t){return(""+t).replace(o,"")};function d(t){return t.replace(l,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0")}function p(t,e){return(!t.match(i)||1===e)&&parseFloat(t)||t.replace(s," ").replace(o,"")||0}return function(t,i){var s=c(t),o=c(i);if(!s&&!o)return 0;if(!s&&o)return n;if(s&&!o)return e;var l=d(s),h=d(o),f=parseInt(s.match(a),16)||1!==l.length&&Date.parse(s),m=parseInt(o.match(a),16)||f&&o.match(u)&&Date.parse(o)||null;if(m){if(fm)return e}for(var g=l.length,k=h.length,v=0,b=Math.max(g,k);v0)return e;if(_<0)return n;if(v===b-1)return 0}else{if(y<$)return n;if(y>$)return e}}return 0}};function Tt(t){const e={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return String(t).replace(/[&<>"'`=/]/g,(t=>e[t]))}function It(t,e={}){const n=(t,e={})=>{var i;const s=Tt(t.shift()),o=null!=(i=e[s])?i:null;return null===o?Object.prototype.hasOwnProperty.call(e,s)||"…":0===t.length?o:n(t,o)},i="[{]{1,2}[\\s]?",s="[\\s]?[}]{1,2}";return(t=t.replace(new RegExp(`${i}(.*?)${s}`,"gi"),((t,i)=>n(i.split("."),e)))).replace(new RegExp(`${i}.*${s}`,"gi"),"…")}function Mt(t){const e=String(t);return e.charAt(0).toUpperCase()+e.slice(1)}RegExp.escape=function(t){return t.replace(new RegExp("[-/\\\\^$*+?.()[\\]{}]","gu"),"\\$&")};var Lt={camelToKebab:function(t){return t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()},escapeHTML:Tt,hasEmoji:function(t){if("string"!=typeof t)return!1;const e=t.match(/(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff]|[\u0023-\u0039]\ufe0f?\u20e3|\u3299|\u3297|\u303d|\u3030|\u24c2|\ud83c[\udd70-\udd71]|\ud83c[\udd7e-\udd7f]|\ud83c\udd8e|\ud83c[\udd91-\udd9a]|\ud83c[\udde6-\uddff]|[\ud83c\ude01-\ude02]|\ud83c\ude1a|\ud83c\ude2f|[\ud83c\ude32-\ude3a]|[\ud83c\ude50-\ude51]|\u203c|\u2049|[\u25aa-\u25ab]|\u25b6|\u25c0|[\u25fb-\u25fe]|\u00a9|\u00ae|\u2122|\u2139|\ud83c\udc04|[\u2600-\u26FF]|\u2b05|\u2b06|\u2b07|\u2b1b|\u2b1c|\u2b50|\u2b55|\u231a|\u231b|\u2328|\u23cf|[\u23e9-\u23f3]|[\u23f8-\u23fa]|\ud83c\udccf|\u2934|\u2935|[\u2190-\u21ff])/i);return null!==e&&null!==e.length},lcfirst:function(t){const e=String(t);return e.charAt(0).toLowerCase()+e.slice(1)},pad:function(t,e=2){t=String(t);let n="";for(;n.length]+)>)/gi,"")},template:It,ucfirst:Mt,ucwords:function(t){return String(t).split(/ /g).map((t=>Mt(t))).join(" ")},uuid:function(){let t,e,n="";for(t=0;t<32;t++)e=16*Math.random()|0,8!=t&&12!=t&&16!=t&&20!=t||(n+="-"),n+=(12==t?4:16==t?3&e|8:e).toString(16);return n}},jt=(t,e)=>{const n=Object.assign({url:"/",field:"file",method:"POST",attributes:{},complete:function(){},error:function(){},success:function(){},progress:function(){}},e),i=new FormData;i.append(n.field,t,t.name),n.attributes&&Object.keys(n.attributes).forEach((t=>{i.append(t,n.attributes[t])}));const s=new XMLHttpRequest,o=e=>{if(!e.lengthComputable||!n.progress)return;let i=Math.max(0,Math.min(100,e.loaded/e.total*100));n.progress(s,t,Math.ceil(i))};s.upload.addEventListener("loadstart",o),s.upload.addEventListener("progress",o),s.addEventListener("load",(e=>{let i=null;try{i=JSON.parse(e.target.response)}catch(o){i={status:"error",message:"The file could not be uploaded"}}"error"===i.status?n.error(s,t,i):(n.success(s,t,i),n.progress(s,t,100))})),s.addEventListener("error",(e=>{const i=JSON.parse(e.target.response);n.error(s,t,i),n.progress(s,t,100)})),s.open(n.method,n.url,!0),n.headers&&Object.keys(n.headers).forEach((t=>{const e=n.headers[t];s.setRequestHeader(t,e)})),s.send(i)},Dt={install(t){Array.prototype.sortBy=function(e){const n=t.prototype.$helper.sort(),i=e.split(" "),s=i[0],o=i[1]||"asc";return this.sort(((t,e)=>{const i=String(t[s]).toLowerCase(),r=String(e[s]).toLowerCase();return"desc"===o?n(r,i):n(i,r)}))},t.prototype.$helper={clipboard:bt,clone:st.clone,color:yt,embed:wt,isComponent:St,isUploadEvent:Ct,debounce:$t,keyboard:Ot,object:st,pad:Lt.pad,ratio:Et,slug:Lt.slug,sort:At,string:Lt,upload:jt,uuid:Lt.uuid},t.prototype.$esc=Lt.escapeHTML}},Bt={install(t){t.$t=t.prototype.$t=window.panel.$t=(t,e,n=null)=>{if("string"!=typeof t)return;const i=window.panel.$translation.data[t]||n;return"string"!=typeof i?i:It(i,e)},t.directive("direction",{inserted(t,e,n){!0!==n.context.disabled?t.dir=n.context.$direction:t.dir=null}})}};p.extend(h),p.extend(((t,e,n)=>{n.interpret=(t,e="date")=>{const i={date:{"YYYY-MM-DD":!0,"YYYY-MM-D":!0,"YYYY-MM-":!0,"YYYY-MM":!0,"YYYY-M-DD":!0,"YYYY-M-D":!0,"YYYY-M-":!0,"YYYY-M":!0,"YYYY-":!0,YYYYMMDD:!0,"MMM DD YYYY":!1,"MMM D YYYY":!1,"MMM DD YY":!1,"MMM D YY":!1,"MMM DD":!1,"MMM D":!1,"DD MMMM YYYY":!1,"DD MMMM YY":!1,"DD MMMM":!1,"D MMMM YYYY":!1,"D MMMM YY":!1,"D MMMM":!1,"DD MMM YYYY":!1,"D MMM YYYY":!1,"DD MMM YY":!1,"D MMM YY":!1,"DD MMM":!1,"D MMM":!1,"DD MM YYYY":!1,"DD M YYYY":!1,"D MM YYYY":!1,"D M YYYY":!1,"DD MM YY":!1,"D MM YY":!1,"DD M YY":!1,"D M YY":!1,YYYY:!0,MMMM:!0,MMM:!0,"DD MM":!1,"DD M":!1,"D MM":!1,"D M":!1,DD:!1,D:!1},time:{"HH:mm:ss a":!1,"HH:mm:ss":!1,"HH:mm a":!1,"HH:mm":!1,"HH a":!1,HH:!1}};if("string"==typeof t&&""!==t)for(const s in i[e]){const o=n(t,s,i[e][s]);if(!0===o.isValid())return o}return null}})),p.extend(((t,e,n)=>{const i=t=>"date"===t?"YYYY-MM-DD":"time"===t?"HH:mm:ss":"YYYY-MM-DD HH:mm:ss";e.prototype.toISO=function(t="datetime"){return this.format(i(t))},n.iso=function(t,e="datetime"){const s=n(t,i(e));return s&&s.isValid()?s:null}})),p.extend(((t,e)=>{e.prototype.merge=function(t,e="date"){let n=this.clone();if(!t||!t.isValid())return this;if("string"==typeof e){const t={date:["year","month","date"],time:["hour","minute","second"]};if(!1===Object.prototype.hasOwnProperty.call(t,e))throw new Error("Invalid merge unit alias");e=t[e]}for(const i of e)n=n.set(i,t.get(i));return n}})),p.extend(((t,e,n)=>{n.pattern=t=>new class{constructor(t,e){this.dayjs=t,this.pattern=e;const n={year:["YY","YYYY"],month:["M","MM","MMM","MMMM"],day:["D","DD"],hour:["h","hh","H","HH"],minute:["m","mm"],second:["s","ss"],meridiem:["a"]};this.parts=this.pattern.split(/\W/).map(((t,e)=>{const i=this.pattern.indexOf(t);return{index:e,unit:Object.keys(n)[Object.values(n).findIndex((e=>e.includes(t)))],start:i,end:i+(t.length-1)}}))}at(t,e=t){const n=this.parts.filter((n=>n.start<=t&&n.end>=e-1));return n[0]?n[0]:this.parts.filter((e=>e.start<=t)).pop()}format(t){return t&&t.isValid()?t.format(this.pattern):null}}(n,t)})),p.extend(((t,e)=>{e.prototype.round=function(t="date",e=1){const n=["second","minute","hour","date","month","year"];if("day"===t&&(t="date"),!1===n.includes(t))throw new Error("Invalid rounding unit");if(["date","month","year"].includes(t)&&1!==e||"hour"===t&&24%e!=0||["second","minute"].includes(t)&&60%e!=0)throw"Invalid rounding size for "+t;let i=this.clone();const s=n.indexOf(t),o=n.slice(0,s),r=o.pop();if(o.forEach((t=>i=i.startOf(t))),r){const e={month:12,date:i.daysInMonth(),hour:24,minute:60,second:60}[r];Math.round(i.get(r)/e)*e===e&&(i=i.add(1,"date"===t?"day":t)),i=i.startOf(t)}return i=i.set(t,Math.round(i.get(t)/e)*e),i}})),p.extend(((t,e,n)=>{e.prototype.validate=function(t,e,i="day"){if(!this.isValid())return!1;if(!t)return!0;t=n.iso(t);const s={min:"isAfter",max:"isBefore"}[e];return this.isSame(t,i)||this[s](t,i)}}));var Pt={install(t){t.prototype.$library={autosize:f,dayjs:p}}},Nt={props:{blueprint:String,lock:[Boolean,Object],help:String,name:String,parent:String,timestamp:Number},methods:{load(){return this.$api.get(this.parent+"/sections/"+this.name)}}},qt={install(t){const e=a({},t.options.components),n={section:Nt};for(const[i,s]of Object.entries(window.panel.plugins.components))s.template||s.render||s.extends?("string"==typeof(null==s?void 0:s.extends)&&(e[s.extends]?s.extends=e[s.extends].extend({options:s,components:a(a({},e),s.components||{})}):s.extends=null),s.template&&(s.render=null),s.mixins&&(s.mixins=s.mixins.map((t=>"string"==typeof t?n[t]:t))),e[i]&&window.console.warn(`Plugin is replacing "${i}"`),t.component(i,s),e[i]=t.options.components[i]):ut.dispatch("notification/error",`Neither template or render method provided nor extending a component when loading plugin component "${i}". The component has not been registered.`);for(const i of window.panel.plugins.use)t.use(i)}};function Ft(t,e,n,i,s,o,r,a){var l,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),i&&(u.functional=!0),o&&(u._scopeId="data-v-"+o),r?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),s&&s.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(r)},u._ssrRegister=l):s&&(l=a?function(){s.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:s),l)if(u.functional){u._injectStyles=l;var c=u.render;u.render=function(t,e){return l.call(e),c(t,e)}}else{var d=u.beforeCreate;u.beforeCreate=d?[].concat(d,l):[l]}return{exports:t,options:u}}const Rt={props:{autofocus:{type:Boolean,default:!0},cancelButton:{type:[String,Boolean],default:!0},icon:{type:String,default:"check"},size:{type:String,default:"default"},submitButton:{type:[String,Boolean],default:!0},theme:String,visible:Boolean},data:()=>({notification:null}),computed:{buttons(){let t=[];return this.cancelButton&&t.push({icon:"cancel",text:this.cancelButtonLabel,class:"k-dialog-button-cancel",click:this.cancel}),this.submitButtonConfig&&t.push({icon:this.icon,text:this.submitButtonLabel,theme:this.theme,class:"k-dialog-button-submit",click:this.submit}),t},cancelButtonLabel(){return!1!==this.cancelButton&&(!0===this.cancelButton||0===this.cancelButton.length?this.$t("cancel"):this.cancelButton)},submitButtonConfig(){return void 0!==this.$attrs.button?this.$attrs.button:void 0===this.submitButton||this.submitButton},submitButtonLabel(){return!0===this.submitButton||0===this.submitButton.length?this.$t("confirm"):this.submitButton}},created(){this.$events.$on("keydown.esc",this.close,!1)},destroyed(){this.$events.$off("keydown.esc",this.close,!1)},mounted(){this.visible&&this.$nextTick(this.open)},methods:{onOverlayClose(){this.notification=null,this.$emit("close"),this.$events.$off("keydown.esc",this.close),this.$store.dispatch("dialog",!1)},open(){this.$store.state.dialog||this.$store.dispatch("dialog",!0),this.notification=null,this.$refs.overlay.open(),this.$emit("open"),this.$events.$on("keydown.esc",this.close)},close(){this.$refs.overlay&&this.$refs.overlay.close()},cancel(){this.$emit("cancel"),this.close()},focus(){var t;if(null==(t=this.$refs.dialog)?void 0:t.querySelector){const t=this.$refs.dialog.querySelector(".k-dialog-button-cancel");"function"==typeof(null==t?void 0:t.focus)&&t.focus()}},error(t){this.notification={message:t,type:"error"}},submit(){this.$emit("submit")},success(t){this.notification={message:t,type:"success"}}}},zt={};var Yt=Ft(Rt,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-overlay",{ref:"overlay",attrs:{autofocus:t.autofocus,centered:!0},on:{close:t.onOverlayClose,ready:function(e){return t.$emit("ready")}}},[n("div",{ref:"dialog",staticClass:"k-dialog",class:t.$vnode.data.staticClass,attrs:{"data-size":t.size},on:{mousedown:function(t){t.stopPropagation()}}},[t.notification?n("div",{staticClass:"k-dialog-notification",attrs:{"data-theme":t.notification.type}},[n("p",[t._v(t._s(t.notification.message))]),n("k-button",{attrs:{icon:"cancel"},on:{click:function(e){t.notification=null}}})],1):t._e(),n("div",{staticClass:"k-dialog-body scroll-y-auto"},[t._t("default")],2),t.$slots.footer||t.buttons.length?n("footer",{staticClass:"k-dialog-footer"},[t._t("footer",(function(){return[n("k-button-group",{attrs:{buttons:t.buttons}})]}))],2):t._e()])])}),[],!1,Ht,null,null,null);function Ht(t){for(let e in zt)this[e]=zt[e]}var Ut=function(){return Yt.exports}(),Kt={props:{autofocus:{type:Boolean,default:!0},cancelButton:{type:[String,Boolean],default:!0},icon:String,submitButton:{type:[String,Boolean],default:!0},size:String,theme:String,visible:Boolean},methods:{close(){this.$refs.dialog.close(),this.$emit("close")},error(t){this.$refs.dialog.error(t)},open(){this.$refs.dialog.open(),this.$emit("open")},success(t){this.$refs.dialog.close(),t.route&&this.$go(t.route),t.message&&this.$store.dispatch("notification/success",t.message),t.event&&("string"==typeof t.event&&(t.event=[t.event]),t.event.forEach((e=>{this.$events.$emit(e,t)}))),!1!==Object.prototype.hasOwnProperty.call(t,"emit")&&!1===t.emit||this.$emit("success")}}};const Jt={};var Gt=Ft({mixins:[Kt],props:{details:[Object,Array],message:String,size:{type:String,default:"medium"}},computed:{detailsList(){return Array.isArray(this.details)?this.details:Object.values(this.details||{})}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",staticClass:"k-error-dialog",attrs:{"cancel-button":!1,size:t.size,visible:!0},on:{cancel:function(e){return t.$emit("cancel")},close:function(e){return t.$emit("close")},submit:function(e){return t.$refs.dialog.close()}}},[n("k-text",[t._v(t._s(t.message))]),t.detailsList.length?n("dl",{staticClass:"k-error-details"},[t._l(t.detailsList,(function(e,i){return[n("dt",{key:"detail-label-"+i},[t._v(" "+t._s(e.label)+" ")]),n("dd",{key:"detail-message-"+i},["object"==typeof e.message?[n("ul",t._l(e.message,(function(e,i){return n("li",{key:i},[t._v(" "+t._s(e)+" ")])})),0)]:[t._v(" "+t._s(e.message)+" ")]],2)]}))],2):t._e()],1)}),[],!1,Vt,null,null,null);function Vt(t){for(let e in Jt)this[e]=Jt[e]}var Wt=function(){return Gt.exports}();const Xt={};var Zt=Ft({props:{code:Number,component:String,path:String,props:Object,referrer:String},methods:{close(){this.$refs.dialog.close()},onCancel(){"function"==typeof this.$store.state.dialog.cancel&&this.$store.state.dialog.cancel({dialog:this})},async onSubmit(t){let e=null;try{if("function"==typeof this.$store.state.dialog.submit)e=await this.$store.state.dialog.submit({dialog:this,value:t});else{if(!this.path)throw"The dialog needs a submit action or a dialog route path to be submitted";e=await this.$request(this.path,{body:t,method:"POST",type:"$dialog",headers:{"X-Fiber-Referrer":this.referrer}})}if(!1===e)return!1;this.close(),this.$store.dispatch("notification/success",":)"),e.event&&("string"==typeof e.event&&(e.event=[e.event]),e.event.forEach((t=>{this.$events.$emit(t,e)}))),e.dispatch&&Object.keys(e.dispatch).forEach((t=>{const n=e.dispatch[t];this.$store.dispatch(t,!0===Array.isArray(n)?[...n]:n)})),e.redirect?this.$go(e.redirect):this.$reload(e.reload||{})}catch(n){this.$refs.dialog.error(n)}}}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)(t.component,t._b({ref:"dialog",tag:"component",attrs:{visible:!0},on:{cancel:t.onCancel,submit:t.onSubmit}},"component",t.props,!1))}),[],!1,Qt,null,null,null);function Qt(t){for(let e in Xt)this[e]=Xt[e]}var te=function(){return Zt.exports}(),ee={data:()=>({models:[],issue:null,selected:{},options:{endpoint:null,max:null,multiple:!0,parent:null,selected:[],search:!0},search:null,pagination:{limit:20,page:1,total:0}}),computed:{checkedIcon(){return!0===this.multiple?"check":"circle-filled"},collection(){return{empty:this.emptyProps,items:this.items,link:!1,layout:"list",pagination:a({details:!0,dropdown:!1,align:"center"},this.pagination),sortable:!1}},items(){return this.models.map(this.item)},multiple(){return!0===this.options.multiple&&1!==this.options.max}},watch:{search(){this.updateSearch()}},created(){this.updateSearch=$t(this.updateSearch,200)},methods:{async fetch(){const t=a({page:this.pagination.page,search:this.search},this.fetchData||{});try{const e=await this.$api.get(this.options.endpoint,t);this.models=e.data,this.pagination=e.pagination,this.onFetched&&this.onFetched(e)}catch(e){this.models=[],this.issue=e.message}},async open(t,e){this.pagination.page=0,this.search=null;let n=!0;Array.isArray(t)?(this.models=t,n=!1):(this.models=[],e=t),this.options=a(a({},this.options),e),this.selected={},this.options.selected.forEach((t=>{this.$set(this.selected,t,{id:t})})),n&&await this.fetch(),this.$refs.dialog.open()},paginate(t){this.pagination.page=t.page,this.pagination.limit=t.limit,this.fetch()},submit(){this.$emit("submit",Object.values(this.selected)),this.$refs.dialog.close()},isSelected(t){return void 0!==this.selected[t.id]},item:t=>t,toggle(t){!1!==this.options.multiple&&1!==this.options.max||(this.selected={}),!0!==this.isSelected(t)?this.options.max&&this.options.max<=Object.keys(this.selected).length||this.$set(this.selected,t.id,t):this.$delete(this.selected,t.id)},toggleBtn(t){const e=this.isSelected(t);return{icon:e?this.checkedIcon:"circle-outline",tooltip:e?this.$t("remove"):this.$t("select"),theme:e?"positive":null}},updateSearch(){this.pagination.page=0,this.fetch()}}};const ne={};var ie=Ft({mixins:[ee],computed:{emptyProps(){return{icon:"image",text:this.$t("dialog.files.empty")}}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",staticClass:"k-files-dialog",attrs:{size:"medium"},on:{cancel:function(e){return t.$emit("cancel")},submit:t.submit}},[t.issue?[n("k-box",{attrs:{text:t.issue,theme:"negative"}})]:[t.options.search?n("k-input",{staticClass:"k-dialog-search",attrs:{autofocus:!0,placeholder:t.$t("search")+" …",type:"text",icon:"search"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}}):t._e(),n("k-collection",t._b({on:{item:t.toggle,paginate:t.paginate},scopedSlots:t._u([{key:"options",fn:function(e){var i=e.item;return[n("k-button",t._b({on:{click:function(e){return t.toggle(i)}}},"k-button",t.toggleBtn(i),!1))]}}])},"k-collection",t.collection,!1))]],2)}),[],!1,se,null,null,null);function se(t){for(let e in ne)this[e]=ne[e]}var oe=function(){return ie.exports}();const re={mixins:[Kt],props:{fields:{type:[Array,Object],default:()=>[]},novalidate:{type:Boolean,default:!0},size:{type:String,default:"medium"},submitButton:{type:[String,Boolean],default:()=>window.panel.$t("save")},text:{type:String},theme:{type:String,default:"positive"},value:{type:Object,default:()=>({})}},data(){return{model:this.value}},computed:{hasFields(){return Object.keys(this.fields).length>0}},watch:{value(t,e){t!==e&&(this.model=t)}}},ae={};var le=Ft(re,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",t._b({ref:"dialog",on:{cancel:function(e){return t.$emit("cancel")},close:function(e){return t.$emit("close")},ready:function(e){return t.$emit("ready")},submit:function(e){return t.$refs.form.submit()}}},"k-dialog",t.$props,!1),[t.text?[n("k-text",{domProps:{innerHTML:t._s(t.text)}})]:t._e(),t.hasFields?n("k-form",{ref:"form",attrs:{value:t.model,fields:t.fields,novalidate:t.novalidate},on:{input:function(e){return t.$emit("input",e)},submit:function(e){return t.$emit("submit",e)}}}):n("k-box",{attrs:{theme:"negative"}},[t._v(" This form dialog has no fields ")])],2)}),[],!1,ue,null,null,null);function ue(t){for(let e in ae)this[e]=ae[e]}var ce=function(){return le.exports}();const de={};var pe=Ft({extends:ce,watch:{"model.name"(t){this.fields.code.disabled||this.onNameChanges(t)},"model.code"(t){this.fields.code.disabled||(this.model.code=this.$helper.slug(t,[this.$system.ascii]),this.onCodeChanges(this.model.code))}},methods:{onCodeChanges(t){if(!t)return this.model.locale=null;if(t.length>=2)if(-1!==t.indexOf("-")){let e=t.split("-"),n=[e[0],e[1].toUpperCase()];this.model.locale=n.join("_")}else{let e=this.$system.locales||[];(null==e?void 0:e[t])?this.model.locale=e[t]:this.model.locale=null}},onNameChanges(t){this.model.code=this.$helper.slug(t,[this.model.rules,this.$system.ascii]).substr(0,2)}}},undefined,undefined,!1,he,null,null,null);function he(t){for(let e in de)this[e]=de[e]}var fe=function(){return pe.exports}();const me={};var ge=Ft({mixins:[ee],data(){const t=ee.data();return l(a({},t),{model:{title:null,parent:null},options:l(a({},t.options),{parent:null})})},computed:{emptyProps(){return{icon:"page",text:this.$t("dialog.pages.empty")}},fetchData(){return{parent:this.options.parent}}},methods:{back(){this.options.parent=this.model.parent,this.pagination.page=1,this.fetch()},go(t){this.options.parent=t.id,this.pagination.page=1,this.fetch()},onFetched(t){this.model=t.model}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",staticClass:"k-pages-dialog",attrs:{size:"medium"},on:{cancel:function(e){return t.$emit("cancel")},submit:t.submit}},[t.issue?[n("k-box",{attrs:{text:t.issue,theme:"negative"}})]:[t.model?n("header",{staticClass:"k-pages-dialog-navbar"},[n("k-button",{attrs:{disabled:!t.model.id,tooltip:t.$t("back"),icon:"angle-left"},on:{click:t.back}}),n("k-headline",[t._v(t._s(t.model.title))])],1):t._e(),t.options.search?n("k-input",{staticClass:"k-dialog-search",attrs:{autofocus:!0,placeholder:t.$t("search")+" …",type:"text",icon:"search"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}}):t._e(),n("k-collection",t._b({on:{item:t.toggle,paginate:t.paginate},scopedSlots:t._u([{key:"options",fn:function(e){var i=e.item;return[n("k-button",t._b({on:{click:function(e){return t.toggle(i)}}},"k-button",t.toggleBtn(i),!1)),i?n("k-button",{attrs:{disabled:!i.hasChildren,tooltip:t.$t("open"),icon:"angle-right"},on:{click:function(e){return e.stopPropagation(),t.go(i)}}}):t._e()]}}])},"k-collection",t.collection,!1))]],2)}),[],!1,ke,null,null,null);function ke(t){for(let e in me)this[e]=me[e]}var ve=function(){return ge.exports}();const be={mixins:[Kt],props:{icon:{type:String,default:"trash"},submitButton:{type:[String,Boolean],default:()=>window.panel.$t("delete")},text:String,theme:{type:String,default:"negative"}}},ye={};var $e=Ft(be,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("k-text-dialog",t._g(t._b({ref:"dialog"},"k-text-dialog",t.$props,!1),t.$listeners),[t._t("default")],2)}),[],!1,_e,null,null,null);function _e(t){for(let e in ye)this[e]=ye[e]}var xe=function(){return $e.exports}();const we={};var Se=Ft({mixins:[Kt],props:{text:String}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",t._g(t._b({ref:"dialog"},"k-dialog",t.$props,!1),t.$listeners),[t._t("default",(function(){return[t.text?n("k-text",{domProps:{innerHTML:t._s(t.text)}}):n("k-box",{attrs:{theme:"negative"}},[t._v(" This dialog does not define any text ")])]}))],2)}),[],!1,Ce,null,null,null);function Ce(t){for(let e in we)this[e]=we[e]}var Oe=function(){return Se.exports}();const Ee={};var Ae=Ft({mixins:[ee],computed:{emptyProps(){return{icon:"users",text:this.$t("dialog.users.empty")}}},methods:{item:t=>l(a({},t),{key:t.email,info:t.info!==t.text?t.info:null})}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",staticClass:"k-users-dialog",attrs:{size:"medium"},on:{cancel:function(e){return t.$emit("cancel")},submit:t.submit}},[t.issue?[n("k-box",{attrs:{text:t.issue,theme:"negative"}})]:[t.options.search?n("k-input",{staticClass:"k-dialog-search",attrs:{autofocus:!0,placeholder:t.$t("search")+" …",type:"text",icon:"search"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}}):t._e(),n("k-collection",t._b({on:{item:t.toggle,paginate:t.paginate},scopedSlots:t._u([{key:"options",fn:function(e){var i=e.item;return[n("k-button",t._b({on:{click:function(e){return t.toggle(i)}}},"k-button",t.toggleBtn(i),!1))]}}])},"k-collection",t.collection,!1))]],2)}),[],!1,Te,null,null,null);function Te(t){for(let e in Ee)this[e]=Ee[e]}var Ie=function(){return Ae.exports}();const Me={};var Le=Ft({inheritAttrs:!1,props:{id:String,icon:String,tab:String,tabs:Object,title:String},data:()=>({click:!1}),computed:{breadcrumb(){return this.$store.state.drawers.open},hasTabs(){return this.tabs&&Object.keys(this.tabs).length>1},index(){return this.breadcrumb.findIndex((t=>t.id===this._uid))},nested(){return this.index>0}},watch:{index(){-1===this.index&&this.close()}},destroyed(){this.$store.dispatch("drawers/close",this._uid)},methods:{close(){this.$refs.overlay.close()},goTo(t){if(t===this._uid)return!0;this.$store.dispatch("drawers/goto",t)},mouseup(){!0===this.click&&this.close(),this.click=!1},mousedown(t=!1){this.click=t,!0===this.click&&this.$store.dispatch("drawers/close")},onClose(){this.$store.dispatch("drawers/close",this._uid),this.$emit("close")},onOpen(){this.$store.dispatch("drawers/open",{id:this._uid,icon:this.icon,title:this.title}),this.$emit("open")},open(){this.$refs.overlay.open()}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-overlay",{ref:"overlay",attrs:{dimmed:!1},on:{close:t.onClose,open:t.onOpen}},[n("div",{staticClass:"k-drawer",attrs:{"data-id":t.id,"data-nested":t.nested},on:{mousedown:function(e){return e.stopPropagation(),t.mousedown(!0)},mouseup:t.mouseup}},[n("div",{staticClass:"k-drawer-box",on:{mousedown:function(e){return e.stopPropagation(),t.mousedown(!1)}}},[n("header",{staticClass:"k-drawer-header"},[1===t.breadcrumb.length?n("h2",{staticClass:"k-drawer-title"},[n("k-icon",{attrs:{type:t.icon}}),t._v(" "+t._s(t.title)+" ")],1):n("ul",{staticClass:"k-drawer-breadcrumb"},t._l(t.breadcrumb,(function(e){return n("li",{key:e.id},[n("k-button",{attrs:{icon:e.icon,text:e.title},on:{click:function(n){return t.goTo(e.id)}}})],1)})),0),t.hasTabs?n("nav",{staticClass:"k-drawer-tabs"},t._l(t.tabs,(function(e){return n("k-button",{key:e.name,staticClass:"k-drawer-tab",attrs:{current:t.tab==e.name,text:e.label},on:{click:function(n){return n.stopPropagation(),t.$emit("tab",e.name)}}})})),1):t._e(),n("nav",{staticClass:"k-drawer-options"},[t._t("options"),n("k-button",{staticClass:"k-drawer-option",attrs:{icon:"check"},on:{click:t.close}})],2)]),n("div",{staticClass:"k-drawer-body scroll-y-auto"},[t._t("default")],2)])])])}),[],!1,je,null,null,null);function je(t){for(let e in Me)this[e]=Me[e]}var De=function(){return Le.exports}(),Be=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-drawer",{ref:"drawer",staticClass:"k-form-drawer",attrs:{id:t.id,icon:t.icon,tabs:t.tabs,tab:t.tab,title:t.title},on:{close:function(e){return t.$emit("close")},open:function(e){return t.$emit("open")},tab:function(e){t.tab=e}},scopedSlots:t._u([{key:"options",fn:function(){return[t._t("options")]},proxy:!0},{key:"default",fn:function(){return[0===Object.keys(t.fields).length?n("k-box",{attrs:{theme:"info"}},[t._v(" "+t._s(t.empty)+" ")]):n("k-form",{ref:"form",attrs:{autofocus:!0,fields:t.fields,value:t.$helper.clone(t.value)},on:{input:function(e){return t.$emit("input",e)}}})]},proxy:!0}],null,!0)})};const Pe={};var Ne=Ft({inheritAttrs:!1,props:{empty:{type:String,default:()=>"Missing field setup"},icon:String,id:String,tabs:Object,title:String,type:String,value:Object},data:()=>({tab:null}),computed:{fields(){const t=this.tab||null;return(this.tabs[t]||this.firstTab).fields||{}},firstTab(){return Object.values(this.tabs)[0]}},methods:{close(){this.$refs.drawer.close()},focus(t){var e;"function"==typeof(null==(e=this.$refs.form)?void 0:e.focus)&&this.$refs.form.focus(t)},open(t,e=!0){this.$refs.drawer.open(),this.tab=t||this.firstTab.name,!1!==e&&setTimeout((()=>{let t=Object.values(this.fields).filter((t=>!0===t.autofocus))[0]||null;this.focus(t)}),1)}}},Be,[],!1,qe,null,null,null);function qe(t){for(let e in Pe)this[e]=Pe[e]}var Fe=function(){return Ne.exports}();const Re={props:{html:{type:Boolean,default:!1},limit:{type:Number,default:10},skip:{type:Array,default:()=>[]},options:Array,query:String},data:()=>({matches:[],selected:{text:null}}),methods:{close(){this.$refs.dropdown.close()},onSelect(t){this.$emit("select",t),this.$refs.dropdown.close()},search(t){if(t.length<1)return;const e=new RegExp(RegExp.escape(t),"ig");this.matches=this.options.filter((t=>!!t.text&&(-1===this.skip.indexOf(t.value)&&null!==t.text.match(e)))).slice(0,this.limit),this.$emit("search",t,this.matches),this.$refs.dropdown.open()}}},ze={};var Ye=Ft(Re,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dropdown",{staticClass:"k-autocomplete"},[t._t("default"),n("k-dropdown-content",t._g({ref:"dropdown",attrs:{autofocus:!0}},t.$listeners),t._l(t.matches,(function(e,i){return n("k-dropdown-item",t._b({key:i,on:{mousedown:function(n){return t.onSelect(e)},keydown:[function(n){return!n.type.indexOf("key")&&t._k(n.keyCode,"tab",9,n.key,"Tab")?null:(n.preventDefault(),t.onSelect(e))},function(n){return!n.type.indexOf("key")&&t._k(n.keyCode,"enter",13,n.key,"Enter")?null:(n.preventDefault(),t.onSelect(e))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])||"button"in e&&0!==e.button?null:(e.preventDefault(),t.close.apply(null,arguments))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"backspace",void 0,e.key,void 0)?null:(e.preventDefault(),t.close.apply(null,arguments))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"delete",[8,46],e.key,["Backspace","Delete","Del"])?null:(e.preventDefault(),t.close.apply(null,arguments))}]}},"k-dropdown-item",e,!1),[n("span",{domProps:{innerHTML:t._s(t.html?e.text:t.$esc(e.text))}})])})),1),t._v(" "+t._s(t.query)+" ")],2)}),[],!1,He,null,null,null);function He(t){for(let e in ze)this[e]=ze[e]}var Ue=function(){return Ye.exports}();const Ke={props:{disabled:Boolean,max:String,min:String,value:String},data(){return this.data(this.value)},computed:{numberOfDays(){return this.toDate().daysInMonth()},firstWeekday(){const t=this.toDate().day();return t>0?t:7},weekdays(){return["mon","tue","wed","thu","fri","sat","sun"].map((t=>this.$t("days."+t)))},weeks(){const t=this.firstWeekday-1;return Math.ceil((this.numberOfDays+t)/7)},monthnames(){return["january","february","march","april","may","june","july","august","september","october","november","december"].map((t=>this.$t("months."+t)))},months(){var t=[];return this.monthnames.forEach(((e,n)=>{const i=this.toDate(1,n);t.push({value:n,text:e,disabled:i.isBefore(this.current.min,"month")||i.isAfter(this.current.max,"month")})})),t},years(){var t,e,n,i;const s=null!=(e=null==(t=this.current.min)?void 0:t.get("year"))?e:this.current.year-20,o=null!=(i=null==(n=this.current.max)?void 0:n.get("year"))?i:this.current.year+20;return this.toOptions(s,o)}},watch:{value(t){const e=this.data(t);this.dt=e.dt,this.current=e.current}},methods:{data(t){const e=this.$library.dayjs.iso(t),n=this.$library.dayjs();return{dt:e,current:{month:(null!=e?e:n).month(),year:(null!=e?e:n).year(),min:this.$library.dayjs.iso(this.min),max:this.$library.dayjs.iso(this.max)}}},days(t){let e=[];const n=7*(t-1)+1,i=n+7;for(let s=n;sthis.numberOfDays;e.push(n?"":t)}return e},isDisabled(t){const e=this.toDate(t);return this.disabled||e.isBefore(this.current.min,"day")||e.isAfter(this.current.max,"day")},isSelected(t){return this.toDate(t).isSame(this.dt,"day")},isToday(t){const e=this.$library.dayjs();return this.toDate(t).isSame(e,"day")},onInput(){var t;this.$emit("input",(null==(t=this.dt)?void 0:t.toISO("date"))||null)},onNext(){const t=this.toDate().add(1,"month");this.show(t)},onPrev(){const t=this.toDate().subtract(1,"month");this.show(t)},select(t){const e="today"===t?this.$library.dayjs().merge(this.toDate(),"time"):this.toDate(t);this.dt=e,this.show(e),this.onInput()},show(t){this.current.year=t.year(),this.current.month=t.month()},toDate(t=1,e=this.current.month){return this.$library.dayjs(`${this.current.year}-${e+1}-${t}`)},toOptions(t,e){for(var n=[],i=t;i<=e;i++)n.push({value:i,text:this.$helper.pad(i)});return n}}},Je={};var Ge=Ft(Ke,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-calendar-input"},[n("nav",[n("k-button",{attrs:{icon:"angle-left"},on:{click:t.onPrev}}),n("span",{staticClass:"k-calendar-selects"},[n("k-select-input",{attrs:{options:t.months,disabled:t.disabled,required:!0},model:{value:t.current.month,callback:function(e){t.$set(t.current,"month",t._n(e))},expression:"current.month"}}),n("k-select-input",{attrs:{options:t.years,disabled:t.disabled,required:!0},model:{value:t.current.year,callback:function(e){t.$set(t.current,"year",t._n(e))},expression:"current.year"}})],1),n("k-button",{attrs:{icon:"angle-right"},on:{click:t.onNext}})],1),n("table",{staticClass:"k-calendar-table"},[n("thead",[n("tr",t._l(t.weekdays,(function(e){return n("th",{key:"weekday_"+e},[t._v(" "+t._s(e)+" ")])})),0)]),n("tbody",t._l(t.weeks,(function(e){return n("tr",{key:"week_"+e},t._l(t.days(e),(function(e,i){return n("td",{key:"day_"+i,staticClass:"k-calendar-day",attrs:{"aria-current":!!t.isToday(e)&&"date","aria-selected":!!t.isSelected(e)&&"date"}},[e?n("k-button",{attrs:{disabled:t.isDisabled(e),text:e},on:{click:function(n){return t.select(e)}}}):t._e()],1)})),0)})),0),n("tfoot",[n("tr",[n("td",{staticClass:"k-calendar-today",attrs:{colspan:"7"}},[n("k-button",{attrs:{text:t.$t("today")},on:{click:function(e){return t.select("today")}}})],1)])])])])}),[],!1,Ve,null,null,null);function Ve(t){for(let e in Je)this[e]=Je[e]}var We=function(){return Ge.exports}();const Xe={props:{count:Number,min:Number,max:Number,required:{type:Boolean,default:!1}},computed:{valid(){return!1===this.required&&0===this.count||(!0!==this.required||0!==this.count)&&(!(this.min&&this.countthis.max))}}},Ze={};var Qe=Ft(Xe,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{staticClass:"k-counter",attrs:{"data-invalid":!t.valid}},[n("span",[t._v(t._s(t.count))]),t.min&&t.max?n("span",{staticClass:"k-counter-rules"},[t._v("("+t._s(t.min)+"–"+t._s(t.max)+")")]):t.min?n("span",{staticClass:"k-counter-rules"},[t._v("≥ "+t._s(t.min))]):t.max?n("span",{staticClass:"k-counter-rules"},[t._v("≤ "+t._s(t.max))]):t._e()])}),[],!1,tn,null,null,null);function tn(t){for(let e in Ze)this[e]=Ze[e]}var en=function(){return Qe.exports}();const nn={props:{disabled:Boolean,config:Object,fields:{type:[Array,Object],default:()=>({})},novalidate:{type:Boolean,default:!1},value:{type:Object,default:()=>({})}},data(){return{errors:{},listeners:l(a({},this.$listeners),{submit:this.onSubmit})}},methods:{focus(t){var e,n;null==(n=null==(e=this.$refs.fields)?void 0:e.focus)||n.call(e,t)},onSubmit(){this.$emit("submit",this.value)},submit(){this.$refs.submitter.click()}}},sn={};var on=Ft(nn,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("form",{ref:"form",staticClass:"k-form",attrs:{method:"POST",autocomplete:"off",novalidate:""},on:{submit:function(e){return e.preventDefault(),t.onSubmit.apply(null,arguments)}}},[t._t("header"),t._t("default",(function(){return[n("k-fieldset",t._g({ref:"fields",attrs:{disabled:t.disabled,fields:t.fields,novalidate:t.novalidate},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}},t.listeners))]})),t._t("footer"),n("input",{ref:"submitter",staticClass:"k-form-submitter",attrs:{type:"submit"}})],2)}),[],!1,rn,null,null,null);function rn(t){for(let e in sn)this[e]=sn[e]}var an=function(){return on.exports}();const ln={props:{lock:[Boolean,Object]},data:()=>({isRefreshing:null,isLocking:null}),computed:{hasChanges(){return this.$store.getters["content/hasChanges"]()},isDisabled(){return!1===this.$store.state.content.status.enabled},isLocked(){return"lock"===this.lockState},isUnlocked(){return"unlock"===this.lockState},mode(){return null!==this.lockState?this.lockState:!0===this.hasChanges?"changes":null},lockState(){return this.supportsLocking&&this.lock?this.lock.state:null},supportsLocking(){return!1!==this.lock},theme(){return"lock"===this.mode?"negative":"unlock"===this.mode?"info":"notice"}},watch:{hasChanges:{handler(t,e){!0===this.supportsLocking&&!1===this.isLocked&&!1===this.isUnlocked&&(!0===t?(this.onLock(),this.isLocking=setInterval(this.onLock,3e4)):e&&(clearInterval(this.isLocking),this.onLock(!1)))},immediate:!0},isLocked(t){!1===t&&this.$events.$emit("model.reload")}},created(){this.supportsLocking&&(this.isRefreshing=setInterval(this.check,1e4)),this.$events.$on("keydown.cmd.s",this.onSave)},destroyed(){clearInterval(this.isRefreshing),clearInterval(this.isLocking),this.$events.$off("keydown.cmd.s",this.onSave)},methods:{check(){this.$reload({navigate:!1,only:"$view.props.lock",silent:!0})},async onLock(t=!0){const e=[this.$view.path+"/lock",null,null,!0];if(!0===t)try{await this.$api.patch(...e)}catch(n){clearInterval(this.isLocking),this.$store.dispatch("content/revert")}else clearInterval(this.isLocking),await this.$api.delete(...e)},onDownload(){let t="";const e=this.$store.getters["content/changes"]();Object.keys(e).forEach((n=>{t+=n+": \n\n"+e[n],t+="\n\n----\n\n"}));let n=document.createElement("a");n.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(t)),n.setAttribute("download",this.$view.path+".txt"),n.style.display="none",document.body.appendChild(n),n.click(),document.body.removeChild(n)},async onResolve(){await this.onUnlock(!1),this.$store.dispatch("content/revert")},onRevert(){this.$refs.revert.open()},async onSave(t){if(!t)return!1;t.preventDefault&&t.preventDefault();try{await this.$store.dispatch("content/save"),this.$events.$emit("model.update"),this.$store.dispatch("notification/success",":)")}catch(e){if(403===e.code)return;e.details&&Object.keys(e.details).length>0?this.$store.dispatch("notification/error",{message:this.$t("error.form.incomplete"),details:e.details}):this.$store.dispatch("notification/error",{message:this.$t("error.form.notSaved"),details:[{label:"Exception: "+e.exception,message:e.message}]})}},async onUnlock(t=!0){const e=[this.$view.path+"/unlock",null,null,!0];!0===t?await this.$api.patch(...e):await this.$api.delete(...e),this.$reload({silent:!0})},revert(){this.$store.dispatch("content/revert"),this.$refs.revert.close()}}},un={};var cn=Ft(ln,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("nav",{staticClass:"k-form-buttons",attrs:{"data-theme":t.theme}},["unlock"===t.mode?n("k-view",[n("p",{staticClass:"k-form-lock-info"},[t._v(" "+t._s(t.$t("lock.isUnlocked"))+" ")]),n("span",{staticClass:"k-form-lock-buttons"},[n("k-button",{staticClass:"k-form-button",attrs:{text:t.$t("download"),icon:"download"},on:{click:t.onDownload}}),n("k-button",{staticClass:"k-form-button",attrs:{text:t.$t("confirm"),icon:"check"},on:{click:t.onResolve}})],1)]):"lock"===t.mode?n("k-view",[n("p",{staticClass:"k-form-lock-info"},[n("k-icon",{attrs:{type:"lock"}}),n("span",{domProps:{innerHTML:t._s(t.$t("lock.isLocked",{email:t.$esc(t.lock.data.email)}))}})],1),t.lock.data.unlockable?n("k-button",{staticClass:"k-form-button",attrs:{text:t.$t("lock.unlock"),icon:"unlock"},on:{click:function(e){return t.onUnlock()}}}):n("k-icon",{staticClass:"k-form-lock-loader",attrs:{type:"loader"}})],1):"changes"===t.mode?n("k-view",[n("k-button",{staticClass:"k-form-button",attrs:{disabled:t.isDisabled,text:t.$t("revert"),icon:"undo"},on:{click:t.onRevert}}),n("k-button",{staticClass:"k-form-button",attrs:{disabled:t.isDisabled,text:t.$t("save"),icon:"check"},on:{click:t.onSave}})],1):t._e(),n("k-dialog",{ref:"revert",attrs:{"submit-button":t.$t("revert"),icon:"undo",theme:"negative"},on:{submit:t.revert}},[n("k-text",{domProps:{innerHTML:t._s(t.$t("revert.confirm"))}})],1)],1)}),[],!1,dn,null,null,null);function dn(t){for(let e in un)this[e]=un[e]}var pn=function(){return cn.exports}();const hn={};var fn=Ft({data:()=>({isOpen:!1,options:[]}),computed:{hasChanges(){return this.ids.length>0},ids(){return Object.keys(this.store).filter((t=>{var e;return Object.keys((null==(e=this.store[t])?void 0:e.changes)||{}).length>0}))},store(){return this.$store.state.content.models}},methods:{async toggle(){if(!1===this.$refs.list.isOpen)try{await this.$dropdown("changes",{method:"POST",body:{ids:this.ids}})((t=>{this.options=t}))}catch(t){return this.$store.dispatch("notification/success",this.$t("lock.unsaved.empty")),this.$store.dispatch("content/clear"),!1}this.$refs.list&&this.$refs.list.toggle()}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.hasChanges?n("k-dropdown",{staticClass:"k-form-indicator"},[n("k-button",{staticClass:"k-form-indicator-toggle k-topbar-button",attrs:{icon:"edit"},on:{click:t.toggle}}),n("k-dropdown-content",{ref:"list",attrs:{align:"right",theme:"light"}},[n("p",{staticClass:"k-form-indicator-info"},[t._v(t._s(t.$t("lock.unsaved"))+":")]),n("hr"),t._l(t.options,(function(e){return n("k-dropdown-item",t._b({key:e.id},"k-dropdown-item",e,!1),[t._v(" "+t._s(e.text)+" ")])}))],2)],1):t._e()}),[],!1,mn,null,null,null);function mn(t){for(let e in hn)this[e]=hn[e]}var gn=function(){return fn.exports}(),kn={props:{after:String}},vn={props:{autofocus:Boolean}},bn={props:{before:String}},yn={props:{disabled:Boolean}},$n={props:{help:String}},_n={props:{id:{type:[Number,String],default(){return this._uid}}}},xn={props:{invalid:Boolean}},wn={props:{label:String}},Sn={props:{name:[Number,String]}},Cn={props:{required:Boolean}};const On={mixins:[yn,$n,wn,Sn,Cn],props:{counter:[Boolean,Object],endpoints:Object,input:[String,Number],translate:Boolean,type:String}},En={};var An=Ft({mixins:[On],inheritAttrs:!1,computed:{labelText(){return this.label||" "}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:"k-field k-field-name-"+t.name,attrs:{"data-disabled":t.disabled,"data-translate":t.translate},on:{focusin:function(e){return t.$emit("focus",e)},focusout:function(e){return t.$emit("blur",e)}}},[t._t("header",(function(){return[n("header",{staticClass:"k-field-header"},[t._t("label",(function(){return[n("label",{staticClass:"k-field-label",attrs:{for:t.input}},[t._v(" "+t._s(t.labelText)+" "),t.required?n("abbr",{attrs:{title:t.$t("field.required")}},[t._v("*")]):t._e()])]})),t._t("options"),t._t("counter",(function(){return[t.counter?n("k-counter",t._b({staticClass:"k-field-counter",attrs:{required:t.required}},"k-counter",t.counter,!1)):t._e()]}))],2)]})),t._t("default"),t._t("footer",(function(){return[t.help||t.$slots.help?n("footer",{staticClass:"k-field-footer"},[t._t("help",(function(){return[t.help?n("k-text",{staticClass:"k-field-help",attrs:{theme:"help"},domProps:{innerHTML:t._s(t.help)}}):t._e()]}))],2):t._e()]}))],2)}),[],!1,Tn,null,null,null);function Tn(t){for(let e in En)this[e]=En[e]}var In=function(){return An.exports}();const Mn={props:{config:Object,disabled:Boolean,fields:{type:[Array,Object],default:()=>[]},novalidate:{type:Boolean,default:!1},value:{type:Object,default:()=>({})}},data:()=>({errors:{}}),methods:{focus(t){if(t)return void(this.hasField(t)&&"function"==typeof this.$refs[t][0].focus&&this.$refs[t][0].focus());const e=Object.keys(this.$refs)[0];this.focus(e)},hasFieldType(t){return this.$helper.isComponent(`k-${t}-field`)},hasField(t){var e;return null==(e=this.$refs[t])?void 0:e[0]},meetsCondition(t){if(!t.when)return!0;let e=!0;return Object.keys(t.when).forEach((n=>{this.value[n.toLowerCase()]!==t.when[n]&&(e=!1)})),e},onInvalid(t,e,n,i){this.errors[i]=e,this.$emit("invalid",this.errors)},hasErrors(){return Object.keys(this.errors).length}}},Ln={};var jn=Ft(Mn,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("fieldset",{staticClass:"k-fieldset"},[n("k-grid",[t._l(t.fields,(function(e,i){return["hidden"!==e.type&&t.meetsCondition(e)?n("k-column",{key:e.signature,attrs:{width:e.width}},[n("k-error-boundary",[t.hasFieldType(e.type)?n("k-"+e.type+"-field",t._b({ref:i,refInFor:!0,tag:"component",attrs:{"form-data":t.value,name:i,novalidate:t.novalidate,disabled:t.disabled||e.disabled},on:{input:function(n){return t.$emit("input",t.value,e,i)},focus:function(n){return t.$emit("focus",n,e,i)},invalid:function(n,s){return t.onInvalid(n,s,e,i)},submit:function(n){return t.$emit("submit",n,e,i)}},model:{value:t.value[i],callback:function(e){t.$set(t.value,i,e)},expression:"value[fieldName]"}},"component",e,!1)):n("k-box",{attrs:{theme:"negative"}},[n("k-text",{attrs:{size:"small"}},[t._v(" The field type "),n("strong",[t._v('"'+t._s(i)+'"')]),t._v(" does not exist ")])],1)],1)],1):t._e()]}))],2)],1)}),[],!1,Dn,null,null,null);function Dn(t){for(let e in Ln)this[e]=Ln[e]}var Bn=function(){return jn.exports}();const Pn={mixins:[kn,bn,yn,xn],props:{autofocus:Boolean,type:String,icon:[String,Boolean],theme:String,novalidate:{type:Boolean,default:!1},value:{type:[String,Boolean,Number,Object,Array],default:null}}},Nn={};var qn=Ft({mixins:[Pn],inheritAttrs:!1,data(){return{isInvalid:this.invalid,listeners:l(a({},this.$listeners),{invalid:(t,e)=>{this.isInvalid=t,this.$emit("invalid",t,e)}})}},computed:{inputProps(){return a(a({},this.$props),this.$attrs)}},methods:{blur(t){(null==t?void 0:t.relatedTarget)&&!1===this.$el.contains(t.relatedTarget)&&this.trigger(null,"blur")},focus(t){this.trigger(t,"focus")},select(t){this.trigger(t,"select")},trigger(t,e){var n,i,s;if("INPUT"===(null==(n=null==t?void 0:t.target)?void 0:n.tagName)&&"function"==typeof(null==(i=null==t?void 0:t.target)?void 0:i[e]))return void t.target[e]();if("function"==typeof(null==(s=this.$refs.input)?void 0:s[e]))return void this.$refs.input[e]();const o=this.$el.querySelector("input, select, textarea");"function"==typeof(null==o?void 0:o[e])&&o[e]()}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-input",attrs:{"data-disabled":t.disabled,"data-invalid":!t.novalidate&&t.isInvalid,"data-theme":t.theme,"data-type":t.type}},[t.$slots.before||t.before?n("span",{staticClass:"k-input-before",on:{click:t.focus}},[t._t("before",(function(){return[t._v(t._s(t.before))]}))],2):t._e(),n("span",{staticClass:"k-input-element",on:{click:function(e){return e.stopPropagation(),t.focus.apply(null,arguments)}}},[t._t("default",(function(){return[n("k-"+t.type+"-input",t._g(t._b({ref:"input",tag:"component",attrs:{value:t.value}},"component",t.inputProps,!1),t.listeners))]}))],2),t.$slots.after||t.after?n("span",{staticClass:"k-input-after",on:{click:t.focus}},[t._t("after",(function(){return[t._v(t._s(t.after))]}))],2):t._e(),t.$slots.icon||t.icon?n("span",{staticClass:"k-input-icon",on:{click:t.focus}},[t._t("icon",(function(){return[n("k-icon",{attrs:{type:t.icon}})]}))],2):t._e()])}),[],!1,Fn,null,null,null);function Fn(t){for(let e in Nn)this[e]=Nn[e]}var Rn=function(){return qn.exports}();const zn={};var Yn=Ft({props:{methods:Array},data:()=>({currentForm:null,isLoading:!1,issue:"",user:{email:"",password:"",remember:!1}}),computed:{canToggle(){return null!==this.codeMode&&!0===this.methods.includes("password")&&(!0===this.methods.includes("password-reset")||!0===this.methods.includes("code"))},codeMode(){return!0===this.methods.includes("password-reset")?"password-reset":!0===this.methods.includes("code")?"code":null},fields(){let t={email:{autofocus:!0,label:this.$t("email"),type:"email",required:!0,link:!1}};return"email-password"===this.form&&(t.password={label:this.$t("password"),type:"password",minLength:8,required:!0,autocomplete:"current-password",counter:!1}),t},form(){return this.currentForm?this.currentForm:"password"===this.methods[0]?"email-password":"email"},isResetForm(){return"password-reset"===this.codeMode&&"email"===this.form},toggleText(){return this.$t("login.toggleText."+this.codeMode+"."+this.formOpposite(this.form))}},methods:{formOpposite:t=>"email-password"===t?"email":"email-password",async login(){this.issue=null,this.isLoading=!0;let t=Object.assign({},this.user);"email"===this.currentForm&&(t.password=null),!0===this.isResetForm&&(t.remember=!1);try{await this.$api.auth.login(t),this.$reload({globals:["$system","$translation"]})}catch(e){this.issue=e.message}finally{this.isLoading=!1}},toggleForm(){this.currentForm=this.formOpposite(this.form),this.$refs.fieldset.focus("email")}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("form",{staticClass:"k-login-form",on:{submit:function(e){return e.preventDefault(),t.login.apply(null,arguments)}}},[n("h1",{staticClass:"sr-only"},[t._v(" "+t._s(t.$t("login"))+" ")]),t.issue?n("k-login-alert",{on:{click:function(e){t.issue=null}}},[t._v(" "+t._s(t.issue)+" ")]):t._e(),n("div",{staticClass:"k-login-fields"},[!0===t.canToggle?n("button",{staticClass:"k-login-toggler",attrs:{type:"button"},on:{click:t.toggleForm}},[t._v(" "+t._s(t.toggleText)+" ")]):t._e(),n("k-fieldset",{ref:"fieldset",attrs:{novalidate:!0,fields:t.fields},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}})],1),n("div",{staticClass:"k-login-buttons"},[!1===t.isResetForm?n("span",{staticClass:"k-login-checkbox"},[n("k-checkbox-input",{attrs:{value:t.user.remember,label:t.$t("login.remember")},on:{input:function(e){t.user.remember=e}}})],1):t._e(),n("k-button",{staticClass:"k-login-button",attrs:{icon:"check",type:"submit"}},[t._v(" "+t._s(t.$t("login"+(t.isResetForm?".reset":"")))+" "),t.isLoading?[t._v(" … ")]:t._e()],2)],1)],1)}),[],!1,Hn,null,null,null);function Hn(t){for(let e in zn)this[e]=zn[e]}var Un=function(){return Yn.exports}();const Kn={};var Jn=Ft({props:{methods:Array,pending:Object},data:()=>({code:"",isLoadingBack:!1,isLoadingLogin:!1,issue:""}),computed:{mode(){return!0===this.methods.includes("password-reset")?"password-reset":"login"}},methods:{async back(){this.isLoadingBack=!0,this.$go("/logout")},async login(){this.issue=null,this.isLoadingLogin=!0;try{await this.$api.auth.verifyCode(this.code),this.$store.dispatch("notification/success",this.$t("welcome")),"password-reset"===this.mode?this.$go("reset-password"):this.$reload()}catch(t){this.issue=t.message}finally{this.isLoadingLogin=!1}}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("form",{staticClass:"k-login-form k-login-code-form",on:{submit:function(e){return e.preventDefault(),t.login.apply(null,arguments)}}},[n("h1",{staticClass:"sr-only"},[t._v(" "+t._s(t.$t("login"))+" ")]),t.issue?n("k-login-alert",{on:{click:function(e){t.issue=null}}},[t._v(" "+t._s(t.issue)+" ")]):t._e(),n("k-user-info",{attrs:{user:t.pending.email}}),n("k-text-field",{attrs:{autofocus:!0,counter:!1,help:t.$t("login.code.text."+t.pending.challenge),label:t.$t("login.code.label."+t.mode),novalidate:!0,placeholder:t.$t("login.code.placeholder."+t.pending.challenge),required:!0,autocomplete:"one-time-code",icon:"unlock",name:"code"},model:{value:t.code,callback:function(e){t.code=e},expression:"code"}}),n("div",{staticClass:"k-login-buttons"},[n("k-button",{staticClass:"k-login-button k-login-back-button",attrs:{icon:"angle-left"},on:{click:t.back}},[t._v(" "+t._s(t.$t("back"))+" "),t.isLoadingBack?[t._v(" … ")]:t._e()],2),n("k-button",{staticClass:"k-login-button",attrs:{icon:"check",type:"submit"}},[t._v(" "+t._s(t.$t("login"+("password-reset"===t.mode?".reset":"")))+" "),t.isLoadingLogin?[t._v(" … ")]:t._e()],2)],1)],1)}),[],!1,Gn,null,null,null);function Gn(t){for(let e in Kn)this[e]=Kn[e]}var Vn=function(){return Jn.exports}();const Wn={};var Xn=Ft({props:{display:{type:String,default:"HH:mm"},value:String},computed:{day(){return this.formatTimes([6,7,8,9,10,11,"-",12,13,14,15,16,17])},night(){return this.formatTimes([18,19,20,21,22,23,"-",0,1,2,3,4,5])}},methods:{formatTimes(t){return t.map((t=>{if("-"===t)return t;const e=this.$library.dayjs(t+":00","H:mm");return{display:e.format(this.display),select:e.toISO("time")}}))},select(t){this.$emit("input",t)}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-times"},[n("div",{staticClass:"k-times-slot"},[n("k-icon",{attrs:{type:"sun"}}),n("ul",t._l(t.day,(function(e){return n("li",{key:e.select},["-"===e?n("hr"):n("k-button",{on:{click:function(n){return t.select(e.select)}}},[t._v(t._s(e.display))])],1)})),0)],1),n("div",{staticClass:"k-times-slot"},[n("k-icon",{attrs:{type:"moon"}}),n("ul",t._l(t.night,(function(e){return n("li",{key:e.select},["-"===e?n("hr"):n("k-button",{on:{click:function(n){return t.select(e.select)}}},[t._v(t._s(e.display))])],1)})),0)],1)])}),[],!1,Zn,null,null,null);function Zn(t){for(let e in Wn)this[e]=Wn[e]}var Qn=function(){return Xn.exports}();const ti={props:{accept:{type:String,default:"*"},attributes:{type:Object},max:{type:Number},method:{type:String,default:"POST"},multiple:{type:Boolean,default:!0},url:{type:String}},data(){return{options:this.$props,completed:{},errors:[],files:[],total:0}},computed:{limit(){return!1===this.options.multiple?1:this.options.max}},methods:{open(t){this.params(t),setTimeout((()=>{this.$refs.input.click()}),1)},params(t){this.options=Object.assign({},this.$props,t)},select(t){this.upload(t.target.files)},drop(t,e){this.params(e),this.upload(t)},upload(t){this.$refs.dialog.open(),this.files=[...t],this.completed={},this.errors=[],this.hasErrors=!1,this.limit&&(this.files=this.files.slice(0,this.limit)),this.total=this.files.length,this.files.forEach((t=>{var e,n;this.$helper.upload(t,{url:this.options.url,attributes:this.options.attributes,method:this.options.method,headers:{"X-CSRF":window.panel.$system.csrf},progress:(t,e,n)=>{var i,s;null==(s=null==(i=this.$refs[e.name])?void 0:i[0])||s.set(n)},success:(t,e,n)=>{this.complete(e,n.data)},error:(t,e,n)=>{this.errors.push({file:e,message:n.message}),this.complete(e,n.data)}}),void 0!==(null==(n=null==(e=this.options)?void 0:e.attributes)?void 0:n.sort)&&this.options.attributes.sort++}))},complete(t,e){if(this.completed[t.name]=e,Object.keys(this.completed).length==this.total){if(this.$refs.input.value="",this.errors.length>0)return this.$forceUpdate(),void this.$emit("error",this.files);setTimeout((()=>{this.$refs.dialog.close(),this.$emit("success",this.files,Object.values(this.completed))}),250)}}}},ei={};var ni=Ft(ti,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-upload"},[n("input",{ref:"input",attrs:{accept:t.options.accept,multiple:t.options.multiple,"aria-hidden":"true",type:"file",tabindex:"-1"},on:{change:t.select,click:function(t){t.stopPropagation()}}}),n("k-dialog",{ref:"dialog",staticClass:"k-upload-dialog",attrs:{"cancel-button":!1,"submit-button":!1,size:"medium"},scopedSlots:t._u([{key:"footer",fn:function(){return[t.errors.length>0?[n("k-button-group",{attrs:{buttons:[{icon:"check",text:t.$t("confirm"),click:function(){return t.$refs.dialog.close()}}]}})]:t._e()]},proxy:!0}])},[t.errors.length>0?[n("k-headline",[t._v(t._s(t.$t("upload.errors")))]),n("ul",{staticClass:"k-upload-error-list"},t._l(t.errors,(function(e,i){return n("li",{key:"error-"+i},[n("p",{staticClass:"k-upload-error-filename"},[t._v(" "+t._s(e.file.name)+" ")]),n("p",{staticClass:"k-upload-error-message"},[t._v(" "+t._s(e.message)+" ")])])})),0)]:[n("k-headline",[t._v(t._s(t.$t("upload.progress")))]),n("ul",{staticClass:"k-upload-list"},t._l(t.files,(function(e,i){return n("li",{key:"file-"+i},[n("k-progress",{ref:e.name,refInFor:!0}),n("p",{staticClass:"k-upload-list-filename"},[t._v(" "+t._s(e.name)+" ")]),n("p",[t._v(t._s(t.errors[e.name]))])],1)})),0)]],2)],1)}),[],!1,ii,null,null,null);function ii(t){for(let e in ei)this[e]=ei[e]}var si=function(){return ni.exports}();var oi=t=>({$from:e})=>((t,e)=>{for(let n=t.depth;n>0;n--){const i=t.node(n);if(e(i))return{pos:n>0?t.before(n):0,start:t.start(n),depth:n,node:i}}})(e,t),ri=t=>e=>{if((t=>t instanceof b)(e)){const{node:n,$from:i}=e;if(((t,e)=>Array.isArray(t)&&t.indexOf(e.type)>-1||e.type===t)(t,n))return{node:n,pos:i.pos,depth:i.depth}}},ai=(t,e,n={})=>{const i=ri(e)(t.selection)||oi((t=>t.type===e))(t.selection);return Object.keys(n).length&&i?i.node.hasMarkup(e,a(a({},i.node.attrs),n)):!!i};function li(t=null,e=null){if(!t||!e)return!1;const n=t.parent.childAfter(t.parentOffset);if(!n.node)return!1;const i=n.node.marks.find((t=>t.type===e));if(!i)return!1;let s=t.index(),o=t.start()+n.offset,r=s+1,a=o+n.node.nodeSize;for(;s>0&&i.isInSet(t.parent.child(s-1).marks);)s-=1,o-=t.parent.child(s).nodeSize;for(;r{s=[...s,...t.marks]}));const o=s.find((t=>t.type.name===e.name));return o?o.attrs:{}},getNodeAttrs:function(t,e){const{from:n,to:i}=t.selection;let s=[];t.doc.nodesBetween(n,i,(t=>{s=[...s,t]}));const o=s.reverse().find((t=>t.type.name===e.name));return o?o.attrs:{}},markInputRule:function(t,e,n){return new m(t,((t,i,s,o)=>{const r=n instanceof Function?n(i):n,{tr:a}=t,l=i.length-1;let u=o,c=s;if(i[l]){const n=s+i[0].indexOf(i[l-1]),r=n+i[l-1].length-1,d=n+i[l-1].lastIndexOf(i[l]),p=d+i[l].length,h=function(t,e,n){let i=[];return n.doc.nodesBetween(t,e,((t,e)=>{i=[...i,...t.marks.map((n=>({start:e,end:e+t.nodeSize,mark:n})))]})),i}(s,o,t).filter((t=>{const{excluded:n}=t.mark.type;return n.find((t=>t.name===e.name))})).filter((t=>t.end>n));if(h.length)return!1;pn&&a.delete(n,d),c=n,u=c+i[l].length}return a.addMark(c,u,e.create(r)),a.removeStoredMark(e),a}))},markIsActive:function(t,e){const{from:n,$from:i,to:s,empty:o}=t.selection;return o?!!e.isInSet(t.storedMarks||i.marks()):!!t.doc.rangeHasMark(n,s,e)},markPasteRule:function(t,e,n){const i=(s,o)=>{const r=[];return s.forEach((s=>{var a;if(s.isText){const{text:i,marks:l}=s;let u,c=0;const d=!!l.filter((t=>"link"===t.type.name))[0];for(;!d&&null!==(u=t.exec(i));)if((null==(a=null==o?void 0:o.type)?void 0:a.allowsMarkType(e))&&u[1]){const t=u.index,i=t+u[0].length,o=t+u[0].indexOf(u[1]),a=o+u[1].length,l=n instanceof Function?n(u):n;t>0&&r.push(s.cut(c,t)),r.push(s.cut(o,a).mark(e.create(l).addToSet(s.marks))),c=i}cnew k(i(t.content),t.openStart,t.openEnd)}})},minMax:function(t=0,e=0,n=0){return Math.min(Math.max(parseInt(t,10),e),n)},nodeIsActive:ai,nodeInputRule:function(t,e,n){return new m(t,((t,i,s,o)=>{const r=n instanceof Function?n(i):n,{tr:a}=t;return i[0]&&a.replaceWith(s-1,o,e.create(r)),a}))},pasteRule:function(t,e,n){const i=s=>{const o=[];return s.forEach((s=>{if(s.isText){const{text:i}=s;let r,a=0;do{if(r=t.exec(i),r){const t=r.index,i=t+r[0].length,l=n instanceof Function?n(r[0]):n;t>0&&o.push(s.cut(a,t)),o.push(s.cut(t,i).mark(e.create(l).addToSet(s.marks))),a=i}}while(r);anew k(i(t.content),t.openStart,t.openEnd)}})},removeMark:function(t){return(e,n)=>{const{tr:i,selection:s}=e;let{from:o,to:r}=s;const{$from:a,empty:l}=s;if(l){const e=li(a,t);o=e.from,r=e.to}return i.removeMark(o,r,t),n(i)}},toggleBlockType:function(t,e,n={}){return(i,s,o)=>ai(i,t,n)?y(e)(i,s,o):y(t,n)(i,s,o)},toggleList:function(t,e){return(n,i,s)=>{const{schema:o,selection:r}=n,{$from:a,$to:l}=r,u=a.blockRange(l);if(!u)return!1;const c=oi((t=>ui(t,o)))(r);if(u.depth>=1&&c&&u.depth-c.depth<=1){if(c.node.type===t)return $(e)(n,i,s);if(ui(c.node,o)&&t.validContent(c.node.content)){const{tr:e}=n;return e.setNodeMarkup(c.pos,t),i&&i(e),!1}}return _(t)(n,i,s)}},updateMark:function(t,e){return(n,i)=>{const{tr:s,selection:o,doc:r}=n,{ranges:a,empty:l}=o;if(l){const{from:n,to:i}=li(o.$from,t);r.rangeHasMark(n,i,t)&&s.removeMark(n,i,t),s.addMark(n,i,t.create(e))}else a.forEach((n=>{const{$to:i,$from:o}=n;r.rangeHasMark(o.pos,i.pos,t)&&s.removeMark(o.pos,i.pos,t),s.addMark(o.pos,i.pos,t.create(e))}));return i(s)}}};class di{constructor(t=[],e){t.forEach((t=>{t.bindEditor(e),t.init()})),this.extensions=t}commands({schema:t,view:e}){return this.extensions.filter((t=>t.commands)).reduce(((n,i)=>{const{name:s,type:o}=i,r={},l=i.commands(a({schema:t,utils:ci},["node","mark"].includes(o)?{type:t[`${o}s`][s]}:{})),u=(t,n)=>{r[t]=t=>{if("function"!=typeof n||!e.editable)return!1;e.focus();const i=n(t);return"function"==typeof i?i(e.state,e.dispatch,e):i}};return"object"==typeof l?Object.entries(l).forEach((([t,e])=>{u(t,e)})):u(s,l),a(a({},n),r)}),{})}buttons(t="mark"){const e={};return this.extensions.filter((e=>e.type===t)).filter((t=>t.button)).forEach((t=>{Array.isArray(t.button)?t.button.forEach((t=>{e[t.id||t.name]=t})):e[t.name]=t.button})),e}getAllowedExtensions(t){return t instanceof Array||!t?t instanceof Array?this.extensions.filter((e=>!t.includes(e.name))):this.extensions:[]}getFromExtensions(t,e,n=this.extensions){return n.filter((t=>["extension"].includes(t.type))).filter((e=>e[t])).map((n=>n[t](l(a({},e),{utils:ci}))))}getFromNodesAndMarks(t,e,n=this.extensions){return n.filter((t=>["node","mark"].includes(t.type))).filter((e=>e[t])).map((n=>n[t](l(a({},e),{type:e.schema[`${n.type}s`][n.name],utils:ci}))))}inputRules({schema:t,excludedExtensions:e}){const n=this.getAllowedExtensions(e);return[...this.getFromExtensions("inputRules",{schema:t},n),...this.getFromNodesAndMarks("inputRules",{schema:t},n)].reduce(((t,e)=>[...t,...e]),[])}keymaps({schema:t}){return[...this.getFromExtensions("keys",{schema:t}),...this.getFromNodesAndMarks("keys",{schema:t})].map((t=>I(t)))}get marks(){return this.extensions.filter((t=>"mark"===t.type)).reduce(((t,{name:e,schema:n})=>l(a({},t),{[e]:n})),{})}get nodes(){return this.extensions.filter((t=>"node"===t.type)).reduce(((t,{name:e,schema:n})=>l(a({},t),{[e]:n})),{})}get options(){const{view:t}=this;return this.extensions.reduce(((e,n)=>l(a({},e),{[n.name]:new Proxy(n.options,{set(e,n,i){const s=e[n]!==i;return Object.assign(e,{[n]:i}),s&&t.updateState(t.state),!0}})})),{})}pasteRules({schema:t,excludedExtensions:e}){const n=this.getAllowedExtensions(e);return[...this.getFromExtensions("pasteRules",{schema:t},n),...this.getFromNodesAndMarks("pasteRules",{schema:t},n)].reduce(((t,e)=>[...t,...e]),[])}plugins({schema:t}){return[...this.getFromExtensions("plugins",{schema:t}),...this.getFromNodesAndMarks("plugins",{schema:t})].reduce(((t,e)=>[...t,...e]),[]).map((t=>t instanceof g?t:new g(t)))}}class pi{constructor(t={}){this.options=a(a({},this.defaults),t)}init(){return null}bindEditor(t=null){this.editor=t}get name(){return null}get type(){return"extension"}get defaults(){return{}}plugins(){return[]}inputRules(){return[]}pasteRules(){return[]}keys(){return{}}}class hi extends pi{constructor(t={}){super(t)}get type(){return"node"}get schema(){return null}commands(){return{}}}class fi extends hi{get defaults(){return{inline:!1}}get name(){return"doc"}get schema(){return{content:this.options.inline?"paragraph+":"block+"}}}class mi extends hi{get button(){return{id:this.name,icon:"paragraph",label:window.panel.$t("toolbar.button.paragraph"),name:this.name}}commands({utils:t,type:e}){return{paragraph:()=>t.setBlockType(e)}}get schema(){return{content:"inline*",group:"block",draggable:!1,parseDOM:[{tag:"p"}],toDOM:()=>["p",0]}}get name(){return"paragraph"}}class gi extends hi{get name(){return"text"}get schema(){return{group:"inline"}}}class ki extends class{emit(t,...e){this._callbacks=this._callbacks||{};const n=this._callbacks[t];return n&&n.forEach((t=>t.apply(this,e))),this}off(t,e){if(arguments.length){const n=this._callbacks?this._callbacks[t]:null;n&&(e?this._callbacks[t]=n.filter((t=>t!==e)):delete this._callbacks[t])}else this._callbacks={};return this}on(t,e){return this._callbacks=this._callbacks||{},this._callbacks[t]=this._callbacks[t]||[],this._callbacks[t].push(e),this}}{constructor(t={}){super(),this.defaults={autofocus:!1,content:"",disableInputRules:!1,disablePasteRules:!1,editable:!0,element:null,extensions:[],emptyDocument:{type:"doc",content:[]},events:{},inline:!1,parseOptions:{},topNode:"doc",useBuiltInExtensions:!0},this.init(t)}blur(){this.view.dom.blur()}get builtInExtensions(){return this.options.useBuiltInExtensions?[new fi({inline:this.options.inline}),new gi,new mi]:[]}buttons(t){return this.extensions.buttons(t)}clearContent(t=!1){this.setContent(this.options.emptyDocument,t)}command(t,...e){this.commands[t]&&this.commands[t](...e)}createCommands(){return this.extensions.commands({schema:this.schema,view:this.view})}createDocument(t,e=this.options.parseOptions){if(null===t)return this.schema.nodeFromJSON(this.options.emptyDocument);if("object"==typeof t)try{return this.schema.nodeFromJSON(t)}catch(n){return window.console.warn("Invalid content.","Passed value:",t,"Error:",n),this.schema.nodeFromJSON(this.options.emptyDocument)}if("string"==typeof t){const n=`

${t}
`,i=(new window.DOMParser).parseFromString(n,"text/html").body.firstElementChild;return M.fromSchema(this.schema).parse(i,e)}return!1}createEvents(){const t=this.options.events||{};return Object.entries(t).forEach((([t,e])=>{this.on(t,e)})),t}createExtensions(){return new di([...this.builtInExtensions,...this.options.extensions],this)}createFocusEvents(){const t=(t,e,n)=>{this.focused=n,this.emit(n?"focus":"blur",{event:e,state:t.state,view:t});const i=this.state.tr.setMeta("focused",n);this.view.dispatch(i)};return new g({props:{attributes:{tabindex:0},handleDOMEvents:{focus:(e,n)=>{t(e,n,!0)},blur:(e,n)=>{t(e,n,!1)}}}})}createInputRules(){return this.extensions.inputRules({schema:this.schema,excludedExtensions:this.options.disableInputRules})}createKeymaps(){return this.extensions.keymaps({schema:this.schema})}createMarks(){return this.extensions.marks}createNodes(){return this.extensions.nodes}createPasteRules(){return this.extensions.pasteRules({schema:this.schema,excludedExtensions:this.options.disablePasteRules})}createPlugins(){return this.extensions.plugins({schema:this.schema})}createSchema(){return new L({topNode:this.options.topNode,nodes:this.nodes,marks:this.marks})}createState(){return j.create({schema:this.schema,doc:this.createDocument(this.options.content),plugins:[...this.plugins,D({rules:this.inputRules}),...this.pasteRules,...this.keymaps,I({Backspace:q}),I(F),this.createFocusEvents()]})}createView(){return new B(this.element,{dispatchTransaction:this.dispatchTransaction.bind(this),editable:()=>this.options.editable,handlePaste:(t,e)=>{if("function"==typeof this.events.paste){const t=e.clipboardData.getData("text/html"),n=e.clipboardData.getData("text/plain");if(!0===this.events.paste(e,t,n))return!0}},handleDrop:(...t)=>{this.emit("drop",...t)},state:this.createState()})}destroy(){this.view&&this.view.destroy()}dispatchTransaction(t){const e=this.state,n=this.state.apply(t);this.view.updateState(n),this.selection={from:this.state.selection.from,to:this.state.selection.to},this.setActiveNodesAndMarks();const i={editor:this,getHTML:this.getHTML.bind(this),getJSON:this.getJSON.bind(this),state:this.state,transaction:t};this.emit("transaction",i),!t.docChanged&&t.getMeta("preventUpdate")||this.emit("update",i);const{from:s,to:o}=this.state.selection,r=!e||!e.selection.eq(n.selection);this.emit(n.selection.empty?"deselect":"select",l(a({},i),{from:s,hasChanged:r,to:o}))}focus(t=null){if(this.view.focused&&null===t||!1===t)return;const{from:e,to:n}=this.selectionAtPosition(t);this.setSelection(e,n),setTimeout((()=>this.view.focus()),10)}getHTML(){const t=document.createElement("div"),e=P.fromSchema(this.schema).serializeFragment(this.state.doc.content);return t.appendChild(e),this.options.inline&&t.querySelector("p")?t.querySelector("p").innerHTML:t.innerHTML}getJSON(){return this.state.doc.toJSON()}getMarkAttrs(t=null){return this.activeMarkAttrs[t]}getSchemaJSON(){return JSON.parse(JSON.stringify({nodes:this.nodes,marks:this.marks}))}init(t={}){this.options=a(a({},this.defaults),t),this.element=this.options.element,this.focused=!1,this.selection={from:0,to:0},this.events=this.createEvents(),this.extensions=this.createExtensions(),this.nodes=this.createNodes(),this.marks=this.createMarks(),this.schema=this.createSchema(),this.keymaps=this.createKeymaps(),this.inputRules=this.createInputRules(),this.pasteRules=this.createPasteRules(),this.plugins=this.createPlugins(),this.view=this.createView(),this.commands=this.createCommands(),this.setActiveNodesAndMarks(),!1!==this.options.autofocus&&this.focus(this.options.autofocus),this.emit("init",{view:this.view,state:this.state}),this.extensions.view=this.view,this.setContent(this.options.content,!0)}isEditable(){return this.options.editable}isEmpty(){if(this.state)return 0===this.state.doc.textContent.length}get isActive(){return Object.entries(a(a({},this.activeMarks),this.activeNodes)).reduce(((t,[e,n])=>l(a({},t),{[e]:(t={})=>n(t)})),{})}removeMark(t){if(this.schema.marks[t])return ci.removeMark(this.schema.marks[t])(this.state,this.view.dispatch)}selectionAtPosition(t=null){if(this.selection&&null===t)return this.selection;if("start"===t||!0===t)return{from:0,to:0};if("end"===t){const{doc:t}=this.state;return{from:t.content.size,to:t.content.size}}return{from:t,to:t}}setActiveNodesAndMarks(){this.activeMarks=Object.values(this.schema.marks).filter((t=>ci.markIsActive(this.state,t))).map((t=>t.name)),this.activeMarkAttrs=Object.entries(this.schema.marks).reduce(((t,[e,n])=>l(a({},t),{[e]:ci.getMarkAttrs(this.state,n)})),{}),this.activeNodes=Object.values(this.schema.nodes).filter((t=>ci.nodeIsActive(this.state,t))).map((t=>t.name)),this.activeNodeAttrs=Object.entries(this.schema.nodes).reduce(((t,[e,n])=>l(a({},t),{[e]:ci.getNodeAttrs(this.state,n)})),{})}setContent(t={},e=!1,n){const{doc:i,tr:s}=this.state,o=this.createDocument(t,n),r=N.create(i,0,i.content.size),a=s.setSelection(r).replaceSelectionWith(o,!1).setMeta("preventUpdate",!e);this.view.dispatch(a)}setSelection(t=0,e=0){const{doc:n,tr:i}=this.state,s=ci.minMax(t,0,n.content.size),o=ci.minMax(e,0,n.content.size),r=N.create(n,s,o),a=i.setSelection(r);this.view.dispatch(a)}get state(){return this.view?this.view.state:null}toggleMark(t){if(this.schema.marks[t])return ci.toggleMark(this.schema.marks[t])(this.state,this.view.dispatch)}updateMark(t,e){if(this.schema.marks[t])return ci.updateMark(this.schema.marks[t],e)(this.state,this.view.dispatch)}}const vi={};var bi=Ft({data:()=>({link:{href:null,title:null,target:!1}}),computed:{fields(){return{href:{label:this.$t("url"),type:"text",icon:"url"},title:{label:this.$t("title"),type:"text",icon:"title"},target:{label:this.$t("open.newWindow"),type:"toggle",text:[this.$t("no"),this.$t("yes")]}}}},methods:{open(t){this.link=a({title:null,target:!1},t),this.link.target=Boolean(this.link.target),this.$refs.dialog.open()},submit(){this.$emit("submit",l(a({},this.link),{target:this.link.target?"_blank":null})),this.$refs.dialog.close()}}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("k-form-dialog",{ref:"dialog",attrs:{fields:t.fields,"submit-button":t.$t("confirm"),size:"medium"},on:{close:function(e){return t.$emit("close")},submit:t.submit},model:{value:t.link,callback:function(e){t.link=e},expression:"link"}})}),[],!1,yi,null,null,null);function yi(t){for(let e in vi)this[e]=vi[e]}var $i=function(){return bi.exports}();const _i={};var xi=Ft({data:()=>({email:{email:null,title:null}}),computed:{fields(){return{href:{label:this.$t("email"),type:"email",icon:"email"},title:{label:this.$t("title"),type:"text",icon:"title"}}}},methods:{open(t){this.email=a({title:null},t),this.$refs.dialog.open()},submit(){this.$emit("submit",this.email),this.$refs.dialog.close()}}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("k-form-dialog",{ref:"dialog",attrs:{fields:t.fields,"submit-button":t.$t("confirm"),size:"medium"},on:{close:function(e){return t.$emit("close")},submit:t.submit},model:{value:t.email,callback:function(e){t.email=e},expression:"email"}})}),[],!1,wi,null,null,null);function wi(t){for(let e in _i)this[e]=_i[e]}var Si=function(){return xi.exports}();class Ci extends pi{constructor(t={}){super(t)}command(){return()=>{}}remove(){this.editor.removeMark(this.name)}get schema(){return null}get type(){return"mark"}toggle(){return this.editor.toggleMark(this.name)}update(t){this.editor.updateMark(this.name,t)}}class Oi extends Ci{get button(){return{icon:"code",label:window.panel.$t("toolbar.button.code")}}commands(){return()=>this.toggle()}inputRules({type:t,utils:e}){return[e.markInputRule(/(?:`)([^`]+)(?:`)$/,t)]}keys(){return{"Mod-`":()=>this.toggle()}}get name(){return"code"}pasteRules({type:t,utils:e}){return[e.markPasteRule(/(?:`)([^`]+)(?:`)/g,t)]}get schema(){return{excludes:"_",parseDOM:[{tag:"code"}],toDOM:()=>["code",0]}}}class Ei extends Ci{get button(){return{icon:"bold",label:window.panel.$t("toolbar.button.bold")}}commands(){return()=>this.toggle()}inputRules({type:t,utils:e}){return[e.markInputRule(/(?:\*\*|__)([^*_]+)(?:\*\*|__)$/,t)]}keys(){return{"Mod-b":()=>this.toggle()}}get name(){return"bold"}pasteRules({type:t,utils:e}){return[e.markPasteRule(/(?:\*\*|__)([^*_]+)(?:\*\*|__)/g,t)]}get schema(){return{parseDOM:[{tag:"strong"},{tag:"b",getAttrs:t=>"normal"!==t.style.fontWeight&&null},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}],toDOM:()=>["strong",0]}}}class Ai extends Ci{get button(){return{icon:"italic",label:window.panel.$t("toolbar.button.italic")}}commands(){return()=>this.toggle()}inputRules({type:t,utils:e}){return[e.markInputRule(/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/,t),e.markInputRule(/(?:^|\s)((?:_)((?:[^_]+))(?:_))$/,t)]}keys(){return{"Mod-i":()=>this.toggle()}}get name(){return"italic"}pasteRules({type:t,utils:e}){return[e.markPasteRule(/_([^_]+)_/g,t),e.markPasteRule(/\*([^*]+)\*/g,t)]}get schema(){return{parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style=italic"}],toDOM:()=>["em",0]}}}class Ti extends Ci{get button(){return{icon:"url",label:window.panel.$t("toolbar.button.link")}}commands(){return{link:()=>{this.editor.emit("link",this.editor)},insertLink:(t={})=>{if(t.href)return this.update(t)},removeLink:()=>this.remove(),toggleLink:(t={})=>{var e;(null==(e=t.href)?void 0:e.length)>0?this.editor.command("insertLink",t):this.editor.command("removeLink")}}}get defaults(){return{target:null}}get name(){return"link"}pasteRules({type:t,utils:e}){return[e.pasteRule(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z]{2,}\b([-a-zA-Z0-9@:%_+.~#?&//=,]*)/gi,t,(t=>({href:t})))]}plugins(){return[{props:{handleClick:(t,e,n)=>{const i=this.editor.getMarkAttrs("link");i.href&&!0===n.altKey&&n.target instanceof HTMLAnchorElement&&(n.stopPropagation(),window.open(i.href,i.target))}}}]}get schema(){return{attrs:{href:{default:null},target:{default:null},title:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]:not([href^='mailto:'])",getAttrs:t=>({href:t.getAttribute("href"),target:t.getAttribute("target"),title:t.getAttribute("title")})}],toDOM:t=>["a",l(a({},t.attrs),{rel:"noopener noreferrer"}),0]}}}class Ii extends Ci{get button(){return{icon:"email",label:"Email"}}commands(){return{email:()=>{this.editor.emit("email")},insertEmail:(t={})=>{if(t.href)return this.update(t)},removeEmail:()=>this.remove(),toggleEmail:(t={})=>{var e;(null==(e=t.href)?void 0:e.length)>0?this.editor.command("insertEmail",t):this.editor.command("removeEmail")}}}get defaults(){return{target:null}}get name(){return"email"}pasteRules({type:t,utils:e}){return[e.pasteRule(/^[\w-.]+@([\w-]+\.)+[\w-]{2,4}$/gi,t,(t=>({href:t})))]}plugins(){return[{props:{handleClick:(t,e,n)=>{const i=this.editor.getMarkAttrs("email");i.href&&!0===n.altKey&&n.target instanceof HTMLAnchorElement&&(n.stopPropagation(),window.open(i.href))}}}]}get schema(){return{attrs:{href:{default:null},title:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href^='mailto:']",getAttrs:t=>({href:t.getAttribute("href").replace("mailto:",""),title:t.getAttribute("title")})}],toDOM:t=>["a",l(a({},t.attrs),{href:"mailto:"+t.attrs.href}),0]}}}class Mi extends Ci{get button(){return{icon:"strikethrough",label:window.panel.$t("toolbar.button.strike")}}commands(){return()=>this.toggle()}inputRules({type:t,utils:e}){return[e.markInputRule(/~([^~]+)~$/,t)]}keys(){return{"Mod-d":()=>this.toggle()}}get name(){return"strike"}pasteRules({type:t,utils:e}){return[e.markPasteRule(/~([^~]+)~/g,t)]}get schema(){return{parseDOM:[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",getAttrs:t=>"line-through"===t}],toDOM:()=>["s",0]}}}class Li extends Ci{get button(){return{icon:"underline",label:window.panel.$t("toolbar.button.underline")}}commands(){return()=>this.toggle()}keys(){return{"Mod-u":()=>this.toggle()}}get name(){return"underline"}get schema(){return{parseDOM:[{tag:"u"},{style:"text-decoration",getAttrs:t=>"underline"===t}],toDOM:()=>["u",0]}}}class ji extends hi{get button(){return{id:this.name,icon:"list-bullet",label:window.panel.$t("toolbar.button.ul"),name:this.name,when:["listItem","bulletList","orderedList"]}}commands({type:t,schema:e,utils:n}){return()=>n.toggleList(t,e.nodes.listItem)}inputRules({type:t,utils:e}){return[e.wrappingInputRule(/^\s*([-+*])\s$/,t)]}keys({type:t,schema:e,utils:n}){return{"Shift-Ctrl-8":n.toggleList(t,e.nodes.listItem)}}get name(){return"bulletList"}get schema(){return{content:"listItem+",group:"block",parseDOM:[{tag:"ul"}],toDOM:()=>["ul",0]}}}class Di extends hi{commands({utils:t,type:e}){return()=>this.createHardBreak(t,e)}createHardBreak(t,e){return t.chainCommands(t.exitCode,((t,n)=>(n(t.tr.replaceSelectionWith(e.create()).scrollIntoView()),!0)))}get defaults(){return{enter:!1,text:!1}}keys({utils:t,type:e}){const n=this.createHardBreak(t,e);let i={"Mod-Enter":n,"Shift-Enter":n};return this.options.enter&&(i.Enter=n),i}get name(){return"hardBreak"}get schema(){return{inline:!0,group:"inline",selectable:!1,parseDOM:[{tag:"br"}],toDOM:()=>["br"]}}}class Bi extends hi{get button(){return this.options.levels.map((t=>({id:`h${t}`,command:`h${t}`,icon:`h${t}`,label:window.panel.$t("toolbar.button.heading."+t),attrs:{level:t},name:this.name,when:["heading","paragraph"]})))}commands({type:t,schema:e,utils:n}){let i={toggleHeading:i=>n.toggleBlockType(t,e.nodes.paragraph,i)};return this.options.levels.forEach((s=>{i[`h${s}`]=()=>n.toggleBlockType(t,e.nodes.paragraph,{level:s})})),i}get defaults(){return{levels:[1,2,3,4,5,6]}}inputRules({type:t,utils:e}){return this.options.levels.map((n=>e.textblockTypeInputRule(new RegExp(`^(#{1,${n}})\\s$`),t,(()=>({level:n})))))}keys({type:t,utils:e}){return this.options.levels.reduce(((n,i)=>a(a({},n),{[`Shift-Ctrl-${i}`]:e.setBlockType(t,{level:i})})),{})}get name(){return"heading"}get schema(){return{attrs:{level:{default:1}},content:"inline*",group:"block",defining:!0,draggable:!1,parseDOM:this.options.levels.map((t=>({tag:`h${t}`,attrs:{level:t}}))),toDOM:t=>[`h${t.attrs.level}`,0]}}}class Pi extends hi{commands({type:t}){return()=>(e,n)=>n(e.tr.replaceSelectionWith(t.create()))}inputRules({type:t,utils:e}){return[e.nodeInputRule(/^(?:---|___\s|\*\*\*\s)$/,t)]}get name(){return"horizontalRule"}get schema(){return{group:"block",parseDOM:[{tag:"hr"}],toDOM:()=>["hr"]}}}class Ni extends hi{keys({type:t,utils:e}){return{Enter:e.splitListItem(t),"Shift-Tab":e.liftListItem(t),Tab:e.sinkListItem(t)}}get name(){return"listItem"}get schema(){return{content:"paragraph block*",defining:!0,draggable:!1,parseDOM:[{tag:"li"}],toDOM:()=>["li",0]}}}class qi extends hi{get button(){return{id:this.name,icon:"list-numbers",label:window.panel.$t("toolbar.button.ol"),name:this.name,when:["listItem","bulletList","orderedList"]}}commands({type:t,schema:e,utils:n}){return()=>n.toggleList(t,e.nodes.listItem)}inputRules({type:t,utils:e}){return[e.wrappingInputRule(/^(\d+)\.\s$/,t,(t=>({order:+t[1]})),((t,e)=>e.childCount+e.attrs.order===+t[1]))]}keys({type:t,schema:e,utils:n}){return{"Shift-Ctrl-9":n.toggleList(t,e.nodes.listItem)}}get name(){return"orderedList"}get schema(){return{attrs:{order:{default:1}},content:"listItem+",group:"block",parseDOM:[{tag:"ol",getAttrs:t=>({order:t.hasAttribute("start")?+t.getAttribute("start"):1})}],toDOM:t=>1===t.attrs.order?["ol",0]:["ol",{start:t.attrs.order},0]}}}class Fi extends pi{commands(){return{undo:()=>R,redo:()=>z,undoDepth:()=>Y,redoDepth:()=>H}}get defaults(){return{depth:"",newGroupDelay:""}}keys(){return{"Mod-z":R,"Mod-y":z,"Shift-Mod-z":z,"Mod-я":R,"Shift-Mod-я":z}}get name(){return"history"}plugins(){return[U({depth:this.options.depth,newGroupDelay:this.options.newGroupDelay})]}}class Ri extends pi{commands(){return{insertHtml:t=>(e,n)=>{let i=document.createElement("div");i.innerHTML=t.trim();const s=M.fromSchema(e.schema).parse(i);n(e.tr.replaceSelectionWith(s).scrollIntoView())}}}}class zi extends pi{constructor(t={}){super(t)}close(){this.visible=!1,this.emit()}emit(){this.editor.emit("toolbar",{marks:this.marks,nodes:this.nodes,nodeAttrs:this.nodeAttrs,position:this.position,visible:this.visible})}init(){this.position={left:0,bottom:0},this.visible=!1,this.editor.on("blur",(()=>{this.close()})),this.editor.on("deselect",(()=>{this.close()})),this.editor.on("select",(({hasChanged:t})=>{!1!==t?this.open():this.emit()}))}get marks(){return this.editor.activeMarks}get nodes(){return this.editor.activeNodes}get nodeAttrs(){return this.editor.activeNodeAttrs}open(){this.visible=!0,this.reposition(),this.emit()}reposition(){const{from:t,to:e}=this.editor.selection,n=this.editor.view.coordsAtPos(t),i=this.editor.view.coordsAtPos(e,!0),s=this.editor.element.getBoundingClientRect();let o=(n.left+i.left)/2-s.left,r=Math.round(s.bottom-n.top);return this.position={bottom:r,left:o}}get type(){return"toolbar"}}const Yi={props:{activeMarks:{type:Array,default:()=>[]},activeNodes:{type:Array,default:()=>[]},activeNodeAttrs:{type:[Array,Object],default:()=>[]},editor:{type:Object,required:!0},marks:{type:Array},isParagraphNodeHidden:{type:Boolean,default:!1}},computed:{activeButton(){return Object.values(this.nodeButtons).find((t=>this.isButtonActive(t)))||!1},hasVisibleButtons(){const t=Object.keys(this.nodeButtons);return t.length>1||1===t.length&&!1===t.includes("paragraph")},markButtons(){return this.buttons("mark")},nodeButtons(){let t=this.buttons("node");return!0===this.isParagraphNodeHidden&&t.paragraph&&delete t.paragraph,t}},methods:{buttons(t){const e=this.editor.buttons(t);let n=this.sorting;!1!==n&&!1!==Array.isArray(n)||(n=Object.keys(e));let i={};return n.forEach((t=>{e[t]&&(i[t]=e[t])})),i},command(t,...e){this.$emit("command",t,...e)},isButtonActive(t){if("paragraph"===t.name)return 1===this.activeNodes.length&&this.activeNodes.includes(t.name);let e=!0;if(t.attrs){const n=Object.values(this.activeNodeAttrs).find((e=>JSON.stringify(e)===JSON.stringify(t.attrs)));e=Boolean(n||!1)}return!0===e&&this.activeNodes.includes(t.name)},isButtonCurrent(t){return!!this.activeButton&&this.activeButton.id===t.id},isButtonDisabled(t){var e;if(null==(e=this.activeButton)?void 0:e.when){return!1===this.activeButton.when.includes(t.name)}return!1},needDividerAfterNode(t){let e=["paragraph"],n=Object.keys(this.nodeButtons);return(n.includes("bulletList")||n.includes("orderedList"))&&e.push("h6"),e.includes(t.id)}}},Hi={};var Ui=Ft(Yi,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-writer-toolbar"},[t.hasVisibleButtons?n("k-dropdown",{nativeOn:{mousedown:function(t){t.preventDefault()}}},[n("k-button",{class:{"k-writer-toolbar-button k-writer-toolbar-nodes":!0,"k-writer-toolbar-button-active":!!t.activeButton},attrs:{icon:t.activeButton.icon||"title"},on:{click:function(e){return t.$refs.nodes.toggle()}}}),n("k-dropdown-content",{ref:"nodes"},[t._l(t.nodeButtons,(function(e,i){return[n("k-dropdown-item",{key:i,attrs:{current:t.isButtonCurrent(e),disabled:t.isButtonDisabled(e),icon:e.icon},on:{click:function(n){return t.command(e.command||i)}}},[t._v(" "+t._s(e.label)+" ")]),t.needDividerAfterNode(e)?n("hr",{key:i+"-divider"}):t._e()]}))],2)],1):t._e(),t._l(t.markButtons,(function(e,i){return n("k-button",{key:i,class:{"k-writer-toolbar-button":!0,"k-writer-toolbar-button-active":t.activeMarks.includes(i)},attrs:{icon:e.icon,tooltip:e.label},on:{mousedown:function(n){return n.preventDefault(),t.command(e.command||i)}}})}))],2)}),[],!1,Ki,null,null,null);function Ki(t){for(let e in Hi)this[e]=Hi[e]}const Ji={props:{autofocus:Boolean,breaks:Boolean,code:Boolean,disabled:Boolean,emptyDocument:{type:Object,default:()=>({type:"doc",content:[]})},headings:[Array,Boolean],inline:{type:Boolean,default:!1},marks:{type:[Array,Boolean],default:!0},nodes:{type:[Array,Boolean],default:()=>["heading","bulletList","orderedList"]},paste:{type:Function,default:()=>()=>!1},placeholder:String,spellcheck:Boolean,extensions:Array,value:{type:String,default:""}}},Gi={};var Vi=Ft({components:{"k-writer-email-dialog":Si,"k-writer-link-dialog":$i,"k-writer-toolbar":function(){return Ui.exports}()},mixins:[Ji],data(){return{editor:null,json:{},html:this.value,isEmpty:!0,toolbar:!1}},computed:{isParagraphNodeHidden(){return!0===Array.isArray(this.nodes)&&3!==this.nodes.length&&!1===this.nodes.includes("paragraph")}},watch:{value(t,e){t!==e&&t!==this.html&&(this.html=t,this.editor.setContent(this.html))}},mounted(){this.editor=new ki({autofocus:this.autofocus,content:this.value,editable:!this.disabled,element:this.$el,emptyDocument:this.emptyDocument,events:{link:t=>{this.$refs.linkDialog.open(t.getMarkAttrs("link"))},email:()=>{this.$refs.emailDialog.open(this.editor.getMarkAttrs("email"))},paste:this.paste,toolbar:t=>{this.toolbar=t,this.toolbar.visible&&this.$nextTick((()=>{this.onToolbarOpen()}))},update:t=>{if(!this.editor)return;const e=JSON.stringify(this.editor.getJSON());e!==JSON.stringify(this.json)&&(this.json=e,this.isEmpty=t.editor.isEmpty(),this.html=t.editor.getHTML(),this.isEmpty&&(0===t.editor.activeNodes.length||t.editor.activeNodes.includes("paragraph"))&&(this.html=""),this.$emit("input",this.html))}},extensions:[...this.createMarks(),...this.createNodes(),new Fi,new Ri,new zi,...this.extensions||[]],inline:this.inline}),this.isEmpty=this.editor.isEmpty(),this.json=this.editor.getJSON()},beforeDestroy(){this.editor.destroy()},methods:{filterExtensions(t,e,n){!1===e?e=[]:!0!==e&&!1!==Array.isArray(e)||(e=Object.keys(t));let i=[];return e.forEach((e=>{t[e]&&i.push(t[e])})),"function"==typeof n&&(i=n(e,i)),i},command(t,...e){this.editor.command(t,...e)},createMarks(){return this.filterExtensions({bold:new Ei,italic:new Ai,strike:new Mi,underline:new Li,code:new Oi,link:new Ti,email:new Ii},this.marks)},createNodes(){const t=new Di({text:!0,enter:this.inline});return!0===this.inline?[t]:this.filterExtensions({bulletList:new ji,orderedList:new qi,heading:new Bi,horizontalRule:new Pi,listItem:new Ni},this.nodes,((e,n)=>((e.includes("bulletList")||e.includes("orderedList"))&&n.push(new Ni),n.push(t),n)))},getHTML(){return this.editor.getHTML()},focus(){this.editor.focus()},onToolbarOpen(){if(this.$refs.toolbar){const t=this.$el.clientWidth,e=this.$refs.toolbar.$el.clientWidth;let n=this.toolbar.position.left;n-e/2<0&&(n=n+(e/2-n)-20),n+e/2>t&&(n=n-(n+e/2-t)+20),n!==this.toolbar.position.left&&(this.$refs.toolbar.$el.style.left=n+"px")}}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"direction",rawName:"v-direction"}],ref:"editor",staticClass:"k-writer",attrs:{"data-empty":t.isEmpty,"data-placeholder":t.placeholder,spellcheck:t.spellcheck}},[t.editor?[t.toolbar.visible?n("k-writer-toolbar",{ref:"toolbar",style:{bottom:t.toolbar.position.bottom+"px","inset-inline-start":t.toolbar.position.left+"px"},attrs:{editor:t.editor,"active-marks":t.toolbar.marks,"active-nodes":t.toolbar.nodes,"active-node-attrs":t.toolbar.nodeAttrs,"is-paragraph-node-hidden":t.isParagraphNodeHidden},on:{command:function(e){return t.editor.command(e)}}}):t._e(),n("k-writer-link-dialog",{ref:"linkDialog",on:{close:function(e){return t.editor.focus()},submit:function(e){return t.editor.command("toggleLink",e)}}}),n("k-writer-email-dialog",{ref:"emailDialog",on:{close:function(e){return t.editor.focus()},submit:function(e){return t.editor.command("toggleEmail",e)}}})]:t._e()],2)}),[],!1,Wi,null,null,null);function Wi(t){for(let e in Gi)this[e]=Gi[e]}var Xi=function(){return Vi.exports}();const Zi={};var Qi=Ft({},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-login-alert",on:{click:function(e){return t.$emit("click")}}},[n("span",[t._t("default")],2),n("k-icon",{attrs:{type:"alert"}})],1)}),[],!1,ts,null,null,null);function ts(t){for(let e in Zi)this[e]=Zi[e]}var es=function(){return Qi.exports}();const ns={};var is=Ft({props:{fields:Object,index:[Number,String],total:Number,value:Object},mounted(){this.$store.dispatch("content/disable"),this.$events.$on("keydown.cmd.s",this.onSubmit),this.$events.$on("keydown.esc",this.onDiscard)},destroyed(){this.$events.$off("keydown.cmd.s",this.onSubmit),this.$events.$off("keydown.esc",this.onDiscard),this.$store.dispatch("content/enable")},methods:{focus(t){this.$refs.form.focus(t)},onDiscard(){this.$emit("discard")},onInput(t){this.$emit("input",t)},onSubmit(){this.$emit("submit")}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-structure-form"},[n("div",{staticClass:"k-structure-backdrop",on:{click:t.onDiscard}}),n("section",[n("k-form",{ref:"form",staticClass:"k-structure-form-fields",attrs:{value:t.value,fields:t.fields},on:{input:t.onInput,submit:t.onSubmit}}),n("footer",{staticClass:"k-structure-form-buttons"},[n("k-button",{staticClass:"k-structure-form-cancel-button",attrs:{text:t.$t("cancel"),icon:"cancel"},on:{click:function(e){return t.$emit("close")}}}),"new"!==t.index?n("k-pagination",{attrs:{dropdown:!1,total:t.total,limit:1,page:t.index+1,details:!0},on:{paginate:function(e){return t.$emit("paginate",e)}}}):t._e(),n("k-button",{staticClass:"k-structure-form-submit-button",attrs:{text:t.$t("new"!==t.index?"confirm":"add"),icon:"check"},on:{click:t.onSubmit}})],1)],1)])}),[],!1,ss,null,null,null);function ss(t){for(let e in ns)this[e]=ns[e]}var os=function(){return is.exports}();const rs=function(t){this.command("insert",((e,n)=>{let i=[];return n.split("\n").forEach(((e,n)=>{let s="ol"===t?n+1+".":"-";i.push(s+" "+e)})),i.join("\n")}))},as={layout:["headlines","bold","italic","|","link","email","file","|","code","ul","ol"],props:{buttons:{type:[Boolean,Array],default:!0},uploads:[Boolean,Object,Array]},data(){let t={},e={},n=[],i=this.commands();return!1===this.buttons?t:(Array.isArray(this.buttons)&&(n=this.buttons),!0!==Array.isArray(this.buttons)&&(n=this.$options.layout),n.forEach(((n,s)=>{if("|"===n)t["divider-"+s]={divider:!0};else if(i[n]){let s=i[n];t[n]=s,s.shortcut&&(e[s.shortcut]=n)}})),{layout:t,shortcuts:e})},methods:{command(t,e){"function"==typeof t?t.apply(this):this.$emit("command",t,e)},close(){Object.keys(this.$refs).forEach((t=>{const e=this.$refs[t][0];"function"==typeof(null==e?void 0:e.close)&&e.close()}))},fileCommandSetup(){let t={label:this.$t("toolbar.button.file"),icon:"attachment"};return!1===this.uploads?t.command="selectFile":t.dropdown={select:{label:this.$t("toolbar.button.file.select"),icon:"check",command:"selectFile"},upload:{label:this.$t("toolbar.button.file.upload"),icon:"upload",command:"uploadFile"}},t},commands(){return{headlines:{label:this.$t("toolbar.button.headings"),icon:"title",dropdown:{h1:{label:this.$t("toolbar.button.heading.1"),icon:"title",command:"prepend",args:"#"},h2:{label:this.$t("toolbar.button.heading.2"),icon:"title",command:"prepend",args:"##"},h3:{label:this.$t("toolbar.button.heading.3"),icon:"title",command:"prepend",args:"###"}}},bold:{label:this.$t("toolbar.button.bold"),icon:"bold",command:"wrap",args:"**",shortcut:"b"},italic:{label:this.$t("toolbar.button.italic"),icon:"italic",command:"wrap",args:"*",shortcut:"i"},link:{label:this.$t("toolbar.button.link"),icon:"url",shortcut:"k",command:"dialog",args:"link"},email:{label:this.$t("toolbar.button.email"),icon:"email",shortcut:"e",command:"dialog",args:"email"},file:this.fileCommandSetup(),code:{label:this.$t("toolbar.button.code"),icon:"code",command:"wrap",args:"`"},ul:{label:this.$t("toolbar.button.ul"),icon:"list-bullet",command(){return rs.apply(this,["ul"])}},ol:{label:this.$t("toolbar.button.ol"),icon:"list-numbers",command(){return rs.apply(this,["ol"])}}}},shortcut(t,e){if(this.shortcuts[t]){const n=this.layout[this.shortcuts[t]];if(!n)return!1;e.preventDefault(),this.command(n.command,n.args)}}}},ls={};var us=Ft(as,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("nav",{staticClass:"k-toolbar"},[n("div",{staticClass:"k-toolbar-wrapper"},[n("div",{staticClass:"k-toolbar-buttons"},[t._l(t.layout,(function(e,i){return[e.divider?[n("span",{key:i,staticClass:"k-toolbar-divider"})]:e.dropdown?[n("k-dropdown",{key:i},[n("k-button",{key:i,staticClass:"k-toolbar-button",attrs:{icon:e.icon,tooltip:e.label,tabindex:"-1"},on:{click:function(e){t.$refs[i+"-dropdown"][0].toggle()}}}),n("k-dropdown-content",{ref:i+"-dropdown",refInFor:!0},t._l(e.dropdown,(function(e,i){return n("k-dropdown-item",{key:i,attrs:{icon:e.icon},on:{click:function(n){return t.command(e.command,e.args)}}},[t._v(" "+t._s(e.label)+" ")])})),1)],1)]:[n("k-button",{key:i,staticClass:"k-toolbar-button",attrs:{icon:e.icon,tooltip:e.label,tabindex:"-1"},on:{click:function(n){return t.command(e.command,e.args)}}})]]}))],2)])])}),[],!1,cs,null,null,null);function cs(t){for(let e in ls)this[e]=ls[e]}var ds=function(){return us.exports}();const ps={};var hs=Ft({data(){return{value:{email:null,text:null},fields:{email:{label:this.$t("email"),type:"email"},text:{label:this.$t("link.text"),type:"text"}}}},computed:{kirbytext(){return this.$config.kirbytext}},methods:{open(t,e){this.value.text=e,this.$refs.dialog.open()},cancel(){this.$emit("cancel")},createKirbytext(){var t;const e=this.value.email||"";return(null==(t=this.value.text)?void 0:t.length)>0?`(email: ${e} text: ${this.value.text})`:`(email: ${e})`},createMarkdown(){var t;const e=this.value.email||"";return(null==(t=this.value.text)?void 0:t.length)>0?`[${this.value.text}](mailto:${e})`:`<${e}>`},submit(){this.$emit("submit",this.kirbytext?this.createKirbytext():this.createMarkdown()),this.value={email:null,text:null},this.$refs.dialog.close()}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{"submit-button":t.$t("insert")},on:{close:t.cancel,submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}})],1)}),[],!1,fs,null,null,null);function fs(t){for(let e in ps)this[e]=ps[e]}var ms=function(){return hs.exports}();const gs={};var ks=Ft({data(){return{value:{url:null,text:null},fields:{url:{label:this.$t("link"),type:"text",placeholder:this.$t("url.placeholder"),icon:"url"},text:{label:this.$t("link.text"),type:"text"}}}},computed:{kirbytext(){return this.$config.kirbytext}},methods:{open(t,e){this.value.text=e,this.$refs.dialog.open()},cancel(){this.$emit("cancel")},createKirbytext(){return this.value.text.length>0?`(link: ${this.value.url} text: ${this.value.text})`:`(link: ${this.value.url})`},createMarkdown(){return this.value.text.length>0?`[${this.value.text}](${this.value.url})`:`<${this.value.url}>`},submit(){this.$emit("submit",this.kirbytext?this.createKirbytext():this.createMarkdown()),this.value={url:null,text:null},this.$refs.dialog.close()}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{"submit-button":t.$t("insert")},on:{close:t.cancel,submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}})],1)}),[],!1,vs,null,null,null);function vs(t){for(let e in gs)this[e]=gs[e]}var bs=function(){return ks.exports}();const ys={mixins:[vn,yn,_n,wn,Cn],inheritAttrs:!1,props:{value:Boolean},watch:{value(){this.onInvalid()}},mounted(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus(){this.$refs.input.focus()},onChange(t){this.$emit("input",t)},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},select(){this.focus()}},validations(){return{value:{required:!this.required||K.required}}}},$s={};var _s=Ft(ys,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("label",{staticClass:"k-checkbox-input",on:{click:function(t){t.stopPropagation()}}},[n("input",{ref:"input",staticClass:"k-checkbox-input-native input-hidden",attrs:{id:t.id,disabled:t.disabled,type:"checkbox"},domProps:{checked:t.value},on:{change:function(e){return t.onChange(e.target.checked)}}}),n("span",{staticClass:"k-checkbox-input-icon",attrs:{"aria-hidden":"true"}},[n("svg",{attrs:{width:"12",height:"10",viewBox:"0 0 12 10",xmlns:"http://www.w3.org/2000/svg"}},[n("path",{attrs:{d:"M1 5l3.3 3L11 1","stroke-width":"2",fill:"none","fill-rule":"evenodd"}})])]),n("span",{staticClass:"k-checkbox-input-label",domProps:{innerHTML:t._s(t.label)}})])}),[],!1,xs,null,null,null);function xs(t){for(let e in $s)this[e]=$s[e]}var ws=function(){return _s.exports}();const Ss={mixins:[vn,yn,_n,Cn],props:{columns:Number,max:Number,min:Number,options:Array,value:{type:[Array,Object],default:()=>[]}}},Cs={};var Os=Ft({mixins:[Ss],inheritAttrs:!1,data(){return{selected:this.valueToArray(this.value)}},watch:{value(t){this.selected=this.valueToArray(t)},selected(){this.onInvalid()}},mounted(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus(){this.$el.querySelector("input").focus()},onInput(t,e){if(!0===e)this.selected.push(t);else{const e=this.selected.indexOf(t);-1!==e&&this.selected.splice(e,1)}this.$emit("input",this.selected)},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},select(){this.focus()},valueToArray:t=>!0===Array.isArray(t)?t:"string"==typeof t?String(t).split(","):"object"==typeof t?Object.values(t):void 0},validations(){return{selected:{required:!this.required||K.required,min:!this.min||K.minLength(this.min),max:!this.max||K.maxLength(this.max)}}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("ul",{staticClass:"k-checkboxes-input",style:"--columns:"+t.columns},t._l(t.options,(function(e,i){return n("li",{key:i},[n("k-checkbox-input",{attrs:{id:t.id+"-"+i,label:e.text,value:-1!==t.selected.indexOf(e.value)},on:{input:function(n){return t.onInput(e.value,n)}}})],1)})),0)}),[],!1,Es,null,null,null);function Es(t){for(let e in Cs)this[e]=Cs[e]}var As=function(){return Os.exports}();const Ts={mixins:[vn,yn,_n,Cn],props:{display:{type:String,default:"DD.MM.YYYY"},max:String,min:String,step:{type:Object,default:()=>({size:1,unit:"day"})},type:{type:String,default:"date"},value:String}},Is={};var Ms=Ft({mixins:[Ts],inheritAttrs:!1,data:()=>({dt:null,formatted:null}),computed:{inputType:()=>"date",pattern(){return this.$library.dayjs.pattern(this.display)},rounding(){return a(a({},this.$options.props.step.default()),this.step)}},watch:{value:{handler(t,e){if(t!==e){const e=this.toDatetime(t);this.commit(e)}},immediate:!0}},created(){this.$events.$on("keydown.cmd.s",this.onBlur)},destroyed(){this.$events.$off("keydown.cmd.s",this.onBlur)},methods:{alter(t){let e=this.parse()||this.round(this.$library.dayjs()),n=this.rounding.unit,i=this.rounding.size;const s=this.selection();null!==s&&("meridiem"===s.unit?(t="pm"===e.format("a")?"subtract":"add",n="hour",i=12):(n=s.unit,n!==this.rounding.unit&&(i=1))),e=e[t](i,n).round(this.rounding.unit,this.rounding.size),this.commit(e),this.emit(e),this.$nextTick((()=>this.select(s)))},commit(t){this.dt=t,this.formatted=this.pattern.format(t),this.$emit("invalid",this.$v.$invalid,this.$v)},emit(t){this.$emit("input",this.toISO(t))},focus(){this.$refs.input.focus()},onArrowDown(){this.alter("subtract")},onArrowUp(){this.alter("add")},onBlur(){const t=this.parse();this.commit(t),this.emit(t)},onEnter(){this.onBlur(),this.$nextTick((()=>this.$emit("submit")))},onInput(t){const e=this.parse(),n=this.pattern.format(e);if(!t||n==t)return this.commit(e),this.emit(e)},onTab(t){""!=this.$refs.input.value&&(this.onBlur(),this.$nextTick((()=>{const e=this.selection();if(this.$refs.input&&e.start===this.$refs.input.selectionStart&&e.end===this.$refs.input.selectionEnd-1)if(t.shiftKey){if(0===e.index)return;this.selectPrev(e.index)}else{if(e.index===this.pattern.parts.length-1)return;this.selectNext(e.index)}else t.shiftKey?this.selectLast():this.selectFirst();t.preventDefault()})))},parse(){let t=this.$refs.input.value;return t=this.$library.dayjs.interpret(t,this.inputType),this.round(t)},round(t){return(null==t?void 0:t.round(this.rounding.unit,this.rounding.size))||null},select(t){var e;t||(t=this.selection()),null==(e=this.$refs.input)||e.setSelectionRange(t.start,t.end+1)},selectFirst(){this.select(this.pattern.parts[0])},selectLast(){this.select(this.pattern.parts[this.pattern.parts.length-1])},selectNext(t){this.select(this.pattern.parts[t+1])},selectPrev(t){this.select(this.pattern.parts[t-1])},selection(){return this.pattern.at(this.$refs.input.selectionStart,this.$refs.input.selectionEnd)},toDatetime(t){return this.round(this.$library.dayjs.iso(t,this.inputType))},toISO(t){return(null==t?void 0:t.toISO(this.inputType))||null}},validations(){return{value:{min:!this.dt||!this.min||(()=>this.dt.validate(this.min,"min",this.rounding.unit)),max:!this.dt||!this.max||(()=>this.dt.validate(this.max,"max",this.rounding.unit)),required:!this.required||(()=>!!this.dt)}}}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("input",{directives:[{name:"model",rawName:"v-model",value:t.formatted,expression:"formatted"},{name:"direction",rawName:"v-direction"}],ref:"input",class:`k-text-input k-${t.type}-input`,attrs:{id:t.id,autofocus:t.autofocus,disabled:t.disabled,placeholder:t.display,required:t.required,autocomplete:"off",spellcheck:"false",type:"text"},domProps:{value:t.formatted},on:{blur:t.onBlur,focus:function(e){return t.$emit("focus")},input:[function(e){e.target.composing||(t.formatted=e.target.value)},function(e){return t.onInput(e.target.value)}],keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"])?null:(e.stopPropagation(),e.preventDefault(),t.onArrowDown.apply(null,arguments))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"up",38,e.key,["Up","ArrowUp"])?null:(e.stopPropagation(),e.preventDefault(),t.onArrowUp.apply(null,arguments))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:(e.stopPropagation(),e.preventDefault(),t.onEnter.apply(null,arguments))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"tab",9,e.key,"Tab")?null:t.onTab.apply(null,arguments)}]}})}),[],!1,Ls,null,null,null);function Ls(t){for(let e in Is)this[e]=Is[e]}var js=function(){return Ms.exports}();const Ds={mixins:[vn,yn,_n,Sn,Cn],props:{autocomplete:{type:[Boolean,String],default:"off"},maxlength:Number,minlength:Number,pattern:String,placeholder:String,preselect:Boolean,spellcheck:{type:[Boolean,String],default:"off"},type:{type:String,default:"text"},value:String}},Bs={};var Ps=Ft({mixins:[Ds],inheritAttrs:!1,data(){return{listeners:l(a({},this.$listeners),{input:t=>this.onInput(t.target.value)})}},watch:{value(){this.onInvalid()}},mounted(){this.onInvalid(),this.$props.autofocus&&this.focus(),this.$props.preselect&&this.select()},methods:{focus(){this.$refs.input.focus()},onInput(t){this.$emit("input",t)},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},select(){this.$refs.input.select()}},validations(){return{value:{required:!this.required||K.required,minLength:!this.minlength||K.minLength(this.minlength),maxLength:!this.maxlength||K.maxLength(this.maxlength),email:"email"!==this.type||K.email,url:"url"!==this.type||K.url,pattern:!this.pattern||(t=>!this.required&&!t||!this.$refs.input.validity.patternMismatch)}}}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("input",t._g(t._b({directives:[{name:"direction",rawName:"v-direction"}],ref:"input",staticClass:"k-text-input"},"input",{autocomplete:t.autocomplete,autofocus:t.autofocus,disabled:t.disabled,id:t.id,minlength:t.minlength,name:t.name,pattern:t.pattern,placeholder:t.placeholder,required:t.required,spellcheck:t.spellcheck,type:t.type,value:t.value},!1),t.listeners))}),[],!1,Ns,null,null,null);function Ns(t){for(let e in Bs)this[e]=Bs[e]}var qs=function(){return Ps.exports}();const Fs={mixins:[Ds],props:{autocomplete:{type:String,default:"email"},placeholder:{type:String,default:()=>window.panel.$t("email.placeholder")},type:{type:String,default:"email"}}};const Rs={};var zs=Ft({extends:qs,mixins:[Fs]},undefined,undefined,!1,Ys,null,null,null);function Ys(t){for(let e in Rs)this[e]=Rs[e]}var Hs=function(){return zs.exports}();class Us extends fi{get schema(){return{content:"bulletList|orderedList"}}}const Ks={inheritAttrs:!1,props:{autofocus:Boolean,marks:{type:[Array,Boolean],default:!0},value:String},data(){return{list:this.value,html:this.value}},computed:{extensions:()=>[new Us({inline:!0})]},watch:{value(t){t!==this.html&&(this.list=t,this.html=t)}},methods:{focus(){this.$refs.input.focus()},onInput(t){let e=(new DOMParser).parseFromString(t,"text/html").querySelector("ul, ol");e&&0!==e.textContent.trim().length?(this.list=t,this.html=t.replace(/(

|<\/p>)/gi,""),this.$emit("input",this.html)):this.$emit("input",this.list="")}}},Js={};var Gs=Ft(Ks,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("k-writer",t._b({ref:"input",staticClass:"k-list-input",attrs:{extensions:t.extensions,nodes:["bulletList","orderedList"],value:t.list},on:{input:t.onInput}},"k-writer",t.$props,!1))}),[],!1,Vs,null,null,null);function Vs(t){for(let e in Js)this[e]=Js[e]}var Ws=function(){return Gs.exports}();const Xs={mixins:[yn,_n,Cn],props:{max:Number,min:Number,layout:String,options:{type:Array,default:()=>[]},search:[Object,Boolean],separator:{type:String,default:","},sort:Boolean,value:{type:Array,required:!0,default:()=>[]}}},Zs={};var Qs=Ft({mixins:[Xs],inheritAttrs:!1,data(){return{state:this.value,q:null,limit:!0,scrollTop:0}},computed:{draggable(){return this.state.length>1&&!this.sort},dragOptions(){return{disabled:!this.draggable,draggable:".k-tag",delay:1}},emptyLabel(){return this.q?this.$t("search.results.none"):this.$t("options.none")},filtered(){var t;return(null==(t=this.q)?void 0:t.length)>=(this.search.min||0)?this.options.filter((t=>this.isFiltered(t))).map((t=>l(a({},t),{display:this.toHighlightedString(t.text),info:this.toHighlightedString(t.value)}))):this.options.map((t=>l(a({},t),{display:t.text,info:t.value})))},more(){return!this.max||this.state.lengththis.options.findIndex((e=>e.value===t.value));return t.sort(((t,n)=>e(t)-e(n)))},visible(){return this.limit?this.filtered.slice(0,this.search.display||this.filtered.length):this.filtered}},watch:{value(t){this.state=t,this.onInvalid()}},mounted(){this.onInvalid(),this.$events.$on("click",this.close),this.$events.$on("keydown.cmd.s",this.close)},destroyed(){this.$events.$off("click",this.close),this.$events.$off("keydown.cmd.s",this.close)},methods:{add(t){!0===this.more&&(this.state.push(t),this.onInput())},blur(){this.close()},close(){!0===this.$refs.dropdown.isOpen&&(this.$refs.dropdown.close(),this.limit=!0)},escape(){this.q?this.q=null:this.close()},focus(){this.$refs.dropdown.open()},index(t){return this.state.findIndex((e=>e.value===t.value))},isFiltered(t){return String(t.text).match(this.regex)||String(t.value).match(this.regex)},isSelected(t){return-1!==this.index(t)},navigate(t){var e,n,i;"prev"===t&&(t="previous"),null==(i=null==(n=null==(e=document.activeElement)?void 0:e[t+"Sibling"])?void 0:n.focus)||i.call(n)},onClose(){!1===this.$refs.dropdown.isOpen&&(document.activeElement===this.$parent.$el&&(this.q=null),this.$parent.$el.focus())},onInput(){this.$emit("input",this.sorted)},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},onOpen(){this.$nextTick((()=>{var t,e;null==(e=null==(t=this.$refs.search)?void 0:t.focus)||e.call(t),this.$refs.dropdown.$el.querySelector(".k-multiselect-options").scrollTop=this.scrollTop}))},remove(t){this.state.splice(this.index(t),1),this.onInput()},select(t){this.scrollTop=this.$refs.dropdown.$el.querySelector(".k-multiselect-options").scrollTop,t={text:t.text,value:t.value},this.isSelected(t)?this.remove(t):this.add(t)},toHighlightedString(t){return(t=this.$helper.string.stripHTML(t)).replace(this.regex,"$1")}},validations(){return{state:{required:!this.required||K.required,minLength:!this.min||K.minLength(this.min),maxLength:!this.max||K.maxLength(this.max)}}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-draggable",{staticClass:"k-multiselect-input",attrs:{list:t.state,options:t.dragOptions,"data-layout":t.layout,element:"k-dropdown"},on:{end:t.onInput},nativeOn:{click:function(e){return t.$refs.dropdown.toggle.apply(null,arguments)}},scopedSlots:t._u([{key:"footer",fn:function(){return[n("k-dropdown-content",{ref:"dropdown",on:{open:t.onOpen,close:t.onClose},nativeOn:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:(e.stopPropagation(),t.close.apply(null,arguments))}}},[t.search?n("k-dropdown-item",{staticClass:"k-multiselect-search",attrs:{icon:"search"}},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.q,expression:"q"}],ref:"search",attrs:{placeholder:t.search.min?t.$t("search.min",{min:t.search.min}):t.$t("search")+" …"},domProps:{value:t.q},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:(e.stopPropagation(),t.escape.apply(null,arguments))},input:function(e){e.target.composing||(t.q=e.target.value)}}})]):t._e(),n("div",{staticClass:"k-multiselect-options scroll-y-auto"},[t._l(t.visible,(function(e){return n("k-dropdown-item",{key:e.value,class:{"k-multiselect-option":!0,selected:t.isSelected(e),disabled:!t.more},attrs:{icon:t.isSelected(e)?"check":"circle-outline"},on:{click:function(n){return n.preventDefault(),t.select(e)}},nativeOn:{keydown:[function(n){return!n.type.indexOf("key")&&t._k(n.keyCode,"enter",13,n.key,"Enter")?null:(n.preventDefault(),n.stopPropagation(),t.select(e))},function(n){return!n.type.indexOf("key")&&t._k(n.keyCode,"space",32,n.key,[" ","Spacebar"])?null:(n.preventDefault(),n.stopPropagation(),t.select(e))}]}},[n("span",{domProps:{innerHTML:t._s(e.display)}}),n("span",{staticClass:"k-multiselect-value",domProps:{innerHTML:t._s(e.info)}})])})),0===t.filtered.length?n("k-dropdown-item",{staticClass:"k-multiselect-option",attrs:{disabled:!0}},[t._v(" "+t._s(t.emptyLabel)+" ")]):t._e()],2),t.visible.lengththis.onInput(t.target.value),blur:this.onBlur})}},watch:{value(t){this.number=t},number:{immediate:!0,handler(){this.onInvalid()}}},mounted(){this.$props.autofocus&&this.focus(),this.$props.preselect&&this.select()},methods:{decimals(){const t=Number(this.step||0);return Math.floor(t)===t?0:-1!==t.toString().indexOf("e")?parseInt(t.toFixed(16).split(".")[1].split("").reverse().join("")).toString().length:t.toString().split(".")[1].length||0},format(t){if(isNaN(t)||""===t)return"";const e=this.decimals();return t=e?parseFloat(t).toFixed(e):Number.isInteger(this.step)?parseInt(t):parseFloat(t)},clean(){this.number=this.format(this.number)},emit(t){t=parseFloat(t),isNaN(t)&&(t=""),t!==this.value&&this.$emit("input",t)},focus(){this.$refs.input.focus()},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},onInput(t){this.number=t,this.emit(t)},onBlur(){this.clean(),this.emit(this.number)},select(){this.$refs.input.select()}},validations(){return{value:{required:!this.required||K.required,min:!this.min||K.minValue(this.min),max:!this.max||K.maxValue(this.max)}}}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("input",t._g(t._b({ref:"input",staticClass:"k-number-input",attrs:{step:t.stepNumber,type:"number"},domProps:{value:t.number},on:{keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"s",void 0,e.key,void 0)?null:e.ctrlKey?t.clean.apply(null,arguments):null},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"s",void 0,e.key,void 0)?null:e.metaKey?t.clean.apply(null,arguments):null}]}},"input",{autofocus:t.autofocus,disabled:t.disabled,id:t.id,max:t.max,min:t.min,name:t.name,placeholder:t.placeholder,required:t.required},!1),t.listeners))}),[],!1,oo,null,null,null);function oo(t){for(let e in io)this[e]=io[e]}var ro=function(){return so.exports}();const ao={mixins:[Ds],props:{autocomplete:{type:String,default:"new-password"},type:{type:String,default:"password"}}};const lo={};var uo=Ft({extends:qs,mixins:[ao]},undefined,undefined,!1,co,null,null,null);function co(t){for(let e in lo)this[e]=lo[e]}var po=function(){return uo.exports}();const ho={mixins:[vn,yn,_n,Cn],props:{columns:Number,options:Array,value:[String,Number,Boolean]}},fo={};var mo=Ft({mixins:[ho],inheritAttrs:!1,watch:{value(){this.onInvalid()}},mounted(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus(){this.$el.querySelector("input").focus()},onInput(t){this.$emit("input",t)},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},select(){this.focus()}},validations(){return{value:{required:!this.required||K.required}}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("ul",{staticClass:"k-radio-input",style:"--columns:"+t.columns},t._l(t.options,(function(e,i){return n("li",{key:i},[n("input",{staticClass:"k-radio-input-native",attrs:{id:t.id+"-"+i,name:t.id,type:"radio"},domProps:{value:e.value,checked:t.value===e.value},on:{change:function(n){return t.onInput(e.value)}}}),e.info?n("label",{attrs:{for:t.id+"-"+i}},[n("span",{staticClass:"k-radio-input-text",domProps:{innerHTML:t._s(e.text)}}),n("span",{staticClass:"k-radio-input-info",domProps:{innerHTML:t._s(e.info)}})]):n("label",{attrs:{for:t.id+"-"+i},domProps:{innerHTML:t._s(e.text)}}),e.icon?n("k-icon",{attrs:{type:e.icon}}):t._e()],1)})),0)}),[],!1,go,null,null,null);function go(t){for(let e in fo)this[e]=fo[e]}var ko=function(){return mo.exports}();const vo={mixins:[vn,yn,_n,Sn,Cn],props:{default:[Number,String],max:{type:Number,default:100},min:{type:Number,default:0},step:{type:Number,default:1},tooltip:{type:[Boolean,Object],default:()=>({before:null,after:null})},value:[Number,String]}},bo={};var yo=Ft({mixins:[vo],inheritAttrs:!1,data(){return{listeners:l(a({},this.$listeners),{input:t=>this.onInput(t.target.value)})}},computed:{baseline(){return this.min<0?0:this.min},label(){return this.required||this.value||0===this.value?this.format(this.position):"–"},position(){return this.value||0===this.value?this.value:this.default||this.baseline}},watch:{position(){this.onInvalid()}},mounted(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus(){this.$refs.input.focus()},format(t){const e=document.lang?document.lang.replace("_","-"):"en",n=this.step.toString().split("."),i=n.length>1?n[1].length:0;return new Intl.NumberFormat(e,{minimumFractionDigits:i}).format(t)},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},onInput(t){this.$emit("input",t)}},validations(){return{position:{required:!this.required||K.required,min:!this.min||K.minValue(this.min),max:!this.max||K.maxValue(this.max)}}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("label",{staticClass:"k-range-input"},[n("input",t._g(t._b({ref:"input",staticClass:"k-range-input-native",style:`--min: ${t.min}; --max: ${t.max}; --value: ${t.position}`,attrs:{type:"range"},domProps:{value:t.position}},"input",{autofocus:t.autofocus,disabled:t.disabled,id:t.id,max:t.max,min:t.min,name:t.name,required:t.required,step:t.step},!1),t.listeners)),t.tooltip?n("span",{staticClass:"k-range-input-tooltip"},[t.tooltip.before?n("span",{staticClass:"k-range-input-tooltip-before"},[t._v(t._s(t.tooltip.before))]):t._e(),n("span",{staticClass:"k-range-input-tooltip-text"},[t._v(t._s(t.label))]),t.tooltip.after?n("span",{staticClass:"k-range-input-tooltip-after"},[t._v(t._s(t.tooltip.after))]):t._e()]):t._e()])}),[],!1,$o,null,null,null);function $o(t){for(let e in bo)this[e]=bo[e]}var _o=function(){return yo.exports}();const xo={mixins:[vn,yn,_n,Sn,Cn],props:{ariaLabel:String,default:String,empty:{type:[Boolean,String],default:!0},placeholder:String,options:{type:Array,default:()=>[]},value:{type:[String,Number,Boolean],default:""}}},wo={};var So=Ft({mixins:[xo],inheritAttrs:!1,data(){return{selected:this.value,listeners:l(a({},this.$listeners),{click:t=>this.onClick(t),change:t=>this.onInput(t.target.value),input:()=>{}})}},computed:{emptyOption(){return this.placeholder||"—"},hasEmptyOption(){return!1!==this.empty&&!(this.required&&this.default)},label(){const t=this.text(this.selected);return""===this.selected||null===this.selected||null===t?this.emptyOption:t}},watch:{value(t){this.selected=t,this.onInvalid()}},mounted(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus(){this.$refs.input.focus()},onClick(t){t.stopPropagation(),this.$emit("click",t)},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},onInput(t){this.selected=t,this.$emit("input",this.selected)},select(){this.focus()},text(t){let e=null;return this.options.forEach((n=>{n.value==t&&(e=n.text)})),e}},validations(){return{selected:{required:!this.required||K.required}}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{staticClass:"k-select-input",attrs:{"data-disabled":t.disabled,"data-empty":""===t.selected}},[n("select",t._g({ref:"input",staticClass:"k-select-input-native",attrs:{id:t.id,autofocus:t.autofocus,"aria-label":t.ariaLabel,disabled:t.disabled,name:t.name,required:t.required},domProps:{value:t.selected}},t.listeners),[t.hasEmptyOption?n("option",{attrs:{disabled:t.required,value:""}},[t._v(" "+t._s(t.emptyOption)+" ")]):t._e(),t._l(t.options,(function(e){return n("option",{key:e.value,attrs:{disabled:e.disabled},domProps:{value:e.value}},[t._v(" "+t._s(e.text)+" ")])}))],2),t._v(" "+t._s(t.label)+" ")])}),[],!1,Co,null,null,null);function Co(t){for(let e in wo)this[e]=wo[e]}var Oo=function(){return So.exports}();const Eo={mixins:[Ds],props:{allow:{type:String,default:""},formData:{type:Object,default:()=>({})},sync:{type:String}}},Ao={};var To=Ft({extends:qs,mixins:[Eo],data(){return{slug:this.sluggify(this.value),slugs:this.$language?this.$language.rules:this.$system.slugs,syncValue:null}},watch:{formData:{handler(t){return!this.disabled&&(!(!this.sync||void 0===t[this.sync])&&(t[this.sync]!=this.syncValue&&(this.syncValue=t[this.sync],void this.onInput(this.sluggify(this.syncValue)))))},deep:!0,immediate:!0},value(t){(t=this.sluggify(t))!==this.slug&&(this.slug=t,this.$emit("input",this.slug))}},methods:{sluggify(t){return this.$helper.slug(t,[this.slugs,this.$system.ascii],this.allow)},onInput(t){this.slug=this.sluggify(t),this.$emit("input",this.slug)}}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("input",t._g(t._b({directives:[{name:"direction",rawName:"v-direction"}],ref:"input",staticClass:"k-text-input",attrs:{autocomplete:"off",spellcheck:"false",type:"text"},domProps:{value:t.slug}},"input",{autofocus:t.autofocus,disabled:t.disabled,id:t.id,minlength:t.minlength,name:t.name,pattern:t.pattern,placeholder:t.placeholder,required:t.required},!1),t.listeners))}),[],!1,Io,null,null,null);function Io(t){for(let e in Ao)this[e]=Ao[e]}var Mo=function(){return To.exports}();const Lo={mixins:[vn,yn,_n,Sn,Cn],props:{accept:{type:String,default:"all"},icon:{type:[String,Boolean],default:"tag"},layout:String,max:Number,min:Number,options:{type:Array,default:()=>[]},separator:{type:String,default:","},value:{type:Array,default:()=>[]}}},jo={};var Do=Ft({mixins:[Lo],inheritAttrs:!1,data(){return{tags:this.prepareTags(this.value),selected:null,newTag:null,tagOptions:this.options.map((t=>{var e;return(null==(e=this.icon)?void 0:e.length)>0&&(t.icon=this.icon),t}),this)}},computed:{dragOptions(){return{delay:1,disabled:!this.draggable,draggable:".k-tag"}},draggable(){return this.tags.length>1},skip(){return this.tags.map((t=>t.value))}},watch:{value(t){this.tags=this.prepareTags(t),this.onInvalid()}},mounted(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{addString(t){if(t)if((t=t.trim()).includes(this.separator))t.split(this.separator).forEach((t=>{this.addString(t)}));else if(0!==t.length)if("options"===this.accept){const e=this.options.filter((e=>e.text===t))[0];if(!e)return;this.addTag(e)}else this.addTag({text:t,value:t})},addTag(t){this.addTagToIndex(t),this.$refs.autocomplete.close(),this.$refs.input.focus()},addTagToIndex(t){if("options"===this.accept){if(!this.options.filter((e=>e.value===t.value))[0])return}-1===this.index(t)&&(!this.max||this.tags.length=this.tags.length)return;break;case"first":e=0;break;case"last":e=this.tags.length-1;break;default:e=t}let i=this.tags[e];if(i){let t=this.$refs[i.value];if(null==t?void 0:t[0])return{ref:t[0],tag:i,index:e}}return!1},index(t){return this.tags.findIndex((e=>e.value===t.value))},onInput(){this.$emit("input",this.tags)},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},leaveInput(t){0===t.target.selectionStart&&t.target.selectionStart===t.target.selectionEnd&&0!==this.tags.length&&(this.$refs.autocomplete.close(),this.navigate("last"),t.preventDefault())},navigate(t){var e=this.get(t);e?(e.ref.focus(),this.selectTag(e.tag)):"next"===t&&(this.$refs.input.focus(),this.selectTag(null))},prepareTags:t=>!1===Array.isArray(t)?[]:t.map((t=>"string"==typeof t?{text:t,value:t}:t)),remove(t){const e=this.get("prev"),n=this.get("next");this.tags.splice(this.index(t),1),this.onInput(),e?(this.selectTag(e.tag),e.ref.focus()):n?this.selectTag(n.tag):(this.selectTag(null),this.$refs.input.focus())},select(){this.focus()},selectTag(t){this.selected=t},tab(t){var e;(null==(e=this.newTag)?void 0:e.length)>0&&(t.preventDefault(),this.addString(this.newTag))},type(t){this.newTag=t,this.$refs.autocomplete.search(t)}},validations(){return{tags:{required:!this.required||K.required,minLength:!this.min||K.minLength(this.min),maxLength:!this.max||K.maxLength(this.max)}}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-draggable",{directives:[{name:"direction",rawName:"v-direction"}],ref:"box",staticClass:"k-tags-input",attrs:{list:t.tags,"data-layout":t.layout,options:t.dragOptions},on:{end:t.onInput},scopedSlots:t._u([{key:"footer",fn:function(){return[n("span",{staticClass:"k-tags-input-element"},[n("k-autocomplete",{ref:"autocomplete",attrs:{html:!0,options:t.options,skip:t.skip},on:{select:t.addTag,leave:function(e){return t.$refs.input.focus()}}},[n("input",{directives:[{name:"model",rawName:"v-model.trim",value:t.newTag,expression:"newTag",modifiers:{trim:!0}}],ref:"input",attrs:{id:t.id,autofocus:t.autofocus,disabled:t.disabled||t.max&&t.tags.length>=t.max,name:t.name,autocomplete:"off",type:"text"},domProps:{value:t.newTag},on:{input:[function(e){e.target.composing||(t.newTag=e.target.value.trim())},function(e){return t.type(e.target.value)}],blur:[t.blurInput,function(e){return t.$forceUpdate()}],keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"s",void 0,e.key,void 0)?null:e.metaKey?t.blurInput.apply(null,arguments):null},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])||"button"in e&&0!==e.button||e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.leaveInput.apply(null,arguments)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")||e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.enter.apply(null,arguments)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"tab",9,e.key,"Tab")||e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.tab.apply(null,arguments)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"backspace",void 0,e.key,void 0)||e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.leaveInput.apply(null,arguments)}]}})])],1)]},proxy:!0}])},t._l(t.tags,(function(e,i){return n("k-tag",{key:i,ref:e.value,refInFor:!0,attrs:{removable:!t.disabled,name:"tag"},on:{remove:function(n){return t.remove(e)}},nativeOn:{click:function(t){t.stopPropagation()},blur:function(e){return t.selectTag(null)},focus:function(n){return t.selectTag(e)},keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])||"button"in e&&0!==e.button?null:t.navigate("prev")},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"right",39,e.key,["Right","ArrowRight"])||"button"in e&&2!==e.button?null:t.navigate("next")}],dblclick:function(n){return t.edit(e)}}},[n("span",{domProps:{innerHTML:t._s(e.text)}})])})),1)}),[],!1,Bo,null,null,null);function Bo(t){for(let e in jo)this[e]=jo[e]}var Po=function(){return Do.exports}();const No={mixins:[Ds],props:{autocomplete:{type:String,default:"tel"},type:{type:String,default:"tel"}}};const qo={};var Fo=Ft({extends:qs,mixins:[No]},undefined,undefined,!1,Ro,null,null,null);function Ro(t){for(let e in qo)this[e]=qo[e]}var zo=function(){return Fo.exports}();const Yo={mixins:[vn,yn,_n,Sn,Cn],props:{buttons:{type:[Boolean,Array],default:!0},endpoints:Object,font:String,maxlength:Number,minlength:Number,placeholder:String,preselect:Boolean,size:String,spellcheck:{type:[Boolean,String],default:"off"},theme:String,uploads:[Boolean,Object,Array],value:String}},Ho={};var Uo=Ft({mixins:[Yo],inheritAttrs:!1,data:()=>({over:!1}),watch:{value(){this.onInvalid(),this.$nextTick((()=>{this.resize()}))}},mounted(){this.$nextTick((()=>{this.$library.autosize(this.$refs.input)})),this.onInvalid(),this.$props.autofocus&&this.focus(),this.$props.preselect&&this.select()},methods:{cancel(){this.$refs.input.focus()},dialog(t){if(!this.$refs[t+"Dialog"])throw"Invalid toolbar dialog";this.$refs[t+"Dialog"].open(this.$refs.input,this.selection())},focus(){this.$refs.input.focus()},insert(t){const e=this.$refs.input,n=e.value;setTimeout((()=>{if(e.focus(),document.execCommand("insertText",!1,t),e.value===n){const n=e.value.slice(0,e.selectionStart)+t+e.value.slice(e.selectionEnd);e.value=n,this.$emit("input",n)}})),this.resize()},insertFile(t){(null==t?void 0:t.length)>0&&this.insert(t.map((t=>t.dragText)).join("\n\n"))},insertUpload(t,e){this.insert(e.map((t=>t.dragText)).join("\n\n")),this.$events.$emit("model.update")},onClick(){this.$refs.toolbar&&this.$refs.toolbar.close()},onCommand(t,e){"function"==typeof this[t]?"function"==typeof e?this[t](e(this.$refs.input,this.selection())):this[t](e):window.console.warn(t+" is not a valid command")},onDrop(t){if(this.uploads&&this.$helper.isUploadEvent(t))return this.$refs.fileUpload.drop(t.dataTransfer.files,{url:this.$urls.api+"/"+this.endpoints.field+"/upload",multiple:!1});const e=this.$store.state.drag;"text"===(null==e?void 0:e.type)&&(this.focus(),this.insert(e.data))},onFocus(t){this.$emit("focus",t)},onInput(t){this.$emit("input",t.target.value)},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},onOut(){this.$refs.input.blur(),this.over=!1},onOver(t){if(this.uploads&&this.$helper.isUploadEvent(t))return t.dataTransfer.dropEffect="copy",this.focus(),void(this.over=!0);const e=this.$store.state.drag;"text"===(null==e?void 0:e.type)&&(t.dataTransfer.dropEffect="copy",this.focus(),this.over=!0)},onShortcut(t){!1!==this.buttons&&"Meta"!==t.key&&"Control"!==t.key&&this.$refs.toolbar&&this.$refs.toolbar.shortcut(t.key,t)},onSubmit(t){return this.$emit("submit",t)},prepend(t){this.insert(t+" "+this.selection())},resize(){this.$library.autosize.update(this.$refs.input)},select(){this.$refs.select()},selectFile(){this.$refs.fileDialog.open({endpoint:this.endpoints.field+"/files",multiple:!1})},selection(){const t=this.$refs.input,e=t.selectionStart,n=t.selectionEnd;return t.value.substring(e,n)},uploadFile(){this.$refs.fileUpload.open({url:this.$urls.api+"/"+this.endpoints.field+"/upload",multiple:!1})},wrap(t){this.insert(t+this.selection()+t)}},validations(){return{value:{required:!this.required||K.required,minLength:!this.minlength||K.minLength(this.minlength),maxLength:!this.maxlength||K.maxLength(this.maxlength)}}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-textarea-input",attrs:{"data-over":t.over,"data-size":t.size,"data-theme":t.theme}},[n("div",{staticClass:"k-textarea-input-wrapper"},[t.buttons&&!t.disabled?n("k-toolbar",{ref:"toolbar",attrs:{buttons:t.buttons,disabled:t.disabled,uploads:t.uploads},on:{command:t.onCommand},nativeOn:{mousedown:function(t){t.preventDefault()}}}):t._e(),n("textarea",t._b({directives:[{name:"direction",rawName:"v-direction"}],ref:"input",staticClass:"k-textarea-input-native",attrs:{"data-font":t.font},on:{click:t.onClick,focus:t.onFocus,input:t.onInput,keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:e.metaKey?t.onSubmit.apply(null,arguments):null},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:e.ctrlKey?t.onSubmit.apply(null,arguments):null},function(e){return e.metaKey?t.onShortcut.apply(null,arguments):null},function(e){return e.ctrlKey?t.onShortcut.apply(null,arguments):null}],dragover:t.onOver,dragleave:t.onOut,drop:t.onDrop}},"textarea",{autofocus:t.autofocus,disabled:t.disabled,id:t.id,minlength:t.minlength,name:t.name,placeholder:t.placeholder,required:t.required,spellcheck:t.spellcheck,value:t.value},!1))],1),n("k-toolbar-email-dialog",{ref:"emailDialog",on:{cancel:t.cancel,submit:function(e){return t.insert(e)}}}),n("k-toolbar-link-dialog",{ref:"linkDialog",on:{cancel:t.cancel,submit:function(e){return t.insert(e)}}}),n("k-files-dialog",{ref:"fileDialog",on:{cancel:t.cancel,submit:function(e){return t.insertFile(e)}}}),t.uploads?n("k-upload",{ref:"fileUpload",on:{success:t.insertUpload}}):t._e()],1)}),[],!1,Ko,null,null,null);function Ko(t){for(let e in Ho)this[e]=Ho[e]}var Jo=function(){return Uo.exports}();const Go={props:{display:{type:String,default:"HH:mm"},max:String,min:String,step:{type:Object,default:()=>({size:5,unit:"minute"})},type:{type:String,default:"time"},value:String}};const Vo={};var Wo=Ft({mixins:[js,Go],computed:{inputType:()=>"time"}},undefined,undefined,!1,Xo,null,null,null);function Xo(t){for(let e in Vo)this[e]=Vo[e]}var Zo=function(){return Wo.exports}();const Qo={props:{autofocus:Boolean,disabled:Boolean,id:[Number,String],text:{type:[Array,String]},required:Boolean,value:Boolean}},tr={};var er=Ft({mixins:[Qo],inheritAttrs:!1,computed:{label(){const t=this.text||[this.$t("off"),this.$t("on")];return Array.isArray(t)?this.value?t[1]:t[0]:t}},watch:{value(){this.onInvalid()}},mounted(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus(){this.$refs.input.focus()},onEnter(t){"Enter"===t.key&&this.$refs.input.click()},onInput(t){this.$emit("input",t)},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},select(){this.$refs.input.focus()}},validations(){return{value:{required:!this.required||K.required}}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("label",{staticClass:"k-toggle-input",attrs:{"data-disabled":t.disabled}},[n("input",{ref:"input",staticClass:"k-toggle-input-native",attrs:{id:t.id,disabled:t.disabled,type:"checkbox"},domProps:{checked:t.value},on:{change:function(e){return t.onInput(e.target.checked)}}}),n("span",{staticClass:"k-toggle-input-label",domProps:{innerHTML:t._s(t.label)}})])}),[],!1,nr,null,null,null);function nr(t){for(let e in tr)this[e]=tr[e]}var ir=function(){return er.exports}();const sr={mixins:[vn,yn,_n,Cn],props:{columns:Number,grow:Boolean,labels:Boolean,options:Array,reset:Boolean,value:[String,Number,Boolean]}},or={};var rr=Ft({inheritAttrs:!1,mixins:[sr],watch:{value(){this.onInvalid()}},mounted(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus(){(this.$el.querySelector("input[checked]")||this.$el.querySelector("input")).focus()},onClick(t){t===this.value&&this.reset&&!this.required&&this.$emit("input","")},onInput(t){this.$emit("input",t)},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},select(){this.focus()}},validations(){return{value:{required:!this.required||K.required}}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("ul",{staticClass:"k-toggles-input",style:"--options:"+(t.columns||t.options.length),attrs:{"data-invalid":t.$v.$invalid,"data-labels":t.labels}},t._l(t.options,(function(e,i){return n("li",{key:i},[n("input",{staticClass:"input-hidden",attrs:{id:t.id+"-"+i,name:t.id,type:"radio"},domProps:{value:e.value,checked:t.value===e.value},on:{click:function(n){return t.onClick(e.value)},change:function(n){return t.onInput(e.value)}}}),n("label",{attrs:{for:t.id+"-"+i,title:e.text}},[e.icon?n("k-icon",{attrs:{type:e.icon}}):t._e(),t.labels?n("span",{staticClass:"k-toggles-text"},[t._v(" "+t._s(e.text)+" ")]):t._e()],1)])})),0)}),[],!1,ar,null,null,null);function ar(t){for(let e in or)this[e]=or[e]}var lr=function(){return rr.exports}();const ur={mixins:[Ds],props:{autocomplete:{type:String,default:"url"},type:{type:String,default:"url"}}};const cr={};var dr=Ft({extends:qs,mixins:[ur]},undefined,undefined,!1,pr,null,null,null);function pr(t){for(let e in cr)this[e]=cr[e]}var hr=function(){return dr.exports}();u.component("k-checkbox-input",ws),u.component("k-checkboxes-input",As),u.component("k-date-input",js),u.component("k-email-input",Hs),u.component("k-list-input",Ws),u.component("k-multiselect-input",eo),u.component("k-number-input",ro),u.component("k-password-input",po),u.component("k-radio-input",ko),u.component("k-range-input",_o),u.component("k-select-input",Oo),u.component("k-slug-input",Mo),u.component("k-tags-input",Po),u.component("k-tel-input",zo),u.component("k-text-input",qs),u.component("k-textarea-input",Jo),u.component("k-time-input",Zo),u.component("k-toggle-input",ir),u.component("k-toggles-input",lr),u.component("k-url-input",hr);const fr={mixins:[On],inheritAttrs:!1,props:{autofocus:Boolean,empty:String,fieldsets:Object,fieldsetGroups:Object,group:String,max:{type:Number,default:null},value:{type:Array,default:()=>[]}},data:()=>({opened:[]}),computed:{hasFieldsets(){return Object.keys(this.fieldsets).length},isEmpty(){return 0===this.value.length},isFull(){return null!==this.max&&this.value.length>=this.max}},methods:{focus(){this.$refs.blocks.focus()}}},mr={};var gr=Ft(fr,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-blocks-field",scopedSlots:t._u([{key:"options",fn:function(){return[t.hasFieldsets?n("k-dropdown",[n("k-button",{attrs:{icon:"dots"},on:{click:function(e){return t.$refs.options.toggle()}}}),n("k-dropdown-content",{ref:"options",attrs:{align:"right"}},[n("k-dropdown-item",{attrs:{disabled:t.isFull,icon:"add"},on:{click:function(e){return t.$refs.blocks.choose(t.value.length)}}},[t._v(" "+t._s(t.$t("add"))+" ")]),n("hr"),n("k-dropdown-item",{attrs:{disabled:t.isEmpty,icon:"template"},on:{click:function(e){return t.$refs.blocks.copyAll()}}},[t._v(" "+t._s(t.$t("copy.all"))+" ")]),n("k-dropdown-item",{attrs:{disabled:t.isFull,icon:"download"},on:{click:function(e){return t.$refs.blocks.pasteboard()}}},[t._v(" "+t._s(t.$t("paste"))+" ")]),n("hr"),n("k-dropdown-item",{attrs:{disabled:t.isEmpty,icon:"trash"},on:{click:function(e){return t.$refs.blocks.confirmToRemoveAll()}}},[t._v(" "+t._s(t.$t("delete.all"))+" ")])],1)],1):t._e()]},proxy:!0}])},"k-field",t.$props,!1),[n("k-blocks",t._g({ref:"blocks",attrs:{autofocus:t.autofocus,compact:!1,empty:t.empty,endpoints:t.endpoints,fieldsets:t.fieldsets,"fieldset-groups":t.fieldsetGroups,group:t.group,max:t.max,value:t.value},on:{close:function(e){t.opened=e},open:function(e){t.opened=e}}},t.$listeners))],1)}),[],!1,kr,null,null,null);function kr(t){for(let e in mr)this[e]=mr[e]}var vr=function(){return gr.exports}(),br={props:{counter:{type:Boolean,default:!0}},computed:{counterOptions(){var t,e;if(null===this.value||this.disabled||!1===this.counter)return!1;let n=0;return this.value&&(n=Array.isArray(this.value)?this.value.length:String(this.value).length),{count:n,min:null!=(t=this.min)?t:this.minlength,max:null!=(e=this.max)?e:this.maxlength}}}};const yr={};var $r=Ft({mixins:[On,Pn,Ss,br],inheritAttrs:!1,methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-checkboxes-field",attrs:{counter:t.counterOptions}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"checkboxes"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,_r,null,null,null);function _r(t){for(let e in yr)this[e]=yr[e]}var xr=function(){return $r.exports}();const wr={mixins:[On,Pn,Ts],inheritAttrs:!1,props:{calendar:{type:Boolean,default:!0},icon:{type:String,default:"calendar"},time:{type:[Boolean,Object],default:()=>({})},times:{type:Boolean,default:!0}},data(){return{isInvalid:!1,iso:this.toIso(this.value)}},computed:{isEmpty(){return this.time?null===this.iso.date&&this.iso.time:null===this.iso.date}},watch:{value(t,e){t!==e&&(this.iso=this.toIso(t))}},methods:{focus(){this.$refs.dateInput.focus()},now(){const t=this.$library.dayjs();return{date:t.toISO("date"),time:this.time?t.toISO("time"):"00:00:00"}},onInput(){if(this.isEmpty)return this.$emit("input","");const t=this.$library.dayjs.iso(this.iso.date+" "+this.iso.time);(t||null!==this.iso.date&&null!==this.iso.time)&&this.$emit("input",(null==t?void 0:t.toISO())||"")},onCalendarInput(t){var e;null==(e=this.$refs.calendar)||e.close(),this.onDateInput(t)},onDateInput(t){t&&!this.iso.time&&(this.iso.time=this.now().time),this.iso.date=t,this.onInput()},onDateInvalid(t){this.isInvalid=t},onTimeInput(t){t&&!this.iso.date&&(this.iso.date=this.now().date),this.iso.time=t,this.onInput()},onTimesInput(t){var e;null==(e=this.$refs.times)||e.close(),this.onTimeInput(t+":00")},toIso(t){const e=this.$library.dayjs.iso(t);return{date:(null==e?void 0:e.toISO("date"))||null,time:(null==e?void 0:e.toISO("time"))||null}}}},Sr={};var Cr=Ft(wr,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-date-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[n("div",{ref:"body",staticClass:"k-date-field-body",attrs:{"data-invalid":!t.novalidate&&t.isInvalid,"data-theme":"field"}},[n("k-input",t._b({ref:"dateInput",attrs:{id:t._uid,autofocus:t.autofocus,disabled:t.disabled,display:t.display,max:t.max,min:t.min,required:t.required,value:t.value,theme:"field",type:"date"},on:{invalid:t.onDateInvalid,input:t.onDateInput,submit:function(e){return t.$emit("submit")}},scopedSlots:t._u([t.calendar?{key:"icon",fn:function(){return[n("k-dropdown",[n("k-button",{staticClass:"k-input-icon-button",attrs:{icon:t.icon,tooltip:t.$t("date.select")},on:{click:function(e){return t.$refs.calendar.toggle()}}}),n("k-dropdown-content",{ref:"calendar",attrs:{align:"right"}},[n("k-calendar",{attrs:{value:t.value,min:t.min,max:t.max},on:{input:t.onCalendarInput}})],1)],1)]},proxy:!0}:null],null,!0)},"k-input",t.$props,!1)),t.time?n("k-input",{ref:"timeInput",attrs:{disabled:t.disabled,display:t.time.display,required:t.required,step:t.time.step,value:t.iso.time,icon:t.time.icon,theme:"field",type:"time"},on:{input:t.onTimeInput,submit:function(e){return t.$emit("submit")}},scopedSlots:t._u([t.times?{key:"icon",fn:function(){return[n("k-dropdown",[n("k-button",{staticClass:"k-input-icon-button",attrs:{icon:t.time.icon||"clock",tooltip:t.$t("time.select")},on:{click:function(e){return t.$refs.times.toggle()}}}),n("k-dropdown-content",{ref:"times",attrs:{align:"right"}},[n("k-times",{attrs:{display:t.time.display,value:t.value},on:{input:t.onTimesInput}})],1)],1)]},proxy:!0}:null],null,!0)}):t._e()],1)])}),[],!1,Or,null,null,null);function Or(t){for(let e in Sr)this[e]=Sr[e]}var Er=function(){return Cr.exports}();const Ar={mixins:[On,Pn,Fs],inheritAttrs:!1,props:{link:{type:Boolean,default:!0},icon:{type:String,default:"email"}},computed:{mailto(){var t;return(null==(t=this.value)?void 0:t.length)>0?"mailto:"+this.value:null}},methods:{focus(){this.$refs.input.focus()}}},Tr={};var Ir=Ft(Ar,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-email-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"email"},scopedSlots:t._u([{key:"icon",fn:function(){return[t.link?n("k-button",{staticClass:"k-input-icon-button",attrs:{icon:t.icon,link:t.mailto,tooltip:t.$t("open"),tabindex:"-1",target:"_blank"}}):t._e()]},proxy:!0}])},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,Mr,null,null,null);function Mr(t){for(let e in Tr)this[e]=Tr[e]}var Lr=function(){return Ir.exports}(),jr={mixins:[On],inheritAttrs:!1,props:{empty:String,info:String,link:Boolean,layout:{type:String,default:"list"},max:Number,multiple:Boolean,parent:String,search:Boolean,size:String,text:String,value:{type:Array,default:()=>[]}},data(){return{selected:this.value}},computed:{btnIcon(){return!this.multiple&&this.selected.length>0?"refresh":"add"},btnLabel(){return!this.multiple&&this.selected.length>0?this.$t("change"):this.$t("add")},collection(){return{empty:this.emptyProps,items:this.selected,layout:this.layout,link:this.link,size:this.size,sortable:!this.disabled&&this.selected.length>1}},isInvalid(){return!(!this.required||0!==this.selected.length)||(!!(this.min&&this.selected.lengththis.max))},items(){return this.models.map(this.item)},more(){return!this.max||this.max>this.selected.length}},watch:{value(t){this.selected=t}},methods:{focus(){},item:t=>t,onInput(){this.$emit("input",this.selected)},open(){if(this.disabled)return!1;this.$refs.selector.open({endpoint:this.endpoints.field,max:this.max,multiple:this.multiple,search:this.search,selected:this.selected.map((t=>t.id))})},remove(t){this.selected.splice(t,1),this.onInput()},removeById(t){this.selected=this.selected.filter((e=>e.id!==t)),this.onInput()},select(t){0!==t.length?(this.selected=this.selected.filter((e=>t.filter((t=>t.id===e.id)).length>0)),t.forEach((t=>{0===this.selected.filter((e=>t.id===e.id)).length&&this.selected.push(t)})),this.onInput()):this.selected=[]}}};const Dr={mixins:[jr],props:{uploads:[Boolean,Object,Array]},computed:{emptyProps(){return{icon:"image",text:this.empty||this.$t("field.files.empty")}},moreUpload(){return!this.disabled&&this.more&&this.uploads},options(){return this.uploads?{icon:this.btnIcon,text:this.btnLabel,options:[{icon:"check",text:this.$t("select"),click:"open"},{icon:"upload",text:this.$t("upload"),click:"upload"}]}:{options:[{icon:"check",text:this.$t("select"),click:()=>this.open()}]}},uploadParams(){return{accept:this.uploads.accept,max:this.max,multiple:this.multiple,url:this.$urls.api+"/"+this.endpoints.field+"/upload"}}},created(){this.$events.$on("file.delete",this.removeById)},destroyed(){this.$events.$off("file.delete",this.removeById)},methods:{drop(t){return!1!==this.uploads&&this.$refs.fileUpload.drop(t,this.uploadParams)},prompt(){if(this.disabled)return!1;this.moreUpload?this.$refs.options.toggle():this.open()},onAction(t){if(this.moreUpload)switch(t){case"open":return this.open();case"upload":return this.$refs.fileUpload.open(this.uploadParams)}},isSelected(t){return this.selected.find((e=>e.id===t.id))},upload(t,e){!1===this.multiple&&(this.selected=[]),e.forEach((t=>{this.isSelected(t)||this.selected.push(t)})),this.onInput(),this.$events.$emit("model.update")}}},Br={};var Pr=Ft(Dr,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-files-field",scopedSlots:t._u([t.more&&!t.disabled?{key:"options",fn:function(){return[n("k-button-group",{staticClass:"k-field-options"},[n("k-options-dropdown",t._b({ref:"options",on:{action:t.onAction}},"k-options-dropdown",t.options,!1))],1)]},proxy:!0}:null],null,!0)},"k-field",t.$props,!1),[n("k-dropzone",{attrs:{disabled:!t.moreUpload},on:{drop:t.drop}},[n("k-collection",t._b({on:{empty:t.prompt,sort:t.onInput,sortChange:function(e){return t.$emit("change",e)}},scopedSlots:t._u([{key:"options",fn:function(e){var i=e.index;return[t.disabled?t._e():n("k-button",{attrs:{tooltip:t.$t("remove"),icon:"remove"},on:{click:function(e){return t.remove(i)}}})]}}])},"k-collection",t.collection,!1))],1),n("k-files-dialog",{ref:"selector",on:{submit:t.select}}),n("k-upload",{ref:"fileUpload",on:{success:t.upload}})],1)}),[],!1,Nr,null,null,null);function Nr(t){for(let e in Br)this[e]=Br[e]}var qr=function(){return Pr.exports}();const Fr={};var Rr=Ft({},(function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"k-field k-gap-field"})}),[],!1,zr,null,null,null);function zr(t){for(let e in Fr)this[e]=Fr[e]}var Yr=function(){return Rr.exports}();const Hr={mixins:[$n,wn],props:{numbered:Boolean}},Ur={};var Kr=Ft(Hr,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-headline-field"},[n("k-headline",{attrs:{"data-numbered":t.numbered,size:"large"}},[t._v(" "+t._s(t.label)+" ")]),t.help?n("footer",{staticClass:"k-field-footer"},[t.help?n("k-text",{staticClass:"k-field-help",attrs:{theme:"help"},domProps:{innerHTML:t._s(t.help)}}):t._e()],1):t._e()],1)}),[],!1,Jr,null,null,null);function Jr(t){for(let e in Ur)this[e]=Ur[e]}var Gr=function(){return Kr.exports}();const Vr={};var Wr=Ft({mixins:[$n,wn],props:{text:String,theme:{type:String,default:"info"}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-field k-info-field"},[n("k-headline",[t._v(t._s(t.label))]),n("k-box",{attrs:{theme:t.theme}},[n("k-text",{domProps:{innerHTML:t._s(t.text)}})],1),t.help?n("footer",{staticClass:"k-field-footer"},[t.help?n("k-text",{staticClass:"k-field-help",attrs:{theme:"help"},domProps:{innerHTML:t._s(t.help)}}):t._e()],1):t._e()],1)}),[],!1,Xr,null,null,null);function Xr(t){for(let e in Vr)this[e]=Vr[e]}var Zr=function(){return Wr.exports}();const Qr={props:{blocks:Array,endpoints:Object,fieldsetGroups:Object,fieldsets:Object,id:String,isSelected:Boolean,width:String}},ta={};var ea=Ft(Qr,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-column k-layout-column",attrs:{id:t.id,"data-width":t.width,tabindex:"0"},on:{dblclick:function(e){return t.$refs.blocks.choose(t.blocks.length)}}},[n("k-blocks",{ref:"blocks",attrs:{endpoints:t.endpoints,"fieldset-groups":t.fieldsetGroups,fieldsets:t.fieldsets,value:t.blocks,group:"layout"},on:{input:function(e){return t.$emit("input",e)}},nativeOn:{dblclick:function(t){t.stopPropagation()}}})],1)}),[],!1,na,null,null,null);function na(t){for(let e in ta)this[e]=ta[e]}const ia={components:{"k-layout-column":function(){return ea.exports}()},props:{attrs:[Array,Object],columns:Array,disabled:Boolean,endpoints:Object,fieldsetGroups:Object,fieldsets:Object,id:String,isSelected:Boolean,settings:Object},computed:{tabs(){let t=this.settings.tabs;return Object.entries(t).forEach((([e,n])=>{Object.entries(n.fields).forEach((([n])=>{t[e].fields[n].endpoints={field:this.endpoints.field+"/fields/"+n,section:this.endpoints.section,model:this.endpoints.model}}))})),t}}},sa={};var oa=Ft(ia,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("section",{staticClass:"k-layout",attrs:{"data-selected":t.isSelected,tabindex:"0"},on:{click:function(e){return t.$emit("select")}}},[n("k-grid",{staticClass:"k-layout-columns"},t._l(t.columns,(function(e,i){return n("k-layout-column",t._b({key:e.id,attrs:{endpoints:t.endpoints,"fieldset-groups":t.fieldsetGroups,fieldsets:t.fieldsets},on:{input:function(n){return t.$emit("updateColumn",{column:e,columnIndex:i,blocks:n})}}},"k-layout-column",e,!1))})),1),t.disabled?t._e():n("nav",{staticClass:"k-layout-toolbar"},[t.settings?n("k-button",{staticClass:"k-layout-toolbar-button",attrs:{tooltip:t.$t("settings"),icon:"settings"},on:{click:function(e){return t.$refs.drawer.open()}}}):t._e(),n("k-dropdown",[n("k-button",{staticClass:"k-layout-toolbar-button",attrs:{icon:"angle-down"},on:{click:function(e){return t.$refs.options.toggle()}}}),n("k-dropdown-content",{ref:"options",attrs:{align:"right"}},[n("k-dropdown-item",{attrs:{icon:"angle-up"},on:{click:function(e){return t.$emit("prepend")}}},[t._v(" "+t._s(t.$t("insert.before"))+" ")]),n("k-dropdown-item",{attrs:{icon:"angle-down"},on:{click:function(e){return t.$emit("append")}}},[t._v(" "+t._s(t.$t("insert.after"))+" ")]),n("hr"),t.settings?n("k-dropdown-item",{attrs:{icon:"settings"},on:{click:function(e){return t.$refs.drawer.open()}}},[t._v(" "+t._s(t.$t("settings"))+" ")]):t._e(),n("k-dropdown-item",{attrs:{icon:"copy"},on:{click:function(e){return t.$emit("duplicate")}}},[t._v(" "+t._s(t.$t("duplicate"))+" ")]),n("hr"),n("k-dropdown-item",{attrs:{icon:"trash"},on:{click:function(e){return t.$refs.confirmRemoveDialog.open()}}},[t._v(" "+t._s(t.$t("field.layout.delete"))+" ")])],1)],1),n("k-sort-handle")],1),t.settings?n("k-form-drawer",{ref:"drawer",staticClass:"k-layout-drawer",attrs:{tabs:t.tabs,title:t.$t("settings"),value:t.attrs,icon:"settings"},on:{input:function(e){return t.$emit("updateAttrs",e)}}}):t._e(),n("k-remove-dialog",{ref:"confirmRemoveDialog",attrs:{text:t.$t("field.layout.delete.confirm")},on:{submit:function(e){return t.$emit("remove")}}})],1)}),[],!1,ra,null,null,null);function ra(t){for(let e in sa)this[e]=sa[e]}var aa=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[t.rows.length?[n("k-draggable",t._b({staticClass:"k-layouts",on:{sort:t.save}},"k-draggable",t.draggableOptions,!1),t._l(t.rows,(function(e,i){return n("k-layout",t._b({key:e.id,attrs:{disabled:t.disabled,endpoints:t.endpoints,"fieldset-groups":t.fieldsetGroups,fieldsets:t.fieldsets,"is-selected":t.selected===e.id,settings:t.settings},on:{append:function(e){return t.selectLayout(i+1)},duplicate:function(n){return t.duplicateLayout(i,e)},prepend:function(e){return t.selectLayout(i)},remove:function(n){return t.removeLayout(e)},select:function(n){t.selected=e.id},updateAttrs:function(e){return t.updateAttrs(i,e)},updateColumn:function(n){return t.updateColumn(Object.assign({layout:e,layoutIndex:i},n))}}},"k-layout",e,!1))})),1),t.disabled?t._e():n("k-button",{staticClass:"k-layout-add-button",attrs:{icon:"add"},on:{click:function(e){return t.selectLayout(t.rows.length)}}})]:[n("k-empty",{staticClass:"k-layout-empty",attrs:{icon:"dashboard"},on:{click:function(e){return t.selectLayout(0)}}},[t._v(" "+t._s(t.empty||t.$t("field.layout.empty"))+" ")])],n("k-dialog",{ref:"selector",staticClass:"k-layout-selector",attrs:{"cancel-button":!1,"submit-button":!1,size:"medium"}},[n("k-headline",[t._v(t._s(t.$t("field.layout.select")))]),n("ul",t._l(t.layouts,(function(e,i){return n("li",{key:i,staticClass:"k-layout-selector-option"},[n("k-grid",{nativeOn:{click:function(n){return t.addLayout(e)}}},t._l(e,(function(t,e){return n("k-column",{key:e,attrs:{width:t}})})),1)],1)})),0)],1)],2)};const la={components:{"k-layout":function(){return oa.exports}()},props:{disabled:Boolean,empty:String,endpoints:Object,fieldsetGroups:Object,fieldsets:Object,layouts:Array,max:Number,settings:Object,value:Array},data(){return{currentLayout:null,nextIndex:null,rows:this.value,selected:null}},computed:{draggableOptions(){return{id:this._uid,handle:!0,list:this.rows}}},watch:{value(){this.rows=this.value}},methods:{async addLayout(t){let e=await this.$api.post(this.endpoints.field+"/layout",{columns:t});this.rows.splice(this.nextIndex,0,e),this.layouts.length>1&&this.$refs.selector.close(),this.save()},duplicateLayout(t,e){let n=l(a({},this.$helper.clone(e)),{id:this.$helper.uuid()});n.columns=n.columns.map((t=>(t.id=this.$helper.uuid(),t.blocks=t.blocks.map((t=>(t.id=this.$helper.uuid(),t))),t))),this.rows.splice(t+1,0,n),this.save()},removeLayout(t){const e=this.rows.findIndex((e=>e.id===t.id));-1!==e&&this.$delete(this.rows,e),this.save()},save(){this.$emit("input",this.rows)},selectLayout(t){this.nextIndex=t,1!==this.layouts.length?this.$refs.selector.open():this.addLayout(this.layouts[0])},updateColumn(t){this.rows[t.layoutIndex].columns[t.columnIndex].blocks=t.blocks,this.save()},updateAttrs(t,e){this.rows[t].attrs=e,this.save()}}},ua={};var ca=Ft(la,aa,[],!1,da,null,null,null);function da(t){for(let e in ua)this[e]=ua[e]}const pa={};var ha=Ft({components:{"k-block-layouts":function(){return ca.exports}()},mixins:[On],inheritAttrs:!1,props:{empty:String,fieldsetGroups:Object,fieldsets:Object,layouts:{type:Array,default:()=>[["1/1"]]},settings:Object,value:{type:Array,default:()=>[]}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-layout-field"},"k-field",t.$props,!1),[n("k-block-layouts",t._b({on:{input:function(e){return t.$emit("input",e)}}},"k-block-layouts",t.$props,!1))],1)}),[],!1,fa,null,null,null);function fa(t){for(let e in pa)this[e]=pa[e]}var ma=function(){return ha.exports}();const ga={};var ka=Ft({},(function(){var t=this.$createElement;return(this._self._c||t)("hr",{staticClass:"k-line-field"})}),[],!1,va,null,null,null);function va(t){for(let e in ga)this[e]=ga[e]}var ba=function(){return ka.exports}();const ya={mixins:[On,Pn],inheritAttrs:!1,props:{marks:[Array,Boolean],value:String},methods:{focus(){this.$refs.input.focus()}}},$a={};var _a=Ft(ya,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-list-field",attrs:{input:t._uid,counter:!1}},"k-field",t.$props,!1),[n("k-input",t._b({ref:"input",attrs:{id:t._uid,marks:t.marks,value:t.value,type:"list",theme:"field"},on:{input:function(e){return t.$emit("input",e)}}},"k-input",t.$props,!1))],1)}),[],!1,xa,null,null,null);function xa(t){for(let e in $a)this[e]=$a[e]}var wa=function(){return _a.exports}();const Sa={};var Ca=Ft({mixins:[On,Pn,Xs,br],inheritAttrs:!1,props:{icon:{type:String,default:"angle-down"}},mounted(){this.$refs.input.$el.setAttribute("tabindex",0)},methods:{blur(t){this.$refs.input.blur(t)},focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-multiselect-field",attrs:{input:t._uid,counter:t.counterOptions},on:{blur:t.blur},nativeOn:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:(e.preventDefault(),t.focus.apply(null,arguments))}}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"multiselect"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,Oa,null,null,null);function Oa(t){for(let e in Sa)this[e]=Sa[e]}var Ea=function(){return Ca.exports}();const Aa={};var Ta=Ft({mixins:[On,Pn,no],inheritAttrs:!1,methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-number-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"number"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,Ia,null,null,null);function Ia(t){for(let e in Aa)this[e]=Aa[e]}var Ma=function(){return Ta.exports}();const La={};var ja=Ft({mixins:[jr],computed:{emptyProps(){return{icon:"page",text:this.empty||this.$t("field.pages.empty")}}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-pages-field",scopedSlots:t._u([{key:"options",fn:function(){return[n("k-button-group",{staticClass:"k-field-options"},[t.more&&!t.disabled?n("k-button",{staticClass:"k-field-options-button",attrs:{icon:t.btnIcon,text:t.btnLabel},on:{click:t.open}}):t._e()],1)]},proxy:!0}])},"k-field",t.$props,!1),[n("k-collection",t._b({on:{empty:t.open,sort:t.onInput,sortChange:function(e){return t.$emit("change",e)}},scopedSlots:t._u([{key:"options",fn:function(e){var i=e.index;return[t.disabled?t._e():n("k-button",{attrs:{tooltip:t.$t("remove"),icon:"remove"},on:{click:function(e){return t.remove(i)}}})]}}])},"k-collection",t.collection,!1)),n("k-pages-dialog",{ref:"selector",on:{submit:t.select}})],1)}),[],!1,Da,null,null,null);function Da(t){for(let e in La)this[e]=La[e]}var Ba=function(){return ja.exports}();const Pa={};var Na=Ft({mixins:[On,Pn,ao,br],inheritAttrs:!1,props:{minlength:{type:Number,default:8},icon:{type:String,default:"key"}},methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-password-field",attrs:{input:t._uid,counter:t.counterOptions},scopedSlots:t._u([{key:"options",fn:function(){return[t._t("options")]},proxy:!0}],null,!0)},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"password"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,qa,null,null,null);function qa(t){for(let e in Pa)this[e]=Pa[e]}var Fa=function(){return Na.exports}();const Ra={};var za=Ft({mixins:[On,Pn,ho],inheritAttrs:!1,methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-radio-field"},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"radio"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,Ya,null,null,null);function Ya(t){for(let e in Ra)this[e]=Ra[e]}var Ha=function(){return za.exports}();const Ua={};var Ka=Ft({mixins:[Pn,On,vo],inheritAttrs:!1,methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-range-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"range"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,Ja,null,null,null);function Ja(t){for(let e in Ua)this[e]=Ua[e]}var Ga=function(){return Ka.exports}();const Va={};var Wa=Ft({mixins:[On,Pn,xo],inheritAttrs:!1,props:{icon:{type:String,default:"angle-down"}},methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-select-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"select"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,Xa,null,null,null);function Xa(t){for(let e in Va)this[e]=Va[e]}var Za=function(){return Wa.exports}();const Qa={mixins:[On,Pn,Eo],inheritAttrs:!1,props:{icon:{type:String,default:"url"},path:{type:String},wizard:{type:[Boolean,Object],default:!1}},data(){return{slug:this.value}},computed:{preview(){return void 0!==this.help?this.help:void 0!==this.path?this.path+this.value:null}},watch:{value(){this.slug=this.value}},methods:{focus(){this.$refs.input.focus()},onWizard(){var t;this.formData[null==(t=this.wizard)?void 0:t.field]&&(this.slug=this.formData[this.wizard.field])}}},tl={};var el=Ft(Qa,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-slug-field",attrs:{input:t._uid,help:t.preview},scopedSlots:t._u([t.wizard&&t.wizard.text?{key:"options",fn:function(){return[n("k-button",{attrs:{text:t.wizard.text,icon:"wand"},on:{click:t.onWizard}})]},proxy:!0}:null],null,!0)},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,value:t.slug,theme:"field",type:"slug"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,nl,null,null,null);function nl(t){for(let e in tl)this[e]=tl[e]}var il=function(){return el.exports}();const sl={mixins:[On],inheritAttrs:!1,props:{columns:Object,duplicate:{type:Boolean,default:!0},empty:String,fields:Object,limit:Number,max:Number,min:Number,prepend:{type:Boolean,default:!1},sortable:{type:Boolean,default:!0},sortBy:String,value:{type:Array,default:()=>[]}},data(){return{autofocus:null,items:this.toItems(this.value),currentIndex:null,currentModel:null,trash:null,page:1}},computed:{dragOptions(){return{disabled:!this.isSortable,fallbackClass:"k-sortable-row-fallback"}},form(){let t={};return Object.keys(this.fields).forEach((e=>{let n=this.fields[e];n.section=this.name,n.endpoints={field:this.endpoints.field+"+"+e,section:this.endpoints.section,model:this.endpoints.model},null===this.autofocus&&!0===n.autofocus&&(this.autofocus=e),t[e]=n})),t},index(){return this.limit?(this.page-1)*this.limit:1},more(){return!0!==this.disabled&&!(this.max&&this.items.length>=this.max)},isInvalid(){return!0!==this.disabled&&(!!(this.min&&this.items.lengththis.max))},isSortable(){return!this.sortBy&&(!this.limit&&(!0!==this.disabled&&(!(this.items.length<=1)&&!1!==this.sortable)))},pagination(){let t=0;return this.limit&&(t=(this.page-1)*this.limit),{page:this.page,offset:t,limit:this.limit,total:this.items.length,align:"center",details:!0}},options(){let t=[],e=this.duplicate&&this.more&&null===this.currentIndex;return e&&t.push({icon:"copy",text:this.$t("duplicate"),click:"duplicate"}),t.push({icon:"remove",text:e?this.$t("remove"):null,click:"remove"}),t},paginatedItems(){return this.limit?this.items.slice(this.pagination.offset,this.pagination.offset+this.limit):this.items}},watch:{value(t){t!=this.items&&(this.items=this.toItems(t))}},methods:{add(t){!0===this.prepend?this.items.unshift(t):this.items.push(t)},focus(){var t,e;null==(e=null==(t=this.$refs.add)?void 0:t.focus)||e.call(t)},jump(t,e){this.open(t+this.pagination.offset,e)},onAdd(){if(!0===this.disabled)return!1;if(null!==this.currentIndex)return this.onFormDiscard(),!1;let t={};for(const e in this.fields)t[e]=this.$helper.clone(this.fields[e].default);this.currentIndex="new",this.currentModel=t,this.onFormOpen()},onFormClose(){this.currentIndex=null,this.currentModel=null},onFormDiscard(){if("new"===this.currentIndex){if(0===Object.values(this.currentModel).filter((t=>!1===this.$helper.object.isEmpty(t))).length)return void this.onFormClose()}this.onFormSubmit()},onFormOpen(t=this.autofocus){this.$nextTick((()=>{var e;null==(e=this.$refs.form)||e.focus(t)}))},async onFormPaginate(t){await this.save(),this.open(t)},async onFormSubmit(){try{await this.save(),this.onFormClose()}catch(t){}},onInput(t=this.items){this.$emit("input",t)},onOption(t,e,n){switch(t){case"remove":this.onFormClose(),this.trash=n+this.pagination.offset,this.$refs.remove.open();break;case"duplicate":this.add(this.items[n+this.pagination.offset]),this.onInput()}},onRemove(){if(null===this.trash)return!1;this.items.splice(this.trash,1),this.trash=null,this.$refs.remove.close(),this.onInput(),0===this.paginatedItems.length&&this.page>1&&this.page--,this.items=this.sort(this.items)},open(t,e){this.currentIndex=t,this.currentModel=this.$helper.clone(this.items[t]),this.onFormOpen(e)},paginate({page:t}){this.page=t},sort(t){return this.sortBy?t.sortBy(this.sortBy):t},async save(){if(null!==this.currentIndex&&void 0!==this.currentIndex)try{return await this.validate(this.currentModel),"new"===this.currentIndex?this.add(this.currentModel):this.items[this.currentIndex]=this.currentModel,this.items=this.sort(this.items),this.onInput(),!0}catch(t){throw this.$store.dispatch("notification/error",{message:this.$t("error.form.incomplete"),details:t}),t}},toItems(t){return!1===Array.isArray(t)?[]:this.sort(t)},async validate(t){const e=await this.$api.post(this.endpoints.field+"/validate",t);if(e.length>0)throw e;return!0}}},ol={};var rl=Ft(sl,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-structure-field",nativeOn:{click:function(t){t.stopPropagation()}},scopedSlots:t._u([{key:"options",fn:function(){return[t.more&&null===t.currentIndex?n("k-button",{ref:"add",attrs:{id:t._uid,text:t.$t("add"),icon:"add"},on:{click:t.onAdd}}):t._e()]},proxy:!0}])},"k-field",t.$props,!1),[null!==t.currentIndex?n("k-structure-form",{ref:"form",attrs:{fields:t.form,index:t.currentIndex,total:t.items.length},on:{close:t.onFormClose,discard:t.onFormDiscard,paginate:function(e){return t.onFormPaginate(e.offset)},submit:t.onFormSubmit},model:{value:t.currentModel,callback:function(e){t.currentModel=e},expression:"currentModel"}}):0===t.items.length?n("k-empty",{attrs:{"data-invalid":t.isInvalid,icon:"list-bullet"},on:{click:t.onAdd}},[t._v(" "+t._s(t.empty||t.$t("field.structure.empty"))+" ")]):[n("k-table",{attrs:{columns:t.columns,disabled:t.disabled,fields:t.fields,empty:t.$t("field.structure.empty"),index:t.index,options:t.options,rows:t.paginatedItems,sortable:t.isSortable,"data-invalid":t.isInvalid},on:{cell:function(e){return t.jump(e.rowIndex,e.columnIndex)},input:t.onInput,option:t.onOption}}),t.limit?n("k-pagination",t._b({on:{paginate:t.paginate}},"k-pagination",t.pagination,!1)):t._e(),t.disabled?t._e():n("k-dialog",{ref:"remove",attrs:{"submit-button":t.$t("delete"),theme:"negative"},on:{submit:t.onRemove}},[n("k-text",[t._v(t._s(t.$t("field.structure.delete.confirm")))])],1)]],2)}),[],!1,al,null,null,null);function al(t){for(let e in ol)this[e]=ol[e]}var ll=function(){return rl.exports}();const ul={};var cl=Ft({mixins:[On,Pn,Lo,br],inheritAttrs:!1,methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-tags-field",attrs:{input:t._uid,counter:t.counterOptions}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"tags"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,dl,null,null,null);function dl(t){for(let e in ul)this[e]=ul[e]}var pl=function(){return cl.exports}();const hl={};var fl=Ft({mixins:[On,Pn,No],inheritAttrs:!1,props:{icon:{type:String,default:"phone"}},methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-tel-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"tel"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,ml,null,null,null);function ml(t){for(let e in hl)this[e]=hl[e]}var gl=function(){return fl.exports}();const kl={};var vl=Ft({mixins:[On,Pn,Ds,br],inheritAttrs:!1,methods:{focus(){this.$refs.input.focus()},select(){this.$refs.input.select()}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-text-field",attrs:{input:t._uid,counter:t.counterOptions},scopedSlots:t._u([{key:"options",fn:function(){return[t._t("options")]},proxy:!0}],null,!0)},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,bl,null,null,null);function bl(t){for(let e in kl)this[e]=kl[e]}var yl=function(){return vl.exports}();const $l={};var _l=Ft({mixins:[On,Pn,Yo,br],inheritAttrs:!1,methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-textarea-field",attrs:{input:t._uid,counter:t.counterOptions}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,type:"textarea",theme:"field"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,xl,null,null,null);function xl(t){for(let e in $l)this[e]=$l[e]}var wl=function(){return _l.exports}();const Sl={mixins:[On,Pn,Go],inheritAttrs:!1,props:{icon:{type:String,default:"clock"},times:{type:Boolean,default:!0}},methods:{focus(){this.$refs.input.focus()},select(t){var e;this.$emit("input",t),null==(e=this.$refs.times)||e.close()}}},Cl={};var Ol=Ft(Sl,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-time-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[n("k-input",t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"time"},on:{input:function(e){return t.$emit("input",e||"")}},scopedSlots:t._u([t.times?{key:"icon",fn:function(){return[n("k-dropdown",[n("k-button",{staticClass:"k-input-icon-button",attrs:{icon:t.icon||"clock",tooltip:t.$t("time.select")},on:{click:function(e){return t.$refs.times.toggle()}}}),n("k-dropdown-content",{ref:"times",attrs:{align:"right"}},[n("k-times",{attrs:{display:t.display,value:t.value},on:{input:t.select}})],1)],1)]},proxy:!0}:null],null,!0)},"k-input",t.$props,!1))],1)}),[],!1,El,null,null,null);function El(t){for(let e in Cl)this[e]=Cl[e]}var Al=function(){return Ol.exports}();const Tl={};var Il=Ft({mixins:[On,Pn,Qo],inheritAttrs:!1,methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-toggle-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"toggle"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,Ml,null,null,null);function Ml(t){for(let e in Tl)this[e]=Tl[e]}var Ll=function(){return Il.exports}();const jl={};var Dl=Ft({inheritAttrs:!1,mixins:[On,Pn,sr],methods:{focus(){this.$refs.input.focus()},onInput(t){this.$emit("input",t)}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-toggles-field"},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",class:{grow:t.grow},attrs:{id:t._uid,theme:"field",type:"toggles"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,Bl,null,null,null);function Bl(t){for(let e in jl)this[e]=jl[e]}var Pl=function(){return Dl.exports}();const Nl={mixins:[On,Pn,ur],inheritAttrs:!1,props:{link:{type:Boolean,default:!0},icon:{type:String,default:"url"}},methods:{focus(){this.$refs.input.focus()}}},ql={};var Fl=Ft(Nl,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-url-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"url"},scopedSlots:t._u([{key:"icon",fn:function(){return[t.link?n("k-button",{staticClass:"k-input-icon-button",attrs:{icon:t.icon,link:t.value,tooltip:t.$t("open"),tabindex:"-1",target:"_blank"}}):t._e()]},proxy:!0}])},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,Rl,null,null,null);function Rl(t){for(let e in ql)this[e]=ql[e]}var zl=function(){return Fl.exports}();const Yl={};var Hl=Ft({mixins:[jr],computed:{emptyProps(){return{icon:"users",text:this.empty||this.$t("field.users.empty")}}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-users-field",scopedSlots:t._u([{key:"options",fn:function(){return[n("k-button-group",{staticClass:"k-field-options"},[t.more&&!t.disabled?n("k-button",{staticClass:"k-field-options-button",attrs:{icon:t.btnIcon,text:t.btnLabel},on:{click:t.open}}):t._e()],1)]},proxy:!0}])},"k-field",t.$props,!1),[n("k-collection",t._b({on:{empty:t.open,sort:t.onInput,sortChange:function(e){return t.$emit("change",e)}},scopedSlots:t._u([{key:"options",fn:function(e){var i=e.index;return[t.disabled?t._e():n("k-button",{attrs:{tooltip:t.$t("remove"),icon:"remove"},on:{click:function(e){return t.remove(i)}}})]}}])},"k-collection",t.collection,!1)),n("k-users-dialog",{ref:"selector",on:{submit:t.select}})],1)}),[],!1,Ul,null,null,null);function Ul(t){for(let e in Yl)this[e]=Yl[e]}var Kl=function(){return Hl.exports}();const Jl={};var Gl=Ft({mixins:[On,Pn,Ji],inheritAttrs:!1,methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-writer-field",attrs:{input:t._uid,counter:!1}},"k-field",t.$props,!1),[n("k-input",t._b({attrs:{after:t.after,before:t.before,icon:t.icon,theme:"field"}},"k-input",t.$props,!1),[n("k-writer",t._b({ref:"input",staticClass:"k-writer-field-input",attrs:{value:t.value},on:{input:function(e){return t.$emit("input",e)}}},"k-writer",t.$props,!1))],1)],1)}),[],!1,Vl,null,null,null);function Vl(t){for(let e in Jl)this[e]=Jl[e]}var Wl=function(){return Gl.exports}();u.component("k-blocks-field",vr),u.component("k-checkboxes-field",xr),u.component("k-date-field",Er),u.component("k-email-field",Lr),u.component("k-files-field",qr),u.component("k-gap-field",Yr),u.component("k-headline-field",Gr),u.component("k-info-field",Zr),u.component("k-layout-field",ma),u.component("k-line-field",ba),u.component("k-list-field",wa),u.component("k-multiselect-field",Ea),u.component("k-number-field",Ma),u.component("k-pages-field",Ba),u.component("k-password-field",Fa),u.component("k-radio-field",Ha),u.component("k-range-field",Ga),u.component("k-select-field",Za),u.component("k-slug-field",il),u.component("k-structure-field",ll),u.component("k-tags-field",pl),u.component("k-text-field",yl),u.component("k-textarea-field",wl),u.component("k-tel-field",gl),u.component("k-time-field",Al),u.component("k-toggle-field",Ll),u.component("k-toggles-field",Pl),u.component("k-url-field",zl),u.component("k-users-field",Kl),u.component("k-writer-field",Wl);const Xl={props:{cover:Boolean,ratio:String},computed:{ratioPadding(){return this.$helper.ratio(this.ratio)}}},Zl={};var Ql=Ft(Xl,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("span",{staticClass:"k-aspect-ratio",style:{"padding-bottom":t.ratioPadding},attrs:{"data-cover":t.cover}},[t._t("default")],2)}),[],!1,tu,null,null,null);function tu(t){for(let e in Zl)this[e]=Zl[e]}var eu=function(){return Ql.exports}();const nu={};var iu=Ft({},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-bar"},[t.$slots.left?n("div",{staticClass:"k-bar-slot",attrs:{"data-position":"left"}},[t._t("left")],2):t._e(),t.$slots.center?n("div",{staticClass:"k-bar-slot",attrs:{"data-position":"center"}},[t._t("center")],2):t._e(),t.$slots.right?n("div",{staticClass:"k-bar-slot",attrs:{"data-position":"right"}},[t._t("right")],2):t._e()])}),[],!1,su,null,null,null);function su(t){for(let e in nu)this[e]=nu[e]}var ou=function(){return iu.exports}();const ru={props:{theme:{type:String,default:"none"},text:String,html:{type:Boolean,default:!1}}},au={};var lu=Ft(ru,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",t._g({staticClass:"k-box",attrs:{"data-theme":t.theme}},t.$listeners),[t._t("default",(function(){return[t.html?n("k-text",{domProps:{innerHTML:t._s(t.text)}}):n("k-text",[t._v(" "+t._s(t.text)+" ")])]}))],2)}),[],!1,uu,null,null,null);function uu(t){for(let e in au)this[e]=au[e]}var cu=function(){return lu.exports}();const du={};var pu=Ft({inheritAttrs:!1,props:{back:String,color:String,element:{type:String,default:"li"},image:Object,link:String,text:String}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n(t.link?"k-link":"p",{tag:"component",staticClass:"k-bubble",style:{color:t.$helper.color(t.color),background:t.$helper.color(t.back)},attrs:{to:t.link},nativeOn:{click:function(t){t.stopPropagation()}}},[t.image?n("k-item-image",{attrs:{image:t.image,layout:"list"}}):t._e(),t._v(" "+t._s(t.text)+" ")],1)}),[],!1,hu,null,null,null);function hu(t){for(let e in du)this[e]=du[e]}var fu=function(){return pu.exports}();const mu={};var gu=Ft({inheritAttrs:!1,props:{bubbles:Array},computed:{items(){let t=this.bubbles;return"string"==typeof t&&(t=t.split(",")),t.map((t=>"string"==typeof t?{text:t}:t))}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("ul",{staticClass:"k-bubbles"},t._l(t.items,(function(e,i){return n("li",{key:i},[n("k-bubble",t._b({},"k-bubble",e,!1))],1)})),0)}),[],!1,ku,null,null,null);function ku(t){for(let e in mu)this[e]=mu[e]}var vu=function(){return gu.exports}();const bu={props:{columns:{type:[Object,Array],default:()=>({})},empty:Object,help:String,items:{type:[Array,Object],default:()=>[]},layout:{type:String,default:"list"},link:{type:Boolean,default:!0},size:String,sortable:Boolean,pagination:{type:[Boolean,Object],default:()=>!1}},computed:{hasPagination(){return!1!==this.pagination&&(!0!==this.paginationOptions.hide&&!(this.pagination.total<=this.pagination.limit))},hasFooter(){return!(!this.hasPagination&&!this.help)},paginationOptions(){const t="object"!=typeof this.pagination?{}:this.pagination;return a({limit:10,details:!0,keys:!1,total:0,hide:!1},t)}},watch:{$props(){this.$forceUpdate()}},methods:{onEmpty(t){t.stopPropagation(),this.$emit("empty")},onOption(...t){this.$emit("action",...t),this.$emit("option",...t)}}},yu={};var $u=Ft(bu,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-collection"},[t.items.length?n("k-items",{attrs:{columns:t.columns,items:t.items,layout:t.layout,link:t.link,size:t.size,sortable:t.sortable},on:{change:function(e){return t.$emit("change",e)},item:function(e){return t.$emit("item",e)},option:t.onOption,sort:function(e){return t.$emit("sort",e)}},scopedSlots:t._u([{key:"options",fn:function(e){var n=e.item,i=e.itemIndex;return[t._t("options",null,null,{item:n,index:i})]}}],null,!0)}):n("k-empty",t._g(t._b({attrs:{layout:t.layout}},"k-empty",t.empty,!1),t.$listeners.empty?{click:t.onEmpty}:{})),t.hasFooter?n("footer",{staticClass:"k-collection-footer"},[t.help?n("k-text",{staticClass:"k-collection-help",attrs:{theme:"help"},domProps:{innerHTML:t._s(t.help)}}):t._e(),n("div",{staticClass:"k-collection-pagination"},[t.hasPagination?n("k-pagination",t._b({on:{paginate:function(e){return t.$emit("paginate",e)}}},"k-pagination",t.paginationOptions,!1)):t._e()],1)],1):t._e()],1)}),[],!1,_u,null,null,null);function _u(t){for(let e in yu)this[e]=yu[e]}var xu=function(){return $u.exports}();const wu={props:{width:String,sticky:Boolean}},Su={};var Cu=Ft(wu,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-column",attrs:{"data-width":t.width,"data-sticky":t.sticky}},[n("div",[t._t("default")],2)])}),[],!1,Ou,null,null,null);function Ou(t){for(let e in Su)this[e]=Su[e]}var Eu=function(){return Cu.exports}();const Au={props:{disabled:{type:Boolean,default:!1}},data:()=>({files:[],dragging:!1,over:!1}),methods:{cancel(){this.reset()},reset(){this.dragging=!1,this.over=!1},onDrop(t){return!0===this.disabled||!1===this.$helper.isUploadEvent(t)?this.reset():(this.$events.$emit("dropzone.drop"),this.files=t.dataTransfer.files,this.$emit("drop",this.files),void this.reset())},onEnter(t){!1===this.disabled&&this.$helper.isUploadEvent(t)&&(this.dragging=!0)},onLeave(){this.reset()},onOver(t){!1===this.disabled&&this.$helper.isUploadEvent(t)&&(t.dataTransfer.dropEffect="copy",this.over=!0)}}},Tu={};var Iu=Ft(Au,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{staticClass:"k-dropzone",attrs:{"data-dragging":t.dragging,"data-over":t.over},on:{dragenter:t.onEnter,dragleave:t.onLeave,dragover:t.onOver,drop:t.onDrop}},[t._t("default")],2)}),[],!1,Mu,null,null,null);function Mu(t){for(let e in Tu)this[e]=Tu[e]}var Lu=function(){return Iu.exports}();const ju={};var Du=Ft({props:{text:String,icon:String,layout:{type:String,default:"list"}},computed:{element(){return void 0!==this.$listeners.click?"button":"div"}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n(t.element,t._g({tag:"component",staticClass:"k-empty",attrs:{"data-layout":t.layout,type:"button"===t.element&&"button"}},t.$listeners),[t.icon?n("k-icon",{attrs:{type:t.icon}}):t._e(),n("p",[t._t("default",(function(){return[t._v(t._s(t.text))]}))],2)],1)}),[],!1,Bu,null,null,null);function Bu(t){for(let e in ju)this[e]=ju[e]}var Pu=function(){return Du.exports}();const Nu={};var qu=Ft({props:{details:Array,image:Object,url:String}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-file-preview"},[n("k-view",{staticClass:"k-file-preview-layout"},[n("div",{staticClass:"k-file-preview-image"},[n("k-link",{staticClass:"k-file-preview-image-link",attrs:{to:t.url,title:t.$t("open"),target:"_blank"}},[n("k-item-image",{attrs:{image:t.image,layout:"cards"}})],1)],1),n("div",{staticClass:"k-file-preview-details"},[n("ul",t._l(t.details,(function(e){return n("li",{key:e.title},[n("h3",[t._v(t._s(e.title))]),n("p",[e.link?n("k-link",{attrs:{to:e.link,tabindex:"-1",target:"_blank"}},[t._v(" /"+t._s(e.text)+" ")]):[t._v(" "+t._s(e.text)+" ")]],2)])})),0)])])],1)}),[],!1,Fu,null,null,null);function Fu(t){for(let e in Nu)this[e]=Nu[e]}var Ru=function(){return qu.exports}();const zu={};var Yu=Ft({props:{gutter:String}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{staticClass:"k-grid",attrs:{"data-gutter":t.gutter}},[t._t("default")],2)}),[],!1,Hu,null,null,null);function Hu(t){for(let e in zu)this[e]=zu[e]}var Uu=function(){return Yu.exports}();const Ku={props:{editable:Boolean,tab:String,tabs:{type:Array,default:()=>[]}},computed:{tabsWithBadges(){const t=Object.keys(this.$store.getters["content/changes"]());return this.tabs.map((e=>{let n=[];return Object.values(e.columns).forEach((t=>{Object.values(t.sections).forEach((t=>{"fields"===t.type&&Object.keys(t.fields).forEach((t=>{n.push(t)}))}))})),e.badge=n.filter((e=>t.includes(e.toLowerCase()))).length,e}))}}},Ju={};var Gu=Ft(Ku,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("header",{staticClass:"k-header",attrs:{"data-editable":t.editable,"data-tabs":t.tabsWithBadges.length>1}},[n("k-headline",{attrs:{tag:"h1",size:"huge"}},[t.editable&&t.$listeners.edit?n("span",{staticClass:"k-headline-editable",on:{click:function(e){return t.$emit("edit")}}},[t._t("default"),n("k-icon",{attrs:{type:"edit"}})],2):t._t("default")],2),t.$slots.left||t.$slots.right?n("k-bar",{staticClass:"k-header-buttons",scopedSlots:t._u([{key:"left",fn:function(){return[t._t("left")]},proxy:!0},{key:"right",fn:function(){return[t._t("right")]},proxy:!0}],null,!0)}):t._e(),n("k-tabs",{attrs:{tab:t.tab,tabs:t.tabsWithBadges,theme:"notice"}})],1)}),[],!1,Vu,null,null,null);function Vu(t){for(let e in Ju)this[e]=Ju[e]}var Wu=function(){return Gu.exports}();const Xu={};var Zu=Ft({inheritAttrs:!1},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-panel",{staticClass:"k-panel-inside",attrs:{tabindex:"0"}},[n("header",{staticClass:"k-panel-header"},[n("k-topbar",{attrs:{breadcrumb:t.$view.breadcrumb,license:t.$license,menu:t.$menu,view:t.$view}})],1),n("main",{staticClass:"k-panel-view scroll-y"},[t._t("default")],2),t._t("footer")],2)}),[],!1,Qu,null,null,null);function Qu(t){for(let e in Xu)this[e]=Xu[e]}var tc=function(){return Zu.exports}(),ec=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("article",t._b({staticClass:"k-item",class:!!t.layout&&"k-"+t.layout+"-item",attrs:{"data-has-figure":t.hasFigure,"data-has-flag":Boolean(t.flag),"data-has-info":Boolean(t.info),"data-has-options":Boolean(t.options),tabindex:"-1"},on:{click:function(e){return t.$emit("click",e)},dragstart:function(e){return t.$emit("drag",e)}}},"article",t.data,!1),[t._t("image",(function(){return[t.hasFigure?n("k-item-image",{attrs:{image:t.image,layout:t.layout,width:t.width}}):t._e()]})),t.sortable?n("k-sort-handle",{staticClass:"k-item-sort-handle"}):t._e(),n("header",{staticClass:"k-item-content"},[t._t("default",(function(){return[n("h3",{staticClass:"k-item-title"},[!1!==t.link?n("k-link",{staticClass:"k-item-title-link",attrs:{target:t.target,to:t.link}},[n("span",{domProps:{innerHTML:t._s(t.title)}})]):n("span",{domProps:{innerHTML:t._s(t.title)}})],1),t.info?n("p",{staticClass:"k-item-info",domProps:{innerHTML:t._s(t.info)}}):t._e()]}))],2),t.flag||t.options||t.$slots.options?n("footer",{staticClass:"k-item-footer"},[n("nav",{staticClass:"k-item-buttons",on:{click:function(t){t.stopPropagation()}}},[t.flag?n("k-status-icon",t._b({},"k-status-icon",t.flag,!1)):t._e(),t._t("options",(function(){return[t.options?n("k-options-dropdown",{staticClass:"k-item-options-dropdown",attrs:{options:t.options},on:{option:t.onOption}}):t._e()]}))],2)]):t._e()],2)};const nc={inheritAttrs:!1,props:{data:Object,flag:Object,image:[Object,Boolean],info:String,layout:{type:String,default:"list"},link:{type:[Boolean,String,Function]},options:{type:[Array,Function,String]},sortable:Boolean,target:String,text:String,width:String},computed:{hasFigure(){return!1!==this.image&&Object.keys(this.image).length>0},title(){return this.text||"-"}},methods:{onOption(t){this.$emit("action",t),this.$emit("option",t)}}},ic={};var sc=Ft(nc,ec,[],!1,oc,null,null,null);function oc(t){for(let e in ic)this[e]=ic[e]}var rc=function(){return sc.exports}();const ac={inheritAttrs:!1,props:{image:[Object,Boolean],layout:{type:String,default:"list"},width:String},computed:{back(){return this.image.back||"black"},ratio(){return"cards"===this.layout&&this.image.ratio||"1/1"},size(){switch(this.layout){case"cards":return"large";case"cardlets":return"medium";default:return"regular"}},sizes(){switch(this.width){case"1/2":case"2/4":return"(min-width: 30em) and (max-width: 65em) 59em, (min-width: 65em) 44em, 27em";case"1/3":return"(min-width: 30em) and (max-width: 65em) 59em, (min-width: 65em) 29.333em, 27em";case"1/4":return"(min-width: 30em) and (max-width: 65em) 59em, (min-width: 65em) 22em, 27em";case"2/3":return"(min-width: 30em) and (max-width: 65em) 59em, (min-width: 65em) 27em, 27em";case"3/4":return"(min-width: 30em) and (max-width: 65em) 59em, (min-width: 65em) 66em, 27em";default:return"(min-width: 30em) and (max-width: 65em) 59em, (min-width: 65em) 88em, 27em"}}}},lc={};var uc=Ft(ac,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.image?n("div",{staticClass:"k-item-figure",style:{background:t.$helper.color(t.back)}},[t.image.src?n("k-image",{staticClass:"k-item-image",attrs:{cover:t.image.cover,ratio:t.ratio,sizes:t.sizes,src:t.image.src,srcset:t.image.srcset}}):n("k-aspect-ratio",{attrs:{ratio:t.ratio}},[n("k-icon",{staticClass:"k-item-icon",attrs:{color:t.$helper.color(t.image.color),type:t.image.icon}})],1)],1):t._e()}),[],!1,cc,null,null,null);function cc(t){for(let e in lc)this[e]=lc[e]}var dc=function(){return uc.exports}();const pc={inheritAttrs:!1,props:{columns:{type:[Object,Array],default:()=>({})},items:{type:Array,default:()=>[]},layout:{type:String,default:"list"},link:{type:Boolean,default:!0},image:{type:[Object,Boolean],default:()=>({})},sortable:Boolean,empty:{type:[String,Object]},size:{type:String,default:"default"}},computed:{dragOptions(){return{sort:this.sortable,disabled:!1===this.sortable,draggable:".k-draggable-item"}},table(){return{columns:this.columns,rows:this.items,sortable:this.sortable}}},methods:{onDragStart(t,e){this.$store.dispatch("drag",{type:"text",data:e})},onOption(t,e,n){this.$emit("option",t,e,n)},imageOptions(t){let e=this.image,n=t.image;return!1!==e&&!1!==n&&("object"!=typeof e&&(e={}),"object"!=typeof n&&(n={}),a(a({},n),e))}}},hc={};var fc=Ft(pc,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return"table"===t.layout?n("k-table",t._b({on:{change:function(e){return t.$emit("change",e)},sort:function(e){return t.$emit("sort",e)},option:t.onOption}},"k-table",t.table,!1)):n("k-draggable",{staticClass:"k-items",class:"k-"+t.layout+"-items",attrs:{handle:!0,options:t.dragOptions,"data-layout":t.layout,"data-size":t.size,list:t.items},on:{change:function(e){return t.$emit("change",e)},end:function(e){return t.$emit("sort",t.items,e)}}},t._l(t.items,(function(e,i){return n("k-item",t._b({key:e.id||i,class:{"k-draggable-item":t.sortable&&e.sortable},attrs:{image:t.imageOptions(e),layout:t.layout,link:!!t.link&&e.link,sortable:t.sortable&&e.sortable,width:e.column},on:{click:function(n){return t.$emit("item",e,i)},drag:function(n){return t.onDragStart(n,e.dragText)},option:function(n){return t.onOption(n,e,i)}},nativeOn:{mouseover:function(n){return t.$emit("hover",n,e,i)}},scopedSlots:t._u([{key:"options",fn:function(){return[t._t("options",null,null,{item:e,itemIndex:i})]},proxy:!0}],null,!0)},"k-item",e,!1))})),1)}),[],!1,mc,null,null,null);function mc(t){for(let e in hc)this[e]=hc[e]}var gc=function(){return fc.exports}();const kc={inheritAttrs:!0,props:{autofocus:{type:Boolean,default:!0},centered:{type:Boolean,default:!1},dimmed:{type:Boolean,default:!0},loading:{type:Boolean,default:!1}},data:()=>({isOpen:!1,scrollTop:0}),methods:{close(){!1!==this.isOpen&&(this.isOpen=!1,this.$emit("close"),this.restoreScrollPosition(),this.$events.$off("keydown.esc",this.close))},focus(){var t,e;let n=this.$refs.overlay.querySelector("\n [autofocus],\n [data-autofocus]\n ");return null===n&&(n=this.$refs.overlay.querySelector("\n input,\n textarea,\n select,\n button\n ")),"function"==typeof(null==n?void 0:n.focus)?n.focus():"function"==typeof(null==(e=null==(t=this.$slots.default[0])?void 0:t.context)?void 0:e.focus)?this.$slots.default[0].context.focus():void 0},open(){!0!==this.isOpen&&(this.storeScrollPosition(),this.isOpen=!0,this.$emit("open"),this.$events.$on("keydown.esc",this.close),setTimeout((()=>{!0===this.autofocus&&this.focus(),document.querySelector(".k-overlay > *").addEventListener("mousedown",(t=>t.stopPropagation())),this.$emit("ready")}),1))},restoreScrollPosition(){const t=document.querySelector(".k-panel-view");(null==t?void 0:t.scrollTop)&&(t.scrollTop=this.scrollTop)},storeScrollPosition(){const t=document.querySelector(".k-panel-view");(null==t?void 0:t.scrollTop)?this.scrollTop=t.scrollTop:this.scrollTop=0}}},vc={};var bc=Ft(kc,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.isOpen?n("portal",[n("div",t._g({ref:"overlay",staticClass:"k-overlay",class:t.$vnode.data.staticClass,attrs:{"data-centered":t.loading||t.centered,"data-dimmed":t.dimmed,"data-loading":t.loading,dir:t.$translation.direction},on:{mousedown:t.close}},t.$listeners),[t.loading?n("k-loader",{staticClass:"k-overlay-loader"}):t._t("default",null,{close:t.close,isOpen:t.isOpen})],2)]):t._e()}),[],!1,yc,null,null,null);function yc(t){for(let e in vc)this[e]=vc[e]}var $c=function(){return bc.exports}();const _c={};var xc=Ft({computed:{defaultLanguage(){return!!this.$language&&this.$language.default},dialog(){return this.$helper.clone(this.$store.state.dialog)},language(){return this.$language?this.$language.code:null},role(){return this.$user?this.$user.role:null},user(){return this.$user?this.$user.id:null}},created(){this.$events.$on("drop",this.drop)},destroyed(){this.$events.$off("drop",this.drop)},methods:{drop(){this.$store.dispatch("drag",null)}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-panel",attrs:{"data-dragging":t.$store.state.drag,"data-loading":t.$store.state.isLoading,"data-language":t.language,"data-language-default":t.defaultLanguage,"data-role":t.role,"data-translation":t.$translation.code,"data-user":t.user,dir:t.$translation.direction}},[t._t("default"),t.$store.state.dialog&&t.$store.state.dialog.props?[n("k-fiber-dialog",t._b({},"k-fiber-dialog",t.dialog,!1))]:t._e(),!1!==t.$store.state.fatal?n("k-fatal",{attrs:{html:t.$store.state.fatal}}):t._e(),!1===t.$system.isLocal?n("k-offline-warning"):t._e(),n("k-icons")],2)}),[],!1,wc,null,null,null);function wc(t){for(let e in _c)this[e]=_c[e]}var Sc=function(){return xc.exports}();const Cc={};var Oc=Ft({props:{reports:Array,size:{type:String,default:"large"}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("dl",{staticClass:"k-stats",attrs:{"data-size":t.size}},t._l(t.reports,(function(e,i){return n(e.link?"k-link":"div",{key:i,tag:"component",staticClass:"k-stat",attrs:{"data-theme":e.theme,"data-click":!!e.click,to:e.link},on:{click:function(t){e.click&&e.click()}}},[n("dt",{staticClass:"k-stat-label"},[t._v(t._s(e.label))]),n("dd",{staticClass:"k-stat-value"},[t._v(t._s(e.value))]),n("dd",{staticClass:"k-stat-info"},[t._v(t._s(e.info))])])})),1)}),[],!1,Ec,null,null,null);function Ec(t){for(let e in Cc)this[e]=Cc[e]}var Ac=function(){return Oc.exports}();const Tc={inheritAttrs:!1,props:{columns:Object,disabled:Boolean,fields:{type:Object,default:()=>({})},empty:String,index:{type:[Number,Boolean],default:1},rows:Array,options:[Array,Function],sortable:Boolean},data(){return{values:this.rows}},computed:{columnsCount(){return Object.keys(this.columns).length},dragOptions(){return{disabled:!this.sortable,fallbackClass:"k-table-row-fallback",ghostClass:"k-table-row-ghost"}},hasIndexColumn(){return this.sortable||!1!==this.index},hasOptions(){return this.options||Object.values(this.values).filter((t=>t.options)).length>0}},watch:{rows(){this.values=this.rows}},methods:{isColumnEmpty(t){return 0===this.rows.filter((e=>!1===this.$helper.object.isEmpty(e[t]))).length},label(t,e){return t.label||this.$helper.string.ucfirst(e)},onChange(t){this.$emit("change",t)},onCell(t){this.$emit("cell",t)},onCellUpdate({columnIndex:t,rowIndex:e,value:n}){this.values[e][t]=n,this.$emit("input",this.values)},onHeader(t){this.$emit("header",t)},onOption(t,e,n){this.$emit("option",t,e,n)},onSort(){this.$emit("input",this.values),this.$emit("sort",this.values)},width(t){return"string"!=typeof t?"auto":!1===t.includes("/")?t:this.$helper.ratio(t,"auto",!1)}}},Ic={};var Mc=Ft(Tc,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("table",{staticClass:"k-table",attrs:{"data-disabled":t.disabled,"data-indexed":t.hasIndexColumn}},[n("thead",[n("tr",[t.hasIndexColumn?n("th",{staticClass:"k-table-index-column",attrs:{"data-mobile":""}},[t._v(" # ")]):t._e(),t._l(t.columns,(function(e,i){return n("th",{key:i+"-header",staticClass:"k-table-column",style:"width:"+t.width(e.width),attrs:{"data-mobile":e.mobile},on:{click:function(n){return t.onHeader({column:e,columnIndex:i})}}},[t._t("header",(function(){return[t._v(" "+t._s(t.label(e,i))+" ")]}),null,{column:e,columnIndex:i,label:t.label(e,i)})],2)})),t.hasOptions?n("th",{staticClass:"k-table-options-column",attrs:{"data-mobile":""}}):t._e()],2)]),n("k-draggable",{attrs:{list:t.values,options:t.dragOptions,handle:!0,element:"tbody"},on:{change:t.onChange,end:t.onSort}},[0===t.rows.length?n("tr",[n("td",{staticClass:"k-table-empty",attrs:{colspan:t.columnsCount}},[t._v(" "+t._s(t.empty)+" ")])]):t._l(t.values,(function(e,i){return n("tr",{key:i},[t.hasIndexColumn?n("td",{staticClass:"k-table-index-column",attrs:{"data-sortable":t.sortable&&!1!==e.sortable,"data-mobile":""}},[t._t("index",(function(){return[n("div",{staticClass:"k-table-index",domProps:{textContent:t._s(t.index+i)}})]}),null,{row:e,rowIndex:i}),t.sortable&&!1!==e.sortable?n("k-sort-handle",{staticClass:"k-table-sort-handle"}):t._e()],2):t._e(),t._l(t.columns,(function(s,o){return n("k-table-cell",{key:i+"-"+o,staticClass:"k-table-column",style:"width:"+t.width(s.width),attrs:{column:s,field:t.fields[o],row:e,mobile:s.mobile,value:e[o]},on:{input:function(e){return t.onCellUpdate({columnIndex:o,rowIndex:i,value:e})}},nativeOn:{click:function(n){return t.onCell({row:e,rowIndex:i,column:s,columnIndex:o})}}})})),t.hasOptions?n("td",{staticClass:"k-table-options-column",attrs:{"data-mobile":""}},[t._t("options",(function(){return[n("k-options-dropdown",{attrs:{options:e.options||t.options,text:(e.options||t.options).length>1},on:{option:function(n){return t.onOption(n,e,i)}}})]}),null,{row:e,rowIndex:i,options:t.options})],2):t._e()],2)}))],2)],1)}),[],!1,Lc,null,null,null);function Lc(t){for(let e in Ic)this[e]=Ic[e]}var jc=function(){return Mc.exports}();const Dc={inheritAttrs:!1,props:{column:Object,field:Object,mobile:{type:Boolean,default:!1},row:Object,value:{default:""}},computed:{component(){return this.$helper.isComponent(`k-${this.type}-field-preview`)?`k-${this.type}-field-preview`:this.$helper.isComponent(`k-table-${this.type}-cell`)?`k-table-${this.type}-cell`:Array.isArray(this.value)?"k-array-field-preview":"k-text-field-preview"},type(){var t;return this.column.type||(null==(t=this.field)?void 0:t.type)}}},Bc={};var Pc=Ft(Dc,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("td",{attrs:{"data-align":t.column.align,"data-mobile":t.mobile}},[!1===t.$helper.object.isEmpty(t.value)?[n(t.component,{tag:"component",attrs:{column:t.column,field:t.field,row:t.row,value:t.value},on:{input:function(e){return t.$emit("input",e)}}})]:t._e()],2)}),[],!1,Nc,null,null,null);function Nc(t){for(let e in Bc)this[e]=Bc[e]}var qc=function(){return Pc.exports}();const Fc={};var Rc=Ft({props:{tab:String,tabs:Array,theme:String},data(){return{size:null,visibleTabs:this.tabs,invisibleTabs:[]}},computed:{current(){return(this.tabs.find((t=>t.name===this.tab))||this.tabs[0]||{}).name}},watch:{tabs:{handler(t){this.visibleTabs=t,this.invisibleTabs=[],this.resize(!0)},immediate:!0}},created(){window.addEventListener("resize",this.resize)},destroyed(){window.removeEventListener("resize",this.resize)},methods:{resize(t){if(this.tabs&&!(this.tabs.length<=1)){if(this.tabs.length<=3)return this.visibleTabs=this.tabs,void(this.invisibleTabs=[]);if(window.innerWidth>=700){if("large"===this.size&&!t)return;this.visibleTabs=this.tabs,this.invisibleTabs=[],this.size="large"}else{if("small"===this.size&&!t)return;this.visibleTabs=this.tabs.slice(0,2),this.invisibleTabs=this.tabs.slice(2),this.size="small"}}}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.tabs&&t.tabs.length>1?n("div",{staticClass:"k-tabs",attrs:{"data-theme":t.theme}},[n("nav",[t._l(t.visibleTabs,(function(e){return n("k-button",{key:e.name,staticClass:"k-tab-button",attrs:{link:e.link,current:t.current===e.name,icon:e.icon,tooltip:e.label}},[t._v(" "+t._s(e.label||e.text||e.name)+" "),e.badge?n("span",{staticClass:"k-tabs-badge"},[t._v(" "+t._s(e.badge)+" ")]):t._e()])})),t.invisibleTabs.length?n("k-button",{staticClass:"k-tab-button k-tabs-dropdown-button",attrs:{text:t.$t("more"),icon:"dots"},on:{click:function(e){return e.stopPropagation(),t.$refs.more.toggle()}}}):t._e()],2),t.invisibleTabs.length?n("k-dropdown-content",{ref:"more",staticClass:"k-tabs-dropdown",attrs:{align:"right"}},t._l(t.invisibleTabs,(function(e){return n("k-dropdown-item",{key:"more-"+e.name,attrs:{link:e.link,current:t.tab===e.name,icon:e.icon,tooltip:e.label}},[t._v(" "+t._s(e.label||e.text||e.name)+" ")])})),1):t._e()],1):t._e()}),[],!1,zc,null,null,null);function zc(t){for(let e in Fc)this[e]=Fc[e]}var Yc=function(){return Rc.exports}();const Hc={};var Uc=Ft({props:{align:String}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{staticClass:"k-view",attrs:{"data-align":t.align}},[t._t("default")],2)}),[],!1,Kc,null,null,null);function Kc(t){for(let e in Hc)this[e]=Hc[e]}var Jc=function(){return Uc.exports}();const Gc={components:{draggable:J},props:{data:Object,element:String,handle:[String,Boolean],list:[Array,Object],move:Function,options:Object},data(){return{listeners:l(a({},this.$listeners),{start:t=>{this.$store.dispatch("drag",{}),this.$listeners.start&&this.$listeners.start(t)},end:t=>{this.$store.dispatch("drag",null),this.$listeners.end&&this.$listeners.end(t)}})}},computed:{dragOptions(){let t=!1;return t=!0===this.handle?".k-sort-handle":this.handle,a({fallbackClass:"k-sortable-fallback",fallbackOnBody:!0,forceFallback:!0,ghostClass:"k-sortable-ghost",handle:t,scroll:document.querySelector(".k-panel-view")},this.options)}}},Vc={};var Wc=Ft(Gc,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("draggable",t._g(t._b({staticClass:"k-draggable",attrs:{"component-data":t.data,tag:t.element,list:t.list,move:t.move},scopedSlots:t._u([{key:"footer",fn:function(){return[t._t("footer")]},proxy:!0}],null,!0)},"draggable",t.dragOptions,!1),t.listeners),[t._t("default")],2)}),[],!1,Xc,null,null,null);function Xc(t){for(let e in Vc)this[e]=Vc[e]}var Zc=function(){return Wc.exports}();const Qc={};var td=Ft({data:()=>({error:null}),errorCaptured(t){return this.$config.debug&&window.console.warn(t),this.error=t,!1},render(t){return this.error?this.$slots.error?this.$slots.error[0]:this.$scopedSlots.error?this.$scopedSlots.error({error:this.error}):t("k-box",{attrs:{theme:"negative"}},this.error.message||this.error):this.$slots.default[0]}},undefined,undefined,!1,ed,null,null,null);function ed(t){for(let e in Qc)this[e]=Qc[e]}var nd=function(){return td.exports}();const id={};var sd=Ft({props:{html:String},mounted(){try{let t=this.$refs.iframe.contentWindow.document;t.open(),t.write(this.html),t.close()}catch(t){console.error(t)}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-fatal"},[n("div",{staticClass:"k-fatal-box"},[n("k-bar",{scopedSlots:t._u([{key:"left",fn:function(){return[n("k-headline",[t._v(" The JSON response could not be parsed ")])]},proxy:!0},{key:"right",fn:function(){return[n("k-button",{attrs:{icon:"cancel",text:"Close"},on:{click:function(e){return t.$store.dispatch("fatal",!1)}}})]},proxy:!0}])}),n("iframe",{ref:"iframe",staticClass:"k-fatal-iframe"})],1)])}),[],!1,od,null,null,null);function od(t){for(let e in id)this[e]=id[e]}var rd=function(){return sd.exports}();const ad={};var ld=Ft({props:{link:String,size:{type:String},tag:{type:String,default:"h2"},theme:{type:String}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n(t.tag,t._g({tag:"component",staticClass:"k-headline",attrs:{"data-theme":t.theme,"data-size":t.size}},t.$listeners),[t.link?n("k-link",{attrs:{to:t.link}},[t._t("default")],2):t._t("default")],2)}),[],!1,ud,null,null,null);function ud(t){for(let e in ad)this[e]=ad[e]}var cd=function(){return ld.exports}();const dd={};var pd=Ft({props:{alt:String,color:String,back:String,size:String,type:String},computed:{isEmoji(){return this.$helper.string.hasEmoji(this.type)}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{class:"k-icon k-icon-"+t.type,style:{background:t.$helper.color(t.back)},attrs:{"aria-label":t.alt,role:t.alt?"img":null,"aria-hidden":!t.alt,"data-back":t.back,"data-size":t.size}},[t.isEmoji?n("span",{staticClass:"k-icon-emoji"},[t._v(t._s(t.type))]):n("svg",{style:{color:t.$helper.color(t.color)},attrs:{viewBox:"0 0 16 16"}},[n("use",{attrs:{"xlink:href":"#icon-"+t.type}})])])}),[],!1,hd,null,null,null);function hd(t){for(let e in dd)this[e]=dd[e]}var fd=function(){return pd.exports}(),md=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("svg",{staticClass:"k-icons",attrs:{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",overflow:"hidden"}},[n("defs",t._l(t.$options.icons,(function(e,i){return n("symbol",{key:i,attrs:{id:"icon-"+i,viewBox:"0 0 16 16"},domProps:{innerHTML:t._s(e)}})})),0)])},gd=[];const kd={icons:window.panel.plugins.icons},vd={};var bd=Ft(kd,md,gd,!1,yd,null,null,null);function yd(t){for(let e in vd)this[e]=vd[e]}var $d=function(){return bd.exports}();const _d={props:{alt:String,back:String,cover:Boolean,ratio:String,sizes:String,src:String,srcset:String},data:()=>({loaded:{type:Boolean,default:!1},error:{type:Boolean,default:!1}}),computed:{ratioPadding(){return this.$helper.ratio(this.ratio||"1/1")}},created(){let t=new Image;t.onload=()=>{this.loaded=!0,this.$emit("load")},t.onerror=()=>{this.error=!0,this.$emit("error")},t.src=this.src}},xd={};var wd=Ft(_d,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",t._g({staticClass:"k-image",attrs:{"data-ratio":t.ratio,"data-back":t.back,"data-cover":t.cover}},t.$listeners),[n("span",{style:"padding-bottom:"+t.ratioPadding},[t.loaded?n("img",{key:t.src,attrs:{alt:t.alt||"",src:t.src,srcset:t.srcset,sizes:t.sizes},on:{dragstart:function(t){t.preventDefault()}}}):t._e(),t.loaded||t.error?t._e():n("k-loader",{attrs:{position:"center",theme:"light"}}),!t.loaded&&t.error?n("k-icon",{staticClass:"k-image-error",attrs:{type:"cancel"}}):t._e()],1)])}),[],!1,Sd,null,null,null);function Sd(t){for(let e in xd)this[e]=xd[e]}var Cd=function(){return wd.exports}();const Od={};var Ed=Ft({},(function(){var t=this.$createElement,e=this._self._c||t;return e("span",{staticClass:"k-loader"},[e("k-icon",{staticClass:"k-loader-icon",attrs:{type:"loader"}})],1)}),[],!1,Ad,null,null,null);function Ad(t){for(let e in Od)this[e]=Od[e]}var Td=function(){return Ed.exports}();const Id={};var Md=Ft({data:()=>({offline:!1}),created(){this.$events.$on("offline",this.isOffline),this.$events.$on("online",this.isOnline)},destroyed(){this.$events.$off("offline",this.isOffline),this.$events.$off("online",this.isOnline)},methods:{isOnline(){this.offline=!1},isOffline(){this.offline=!0}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.offline?n("div",{staticClass:"k-offline-warning"},[n("p",[n("k-icon",{attrs:{type:"bolt"}}),t._v(" "+t._s(t.$t("error.offline")))],1)]):t._e()}),[],!1,Ld,null,null,null);function Ld(t){for(let e in Id)this[e]=Id[e]}var jd=function(){return Md.exports}();const Dd=(t,e=!1)=>{if(t>=0&&t<=100)return!0;if(e)throw new Error("value has to be between 0 and 100");return!1},Bd={};var Pd=Ft({props:{value:{type:Number,default:0,validator:Dd}},data(){return{state:this.value}},watch:{value(t){this.state=t}},methods:{set(t){Dd(t,!0),this.state=t}}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("progress",{staticClass:"k-progress",attrs:{max:"100"},domProps:{value:t.state}},[t._v(t._s(t.state)+"%")])}),[],!1,Nd,null,null,null);function Nd(t){for(let e in Bd)this[e]=Bd[e]}var qd=function(){return Pd.exports}();const Fd={};var Rd=Ft({},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-registration"},[n("p",[t._v(t._s(t.$t("license.unregistered")))]),n("k-button",{staticClass:"k-topbar-button",attrs:{responsive:!0,tooltip:t.$t("license.unregistered"),icon:"key"},on:{click:function(e){return t.$dialog("registration")}}},[t._v(" "+t._s(t.$t("license.register"))+" ")]),n("k-button",{staticClass:"k-topbar-button",attrs:{responsive:!0,link:"https://getkirby.com/buy",target:"_blank",icon:"cart"}},[t._v(" "+t._s(t.$t("license.buy"))+" ")])],1)}),[],!1,zd,null,null,null);function zd(t){for(let e in Fd)this[e]=Fd[e]}var Yd=function(){return Rd.exports}();const Hd={};var Ud=Ft({props:{icon:{type:String,default:"sort"}}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("k-icon",{staticClass:"k-sort-handle",attrs:{type:t.icon,"aria-hidden":"true"}})}),[],!1,Kd,null,null,null);function Kd(t){for(let e in Hd)this[e]=Hd[e]}var Jd=function(){return Ud.exports}();const Gd={props:{click:{type:Function,default:()=>{}},disabled:Boolean,responsive:Boolean,status:String,text:String,tooltip:String},computed:{icon(){return"draft"===this.status?"circle-outline":"unlisted"===this.status?"circle-half":"circle"},theme(){return"draft"===this.status?"negative":"unlisted"===this.status?"info":"positive"},title(){let t=this.tooltip||this.text;return this.disabled&&(t+=` (${this.$t("disabled")})`),t}},methods:{onClick(){this.click(),this.$emit("click")}}},Vd={};var Wd=Ft(Gd,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("k-button",{class:"k-status-icon k-status-icon-"+t.status,attrs:{disabled:t.disabled,icon:t.icon,responsive:t.responsive,text:t.text,theme:t.theme,tooltip:t.title},on:{click:t.onClick}})}),[],!1,Xd,null,null,null);function Xd(t){for(let e in Vd)this[e]=Vd[e]}var Zd=function(){return Wd.exports}();const Qd={};var tp=Ft({props:{align:String,size:String,theme:String}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{staticClass:"k-text",attrs:{"data-align":t.align,"data-size":t.size,"data-theme":t.theme}},[t._t("default")],2)}),[],!1,ep,null,null,null);function ep(t){for(let e in Qd)this[e]=Qd[e]}var np=function(){return tp.exports}();const ip={};var sp=Ft({props:{user:[Object,String]}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-user-info"},[t.user.avatar?n("k-image",{attrs:{cover:!0,src:t.user.avatar.url,ratio:"1/1"}}):n("k-icon",{attrs:{type:"user"}}),t._v(" "+t._s(t.user.name||t.user.email||t.user)+" ")],1)}),[],!1,op,null,null,null);function op(t){for(let e in ip)this[e]=ip[e]}var rp=function(){return sp.exports}();const ap={};var lp=Ft({props:{crumbs:{type:Array,default:()=>[]},label:{type:String,default:"Breadcrumb"},view:Object},computed:{dropdown(){return this.segments.map((t=>l(a({},t),{text:t.label,icon:"angle-right"})))},segments(){return[{link:this.view.link,label:this.view.breadcrumbLabel,icon:this.view.icon,loading:this.$store.state.isLoading},...this.crumbs]}},methods:{isLast(t){return this.crumbs.length-1===t}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("nav",{staticClass:"k-breadcrumb",attrs:{"aria-label":t.label}},[n("k-dropdown",{staticClass:"k-breadcrumb-dropdown"},[n("k-button",{attrs:{icon:"road-sign"},on:{click:function(e){return t.$refs.dropdown.toggle()}}}),n("k-dropdown-content",{ref:"dropdown",attrs:{options:t.dropdown,theme:"light"}})],1),n("ol",t._l(t.segments,(function(e,i){return n("li",{key:i},[n("k-link",{staticClass:"k-breadcrumb-link",attrs:{title:e.text||e.label,to:e.link,"aria-current":!!t.isLast(i)&&"page"}},[e.loading?n("k-loader",{staticClass:"k-breadcrumb-icon"}):e.icon?n("k-icon",{staticClass:"k-breadcrumb-icon",attrs:{type:e.icon}}):t._e(),n("span",{staticClass:"k-breadcrumb-link-text"},[t._v(" "+t._s(e.text||e.label)+" ")])],1)],1)})),0)],1)}),[],!1,up,null,null,null);function up(t){for(let e in ap)this[e]=ap[e]}var cp=function(){return lp.exports}();const dp={inheritAttrs:!1,props:{autofocus:Boolean,click:Function,current:[String,Boolean],disabled:Boolean,icon:String,id:[String,Number],link:String,responsive:Boolean,rel:String,role:String,target:String,tabindex:String,text:[String,Number],theme:String,tooltip:String,type:{type:String,default:"button"}},computed:{component(){return!0===this.disabled?"k-button-disabled":this.link?"k-button-link":"k-button-native"}},methods:{focus(){this.$refs.button.focus&&this.$refs.button.focus()},tab(){this.$refs.button.tab&&this.$refs.button.tab()},untab(){this.$refs.button.untab&&this.$refs.button.untab()}}},pp={};var hp=Ft(dp,(function(){var t=this,e=t.$createElement;return(t._self._c||e)(t.component,t._g(t._b({ref:"button",tag:"component"},"component",t.$props,!1),t.$listeners),[t.text?[t._v(" "+t._s(t.text)+" ")]:t._t("default")],2)}),[],!1,fp,null,null,null);function fp(t){for(let e in pp)this[e]=pp[e]}var mp=function(){return hp.exports}();const gp={inheritAttrs:!1,props:{icon:String,id:[String,Number],responsive:Boolean,theme:String,tooltip:String}},kp={};var vp=Ft(gp,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{staticClass:"k-button",attrs:{id:t.id,"data-disabled":!0,"data-responsive":t.responsive,"data-theme":t.theme,title:t.tooltip}},[t.icon?n("k-icon",{staticClass:"k-button-icon",attrs:{type:t.icon,alt:t.tooltip}}):t._e(),t.$slots.default?n("span",{staticClass:"k-button-text"},[t._t("default")],2):t._e()],1)}),[],!1,bp,null,null,null);function bp(t){for(let e in kp)this[e]=kp[e]}var yp=function(){return vp.exports}();const $p={};var _p=Ft({props:{buttons:Array}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-button-group"},[t.$slots.default?t._t("default"):t._l(t.buttons,(function(e,i){return n("k-button",t._b({key:i},"k-button",e,!1))}))],2)}),[],!1,xp,null,null,null);function xp(t){for(let e in $p)this[e]=$p[e]}var wp=function(){return _p.exports}();const Sp={inheritAttrs:!1,props:{autofocus:Boolean,current:[String,Boolean],icon:String,id:[String,Number],link:String,rel:String,responsive:Boolean,role:String,target:String,tabindex:String,theme:String,tooltip:String},methods:{focus(){this.$el.focus()}}},Cp={};var Op=Ft(Sp,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-link",t._g({staticClass:"k-button",attrs:{id:t.id,"aria-current":t.current,autofocus:t.autofocus,"data-theme":t.theme,"data-responsive":t.responsive,rel:t.rel,role:t.role,tabindex:t.tabindex,target:t.target,title:t.tooltip,to:t.link}},t.$listeners),[t.icon?n("k-icon",{staticClass:"k-button-icon",attrs:{type:t.icon,alt:t.tooltip}}):t._e(),t.$slots.default?n("span",{staticClass:"k-button-text"},[t._t("default")],2):t._e()],1)}),[],!1,Ep,null,null,null);function Ep(t){for(let e in Cp)this[e]=Cp[e]}var Ap=function(){return Op.exports}(),Tp={mounted(){this.$el.addEventListener("keyup",this.onTab,!0),this.$el.addEventListener("blur",this.onUntab,!0)},destroyed(){this.$el.removeEventListener("keyup",this.onTab,!0),this.$el.removeEventListener("blur",this.onUntab,!0)},methods:{focus(){this.$el.focus&&this.$el.focus()},onTab(t){9===t.keyCode&&this.$el.setAttribute("data-tabbed",!0)},onUntab(){this.$el.removeAttribute("data-tabbed")},tab(){this.$el.focus(),this.$el.setAttribute("data-tabbed",!0)},untab(){this.$el.removeAttribute("data-tabbed")}}};const Ip={mixins:[Tp],inheritAttrs:!1,props:{autofocus:Boolean,click:{type:Function,default:()=>{}},current:[String,Boolean],icon:String,id:[String,Number],responsive:Boolean,role:String,tabindex:String,theme:String,tooltip:String,type:{type:String,default:"button"}}},Mp={};var Lp=Ft(Ip,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("button",t._g({staticClass:"k-button",attrs:{id:t.id,"aria-current":t.current,autofocus:t.autofocus,"data-theme":t.theme,"data-responsive":t.responsive,role:t.role,tabindex:t.tabindex,title:t.tooltip,type:t.type},on:{click:t.click}},t.$listeners),[t.icon?n("k-icon",{staticClass:"k-button-icon",attrs:{type:t.icon,alt:t.tooltip}}):t._e(),t.$slots.default?n("span",{staticClass:"k-button-text"},[t._t("default")],2):t._e()],1)}),[],!1,jp,null,null,null);function jp(t){for(let e in Mp)this[e]=Mp[e]}var Dp=function(){return Lp.exports}();const Bp={};var Pp=Ft({},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("span",{staticClass:"k-dropdown",on:{click:function(t){t.stopPropagation()}}},[t._t("default")],2)}),[],!1,Np,null,null,null);function Np(t){for(let e in Bp)this[e]=Bp[e]}var qp=function(){return Pp.exports}();let Fp=null;const Rp={};var zp=Ft({props:{align:{type:String,default:"left"},options:[Array,Function,String],theme:{type:String,default:"dark"}},data:()=>({current:-1,dropup:!1,isOpen:!1,items:[]}),methods:{async fetchOptions(t){if(!this.options)return t(this.items);"string"==typeof this.options?this.$dropdown(this.options)(t):"function"==typeof this.options?this.options(t):Array.isArray(this.options)&&t(this.options)},onOptionClick(t){"function"==typeof t.click?t.click.call(this):t.click&&this.$emit("action",t.click)},open(){this.reset(),Fp&&Fp!==this&&Fp.close(),this.fetchOptions((t=>{this.$events.$on("keydown",this.navigate),this.$events.$on("click",this.close),this.items=t,this.isOpen=!0,Fp=this,this.onOpen(),this.$emit("open")}))},reset(){this.current=-1,this.$events.$off("keydown",this.navigate),this.$events.$off("click",this.close)},close(){this.reset(),this.isOpen=Fp=!1,this.$emit("close")},toggle(){this.isOpen?this.close():this.open()},focus(t=0){var e;(null==(e=this.$children[t])?void 0:e.focus)&&(this.current=t,this.$children[t].focus())},onOpen(){this.dropup=!1,this.$nextTick((()=>{if(this.$el){let t=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,e=50,n=this.$el.getBoundingClientRect().top||0,i=this.$el.clientHeight;n+i>t-e&&i+2*ethis.$children.length-1){const t=this.$children.filter((t=>!1===t.disabled));this.current=this.$children.indexOf(t[t.length-1]);break}if(this.$children[this.current]&&!1===this.$children[this.current].disabled){this.focus(this.current);break}}break;case"Tab":for(;;){if(this.current++,this.current>this.$children.length-1){this.close(),this.$emit("leave",t.code);break}if(this.$children[this.current]&&!1===this.$children[this.current].disabled)break}}}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.isOpen?n("div",{staticClass:"k-dropdown-content",attrs:{"data-align":t.align,"data-dropup":t.dropup,"data-theme":t.theme}},[t._t("default",(function(){return[t._l(t.items,(function(e,i){return["-"===e?n("hr",{key:t._uid+"-item-"+i}):n("k-dropdown-item",t._b({key:t._uid+"-item-"+i,ref:t._uid+"-item-"+i,refInFor:!0,on:{click:function(n){return t.onOptionClick(e)}}},"k-dropdown-item",e,!1),[t._v(" "+t._s(e.text)+" ")])]}))]}))],2):t._e()}),[],!1,Yp,null,null,null);function Yp(t){for(let e in Rp)this[e]=Rp[e]}var Hp=function(){return zp.exports}();const Up={inheritAttrs:!1,props:{disabled:Boolean,icon:String,image:[String,Object],link:String,target:String,theme:String,upload:String,current:[String,Boolean]},data(){return{listeners:l(a({},this.$listeners),{click:t=>{this.$parent.close(),this.$emit("click",t)}})}},methods:{focus(){this.$refs.button.focus()},tab(){this.$refs.button.tab()}}},Kp={};var Jp=Ft(Up,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("k-button",t._g(t._b({ref:"button",staticClass:"k-dropdown-item"},"k-button",t.$props,!1),t.listeners),[t._t("default")],2)}),[],!1,Gp,null,null,null);function Gp(t){for(let e in Kp)this[e]=Kp[e]}var Vp=function(){return Jp.exports}();const Wp={mixins:[Tp],props:{disabled:Boolean,rel:String,tabindex:[String,Number],target:String,title:String,to:[String,Function]},data(){return{relAttr:"_blank"===this.target?"noreferrer noopener":this.rel,listeners:l(a({},this.$listeners),{click:this.onClick})}},computed:{href(){return"function"==typeof this.to?"":"/"!==this.to[0]||this.target?!0===this.to.includes("@")&&!1===this.to.includes("/")?"mailto:"+this.to:this.to:this.$url(this.to)}},methods:{isRoutable(t){if(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)return!1;if(t.defaultPrevented)return!1;if(void 0!==t.button&&0!==t.button)return!1;if(this.target)return!1;if("string"==typeof this.href){if(this.href.includes("://")||this.href.startsWith("//"))return!1;if(this.href.includes("mailto:"))return!1}return!0},onClick(t){if(!0===this.disabled)return t.preventDefault(),!1;"function"==typeof this.to&&(t.preventDefault(),this.to()),this.isRoutable(t)&&(t.preventDefault(),this.$go(this.to)),this.$emit("click",t)}}},Xp={};var Zp=Ft(Wp,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.to&&!t.disabled?n("a",t._g({ref:"link",staticClass:"k-link",attrs:{href:t.href,rel:t.relAttr,tabindex:t.tabindex,target:t.target,title:t.title}},t.listeners),[t._t("default")],2):n("span",{staticClass:"k-link",attrs:{title:t.title,"data-disabled":""}},[t._t("default")],2)}),[],!1,Qp,null,null,null);function Qp(t){for(let e in Xp)this[e]=Xp[e]}var th=function(){return Zp.exports}();const eh={};var nh=Ft({computed:{defaultLanguage(){return this.$languages.find((t=>!0===t.default))},language(){return this.$language},languages(){return this.$languages.filter((t=>!1===t.default))}},methods:{change(t){this.$emit("change",t),this.$go(window.location,{query:{language:t.code}})}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.languages.length?n("k-dropdown",{staticClass:"k-languages-dropdown"},[n("k-button",{attrs:{text:t.language.name,responsive:!0,icon:"globe"},on:{click:function(e){return t.$refs.languages.toggle()}}}),t.languages?n("k-dropdown-content",{ref:"languages"},[n("k-dropdown-item",{on:{click:function(e){return t.change(t.defaultLanguage)}}},[t._v(" "+t._s(t.defaultLanguage.name)+" ")]),n("hr"),t._l(t.languages,(function(e){return n("k-dropdown-item",{key:e.code,on:{click:function(n){return t.change(e)}}},[t._v(" "+t._s(e.name)+" ")])}))],2):t._e()],1):t._e()}),[],!1,ih,null,null,null);function ih(t){for(let e in eh)this[e]=eh[e]}var sh=function(){return nh.exports}();const oh={props:{align:{type:String,default:"right"},icon:{type:String,default:"dots"},options:{type:[Array,Function,String],default:()=>[]},text:{type:[Boolean,String],default:!0},theme:{type:String,default:"dark"}},computed:{hasSingleOption(){return Array.isArray(this.options)&&1===this.options.length}},methods:{onAction(t,e,n){this.$emit("action",t,e,n),this.$emit("option",t,e,n)},toggle(){this.$refs.options.toggle()}}},rh={};var ah=Ft(oh,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.hasSingleOption?n("k-button",{staticClass:"k-options-dropdown-toggle",attrs:{icon:t.options[0].icon||t.icon,tooltip:t.options[0].tooltip||t.options[0].text},on:{click:function(e){return t.onAction(t.options[0].option||t.options[0].click,t.options[0],0)}}},[!0===t.text?[t._v(" "+t._s(t.options[0].text)+" ")]:!1!==t.text?[t._v(" "+t._s(t.text)+" ")]:t._e()],2):t.options.length?n("k-dropdown",{staticClass:"k-options-dropdown"},[n("k-button",{staticClass:"k-options-dropdown-toggle",attrs:{icon:t.icon,tooltip:t.$t("options")},on:{click:function(e){return t.$refs.options.toggle()}}},[t.text&&!0!==t.text?[t._v(" "+t._s(t.text)+" ")]:t._e()],2),n("k-dropdown-content",{ref:"options",staticClass:"k-options-dropdown-content",attrs:{align:t.align,options:t.options},on:{action:t.onAction}})],1):t._e()}),[],!1,lh,null,null,null);function lh(t){for(let e in rh)this[e]=rh[e]}var uh=function(){return ah.exports}();const ch={props:{align:{type:String,default:"left"},details:{type:Boolean,default:!1},dropdown:{type:Boolean,default:!0},keys:{type:Boolean,default:!1},limit:{type:Number,default:10},page:{type:Number,default:1},pageLabel:{type:String,default:()=>window.panel.$t("pagination.page")},total:{type:Number,default:0},prevLabel:{type:String,default:()=>window.panel.$t("prev")},nextLabel:{type:String,default:()=>window.panel.$t("next")},validate:{type:Function,default:()=>Promise.resolve()}},data(){return{currentPage:this.page}},computed:{show(){return this.pages>1},start(){return(this.currentPage-1)*this.limit+1},end(){let t=this.start-1+this.limit;return t>this.total?this.total:t},detailsText(){return 1===this.limit?this.start+" / ":this.start+"-"+this.end+" / "},pages(){return Math.ceil(this.total/this.limit)},hasPrev(){return this.start>1},hasNext(){return this.endthis.limit},offset(){return this.start-1}},watch:{page(t){this.currentPage=parseInt(t)}},created(){!0===this.keys&&window.addEventListener("keydown",this.navigate,!1)},destroyed(){window.removeEventListener("keydown",this.navigate,!1)},methods:{async goTo(t){try{await this.validate(t),t<1&&(t=1),t>this.pages&&(t=this.pages),this.currentPage=t,this.$refs.dropdown&&this.$refs.dropdown.close(),this.$emit("paginate",{page:this.currentPage,start:this.start,end:this.end,limit:this.limit,offset:this.offset})}catch(e){}},prev(){this.goTo(this.currentPage-1)},next(){this.goTo(this.currentPage+1)},navigate(t){switch(t.code){case"ArrowLeft":this.prev();break;case"ArrowRight":this.next()}}}},dh={};var ph=Ft(ch,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.show?n("nav",{staticClass:"k-pagination",attrs:{"data-align":t.align}},[t.show?n("k-button",{attrs:{disabled:!t.hasPrev,tooltip:t.prevLabel,icon:"angle-left"},on:{click:t.prev}}):t._e(),t.details?[t.dropdown?[n("k-dropdown",[n("k-button",{staticClass:"k-pagination-details",attrs:{disabled:!t.hasPages},on:{click:function(e){return t.$refs.dropdown.toggle()}}},[t.total>1?[t._v(" "+t._s(t.detailsText)+" ")]:t._e(),t._v(" "+t._s(t.total)+" ")],2),n("k-dropdown-content",{ref:"dropdown",staticClass:"k-pagination-selector",on:{open:function(e){t.$nextTick((function(){return t.$refs.page.focus()}))}}},[n("div",{staticClass:"k-pagination-settings"},[n("label",{attrs:{for:"k-pagination-page"}},[n("span",[t._v(t._s(t.pageLabel)+":")]),n("select",{ref:"page",attrs:{id:"k-pagination-page"}},t._l(t.pages,(function(e){return n("option",{key:e,domProps:{selected:t.page===e,value:e}},[t._v(" "+t._s(e)+" ")])})),0)]),n("k-button",{attrs:{icon:"check"},on:{click:function(e){return t.goTo(t.$refs.page.value)}}})],1)])],1)]:[n("span",{staticClass:"k-pagination-details"},[t.total>1?[t._v(" "+t._s(t.detailsText)+" ")]:t._e(),t._v(" "+t._s(t.total)+" ")],2)]]:t._e(),t.show?n("k-button",{attrs:{disabled:!t.hasNext,tooltip:t.nextLabel,icon:"angle-right"},on:{click:t.next}}):t._e()],2):t._e()}),[],!1,hh,null,null,null);function hh(t){for(let e in dh)this[e]=dh[e]}var fh=function(){return ph.exports}();const mh={props:{prev:{type:[Boolean,Object],default:!1},next:{type:[Boolean,Object],default:!1}},computed:{buttons(){return[l(a({},this.button(this.prev)),{icon:"angle-left"}),l(a({},this.button(this.next)),{icon:"angle-right"})]}},methods:{button:t=>t||{disabled:!0,link:"#"}}},gh={};var kh=Ft(mh,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("k-button-group",{staticClass:"k-prev-next",attrs:{buttons:t.buttons}})}),[],!1,vh,null,null,null);function vh(t){for(let e in gh)this[e]=gh[e]}var bh=function(){return kh.exports}();const yh={};var $h=Ft({props:{types:{type:Object,default:()=>({})},type:String},data(){return{isLoading:!1,hasResults:!0,items:[],currentType:this.getType(this.type),q:null,selected:-1}},watch:{q(t,e){t!==e&&this.search(this.q)},currentType(t,e){t!==e&&this.search(this.q)},type(){this.currentType=this.getType(this.type)}},created(){this.search=$t(this.search,250),this.$events.$on("keydown.cmd.shift.f",this.open)},destroyed(){this.$events.$off("keydown.cmd.shift.f",this.open)},methods:{changeType(t){this.currentType=this.getType(t),this.$nextTick((()=>{this.$refs.input.focus()}))},close(){this.$refs.overlay.close(),this.hasResults=!0,this.items=[],this.q=null},getType(t){return this.types[t]||this.types[Object.keys(this.types)[0]]},navigate(t){this.$go(t.link),this.close()},onDown(){this.selected=0&&this.select(this.selected-1)},open(){this.$refs.overlay.open()},async search(t){this.isLoading=!0,this.$refs.types&&this.$refs.types.close();try{if(null===t||""===t)throw Error("Empty query");const e=await this.$search(this.currentType.id,t);if(!1===e)throw Error("JSON parsing failed");this.items=e.results}catch(e){this.items=[]}finally{this.select(-1),this.isLoading=!1,this.hasResults=this.items.length>0}},select(t){if(this.selected=t,this.$refs.items){const e=this.$refs.items.$el.querySelectorAll(".k-item");[...e].forEach((t=>delete t.dataset.selected)),t>=0&&(e[t].dataset.selected=!0)}}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-overlay",{ref:"overlay"},[n("div",{staticClass:"k-search",attrs:{role:"search"}},[n("div",{staticClass:"k-search-input"},[n("k-dropdown",{staticClass:"k-search-types"},[n("k-button",{attrs:{icon:t.currentType.icon,text:t.currentType.label},on:{click:function(e){return t.$refs.types.toggle()}}}),n("k-dropdown-content",{ref:"types"},t._l(t.types,(function(e,i){return n("k-dropdown-item",{key:i,attrs:{icon:e.icon},on:{click:function(e){return t.changeType(i)}}},[t._v(" "+t._s(e.label)+" ")])})),1)],1),n("input",{directives:[{name:"model",rawName:"v-model",value:t.q,expression:"q"}],ref:"input",attrs:{placeholder:t.$t("search")+" …","aria-label":t.$t("search"),autofocus:!0,type:"text"},domProps:{value:t.q},on:{input:[function(e){e.target.composing||(t.q=e.target.value)},function(e){t.hasResults=!0}],keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"])?null:(e.preventDefault(),t.onDown.apply(null,arguments))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"up",38,e.key,["Up","ArrowUp"])?null:(e.preventDefault(),t.onUp.apply(null,arguments))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"tab",9,e.key,"Tab")?null:(e.preventDefault(),t.onTab.apply(null,arguments))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.onEnter.apply(null,arguments)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close.apply(null,arguments)}]}}),n("k-button",{staticClass:"k-search-close",attrs:{icon:t.isLoading?"loader":"cancel",tooltip:t.$t("close")},on:{click:t.close}})],1),!t.q||t.hasResults&&!t.items.length?t._e():n("div",{staticClass:"k-search-results"},[t.items.length?n("k-collection",{ref:"items",attrs:{items:t.items},on:{hover:t.onHover},nativeOn:{mouseout:function(e){return t.select(-1)}}}):t.hasResults?t._e():n("p",{staticClass:"k-search-empty"},[t._v(" "+t._s(t.$t("search.results.none"))+" ")])],1)])])}),[],!1,_h,null,null,null);function _h(t){for(let e in yh)this[e]=yh[e]}var xh=function(){return $h.exports}();const wh={props:{removable:Boolean},methods:{remove(){this.removable&&this.$emit("remove")},focus(){this.$refs.button.focus()}}},Sh={};var Ch=Ft(wh,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{ref:"button",staticClass:"k-tag",attrs:{tabindex:"0"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"delete",[8,46],e.key,["Backspace","Delete","Del"])?null:(e.preventDefault(),t.remove.apply(null,arguments))}}},[n("span",{staticClass:"k-tag-text"},[t._t("default")],2),t.removable?n("k-icon",{staticClass:"k-tag-toggle",attrs:{type:"cancel-small"},nativeOn:{click:function(e){return t.remove.apply(null,arguments)}}}):t._e()],1)}),[],!1,Oh,null,null,null);function Oh(t){for(let e in Sh)this[e]=Sh[e]}var Eh=function(){return Ch.exports}();const Ah={props:{breadcrumb:Array,license:Boolean,menu:Array,title:String,view:Object},computed:{notification(){return this.$store.state.notification.type&&"error"!==this.$store.state.notification.type?this.$store.state.notification:null}}},Th={};var Ih=Ft(Ah,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-topbar"},[n("k-view",[n("div",{staticClass:"k-topbar-wrapper"},[n("k-dropdown",{staticClass:"k-topbar-menu"},[n("k-button",{staticClass:"k-topbar-button k-topbar-menu-button",attrs:{tooltip:t.$t("menu"),icon:"bars"},on:{click:function(e){return t.$refs.menu.toggle()}}},[n("k-icon",{attrs:{type:"angle-down"}})],1),n("k-dropdown-content",{ref:"menu",staticClass:"k-topbar-menu",attrs:{options:t.menu,theme:"light"}})],1),n("k-breadcrumb",{staticClass:"k-topbar-breadcrumb",attrs:{crumbs:t.breadcrumb,view:t.view}}),n("div",{staticClass:"k-topbar-signals"},[t.notification?n("k-button",{staticClass:"k-topbar-notification k-topbar-button",attrs:{text:t.notification.message,theme:"positive"},on:{click:function(e){return t.$store.dispatch("notification/close")}}}):t.license?t._e():n("k-registration"),n("k-form-indicator"),n("k-button",{staticClass:"k-topbar-button",attrs:{tooltip:t.$t("search"),icon:"search"},on:{click:function(e){return t.$refs.search.open()}}})],1)],1)]),n("k-search",{ref:"search",attrs:{type:t.$view.search||"pages",types:t.$searches}})],1)}),[],!1,Mh,null,null,null);function Mh(t){for(let e in Th)this[e]=Th[e]}var Lh=function(){return Ih.exports}();const jh={props:{empty:String,blueprint:String,lock:[Boolean,Object],parent:String,tab:Object},computed:{content(){return this.$store.getters["content/values"]()}},methods:{exists(t){return this.$helper.isComponent(`k-${t}-section`)},meetsCondition(t){if(!t.when)return!0;let e=!0;return Object.keys(t.when).forEach((n=>{this.content[n.toLowerCase()]!==t.when[n]&&(e=!1)})),e}}},Dh={};var Bh=Ft(jh,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return 0===t.tab.columns.length?n("k-box",{attrs:{html:!0,text:t.empty,theme:"info"}}):n("k-grid",{staticClass:"k-sections",attrs:{gutter:"large"}},t._l(t.tab.columns,(function(e,i){return n("k-column",{key:t.parent+"-column-"+i,attrs:{width:e.width,sticky:e.sticky}},[t._l(e.sections,(function(s,o){return[t.meetsCondition(s)?[t.exists(s.type)?n("k-"+s.type+"-section",t._b({key:t.parent+"-column-"+i+"-section-"+o+"-"+t.blueprint,tag:"component",class:"k-section k-section-name-"+s.name,attrs:{column:e.width,lock:t.lock,name:s.name,parent:t.parent,timestamp:t.$view.timestamp},on:{submit:function(e){return t.$emit("submit",e)}}},"component",s,!1)):[n("k-box",{key:t.parent+"-column-"+i+"-section-"+o,attrs:{text:t.$t("error.section.type.invalid",{type:s.type}),theme:"negative"}})]]:t._e()]}))],2)})),1)}),[],!1,Ph,null,null,null);function Ph(t){for(let e in Dh)this[e]=Dh[e]}var Nh=function(){return Bh.exports}();const qh={};var Fh=Ft({mixins:[Nt],inheritAttrs:!1,data:()=>({fields:{},isLoading:!0,issue:null}),computed:{values(){return this.$store.getters["content/values"]()}},watch:{timestamp(){this.fetch()}},created(){this.input=$t(this.input,50),this.fetch()},methods:{input(t,e,n){this.$store.dispatch("content/update",[n,t[n]])},async fetch(){try{const t=await this.load();this.fields=t.fields,Object.keys(this.fields).forEach((t=>{this.fields[t].section=this.name,this.fields[t].endpoints={field:this.parent+"/fields/"+t,section:this.parent+"/sections/"+this.name,model:this.parent}}))}catch(t){this.issue=t}finally{this.isLoading=!1}},onSubmit(t){this.$events.$emit("keydown.cmd.s",t)}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.isLoading?t._e():n("section",{staticClass:"k-fields-section"},[t.issue?[n("k-headline",{staticClass:"k-fields-issue-headline"},[t._v(" Error ")]),n("k-box",{attrs:{text:t.issue.message,html:!1,theme:"negative"}})]:t._e(),n("k-form",{attrs:{fields:t.fields,validate:!0,value:t.values,disabled:t.lock&&"lock"===t.lock.state},on:{input:t.input,submit:t.onSubmit}})],2)}),[],!1,Rh,null,null,null);function Rh(t){for(let e in qh)this[e]=qh[e]}var zh=function(){return Fh.exports}(),Yh=function(){var t=this,e=t.$createElement,n=t._self._c||e;return!1===t.isLoading?n("section",{class:`k-models-section k-${t.type}-section`,attrs:{"data-processing":t.isProcessing}},[n("header",{staticClass:"k-section-header"},[n("k-headline",{attrs:{link:t.options.link}},[t._v(" "+t._s(t.options.headline||" ")+" "),t.options.min?n("abbr",{attrs:{title:t.$t("section.required")}},[t._v("*")]):t._e()]),n("k-button-group",{attrs:{buttons:t.buttons}})],1),t.error?n("k-box",{attrs:{theme:"negative"}},[n("k-text",{attrs:{size:"small"}},[n("strong",[t._v(" "+t._s(t.$t("error.section.notLoaded",{name:t.name}))+": ")]),t._v(" "+t._s(t.error)+" ")])],1):[n("k-dropzone",{attrs:{disabled:!t.canDrop},on:{drop:t.onDrop}},[t.searching&&t.options.search?n("k-input",{staticClass:"k-models-section-search",attrs:{autofocus:!0,placeholder:t.$t("search")+" …",type:"text"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.onSearchToggle.apply(null,arguments)}},model:{value:t.searchterm,callback:function(e){t.searchterm=e},expression:"searchterm"}}):t._e(),n("k-collection",t._g(t._b({attrs:{"data-invalid":t.isInvalid},on:{action:t.onAction,change:t.onChange,sort:t.onSort,paginate:t.onPaginate}},"k-collection",t.collection,!1),t.canAdd?{empty:t.onAdd}:{}))],1),n("k-upload",{ref:"upload",on:{success:t.onUpload,error:t.reload}})]],2):t._e()},Hh=[];const Uh={inheritAttrs:!1,props:{blueprint:String,column:String,parent:String,name:String,timestamp:Number},data:()=>({data:[],error:null,isLoading:!1,isProcessing:!1,options:{columns:{},empty:null,headline:null,help:null,layout:"list",link:null,max:null,min:null,size:null,sortable:null},pagination:{page:null},searchterm:null,searching:!1}),computed:{addIcon:()=>"add",buttons(){let t=[];return this.canSearch&&t.push({icon:"filter",text:this.$t("search"),click:this.onSearchToggle,responsive:!0}),this.canAdd&&t.push({icon:this.addIcon,text:this.$t("add"),click:this.onAdd}),t},canAdd:()=>!0,canDrop:()=>!1,canSearch(){return this.options.search},collection(){return{columns:this.options.columns,empty:this.emptyPropsWithSearch,layout:this.options.layout,help:this.options.help,items:this.items,pagination:this.pagination,sortable:!this.isProcessing&&this.options.sortable,size:this.options.size}},emptyProps(){return{icon:"page",text:this.$t("pages.empty")}},emptyPropsWithSearch(){return l(a({},this.emptyProps),{text:this.searching?this.$t("search.results.none"):this.options.empty||this.emptyProps.text})},items(){return this.data},isInvalid(){var t;return!((null==(t=this.searchterm)?void 0:t.length)>0)&&(!!(this.options.min&&this.data.lengththis.options.max))},paginationId(){return"kirby$pagination$"+this.parent+"/"+this.name},type:()=>"models"},watch:{searchterm:$t((function(){this.pagination.page=0,this.reload()}),200),timestamp(){this.reload()}},created(){this.load()},methods:{async load(t){t||(this.isLoading=!0),this.isProcessing=!0,null===this.pagination.page&&(this.pagination.page=localStorage.getItem(this.paginationId)||1);try{const t=await this.$api.get(this.parent+"/sections/"+this.name,{page:this.pagination.page,searchterm:this.searchterm});this.options=t.options,this.pagination=t.pagination,this.data=t.data}catch(e){this.error=e.message}finally{this.isProcessing=!1,this.isLoading=!1}},onAction(){},onAdd(){},onChange(){},onDrop(){},onSort(){},onPaginate(t){localStorage.setItem(this.paginationId,t.page),this.pagination=t,this.reload()},onSearchToggle(){this.searching=!this.searching,this.searchterm=null},onUpload(){},async reload(){await this.load(!0)},update(){this.reload(),this.$events.$emit("model.update")}}},Kh={};var Jh=Ft(Uh,Yh,Hh,!1,Gh,null,null,null);function Gh(t){for(let e in Kh)this[e]=Kh[e]}var Vh=function(){return Jh.exports}();const Wh={};var Xh=Ft({extends:Vh,computed:{addIcon:()=>"upload",canAdd(){return this.$permissions.files.create&&!1!==this.options.upload},canDrop(){return!1!==this.canAdd},emptyProps(){return{icon:"image",text:this.$t("files.empty")}},items(){return this.data.map((t=>(t.sortable=this.options.sortable,t.column=this.column,t.options=this.$dropdown(t.link,{query:{view:"list",update:this.options.sortable,delete:this.data.length>this.options.min}}),t.data={"data-id":t.id,"data-template":t.template},t)))},type:()=>"files",uploadProps(){return l(a({},this.options.upload),{url:this.$urls.api+"/"+this.options.upload.api})}},created(){this.load(),this.$events.$on("model.update",this.reload),this.$events.$on("file.sort",this.reload)},destroyed(){this.$events.$off("model.update",this.reload),this.$events.$off("file.sort",this.reload)},methods:{onAction(t,e){"replace"===t&&this.replace(e)},onAdd(){this.canAdd&&this.$refs.upload.open(this.uploadProps)},onDrop(t){this.canAdd&&this.$refs.upload.drop(t,this.uploadProps)},async onSort(t){if(!1===this.options.sortable)return!1;this.isProcessing=!0;try{await this.$api.patch(this.options.apiUrl+"/files/sort",{files:t.map((t=>t.id)),index:this.pagination.offset}),this.$store.dispatch("notification/success",":)"),this.$events.$emit("file.sort")}catch(e){this.reload(),this.$store.dispatch("notification/error",e.message)}finally{this.isProcessing=!1}},onUpload(){this.$events.$emit("file.create"),this.$events.$emit("model.update"),this.$store.dispatch("notification/success",":)")},replace(t){this.$refs.upload.open({url:this.$urls.api+"/"+t.link,accept:"."+t.extension+","+t.mime,multiple:!1})}}},undefined,undefined,!1,Zh,null,null,null);function Zh(t){for(let e in Wh)this[e]=Wh[e]}var Qh=function(){return Xh.exports}();const tf={};var ef=Ft({mixins:[Nt],data:()=>({headline:null,text:null,theme:null}),async created(){const t=await this.load();this.headline=t.headline,this.text=t.text,this.theme=t.theme||"info"}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("section",{staticClass:"k-info-section"},[n("k-headline",{staticClass:"k-info-section-headline"},[t._v(" "+t._s(t.headline)+" ")]),n("k-box",{attrs:{theme:t.theme}},[n("k-text",{domProps:{innerHTML:t._s(t.text)}})],1)],1)}),[],!1,nf,null,null,null);function nf(t){for(let e in tf)this[e]=tf[e]}var sf=function(){return ef.exports}();const of={};var rf=Ft({extends:Vh,computed:{canAdd(){return this.options.add&&this.$permissions.pages.create},items(){return this.data.map((t=>{const e=!1!==t.permissions.changeStatus;return t.flag={status:t.status,tooltip:this.$t("page.status"),disabled:!e,click:()=>this.$dialog(t.link+"/changeStatus")},t.sortable=t.permissions.sort&&this.options.sortable,t.deletable=this.data.length>this.options.min,t.column=this.column,t.options=this.$dropdown(t.link,{query:{view:"list",delete:t.deletable,sort:t.sortable}}),t.data={"data-id":t.id,"data-status":t.status,"data-template":t.template},t}))}},created(){this.load(),this.$events.$on("page.changeStatus",this.reload),this.$events.$on("page.sort",this.reload)},destroyed(){this.$events.$off("page.changeStatus",this.reload),this.$events.$off("page.sort",this.reload)},methods:{onAdd(){this.canAdd&&this.$dialog("pages/create",{query:{parent:this.options.link||this.parent,view:this.parent,section:this.name}})},async onChange(t){let e=null;if(t.added&&(e="added"),t.moved&&(e="moved"),e){this.isProcessing=!0;const i=t[e].element,s=t[e].newIndex+1+this.pagination.offset;try{await this.$api.pages.changeStatus(i.id,"listed",s),this.$store.dispatch("notification/success",":)"),this.$events.$emit("page.sort",i)}catch(n){this.$store.dispatch("notification/error",{message:n.message,details:n.details}),await this.reload()}finally{this.isProcessing=!1}}}}},undefined,undefined,!1,af,null,null,null);function af(t){for(let e in of)this[e]=of[e]}var lf=function(){return rf.exports}();const uf={};var cf=Ft({mixins:[Nt],data:()=>({isLoading:!0,headline:null,reports:null,size:null}),async created(){const t=await this.load();this.isLoading=!1,this.headline=t.headline,this.reports=t.reports,this.size=t.size},methods:{}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return!1===t.isLoading?n("section",{staticClass:"k-stats-section"},[n("header",{staticClass:"k-section-header"},[n("k-headline",[t._v(" "+t._s(t.headline)+" ")])],1),t.reports.length>0?n("k-stats",{attrs:{reports:t.reports,size:t.size}}):n("k-empty",{attrs:{icon:"chart"}},[t._v(" "+t._s(t.empty||t.$t("stats.empty")))])],1):t._e()}),[],!1,df,null,null,null);function df(t){for(let e in uf)this[e]=uf[e]}var pf=function(){return cf.exports}();u.component("k-sections",Nh),u.component("k-fields-section",zh),u.component("k-files-section",Qh),u.component("k-info-section",sf),u.component("k-pages-section",lf),u.component("k-stats-section",pf);const hf={props:{blueprint:String,next:Object,prev:Object,permissions:{type:Object,default:()=>({})},lock:{type:[Boolean,Object]},model:{type:Object,default:()=>({})},tab:{type:Object,default:()=>({columns:[]})},tabs:{type:Array,default:()=>[]}},computed:{id(){return this.model.link},isLocked(){var t;return"lock"===(null==(t=this.lock)?void 0:t.state)},protectedFields:()=>[]},watch:{"model.id":{handler(){this.content()},immediate:!0}},created(){this.$events.$on("model.reload",this.reload),this.$events.$on("keydown.left",this.toPrev),this.$events.$on("keydown.right",this.toNext)},destroyed(){this.$events.$off("model.reload",this.reload),this.$events.$off("keydown.left",this.toPrev),this.$events.$off("keydown.right",this.toNext)},methods:{content(){this.$store.dispatch("content/create",{id:this.id,api:this.id,content:this.model.content,ignore:this.protectedFields})},async reload(){await this.$reload(),this.content()},toPrev(t){this.prev&&"body"===t.target.localName&&this.$go(this.prev.link)},toNext(t){this.next&&"body"===t.target.localName&&this.$go(this.next.link)}}};const ff={};var mf=Ft(hf,undefined,undefined,!1,gf,null,null,null);function gf(t){for(let e in ff)this[e]=ff[e]}var kf=function(){return mf.exports}();const vf={};var bf=Ft({extends:kf,computed:{avatarOptions(){return[{icon:"upload",text:this.$t("change"),click:()=>this.$refs.upload.open()},{icon:"trash",text:this.$t("delete"),click:this.deleteAvatar}]},buttons(){return[{icon:"email",text:`${this.$t("email")}: ${this.model.email}`,disabled:!this.permissions.changeEmail||this.isLocked,click:()=>this.$dialog(this.id+"/changeEmail")},{icon:"bolt",text:`${this.$t("role")}: ${this.model.role}`,disabled:!this.permissions.changeRole||this.isLocked,click:()=>this.$dialog(this.id+"/changeRole")},{icon:"globe",text:`${this.$t("language")}: ${this.model.language}`,disabled:!this.permissions.changeLanguage||this.isLocked,click:()=>this.$dialog(this.id+"/changeLanguage")}]},uploadApi(){return this.$urls.api+"/"+this.id+"/avatar"}},methods:{async deleteAvatar(){await this.$api.users.deleteAvatar(this.model.id),this.avatar=null,this.$store.dispatch("notification/success",":)"),this.$reload()},onAvatar(){this.model.avatar?this.$refs.picture.toggle():this.$refs.upload.open()},uploadedAvatar(){this.$store.dispatch("notification/success",":)"),this.$reload()}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-inside",{scopedSlots:t._u([{key:"footer",fn:function(){return[n("k-form-buttons",{attrs:{lock:t.lock}})]},proxy:!0}])},[n("div",{staticClass:"k-user-view",attrs:{"data-locked":t.isLocked,"data-id":t.model.id,"data-template":t.blueprint}},[n("div",{staticClass:"k-user-profile"},[n("k-view",[n("k-dropdown",[n("k-button",{staticClass:"k-user-view-image",attrs:{tooltip:t.$t("avatar"),disabled:t.isLocked},on:{click:t.onAvatar}},[t.model.avatar?n("k-image",{attrs:{cover:!0,src:t.model.avatar,ratio:"1/1"}}):n("k-icon",{attrs:{back:"gray-900",color:"gray-200",type:"user"}})],1),t.model.avatar?n("k-dropdown-content",{ref:"picture",attrs:{options:t.avatarOptions}}):t._e()],1),n("k-button-group",{attrs:{buttons:t.buttons}})],1)],1),n("k-view",[n("k-header",{attrs:{editable:t.permissions.changeName&&!t.isLocked,tab:t.tab.name,tabs:t.tabs},on:{edit:function(e){return t.$dialog(t.id+"/changeName")}},scopedSlots:t._u([{key:"left",fn:function(){return[n("k-button-group",[n("k-dropdown",{staticClass:"k-user-view-options"},[n("k-button",{attrs:{disabled:t.isLocked,text:t.$t("settings"),icon:"cog"},on:{click:function(e){return t.$refs.settings.toggle()}}}),n("k-dropdown-content",{ref:"settings",attrs:{options:t.$dropdown(t.id)}})],1),n("k-languages-dropdown")],1)]},proxy:!0},{key:"right",fn:function(){return[t.model.account?t._e():n("k-prev-next",{attrs:{prev:t.prev,next:t.next}})]},proxy:!0}])},[t.model.name&&0!==t.model.name.length?[t._v(" "+t._s(t.model.name)+" ")]:n("span",{staticClass:"k-user-name-placeholder"},[t._v(" "+t._s(t.$t("name"))+" … ")])],2),n("k-sections",{attrs:{blueprint:t.blueprint,empty:t.$t("user.blueprint",{blueprint:t.$esc(t.blueprint)}),lock:t.lock,parent:t.id,tab:t.tab}}),n("k-upload",{ref:"upload",attrs:{url:t.uploadApi,multiple:!1,accept:"image/*"},on:{success:t.uploadedAvatar}})],1)],1)])}),[],!1,yf,null,null,null);function yf(t){for(let e in vf)this[e]=vf[e]}var $f=function(){return bf.exports}();const _f={};var xf=Ft({extends:$f,prevnext:!1},undefined,undefined,!1,wf,null,null,null);function wf(t){for(let e in _f)this[e]=_f[e]}var Sf=function(){return xf.exports}();const Cf={};var Of=Ft({props:{error:String,layout:String}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n(`k-${t.layout}`,{tag:"component"},[n("k-view",{staticClass:"k-error-view"},[n("div",{staticClass:"k-error-view-content"},[n("k-text",[n("p",[n("k-icon",{staticClass:"k-error-view-icon",attrs:{type:"alert"}})],1),t._t("default",(function(){return[n("p",[t._v(" "+t._s(t.error)+" ")])]}))],2)],1)])],1)}),[],!1,Ef,null,null,null);function Ef(t){for(let e in Cf)this[e]=Cf[e]}var Af=function(){return Of.exports}();const Tf={};var If=Ft({extends:kf,props:{preview:Object},methods:{action(t){if("replace"===t)this.$refs.upload.open({url:this.$urls.api+"/"+this.id,accept:"."+this.model.extension+","+this.model.mime,multiple:!1})},onUpload(){this.$store.dispatch("notification/success",":)"),this.$reload()}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-inside",{scopedSlots:t._u([{key:"footer",fn:function(){return[n("k-form-buttons",{attrs:{lock:t.lock}})]},proxy:!0}])},[n("div",{staticClass:"k-file-view",attrs:{"data-locked":t.isLocked,"data-id":t.model.id,"data-template":t.blueprint}},[n("k-file-preview",t._b({},"k-file-preview",t.preview,!1)),n("k-view",{staticClass:"k-file-content"},[n("k-header",{attrs:{editable:t.permissions.changeName&&!t.isLocked,tab:t.tab.name,tabs:t.tabs},on:{edit:function(e){return t.$dialog(t.id+"/changeName")}},scopedSlots:t._u([{key:"left",fn:function(){return[n("k-button-group",[n("k-button",{staticClass:"k-file-view-options",attrs:{link:t.preview.url,responsive:!0,text:t.$t("open"),icon:"open",target:"_blank"}}),n("k-dropdown",{staticClass:"k-file-view-options"},[n("k-button",{attrs:{disabled:t.isLocked,responsive:!0,text:t.$t("settings"),icon:"cog"},on:{click:function(e){return t.$refs.settings.toggle()}}}),n("k-dropdown-content",{ref:"settings",attrs:{options:t.$dropdown(t.id)},on:{action:t.action}})],1),n("k-languages-dropdown")],1)]},proxy:!0},{key:"right",fn:function(){return[n("k-prev-next",{attrs:{prev:t.prev,next:t.next}})]},proxy:!0}])},[t._v(" "+t._s(t.model.filename)+" ")]),n("k-sections",{attrs:{blueprint:t.blueprint,empty:t.$t("file.blueprint",{blueprint:t.$esc(t.blueprint)}),lock:t.lock,parent:t.id,tab:t.tab}}),n("k-upload",{ref:"upload",on:{success:t.onUpload}})],1)],1)])}),[],!1,Mf,null,null,null);function Mf(t){for(let e in Tf)this[e]=Tf[e]}var Lf=function(){return If.exports}();const jf={props:{isInstallable:Boolean,isInstalled:Boolean,isOk:Boolean,requirements:Object,translations:Array},data(){return{user:{name:"",email:"",language:this.$translation.code,password:"",role:"admin"}}},computed:{fields(){return{email:{label:this.$t("email"),type:"email",link:!1,autofocus:!0,required:!0},password:{label:this.$t("password"),type:"password",placeholder:this.$t("password")+" …",required:!0},language:{label:this.$t("language"),type:"select",options:this.translations,icon:"globe",empty:!1,required:!0}}},isReady(){return this.isOk&&this.isInstallable},isComplete(){return this.isOk&&this.isInstalled}},methods:{async install(){try{await this.$api.system.install(this.user),await this.$reload({globals:["$system","$translation"]}),this.$store.dispatch("notification/success",this.$t("welcome")+"!")}catch(t){this.$store.dispatch("notification/error",t)}}}},Df={};var Bf=Ft(jf,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-panel",[n("k-view",{staticClass:"k-installation-view",attrs:{align:"center"}},[t.isComplete?n("k-text",[n("k-headline",[t._v(t._s(t.$t("installation.completed")))]),n("k-link",{attrs:{to:"/login"}},[t._v(" "+t._s(t.$t("login"))+" ")])],1):t.isReady?n("form",{on:{submit:function(e){return e.preventDefault(),t.install.apply(null,arguments)}}},[n("h1",{staticClass:"sr-only"},[t._v(" "+t._s(t.$t("installation"))+" ")]),n("k-fieldset",{attrs:{fields:t.fields,novalidate:!0},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}}),n("k-button",{attrs:{text:t.$t("install"),type:"submit",icon:"check"}})],1):n("div",[n("k-headline",[t._v(" "+t._s(t.$t("installation.issues.headline"))+" ")]),n("ul",{staticClass:"k-installation-issues"},[!1===t.isInstallable?n("li",[n("k-icon",{attrs:{type:"alert"}}),n("span",{domProps:{innerHTML:t._s(t.$t("installation.disabled"))}})],1):t._e(),!1===t.requirements.php?n("li",[n("k-icon",{attrs:{type:"alert"}}),n("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.php"))}})],1):t._e(),!1===t.requirements.server?n("li",[n("k-icon",{attrs:{type:"alert"}}),n("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.server"))}})],1):t._e(),!1===t.requirements.mbstring?n("li",[n("k-icon",{attrs:{type:"alert"}}),n("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.mbstring"))}})],1):t._e(),!1===t.requirements.curl?n("li",[n("k-icon",{attrs:{type:"alert"}}),n("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.curl"))}})],1):t._e(),!1===t.requirements.accounts?n("li",[n("k-icon",{attrs:{type:"alert"}}),n("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.accounts"))}})],1):t._e(),!1===t.requirements.content?n("li",[n("k-icon",{attrs:{type:"alert"}}),n("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.content"))}})],1):t._e(),!1===t.requirements.media?n("li",[n("k-icon",{attrs:{type:"alert"}}),n("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.media"))}})],1):t._e(),!1===t.requirements.sessions?n("li",[n("k-icon",{attrs:{type:"alert"}}),n("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.sessions"))}})],1):t._e()]),n("k-button",{attrs:{text:t.$t("retry"),icon:"refresh"},on:{click:t.$reload}})],1)],1)],1)}),[],!1,Pf,null,null,null);function Pf(t){for(let e in Df)this[e]=Df[e]}var Nf=function(){return Bf.exports}();const qf={};var Ff=Ft({props:{languages:{type:Array,default:()=>[]}},computed:{languagesCollection(){return this.languages.map((t=>l(a({},t),{image:{back:"black",color:"gray",icon:"globe"},link:()=>{this.$dialog(`languages/${t.id}/update`)},options:[{icon:"edit",text:this.$t("edit"),click(){this.$dialog(`languages/${t.id}/update`)}},{icon:"trash",text:this.$t("delete"),disabled:t.default&&1!==this.languages.length,click(){this.$dialog(`languages/${t.id}/delete`)}}]})))},primaryLanguage(){return this.languagesCollection.filter((t=>t.default))},secondaryLanguages(){return this.languagesCollection.filter((t=>!1===t.default))}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-inside",[n("k-view",{staticClass:"k-languages-view"},[n("k-header",[t._v(" "+t._s(t.$t("view.languages"))+" "),n("k-button-group",{attrs:{slot:"left"},slot:"left"},[n("k-button",{attrs:{text:t.$t("language.create"),icon:"add"},on:{click:function(e){return t.$dialog("languages/create")}}})],1)],1),n("section",{staticClass:"k-languages"},[t.languages.length>0?[n("section",{staticClass:"k-languages-view-section"},[n("header",{staticClass:"k-languages-view-section-header"},[n("k-headline",[t._v(t._s(t.$t("languages.default")))])],1),n("k-collection",{attrs:{items:t.primaryLanguage}})],1),n("section",{staticClass:"k-languages-view-section"},[n("header",{staticClass:"k-languages-view-section-header"},[n("k-headline",[t._v(t._s(t.$t("languages.secondary")))])],1),t.secondaryLanguages.length?n("k-collection",{attrs:{items:t.secondaryLanguages}}):n("k-empty",{attrs:{icon:"globe"},on:{click:function(e){return t.$dialog("languages/create")}}},[t._v(" "+t._s(t.$t("languages.secondary.empty"))+" ")])],1)]:0===t.languages.length?[n("k-empty",{attrs:{icon:"globe"},on:{click:function(e){return t.$dialog("languages/create")}}},[t._v(" "+t._s(t.$t("languages.empty"))+" ")])]:t._e()],2)],1)],1)}),[],!1,Rf,null,null,null);function Rf(t){for(let e in qf)this[e]=qf[e]}var zf=function(){return Ff.exports}(),Yf=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-panel",["login"===t.form?n("k-view",{staticClass:"k-login-view",attrs:{align:"center"}},[n("k-login-plugin",{attrs:{methods:t.methods}})],1):"code"===t.form?n("k-view",{staticClass:"k-login-code-view",attrs:{align:"center"}},[n("k-login-code",t._b({},"k-login-code",t.$props,!1))],1):t._e()],1)},Hf=[];const Uf={components:{"k-login-plugin":window.panel.plugins.login||Un},props:{methods:Array,pending:Object},computed:{form(){return this.pending.email?"code":this.$user?null:"login"}},created(){this.$store.dispatch("content/clear")}},Kf={};var Jf=Ft(Uf,Yf,Hf,!1,Gf,null,null,null);function Gf(t){for(let e in Kf)this[e]=Kf[e]}var Vf=function(){return Jf.exports}();const Wf={};var Xf=Ft({extends:kf,props:{status:Object},computed:{protectedFields:()=>["title"]}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-inside",{scopedSlots:t._u([{key:"footer",fn:function(){return[n("k-form-buttons",{attrs:{lock:t.lock}})]},proxy:!0}])},[n("k-view",{staticClass:"k-page-view",attrs:{"data-locked":t.isLocked,"data-id":t.model.id,"data-template":t.blueprint}},[n("k-header",{attrs:{editable:t.permissions.changeTitle&&!t.isLocked,tab:t.tab.name,tabs:t.tabs},on:{edit:function(e){return t.$dialog(t.id+"/changeTitle")}},scopedSlots:t._u([{key:"left",fn:function(){return[n("k-button-group",[t.permissions.preview&&t.model.previewUrl?n("k-button",{staticClass:"k-page-view-preview",attrs:{link:t.model.previewUrl,responsive:!0,text:t.$t("open"),icon:"open",target:"_blank"}}):t._e(),t.status?n("k-status-icon",{attrs:{status:t.model.status,disabled:!t.permissions.changeStatus||t.isLocked,responsive:!0,text:t.status.label},on:{click:function(e){return t.$dialog(t.id+"/changeStatus")}}}):t._e(),n("k-dropdown",{staticClass:"k-page-view-options"},[n("k-button",{attrs:{disabled:!0===t.isLocked,responsive:!0,text:t.$t("settings"),icon:"cog"},on:{click:function(e){return t.$refs.settings.toggle()}}}),n("k-dropdown-content",{ref:"settings",attrs:{options:t.$dropdown(t.id)}})],1),n("k-languages-dropdown")],1)]},proxy:!0},{key:"right",fn:function(){return[t.model.id?n("k-prev-next",{attrs:{prev:t.prev,next:t.next}}):t._e()]},proxy:!0}])},[t._v(" "+t._s(t.model.title)+" ")]),n("k-sections",{attrs:{blueprint:t.blueprint,empty:t.$t("page.blueprint",{blueprint:t.$esc(t.blueprint)}),lock:t.lock,parent:t.id,tab:t.tab}})],1)],1)}),[],!1,Zf,null,null,null);function Zf(t){for(let e in Wf)this[e]=Wf[e]}var Qf=function(){return Xf.exports}();const tm={};var em=Ft({props:{id:String},computed:{view(){return"k-"+this.id+"-plugin-view"}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-inside",[n(t.view,{tag:"component"})],1)}),[],!1,nm,null,null,null);function nm(t){for(let e in tm)this[e]=tm[e]}var im=function(){return em.exports}();const sm={};var om=Ft({data:()=>({isLoading:!1,issue:"",values:{password:null,passwordConfirmation:null}}),computed:{fields(){return{password:{autofocus:!0,label:this.$t("user.changePassword.new"),icon:"key",type:"password"},passwordConfirmation:{label:this.$t("user.changePassword.new.confirm"),icon:"key",type:"password"}}}},mounted(){this.$store.dispatch("title",this.$t("view.resetPassword"))},methods:{async submit(){if(!this.values.password||this.values.password.length<8)return this.issue=this.$t("error.user.password.invalid"),!1;if(this.values.password!==this.values.passwordConfirmation)return this.issue=this.$t("error.user.password.notSame"),!1;this.isLoading=!0;try{await this.$api.users.changePassword(this.$user.id,this.values.password),this.$store.dispatch("notification/success",":)"),this.$go("/")}catch(t){this.issue=t.message}finally{this.isLoading=!1}}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-inside",[n("k-view",{staticClass:"k-password-reset-view",attrs:{align:"center"}},[n("k-form",{attrs:{fields:t.fields,"submit-button":t.$t("change")},on:{submit:t.submit},scopedSlots:t._u([{key:"header",fn:function(){return[n("h1",{staticClass:"sr-only"},[t._v(" "+t._s(t.$t("view.resetPassword"))+" ")]),t.issue?n("k-login-alert",{on:{click:function(e){t.issue=null}}},[t._v(" "+t._s(t.issue)+" ")]):t._e(),n("k-user-info",{attrs:{user:t.$user}})]},proxy:!0},{key:"footer",fn:function(){return[n("div",{staticClass:"k-login-buttons"},[n("k-button",{staticClass:"k-login-button",attrs:{icon:"check",type:"submit"}},[t._v(" "+t._s(t.$t("change"))+" "),t.isLoading?[t._v(" … ")]:t._e()],2)],1)]},proxy:!0}]),model:{value:t.values,callback:function(e){t.values=e},expression:"values"}})],1)],1)}),[],!1,rm,null,null,null);function rm(t){for(let e in sm)this[e]=sm[e]}var am=function(){return om.exports}();const lm={};var um=Ft({extends:kf,computed:{protectedFields:()=>["title"]}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-inside",{scopedSlots:t._u([{key:"footer",fn:function(){return[n("k-form-buttons",{attrs:{lock:t.lock}})]},proxy:!0}])},[n("k-view",{staticClass:"k-site-view",attrs:{"data-locked":t.isLocked,"data-id":"/","data-template":"site"}},[n("k-header",{attrs:{editable:t.permissions.changeTitle&&!t.isLocked,tabs:t.tabs,tab:t.tab.name},on:{edit:function(e){return t.$dialog("site/changeTitle")}},scopedSlots:t._u([{key:"left",fn:function(){return[n("k-button-group",[n("k-button",{staticClass:"k-site-view-preview",attrs:{link:t.model.previewUrl,responsive:!0,text:t.$t("open"),icon:"open",target:"_blank"}}),n("k-languages-dropdown")],1)]},proxy:!0}])},[t._v(" "+t._s(t.model.title)+" ")]),n("k-sections",{attrs:{blueprint:t.blueprint,empty:t.$t("site.blueprint"),lock:t.lock,tab:t.tab,parent:"site"},on:{submit:function(e){return t.$emit("submit",e)}}})],1)],1)}),[],!1,cm,null,null,null);function cm(t){for(let e in lm)this[e]=lm[e]}var dm=function(){return um.exports}();const pm={props:{debug:Boolean,license:String,php:String,plugins:Array,server:String,https:Boolean,urls:Object,version:String},data:()=>({security:[]}),computed:{environment(){return[{label:this.$t("license"),value:this.license?"Kirby 3":this.$t("license.unregistered.label"),theme:this.license?null:"negative",click:this.license?()=>this.$dialog("license"):()=>this.$dialog("registration")},{label:this.$t("version"),value:this.version,link:"https://github.com/getkirby/kirby/releases/tag/"+this.version},{label:"PHP",value:this.php},{label:this.$t("server"),value:this.server||"?"}]}},async created(){console.info("Running system health checks for the Panel system view; failed requests in the following console output are expected behavior.");let t=(Promise.allSettled||Promise.all).bind(Promise);await t([this.check("content"),this.check("debug"),this.check("git"),this.check("https"),this.check("kirby"),this.check("site")]),console.info("System health checks ended.")},methods:{async check(t){switch(t){case"debug":!0===this.debug&&this.securityIssue(t);break;case"https":!0!==this.https&&this.securityIssue(t);break;default:const e=this.urls[t];if(!e)return!1;!0===await this.isAccessible(e)&&this.securityIssue(t)}},securityIssue(t){this.security.push({image:{back:"var(--color-red-200)",icon:"alert",color:"var(--color-red)"},id:t,text:this.$t("system.issues."+t),link:"https://getkirby.com/security/"+t})},isAccessible:async t=>(await fetch(t,{cache:"no-store"})).status<400,retry(){this.$go(window.location.href)}}},hm={};var fm=Ft(pm,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-inside",[n("k-view",{staticClass:"k-system-view"},[n("k-header",[t._v(" "+t._s(t.$t("view.system"))+" ")]),n("section",{staticClass:"k-system-view-section"},[n("header",{staticClass:"k-system-view-section-header"},[n("k-headline",[t._v(t._s(t.$t("environment")))])],1),n("k-stats",{staticClass:"k-system-info",attrs:{reports:t.environment,size:"medium"}})],1),t.security.length?n("section",{staticClass:"k-system-view-section"},[n("header",{staticClass:"k-system-view-section-header"},[n("k-headline",[t._v(t._s(t.$t("security")))]),n("k-button",{attrs:{tooltip:t.$t("retry"),icon:"refresh"},on:{click:t.retry}})],1),n("k-items",{attrs:{items:t.security}})],1):t._e(),t.plugins.length?n("section",{staticClass:"k-system-view-section"},[n("header",{staticClass:"k-system-view-section-header"},[n("k-headline",{attrs:{link:"https://getkirby.com/plugins"}},[t._v(" "+t._s(t.$t("plugins"))+" ")])],1),n("k-table",{attrs:{index:!1,columns:{name:{label:t.$t("name"),type:"url",mobile:!0},author:{label:t.$t("author")},license:{label:t.$t("license")},version:{label:t.$t("version"),width:"8rem",mobile:!0}},rows:t.plugins}})],1):t._e()],1)],1)}),[],!1,mm,null,null,null);function mm(t){for(let e in hm)this[e]=hm[e]}var gm=function(){return fm.exports}();const km={};var vm=Ft({props:{role:Object,roles:Array,search:String,title:String,users:Object},computed:{items(){return this.users.data.map((t=>(t.options=this.$dropdown(t.link),t)))}},methods:{paginate(t){this.$reload({query:{page:t.page}})}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-inside",[n("k-view",{staticClass:"k-users-view"},[n("k-header",{scopedSlots:t._u([{key:"left",fn:function(){return[n("k-button-group",{attrs:{buttons:[{disabled:!1===t.$permissions.users.create,text:t.$t("user.create"),icon:"add",click:function(){return t.$dialog("users/create")}}]}})]},proxy:!0},{key:"right",fn:function(){return[n("k-button-group",[n("k-dropdown",[n("k-button",{attrs:{responsive:!0,text:`${t.$t("role")}: ${t.role?t.role.title:t.$t("role.all")}`,icon:"funnel"},on:{click:function(e){return t.$refs.roles.toggle()}}}),n("k-dropdown-content",{ref:"roles",attrs:{align:"right"}},[n("k-dropdown-item",{attrs:{icon:"bolt",link:"/users"}},[t._v(" "+t._s(t.$t("role.all"))+" ")]),n("hr"),t._l(t.roles,(function(e){return n("k-dropdown-item",{key:e.id,attrs:{link:"/users/?role="+e.id,icon:"bolt"}},[t._v(" "+t._s(e.title)+" ")])}))],2)],1)],1)]},proxy:!0}])},[t._v(" "+t._s(t.$t("view.users"))+" ")]),t.users.data.length>0?[n("k-collection",{attrs:{items:t.items,pagination:t.users.pagination},on:{paginate:t.paginate}})]:0===t.users.pagination.total?[n("k-empty",{attrs:{icon:"users"}},[t._v(" "+t._s(t.$t("role.empty"))+" ")])]:t._e()],2)],1)}),[],!1,bm,null,null,null);function bm(t){for(let e in km)this[e]=km[e]}var ym=function(){return vm.exports}();const $m={};var _m=Ft({computed:{placeholder(){return this.field("code",{}).placeholder},languages(){return this.field("language",{options:[]}).options}},methods:{focus(){this.$refs.code.focus()}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-block-type-code-editor"},[n("k-input",{ref:"code",attrs:{buttons:!1,placeholder:t.placeholder,spellcheck:!1,value:t.content.code,type:"textarea"},on:{input:function(e){return t.update({code:e})}}}),t.languages.length?n("div",{staticClass:"k-block-type-code-editor-language"},[n("k-icon",{attrs:{type:"code"}}),n("k-input",{ref:"language",attrs:{empty:!1,options:t.languages,value:t.content.language,type:"select"},on:{input:function(e){return t.update({language:e})}}})],1):t._e()],1)}),[],!1,xm,null,null,null);function xm(t){for(let e in $m)this[e]=$m[e]}var wm=function(){return _m.exports}(),Sm=Object.freeze(Object.defineProperty({__proto__:null,default:wm},Symbol.toStringTag,{value:"Module"}));const Cm={};var Om=Ft({},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("k-block-title",{attrs:{content:t.content,fieldset:t.fieldset},on:{dblclick:function(e){return t.$emit("open")}}})}),[],!1,Em,null,null,null);function Em(t){for(let e in Cm)this[e]=Cm[e]}var Am=function(){return Om.exports}(),Tm=Object.freeze(Object.defineProperty({__proto__:null,default:Am},Symbol.toStringTag,{value:"Module"}));const Im={};var Mm=Ft({},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("ul",{on:{dblclick:t.open}},[0===t.content.images.length?[n("li"),n("li"),n("li"),n("li"),n("li")]:t._l(t.content.images,(function(t){return n("li",{key:t.id},[n("img",{attrs:{src:t.url,srcset:t.image.srcset,alt:t.alt}})])}))],2)}),[],!1,Lm,null,null,null);function Lm(t){for(let e in Im)this[e]=Im[e]}var jm=function(){return Mm.exports}(),Dm=Object.freeze(Object.defineProperty({__proto__:null,default:jm},Symbol.toStringTag,{value:"Module"}));const Bm={};var Pm=Ft({computed:{textField(){return this.field("text",{marks:!0})}},methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-block-type-heading-input",attrs:{"data-level":t.content.level}},[n("k-writer",{ref:"input",attrs:{inline:!0,marks:t.textField.marks,placeholder:t.textField.placeholder,value:t.content.text},on:{input:function(e){return t.update({text:e})}}})],1)}),[],!1,Nm,null,null,null);function Nm(t){for(let e in Bm)this[e]=Bm[e]}var qm=function(){return Pm.exports}(),Fm=Object.freeze(Object.defineProperty({__proto__:null,default:qm},Symbol.toStringTag,{value:"Module"}));const Rm={};var zm=Ft({computed:{captionMarks(){return this.field("caption",{marks:!0}).marks},crop(){return this.content.crop||!1},src(){var t;return"web"===this.content.location?this.content.src:!!(null==(t=this.content.image[0])?void 0:t.url)&&this.content.image[0].url},ratio(){return this.content.ratio||!1}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-block-figure",{attrs:{caption:t.content.caption,"caption-marks":t.captionMarks,"empty-text":t.$t("field.blocks.image.placeholder")+" …","is-empty":!t.src,"empty-icon":"image"},on:{open:t.open,update:t.update}},[t.src?[t.ratio?n("k-aspect-ratio",{attrs:{ratio:t.ratio,cover:t.crop}},[n("img",{attrs:{alt:t.content.alt,src:t.src}})]):n("img",{staticClass:"k-block-type-image-auto",attrs:{alt:t.content.alt,src:t.src}})]:t._e()],2)}),[],!1,Ym,null,null,null);function Ym(t){for(let e in Rm)this[e]=Rm[e]}var Hm=function(){return zm.exports}(),Um=Object.freeze(Object.defineProperty({__proto__:null,default:Hm},Symbol.toStringTag,{value:"Module"}));const Km={};var Jm=Ft({},(function(){var t=this;t.$createElement;return t._self._c,t._m(0)}),[function(){var t=this.$createElement,e=this._self._c||t;return e("div",[e("hr")])}],!1,Gm,null,null,null);function Gm(t){for(let e in Km)this[e]=Km[e]}var Vm=function(){return Jm.exports}(),Wm=Object.freeze(Object.defineProperty({__proto__:null,default:Vm},Symbol.toStringTag,{value:"Module"}));const Xm={};var Zm=Ft({computed:{marks(){return this.field("text",{}).marks}},methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("k-input",{ref:"input",staticClass:"k-block-type-list-input",attrs:{marks:t.marks,value:t.content.text,type:"list"},on:{input:function(e){return t.update({text:e})}}})}),[],!1,Qm,null,null,null);function Qm(t){for(let e in Xm)this[e]=Xm[e]}var tg=function(){return Zm.exports}(),eg=Object.freeze(Object.defineProperty({__proto__:null,default:tg},Symbol.toStringTag,{value:"Module"}));const ng={};var ig=Ft({computed:{placeholder(){return this.field("text",{}).placeholder}},methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("k-input",{ref:"input",staticClass:"k-block-type-markdown-input",attrs:{buttons:!1,placeholder:t.placeholder,spellcheck:!1,value:t.content.text,type:"textarea"},on:{input:function(e){return t.update({text:e})}}})}),[],!1,sg,null,null,null);function sg(t){for(let e in ng)this[e]=ng[e]}var og=function(){return ig.exports}(),rg=Object.freeze(Object.defineProperty({__proto__:null,default:og},Symbol.toStringTag,{value:"Module"}));const ag={};var lg=Ft({computed:{citationField(){return this.field("citation",{})},textField(){return this.field("text",{})}},methods:{focus(){this.$refs.text.focus()}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-block-type-quote-editor"},[n("k-writer",{ref:"text",staticClass:"k-block-type-quote-text",attrs:{inline:!0,marks:t.textField.marks,placeholder:t.textField.placeholder,value:t.content.text},on:{input:function(e){return t.update({text:e})}}}),n("k-writer",{ref:"citation",staticClass:"k-block-type-quote-citation",attrs:{inline:!0,marks:t.citationField.marks,placeholder:t.citationField.placeholder,value:t.content.citation},on:{input:function(e){return t.update({citation:e})}}})],1)}),[],!1,ug,null,null,null);function ug(t){for(let e in ag)this[e]=ag[e]}var cg=function(){return lg.exports}(),dg=Object.freeze(Object.defineProperty({__proto__:null,default:cg},Symbol.toStringTag,{value:"Module"}));const pg={};var hg=Ft({inheritAttrs:!1,computed:{columns(){return this.table.columns||this.fields},fields(){return this.table.fields||{}},rows(){return this.content.rows||[]},table(){let t=null;for(const e of Object.values(this.fieldset.tabs))e.fields.rows&&(t=e.fields.rows);return t||{}}}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("k-table",{staticClass:"k-block-type-table-preview",attrs:{columns:t.columns,empty:t.$t("field.structure.empty"),rows:t.rows},nativeOn:{dblclick:function(e){return t.open.apply(null,arguments)}}})}),[],!1,fg,null,null,null);function fg(t){for(let e in pg)this[e]=pg[e]}var mg=function(){return hg.exports}(),gg=Object.freeze(Object.defineProperty({__proto__:null,default:mg},Symbol.toStringTag,{value:"Module"}));const kg={};var vg=Ft({props:{endpoints:Object},computed:{textField(){return this.field("text",{})}},methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("k-writer",{ref:"input",staticClass:"k-block-type-text-input",attrs:{inline:t.textField.inline,marks:t.textField.marks,nodes:t.textField.nodes,placeholder:t.textField.placeholder,value:t.content.text},on:{input:function(e){return t.update({text:e})}}})}),[],!1,bg,null,null,null);function bg(t){for(let e in kg)this[e]=kg[e]}var yg=function(){return vg.exports}(),$g=Object.freeze(Object.defineProperty({__proto__:null,default:yg},Symbol.toStringTag,{value:"Module"}));const _g={};var xg=Ft({computed:{captionMarks(){return this.field("caption",{marks:!0}).marks},video(){return this.$helper.embed.video(this.content.url,!0)}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-block-figure",{attrs:{caption:t.content.caption,"caption-marks":t.captionMarks,"empty-text":t.$t("field.blocks.video.placeholder")+" …","is-empty":!t.video,"empty-icon":"video"},on:{open:t.open,update:t.update}},[n("k-aspect-ratio",{attrs:{ratio:"16/9"}},[t.video?n("iframe",{attrs:{src:t.video,referrerpolicy:"strict-origin-when-cross-origin"}}):t._e()])],1)}),[],!1,wg,null,null,null);function wg(t){for(let e in _g)this[e]=_g[e]}var Sg=function(){return xg.exports}(),Cg=Object.freeze(Object.defineProperty({__proto__:null,default:Sg},Symbol.toStringTag,{value:"Module"}));const Og={inheritAttrs:!1,props:{attrs:[Array,Object],content:[Array,Object],endpoints:Object,fieldset:Object,id:String,isBatched:Boolean,isFull:Boolean,isHidden:Boolean,isLastInBatch:Boolean,isSelected:Boolean,name:String,next:Object,prev:Object,type:String},data:()=>({skipFocus:!1}),computed:{className(){let t=["k-block-type-"+this.type];return this.fieldset.preview!==this.type&&t.push("k-block-type-"+this.fieldset.preview),!1===this.wysiwyg&&t.push("k-block-type-default"),t},customComponent(){return this.wysiwyg?this.wysiwygComponent:"k-block-type-default"},isEditable(){return!1!==this.fieldset.editable},listeners(){return l(a({},this.$listeners),{confirmToRemove:this.confirmToRemove,open:this.open})},tabs(){let t=this.fieldset.tabs;return Object.entries(t).forEach((([e,n])=>{Object.entries(n.fields).forEach((([n])=>{t[e].fields[n].section=this.name,t[e].fields[n].endpoints={field:this.endpoints.field+"/fieldsets/"+this.type+"/fields/"+n,section:this.endpoints.section,model:this.endpoints.model}}))})),t},wysiwyg(){return!1!==this.wysiwygComponent},wysiwygComponent(){if(!1===this.fieldset.preview)return!1;let t;return this.fieldset.preview&&(t="k-block-type-"+this.fieldset.preview,this.$helper.isComponent(t))?t:(t="k-block-type-"+this.type,!!this.$helper.isComponent(t)&&t)}},methods:{close(){this.$refs.drawer.close()},confirmToRemove(){this.$refs.removeDialog.open()},focus(){!0!==this.skipFocus&&("function"==typeof this.$refs.editor.focus?this.$refs.editor.focus():this.$refs.container.focus())},onFocusIn(t){var e,n;(null==(n=null==(e=this.$refs.options)?void 0:e.$el)?void 0:n.contains(t.target))||this.$emit("focus",t)},goTo(t){t&&(this.skipFocus=!0,this.close(),this.$nextTick((()=>{t.$refs.container.focus(),t.open(),this.skipFocus=!1})))},open(){var t;null==(t=this.$refs.drawer)||t.open()},remove(){this.$refs.removeDialog.close(),this.$emit("remove",this.id)}}},Eg={};var Ag=Ft(Og,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{ref:"container",staticClass:"k-block-container",class:"k-block-container-type-"+t.type,attrs:{"data-batched":t.isBatched,"data-disabled":t.fieldset.disabled,"data-hidden":t.isHidden,"data-id":t.id,"data-last-in-batch":t.isLastInBatch,"data-selected":t.isSelected,"data-translate":t.fieldset.translate,tabindex:"0"},on:{keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"])?null:e.ctrlKey&&e.shiftKey?(e.preventDefault(),t.$emit("sortDown")):null},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"up",38,e.key,["Up","ArrowUp"])?null:e.ctrlKey&&e.shiftKey?(e.preventDefault(),t.$emit("sortUp")):null}],focus:function(e){return t.$emit("focus")},focusin:t.onFocusIn}},[n("div",{staticClass:"k-block",class:t.className},[n(t.customComponent,t._g(t._b({ref:"editor",tag:"component"},"component",t.$props,!1),t.listeners))],1),n("k-block-options",t._g({ref:"options",attrs:{"is-batched":t.isBatched,"is-editable":t.isEditable,"is-full":t.isFull,"is-hidden":t.isHidden}},t.listeners)),t.isEditable&&!t.isBatched?n("k-form-drawer",{ref:"drawer",staticClass:"k-block-drawer",attrs:{id:t.id,icon:t.fieldset.icon||"box",tabs:t.tabs,title:t.fieldset.name,value:t.content},on:{close:function(e){return t.focus()},input:function(e){return t.$emit("update",e)}},scopedSlots:t._u([{key:"options",fn:function(){return[t.isHidden?n("k-button",{staticClass:"k-drawer-option",attrs:{icon:"hidden"},on:{click:function(e){return t.$emit("show")}}}):t._e(),n("k-button",{staticClass:"k-drawer-option",attrs:{disabled:!t.prev,icon:"angle-left"},on:{click:function(e){return e.preventDefault(),e.stopPropagation(),t.goTo(t.prev)}}}),n("k-button",{staticClass:"k-drawer-option",attrs:{disabled:!t.next,icon:"angle-right"},on:{click:function(e){return e.preventDefault(),e.stopPropagation(),t.goTo(t.next)}}}),n("k-button",{staticClass:"k-drawer-option",attrs:{icon:"trash"},on:{click:function(e){return e.preventDefault(),e.stopPropagation(),t.confirmToRemove.apply(null,arguments)}}})]},proxy:!0}],null,!1,2211169536)}):t._e(),n("k-remove-dialog",{ref:"removeDialog",attrs:{text:t.$t("field.blocks.delete.confirm")},on:{submit:t.remove}})],1)}),[],!1,Tg,null,null,null);function Tg(t){for(let e in Eg)this[e]=Eg[e]}var Ig=function(){return Ag.exports}();const Mg={};var Lg=Ft({inheritAttrs:!1,computed:{shortcut(){return this.$helper.keyboard.metaKey()+"+v"}},methods:{close(){this.$refs.dialog.close()},open(){this.$refs.dialog.open()},onPaste(t){this.$emit("paste",t),this.close()}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",staticClass:"k-block-importer",attrs:{"cancel-button":!1,"submit-button":!1,size:"large"}},[n("label",{attrs:{for:"pasteboard"},domProps:{innerHTML:t._s(t.$t("field.blocks.fieldsets.paste",{shortcut:t.shortcut}))}}),n("textarea",{attrs:{id:"pasteboard"},on:{paste:function(e){return e.preventDefault(),t.onPaste.apply(null,arguments)}}})])}),[],!1,jg,null,null,null);function jg(t){for(let e in Mg)this[e]=Mg[e]}const Dg={components:{"k-block-pasteboard":function(){return Lg.exports}()},inheritAttrs:!1,props:{autofocus:Boolean,empty:String,endpoints:Object,fieldsets:Object,fieldsetGroups:Object,group:String,max:{type:Number,default:null},value:{type:Array,default:()=>[]}},data(){return{isMultiSelectKey:!1,batch:[],blocks:this.value,current:null,isFocussed:!1}},computed:{draggableOptions(){return{id:this._uid,handle:".k-sort-handle",list:this.blocks,move:this.move,delay:10,data:{fieldsets:this.fieldsets,isFull:this.isFull},options:{group:this.group}}},hasFieldsets(){return Object.keys(this.fieldsets).length},isEditing(){return this.$store.state.dialog||this.$store.state.drawers.open.length>0},isEmpty(){return 0===this.blocks.length},isFull(){return null!==this.max&&this.blocks.length>=this.max},selected(){return this.current},selectedOrBatched(){return this.batch.length>0?this.batch:this.selected?[this.selected]:[]}},watch:{value(){this.blocks=this.value}},created(){this.$events.$on("copy",this.copy),this.$events.$on("focus",this.onOutsideFocus),this.$events.$on("keydown",this.onKey),this.$events.$on("keyup",this.onKey),this.$events.$on("paste",this.onPaste)},destroyed(){this.$events.$off("copy",this.copy),this.$events.$off("focus",this.onOutsideFocus),this.$events.$off("keydown",this.onKey),this.$events.$off("keyup",this.onKey),this.$events.$off("paste",this.onPaste)},mounted(){!0===this.$props.autofocus&&this.focus()},methods:{append(t,e){if("string"!=typeof t){if(Array.isArray(t)){let n=this.$helper.clone(t).map((t=>(t.id=this.$helper.uuid(),t)));const i=Object.keys(this.fieldsets);if(n=n.filter((t=>i.includes(t.type))),this.max){const t=this.max-this.blocks.length;n=n.slice(0,t)}this.blocks.splice(e,0,...n),this.save()}}else this.add(t,e)},async add(t="text",e){const n=await this.$api.get(this.endpoints.field+"/fieldsets/"+t);this.blocks.splice(e,0,n),this.save(),this.$nextTick((()=>{this.focusOrOpen(n)}))},addToBatch(t){null!==this.selected&&!1===this.batch.includes(this.selected)&&(this.batch.push(this.selected),this.current=null),!1===this.batch.includes(t.id)&&this.batch.push(t.id)},choose(t){if(1===Object.keys(this.fieldsets).length){const e=Object.values(this.fieldsets)[0].type;this.add(e,t)}else this.$refs.selector.open(t)},chooseToConvert(t){this.$refs.selector.open(t,{disabled:[t.type],headline:this.$t("field.blocks.changeType"),event:"convert"})},click(t){this.$emit("click",t)},confirmToRemoveAll(){this.$refs.removeAll.open()},confirmToRemoveSelected(){this.$refs.removeSelected.open()},copy(t){if(!0===this.isEditing)return!1;if(0===this.blocks.length)return!1;if(0===this.selectedOrBatched.length)return!1;if(!0===this.isInputEvent(t))return!1;let e=[];if(this.blocks.forEach((t=>{this.selectedOrBatched.includes(t.id)&&e.push(t)})),0===e.length)return!1;this.$helper.clipboard.write(e,t),t instanceof ClipboardEvent==!1&&(this.batch=this.selectedOrBatched),this.$store.dispatch("notification/success",`${e.length} copied!`)},copyAll(){this.selectAll(),this.copy(),this.deselectAll()},async convert(t,e){var n;const i=this.findIndex(e.id);if(-1===i)return!1;const s=t=>{var e;let n={};for(const i of Object.values(null!=(e=null==t?void 0:t.tabs)?e:{}))n=a(a({},n),i.fields);return n},o=this.blocks[i],r=await this.$api.get(this.endpoints.field+"/fieldsets/"+t),u=this.fieldsets[o.type],c=this.fieldsets[t];if(!c)return!1;let d=r.content;const p=s(c),h=s(u);for(const[a,l]of Object.entries(p)){const t=h[a];(null==t?void 0:t.type)===l.type&&(null==(n=null==o?void 0:o.content)?void 0:n[a])&&(d[a]=o.content[a])}this.blocks[i]=l(a({},r),{id:o.id,content:d}),this.save()},deselectAll(){this.batch=[],this.current=null},async duplicate(t,e){const n=l(a({},this.$helper.clone(t)),{id:this.$helper.uuid()});this.blocks.splice(e+1,0,n),this.save()},fieldset(t){return this.fieldsets[t.type]||{icon:"box",name:t.type,tabs:{content:{fields:{}}},type:t.type}},find(t){return this.blocks.find((e=>e.id===t))},findIndex(t){return this.blocks.findIndex((e=>e.id===t))},focus(t){(null==t?void 0:t.id)&&this.$refs["block-"+t.id]?this.$refs["block-"+t.id][0].focus():this.blocks[0]&&this.focus(this.blocks[0])},focusOrOpen(t){this.fieldsets[t.type].wysiwyg?this.focus(t):this.open(t)},hide(t){this.$set(t,"isHidden",!0),this.save()},isBatched(t){return this.batch.includes(t.id)},isInputEvent(){const t=document.querySelector(":focus");return t&&t.matches("input, textarea, [contenteditable], .k-writer")},isLastInBatch(t){const[e]=this.batch.slice(-1);return e&&t.id===e},isOnlyInstance:()=>1===document.querySelectorAll(".k-blocks").length,isSelected(t){return this.selected&&this.selected===t.id},move(t){if(t.from!==t.to){const e=t.draggedContext.element,n=t.relatedContext.component.componentData||t.relatedContext.component.$parent.componentData;if(!1===Object.keys(n.fieldsets).includes(e.type))return!1;if(!0===n.isFull)return!1}return!0},onKey(t){this.isMultiSelectKey=t.metaKey||t.ctrlKey||t.altKey},onOutsideFocus(t){if("function"==typeof t.target.closest&&t.target.closest(".k-dialog"))return;const e=document.querySelector(".k-overlay:last-of-type");if(!1===this.$el.contains(t.target)&&(!e||!1===e.contains(t.target)))return this.select(null);if(e){const e=this.$el.closest(".k-layout-column");if(!1===(null==e?void 0:e.contains(t.target)))return this.select(null)}},onPaste(t){var e;return!0!==this.isInputEvent(t)&&(!0===this.isEditing?!0===(null==(e=this.$refs.selector)?void 0:e.isOpen())&&this.paste(t):(0!==this.selectedOrBatched.length||!0===this.isOnlyInstance())&&this.paste(t))},open(t){this.$refs["block-"+t.id]&&this.$refs["block-"+t.id][0].open()},async paste(t){const e=this.$helper.clipboard.read(t),n=await this.$api.post(this.endpoints.field+"/paste",{html:e});let i=this.selectedOrBatched[this.selectedOrBatched.length-1],s=this.findIndex(i);-1===s&&(s=this.blocks.length),this.append(n,s+1)},pasteboard(){this.$refs.pasteboard.open()},prevNext(t){if(this.blocks[t]){let e=this.blocks[t];if(this.$refs["block-"+e.id])return this.$refs["block-"+e.id][0]}},remove(t){var e;const n=this.findIndex(t.id);-1!==n&&((null==(e=this.selected)?void 0:e.id)===t.id&&this.select(null),this.$delete(this.blocks,n),this.save())},removeAll(){this.batch=[],this.blocks=[],this.save(),this.$refs.removeAll.close()},removeSelected(){this.batch.forEach((t=>{const e=this.findIndex(t);-1!==e&&this.$delete(this.blocks,e)})),this.deselectAll(),this.save(),this.$refs.removeSelected.close()},save(){this.$emit("input",this.blocks)},select(t,e=null){if(e&&this.isMultiSelectKey&&this.onKey(e),t&&this.isMultiSelectKey)return this.addToBatch(t),void(this.current=null);this.batch=[],this.current=t?t.id:null},selectAll(){this.batch=Object.values(this.blocks).map((t=>t.id))},show(t){this.$set(t,"isHidden",!1),this.save()},sort(t,e,n){if(n<0)return;let i=this.$helper.clone(this.blocks);i.splice(e,1),i.splice(n,0,t),this.blocks=i,this.save(),this.$nextTick((()=>{this.focus(t)}))},update(t,e){const n=this.findIndex(t.id);-1!==n&&Object.entries(e).forEach((([t,e])=>{this.$set(this.blocks[n].content,t,e)})),this.save()}}},Bg={};var Pg=Ft(Dg,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{ref:"wrapper",staticClass:"k-blocks",attrs:{"data-empty":0===t.blocks.length,"data-multi-select-key":t.isMultiSelectKey},on:{focusin:function(e){t.focussed=!0},focusout:function(e){t.focussed=!1}}},[t.hasFieldsets?[n("k-draggable",t._b({staticClass:"k-blocks-list",on:{sort:t.save},scopedSlots:t._u([{key:"footer",fn:function(){return[n("k-empty",{staticClass:"k-blocks-empty",attrs:{icon:"box"},on:{click:function(e){return t.choose(t.blocks.length)}}},[t._v(" "+t._s(t.empty||t.$t("field.blocks.empty"))+" ")])]},proxy:!0}],null,!1,2413899928)},"k-draggable",t.draggableOptions,!1),t._l(t.blocks,(function(e,i){return n("k-block",t._b({key:e.id,ref:"block-"+e.id,refInFor:!0,attrs:{endpoints:t.endpoints,fieldset:t.fieldset(e),"is-batched":t.isBatched(e),"is-last-in-batch":t.isLastInBatch(e),"is-full":t.isFull,"is-hidden":!0===e.isHidden,"is-selected":t.isSelected(e),next:t.prevNext(i+1),prev:t.prevNext(i-1)},on:{append:function(e){return t.append(e,i+1)},blur:function(e){return t.select(null)},choose:function(e){return t.choose(e)},chooseToAppend:function(e){return t.choose(i+1)},chooseToConvert:function(n){return t.chooseToConvert(e)},chooseToPrepend:function(e){return t.choose(i)},copy:function(e){return t.copy()},confirmToRemoveSelected:t.confirmToRemoveSelected,duplicate:function(n){return t.duplicate(e,i)},focus:function(n){return t.select(e)},hide:function(n){return t.hide(e)},paste:function(e){return t.pasteboard()},prepend:function(e){return t.add(e,i)},remove:function(n){return t.remove(e)},sortDown:function(n){return t.sort(e,i,i+1)},sortUp:function(n){return t.sort(e,i,i-1)},show:function(n){return t.show(e)},update:function(n){return t.update(e,n)}},nativeOn:{click:function(n){return n.stopPropagation(),t.select(e,n)}}},"k-block",e,!1))})),1),n("k-block-selector",{ref:"selector",attrs:{fieldsets:t.fieldsets,"fieldset-groups":t.fieldsetGroups},on:{add:t.add,convert:t.convert,paste:function(e){return t.paste(e)}}}),n("k-remove-dialog",{ref:"removeAll",attrs:{text:t.$t("field.blocks.delete.confirm.all")},on:{submit:t.removeAll}}),n("k-remove-dialog",{ref:"removeSelected",attrs:{text:t.$t("field.blocks.delete.confirm.selected")},on:{submit:t.removeSelected}}),n("k-block-pasteboard",{ref:"pasteboard",on:{paste:function(e){return t.paste(e)}}})]:[n("k-box",{attrs:{theme:"info"}},[t._v(" No fieldsets yet ")])]],2)}),[],!1,Ng,null,null,null);function Ng(t){for(let e in Bg)this[e]=Bg[e]}var qg=function(){return Pg.exports}();const Fg={inheritAttrs:!1,props:{caption:String,captionMarks:[Boolean,Array],cover:{type:Boolean,default:!0},isEmpty:Boolean,emptyIcon:String,emptyText:String,ratio:String},computed:{ratioPadding(){return this.$helper.ratio(this.ratio||"16/9")}}},Rg={};var zg=Ft(Fg,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("figure",{staticClass:"k-block-figure"},[t.isEmpty?n("k-button",{staticClass:"k-block-figure-empty",attrs:{icon:t.emptyIcon,text:t.emptyText},on:{click:function(e){return t.$emit("open")}}}):n("span",{staticClass:"k-block-figure-container",on:{dblclick:function(e){return t.$emit("open")}}},[t._t("default")],2),t.caption?n("figcaption",[n("k-writer",{attrs:{inline:!0,marks:t.captionMarks,value:t.caption},on:{input:function(e){return t.$emit("update",{caption:e})}}})],1):t._e()],1)}),[],!1,Yg,null,null,null);function Yg(t){for(let e in Rg)this[e]=Rg[e]}var Hg=function(){return zg.exports}();const Ug={props:{isBatched:Boolean,isEditable:Boolean,isFull:Boolean,isHidden:Boolean},methods:{open(){this.$refs.options.open()}}},Kg={};var Jg=Ft(Ug,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dropdown",{staticClass:"k-block-options"},[t.isBatched?[n("k-button",{staticClass:"k-block-options-button",attrs:{tooltip:t.$t("copy"),icon:"template"},on:{click:function(e){return e.preventDefault(),t.$emit("copy")}}}),n("k-button",{staticClass:"k-block-options-button",attrs:{tooltip:t.$t("remove"),icon:"trash"},on:{click:function(e){return e.preventDefault(),t.$emit("confirmToRemoveSelected")}}})]:[t.isEditable?n("k-button",{staticClass:"k-block-options-button",attrs:{tooltip:t.$t("edit"),icon:"edit"},on:{click:function(e){return t.$emit("open")}}}):t._e(),n("k-button",{staticClass:"k-block-options-button",attrs:{disabled:t.isFull,tooltip:t.$t("insert.after"),icon:"add"},on:{click:function(e){return t.$emit("chooseToAppend")}}}),n("k-button",{staticClass:"k-block-options-button",attrs:{tooltip:t.$t("delete"),icon:"trash"},on:{click:function(e){return t.$emit("confirmToRemove")}}}),n("k-button",{staticClass:"k-block-options-button",attrs:{tooltip:t.$t("more"),icon:"dots"},on:{click:function(e){return t.$refs.options.toggle()}}}),n("k-button",{staticClass:"k-block-options-button k-sort-handle",attrs:{tooltip:t.$t("sort"),icon:"sort"},on:{keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"up",38,e.key,["Up","ArrowUp"])?null:(e.preventDefault(),t.$emit("sortUp"))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"])?null:(e.preventDefault(),t.$emit("sortDown"))}]}}),n("k-dropdown-content",{ref:"options",attrs:{align:"right"}},[n("k-dropdown-item",{attrs:{disabled:t.isFull,icon:"angle-up"},on:{click:function(e){return t.$emit("chooseToPrepend")}}},[t._v(" "+t._s(t.$t("insert.before"))+" ")]),n("k-dropdown-item",{attrs:{disabled:t.isFull,icon:"angle-down"},on:{click:function(e){return t.$emit("chooseToAppend")}}},[t._v(" "+t._s(t.$t("insert.after"))+" ")]),n("hr"),t.isEditable?n("k-dropdown-item",{attrs:{icon:"edit"},on:{click:function(e){return t.$emit("open")}}},[t._v(" "+t._s(t.$t("edit"))+" ")]):t._e(),n("k-dropdown-item",{attrs:{icon:"refresh"},on:{click:function(e){return t.$emit("chooseToConvert")}}},[t._v(" "+t._s(t.$t("field.blocks.changeType"))+" ")]),n("hr"),n("k-dropdown-item",{attrs:{icon:"template"},on:{click:function(e){return t.$emit("copy")}}},[t._v(" "+t._s(t.$t("copy"))+" ")]),n("k-dropdown-item",{attrs:{icon:"download"},on:{click:function(e){return t.$emit("paste")}}},[t._v(" "+t._s(t.$t("paste.after"))+" ")]),n("hr"),n("k-dropdown-item",{attrs:{icon:t.isHidden?"preview":"hidden"},on:{click:function(e){return t.$emit(t.isHidden?"show":"hide")}}},[t._v(" "+t._s(!0===t.isHidden?t.$t("show"):t.$t("hide"))+" ")]),n("k-dropdown-item",{attrs:{disabled:t.isFull,icon:"copy"},on:{click:function(e){return t.$emit("duplicate")}}},[t._v(" "+t._s(t.$t("duplicate"))+" ")]),n("hr"),n("k-dropdown-item",{attrs:{icon:"trash"},on:{click:function(e){return t.$emit("confirmToRemove")}}},[t._v(" "+t._s(t.$t("delete"))+" ")])],1)]],2)}),[],!1,Gg,null,null,null);function Gg(t){for(let e in Kg)this[e]=Kg[e]}var Vg=function(){return Jg.exports}();const Wg={};var Xg=Ft({inheritAttrs:!1,props:{endpoint:String,fieldsets:Object,fieldsetGroups:Object},data(){return{dialogIsOpen:!1,disabled:[],headline:null,payload:null,event:"add",groups:this.createGroups()}},computed:{shortcut(){return this.$helper.keyboard.metaKey()+"+v"}},methods:{add(t){this.$emit(this.event,t,this.payload),this.$refs.dialog.close()},close(){this.$refs.dialog.close()},createGroups(){let t={},e=0;const n=this.fieldsetGroups||{blocks:{label:this.$t("field.blocks.fieldsets.label"),sets:Object.keys(this.fieldsets)}};return Object.keys(n).forEach((i=>{let s=n[i];s.open=!1!==s.open,s.fieldsets=s.sets.filter((t=>this.fieldsets[t])).map((t=>(e++,l(a({},this.fieldsets[t]),{index:e})))),0!==s.fieldsets.length&&(t[i]=s)})),t},isOpen(){return this.dialogIsOpen},navigate(t){var e,n;null==(n=null==(e=this.$refs["fieldset-"+t])?void 0:e[0])||n.focus()},onClose(){this.dialogIsOpen=!1,this.$events.$off("paste",this.close)},onOpen(){this.dialogIsOpen=!0,this.$events.$on("paste",this.close)},open(t,e={}){const n=a({event:"add",disabled:[],headline:null},e);this.event=n.event,this.disabled=n.disabled,this.headline=n.headline,this.payload=t,this.$refs.dialog.open()}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",staticClass:"k-block-selector",attrs:{"cancel-button":!1,"submit-button":!1,size:"medium"},on:{open:t.onOpen,close:t.onClose}},[t.headline?n("k-headline",[t._v(" "+t._s(t.headline)+" ")]):t._e(),t._l(t.groups,(function(e,i){return n("details",{key:i,attrs:{open:e.open}},[n("summary",[t._v(t._s(e.label))]),n("div",{staticClass:"k-block-types"},t._l(e.fieldsets,(function(e){return n("k-button",{key:e.name,ref:"fieldset-"+e.index,refInFor:!0,attrs:{disabled:t.disabled.includes(e.type),icon:e.icon||"box",text:e.name},on:{keydown:[function(n){return!n.type.indexOf("key")&&t._k(n.keyCode,"up",38,n.key,["Up","ArrowUp"])?null:t.navigate(e.index-1)},function(n){return!n.type.indexOf("key")&&t._k(n.keyCode,"down",40,n.key,["Down","ArrowDown"])?null:t.navigate(e.index+1)}],click:function(n){return t.add(e.type)}}})})),1)])})),n("p",{staticClass:"k-clipboard-hint",domProps:{innerHTML:t._s(t.$t("field.blocks.fieldsets.paste",{shortcut:t.shortcut}))}})],2)}),[],!1,Zg,null,null,null);function Zg(t){for(let e in Wg)this[e]=Wg[e]}var Qg=function(){return Xg.exports}();const tk={};var ek=Ft({inheritAttrs:!1,props:{fieldset:Object,content:Object},computed:{icon(){return this.fieldset.icon||"box"},label(){if(!this.fieldset.label||0===this.fieldset.label.length)return!1;if(this.fieldset.label===this.fieldset.name)return!1;const t=this.$helper.string.template(this.fieldset.label,this.content);return"…"!==t&&t},name(){return this.fieldset.name}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",t._g({staticClass:"k-block-title"},t.$listeners),[n("k-icon",{staticClass:"k-block-icon",attrs:{type:t.icon}}),n("span",{staticClass:"k-block-name"},[t._v(" "+t._s(t.name)+" ")]),t.label?n("span",{staticClass:"k-block-label"},[t._v(" "+t._s(t.label)+" ")]):t._e()],1)}),[],!1,nk,null,null,null);function nk(t){for(let e in tk)this[e]=tk[e]}var ik=function(){return ek.exports}();const sk={};var ok=Ft({inheritAttrs:!1,props:{content:[Object,Array],fieldset:Object},methods:{field(t,e=null){let n=null;return Object.values(this.fieldset.tabs).forEach((e=>{e.fields[t]&&(n=e.fields[t])})),n||e},open(){this.$emit("open")},update(t){this.$emit("update",a(a({},this.content),t))}}},undefined,undefined,!1,rk,null,null,null);function rk(t){for(let e in sk)this[e]=sk[e]}var ak=function(){return ok.exports}();u.component("k-block",Ig),u.component("k-blocks",qg),u.component("k-block-figure",Hg),u.component("k-block-options",Vg),u.component("k-block-selector",Qg),u.component("k-block-title",ik),u.component("k-block-type",ak);const lk={"./Types/Code.vue":Sm,"./Types/Default.vue":Tm,"./Types/Gallery.vue":Dm,"./Types/Heading.vue":Fm,"./Types/Image.vue":Um,"./Types/Line.vue":Wm,"./Types/List.vue":eg,"./Types/Markdown.vue":rg,"./Types/Quote.vue":dg,"./Types/Table.vue":gg,"./Types/Text.vue":$g,"./Types/Video.vue":Cg};Object.keys(lk).map((t=>{const e=t.match(/\/([a-zA-Z]*)\.vue/)[1].toLowerCase();let n=lk[t].default;n.extends=ak,u.component("k-block-type-"+e,n)}));var uk={inheritAttrs:!1,props:{column:{type:Object,default:()=>({})},field:Object,value:{}}};const ck={};var dk=Ft({inheritAttrs:!1,mixins:[uk],props:{value:[Array,String]},computed:{bubbles(){var t,e;let n=this.value;const i=(null==(t=this.column)?void 0:t.options)||(null==(e=this.field)?void 0:e.options)||[];return"string"==typeof n&&(n=n.split(",")),n.map((t=>{"string"==typeof t&&(t={value:t,text:t});for(const e of i)e.value===t.value&&(t.text=e.text);return a({back:"light",color:"black"},t)}))}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-bubbles-field-preview",class:t.$options.class},[n("k-bubbles",{attrs:{bubbles:t.bubbles}})],1)}),[],!1,pk,null,null,null);function pk(t){for(let e in ck)this[e]=ck[e]}var hk=function(){return dk.exports}();const fk={};var mk=Ft({inheritAttrs:!1,extends:hk,class:"k-array-field-preview",computed:{bubbles(){return[{text:1===this.value.length?`1 ${this.$t("entry")}`:`${this.value.length} ${this.$t("entries")}`}]}}},undefined,undefined,!1,gk,null,null,null);function gk(t){for(let e in fk)this[e]=fk[e]}var kk=function(){return mk.exports}();const vk={};var bk=Ft({mixins:[uk],inheritAttrs:!1,computed:{text(){return this.value}}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("p",{staticClass:"k-text-field-preview",class:t.$options.class},[t._v(" "+t._s(t.column.before)+" "),t._t("default",(function(){return[t._v(t._s(t.text))]})),t._v(" "+t._s(t.column.after)+" ")],2)}),[],!1,yk,null,null,null);function yk(t){for(let e in vk)this[e]=vk[e]}var $k=function(){return bk.exports}();const _k={};var xk=Ft({inheritAttrs:!1,extends:$k,props:{value:String},class:"k-date-field-preview",computed:{text(){var t,e,n,i,s,o;if("string"!=typeof this.value)return"";const r=this.$library.dayjs(this.value);if(!r)return"";let a=(null==(t=this.column)?void 0:t.display)||(null==(e=this.field)?void 0:e.display)||"YYYY-MM-DD",l=(null==(i=null==(n=this.column)?void 0:n.time)?void 0:i.display)||(null==(o=null==(s=this.field)?void 0:s.time)?void 0:o.display);return l&&(a+=" "+l),r.format(a)}}},undefined,undefined,!1,wk,null,null,null);function wk(t){for(let e in _k)this[e]=_k[e]}var Sk=function(){return xk.exports}();const Ck={};var Ok=Ft({mixins:[uk],props:{value:[String,Object]},computed:{link(){return"object"==typeof this.value?this.value.href:this.value},text(){return"object"==typeof this.value?this.value.text:this.link}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("p",{staticClass:"k-url-field-preview",class:t.$options.class},[t._v(" "+t._s(t.column.before)+" "),n("k-link",{attrs:{to:t.link},nativeOn:{click:function(t){t.stopPropagation()}}},[t._v(" "+t._s(t.text)+" ")]),t._v(" "+t._s(t.column.after)+" ")],1)}),[],!1,Ek,null,null,null);function Ek(t){for(let e in Ck)this[e]=Ck[e]}var Ak=function(){return Ok.exports}();const Tk={};var Ik=Ft({extends:Ak,class:"k-email-field-preview"},undefined,undefined,!1,Mk,null,null,null);function Mk(t){for(let e in Tk)this[e]=Tk[e]}var Lk=function(){return Ik.exports}();const jk={};var Dk=Ft({inheritAttrs:!1,extends:hk,class:"k-files-field-preview",computed:{bubbles(){return this.value.map((t=>({text:t.filename,link:t.link,image:t.image})))}}},undefined,undefined,!1,Bk,null,null,null);function Bk(t){for(let e in jk)this[e]=jk[e]}var Pk=function(){return Dk.exports}();const Nk={};var qk=Ft({mixins:[uk],inheritAttrs:!1,props:{value:Object}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("k-status-icon",t._b({staticClass:"k-flag-field-preview"},"k-status-icon",t.value,!1))}),[],!1,Fk,null,null,null);function Fk(t){for(let e in Nk)this[e]=Nk[e]}var Rk=function(){return qk.exports}();const zk={};var Yk=Ft({inheritAttrs:!1,mixins:[uk],props:{value:String},computed:{html(){return this.value}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-html-field-preview",class:t.$options.class},[t._v(" "+t._s(t.column.before)+" "),n("div",{domProps:{innerHTML:t._s(t.html)}}),t._v(" "+t._s(t.column.after)+" ")])}),[],!1,Hk,null,null,null);function Hk(t){for(let e in zk)this[e]=zk[e]}var Uk=function(){return Yk.exports}();const Kk={};var Jk=Ft({inheritAttrs:!1,mixins:[uk],props:{value:[Object]}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("k-item-image",{staticClass:"k-image-field-preview",attrs:{image:t.value,layout:"list"}})}),[],!1,Gk,null,null,null);function Gk(t){for(let e in Kk)this[e]=Kk[e]}var Vk=function(){return Jk.exports}();const Wk={};var Xk=Ft({inheritAttrs:!1,extends:hk,class:"k-pages-field-preview"},undefined,undefined,!1,Zk,null,null,null);function Zk(t){for(let e in Wk)this[e]=Wk[e]}var Qk=function(){return Xk.exports}();const tv={};var ev=Ft({inheritAttrs:!1,extends:$k,props:{value:String},class:"k-time-field-preview",computed:{text(){const t=this.$library.dayjs.iso(this.value,"time");return(null==t?void 0:t.format(this.field.display))||""}}},undefined,undefined,!1,nv,null,null,null);function nv(t){for(let e in tv)this[e]=tv[e]}var iv=function(){return ev.exports}();const sv={props:{field:Object,value:Boolean,column:Object},computed:{text(){return!1!==this.column.text?this.field.text:null}}},ov={};var rv=Ft(sv,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("k-input",{staticClass:"k-toggle-field-preview",attrs:{text:t.text,value:t.value,type:"toggle"},on:{input:function(e){return t.$emit("input",e)}}})}),[],!1,av,null,null,null);function av(t){for(let e in ov)this[e]=ov[e]}var lv=function(){return rv.exports}();const uv={};var cv=Ft({inheritAttrs:!1,extends:hk,class:"k-users-field-preview",computed:{bubble(){return this.value.map((t=>({text:t.username,link:t.link,image:t.image})))}}},undefined,undefined,!1,dv,null,null,null);function dv(t){for(let e in uv)this[e]=uv[e]}var pv=function(){return cv.exports}();u.component("k-array-field-preview",kk),u.component("k-bubbles-field-preview",hk),u.component("k-date-field-preview",Sk),u.component("k-email-field-preview",Lk),u.component("k-files-field-preview",Pk),u.component("k-flag-field-preview",Rk),u.component("k-html-field-preview",Uk),u.component("k-image-field-preview",Vk),u.component("k-pages-field-preview",Qk),u.component("k-text-field-preview",$k),u.component("k-toggle-field-preview",lv),u.component("k-time-field-preview",iv),u.component("k-url-field-preview",Ak),u.component("k-users-field-preview",pv),u.component("k-list-field-preview",Uk),u.component("k-writer-field-preview",Uk),u.component("k-checkboxes-field-preview",hk),u.component("k-multiselect-field-preview",hk),u.component("k-radio-field-preview",hk),u.component("k-select-field-preview",hk),u.component("k-tags-field-preview",hk),u.component("k-dialog",Ut),u.component("k-error-dialog",Wt),u.component("k-fiber-dialog",te),u.component("k-files-dialog",oe),u.component("k-form-dialog",ce),u.component("k-language-dialog",fe),u.component("k-pages-dialog",ve),u.component("k-remove-dialog",xe),u.component("k-text-dialog",Oe),u.component("k-users-dialog",Ie),u.component("k-drawer",De),u.component("k-form-drawer",Fe),u.component("k-calendar",We),u.component("k-counter",en),u.component("k-autocomplete",Ue),u.component("k-form",an),u.component("k-form-buttons",pn),u.component("k-form-indicator",gn),u.component("k-field",In),u.component("k-fieldset",Bn),u.component("k-input",Rn),u.component("k-login",Un),u.component("k-login-code",Vn),u.component("k-times",Qn),u.component("k-upload",si),u.component("k-writer",Xi),u.component("k-login-alert",es),u.component("k-structure-form",os),u.component("k-toolbar",ds),u.component("k-toolbar-email-dialog",ms),u.component("k-toolbar-link-dialog",bs),u.component("k-aspect-ratio",eu),u.component("k-bar",ou),u.component("k-box",cu),u.component("k-bubble",fu),u.component("k-bubbles",vu),u.component("k-collection",xu),u.component("k-column",Eu),u.component("k-dropzone",Lu),u.component("k-empty",Pu),u.component("k-file-preview",Ru),u.component("k-grid",Uu),u.component("k-header",Wu),u.component("k-inside",tc),u.component("k-item",rc),u.component("k-item-image",dc),u.component("k-items",gc),u.component("k-overlay",$c),u.component("k-panel",Sc),u.component("k-stats",Ac),u.component("k-table",jc),u.component("k-table-cell",qc),u.component("k-tabs",Yc),u.component("k-view",Jc),u.component("k-draggable",Zc),u.component("k-error-boundary",nd),u.component("k-fatal",rd),u.component("k-headline",cd),u.component("k-icon",fd),u.component("k-icons",$d),u.component("k-image",Cd),u.component("k-loader",Td),u.component("k-offline-warning",jd),u.component("k-progress",qd),u.component("k-registration",Yd),u.component("k-status-icon",Zd),u.component("k-sort-handle",Jd),u.component("k-text",np),u.component("k-user-info",rp),u.component("k-breadcrumb",cp),u.component("k-button",mp),u.component("k-button-disabled",yp),u.component("k-button-group",wp),u.component("k-button-link",Ap),u.component("k-button-native",Dp),u.component("k-dropdown",qp),u.component("k-dropdown-content",Hp),u.component("k-dropdown-item",Vp),u.component("k-languages-dropdown",sh),u.component("k-link",th),u.component("k-options-dropdown",uh),u.component("k-pagination",fh),u.component("k-prev-next",bh),u.component("k-search",xh),u.component("k-tag",Eh),u.component("k-topbar",Lh),u.component("k-account-view",Sf),u.component("k-error-view",Af),u.component("k-file-view",Lf),u.component("k-installation-view",Nf),u.component("k-languages-view",zf),u.component("k-login-view",Vf),u.component("k-page-view",Qf),u.component("k-plugin-view",im),u.component("k-reset-password-view",am),u.component("k-site-view",dm),u.component("k-system-view",gm),u.component("k-users-view",ym),u.component("k-user-view",$f);u.config.productionTip=!1,u.config.devtools=!0,u.use(ct),u.use(Dt),u.use(Pt),u.use(qt),u.use(dt),u.use(Bt),u.use(vt),u.use(tt,ut),u.use(G),u.use(V),new u({store:ut,created(){window.panel.$vue=window.panel.app=this,window.panel.plugins.created.forEach((t=>t(this))),this.$store.dispatch("content/init")},render:t=>t(et)}).$mount("#app"); diff --git a/kirby/panel/dist/js/plugins.js b/kirby/panel/dist/js/plugins.js old mode 100644 new mode 100755 diff --git a/kirby/panel/dist/js/vendor.js b/kirby/panel/dist/js/vendor.js old mode 100644 new mode 100755 index b552653..6df18c1 --- a/kirby/panel/dist/js/vendor.js +++ b/kirby/panel/dist/js/vendor.js @@ -3,17 +3,17 @@ * (c) 2014-2021 Evan You * Released under the MIT License. */ -var t=Object.freeze({});function e(t){return null==t}function n(t){return null!=t}function r(t){return!0===t}function o(t){return"string"==typeof t||"number"==typeof t||"symbol"==typeof t||"boolean"==typeof t}function i(t){return null!==t&&"object"==typeof t}var a=Object.prototype.toString;function s(t){return"[object Object]"===a.call(t)}function c(t){var e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function l(t){return n(t)&&"function"==typeof t.then&&"function"==typeof t.catch}function u(t){return null==t?"":Array.isArray(t)||s(t)&&t.toString===a?JSON.stringify(t,null,2):String(t)}function f(t){var e=parseFloat(t);return isNaN(e)?t:e}function p(t,e){for(var n=Object.create(null),r=t.split(","),o=0;o-1)return t.splice(n,1)}}var m=Object.prototype.hasOwnProperty;function g(t,e){return m.call(t,e)}function y(t){var e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}var b=/-(\w)/g,w=y((function(t){return t.replace(b,(function(t,e){return e?e.toUpperCase():""}))})),x=y((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})),S=/\B([A-Z])/g,k=y((function(t){return t.replace(S,"-$1").toLowerCase()}));var _=Function.prototype.bind?function(t,e){return t.bind(e)}:function(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n};function O(t,e){e=e||0;for(var n=t.length-e,r=new Array(n);n--;)r[n]=t[n+e];return r}function C(t,e){for(var n in e)t[n]=e[n];return t}function M(t){for(var e={},n=0;n0,Y=H&&H.indexOf("edge/")>0;H&&H.indexOf("android");var U=H&&/iphone|ipad|ipod|ios/.test(H)||"ios"===q;H&&/chrome\/\d+/.test(H),H&&/phantomjs/.test(H);var X,G=H&&H.match(/firefox\/(\d+)/),Z={}.watch,Q=!1;if(V)try{var tt={};Object.defineProperty(tt,"passive",{get:function(){Q=!0}}),window.addEventListener("test-passive",null,tt)}catch(My){}var et=function(){return void 0===X&&(X=!V&&!W&&"undefined"!=typeof global&&(global.process&&"server"===global.process.env.VUE_ENV)),X},nt=V&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function rt(t){return"function"==typeof t&&/native code/.test(t.toString())}var ot,it="undefined"!=typeof Symbol&&rt(Symbol)&&"undefined"!=typeof Reflect&&rt(Reflect.ownKeys);ot="undefined"!=typeof Set&&rt(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var at=D,st=0,ct=function(){this.id=st++,this.subs=[]};ct.prototype.addSub=function(t){this.subs.push(t)},ct.prototype.removeSub=function(t){v(this.subs,t)},ct.prototype.depend=function(){ct.target&&ct.target.addDep(this)},ct.prototype.notify=function(){for(var t=this.subs.slice(),e=0,n=t.length;e-1)if(i&&!g(o,"default"))a=!1;else if(""===a||a===k(t)){var c=Lt(String,o.type);(c<0||s0&&(ue((s=fe(s,(i||"")+"_"+a))[0])&&ue(l)&&(u[c]=vt(l.text+s[0].text),s.shift()),u.push.apply(u,s)):o(s)?ue(l)?u[c]=vt(l.text+s):""!==s&&u.push(vt(s)):ue(s)&&ue(l)?u[c]=vt(l.text+s.text):(r(t._isVList)&&n(s.tag)&&e(s.key)&&n(i)&&(s.key="__vlist"+i+"_"+a+"__"),u.push(s)));return u}function pe(t,e){if(t){for(var n=Object.create(null),r=it?Reflect.ownKeys(t):Object.keys(t),o=0;o0,a=e?!!e.$stable:!i,s=e&&e.$key;if(e){if(e._normalized)return e._normalized;if(a&&r&&r!==t&&s===r.$key&&!i&&!r.$hasNormal)return r;for(var c in o={},e)e[c]&&"$"!==c[0]&&(o[c]=ge(n,c,e[c]))}else o={};for(var l in n)l in o||(o[l]=ye(n,l));return e&&Object.isExtensible(e)&&(e._normalized=o),F(o,"$stable",a),F(o,"$key",s),F(o,"$hasNormal",i),o}function ge(t,e,n){var r=function(){var t=arguments.length?n.apply(null,arguments):n({}),e=(t=t&&"object"==typeof t&&!Array.isArray(t)?[t]:le(t))&&t[0];return t&&(!e||1===t.length&&e.isComment&&!ve(e))?void 0:t};return n.proxy&&Object.defineProperty(t,e,{get:r,enumerable:!0,configurable:!0}),r}function ye(t,e){return function(){return t[e]}}function be(t,e){var r,o,a,s,c;if(Array.isArray(t)||"string"==typeof t)for(r=new Array(t.length),o=0,a=t.length;odocument.createEvent("Event").timeStamp&&(fn=function(){return pn.now()})}function dn(){var t,e;for(un=fn(),cn=!0,rn.sort((function(t,e){return t.id-e.id})),ln=0;lnln&&rn[n].id>t.id;)n--;rn.splice(n+1,0,t)}else rn.push(t);sn||(sn=!0,te(dn))}}(this)},vn.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||i(t)||this.deep){var e=this.value;if(this.value=t,this.user){var n='callback for watcher "'+this.expression+'"';Vt(this.cb,this.vm,[t,e],this.vm,n)}else this.cb.call(this.vm,t,e)}}},vn.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},vn.prototype.depend=function(){for(var t=this.deps.length;t--;)this.deps[t].depend()},vn.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||v(this.vm._watchers,this);for(var t=this.deps.length;t--;)this.deps[t].removeSub(this);this.active=!1}};var mn={enumerable:!0,configurable:!0,get:D,set:D};function gn(t,e,n){mn.get=function(){return this[e][n]},mn.set=function(t){this[e][n]=t},Object.defineProperty(t,n,mn)}function yn(t){t._watchers=[];var e=t.$options;e.props&&function(t,e){var n=t.$options.propsData||{},r=t._props={},o=t.$options._propKeys=[];t.$parent&&xt(!1);var i=function(i){o.push(i);var a=jt(i,e,n,t);_t(r,i,a),i in t||gn(t,"_props",i)};for(var a in e)i(a);xt(!0)}(t,e.props),e.methods&&function(t,e){for(var n in t.$options.props,e)t[n]="function"!=typeof e[n]?D:_(e[n],t)}(t,e.methods),e.data?function(t){var e=t.$options.data;s(e=t._data="function"==typeof e?function(t,e){ut();try{return t.call(e,e)}catch(My){return Bt(My,e,"data()"),{}}finally{ft()}}(e,t):e||{})||(e={});var n=Object.keys(e),r=t.$options.props;t.$options.methods;var o=n.length;for(;o--;){var i=n[o];r&&g(r,i)||z(i)||gn(t,"_data",i)}kt(e,!0)}(t):kt(t._data={},!0),e.computed&&function(t,e){var n=t._computedWatchers=Object.create(null),r=et();for(var o in e){var i=e[o],a="function"==typeof i?i:i.get;r||(n[o]=new vn(t,a||D,D,bn)),o in t||wn(t,o,i)}}(t,e.computed),e.watch&&e.watch!==Z&&function(t,e){for(var n in e){var r=e[n];if(Array.isArray(r))for(var o=0;o-1:"string"==typeof t?t.split(",").indexOf(e)>-1:(n=t,"[object RegExp]"===a.call(n)&&t.test(e));var n}function $n(t,e){var n=t.cache,r=t.keys,o=t._vnode;for(var i in n){var a=n[i];if(a){var s=a.name;s&&!e(s)&&An(n,i,r,o)}}}function An(t,e,n,r){var o=t[e];!o||r&&o.tag===r.tag||o.componentInstance.$destroy(),t[e]=null,v(n,e)}Cn.prototype._init=function(e){var n=this;n._uid=_n++,n._isVue=!0,e&&e._isComponent?function(t,e){var n=t.$options=Object.create(t.constructor.options),r=e._parentVnode;n.parent=e.parent,n._parentVnode=r;var o=r.componentOptions;n.propsData=o.propsData,n._parentListeners=o.listeners,n._renderChildren=o.children,n._componentTag=o.tag,e.render&&(n.render=e.render,n.staticRenderFns=e.staticRenderFns)}(n,e):n.$options=Pt(On(n.constructor),e||{},n),n._renderProxy=n,n._self=n,function(t){var e=t.$options,n=e.parent;if(n&&!e.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(t)}t.$parent=n,t.$root=n?n.$root:t,t.$children=[],t.$refs={},t._watcher=null,t._inactive=null,t._directInactive=!1,t._isMounted=!1,t._isDestroyed=!1,t._isBeingDestroyed=!1}(n),function(t){t._events=Object.create(null),t._hasHookEvent=!1;var e=t.$options._parentListeners;e&&Xe(t,e)}(n),function(e){e._vnode=null,e._staticTrees=null;var n=e.$options,r=e.$vnode=n._parentVnode,o=r&&r.context;e.$slots=de(n._renderChildren,o),e.$scopedSlots=t,e._c=function(t,n,r,o){return Be(e,t,n,r,o,!1)},e.$createElement=function(t,n,r,o){return Be(e,t,n,r,o,!0)};var i=r&&r.data;_t(e,"$attrs",i&&i.attrs||t,null,!0),_t(e,"$listeners",n._parentListeners||t,null,!0)}(n),nn(n,"beforeCreate"),function(t){var e=pe(t.$options.inject,t);e&&(xt(!1),Object.keys(e).forEach((function(n){_t(t,n,e[n])})),xt(!0))}(n),yn(n),function(t){var e=t.$options.provide;e&&(t._provided="function"==typeof e?e.call(t):e)}(n),nn(n,"created"),n.$options.el&&n.$mount(n.$options.el)},function(t){var e={get:function(){return this._data}},n={get:function(){return this._props}};Object.defineProperty(t.prototype,"$data",e),Object.defineProperty(t.prototype,"$props",n),t.prototype.$set=Ot,t.prototype.$delete=Ct,t.prototype.$watch=function(t,e,n){var r=this;if(s(e))return kn(r,t,e,n);(n=n||{}).user=!0;var o=new vn(r,t,e,n);if(n.immediate){var i='callback for immediate watcher "'+o.expression+'"';ut(),Vt(e,r,[o.value],r,i),ft()}return function(){o.teardown()}}}(Cn),function(t){var e=/^hook:/;t.prototype.$on=function(t,n){var r=this;if(Array.isArray(t))for(var o=0,i=t.length;o1?O(n):n;for(var r=O(arguments,1),o='event handler for "'+t+'"',i=0,a=n.length;iparseInt(this.max)&&An(e,n[0],n,this._vnode),this.vnodeToCache=null}}},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var t in this.cache)An(this.cache,t,this.keys)},mounted:function(){var t=this;this.cacheVNode(),this.$watch("include",(function(e){$n(t,(function(t){return Tn(e,t)}))})),this.$watch("exclude",(function(e){$n(t,(function(t){return!Tn(e,t)}))}))},updated:function(){this.cacheVNode()},render:function(){var t=this.$slots.default,e=Je(t),n=e&&e.componentOptions;if(n){var r=Dn(n),o=this.include,i=this.exclude;if(o&&(!r||!Tn(o,r))||i&&r&&Tn(i,r))return e;var a=this.cache,s=this.keys,c=null==e.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):e.key;a[c]?(e.componentInstance=a[c].componentInstance,v(s,c),s.push(c)):(this.vnodeToCache=e,this.keyToCache=c),e.data.keepAlive=!0}return e||t&&t[0]}},Pn={KeepAlive:Nn};!function(t){var e={get:function(){return j}};Object.defineProperty(t,"config",e),t.util={warn:at,extend:C,mergeOptions:Pt,defineReactive:_t},t.set=Ot,t.delete=Ct,t.nextTick=te,t.observable=function(t){return kt(t),t},t.options=Object.create(null),P.forEach((function(e){t.options[e+"s"]=Object.create(null)})),t.options._base=t,C(t.options.components,Pn),function(t){t.use=function(t){var e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;var n=O(arguments,1);return n.unshift(this),"function"==typeof t.install?t.install.apply(t,n):"function"==typeof t&&t.apply(null,n),e.push(t),this}}(t),function(t){t.mixin=function(t){return this.options=Pt(this.options,t),this}}(t),Mn(t),function(t){P.forEach((function(e){t[e]=function(t,n){return n?("component"===e&&s(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&"function"==typeof n&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}}))}(t)}(Cn),Object.defineProperty(Cn.prototype,"$isServer",{get:et}),Object.defineProperty(Cn.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Cn,"FunctionalRenderContext",{value:Pe}),Cn.version="2.6.14";var In=p("style,class"),jn=p("input,textarea,option,select,progress"),Rn=function(t,e,n){return"value"===n&&jn(t)&&"button"!==e||"selected"===n&&"option"===t||"checked"===n&&"input"===t||"muted"===n&&"video"===t},zn=p("contenteditable,draggable,spellcheck"),Fn=p("events,caret,typing,plaintext-only"),Ln=p("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,truespeed,typemustmatch,visible"),Bn="http://www.w3.org/1999/xlink",Vn=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},Wn=function(t){return Vn(t)?t.slice(6,t.length):""},qn=function(t){return null==t||!1===t};function Hn(t){for(var e=t.data,r=t,o=t;n(o.componentInstance);)(o=o.componentInstance._vnode)&&o.data&&(e=Jn(o.data,e));for(;n(r=r.parent);)r&&r.data&&(e=Jn(e,r.data));return function(t,e){if(n(t)||n(e))return Kn(t,Yn(e));return""}(e.staticClass,e.class)}function Jn(t,e){return{staticClass:Kn(t.staticClass,e.staticClass),class:n(t.class)?[t.class,e.class]:e.class}}function Kn(t,e){return t?e?t+" "+e:t:e||""}function Yn(t){return Array.isArray(t)?function(t){for(var e,r="",o=0,i=t.length;o-1?br(t,e,n):Ln(e)?qn(n)?t.removeAttribute(e):(n="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,n)):zn(e)?t.setAttribute(e,function(t,e){return qn(e)||"false"===e?"false":"contenteditable"===t&&Fn(e)?e:"true"}(e,n)):Vn(e)?qn(n)?t.removeAttributeNS(Bn,Wn(e)):t.setAttributeNS(Bn,e,n):br(t,e,n)}function br(t,e,n){if(qn(n))t.removeAttribute(e);else{if(J&&!K&&"TEXTAREA"===t.tagName&&"placeholder"===e&&""!==n&&!t.__ieph){var r=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",r)};t.addEventListener("input",r),t.__ieph=!0}t.setAttribute(e,n)}}var wr={create:gr,update:gr};function xr(t,r){var o=r.elm,i=r.data,a=t.data;if(!(e(i.staticClass)&&e(i.class)&&(e(a)||e(a.staticClass)&&e(a.class)))){var s=Hn(r),c=o._transitionClasses;n(c)&&(s=Kn(s,Yn(c))),s!==o._prevClass&&(o.setAttribute("class",s),o._prevClass=s)}}var Sr,kr,_r,Or,Cr,Mr,Dr={create:xr,update:xr},Tr=/[\w).+\-_$\]]/;function $r(t){var e,n,r,o,i,a=!1,s=!1,c=!1,l=!1,u=0,f=0,p=0,d=0;for(r=0;r=0&&" "===(v=t.charAt(h));h--);v&&Tr.test(v)||(l=!0)}}else void 0===o?(d=r+1,o=t.slice(0,r).trim()):m();function m(){(i||(i=[])).push(t.slice(d,r).trim()),d=r+1}if(void 0===o?o=t.slice(0,r).trim():0!==d&&m(),i)for(r=0;r-1?{exp:t.slice(0,Or),key:'"'+t.slice(Or+1)+'"'}:{exp:t,key:null};kr=t,Or=Cr=Mr=0;for(;!Kr();)Yr(_r=Jr())?Xr(_r):91===_r&&Ur(_r);return{exp:t.slice(0,Cr),key:t.slice(Cr+1,Mr)}}(t);return null===n.key?t+"="+e:"$set("+n.exp+", "+n.key+", "+e+")"}function Jr(){return kr.charCodeAt(++Or)}function Kr(){return Or>=Sr}function Yr(t){return 34===t||39===t}function Ur(t){var e=1;for(Cr=Or;!Kr();)if(Yr(t=Jr()))Xr(t);else if(91===t&&e++,93===t&&e--,0===e){Mr=Or;break}}function Xr(t){for(var e=t;!Kr()&&(t=Jr())!==e;);}var Gr;function Zr(t,e,n){var r=Gr;return function o(){var i=e.apply(null,arguments);null!==i&&eo(t,o,n,r)}}var Qr=Jt&&!(G&&Number(G[1])<=53);function to(t,e,n,r){if(Qr){var o=un,i=e;e=i._wrapper=function(t){if(t.target===t.currentTarget||t.timeStamp>=o||t.timeStamp<=0||t.target.ownerDocument!==document)return i.apply(this,arguments)}}Gr.addEventListener(t,e,Q?{capture:n,passive:r}:n)}function eo(t,e,n,r){(r||Gr).removeEventListener(t,e._wrapper||e,n)}function no(t,r){if(!e(t.data.on)||!e(r.data.on)){var o=r.data.on||{},i=t.data.on||{};Gr=r.elm,function(t){if(n(t.__r)){var e=J?"change":"input";t[e]=[].concat(t.__r,t[e]||[]),delete t.__r}n(t.__c)&&(t.change=[].concat(t.__c,t.change||[]),delete t.__c)}(o),ae(o,i,to,eo,Zr,r.context),Gr=void 0}}var ro,oo={create:no,update:no};function io(t,r){if(!e(t.data.domProps)||!e(r.data.domProps)){var o,i,a=r.elm,s=t.data.domProps||{},c=r.data.domProps||{};for(o in n(c.__ob__)&&(c=r.data.domProps=C({},c)),s)o in c||(a[o]="");for(o in c){if(i=c[o],"textContent"===o||"innerHTML"===o){if(r.children&&(r.children.length=0),i===s[o])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===o&&"PROGRESS"!==a.tagName){a._value=i;var l=e(i)?"":String(i);ao(a,l)&&(a.value=l)}else if("innerHTML"===o&&Gn(a.tagName)&&e(a.innerHTML)){(ro=ro||document.createElement("div")).innerHTML=""+i+"";for(var u=ro.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;u.firstChild;)a.appendChild(u.firstChild)}else if(i!==s[o])try{a[o]=i}catch(My){}}}}function ao(t,e){return!t.composing&&("OPTION"===t.tagName||function(t,e){var n=!0;try{n=document.activeElement!==t}catch(My){}return n&&t.value!==e}(t,e)||function(t,e){var r=t.value,o=t._vModifiers;if(n(o)){if(o.number)return f(r)!==f(e);if(o.trim)return r.trim()!==e.trim()}return r!==e}(t,e))}var so={create:io,update:io},co=y((function(t){var e={},n=/:(.+)/;return t.split(/;(?![^(]*\))/g).forEach((function(t){if(t){var r=t.split(n);r.length>1&&(e[r[0].trim()]=r[1].trim())}})),e}));function lo(t){var e=uo(t.style);return t.staticStyle?C(t.staticStyle,e):e}function uo(t){return Array.isArray(t)?M(t):"string"==typeof t?co(t):t}var fo,po=/^--/,ho=/\s*!important$/,vo=function(t,e,n){if(po.test(e))t.style.setProperty(e,n);else if(ho.test(n))t.style.setProperty(k(e),n.replace(ho,""),"important");else{var r=go(e);if(Array.isArray(n))for(var o=0,i=n.length;o-1?e.split(wo).forEach((function(e){return t.classList.add(e)})):t.classList.add(e);else{var n=" "+(t.getAttribute("class")||"")+" ";n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function So(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(wo).forEach((function(e){return t.classList.remove(e)})):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{for(var n=" "+(t.getAttribute("class")||"")+" ",r=" "+e+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?t.setAttribute("class",n):t.removeAttribute("class")}}function ko(t){if(t){if("object"==typeof t){var e={};return!1!==t.css&&C(e,_o(t.name||"v")),C(e,t),e}return"string"==typeof t?_o(t):void 0}}var _o=y((function(t){return{enterClass:t+"-enter",enterToClass:t+"-enter-to",enterActiveClass:t+"-enter-active",leaveClass:t+"-leave",leaveToClass:t+"-leave-to",leaveActiveClass:t+"-leave-active"}})),Oo=V&&!K,Co="transition",Mo="transitionend",Do="animation",To="animationend";Oo&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Co="WebkitTransition",Mo="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Do="WebkitAnimation",To="webkitAnimationEnd"));var $o=V?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()};function Ao(t){$o((function(){$o(t)}))}function Eo(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),xo(t,e))}function No(t,e){t._transitionClasses&&v(t._transitionClasses,e),So(t,e)}function Po(t,e,n){var r=jo(t,e),o=r.type,i=r.timeout,a=r.propCount;if(!o)return n();var s="transition"===o?Mo:To,c=0,l=function(){t.removeEventListener(s,u),n()},u=function(e){e.target===t&&++c>=a&&l()};setTimeout((function(){c0&&(n="transition",u=a,f=i.length):"animation"===e?l>0&&(n="animation",u=l,f=c.length):f=(n=(u=Math.max(a,l))>0?a>l?"transition":"animation":null)?"transition"===n?i.length:c.length:0,{type:n,timeout:u,propCount:f,hasTransform:"transition"===n&&Io.test(r[Co+"Property"])}}function Ro(t,e){for(;t.length1}function Wo(t,e){!0!==e.data.show&&Fo(e)}var qo=function(t){var i,a,s={},c=t.modules,l=t.nodeOps;for(i=0;ih?b(t,e(o[g+1])?null:o[g+1].elm,o,d,g,i):d>g&&x(r,p,h)}(p,v,g,i,u):n(g)?(n(t.text)&&l.setTextContent(p,""),b(p,null,g,0,g.length-1,i)):n(v)?x(v,0,v.length-1):n(t.text)&&l.setTextContent(p,""):t.text!==o.text&&l.setTextContent(p,o.text),n(h)&&n(d=h.hook)&&n(d=d.postpatch)&&d(t,o)}}}function O(t,e,o){if(r(o)&&n(t.parent))t.parent.data.pendingInsert=e;else for(var i=0;i-1,a.selected!==i&&(a.selected=i);else if(A(Uo(a),r))return void(t.selectedIndex!==s&&(t.selectedIndex=s));o||(t.selectedIndex=-1)}}function Yo(t,e){return e.every((function(e){return!A(e,t)}))}function Uo(t){return"_value"in t?t._value:t.value}function Xo(t){t.target.composing=!0}function Go(t){t.target.composing&&(t.target.composing=!1,Zo(t.target,"input"))}function Zo(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function Qo(t){return!t.componentInstance||t.data&&t.data.transition?t:Qo(t.componentInstance._vnode)}var ti={model:Ho,show:{bind:function(t,e,n){var r=e.value,o=(n=Qo(n)).data&&n.data.transition,i=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;r&&o?(n.data.show=!0,Fo(n,(function(){t.style.display=i}))):t.style.display=r?i:"none"},update:function(t,e,n){var r=e.value;!r!=!e.oldValue&&((n=Qo(n)).data&&n.data.transition?(n.data.show=!0,r?Fo(n,(function(){t.style.display=t.__vOriginalDisplay})):Lo(n,(function(){t.style.display="none"}))):t.style.display=r?t.__vOriginalDisplay:"none")},unbind:function(t,e,n,r,o){o||(t.style.display=t.__vOriginalDisplay)}}},ei={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function ni(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?ni(Je(e.children)):t}function ri(t){var e={},n=t.$options;for(var r in n.propsData)e[r]=t[r];var o=n._parentListeners;for(var i in o)e[w(i)]=o[i];return e}function oi(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}var ii=function(t){return t.tag||ve(t)},ai=function(t){return"show"===t.name},si={name:"transition",props:ei,abstract:!0,render:function(t){var e=this,n=this.$slots.default;if(n&&(n=n.filter(ii)).length){var r=this.mode,i=n[0];if(function(t){for(;t=t.parent;)if(t.data.transition)return!0}(this.$vnode))return i;var a=ni(i);if(!a)return i;if(this._leaving)return oi(t,i);var s="__transition-"+this._uid+"-";a.key=null==a.key?a.isComment?s+"comment":s+a.tag:o(a.key)?0===String(a.key).indexOf(s)?a.key:s+a.key:a.key;var c=(a.data||(a.data={})).transition=ri(this),l=this._vnode,u=ni(l);if(a.data.directives&&a.data.directives.some(ai)&&(a.data.show=!0),u&&u.data&&!function(t,e){return e.key===t.key&&e.tag===t.tag}(a,u)&&!ve(u)&&(!u.componentInstance||!u.componentInstance._vnode.isComment)){var f=u.data.transition=C({},c);if("out-in"===r)return this._leaving=!0,se(f,"afterLeave",(function(){e._leaving=!1,e.$forceUpdate()})),oi(t,i);if("in-out"===r){if(ve(a))return l;var p,d=function(){p()};se(c,"afterEnter",d),se(c,"enterCancelled",d),se(f,"delayLeave",(function(t){p=t}))}}return i}}},ci=C({tag:String,moveClass:String},ei);delete ci.mode;var li={props:ci,beforeMount:function(){var t=this,e=this._update;this._update=function(n,r){var o=Ze(t);t.__patch__(t._vnode,t.kept,!1,!0),t._vnode=t.kept,o(),e.call(t,n,r)}},render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,o=this.$slots.default||[],i=this.children=[],a=ri(this),s=0;s-1?tr[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:tr[t]=/HTMLUnknownElement/.test(e.toString())},C(Cn.options.directives,ti),C(Cn.options.components,di),Cn.prototype.__patch__=V?qo:D,Cn.prototype.$mount=function(t,e){return function(t,e,n){var r;return t.$el=e,t.$options.render||(t.$options.render=ht),nn(t,"beforeMount"),r=function(){t._update(t._render(),n)},new vn(t,r,D,{before:function(){t._isMounted&&!t._isDestroyed&&nn(t,"beforeUpdate")}},!0),n=!1,null==t.$vnode&&(t._isMounted=!0,nn(t,"mounted")),t}(this,t=t&&V?nr(t):void 0,e)},V&&setTimeout((function(){j.devtools&&nt&&nt.emit("init",Cn)}),0);var hi=/\{\{((?:.|\r?\n)+?)\}\}/g,vi=/[-.*+?^${}()|[\]\/\\]/g,mi=y((function(t){var e=t[0].replace(vi,"\\$&"),n=t[1].replace(vi,"\\$&");return new RegExp(e+"((?:.|\\n)+?)"+n,"g")}));var gi={staticKeys:["staticClass"],transformNode:function(t,e){e.warn;var n=Br(t,"class");n&&(t.staticClass=JSON.stringify(n));var r=Lr(t,"class",!1);r&&(t.classBinding=r)},genData:function(t){var e="";return t.staticClass&&(e+="staticClass:"+t.staticClass+","),t.classBinding&&(e+="class:"+t.classBinding+","),e}};var yi,bi={staticKeys:["staticStyle"],transformNode:function(t,e){e.warn;var n=Br(t,"style");n&&(t.staticStyle=JSON.stringify(co(n)));var r=Lr(t,"style",!1);r&&(t.styleBinding=r)},genData:function(t){var e="";return t.staticStyle&&(e+="staticStyle:"+t.staticStyle+","),t.styleBinding&&(e+="style:("+t.styleBinding+"),"),e}},wi=function(t){return(yi=yi||document.createElement("div")).innerHTML=t,yi.textContent},xi=p("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),Si=p("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),ki=p("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),_i=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,Oi=/^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+?\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,Ci="[a-zA-Z_][\\-\\.0-9_a-zA-Z"+R.source+"]*",Mi="((?:"+Ci+"\\:)?"+Ci+")",Di=new RegExp("^<"+Mi),Ti=/^\s*(\/?)>/,$i=new RegExp("^<\\/"+Mi+"[^>]*>"),Ai=/^]+>/i,Ei=/^",""":'"',"&":"&"," ":"\n"," ":"\t","'":"'"},Ri=/&(?:lt|gt|quot|amp|#39);/g,zi=/&(?:lt|gt|quot|amp|#39|#10|#9);/g,Fi=p("pre,textarea",!0),Li=function(t,e){return t&&Fi(t)&&"\n"===e[0]};function Bi(t,e){var n=e?zi:Ri;return t.replace(n,(function(t){return ji[t]}))}var Vi,Wi,qi,Hi,Ji,Ki,Yi,Ui,Xi=/^@|^v-on:/,Gi=/^v-|^@|^:|^#/,Zi=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,Qi=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,ta=/^\(|\)$/g,ea=/^\[.*\]$/,na=/:(.*)$/,ra=/^:|^\.|^v-bind:/,oa=/\.[^.\]]+(?=[^\]]*$)/g,ia=/^v-slot(:|$)|^#/,aa=/[\r\n]/,sa=/[ \f\t\r\n]+/g,ca=y(wi);function la(t,e,n){return{type:1,tag:t,attrsList:e,attrsMap:ma(e),rawAttrsMap:{},parent:n,children:[]}}function ua(t,e){Vi=e.warn||Er,Ki=e.isPreTag||T,Yi=e.mustUseProp||T,Ui=e.getTagNamespace||T,e.isReservedTag,qi=Nr(e.modules,"transformNode"),Hi=Nr(e.modules,"preTransformNode"),Ji=Nr(e.modules,"postTransformNode"),Wi=e.delimiters;var n,r,o=[],i=!1!==e.preserveWhitespace,a=e.whitespace,s=!1,c=!1;function l(t){if(u(t),s||t.processed||(t=fa(t,e)),o.length||t===n||n.if&&(t.elseif||t.else)&&da(n,{exp:t.elseif,block:t}),r&&!t.forbidden)if(t.elseif||t.else)a=t,l=function(t){for(var e=t.length;e--;){if(1===t[e].type)return t[e];t.pop()}}(r.children),l&&l.if&&da(l,{exp:a.elseif,block:a});else{if(t.slotScope){var i=t.slotTarget||'"default"';(r.scopedSlots||(r.scopedSlots={}))[i]=t}r.children.push(t),t.parent=r}var a,l;t.children=t.children.filter((function(t){return!t.slotScope})),u(t),t.pre&&(s=!1),Ki(t.tag)&&(c=!1);for(var f=0;f]*>)","i")),p=t.replace(f,(function(t,n,r){return l=r.length,Pi(u)||"noscript"===u||(n=n.replace(//g,"$1").replace(//g,"$1")),Li(u,n)&&(n=n.slice(1)),e.chars&&e.chars(n),""}));c+=t.length-p.length,t=p,C(u,c-l,c)}else{var d=t.indexOf("<");if(0===d){if(Ei.test(t)){var h=t.indexOf("--\x3e");if(h>=0){e.shouldKeepComment&&e.comment(t.substring(4,h),c,c+h+3),k(h+3);continue}}if(Ni.test(t)){var v=t.indexOf("]>");if(v>=0){k(v+2);continue}}var m=t.match(Ai);if(m){k(m[0].length);continue}var g=t.match($i);if(g){var y=c;k(g[0].length),C(g[1],y,c);continue}var b=_();if(b){O(b),Li(b.tagName,t)&&k(1);continue}}var w=void 0,x=void 0,S=void 0;if(d>=0){for(x=t.slice(d);!($i.test(x)||Di.test(x)||Ei.test(x)||Ni.test(x)||(S=x.indexOf("<",1))<0);)d+=S,x=t.slice(d);w=t.substring(0,d)}d<0&&(w=t),w&&k(w.length),e.chars&&w&&e.chars(w,c-w.length,c)}if(t===n){e.chars&&e.chars(t);break}}function k(e){c+=e,t=t.substring(e)}function _(){var e=t.match(Di);if(e){var n,r,o={tagName:e[1],attrs:[],start:c};for(k(e[0].length);!(n=t.match(Ti))&&(r=t.match(Oi)||t.match(_i));)r.start=c,k(r[0].length),r.end=c,o.attrs.push(r);if(n)return o.unarySlash=n[1],k(n[0].length),o.end=c,o}}function O(t){var n=t.tagName,c=t.unarySlash;i&&("p"===r&&ki(n)&&C(r),s(n)&&r===n&&C(n));for(var l=a(n)||!!c,u=t.attrs.length,f=new Array(u),p=0;p=0&&o[a].lowerCasedTag!==s;a--);else a=0;if(a>=0){for(var l=o.length-1;l>=a;l--)e.end&&e.end(o[l].tag,n,i);o.length=a,r=a&&o[a-1].tag}else"br"===s?e.start&&e.start(t,[],!0,n,i):"p"===s&&(e.start&&e.start(t,[],!1,n,i),e.end&&e.end(t,n,i))}C()}(t,{warn:Vi,expectHTML:e.expectHTML,isUnaryTag:e.isUnaryTag,canBeLeftOpenTag:e.canBeLeftOpenTag,shouldDecodeNewlines:e.shouldDecodeNewlines,shouldDecodeNewlinesForHref:e.shouldDecodeNewlinesForHref,shouldKeepComment:e.comments,outputSourceRange:e.outputSourceRange,start:function(t,i,a,u,f){var p=r&&r.ns||Ui(t);J&&"svg"===p&&(i=function(t){for(var e=[],n=0;nc&&(s.push(i=t.slice(c,o)),a.push(JSON.stringify(i)));var l=$r(r[1].trim());a.push("_s("+l+")"),s.push({"@binding":l}),c=o+r[0].length}return c-1"+("true"===i?":("+e+")":":_q("+e+","+i+")")),Fr(t,"change","var $$a="+e+",$$el=$event.target,$$c=$$el.checked?("+i+"):("+a+");if(Array.isArray($$a)){var $$v="+(r?"_n("+o+")":o)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+Hr(e,"$$a.concat([$$v])")+")}else{$$i>-1&&("+Hr(e,"$$a.slice(0,$$i).concat($$a.slice($$i+1))")+")}}else{"+Hr(e,"$$c")+"}",null,!0)}(t,r,o);else if("input"===i&&"radio"===a)!function(t,e,n){var r=n&&n.number,o=Lr(t,"value")||"null";Pr(t,"checked","_q("+e+","+(o=r?"_n("+o+")":o)+")"),Fr(t,"change",Hr(e,o),null,!0)}(t,r,o);else if("input"===i||"textarea"===i)!function(t,e,n){var r=t.attrsMap.type,o=n||{},i=o.lazy,a=o.number,s=o.trim,c=!i&&"range"!==r,l=i?"change":"range"===r?"__r":"input",u="$event.target.value";s&&(u="$event.target.value.trim()");a&&(u="_n("+u+")");var f=Hr(e,u);c&&(f="if($event.target.composing)return;"+f);Pr(t,"value","("+e+")"),Fr(t,l,f,null,!0),(s||a)&&Fr(t,"blur","$forceUpdate()")}(t,r,o);else if(!j.isReservedTag(i))return qr(t,r,o),!1;return!0},text:function(t,e){e.value&&Pr(t,"textContent","_s("+e.value+")",e)},html:function(t,e){e.value&&Pr(t,"innerHTML","_s("+e.value+")",e)}},Oa={expectHTML:!0,modules:wa,directives:_a,isPreTag:function(t){return"pre"===t},isUnaryTag:xi,mustUseProp:Rn,canBeLeftOpenTag:Si,isReservedTag:Zn,getTagNamespace:Qn,staticKeys:(xa=wa,xa.reduce((function(t,e){return t.concat(e.staticKeys||[])}),[]).join(","))},Ca=y((function(t){return p("type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap"+(t?","+t:""))}));function Ma(t,e){t&&(Sa=Ca(e.staticKeys||""),ka=e.isReservedTag||T,Da(t),Ta(t,!1))}function Da(t){if(t.static=function(t){if(2===t.type)return!1;if(3===t.type)return!0;return!(!t.pre&&(t.hasBindings||t.if||t.for||d(t.tag)||!ka(t.tag)||function(t){for(;t.parent;){if("template"!==(t=t.parent).tag)return!1;if(t.for)return!0}return!1}(t)||!Object.keys(t).every(Sa)))}(t),1===t.type){if(!ka(t.tag)&&"slot"!==t.tag&&null==t.attrsMap["inline-template"])return;for(var e=0,n=t.children.length;e|^function(?:\s+[\w$]+)?\s*\(/,Aa=/\([^)]*?\);*$/,Ea=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,Na={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},Pa={esc:["Esc","Escape"],tab:"Tab",enter:"Enter",space:[" ","Spacebar"],up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete","Del"]},Ia=function(t){return"if("+t+")return null;"},ja={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:Ia("$event.target !== $event.currentTarget"),ctrl:Ia("!$event.ctrlKey"),shift:Ia("!$event.shiftKey"),alt:Ia("!$event.altKey"),meta:Ia("!$event.metaKey"),left:Ia("'button' in $event && $event.button !== 0"),middle:Ia("'button' in $event && $event.button !== 1"),right:Ia("'button' in $event && $event.button !== 2")};function Ra(t,e){var n=e?"nativeOn:":"on:",r="",o="";for(var i in t){var a=za(t[i]);t[i]&&t[i].dynamic?o+=i+","+a+",":r+='"'+i+'":'+a+","}return r="{"+r.slice(0,-1)+"}",o?n+"_d("+r+",["+o.slice(0,-1)+"])":n+r}function za(t){if(!t)return"function(){}";if(Array.isArray(t))return"["+t.map((function(t){return za(t)})).join(",")+"]";var e=Ea.test(t.value),n=$a.test(t.value),r=Ea.test(t.value.replace(Aa,""));if(t.modifiers){var o="",i="",a=[];for(var s in t.modifiers)if(ja[s])i+=ja[s],Na[s]&&a.push(s);else if("exact"===s){var c=t.modifiers;i+=Ia(["ctrl","shift","alt","meta"].filter((function(t){return!c[t]})).map((function(t){return"$event."+t+"Key"})).join("||"))}else a.push(s);return a.length&&(o+=function(t){return"if(!$event.type.indexOf('key')&&"+t.map(Fa).join("&&")+")return null;"}(a)),i&&(o+=i),"function($event){"+o+(e?"return "+t.value+".apply(null, arguments)":n?"return ("+t.value+").apply(null, arguments)":r?"return "+t.value:t.value)+"}"}return e||n?t.value:"function($event){"+(r?"return "+t.value:t.value)+"}"}function Fa(t){var e=parseInt(t,10);if(e)return"$event.keyCode!=="+e;var n=Na[t],r=Pa[t];return"_k($event.keyCode,"+JSON.stringify(t)+","+JSON.stringify(n)+",$event.key,"+JSON.stringify(r)+")"}var La={on:function(t,e){t.wrapListeners=function(t){return"_g("+t+","+e.value+")"}},bind:function(t,e){t.wrapData=function(n){return"_b("+n+",'"+t.tag+"',"+e.value+","+(e.modifiers&&e.modifiers.prop?"true":"false")+(e.modifiers&&e.modifiers.sync?",true":"")+")"}},cloak:D},Ba=function(t){this.options=t,this.warn=t.warn||Er,this.transforms=Nr(t.modules,"transformCode"),this.dataGenFns=Nr(t.modules,"genData"),this.directives=C(C({},La),t.directives);var e=t.isReservedTag||T;this.maybeComponent=function(t){return!!t.component||!e(t.tag)},this.onceId=0,this.staticRenderFns=[],this.pre=!1};function Va(t,e){var n=new Ba(e);return{render:"with(this){return "+(t?"script"===t.tag?"null":Wa(t,n):'_c("div")')+"}",staticRenderFns:n.staticRenderFns}}function Wa(t,e){if(t.parent&&(t.pre=t.pre||t.parent.pre),t.staticRoot&&!t.staticProcessed)return qa(t,e);if(t.once&&!t.onceProcessed)return Ha(t,e);if(t.for&&!t.forProcessed)return Ya(t,e);if(t.if&&!t.ifProcessed)return Ja(t,e);if("template"!==t.tag||t.slotTarget||e.pre){if("slot"===t.tag)return function(t,e){var n=t.slotName||'"default"',r=Za(t,e),o="_t("+n+(r?",function(){return "+r+"}":""),i=t.attrs||t.dynamicAttrs?es((t.attrs||[]).concat(t.dynamicAttrs||[]).map((function(t){return{name:w(t.name),value:t.value,dynamic:t.dynamic}}))):null,a=t.attrsMap["v-bind"];!i&&!a||r||(o+=",null");i&&(o+=","+i);a&&(o+=(i?"":",null")+","+a);return o+")"}(t,e);var n;if(t.component)n=function(t,e,n){var r=e.inlineTemplate?null:Za(e,n,!0);return"_c("+t+","+Ua(e,n)+(r?","+r:"")+")"}(t.component,t,e);else{var r;(!t.plain||t.pre&&e.maybeComponent(t))&&(r=Ua(t,e));var o=t.inlineTemplate?null:Za(t,e,!0);n="_c('"+t.tag+"'"+(r?","+r:"")+(o?","+o:"")+")"}for(var i=0;i>>0}(a):"")+")"}(t,t.scopedSlots,e)+","),t.model&&(n+="model:{value:"+t.model.value+",callback:"+t.model.callback+",expression:"+t.model.expression+"},"),t.inlineTemplate){var i=function(t,e){var n=t.children[0];if(n&&1===n.type){var r=Va(n,e.options);return"inlineTemplate:{render:function(){"+r.render+"},staticRenderFns:["+r.staticRenderFns.map((function(t){return"function(){"+t+"}"})).join(",")+"]}"}}(t,e);i&&(n+=i+",")}return n=n.replace(/,$/,"")+"}",t.dynamicAttrs&&(n="_b("+n+',"'+t.tag+'",'+es(t.dynamicAttrs)+")"),t.wrapData&&(n=t.wrapData(n)),t.wrapListeners&&(n=t.wrapListeners(n)),n}function Xa(t){return 1===t.type&&("slot"===t.tag||t.children.some(Xa))}function Ga(t,e){var n=t.attrsMap["slot-scope"];if(t.if&&!t.ifProcessed&&!n)return Ja(t,e,Ga,"null");if(t.for&&!t.forProcessed)return Ya(t,e,Ga);var r="_empty_"===t.slotScope?"":String(t.slotScope),o="function("+r+"){return "+("template"===t.tag?t.if&&n?"("+t.if+")?"+(Za(t,e)||"undefined")+":undefined":Za(t,e)||"undefined":Wa(t,e))+"}",i=r?"":",proxy:true";return"{key:"+(t.slotTarget||'"default"')+",fn:"+o+i+"}"}function Za(t,e,n,r,o){var i=t.children;if(i.length){var a=i[0];if(1===i.length&&a.for&&"template"!==a.tag&&"slot"!==a.tag){var s=n?e.maybeComponent(a)?",1":",0":"";return""+(r||Wa)(a,e)+s}var c=n?function(t,e){for(var n=0,r=0;r':'

',ss.innerHTML.indexOf(" ")>0}var fs=!!V&&us(!1),ps=!!V&&us(!0),ds=y((function(t){var e=nr(t);return e&&e.innerHTML})),hs=Cn.prototype.$mount;Cn.prototype.$mount=function(t,e){if((t=t&&nr(t))===document.body||t===document.documentElement)return this;var n=this.$options;if(!n.render){var r=n.template;if(r)if("string"==typeof r)"#"===r.charAt(0)&&(r=ds(r));else{if(!r.nodeType)return this;r=r.innerHTML}else t&&(r=function(t){if(t.outerHTML)return t.outerHTML;var e=document.createElement("div");return e.appendChild(t.cloneNode(!0)),e.innerHTML}(t));if(r){var o=ls(r,{outputSourceRange:!1,shouldDecodeNewlines:fs,shouldDecodeNewlinesForHref:ps,delimiters:n.delimiters,comments:n.comments},this),i=o.render,a=o.staticRenderFns;n.render=i,n.staticRenderFns=a}}return hs.call(this,t,e)},Cn.compile=ls;var vs=("undefined"!=typeof window?window:"undefined"!=typeof global?global:{}).__VUE_DEVTOOLS_GLOBAL_HOOK__;function ms(t,e){if(void 0===e&&(e=[]),null===t||"object"!=typeof t)return t;var n,r=(n=function(e){return e.original===t},e.filter(n)[0]);if(r)return r.copy;var o=Array.isArray(t)?[]:{};return e.push({original:t,copy:o}),Object.keys(t).forEach((function(n){o[n]=ms(t[n],e)})),o}function gs(t,e){Object.keys(t).forEach((function(n){return e(t[n],n)}))}function ys(t){return null!==t&&"object"==typeof t}var bs=function(t,e){this.runtime=e,this._children=Object.create(null),this._rawModule=t;var n=t.state;this.state=("function"==typeof n?n():n)||{}},ws={namespaced:{configurable:!0}};ws.namespaced.get=function(){return!!this._rawModule.namespaced},bs.prototype.addChild=function(t,e){this._children[t]=e},bs.prototype.removeChild=function(t){delete this._children[t]},bs.prototype.getChild=function(t){return this._children[t]},bs.prototype.hasChild=function(t){return t in this._children},bs.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)},bs.prototype.forEachChild=function(t){gs(this._children,t)},bs.prototype.forEachGetter=function(t){this._rawModule.getters&&gs(this._rawModule.getters,t)},bs.prototype.forEachAction=function(t){this._rawModule.actions&&gs(this._rawModule.actions,t)},bs.prototype.forEachMutation=function(t){this._rawModule.mutations&&gs(this._rawModule.mutations,t)},Object.defineProperties(bs.prototype,ws);var xs,Ss=function(t){this.register([],t,!1)};function ks(t,e,n){if(e.update(n),n.modules)for(var r in n.modules){if(!e.getChild(r))return;ks(t.concat(r),e.getChild(r),n.modules[r])}}Ss.prototype.get=function(t){return t.reduce((function(t,e){return t.getChild(e)}),this.root)},Ss.prototype.getNamespace=function(t){var e=this.root;return t.reduce((function(t,n){return t+((e=e.getChild(n)).namespaced?n+"/":"")}),"")},Ss.prototype.update=function(t){ks([],this.root,t)},Ss.prototype.register=function(t,e,n){var r=this;void 0===n&&(n=!0);var o=new bs(e,n);0===t.length?this.root=o:this.get(t.slice(0,-1)).addChild(t[t.length-1],o);e.modules&&gs(e.modules,(function(e,o){r.register(t.concat(o),e,n)}))},Ss.prototype.unregister=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1],r=e.getChild(n);r&&r.runtime&&e.removeChild(n)},Ss.prototype.isRegistered=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1];return!!e&&e.hasChild(n)};var _s=function(t){var e=this;void 0===t&&(t={}),!xs&&"undefined"!=typeof window&&window.Vue&&Es(window.Vue);var n=t.plugins;void 0===n&&(n=[]);var r=t.strict;void 0===r&&(r=!1),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new Ss(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new xs,this._makeLocalGettersCache=Object.create(null);var o=this,i=this.dispatch,a=this.commit;this.dispatch=function(t,e){return i.call(o,t,e)},this.commit=function(t,e,n){return a.call(o,t,e,n)},this.strict=r;var s=this._modules.root.state;Ts(this,s,[],this._modules.root),Ds(this,s),n.forEach((function(t){return t(e)})),(void 0!==t.devtools?t.devtools:xs.config.devtools)&&function(t){vs&&(t._devtoolHook=vs,vs.emit("vuex:init",t),vs.on("vuex:travel-to-state",(function(e){t.replaceState(e)})),t.subscribe((function(t,e){vs.emit("vuex:mutation",t,e)}),{prepend:!0}),t.subscribeAction((function(t,e){vs.emit("vuex:action",t,e)}),{prepend:!0}))}(this)},Os={state:{configurable:!0}};function Cs(t,e,n){return e.indexOf(t)<0&&(n&&n.prepend?e.unshift(t):e.push(t)),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}}function Ms(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);var n=t.state;Ts(t,n,[],t._modules.root,!0),Ds(t,n,e)}function Ds(t,e,n){var r=t._vm;t.getters={},t._makeLocalGettersCache=Object.create(null);var o=t._wrappedGetters,i={};gs(o,(function(e,n){i[n]=function(t,e){return function(){return t(e)}}(e,t),Object.defineProperty(t.getters,n,{get:function(){return t._vm[n]},enumerable:!0})}));var a=xs.config.silent;xs.config.silent=!0,t._vm=new xs({data:{$$state:e},computed:i}),xs.config.silent=a,t.strict&&function(t){t._vm.$watch((function(){return this._data.$$state}),(function(){}),{deep:!0,sync:!0})}(t),r&&(n&&t._withCommit((function(){r._data.$$state=null})),xs.nextTick((function(){return r.$destroy()})))}function Ts(t,e,n,r,o){var i=!n.length,a=t._modules.getNamespace(n);if(r.namespaced&&(t._modulesNamespaceMap[a],t._modulesNamespaceMap[a]=r),!i&&!o){var s=$s(e,n.slice(0,-1)),c=n[n.length-1];t._withCommit((function(){xs.set(s,c,r.state)}))}var l=r.context=function(t,e,n){var r=""===e,o={dispatch:r?t.dispatch:function(n,r,o){var i=As(n,r,o),a=i.payload,s=i.options,c=i.type;return s&&s.root||(c=e+c),t.dispatch(c,a)},commit:r?t.commit:function(n,r,o){var i=As(n,r,o),a=i.payload,s=i.options,c=i.type;s&&s.root||(c=e+c),t.commit(c,a,s)}};return Object.defineProperties(o,{getters:{get:r?function(){return t.getters}:function(){return function(t,e){if(!t._makeLocalGettersCache[e]){var n={},r=e.length;Object.keys(t.getters).forEach((function(o){if(o.slice(0,r)===e){var i=o.slice(r);Object.defineProperty(n,i,{get:function(){return t.getters[o]},enumerable:!0})}})),t._makeLocalGettersCache[e]=n}return t._makeLocalGettersCache[e]}(t,e)}},state:{get:function(){return $s(t.state,n)}}}),o}(t,a,n);r.forEachMutation((function(e,n){!function(t,e,n,r){(t._mutations[e]||(t._mutations[e]=[])).push((function(e){n.call(t,r.state,e)}))}(t,a+n,e,l)})),r.forEachAction((function(e,n){var r=e.root?n:a+n,o=e.handler||e;!function(t,e,n,r){(t._actions[e]||(t._actions[e]=[])).push((function(e){var o,i=n.call(t,{dispatch:r.dispatch,commit:r.commit,getters:r.getters,state:r.state,rootGetters:t.getters,rootState:t.state},e);return(o=i)&&"function"==typeof o.then||(i=Promise.resolve(i)),t._devtoolHook?i.catch((function(e){throw t._devtoolHook.emit("vuex:error",e),e})):i}))}(t,r,o,l)})),r.forEachGetter((function(e,n){!function(t,e,n,r){if(t._wrappedGetters[e])return;t._wrappedGetters[e]=function(t){return n(r.state,r.getters,t.state,t.getters)}}(t,a+n,e,l)})),r.forEachChild((function(r,i){Ts(t,e,n.concat(i),r,o)}))}function $s(t,e){return e.reduce((function(t,e){return t[e]}),t)}function As(t,e,n){return ys(t)&&t.type&&(n=e,e=t,t=t.type),{type:t,payload:e,options:n}}function Es(t){xs&&t===xs|| +var e=Object.freeze({});function t(e){return null==e}function n(e){return null!=e}function r(e){return!0===e}function i(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e||"boolean"==typeof e}function o(e){return null!==e&&"object"==typeof e}var s=Object.prototype.toString;function a(e){return"[object Object]"===s.call(e)}function l(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}function c(e){return n(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function u(e){return null==e?"":Array.isArray(e)||a(e)&&e.toString===s?JSON.stringify(e,null,2):String(e)}function d(e){var t=parseFloat(e);return isNaN(t)?e:t}function h(e,t){for(var n=Object.create(null),r=e.split(","),i=0;i-1)return e.splice(n,1)}}var g=Object.prototype.hasOwnProperty;function v(e,t){return g.call(e,t)}function y(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}var b=/-(\w)/g,w=y((function(e){return e.replace(b,(function(e,t){return t?t.toUpperCase():""}))})),x=y((function(e){return e.charAt(0).toUpperCase()+e.slice(1)})),S=/\B([A-Z])/g,k=y((function(e){return e.replace(S,"-$1").toLowerCase()}));var C=Function.prototype.bind?function(e,t){return e.bind(t)}:function(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n};function O(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function M(e,t){for(var n in t)e[n]=t[n];return e}function _(e){for(var t={},n=0;n0,Y=H&&H.indexOf("edge/")>0;H&&H.indexOf("android");var U=H&&/iphone|ipad|ipod|ios/.test(H)||"ios"===q;H&&/chrome\/\d+/.test(H),H&&/phantomjs/.test(H);var X,G=H&&H.match(/firefox\/(\d+)/),Z={}.watch,Q=!1;if(V)try{var ee={};Object.defineProperty(ee,"passive",{get:function(){Q=!0}}),window.addEventListener("test-passive",null,ee)}catch(wy){}var te=function(){return void 0===X&&(X=!V&&!W&&"undefined"!=typeof global&&(global.process&&"server"===global.process.env.VUE_ENV)),X},ne=V&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function re(e){return"function"==typeof e&&/native code/.test(e.toString())}var ie,oe="undefined"!=typeof Symbol&&re(Symbol)&&"undefined"!=typeof Reflect&&re(Reflect.ownKeys);ie="undefined"!=typeof Set&&re(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var se=D,ae=0,le=function(){this.id=ae++,this.subs=[]};le.prototype.addSub=function(e){this.subs.push(e)},le.prototype.removeSub=function(e){m(this.subs,e)},le.prototype.depend=function(){le.target&&le.target.addDep(this)},le.prototype.notify=function(){for(var e=this.subs.slice(),t=0,n=e.length;t-1)if(o&&!v(i,"default"))s=!1;else if(""===s||s===k(e)){var l=Le(String,i.type);(l<0||a0&&(ut((a=dt(a,(o||"")+"_"+s))[0])&&ut(c)&&(u[l]=me(c.text+a[0].text),a.shift()),u.push.apply(u,a)):i(a)?ut(c)?u[l]=me(c.text+a):""!==a&&u.push(me(a)):ut(a)&&ut(c)?u[l]=me(c.text+a.text):(r(e._isVList)&&n(a.tag)&&t(a.key)&&n(o)&&(a.key="__vlist"+o+"_"+s+"__"),u.push(a)));return u}function ht(e,t){if(e){for(var n=Object.create(null),r=oe?Reflect.ownKeys(e):Object.keys(e),i=0;i0,s=t?!!t.$stable:!o,a=t&&t.$key;if(t){if(t._normalized)return t._normalized;if(s&&r&&r!==e&&a===r.$key&&!o&&!r.$hasNormal)return r;for(var l in i={},t)t[l]&&"$"!==l[0]&&(i[l]=vt(n,l,t[l]))}else i={};for(var c in n)c in i||(i[c]=yt(n,c));return t&&Object.isExtensible(t)&&(t._normalized=i),F(i,"$stable",s),F(i,"$key",a),F(i,"$hasNormal",o),i}function vt(e,t,n){var r=function(){var e=arguments.length?n.apply(null,arguments):n({}),t=(e=e&&"object"==typeof e&&!Array.isArray(e)?[e]:ct(e))&&e[0];return e&&(!t||1===e.length&&t.isComment&&!mt(t))?void 0:e};return n.proxy&&Object.defineProperty(e,t,{get:r,enumerable:!0,configurable:!0}),r}function yt(e,t){return function(){return e[t]}}function bt(e,t){var r,i,s,a,l;if(Array.isArray(e)||"string"==typeof e)for(r=new Array(e.length),i=0,s=e.length;idocument.createEvent("Event").timeStamp&&(dn=function(){return hn.now()})}function fn(){var e,t;for(un=dn(),ln=!0,rn.sort((function(e,t){return e.id-t.id})),cn=0;cncn&&rn[n].id>e.id;)n--;rn.splice(n+1,0,e)}else rn.push(e);an||(an=!0,et(fn))}}(this)},mn.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||o(e)||this.deep){var t=this.value;if(this.value=e,this.user){var n='callback for watcher "'+this.expression+'"';Ve(this.cb,this.vm,[e,t],this.vm,n)}else this.cb.call(this.vm,e,t)}}},mn.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},mn.prototype.depend=function(){for(var e=this.deps.length;e--;)this.deps[e].depend()},mn.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||m(this.vm._watchers,this);for(var e=this.deps.length;e--;)this.deps[e].removeSub(this);this.active=!1}};var gn={enumerable:!0,configurable:!0,get:D,set:D};function vn(e,t,n){gn.get=function(){return this[t][n]},gn.set=function(e){this[t][n]=e},Object.defineProperty(e,n,gn)}function yn(e){e._watchers=[];var t=e.$options;t.props&&function(e,t){var n=e.$options.propsData||{},r=e._props={},i=e.$options._propKeys=[];e.$parent&&xe(!1);var o=function(o){i.push(o);var s=Re(o,t,n,e);Ce(r,o,s),o in e||vn(e,"_props",o)};for(var s in t)o(s);xe(!0)}(e,t.props),t.methods&&function(e,t){for(var n in e.$options.props,t)e[n]="function"!=typeof t[n]?D:C(t[n],e)}(e,t.methods),t.data?function(e){var t=e.$options.data;a(t=e._data="function"==typeof t?function(e,t){ue();try{return e.call(t,t)}catch(wy){return Be(wy,t,"data()"),{}}finally{de()}}(t,e):t||{})||(t={});var n=Object.keys(t),r=e.$options.props;e.$options.methods;var i=n.length;for(;i--;){var o=n[i];r&&v(r,o)||j(o)||vn(e,"_data",o)}ke(t,!0)}(e):ke(e._data={},!0),t.computed&&function(e,t){var n=e._computedWatchers=Object.create(null),r=te();for(var i in t){var o=t[i],s="function"==typeof o?o:o.get;r||(n[i]=new mn(e,s||D,D,bn)),i in e||wn(e,i,o)}}(e,t.computed),t.watch&&t.watch!==Z&&function(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var i=0;i-1:"string"==typeof e?e.split(",").indexOf(t)>-1:(n=e,"[object RegExp]"===s.call(n)&&e.test(t));var n}function $n(e,t){var n=e.cache,r=e.keys,i=e._vnode;for(var o in n){var s=n[o];if(s){var a=s.name;a&&!t(a)&&An(n,o,r,i)}}}function An(e,t,n,r){var i=e[t];!i||r&&i.tag===r.tag||i.componentInstance.$destroy(),e[t]=null,m(n,t)}Mn.prototype._init=function(t){var n=this;n._uid=Cn++,n._isVue=!0,t&&t._isComponent?function(e,t){var n=e.$options=Object.create(e.constructor.options),r=t._parentVnode;n.parent=t.parent,n._parentVnode=r;var i=r.componentOptions;n.propsData=i.propsData,n._parentListeners=i.listeners,n._renderChildren=i.children,n._componentTag=i.tag,t.render&&(n.render=t.render,n.staticRenderFns=t.staticRenderFns)}(n,t):n.$options=Pe(On(n.constructor),t||{},n),n._renderProxy=n,n._self=n,function(e){var t=e.$options,n=t.parent;if(n&&!t.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(e)}e.$parent=n,e.$root=n?n.$root:e,e.$children=[],e.$refs={},e._watcher=null,e._inactive=null,e._directInactive=!1,e._isMounted=!1,e._isDestroyed=!1,e._isBeingDestroyed=!1}(n),function(e){e._events=Object.create(null),e._hasHookEvent=!1;var t=e.$options._parentListeners;t&&Xt(e,t)}(n),function(t){t._vnode=null,t._staticTrees=null;var n=t.$options,r=t.$vnode=n._parentVnode,i=r&&r.context;t.$slots=ft(n._renderChildren,i),t.$scopedSlots=e,t._c=function(e,n,r,i){return Bt(t,e,n,r,i,!1)},t.$createElement=function(e,n,r,i){return Bt(t,e,n,r,i,!0)};var o=r&&r.data;Ce(t,"$attrs",o&&o.attrs||e,null,!0),Ce(t,"$listeners",n._parentListeners||e,null,!0)}(n),nn(n,"beforeCreate"),function(e){var t=ht(e.$options.inject,e);t&&(xe(!1),Object.keys(t).forEach((function(n){Ce(e,n,t[n])})),xe(!0))}(n),yn(n),function(e){var t=e.$options.provide;t&&(e._provided="function"==typeof t?t.call(e):t)}(n),nn(n,"created"),n.$options.el&&n.$mount(n.$options.el)},function(e){var t={get:function(){return this._data}},n={get:function(){return this._props}};Object.defineProperty(e.prototype,"$data",t),Object.defineProperty(e.prototype,"$props",n),e.prototype.$set=Oe,e.prototype.$delete=Me,e.prototype.$watch=function(e,t,n){var r=this;if(a(t))return kn(r,e,t,n);(n=n||{}).user=!0;var i=new mn(r,e,t,n);if(n.immediate){var o='callback for immediate watcher "'+i.expression+'"';ue(),Ve(t,r,[i.value],r,o),de()}return function(){i.teardown()}}}(Mn),function(e){var t=/^hook:/;e.prototype.$on=function(e,n){var r=this;if(Array.isArray(e))for(var i=0,o=e.length;i1?O(n):n;for(var r=O(arguments,1),i='event handler for "'+e+'"',o=0,s=n.length;oparseInt(this.max)&&An(t,n[0],n,this._vnode),this.vnodeToCache=null}}},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var e in this.cache)An(this.cache,e,this.keys)},mounted:function(){var e=this;this.cacheVNode(),this.$watch("include",(function(t){$n(e,(function(e){return Tn(t,e)}))})),this.$watch("exclude",(function(t){$n(e,(function(e){return!Tn(t,e)}))}))},updated:function(){this.cacheVNode()},render:function(){var e=this.$slots.default,t=Jt(e),n=t&&t.componentOptions;if(n){var r=Dn(n),i=this.include,o=this.exclude;if(i&&(!r||!Tn(i,r))||o&&r&&Tn(o,r))return t;var s=this.cache,a=this.keys,l=null==t.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):t.key;s[l]?(t.componentInstance=s[l].componentInstance,m(a,l),a.push(l)):(this.vnodeToCache=t,this.keyToCache=l),t.data.keepAlive=!0}return t||e&&e[0]}}};!function(e){var t={get:function(){return R}};Object.defineProperty(e,"config",t),e.util={warn:se,extend:M,mergeOptions:Pe,defineReactive:Ce},e.set=Oe,e.delete=Me,e.nextTick=et,e.observable=function(e){return ke(e),e},e.options=Object.create(null),P.forEach((function(t){e.options[t+"s"]=Object.create(null)})),e.options._base=e,M(e.options.components,Nn),function(e){e.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(t.indexOf(e)>-1)return this;var n=O(arguments,1);return n.unshift(this),"function"==typeof e.install?e.install.apply(e,n):"function"==typeof e&&e.apply(null,n),t.push(e),this}}(e),function(e){e.mixin=function(e){return this.options=Pe(this.options,e),this}}(e),_n(e),function(e){P.forEach((function(t){e[t]=function(e,n){return n?("component"===t&&a(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&"function"==typeof n&&(n={bind:n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}}))}(e)}(Mn),Object.defineProperty(Mn.prototype,"$isServer",{get:te}),Object.defineProperty(Mn.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Mn,"FunctionalRenderContext",{value:Pt}),Mn.version="2.6.14";var Pn=h("style,class"),In=h("input,textarea,option,select,progress"),Rn=function(e,t,n){return"value"===n&&In(e)&&"button"!==t||"selected"===n&&"option"===e||"checked"===n&&"input"===e||"muted"===n&&"video"===e},zn=h("contenteditable,draggable,spellcheck"),jn=h("events,caret,typing,plaintext-only"),Fn=h("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,truespeed,typemustmatch,visible"),Ln="http://www.w3.org/1999/xlink",Bn=function(e){return":"===e.charAt(5)&&"xlink"===e.slice(0,5)},Vn=function(e){return Bn(e)?e.slice(6,e.length):""},Wn=function(e){return null==e||!1===e};function qn(e){for(var t=e.data,r=e,i=e;n(i.componentInstance);)(i=i.componentInstance._vnode)&&i.data&&(t=Hn(i.data,t));for(;n(r=r.parent);)r&&r.data&&(t=Hn(t,r.data));return function(e,t){if(n(e)||n(t))return Jn(e,Kn(t));return""}(t.staticClass,t.class)}function Hn(e,t){return{staticClass:Jn(e.staticClass,t.staticClass),class:n(e.class)?[e.class,t.class]:t.class}}function Jn(e,t){return e?t?e+" "+t:e:t||""}function Kn(e){return Array.isArray(e)?function(e){for(var t,r="",i=0,o=e.length;i-1?yr(e,t,n):Fn(t)?Wn(n)?e.removeAttribute(t):(n="allowfullscreen"===t&&"EMBED"===e.tagName?"true":t,e.setAttribute(t,n)):zn(t)?e.setAttribute(t,function(e,t){return Wn(t)||"false"===t?"false":"contenteditable"===e&&jn(t)?t:"true"}(t,n)):Bn(t)?Wn(n)?e.removeAttributeNS(Ln,Vn(t)):e.setAttributeNS(Ln,t,n):yr(e,t,n)}function yr(e,t,n){if(Wn(n))e.removeAttribute(t);else{if(J&&!K&&"TEXTAREA"===e.tagName&&"placeholder"===t&&""!==n&&!e.__ieph){var r=function(t){t.stopImmediatePropagation(),e.removeEventListener("input",r)};e.addEventListener("input",r),e.__ieph=!0}e.setAttribute(t,n)}}var br={create:gr,update:gr};function wr(e,r){var i=r.elm,o=r.data,s=e.data;if(!(t(o.staticClass)&&t(o.class)&&(t(s)||t(s.staticClass)&&t(s.class)))){var a=qn(r),l=i._transitionClasses;n(l)&&(a=Jn(a,Kn(l))),a!==i._prevClass&&(i.setAttribute("class",a),i._prevClass=a)}}var xr,Sr,kr,Cr,Or,Mr,_r={create:wr,update:wr},Dr=/[\w).+\-_$\]]/;function Tr(e){var t,n,r,i,o,s=!1,a=!1,l=!1,c=!1,u=0,d=0,h=0,f=0;for(r=0;r=0&&" "===(m=e.charAt(p));p--);m&&Dr.test(m)||(c=!0)}}else void 0===i?(f=r+1,i=e.slice(0,r).trim()):g();function g(){(o||(o=[])).push(e.slice(f,r).trim()),f=r+1}if(void 0===i?i=e.slice(0,r).trim():0!==f&&g(),o)for(r=0;r-1?{exp:e.slice(0,Cr),key:'"'+e.slice(Cr+1)+'"'}:{exp:e,key:null};Sr=e,Cr=Or=Mr=0;for(;!Jr();)Kr(kr=Hr())?Ur(kr):91===kr&&Yr(kr);return{exp:e.slice(0,Or),key:e.slice(Or+1,Mr)}}(e);return null===n.key?e+"="+t:"$set("+n.exp+", "+n.key+", "+t+")"}function Hr(){return Sr.charCodeAt(++Cr)}function Jr(){return Cr>=xr}function Kr(e){return 34===e||39===e}function Yr(e){var t=1;for(Or=Cr;!Jr();)if(Kr(e=Hr()))Ur(e);else if(91===e&&t++,93===e&&t--,0===t){Mr=Cr;break}}function Ur(e){for(var t=e;!Jr()&&(e=Hr())!==t;);}var Xr;function Gr(e,t,n){var r=Xr;return function i(){var o=t.apply(null,arguments);null!==o&&ei(e,i,n,r)}}var Zr=Je&&!(G&&Number(G[1])<=53);function Qr(e,t,n,r){if(Zr){var i=un,o=t;t=o._wrapper=function(e){if(e.target===e.currentTarget||e.timeStamp>=i||e.timeStamp<=0||e.target.ownerDocument!==document)return o.apply(this,arguments)}}Xr.addEventListener(e,t,Q?{capture:n,passive:r}:n)}function ei(e,t,n,r){(r||Xr).removeEventListener(e,t._wrapper||t,n)}function ti(e,r){if(!t(e.data.on)||!t(r.data.on)){var i=r.data.on||{},o=e.data.on||{};Xr=r.elm,function(e){if(n(e.__r)){var t=J?"change":"input";e[t]=[].concat(e.__r,e[t]||[]),delete e.__r}n(e.__c)&&(e.change=[].concat(e.__c,e.change||[]),delete e.__c)}(i),st(i,o,Qr,ei,Gr,r.context),Xr=void 0}}var ni,ri={create:ti,update:ti};function ii(e,r){if(!t(e.data.domProps)||!t(r.data.domProps)){var i,o,s=r.elm,a=e.data.domProps||{},l=r.data.domProps||{};for(i in n(l.__ob__)&&(l=r.data.domProps=M({},l)),a)i in l||(s[i]="");for(i in l){if(o=l[i],"textContent"===i||"innerHTML"===i){if(r.children&&(r.children.length=0),o===a[i])continue;1===s.childNodes.length&&s.removeChild(s.childNodes[0])}if("value"===i&&"PROGRESS"!==s.tagName){s._value=o;var c=t(o)?"":String(o);oi(s,c)&&(s.value=c)}else if("innerHTML"===i&&Xn(s.tagName)&&t(s.innerHTML)){(ni=ni||document.createElement("div")).innerHTML=""+o+"";for(var u=ni.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;u.firstChild;)s.appendChild(u.firstChild)}else if(o!==a[i])try{s[i]=o}catch(wy){}}}}function oi(e,t){return!e.composing&&("OPTION"===e.tagName||function(e,t){var n=!0;try{n=document.activeElement!==e}catch(wy){}return n&&e.value!==t}(e,t)||function(e,t){var r=e.value,i=e._vModifiers;if(n(i)){if(i.number)return d(r)!==d(t);if(i.trim)return r.trim()!==t.trim()}return r!==t}(e,t))}var si={create:ii,update:ii},ai=y((function(e){var t={},n=/:(.+)/;return e.split(/;(?![^(]*\))/g).forEach((function(e){if(e){var r=e.split(n);r.length>1&&(t[r[0].trim()]=r[1].trim())}})),t}));function li(e){var t=ci(e.style);return e.staticStyle?M(e.staticStyle,t):t}function ci(e){return Array.isArray(e)?_(e):"string"==typeof e?ai(e):e}var ui,di=/^--/,hi=/\s*!important$/,fi=function(e,t,n){if(di.test(t))e.style.setProperty(t,n);else if(hi.test(n))e.style.setProperty(k(t),n.replace(hi,""),"important");else{var r=mi(t);if(Array.isArray(n))for(var i=0,o=n.length;i-1?t.split(yi).forEach((function(t){return e.classList.add(t)})):e.classList.add(t);else{var n=" "+(e.getAttribute("class")||"")+" ";n.indexOf(" "+t+" ")<0&&e.setAttribute("class",(n+t).trim())}}function wi(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(yi).forEach((function(t){return e.classList.remove(t)})):e.classList.remove(t),e.classList.length||e.removeAttribute("class");else{for(var n=" "+(e.getAttribute("class")||"")+" ",r=" "+t+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?e.setAttribute("class",n):e.removeAttribute("class")}}function xi(e){if(e){if("object"==typeof e){var t={};return!1!==e.css&&M(t,Si(e.name||"v")),M(t,e),t}return"string"==typeof e?Si(e):void 0}}var Si=y((function(e){return{enterClass:e+"-enter",enterToClass:e+"-enter-to",enterActiveClass:e+"-enter-active",leaveClass:e+"-leave",leaveToClass:e+"-leave-to",leaveActiveClass:e+"-leave-active"}})),ki=V&&!K,Ci="transition",Oi="transitionend",Mi="animation",_i="animationend";ki&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Ci="WebkitTransition",Oi="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Mi="WebkitAnimation",_i="webkitAnimationEnd"));var Di=V?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(e){return e()};function Ti(e){Di((function(){Di(e)}))}function $i(e,t){var n=e._transitionClasses||(e._transitionClasses=[]);n.indexOf(t)<0&&(n.push(t),bi(e,t))}function Ai(e,t){e._transitionClasses&&m(e._transitionClasses,t),wi(e,t)}function Ei(e,t,n){var r=Pi(e,t),i=r.type,o=r.timeout,s=r.propCount;if(!i)return n();var a="transition"===i?Oi:_i,l=0,c=function(){e.removeEventListener(a,u),n()},u=function(t){t.target===e&&++l>=s&&c()};setTimeout((function(){l0&&(n="transition",u=s,d=o.length):"animation"===t?c>0&&(n="animation",u=c,d=l.length):d=(n=(u=Math.max(s,c))>0?s>c?"transition":"animation":null)?"transition"===n?o.length:l.length:0,{type:n,timeout:u,propCount:d,hasTransform:"transition"===n&&Ni.test(r[Ci+"Property"])}}function Ii(e,t){for(;e.length1}function Bi(e,t){!0!==t.data.show&&zi(t)}var Vi=function(e){var o,s,a={},l=e.modules,c=e.nodeOps;for(o=0;op?b(e,t(i[v+1])?null:i[v+1].elm,i,f,v,o):f>v&&x(r,h,p)}(h,m,v,o,u):n(v)?(n(e.text)&&c.setTextContent(h,""),b(h,null,v,0,v.length-1,o)):n(m)?x(m,0,m.length-1):n(e.text)&&c.setTextContent(h,""):e.text!==i.text&&c.setTextContent(h,i.text),n(p)&&n(f=p.hook)&&n(f=f.postpatch)&&f(e,i)}}}function O(e,t,i){if(r(i)&&n(e.parent))e.parent.data.pendingInsert=t;else for(var o=0;o-1,s.selected!==o&&(s.selected=o);else if(A(Ki(s),r))return void(e.selectedIndex!==a&&(e.selectedIndex=a));i||(e.selectedIndex=-1)}}function Ji(e,t){return t.every((function(t){return!A(t,e)}))}function Ki(e){return"_value"in e?e._value:e.value}function Yi(e){e.target.composing=!0}function Ui(e){e.target.composing&&(e.target.composing=!1,Xi(e.target,"input"))}function Xi(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}function Gi(e){return!e.componentInstance||e.data&&e.data.transition?e:Gi(e.componentInstance._vnode)}var Zi={model:Wi,show:{bind:function(e,t,n){var r=t.value,i=(n=Gi(n)).data&&n.data.transition,o=e.__vOriginalDisplay="none"===e.style.display?"":e.style.display;r&&i?(n.data.show=!0,zi(n,(function(){e.style.display=o}))):e.style.display=r?o:"none"},update:function(e,t,n){var r=t.value;!r!=!t.oldValue&&((n=Gi(n)).data&&n.data.transition?(n.data.show=!0,r?zi(n,(function(){e.style.display=e.__vOriginalDisplay})):ji(n,(function(){e.style.display="none"}))):e.style.display=r?e.__vOriginalDisplay:"none")},unbind:function(e,t,n,r,i){i||(e.style.display=e.__vOriginalDisplay)}}},Qi={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function eo(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?eo(Jt(t.children)):e}function to(e){var t={},n=e.$options;for(var r in n.propsData)t[r]=e[r];var i=n._parentListeners;for(var o in i)t[w(o)]=i[o];return t}function no(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{props:t.componentOptions.propsData})}var ro=function(e){return e.tag||mt(e)},io=function(e){return"show"===e.name},oo={name:"transition",props:Qi,abstract:!0,render:function(e){var t=this,n=this.$slots.default;if(n&&(n=n.filter(ro)).length){var r=this.mode,o=n[0];if(function(e){for(;e=e.parent;)if(e.data.transition)return!0}(this.$vnode))return o;var s=eo(o);if(!s)return o;if(this._leaving)return no(e,o);var a="__transition-"+this._uid+"-";s.key=null==s.key?s.isComment?a+"comment":a+s.tag:i(s.key)?0===String(s.key).indexOf(a)?s.key:a+s.key:s.key;var l=(s.data||(s.data={})).transition=to(this),c=this._vnode,u=eo(c);if(s.data.directives&&s.data.directives.some(io)&&(s.data.show=!0),u&&u.data&&!function(e,t){return t.key===e.key&&t.tag===e.tag}(s,u)&&!mt(u)&&(!u.componentInstance||!u.componentInstance._vnode.isComment)){var d=u.data.transition=M({},l);if("out-in"===r)return this._leaving=!0,at(d,"afterLeave",(function(){t._leaving=!1,t.$forceUpdate()})),no(e,o);if("in-out"===r){if(mt(s))return c;var h,f=function(){h()};at(l,"afterEnter",f),at(l,"enterCancelled",f),at(d,"delayLeave",(function(e){h=e}))}}return o}}},so=M({tag:String,moveClass:String},Qi);delete so.mode;var ao={props:so,beforeMount:function(){var e=this,t=this._update;this._update=function(n,r){var i=Zt(e);e.__patch__(e._vnode,e.kept,!1,!0),e._vnode=e.kept,i(),t.call(e,n,r)}},render:function(e){for(var t=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,i=this.$slots.default||[],o=this.children=[],s=to(this),a=0;a-1?Qn[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:Qn[e]=/HTMLUnknownElement/.test(t.toString())},M(Mn.options.directives,Zi),M(Mn.options.components,ho),Mn.prototype.__patch__=V?Vi:D,Mn.prototype.$mount=function(e,t){return function(e,t,n){var r;return e.$el=t,e.$options.render||(e.$options.render=pe),nn(e,"beforeMount"),r=function(){e._update(e._render(),n)},new mn(e,r,D,{before:function(){e._isMounted&&!e._isDestroyed&&nn(e,"beforeUpdate")}},!0),n=!1,null==e.$vnode&&(e._isMounted=!0,nn(e,"mounted")),e}(this,e=e&&V?tr(e):void 0,t)},V&&setTimeout((function(){R.devtools&&ne&&ne.emit("init",Mn)}),0);var fo=/\{\{((?:.|\r?\n)+?)\}\}/g,po=/[-.*+?^${}()|[\]\/\\]/g,mo=y((function(e){var t=e[0].replace(po,"\\$&"),n=e[1].replace(po,"\\$&");return new RegExp(t+"((?:.|\\n)+?)"+n,"g")}));var go={staticKeys:["staticClass"],transformNode:function(e,t){t.warn;var n=Lr(e,"class");n&&(e.staticClass=JSON.stringify(n));var r=Fr(e,"class",!1);r&&(e.classBinding=r)},genData:function(e){var t="";return e.staticClass&&(t+="staticClass:"+e.staticClass+","),e.classBinding&&(t+="class:"+e.classBinding+","),t}};var vo,yo={staticKeys:["staticStyle"],transformNode:function(e,t){t.warn;var n=Lr(e,"style");n&&(e.staticStyle=JSON.stringify(ai(n)));var r=Fr(e,"style",!1);r&&(e.styleBinding=r)},genData:function(e){var t="";return e.staticStyle&&(t+="staticStyle:"+e.staticStyle+","),e.styleBinding&&(t+="style:("+e.styleBinding+"),"),t}},bo=function(e){return(vo=vo||document.createElement("div")).innerHTML=e,vo.textContent},wo=h("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),xo=h("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),So=h("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),ko=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,Co=/^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+?\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,Oo="[a-zA-Z_][\\-\\.0-9_a-zA-Z"+z.source+"]*",Mo="((?:"+Oo+"\\:)?"+Oo+")",_o=new RegExp("^<"+Mo),Do=/^\s*(\/?)>/,To=new RegExp("^<\\/"+Mo+"[^>]*>"),$o=/^]+>/i,Ao=/^",""":'"',"&":"&"," ":"\n"," ":"\t","'":"'"},Ro=/&(?:lt|gt|quot|amp|#39);/g,zo=/&(?:lt|gt|quot|amp|#39|#10|#9);/g,jo=h("pre,textarea",!0),Fo=function(e,t){return e&&jo(e)&&"\n"===t[0]};function Lo(e,t){var n=t?zo:Ro;return e.replace(n,(function(e){return Io[e]}))}var Bo,Vo,Wo,qo,Ho,Jo,Ko,Yo,Uo=/^@|^v-on:/,Xo=/^v-|^@|^:|^#/,Go=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,Zo=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,Qo=/^\(|\)$/g,es=/^\[.*\]$/,ts=/:(.*)$/,ns=/^:|^\.|^v-bind:/,rs=/\.[^.\]]+(?=[^\]]*$)/g,is=/^v-slot(:|$)|^#/,ss=/[\r\n]/,as=/[ \f\t\r\n]+/g,ls=y(bo);function cs(e,t,n){return{type:1,tag:e,attrsList:t,attrsMap:gs(t),rawAttrsMap:{},parent:n,children:[]}}function us(e,t){Bo=t.warn||Ar,Jo=t.isPreTag||T,Ko=t.mustUseProp||T,Yo=t.getTagNamespace||T,t.isReservedTag,Wo=Er(t.modules,"transformNode"),qo=Er(t.modules,"preTransformNode"),Ho=Er(t.modules,"postTransformNode"),Vo=t.delimiters;var n,r,i=[],o=!1!==t.preserveWhitespace,s=t.whitespace,a=!1,l=!1;function c(e){if(u(e),a||e.processed||(e=ds(e,t)),i.length||e===n||n.if&&(e.elseif||e.else)&&fs(n,{exp:e.elseif,block:e}),r&&!e.forbidden)if(e.elseif||e.else)s=e,c=function(e){for(var t=e.length;t--;){if(1===e[t].type)return e[t];e.pop()}}(r.children),c&&c.if&&fs(c,{exp:s.elseif,block:s});else{if(e.slotScope){var o=e.slotTarget||'"default"';(r.scopedSlots||(r.scopedSlots={}))[o]=e}r.children.push(e),e.parent=r}var s,c;e.children=e.children.filter((function(e){return!e.slotScope})),u(e),e.pre&&(a=!1),Jo(e.tag)&&(l=!1);for(var d=0;d]*>)","i")),h=e.replace(d,(function(e,n,r){return c=r.length,No(u)||"noscript"===u||(n=n.replace(//g,"$1").replace(//g,"$1")),Fo(u,n)&&(n=n.slice(1)),t.chars&&t.chars(n),""}));l+=e.length-h.length,e=h,M(u,l-c,l)}else{var f=e.indexOf("<");if(0===f){if(Ao.test(e)){var p=e.indexOf("--\x3e");if(p>=0){t.shouldKeepComment&&t.comment(e.substring(4,p),l,l+p+3),k(p+3);continue}}if(Eo.test(e)){var m=e.indexOf("]>");if(m>=0){k(m+2);continue}}var g=e.match($o);if(g){k(g[0].length);continue}var v=e.match(To);if(v){var y=l;k(v[0].length),M(v[1],y,l);continue}var b=C();if(b){O(b),Fo(b.tagName,e)&&k(1);continue}}var w=void 0,x=void 0,S=void 0;if(f>=0){for(x=e.slice(f);!(To.test(x)||_o.test(x)||Ao.test(x)||Eo.test(x)||(S=x.indexOf("<",1))<0);)f+=S,x=e.slice(f);w=e.substring(0,f)}f<0&&(w=e),w&&k(w.length),t.chars&&w&&t.chars(w,l-w.length,l)}if(e===n){t.chars&&t.chars(e);break}}function k(t){l+=t,e=e.substring(t)}function C(){var t=e.match(_o);if(t){var n,r,i={tagName:t[1],attrs:[],start:l};for(k(t[0].length);!(n=e.match(Do))&&(r=e.match(Co)||e.match(ko));)r.start=l,k(r[0].length),r.end=l,i.attrs.push(r);if(n)return i.unarySlash=n[1],k(n[0].length),i.end=l,i}}function O(e){var n=e.tagName,l=e.unarySlash;o&&("p"===r&&So(n)&&M(r),a(n)&&r===n&&M(n));for(var c=s(n)||!!l,u=e.attrs.length,d=new Array(u),h=0;h=0&&i[s].lowerCasedTag!==a;s--);else s=0;if(s>=0){for(var c=i.length-1;c>=s;c--)t.end&&t.end(i[c].tag,n,o);i.length=s,r=s&&i[s-1].tag}else"br"===a?t.start&&t.start(e,[],!0,n,o):"p"===a&&(t.start&&t.start(e,[],!1,n,o),t.end&&t.end(e,n,o))}M()}(e,{warn:Bo,expectHTML:t.expectHTML,isUnaryTag:t.isUnaryTag,canBeLeftOpenTag:t.canBeLeftOpenTag,shouldDecodeNewlines:t.shouldDecodeNewlines,shouldDecodeNewlinesForHref:t.shouldDecodeNewlinesForHref,shouldKeepComment:t.comments,outputSourceRange:t.outputSourceRange,start:function(e,o,s,u,d){var h=r&&r.ns||Yo(e);J&&"svg"===h&&(o=function(e){for(var t=[],n=0;nl&&(a.push(o=e.slice(l,i)),s.push(JSON.stringify(o)));var c=Tr(r[1].trim());s.push("_s("+c+")"),a.push({"@binding":c}),l=i+r[0].length}return l-1"+("true"===o?":("+t+")":":_q("+t+","+o+")")),jr(e,"change","var $$a="+t+",$$el=$event.target,$$c=$$el.checked?("+o+"):("+s+");if(Array.isArray($$a)){var $$v="+(r?"_n("+i+")":i)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+qr(t,"$$a.concat([$$v])")+")}else{$$i>-1&&("+qr(t,"$$a.slice(0,$$i).concat($$a.slice($$i+1))")+")}}else{"+qr(t,"$$c")+"}",null,!0)}(e,r,i);else if("input"===o&&"radio"===s)!function(e,t,n){var r=n&&n.number,i=Fr(e,"value")||"null";Nr(e,"checked","_q("+t+","+(i=r?"_n("+i+")":i)+")"),jr(e,"change",qr(t,i),null,!0)}(e,r,i);else if("input"===o||"textarea"===o)!function(e,t,n){var r=e.attrsMap.type,i=n||{},o=i.lazy,s=i.number,a=i.trim,l=!o&&"range"!==r,c=o?"change":"range"===r?"__r":"input",u="$event.target.value";a&&(u="$event.target.value.trim()");s&&(u="_n("+u+")");var d=qr(t,u);l&&(d="if($event.target.composing)return;"+d);Nr(e,"value","("+t+")"),jr(e,c,d,null,!0),(a||s)&&jr(e,"blur","$forceUpdate()")}(e,r,i);else if(!R.isReservedTag(o))return Wr(e,r,i),!1;return!0},text:function(e,t){t.value&&Nr(e,"textContent","_s("+t.value+")",t)},html:function(e,t){t.value&&Nr(e,"innerHTML","_s("+t.value+")",t)}},Os={expectHTML:!0,modules:ws,directives:Cs,isPreTag:function(e){return"pre"===e},isUnaryTag:wo,mustUseProp:Rn,canBeLeftOpenTag:xo,isReservedTag:Gn,getTagNamespace:Zn,staticKeys:(xs=ws,xs.reduce((function(e,t){return e.concat(t.staticKeys||[])}),[]).join(","))},Ms=y((function(e){return h("type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap"+(e?","+e:""))}));function _s(e,t){e&&(Ss=Ms(t.staticKeys||""),ks=t.isReservedTag||T,Ds(e),Ts(e,!1))}function Ds(e){if(e.static=function(e){if(2===e.type)return!1;if(3===e.type)return!0;return!(!e.pre&&(e.hasBindings||e.if||e.for||f(e.tag)||!ks(e.tag)||function(e){for(;e.parent;){if("template"!==(e=e.parent).tag)return!1;if(e.for)return!0}return!1}(e)||!Object.keys(e).every(Ss)))}(e),1===e.type){if(!ks(e.tag)&&"slot"!==e.tag&&null==e.attrsMap["inline-template"])return;for(var t=0,n=e.children.length;t|^function(?:\s+[\w$]+)?\s*\(/,As=/\([^)]*?\);*$/,Es=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,Ns={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},Ps={esc:["Esc","Escape"],tab:"Tab",enter:"Enter",space:[" ","Spacebar"],up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete","Del"]},Is=function(e){return"if("+e+")return null;"},Rs={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:Is("$event.target !== $event.currentTarget"),ctrl:Is("!$event.ctrlKey"),shift:Is("!$event.shiftKey"),alt:Is("!$event.altKey"),meta:Is("!$event.metaKey"),left:Is("'button' in $event && $event.button !== 0"),middle:Is("'button' in $event && $event.button !== 1"),right:Is("'button' in $event && $event.button !== 2")};function zs(e,t){var n=t?"nativeOn:":"on:",r="",i="";for(var o in e){var s=js(e[o]);e[o]&&e[o].dynamic?i+=o+","+s+",":r+='"'+o+'":'+s+","}return r="{"+r.slice(0,-1)+"}",i?n+"_d("+r+",["+i.slice(0,-1)+"])":n+r}function js(e){if(!e)return"function(){}";if(Array.isArray(e))return"["+e.map((function(e){return js(e)})).join(",")+"]";var t=Es.test(e.value),n=$s.test(e.value),r=Es.test(e.value.replace(As,""));if(e.modifiers){var i="",o="",s=[];for(var a in e.modifiers)if(Rs[a])o+=Rs[a],Ns[a]&&s.push(a);else if("exact"===a){var l=e.modifiers;o+=Is(["ctrl","shift","alt","meta"].filter((function(e){return!l[e]})).map((function(e){return"$event."+e+"Key"})).join("||"))}else s.push(a);return s.length&&(i+=function(e){return"if(!$event.type.indexOf('key')&&"+e.map(Fs).join("&&")+")return null;"}(s)),o&&(i+=o),"function($event){"+i+(t?"return "+e.value+".apply(null, arguments)":n?"return ("+e.value+").apply(null, arguments)":r?"return "+e.value:e.value)+"}"}return t||n?e.value:"function($event){"+(r?"return "+e.value:e.value)+"}"}function Fs(e){var t=parseInt(e,10);if(t)return"$event.keyCode!=="+t;var n=Ns[e],r=Ps[e];return"_k($event.keyCode,"+JSON.stringify(e)+","+JSON.stringify(n)+",$event.key,"+JSON.stringify(r)+")"}var Ls={on:function(e,t){e.wrapListeners=function(e){return"_g("+e+","+t.value+")"}},bind:function(e,t){e.wrapData=function(n){return"_b("+n+",'"+e.tag+"',"+t.value+","+(t.modifiers&&t.modifiers.prop?"true":"false")+(t.modifiers&&t.modifiers.sync?",true":"")+")"}},cloak:D},Bs=function(e){this.options=e,this.warn=e.warn||Ar,this.transforms=Er(e.modules,"transformCode"),this.dataGenFns=Er(e.modules,"genData"),this.directives=M(M({},Ls),e.directives);var t=e.isReservedTag||T;this.maybeComponent=function(e){return!!e.component||!t(e.tag)},this.onceId=0,this.staticRenderFns=[],this.pre=!1};function Vs(e,t){var n=new Bs(t);return{render:"with(this){return "+(e?"script"===e.tag?"null":Ws(e,n):'_c("div")')+"}",staticRenderFns:n.staticRenderFns}}function Ws(e,t){if(e.parent&&(e.pre=e.pre||e.parent.pre),e.staticRoot&&!e.staticProcessed)return qs(e,t);if(e.once&&!e.onceProcessed)return Hs(e,t);if(e.for&&!e.forProcessed)return Ys(e,t);if(e.if&&!e.ifProcessed)return Js(e,t);if("template"!==e.tag||e.slotTarget||t.pre){if("slot"===e.tag)return function(e,t){var n=e.slotName||'"default"',r=Zs(e,t),i="_t("+n+(r?",function(){return "+r+"}":""),o=e.attrs||e.dynamicAttrs?ta((e.attrs||[]).concat(e.dynamicAttrs||[]).map((function(e){return{name:w(e.name),value:e.value,dynamic:e.dynamic}}))):null,s=e.attrsMap["v-bind"];!o&&!s||r||(i+=",null");o&&(i+=","+o);s&&(i+=(o?"":",null")+","+s);return i+")"}(e,t);var n;if(e.component)n=function(e,t,n){var r=t.inlineTemplate?null:Zs(t,n,!0);return"_c("+e+","+Us(t,n)+(r?","+r:"")+")"}(e.component,e,t);else{var r;(!e.plain||e.pre&&t.maybeComponent(e))&&(r=Us(e,t));var i=e.inlineTemplate?null:Zs(e,t,!0);n="_c('"+e.tag+"'"+(r?","+r:"")+(i?","+i:"")+")"}for(var o=0;o>>0}(s):"")+")"}(e,e.scopedSlots,t)+","),e.model&&(n+="model:{value:"+e.model.value+",callback:"+e.model.callback+",expression:"+e.model.expression+"},"),e.inlineTemplate){var o=function(e,t){var n=e.children[0];if(n&&1===n.type){var r=Vs(n,t.options);return"inlineTemplate:{render:function(){"+r.render+"},staticRenderFns:["+r.staticRenderFns.map((function(e){return"function(){"+e+"}"})).join(",")+"]}"}}(e,t);o&&(n+=o+",")}return n=n.replace(/,$/,"")+"}",e.dynamicAttrs&&(n="_b("+n+',"'+e.tag+'",'+ta(e.dynamicAttrs)+")"),e.wrapData&&(n=e.wrapData(n)),e.wrapListeners&&(n=e.wrapListeners(n)),n}function Xs(e){return 1===e.type&&("slot"===e.tag||e.children.some(Xs))}function Gs(e,t){var n=e.attrsMap["slot-scope"];if(e.if&&!e.ifProcessed&&!n)return Js(e,t,Gs,"null");if(e.for&&!e.forProcessed)return Ys(e,t,Gs);var r="_empty_"===e.slotScope?"":String(e.slotScope),i="function("+r+"){return "+("template"===e.tag?e.if&&n?"("+e.if+")?"+(Zs(e,t)||"undefined")+":undefined":Zs(e,t)||"undefined":Ws(e,t))+"}",o=r?"":",proxy:true";return"{key:"+(e.slotTarget||'"default"')+",fn:"+i+o+"}"}function Zs(e,t,n,r,i){var o=e.children;if(o.length){var s=o[0];if(1===o.length&&s.for&&"template"!==s.tag&&"slot"!==s.tag){var a=n?t.maybeComponent(s)?",1":",0":"";return""+(r||Ws)(s,t)+a}var l=n?function(e,t){for(var n=0,r=0;r':'
',sa.innerHTML.indexOf(" ")>0}var ua=!!V&&ca(!1),da=!!V&&ca(!0),ha=y((function(e){var t=tr(e);return t&&t.innerHTML})),fa=Mn.prototype.$mount;Mn.prototype.$mount=function(e,t){if((e=e&&tr(e))===document.body||e===document.documentElement)return this;var n=this.$options;if(!n.render){var r=n.template;if(r)if("string"==typeof r)"#"===r.charAt(0)&&(r=ha(r));else{if(!r.nodeType)return this;r=r.innerHTML}else e&&(r=function(e){if(e.outerHTML)return e.outerHTML;var t=document.createElement("div");return t.appendChild(e.cloneNode(!0)),t.innerHTML}(e));if(r){var i=la(r,{outputSourceRange:!1,shouldDecodeNewlines:ua,shouldDecodeNewlinesForHref:da,delimiters:n.delimiters,comments:n.comments},this),o=i.render,s=i.staticRenderFns;n.render=o,n.staticRenderFns=s}}return fa.call(this,e,t)},Mn.compile=la;var pa=("undefined"!=typeof window?window:"undefined"!=typeof global?global:{}).__VUE_DEVTOOLS_GLOBAL_HOOK__;function ma(e,t){if(void 0===t&&(t=[]),null===e||"object"!=typeof e)return e;var n,r=(n=function(t){return t.original===e},t.filter(n)[0]);if(r)return r.copy;var i=Array.isArray(e)?[]:{};return t.push({original:e,copy:i}),Object.keys(e).forEach((function(n){i[n]=ma(e[n],t)})),i}function ga(e,t){Object.keys(e).forEach((function(n){return t(e[n],n)}))}function va(e){return null!==e&&"object"==typeof e}var ya=function(e,t){this.runtime=t,this._children=Object.create(null),this._rawModule=e;var n=e.state;this.state=("function"==typeof n?n():n)||{}},ba={namespaced:{configurable:!0}};ba.namespaced.get=function(){return!!this._rawModule.namespaced},ya.prototype.addChild=function(e,t){this._children[e]=t},ya.prototype.removeChild=function(e){delete this._children[e]},ya.prototype.getChild=function(e){return this._children[e]},ya.prototype.hasChild=function(e){return e in this._children},ya.prototype.update=function(e){this._rawModule.namespaced=e.namespaced,e.actions&&(this._rawModule.actions=e.actions),e.mutations&&(this._rawModule.mutations=e.mutations),e.getters&&(this._rawModule.getters=e.getters)},ya.prototype.forEachChild=function(e){ga(this._children,e)},ya.prototype.forEachGetter=function(e){this._rawModule.getters&&ga(this._rawModule.getters,e)},ya.prototype.forEachAction=function(e){this._rawModule.actions&&ga(this._rawModule.actions,e)},ya.prototype.forEachMutation=function(e){this._rawModule.mutations&&ga(this._rawModule.mutations,e)},Object.defineProperties(ya.prototype,ba);var wa,xa=function(e){this.register([],e,!1)};function Sa(e,t,n){if(t.update(n),n.modules)for(var r in n.modules){if(!t.getChild(r))return;Sa(e.concat(r),t.getChild(r),n.modules[r])}}xa.prototype.get=function(e){return e.reduce((function(e,t){return e.getChild(t)}),this.root)},xa.prototype.getNamespace=function(e){var t=this.root;return e.reduce((function(e,n){return e+((t=t.getChild(n)).namespaced?n+"/":"")}),"")},xa.prototype.update=function(e){Sa([],this.root,e)},xa.prototype.register=function(e,t,n){var r=this;void 0===n&&(n=!0);var i=new ya(t,n);0===e.length?this.root=i:this.get(e.slice(0,-1)).addChild(e[e.length-1],i);t.modules&&ga(t.modules,(function(t,i){r.register(e.concat(i),t,n)}))},xa.prototype.unregister=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1],r=t.getChild(n);r&&r.runtime&&t.removeChild(n)},xa.prototype.isRegistered=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1];return!!t&&t.hasChild(n)};var ka=function(e){var t=this;void 0===e&&(e={}),!wa&&"undefined"!=typeof window&&window.Vue&&Aa(window.Vue);var n=e.plugins;void 0===n&&(n=[]);var r=e.strict;void 0===r&&(r=!1),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new xa(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new wa,this._makeLocalGettersCache=Object.create(null);var i=this,o=this.dispatch,s=this.commit;this.dispatch=function(e,t){return o.call(i,e,t)},this.commit=function(e,t,n){return s.call(i,e,t,n)},this.strict=r;var a=this._modules.root.state;Da(this,a,[],this._modules.root),_a(this,a),n.forEach((function(e){return e(t)})),(void 0!==e.devtools?e.devtools:wa.config.devtools)&&function(e){pa&&(e._devtoolHook=pa,pa.emit("vuex:init",e),pa.on("vuex:travel-to-state",(function(t){e.replaceState(t)})),e.subscribe((function(e,t){pa.emit("vuex:mutation",e,t)}),{prepend:!0}),e.subscribeAction((function(e,t){pa.emit("vuex:action",e,t)}),{prepend:!0}))}(this)},Ca={state:{configurable:!0}};function Oa(e,t,n){return t.indexOf(e)<0&&(n&&n.prepend?t.unshift(e):t.push(e)),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}function Ma(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var n=e.state;Da(e,n,[],e._modules.root,!0),_a(e,n,t)}function _a(e,t,n){var r=e._vm;e.getters={},e._makeLocalGettersCache=Object.create(null);var i=e._wrappedGetters,o={};ga(i,(function(t,n){o[n]=function(e,t){return function(){return e(t)}}(t,e),Object.defineProperty(e.getters,n,{get:function(){return e._vm[n]},enumerable:!0})}));var s=wa.config.silent;wa.config.silent=!0,e._vm=new wa({data:{$$state:t},computed:o}),wa.config.silent=s,e.strict&&function(e){e._vm.$watch((function(){return this._data.$$state}),(function(){}),{deep:!0,sync:!0})}(e),r&&(n&&e._withCommit((function(){r._data.$$state=null})),wa.nextTick((function(){return r.$destroy()})))}function Da(e,t,n,r,i){var o=!n.length,s=e._modules.getNamespace(n);if(r.namespaced&&(e._modulesNamespaceMap[s],e._modulesNamespaceMap[s]=r),!o&&!i){var a=Ta(t,n.slice(0,-1)),l=n[n.length-1];e._withCommit((function(){wa.set(a,l,r.state)}))}var c=r.context=function(e,t,n){var r=""===t,i={dispatch:r?e.dispatch:function(n,r,i){var o=$a(n,r,i),s=o.payload,a=o.options,l=o.type;return a&&a.root||(l=t+l),e.dispatch(l,s)},commit:r?e.commit:function(n,r,i){var o=$a(n,r,i),s=o.payload,a=o.options,l=o.type;a&&a.root||(l=t+l),e.commit(l,s,a)}};return Object.defineProperties(i,{getters:{get:r?function(){return e.getters}:function(){return function(e,t){if(!e._makeLocalGettersCache[t]){var n={},r=t.length;Object.keys(e.getters).forEach((function(i){if(i.slice(0,r)===t){var o=i.slice(r);Object.defineProperty(n,o,{get:function(){return e.getters[i]},enumerable:!0})}})),e._makeLocalGettersCache[t]=n}return e._makeLocalGettersCache[t]}(e,t)}},state:{get:function(){return Ta(e.state,n)}}}),i}(e,s,n);r.forEachMutation((function(t,n){!function(e,t,n,r){(e._mutations[t]||(e._mutations[t]=[])).push((function(t){n.call(e,r.state,t)}))}(e,s+n,t,c)})),r.forEachAction((function(t,n){var r=t.root?n:s+n,i=t.handler||t;!function(e,t,n,r){(e._actions[t]||(e._actions[t]=[])).push((function(t){var i,o=n.call(e,{dispatch:r.dispatch,commit:r.commit,getters:r.getters,state:r.state,rootGetters:e.getters,rootState:e.state},t);return(i=o)&&"function"==typeof i.then||(o=Promise.resolve(o)),e._devtoolHook?o.catch((function(t){throw e._devtoolHook.emit("vuex:error",t),t})):o}))}(e,r,i,c)})),r.forEachGetter((function(t,n){!function(e,t,n,r){if(e._wrappedGetters[t])return;e._wrappedGetters[t]=function(e){return n(r.state,r.getters,e.state,e.getters)}}(e,s+n,t,c)})),r.forEachChild((function(r,o){Da(e,t,n.concat(o),r,i)}))}function Ta(e,t){return t.reduce((function(e,t){return e[t]}),e)}function $a(e,t,n){return va(e)&&e.type&&(n=t,t=e,e=e.type),{type:e,payload:t,options:n}}function Aa(e){wa&&e===wa|| /*! * vuex v3.6.2 * (c) 2021 Evan You * @license MIT */ -function(t){if(Number(t.version.split(".")[0])>=2)t.mixin({beforeCreate:n});else{var e=t.prototype._init;t.prototype._init=function(t){void 0===t&&(t={}),t.init=t.init?[n].concat(t.init):n,e.call(this,t)}}function n(){var t=this.$options;t.store?this.$store="function"==typeof t.store?t.store():t.store:t.parent&&t.parent.$store&&(this.$store=t.parent.$store)}}(xs=t)}Os.state.get=function(){return this._vm._data.$$state},Os.state.set=function(t){},_s.prototype.commit=function(t,e,n){var r=this,o=As(t,e,n),i=o.type,a=o.payload,s={type:i,payload:a},c=this._mutations[i];c&&(this._withCommit((function(){c.forEach((function(t){t(a)}))})),this._subscribers.slice().forEach((function(t){return t(s,r.state)})))},_s.prototype.dispatch=function(t,e){var n=this,r=As(t,e),o=r.type,i=r.payload,a={type:o,payload:i},s=this._actions[o];if(s){try{this._actionSubscribers.slice().filter((function(t){return t.before})).forEach((function(t){return t.before(a,n.state)}))}catch(My){}var c=s.length>1?Promise.all(s.map((function(t){return t(i)}))):s[0](i);return new Promise((function(t,e){c.then((function(e){try{n._actionSubscribers.filter((function(t){return t.after})).forEach((function(t){return t.after(a,n.state)}))}catch(My){}t(e)}),(function(t){try{n._actionSubscribers.filter((function(t){return t.error})).forEach((function(e){return e.error(a,n.state,t)}))}catch(My){}e(t)}))}))}},_s.prototype.subscribe=function(t,e){return Cs(t,this._subscribers,e)},_s.prototype.subscribeAction=function(t,e){return Cs("function"==typeof t?{before:t}:t,this._actionSubscribers,e)},_s.prototype.watch=function(t,e,n){var r=this;return this._watcherVM.$watch((function(){return t(r.state,r.getters)}),e,n)},_s.prototype.replaceState=function(t){var e=this;this._withCommit((function(){e._vm._data.$$state=t}))},_s.prototype.registerModule=function(t,e,n){void 0===n&&(n={}),"string"==typeof t&&(t=[t]),this._modules.register(t,e),Ts(this,this.state,t,this._modules.get(t),n.preserveState),Ds(this,this.state)},_s.prototype.unregisterModule=function(t){var e=this;"string"==typeof t&&(t=[t]),this._modules.unregister(t),this._withCommit((function(){var n=$s(e.state,t.slice(0,-1));xs.delete(n,t[t.length-1])})),Ms(this)},_s.prototype.hasModule=function(t){return"string"==typeof t&&(t=[t]),this._modules.isRegistered(t)},_s.prototype.hotUpdate=function(t){this._modules.update(t),Ms(this,!0)},_s.prototype._withCommit=function(t){var e=this._committing;this._committing=!0,t(),this._committing=e},Object.defineProperties(_s.prototype,Os);var Ns=zs((function(t,e){var n={};return Rs(e).forEach((function(e){var r=e.key,o=e.val;n[r]=function(){var e=this.$store.state,n=this.$store.getters;if(t){var r=Fs(this.$store,"mapState",t);if(!r)return;e=r.context.state,n=r.context.getters}return"function"==typeof o?o.call(this,e,n):e[o]},n[r].vuex=!0})),n})),Ps=zs((function(t,e){var n={};return Rs(e).forEach((function(e){var r=e.key,o=e.val;n[r]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var r=this.$store.commit;if(t){var i=Fs(this.$store,"mapMutations",t);if(!i)return;r=i.context.commit}return"function"==typeof o?o.apply(this,[r].concat(e)):r.apply(this.$store,[o].concat(e))}})),n})),Is=zs((function(t,e){var n={};return Rs(e).forEach((function(e){var r=e.key,o=e.val;o=t+o,n[r]=function(){if(!t||Fs(this.$store,"mapGetters",t))return this.$store.getters[o]},n[r].vuex=!0})),n})),js=zs((function(t,e){var n={};return Rs(e).forEach((function(e){var r=e.key,o=e.val;n[r]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var r=this.$store.dispatch;if(t){var i=Fs(this.$store,"mapActions",t);if(!i)return;r=i.context.dispatch}return"function"==typeof o?o.apply(this,[r].concat(e)):r.apply(this.$store,[o].concat(e))}})),n}));function Rs(t){return function(t){return Array.isArray(t)||ys(t)}(t)?Array.isArray(t)?t.map((function(t){return{key:t,val:t}})):Object.keys(t).map((function(e){return{key:e,val:t[e]}})):[]}function zs(t){return function(e,n){return"string"!=typeof e?(n=e,e=""):"/"!==e.charAt(e.length-1)&&(e+="/"),t(e,n)}}function Fs(t,e,n){return t._modulesNamespaceMap[n]}function Ls(t,e,n){var r=n?t.groupCollapsed:t.group;try{r.call(t,e)}catch(My){t.log(e)}}function Bs(t){try{t.groupEnd()}catch(My){t.log("—— log end ——")}}function Vs(){var t=new Date;return" @ "+Ws(t.getHours(),2)+":"+Ws(t.getMinutes(),2)+":"+Ws(t.getSeconds(),2)+"."+Ws(t.getMilliseconds(),3)}function Ws(t,e){return n="0",r=e-t.toString().length,new Array(r+1).join(n)+t;var n,r}var qs={Store:_s,install:Es,version:"3.6.2",mapState:Ns,mapMutations:Ps,mapGetters:Is,mapActions:js,createNamespacedHelpers:function(t){return{mapState:Ns.bind(null,t),mapGetters:Is.bind(null,t),mapMutations:Ps.bind(null,t),mapActions:js.bind(null,t)}},createLogger:function(t){void 0===t&&(t={});var e=t.collapsed;void 0===e&&(e=!0);var n=t.filter;void 0===n&&(n=function(t,e,n){return!0});var r=t.transformer;void 0===r&&(r=function(t){return t});var o=t.mutationTransformer;void 0===o&&(o=function(t){return t});var i=t.actionFilter;void 0===i&&(i=function(t,e){return!0});var a=t.actionTransformer;void 0===a&&(a=function(t){return t});var s=t.logMutations;void 0===s&&(s=!0);var c=t.logActions;void 0===c&&(c=!0);var l=t.logger;return void 0===l&&(l=console),function(t){var u=ms(t.state);void 0!==l&&(s&&t.subscribe((function(t,i){var a=ms(i);if(n(t,u,a)){var s=Vs(),c=o(t),f="mutation "+t.type+s;Ls(l,f,e),l.log("%c prev state","color: #9E9E9E; font-weight: bold",r(u)),l.log("%c mutation","color: #03A9F4; font-weight: bold",c),l.log("%c next state","color: #4CAF50; font-weight: bold",r(a)),Bs(l)}u=a})),c&&t.subscribeAction((function(t,n){if(i(t,n)){var r=Vs(),o=a(t),s="action "+t.type+r;Ls(l,s,e),l.log("%c action","color: #03A9F4; font-weight: bold",o),Bs(l)}})))}}};function Hs(t){return{all:t=t||new Map,on:function(e,n){var r=t.get(e);r?r.push(n):t.set(e,[n])},off:function(e,n){var r=t.get(e);r&&(n?r.splice(r.indexOf(n)>>>0,1):t.set(e,[]))},emit:function(e,n){var r=t.get(e);r&&r.slice().map((function(t){t(n)})),(r=t.get("*"))&&r.slice().map((function(t){t(e,n)}))}}}var Js,Ks,Ys="function"==typeof Map?new Map:(Js=[],Ks=[],{has:function(t){return Js.indexOf(t)>-1},get:function(t){return Ks[Js.indexOf(t)]},set:function(t,e){-1===Js.indexOf(t)&&(Js.push(t),Ks.push(e))},delete:function(t){var e=Js.indexOf(t);e>-1&&(Js.splice(e,1),Ks.splice(e,1))}}),Us=function(t){return new Event(t,{bubbles:!0})};try{new Event("test")}catch(My){Us=function(t){var e=document.createEvent("Event");return e.initEvent(t,!0,!1),e}}function Xs(t){var e=Ys.get(t);e&&e.destroy()}function Gs(t){var e=Ys.get(t);e&&e.update()}var Zs=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((Zs=function(t){return t}).destroy=function(t){return t},Zs.update=function(t){return t}):((Zs=function(t,e){return t&&Array.prototype.forEach.call(t.length?t:[t],(function(t){return function(t){if(t&&t.nodeName&&"TEXTAREA"===t.nodeName&&!Ys.has(t)){var e,n=null,r=null,o=null,i=function(){t.clientWidth!==r&&l()},a=function(e){window.removeEventListener("resize",i,!1),t.removeEventListener("input",l,!1),t.removeEventListener("keyup",l,!1),t.removeEventListener("autosize:destroy",a,!1),t.removeEventListener("autosize:update",l,!1),Object.keys(e).forEach((function(n){t.style[n]=e[n]})),Ys.delete(t)}.bind(t,{height:t.style.height,resize:t.style.resize,overflowY:t.style.overflowY,overflowX:t.style.overflowX,wordWrap:t.style.wordWrap});t.addEventListener("autosize:destroy",a,!1),"onpropertychange"in t&&"oninput"in t&&t.addEventListener("keyup",l,!1),window.addEventListener("resize",i,!1),t.addEventListener("input",l,!1),t.addEventListener("autosize:update",l,!1),t.style.overflowX="hidden",t.style.wordWrap="break-word",Ys.set(t,{destroy:a,update:l}),"vertical"===(e=window.getComputedStyle(t,null)).resize?t.style.resize="none":"both"===e.resize&&(t.style.resize="horizontal"),n="content-box"===e.boxSizing?-(parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)):parseFloat(e.borderTopWidth)+parseFloat(e.borderBottomWidth),isNaN(n)&&(n=0),l()}function s(e){var n=t.style.width;t.style.width="0px",t.style.width=n,t.style.overflowY=e}function c(){if(0!==t.scrollHeight){var e=function(t){for(var e=[];t&&t.parentNode&&t.parentNode instanceof Element;)t.parentNode.scrollTop&&e.push({node:t.parentNode,scrollTop:t.parentNode.scrollTop}),t=t.parentNode;return e}(t),o=document.documentElement&&document.documentElement.scrollTop;t.style.height="",t.style.height=t.scrollHeight+n+"px",r=t.clientWidth,e.forEach((function(t){t.node.scrollTop=t.scrollTop})),o&&(document.documentElement.scrollTop=o)}}function l(){c();var e=Math.round(parseFloat(t.style.height)),n=window.getComputedStyle(t,null),r="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):t.offsetHeight;if(r=e?t:""+Array(e+1-r.length).join(n)+t},y={s:g,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),o=n%60;return(e<=0?"+":"-")+g(r,2,"0")+":"+g(o,2,"0")},m:function t(e,n){if(e.date()68?1900:2e3)},s=function(t){return function(e){this[t]=+e}},c=[/[+-]\d\d:?(\d\d)?|Z/,function(t){(this.zone||(this.zone={})).offset=function(t){if(!t)return 0;if("Z"===t)return 0;var e=t.match(/([+-]|\d\d)/g),n=60*e[1]+(+e[2]||0);return 0===n?0:"+"===e[0]?-n:n}(t)}],l=function(t){var e=i[t];return e&&(e.indexOf?e:e.s.concat(e.f))},u=function(t,e){var n,r=i.meridiem;if(r){for(var o=1;o<=24;o+=1)if(t.indexOf(r(o,0,e))>-1){n=o>12;break}}else n=t===(e?"pm":"PM");return n},f={A:[o,function(t){this.afternoon=u(t,!1)}],a:[o,function(t){this.afternoon=u(t,!0)}],S:[/\d/,function(t){this.milliseconds=100*+t}],SS:[n,function(t){this.milliseconds=10*+t}],SSS:[/\d{3}/,function(t){this.milliseconds=+t}],s:[r,s("seconds")],ss:[r,s("seconds")],m:[r,s("minutes")],mm:[r,s("minutes")],H:[r,s("hours")],h:[r,s("hours")],HH:[r,s("hours")],hh:[r,s("hours")],D:[r,s("day")],DD:[n,s("day")],Do:[o,function(t){var e=i.ordinal,n=t.match(/\d+/);if(this.day=n[0],e)for(var r=1;r<=31;r+=1)e(r).replace(/\[|\]/g,"")===t&&(this.day=r)}],M:[r,s("month")],MM:[n,s("month")],MMM:[o,function(t){var e=l("months"),n=(l("monthsShort")||e.map((function(t){return t.substr(0,3)}))).indexOf(t)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[o,function(t){var e=l("months").indexOf(t)+1;if(e<1)throw new Error;this.month=e%12||e}],Y:[/[+-]?\d+/,s("year")],YY:[n,function(t){this.year=a(t)}],YYYY:[/\d{4}/,s("year")],Z:c,ZZ:c};function p(n){var r,o;r=n,o=i&&i.formats;for(var a=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(e,n,r){var i=r&&r.toUpperCase();return n||o[r]||t[r]||o[i].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,n){return e||n.slice(1)}))}))).match(e),s=a.length,c=0;c-1)return new Date(("X"===e?1e3:1)*t);var r=p(e)(t),o=r.year,i=r.month,a=r.day,s=r.hours,c=r.minutes,l=r.seconds,u=r.milliseconds,f=r.zone,d=new Date,h=a||(o||i?1:d.getDate()),v=o||d.getFullYear(),m=0;o&&!i||(m=i>0?i-1:d.getMonth());var g=s||0,y=c||0,b=l||0,w=u||0;return f?new Date(Date.UTC(v,m,h,g,y,b,w+60*f.offset*1e3)):n?new Date(Date.UTC(v,m,h,g,y,b,w)):new Date(v,m,h,g,y,b,w)}catch(x){return new Date("")}}(e,s,r),this.init(),f&&!0!==f&&(this.$L=this.locale(f).$L),u&&e!=this.format(s)&&(this.$d=new Date("")),i={}}else if(s instanceof Array)for(var d=s.length,h=1;h<=d;h+=1){a[1]=s[h-1];var v=n.apply(this,a);if(v.isValid()){this.$d=v.$d,this.$L=v.$L,this.init();break}h===d&&(this.$d=new Date(""))}else o.call(this,t)}}}();function ic(t){return(ic="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var ac={selector:"vue-portal-target-".concat(((t=21)=>{let e="",n=t;for(;n--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e})())},sc=function(t){return ac.selector=t},cc="undefined"!=typeof window&&void 0!==("undefined"==typeof document?"undefined":ic(document)),lc=Cn.extend({abstract:!0,name:"PortalOutlet",props:["nodes","tag"],data:function(t){return{updatedNodes:t.nodes}},render:function(t){var e=this.updatedNodes&&this.updatedNodes();return e?1!==e.length||e[0].text?t(this.tag||"DIV",e):e:t()},destroyed:function(){var t=this.$el;t&&t.parentNode.removeChild(t)}}),uc=Cn.extend({name:"VueSimplePortal",props:{disabled:{type:Boolean},prepend:{type:Boolean},selector:{type:String,default:function(){return"#".concat(ac.selector)}},tag:{type:String,default:"DIV"}},render:function(t){if(this.disabled){var e=this.$scopedSlots&&this.$scopedSlots.default();return e?e.length<2&&!e[0].text?e:t(this.tag,e):t()}return t()},created:function(){this.getTargetEl()||this.insertTargetEl()},updated:function(){var t=this;this.$nextTick((function(){t.disabled||t.slotFn===t.$scopedSlots.default||(t.container.updatedNodes=t.$scopedSlots.default),t.slotFn=t.$scopedSlots.default}))},beforeDestroy:function(){this.unmount()},watch:{disabled:{immediate:!0,handler:function(t){t?this.unmount():this.$nextTick(this.mount)}}},methods:{getTargetEl:function(){if(cc)return document.querySelector(this.selector)},insertTargetEl:function(){if(cc){var t=document.querySelector("body"),e=document.createElement(this.tag);e.id=this.selector.substring(1),t.appendChild(e)}},mount:function(){if(cc){var t=this.getTargetEl(),e=document.createElement("DIV");this.prepend&&t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e),this.container=new lc({el:e,parent:this,propsData:{tag:this.tag,nodes:this.$scopedSlots.default}})}},unmount:function(){this.container&&(this.container.$destroy(),delete this.container)}}});function fc(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.component(e.name||"portal",uc),e.defaultSelector&&sc(e.defaultSelector)}"undefined"!=typeof window&&window.Vue&&window.Vue===Cn&&Cn.use(fc);var pc={},dc={};function hc(t){return null==t}function vc(t){return null!=t}function mc(t,e){return e.tag===t.tag&&e.key===t.key}function gc(t){var e=t.tag;t.vm=new e({data:t.args})}function yc(t,e,n){var r,o,i={};for(r=e;r<=n;++r)vc(o=t[r].key)&&(i[o]=r);return i}function bc(t,e,n){for(;e<=n;++e)gc(t[e])}function wc(t,e,n){for(;e<=n;++e){var r=t[e];vc(r)&&(r.vm.$destroy(),r.vm=null)}}function xc(t,e){t!==e&&(e.vm=t.vm,function(t){for(var e=Object.keys(t.args),n=0;ns?bc(e,a,u):a>u&&wc(t,i,s)}(t,e):vc(e)?bc(e,0,e.length-1):vc(t)&&wc(t,0,t.length-1)};var Sc={};function kc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function _c(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,r=new Array(e);n1?s:s.$sub[0]:null}}},computed:{run:function(){var t=this,e=this.lazyParentModel();if(Array.isArray(e)&&e.__ob__){var n=e.__ob__.dep;n.depend();var r=n.constructor.target;if(!this._indirectWatcher){var o=r.constructor;this._indirectWatcher=new o(this,(function(){return t.runRule(e)}),null,{lazy:!0})}var i=this.getModel();if(!this._indirectWatcher.dirty&&this._lastModel===i)return this._indirectWatcher.depend(),r.value;this._lastModel=i,this._indirectWatcher.evaluate(),this._indirectWatcher.depend()}else this._indirectWatcher&&(this._indirectWatcher.teardown(),this._indirectWatcher=null);return this._indirectWatcher?this._indirectWatcher.value:this.runRule(e)},$params:function(){return this.run.params},proxy:function(){var t=this.run.output;return t.__isVuelidateAsyncVm?!!t.v:!!t},$pending:function(){var t=this.run.output;return!!t.__isVuelidateAsyncVm&&t.p}},destroyed:function(){this._indirectWatcher&&(this._indirectWatcher.teardown(),this._indirectWatcher=null)}}),s=o.extend({data:function(){return{dirty:!1,validations:null,lazyModel:null,model:null,prop:null,lazyParentModel:null,rootModel:null}},methods:a(a({},m),{},{refProxy:function(t){return this.getRef(t).proxy},getRef:function(t){return this.refs[t]},isNested:function(t){return"function"!=typeof this.validations[t]}}),computed:a(a({},h),{},{nestedKeys:function(){return this.keys.filter(this.isNested)},ruleKeys:function(){var t=this;return this.keys.filter((function(e){return!t.isNested(e)}))},keys:function(){return Object.keys(this.validations).filter((function(t){return"$params"!==t}))},proxy:function(){var t=this,e=u(this.keys,(function(e){return{enumerable:!0,configurable:!0,get:function(){return t.refProxy(e)}}})),n=u(g,(function(e){return{enumerable:!0,configurable:!0,get:function(){return t[e]}}})),r=u(y,(function(e){return{enumerable:!1,configurable:!0,get:function(){return t[e]}}})),o=this.hasIter()?{$iter:{enumerable:!0,value:Object.defineProperties({},a({},e))}}:{};return Object.defineProperties({},a(a(a(a({},e),o),{},{$model:{enumerable:!0,get:function(){var e=t.lazyParentModel();return null!=e?e[t.prop]:null},set:function(e){var n=t.lazyParentModel();null!=n&&(n[t.prop]=e,t.$touch())}}},n),r))},children:function(){var t=this;return[].concat(r(this.nestedKeys.map((function(e){return w(t,e)}))),r(this.ruleKeys.map((function(e){return x(t,e)})))).filter(Boolean)}})}),c=s.extend({methods:{isNested:function(t){return void 0!==this.validations[t]()},getRef:function(t){var e=this;return{get proxy(){return e.validations[t]()||!1}}}}}),v=s.extend({computed:{keys:function(){var t=this.getModel();return p(t)?Object.keys(t):[]},tracker:function(){var t=this,e=this.validations.$trackBy;return e?function(n){return"".concat(d(t.rootModel,t.getModelKey(n),e))}:function(t){return"".concat(t)}},getModelLazy:function(){var t=this;return function(){return t.getModel()}},children:function(){var t=this,n=this.validations,r=this.getModel(),o=a({},n);delete o.$trackBy;var i={};return this.keys.map((function(n){var a=t.tracker(n);return i.hasOwnProperty(a)?null:(i[a]=!0,(0,e.h)(s,a,{validations:o,prop:n,lazyParentModel:t.getModelLazy,model:r[n],rootModel:t.rootModel}))})).filter(Boolean)}},methods:{isNested:function(){return!0},getRef:function(t){return this.refs[this.tracker(t)]},hasIter:function(){return!0}}}),w=function(t,n){if("$each"===n)return(0,e.h)(v,n,{validations:t.validations[n],lazyParentModel:t.lazyParentModel,prop:n,lazyModel:t.getModel,rootModel:t.rootModel});var r=t.validations[n];if(Array.isArray(r)){var o=t.rootModel,i=u(r,(function(t){return function(){return d(o,o.$v,t)}}),(function(t){return Array.isArray(t)?t.join("."):t}));return(0,e.h)(c,n,{validations:i,lazyParentModel:l,prop:n,lazyModel:l,rootModel:o})}return(0,e.h)(s,n,{validations:r,lazyParentModel:t.getModel,prop:n,lazyModel:t.getModelKey,rootModel:t.rootModel})},x=function(t,n){return(0,e.h)(i,n,{rule:t.validations[n],lazyParentModel:t.lazyParentModel,lazyModel:t.getModel,rootModel:t.rootModel})};return b={VBase:o,Validation:s}},x=null;var S=function(t,n){var r=function(t){if(x)return x;for(var e=t.constructor;e.super;)e=e.super;return x=e,e}(t),o=w(r),i=o.Validation;return new(0,o.VBase)({computed:{children:function(){var r="function"==typeof n?n.call(t):n;return[(0,e.h)(i,"$v",{validations:r,lazyParentModel:l,prop:"$v",model:t,rootModel:t})]}}})},k={data:function(){var t=this.$options.validations;return t&&(this._vuelidate=S(this,t)),{}},beforeCreate:function(){var t=this.$options;t.validations&&(t.computed||(t.computed={}),t.computed.$v||(t.computed.$v=function(){return this._vuelidate?this._vuelidate.refs.$v.proxy:null}))},beforeDestroy:function(){this._vuelidate&&(this._vuelidate.$destroy(),this._vuelidate=null)}};function _(t){t.mixin(k)}t.validationMixin=k;var O=_;t.default=O}(pc);var Nc=tc(pc);function Pc(t){this.content=t}Pc.prototype={constructor:Pc,find:function(t){for(var e=0;e>1}},Pc.from=function(t){if(t instanceof Pc)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new Pc(e)};var Ic=Pc;function jc(t,e,n){for(var r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;var o=t.child(r),i=e.child(r);if(o!=i){if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(var a=0;o.text[a]==i.text[a];a++)n++;return n}if(o.content.size||i.content.size){var s=jc(o.content,i.content,n+1);if(null!=s)return s}n+=o.nodeSize}else n+=o.nodeSize}}function Rc(t,e,n,r){for(var o=t.childCount,i=e.childCount;;){if(0==o||0==i)return o==i?null:{a:n,b:r};var a=t.child(--o),s=e.child(--i),c=a.nodeSize;if(a!=s){if(!a.sameMarkup(s))return{a:n,b:r};if(a.isText&&a.text!=s.text){for(var l=0,u=Math.min(a.text.length,s.text.length);lt&&!1!==n(s,r+a,o,i)&&s.content.size){var l=a+1;s.nodesBetween(Math.max(0,t-l),Math.min(s.content.size,e-l),n,r+l)}a=c}},zc.prototype.descendants=function(t){this.nodesBetween(0,this.size,t)},zc.prototype.textBetween=function(t,e,n,r){var o="",i=!0;return this.nodesBetween(t,e,(function(a,s){a.isText?(o+=a.text.slice(Math.max(t,s)-s,e-s),i=!n):a.isLeaf&&r?(o+="function"==typeof r?r(a):r,i=!n):!i&&a.isBlock&&(o+=n,i=!0)}),0),o},zc.prototype.append=function(t){if(!t.size)return this;if(!this.size)return t;var e=this.lastChild,n=t.firstChild,r=this.content.slice(),o=0;for(e.isText&&e.sameMarkup(n)&&(r[r.length-1]=e.withText(e.text+n.text),o=1);ot)for(var o=0,i=0;it&&((ie)&&(a=a.isText?a.cut(Math.max(0,t-i),Math.min(a.text.length,e-i)):a.cut(Math.max(0,t-i-1),Math.min(a.content.size,e-i-1))),n.push(a),r+=a.nodeSize),i=s}return new zc(n,r)},zc.prototype.cutByIndex=function(t,e){return t==e?zc.empty:0==t&&e==this.content.length?this:new zc(this.content.slice(t,e))},zc.prototype.replaceChild=function(t,e){var n=this.content[t];if(n==e)return this;var r=this.content.slice(),o=this.size+e.nodeSize-n.nodeSize;return r[t]=e,new zc(r,o)},zc.prototype.addToStart=function(t){return new zc([t].concat(this.content),this.size+t.nodeSize)},zc.prototype.addToEnd=function(t){return new zc(this.content.concat(t),this.size+t.nodeSize)},zc.prototype.eq=function(t){if(this.content.length!=t.content.length)return!1;for(var e=0;ethis.size||t<0)throw new RangeError("Position "+t+" outside of fragment ("+this+")");for(var n=0,r=0;;n++){var o=r+this.child(n).nodeSize;if(o>=t)return o==t||e>0?Bc(n+1,o):Bc(n,r);r=o}},zc.prototype.toString=function(){return"<"+this.toStringInner()+">"},zc.prototype.toStringInner=function(){return this.content.join(", ")},zc.prototype.toJSON=function(){return this.content.length?this.content.map((function(t){return t.toJSON()})):null},zc.fromJSON=function(t,e){if(!e)return zc.empty;if(!Array.isArray(e))throw new RangeError("Invalid input for Fragment.fromJSON");return new zc(e.map(t.nodeFromJSON))},zc.fromArray=function(t){if(!t.length)return zc.empty;for(var e,n=0,r=0;rthis.type.rank&&(e||(e=t.slice(0,r)),e.push(this),n=!0),e&&e.push(o)}}return e||(e=t.slice()),n||e.push(this),e},Wc.prototype.removeFromSet=function(t){for(var e=0;et.depth)throw new qc("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new qc("Inconsistent open depths");return Xc(t,e,n,0)}function Xc(t,e,n,r){var o=t.index(r),i=t.node(r);if(o==e.index(r)&&r=0;o--)r=e.node(o).copy(zc.from(r));return{start:r.resolveNoCache(t.openStart+n),end:r.resolveNoCache(r.content.size-t.openEnd-n)}}(n,t);return el(i,nl(t,s.start,s.end,e,r))}var c=t.parent,l=c.content;return el(c,l.cut(0,t.parentOffset).append(n.content).append(l.cut(e.parentOffset)))}return el(i,rl(t,e,r))}function Gc(t,e){if(!e.type.compatibleContent(t.type))throw new qc("Cannot join "+e.type.name+" onto "+t.type.name)}function Zc(t,e,n){var r=t.node(n);return Gc(r,e.node(n)),r}function Qc(t,e){var n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function tl(t,e,n,r){var o=(e||t).node(n),i=0,a=e?e.index(n):o.childCount;t&&(i=t.index(n),t.depth>n?i++:t.textOffset&&(Qc(t.nodeAfter,r),i++));for(var s=i;so&&Zc(t,e,o+1),a=r.depth>o&&Zc(n,r,o+1),s=[];return tl(null,t,o,s),i&&a&&e.index(o)==n.index(o)?(Gc(i,a),Qc(el(i,nl(t,e,n,r,o+1)),s)):(i&&Qc(el(i,rl(t,e,o+1)),s),tl(e,n,o,s),a&&Qc(el(a,rl(n,r,o+1)),s)),tl(r,null,o,s),new zc(s)}function rl(t,e,n){var r=[];(tl(null,t,n,r),t.depth>n)&&Qc(el(Zc(t,e,n+1),rl(t,e,n+1)),r);return tl(e,null,n,r),new zc(r)}Jc.size.get=function(){return this.content.size-this.openStart-this.openEnd},Hc.prototype.insertAt=function(t,e){var n=Yc(this.content,t+this.openStart,e,null);return n&&new Hc(n,this.openStart,this.openEnd)},Hc.prototype.removeBetween=function(t,e){return new Hc(Kc(this.content,t+this.openStart,e+this.openStart),this.openStart,this.openEnd)},Hc.prototype.eq=function(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd},Hc.prototype.toString=function(){return this.content+"("+this.openStart+","+this.openEnd+")"},Hc.prototype.toJSON=function(){if(!this.content.size)return null;var t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t},Hc.fromJSON=function(t,e){if(!e)return Hc.empty;var n=e.openStart||0,r=e.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new Hc(zc.fromJSON(t,e.content),n,r)},Hc.maxOpen=function(t,e){void 0===e&&(e=!0);for(var n=0,r=0,o=t.firstChild;o&&!o.isLeaf&&(e||!o.type.spec.isolating);o=o.firstChild)n++;for(var i=t.lastChild;i&&!i.isLeaf&&(e||!i.type.spec.isolating);i=i.lastChild)r++;return new Hc(t,n,r)},Object.defineProperties(Hc.prototype,Jc),Hc.empty=new Hc(zc.empty,0,0);var ol=function(t,e,n){this.pos=t,this.path=e,this.depth=e.length/3-1,this.parentOffset=n},il={parent:{configurable:!0},doc:{configurable:!0},textOffset:{configurable:!0},nodeAfter:{configurable:!0},nodeBefore:{configurable:!0}};ol.prototype.resolveDepth=function(t){return null==t?this.depth:t<0?this.depth+t:t},il.parent.get=function(){return this.node(this.depth)},il.doc.get=function(){return this.node(0)},ol.prototype.node=function(t){return this.path[3*this.resolveDepth(t)]},ol.prototype.index=function(t){return this.path[3*this.resolveDepth(t)+1]},ol.prototype.indexAfter=function(t){return t=this.resolveDepth(t),this.index(t)+(t!=this.depth||this.textOffset?1:0)},ol.prototype.start=function(t){return 0==(t=this.resolveDepth(t))?0:this.path[3*t-1]+1},ol.prototype.end=function(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size},ol.prototype.before=function(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]},ol.prototype.after=function(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]+this.path[3*t].nodeSize},il.textOffset.get=function(){return this.pos-this.path[this.path.length-1]},il.nodeAfter.get=function(){var t=this.parent,e=this.index(this.depth);if(e==t.childCount)return null;var n=this.pos-this.path[this.path.length-1],r=t.child(e);return n?t.child(e).cut(n):r},il.nodeBefore.get=function(){var t=this.index(this.depth),e=this.pos-this.path[this.path.length-1];return e?this.parent.child(t).cut(0,e):0==t?null:this.parent.child(t-1)},ol.prototype.posAtIndex=function(t,e){e=this.resolveDepth(e);for(var n=this.path[3*e],r=0==e?0:this.path[3*e-1]+1,o=0;o0;e--)if(this.start(e)<=t&&this.end(e)>=t)return e;return 0},ol.prototype.blockRange=function(t,e){if(void 0===t&&(t=this),t.pos=0;n--)if(t.pos<=this.end(n)&&(!e||e(this.node(n))))return new ll(this,t,n)},ol.prototype.sameParent=function(t){return this.pos-this.parentOffset==t.pos-t.parentOffset},ol.prototype.max=function(t){return t.pos>this.pos?t:this},ol.prototype.min=function(t){return t.pos=0&&e<=t.content.size))throw new RangeError("Position "+e+" out of range");for(var n=[],r=0,o=e,i=t;;){var a=i.content.findIndex(o),s=a.index,c=a.offset,l=o-c;if(n.push(i,s,r+c),!l)break;if((i=i.child(s)).isText)break;o=l-1,r+=c+1}return new ol(e,n,o)},ol.resolveCached=function(t,e){for(var n=0;nt&&this.nodesBetween(t,e,(function(t){return n.isInSet(t.marks)&&(r=!0),!r})),r},dl.isBlock.get=function(){return this.type.isBlock},dl.isTextblock.get=function(){return this.type.isTextblock},dl.inlineContent.get=function(){return this.type.inlineContent},dl.isInline.get=function(){return this.type.isInline},dl.isText.get=function(){return this.type.isText},dl.isLeaf.get=function(){return this.type.isLeaf},dl.isAtom.get=function(){return this.type.isAtom},pl.prototype.toString=function(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);var t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),vl(this.marks,t)},pl.prototype.contentMatchAt=function(t){var e=this.type.contentMatch.matchFragment(this.content,0,t);if(!e)throw new Error("Called contentMatchAt on a node with invalid content");return e},pl.prototype.canReplace=function(t,e,n,r,o){void 0===n&&(n=zc.empty),void 0===r&&(r=0),void 0===o&&(o=n.childCount);var i=this.contentMatchAt(t).matchFragment(n,r,o),a=i&&i.matchFragment(this.content,e);if(!a||!a.validEnd)return!1;for(var s=r;s=0;n--)e=t[n].type.name+"("+e+")";return e}var ml=function(t){this.validEnd=t,this.next=[],this.wrapCache=[]},gl={inlineContent:{configurable:!0},defaultType:{configurable:!0},edgeCount:{configurable:!0}};ml.parse=function(t,e){var n=new yl(t,e);if(null==n.next)return ml.empty;var r=wl(n);n.next&&n.err("Unexpected trailing text");var o=function(t){var e=Object.create(null);return n(Cl(t,0));function n(r){var o=[];r.forEach((function(e){t[e].forEach((function(e){var n=e.term,r=e.to;if(n){var i=o.indexOf(n),a=i>-1&&o[i+1];Cl(t,r).forEach((function(t){a||o.push(n,a=[]),-1==a.indexOf(t)&&a.push(t)}))}}))}));for(var i=e[r.join(",")]=new ml(r.indexOf(t.length-1)>-1),a=0;a>1},ml.prototype.edge=function(t){var e=t<<1;if(e>=this.next.length)throw new RangeError("There's no "+t+"th edge in this content match");return{type:this.next[e],next:this.next[e+1]}},ml.prototype.toString=function(){var t=[];return function e(n){t.push(n);for(var r=1;r"+t.indexOf(e.next[o+1]);return r})).join("\n")},Object.defineProperties(ml.prototype,gl),ml.empty=new ml(!0);var yl=function(t,e){this.string=t,this.nodeTypes=e,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()},bl={next:{configurable:!0}};function wl(t){var e=[];do{e.push(xl(t))}while(t.eat("|"));return 1==e.length?e[0]:{type:"choice",exprs:e}}function xl(t){var e=[];do{e.push(Sl(t))}while(t.next&&")"!=t.next&&"|"!=t.next);return 1==e.length?e[0]:{type:"seq",exprs:e}}function Sl(t){for(var e=function(t){if(t.eat("(")){var e=wl(t);return t.eat(")")||t.err("Missing closing paren"),e}if(!/\W/.test(t.next)){var n=function(t,e){var n=t.nodeTypes,r=n[e];if(r)return[r];var o=[];for(var i in n){var a=n[i];a.groups.indexOf(e)>-1&&o.push(a)}0==o.length&&t.err("No node type or group '"+e+"' found");return o}(t,t.next).map((function(e){return null==t.inline?t.inline=e.isInline:t.inline!=e.isInline&&t.err("Mixing inline and block content"),{type:"name",value:e}}));return t.pos++,1==n.length?n[0]:{type:"choice",exprs:n}}t.err("Unexpected token '"+t.next+"'")}(t);;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else{if(!t.eat("{"))break;e=_l(t,e)}return e}function kl(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");var e=Number(t.next);return t.pos++,e}function _l(t,e){var n=kl(t),r=n;return t.eat(",")&&(r="}"!=t.next?kl(t):-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function Ol(t,e){return e-t}function Cl(t,e){var n=[];return function e(r){var o=t[r];if(1==o.length&&!o[0].term)return e(o[0].to);n.push(r);for(var i=0;i-1},$l.prototype.allowsMarks=function(t){if(null==this.markSet)return!0;for(var e=0;e-1};var Il=function(t){for(var e in this.spec={},t)this.spec[e]=t[e];this.spec.nodes=Ic.from(t.nodes),this.spec.marks=Ic.from(t.marks),this.nodes=$l.compile(this.spec.nodes,this),this.marks=Pl.compile(this.spec.marks,this);var n=Object.create(null);for(var r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");var o=this.nodes[r],i=o.spec.content||"",a=o.spec.marks;o.contentMatch=n[i]||(n[i]=ml.parse(i,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.markSet="_"==a?null:a?jl(this,a.split(" ")):""!=a&&o.inlineContent?null:[]}for(var s in this.marks){var c=this.marks[s],l=c.spec.excludes;c.excluded=null==l?[c]:""==l?[]:jl(this,l.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached=Object.create(null),this.cached.wrappings=Object.create(null)};function jl(t,e){for(var n=[],r=0;r-1)&&n.push(a=c)}if(!a)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}Il.prototype.node=function(t,e,n,r){if("string"==typeof t)t=this.nodeType(t);else{if(!(t instanceof $l))throw new RangeError("Invalid node type: "+t);if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}return t.createChecked(e,n,r)},Il.prototype.text=function(t,e){var n=this.nodes.text;return new hl(n,n.defaultAttrs,t,Wc.setFrom(e))},Il.prototype.mark=function(t,e){return"string"==typeof t&&(t=this.marks[t]),t.create(e)},Il.prototype.nodeFromJSON=function(t){return pl.fromJSON(this,t)},Il.prototype.markFromJSON=function(t){return Wc.fromJSON(this,t)},Il.prototype.nodeType=function(t){var e=this.nodes[t];if(!e)throw new RangeError("Unknown node type: "+t);return e};var Rl=function(t,e){var n=this;this.schema=t,this.rules=e,this.tags=[],this.styles=[],e.forEach((function(t){t.tag?n.tags.push(t):t.style&&n.styles.push(t)})),this.normalizeLists=!this.tags.some((function(e){if(!/^(ul|ol)\b/.test(e.tag)||!e.node)return!1;var n=t.nodes[e.node];return n.contentMatch.matchType(n)}))};Rl.prototype.parse=function(t,e){void 0===e&&(e={});var n=new Wl(this,e,!1);return n.addAll(t,null,e.from,e.to),n.finish()},Rl.prototype.parseSlice=function(t,e){void 0===e&&(e={});var n=new Wl(this,e,!0);return n.addAll(t,null,e.from,e.to),Hc.maxOpen(n.finish())},Rl.prototype.matchTag=function(t,e,n){for(var r=n?this.tags.indexOf(n)+1:0;rt.length&&(61!=i.style.charCodeAt(t.length)||i.style.slice(t.length+1)!=e))){if(i.getAttrs){var a=i.getAttrs(e);if(!1===a)continue;i.attrs=a}return i}}},Rl.schemaRules=function(t){var e=[];function n(t){for(var n=null==t.priority?50:t.priority,r=0;r=0;e--)if(t.eq(this.stashMarks[e]))return this.stashMarks.splice(e,1)[0]},Vl.prototype.applyPending=function(t){for(var e=0,n=this.pendingMarks;e=0;r--){var o=this.nodes[r],i=o.findWrapping(t);if(i&&(!e||e.length>i.length)&&(e=i,n=o,!i.length))break;if(o.solid)break}if(!e)return!1;this.sync(n);for(var a=0;athis.open){for(;e>this.open;e--)this.nodes[e-1].content.push(this.nodes[e].finish(t));this.nodes.length=this.open+1}},Wl.prototype.finish=function(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)},Wl.prototype.sync=function(t){for(var e=this.open;e>=0;e--)if(this.nodes[e]==t)return void(this.open=e)},ql.currentPos.get=function(){this.closeExtra();for(var t=0,e=this.open;e>=0;e--){for(var n=this.nodes[e].content,r=n.length-1;r>=0;r--)t+=n[r].nodeSize;e&&t++}return t},Wl.prototype.findAtPoint=function(t,e){if(this.find)for(var n=0;n-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);var n=t.split("/"),r=this.options.context,o=!(this.isOpen||r&&r.parent.type!=this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1),a=function(t,s){for(;t>=0;t--){var c=n[t];if(""==c){if(t==n.length-1||0==t)continue;for(;s>=i;s--)if(a(t-1,s))return!0;return!1}var l=s>0||0==s&&o?e.nodes[s].type:r&&s>=i?r.node(s-i).type:null;if(!l||l.name!=c&&-1==l.groups.indexOf(c))return!1;s--}return!0};return a(n.length-1,this.open)},Wl.prototype.textblockFromContext=function(){var t=this.options.context;if(t)for(var e=t.depth;e>=0;e--){var n=t.node(e).contentMatchAt(t.indexAfter(e)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(var r in this.parser.schema.nodes){var o=this.parser.schema.nodes[r];if(o.isTextblock&&o.defaultAttrs)return o}},Wl.prototype.addPendingMark=function(t){var e=function(t,e){for(var n=0;n=0;n--){var r=this.nodes[n];if(r.pendingMarks.lastIndexOf(t)>-1)r.pendingMarks=t.removeFromSet(r.pendingMarks);else{r.activeMarks=t.removeFromSet(r.activeMarks);var o=r.popFromStashMark(t);o&&r.type&&r.type.allowsMarkType(o.type)&&(r.activeMarks=o.addToSet(r.activeMarks))}if(r==e)break}},Object.defineProperties(Wl.prototype,ql);var Yl=function(t,e){this.nodes=t||{},this.marks=e||{}};function Ul(t){var e={};for(var n in t){var r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function Xl(t){return t.document||window.document}Yl.prototype.serializeFragment=function(t,e,n){var r=this;void 0===e&&(e={}),n||(n=Xl(e).createDocumentFragment());var o=n,i=null;return t.forEach((function(t){if(i||t.marks.length){i||(i=[]);for(var n=0,a=0;n=0;r--){var o=this.serializeMark(t.marks[r],t.isInline,e);o&&((o.contentDOM||o.dom).appendChild(n),n=o.dom)}return n},Yl.prototype.serializeMark=function(t,e,n){void 0===n&&(n={});var r=this.marks[t.type.name];return r&&Yl.renderSpec(Xl(n),r(t,e))},Yl.renderSpec=function(t,e,n){if(void 0===n&&(n=null),"string"==typeof e)return{dom:t.createTextNode(e)};if(null!=e.nodeType)return{dom:e};if(e.dom&&null!=e.dom.nodeType)return e;var r=e[0],o=r.indexOf(" ");o>0&&(n=r.slice(0,o),r=r.slice(o+1));var i=null,a=n?t.createElementNS(n,r):t.createElement(r),s=e[1],c=1;if(s&&"object"==typeof s&&null==s.nodeType&&!Array.isArray(s))for(var l in c=2,s)if(null!=s[l]){var u=l.indexOf(" ");u>0?a.setAttributeNS(l.slice(0,u),l.slice(u+1),s[l]):a.setAttribute(l,s[l])}for(var f=c;fc)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}var d=Yl.renderSpec(t,p,n),h=d.dom,v=d.contentDOM;if(a.appendChild(h),v){if(i)throw new RangeError("Multiple content holes");i=v}}return{dom:a,contentDOM:i}},Yl.fromSchema=function(t){return t.cached.domSerializer||(t.cached.domSerializer=new Yl(this.nodesFromSchema(t),this.marksFromSchema(t)))},Yl.nodesFromSchema=function(t){var e=Ul(t.nodes);return e.text||(e.text=function(t){return t.text}),e},Yl.marksFromSchema=function(t){return Ul(t.marks)};var Gl=Math.pow(2,16);function Zl(t){return 65535&t}var Ql=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=null),this.pos=t,this.deleted=e,this.recover=n},tu=function(t,e){void 0===e&&(e=!1),this.ranges=t,this.inverted=e};tu.prototype.recover=function(t){var e=0,n=Zl(t);if(!this.inverted)for(var r=0;rt)break;var c=this.ranges[a+o],l=this.ranges[a+i],u=s+c;if(t<=u){var f=s+r+((c?t==s?-1:t==u?1:e:e)<0?0:l);if(n)return f;var p=t==(e<0?s:u)?null:a/3+(t-s)*Gl;return new Ql(f,e<0?t!=s:t!=u,p)}r+=l-c}return n?t+r:new Ql(t+r)},tu.prototype.touches=function(t,e){for(var n=0,r=Zl(e),o=this.inverted?2:1,i=this.inverted?1:2,a=0;at)break;var c=this.ranges[a+o];if(t<=s+c&&a==3*r)return!0;n+=this.ranges[a+i]-c}return!1},tu.prototype.forEach=function(t){for(var e=this.inverted?2:1,n=this.inverted?1:2,r=0,o=0;r=0;e--){var r=t.getMirror(e);this.appendMap(t.maps[e].invert(),null!=r&&r>e?n-r-1:null)}},eu.prototype.invert=function(){var t=new eu;return t.appendMappingInverted(this),t},eu.prototype.map=function(t,e){if(void 0===e&&(e=1),this.mirror)return this._map(t,e,!0);for(var n=this.from;no&&a0},ru.prototype.addStep=function(t,e){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=e},Object.defineProperties(ru.prototype,ou);var au=Object.create(null),su=function(){};su.prototype.apply=function(t){return iu()},su.prototype.getMap=function(){return tu.empty},su.prototype.invert=function(t){return iu()},su.prototype.map=function(t){return iu()},su.prototype.merge=function(t){return null},su.prototype.toJSON=function(){return iu()},su.fromJSON=function(t,e){if(!e||!e.stepType)throw new RangeError("Invalid input for Step.fromJSON");var n=au[e.stepType];if(!n)throw new RangeError("No step type "+e.stepType+" defined");return n.fromJSON(t,e)},su.jsonID=function(t,e){if(t in au)throw new RangeError("Duplicate use of step JSON ID "+t);return au[t]=e,e.prototype.jsonID=t,e};var cu=function(t,e){this.doc=t,this.failed=e};cu.ok=function(t){return new cu(t,null)},cu.fail=function(t){return new cu(null,t)},cu.fromReplace=function(t,e,n,r){try{return cu.ok(t.replace(e,n,r))}catch(My){if(My instanceof qc)return cu.fail(My.message);throw My}};var lu=function(t){function e(e,n,r,o){t.call(this),this.from=e,this.to=n,this.slice=r,this.structure=!!o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.apply=function(t){return this.structure&&fu(t,this.from,this.to)?cu.fail("Structure replace would overwrite content"):cu.fromReplace(t,this.from,this.to,this.slice)},e.prototype.getMap=function(){return new tu([this.from,this.to-this.from,this.slice.size])},e.prototype.invert=function(t){return new e(this.from,this.from+this.slice.size,t.slice(this.from,this.to))},e.prototype.map=function(t){var n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted?null:new e(n.pos,Math.max(n.pos,r.pos),this.slice)},e.prototype.merge=function(t){if(!(t instanceof e)||t.structure||this.structure)return null;if(this.from+this.slice.size!=t.from||this.slice.openEnd||t.slice.openStart){if(t.to!=this.from||this.slice.openStart||t.slice.openEnd)return null;var n=this.slice.size+t.slice.size==0?Hc.empty:new Hc(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new e(t.from,this.to,n,this.structure)}var r=this.slice.size+t.slice.size==0?Hc.empty:new Hc(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new e(this.from,this.to+(t.to-t.from),r,this.structure)},e.prototype.toJSON=function(){var t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t},e.fromJSON=function(t,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new e(n.from,n.to,Hc.fromJSON(t,n.slice),!!n.structure)},e}(su);su.jsonID("replace",lu);var uu=function(t){function e(e,n,r,o,i,a,s){t.call(this),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=o,this.slice=i,this.insert=a,this.structure=!!s}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.apply=function(t){if(this.structure&&(fu(t,this.from,this.gapFrom)||fu(t,this.gapTo,this.to)))return cu.fail("Structure gap-replace would overwrite content");var e=t.slice(this.gapFrom,this.gapTo);if(e.openStart||e.openEnd)return cu.fail("Gap is not a flat range");var n=this.slice.insertAt(this.insert,e.content);return n?cu.fromReplace(t,this.from,this.to,n):cu.fail("Content does not fit in gap")},e.prototype.getMap=function(){return new tu([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])},e.prototype.invert=function(t){var n=this.gapTo-this.gapFrom;return new e(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)},e.prototype.map=function(t){var n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),o=t.map(this.gapFrom,-1),i=t.map(this.gapTo,1);return n.deleted&&r.deleted||or.pos?null:new e(n.pos,r.pos,o,i,this.slice,this.insert,this.structure)},e.prototype.toJSON=function(){var t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t},e.fromJSON=function(t,n){if("number"!=typeof n.from||"number"!=typeof n.to||"number"!=typeof n.gapFrom||"number"!=typeof n.gapTo||"number"!=typeof n.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new e(n.from,n.to,n.gapFrom,n.gapTo,Hc.fromJSON(t,n.slice),n.insert,!!n.structure)},e}(su);function fu(t,e,n){for(var r=t.resolve(e),o=n-e,i=r.depth;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0)for(var a=r.node(i).maybeChild(r.indexAfter(i));o>0;){if(!a||a.isLeaf)return!0;a=a.firstChild,o--}return!1}function pu(t,e,n){return(0==e||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function du(t){for(var e=t.parent.content.cutByIndex(t.startIndex,t.endIndex),n=t.depth;;--n){var r=t.$from.node(n),o=t.$from.index(n),i=t.$to.indexAfter(n);if(ni;s--,c--){var l=o.node(s),u=o.index(s);if(l.type.spec.isolating)return!1;var f=l.content.cutByIndex(u,l.childCount),p=r&&r[c]||l;if(p!=l&&(f=f.replaceChild(0,p.type.create(p.attrs))),!l.canReplace(u+1,l.childCount)||!p.type.validContent(f))return!1}var d=o.indexAfter(i),h=r&&r[0];return o.node(i).canReplaceWith(d,d,h?h.type:o.node(i+1).type)}function gu(t,e){var n,r,o=t.resolve(e),i=o.index();return n=o.nodeBefore,r=o.nodeAfter,n&&r&&!n.isLeaf&&n.canAppend(r)&&o.parent.canReplace(i,i+1)}function yu(t,e,n){for(var r=[],o=0;oe;f--)p||n.index(f)>0?(p=!0,l=zc.from(n.node(f).copy(l)),u++):s--;for(var d=zc.empty,h=0,v=o,m=!1;v>e;v--)m||r.after(v+1)=0;r--)n=zc.from(e[r].type.create(e[r].attrs,n));var o=t.start,i=t.end;return this.step(new uu(o,i,o,i,new Hc(n,0,0),e.length,!0))},ru.prototype.setBlockType=function(t,e,n,r){var o=this;if(void 0===e&&(e=t),!n.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var i=this.steps.length;return this.doc.nodesBetween(t,e,(function(t,e){if(t.isTextblock&&!t.hasMarkup(n,r)&&function(t,e,n){var r=t.resolve(e),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}(o.doc,o.mapping.slice(i).map(e),n)){o.clearIncompatible(o.mapping.slice(i).map(e,1),n);var a=o.mapping.slice(i),s=a.map(e,1),c=a.map(e+t.nodeSize,1);return o.step(new uu(s,c,s+1,c-1,new Hc(zc.from(n.create(r,null,t.marks)),0,0),1,!0)),!1}})),this},ru.prototype.setNodeMarkup=function(t,e,n,r){var o=this.doc.nodeAt(t);if(!o)throw new RangeError("No node at given position");e||(e=o.type);var i=e.create(n,null,r||o.marks);if(o.isLeaf)return this.replaceWith(t,t+o.nodeSize,i);if(!e.validContent(o.content))throw new RangeError("Invalid content for node type "+e.name);return this.step(new uu(t,t+o.nodeSize,t+1,t+o.nodeSize-1,new Hc(zc.from(i),0,0),1,!0))},ru.prototype.split=function(t,e,n){void 0===e&&(e=1);for(var r=this.doc.resolve(t),o=zc.empty,i=zc.empty,a=r.depth,s=r.depth-e,c=e-1;a>s;a--,c--){o=zc.from(r.node(a).copy(o));var l=n&&n[c];i=zc.from(l?l.type.create(l.attrs,i):r.node(a).copy(i))}return this.step(new lu(t,t,new Hc(o.append(i),e,e),!0))},ru.prototype.join=function(t,e){void 0===e&&(e=1);var n=new lu(t-e,t+e,Hc.empty,!0);return this.step(n)};var bu=function(t){function e(e,n,r){t.call(this),this.from=e,this.to=n,this.mark=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.apply=function(t){var e=this,n=t.slice(this.from,this.to),r=t.resolve(this.from),o=r.node(r.sharedDepth(this.to)),i=new Hc(yu(n.content,(function(t,n){return t.isAtom&&n.type.allowsMarkType(e.mark.type)?t.mark(e.mark.addToSet(t.marks)):t}),o),n.openStart,n.openEnd);return cu.fromReplace(t,this.from,this.to,i)},e.prototype.invert=function(){return new wu(this.from,this.to,this.mark)},e.prototype.map=function(t){var n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)},e.prototype.merge=function(t){if(t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from)return new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark)},e.prototype.toJSON=function(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},e.fromJSON=function(t,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new e(n.from,n.to,t.markFromJSON(n.mark))},e}(su);su.jsonID("addMark",bu);var wu=function(t){function e(e,n,r){t.call(this),this.from=e,this.to=n,this.mark=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.apply=function(t){var e=this,n=t.slice(this.from,this.to),r=new Hc(yu(n.content,(function(t){return t.mark(e.mark.removeFromSet(t.marks))})),n.openStart,n.openEnd);return cu.fromReplace(t,this.from,this.to,r)},e.prototype.invert=function(){return new bu(this.from,this.to,this.mark)},e.prototype.map=function(t){var n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)},e.prototype.merge=function(t){if(t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from)return new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark)},e.prototype.toJSON=function(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},e.fromJSON=function(t,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new e(n.from,n.to,t.markFromJSON(n.mark))},e}(su);function xu(t,e,n,r){if(void 0===n&&(n=e),void 0===r&&(r=Hc.empty),e==n&&!r.size)return null;var o=t.resolve(e),i=t.resolve(n);return Su(o,i,r)?new lu(e,n,r):new ku(o,i,r).fit()}function Su(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}su.jsonID("removeMark",wu),ru.prototype.addMark=function(t,e,n){var r=this,o=[],i=[],a=null,s=null;return this.doc.nodesBetween(t,e,(function(r,c,l){if(r.isInline){var u=r.marks;if(!n.isInSet(u)&&l.type.allowsMarkType(n.type)){for(var f=Math.max(c,t),p=Math.min(c+r.nodeSize,e),d=n.addToSet(u),h=0;h=0;p--)this.step(o[p]);return this},ru.prototype.replace=function(t,e,n){void 0===e&&(e=t),void 0===n&&(n=Hc.empty);var r=xu(this.doc,t,e,n);return r&&this.step(r),this},ru.prototype.replaceWith=function(t,e,n){return this.replace(t,e,new Hc(zc.from(n),0,0))},ru.prototype.delete=function(t,e){return this.replace(t,e,Hc.empty)},ru.prototype.insert=function(t,e){return this.replaceWith(t,t,e)};var ku=function(t,e,n){this.$to=e,this.$from=t,this.unplaced=n,this.frontier=[];for(var r=0;r<=t.depth;r++){var o=t.node(r);this.frontier.push({type:o.type,match:o.contentMatchAt(t.indexAfter(r))})}this.placed=zc.empty;for(var i=t.depth;i>0;i--)this.placed=zc.from(t.node(i).copy(this.placed))},_u={depth:{configurable:!0}};function Ou(t,e,n){return 0==e?t.cutByIndex(n):t.replaceChild(0,t.firstChild.copy(Ou(t.firstChild.content,e-1,n)))}function Cu(t,e,n){return 0==e?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(Cu(t.lastChild.content,e-1,n)))}function Mu(t,e){for(var n=0;n1&&(r=r.replaceChild(0,Du(r.firstChild,e-1,1==r.childCount?n-1:0))),e>0&&(r=t.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(t.type.contentMatch.matchFragment(r).fillBefore(zc.empty,!0)))),t.copy(r)}function Tu(t,e,n,r,o){var i=t.node(e),a=o?t.indexAfter(e):t.index(e);if(a==i.childCount&&!n.compatibleContent(i.type))return null;var s=r.fillBefore(i.content,!0,a);return s&&!function(t,e,n){for(var r=n;rr){var a=o.contentMatchAt(0),s=a.fillBefore(t).append(t);t=s.append(a.matchFragment(s).fillBefore(zc.empty,!0))}return t}function Au(t,e){for(var n=[],r=Math.min(t.depth,e.depth);r>=0;r--){var o=t.start(r);if(oe.pos+(e.depth-r)||t.node(r).type.spec.isolating||e.node(r).type.spec.isolating)break;(o==e.start(r)||r==t.depth&&r==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&r&&e.start(r-1)==o-1)&&n.push(r)}return n}_u.depth.get=function(){return this.frontier.length-1},ku.prototype.fit=function(){for(;this.unplaced.size;){var t=this.findFittable();t?this.placeNodes(t):this.openMore()||this.dropNode()}var e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(e<0?this.$to:r.doc.resolve(e));if(!o)return null;for(var i=this.placed,a=r.depth,s=o.depth;a&&s&&1==i.childCount;)i=i.firstChild.content,a--,s--;var c=new Hc(i,a,s);return e>-1?new uu(r.pos,e,this.$to.pos,this.$to.end(),c,n):c.size||r.pos!=this.$to.pos?new lu(r.pos,o.pos,c):void 0},ku.prototype.findFittable=function(){for(var t=1;t<=2;t++)for(var e=this.unplaced.openStart;e>=0;e--)for(var n=void 0,r=(e?(n=Mu(this.unplaced.content,e-1).firstChild).content:this.unplaced.content).firstChild,o=this.depth;o>=0;o--){var i=this.frontier[o],a=i.type,s=i.match,c=void 0,l=void 0;if(1==t&&(r?s.matchType(r.type)||(l=s.fillBefore(zc.from(r),!1)):a.compatibleContent(n.type)))return{sliceDepth:e,frontierDepth:o,parent:n,inject:l};if(2==t&&r&&(c=s.findWrapping(r.type)))return{sliceDepth:e,frontierDepth:o,parent:n,wrap:c};if(n&&s.matchType(n.type))break}},ku.prototype.openMore=function(){var t=this.unplaced,e=t.content,n=t.openStart,r=t.openEnd,o=Mu(e,n);return!(!o.childCount||o.firstChild.isLeaf)&&(this.unplaced=new Hc(e,n+1,Math.max(r,o.size+n>=e.size-r?n+1:0)),!0)},ku.prototype.dropNode=function(){var t=this.unplaced,e=t.content,n=t.openStart,r=t.openEnd,o=Mu(e,n);if(o.childCount<=1&&n>0){var i=e.size-n<=n+o.size;this.unplaced=new Hc(Ou(e,n-1,1),n-1,i?n-1:r)}else this.unplaced=new Hc(Ou(e,n,1),n,r)},ku.prototype.placeNodes=function(t){for(var e=t.sliceDepth,n=t.frontierDepth,r=t.parent,o=t.inject,i=t.wrap;this.depth>n;)this.closeFrontierNode();if(i)for(var a=0;a1||0==l||g.content.size)&&(d=y,f.push(Du(g.mark(h.allowedMarks(g.marks)),1==u?l:0,u==c.childCount?m:-1)))}var b=u==c.childCount;b||(m=-1),this.placed=Cu(this.placed,n,zc.from(f)),this.frontier[n].match=d,b&&m<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(var w=0,x=c;w1&&r==this.$to.end(--n);)++r;return r},ku.prototype.findCloseLevel=function(t){t:for(var e=Math.min(this.depth,t.depth);e>=0;e--){var n=this.frontier[e],r=n.match,o=n.type,i=e=0;s--){var c=this.frontier[s],l=c.match,u=Tu(t,s,c.type,l,!0);if(!u||u.childCount)continue t}return{depth:e,fit:a,move:i?t.doc.resolve(t.after(e+1)):t}}}},ku.prototype.close=function(t){var e=this.findCloseLevel(t);if(!e)return null;for(;this.depth>e.depth;)this.closeFrontierNode();e.fit.childCount&&(this.placed=Cu(this.placed,e.depth,e.fit)),t=e.move;for(var n=e.depth+1;n<=t.depth;n++){var r=t.node(n),o=r.type.contentMatch.fillBefore(r.content,!0,t.index(n));this.openFrontierNode(r.type,r.attrs,o)}return t},ku.prototype.openFrontierNode=function(t,e,n){var r=this.frontier[this.depth];r.match=r.match.matchType(t),this.placed=Cu(this.placed,this.depth,zc.from(t.create(e,n))),this.frontier.push({type:t,match:t.contentMatch})},ku.prototype.closeFrontierNode=function(){var t=this.frontier.pop().match.fillBefore(zc.empty,!0);t.childCount&&(this.placed=Cu(this.placed,this.frontier.length,t))},Object.defineProperties(ku.prototype,_u),ru.prototype.replaceRange=function(t,e,n){if(!n.size)return this.deleteRange(t,e);var r=this.doc.resolve(t),o=this.doc.resolve(e);if(Su(r,o,n))return this.step(new lu(t,e,n));var i=Au(r,this.doc.resolve(e));0==i[i.length-1]&&i.pop();var a=-(r.depth+1);i.unshift(a);for(var s=r.depth,c=r.pos-1;s>0;s--,c--){var l=r.node(s).type.spec;if(l.defining||l.isolating)break;i.indexOf(s)>-1?a=s:r.before(s)==c&&i.splice(1,0,-s)}for(var u=i.indexOf(a),f=[],p=n.openStart,d=n.content,h=0;;h++){var v=d.firstChild;if(f.push(v),h==n.openStart)break;d=v.content}p>0&&f[p-1].type.spec.defining&&r.node(u).type!=f[p-1].type?p-=1:p>=2&&f[p-1].isTextblock&&f[p-2].type.spec.defining&&r.node(u).type!=f[p-2].type&&(p-=2);for(var m=n.openStart;m>=0;m--){var g=(m+p+1)%(n.openStart+1),y=f[g];if(y)for(var b=0;b=0&&(this.replace(t,e,n),!(this.steps.length>_));O--){var C=i[O];C<0||(t=r.before(C),e=o.after(C))}return this},ru.prototype.replaceRangeWith=function(t,e,n){if(!n.isInline&&t==e&&this.doc.resolve(t).parent.content.size){var r=function(t,e,n){var r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(0==r.parentOffset)for(var o=r.depth-1;o>=0;o--){var i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(var a=r.depth-1;a>=0;a--){var s=r.indexAfter(a);if(r.node(a).canReplaceWith(s,s,n))return r.after(a+1);if(s0&&(s||n.node(a-1).canReplace(n.index(a-1),r.indexAfter(a-1))))return this.delete(n.before(a),r.after(a))}for(var c=1;c<=n.depth&&c<=r.depth;c++)if(t-n.start(c)==n.depth-c&&e>n.end(c)&&r.end(c)-e!=r.depth-c)return this.delete(n.before(c),e);return this.delete(t,e)};var Eu=Object.create(null),Nu=function(t,e,n){this.ranges=n||[new Iu(t.min(e),t.max(e))],this.$anchor=t,this.$head=e},Pu={anchor:{configurable:!0},head:{configurable:!0},from:{configurable:!0},to:{configurable:!0},$from:{configurable:!0},$to:{configurable:!0},empty:{configurable:!0}};Pu.anchor.get=function(){return this.$anchor.pos},Pu.head.get=function(){return this.$head.pos},Pu.from.get=function(){return this.$from.pos},Pu.to.get=function(){return this.$to.pos},Pu.$from.get=function(){return this.ranges[0].$from},Pu.$to.get=function(){return this.ranges[0].$to},Pu.empty.get=function(){for(var t=this.ranges,e=0;e=0;o--){var i=e<0?Vu(t.node(0),t.node(o),t.before(o+1),t.index(o),e,n):Vu(t.node(0),t.node(o),t.after(o+1),t.index(o)+1,e,n);if(i)return i}},Nu.near=function(t,e){return void 0===e&&(e=1),this.findFrom(t,e)||this.findFrom(t,-e)||new Lu(t.node(0))},Nu.atStart=function(t){return Vu(t,t,0,0,1)||new Lu(t)},Nu.atEnd=function(t){return Vu(t,t,t.content.size,t.childCount,-1)||new Lu(t)},Nu.fromJSON=function(t,e){if(!e||!e.type)throw new RangeError("Invalid input for Selection.fromJSON");var n=Eu[e.type];if(!n)throw new RangeError("No selection type "+e.type+" defined");return n.fromJSON(t,e)},Nu.jsonID=function(t,e){if(t in Eu)throw new RangeError("Duplicate use of selection JSON ID "+t);return Eu[t]=e,e.prototype.jsonID=t,e},Nu.prototype.getBookmark=function(){return ju.between(this.$anchor,this.$head).getBookmark()},Object.defineProperties(Nu.prototype,Pu),Nu.prototype.visible=!0;var Iu=function(t,e){this.$from=t,this.$to=e},ju=function(t){function e(e,n){void 0===n&&(n=e),t.call(this,e,n)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={$cursor:{configurable:!0}};return n.$cursor.get=function(){return this.$anchor.pos==this.$head.pos?this.$head:null},e.prototype.map=function(n,r){var o=n.resolve(r.map(this.head));if(!o.parent.inlineContent)return t.near(o);var i=n.resolve(r.map(this.anchor));return new e(i.parent.inlineContent?i:o,o)},e.prototype.replace=function(e,n){if(void 0===n&&(n=Hc.empty),t.prototype.replace.call(this,e,n),n==Hc.empty){var r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}},e.prototype.eq=function(t){return t instanceof e&&t.anchor==this.anchor&&t.head==this.head},e.prototype.getBookmark=function(){return new Ru(this.anchor,this.head)},e.prototype.toJSON=function(){return{type:"text",anchor:this.anchor,head:this.head}},e.fromJSON=function(t,n){if("number"!=typeof n.anchor||"number"!=typeof n.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new e(t.resolve(n.anchor),t.resolve(n.head))},e.create=function(t,e,n){void 0===n&&(n=e);var r=t.resolve(e);return new this(r,n==e?r:t.resolve(n))},e.between=function(n,r,o){var i=n.pos-r.pos;if(o&&!i||(o=i>=0?1:-1),!r.parent.inlineContent){var a=t.findFrom(r,o,!0)||t.findFrom(r,-o,!0);if(!a)return t.near(r,o);r=a.$head}return n.parent.inlineContent||(0==i||(n=(t.findFrom(n,-o,!0)||t.findFrom(n,o,!0)).$anchor).pos0?0:1);o>0?a=0;a+=o){var s=e.child(a);if(s.isAtom){if(!i&&zu.isSelectable(s))return zu.create(t,n-(o<0?s.nodeSize:0))}else{var c=Vu(t,s,n+o,o<0?s.childCount:0,o,i);if(c)return c}n+=s.nodeSize*o}}function Wu(t,e,n){var r=t.steps.length-1;if(!(r0},e.prototype.setStoredMarks=function(t){return this.storedMarks=t,this.updated|=2,this},e.prototype.ensureMarks=function(t){return Wc.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this},e.prototype.addStoredMark=function(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))},e.prototype.removeStoredMark=function(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))},n.storedMarksSet.get=function(){return(2&this.updated)>0},e.prototype.addStep=function(e,n){t.prototype.addStep.call(this,e,n),this.updated=-3&this.updated,this.storedMarks=null},e.prototype.setTime=function(t){return this.time=t,this},e.prototype.replaceSelection=function(t){return this.selection.replace(this,t),this},e.prototype.replaceSelectionWith=function(t,e){var n=this.selection;return!1!==e&&(t=t.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||Wc.none))),n.replaceWith(this,t),this},e.prototype.deleteSelection=function(){return this.selection.replace(this),this},e.prototype.insertText=function(t,e,n){void 0===n&&(n=e);var r=this.doc.type.schema;if(null==e)return t?this.replaceSelectionWith(r.text(t),!0):this.deleteSelection();if(!t)return this.deleteRange(e,n);var o=this.storedMarks;if(!o){var i=this.doc.resolve(e);o=n==e?i.marks():i.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(e,n,r.text(t,o)),this.selection.empty||this.setSelection(Nu.near(this.selection.$to)),this},e.prototype.setMeta=function(t,e){return this.meta["string"==typeof t?t:t.key]=e,this},e.prototype.getMeta=function(t){return this.meta["string"==typeof t?t:t.key]},n.isGeneric.get=function(){for(var t in this.meta)return!1;return!0},e.prototype.scrollIntoView=function(){return this.updated|=4,this},n.scrolledIntoView.get=function(){return(4&this.updated)>0},Object.defineProperties(e.prototype,n),e}(ru);function Hu(t,e){return e&&t?t.bind(e):t}var Ju=function(t,e,n){this.name=t,this.init=Hu(e.init,n),this.apply=Hu(e.apply,n)},Ku=[new Ju("doc",{init:function(t){return t.doc||t.schema.topNodeType.createAndFill()},apply:function(t){return t.doc}}),new Ju("selection",{init:function(t,e){return t.selection||Nu.atStart(e.doc)},apply:function(t){return t.selection}}),new Ju("storedMarks",{init:function(t){return t.storedMarks||null},apply:function(t,e,n,r){return r.selection.$cursor?t.storedMarks:null}}),new Ju("scrollToSelection",{init:function(){return 0},apply:function(t,e){return t.scrolledIntoView?e+1:e}})],Yu=function(t,e){var n=this;this.schema=t,this.fields=Ku.concat(),this.plugins=[],this.pluginsByKey=Object.create(null),e&&e.forEach((function(t){if(n.pluginsByKey[t.key])throw new RangeError("Adding different instances of a keyed plugin ("+t.key+")");n.plugins.push(t),n.pluginsByKey[t.key]=t,t.spec.state&&n.fields.push(new Ju(t.key,t.spec.state,t))}))},Uu=function(t){this.config=t},Xu={schema:{configurable:!0},plugins:{configurable:!0},tr:{configurable:!0}};Xu.schema.get=function(){return this.config.schema},Xu.plugins.get=function(){return this.config.plugins},Uu.prototype.apply=function(t){return this.applyTransaction(t).state},Uu.prototype.filterTransaction=function(t,e){void 0===e&&(e=-1);for(var n=0;n-1&&Gu.splice(e,1)},Object.defineProperties(Uu.prototype,Xu);var Gu=[];function Zu(t,e,n){for(var r in t){var o=t[r];o instanceof Function?o=o.bind(e):"handleDOMEvents"==r&&(o=Zu(o,e,{})),n[r]=o}return n}var Qu=function(t){this.props={},t.props&&Zu(t.props,this,this.props),this.spec=t,this.key=t.key?t.key.key:ef("plugin")};Qu.prototype.getState=function(t){return t[this.key]};var tf=Object.create(null);function ef(t){return t in tf?t+"$"+ ++tf[t]:(tf[t]=0,t+"$")}var nf=function(t){void 0===t&&(t="key"),this.key=ef(t)};nf.prototype.get=function(t){return t.config.pluginsByKey[this.key]},nf.prototype.getState=function(t){return t[this.key]};var rf={};if("undefined"!=typeof navigator&&"undefined"!=typeof document){var of=/Edge\/(\d+)/.exec(navigator.userAgent),af=/MSIE \d/.test(navigator.userAgent),sf=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),cf=rf.ie=!!(af||sf||of);rf.ie_version=af?document.documentMode||6:sf?+sf[1]:of?+of[1]:null,rf.gecko=!cf&&/gecko\/(\d+)/i.test(navigator.userAgent),rf.gecko_version=rf.gecko&&+(/Firefox\/(\d+)/.exec(navigator.userAgent)||[0,0])[1];var lf=!cf&&/Chrome\/(\d+)/.exec(navigator.userAgent);rf.chrome=!!lf,rf.chrome_version=lf&&+lf[1],rf.safari=!cf&&/Apple Computer/.test(navigator.vendor),rf.ios=rf.safari&&(/Mobile\/\w+/.test(navigator.userAgent)||navigator.maxTouchPoints>2),rf.mac=rf.ios||/Mac/.test(navigator.platform),rf.android=/Android \d/.test(navigator.userAgent),rf.webkit="webkitFontSmoothing"in document.documentElement.style,rf.webkit_version=rf.webkit&&+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]}var uf=function(t){for(var e=0;;e++)if(!(t=t.previousSibling))return e},ff=function(t){var e=t.assignedSlot||t.parentNode;return e&&11==e.nodeType?e.host:e},pf=null,df=function(t,e,n){var r=pf||(pf=document.createRange());return r.setEnd(t,null==n?t.nodeValue.length:n),r.setStart(t,e||0),r},hf=function(t,e,n,r){return n&&(mf(t,e,n,r,-1)||mf(t,e,n,r,1))},vf=/^(img|br|input|textarea|hr)$/i;function mf(t,e,n,r,o){for(;;){if(t==n&&e==r)return!0;if(e==(o<0?0:gf(t))){var i=t.parentNode;if(1!=i.nodeType||yf(t)||vf.test(t.nodeName)||"false"==t.contentEditable)return!1;e=uf(t)+(o<0?0:1),t=i}else{if(1!=t.nodeType)return!1;if("false"==(t=t.childNodes[e+(o<0?-1:0)]).contentEditable)return!1;e=o<0?gf(t):0}}}function gf(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function yf(t){for(var e,n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}var bf=function(t){var e=t.isCollapsed;return e&&rf.chrome&&t.rangeCount&&!t.getRangeAt(0).collapsed&&(e=!1),e};function wf(t,e){var n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function xf(t){return{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function Sf(t,e){return"number"==typeof t?t:t[e]}function kf(t){var e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,r=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*r}}function _f(t,e,n){for(var r=t.someProp("scrollThreshold")||0,o=t.someProp("scrollMargin")||5,i=t.dom.ownerDocument,a=n||t.dom;a;a=ff(a))if(1==a.nodeType){var s=a==i.body||1!=a.nodeType,c=s?xf(i):kf(a),l=0,u=0;if(e.topc.bottom-Sf(r,"bottom")&&(u=e.bottom-c.bottom+Sf(o,"bottom")),e.leftc.right-Sf(r,"right")&&(l=e.right-c.right+Sf(o,"right")),l||u)if(s)i.defaultView.scrollBy(l,u);else{var f=a.scrollLeft,p=a.scrollTop;u&&(a.scrollTop+=u),l&&(a.scrollLeft+=l);var d=a.scrollLeft-f,h=a.scrollTop-p;e={left:e.left-d,top:e.top-h,right:e.right-d,bottom:e.bottom-h}}if(s)break}}function Of(t){for(var e=[],n=t.ownerDocument;t&&(e.push({dom:t,top:t.scrollTop,left:t.scrollLeft}),t!=n);t=ff(t));return e}function Cf(t,e){for(var n=0;n=s){a=Math.max(p.bottom,a),s=Math.min(p.top,s);var d=p.left>e.left?p.left-e.left:p.right=(p.left+p.right)/2?1:0));continue}}!n&&(e.left>=p.right&&e.top>=p.top||e.left>=p.left&&e.top>=p.bottom)&&(i=l+1)}}return n&&3==n.nodeType?function(t,e){for(var n=t.nodeValue.length,r=document.createRange(),o=0;o=(i.left+i.right)/2?1:0)}}return{node:t,offset:0}}(n,r):!n||o&&1==n.nodeType?{node:t,offset:i}:Df(n,r)}function Tf(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function $f(t,e,n){var r=t.childNodes.length;if(r&&n.tope.top&&i++}o==t.dom&&i==o.childNodes.length-1&&1==o.lastChild.nodeType&&e.top>o.lastChild.getBoundingClientRect().bottom?l=t.state.doc.content.size:0!=i&&1==o.nodeType&&"BR"==o.childNodes[i-1].nodeName||(l=function(t,e,n,r){for(var o=-1,i=e;i!=t.dom;){var a=t.docView.nearestDesc(i,!0);if(!a)return null;if(a.node.isBlock&&a.parent){var s=a.dom.getBoundingClientRect();if(s.left>r.left||s.top>r.top)o=a.posBefore;else{if(!(s.right-1?o:t.docView.posFromDOM(e,n)}(t,o,i,e))}null==l&&(l=function(t,e,n){var r=Df(e,n),o=r.node,i=r.offset,a=-1;if(1==o.nodeType&&!o.firstChild){var s=o.getBoundingClientRect();a=s.left!=s.right&&n.left>(s.left+s.right)/2?1:-1}return t.docView.posFromDOM(o,i,a)}(t,u,e));var v=t.docView.nearestDesc(u,!0);return{pos:l,inside:v?v.posAtStart-v.border:-1}}function Ef(t,e){var n=t.getClientRects();return n.length?n[e<0?0:n.length-1]:t.getBoundingClientRect()}var Nf=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Pf(t,e,n){var r=t.docView.domFromPos(e,n<0?-1:1),o=r.node,i=r.offset,a=rf.webkit||rf.gecko;if(3==o.nodeType){if(!a||!Nf.test(o.nodeValue)&&(n<0?i:i!=o.nodeValue.length)){var s=i,c=i,l=n<0?1:-1;return n<0&&!i?(c++,l=-1):n>=0&&i==o.nodeValue.length?(s--,l=1):n<0?s--:c++,If(Ef(df(o,s,c),l),l<0)}var u=Ef(df(o,i,i),n);if(rf.gecko&&i&&/\s/.test(o.nodeValue[i-1])&&i=0)}if(i&&(n<0||i==gf(o))){var v=o.childNodes[i-1],m=3==v.nodeType?df(v,gf(v)-(a?0:1)):1!=v.nodeType||"BR"==v.nodeName&&v.nextSibling?null:v;if(m)return If(Ef(m,1),!1)}if(i=0)}function If(t,e){if(0==t.width)return t;var n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function jf(t,e){if(0==t.height)return t;var n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function Rf(t,e,n){var r=t.state,o=t.root.activeElement;r!=e&&t.updateState(e),o!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),o!=t.dom&&o&&o.focus()}}var zf=/[\u0590-\u08ac]/;var Ff=null,Lf=null,Bf=!1;function Vf(t,e,n){return Ff==e&&Lf==n?Bf:(Ff=e,Lf=n,Bf="up"==n||"down"==n?function(t,e,n){var r=e.selection,o="up"==n?r.$from:r.$to;return Rf(t,e,(function(){for(var e=t.docView.domFromPos(o.pos,"up"==n?-1:1).node;;){var r=t.docView.nearestDesc(e,!0);if(!r)break;if(r.node.isBlock){e=r.dom;break}e=r.dom.parentNode}for(var i=Pf(t,o.pos,1),a=e.firstChild;a;a=a.nextSibling){var s=void 0;if(1==a.nodeType)s=a.getClientRects();else{if(3!=a.nodeType)continue;s=df(a,0,a.nodeValue.length).getClientRects()}for(var c=0;cl.top+1&&("up"==n?i.top-l.top>2*(l.bottom-i.top):l.bottom-i.bottom>2*(i.bottom-l.top)))return!1}}return!0}))}(t,e,n):function(t,e,n){var r=e.selection.$head;if(!r.parent.isTextblock)return!1;var o=r.parentOffset,i=!o,a=o==r.parent.content.size,s=t.root.getSelection();return zf.test(r.parent.textContent)&&s.modify?Rf(t,e,(function(){var e=s.getRangeAt(0),o=s.focusNode,i=s.focusOffset,a=s.caretBidiLevel;s.modify("move",n,"character");var c=!(r.depth?t.docView.domAfterPos(r.before()):t.dom).contains(1==s.focusNode.nodeType?s.focusNode:s.focusNode.parentNode)||o==s.focusNode&&i==s.focusOffset;return s.removeAllRanges(),s.addRange(e),null!=a&&(s.caretBidiLevel=a),c})):"left"==n||"backward"==n?i:a}(t,e,n))}var Wf=function(t,e,n,r){this.parent=t,this.children=e,this.dom=n,n.pmViewDesc=this,this.contentDOM=r,this.dirty=0},qf={size:{configurable:!0},border:{configurable:!0},posBefore:{configurable:!0},posAtStart:{configurable:!0},posAfter:{configurable:!0},posAtEnd:{configurable:!0},contentLost:{configurable:!0},domAtom:{configurable:!0},ignoreForCoords:{configurable:!0}};Wf.prototype.matchesWidget=function(){return!1},Wf.prototype.matchesMark=function(){return!1},Wf.prototype.matchesNode=function(){return!1},Wf.prototype.matchesHack=function(t){return!1},Wf.prototype.parseRule=function(){return null},Wf.prototype.stopEvent=function(){return!1},qf.size.get=function(){for(var t=0,e=0;euf(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))s=2&t.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==e)for(var c=t;;c=c.parentNode){if(c==this.dom){s=!1;break}if(c.parentNode.firstChild!=c)break}if(null==s&&e==t.childNodes.length)for(var l=t;;l=l.parentNode){if(l==this.dom){s=!0;break}if(l.parentNode.lastChild!=l)break}}return(null==s?n>0:s)?this.posAtEnd:this.posAtStart},Wf.prototype.nearestDesc=function(t,e){for(var n=!0,r=t;r;r=r.parentNode){var o=this.getDesc(r);if(o&&(!e||o.node)){if(!n||!o.nodeDOM||(1==o.nodeDOM.nodeType?o.nodeDOM.contains(1==t.nodeType?t:t.parentNode):o.nodeDOM==t))return o;n=!1}}},Wf.prototype.getDesc=function(t){for(var e=t.pmViewDesc,n=e;n;n=n.parent)if(n==this)return e},Wf.prototype.posFromDOM=function(t,e,n){for(var r=t;r;r=r.parentNode){var o=this.getDesc(r);if(o)return o.localPosFromDOM(t,e,n)}return-1},Wf.prototype.descAt=function(t){for(var e=0,n=0;et||i instanceof Zf){r=t-o;break}o=a}if(r)return this.children[n].domFromPos(r-this.children[n].border,e);for(var s=void 0;n&&!(s=this.children[n-1]).size&&s instanceof Jf&&s.widget.type.side>=0;n--);if(e<=0){for(var c,l=!0;(c=n?this.children[n-1]:null)&&c.dom.parentNode!=this.contentDOM;n--,l=!1);return c&&e&&l&&!c.border&&!c.domAtom?c.domFromPos(c.size,e):{node:this.contentDOM,offset:c?uf(c.dom)+1:0}}for(var u,f=!0;(u=n=l&&e<=c-s.border&&s.node&&s.contentDOM&&this.contentDOM.contains(s.contentDOM))return s.parseRange(t,e,l);t=i;for(var u=a;u>0;u--){var f=this.children[u-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){r=uf(f.dom)+1;break}t-=f.size}-1==r&&(r=0)}if(r>-1&&(c>e||a==this.children.length-1)){e=c;for(var p=a+1;ps&&ie){var S=u;u=f,f=S}var k=document.createRange();k.setEnd(f.node,f.offset),k.setStart(u.node,u.offset),p.removeAllRanges(),p.addRange(k)}}},Wf.prototype.ignoreMutation=function(t){return!this.contentDOM&&"selection"!=t.type},qf.contentLost.get=function(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)},Wf.prototype.markDirty=function(t,e){for(var n=0,r=0;r=n:tn){var a=n+o.border,s=i-o.border;if(t>=a&&e<=s)return this.dirty=t==n||e==i?2:1,void(t!=a||e!=s||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(t-a,e-a):o.dirty=3);o.dirty=o.dom!=o.contentDOM||o.dom.parentNode!=this.contentDOM||o.children.length?3:2}n=i}this.dirty=2},Wf.prototype.markParentsDirty=function(){for(var t=1,e=this.parent;e;e=e.parent,t++){var n=1==t?2:1;e.dirty0&&(i=fp(i,0,t,r));for(var s=0;s-1?i:null,s=i&&i.pos<0,c=new lp(this,a&&a.node);!function(t,e,n,r){var o=e.locals(t),i=0;if(0==o.length){for(var a=0;ai;)l.push(o[c++]);var y=i+v.nodeSize;if(v.isText){var b=y;c=0&&!a&&c.syncToMarks(i==n.node.childCount?Wc.none:n.node.child(i).marks,r,t),c.placeWidget(e,t,o)}),(function(e,n,a,l){var u;c.syncToMarks(e.marks,r,t),c.findNodeMatch(e,n,a,l)||s&&t.state.selection.from>o&&t.state.selection.to-1&&c.updateNodeAt(e,n,a,u,t)||c.updateNextNode(e,n,a,t,l)||c.addNode(e,n,a,t,o),o+=e.nodeSize})),c.syncToMarks(Hf,r,t),this.node.isTextblock&&c.addTextblockHacks(),c.destroyRest(),(c.changed||2==this.dirty)&&(a&&this.protectLocalComposition(t,a),tp(this.contentDOM,this.children,t),rf.ios&&function(t){if("UL"==t.nodeName||"OL"==t.nodeName){var e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}(this.dom))},e.prototype.localCompositionInfo=function(t,e){var n=t.state.selection,r=n.from,o=n.to;if(!(!(t.state.selection instanceof ju)||re+this.node.content.size)){var i=t.root.getSelection(),a=function(t,e){for(;;){if(3==t.nodeType)return t;if(1==t.nodeType&&e>0){if(t.childNodes.length>e&&3==t.childNodes[e].nodeType)return t.childNodes[e];e=gf(t=t.childNodes[e-1])}else{if(!(1==t.nodeType&&e=n&&s=0&&u+e.length+s>=n)return s+u}}}return-1}(this.node.content,s,r-e,o-e);return c<0?null:{node:a,pos:c,text:s}}return{node:a,pos:-1}}}},e.prototype.protectLocalComposition=function(t,e){var n=e.node,r=e.pos,o=e.text;if(!this.getDesc(n)){for(var i=n;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=null)}var a=new Kf(this,i,n,o);t.compositionNodes.push(a),this.children=fp(this.children,r,r+o.length,t,a)}},e.prototype.update=function(t,e,n,r){return!(3==this.dirty||!t.sameMarkup(this.node))&&(this.updateInner(t,e,n,r),!0)},e.prototype.updateInner=function(t,e,n,r){this.updateOuterDeco(e),this.node=t,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0},e.prototype.updateOuterDeco=function(t){if(!sp(t,this.outerDeco)){var e=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=op(this.dom,this.nodeDOM,rp(this.outerDeco,this.node,e),rp(t,this.node,e)),this.dom!=n&&(n.pmViewDesc=null,this.dom.pmViewDesc=this),this.outerDeco=t}},e.prototype.selectNode=function(){this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)},e.prototype.deselectNode=function(){this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable")},n.domAtom.get=function(){return this.node.isAtom},Object.defineProperties(e.prototype,n),e}(Wf);function Xf(t,e,n,r,o){return ap(r,e,t),new Uf(null,t,e,n,r,r,r,o,0)}var Gf=function(t){function e(e,n,r,o,i,a,s){t.call(this,e,n,r,o,i,null,a,s)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={domAtom:{configurable:!0}};return e.prototype.parseRule=function(){for(var t=this.nodeDOM.parentNode;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}},e.prototype.update=function(t,e,n,r){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!t.sameMarkup(this.node))&&(this.updateOuterDeco(e),0==this.dirty&&t.text==this.node.text||t.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=t.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=t,this.dirty=0,!0)},e.prototype.inParent=function(){for(var t=this.parent.contentDOM,e=this.nodeDOM;e;e=e.parentNode)if(e==t)return!0;return!1},e.prototype.domFromPos=function(t){return{node:this.nodeDOM,offset:t}},e.prototype.localPosFromDOM=function(e,n,r){return e==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):t.prototype.localPosFromDOM.call(this,e,n,r)},e.prototype.ignoreMutation=function(t){return"characterData"!=t.type&&"selection"!=t.type},e.prototype.slice=function(t,n,r){var o=this.node.cut(t,n),i=document.createTextNode(o.text);return new e(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)},e.prototype.markDirty=function(e,n){t.prototype.markDirty.call(this,e,n),this.dom==this.nodeDOM||0!=e&&n!=this.nodeDOM.nodeValue.length||(this.dirty=3)},n.domAtom.get=function(){return!1},Object.defineProperties(e.prototype,n),e}(Uf),Zf=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={domAtom:{configurable:!0},ignoreForCoords:{configurable:!0}};return e.prototype.parseRule=function(){return{ignore:!0}},e.prototype.matchesHack=function(t){return 0==this.dirty&&this.dom.nodeName==t},n.domAtom.get=function(){return!0},n.ignoreForCoords.get=function(){return"IMG"==this.dom.nodeName},Object.defineProperties(e.prototype,n),e}(Wf),Qf=function(t){function e(e,n,r,o,i,a,s,c,l,u){t.call(this,e,n,r,o,i,a,s,l,u),this.spec=c}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.update=function(e,n,r,o){if(3==this.dirty)return!1;if(this.spec.update){var i=this.spec.update(e,n,r);return i&&this.updateInner(e,n,r,o),i}return!(!this.contentDOM&&!e.isLeaf)&&t.prototype.update.call(this,e,n,r,o)},e.prototype.selectNode=function(){this.spec.selectNode?this.spec.selectNode():t.prototype.selectNode.call(this)},e.prototype.deselectNode=function(){this.spec.deselectNode?this.spec.deselectNode():t.prototype.deselectNode.call(this)},e.prototype.setSelection=function(e,n,r,o){this.spec.setSelection?this.spec.setSelection(e,n,r):t.prototype.setSelection.call(this,e,n,r,o)},e.prototype.destroy=function(){this.spec.destroy&&this.spec.destroy(),t.prototype.destroy.call(this)},e.prototype.stopEvent=function(t){return!!this.spec.stopEvent&&this.spec.stopEvent(t)},e.prototype.ignoreMutation=function(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):t.prototype.ignoreMutation.call(this,e)},e}(Uf);function tp(t,e,n){for(var r=t.firstChild,o=!1,i=0;i0;){for(var s=void 0;;)if(r){var c=n.children[r-1];if(!(c instanceof Yf)){s=c,r--;break}n=c,r=c.children.length}else{if(n==e)break t;r=n.parent.children.indexOf(n),n=n.parent}var l=s.node;if(l){if(l!=t.child(o-1))break;--o,i.set(s,o),a.push(s)}}return{index:o,matched:i,matches:a.reverse()}}(t.node.content,t)};function up(t,e){return t.type.side-e.type.side}function fp(t,e,n,r,o){for(var i=[],a=0,s=0;a=n||u<=e?i.push(c):(ln&&i.push(c.slice(n-l,c.size,r)))}return i}function pp(t,e){var n=t.root.getSelection(),r=t.state.doc;if(!n.focusNode)return null;var o=t.docView.nearestDesc(n.focusNode),i=o&&0==o.size,a=t.docView.posFromDOM(n.focusNode,n.focusOffset);if(a<0)return null;var s,c,l=r.resolve(a);if(bf(n)){for(s=l;o&&!o.node;)o=o.parent;if(o&&o.node.isAtom&&zu.isSelectable(o.node)&&o.parent&&(!o.node.isInline||!function(t,e,n){for(var r=0==e,o=e==gf(t);r||o;){if(t==n)return!0;var i=uf(t);if(!(t=t.parentNode))return!1;r=r&&0==i,o=o&&i==gf(t)}}(n.focusNode,n.focusOffset,o.dom))){var u=o.posBefore;c=new zu(a==u?l:r.resolve(u))}}else{var f=t.docView.posFromDOM(n.anchorNode,n.anchorOffset);if(f<0)return null;s=r.resolve(f)}c||(c=xp(t,s,l,"pointer"==e||t.state.selection.head>1,i=Math.min(o,t.length);r-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{var c=Yf.create(this.top,t[o],e,n);this.top.children.splice(this.index,0,c),this.top=c,this.changed=!0}this.index=0,o++}},lp.prototype.findNodeMatch=function(t,e,n,r){var o,i=-1;if(r>=this.preMatch.index&&(o=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&o.matchesNode(t,e,n))i=this.top.children.indexOf(o,this.index);else for(var a=this.index,s=Math.min(this.top.children.length,a+5);a0?r.max(o):r.min(o),a=i.parent.inlineContent?i.depth?t.doc.resolve(e>0?i.after():i.before()):null:i;return a&&Nu.findFrom(a,e)}function _p(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function Op(t,e,n){var r=t.state.selection;if(!(r instanceof ju)){if(r instanceof zu&&r.node.isInline)return _p(t,new ju(e>0?r.$to:r.$from));var o=kp(t.state,e);return!!o&&_p(t,o)}if(!r.empty||n.indexOf("s")>-1)return!1;if(t.endOfTextblock(e>0?"right":"left")){var i=kp(t.state,e);return!!(i&&i instanceof zu)&&_p(t,i)}if(!(rf.mac&&n.indexOf("m")>-1)){var a,s=r.$head,c=s.textOffset?null:e<0?s.nodeBefore:s.nodeAfter;if(!c||c.isText)return!1;var l=e<0?s.pos-c.nodeSize:s.pos;return!!(c.isAtom||(a=t.docView.descAt(l))&&!a.contentDOM)&&(zu.isSelectable(c)?_p(t,new zu(e<0?t.state.doc.resolve(s.pos-c.nodeSize):s)):!!rf.webkit&&_p(t,new ju(t.state.doc.resolve(e<0?l:l+c.nodeSize))))}}function Cp(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function Mp(t){var e=t.pmViewDesc;return e&&0==e.size&&(t.nextSibling||"BR"!=t.nodeName)}function Dp(t){var e=t.root.getSelection(),n=e.focusNode,r=e.focusOffset;if(n){var o,i,a=!1;for(rf.gecko&&1==n.nodeType&&r0){if(1!=n.nodeType)break;var s=n.childNodes[r-1];if(Mp(s))o=n,i=--r;else{if(3!=s.nodeType)break;r=(n=s).nodeValue.length}}else{if($p(n))break;for(var c=n.previousSibling;c&&Mp(c);)o=n.parentNode,i=uf(c),c=c.previousSibling;if(c)r=Cp(n=c);else{if((n=n.parentNode)==t.dom)break;r=0}}a?Ap(t,e,n,r):o&&Ap(t,e,o,i)}}function Tp(t){var e=t.root.getSelection(),n=e.focusNode,r=e.focusOffset;if(n){for(var o,i,a=Cp(n);;)if(r-1)return!1;if(rf.mac&&n.indexOf("m")>-1)return!1;var o=r.$from,i=r.$to;if(!o.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){var a=kp(t.state,e);if(a&&a instanceof zu)return _p(t,a)}if(!o.parent.inlineContent){var s=e<0?o:i,c=r instanceof Lu?Nu.near(s,e):Nu.findFrom(s,e);return!!c&&_p(t,c)}return!1}function Np(t,e){if(!(t.state.selection instanceof ju))return!0;var n=t.state.selection,r=n.$head,o=n.$anchor,i=n.empty;if(!r.sameParent(o))return!0;if(!i)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;var a=!r.textOffset&&(e<0?r.nodeBefore:r.nodeAfter);if(a&&!a.isText){var s=t.state.tr;return e<0?s.delete(r.pos-a.nodeSize,r.pos):s.delete(r.pos,r.pos+a.nodeSize),t.dispatch(s),!0}return!1}function Pp(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function Ip(t,e){var n=e.keyCode,r=function(t){var e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}(e);return 8==n||rf.mac&&72==n&&"c"==r?Np(t,-1)||Dp(t):46==n||rf.mac&&68==n&&"c"==r?Np(t,1)||Tp(t):13==n||27==n||(37==n?Op(t,-1,r)||Dp(t):39==n?Op(t,1,r)||Tp(t):38==n?Ep(t,-1,r)||Dp(t):40==n?function(t){if(rf.safari&&!(t.state.selection.$head.parentOffset>0)){var e=t.root.getSelection(),n=e.focusNode,r=e.focusOffset;if(n&&1==n.nodeType&&0==r&&n.firstChild&&"false"==n.firstChild.contentEditable){var o=n.firstChild;Pp(t,o,!0),setTimeout((function(){return Pp(t,o,!1)}),20)}}}(t)||Ep(t,1,r)||Tp(t):r==(rf.mac?"m":"c")&&(66==n||73==n||89==n||90==n))}function jp(t){var e=t.pmViewDesc;if(e)return e.parseRule();if("BR"==t.nodeName&&t.parentNode){if(rf.safari&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){var n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}if(t.parentNode.lastChild==t||rf.safari&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if("IMG"==t.nodeName&&t.getAttribute("mark-placeholder"))return{ignore:!0}}function Rp(t,e,n,r,o){if(e<0){var i=t.lastSelectionTime>Date.now()-50?t.lastSelectionOrigin:null,a=pp(t,i);if(a&&!t.state.selection.eq(a)){var s=t.state.tr.setSelection(a);"pointer"==i?s.setMeta("pointer",!0):"key"==i&&s.scrollIntoView(),t.dispatch(s)}}else{var c=t.state.doc.resolve(e),l=c.sharedDepth(n);e=c.before(l+1),n=t.state.doc.resolve(n).after(l+1);var u=t.state.selection,f=function(t,e,n){var r=t.docView.parseRange(e,n),o=r.node,i=r.fromOffset,a=r.toOffset,s=r.from,c=r.to,l=t.root.getSelection(),u=null,f=l.anchorNode;if(f&&t.dom.contains(1==f.nodeType?f:f.parentNode)&&(u=[{node:f,offset:l.anchorOffset}],bf(l)||u.push({node:l.focusNode,offset:l.focusOffset})),rf.chrome&&8===t.lastKeyCode)for(var p=a;p>i;p--){var d=o.childNodes[p-1],h=d.pmViewDesc;if("BR"==d.nodeName&&!h){a=p;break}if(!h||h.size)break}var v=t.state.doc,m=t.someProp("domParser")||Rl.fromSchema(t.state.schema),g=v.resolve(s),y=null,b=m.parse(o,{topNode:g.parent,topMatch:g.parent.contentMatchAt(g.index()),topOpen:!0,from:i,to:a,preserveWhitespace:"pre"!=g.parent.type.whitespace||"full",editableContent:!0,findPositions:u,ruleFromNode:jp,context:g});if(u&&null!=u[0].pos){var w=u[0].pos,x=u[1]&&u[1].pos;null==x&&(x=w),y={anchor:w+s,head:x+s}}return{doc:b,sel:y,from:s,to:c}}(t,e,n);if(rf.chrome&&t.cursorWrapper&&f.sel&&f.sel.anchor==t.cursorWrapper.deco.from){var p=t.cursorWrapper.deco.type.toDOM.nextSibling,d=p&&p.nodeValue?p.nodeValue.length:1;f.sel={anchor:f.sel.anchor+d,head:f.sel.anchor+d}}var h,v,m=t.state.doc,g=m.slice(f.from,f.to);8===t.lastKeyCode&&Date.now()-100=s?i-r:0)+(c-s),s=i}else if(c=c?i-r:0)+(s-c),c=i}return{start:i,endA:s,endB:c}}(g.content,f.doc.content,f.from,h,v);if(!y){if(!(r&&u instanceof ju&&!u.empty&&u.$head.sameParent(u.$anchor))||t.composing||f.sel&&f.sel.anchor!=f.sel.head){if((rf.ios&&t.lastIOSEnter>Date.now()-225||rf.android)&&o.some((function(t){return"DIV"==t.nodeName||"P"==t.nodeName}))&&t.someProp("handleKeyDown",(function(e){return e(t,wf(13,"Enter"))})))return void(t.lastIOSEnter=0);if(f.sel){var b=zp(t,t.state.doc,f.sel);b&&!b.eq(t.state.selection)&&t.dispatch(t.state.tr.setSelection(b))}return}y={start:u.from,endA:u.to,endB:u.to}}t.domChangeCount++,t.state.selection.fromt.state.selection.from&&y.start<=t.state.selection.from+2?y.start=t.state.selection.from:y.endA=t.state.selection.to-2&&(y.endB+=t.state.selection.to-y.endA,y.endA=t.state.selection.to)),rf.ie&&rf.ie_version<=11&&y.endB==y.start+1&&y.endA==y.start&&y.start>f.from&&"  "==f.doc.textBetween(y.start-f.from-1,y.start-f.from+1)&&(y.start--,y.endA--,y.endB--);var w,x=f.doc.resolveNoCache(y.start-f.from),S=f.doc.resolveNoCache(y.endB-f.from),k=x.sameParent(S)&&x.parent.inlineContent;if((rf.ios&&t.lastIOSEnter>Date.now()-225&&(!k||o.some((function(t){return"DIV"==t.nodeName||"P"==t.nodeName})))||!k&&x.posy.start&&function(t,e,n,r,o){if(!r.parent.isTextblock||n-e<=o.pos-r.pos||Fp(r,!0,!1)n||Fp(a,!0,!1)e.content.size?null:xp(t,e.resolve(n.anchor),e.resolve(n.head))}function Fp(t,e,n){for(var r=t.depth,o=e?t.end():t.pos;r>0&&(e||t.indexAfter(r)==t.node(r).childCount);)r--,o++,e=!1;if(n)for(var i=t.node(r).maybeChild(t.indexAfter(r));i&&!i.isLeaf;)i=i.firstChild,o++;return o}function Lp(t,e){for(var n=[],r=e.content,o=e.openStart,i=e.openEnd;o>1&&i>1&&1==r.childCount&&1==r.firstChild.childCount;){o--,i--;var a=r.firstChild;n.push(a.type.name,a.attrs!=a.type.defaultAttrs?a.attrs:null),r=a.content}var s=t.someProp("clipboardSerializer")||Yl.fromSchema(t.state.schema),c=Xp(),l=c.createElement("div");l.appendChild(s.serializeFragment(r,{document:c}));for(var u,f=l.firstChild;f&&1==f.nodeType&&(u=Yp[f.nodeName.toLowerCase()]);){for(var p=u.length-1;p>=0;p--){for(var d=c.createElement(u[p]);l.firstChild;)d.appendChild(l.firstChild);l.appendChild(d),"tbody"!=u[p]&&(o++,i++)}f=l.firstChild}return f&&1==f.nodeType&&f.setAttribute("data-pm-slice",o+" "+i+" "+JSON.stringify(n)),{dom:l,text:t.someProp("clipboardTextSerializer",(function(t){return t(e)}))||e.content.textBetween(0,e.content.size,"\n\n")}}function Bp(t,e,n,r,o){var i,a,s=o.parent.type.spec.code;if(!n&&!e)return null;var c=e&&(r||s||!n);if(c){if(t.someProp("transformPastedText",(function(t){e=t(e,s||r)})),s)return e?new Hc(zc.from(t.state.schema.text(e.replace(/\r\n?/g,"\n"))),0,0):Hc.empty;var l=t.someProp("clipboardTextParser",(function(t){return t(e,o,r)}));if(l)a=l;else{var u=o.marks(),f=t.state.schema,p=Yl.fromSchema(f);i=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach((function(t){var e=i.appendChild(document.createElement("p"));t&&e.appendChild(p.serializeNode(f.text(t,u)))}))}}else t.someProp("transformPastedHTML",(function(t){n=t(n)})),i=function(t){var e=/^(\s*]*>)*/.exec(t);e&&(t=t.slice(e[0].length));var n,r=Xp().createElement("div"),o=/<([a-z][^>\s]+)/i.exec(t);(n=o&&Yp[o[1].toLowerCase()])&&(t=n.map((function(t){return"<"+t+">"})).join("")+t+n.map((function(t){return""})).reverse().join(""));if(r.innerHTML=t,n)for(var i=0;i=0;s-=2){var c=r.nodes[n[s]];if(!c||c.hasRequiredAttrs())break;o=zc.from(c.create(n[s+1],o)),i++,a++}return new Hc(o,i,a)}(Kp(a,+h[1],+h[2]),h[3]);else if(a=Hc.maxOpen(function(t,e){if(t.childCount<2)return t;for(var n=function(n){var r=e.node(n).contentMatchAt(e.index(n)),o=void 0,i=[];if(t.forEach((function(t){if(i){var e,n=r.findWrapping(t.type);if(!n)return i=null;if(e=i.length&&o.length&&qp(n,o,t,i[i.length-1],0))i[i.length-1]=e;else{i.length&&(i[i.length-1]=Hp(i[i.length-1],o.length));var a=Wp(t,n);i.push(a),r=r.matchType(a.type,a.attrs),o=n}}})),i)return{v:zc.from(i)}},r=e.depth;r>=0;r--){var o=n(r);if(o)return o.v}return t}(a.content,o),!0),a.openStart||a.openEnd){for(var m=0,g=0,y=a.content.firstChild;m=n;r--)t=e[r].create(null,zc.from(t));return t}function qp(t,e,n,r,o){if(o=n&&(s=e<0?a.contentMatchAt(0).fillBefore(s,t.childCount>1||i<=o).append(s):s.append(a.contentMatchAt(a.childCount).fillBefore(zc.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,a.copy(s))}function Kp(t,e,n){return et.target.nodeValue.length}))?n.flushSoon():n.flush()})),this.currentSelection=new Qp,Zp&&(this.onCharData=function(t){n.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),n.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.suppressingSelectionUpdates=!1};td.prototype.flushSoon=function(){var t=this;this.flushingSoon<0&&(this.flushingSoon=window.setTimeout((function(){t.flushingSoon=-1,t.flush()}),20))},td.prototype.forceFlush=function(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())},td.prototype.start=function(){this.observer&&this.observer.observe(this.view.dom,Gp),Zp&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()},td.prototype.stop=function(){var t=this;if(this.observer){var e=this.observer.takeRecords();if(e.length){for(var n=0;n-1)){var t=this.observer?this.observer.takeRecords():[];this.queue.length&&(t=this.queue.concat(t),this.queue.length=0);var e=this.view.root.getSelection(),n=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(e)&&Sp(this.view)&&!this.ignoreSelectionChange(e),r=-1,o=-1,i=!1,a=[];if(this.view.editable)for(var s=0;s1){var l=a.filter((function(t){return"BR"==t.nodeName}));if(2==l.length){var u=l[0],f=l[1];u.parentNode&&u.parentNode.parentNode==f.parentNode?f.remove():u.remove()}}(r>-1||n)&&(r>-1&&(this.view.docView.markDirty(r,o),function(t){if(ed)return;ed=!0,"normal"==getComputedStyle(t.dom).whiteSpace&&console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package.")}(this.view)),this.handleDOMChange(r,o,i,a),this.view.docView.dirty?this.view.updateState(this.view.state):this.currentSelection.eq(e)||hp(this.view),this.currentSelection.set(e))}},td.prototype.registerMutation=function(t,e){if(e.indexOf(t.target)>-1)return null;var n=this.view.docView.nearestDesc(t.target);if("attributes"==t.type&&(n==this.view.docView||"contenteditable"==t.attributeName||"style"==t.attributeName&&!t.oldValue&&!t.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(t))return null;if("childList"==t.type){for(var r=0;ri.depth?e(t,n,i.nodeAfter,i.before(r),o,!0):e(t,n,i.node(r),i.before(r),o,!1)})))return{v:!0}},s=i.depth+1;s>0;s--){var c=a(s);if(c)return c.v}return!1}function ld(t,e,n){t.focused||t.focus();var r=t.state.tr.setSelection(e);"pointer"==n&&r.setMeta("pointer",!0),t.dispatch(r)}function ud(t,e,n,r,o){return cd(t,"handleClickOn",e,n,r)||t.someProp("handleClick",(function(n){return n(t,e,r)}))||(o?function(t,e){if(-1==e)return!1;var n,r,o=t.state.selection;o instanceof zu&&(n=o.node);for(var i=t.state.doc.resolve(e),a=i.depth+1;a>0;a--){var s=a>i.depth?i.nodeAfter:i.node(a);if(zu.isSelectable(s)){r=n&&o.$from.depth>0&&a>=o.$from.depth&&i.before(o.$from.depth+1)==o.$from.pos?i.before(o.$from.depth):i.before(a);break}}return null!=r&&(ld(t,zu.create(t.state.doc,r),"pointer"),!0)}(t,n):function(t,e){if(-1==e)return!1;var n=t.state.doc.resolve(e),r=n.nodeAfter;return!!(r&&r.isAtom&&zu.isSelectable(r))&&(ld(t,new zu(n),"pointer"),!0)}(t,n))}function fd(t,e,n,r){return cd(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",(function(n){return n(t,e,r)}))}function pd(t,e,n,r){return cd(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",(function(n){return n(t,e,r)}))||function(t,e,n){if(0!=n.button)return!1;var r=t.state.doc;if(-1==e)return!!r.inlineContent&&(ld(t,ju.create(r,0,r.content.size),"pointer"),!0);for(var o=r.resolve(e),i=o.depth+1;i>0;i--){var a=i>o.depth?o.nodeAfter:o.node(i),s=o.before(i);if(a.inlineContent)ld(t,ju.create(r,s+1,s+1+a.content.size),"pointer");else{if(!zu.isSelectable(a))continue;ld(t,zu.create(r,s),"pointer")}return!0}}(t,n,r)}function dd(t){return wd(t)}rd.keydown=function(t,e){if(t.shiftKey=16==e.keyCode||e.shiftKey,!md(t,e)&&(t.lastKeyCode=e.keyCode,t.lastKeyCodeTime=Date.now(),!rf.android||!rf.chrome||13!=e.keyCode))if(229!=e.keyCode&&t.domObserver.forceFlush(),!rf.ios||13!=e.keyCode||e.ctrlKey||e.altKey||e.metaKey)t.someProp("handleKeyDown",(function(n){return n(t,e)}))||Ip(t,e)?e.preventDefault():od(t,"key");else{var n=Date.now();t.lastIOSEnter=n,t.lastIOSEnterFallbackTimeout=setTimeout((function(){t.lastIOSEnter==n&&(t.someProp("handleKeyDown",(function(e){return e(t,wf(13,"Enter"))})),t.lastIOSEnter=0)}),200)}},rd.keyup=function(t,e){16==e.keyCode&&(t.shiftKey=!1)},rd.keypress=function(t,e){if(!(md(t,e)||!e.charCode||e.ctrlKey&&!e.altKey||rf.mac&&e.metaKey))if(t.someProp("handleKeyPress",(function(n){return n(t,e)})))e.preventDefault();else{var n=t.state.selection;if(!(n instanceof ju&&n.$from.sameParent(n.$to))){var r=String.fromCharCode(e.charCode);t.someProp("handleTextInput",(function(e){return e(t,n.$from.pos,n.$to.pos,r)}))||t.dispatch(t.state.tr.insertText(r).scrollIntoView()),e.preventDefault()}}};var hd=rf.mac?"metaKey":"ctrlKey";nd.mousedown=function(t,e){t.shiftKey=e.shiftKey;var n=dd(t),r=Date.now(),o="singleClick";r-t.lastClick.time<500&&function(t,e){var n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}(e,t.lastClick)&&!e[hd]&&("singleClick"==t.lastClick.type?o="doubleClick":"doubleClick"==t.lastClick.type&&(o="tripleClick")),t.lastClick={time:r,x:e.clientX,y:e.clientY,type:o};var i=t.posAtCoords(sd(e));i&&("singleClick"==o?(t.mouseDown&&t.mouseDown.done(),t.mouseDown=new vd(t,i,e,n)):("doubleClick"==o?fd:pd)(t,i.pos,i.inside,e)?e.preventDefault():od(t,"pointer"))};var vd=function(t,e,n,r){var o,i,a=this;if(this.view=t,this.startDoc=t.state.doc,this.pos=e,this.event=n,this.flushed=r,this.selectNode=n[hd],this.allowDefault=n.shiftKey,this.delayedSelectionSync=!1,e.inside>-1)o=t.state.doc.nodeAt(e.inside),i=e.inside;else{var s=t.state.doc.resolve(e.pos);o=s.parent,i=s.depth?s.before():0}this.mightDrag=null;var c=r?null:n.target,l=c?t.docView.nearestDesc(c,!0):null;this.target=l?l.dom:null;var u=t.state.selection;(0==n.button&&o.type.spec.draggable&&!1!==o.type.spec.selectable||u instanceof zu&&u.from<=i&&u.to>i)&&(this.mightDrag={node:o,pos:i,addAttr:this.target&&!this.target.draggable,setUneditable:this.target&&rf.gecko&&!this.target.hasAttribute("contentEditable")}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((function(){a.view.mouseDown==a&&a.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),od(t,"pointer")};function md(t,e){return!!t.composing||!!(rf.safari&&Math.abs(e.timeStamp-t.compositionEndedAt)<500)&&(t.compositionEndedAt=-2e8,!0)}vd.prototype.done=function(){var t=this;this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout((function(){return hp(t.view)})),this.view.mouseDown=null},vd.prototype.up=function(t){if(this.done(),this.view.dom.contains(3==t.target.nodeType?t.target.parentNode:t.target)){var e=this.pos;this.view.state.doc!=this.startDoc&&(e=this.view.posAtCoords(sd(t))),this.allowDefault||!e?od(this.view,"pointer"):ud(this.view,e.pos,e.inside,t,this.selectNode)?t.preventDefault():0==t.button&&(this.flushed||rf.safari&&this.mightDrag&&!this.mightDrag.node.isAtom||rf.chrome&&!(this.view.state.selection instanceof ju)&&Math.min(Math.abs(e.pos-this.view.state.selection.from),Math.abs(e.pos-this.view.state.selection.to))<=2)?(ld(this.view,Nu.near(this.view.state.doc.resolve(e.pos)),"pointer"),t.preventDefault()):od(this.view,"pointer")}},vd.prototype.move=function(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0),od(this.view,"pointer"),0==t.buttons&&this.done()},nd.touchdown=function(t){dd(t),od(t,"pointer")},nd.contextmenu=function(t){return dd(t)};var gd=rf.android?5e3:-1;function yd(t,e){clearTimeout(t.composingTimeout),e>-1&&(t.composingTimeout=setTimeout((function(){return wd(t)}),e))}function bd(t){var e;for(t.composing&&(t.composing=!1,t.compositionEndedAt=((e=document.createEvent("Event")).initEvent("event",!0,!0),e.timeStamp));t.compositionNodes.length>0;)t.compositionNodes.pop().markParentsDirty()}function wd(t,e){if(!(rf.android&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),bd(t),e||t.docView.dirty){var n=pp(t);return n&&!n.eq(t.state.selection)?t.dispatch(t.state.tr.setSelection(n)):t.updateState(t.state),!0}return!1}}rd.compositionstart=rd.compositionupdate=function(t){if(!t.composing){t.domObserver.flush();var e=t.state,n=e.selection.$from;if(e.selection.empty&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((function(t){return!1===t.type.spec.inclusive}))))t.markCursor=t.state.storedMarks||n.marks(),wd(t,!0),t.markCursor=null;else if(wd(t),rf.gecko&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length)for(var r=t.root.getSelection(),o=r.focusNode,i=r.focusOffset;o&&1==o.nodeType&&0!=i;){var a=i<0?o.lastChild:o.childNodes[i-1];if(!a)break;if(3==a.nodeType){r.collapse(a,a.nodeValue.length);break}o=a,i=-1}t.composing=!0}yd(t,gd)},rd.compositionend=function(t,e){t.composing&&(t.composing=!1,t.compositionEndedAt=e.timeStamp,yd(t,20))};var xd=rf.ie&&rf.ie_version<15||rf.ios&&rf.webkit_version<604;function Sd(t,e,n,r){var o=Bp(t,e,n,t.shiftKey,t.state.selection.$from);if(t.someProp("handlePaste",(function(e){return e(t,r,o||Hc.empty)})))return!0;if(!o)return!1;var i=function(t){return 0==t.openStart&&0==t.openEnd&&1==t.content.childCount?t.content.firstChild:null}(o),a=i?t.state.tr.replaceSelectionWith(i,t.shiftKey):t.state.tr.replaceSelection(o);return t.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}nd.copy=rd.cut=function(t,e){var n=t.state.selection,r="cut"==e.type;if(!n.empty){var o=xd?null:e.clipboardData,i=Lp(t,n.content()),a=i.dom,s=i.text;o?(e.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",s)):function(t,e){if(t.dom.parentNode){var n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";var r=getSelection(),o=document.createRange();o.selectNodeContents(e),t.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout((function(){n.parentNode&&n.parentNode.removeChild(n),t.focus()}),50)}}(t,a),r&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))}},rd.paste=function(t,e){if(!t.composing||rf.android){var n=xd?null:e.clipboardData;n&&Sd(t,n.getData("text/plain"),n.getData("text/html"),e)?e.preventDefault():function(t,e){if(t.dom.parentNode){var n=t.shiftKey||t.state.selection.$from.parent.type.spec.code,r=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus(),setTimeout((function(){t.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Sd(t,r.value,null,e):Sd(t,r.textContent,r.innerHTML,e)}),50)}}(t,e)}};var kd=function(t,e){this.slice=t,this.move=e},_d=rf.mac?"altKey":"ctrlKey";for(var Od in nd.dragstart=function(t,e){var n=t.mouseDown;if(n&&n.done(),e.dataTransfer){var r=t.state.selection,o=r.empty?null:t.posAtCoords(sd(e));if(o&&o.pos>=r.from&&o.pos<=(r instanceof zu?r.to-1:r.to));else if(n&&n.mightDrag)t.dispatch(t.state.tr.setSelection(zu.create(t.state.doc,n.mightDrag.pos)));else if(e.target&&1==e.target.nodeType){var i=t.docView.nearestDesc(e.target,!0);i&&i.node.type.spec.draggable&&i!=t.docView&&t.dispatch(t.state.tr.setSelection(zu.create(t.state.doc,i.posBefore)))}var a=t.state.selection.content(),s=Lp(t,a),c=s.dom,l=s.text;e.dataTransfer.clearData(),e.dataTransfer.setData(xd?"Text":"text/html",c.innerHTML),e.dataTransfer.effectAllowed="copyMove",xd||e.dataTransfer.setData("text/plain",l),t.dragging=new kd(a,!e[_d])}},nd.dragend=function(t){var e=t.dragging;window.setTimeout((function(){t.dragging==e&&(t.dragging=null)}),50)},rd.dragover=rd.dragenter=function(t,e){return e.preventDefault()},rd.drop=function(t,e){var n=t.dragging;if(t.dragging=null,e.dataTransfer){var r=t.posAtCoords(sd(e));if(r){var o=t.state.doc.resolve(r.pos);if(o){var i=n&&n.slice;i?t.someProp("transformPasted",(function(t){i=t(i)})):i=Bp(t,e.dataTransfer.getData(xd?"Text":"text/plain"),xd?null:e.dataTransfer.getData("text/html"),!1,o);var a=n&&!e[_d];if(t.someProp("handleDrop",(function(n){return n(t,e,i||Hc.empty,a)})))e.preventDefault();else if(i){e.preventDefault();var s=i?function(t,e,n){var r=t.resolve(e);if(!n.content.size)return e;for(var o=n.content,i=0;i=0;s--){var c=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,l=r.index(s)+(c>0?1:0),u=r.node(s),f=!1;if(1==a)f=u.canReplace(l,l,o);else{var p=u.contentMatchAt(l).findWrapping(o.firstChild.type);f=p&&u.canReplaceWith(l,l,p[0])}if(f)return 0==c?r.pos:c<0?r.before(s+1):r.after(s+1)}return null}(t.state.doc,o.pos,i):o.pos;null==s&&(s=o.pos);var c=t.state.tr;a&&c.deleteSelection();var l=c.mapping.map(s),u=0==i.openStart&&0==i.openEnd&&1==i.content.childCount,f=c.doc;if(u?c.replaceRangeWith(l,l,i.content.firstChild):c.replaceRange(l,l,i),!c.doc.eq(f)){var p=c.doc.resolve(l);if(u&&zu.isSelectable(i.content.firstChild)&&p.nodeAfter&&p.nodeAfter.sameMarkup(i.content.firstChild))c.setSelection(new zu(p));else{var d=c.mapping.map(s);c.mapping.maps[c.mapping.maps.length-1].forEach((function(t,e,n,r){return d=r})),c.setSelection(xp(t,p,c.doc.resolve(d)))}t.focus(),t.dispatch(c.setMeta("uiEvent","drop"))}}}}}},nd.focus=function(t){t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout((function(){t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.root.getSelection())&&hp(t)}),20))},nd.blur=function(t,e){t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),e.relatedTarget&&t.dom.contains(e.relatedTarget)&&t.domObserver.currentSelection.set({}),t.focused=!1)},nd.beforeinput=function(t,e){if(rf.chrome&&rf.android&&"deleteContentBackward"==e.inputType){t.domObserver.flushSoon();var n=t.domChangeCount;setTimeout((function(){if(t.domChangeCount==n&&(t.dom.blur(),t.focus(),!t.someProp("handleKeyDown",(function(e){return e(t,wf(8,"Backspace"))})))){var e=t.state.selection.$cursor;e&&e.pos>0&&t.dispatch(t.state.tr.delete(e.pos-1,e.pos).scrollIntoView())}}),50)}},rd)nd[Od]=rd[Od];function Cd(t,e){if(t==e)return!0;for(var n in t)if(t[n]!==e[n])return!1;for(var r in e)if(!(r in t))return!1;return!0}var Md=function(t,e){this.spec=e||Nd,this.side=this.spec.side||0,this.toDOM=t};Md.prototype.map=function(t,e,n,r){var o=t.mapResult(e.from+r,this.side<0?-1:1),i=o.pos;return o.deleted?null:new $d(i-n,i-n,this)},Md.prototype.valid=function(){return!0},Md.prototype.eq=function(t){return this==t||t instanceof Md&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&Cd(this.spec,t.spec))},Md.prototype.destroy=function(t){this.spec.destroy&&this.spec.destroy(t)};var Dd=function(t,e){this.spec=e||Nd,this.attrs=t};Dd.prototype.map=function(t,e,n,r){var o=t.map(e.from+r,this.spec.inclusiveStart?-1:1)-n,i=t.map(e.to+r,this.spec.inclusiveEnd?1:-1)-n;return o>=i?null:new $d(o,i,this)},Dd.prototype.valid=function(t,e){return e.from=t&&(!o||o(a.spec))&&n.push(a.copy(a.from+r,a.to+r))}for(var s=0;st){var c=this.children[s]+1;this.children[s+2].findInner(t-c,e-c,n,r+c,o)}},Pd.prototype.map=function(t,e,n){return this==Id||0==t.maps.length?this:this.mapInner(t,e,0,0,n||Nd)},Pd.prototype.mapInner=function(t,e,n,r,o){for(var i,a=0;ac+i||(e>=s[a]+i?s[a+1]=-1:n>=o&&(l=r-n-(e-t))&&(s[a]+=l,s[a+1]+=l))}},l=0;l=r.content.size){u=!0;continue}var h=n.map(t[f+1]+i,-1)-o,v=r.content.findIndex(d),m=v.index,g=v.offset,y=r.maybeChild(m);if(y&&g==d&&g+y.nodeSize==h){var b=s[f+2].mapInner(n,y,p+1,t[f]+i+1,a);b!=Id?(s[f]=d,s[f+1]=h,s[f+2]=b):(s[f+1]=-2,u=!0)}else u=!0}if(u){var w=function(t,e,n,r,o,i,a){function s(t,e){for(var i=0;ia&&l.to=t){this.children[o]==t&&(n=this.children[o+2]);break}for(var i=t+1,a=i+e.content.size,s=0;si&&c.type instanceof Dd){var l=Math.max(i,c.from)-i,u=Math.min(a,c.to)-i;ln&&a.to0;)e++;t.splice(e,0,n)}function qd(t){var e=[];return t.someProp("decorations",(function(n){var r=n(t.state);r&&r!=Id&&e.push(r)})),t.cursorWrapper&&e.push(Pd.create(t.state.doc,[t.cursorWrapper.deco])),jd.from(e)}jd.prototype.map=function(t,e){var n=this.members.map((function(n){return n.map(t,e,Nd)}));return jd.from(n)},jd.prototype.forChild=function(t,e){if(e.isLeaf)return Pd.empty;for(var n=[],r=0;rr.scrollToSelection?"to selection":"preserve",u=o||!this.docView.matchesNode(t.doc,c,s);!u&&t.selection.eq(r.selection)||(i=!0);var f,p,d,h,v,m,g,y,b,w,x,S="preserve"==l&&i&&null==this.dom.style.overflowAnchor&&function(t){for(var e,n,r=t.dom.getBoundingClientRect(),o=Math.max(0,r.top),i=(r.left+r.right)/2,a=o+1;a=o-20){e=s,n=c.top;break}}}return{refDOM:e,refTop:n,stack:Of(t.dom)}}(this);if(i){this.domObserver.stop();var k=u&&(rf.ie||rf.chrome)&&!this.composing&&!r.selection.empty&&!t.selection.empty&&(h=r.selection,v=t.selection,m=Math.min(h.$anchor.sharedDepth(h.head),v.$anchor.sharedDepth(v.head)),h.$anchor.start(m)!=v.$anchor.start(m));if(u){var _=rf.chrome?this.trackWrites=this.root.getSelection().focusNode:null;!o&&this.docView.update(t.doc,c,s,this)||(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=Xf(t.doc,c,s,this.dom,this)),_&&!this.trackWrites&&(k=!0)}k||!(this.mouseDown&&this.domObserver.currentSelection.eq(this.root.getSelection())&&(f=this,p=f.docView.domFromPos(f.state.selection.anchor,0),d=f.root.getSelection(),hf(p.node,p.offset,d.anchorNode,d.anchorOffset)))?hp(this,k):(bp(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}if(this.updatePluginViews(r),"reset"==l)this.dom.scrollTop=0;else if("to selection"==l){var O=this.root.getSelection().focusNode;this.someProp("handleScrollToSelection",(function(t){return t(n)}))||(t.selection instanceof zu?_f(this,this.docView.domAfterPos(t.selection.from).getBoundingClientRect(),O):_f(this,this.coordsAtPos(t.selection.head,1),O))}else S&&(y=(g=S).refDOM,b=g.refTop,w=g.stack,x=y?y.getBoundingClientRect().top:0,Cf(w,0==x?0:x-b))},Hd.prototype.destroyPluginViews=function(){for(var t;t=this.pluginViews.pop();)t.destroy&&t.destroy()},Hd.prototype.updatePluginViews=function(t){if(t&&t.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(var e=0;e",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"',229:"Q"},th="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),eh="undefined"!=typeof navigator&&/Apple Computer/.test(navigator.vendor),nh="undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),rh="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),oh="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),ih=th&&(rh||+th[1]<57)||nh&&rh,ah=0;ah<10;ah++)Zd[48+ah]=Zd[96+ah]=String(ah);for(ah=1;ah<=24;ah++)Zd[ah+111]="F"+ah;for(ah=65;ah<=90;ah++)Zd[ah]=String.fromCharCode(ah+32),Qd[ah]=String.fromCharCode(ah);for(var sh in Zd)Qd.hasOwnProperty(sh)||(Qd[sh]=Zd[sh]);var ch="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function lh(t){var e,n,r,o,i=t.split(/-(?!$)/),a=i[i.length-1];"Space"==a&&(a=" ");for(var s=0;s127)&&(r=Zd[n.keyCode])&&r!=o){var s=e[uh(r,n,!0)];if(s&&s(t.state,t.dispatch,t))return!0}else if(i&&n.shiftKey){var c=e[uh(o,n,!0)];if(c&&c(t.state,t.dispatch,t))return!0}return!1}}function dh(t,e){return!t.selection.empty&&(e&&e(t.tr.deleteSelection().scrollIntoView()),!0)}function hh(t,e,n){for(;t;t="start"==e?t.firstChild:t.lastChild){if(t.isTextblock)return!0;if(n&&1!=t.childCount)return!1}return!1}function vh(t){if(!t.parent.type.spec.isolating)for(var e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function mh(t){if(!t.parent.type.spec.isolating)for(var e=t.depth-1;e>=0;e--){var n=t.node(e);if(t.index(e)+1=0;u--)l=zc.from(r[u].create(null,l));l=zc.from(i.copy(l));var f=t.tr.step(new uu(e.pos-1,c,e.pos,c,new Hc(l,1,0),r.length,!0)),p=c+2*r.length;gu(f.doc,p)&&f.join(p),n(f.scrollIntoView())}return!0}var d=Nu.findFrom(e,1),h=d&&d.$from.blockRange(d.$to),v=h&&du(h);if(null!=v&&v>=e.depth)return n&&n(t.tr.lift(h,v).scrollIntoView()),!0;if(s&&hh(a,"start",!0)&&hh(i,"end")){for(var m=i,g=[];g.push(m),!m.isTextblock;)m=m.lastChild;for(var y=a,b=1;!y.isTextblock;y=y.firstChild)b++;if(m.canReplace(m.childCount,m.childCount,y.content)){if(n){for(var w=zc.empty,x=g.length-1;x>=0;x--)w=zc.from(g[x].copy(w));n(t.tr.step(new uu(e.pos-g.length,e.pos+a.nodeSize,e.pos+b,e.pos+a.nodeSize-b,new Hc(w,g.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function wh(t){return function(e,n){for(var r=e.selection,o=t<0?r.$from:r.$to,i=o.depth;o.node(i).isInline;){if(!i)return!1;i--}return!!o.node(i).isTextblock&&(n&&n(e.tr.setSelection(ju.create(e.doc,t<0?o.start(i):o.end(i)))),!0)}}var xh=wh(-1),Sh=wh(1);function kh(t,e){return function(n,r){var o=n.selection,i=o.from,a=o.to,s=!1;return n.doc.nodesBetween(i,a,(function(r,o){if(s)return!1;if(r.isTextblock&&!r.hasMarkup(t,e))if(r.type==t)s=!0;else{var i=n.doc.resolve(o),a=i.index();s=i.parent.canReplaceWith(a,a+1,t)}})),!!s&&(r&&r(n.tr.setBlockType(i,a,t,e).scrollIntoView()),!0)}}function _h(t,e){return function(n,r){var o=n.selection,i=o.empty,a=o.$cursor,s=o.ranges;if(i&&!a||!function(t,e,n){for(var r=function(r){var o=e[r],i=o.$from,a=o.$to,s=0==i.depth&&t.type.allowsMarkType(n);if(t.nodesBetween(i.pos,a.pos,(function(t){if(s)return!1;s=t.inlineContent&&t.type.allowsMarkType(n)})),s)return{v:!0}},o=0;o0))return!1;var o=vh(r);if(!o){var i=r.blockRange(),a=i&&du(i);return null!=a&&(e&&e(t.tr.lift(i,a).scrollIntoView()),!0)}var s=o.nodeBefore;if(!s.type.spec.isolating&&bh(t,o,e))return!0;if(0==r.parent.content.size&&(hh(s,"end")||zu.isSelectable(s))){var c=xu(t.doc,r.before(),r.after(),Hc.empty);if(c.slice.size0)return!1;i=vh(o)}var a=i&&i.nodeBefore;return!(!a||!zu.isSelectable(a))&&(e&&e(t.tr.setSelection(zu.create(t.doc,i.pos-a.nodeSize)).scrollIntoView()),!0)})),Mh=Oh(dh,(function(t,e,n){var r=t.selection.$cursor;if(!r||(n?!n.endOfTextblock("forward",t):r.parentOffset1&&n.after()!=n.end(-1)){var r=n.before();if(mu(t.doc,r))return e&&e(t.tr.split(r).scrollIntoView()),!0}var o=n.blockRange(),i=o&&du(o);return null!=i&&(e&&e(t.tr.lift(o,i).scrollIntoView()),!0)}),(function(t,e){var n=t.selection,r=n.$from,o=n.$to;if(t.selection instanceof zu&&t.selection.node.isBlock)return!(!r.parentOffset||!mu(t.doc,r.pos))&&(e&&e(t.tr.split(r.pos).scrollIntoView()),!0);if(!r.parent.isBlock)return!1;if(e){var i=o.parentOffset==o.parent.content.size,a=t.tr;(t.selection instanceof ju||t.selection instanceof Lu)&&a.deleteSelection();var s=0==r.depth?null:gh(r.node(-1).contentMatchAt(r.indexAfter(-1))),c=i&&s?[{type:s}]:null,l=mu(a.doc,a.mapping.map(r.pos),1,c);if(c||l||!mu(a.doc,a.mapping.map(r.pos),1,s&&[{type:s}])||(c=[{type:s}],l=!0),l&&(a.split(a.mapping.map(r.pos),1,c),!i&&!r.parentOffset&&r.parent.type!=s)){var u=a.mapping.map(r.before()),f=a.doc.resolve(u);r.node(-1).canReplaceWith(f.index(),f.index()+1,s)&&a.setNodeMarkup(a.mapping.map(r.before()),s)}e(a.scrollIntoView())}return!0})),"Mod-Enter":yh,Backspace:Ch,"Mod-Backspace":Ch,"Shift-Backspace":Ch,Delete:Mh,"Mod-Delete":Mh,"Mod-a":function(t,e){return e&&e(t.tr.setSelection(new Lu(t.doc))),!0}},Th={"Ctrl-h":Dh.Backspace,"Alt-Backspace":Dh["Mod-Backspace"],"Ctrl-d":Dh.Delete,"Ctrl-Alt-Backspace":Dh["Mod-Delete"],"Alt-Delete":Dh["Mod-Delete"],"Alt-d":Dh["Mod-Delete"],"Ctrl-a":xh,"Ctrl-e":Sh};for(var $h in Dh)Th[$h]=Dh[$h];Dh.Home=xh,Dh.End=Sh;var Ah=("undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"undefined"!=typeof os&&"darwin"==os.platform())?Th:Dh,Eh=function(t,e){var n;this.match=t,this.handler="string"==typeof e?(n=e,function(t,e,r,o){var i=n;if(e[1]){var a=e[0].lastIndexOf(e[1]);i+=e[0].slice(a+e[1].length);var s=(r+=a)-o;s>0&&(i=e[0].slice(a-s,a)+i,r=o)}return t.tr.insertText(i,r,o)}):e};function Nh(t){var e=t.rules,n=new Qu({state:{init:function(){return null},apply:function(t,e){var n=t.getMeta(this);return n||(t.selectionSet||t.docChanged?null:e)}},props:{handleTextInput:function(t,r,o,i){return Ph(t,r,o,i,e,n)},handleDOMEvents:{compositionend:function(t){setTimeout((function(){var r=t.state.selection.$cursor;r&&Ph(t,r.pos,r.pos,"",e,n)}))}}},isInputRules:!0});return n}function Ph(t,e,n,r,o,i){if(t.composing)return!1;var a=t.state,s=a.doc.resolve(e);if(s.parent.type.spec.code)return!1;for(var c=s.parent.textBetween(Math.max(0,s.parentOffset-500),s.parentOffset,null,"")+r,l=0;l=0;c--)a.step(s.steps[c].invert(s.docs[c]));if(i.text){var l=a.doc.resolve(i.from).marks();a.replaceWith(i.from,i.to,t.schema.text(i.text,l))}else a.delete(i.from,i.to);e(a)}return!0}}return!1}function jh(t,e,n,r){return new Eh(t,(function(t,o,i,a){var s=n instanceof Function?n(o):n,c=t.tr.delete(i,a),l=c.doc.resolve(i).blockRange(),u=l&&hu(l,e,s);if(!u)return null;c.wrap(l,u);var f=c.doc.resolve(i-1).nodeBefore;return f&&f.type==e&&gu(c.doc,i-1)&&(!r||r(o,f))&&c.join(i-1),c}))}function Rh(t,e,n){return new Eh(t,(function(t,r,o,i){var a=t.doc.resolve(o),s=n instanceof Function?n(r):n;return a.node(-1).canReplaceWith(a.index(-1),a.indexAfter(-1),e)?t.tr.delete(o,i).setBlockType(o,o,e,s):null}))}new Eh(/--$/,"—"),new Eh(/\.\.\.$/,"…"),new Eh(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“"),new Eh(/"$/,"”"),new Eh(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"‘"),new Eh(/'$/,"’");var zh=["ol",0],Fh=["ul",0],Lh=["li",0],Bh={attrs:{order:{default:1}},parseDOM:[{tag:"ol",getAttrs:function(t){return{order:t.hasAttribute("start")?+t.getAttribute("start"):1}}}],toDOM:function(t){return 1==t.attrs.order?zh:["ol",{start:t.attrs.order},0]}},Vh={parseDOM:[{tag:"ul"}],toDOM:function(){return Fh}},Wh={parseDOM:[{tag:"li"}],toDOM:function(){return Lh},defining:!0};function qh(t,e){var n={};for(var r in t)n[r]=t[r];for(var o in e)n[o]=e[o];return n}function Hh(t,e,n){return t.append({ordered_list:qh(Bh,{content:"list_item+",group:n}),bullet_list:qh(Vh,{content:"list_item+",group:n}),list_item:qh(Wh,{content:e})})}function Jh(t,e){return function(n,r){var o=n.selection,i=o.$from,a=o.$to,s=i.blockRange(a),c=!1,l=s;if(!s)return!1;if(s.depth>=2&&i.node(s.depth-1).type.compatibleContent(t)&&0==s.startIndex){if(0==i.index(s.depth-1))return!1;var u=n.doc.resolve(s.start-2);l=new ll(u,u,s.depth),s.endIndex=0;a--)i=zc.from(n[a].type.create(n[a].attrs,i));t.step(new uu(e.start-(r?2:0),e.end,e.start,e.end,new Hc(i,0,0),n.length,!0));for(var s=0,c=0;c=o.depth-3;u--)c=zc.from(o.node(u).copy(c));var f=o.indexAfter(-1)-1)return!1;t.isTextblock&&0==t.content.size&&(h=e+1)})),h>-1&&d.setSelection(e.selection.constructor.near(d.doc.resolve(h))),n(d.scrollIntoView())}return!0}var v=i.pos==o.end()?s.contentMatchAt(0).defaultType:null,m=e.tr.delete(o.pos,i.pos),g=v&&[null,{type:v}];return!!mu(m.doc,o.pos,2,g)&&(n&&n(m.split(o.pos,2,g).scrollIntoView()),!0)}}function Yh(t){return function(e,n){var r=e.selection,o=r.$from,i=r.$to,a=o.blockRange(i,(function(e){return e.childCount&&e.firstChild.type==t}));return!!a&&(!n||(o.node(a.depth-1).type==t?function(t,e,n,r){var o=t.tr,i=r.end,a=r.$to.end(r.depth);is;a--)i-=o.child(a).nodeSize,r.delete(i-1,i+1);var c=r.doc.resolve(n.start),l=c.nodeAfter;if(r.mapping.map(n.end)!=n.start+c.nodeAfter.nodeSize)return!1;var u=0==n.startIndex,f=n.endIndex==o.childCount,p=c.node(-1),d=c.index(-1);if(!p.canReplace(d+(u?0:1),d+1,l.content.append(f?zc.empty:zc.from(o))))return!1;var h=c.pos,v=h+l.nodeSize;return r.step(new uu(h-(u?1:0),v+(f?1:0),h+1,v-1,new Hc((u?zc.empty:zc.from(o.copy(zc.empty))).append(f?zc.empty:zc.from(o.copy(zc.empty))),u?0:1,f?0:1),u?0:1)),e(r.scrollIntoView()),!0}(e,n,a)))}}function Uh(t){return function(e,n){var r=e.selection,o=r.$from,i=r.$to,a=o.blockRange(i,(function(e){return e.childCount&&e.firstChild.type==t}));if(!a)return!1;var s=a.startIndex;if(0==s)return!1;var c=a.parent,l=c.child(s-1);if(l.type!=t)return!1;if(n){var u=l.lastChild&&l.lastChild.type==c.type,f=zc.from(u?t.create():null),p=new Hc(zc.from(t.create(null,zc.from(c.type.create(null,f)))),u?3:1,0),d=a.start,h=a.end;n(e.tr.step(new uu(d-(u?3:1),h,d,h,p,1,!0)).scrollIntoView())}return!0}}var Xh=function(){};Xh.prototype.append=function(t){return t.length?(t=Xh.from(t),!this.length&&t||t.length<200&&this.leafAppend(t)||this.length<200&&t.leafPrepend(this)||this.appendInner(t)):this},Xh.prototype.prepend=function(t){return t.length?Xh.from(t).append(this):this},Xh.prototype.appendInner=function(t){return new Zh(this,t)},Xh.prototype.slice=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.length),t>=e?Xh.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,e))},Xh.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)},Xh.prototype.forEach=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=this.length),e<=n?this.forEachInner(t,e,n,0):this.forEachInvertedInner(t,e,n,0)},Xh.prototype.map=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=this.length);var r=[];return this.forEach((function(e,n){return r.push(t(e,n))}),e,n),r},Xh.from=function(t){return t instanceof Xh?t:t&&t.length?new Gh(t):Xh.empty};var Gh=function(t){function e(e){t.call(this),this.values=e}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(t,n){return 0==t&&n==this.length?this:new e(this.values.slice(t,n))},e.prototype.getInner=function(t){return this.values[t]},e.prototype.forEachInner=function(t,e,n,r){for(var o=e;o=n;o--)if(!1===t(this.values[o],r+o))return!1},e.prototype.leafAppend=function(t){if(this.length+t.length<=200)return new e(this.values.concat(t.flatten()))},e.prototype.leafPrepend=function(t){if(this.length+t.length<=200)return new e(t.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(Xh);Xh.empty=new Gh([]);var Zh=function(t){function e(e,n){t.call(this),this.left=e,this.right=n,this.length=e.length+n.length,this.depth=Math.max(e.depth,n.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(t){return to&&!1===this.right.forEachInner(t,Math.max(e-o,0),Math.min(this.length,n)-o,r+o))&&void 0)},e.prototype.forEachInvertedInner=function(t,e,n,r){var o=this.left.length;return!(e>o&&!1===this.right.forEachInvertedInner(t,e-o,Math.max(n,o)-o,r+o))&&(!(n=n?this.right.slice(t-n,e-n):this.left.slice(t,n).append(this.right.slice(0,e-n))},e.prototype.leafAppend=function(t){var n=this.right.leafAppend(t);if(n)return new e(this.left,n)},e.prototype.leafPrepend=function(t){var n=this.left.leafPrepend(t);if(n)return new e(n,this.right)},e.prototype.appendInner=function(t){return this.left.depth>=Math.max(this.right.depth,t.depth)+1?new e(this.left,new e(this.right,t)):new e(this,t)},e}(Xh),Qh=Xh,tv=function(t,e){this.items=t,this.eventCount=e};tv.prototype.popEvent=function(t,e){var n=this;if(0==this.eventCount)return null;for(var r,o,i=this.items.length;;i--){if(this.items.get(i-1).selection){--i;break}}e&&(r=this.remapping(i,this.items.length),o=r.maps.length);var a,s,c=t.tr,l=[],u=[];return this.items.forEach((function(t,e){if(!t.step)return r||(r=n.remapping(i,e+1),o=r.maps.length),o--,void u.push(t);if(r){u.push(new ev(t.map));var f,p=t.step.map(r.slice(o));p&&c.maybeStep(p).doc&&(f=c.mapping.maps[c.mapping.maps.length-1],l.push(new ev(f,null,null,l.length+u.length))),o--,f&&r.appendMap(f,o)}else c.maybeStep(t.step);return t.selection?(a=r?t.selection.map(r.slice(o)):t.selection,s=new tv(n.items.slice(0,i).append(u.reverse().concat(l)),n.eventCount-1),!1):void 0}),this.items.length,0),{remaining:s,transform:c,selection:a}},tv.prototype.addTransform=function(t,e,n,r){for(var o=[],i=this.eventCount,a=this.items,s=!r&&a.length?a.get(a.length-1):null,c=0;crv&&(d=v,(p=a).forEach((function(t,e){if(t.selection&&0==d--)return h=e,!1})),a=p.slice(h),i-=v),new tv(a.append(o),i)},tv.prototype.remapping=function(t,e){var n=new eu;return this.items.forEach((function(e,r){var o=null!=e.mirrorOffset&&r-e.mirrorOffset>=t?n.maps.length-e.mirrorOffset:null;n.appendMap(e.map,o)}),t,e),n},tv.prototype.addMaps=function(t){return 0==this.eventCount?this:new tv(this.items.append(t.map((function(t){return new ev(t)}))),this.eventCount)},tv.prototype.rebased=function(t,e){if(!this.eventCount)return this;var n=[],r=Math.max(0,this.items.length-e),o=t.mapping,i=t.steps.length,a=this.eventCount;this.items.forEach((function(t){t.selection&&a--}),r);var s=e;this.items.forEach((function(e){var r=o.getMirror(--s);if(null!=r){i=Math.min(i,r);var c=o.maps[r];if(e.step){var l=t.steps[r].invert(t.docs[r]),u=e.selection&&e.selection.map(o.slice(s+1,r));u&&a++,n.push(new ev(c,l,u))}else n.push(new ev(c))}}),r);for(var c=[],l=e;l500&&(f=f.compress(this.items.length-n.length)),f},tv.prototype.emptyItemCount=function(){var t=0;return this.items.forEach((function(e){e.step||t++})),t},tv.prototype.compress=function(t){void 0===t&&(t=this.items.length);var e=this.remapping(0,t),n=e.maps.length,r=[],o=0;return this.items.forEach((function(i,a){if(a>=t)r.push(i),i.selection&&o++;else if(i.step){var s=i.step.map(e.slice(n)),c=s&&s.getMap();if(n--,c&&e.appendMap(c,n),s){var l=i.selection&&i.selection.map(e.slice(n));l&&o++;var u,f=new ev(c.invert(),s,l),p=r.length-1;(u=r.length&&r[p].merge(f))?r[p]=u:r.push(f)}}else i.map&&n--}),this.items.length,0),new tv(Qh.from(r.reverse()),o)},tv.empty=new tv(Qh.empty,0);var ev=function(t,e,n,r){this.map=t,this.step=e,this.selection=n,this.mirrorOffset=r};ev.prototype.merge=function(t){if(this.step&&t.step&&!t.selection){var e=t.step.merge(this.step);if(e)return new ev(e.getMap().invert(),e,this.selection)}};var nv=function(t,e,n,r){this.done=t,this.undone=e,this.prevRanges=n,this.prevTime=r},rv=20;function ov(t){var e=[];return t.forEach((function(t,n,r,o){return e.push(r,o)})),e}function iv(t,e){if(!t)return null;for(var n=[],r=0;r=e[o]&&(n=!0)})),n}(n,t.prevRanges)),c=a?iv(t.prevRanges,n.mapping):ov(n.mapping.maps[n.steps.length-1]);return new nv(t.done.addTransform(n,s?e.selection.getBookmark():null,r,lv(e)),tv.empty,c,n.time)}(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput:function(t,e){var n="historyUndo"==e.inputType?dv(t.state,t.dispatch):"historyRedo"==e.inputType&&hv(t.state,t.dispatch);return n&&e.preventDefault(),n}}}})}function dv(t,e){var n=uv.getState(t);return!(!n||0==n.done.eventCount)&&(e&&av(n,t,e,!1),!0)}function hv(t,e){var n=uv.getState(t);return!(!n||0==n.undone.eventCount)&&(e&&av(n,t,e,!0),!0)}function vv(t){var e=uv.getState(t);return e?e.done.eventCount:0}function mv(t){var e=uv.getState(t);return e?e.undone.eventCount:0}var gv={},yv={},bv={},wv={};Object.defineProperty(wv,"__esModule",{value:!0}),wv.default=void 0;var xv=Sc.withParams;wv.default=xv,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.req=t.regex=t.ref=t.len=void 0,Object.defineProperty(t,"withParams",{enumerable:!0,get:function(){return n.default}});var e,n=(e=wv)&&e.__esModule?e:{default:e};function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=function(t){if(Array.isArray(t))return!!t.length;if(null==t)return!1;if(!1===t)return!0;if(t instanceof Date)return!isNaN(t.getTime());if("object"===r(t)){for(var e in t)return!0;return!1}return!!String(t).length};t.req=o;t.len=function(t){return Array.isArray(t)?t.length:"object"===r(t)?Object.keys(t).length:String(t).length};t.ref=function(t,e,n){return"function"==typeof t?t.call(e,n):n[t]};t.regex=function(t,e){return(0,n.default)({type:t},(function(t){return!o(t)||e.test(t)}))}}(bv),Object.defineProperty(yv,"__esModule",{value:!0}),yv.default=void 0;var Sv=(0,bv.regex)("alpha",/^[a-zA-Z]*$/);yv.default=Sv;var kv={};Object.defineProperty(kv,"__esModule",{value:!0}),kv.default=void 0;var _v=(0,bv.regex)("alphaNum",/^[a-zA-Z0-9]*$/);kv.default=_v;var Ov={};Object.defineProperty(Ov,"__esModule",{value:!0}),Ov.default=void 0;var Cv=(0,bv.regex)("numeric",/^[0-9]*$/);Ov.default=Cv;var Mv={};Object.defineProperty(Mv,"__esModule",{value:!0}),Mv.default=void 0;var Dv=bv;Mv.default=function(t,e){return(0,Dv.withParams)({type:"between",min:t,max:e},(function(n){return!(0,Dv.req)(n)||(!/\s/.test(n)||n instanceof Date)&&+t<=+n&&+e>=+n}))};var Tv={};Object.defineProperty(Tv,"__esModule",{value:!0}),Tv.default=void 0;var $v=(0,bv.regex)("email",/^(?:[A-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[A-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9]{2,}(?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i);Tv.default=$v;var Av={};Object.defineProperty(Av,"__esModule",{value:!0}),Av.default=void 0;var Ev=bv,Nv=(0,Ev.withParams)({type:"ipAddress"},(function(t){if(!(0,Ev.req)(t))return!0;if("string"!=typeof t)return!1;var e=t.split(".");return 4===e.length&&e.every(Pv)}));Av.default=Nv;var Pv=function(t){if(t.length>3||0===t.length)return!1;if("0"===t[0]&&"0"!==t)return!1;if(!t.match(/^\d+$/))return!1;var e=0|+t;return e>=0&&e<=255},Iv={};Object.defineProperty(Iv,"__esModule",{value:!0}),Iv.default=void 0;var jv=bv;Iv.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:":";return(0,jv.withParams)({type:"macAddress"},(function(e){if(!(0,jv.req)(e))return!0;if("string"!=typeof e)return!1;var n="string"==typeof t&&""!==t?e.split(t):12===e.length||16===e.length?e.match(/.{2}/g):null;return null!==n&&(6===n.length||8===n.length)&&n.every(Rv)}))};var Rv=function(t){return t.toLowerCase().match(/^[0-9a-f]{2}$/)},zv={};Object.defineProperty(zv,"__esModule",{value:!0}),zv.default=void 0;var Fv=bv;zv.default=function(t){return(0,Fv.withParams)({type:"maxLength",max:t},(function(e){return!(0,Fv.req)(e)||(0,Fv.len)(e)<=t}))};var Lv={};Object.defineProperty(Lv,"__esModule",{value:!0}),Lv.default=void 0;var Bv=bv;Lv.default=function(t){return(0,Bv.withParams)({type:"minLength",min:t},(function(e){return!(0,Bv.req)(e)||(0,Bv.len)(e)>=t}))};var Vv={};Object.defineProperty(Vv,"__esModule",{value:!0}),Vv.default=void 0;var Wv=bv,qv=(0,Wv.withParams)({type:"required"},(function(t){return(0,Wv.req)("string"==typeof t?t.trim():t)}));Vv.default=qv;var Hv={};Object.defineProperty(Hv,"__esModule",{value:!0}),Hv.default=void 0;var Jv=bv;Hv.default=function(t){return(0,Jv.withParams)({type:"requiredIf",prop:t},(function(e,n){return!(0,Jv.ref)(t,this,n)||(0,Jv.req)(e)}))};var Kv={};Object.defineProperty(Kv,"__esModule",{value:!0}),Kv.default=void 0;var Yv=bv;Kv.default=function(t){return(0,Yv.withParams)({type:"requiredUnless",prop:t},(function(e,n){return!!(0,Yv.ref)(t,this,n)||(0,Yv.req)(e)}))};var Uv={};Object.defineProperty(Uv,"__esModule",{value:!0}),Uv.default=void 0;var Xv=bv;Uv.default=function(t){return(0,Xv.withParams)({type:"sameAs",eq:t},(function(e,n){return e===(0,Xv.ref)(t,this,n)}))};var Gv={};Object.defineProperty(Gv,"__esModule",{value:!0}),Gv.default=void 0;var Zv=(0,bv.regex)("url",/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i);Gv.default=Zv;var Qv={};Object.defineProperty(Qv,"__esModule",{value:!0}),Qv.default=void 0;var tm=bv;Qv.default=function(){for(var t=arguments.length,e=new Array(t),n=0;n0&&e.reduce((function(e,n){return e||n.apply(t,r)}),!1)}))};var em={};Object.defineProperty(em,"__esModule",{value:!0}),em.default=void 0;var nm=bv;em.default=function(){for(var t=arguments.length,e=new Array(t),n=0;n0&&e.reduce((function(e,n){return e&&n.apply(t,r)}),!0)}))};var rm={};Object.defineProperty(rm,"__esModule",{value:!0}),rm.default=void 0;var om=bv;rm.default=function(t){return(0,om.withParams)({type:"not"},(function(e,n){return!(0,om.req)(e)||!t.call(this,e,n)}))};var im={};Object.defineProperty(im,"__esModule",{value:!0}),im.default=void 0;var am=bv;im.default=function(t){return(0,am.withParams)({type:"minValue",min:t},(function(e){return!(0,am.req)(e)||(!/\s/.test(e)||e instanceof Date)&&+e>=+t}))};var sm={};Object.defineProperty(sm,"__esModule",{value:!0}),sm.default=void 0;var cm=bv;sm.default=function(t){return(0,cm.withParams)({type:"maxValue",max:t},(function(e){return!(0,cm.req)(e)||(!/\s/.test(e)||e instanceof Date)&&+e<=+t}))};var lm={};Object.defineProperty(lm,"__esModule",{value:!0}),lm.default=void 0;var um=(0,bv.regex)("integer",/(^[0-9]*$)|(^-[0-9]+$)/);lm.default=um;var fm={};Object.defineProperty(fm,"__esModule",{value:!0}),fm.default=void 0;var pm=(0,bv.regex)("decimal",/^[-]?\d*(\.\d+)?$/); +function(e){if(Number(e.version.split(".")[0])>=2)e.mixin({beforeCreate:n});else{var t=e.prototype._init;e.prototype._init=function(e){void 0===e&&(e={}),e.init=e.init?[n].concat(e.init):n,t.call(this,e)}}function n(){var e=this.$options;e.store?this.$store="function"==typeof e.store?e.store():e.store:e.parent&&e.parent.$store&&(this.$store=e.parent.$store)}}(wa=e)}Ca.state.get=function(){return this._vm._data.$$state},Ca.state.set=function(e){},ka.prototype.commit=function(e,t,n){var r=this,i=$a(e,t,n),o=i.type,s=i.payload,a={type:o,payload:s},l=this._mutations[o];l&&(this._withCommit((function(){l.forEach((function(e){e(s)}))})),this._subscribers.slice().forEach((function(e){return e(a,r.state)})))},ka.prototype.dispatch=function(e,t){var n=this,r=$a(e,t),i=r.type,o=r.payload,s={type:i,payload:o},a=this._actions[i];if(a){try{this._actionSubscribers.slice().filter((function(e){return e.before})).forEach((function(e){return e.before(s,n.state)}))}catch(wy){}var l=a.length>1?Promise.all(a.map((function(e){return e(o)}))):a[0](o);return new Promise((function(e,t){l.then((function(t){try{n._actionSubscribers.filter((function(e){return e.after})).forEach((function(e){return e.after(s,n.state)}))}catch(wy){}e(t)}),(function(e){try{n._actionSubscribers.filter((function(e){return e.error})).forEach((function(t){return t.error(s,n.state,e)}))}catch(wy){}t(e)}))}))}},ka.prototype.subscribe=function(e,t){return Oa(e,this._subscribers,t)},ka.prototype.subscribeAction=function(e,t){return Oa("function"==typeof e?{before:e}:e,this._actionSubscribers,t)},ka.prototype.watch=function(e,t,n){var r=this;return this._watcherVM.$watch((function(){return e(r.state,r.getters)}),t,n)},ka.prototype.replaceState=function(e){var t=this;this._withCommit((function(){t._vm._data.$$state=e}))},ka.prototype.registerModule=function(e,t,n){void 0===n&&(n={}),"string"==typeof e&&(e=[e]),this._modules.register(e,t),Da(this,this.state,e,this._modules.get(e),n.preserveState),_a(this,this.state)},ka.prototype.unregisterModule=function(e){var t=this;"string"==typeof e&&(e=[e]),this._modules.unregister(e),this._withCommit((function(){var n=Ta(t.state,e.slice(0,-1));wa.delete(n,e[e.length-1])})),Ma(this)},ka.prototype.hasModule=function(e){return"string"==typeof e&&(e=[e]),this._modules.isRegistered(e)},ka.prototype.hotUpdate=function(e){this._modules.update(e),Ma(this,!0)},ka.prototype._withCommit=function(e){var t=this._committing;this._committing=!0,e(),this._committing=t},Object.defineProperties(ka.prototype,Ca);var Ea=za((function(e,t){var n={};return Ra(t).forEach((function(t){var r=t.key,i=t.val;n[r]=function(){var t=this.$store.state,n=this.$store.getters;if(e){var r=ja(this.$store,"mapState",e);if(!r)return;t=r.context.state,n=r.context.getters}return"function"==typeof i?i.call(this,t,n):t[i]},n[r].vuex=!0})),n})),Na=za((function(e,t){var n={};return Ra(t).forEach((function(t){var r=t.key,i=t.val;n[r]=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];var r=this.$store.commit;if(e){var o=ja(this.$store,"mapMutations",e);if(!o)return;r=o.context.commit}return"function"==typeof i?i.apply(this,[r].concat(t)):r.apply(this.$store,[i].concat(t))}})),n})),Pa=za((function(e,t){var n={};return Ra(t).forEach((function(t){var r=t.key,i=t.val;i=e+i,n[r]=function(){if(!e||ja(this.$store,"mapGetters",e))return this.$store.getters[i]},n[r].vuex=!0})),n})),Ia=za((function(e,t){var n={};return Ra(t).forEach((function(t){var r=t.key,i=t.val;n[r]=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];var r=this.$store.dispatch;if(e){var o=ja(this.$store,"mapActions",e);if(!o)return;r=o.context.dispatch}return"function"==typeof i?i.apply(this,[r].concat(t)):r.apply(this.$store,[i].concat(t))}})),n}));function Ra(e){return function(e){return Array.isArray(e)||va(e)}(e)?Array.isArray(e)?e.map((function(e){return{key:e,val:e}})):Object.keys(e).map((function(t){return{key:t,val:e[t]}})):[]}function za(e){return function(t,n){return"string"!=typeof t?(n=t,t=""):"/"!==t.charAt(t.length-1)&&(t+="/"),e(t,n)}}function ja(e,t,n){return e._modulesNamespaceMap[n]}function Fa(e,t,n){var r=n?e.groupCollapsed:e.group;try{r.call(e,t)}catch(wy){e.log(t)}}function La(e){try{e.groupEnd()}catch(wy){e.log("—— log end ——")}}function Ba(){var e=new Date;return" @ "+Va(e.getHours(),2)+":"+Va(e.getMinutes(),2)+":"+Va(e.getSeconds(),2)+"."+Va(e.getMilliseconds(),3)}function Va(e,t){return n="0",r=t-e.toString().length,new Array(r+1).join(n)+e;var n,r}var Wa={Store:ka,install:Aa,version:"3.6.2",mapState:Ea,mapMutations:Na,mapGetters:Pa,mapActions:Ia,createNamespacedHelpers:function(e){return{mapState:Ea.bind(null,e),mapGetters:Pa.bind(null,e),mapMutations:Na.bind(null,e),mapActions:Ia.bind(null,e)}},createLogger:function(e){void 0===e&&(e={});var t=e.collapsed;void 0===t&&(t=!0);var n=e.filter;void 0===n&&(n=function(e,t,n){return!0});var r=e.transformer;void 0===r&&(r=function(e){return e});var i=e.mutationTransformer;void 0===i&&(i=function(e){return e});var o=e.actionFilter;void 0===o&&(o=function(e,t){return!0});var s=e.actionTransformer;void 0===s&&(s=function(e){return e});var a=e.logMutations;void 0===a&&(a=!0);var l=e.logActions;void 0===l&&(l=!0);var c=e.logger;return void 0===c&&(c=console),function(e){var u=ma(e.state);void 0!==c&&(a&&e.subscribe((function(e,o){var s=ma(o);if(n(e,u,s)){var a=Ba(),l=i(e),d="mutation "+e.type+a;Fa(c,d,t),c.log("%c prev state","color: #9E9E9E; font-weight: bold",r(u)),c.log("%c mutation","color: #03A9F4; font-weight: bold",l),c.log("%c next state","color: #4CAF50; font-weight: bold",r(s)),La(c)}u=s})),l&&e.subscribeAction((function(e,n){if(o(e,n)){var r=Ba(),i=s(e),a="action "+e.type+r;Fa(c,a,t),c.log("%c action","color: #03A9F4; font-weight: bold",i),La(c)}})))}}};function qa(e){return{all:e=e||new Map,on:function(t,n){var r=e.get(t);r?r.push(n):e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&(n?r.splice(r.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var r=e.get(t);r&&r.slice().map((function(e){e(n)})),(r=e.get("*"))&&r.slice().map((function(e){e(t,n)}))}}}var Ha,Ja,Ka="function"==typeof Map?new Map:(Ha=[],Ja=[],{has:function(e){return Ha.indexOf(e)>-1},get:function(e){return Ja[Ha.indexOf(e)]},set:function(e,t){-1===Ha.indexOf(e)&&(Ha.push(e),Ja.push(t))},delete:function(e){var t=Ha.indexOf(e);t>-1&&(Ha.splice(t,1),Ja.splice(t,1))}}),Ya=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(wy){Ya=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function Ua(e){var t=Ka.get(e);t&&t.destroy()}function Xa(e){var t=Ka.get(e);t&&t.update()}var Ga=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((Ga=function(e){return e}).destroy=function(e){return e},Ga.update=function(e){return e}):((Ga=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return function(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!Ka.has(e)){var t,n=null,r=null,i=null,o=function(){e.clientWidth!==r&&c()},s=function(t){window.removeEventListener("resize",o,!1),e.removeEventListener("input",c,!1),e.removeEventListener("keyup",c,!1),e.removeEventListener("autosize:destroy",s,!1),e.removeEventListener("autosize:update",c,!1),Object.keys(t).forEach((function(n){e.style[n]=t[n]})),Ka.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",s,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",c,!1),window.addEventListener("resize",o,!1),e.addEventListener("input",c,!1),e.addEventListener("autosize:update",c,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",Ka.set(e,{destroy:s,update:c}),"vertical"===(t=window.getComputedStyle(e,null)).resize?e.style.resize="none":"both"===t.resize&&(e.style.resize="horizontal"),n="content-box"===t.boxSizing?-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),isNaN(n)&&(n=0),c()}function a(t){var n=e.style.width;e.style.width="0px",e.style.width=n,e.style.overflowY=t}function l(){if(0!==e.scrollHeight){var t=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}(e),i=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+n+"px",r=e.clientWidth,t.forEach((function(e){e.node.scrollTop=e.scrollTop})),i&&(document.documentElement.scrollTop=i)}}function c(){l();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),r="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(r=t?e:""+Array(t+1-r.length).join(n)+e},y={s:v,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?"+":"-")+v(r,2,"0")+":"+v(i,2,"0")},m:function e(t,n){if(t.date()1)return e(s[0])}else{var a=t.name;w[a]=t,i=a}return!r&&i&&(b=i),i||!r&&b},k=function(e,t){if(x(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new O(n)},C=y;C.l=S,C.i=x,C.w=function(e,t){return k(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var O=function(){function g(e){this.$L=S(e.locale,null,!0),this.parse(e)}var v=g.prototype;return v.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(C.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(p);if(r){var i=r[2]-1||0,o=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},v.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},v.$utils=function(){return C},v.isValid=function(){return!(this.$d.toString()===f)},v.isSame=function(e,t){var n=k(e);return this.startOf(t)<=n&&n<=this.endOf(t)},v.isAfter=function(e,t){return k(e)68?1900:2e3)},a=function(e){return function(t){this[e]=+t}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:"+"===t[0]?-n:n}(e)}],c=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},u=function(e,t){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?"pm":"PM");return n},d={A:[i,function(e){this.afternoon=u(e,!1)}],a:[i,function(e){this.afternoon=u(e,!0)}],S:[/\d/,function(e){this.milliseconds=100*+e}],SS:[n,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[r,a("seconds")],ss:[r,a("seconds")],m:[r,a("minutes")],mm:[r,a("minutes")],H:[r,a("hours")],h:[r,a("hours")],HH:[r,a("hours")],hh:[r,a("hours")],D:[r,a("day")],DD:[n,a("day")],Do:[i,function(e){var t=o.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,"")===e&&(this.day=r)}],M:[r,a("month")],MM:[n,a("month")],MMM:[i,function(e){var t=c("months"),n=(c("monthsShort")||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[i,function(e){var t=c("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,a("year")],YY:[n,function(e){this.year=s(e)}],YYYY:[/\d{4}/,a("year")],Z:l,ZZ:l};function h(n){var r,i;r=n,i=o&&o.formats;for(var s=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var o=r&&r.toUpperCase();return n||i[r]||e[r]||i[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),a=s.length,l=0;l-1)return new Date(("X"===t?1e3:1)*e);var r=h(t)(e),i=r.year,o=r.month,s=r.day,a=r.hours,l=r.minutes,c=r.seconds,u=r.milliseconds,d=r.zone,f=new Date,p=s||(i||o?1:f.getDate()),m=i||f.getFullYear(),g=0;i&&!o||(g=o>0?o-1:f.getMonth());var v=a||0,y=l||0,b=c||0,w=u||0;return d?new Date(Date.UTC(m,g,p,v,y,b,w+60*d.offset*1e3)):n?new Date(Date.UTC(m,g,p,v,y,b,w)):new Date(m,g,p,v,y,b,w)}catch(x){return new Date("")}}(t,a,r),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(a)&&(this.$d=new Date("")),o={}}else if(a instanceof Array)for(var f=a.length,p=1;p<=f;p+=1){s[1]=a[p-1];var m=n.apply(this,s);if(m.isValid()){this.$d=m.$d,this.$L=m.$L,this.init();break}p===f&&(this.$d=new Date(""))}else i.call(this,e)}}}();function il(e){return(il="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var ol={selector:"vue-portal-target-".concat(((e=21)=>{let t="",n=e;for(;n--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t})())},sl=function(e){return ol.selector=e},al="undefined"!=typeof window&&void 0!==("undefined"==typeof document?"undefined":il(document)),ll=Mn.extend({abstract:!0,name:"PortalOutlet",props:["nodes","tag"],data:function(e){return{updatedNodes:e.nodes}},render:function(e){var t=this.updatedNodes&&this.updatedNodes();return t?1!==t.length||t[0].text?e(this.tag||"DIV",t):t:e()},destroyed:function(){var e=this.$el;e&&e.parentNode.removeChild(e)}}),cl=Mn.extend({name:"VueSimplePortal",props:{disabled:{type:Boolean},prepend:{type:Boolean},selector:{type:String,default:function(){return"#".concat(ol.selector)}},tag:{type:String,default:"DIV"}},render:function(e){if(this.disabled){var t=this.$scopedSlots&&this.$scopedSlots.default();return t?t.length<2&&!t[0].text?t:e(this.tag,t):e()}return e()},created:function(){this.getTargetEl()||this.insertTargetEl()},updated:function(){var e=this;this.$nextTick((function(){e.disabled||e.slotFn===e.$scopedSlots.default||(e.container.updatedNodes=e.$scopedSlots.default),e.slotFn=e.$scopedSlots.default}))},beforeDestroy:function(){this.unmount()},watch:{disabled:{immediate:!0,handler:function(e){e?this.unmount():this.$nextTick(this.mount)}}},methods:{getTargetEl:function(){if(al)return document.querySelector(this.selector)},insertTargetEl:function(){if(al){var e=document.querySelector("body"),t=document.createElement(this.tag);t.id=this.selector.substring(1),e.appendChild(t)}},mount:function(){if(al){var e=this.getTargetEl(),t=document.createElement("DIV");this.prepend&&e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t),this.container=new ll({el:t,parent:this,propsData:{tag:this.tag,nodes:this.$scopedSlots.default}})}},unmount:function(){this.container&&(this.container.$destroy(),delete this.container)}}});function ul(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.component(t.name||"portal",cl),t.defaultSelector&&sl(t.defaultSelector)}"undefined"!=typeof window&&window.Vue&&window.Vue===Mn&&Mn.use(ul);var dl={},hl={};function fl(e){return null==e}function pl(e){return null!=e}function ml(e,t){return t.tag===e.tag&&t.key===e.key}function gl(e){var t=e.tag;e.vm=new t({data:e.args})}function vl(e,t,n){var r,i,o={};for(r=t;r<=n;++r)pl(i=e[r].key)&&(o[i]=r);return o}function yl(e,t,n){for(;t<=n;++t)gl(e[t])}function bl(e,t,n){for(;t<=n;++t){var r=e[t];pl(r)&&(r.vm.$destroy(),r.vm=null)}}function wl(e,t){e!==t&&(t.vm=e.vm,function(e){for(var t=Object.keys(e.args),n=0;na?yl(t,s,u):s>u&&bl(e,o,a)}(e,t):pl(t)?yl(t,0,t.length-1):pl(e)&&bl(e,0,e.length-1)};var xl={};function Sl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function kl(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?a:a.$sub[0]:null}}},computed:{run:function(){var e=this,t=this.lazyParentModel();if(Array.isArray(t)&&t.__ob__){var n=t.__ob__.dep;n.depend();var r=n.constructor.target;if(!this._indirectWatcher){var i=r.constructor;this._indirectWatcher=new i(this,(function(){return e.runRule(t)}),null,{lazy:!0})}var o=this.getModel();if(!this._indirectWatcher.dirty&&this._lastModel===o)return this._indirectWatcher.depend(),r.value;this._lastModel=o,this._indirectWatcher.evaluate(),this._indirectWatcher.depend()}else this._indirectWatcher&&(this._indirectWatcher.teardown(),this._indirectWatcher=null);return this._indirectWatcher?this._indirectWatcher.value:this.runRule(t)},$params:function(){return this.run.params},proxy:function(){var e=this.run.output;return e.__isVuelidateAsyncVm?!!e.v:!!e},$pending:function(){var e=this.run.output;return!!e.__isVuelidateAsyncVm&&e.p}},destroyed:function(){this._indirectWatcher&&(this._indirectWatcher.teardown(),this._indirectWatcher=null)}}),a=i.extend({data:function(){return{dirty:!1,validations:null,lazyModel:null,model:null,prop:null,lazyParentModel:null,rootModel:null}},methods:s(s({},g),{},{refProxy:function(e){return this.getRef(e).proxy},getRef:function(e){return this.refs[e]},isNested:function(e){return"function"!=typeof this.validations[e]}}),computed:s(s({},p),{},{nestedKeys:function(){return this.keys.filter(this.isNested)},ruleKeys:function(){var e=this;return this.keys.filter((function(t){return!e.isNested(t)}))},keys:function(){return Object.keys(this.validations).filter((function(e){return"$params"!==e}))},proxy:function(){var e=this,t=u(this.keys,(function(t){return{enumerable:!0,configurable:!0,get:function(){return e.refProxy(t)}}})),n=u(v,(function(t){return{enumerable:!0,configurable:!0,get:function(){return e[t]}}})),r=u(y,(function(t){return{enumerable:!1,configurable:!0,get:function(){return e[t]}}})),i=this.hasIter()?{$iter:{enumerable:!0,value:Object.defineProperties({},s({},t))}}:{};return Object.defineProperties({},s(s(s(s({},t),i),{},{$model:{enumerable:!0,get:function(){var t=e.lazyParentModel();return null!=t?t[e.prop]:null},set:function(t){var n=e.lazyParentModel();null!=n&&(n[e.prop]=t,e.$touch())}}},n),r))},children:function(){var e=this;return[].concat(r(this.nestedKeys.map((function(t){return w(e,t)}))),r(this.ruleKeys.map((function(t){return x(e,t)})))).filter(Boolean)}})}),l=a.extend({methods:{isNested:function(e){return void 0!==this.validations[e]()},getRef:function(e){var t=this;return{get proxy(){return t.validations[e]()||!1}}}}}),m=a.extend({computed:{keys:function(){var e=this.getModel();return h(e)?Object.keys(e):[]},tracker:function(){var e=this,t=this.validations.$trackBy;return t?function(n){return"".concat(f(e.rootModel,e.getModelKey(n),t))}:function(e){return"".concat(e)}},getModelLazy:function(){var e=this;return function(){return e.getModel()}},children:function(){var e=this,n=this.validations,r=this.getModel(),i=s({},n);delete i.$trackBy;var o={};return this.keys.map((function(n){var s=e.tracker(n);return o.hasOwnProperty(s)?null:(o[s]=!0,(0,t.h)(a,s,{validations:i,prop:n,lazyParentModel:e.getModelLazy,model:r[n],rootModel:e.rootModel}))})).filter(Boolean)}},methods:{isNested:function(){return!0},getRef:function(e){return this.refs[this.tracker(e)]},hasIter:function(){return!0}}}),w=function(e,n){if("$each"===n)return(0,t.h)(m,n,{validations:e.validations[n],lazyParentModel:e.lazyParentModel,prop:n,lazyModel:e.getModel,rootModel:e.rootModel});var r=e.validations[n];if(Array.isArray(r)){var i=e.rootModel,o=u(r,(function(e){return function(){return f(i,i.$v,e)}}),(function(e){return Array.isArray(e)?e.join("."):e}));return(0,t.h)(l,n,{validations:o,lazyParentModel:c,prop:n,lazyModel:c,rootModel:i})}return(0,t.h)(a,n,{validations:r,lazyParentModel:e.getModel,prop:n,lazyModel:e.getModelKey,rootModel:e.rootModel})},x=function(e,n){return(0,t.h)(o,n,{rule:e.validations[n],lazyParentModel:e.lazyParentModel,lazyModel:e.getModel,rootModel:e.rootModel})};return b={VBase:i,Validation:a}},x=null;var S=function(e,n){var r=function(e){if(x)return x;for(var t=e.constructor;t.super;)t=t.super;return x=t,t}(e),i=w(r),o=i.Validation;return new(0,i.VBase)({computed:{children:function(){var r="function"==typeof n?n.call(e):n;return[(0,t.h)(o,"$v",{validations:r,lazyParentModel:c,prop:"$v",model:e,rootModel:e})]}}})},k={data:function(){var e=this.$options.validations;return e&&(this._vuelidate=S(this,e)),{}},beforeCreate:function(){var e=this.$options;e.validations&&(e.computed||(e.computed={}),e.computed.$v||(e.computed.$v=function(){return this._vuelidate?this._vuelidate.refs.$v.proxy:null}))},beforeDestroy:function(){this._vuelidate&&(this._vuelidate.$destroy(),this._vuelidate=null)}};function C(e){e.mixin(k)}e.validationMixin=k;var O=C;e.default=O}(dl);var El=Qa(dl);function Nl(e){this.content=e}function Pl(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),o=t.child(r);if(i!=o){if(!i.sameMarkup(o))return n;if(i.isText&&i.text!=o.text){for(let e=0;i.text[e]==o.text[e];e++)n++;return n}if(i.content.size||o.content.size){let e=Pl(i.content,o.content,n+1);if(null!=e)return e}n+=i.nodeSize}else n+=i.nodeSize}}function Il(e,t,n,r){for(let i=e.childCount,o=t.childCount;;){if(0==i||0==o)return i==o?null:{a:n,b:r};let s=e.child(--i),a=t.child(--o),l=s.nodeSize;if(s!=a){if(!s.sameMarkup(a))return{a:n,b:r};if(s.isText&&s.text!=a.text){let e=0,t=Math.min(s.text.length,a.text.length);for(;e>1}},Nl.from=function(e){if(e instanceof Nl)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new Nl(t)};class Rl{constructor(e,t){if(this.content=e,this.size=t||0,null==t)for(let n=0;ne&&!1!==n(a,r+s,i||null,o)&&a.content.size){let i=s+1;a.nodesBetween(Math.max(0,e-i),Math.min(a.content.size,t-i),n,r+i)}s=l}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let i="",o=!0;return this.nodesBetween(e,t,((s,a)=>{s.isText?(i+=s.text.slice(Math.max(e,a)-a,t-a),o=!n):s.isLeaf&&r?(i+="function"==typeof r?r(s):r,o=!n):!o&&s.isBlock&&(i+=n,o=!0)}),0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,n=e.firstChild,r=this.content.slice(),i=0;for(t.isText&&t.sameMarkup(n)&&(r[r.length-1]=t.withText(t.text+n.text),i=1);ie)for(let i=0,o=0;oe&&((ot)&&(s=s.isText?s.cut(Math.max(0,e-o),Math.min(s.text.length,t-o)):s.cut(Math.max(0,e-o-1),Math.min(s.content.size,t-o-1))),n.push(s),r+=s.nodeSize),o=a}return new Rl(n,r)}cutByIndex(e,t){return e==t?Rl.empty:0==e&&t==this.content.length?this:new Rl(this.content.slice(e,t))}replaceChild(e,t){let n=this.content[e];if(n==t)return this;let r=this.content.slice(),i=this.size+t.nodeSize-n.nodeSize;return r[e]=t,new Rl(r,i)}addToStart(e){return new Rl([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new Rl(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;tthis.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=r+this.child(n).nodeSize;if(i>=e)return i==e||t>0?jl(n+1,i):jl(n,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map((e=>e.toJSON())):null}static fromJSON(e,t){if(!t)return Rl.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new Rl(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return Rl.empty;let t,n=0;for(let r=0;rthis.type.rank&&(t||(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(i)}}return t||(t=e.slice()),n||t.push(this),t}removeFromSet(e){for(let t=0;te.type.rank-t.type.rank)),t}}Ll.none=[];class Bl extends Error{}class Vl{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let n=ql(this.content,e+this.openStart,t);return n&&new Vl(n,this.openStart,this.openEnd)}removeBetween(e,t){return new Vl(Wl(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return Vl.empty;let n=t.openStart||0,r=t.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new Vl(Rl.fromJSON(e,t.content),n,r)}static maxOpen(e,t=!0){let n=0,r=0;for(let i=e.firstChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.firstChild)n++;for(let i=e.lastChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.lastChild)r++;return new Vl(e,n,r)}}function Wl(e,t,n){let{index:r,offset:i}=e.findIndex(t),o=e.maybeChild(r),{index:s,offset:a}=e.findIndex(n);if(i==t||o.isText){if(a!=n&&!e.child(s).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return e.replaceChild(r,o.copy(Wl(o.content,t-i-1,n-i-1)))}function ql(e,t,n,r){let{index:i,offset:o}=e.findIndex(t),s=e.maybeChild(i);if(o==t||s.isText)return r&&!r.canReplace(i,i,n)?null:e.cut(0,t).append(n).append(e.cut(t));let a=ql(s.content,t-o-1,n);return a&&e.replaceChild(i,s.copy(a))}function Hl(e,t,n){if(n.openStart>e.depth)throw new Bl("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new Bl("Inconsistent open depths");return Jl(e,t,n,0)}function Jl(e,t,n,r){let i=e.index(r),o=e.node(r);if(i==t.index(r)&&r=0;i--)r=t.node(i).copy(Rl.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}(n,e);return Gl(o,Zl(e,i,s,t,r))}{let r=e.parent,i=r.content;return Gl(r,i.cut(0,e.parentOffset).append(n.content).append(i.cut(t.parentOffset)))}}return Gl(o,Ql(e,t,r))}function Kl(e,t){if(!t.type.compatibleContent(e.type))throw new Bl("Cannot join "+t.type.name+" onto "+e.type.name)}function Yl(e,t,n){let r=e.node(n);return Kl(r,t.node(n)),r}function Ul(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function Xl(e,t,n,r){let i=(t||e).node(n),o=0,s=t?t.index(n):i.childCount;e&&(o=e.index(n),e.depth>n?o++:e.textOffset&&(Ul(e.nodeAfter,r),o++));for(let a=o;ai&&Yl(e,t,i+1),s=r.depth>i&&Yl(n,r,i+1),a=[];return Xl(null,e,i,a),o&&s&&t.index(i)==n.index(i)?(Kl(o,s),Ul(Gl(o,Zl(e,t,n,r,i+1)),a)):(o&&Ul(Gl(o,Ql(e,t,i+1)),a),Xl(t,n,i,a),s&&Ul(Gl(s,Ql(n,r,i+1)),a)),Xl(r,null,i,a),new Rl(a)}function Ql(e,t,n){let r=[];if(Xl(null,e,n,r),e.depth>n){Ul(Gl(Yl(e,t,n+1),Ql(e,t,n+1)),r)}return Xl(t,null,n,r),new Rl(r)}Vl.empty=new Vl(Rl.empty,0,0);class ec{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return null==e?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[3*this.resolveDepth(e)]}index(e){return this.path[3*this.resolveDepth(e)+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)}start(e){return 0==(e=this.resolveDepth(e))?0:this.path[3*e-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]}after(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):0==e?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[3*t],r=0==t?0:this.path[3*t-1]+1;for(let i=0;i0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new ic(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let n=[],r=0,i=t;for(let o=e;;){let{index:e,offset:t}=o.content.findIndex(i),s=i-t;if(n.push(o,e,r+t),!s)break;if(o=o.child(e),o.isText)break;i=s-1,r+=t+1}return new ec(t,n,i)}static resolveCached(e,t){for(let r=0;re&&this.nodesBetween(e,t,(e=>(n.isInSet(e.marks)&&(r=!0),!r))),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),lc(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,n=Rl.empty,r=0,i=n.childCount){let o=this.contentMatchAt(e).matchFragment(n,r,i),s=o&&o.matchFragment(this.content,t);if(!s||!s.validEnd)return!1;for(let a=r;ae.type.name))}`);this.content.forEach((e=>e.check()))}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map((e=>e.toJSON()))),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let n=null;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if("text"==t.type){if("string"!=typeof t.text)throw new RangeError("Invalid text node in JSON");return e.text(t.text,n)}let r=Rl.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,r,n)}}sc.prototype.text=void 0;class ac extends sc{constructor(e,t,n,r){if(super(e,t,null,r),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):lc(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new ac(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new ac(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return 0==e&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function lc(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class cc{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let n=new uc(e,t);if(null==n.next)return cc.empty;let r=dc(n);n.next&&n.err("Unexpected trailing text");let i=function(e){let t=Object.create(null);return n(vc(e,0));function n(r){let i=[];r.forEach((t=>{e[t].forEach((({term:t,to:n})=>{if(!t)return;let r;for(let e=0;e{r||i.push([t,r=[]]),-1==r.indexOf(e)&&r.push(e)}))}))}));let o=t[r.join(",")]=new cc(r.indexOf(e.length-1)>-1);for(let e=0;ee.to=t))}function o(e,t){if("choice"==e.type)return e.exprs.reduce(((e,n)=>e.concat(o(n,t))),[]);if("seq"!=e.type){if("star"==e.type){let s=n();return r(t,s),i(o(e.expr,s),s),[r(s)]}if("plus"==e.type){let s=n();return i(o(e.expr,t),s),i(o(e.expr,s),s),[r(s)]}if("opt"==e.type)return[r(t)].concat(o(e.expr,t));if("range"==e.type){let s=t;for(let t=0;te.createAndFill())));for(let e=0;e=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];return function t(n){e.push(n);for(let r=0;r{let r=n+(t.validEnd?"*":" ")+" ";for(let i=0;i"+e.indexOf(t.next[i].next);return r})).join("\n")}}cc.empty=new cc(!0);class uc{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function dc(e){let t=[];do{t.push(hc(e))}while(e.eat("|"));return 1==t.length?t[0]:{type:"choice",exprs:t}}function hc(e){let t=[];do{t.push(fc(e))}while(e.next&&")"!=e.next&&"|"!=e.next);return 1==t.length?t[0]:{type:"seq",exprs:t}}function fc(e){let t=function(e){if(e.eat("(")){let t=dc(e);return e.eat(")")||e.err("Missing closing paren"),t}if(!/\W/.test(e.next)){let t=function(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let o in n){let e=n[o];e.groups.indexOf(t)>-1&&i.push(e)}0==i.length&&e.err("No node type or group '"+t+"' found");return i}(e,e.next).map((t=>(null==e.inline?e.inline=t.isInline:e.inline!=t.isInline&&e.err("Mixing inline and block content"),{type:"name",value:t})));return e.pos++,1==t.length?t[0]:{type:"choice",exprs:t}}e.err("Unexpected token '"+e.next+"'")}(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else{if(!e.eat("{"))break;t=mc(e,t)}return t}function pc(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function mc(e,t){let n=pc(e),r=n;return e.eat(",")&&(r="}"!=e.next?pc(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function gc(e,t){return t-e}function vc(e,t){let n=[];return function t(r){let i=e[r];if(1==i.length&&!i[0].term)return t(i[0].to);n.push(r);for(let e=0;e-1}allowsMarks(e){if(null==this.markSet)return!0;for(let t=0;tn[e]=new xc(e,t,r)));let r=t.spec.topNode||"doc";if(!n[r])throw new RangeError("Schema is missing its top node type ('"+r+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(let i in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n}}class Sc{constructor(e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default}get isRequired(){return!this.hasDefault}}class kc{constructor(e,t,n,r){this.name=e,this.rank=t,this.schema=n,this.spec=r,this.attrs=wc(r.attrs),this.excluded=null;let i=yc(this.attrs);this.instance=i?new Ll(this,i):null}create(e=null){return!e&&this.instance?this.instance:new Ll(this,bc(this.attrs,e))}static compile(e,t){let n=Object.create(null),r=0;return e.forEach(((e,i)=>n[e]=new kc(e,r++,t,i))),n}removeFromSet(e){for(var t=0;t-1}}class Cc{constructor(e){this.cached=Object.create(null),this.spec={nodes:Nl.from(e.nodes),marks:Nl.from(e.marks||{}),topNode:e.topNode},this.nodes=xc.compile(this.spec.nodes,this),this.marks=kc.compile(this.spec.marks,this);let t=Object.create(null);for(let n in this.nodes){if(n in this.marks)throw new RangeError(n+" can not be both a node and a mark");let e=this.nodes[n],r=e.spec.content||"",i=e.spec.marks;e.contentMatch=t[r]||(t[r]=cc.parse(r,this.nodes)),e.inlineContent=e.contentMatch.inlineContent,e.markSet="_"==i?null:i?Oc(this,i.split(" ")):""!=i&&e.inlineContent?null:[]}for(let n in this.marks){let e=this.marks[n],t=e.spec.excludes;e.excluded=null==t?[e]:""==t?[]:Oc(this,t.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,n,r){if("string"==typeof e)e=this.nodeType(e);else{if(!(e instanceof xc))throw new RangeError("Invalid node type: "+e);if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}return e.createChecked(t,n,r)}text(e,t){let n=this.nodes.text;return new ac(n,n.defaultAttrs,e,Ll.setFrom(t))}mark(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return sc.fromJSON(this,e)}markFromJSON(e){return Ll.fromJSON(this,e)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function Oc(e,t){let n=[];for(let r=0;r-1)&&n.push(s=r)}if(!s)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}class Mc{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[],t.forEach((e=>{e.tag?this.tags.push(e):e.style&&this.styles.push(e)})),this.normalizeLists=!this.tags.some((t=>{if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;let n=e.nodes[t.node];return n.contentMatch.matchType(n)}))}parse(e,t={}){let n=new Ec(this,t,!1);return n.addAll(e,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new Ec(this,t,!0);return n.addAll(e,t.from,t.to),Vl.maxOpen(n.finish())}matchTag(e,t,n){for(let r=n?this.tags.indexOf(n)+1:0;re.length&&(61!=o.charCodeAt(e.length)||o.slice(e.length+1)!=t))){if(r.getAttrs){let e=r.getAttrs(t);if(!1===e)continue;r.attrs=e||void 0}return r}}}static schemaRules(e){let t=[];function n(e){let n=null==e.priority?50:e.priority,r=0;for(;r{n(e=Pc(e)),e.mark=r}))}for(let r in e.nodes){let t=e.nodes[r].spec.parseDOM;t&&t.forEach((e=>{n(e=Pc(e)),e.node=r}))}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Mc(e,Mc.schemaRules(e)))}}const _c={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Dc={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Tc={ol:!0,ul:!0};function $c(e,t,n){return null!=t?(t?1:0)|("full"===t?2:0):e&&"pre"==e.whitespace?3:-5&n}class Ac{constructor(e,t,n,r,i,o,s){this.type=e,this.attrs=t,this.marks=n,this.pendingMarks=r,this.solid=i,this.options=s,this.content=[],this.activeMarks=Ll.none,this.stashMarks=[],this.match=o||(4&s?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(Rl.from(e));if(!t){let t,n=this.type.contentMatch;return(t=n.findWrapping(e.type))?(this.match=n,t):null}this.match=this.type.contentMatch.matchFragment(t)}return this.match.findWrapping(e.type)}finish(e){if(!(1&this.options)){let e,t=this.content[this.content.length-1];if(t&&t.isText&&(e=/[ \t\r\n\u000c]+$/.exec(t.text))){let n=t;t.text.length==e[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-e[0].length))}}let t=Rl.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(Rl.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}popFromStashMark(e){for(let t=this.stashMarks.length-1;t>=0;t--)if(e.eq(this.stashMarks[t]))return this.stashMarks.splice(t,1)[0]}applyPending(e){for(let t=0,n=this.pendingMarks;tthis.insertNode(e)));else{let n=e;"string"==typeof t.contentElement?n=e.querySelector(t.contentElement):"function"==typeof t.contentElement?n=t.contentElement(e):t.contentElement&&(n=t.contentElement),this.findAround(e,n,!0),this.addAll(n)}r&&this.sync(s)&&this.open--,o&&this.removePendingMark(o,s)}addAll(e,t,n){let r=t||0;for(let i=t?e.childNodes[t]:e.firstChild,o=null==n?null:e.childNodes[n];i!=o;i=i.nextSibling,++r)this.findAtPoint(e,r),this.addDOM(i);this.findAtPoint(e,r)}findPlace(e){let t,n;for(let r=this.open;r>=0;r--){let i=this.nodes[r],o=i.findWrapping(e);if(o&&(!t||t.length>o.length)&&(t=o,n=i,!o.length))break;if(i.solid)break}if(!t)return!1;this.sync(n);for(let r=0;rthis.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(e){for(let t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let n=this.nodes[t].content;for(let t=n.length-1;t>=0;t--)e+=n[t].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let n=0;n-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),n=this.options.context,r=!(this.isOpen||n&&n.parent.type!=this.nodes[0].type),i=-(n?n.depth+1:0)+(r?0:1),o=(e,s)=>{for(;e>=0;e--){let a=t[e];if(""==a){if(e==t.length-1||0==e)continue;for(;s>=i;s--)if(o(e-1,s))return!0;return!1}{let e=s>0||0==s&&r?this.nodes[s].type:n&&s>=i?n.node(s-i).type:null;if(!e||e.name!=a&&-1==e.groups.indexOf(a))return!1;s--}}return!0};return o(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let t in this.parser.schema.nodes){let e=this.parser.schema.nodes[t];if(e.isTextblock&&e.defaultAttrs)return e}}addPendingMark(e){let t=function(e,t){for(let n=0;n=0;n--){let r=this.nodes[n];if(r.pendingMarks.lastIndexOf(e)>-1)r.pendingMarks=e.removeFromSet(r.pendingMarks);else{r.activeMarks=e.removeFromSet(r.activeMarks);let t=r.popFromStashMark(e);t&&r.type&&r.type.allowsMarkType(t.type)&&(r.activeMarks=t.addToSet(r.activeMarks))}if(r==t)break}}}function Nc(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function Pc(e){let t={};for(let n in e)t[n]=e[n];return t}function Ic(e,t){let n=t.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(e))continue;let o=[],s=e=>{o.push(e);for(let n=0;n{if(i.length||e.marks.length){let n=0,o=0;for(;n=0;r--){let i=this.serializeMark(e.marks[r],e.isInline,t);i&&((i.contentDOM||i.dom).appendChild(n),n=i.dom)}return n}serializeMark(e,t,n={}){let r=this.marks[e.type.name];return r&&Rc.renderSpec(jc(n),r(e,t))}static renderSpec(e,t,n=null){if("string"==typeof t)return{dom:e.createTextNode(t)};if(null!=t.nodeType)return{dom:t};if(t.dom&&null!=t.dom.nodeType)return t;let r,i=t[0],o=i.indexOf(" ");o>0&&(n=i.slice(0,o),i=i.slice(o+1));let s=n?e.createElementNS(n,i):e.createElement(i),a=t[1],l=1;if(a&&"object"==typeof a&&null==a.nodeType&&!Array.isArray(a)){l=2;for(let e in a)if(null!=a[e]){let t=e.indexOf(" ");t>0?s.setAttributeNS(e.slice(0,t),e.slice(t+1),a[e]):s.setAttribute(e,a[e])}}for(let c=l;cl)throw new RangeError("Content hole must be the only child of its parent node");return{dom:s,contentDOM:s}}{let{dom:t,contentDOM:o}=Rc.renderSpec(e,i,n);if(s.appendChild(t),o){if(r)throw new RangeError("Multiple content holes");r=o}}}return{dom:s,contentDOM:r}}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Rc(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=zc(e.nodes);return t.text||(t.text=e=>e.text),t}static marksFromSchema(e){return zc(e.marks)}}function zc(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function jc(e){return e.document||window.document}const Fc=Math.pow(2,16);function Lc(e){return 65535&e}class Bc{constructor(e,t=!1,n=null){this.pos=e,this.deleted=t,this.recover=n}}class Vc{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&Vc.empty)return Vc.empty}recover(e){let t=0,n=Lc(e);if(!this.inverted)for(let r=0;re)break;let l=this.ranges[s+i],c=this.ranges[s+o],u=a+l;if(e<=u){let i=a+r+((l?e==a?-1:e==u?1:t:t)<0?0:c);if(n)return i;let o=e==(t<0?a:u)?null:s/3+(e-a)*Fc;return new Bc(i,t<0?e!=a:e!=u,o)}r+=c-l}return n?e+r:new Bc(e+r)}touches(e,t){let n=0,r=Lc(t),i=this.inverted?2:1,o=this.inverted?1:2;for(let s=0;se)break;let a=this.ranges[s+i];if(e<=t+a&&s==3*r)return!0;n+=this.ranges[s+o]-a}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,i=0;r=0;t--){let r=e.getMirror(t);this.appendMap(e.maps[t].invert(),null!=r&&r>t?n-r-1:void 0)}}invert(){let e=new Wc;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let n=this.from;ni&&te.isAtom&&t.type.allowsMarkType(this.mark.type)?e.mark(this.mark.addToSet(e.marks)):e),r),t.openStart,t.openEnd);return Jc.fromReplace(e,this.from,this.to,i)}invert(){return new Uc(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new Yc(t.pos,n.pos,this.mark)}merge(e){return e instanceof Yc&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Yc(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Yc(t.from,t.to,e.markFromJSON(t.mark))}}Hc.jsonID("addMark",Yc);class Uc extends Hc{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=new Vl(Kc(t.content,(e=>e.mark(this.mark.removeFromSet(e.marks))),e),t.openStart,t.openEnd);return Jc.fromReplace(e,this.from,this.to,n)}invert(){return new Yc(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new Uc(t.pos,n.pos,this.mark)}merge(e){return e instanceof Uc&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Uc(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Uc(t.from,t.to,e.markFromJSON(t.mark))}}Hc.jsonID("removeMark",Uc);class Xc extends Hc{constructor(e,t,n,r=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=r}apply(e){return this.structure&&Zc(e,this.from,this.to)?Jc.fail("Structure replace would overwrite content"):Jc.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Vc([this.from,this.to-this.from,this.slice.size])}invert(e){return new Xc(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted?null:new Xc(t.pos,Math.max(t.pos,n.pos),this.slice)}merge(e){if(!(e instanceof Xc)||e.structure||this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart){if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;{let t=this.slice.size+e.slice.size==0?Vl.empty:new Vl(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new Xc(e.from,this.to,t,this.structure)}}{let t=this.slice.size+e.slice.size==0?Vl.empty:new Vl(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new Xc(this.from,this.to+(e.to-e.from),t,this.structure)}}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Xc(t.from,t.to,Vl.fromJSON(e,t.slice),!!t.structure)}}Hc.jsonID("replace",Xc);class Gc extends Hc{constructor(e,t,n,r,i,o,s=!1){super(),this.from=e,this.to=t,this.gapFrom=n,this.gapTo=r,this.slice=i,this.insert=o,this.structure=s}apply(e){if(this.structure&&(Zc(e,this.from,this.gapFrom)||Zc(e,this.gapTo,this.to)))return Jc.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return Jc.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,t.content);return n?Jc.fromReplace(e,this.from,this.to,n):Jc.fail("Content does not fit in gap")}getMap(){return new Vc([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new Gc(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1),r=e.map(this.gapFrom,-1),i=e.map(this.gapTo,1);return t.deleted&&n.deleted||rn.pos?null:new Gc(t.pos,n.pos,r,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to||"number"!=typeof t.gapFrom||"number"!=typeof t.gapTo||"number"!=typeof t.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Gc(t.from,t.to,t.gapFrom,t.gapTo,Vl.fromJSON(e,t.slice),t.insert,!!t.structure)}}function Zc(e,t,n){let r=e.resolve(t),i=n-t,o=r.depth;for(;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0){let e=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!e||e.isLeaf)return!0;e=e.firstChild,i--}}return!1}function Qc(e,t,n){return(0==t||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function eu(e){let t=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth;;--n){let r=e.$from.node(n),i=e.$from.index(n),o=e.$to.indexAfter(n);if(no;c--,u--){let e=i.node(c),t=i.index(c);if(e.type.spec.isolating)return!1;let n=e.content.cutByIndex(t,e.childCount),o=r&&r[u]||e;if(o!=e&&(n=n.replaceChild(0,o.type.create(o.attrs))),!e.canReplace(t+1,e.childCount)||!o.type.validContent(n))return!1}let a=i.indexAfter(o),l=r&&r[0];return i.node(o).canReplaceWith(a,a,l?l.type:i.node(o+1).type)}function iu(e,t){let n=e.resolve(t),r=n.index();return i=n.nodeBefore,o=n.nodeAfter,!(!i||!o||i.isLeaf||!i.canAppend(o))&&n.parent.canReplace(r,r+1);var i,o}function ou(e,t,n=t,r=Vl.empty){if(t==n&&!r.size)return null;let i=e.resolve(t),o=e.resolve(n);return su(i,o,r)?new Xc(t,n,r):new au(i,o,r).fit()}function su(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}Hc.jsonID("replaceAround",Gc);class au{constructor(e,t,n){this.$from=e,this.$to=t,this.unplaced=n,this.frontier=[],this.placed=Rl.empty;for(let r=0;r<=e.depth;r++){let t=e.node(r);this.frontier.push({type:t.type,match:t.contentMatchAt(e.indexAfter(r))})}for(let r=e.depth;r>0;r--)this.placed=Rl.from(e.node(r).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,n=this.$from,r=this.close(e<0?this.$to:n.doc.resolve(e));if(!r)return null;let i=this.placed,o=n.depth,s=r.depth;for(;o&&s&&1==i.childCount;)i=i.firstChild.content,o--,s--;let a=new Vl(i,o,s);return e>-1?new Gc(n.pos,e,this.$to.pos,this.$to.end(),a,t):a.size||n.pos!=this.$to.pos?new Xc(n.pos,r.pos,a):null}findFittable(){for(let e=1;e<=2;e++)for(let t=this.unplaced.openStart;t>=0;t--){let n,r=null;t?(r=uu(this.unplaced.content,t-1).firstChild,n=r.content):n=this.unplaced.content;let i=n.firstChild;for(let o=this.depth;o>=0;o--){let n,{type:s,match:a}=this.frontier[o],l=null;if(1==e&&(i?a.matchType(i.type)||(l=a.fillBefore(Rl.from(i),!1)):r&&s.compatibleContent(r.type)))return{sliceDepth:t,frontierDepth:o,parent:r,inject:l};if(2==e&&i&&(n=a.findWrapping(i.type)))return{sliceDepth:t,frontierDepth:o,parent:r,wrap:n};if(r&&a.matchType(r.type))break}}}openMore(){let{content:e,openStart:t,openEnd:n}=this.unplaced,r=uu(e,t);return!(!r.childCount||r.firstChild.isLeaf)&&(this.unplaced=new Vl(e,t+1,Math.max(n,r.size+t>=e.size-n?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:n}=this.unplaced,r=uu(e,t);if(r.childCount<=1&&t>0){let i=e.size-t<=t+r.size;this.unplaced=new Vl(lu(e,t-1,1),t-1,i?t-1:n)}else this.unplaced=new Vl(lu(e,t,1),t,n)}placeNodes({sliceDepth:e,frontierDepth:t,parent:n,inject:r,wrap:i}){for(;this.depth>t;)this.closeFrontierNode();if(i)for(let p=0;p1||0==a||e.content.size)&&(u=t,c.push(du(e.mark(d.allowedMarks(e.marks)),1==l?a:0,l==s.childCount?h:-1)))}let f=l==s.childCount;f||(h=-1),this.placed=cu(this.placed,t,Rl.from(c)),this.frontier[t].match=u,f&&h<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let p=0,m=s;p1&&r==this.$to.end(--n);)++r;return r}findCloseLevel(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:n,type:r}=this.frontier[t],i=t=0;n--){let{match:t,type:r}=this.frontier[n],i=hu(e,n,r,t,!0);if(!i||i.childCount)continue e}return{depth:t,fit:o,move:i?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=cu(this.placed,t.depth,t.fit)),e=t.move;for(let n=t.depth+1;n<=e.depth;n++){let t=e.node(n),r=t.type.contentMatch.fillBefore(t.content,!0,e.index(n));this.openFrontierNode(t.type,t.attrs,r)}return e}openFrontierNode(e,t=null,n){let r=this.frontier[this.depth];r.match=r.match.matchType(e),this.placed=cu(this.placed,this.depth,Rl.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(Rl.empty,!0);e.childCount&&(this.placed=cu(this.placed,this.frontier.length,e))}}function lu(e,t,n){return 0==t?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(lu(e.firstChild.content,t-1,n)))}function cu(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(cu(e.lastChild.content,t-1,n)))}function uu(e,t){for(let n=0;n1&&(r=r.replaceChild(0,du(r.firstChild,t-1,1==r.childCount?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(Rl.empty,!0)))),e.copy(r)}function hu(e,t,n,r,i){let o=e.node(t),s=i?e.indexAfter(t):e.index(t);if(s==o.childCount&&!n.compatibleContent(o.type))return null;let a=r.fillBefore(o.content,!0,s);return a&&!function(e,t,n){for(let r=n;rr){let t=i.contentMatchAt(0),n=t.fillBefore(e).append(e);e=n.append(t.matchFragment(n).fillBefore(Rl.empty,!0))}return e}function mu(e,t){let n=[];for(let r=Math.min(e.depth,t.depth);r>=0;r--){let i=e.start(r);if(it.pos+(t.depth-r)||e.node(r).type.spec.isolating||t.node(r).type.spec.isolating)break;(i==t.start(r)||r==e.depth&&r==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&r&&t.start(r-1)==i-1)&&n.push(r)}return n}let gu=class extends Error{};gu=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n},(gu.prototype=Object.create(Error.prototype)).constructor=gu,gu.prototype.name="TransformError";const vu=Object.create(null);class yu{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new bu(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t=0;i--){let r=t<0?Du(e.node(0),e.node(i),e.before(i+1),e.index(i),t,n):Du(e.node(0),e.node(i),e.after(i+1),e.index(i)+1,t,n);if(r)return r}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new Mu(e.node(0))}static atStart(e){return Du(e,e,0,0,1)||new Mu(e)}static atEnd(e){return Du(e,e,e.content.size,e.childCount,-1)||new Mu(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=vu[t.type];if(!n)throw new RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in vu)throw new RangeError("Duplicate use of selection JSON ID "+e);return vu[e]=t,t.prototype.jsonID=e,t}getBookmark(){return Su.between(this.$anchor,this.$head).getBookmark()}}yu.prototype.visible=!0;class bu{constructor(e,t){this.$from=e,this.$to=t}}let wu=!1;function xu(e){wu||e.parent.inlineContent||(wu=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class Su extends yu{constructor(e,t=e){xu(e),xu(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let n=e.resolve(t.map(this.head));if(!n.parent.inlineContent)return yu.near(n);let r=e.resolve(t.map(this.anchor));return new Su(r.parent.inlineContent?r:n,n)}replace(e,t=Vl.empty){if(super.replace(e,t),t==Vl.empty){let t=this.$from.marksAcross(this.$to);t&&e.ensureMarks(t)}}eq(e){return e instanceof Su&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new ku(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if("number"!=typeof t.anchor||"number"!=typeof t.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new Su(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,n=t){let r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))}static between(e,t,n){let r=e.pos-t.pos;if(n&&!r||(n=r>=0?1:-1),!t.parent.inlineContent){let e=yu.findFrom(t,n,!0)||yu.findFrom(t,-n,!0);if(!e)return yu.near(t,n);t=e.$head}return e.parent.inlineContent||(0==r||(e=(yu.findFrom(e,-n,!0)||yu.findFrom(e,n,!0)).$anchor).posnew Mu(e)};function Du(e,t,n,r,i,o=!1){if(t.inlineContent)return Su.create(e,n);for(let s=r-(i>0?0:1);i>0?s=0;s+=i){let r=t.child(s);if(r.isAtom){if(!o&&Cu.isSelectable(r))return Cu.create(e,n-(i<0?r.nodeSize:0))}else{let t=Du(e,r,n+i,i<0?r.childCount:0,i,o);if(t)return t}n+=r.nodeSize*i}return null}function Tu(e,t,n){let r=e.steps.length-1;if(r{null==i&&(i=r)})),e.setSelection(yu.near(e.doc.resolve(i),n)))}class $u extends class{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Wc}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new gu(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,n=Vl.empty){let r=ou(this.doc,e,t,n);return r&&this.step(r),this}replaceWith(e,t,n){return this.replace(e,t,new Vl(Rl.from(n),0,0))}delete(e,t){return this.replace(e,t,Vl.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,n){return function(e,t,n,r){if(!r.size)return e.deleteRange(t,n);let i=e.doc.resolve(t),o=e.doc.resolve(n);if(su(i,o,r))return e.step(new Xc(t,n,r));let s=mu(i,e.doc.resolve(n));0==s[s.length-1]&&s.pop();let a=-(i.depth+1);s.unshift(a);for(let h=i.depth,f=i.pos-1;h>0;h--,f--){let e=i.node(h).type.spec;if(e.defining||e.definingAsContext||e.isolating)break;s.indexOf(h)>-1?a=h:i.before(h)==f&&s.splice(1,0,-h)}let l=s.indexOf(a),c=[],u=r.openStart;for(let h=r.content,f=0;;f++){let e=h.firstChild;if(c.push(e),f==r.openStart)break;h=e.content}for(let h=u-1;h>=0;h--){let e=c[h].type,t=fu(e);if(t&&i.node(l).type!=e)u=h;else if(t||!e.isTextblock)break}for(let h=r.openStart;h>=0;h--){let t=(h+u+1)%(r.openStart+1),a=c[t];if(a)for(let c=0;c=0&&(e.replace(t,n,r),!(e.steps.length>d));h--){let e=s[h];e<0||(t=i.before(e),n=o.after(e))}}(this,e,t,n),this}replaceRangeWith(e,t,n){return function(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let i=function(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(0==r.parentOffset)for(let i=r.depth-1;i>=0;i--){let e=r.index(i);if(r.node(i).canReplaceWith(e,e,n))return r.before(i+1);if(e>0)return null}if(r.parentOffset==r.parent.content.size)for(let i=r.depth-1;i>=0;i--){let e=r.indexAfter(i);if(r.node(i).canReplaceWith(e,e,n))return r.after(i+1);if(e0&&(n||r.node(t-1).canReplace(r.index(t-1),i.indexAfter(t-1))))return e.delete(r.before(t),i.after(t))}for(let s=1;s<=r.depth&&s<=i.depth;s++)if(t-r.start(s)==r.depth-s&&n>r.end(s)&&i.end(s)-n!=i.depth-s)return e.delete(r.before(s),n);e.delete(t,n)}(this,e,t),this}lift(e,t){return function(e,t,n){let{$from:r,$to:i,depth:o}=t,s=r.before(o+1),a=i.after(o+1),l=s,c=a,u=Rl.empty,d=0;for(let p=o,m=!1;p>n;p--)m||r.index(p)>0?(m=!0,u=Rl.from(r.node(p).copy(u)),d++):l--;let h=Rl.empty,f=0;for(let p=o,m=!1;p>n;p--)m||i.after(p+1)=0;s--){if(r.size){let e=n[s].type.contentMatch.matchFragment(r);if(!e||!e.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=Rl.from(n[s].type.create(n[s].attrs,r))}let i=t.start,o=t.end;e.step(new Gc(i,o,i,o,new Vl(r,0,0),n.length,!0))}(this,e,t),this}setBlockType(e,t=e,n,r=null){return function(e,t,n,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let o=e.steps.length;e.doc.nodesBetween(t,n,((t,n)=>{if(t.isTextblock&&!t.hasMarkup(r,i)&&function(e,t,n){let r=e.resolve(t),i=r.index();return r.parent.canReplaceWith(i,i+1,n)}(e.doc,e.mapping.slice(o).map(n),r)){e.clearIncompatible(e.mapping.slice(o).map(n,1),r);let s=e.mapping.slice(o),a=s.map(n,1),l=s.map(n+t.nodeSize,1);return e.step(new Gc(a,l,a+1,l-1,new Vl(Rl.from(r.create(i,null,t.marks)),0,0),1,!0)),!1}}))}(this,e,t,n,r),this}setNodeMarkup(e,t,n=null,r=[]){return function(e,t,n,r,i){let o=e.doc.nodeAt(t);if(!o)throw new RangeError("No node at given position");n||(n=o.type);let s=n.create(r,null,i||o.marks);if(o.isLeaf)return e.replaceWith(t,t+o.nodeSize,s);if(!n.validContent(o.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new Gc(t,t+o.nodeSize,t+1,t+o.nodeSize-1,new Vl(Rl.from(s),0,0),1,!0))}(this,e,t,n,r),this}split(e,t=1,n){return function(e,t,n=1,r){let i=e.doc.resolve(t),o=Rl.empty,s=Rl.empty;for(let a=i.depth,l=i.depth-n,c=n-1;a>l;a--,c--){o=Rl.from(i.node(a).copy(o));let e=r&&r[c];s=Rl.from(e?e.type.create(e.attrs,s):i.node(a).copy(s))}e.step(new Xc(t,t,new Vl(o.append(s),n,n),!0))}(this,e,t,n),this}addMark(e,t,n){return function(e,t,n,r){let i,o,s=[],a=[];e.doc.nodesBetween(t,n,((e,l,c)=>{if(!e.isInline)return;let u=e.marks;if(!r.isInSet(u)&&c.type.allowsMarkType(r.type)){let c=Math.max(l,t),d=Math.min(l+e.nodeSize,n),h=r.addToSet(u);for(let e=0;ee.step(t))),a.forEach((t=>e.step(t)))}(this,e,t,n),this}removeMark(e,t,n){return function(e,t,n,r){let i=[],o=0;e.doc.nodesBetween(t,n,((e,s)=>{if(!e.isInline)return;o++;let a=null;if(r instanceof kc){let t,n=e.marks;for(;t=r.isInSet(n);)(a||(a=[])).push(t),n=t.removeFromSet(n)}else r?r.isInSet(e.marks)&&(a=[r]):a=e.marks;if(a&&a.length){let r=Math.min(s+e.nodeSize,n);for(let e=0;ee.step(new Uc(t.from,t.to,t.style))))}(this,e,t,n),this}clearIncompatible(e,t,n){return function(e,t,n,r=n.contentMatch){let i=e.doc.nodeAt(t),o=[],s=t+1;for(let a=0;a=0;a--)e.step(o[a])}(this,e,t,n),this}}{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor0}setStoredMarks(e){return this.storedMarks=e,this.updated|=2,this}ensureMarks(e){return Ll.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(2&this.updated)>0}addStep(e,t){super.addStep(e,t),this.updated=-3&this.updated,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let n=this.selection;return t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||Ll.none))),n.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,n){let r=this.doc.type.schema;if(null==t)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();{if(null==n&&(n=t),n=null==n?t:n,!e)return this.deleteRange(t,n);let i=this.storedMarks;if(!i){let e=this.doc.resolve(t);i=n==t?e.marks():e.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,i)),this.selection.empty||this.setSelection(yu.near(this.selection.$to)),this}}setMeta(e,t){return this.meta["string"==typeof e?e:e.key]=t,this}getMeta(e){return this.meta["string"==typeof e?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=4,this}get scrolledIntoView(){return(4&this.updated)>0}}function Au(e,t){return t&&e?e.bind(t):e}class Eu{constructor(e,t,n){this.name=e,this.init=Au(t.init,n),this.apply=Au(t.apply,n)}}const Nu=[new Eu("doc",{init:e=>e.doc||e.schema.topNodeType.createAndFill(),apply:e=>e.doc}),new Eu("selection",{init:(e,t)=>e.selection||yu.atStart(t.doc),apply:e=>e.selection}),new Eu("storedMarks",{init:e=>e.storedMarks||null,apply:(e,t,n,r)=>r.selection.$cursor?e.storedMarks:null}),new Eu("scrollToSelection",{init:()=>0,apply:(e,t)=>e.scrolledIntoView?t+1:t})];class Pu{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=Nu.slice(),t&&t.forEach((e=>{if(this.pluginsByKey[e.key])throw new RangeError("Adding different instances of a keyed plugin ("+e.key+")");this.plugins.push(e),this.pluginsByKey[e.key]=e,e.spec.state&&this.fields.push(new Eu(e.key,e.spec.state,e))}))}}class Iu{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let n=0;ne.toJSON()))),e&&"object"==typeof e)for(let n in e){if("doc"==n||"selection"==n)throw new RangeError("The JSON fields `doc` and `selection` are reserved");let r=e[n],i=r.spec.state;i&&i.toJSON&&(t[n]=i.toJSON.call(r,this[r.key]))}return t}static fromJSON(e,t,n){if(!t)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let r=new Pu(e.schema,e.plugins),i=new Iu(r);return r.fields.forEach((r=>{if("doc"==r.name)i.doc=sc.fromJSON(e.schema,t.doc);else if("selection"==r.name)i.selection=yu.fromJSON(i.doc,t.selection);else if("storedMarks"==r.name)t.storedMarks&&(i.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(n)for(let o in n){let s=n[o],a=s.spec.state;if(s.key==r.name&&a&&a.fromJSON&&Object.prototype.hasOwnProperty.call(t,o))return void(i[r.name]=a.fromJSON.call(s,e,t[o],i))}i[r.name]=r.init(e,i)}})),i}}function Ru(e,t,n){for(let r in e){let i=e[r];i instanceof Function?i=i.bind(t):"handleDOMEvents"==r&&(i=Ru(i,t,{})),n[r]=i}return n}class zu{constructor(e){this.spec=e,this.props={},e.props&&Ru(e.props,this,this.props),this.key=e.key?e.key.key:Fu("plugin")}getState(e){return e[this.key]}}const ju=Object.create(null);function Fu(e){return e in ju?e+"$"+ ++ju[e]:(ju[e]=0,e+"$")}class Lu{constructor(e="key"){this.key=Fu(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const Bu="undefined"!=typeof navigator?navigator:null,Vu="undefined"!=typeof document?document:null,Wu=Bu&&Bu.userAgent||"",qu=/Edge\/(\d+)/.exec(Wu),Hu=/MSIE \d/.exec(Wu),Ju=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Wu),Ku=!!(Hu||Ju||qu),Yu=Hu?document.documentMode:Ju?+Ju[1]:qu?+qu[1]:0,Uu=!Ku&&/gecko\/(\d+)/i.test(Wu);Uu&&(/Firefox\/(\d+)/.exec(Wu)||[0,0])[1];const Xu=!Ku&&/Chrome\/(\d+)/.exec(Wu),Gu=!!Xu,Zu=Xu?+Xu[1]:0,Qu=!Ku&&!!Bu&&/Apple Computer/.test(Bu.vendor),ed=Qu&&(/Mobile\/\w+/.test(Wu)||!!Bu&&Bu.maxTouchPoints>2),td=ed||!!Bu&&/Mac/.test(Bu.platform),nd=/Android \d/.test(Wu),rd=!!Vu&&"webkitFontSmoothing"in Vu.documentElement.style,id=rd?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,od=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},sd=function(e){let t=e.assignedSlot||e.parentNode;return t&&11==t.nodeType?t.host:t};let ad=null;const ld=function(e,t,n){let r=ad||(ad=document.createRange());return r.setEnd(e,null==n?e.nodeValue.length:n),r.setStart(e,t||0),r},cd=function(e,t,n,r){return n&&(dd(e,t,n,r,-1)||dd(e,t,n,r,1))},ud=/^(img|br|input|textarea|hr)$/i;function dd(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:hd(e))){let n=e.parentNode;if(!n||1!=n.nodeType||fd(e)||ud.test(e.nodeName)||"false"==e.contentEditable)return!1;t=od(e)+(i<0?0:1),e=n}else{if(1!=e.nodeType)return!1;if("false"==(e=e.childNodes[t+(i<0?-1:0)]).contentEditable)return!1;t=i<0?hd(e):0}}}function hd(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function fd(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const pd=function(e){let t=e.isCollapsed;return t&&Gu&&e.rangeCount&&!e.getRangeAt(0).collapsed&&(t=!1),t};function md(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function gd(e){return{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function vd(e,t){return"number"==typeof e?e:e[t]}function yd(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function bd(e,t,n){let r=e.someProp("scrollThreshold")||0,i=e.someProp("scrollMargin")||5,o=e.dom.ownerDocument;for(let s=n||e.dom;s;s=sd(s)){if(1!=s.nodeType)continue;let e=s,n=e==o.body,a=n?gd(o):yd(e),l=0,c=0;if(t.topa.bottom-vd(r,"bottom")&&(c=t.bottom-a.bottom+vd(i,"bottom")),t.lefta.right-vd(r,"right")&&(l=t.right-a.right+vd(i,"right")),l||c)if(n)o.defaultView.scrollBy(l,c);else{let n=e.scrollLeft,r=e.scrollTop;c&&(e.scrollTop+=c),l&&(e.scrollLeft+=l);let i=e.scrollLeft-n,o=e.scrollTop-r;t={left:t.left-i,top:t.top-o,right:t.right-i,bottom:t.bottom-o}}if(n)break}}function wd(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=sd(r));return t}function xd(e,t){for(let n=0;n=a){s=Math.max(d.bottom,s),a=Math.min(d.top,a);let e=d.left>t.left?d.left-t.left:d.right=(d.left+d.right)/2?1:0));continue}}!n&&(t.left>=d.right&&t.top>=d.top||t.left>=d.left&&t.top>=d.bottom)&&(o=c+1)}}return n&&3==n.nodeType?function(e,t){let n=e.nodeValue.length,r=document.createRange();for(let i=0;i=(n.left+n.right)/2?1:0)}}return{node:e,offset:0}}(n,r):!n||i&&1==n.nodeType?{node:e,offset:o}:kd(n,r)}function Cd(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function Od(e,t,n){let r=e.childNodes.length;if(r&&n.topt.top&&i++}n==e.dom&&i==n.childNodes.length-1&&1==n.lastChild.nodeType&&t.top>n.lastChild.getBoundingClientRect().bottom?o=e.state.doc.content.size:0!=i&&1==n.nodeType&&"BR"==n.childNodes[i-1].nodeName||(o=function(e,t,n,r){let i=-1;for(let o=t;o!=e.dom;){let t=e.docView.nearestDesc(o,!0);if(!t)return null;if(t.node.isBlock&&t.parent){let e=t.dom.getBoundingClientRect();if(e.left>r.left||e.top>r.top)i=t.posBefore;else{if(!(e.right-1?i:e.docView.posFromDOM(t,n,1)}(e,n,i,t))}null==o&&(o=function(e,t,n){let{node:r,offset:i}=kd(t,n),o=-1;if(1==r.nodeType&&!r.firstChild){let e=r.getBoundingClientRect();o=e.left!=e.right&&n.left>(e.left+e.right)/2?1:-1}return e.docView.posFromDOM(r,i,o)}(e,s,t));let a=e.docView.nearestDesc(s,!0);return{pos:o,inside:a?a.posAtStart-a.border:-1}}function _d(e,t){let n=e.getClientRects();return n.length?n[t<0?0:n.length-1]:e.getBoundingClientRect()}const Dd=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Td(e,t,n){let{node:r,offset:i}=e.docView.domFromPos(t,n<0?-1:1),o=rd||Uu;if(3==r.nodeType){if(!o||!Dd.test(r.nodeValue)&&(n<0?i:i!=r.nodeValue.length)){let e=i,t=i,o=n<0?1:-1;return n<0&&!i?(t++,o=-1):n>=0&&i==r.nodeValue.length?(e--,o=1):n<0?e--:t++,$d(_d(ld(r,e,t),o),o<0)}{let e=_d(ld(r,i,i),n);if(Uu&&i&&/\s/.test(r.nodeValue[i-1])&&i=0)}if(i&&(n<0||i==hd(r))){let e=r.childNodes[i-1],t=3==e.nodeType?ld(e,hd(e)-(o?0:1)):1!=e.nodeType||"BR"==e.nodeName&&e.nextSibling?null:e;if(t)return $d(_d(t,1),!1)}if(i=0)}function $d(e,t){if(0==e.width)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function Ad(e,t){if(0==e.height)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function Ed(e,t,n){let r=e.state,i=e.root.activeElement;r!=t&&e.updateState(t),i!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),i!=e.dom&&i&&i.focus()}}const Nd=/[\u0590-\u08ac]/;let Pd=null,Id=null,Rd=!1;function zd(e,t,n){return Pd==t&&Id==n?Rd:(Pd=t,Id=n,Rd="up"==n||"down"==n?function(e,t,n){let r=t.selection,i="up"==n?r.$from:r.$to;return Ed(e,t,(()=>{let{node:t}=e.docView.domFromPos(i.pos,"up"==n?-1:1);for(;;){let n=e.docView.nearestDesc(t,!0);if(!n)break;if(n.node.isBlock){t=n.dom;break}t=n.dom.parentNode}let r=Td(e,i.pos,1);for(let e=t.firstChild;e;e=e.nextSibling){let t;if(1==e.nodeType)t=e.getClientRects();else{if(3!=e.nodeType)continue;t=ld(e,0,e.nodeValue.length).getClientRects()}for(let e=0;ei.top+1&&("up"==n?r.top-i.top>2*(i.bottom-r.top):i.bottom-r.bottom>2*(r.bottom-i.top)))return!1}}return!0}))}(e,t,n):function(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,o=!i,s=i==r.parent.content.size,a=e.domSelection();return Nd.test(r.parent.textContent)&&a.modify?Ed(e,t,(()=>{let t=a.getRangeAt(0),i=a.focusNode,o=a.focusOffset,s=a.caretBidiLevel;a.modify("move",n,"character");let l=!(r.depth?e.docView.domAfterPos(r.before()):e.dom).contains(1==a.focusNode.nodeType?a.focusNode:a.focusNode.parentNode)||i==a.focusNode&&o==a.focusOffset;return a.removeAllRanges(),a.addRange(t),null!=s&&(a.caretBidiLevel=s),l})):"left"==n||"backward"==n?o:s}(e,t,n))}class jd{constructor(e,t,n,r){this.parent=e,this.children=t,this.dom=n,this.contentDOM=r,this.dirty=0,n.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,n){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;tod(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=2&e.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==t)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!1;break}if(t.previousSibling)break}if(null==r&&t==e.childNodes.length)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!0;break}if(t.nextSibling)break}}return(null==r?n>0:r)?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let n=!0,r=e;r;r=r.parentNode){let i,o=this.getDesc(r);if(o&&(!t||o.node)){if(!n||!(i=o.nodeDOM)||(1==i.nodeType?i.contains(1==e.nodeType?e:e.parentNode):i==e))return o;n=!1}}}getDesc(e){let t=e.pmViewDesc;for(let n=t;n;n=n.parent)if(n==this)return t}posFromDOM(e,t,n){for(let r=e;r;r=r.parentNode){let i=this.getDesc(r);if(i)return i.localPosFromDOM(e,t,n)}return-1}descAt(e){for(let t=0,n=0;te||t instanceof Hd){i=e-o;break}o=n}if(i)return this.children[r].domFromPos(i-this.children[r].border,t);for(;r&&!(n=this.children[r-1]).size&&n instanceof Fd&&n.side>=0;r--);if(t<=0){let e,n=!0;for(;e=r?this.children[r-1]:null,e&&e.dom.parentNode!=this.contentDOM;r--,n=!1);return e&&t&&n&&!e.border&&!e.domAtom?e.domFromPos(e.size,t):{node:this.contentDOM,offset:e?od(e.dom)+1:0}}{let e,n=!0;for(;e=r=i&&t<=a-n.border&&n.node&&n.contentDOM&&this.contentDOM.contains(n.contentDOM))return n.parseRange(e,t,i);e=o;for(let t=s;t>0;t--){let n=this.children[t-1];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(1)){r=od(n.dom)+1;break}e-=n.size}-1==r&&(r=0)}if(r>-1&&(a>t||s==this.children.length-1)){t=a;for(let e=s+1;ef&&ot){let e=s;s=a,a=e}let n=document.createRange();n.setEnd(a.node,a.offset),n.setStart(s.node,s.offset),l.removeAllRanges(),l.addRange(n)}}ignoreMutation(e){return!this.contentDOM&&"selection"!=e.type}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let n=0,r=0;r=n:en){let r=n+i.border,s=o-i.border;if(e>=r&&t<=s)return this.dirty=e==n||t==o?2:1,void(e!=r||t!=s||!i.contentLost&&i.dom.parentNode==this.contentDOM?i.markDirty(e-r,t-r):i.dirty=3);i.dirty=i.dom!=i.contentDOM||i.dom.parentNode!=this.contentDOM||i.children.length?3:2}n=o}this.dirty=2}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let n=1==e?2:1;t.dirtyi?i.parent?i.parent.posBeforeChild(i):void 0:r))),!t.type.spec.raw){if(1!=o.nodeType){let e=document.createElement("span");e.appendChild(o),o=e}o.contentEditable="false",o.classList.add("ProseMirror-widget")}super(e,[],o,null),this.widget=t,this.widget=t,i=this}matchesWidget(e){return 0==this.dirty&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return!!t&&t(e)}ignoreMutation(e){return"selection"!=e.type||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class Ld extends jd{constructor(e,t,n,r){super(e,[],t,null),this.textDOM=n,this.text=r}get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return"characterData"===e.type&&e.target.nodeValue==e.oldValue}}class Bd extends jd{constructor(e,t,n,r){super(e,[],n,r),this.mark=t}static create(e,t,n,r){let i=r.nodeViews[t.type.name],o=i&&i(t,r,n);return o&&o.dom||(o=Rc.renderSpec(document,t.type.spec.toDOM(t,n))),new Bd(e,t,o.dom,o.contentDOM||o.dom)}parseRule(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM||void 0}}matchesMark(e){return 3!=this.dirty&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),0!=this.dirty){let e=this.parent;for(;!e.node;)e=e.parent;e.dirty0&&(i=ih(i,0,e,n));for(let s=0;ss?s.parent?s.parent.posBeforeChild(s):void 0:o),n,r),c=l&&l.dom,u=l&&l.contentDOM;if(t.isText)if(c){if(3!=c.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else c=document.createTextNode(t.text);else c||({dom:c,contentDOM:u}=Rc.renderSpec(document,t.type.spec.toDOM(t)));u||t.isText||"BR"==c.nodeName||(c.hasAttribute("contenteditable")||(c.contentEditable="false"),t.type.spec.draggable&&(c.draggable=!0));let d=c;return c=Qd(c,n,t),l?s=new Jd(e,t,n,r,c,u||null,d,l,i,o+1):t.isText?new qd(e,t,n,r,c,d,i):new Vd(e,t,n,r,c,u||null,d,i,o+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(e.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(let t=this.children.length-1;t>=0;t--){let n=this.children[t];if(this.dom.contains(n.dom.parentNode)){e.contentElement=n.dom.parentNode;break}}e.contentElement||(e.getContent=()=>Rl.empty)}else e.contentElement=this.contentDOM;else e.getContent=()=>this.node.content;return e}matchesNode(e,t,n){return 0==this.dirty&&e.eq(this.node)&&eh(t,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,t){let n=this.node.inlineContent,r=t,i=e.composing?this.localCompositionInfo(e,t):null,o=i&&i.pos>-1?i:null,s=i&&i.pos<0,a=new nh(this,o&&o.node);!function(e,t,n,r){let i=t.locals(e),o=0;if(0==i.length){for(let n=0;no;)a.push(i[s++]);let h=o+u.nodeSize;if(u.isText){let e=h;s!e.inline)):a.slice(),t.forChild(o,u),d),o=h}}(this.node,this.innerDeco,((t,i,o)=>{t.spec.marks?a.syncToMarks(t.spec.marks,n,e):t.type.side>=0&&!o&&a.syncToMarks(i==this.node.childCount?Ll.none:this.node.child(i).marks,n,e),a.placeWidget(t,e,r)}),((t,o,l,c)=>{let u;a.syncToMarks(t.marks,n,e),a.findNodeMatch(t,o,l,c)||s&&e.state.selection.from>r&&e.state.selection.to-1&&a.updateNodeAt(t,o,l,u,e)||a.updateNextNode(t,o,l,e,c)||a.addNode(t,o,l,e,r),r+=t.nodeSize})),a.syncToMarks([],n,e),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||2==this.dirty)&&(o&&this.protectLocalComposition(e,o),Kd(this.contentDOM,this.children,e),ed&&function(e){if("UL"==e.nodeName||"OL"==e.nodeName){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}(this.dom))}localCompositionInfo(e,t){let{from:n,to:r}=e.state.selection;if(!(e.state.selection instanceof Su)||nt+this.node.content.size)return null;let i=e.domSelection(),o=function(e,t){for(;;){if(3==e.nodeType)return e;if(1==e.nodeType&&t>0){if(e.childNodes.length>t&&3==e.childNodes[t].nodeType)return e.childNodes[t];t=hd(e=e.childNodes[t-1])}else{if(!(1==e.nodeType&&t=n){let e=a=0&&e+t.length+a>=n)return a+e;if(n==r&&l.length>=r+t.length-a&&l.slice(r-a,r-a+t.length)==t)return r}}return-1}(this.node.content,e,n-t,r-t);return i<0?null:{node:o,pos:i,text:e}}return{node:o,pos:-1,text:""}}protectLocalComposition(e,{node:t,pos:n,text:r}){if(this.getDesc(t))return;let i=t;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let o=new Ld(this,i,t,r);e.input.compositionNodes.push(o),this.children=ih(this.children,n,n+r.length,e,o)}update(e,t,n,r){return!(3==this.dirty||!e.sameMarkup(this.node))&&(this.updateInner(e,t,n,r),!0)}updateInner(e,t,n,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0}updateOuterDeco(e){if(eh(e,this.outerDeco))return;let t=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=Gd(this.dom,this.nodeDOM,Xd(this.outerDeco,this.node,t),Xd(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)}deselectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable")}get domAtom(){return this.node.isAtom}}function Wd(e,t,n,r,i){return Qd(r,t,e),new Vd(void 0,e,t,n,r,r,r,i,0)}class qd extends Vd{constructor(e,t,n,r,i,o,s){super(e,t,n,r,i,null,o,s,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,n,r){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!e.sameMarkup(this.node))&&(this.updateOuterDeco(t),0==this.dirty&&e.text==this.node.text||e.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=e.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=e,this.dirty=0,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,n){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,n)}ignoreMutation(e){return"characterData"!=e.type&&"selection"!=e.type}slice(e,t,n){let r=this.node.cut(e,t),i=document.createTextNode(r.text);return new qd(this.parent,r,this.outerDeco,this.innerDeco,i,i,n)}markDirty(e,t){super.markDirty(e,t),this.dom==this.nodeDOM||0!=e&&t!=this.nodeDOM.nodeValue.length||(this.dirty=3)}get domAtom(){return!1}}class Hd extends jd{parseRule(){return{ignore:!0}}matchesHack(e){return 0==this.dirty&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return"IMG"==this.dom.nodeName}}class Jd extends Vd{constructor(e,t,n,r,i,o,s,a,l,c){super(e,t,n,r,i,o,s,l,c),this.spec=a}update(e,t,n,r){if(3==this.dirty)return!1;if(this.spec.update){let i=this.spec.update(e,t,n);return i&&this.updateInner(e,t,n,r),i}return!(!this.contentDOM&&!e.isLeaf)&&super.update(e,t,n,r)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,n,r){this.spec.setSelection?this.spec.setSelection(e,t,n):super.setSelection(e,t,n,r)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function Kd(e,t,n){let r=e.firstChild,i=!1;for(let o=0;o0;){let a;for(;;)if(r){let e=n.children[r-1];if(!(e instanceof Bd)){a=e,r--;break}n=e,r=e.children.length}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}let l=a.node;if(l){if(l!=e.child(i-1))break;--i,o.set(a,i),s.push(a)}}return{index:i,matched:o,matches:s.reverse()}}(e.node.content,e)}destroyBetween(e,t){if(e!=t){for(let n=e;n>1,o=Math.min(i,e.length);for(;r-1)r>this.index&&(this.changed=!0,this.destroyBetween(this.index,r)),this.top=this.top.children[this.index];else{let r=Bd.create(this.top,e[i],t,n);this.top.children.splice(this.index,0,r),this.top=r,this.changed=!0}this.index=0,i++}}findNodeMatch(e,t,n,r){let i,o=-1;if(r>=this.preMatch.index&&(i=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&i.matchesNode(e,t,n))o=this.top.children.indexOf(i,this.index);else for(let s=this.index,a=Math.min(this.top.children.length,s+5);s=n||u<=t?o.push(l):(cn&&o.push(l.slice(n-c,l.size,r)))}return o}function oh(e,t=null){let n=e.domSelection(),r=e.state.doc;if(!n.focusNode)return null;let i=e.docView.nearestDesc(n.focusNode),o=i&&0==i.size,s=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let a,l,c=r.resolve(s);if(pd(n)){for(a=c;i&&!i.node;)i=i.parent;let e=i.node;if(i&&e.isAtom&&Cu.isSelectable(e)&&i.parent&&(!e.isInline||!function(e,t,n){for(let r=0==t,i=t==hd(e);r||i;){if(e==n)return!0;let t=od(e);if(!(e=e.parentNode))return!1;r=r&&0==t,i=i&&t==hd(e)}}(n.focusNode,n.focusOffset,i.dom))){let e=i.posBefore;l=new Cu(s==e?c:r.resolve(e))}}else{let t=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(t<0)return null;a=r.resolve(t)}if(!l){l=ph(e,a,c,"pointer"==t||e.state.selection.head{n.anchorNode==r&&n.anchorOffset==i||(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout((()=>{sh(e)&&!e.state.selection.visible||e.dom.classList.remove("ProseMirror-hideselection")}),20))})}(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}const lh=Qu||Gu&&Zu<63;function ch(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),i=rr(e,t,n)))||Su.between(t,n,r)}function mh(e){return(!e.editable||e.root.activeElement==e.dom)&&gh(e)}function gh(e){let t=e.domSelection();if(!t.anchorNode)return!1;try{return e.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(3==t.focusNode.nodeType?t.focusNode.parentNode:t.focusNode))}catch(n){return!1}}function vh(e,t){let{$anchor:n,$head:r}=e.selection,i=t>0?n.max(r):n.min(r),o=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return o&&yu.findFrom(o,t)}function yh(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function bh(e,t,n){let r=e.state.selection;if(!(r instanceof Su)){if(r instanceof Cu&&r.node.isInline)return yh(e,new Su(t>0?r.$to:r.$from));{let n=vh(e.state,t);return!!n&&yh(e,n)}}if(!r.empty||n.indexOf("s")>-1)return!1;if(e.endOfTextblock(t>0?"right":"left")){let n=vh(e.state,t);return!!(n&&n instanceof Cu)&&yh(e,n)}if(!(td&&n.indexOf("m")>-1)){let n,i=r.$head,o=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter;if(!o||o.isText)return!1;let s=t<0?i.pos-o.nodeSize:i.pos;return!!(o.isAtom||(n=e.docView.descAt(s))&&!n.contentDOM)&&(Cu.isSelectable(o)?yh(e,new Cu(t<0?e.state.doc.resolve(i.pos-o.nodeSize):i)):!!rd&&yh(e,new Su(e.state.doc.resolve(t<0?s:s+o.nodeSize))))}}function wh(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function xh(e){let t=e.pmViewDesc;return t&&0==t.size&&(e.nextSibling||"BR"!=e.nodeName)}function Sh(e){let t=e.domSelection(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i,o,s=!1;for(Uu&&1==n.nodeType&&r0){if(1!=n.nodeType)break;{let e=n.childNodes[r-1];if(xh(e))i=n,o=--r;else{if(3!=e.nodeType)break;n=e,r=n.nodeValue.length}}}else{if(Ch(n))break;{let t=n.previousSibling;for(;t&&xh(t);)i=n.parentNode,o=od(t),t=t.previousSibling;if(t)n=t,r=wh(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}s?Oh(e,t,n,r):i&&Oh(e,t,i,o)}function kh(e){let t=e.domSelection(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i,o,s=wh(n);for(;;)if(r{e.state==i&&ah(e)}),50)}function Mh(e,t,n){let r=e.state.selection;if(r instanceof Su&&!r.empty||n.indexOf("s")>-1)return!1;if(td&&n.indexOf("m")>-1)return!1;let{$from:i,$to:o}=r;if(!i.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let n=vh(e.state,t);if(n&&n instanceof Cu)return yh(e,n)}if(!i.parent.inlineContent){let n=t<0?i:o,s=r instanceof Mu?yu.near(n,t):yu.findFrom(n,t);return!!s&&yh(e,s)}return!1}function _h(e,t){if(!(e.state.selection instanceof Su))return!0;let{$head:n,$anchor:r,empty:i}=e.state.selection;if(!n.sameParent(r))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let o=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(o&&!o.isText){let r=e.state.tr;return t<0?r.delete(n.pos-o.nodeSize,n.pos):r.delete(n.pos,n.pos+o.nodeSize),e.dispatch(r),!0}return!1}function Dh(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function Th(e,t){let n=t.keyCode,r=function(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}(t);return 8==n||td&&72==n&&"c"==r?_h(e,-1)||Sh(e):46==n||td&&68==n&&"c"==r?_h(e,1)||kh(e):13==n||27==n||(37==n||td&&66==n&&"c"==r?bh(e,-1,r)||Sh(e):39==n||td&&70==n&&"c"==r?bh(e,1,r)||kh(e):38==n||td&&80==n&&"c"==r?Mh(e,-1,r)||Sh(e):40==n||td&&78==n&&"c"==r?function(e){if(!Qu||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelection();if(t&&1==t.nodeType&&0==n&&t.firstChild&&"false"==t.firstChild.contentEditable){let n=t.firstChild;Dh(e,n,"true"),setTimeout((()=>Dh(e,n,"false")),20)}return!1}(e)||Mh(e,1,r)||kh(e):r==(td?"m":"c")&&(66==n||73==n||89==n||90==n))}function $h(e,t){let n=[],{content:r,openStart:i,openEnd:o}=t;for(;i>1&&o>1&&1==r.childCount&&1==r.firstChild.childCount;){i--,o--;let e=r.firstChild;n.push(e.type.name,e.attrs!=e.type.defaultAttrs?e.attrs:null),r=e.content}let s=e.someProp("clipboardSerializer")||Rc.fromSchema(e.state.schema),a=Lh(),l=a.createElement("div");l.appendChild(s.serializeFragment(r,{document:a}));let c,u=l.firstChild,d=0;for(;u&&1==u.nodeType&&(c=jh[u.nodeName.toLowerCase()]);){for(let e=c.length-1;e>=0;e--){let t=a.createElement(c[e]);for(;l.firstChild;)t.appendChild(l.firstChild);l.appendChild(t),d++}u=l.firstChild}return u&&1==u.nodeType&&u.setAttribute("data-pm-slice",`${i} ${o}${d?` -${d}`:""} ${JSON.stringify(n)}`),{dom:l,text:e.someProp("clipboardTextSerializer",(e=>e(t)))||t.content.textBetween(0,t.content.size,"\n\n")}}function Ah(e,t,n,r,i){let o,s,a=i.parent.type.spec.code;if(!n&&!t)return null;let l=t&&(r||a||!n);if(l){if(e.someProp("transformPastedText",(e=>{t=e(t,a||r)})),a)return t?new Vl(Rl.from(e.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0):Vl.empty;let n=e.someProp("clipboardTextParser",(e=>e(t,i,r)));if(n)s=n;else{let n=i.marks(),{schema:r}=e.state,s=Rc.fromSchema(r);o=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach((e=>{let t=o.appendChild(document.createElement("p"));e&&t.appendChild(s.serializeNode(r.text(e,n)))}))}}else e.someProp("transformPastedHTML",(e=>{n=e(n)})),o=function(e){let t=/^(\s*]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n,r=Lh().createElement("div"),i=/<([a-z][^>\s]+)/i.exec(e);(n=i&&jh[i[1].toLowerCase()])&&(e=n.map((e=>"<"+e+">")).join("")+e+n.map((e=>"")).reverse().join(""));if(r.innerHTML=e,n)for(let o=0;o0&&o.firstChild;d--)o=o.firstChild;if(!s){let t=e.someProp("clipboardParser")||e.someProp("domParser")||Mc.fromSchema(e.state.schema);s=t.parseSlice(o,{preserveWhitespace:!(!l&&!u),context:i,ruleFromNode:e=>"BR"!=e.nodeName||e.nextSibling||!e.parentNode||Eh.test(e.parentNode.nodeName)?null:{ignore:!0}})}if(u)s=function(e,t){if(!e.size)return e;let n,r=e.content.firstChild.type.schema;try{n=JSON.parse(t)}catch(wy){return e}let{content:i,openStart:o,openEnd:s}=e;for(let a=n.length-2;a>=0;a-=2){let e=r.nodes[n[a]];if(!e||e.hasRequiredAttrs())break;i=Rl.from(e.create(n[a+1],i)),o++,s++}return new Vl(i,o,s)}(zh(s,+u[1],+u[2]),u[4]);else if(s=Vl.maxOpen(function(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let r,i=t.node(n).contentMatchAt(t.index(n)),o=[];if(e.forEach((e=>{if(!o)return;let t,n=i.findWrapping(e.type);if(!n)return o=null;if(t=o.length&&r.length&&Ph(n,r,e,o[o.length-1],0))o[o.length-1]=t;else{o.length&&(o[o.length-1]=Ih(o[o.length-1],r.length));let t=Nh(e,n);o.push(t),i=i.matchType(t.type),r=n}})),o)return Rl.from(o)}return e}(s.content,i),!0),s.openStart||s.openEnd){let e=0,t=0;for(let n=s.content.firstChild;e{s=e(s)})),s}const Eh=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function Nh(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,Rl.from(e));return e}function Ph(e,t,n,r,i){if(i=n&&(a=t<0?s.contentMatchAt(0).fillBefore(a,e.childCount>1||o<=i).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(Rl.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(a))}function zh(e,t,n){return t{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=t=>Jh(e,t))}))}function Jh(e,t){return e.someProp("handleDOMEvents",(n=>{let r=n[t.type];return!!r&&(r(e,t)||t.defaultPrevented)}))}function Kh(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function Yh(e){return{left:e.clientX,top:e.clientY}}function Uh(e,t,n,r,i){if(-1==r)return!1;let o=e.state.doc.resolve(r);for(let s=o.depth+1;s>0;s--)if(e.someProp(t,(t=>s>o.depth?t(e,n,o.nodeAfter,o.before(s),i,!0):t(e,n,o.node(s),o.before(s),i,!1))))return!0;return!1}function Xh(e,t,n){e.focused||e.focus();let r=e.state.tr.setSelection(t);"pointer"==n&&r.setMeta("pointer",!0),e.dispatch(r)}function Gh(e,t,n,r,i){return Uh(e,"handleClickOn",t,n,r)||e.someProp("handleClick",(n=>n(e,t,r)))||(i?function(e,t){if(-1==t)return!1;let n,r,i=e.state.selection;i instanceof Cu&&(n=i.node);let o=e.state.doc.resolve(t);for(let s=o.depth+1;s>0;s--){let e=s>o.depth?o.nodeAfter:o.node(s);if(Cu.isSelectable(e)){r=n&&i.$from.depth>0&&s>=i.$from.depth&&o.before(i.$from.depth+1)==i.$from.pos?o.before(i.$from.depth):o.before(s);break}}return null!=r&&(Xh(e,Cu.create(e.state.doc,r),"pointer"),!0)}(e,n):function(e,t){if(-1==t)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return!!(r&&r.isAtom&&Cu.isSelectable(r))&&(Xh(e,new Cu(n),"pointer"),!0)}(e,n))}function Zh(e,t,n,r){return Uh(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",(n=>n(e,t,r)))}function Qh(e,t,n,r){return Uh(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",(n=>n(e,t,r)))||function(e,t,n){if(0!=n.button)return!1;let r=e.state.doc;if(-1==t)return!!r.inlineContent&&(Xh(e,Su.create(r,0,r.content.size),"pointer"),!0);let i=r.resolve(t);for(let o=i.depth+1;o>0;o--){let t=o>i.depth?i.nodeAfter:i.node(o),n=i.before(o);if(t.inlineContent)Xh(e,Su.create(r,n+1,n+1+t.content.size),"pointer");else{if(!Cu.isSelectable(t))continue;Xh(e,Cu.create(r,n),"pointer")}return!0}}(e,n,r)}function ef(e){return lf(e)}Vh.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=16==n.keyCode||n.shiftKey,!rf(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!nd||!Gu||13!=n.keyCode))if(229!=n.keyCode&&e.domObserver.forceFlush(),!ed||13!=n.keyCode||n.ctrlKey||n.altKey||n.metaKey)e.someProp("handleKeyDown",(t=>t(e,n)))||Th(e,n)?n.preventDefault():qh(e,"key");else{let t=Date.now();e.input.lastIOSEnter=t,e.input.lastIOSEnterFallbackTimeout=setTimeout((()=>{e.input.lastIOSEnter==t&&(e.someProp("handleKeyDown",(t=>t(e,md(13,"Enter")))),e.input.lastIOSEnter=0)}),200)}},Vh.keyup=(e,t)=>{16==t.keyCode&&(e.input.shiftKey=!1)},Vh.keypress=(e,t)=>{let n=t;if(rf(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||td&&n.metaKey)return;if(e.someProp("handleKeyPress",(t=>t(e,n))))return void n.preventDefault();let r=e.state.selection;if(!(r instanceof Su&&r.$from.sameParent(r.$to))){let t=String.fromCharCode(n.charCode);e.someProp("handleTextInput",(n=>n(e,r.$from.pos,r.$to.pos,t)))||e.dispatch(e.state.tr.insertText(t).scrollIntoView()),n.preventDefault()}};const tf=td?"metaKey":"ctrlKey";Bh.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=ef(e),i=Date.now(),o="singleClick";i-e.input.lastClick.time<500&&function(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}(n,e.input.lastClick)&&!n[tf]&&("singleClick"==e.input.lastClick.type?o="doubleClick":"doubleClick"==e.input.lastClick.type&&(o="tripleClick")),e.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:o};let s=e.posAtCoords(Yh(n));s&&("singleClick"==o?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new nf(e,s,n,!!r)):("doubleClick"==o?Zh:Qh)(e,s.pos,s.inside,n)?n.preventDefault():qh(e,"pointer"))};class nf{constructor(e,t,n,r){let i,o;if(this.view=e,this.pos=t,this.event=n,this.flushed=r,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!n[tf],this.allowDefault=n.shiftKey,t.inside>-1)i=e.state.doc.nodeAt(t.inside),o=t.inside;else{let n=e.state.doc.resolve(t.pos);i=n.parent,o=n.depth?n.before():0}const s=r?null:n.target,a=s?e.docView.nearestDesc(s,!0):null;this.target=a?a.dom:null;let{selection:l}=e.state;(0==n.button&&i.type.spec.draggable&&!1!==i.type.spec.selectable||l instanceof Cu&&l.from<=o&&l.to>o)&&(this.mightDrag={node:i,pos:o,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!Uu||this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),qh(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout((()=>ah(this.view))),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(Yh(e))),this.allowDefault||!t?qh(this.view,"pointer"):Gh(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():0==e.button&&(this.flushed||Qu&&this.mightDrag&&!this.mightDrag.node.isAtom||Gu&&!(this.view.state.selection instanceof Su)&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(Xh(this.view,yu.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):qh(this.view,"pointer")}move(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0),qh(this.view,"pointer"),0==e.buttons&&this.done()}}function rf(e,t){return!!e.composing||!!(Qu&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500)&&(e.input.compositionEndedAt=-2e8,!0)}Bh.touchdown=e=>{ef(e),qh(e,"pointer")},Bh.contextmenu=e=>ef(e);const of=nd?5e3:-1;function sf(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout((()=>lf(e)),t))}function af(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=function(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function lf(e,t=!1){if(!(nd&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),af(e),t||e.docView&&e.docView.dirty){let t=oh(e);return t&&!t.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(t)):e.updateState(e.state),!0}return!1}}Vh.compositionstart=Vh.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((e=>!1===e.type.spec.inclusive))))e.markCursor=e.state.storedMarks||n.marks(),lf(e,!0),e.markCursor=null;else if(lf(e),Uu&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let t=e.domSelection();for(let e=t.focusNode,n=t.focusOffset;e&&1==e.nodeType&&0!=n;){let r=n<0?e.lastChild:e.childNodes[n-1];if(!r)break;if(3==r.nodeType){t.collapse(r,r.nodeValue.length);break}e=r,n=-1}}e.input.composing=!0}sf(e,of)},Vh.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,sf(e,20))};const cf=Ku&&Yu<15||ed&&id<604;function uf(e,t,n,r){let i=Ah(e,t,n,e.input.shiftKey,e.state.selection.$from);if(e.someProp("handlePaste",(t=>t(e,r,i||Vl.empty))))return!0;if(!i)return!1;let o=function(e){return 0==e.openStart&&0==e.openEnd&&1==e.content.childCount?e.content.firstChild:null}(i),s=o?e.state.tr.replaceSelectionWith(o,e.input.shiftKey):e.state.tr.replaceSelection(i);return e.dispatch(s.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}Bh.copy=Vh.cut=(e,t)=>{let n=t,r=e.state.selection,i="cut"==n.type;if(r.empty)return;let o=cf?null:n.clipboardData,s=r.content(),{dom:a,text:l}=$h(e,s);o?(n.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",l)):function(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),i=document.createRange();i.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout((()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()}),50)}(e,a),i&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},Vh.paste=(e,t)=>{let n=t;if(e.composing&&!nd)return;let r=cf?null:n.clipboardData;r&&uf(e,r.getData("text/plain"),r.getData("text/html"),n)?n.preventDefault():function(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus(),setTimeout((()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?uf(e,r.value,null,t):uf(e,r.textContent,r.innerHTML,t)}),50)}(e,n)};class df{constructor(e,t){this.slice=e,this.move=t}}const hf=td?"altKey":"ctrlKey";Bh.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let i=e.state.selection,o=i.empty?null:e.posAtCoords(Yh(n));if(o&&o.pos>=i.from&&o.pos<=(i instanceof Cu?i.to-1:i.to));else if(r&&r.mightDrag)e.dispatch(e.state.tr.setSelection(Cu.create(e.state.doc,r.mightDrag.pos)));else if(n.target&&1==n.target.nodeType){let t=e.docView.nearestDesc(n.target,!0);t&&t.node.type.spec.draggable&&t!=e.docView&&e.dispatch(e.state.tr.setSelection(Cu.create(e.state.doc,t.posBefore)))}let s=e.state.selection.content(),{dom:a,text:l}=$h(e,s);n.dataTransfer.clearData(),n.dataTransfer.setData(cf?"Text":"text/html",a.innerHTML),n.dataTransfer.effectAllowed="copyMove",cf||n.dataTransfer.setData("text/plain",l),e.dragging=new df(s,!n[hf])},Bh.dragend=e=>{let t=e.dragging;window.setTimeout((()=>{e.dragging==t&&(e.dragging=null)}),50)},Vh.dragover=Vh.dragenter=(e,t)=>t.preventDefault(),Vh.drop=(e,t)=>{let n=t,r=e.dragging;if(e.dragging=null,!n.dataTransfer)return;let i=e.posAtCoords(Yh(n));if(!i)return;let o=e.state.doc.resolve(i.pos);if(!o)return;let s=r&&r.slice;s?e.someProp("transformPasted",(e=>{s=e(s)})):s=Ah(e,n.dataTransfer.getData(cf?"Text":"text/plain"),cf?null:n.dataTransfer.getData("text/html"),!1,o);let a=!(!r||n[hf]);if(e.someProp("handleDrop",(t=>t(e,n,s||Vl.empty,a))))return void n.preventDefault();if(!s)return;n.preventDefault();let l=s?function(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let i=n.content;for(let o=0;o=0;e--){let t=e==r.depth?0:r.pos<=(r.start(e+1)+r.end(e+1))/2?-1:1,n=r.index(e)+(t>0?1:0),s=r.node(e),a=!1;if(1==o)a=s.canReplace(n,n,i);else{let e=s.contentMatchAt(n).findWrapping(i.firstChild.type);a=e&&s.canReplaceWith(n,n,e[0])}if(a)return 0==t?r.pos:t<0?r.before(e+1):r.after(e+1)}return null}(e.state.doc,o.pos,s):o.pos;null==l&&(l=o.pos);let c=e.state.tr;a&&c.deleteSelection();let u=c.mapping.map(l),d=0==s.openStart&&0==s.openEnd&&1==s.content.childCount,h=c.doc;if(d?c.replaceRangeWith(u,u,s.content.firstChild):c.replaceRange(u,u,s),c.doc.eq(h))return;let f=c.doc.resolve(u);if(d&&Cu.isSelectable(s.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(s.content.firstChild))c.setSelection(new Cu(f));else{let t=c.mapping.map(l);c.mapping.maps[c.mapping.maps.length-1].forEach(((e,n,r,i)=>t=i)),c.setSelection(ph(e,f,c.doc.resolve(t)))}e.focus(),e.dispatch(c.setMeta("uiEvent","drop"))},Bh.focus=e=>{e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout((()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelection())&&ah(e)}),20))},Bh.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)},Bh.beforeinput=(e,t)=>{if(Gu&&nd&&"deleteContentBackward"==t.inputType){e.domObserver.flushSoon();let{domChangeCount:t}=e.input;setTimeout((()=>{if(e.input.domChangeCount!=t)return;if(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",(t=>t(e,md(8,"Backspace")))))return;let{$cursor:n}=e.state.selection;n&&n.pos>0&&e.dispatch(e.state.tr.delete(n.pos-1,n.pos).scrollIntoView())}),50)}};for(let os in Vh)Bh[os]=Vh[os];function ff(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class pf{constructor(e,t){this.toDOM=e,this.spec=t||bf,this.side=this.spec.side||0}map(e,t,n,r){let{pos:i,deleted:o}=e.mapResult(t.from+r,this.side<0?-1:1);return o?null:new vf(i-n,i-n,this)}valid(){return!0}eq(e){return this==e||e instanceof pf&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&ff(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class mf{constructor(e,t){this.attrs=e,this.spec=t||bf}map(e,t,n,r){let i=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,o=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return i>=o?null:new vf(i,o,this)}valid(e,t){return t.from=e&&(!i||i(s.spec))&&n.push(s.copy(s.from+r,s.to+r))}for(let o=0;oe){let s=this.children[o]+1;this.children[o+2].findInner(e-s,t-s,n,r+s,i)}}map(e,t,n){return this==xf||0==e.maps.length?this:this.mapInner(e,t,0,0,n||bf)}mapInner(e,t,n,r,i){let o;for(let s=0;s{for(let s=0;sc+o)continue;let u=a[s]+o;t>=u?a[s+1]=e<=u?-2:-1:n>=i&&(l=r-n-(t-e))&&(a[s]+=l,a[s+1]+=l)}};for(let u=0;u=r.content.size){c=!0;continue}let d=n.map(e[u+1]+o,-1)-i,{index:h,offset:f}=r.content.findIndex(l),p=r.maybeChild(h);if(p&&f==l&&f+p.nodeSize==d){let r=a[u+2].mapInner(n,p,t+1,e[u]+o+1,s);r!=xf?(a[u]=l,a[u+1]=d,a[u+2]=r):(a[u+1]=-2,c=!0)}else c=!0}if(c){let l=function(e,t,n,r,i,o,s){function a(e,t){for(let o=0;o{let s,a=o+n;if(s=Cf(t,e,a)){for(r||(r=this.children.slice());io&&t.to=e){this.children[s]==e&&(n=this.children[s+2]);break}let i=e+1,o=i+t.content.size;for(let s=0;si&&e.type instanceof mf){let t=Math.max(i,e.from)-i,n=Math.min(o,e.to)-i;tn.map(e,t,bf)));return Sf.from(n)}forChild(e,t){if(t.isLeaf)return wf.empty;let n=[];for(let r=0;rn&&o.to{let a=Cf(e,t,s+n);if(a){o=!0;let e=Mf(a,t,n+s+1,r);e!=xf&&i.push(s,s+t.nodeSize,e)}}));let s=kf(o?Of(e):e,-n).sort(_f);for(let a=0;a0;)t++;e.splice(t,0,n)}function $f(e){let t=[];return e.someProp("decorations",(n=>{let r=n(e.state);r&&r!=xf&&t.push(r)})),e.cursorWrapper&&t.push(wf.create(e.state.doc,[e.cursorWrapper.deco])),Sf.from(t)}const Af={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Ef=Ku&&Yu<=11;class Nf{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class Pf{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Nf,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver((e=>{for(let t=0;t"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length))?this.flushSoon():this.flush()})),Ef&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout((()=>{this.flushingSoon=-1,this.flush()}),20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&this.observer.observe(this.view.dom,Af),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;tthis.flush()),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout((()=>this.suppressingSelectionUpdates=!1),50)}onSelectionChange(){if(mh(this.view)){if(this.suppressingSelectionUpdates)return ah(this.view);if(Ku&&Yu<=11&&!this.view.state.selection.empty){let e=this.view.domSelection();if(e.focusNode&&cd(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelection())}ignoreSelectionChange(e){if(0==e.rangeCount)return!0;let t=e.getRangeAt(0).commonAncestorContainer,n=this.view.docView.nearestDesc(t);return n&&n.ignoreMutation({type:"selection",target:3==t.nodeType?t.parentNode:t})?(this.setCurSelection(),!0):void 0}flush(){if(!this.view.docView||this.flushingSoon>-1)return;let e=this.observer?this.observer.takeRecords():[];this.queue.length&&(e=this.queue.concat(e),this.queue.length=0);let t=this.view.domSelection(),n=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(t)&&mh(this.view)&&!this.ignoreSelectionChange(t),r=-1,i=-1,o=!1,s=[];if(this.view.editable)for(let a=0;a1){let e=s.filter((e=>"BR"==e.nodeName));if(2==e.length){let t=e[0],n=e[1];t.parentNode&&t.parentNode.parentNode==n.parentNode?n.remove():t.remove()}}(r>-1||n)&&(r>-1&&(this.view.docView.markDirty(r,i),function(e){if(If)return;If=!0,"normal"==getComputedStyle(e.dom).whiteSpace&&console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package.")}(this.view)),this.handleDOMChange(r,i,o,s),this.view.docView&&this.view.docView.dirty?this.view.updateState(this.view.state):this.currentSelection.eq(t)||ah(this.view),this.currentSelection.set(t))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let n=this.view.docView.nearestDesc(e.target);if("attributes"==e.type&&(n==this.view.docView||"contenteditable"==e.attributeName||"style"==e.attributeName&&!e.oldValue&&!e.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(e))return null;if("childList"==e.type){for(let n=0;nDate.now()-50?e.input.lastSelectionOrigin:null,n=oh(e,t);if(n&&!e.state.selection.eq(n)){let r=e.state.tr.setSelection(n);"pointer"==t?r.setMeta("pointer",!0):"key"==t&&r.scrollIntoView(),e.dispatch(r)}return}let o=e.state.doc.resolve(t),s=o.sharedDepth(n);t=o.before(s+1),n=e.state.doc.resolve(n).after(s+1);let a=e.state.selection,l=function(e,t,n){let r,{node:i,fromOffset:o,toOffset:s,from:a,to:l}=e.docView.parseRange(t,n),c=e.domSelection(),u=c.anchorNode;if(u&&e.dom.contains(1==u.nodeType?u:u.parentNode)&&(r=[{node:u,offset:c.anchorOffset}],pd(c)||r.push({node:c.focusNode,offset:c.focusOffset})),Gu&&8===e.input.lastKeyCode)for(let g=s;g>o;g--){let e=i.childNodes[g-1],t=e.pmViewDesc;if("BR"==e.nodeName&&!t){s=g;break}if(!t||t.size)break}let d=e.state.doc,h=e.someProp("domParser")||Mc.fromSchema(e.state.schema),f=d.resolve(a),p=null,m=h.parse(i,{topNode:f.parent,topMatch:f.parent.contentMatchAt(f.index()),topOpen:!0,from:o,to:s,preserveWhitespace:"pre"!=f.parent.type.whitespace||"full",findPositions:r,ruleFromNode:Rf,context:f});if(r&&null!=r[0].pos){let e=r[0].pos,t=r[1]&&r[1].pos;null==t&&(t=e),p={anchor:e+a,head:t+a}}return{doc:m,sel:p,from:a,to:l}}(e,t,n);if(Gu&&e.cursorWrapper&&l.sel&&l.sel.anchor==e.cursorWrapper.deco.from){let t=e.cursorWrapper.deco.type.toDOM.nextSibling,n=t&&t.nodeValue?t.nodeValue.length:1;l.sel={anchor:l.sel.anchor+n,head:l.sel.anchor+n}}let c,u,d=e.state.doc,h=d.slice(l.from,l.to);8===e.input.lastKeyCode&&Date.now()-100=s?o-r:0,a=o+(a-s),s=o}else if(a=a?o-r:0,s=o+(s-a),a=o}return{start:o,endA:s,endB:a}}(h.content,l.doc.content,l.from,c,u);if((ed&&e.input.lastIOSEnter>Date.now()-225||nd)&&i.some((e=>"DIV"==e.nodeName||"P"==e.nodeName))&&(!f||f.endA>=f.endB)&&e.someProp("handleKeyDown",(t=>t(e,md(13,"Enter")))))return void(e.input.lastIOSEnter=0);if(!f){if(!(r&&a instanceof Su&&!a.empty&&a.$head.sameParent(a.$anchor))||e.composing||l.sel&&l.sel.anchor!=l.sel.head){if(l.sel){let t=jf(e,e.state.doc,l.sel);t&&!t.eq(e.state.selection)&&e.dispatch(e.state.tr.setSelection(t))}return}f={start:a.from,endA:a.to,endB:a.to}}e.input.domChangeCount++,e.state.selection.frome.state.selection.from&&f.start<=e.state.selection.from+2&&e.state.selection.from>=l.from?f.start=e.state.selection.from:f.endA=e.state.selection.to-2&&e.state.selection.to<=l.to&&(f.endB+=e.state.selection.to-f.endA,f.endA=e.state.selection.to)),Ku&&Yu<=11&&f.endB==f.start+1&&f.endA==f.start&&f.start>l.from&&"  "==l.doc.textBetween(f.start-l.from-1,f.start-l.from+1)&&(f.start--,f.endA--,f.endB--);let p,m=l.doc.resolveNoCache(f.start-l.from),g=l.doc.resolveNoCache(f.endB-l.from),v=d.resolve(f.start),y=m.sameParent(g)&&m.parent.inlineContent&&v.end()>=f.endA;if((ed&&e.input.lastIOSEnter>Date.now()-225&&(!y||i.some((e=>"DIV"==e.nodeName||"P"==e.nodeName)))||!y&&m.post(e,md(13,"Enter")))))return void(e.input.lastIOSEnter=0);if(e.state.selection.anchor>f.start&&function(e,t,n,r,i){if(!r.parent.isTextblock||n-t<=i.pos-r.pos||Ff(r,!0,!1)n||Ff(s,!0,!1)t(e,md(8,"Backspace")))))return void(nd&&Gu&&e.domObserver.suppressSelectionUpdates());Gu&&nd&&f.endB==f.start&&(e.input.lastAndroidDelete=Date.now()),nd&&!y&&m.start()!=g.start()&&0==g.parentOffset&&m.depth==g.depth&&l.sel&&l.sel.anchor==l.sel.head&&l.sel.head==f.endA&&(f.endB-=2,g=l.doc.resolveNoCache(f.endB-l.from),setTimeout((()=>{e.someProp("handleKeyDown",(function(t){return t(e,md(13,"Enter"))}))}),20));let b,w,x,S=f.start,k=f.endA;if(y)if(m.pos==g.pos)Ku&&Yu<=11&&0==m.parentOffset&&(e.domObserver.suppressSelectionUpdates(),setTimeout((()=>ah(e)),20)),b=e.state.tr.delete(S,k),w=d.resolve(f.start).marksAcross(d.resolve(f.endA));else if(f.endA==f.endB&&(x=function(e,t){let n,r,i,o=e.firstChild.marks,s=t.firstChild.marks,a=o,l=s;for(let u=0;ue.mark(r.addToSet(e.marks));else{if(0!=a.length||1!=l.length)return null;r=l[0],n="remove",i=e=>e.mark(r.removeFromSet(e.marks))}let c=[];for(let u=0;un(e,S,k,t))))return;b=e.state.tr.insertText(t,S,k)}if(b||(b=e.state.tr.replace(S,k,l.doc.slice(f.start-l.from,f.endB-l.from))),l.sel){let t=jf(e,b.doc,l.sel);t&&!(Gu&&nd&&e.composing&&t.empty&&(f.start!=f.endB||e.input.lastAndroidDeletet.content.size?null:ph(e,t.resolve(n.anchor),t.resolve(n.head))}function Ff(e,t,n){let r=e.depth,i=t?e.end():e.pos;for(;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,i++,t=!1;if(n){let t=e.node(r).maybeChild(e.indexAfter(r));for(;t&&!t.isLeaf;)t=t.firstChild,i++}return i}class Lf{constructor(e,t){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new Wh,this.prevDirectPlugins=[],this.pluginViews=[],this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(Hf),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):"function"==typeof e?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=Wf(this),Vf(this),this.nodeViews=qf(this),this.docView=Wd(this.state.doc,Bf(this),$f(this),this.dom,this),this.domObserver=new Pf(this,((e,t,n,r)=>zf(this,e,t,n,r))),this.domObserver.start(),function(e){for(let t in Bh){let n=Bh[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=t=>{!Kh(e,t)||Jh(e,t)||!e.editable&&t.type in Vh||n(e,t)})}Qu&&e.dom.addEventListener("input",(()=>null)),Hh(e)}(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&Hh(this),this._props=e,e.plugins&&(e.plugins.forEach(Hf),this.directPlugins=e.plugins),this.updateStateInner(e.state,!0)}setProps(e){let t={};for(let n in this._props)t[n]=this._props[n];t.state=this.state;for(let n in e)t[n]=e[n];this.update(t)}updateState(e){this.updateStateInner(e,this.state.plugins!=e.plugins)}updateStateInner(e,t){let n=this.state,r=!1,i=!1;if(e.storedMarks&&this.composing&&(af(this),i=!0),this.state=e,t){let e=qf(this);(function(e,t){let n=0,r=0;for(let i in e){if(e[i]!=t[i])return!0;n++}for(let i in t)r++;return n!=r})(e,this.nodeViews)&&(this.nodeViews=e,r=!0),Hh(this)}this.editable=Wf(this),Vf(this);let o=$f(this),s=Bf(this),a=t?"reset":e.scrollToSelection>n.scrollToSelection?"to selection":"preserve",l=r||!this.docView.matchesNode(e.doc,s,o);!l&&e.selection.eq(n.selection)||(i=!0);let c="preserve"==a&&i&&null==this.dom.style.overflowAnchor&&function(e){let t,n,r=e.dom.getBoundingClientRect(),i=Math.max(0,r.top);for(let o=(r.left+r.right)/2,s=i+1;s=i-20){t=r,n=a.top;break}}return{refDOM:t,refTop:n,stack:wd(e.dom)}}(this);if(i){this.domObserver.stop();let t=l&&(Ku||Gu)&&!this.composing&&!n.selection.empty&&!e.selection.empty&&function(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}(n.selection,e.selection);if(l){let n=Gu?this.trackWrites=this.domSelection().focusNode:null;!r&&this.docView.update(e.doc,s,o,this)||(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=Wd(e.doc,s,o,this.dom,this)),n&&!this.trackWrites&&(t=!0)}t||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelection())&&function(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelection();return cd(t.node,t.offset,n.anchorNode,n.anchorOffset)}(this))?ah(this,t):(hh(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}if(this.updatePluginViews(n),"reset"==a)this.dom.scrollTop=0;else if("to selection"==a){let t=this.domSelection().focusNode;if(this.someProp("handleScrollToSelection",(e=>e(this))));else if(e.selection instanceof Cu){let n=this.docView.domAfterPos(e.selection.from);1==n.nodeType&&bd(this,n.getBoundingClientRect(),t)}else bd(this,this.coordsAtPos(e.selection.head,1),t)}else c&&function({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;xd(n,0==r?0:r-t)}(c)}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(e&&e.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(let t=0;tt.ownerDocument.getSelection()),this._root=t;return e||document}posAtCoords(e){return Md(this,e)}coordsAtPos(e,t=1){return Td(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,n=-1){let r=this.docView.posFromDOM(e,t,n);if(null==r)throw new RangeError("DOM position not inside the editor");return r}endOfTextblock(e,t){return zd(this,t||this.state,e)}destroy(){this.docView&&(!function(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],$f(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)}get isDestroyed(){return null==this.docView}dispatchEvent(e){return function(e,t){Jh(e,t)||!Bh[t.type]||!e.editable&&t.type in Vh||Bh[t.type](e,t)}(this,e)}dispatch(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))}domSelection(){return this.root.getSelection()}}function Bf(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),t.translate="no",e.someProp("attributes",(n=>{if("function"==typeof n&&(n=n(e.state)),n)for(let e in n)"class"==e&&(t.class+=" "+n[e]),"style"==e?t.style=(t.style?t.style+";":"")+n[e]:t[e]||"contenteditable"==e||"nodeName"==e||(t[e]=String(n[e]))})),[vf.node(0,e.state.doc.content.size,t)]}function Vf(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:vf.widget(e.state.selection.head,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function Wf(e){return!e.someProp("editable",(t=>!1===t(e.state)))}function qf(e){let t=Object.create(null);return e.someProp("nodeViews",(e=>{for(let n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n])})),t}function Hf(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}for(var Jf={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",229:"q"},Kf={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"',229:"Q"},Yf="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),Uf="undefined"!=typeof navigator&&/Apple Computer/.test(navigator.vendor),Xf="undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),Gf="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),Zf="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Qf=Yf&&(Gf||+Yf[1]<57)||Xf&&Gf,ep=0;ep<10;ep++)Jf[48+ep]=Jf[96+ep]=String(ep);for(ep=1;ep<=24;ep++)Jf[ep+111]="F"+ep;for(ep=65;ep<=90;ep++)Jf[ep]=String.fromCharCode(ep+32),Kf[ep]=String.fromCharCode(ep);for(var tp in Jf)Kf.hasOwnProperty(tp)||(Kf[tp]=Jf[tp]);const np="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function rp(e){let t,n,r,i,o=e.split(/-(?!$)/),s=o[o.length-1];"Space"==s&&(s=" ");for(let a=0;a127)&&(r=Jf[n.keyCode])&&r!=i){let i=t[ip(r,n,!0)];if(i&&i(e.state,e.dispatch,e))return!0}else if(o&&n.shiftKey){let r=t[ip(i,n,!0)];if(r&&r(e.state,e.dispatch,e))return!0}return!1}}const ap=(e,t)=>!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function lp(e,t,n=!1){for(let r=e;r;r="start"==t?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&1!=r.childCount)return!1}return!1}function cp(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function up(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),o=n.indexAfter(-1),s=dp(i.contentMatchAt(o));if(!s||!i.canReplaceWith(o,o,s))return!1;if(t){let r=n.after(),i=e.tr.replaceWith(r,r,s.createAndFill());i.setSelection(yu.near(i.doc.resolve(r),1)),t(i.scrollIntoView())}return!0};function fp(e,t,n){let r,i,o=t.nodeBefore,s=t.nodeAfter;if(o.type.spec.isolating||s.type.spec.isolating)return!1;if(function(e,t,n){let r=t.nodeBefore,i=t.nodeAfter,o=t.index();return!(!(r&&i&&r.type.compatibleContent(i.type))||(!r.content.size&&t.parent.canReplace(o-1,o)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),0):!t.parent.canReplace(o,o+1)||!i.isTextblock&&!iu(e.doc,t.pos)||(n&&n(e.tr.clearIncompatible(t.pos,r.type,r.contentMatchAt(r.childCount)).join(t.pos).scrollIntoView()),0)))}(e,t,n))return!0;let a=t.parent.canReplace(t.index(),t.index()+1);if(a&&(r=(i=o.contentMatchAt(o.childCount)).findWrapping(s.type))&&i.matchType(r[0]||s.type).validEnd){if(n){let i=t.pos+s.nodeSize,a=Rl.empty;for(let e=r.length-1;e>=0;e--)a=Rl.from(r[e].create(null,a));a=Rl.from(o.copy(a));let l=e.tr.step(new Gc(t.pos-1,i,t.pos,i,new Vl(a,1,0),r.length,!0)),c=i+2*r.length;iu(l.doc,c)&&l.join(c),n(l.scrollIntoView())}return!0}let l=yu.findFrom(t,1),c=l&&l.$from.blockRange(l.$to),u=c&&eu(c);if(null!=u&&u>=t.depth)return n&&n(e.tr.lift(c,u).scrollIntoView()),!0;if(a&&lp(s,"start",!0)&&lp(o,"end")){let r=o,i=[];for(;i.push(r),!r.isTextblock;)r=r.lastChild;let a=s,l=1;for(;!a.isTextblock;a=a.firstChild)l++;if(r.canReplace(r.childCount,r.childCount,a.content)){if(n){let r=Rl.empty;for(let e=i.length-1;e>=0;e--)r=Rl.from(i[e].copy(r));n(e.tr.step(new Gc(t.pos-i.length,t.pos+s.nodeSize,t.pos+l,t.pos+s.nodeSize-l,new Vl(r,i.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function pp(e){return function(t,n){let r=t.selection,i=e<0?r.$from:r.$to,o=i.depth;for(;i.node(o).isInline;){if(!o)return!1;o--}return!!i.node(o).isTextblock&&(n&&n(t.tr.setSelection(Su.create(t.doc,e<0?i.start(o):i.end(o)))),!0)}}const mp=pp(-1),gp=pp(1);function vp(e,t=null){return function(n,r){let{from:i,to:o}=n.selection,s=!1;return n.doc.nodesBetween(i,o,((r,i)=>{if(s)return!1;if(r.isTextblock&&!r.hasMarkup(e,t))if(r.type==e)s=!0;else{let t=n.doc.resolve(i),r=t.index();s=t.parent.canReplaceWith(r,r+1,e)}})),!!s&&(r&&r(n.tr.setBlockType(i,o,e,t).scrollIntoView()),!0)}}function yp(e,t=null){return function(n,r){let{empty:i,$cursor:o,ranges:s}=n.selection;if(i&&!o||!function(e,t,n){for(let r=0;r{if(s)return!1;s=e.inlineContent&&e.type.allowsMarkType(n)})),s)return!0}return!1}(n.doc,s,e))return!1;if(r)if(o)e.isInSet(n.storedMarks||o.marks())?r(n.tr.removeStoredMark(e)):r(n.tr.addStoredMark(e.create(t)));else{let i=!1,o=n.tr;for(let t=0;!i&&t{let{$cursor:r}=e.selection;if(!r||(n?!n.endOfTextblock("backward",e):r.parentOffset>0))return!1;let i=cp(r);if(!i){let n=r.blockRange(),i=n&&eu(n);return null!=i&&(t&&t(e.tr.lift(n,i).scrollIntoView()),!0)}let o=i.nodeBefore;if(!o.type.spec.isolating&&fp(e,i,t))return!0;if(0==r.parent.content.size&&(lp(o,"end")||Cu.isSelectable(o))){let n=ou(e.doc,r.before(),r.after(),Vl.empty);if(n&&n.slice.size{let{$head:r,empty:i}=e.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;o=cp(r)}let s=o&&o.nodeBefore;return!(!s||!Cu.isSelectable(s))&&(t&&t(e.tr.setSelection(Cu.create(e.doc,o.pos-s.nodeSize)).scrollIntoView()),!0)})),xp=bp(ap,((e,t,n)=>{let{$cursor:r}=e.selection;if(!r||(n?!n.endOfTextblock("forward",e):r.parentOffset{let{$head:r,empty:i}=e.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset{let{$head:n,$anchor:r}=e.selection;return!(!n.parent.type.spec.code||!n.sameParent(r))&&(t&&t(e.tr.insertText("\n").scrollIntoView()),!0)}),((e,t)=>{let n=e.selection,{$from:r,$to:i}=n;if(n instanceof Mu||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=dp(i.parent.contentMatchAt(i.indexAfter()));if(!o||!o.isTextblock)return!1;if(t){let n=(!r.parentOffset&&i.index(){let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let r=n.before();if(ru(e.doc,r))return t&&t(e.tr.split(r).scrollIntoView()),!0}let r=n.blockRange(),i=r&&eu(r);return null!=i&&(t&&t(e.tr.lift(r,i).scrollIntoView()),!0)}),((e,t)=>{let{$from:n,$to:r}=e.selection;if(e.selection instanceof Cu&&e.selection.node.isBlock)return!(!n.parentOffset||!ru(e.doc,n.pos))&&(t&&t(e.tr.split(n.pos).scrollIntoView()),!0);if(!n.parent.isBlock)return!1;if(t){let i=r.parentOffset==r.parent.content.size,o=e.tr;(e.selection instanceof Su||e.selection instanceof Mu)&&o.deleteSelection();let s=0==n.depth?null:dp(n.node(-1).contentMatchAt(n.indexAfter(-1))),a=i&&s?[{type:s}]:void 0,l=ru(o.doc,o.mapping.map(n.pos),1,a);if(a||l||!ru(o.doc,o.mapping.map(n.pos),1,s?[{type:s}]:void 0)||(s&&(a=[{type:s}]),l=!0),l&&(o.split(o.mapping.map(n.pos),1,a),!i&&!n.parentOffset&&n.parent.type!=s)){let e=o.mapping.map(n.before()),t=o.doc.resolve(e);s&&n.node(-1).canReplaceWith(t.index(),t.index()+1,s)&&o.setNodeMarkup(o.mapping.map(n.before()),s)}t(o.scrollIntoView())}return!0})),"Mod-Enter":hp,Backspace:wp,"Mod-Backspace":wp,"Shift-Backspace":wp,Delete:xp,"Mod-Delete":xp,"Mod-a":(e,t)=>(t&&t(e.tr.setSelection(new Mu(e.doc))),!0)},kp={"Ctrl-h":Sp.Backspace,"Alt-Backspace":Sp["Mod-Backspace"],"Ctrl-d":Sp.Delete,"Ctrl-Alt-Backspace":Sp["Mod-Delete"],"Alt-Delete":Sp["Mod-Delete"],"Alt-d":Sp["Mod-Delete"],"Ctrl-a":mp,"Ctrl-e":gp};for(let os in Sp)kp[os]=Sp[os];const Cp=("undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!("undefined"==typeof os||!os.platform)&&"darwin"==os.platform())?kp:Sp;class Op{constructor(e,t){var n;this.match=e,this.match=e,this.handler="string"==typeof t?(n=t,function(e,t,r,i){let o=n;if(t[1]){let e=t[0].lastIndexOf(t[1]);o+=t[0].slice(e+t[1].length);let n=(r+=e)-i;n>0&&(o=t[0].slice(e-n,e)+o,r=i)}return e.tr.insertText(o,r,i)}):t}}function Mp({rules:e}){let t=new zu({state:{init:()=>null,apply(e,t){let n=e.getMeta(this);return n||(e.selectionSet||e.docChanged?null:t)}},props:{handleTextInput:(n,r,i,o)=>_p(n,r,i,o,e,t),handleDOMEvents:{compositionend:n=>{setTimeout((()=>{let{$cursor:r}=n.state.selection;r&&_p(n,r.pos,r.pos,"",e,t)}))}}},isInputRules:!0});return t}function _p(e,t,n,r,i,o){if(e.composing)return!1;let s=e.state,a=s.doc.resolve(t);if(a.parent.type.spec.code)return!1;let l=a.parent.textBetween(Math.max(0,a.parentOffset-500),a.parentOffset,null,"")+r;for(let c=0;c{let n=e.plugins;for(let r=0;r=0;e--)n.step(r.steps[e].invert(r.docs[e]));if(i.text){let t=n.doc.resolve(i.from).marks();n.replaceWith(i.from,i.to,e.schema.text(i.text,t))}else n.delete(i.from,i.to);t(n)}return!0}}return!1};function Tp(e,t,n=null,r){return new Op(e,((e,i,o,s)=>{let a=n instanceof Function?n(i):n,l=e.tr.delete(o,s),c=l.doc.resolve(o).blockRange(),u=c&&tu(c,t,a);if(!u)return null;l.wrap(c,u);let d=l.doc.resolve(o-1).nodeBefore;return d&&d.type==t&&iu(l.doc,o-1)&&(!r||r(i,d))&&l.join(o-1),l}))}function $p(e,t,n=null){return new Op(e,((e,r,i,o)=>{let s=e.doc.resolve(i),a=n instanceof Function?n(r):n;return s.node(-1).canReplaceWith(s.index(-1),s.indexAfter(-1),t)?e.tr.delete(i,o).setBlockType(i,i,t,a):null}))}new Op(/--$/,"—"),new Op(/\.\.\.$/,"…"),new Op(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“"),new Op(/"$/,"”"),new Op(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"‘"),new Op(/'$/,"’");const Ap=["ol",0],Ep=["ul",0],Np=["li",0],Pp={attrs:{order:{default:1}},parseDOM:[{tag:"ol",getAttrs:e=>({order:e.hasAttribute("start")?+e.getAttribute("start"):1})}],toDOM:e=>1==e.attrs.order?Ap:["ol",{start:e.attrs.order},0]},Ip={parseDOM:[{tag:"ul"}],toDOM:()=>Ep},Rp={parseDOM:[{tag:"li"}],toDOM:()=>Np,defining:!0};function zp(e,t){let n={};for(let r in e)n[r]=e[r];for(let r in t)n[r]=t[r];return n}function jp(e,t,n){return e.append({ordered_list:zp(Pp,{content:"list_item+",group:n}),bullet_list:zp(Ip,{content:"list_item+",group:n}),list_item:zp(Rp,{content:t})})}function Fp(e,t=null){return function(n,r){let{$from:i,$to:o}=n.selection,s=i.blockRange(o),a=!1,l=s;if(!s)return!1;if(s.depth>=2&&i.node(s.depth-1).type.compatibleContent(e)&&0==s.startIndex){if(0==i.index(s.depth-1))return!1;let e=n.doc.resolve(s.start-2);l=new ic(e,e,s.depth),s.endIndex=0;u--)o=Rl.from(n[u].type.create(n[u].attrs,o));e.step(new Gc(t.start-(r?2:0),t.end,t.start,t.end,new Vl(o,0,0),n.length,!0));let s=0;for(let u=0;u=r.depth-3;e--)i=Rl.from(r.node(e).copy(i));let s=r.indexAfter(-1){if(c>-1)return!1;e.isTextblock&&0==e.content.size&&(c=t+1)})),c>-1&&l.setSelection(yu.near(l.doc.resolve(c))),n(l.scrollIntoView())}return!0}let a=i.pos==r.end()?s.contentMatchAt(0).defaultType:null,l=t.tr.delete(r.pos,i.pos),c=a?[null,{type:a}]:void 0;return!!ru(l.doc,r.pos,2,c)&&(n&&n(l.split(r.pos,2,c).scrollIntoView()),!0)}}function Bp(e){return function(t,n){let{$from:r,$to:i}=t.selection,o=r.blockRange(i,(t=>t.childCount>0&&t.firstChild.type==e));return!!o&&(!n||(r.node(o.depth-1).type==e?function(e,t,n,r){let i=e.tr,o=r.end,s=r.$to.end(r.depth);om;p--)f-=i.child(p).nodeSize,r.delete(f-1,f+1);let o=r.doc.resolve(n.start),s=o.nodeAfter;if(r.mapping.map(n.end)!=n.start+o.nodeAfter.nodeSize)return!1;let a=0==n.startIndex,l=n.endIndex==i.childCount,c=o.node(-1),u=o.index(-1);if(!c.canReplace(u+(a?0:1),u+1,s.content.append(l?Rl.empty:Rl.from(i))))return!1;let d=o.pos,h=d+s.nodeSize;return r.step(new Gc(d-(a?1:0),h+(l?1:0),d+1,h-1,new Vl((a?Rl.empty:Rl.from(i.copy(Rl.empty))).append(l?Rl.empty:Rl.from(i.copy(Rl.empty))),a?0:1,l?0:1),a?0:1)),t(r.scrollIntoView()),!0}(t,n,o)))}}function Vp(e){return function(t,n){let{$from:r,$to:i}=t.selection,o=r.blockRange(i,(t=>t.childCount>0&&t.firstChild.type==e));if(!o)return!1;let s=o.startIndex;if(0==s)return!1;let a=o.parent,l=a.child(s-1);if(l.type!=e)return!1;if(n){let r=l.lastChild&&l.lastChild.type==a.type,i=Rl.from(r?e.create():null),s=new Vl(Rl.from(e.create(null,Rl.from(a.type.create(null,i)))),r?3:1,0),c=o.start,u=o.end;n(t.tr.step(new Gc(c-(r?3:1),u,c,u,s,1,!0)).scrollIntoView())}return!0}}var Wp=function(){};Wp.prototype.append=function(e){return e.length?(e=Wp.from(e),!this.length&&e||e.length<200&&this.leafAppend(e)||this.length<200&&e.leafPrepend(this)||this.appendInner(e)):this},Wp.prototype.prepend=function(e){return e.length?Wp.from(e).append(this):this},Wp.prototype.appendInner=function(e){return new Hp(this,e)},Wp.prototype.slice=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t?Wp.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},Wp.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},Wp.prototype.forEach=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},Wp.prototype.map=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length);var r=[];return this.forEach((function(t,n){return r.push(e(t,n))}),t,n),r},Wp.from=function(e){return e instanceof Wp?e:e&&e.length?new qp(e):Wp.empty};var qp=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return 0==e&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var i=t;i=n;i--)if(!1===e(this.values[i],r+i))return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=200)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=200)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(Wp);Wp.empty=new qp([]);var Hp=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return ei&&!1===this.right.forEachInner(e,Math.max(t-i,0),Math.min(this.length,n)-i,r+i))&&void 0)},t.prototype.forEachInvertedInner=function(e,t,n,r){var i=this.left.length;return!(t>i&&!1===this.right.forEachInvertedInner(e,t-i,Math.max(n,i)-i,r+i))&&(!(n=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(Wp),Jp=Wp;class Kp{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(0==this.eventCount)return null;let n,r,i=this.items.length;for(;;i--){if(this.items.get(i-1).selection){--i;break}}t&&(n=this.remapping(i,this.items.length),r=n.maps.length);let o,s,a=e.tr,l=[],c=[];return this.items.forEach(((e,t)=>{if(!e.step)return n||(n=this.remapping(i,t+1),r=n.maps.length),r--,void c.push(e);if(n){c.push(new Yp(e.map));let t,i=e.step.map(n.slice(r));i&&a.maybeStep(i).doc&&(t=a.mapping.maps[a.mapping.maps.length-1],l.push(new Yp(t,void 0,void 0,l.length+c.length))),r--,t&&n.appendMap(t,r)}else a.maybeStep(e.step);return e.selection?(o=n?e.selection.map(n.slice(r)):e.selection,s=new Kp(this.items.slice(0,i).append(c.reverse().concat(l)),this.eventCount-1),!1):void 0}),this.items.length,0),{remaining:s,transform:a,selection:o}}addTransform(e,t,n,r){let i=[],o=this.eventCount,s=this.items,a=!r&&s.length?s.get(s.length-1):null;for(let c=0;cXp&&(s=function(e,t){let n;return e.forEach(((e,r)=>{if(e.selection&&0==t--)return n=r,!1})),e.slice(n)}(s,l),o-=l),new Kp(s.append(i),o)}remapping(e,t){let n=new Wc;return this.items.forEach(((t,r)=>{let i=null!=t.mirrorOffset&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,i)}),e,t),n}addMaps(e){return 0==this.eventCount?this:new Kp(this.items.append(e.map((e=>new Yp(e)))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let n=[],r=Math.max(0,this.items.length-t),i=e.mapping,o=e.steps.length,s=this.eventCount;this.items.forEach((e=>{e.selection&&s--}),r);let a=t;this.items.forEach((t=>{let r=i.getMirror(--a);if(null==r)return;o=Math.min(o,r);let l=i.maps[r];if(t.step){let o=e.steps[r].invert(e.docs[r]),c=t.selection&&t.selection.map(i.slice(a+1,r));c&&s++,n.push(new Yp(l,o,c))}else n.push(new Yp(l))}),r);let l=[];for(let d=t;d500&&(u=u.compress(this.items.length-n.length)),u}emptyItemCount(){let e=0;return this.items.forEach((t=>{t.step||e++})),e}compress(e=this.items.length){let t=this.remapping(0,e),n=t.maps.length,r=[],i=0;return this.items.forEach(((o,s)=>{if(s>=e)r.push(o),o.selection&&i++;else if(o.step){let e=o.step.map(t.slice(n)),s=e&&e.getMap();if(n--,s&&t.appendMap(s,n),e){let a=o.selection&&o.selection.map(t.slice(n));a&&i++;let l,c=new Yp(s.invert(),e,a),u=r.length-1;(l=r.length&&r[u].merge(c))?r[u]=l:r.push(c)}}else o.map&&n--}),this.items.length,0),new Kp(Jp.from(r.reverse()),i)}}Kp.empty=new Kp(Jp.empty,0);class Yp{constructor(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new Yp(t.getMap().invert(),t,this.selection)}}}class Up{constructor(e,t,n,r){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r}}const Xp=20;function Gp(e){let t=[];return e.forEach(((e,n,r,i)=>t.push(r,i))),t}function Zp(e,t){if(!e)return null;let n=[];for(let r=0;rnew Up(Kp.empty,Kp.empty,null,0),apply:(t,n,r)=>function(e,t,n,r){let i,o=n.getMeta(rm);if(o)return o.historyState;n.getMeta(im)&&(e=new Up(e.done,e.undone,null,0));let s=n.getMeta("appendedTransaction");if(0==n.steps.length)return e;if(s&&s.getMeta(rm))return s.getMeta(rm).redo?new Up(e.done.addTransform(n,void 0,r,nm(t)),e.undone,Gp(n.mapping.maps[n.steps.length-1]),e.prevTime):new Up(e.done,e.undone.addTransform(n,void 0,r,nm(t)),null,e.prevTime);if(!1===n.getMeta("addToHistory")||s&&!1===s.getMeta("addToHistory"))return(i=n.getMeta("rebased"))?new Up(e.done.rebased(n,i),e.undone.rebased(n,i),Zp(e.prevRanges,n.mapping),e.prevTime):new Up(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),Zp(e.prevRanges,n.mapping),e.prevTime);{let i=0==e.prevTime||!s&&(e.prevTime<(n.time||0)-r.newGroupDelay||!function(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach(((e,r)=>{for(let i=0;i=t[i]&&(n=!0)})),n}(n,e.prevRanges)),o=s?Zp(e.prevRanges,n.mapping):Gp(n.mapping.maps[n.steps.length-1]);return new Up(e.done.addTransform(n,i?t.selection.getBookmark():void 0,r,nm(t)),Kp.empty,o,n.time)}}(n,r,t,e)},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r="historyUndo"==n?sm:"historyRedo"==n?am:null;return!!r&&(t.preventDefault(),r(e.state,e.dispatch))}}}})}const sm=(e,t)=>{let n=rm.getState(e);return!(!n||0==n.done.eventCount)&&(t&&Qp(n,e,t,!1),!0)},am=(e,t)=>{let n=rm.getState(e);return!(!n||0==n.undone.eventCount)&&(t&&Qp(n,e,t,!0),!0)};function lm(e){let t=rm.getState(e);return t?t.done.eventCount:0}function cm(e){let t=rm.getState(e);return t?t.undone.eventCount:0}var um={},dm={},hm={},fm={};Object.defineProperty(fm,"__esModule",{value:!0}),fm.default=void 0;var pm=xl.withParams;fm.default=pm,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.req=e.regex=e.ref=e.len=void 0,Object.defineProperty(e,"withParams",{enumerable:!0,get:function(){return n.default}});var t,n=(t=fm)&&t.__esModule?t:{default:t};function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(e){if(Array.isArray(e))return!!e.length;if(null==e)return!1;if(!1===e)return!0;if(e instanceof Date)return!isNaN(e.getTime());if("object"===r(e)){for(var t in e)return!0;return!1}return!!String(e).length};e.req=i;e.len=function(e){return Array.isArray(e)?e.length:"object"===r(e)?Object.keys(e).length:String(e).length};e.ref=function(e,t,n){return"function"==typeof e?e.call(t,n):n[e]};e.regex=function(e,t){return(0,n.default)({type:e},(function(e){return!i(e)||t.test(e)}))}}(hm),Object.defineProperty(dm,"__esModule",{value:!0}),dm.default=void 0;var mm=(0,hm.regex)("alpha",/^[a-zA-Z]*$/);dm.default=mm;var gm={};Object.defineProperty(gm,"__esModule",{value:!0}),gm.default=void 0;var vm=(0,hm.regex)("alphaNum",/^[a-zA-Z0-9]*$/);gm.default=vm;var ym={};Object.defineProperty(ym,"__esModule",{value:!0}),ym.default=void 0;var bm=(0,hm.regex)("numeric",/^[0-9]*$/);ym.default=bm;var wm={};Object.defineProperty(wm,"__esModule",{value:!0}),wm.default=void 0;var xm=hm;wm.default=function(e,t){return(0,xm.withParams)({type:"between",min:e,max:t},(function(n){return!(0,xm.req)(n)||(!/\s/.test(n)||n instanceof Date)&&+e<=+n&&+t>=+n}))};var Sm={};Object.defineProperty(Sm,"__esModule",{value:!0}),Sm.default=void 0;var km=(0,hm.regex)("email",/^(?:[A-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[A-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9]{2,}(?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i);Sm.default=km;var Cm={};Object.defineProperty(Cm,"__esModule",{value:!0}),Cm.default=void 0;var Om=hm,Mm=(0,Om.withParams)({type:"ipAddress"},(function(e){if(!(0,Om.req)(e))return!0;if("string"!=typeof e)return!1;var t=e.split(".");return 4===t.length&&t.every(_m)}));Cm.default=Mm;var _m=function(e){if(e.length>3||0===e.length)return!1;if("0"===e[0]&&"0"!==e)return!1;if(!e.match(/^\d+$/))return!1;var t=0|+e;return t>=0&&t<=255},Dm={};Object.defineProperty(Dm,"__esModule",{value:!0}),Dm.default=void 0;var Tm=hm;Dm.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:":";return(0,Tm.withParams)({type:"macAddress"},(function(t){if(!(0,Tm.req)(t))return!0;if("string"!=typeof t)return!1;var n="string"==typeof e&&""!==e?t.split(e):12===t.length||16===t.length?t.match(/.{2}/g):null;return null!==n&&(6===n.length||8===n.length)&&n.every($m)}))};var $m=function(e){return e.toLowerCase().match(/^[0-9a-f]{2}$/)},Am={};Object.defineProperty(Am,"__esModule",{value:!0}),Am.default=void 0;var Em=hm;Am.default=function(e){return(0,Em.withParams)({type:"maxLength",max:e},(function(t){return!(0,Em.req)(t)||(0,Em.len)(t)<=e}))};var Nm={};Object.defineProperty(Nm,"__esModule",{value:!0}),Nm.default=void 0;var Pm=hm;Nm.default=function(e){return(0,Pm.withParams)({type:"minLength",min:e},(function(t){return!(0,Pm.req)(t)||(0,Pm.len)(t)>=e}))};var Im={};Object.defineProperty(Im,"__esModule",{value:!0}),Im.default=void 0;var Rm=hm,zm=(0,Rm.withParams)({type:"required"},(function(e){return(0,Rm.req)("string"==typeof e?e.trim():e)}));Im.default=zm;var jm={};Object.defineProperty(jm,"__esModule",{value:!0}),jm.default=void 0;var Fm=hm;jm.default=function(e){return(0,Fm.withParams)({type:"requiredIf",prop:e},(function(t,n){return!(0,Fm.ref)(e,this,n)||(0,Fm.req)(t)}))};var Lm={};Object.defineProperty(Lm,"__esModule",{value:!0}),Lm.default=void 0;var Bm=hm;Lm.default=function(e){return(0,Bm.withParams)({type:"requiredUnless",prop:e},(function(t,n){return!!(0,Bm.ref)(e,this,n)||(0,Bm.req)(t)}))};var Vm={};Object.defineProperty(Vm,"__esModule",{value:!0}),Vm.default=void 0;var Wm=hm;Vm.default=function(e){return(0,Wm.withParams)({type:"sameAs",eq:e},(function(t,n){return t===(0,Wm.ref)(e,this,n)}))};var qm={};Object.defineProperty(qm,"__esModule",{value:!0}),qm.default=void 0;var Hm=(0,hm.regex)("url",/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i);qm.default=Hm;var Jm={};Object.defineProperty(Jm,"__esModule",{value:!0}),Jm.default=void 0;var Km=hm;Jm.default=function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&t.reduce((function(t,n){return t||n.apply(e,r)}),!1)}))};var Ym={};Object.defineProperty(Ym,"__esModule",{value:!0}),Ym.default=void 0;var Um=hm;Ym.default=function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&t.reduce((function(t,n){return t&&n.apply(e,r)}),!0)}))};var Xm={};Object.defineProperty(Xm,"__esModule",{value:!0}),Xm.default=void 0;var Gm=hm;Xm.default=function(e){return(0,Gm.withParams)({type:"not"},(function(t,n){return!(0,Gm.req)(t)||!e.call(this,t,n)}))};var Zm={};Object.defineProperty(Zm,"__esModule",{value:!0}),Zm.default=void 0;var Qm=hm;Zm.default=function(e){return(0,Qm.withParams)({type:"minValue",min:e},(function(t){return!(0,Qm.req)(t)||(!/\s/.test(t)||t instanceof Date)&&+t>=+e}))};var eg={};Object.defineProperty(eg,"__esModule",{value:!0}),eg.default=void 0;var tg=hm;eg.default=function(e){return(0,tg.withParams)({type:"maxValue",max:e},(function(t){return!(0,tg.req)(t)||(!/\s/.test(t)||t instanceof Date)&&+t<=+e}))};var ng={};Object.defineProperty(ng,"__esModule",{value:!0}),ng.default=void 0;var rg=(0,hm.regex)("integer",/(^[0-9]*$)|(^-[0-9]+$)/);ng.default=rg;var ig={};Object.defineProperty(ig,"__esModule",{value:!0}),ig.default=void 0;var og=(0,hm.regex)("decimal",/^[-]?\d*(\.\d+)?$/); /**! * Sortable 1.10.2 * @author RubaXa * @author owenm * @license MIT */ -function dm(t){return(dm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function hm(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function vm(){return vm=Object.assign||function(t){for(var e=1;e=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}fm.default=pm,function(t){function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"alpha",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"alphaNum",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"and",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(t,"between",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"decimal",{enumerable:!0,get:function(){return S.default}}),Object.defineProperty(t,"email",{enumerable:!0,get:function(){return a.default}}),t.helpers=void 0,Object.defineProperty(t,"integer",{enumerable:!0,get:function(){return x.default}}),Object.defineProperty(t,"ipAddress",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"macAddress",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"maxLength",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"maxValue",{enumerable:!0,get:function(){return w.default}}),Object.defineProperty(t,"minLength",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"minValue",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(t,"not",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(t,"numeric",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"or",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(t,"required",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(t,"requiredIf",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(t,"requiredUnless",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"sameAs",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(t,"url",{enumerable:!0,get:function(){return v.default}});var n=O(yv),r=O(kv),o=O(Ov),i=O(Mv),a=O(Tv),s=O(Av),c=O(Iv),l=O(zv),u=O(Lv),f=O(Vv),p=O(Hv),d=O(Kv),h=O(Uv),v=O(Gv),m=O(Qv),g=O(em),y=O(rm),b=O(im),w=O(sm),x=O(lm),S=O(fm),k=function(t,n){if(!n&&t&&t.__esModule)return t;if(null===t||"object"!==e(t)&&"function"!=typeof t)return{default:t};var r=_(n);if(r&&r.has(t))return r.get(t);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var s=i?Object.getOwnPropertyDescriptor(t,a):null;s&&(s.get||s.set)?Object.defineProperty(o,a,s):o[a]=t[a]}o.default=t,r&&r.set(t,o);return o}(bv);function _(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(_=function(t){return t?n:e})(t)}function O(t){return t&&t.__esModule?t:{default:t}}t.helpers=k}(gv);function ym(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var bm=ym(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),wm=ym(/Edge/i),xm=ym(/firefox/i),Sm=ym(/safari/i)&&!ym(/chrome/i)&&!ym(/android/i),km=ym(/iP(ad|od|hone)/i),_m=ym(/chrome/i)&&ym(/android/i),Om={capture:!1,passive:!1};function Cm(t,e,n){t.addEventListener(e,n,!bm&&Om)}function Mm(t,e,n){t.removeEventListener(e,n,!bm&&Om)}function Dm(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(n){return!1}return!1}}function Tm(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function $m(t,e,n,r){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&Dm(t,e):Dm(t,e))||r&&t===n)return t;if(t===n)break}while(t=Tm(t))}return null}var Am,Em=/\s+/g;function Nm(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var r=(" "+t.className+" ").replace(Em," ").replace(" "+e+" "," ");t.className=(r+(n?" "+e:"")).replace(Em," ")}}function Pm(t,e,n){var r=t&&t.style;if(r){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in r||-1!==e.indexOf("webkit")||(e="-webkit-"+e),r[e]=n+("string"==typeof n?"":"px")}}function Im(t,e){var n="";if("string"==typeof t)n=t;else do{var r=Pm(t,"transform");r&&"none"!==r&&(n=r+" "+n)}while(!e&&(t=t.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function jm(t,e,n){if(t){var r=t.getElementsByTagName(e),o=0,i=r.length;if(n)for(;o=i:o<=i))return r;if(r===Rm())break;r=qm(r,!1)}return!1}function Lm(t,e,n){for(var r=0,o=0,i=t.children;o2&&void 0!==arguments[2]?arguments[2]:{},r=n.evt,o=gm(n,["evt"]);Qm.pluginEvent.bind(Jg)(t,e,mm({dragEl:ng,parentEl:rg,ghostEl:og,rootEl:ig,nextEl:ag,lastDownEl:sg,cloneEl:cg,cloneHidden:lg,dragStarted:Sg,putSortable:vg,activeSortable:Jg.active,originalEvent:r,oldIndex:ug,oldDraggableIndex:pg,newIndex:fg,newDraggableIndex:dg,hideGhostForTarget:Vg,unhideGhostForTarget:Wg,cloneNowHidden:function(){lg=!0},cloneNowShown:function(){lg=!1},dispatchSortableEvent:function(t){eg({sortable:e,name:t,originalEvent:r})}},o))};function eg(t){!function(t){var e=t.sortable,n=t.rootEl,r=t.name,o=t.targetEl,i=t.cloneEl,a=t.toEl,s=t.fromEl,c=t.oldIndex,l=t.newIndex,u=t.oldDraggableIndex,f=t.newDraggableIndex,p=t.originalEvent,d=t.putSortable,h=t.extraEventProperties;if(e=e||n&&n[Um]){var v,m=e.options,g="on"+r.charAt(0).toUpperCase()+r.substr(1);!window.CustomEvent||bm||wm?(v=document.createEvent("Event")).initEvent(r,!0,!0):v=new CustomEvent(r,{bubbles:!0,cancelable:!0}),v.to=a||n,v.from=s||n,v.item=o||n,v.clone=i,v.oldIndex=c,v.newIndex=l,v.oldDraggableIndex=u,v.newDraggableIndex=f,v.originalEvent=p,v.pullMode=d?d.lastPutMode:void 0;var y=mm({},h,Qm.getEventProperties(r,e));for(var b in y)v[b]=y[b];n&&n.dispatchEvent(v),m[g]&&m[g].call(e,v)}}(mm({putSortable:vg,cloneEl:cg,targetEl:ng,rootEl:ig,oldIndex:ug,oldDraggableIndex:pg,newIndex:fg,newDraggableIndex:dg},t))}var ng,rg,og,ig,ag,sg,cg,lg,ug,fg,pg,dg,hg,vg,mg,gg,yg,bg,wg,xg,Sg,kg,_g,Og,Cg,Mg=!1,Dg=!1,Tg=[],$g=!1,Ag=!1,Eg=[],Ng=!1,Pg=[],Ig="undefined"!=typeof document,jg=km,Rg=wm||bm?"cssFloat":"float",zg=Ig&&!_m&&!km&&"draggable"in document.createElement("div"),Fg=function(){if(Ig){if(bm)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Lg=function(t,e){var n=Pm(t),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=Lm(t,0,e),i=Lm(t,1,e),a=o&&Pm(o),s=i&&Pm(i),c=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+zm(o).width,l=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+zm(i).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&a.float&&"none"!==a.float){var u="left"===a.float?"left":"right";return!i||"both"!==s.clear&&s.clear!==u?"horizontal":"vertical"}return o&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||c>=r&&"none"===n[Rg]||i&&"none"===n[Rg]&&c+l>r)?"vertical":"horizontal"},Bg=function(t){function e(t,n){return function(r,o,i,a){var s=r.options.group.name&&o.options.group.name&&r.options.group.name===o.options.group.name;if(null==t&&(n||s))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"==typeof t)return e(t(r,o,i,a),n)(r,o,i,a);var c=(n?r:o).options.group.name;return!0===t||"string"==typeof t&&t===c||t.join&&t.indexOf(c)>-1}}var n={},r=t.group;r&&"object"==dm(r)||(r={name:r}),n.name=r.name,n.checkPull=e(r.pull,!0),n.checkPut=e(r.put),n.revertClone=r.revertClone,t.group=n},Vg=function(){!Fg&&og&&Pm(og,"display","none")},Wg=function(){!Fg&&og&&Pm(og,"display","")};Ig&&document.addEventListener("click",(function(t){if(Dg)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),Dg=!1,!1}),!0);var qg=function(t){if(ng){t=t.touches?t.touches[0]:t;var e=(o=t.clientX,i=t.clientY,Tg.some((function(t){if(!Bm(t)){var e=zm(t),n=t[Um].options.emptyInsertThreshold,r=o>=e.left-n&&o<=e.right+n,s=i>=e.top-n&&i<=e.bottom+n;return n&&r&&s?a=t:void 0}})),a);if(e){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[Um]._onDragOver(n)}}var o,i,a},Hg=function(t){ng&&ng.parentNode[Um]._isOutsideThisEl(t.target)};function Jg(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=vm({},e),t[Um]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Lg(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Jg.supportPointer&&"PointerEvent"in window,emptyInsertThreshold:5};for(var r in Qm.initializePlugins(this,t,n),n)!(r in e)&&(e[r]=n[r]);for(var o in Bg(e),this)"_"===o.charAt(0)&&"function"==typeof this[o]&&(this[o]=this[o].bind(this));this.nativeDraggable=!e.forceFallback&&zg,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?Cm(t,"pointerdown",this._onTapStart):(Cm(t,"mousedown",this._onTapStart),Cm(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(Cm(t,"dragover",this),Cm(t,"dragenter",this)),Tg.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),vm(this,Xm())}function Kg(t,e,n,r,o,i,a,s){var c,l,u=t[Um],f=u.options.onMove;return!window.CustomEvent||bm||wm?(c=document.createEvent("Event")).initEvent("move",!0,!0):c=new CustomEvent("move",{bubbles:!0,cancelable:!0}),c.to=e,c.from=t,c.dragged=n,c.draggedRect=r,c.related=o||e,c.relatedRect=i||zm(e),c.willInsertAfter=s,c.originalEvent=a,t.dispatchEvent(c),f&&(l=f.call(u,c,a)),l}function Yg(t){t.draggable=!1}function Ug(){Ng=!1}function Xg(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,r=0;n--;)r+=e.charCodeAt(n);return r.toString(36)}function Gg(t){return setTimeout(t,0)}function Zg(t){return clearTimeout(t)}Jg.prototype={constructor:Jg,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(kg=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,ng):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,r=this.options,o=r.preventOnFilter,i=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,s=(a||t).target,c=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||s,l=r.filter;if(function(t){Pg.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var r=e[n];r.checked&&Pg.push(r)}}(n),!ng&&!(/mousedown|pointerdown/.test(i)&&0!==t.button||r.disabled||c.isContentEditable||(s=$m(s,r.draggable,n,!1))&&s.animated||sg===s)){if(ug=Vm(s),pg=Vm(s,r.draggable),"function"==typeof l){if(l.call(this,t,s,this))return eg({sortable:e,rootEl:c,name:"filter",targetEl:s,toEl:n,fromEl:n}),tg("filter",e,{evt:t}),void(o&&t.cancelable&&t.preventDefault())}else if(l&&(l=l.split(",").some((function(r){if(r=$m(c,r.trim(),n,!1))return eg({sortable:e,rootEl:r,name:"filter",targetEl:s,fromEl:n,toEl:n}),tg("filter",e,{evt:t}),!0}))))return void(o&&t.cancelable&&t.preventDefault());r.handle&&!$m(c,r.handle,n,!1)||this._prepareDragStart(t,a,s)}}},_prepareDragStart:function(t,e,n){var r,o=this,i=o.el,a=o.options,s=i.ownerDocument;if(n&&!ng&&n.parentNode===i){var c=zm(n);if(ig=i,rg=(ng=n).parentNode,ag=ng.nextSibling,sg=n,hg=a.group,Jg.dragged=ng,mg={target:ng,clientX:(e||t).clientX,clientY:(e||t).clientY},wg=mg.clientX-c.left,xg=mg.clientY-c.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,ng.style["will-change"]="all",r=function(){tg("delayEnded",o,{evt:t}),Jg.eventCanceled?o._onDrop():(o._disableDelayedDragEvents(),!xm&&o.nativeDraggable&&(ng.draggable=!0),o._triggerDragStart(t,e),eg({sortable:o,name:"choose",originalEvent:t}),Nm(ng,a.chosenClass,!0))},a.ignore.split(",").forEach((function(t){jm(ng,t.trim(),Yg)})),Cm(s,"dragover",qg),Cm(s,"mousemove",qg),Cm(s,"touchmove",qg),Cm(s,"mouseup",o._onDrop),Cm(s,"touchend",o._onDrop),Cm(s,"touchcancel",o._onDrop),xm&&this.nativeDraggable&&(this.options.touchStartThreshold=4,ng.draggable=!0),tg("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(wm||bm))r();else{if(Jg.eventCanceled)return void this._onDrop();Cm(s,"mouseup",o._disableDelayedDrag),Cm(s,"touchend",o._disableDelayedDrag),Cm(s,"touchcancel",o._disableDelayedDrag),Cm(s,"mousemove",o._delayedDragTouchMoveHandler),Cm(s,"touchmove",o._delayedDragTouchMoveHandler),a.supportPointer&&Cm(s,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(r,a.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){ng&&Yg(ng),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;Mm(t,"mouseup",this._disableDelayedDrag),Mm(t,"touchend",this._disableDelayedDrag),Mm(t,"touchcancel",this._disableDelayedDrag),Mm(t,"mousemove",this._delayedDragTouchMoveHandler),Mm(t,"touchmove",this._delayedDragTouchMoveHandler),Mm(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?Cm(document,"pointermove",this._onTouchMove):Cm(document,e?"touchmove":"mousemove",this._onTouchMove):(Cm(ng,"dragend",this),Cm(ig,"dragstart",this._onDragStart));try{document.selection?Gg((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(n){}},_dragStarted:function(t,e){if(Mg=!1,ig&&ng){tg("dragStarted",this,{evt:e}),this.nativeDraggable&&Cm(document,"dragover",Hg);var n=this.options;!t&&Nm(ng,n.dragClass,!1),Nm(ng,n.ghostClass,!0),Jg.active=this,t&&this._appendGhost(),eg({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(gg){this._lastX=gg.clientX,this._lastY=gg.clientY,Vg();for(var t=document.elementFromPoint(gg.clientX,gg.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(gg.clientX,gg.clientY))!==e;)e=t;if(ng.parentNode[Um]._isOutsideThisEl(t),e)do{if(e[Um]){if(e[Um]._onDragOver({clientX:gg.clientX,clientY:gg.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);Wg()}},_onTouchMove:function(t){if(mg){var e=this.options,n=e.fallbackTolerance,r=e.fallbackOffset,o=t.touches?t.touches[0]:t,i=og&&Im(og,!0),a=og&&i&&i.a,s=og&&i&&i.d,c=jg&&Cg&&Wm(Cg),l=(o.clientX-mg.clientX+r.x)/(a||1)+(c?c[0]-Eg[0]:0)/(a||1),u=(o.clientY-mg.clientY+r.y)/(s||1)+(c?c[1]-Eg[1]:0)/(s||1);if(!Jg.active&&!Mg){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))r.right+o||t.clientX<=r.right&&t.clientY>r.bottom&&t.clientX>=r.left:t.clientX>r.right&&t.clientY>r.top||t.clientX<=r.right&&t.clientY>r.bottom+o}(t,o,this)&&!v.animated){if(v===ng)return $(!1);if(v&&i===t.target&&(a=v),a&&(n=zm(a)),!1!==Kg(ig,i,ng,e,a,n,t,!!a))return T(),i.appendChild(ng),rg=i,A(),$(!0)}else if(a.parentNode===i){n=zm(a);var m,g,y,b=ng.parentNode!==i,w=!function(t,e,n){var r=n?t.left:t.top,o=n?t.right:t.bottom,i=n?t.width:t.height,a=n?e.left:e.top,s=n?e.right:e.bottom,c=n?e.width:e.height;return r===a||o===s||r+i/2===a+c/2}(ng.animated&&ng.toRect||e,a.animated&&a.toRect||n,o),x=o?"top":"left",S=Fm(a,"top","top")||Fm(ng,"top","top"),k=S?S.scrollTop:void 0;if(kg!==a&&(g=n[x],$g=!1,Ag=!w&&s.invertSwap||b),m=function(t,e,n,r,o,i,a,s){var c=r?t.clientY:t.clientX,l=r?n.height:n.width,u=r?n.top:n.left,f=r?n.bottom:n.right,p=!1;if(!a)if(s&&Ogu+l*i/2:cf-Og)return-_g}else if(c>u+l*(1-o)/2&&cf-l*i/2))return c>u+l/2?1:-1;return 0}(t,a,n,o,w?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,Ag,kg===a),0!==m){var _=Vm(ng);do{_-=m,y=rg.children[_]}while(y&&("none"===Pm(y,"display")||y===og))}if(0===m||y===a)return $(!1);kg=a,_g=m;var O=a.nextElementSibling,C=!1,M=Kg(ig,i,ng,e,a,n,t,C=1===m);if(!1!==M)return 1!==M&&-1!==M||(C=1===M),Ng=!0,setTimeout(Ug,30),T(),C&&!O?i.appendChild(ng):a.parentNode.insertBefore(ng,C?O:a),S&&Km(S,0,k-S.scrollTop),rg=ng.parentNode,void 0===g||Ag||(Og=Math.abs(g-zm(a)[x])),A(),$(!0)}if(i.contains(ng))return $(!1)}return!1}function D(s,c){tg(s,d,mm({evt:t,isOwner:u,axis:o?"vertical":"horizontal",revert:r,dragRect:e,targetRect:n,canSort:f,fromSortable:p,target:a,completed:$,onMove:function(n,r){return Kg(ig,i,ng,e,n,zm(n),t,r)},changed:A},c))}function T(){D("dragOverAnimationCapture"),d.captureAnimationState(),d!==p&&p.captureAnimationState()}function $(e){return D("dragOverCompleted",{insertion:e}),e&&(u?l._hideClone():l._showClone(d),d!==p&&(Nm(ng,vg?vg.options.ghostClass:l.options.ghostClass,!1),Nm(ng,s.ghostClass,!0)),vg!==d&&d!==Jg.active?vg=d:d===Jg.active&&vg&&(vg=null),p===d&&(d._ignoreWhileAnimating=a),d.animateAll((function(){D("dragOverAnimationComplete"),d._ignoreWhileAnimating=null})),d!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(a===ng&&!ng.animated||a===i&&!a.animated)&&(kg=null),s.dragoverBubble||t.rootEl||a===document||(ng.parentNode[Um]._isOutsideThisEl(t.target),!e&&qg(t)),!s.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),h=!0}function A(){fg=Vm(ng),dg=Vm(ng,s.draggable),eg({sortable:d,name:"change",toEl:i,newIndex:fg,newDraggableIndex:dg,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){Mm(document,"mousemove",this._onTouchMove),Mm(document,"touchmove",this._onTouchMove),Mm(document,"pointermove",this._onTouchMove),Mm(document,"dragover",qg),Mm(document,"mousemove",qg),Mm(document,"touchmove",qg)},_offUpEvents:function(){var t=this.el.ownerDocument;Mm(t,"mouseup",this._onDrop),Mm(t,"touchend",this._onDrop),Mm(t,"pointerup",this._onDrop),Mm(t,"touchcancel",this._onDrop),Mm(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;fg=Vm(ng),dg=Vm(ng,n.draggable),tg("drop",this,{evt:t}),rg=ng&&ng.parentNode,fg=Vm(ng),dg=Vm(ng,n.draggable),Jg.eventCanceled||(Mg=!1,Ag=!1,$g=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Zg(this.cloneId),Zg(this._dragStartId),this.nativeDraggable&&(Mm(document,"drop",this),Mm(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Sm&&Pm(document.body,"user-select",""),Pm(ng,"transform",""),t&&(Sg&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),og&&og.parentNode&&og.parentNode.removeChild(og),(ig===rg||vg&&"clone"!==vg.lastPutMode)&&cg&&cg.parentNode&&cg.parentNode.removeChild(cg),ng&&(this.nativeDraggable&&Mm(ng,"dragend",this),Yg(ng),ng.style["will-change"]="",Sg&&!Mg&&Nm(ng,vg?vg.options.ghostClass:this.options.ghostClass,!1),Nm(ng,this.options.chosenClass,!1),eg({sortable:this,name:"unchoose",toEl:rg,newIndex:null,newDraggableIndex:null,originalEvent:t}),ig!==rg?(fg>=0&&(eg({rootEl:rg,name:"add",toEl:rg,fromEl:ig,originalEvent:t}),eg({sortable:this,name:"remove",toEl:rg,originalEvent:t}),eg({rootEl:rg,name:"sort",toEl:rg,fromEl:ig,originalEvent:t}),eg({sortable:this,name:"sort",toEl:rg,originalEvent:t})),vg&&vg.save()):fg!==ug&&fg>=0&&(eg({sortable:this,name:"update",toEl:rg,originalEvent:t}),eg({sortable:this,name:"sort",toEl:rg,originalEvent:t})),Jg.active&&(null!=fg&&-1!==fg||(fg=ug,dg=pg),eg({sortable:this,name:"end",toEl:rg,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){tg("nulling",this),ig=ng=rg=og=ag=cg=sg=lg=mg=gg=Sg=fg=dg=ug=pg=kg=_g=vg=hg=Jg.dragged=Jg.ghost=Jg.clone=Jg.active=null,Pg.forEach((function(t){t.checked=!0})),Pg.length=yg=bg=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":ng&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,r=0,o=n.length,i=this.options;rt.replace(hy,((t,e)=>e?e.toUpperCase():""))));function my(t){null!==t.parentElement&&t.parentElement.removeChild(t)}function gy(t,e,n){const r=0===n?t.children[0]:t.children[n-1].nextSibling;t.insertBefore(e,r)}function yy(t,e){this.$nextTick((()=>this.$emit(t.toLowerCase(),e)))}function by(t){return e=>{null!==this.realList&&this["onDrag"+t](e),yy.call(this,t,e)}}function wy(t){return["transition-group","TransitionGroup"].includes(t)}function xy(t,e,n){return t[n]||(e[n]?e[n]():void 0)}const Sy=["Start","Add","Remove","Update","End"],ky=["Choose","Unchoose","Sort","Filter","Clone"],_y=["Move",...Sy,...ky].map((t=>"on"+t));var Oy=null;const Cy={name:"draggable",inheritAttrs:!1,props:{options:Object,list:{type:Array,required:!1,default:null},value:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:t=>t},element:{type:String,default:"div"},tag:{type:String,default:null},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},data:()=>({transitionMode:!1,noneFunctionalComponentMode:!1}),render(t){const e=this.$slots.default;this.transitionMode=function(t){if(!t||1!==t.length)return!1;const[{componentOptions:e}]=t;return!!e&&wy(e.tag)}(e);const{children:n,headerOffset:r,footerOffset:o}=function(t,e,n){let r=0,o=0;const i=xy(e,n,"header");i&&(r=i.length,t=t?[...i,...t]:[...i]);const a=xy(e,n,"footer");return a&&(o=a.length,t=t?[...t,...a]:[...a]),{children:t,headerOffset:r,footerOffset:o}}(e,this.$slots,this.$scopedSlots);this.headerOffset=r,this.footerOffset=o;const i=function(t,e){let n=null;const r=(t,e)=>{n=function(t,e,n){return void 0===n||((t=t||{})[e]=n),t}(n,t,e)},o=Object.keys(t).filter((t=>"id"===t||t.startsWith("data-"))).reduce(((e,n)=>(e[n]=t[n],e)),{});if(r("attrs",o),!e)return n;const{on:i,props:a,attrs:s}=e;return r("on",i),r("props",a),Object.assign(n.attrs,s),n}(this.$attrs,this.componentData);return t(this.getTag(),i,n)},created(){null!==this.list&&null!==this.value&&dy.error("Value and list props are mutually exclusive! Please set one or another."),"div"!==this.element&&dy.warn("Element props is deprecated please use tag props instead. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#element-props"),void 0!==this.options&&dy.warn("Options props is deprecated, add sortable options directly as vue.draggable item, or use v-bind. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#options-props")},mounted(){if(this.noneFunctionalComponentMode=this.getTag().toLowerCase()!==this.$el.nodeName.toLowerCase()&&!this.getIsFunctional(),this.noneFunctionalComponentMode&&this.transitionMode)throw new Error(`Transition-group inside component is not supported. Please alter tag value or remove transition-group. Current tag value: ${this.getTag()}`);const t={};Sy.forEach((e=>{t["on"+e]=by.call(this,e)})),ky.forEach((e=>{t["on"+e]=yy.bind(this,e)}));const e=Object.keys(this.$attrs).reduce(((t,e)=>(t[vy(e)]=this.$attrs[e],t)),{}),n=Object.assign({},this.options,e,t,{onMove:(t,e)=>this.onDragMove(t,e)});!("draggable"in n)&&(n.draggable=">*"),this._sortable=new Jg(this.rootContainer,n),this.computeIndexes()},beforeDestroy(){void 0!==this._sortable&&this._sortable.destroy()},computed:{rootContainer(){return this.transitionMode?this.$el.children[0]:this.$el},realList(){return this.list?this.list:this.value}},watch:{options:{handler(t){this.updateOptions(t)},deep:!0},$attrs:{handler(t){this.updateOptions(t)},deep:!0},realList(){this.computeIndexes()}},methods:{getIsFunctional(){const{fnOptions:t}=this._vnode;return t&&t.functional},getTag(){return this.tag||this.element},updateOptions(t){for(var e in t){const n=vy(e);-1===_y.indexOf(n)&&this._sortable.option(n,t[e])}},getChildrenNodes(){if(this.noneFunctionalComponentMode)return this.$children[0].$slots.default;const t=this.$slots.default;return this.transitionMode?t[0].child.$slots.default:t},computeIndexes(){this.$nextTick((()=>{this.visibleIndexes=function(t,e,n,r){if(!t)return[];const o=t.map((t=>t.elm)),i=e.length-r,a=[...e].map(((t,e)=>e>=i?o.length:o.indexOf(t)));return n?a.filter((t=>-1!==t)):a}(this.getChildrenNodes(),this.rootContainer.children,this.transitionMode,this.footerOffset)}))},getUnderlyingVm(t){const e=function(t,e){return t.map((t=>t.elm)).indexOf(e)}(this.getChildrenNodes()||[],t);if(-1===e)return null;return{index:e,element:this.realList[e]}},getUnderlyingPotencialDraggableComponent:({__vue__:t})=>t&&t.$options&&wy(t.$options._componentTag)?t.$parent:!("realList"in t)&&1===t.$children.length&&"realList"in t.$children[0]?t.$children[0]:t,emitChanges(t){this.$nextTick((()=>{this.$emit("change",t)}))},alterList(t){if(this.list)return void t(this.list);const e=[...this.value];t(e),this.$emit("input",e)},spliceList(){this.alterList((t=>t.splice(...arguments)))},updatePosition(t,e){this.alterList((n=>n.splice(e,0,n.splice(t,1)[0])))},getRelatedContextFromMoveEvent({to:t,related:e}){const n=this.getUnderlyingPotencialDraggableComponent(t);if(!n)return{component:n};const r=n.realList,o={list:r,component:n};if(t!==e&&r&&n.getUnderlyingVm){const t=n.getUnderlyingVm(e);if(t)return Object.assign(t,o)}return o},getVmIndex(t){const e=this.visibleIndexes,n=e.length;return t>n-1?n:e[t]},getComponent(){return this.$slots.default[0].componentInstance},resetTransitionData(t){if(!this.noTransitionOnDrag||!this.transitionMode)return;this.getChildrenNodes()[t].data=null;const e=this.getComponent();e.children=[],e.kept=void 0},onDragStart(t){this.context=this.getUnderlyingVm(t.item),t.item._underlying_vm_=this.clone(this.context.element),Oy=t.item},onDragAdd(t){const e=t.item._underlying_vm_;if(void 0===e)return;my(t.item);const n=this.getVmIndex(t.newIndex);this.spliceList(n,0,e),this.computeIndexes();const r={element:e,newIndex:n};this.emitChanges({added:r})},onDragRemove(t){if(gy(this.rootContainer,t.item,t.oldIndex),"clone"===t.pullMode)return void my(t.clone);const e=this.context.index;this.spliceList(e,1);const n={element:this.context.element,oldIndex:e};this.resetTransitionData(e),this.emitChanges({removed:n})},onDragUpdate(t){my(t.item),gy(t.from,t.item,t.oldIndex);const e=this.context.index,n=this.getVmIndex(t.newIndex);this.updatePosition(e,n);const r={element:this.context.element,oldIndex:e,newIndex:n};this.emitChanges({moved:r})},updateProperty(t,e){t.hasOwnProperty(e)&&(t[e]+=this.headerOffset)},computeFutureIndex(t,e){if(!t.element)return 0;const n=[...e.to.children].filter((t=>"none"!==t.style.display)),r=n.indexOf(e.related),o=t.component.getVmIndex(r);return-1!==n.indexOf(Oy)||!e.willInsertAfter?o:o+1},onDragMove(t,e){const n=this.move;if(!n||!this.realList)return!0;const r=this.getRelatedContextFromMoveEvent(t),o=this.context,i=this.computeFutureIndex(r,t);Object.assign(o,{futureIndex:i});return n(Object.assign({},t,{relatedContext:r,draggedContext:o}),e)},onDragEnd(){this.computeIndexes(),Oy=null}}};"undefined"!=typeof window&&"Vue"in window&&window.Vue.component("draggable",Cy);export{mv as A,pv as B,gv as C,Rl as D,Uu as E,zc as F,Cy as G,fc as H,Eh as I,Nc as J,zu as N,Qu as P,Hc as S,ju as T,Cn as V,qs as a,Qs as b,oc as c,nc as d,Oh as e,yh as f,jh as g,Rh as h,Hh as i,Kh as j,Uh as k,Yh as l,Hs as m,fh as n,Il as o,Nh as p,Hd as q,Yl as r,kh as s,_h as t,Ih as u,Ah as v,Jh as w,dv as x,hv as y,vv as z}; +function sg(e){return(sg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ag(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lg(){return lg=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}ig.default=og,function(e){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"alpha",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"alphaNum",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(e,"and",{enumerable:!0,get:function(){return v.default}}),Object.defineProperty(e,"between",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"decimal",{enumerable:!0,get:function(){return S.default}}),Object.defineProperty(e,"email",{enumerable:!0,get:function(){return s.default}}),e.helpers=void 0,Object.defineProperty(e,"integer",{enumerable:!0,get:function(){return x.default}}),Object.defineProperty(e,"ipAddress",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"macAddress",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(e,"maxLength",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"maxValue",{enumerable:!0,get:function(){return w.default}}),Object.defineProperty(e,"minLength",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"minValue",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(e,"not",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(e,"numeric",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"or",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(e,"required",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(e,"requiredIf",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(e,"requiredUnless",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"sameAs",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(e,"url",{enumerable:!0,get:function(){return m.default}});var n=O(dm),r=O(gm),i=O(ym),o=O(wm),s=O(Sm),a=O(Cm),l=O(Dm),c=O(Am),u=O(Nm),d=O(Im),h=O(jm),f=O(Lm),p=O(Vm),m=O(qm),g=O(Jm),v=O(Ym),y=O(Xm),b=O(Zm),w=O(eg),x=O(ng),S=O(ig),k=function(e,n){if(!n&&e&&e.__esModule)return e;if(null===e||"object"!==t(e)&&"function"!=typeof e)return{default:e};var r=C(n);if(r&&r.has(e))return r.get(e);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var a=o?Object.getOwnPropertyDescriptor(e,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=e[s]}i.default=e,r&&r.set(e,i);return i}(hm);function C(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(C=function(e){return e?n:t})(e)}function O(e){return e&&e.__esModule?e:{default:e}}e.helpers=k}(um);function dg(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}var hg=dg(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),fg=dg(/Edge/i),pg=dg(/firefox/i),mg=dg(/safari/i)&&!dg(/chrome/i)&&!dg(/android/i),gg=dg(/iP(ad|od|hone)/i),vg=dg(/chrome/i)&&dg(/android/i),yg={capture:!1,passive:!1};function bg(e,t,n){e.addEventListener(t,n,!hg&&yg)}function wg(e,t,n){e.removeEventListener(t,n,!hg&&yg)}function xg(e,t){if(t){if(">"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(n){return!1}return!1}}function Sg(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function kg(e,t,n,r){if(e){n=n||document;do{if(null!=t&&(">"===t[0]?e.parentNode===n&&xg(e,t):xg(e,t))||r&&e===n)return e;if(e===n)break}while(e=Sg(e))}return null}var Cg,Og=/\s+/g;function Mg(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var r=(" "+e.className+" ").replace(Og," ").replace(" "+t+" "," ");e.className=(r+(n?" "+t:"")).replace(Og," ")}}function _g(e,t,n){var r=e&&e.style;if(r){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];t in r||-1!==t.indexOf("webkit")||(t="-webkit-"+t),r[t]=n+("string"==typeof n?"":"px")}}function Dg(e,t){var n="";if("string"==typeof e)n=e;else do{var r=_g(e,"transform");r&&"none"!==r&&(n=r+" "+n)}while(!t&&(e=e.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function Tg(e,t,n){if(e){var r=e.getElementsByTagName(t),i=0,o=r.length;if(n)for(;i=o:i<=o))return r;if(r===$g())break;r=zg(r,!1)}return!1}function Ng(e,t,n){for(var r=0,i=0,o=e.children;i2&&void 0!==arguments[2]?arguments[2]:{},r=n.evt,i=ug(n,["evt"]);Jg.pluginEvent.bind(Fv)(e,t,cg({dragEl:Ug,parentEl:Xg,ghostEl:Gg,rootEl:Zg,nextEl:Qg,lastDownEl:ev,cloneEl:tv,cloneHidden:nv,dragStarted:mv,putSortable:lv,activeSortable:Fv.active,originalEvent:r,oldIndex:rv,oldDraggableIndex:ov,newIndex:iv,newDraggableIndex:sv,hideGhostForTarget:Iv,unhideGhostForTarget:Rv,cloneNowHidden:function(){nv=!0},cloneNowShown:function(){nv=!1},dispatchSortableEvent:function(e){Yg({sortable:t,name:e,originalEvent:r})}},i))};function Yg(e){!function(e){var t=e.sortable,n=e.rootEl,r=e.name,i=e.targetEl,o=e.cloneEl,s=e.toEl,a=e.fromEl,l=e.oldIndex,c=e.newIndex,u=e.oldDraggableIndex,d=e.newDraggableIndex,h=e.originalEvent,f=e.putSortable,p=e.extraEventProperties;if(t=t||n&&n[Vg]){var m,g=t.options,v="on"+r.charAt(0).toUpperCase()+r.substr(1);!window.CustomEvent||hg||fg?(m=document.createEvent("Event")).initEvent(r,!0,!0):m=new CustomEvent(r,{bubbles:!0,cancelable:!0}),m.to=s||n,m.from=a||n,m.item=i||n,m.clone=o,m.oldIndex=l,m.newIndex=c,m.oldDraggableIndex=u,m.newDraggableIndex=d,m.originalEvent=h,m.pullMode=f?f.lastPutMode:void 0;var y=cg({},p,Jg.getEventProperties(r,t));for(var b in y)m[b]=y[b];n&&n.dispatchEvent(m),g[v]&&g[v].call(t,m)}}(cg({putSortable:lv,cloneEl:tv,targetEl:Ug,rootEl:Zg,oldIndex:rv,oldDraggableIndex:ov,newIndex:iv,newDraggableIndex:sv},e))}var Ug,Xg,Gg,Zg,Qg,ev,tv,nv,rv,iv,ov,sv,av,lv,cv,uv,dv,hv,fv,pv,mv,gv,vv,yv,bv,wv=!1,xv=!1,Sv=[],kv=!1,Cv=!1,Ov=[],Mv=!1,_v=[],Dv="undefined"!=typeof document,Tv=gg,$v=fg||hg?"cssFloat":"float",Av=Dv&&!vg&&!gg&&"draggable"in document.createElement("div"),Ev=function(){if(Dv){if(hg)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),Nv=function(e,t){var n=_g(e),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=Ng(e,0,t),o=Ng(e,1,t),s=i&&_g(i),a=o&&_g(o),l=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+Ag(i).width,c=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+Ag(o).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&s.float&&"none"!==s.float){var u="left"===s.float?"left":"right";return!o||"both"!==a.clear&&a.clear!==u?"horizontal":"vertical"}return i&&("block"===s.display||"flex"===s.display||"table"===s.display||"grid"===s.display||l>=r&&"none"===n[$v]||o&&"none"===n[$v]&&l+c>r)?"vertical":"horizontal"},Pv=function(e){function t(e,n){return function(r,i,o,s){var a=r.options.group.name&&i.options.group.name&&r.options.group.name===i.options.group.name;if(null==e&&(n||a))return!0;if(null==e||!1===e)return!1;if(n&&"clone"===e)return e;if("function"==typeof e)return t(e(r,i,o,s),n)(r,i,o,s);var l=(n?r:i).options.group.name;return!0===e||"string"==typeof e&&e===l||e.join&&e.indexOf(l)>-1}}var n={},r=e.group;r&&"object"==sg(r)||(r={name:r}),n.name=r.name,n.checkPull=t(r.pull,!0),n.checkPut=t(r.put),n.revertClone=r.revertClone,e.group=n},Iv=function(){!Ev&&Gg&&_g(Gg,"display","none")},Rv=function(){!Ev&&Gg&&_g(Gg,"display","")};Dv&&document.addEventListener("click",(function(e){if(xv)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),xv=!1,!1}),!0);var zv=function(e){if(Ug){e=e.touches?e.touches[0]:e;var t=(i=e.clientX,o=e.clientY,Sv.some((function(e){if(!Pg(e)){var t=Ag(e),n=e[Vg].options.emptyInsertThreshold,r=i>=t.left-n&&i<=t.right+n,a=o>=t.top-n&&o<=t.bottom+n;return n&&r&&a?s=e:void 0}})),s);if(t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[Vg]._onDragOver(n)}}var i,o,s},jv=function(e){Ug&&Ug.parentNode[Vg]._isOutsideThisEl(e.target)};function Fv(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=lg({},t),e[Vg]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Nv(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Fv.supportPointer&&"PointerEvent"in window,emptyInsertThreshold:5};for(var r in Jg.initializePlugins(this,e,n),n)!(r in t)&&(t[r]=n[r]);for(var i in Pv(t),this)"_"===i.charAt(0)&&"function"==typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!t.forceFallback&&Av,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?bg(e,"pointerdown",this._onTapStart):(bg(e,"mousedown",this._onTapStart),bg(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(bg(e,"dragover",this),bg(e,"dragenter",this)),Sv.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),lg(this,Wg())}function Lv(e,t,n,r,i,o,s,a){var l,c,u=e[Vg],d=u.options.onMove;return!window.CustomEvent||hg||fg?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=t,l.from=e,l.dragged=n,l.draggedRect=r,l.related=i||t,l.relatedRect=o||Ag(t),l.willInsertAfter=a,l.originalEvent=s,e.dispatchEvent(l),d&&(c=d.call(u,l,s)),c}function Bv(e){e.draggable=!1}function Vv(){Mv=!1}function Wv(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,r=0;n--;)r+=t.charCodeAt(n);return r.toString(36)}function qv(e){return setTimeout(e,0)}function Hv(e){return clearTimeout(e)}Fv.prototype={constructor:Fv,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(gv=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,Ug):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,r=this.options,i=r.preventOnFilter,o=e.type,s=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,a=(s||e).target,l=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||a,c=r.filter;if(function(e){_v.length=0;var t=e.getElementsByTagName("input"),n=t.length;for(;n--;){var r=t[n];r.checked&&_v.push(r)}}(n),!Ug&&!(/mousedown|pointerdown/.test(o)&&0!==e.button||r.disabled||l.isContentEditable||(a=kg(a,r.draggable,n,!1))&&a.animated||ev===a)){if(rv=Ig(a),ov=Ig(a,r.draggable),"function"==typeof c){if(c.call(this,e,a,this))return Yg({sortable:t,rootEl:l,name:"filter",targetEl:a,toEl:n,fromEl:n}),Kg("filter",t,{evt:e}),void(i&&e.cancelable&&e.preventDefault())}else if(c&&(c=c.split(",").some((function(r){if(r=kg(l,r.trim(),n,!1))return Yg({sortable:t,rootEl:r,name:"filter",targetEl:a,fromEl:n,toEl:n}),Kg("filter",t,{evt:e}),!0}))))return void(i&&e.cancelable&&e.preventDefault());r.handle&&!kg(l,r.handle,n,!1)||this._prepareDragStart(e,s,a)}}},_prepareDragStart:function(e,t,n){var r,i=this,o=i.el,s=i.options,a=o.ownerDocument;if(n&&!Ug&&n.parentNode===o){var l=Ag(n);if(Zg=o,Xg=(Ug=n).parentNode,Qg=Ug.nextSibling,ev=n,av=s.group,Fv.dragged=Ug,cv={target:Ug,clientX:(t||e).clientX,clientY:(t||e).clientY},fv=cv.clientX-l.left,pv=cv.clientY-l.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,Ug.style["will-change"]="all",r=function(){Kg("delayEnded",i,{evt:e}),Fv.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!pg&&i.nativeDraggable&&(Ug.draggable=!0),i._triggerDragStart(e,t),Yg({sortable:i,name:"choose",originalEvent:e}),Mg(Ug,s.chosenClass,!0))},s.ignore.split(",").forEach((function(e){Tg(Ug,e.trim(),Bv)})),bg(a,"dragover",zv),bg(a,"mousemove",zv),bg(a,"touchmove",zv),bg(a,"mouseup",i._onDrop),bg(a,"touchend",i._onDrop),bg(a,"touchcancel",i._onDrop),pg&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Ug.draggable=!0),Kg("delayStart",this,{evt:e}),!s.delay||s.delayOnTouchOnly&&!t||this.nativeDraggable&&(fg||hg))r();else{if(Fv.eventCanceled)return void this._onDrop();bg(a,"mouseup",i._disableDelayedDrag),bg(a,"touchend",i._disableDelayedDrag),bg(a,"touchcancel",i._disableDelayedDrag),bg(a,"mousemove",i._delayedDragTouchMoveHandler),bg(a,"touchmove",i._delayedDragTouchMoveHandler),s.supportPointer&&bg(a,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(r,s.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Ug&&Bv(Ug),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;wg(e,"mouseup",this._disableDelayedDrag),wg(e,"touchend",this._disableDelayedDrag),wg(e,"touchcancel",this._disableDelayedDrag),wg(e,"mousemove",this._delayedDragTouchMoveHandler),wg(e,"touchmove",this._delayedDragTouchMoveHandler),wg(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?bg(document,"pointermove",this._onTouchMove):bg(document,t?"touchmove":"mousemove",this._onTouchMove):(bg(Ug,"dragend",this),bg(Zg,"dragstart",this._onDragStart));try{document.selection?qv((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(n){}},_dragStarted:function(e,t){if(wv=!1,Zg&&Ug){Kg("dragStarted",this,{evt:t}),this.nativeDraggable&&bg(document,"dragover",jv);var n=this.options;!e&&Mg(Ug,n.dragClass,!1),Mg(Ug,n.ghostClass,!0),Fv.active=this,e&&this._appendGhost(),Yg({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(uv){this._lastX=uv.clientX,this._lastY=uv.clientY,Iv();for(var e=document.elementFromPoint(uv.clientX,uv.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(uv.clientX,uv.clientY))!==t;)t=e;if(Ug.parentNode[Vg]._isOutsideThisEl(e),t)do{if(t[Vg]){if(t[Vg]._onDragOver({clientX:uv.clientX,clientY:uv.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);Rv()}},_onTouchMove:function(e){if(cv){var t=this.options,n=t.fallbackTolerance,r=t.fallbackOffset,i=e.touches?e.touches[0]:e,o=Gg&&Dg(Gg,!0),s=Gg&&o&&o.a,a=Gg&&o&&o.d,l=Tv&&bv&&Rg(bv),c=(i.clientX-cv.clientX+r.x)/(s||1)+(l?l[0]-Ov[0]:0)/(s||1),u=(i.clientY-cv.clientY+r.y)/(a||1)+(l?l[1]-Ov[1]:0)/(a||1);if(!Fv.active&&!wv){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))r.right+i||e.clientX<=r.right&&e.clientY>r.bottom&&e.clientX>=r.left:e.clientX>r.right&&e.clientY>r.top||e.clientX<=r.right&&e.clientY>r.bottom+i}(e,i,this)&&!m.animated){if(m===Ug)return $(!1);if(m&&o===e.target&&(s=m),s&&(n=Ag(s)),!1!==Lv(Zg,o,Ug,t,s,n,e,!!s))return T(),o.appendChild(Ug),Xg=o,A(),$(!0)}else if(s.parentNode===o){n=Ag(s);var g,v,y,b=Ug.parentNode!==o,w=!function(e,t,n){var r=n?e.left:e.top,i=n?e.right:e.bottom,o=n?e.width:e.height,s=n?t.left:t.top,a=n?t.right:t.bottom,l=n?t.width:t.height;return r===s||i===a||r+o/2===s+l/2}(Ug.animated&&Ug.toRect||t,s.animated&&s.toRect||n,i),x=i?"top":"left",S=Eg(s,"top","top")||Eg(Ug,"top","top"),k=S?S.scrollTop:void 0;if(gv!==s&&(v=n[x],kv=!1,Cv=!w&&a.invertSwap||b),g=function(e,t,n,r,i,o,s,a){var l=r?e.clientY:e.clientX,c=r?n.height:n.width,u=r?n.top:n.left,d=r?n.bottom:n.right,h=!1;if(!s)if(a&&yvu+c*o/2:ld-yv)return-vv}else if(l>u+c*(1-i)/2&&ld-c*o/2))return l>u+c/2?1:-1;return 0}(e,s,n,i,w?1:a.swapThreshold,null==a.invertedSwapThreshold?a.swapThreshold:a.invertedSwapThreshold,Cv,gv===s),0!==g){var C=Ig(Ug);do{C-=g,y=Xg.children[C]}while(y&&("none"===_g(y,"display")||y===Gg))}if(0===g||y===s)return $(!1);gv=s,vv=g;var O=s.nextElementSibling,M=!1,_=Lv(Zg,o,Ug,t,s,n,e,M=1===g);if(!1!==_)return 1!==_&&-1!==_||(M=1===_),Mv=!0,setTimeout(Vv,30),T(),M&&!O?o.appendChild(Ug):s.parentNode.insertBefore(Ug,M?O:s),S&&Lg(S,0,k-S.scrollTop),Xg=Ug.parentNode,void 0===v||Cv||(yv=Math.abs(v-Ag(s)[x])),A(),$(!0)}if(o.contains(Ug))return $(!1)}return!1}function D(a,l){Kg(a,f,cg({evt:e,isOwner:u,axis:i?"vertical":"horizontal",revert:r,dragRect:t,targetRect:n,canSort:d,fromSortable:h,target:s,completed:$,onMove:function(n,r){return Lv(Zg,o,Ug,t,n,Ag(n),e,r)},changed:A},l))}function T(){D("dragOverAnimationCapture"),f.captureAnimationState(),f!==h&&h.captureAnimationState()}function $(t){return D("dragOverCompleted",{insertion:t}),t&&(u?c._hideClone():c._showClone(f),f!==h&&(Mg(Ug,lv?lv.options.ghostClass:c.options.ghostClass,!1),Mg(Ug,a.ghostClass,!0)),lv!==f&&f!==Fv.active?lv=f:f===Fv.active&&lv&&(lv=null),h===f&&(f._ignoreWhileAnimating=s),f.animateAll((function(){D("dragOverAnimationComplete"),f._ignoreWhileAnimating=null})),f!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(s===Ug&&!Ug.animated||s===o&&!s.animated)&&(gv=null),a.dragoverBubble||e.rootEl||s===document||(Ug.parentNode[Vg]._isOutsideThisEl(e.target),!t&&zv(e)),!a.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),p=!0}function A(){iv=Ig(Ug),sv=Ig(Ug,a.draggable),Yg({sortable:f,name:"change",toEl:o,newIndex:iv,newDraggableIndex:sv,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){wg(document,"mousemove",this._onTouchMove),wg(document,"touchmove",this._onTouchMove),wg(document,"pointermove",this._onTouchMove),wg(document,"dragover",zv),wg(document,"mousemove",zv),wg(document,"touchmove",zv)},_offUpEvents:function(){var e=this.el.ownerDocument;wg(e,"mouseup",this._onDrop),wg(e,"touchend",this._onDrop),wg(e,"pointerup",this._onDrop),wg(e,"touchcancel",this._onDrop),wg(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;iv=Ig(Ug),sv=Ig(Ug,n.draggable),Kg("drop",this,{evt:e}),Xg=Ug&&Ug.parentNode,iv=Ig(Ug),sv=Ig(Ug,n.draggable),Fv.eventCanceled||(wv=!1,Cv=!1,kv=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Hv(this.cloneId),Hv(this._dragStartId),this.nativeDraggable&&(wg(document,"drop",this),wg(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),mg&&_g(document.body,"user-select",""),_g(Ug,"transform",""),e&&(mv&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),Gg&&Gg.parentNode&&Gg.parentNode.removeChild(Gg),(Zg===Xg||lv&&"clone"!==lv.lastPutMode)&&tv&&tv.parentNode&&tv.parentNode.removeChild(tv),Ug&&(this.nativeDraggable&&wg(Ug,"dragend",this),Bv(Ug),Ug.style["will-change"]="",mv&&!wv&&Mg(Ug,lv?lv.options.ghostClass:this.options.ghostClass,!1),Mg(Ug,this.options.chosenClass,!1),Yg({sortable:this,name:"unchoose",toEl:Xg,newIndex:null,newDraggableIndex:null,originalEvent:e}),Zg!==Xg?(iv>=0&&(Yg({rootEl:Xg,name:"add",toEl:Xg,fromEl:Zg,originalEvent:e}),Yg({sortable:this,name:"remove",toEl:Xg,originalEvent:e}),Yg({rootEl:Xg,name:"sort",toEl:Xg,fromEl:Zg,originalEvent:e}),Yg({sortable:this,name:"sort",toEl:Xg,originalEvent:e})),lv&&lv.save()):iv!==rv&&iv>=0&&(Yg({sortable:this,name:"update",toEl:Xg,originalEvent:e}),Yg({sortable:this,name:"sort",toEl:Xg,originalEvent:e})),Fv.active&&(null!=iv&&-1!==iv||(iv=rv,sv=ov),Yg({sortable:this,name:"end",toEl:Xg,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){Kg("nulling",this),Zg=Ug=Xg=Gg=Qg=tv=ev=nv=cv=uv=mv=iv=sv=rv=ov=gv=vv=lv=av=Fv.dragged=Fv.ghost=Fv.clone=Fv.active=null,_v.forEach((function(e){e.checked=!0})),_v.length=dv=hv=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":Ug&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move");e.cancelable&&e.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],n=this.el.children,r=0,i=n.length,o=this.options;re.replace(ay,((e,t)=>t?t.toUpperCase():""))));function cy(e){null!==e.parentElement&&e.parentElement.removeChild(e)}function uy(e,t,n){const r=0===n?e.children[0]:e.children[n-1].nextSibling;e.insertBefore(t,r)}function dy(e,t){this.$nextTick((()=>this.$emit(e.toLowerCase(),t)))}function hy(e){return t=>{null!==this.realList&&this["onDrag"+e](t),dy.call(this,e,t)}}function fy(e){return["transition-group","TransitionGroup"].includes(e)}function py(e,t,n){return e[n]||(t[n]?t[n]():void 0)}const my=["Start","Add","Remove","Update","End"],gy=["Choose","Unchoose","Sort","Filter","Clone"],vy=["Move",...my,...gy].map((e=>"on"+e));var yy=null;const by={name:"draggable",inheritAttrs:!1,props:{options:Object,list:{type:Array,required:!1,default:null},value:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:e=>e},element:{type:String,default:"div"},tag:{type:String,default:null},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},data:()=>({transitionMode:!1,noneFunctionalComponentMode:!1}),render(e){const t=this.$slots.default;this.transitionMode=function(e){if(!e||1!==e.length)return!1;const[{componentOptions:t}]=e;return!!t&&fy(t.tag)}(t);const{children:n,headerOffset:r,footerOffset:i}=function(e,t,n){let r=0,i=0;const o=py(t,n,"header");o&&(r=o.length,e=e?[...o,...e]:[...o]);const s=py(t,n,"footer");return s&&(i=s.length,e=e?[...e,...s]:[...s]),{children:e,headerOffset:r,footerOffset:i}}(t,this.$slots,this.$scopedSlots);this.headerOffset=r,this.footerOffset=i;const o=function(e,t){let n=null;const r=(e,t)=>{n=function(e,t,n){return void 0===n||((e=e||{})[t]=n),e}(n,e,t)};if(r("attrs",Object.keys(e).filter((e=>"id"===e||e.startsWith("data-"))).reduce(((t,n)=>(t[n]=e[n],t)),{})),!t)return n;const{on:i,props:o,attrs:s}=t;return r("on",i),r("props",o),Object.assign(n.attrs,s),n}(this.$attrs,this.componentData);return e(this.getTag(),o,n)},created(){null!==this.list&&null!==this.value&&sy.error("Value and list props are mutually exclusive! Please set one or another."),"div"!==this.element&&sy.warn("Element props is deprecated please use tag props instead. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#element-props"),void 0!==this.options&&sy.warn("Options props is deprecated, add sortable options directly as vue.draggable item, or use v-bind. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#options-props")},mounted(){if(this.noneFunctionalComponentMode=this.getTag().toLowerCase()!==this.$el.nodeName.toLowerCase()&&!this.getIsFunctional(),this.noneFunctionalComponentMode&&this.transitionMode)throw new Error(`Transition-group inside component is not supported. Please alter tag value or remove transition-group. Current tag value: ${this.getTag()}`);const e={};my.forEach((t=>{e["on"+t]=hy.call(this,t)})),gy.forEach((t=>{e["on"+t]=dy.bind(this,t)}));const t=Object.keys(this.$attrs).reduce(((e,t)=>(e[ly(t)]=this.$attrs[t],e)),{}),n=Object.assign({},this.options,t,e,{onMove:(e,t)=>this.onDragMove(e,t)});!("draggable"in n)&&(n.draggable=">*"),this._sortable=new Fv(this.rootContainer,n),this.computeIndexes()},beforeDestroy(){void 0!==this._sortable&&this._sortable.destroy()},computed:{rootContainer(){return this.transitionMode?this.$el.children[0]:this.$el},realList(){return this.list?this.list:this.value}},watch:{options:{handler(e){this.updateOptions(e)},deep:!0},$attrs:{handler(e){this.updateOptions(e)},deep:!0},realList(){this.computeIndexes()}},methods:{getIsFunctional(){const{fnOptions:e}=this._vnode;return e&&e.functional},getTag(){return this.tag||this.element},updateOptions(e){for(var t in e){const n=ly(t);-1===vy.indexOf(n)&&this._sortable.option(n,e[t])}},getChildrenNodes(){if(this.noneFunctionalComponentMode)return this.$children[0].$slots.default;const e=this.$slots.default;return this.transitionMode?e[0].child.$slots.default:e},computeIndexes(){this.$nextTick((()=>{this.visibleIndexes=function(e,t,n,r){if(!e)return[];const i=e.map((e=>e.elm)),o=t.length-r,s=[...t].map(((e,t)=>t>=o?i.length:i.indexOf(e)));return n?s.filter((e=>-1!==e)):s}(this.getChildrenNodes(),this.rootContainer.children,this.transitionMode,this.footerOffset)}))},getUnderlyingVm(e){const t=function(e,t){return e.map((e=>e.elm)).indexOf(t)}(this.getChildrenNodes()||[],e);if(-1===t)return null;return{index:t,element:this.realList[t]}},getUnderlyingPotencialDraggableComponent:({__vue__:e})=>e&&e.$options&&fy(e.$options._componentTag)?e.$parent:!("realList"in e)&&1===e.$children.length&&"realList"in e.$children[0]?e.$children[0]:e,emitChanges(e){this.$nextTick((()=>{this.$emit("change",e)}))},alterList(e){if(this.list)return void e(this.list);const t=[...this.value];e(t),this.$emit("input",t)},spliceList(){this.alterList((e=>e.splice(...arguments)))},updatePosition(e,t){this.alterList((n=>n.splice(t,0,n.splice(e,1)[0])))},getRelatedContextFromMoveEvent({to:e,related:t}){const n=this.getUnderlyingPotencialDraggableComponent(e);if(!n)return{component:n};const r=n.realList,i={list:r,component:n};if(e!==t&&r&&n.getUnderlyingVm){const e=n.getUnderlyingVm(t);if(e)return Object.assign(e,i)}return i},getVmIndex(e){const t=this.visibleIndexes,n=t.length;return e>n-1?n:t[e]},getComponent(){return this.$slots.default[0].componentInstance},resetTransitionData(e){if(!this.noTransitionOnDrag||!this.transitionMode)return;this.getChildrenNodes()[e].data=null;const t=this.getComponent();t.children=[],t.kept=void 0},onDragStart(e){this.context=this.getUnderlyingVm(e.item),e.item._underlying_vm_=this.clone(this.context.element),yy=e.item},onDragAdd(e){const t=e.item._underlying_vm_;if(void 0===t)return;cy(e.item);const n=this.getVmIndex(e.newIndex);this.spliceList(n,0,t),this.computeIndexes();const r={element:t,newIndex:n};this.emitChanges({added:r})},onDragRemove(e){if(uy(this.rootContainer,e.item,e.oldIndex),"clone"===e.pullMode)return void cy(e.clone);const t=this.context.index;this.spliceList(t,1);const n={element:this.context.element,oldIndex:t};this.resetTransitionData(t),this.emitChanges({removed:n})},onDragUpdate(e){cy(e.item),uy(e.from,e.item,e.oldIndex);const t=this.context.index,n=this.getVmIndex(e.newIndex);this.updatePosition(t,n);const r={element:this.context.element,oldIndex:t,newIndex:n};this.emitChanges({moved:r})},updateProperty(e,t){e.hasOwnProperty(t)&&(e[t]+=this.headerOffset)},computeFutureIndex(e,t){if(!e.element)return 0;const n=[...t.to.children].filter((e=>"none"!==e.style.display)),r=n.indexOf(t.related),i=e.component.getVmIndex(r);return-1!==n.indexOf(yy)||!t.willInsertAfter?i:i+1},onDragMove(e,t){const n=this.move;if(!n||!this.realList)return!0;const r=this.getRelatedContextFromMoveEvent(e),i=this.context,o=this.computeFutureIndex(r,e);Object.assign(i,{futureIndex:o});return n(Object.assign({},e,{relatedContext:r,draggedContext:i}),t)},onDragEnd(){this.computeIndexes(),yy=null}}};"undefined"!=typeof window&&"Vue"in window&&window.Vue.component("draggable",by);export{cm as A,om as B,um as C,Mc as D,Iu as E,Rl as F,by as G,ul as H,Op as I,El as J,Cu as N,zu as P,Vl as S,Su as T,Mn as V,Wa as a,Za as b,rl as c,tl as d,bp as e,hp as f,Tp as g,$p as h,jp as i,Lp as j,Vp as k,Bp as l,qa as m,op as n,Cc as o,Mp as p,Lf as q,Rc as r,vp as s,yp as t,Dp as u,Cp as v,Fp as w,sm as x,am as y,lm as z}; diff --git a/kirby/router.php b/kirby/router.php old mode 100644 new mode 100755 diff --git a/kirby/src/Api/Api.php b/kirby/src/Api/Api.php old mode 100644 new mode 100755 index 4d1058a..740e41b --- a/kirby/src/Api/Api.php +++ b/kirby/src/Api/Api.php @@ -8,6 +8,7 @@ use Kirby\Exception\NotFoundException; use Kirby\Filesystem\F; use Kirby\Http\Response; use Kirby\Http\Router; +use Kirby\Toolkit\I18n; use Kirby\Toolkit\Pagination; use Kirby\Toolkit\Properties; use Kirby\Toolkit\Str; @@ -679,6 +680,12 @@ class Api */ public function responseForException(Throwable $e): array { + if (isset($this->kirby) === true) { + $docRoot = $this->kirby->environment()->get('DOCUMENT_ROOT'); + } else { + $docRoot = $_SERVER['DOCUMENT_ROOT'] ?? null; + } + // prepare the result array for all exception types $result = [ 'status' => 'error', @@ -686,7 +693,7 @@ class Api 'code' => empty($e->getCode()) === true ? 500 : $e->getCode(), 'exception' => get_class($e), 'key' => null, - 'file' => F::relativepath($e->getFile(), $_SERVER['DOCUMENT_ROOT'] ?? null), + 'file' => F::relativepath($e->getFile(), $docRoot), 'line' => $e->getLine(), 'details' => [], 'route' => $this->route ? $this->route->pattern() : null @@ -735,13 +742,13 @@ class Api // get error messages from translation $errorMessages = [ - UPLOAD_ERR_INI_SIZE => t('upload.error.iniSize'), - UPLOAD_ERR_FORM_SIZE => t('upload.error.formSize'), - UPLOAD_ERR_PARTIAL => t('upload.error.partial'), - UPLOAD_ERR_NO_FILE => t('upload.error.noFile'), - UPLOAD_ERR_NO_TMP_DIR => t('upload.error.tmpDir'), - UPLOAD_ERR_CANT_WRITE => t('upload.error.cantWrite'), - UPLOAD_ERR_EXTENSION => t('upload.error.extension') + UPLOAD_ERR_INI_SIZE => I18n::translate('upload.error.iniSize'), + UPLOAD_ERR_FORM_SIZE => I18n::translate('upload.error.formSize'), + UPLOAD_ERR_PARTIAL => I18n::translate('upload.error.partial'), + UPLOAD_ERR_NO_FILE => I18n::translate('upload.error.noFile'), + UPLOAD_ERR_NO_TMP_DIR => I18n::translate('upload.error.tmpDir'), + UPLOAD_ERR_CANT_WRITE => I18n::translate('upload.error.cantWrite'), + UPLOAD_ERR_EXTENSION => I18n::translate('upload.error.extension') ]; if (empty($files) === true) { @@ -749,9 +756,9 @@ class Api $uploadMaxFileSize = Str::toBytes(ini_get('upload_max_filesize')); if ($postMaxSize < $uploadMaxFileSize) { - throw new Exception(t('upload.error.iniPostSize')); + throw new Exception(I18n::translate('upload.error.iniPostSize')); } else { - throw new Exception(t('upload.error.noFiles')); + throw new Exception(I18n::translate('upload.error.noFiles')); } } @@ -764,7 +771,7 @@ class Api try { if ($upload['error'] !== 0) { - $errorMessage = $errorMessages[$upload['error']] ?? t('upload.error.default'); + $errorMessage = $errorMessages[$upload['error']] ?? I18n::translate('upload.error.default'); throw new Exception($errorMessage); } @@ -786,7 +793,7 @@ class Api // move the file to a location including the extension, // for better mime detection if ($debug === false && move_uploaded_file($upload['tmp_name'], $source) === false) { - throw new Exception(t('upload.error.cantMove')); + throw new Exception(I18n::translate('upload.error.cantMove')); } $data = $callback($source, $filename); diff --git a/kirby/src/Api/Collection.php b/kirby/src/Api/Collection.php old mode 100644 new mode 100755 diff --git a/kirby/src/Api/Model.php b/kirby/src/Api/Model.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cache/ApcuCache.php b/kirby/src/Cache/ApcuCache.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cache/Cache.php b/kirby/src/Cache/Cache.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cache/FileCache.php b/kirby/src/Cache/FileCache.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cache/MemCached.php b/kirby/src/Cache/MemCached.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cache/MemoryCache.php b/kirby/src/Cache/MemoryCache.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cache/NullCache.php b/kirby/src/Cache/NullCache.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cache/Value.php b/kirby/src/Cache/Value.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/Api.php b/kirby/src/Cms/Api.php old mode 100644 new mode 100755 index fdd9bf7..45b3fe9 --- a/kirby/src/Cms/Api.php +++ b/kirby/src/Cms/Api.php @@ -114,7 +114,7 @@ class Api extends BaseApi */ public function language(): ?string { - return get('language') ?? $this->requestHeaders('x-language'); + return $this->requestQuery('language') ?? $this->requestHeaders('x-language'); } /** diff --git a/kirby/src/Cms/App.php b/kirby/src/Cms/App.php old mode 100644 new mode 100755 index 5d7d25f..df889b9 --- a/kirby/src/Cms/App.php +++ b/kirby/src/Cms/App.php @@ -9,10 +9,10 @@ use Kirby\Exception\LogicException; use Kirby\Exception\NotFoundException; use Kirby\Filesystem\Dir; use Kirby\Filesystem\F; +use Kirby\Http\Environment; use Kirby\Http\Request; use Kirby\Http\Response; use Kirby\Http\Router; -use Kirby\Http\Server; use Kirby\Http\Uri; use Kirby\Http\Visitor; use Kirby\Session\AutoSession; @@ -22,6 +22,7 @@ use Kirby\Toolkit\A; use Kirby\Toolkit\Config; use Kirby\Toolkit\Controller; use Kirby\Toolkit\Properties; +use Kirby\Toolkit\Str; use Throwable; /** @@ -71,7 +72,6 @@ class App protected $roots; protected $routes; protected $router; - protected $server; protected $sessionHandler; protected $site; protected $system; @@ -97,7 +97,7 @@ class App // stuff from config and additional options $this->optionsFromConfig(); $this->optionsFromProps($props['options'] ?? []); - $this->optionsFromEnvironment(); + $this->optionsFromEnvironment($props); } finally { // register the Whoops error handler inside of a // try-finally block to ensure it's still registered @@ -105,6 +105,9 @@ class App $this->handleErrors(); } + // a custom request setup must come before defining the path + $this->setRequest($props['request'] ?? null); + // set the path to make it available for the url bakery $this->setPath($props['path'] ?? null); @@ -115,7 +118,6 @@ class App // configurable properties $this->setOptionalProperties($props, [ 'languages', - 'request', 'roles', 'site', 'user', @@ -330,26 +332,9 @@ class App */ public function call(string $path = null, string $method = null) { - $router = $this->router(); - - /** - * @todo Closures should not defined statically but - * for each instance to avoid this constant setting and unsetting - */ - $router::$beforeEach = function ($route, $path, $method) { - $this->trigger('route:before', compact('route', 'path', 'method')); - }; - - $router::$afterEach = function ($route, $path, $method, $result, $final) { - return $this->apply('route:after', compact('route', 'path', 'method', 'result', 'final'), 'result'); - }; - - $result = $router->call($path ?? $this->path(), $method ?? $this->request()->method()); - - $router::$beforeEach = null; - $router::$afterEach = null; - - return $result; + $path ??= $this->path(); + $method ??= $this->request()->method(); + return $this->router()->call($path, $method); } /** @@ -529,6 +514,43 @@ class App return $this->core; } + /** + * Checks/returns a CSRF token + * @since 3.7.0 + * + * @param string|null $check Pass a token here to compare it to the one in the session + * @return string|bool Either the token or a boolean check result + */ + public function csrf(?string $check = null) + { + $session = $this->session(); + + // no arguments, generate/return a token + // (check explicitly if there have been no arguments at all; + // checking for null introduces a security issue because null could come + // from user input or bugs in the calling code!) + if (func_num_args() === 0) { + $token = $session->get('kirby.csrf'); + + if (is_string($token) !== true) { + $token = bin2hex(random_bytes(32)); + $session->set('kirby.csrf', $token); + } + + return $token; + } + + // argument has been passed, check the token + if ( + is_string($check) === true && + is_string($session->get('kirby.csrf')) === true + ) { + return hash_equals($session->get('kirby.csrf'), $check) === true; + } + + return false; + } + /** * Returns the default language object * @@ -595,11 +617,11 @@ class App * Returns the environment object with access * to the detected host, base url and dedicated options * - * @return \Kirby\Cms\Environment + * @return \Kirby\Http\Environment */ public function environment() { - return $this->environment; + return $this->environment ?? new Environment(); } /** @@ -627,11 +649,13 @@ class App if ($id === '.') { if ($file = $parent->file($filename)) { return $file; - } elseif ($file = $this->site()->file($filename)) { - return $file; - } else { - return null; } + + if ($file = $this->site()->file($filename)) { + return $file; + } + + return null; } if ($page = $this->page($id, $parent, $drafts)) { @@ -645,6 +669,50 @@ class App return null; } + /** + * Return an image from any page + * specified by the path + * + * Example: + * + * + * @param string|null $path + * @return \Kirby\Cms\File|null + * + * @todo merge with App::file() + */ + public function image(?string $path = null) + { + if ($path === null) { + return $this->site()->page()->image(); + } + + $uri = dirname($path); + $filename = basename($path); + + if ($uri === '.') { + $uri = null; + } + + switch ($uri) { + case '/': + $parent = $this->site(); + break; + case null: + $parent = $this->site()->page(); + break; + default: + $parent = $this->site()->page($uri); + break; + } + + if ($parent) { + return $parent->image($filename); + } + + return null; + } + /** * Returns the current App instance * @@ -770,14 +838,28 @@ class App * Renders a single KirbyTag with the given attributes * * @internal - * @param string $type + * @param string|array $type Tag type or array with all tag arguments + * (the key of the first element becomes the type) * @param string|null $value * @param array $attr * @param array $data * @return string */ - public function kirbytag(string $type, string $value = null, array $attr = [], array $data = []): string + public function kirbytag($type, ?string $value = null, array $attr = [], array $data = []): string { + if (is_array($type) === true) { + $kirbytag = $type; + $type = key($kirbytag); + $value = current($kirbytag); + $attr = $kirbytag; + + // check data attribute and separate from attr data if exists + if (isset($attr['data']) === true) { + $data = $attr['data']; + unset($attr['data']); + } + } + $data['kirby'] = $data['kirby'] ?? $this; $data['site'] = $data['site'] ?? $data['kirby']->site(); $data['parent'] = $data['parent'] ?? $data['site']->page(); @@ -813,20 +895,21 @@ class App * * @internal * @param string|null $text - * @param array $data - * @param bool $inline (deprecated: use $data['markdown']['inline'] instead) + * @param array $options + * @param bool $inline (deprecated: use $options['markdown']['inline'] instead) * @return string - * @todo add deprecation warning for $inline parameter in 3.7.0 - * @todo rename $data parameter to $options in 3.7.0 * @todo remove $inline parameter in in 3.8.0 */ - public function kirbytext(string $text = null, array $data = [], bool $inline = false): string + public function kirbytext(string $text = null, array $options = [], bool $inline = false): string { - $options = A::merge([ - 'markdown' => [ - 'inline' => $inline - ] - ], $data); + // warning for deprecated fourth parameter + // @codeCoverageIgnoreStart + if (func_num_args() === 3) { + Helpers::deprecated('Cms\App::kirbytext(): the $inline parameter is deprecated and will be removed in Kirby 3.8.0. Use $options[\'markdown\'][\'inline\'] instead.'); + } + // @codeCoverageIgnoreEnd + + $options['markdown']['inline'] ??= $inline; $text = $this->apply('kirbytext:before', compact('text'), 'text'); $text = $this->kirbytags($text, $options); @@ -924,23 +1007,22 @@ class App * * @internal * @param string|null $text - * @param bool|array $options + * @param bool|array $options Boolean inline value is deprecated, use `['inline' => true]` instead * @return string - * @todo rename $inline parameter to $options in 3.7.0 - * @todo add deprecation warning for boolean $options in 3.7.0 * @todo remove boolean $options in in 3.8.0 */ - public function markdown(string $text = null, $inline = null): string + public function markdown(string $text = null, $options = null): string { - // TODO: remove after renaming parameter - $options = $inline; - // support for the old syntax to enable inline mode as second argument + // @codeCoverageIgnoreStart if (is_bool($options) === true) { + Helpers::deprecated('Cms\App::markdown(): Passing a boolean as second parameter has been deprecated and won\'t be supported anymore in Kirby 3.8.0. Instead pass array with the key "inline" set to true or false.'); + $options = [ 'inline' => $options ]; } + // @codeCoverageIgnoreEnd // merge global options with local options $options = array_merge( @@ -948,9 +1030,10 @@ class App (array)$options ); - // TODO: deprecate passing the $inline parameter in 3.7.0 // TODO: remove passing the $inline parameter in 3.8.0 - $inline = $options['inline'] ?? false; + // $options['inline'] is set to `false` to avoid the deprecation + // warning in the component; this can also be removed in 3.8.0 + $inline = $options['inline'] ??= false; return ($this->component('markdown'))($this, $text, $options, $inline); } @@ -1024,15 +1107,20 @@ class App * Load all options for the current * server environment * + * @param array $props * @return array */ - protected function optionsFromEnvironment(): array + protected function optionsFromEnvironment(array $props = []): array { // create the environment based on the URL setup - $this->environment = new Environment($this->root('config'), $this->options['url'] ?? null); + $this->environment = new Environment([ + 'allowed' => $this->options['url'] ?? null, + 'cli' => $props['cli'] ?? null, + ], $props['server'] ?? null); // merge into one clean options array - return $this->options = array_replace_recursive($this->options, $this->environment->options()); + $options = $this->environment()->options($this->root('config')); + return $this->options = array_replace_recursive($this->options, $options); } /** @@ -1134,14 +1222,11 @@ class App return $this->path; } - $requestUri = '/' . $this->request()->url()->path(); - $scriptName = $_SERVER['SCRIPT_NAME']; - $scriptFile = basename($scriptName); - $scriptDir = dirname($scriptName); - $scriptPath = $scriptFile === 'index.php' ? $scriptDir : $scriptName; - $requestPath = preg_replace('!^' . preg_quote($scriptPath) . '!', '', $requestUri); + $current = $this->request()->path()->toString(); + $index = $this->environment()->baseUri()->path()->toString(); + $path = Str::afterStart($current, $index); - return $this->setPath($requestPath)->path; + return $this->setPath($path)->path; } /** @@ -1164,7 +1249,16 @@ class App */ public function request() { - return $this->request = $this->request ?? new Request(); + if ($this->request !== null) { + return $this->request; + } + + $env = $this->environment(); + + return $this->request = new Request([ + 'cli' => $env->cli(), + 'url' => $env->requestUri() + ]); } /** @@ -1201,7 +1295,7 @@ class App // search for a draft if the page cannot be found if (!$page && $draft = $site->draft($path)) { - if ($this->user() || $draft->isVerified(get('token'))) { + if ($this->user() || $draft->isVerified($this->request()->get('token'))) { $page = $draft; } } @@ -1269,9 +1363,9 @@ class App * Returns a system root * * @param string $type - * @return string + * @return string|null */ - public function root(string $type = 'index'): string + public function root(string $type = 'index'): ?string { return $this->roots->__get($type); } @@ -1314,7 +1408,16 @@ class App } } - return $this->router = $this->router ?? new Router($routes); + $hooks = [ + 'beforeEach' => function ($route, $path, $method) { + $this->trigger('route:before', compact('route', 'path', 'method')); + }, + 'afterEach' => function ($route, $path, $method, $result, $final) { + return $this->apply('route:after', compact('route', 'path', 'method', 'result', 'final'), 'result'); + } + ]; + + return $this->router ??= new Router($routes, $hooks); } /** @@ -1344,11 +1447,16 @@ class App */ public function session(array $options = []) { - // never cache responses that depend on the session - $this->response()->cache(false); - $this->response()->header('Cache-Control', 'no-store', true); + $session = $this->sessionHandler()->get($options); - return $this->sessionHandler()->get($options); + // disable caching for sessions that use the `Authorization` header; + // cookie sessions are already covered by the `Cookie` class + if ($session->mode() === 'manual') { + $this->response()->cache(false); + $this->response()->header('Cache-Control', 'no-store, private', true); + } + + return $session; } /** @@ -1447,13 +1555,17 @@ class App } /** - * Returns the Server object + * Returns the Environment object + * @deprecated 3.7.0 Use `$kirby->environment()` instead * - * @return \Kirby\Http\Server + * @return \Kirby\Http\Environment + * @todo Start throwing deprecation warnings in 3.8.0 + * @todo Remove in 3.9.0 + * @codeCoverageIgnore */ public function server() { - return $this->server ??= new Server(); + return $this->environment(); } /** @@ -1505,12 +1617,24 @@ class App * * @internal * @param mixed $name - * @param array $data + * @param array|object $data Variables or an object that becomes `$item` + * @param bool $return On `false`, directly echo the snippet * @return string|null */ - public function snippet($name, array $data = []): ?string + public function snippet($name, $data = [], bool $return = true): ?string { - return ($this->component('snippet'))($this, $name, array_merge($this->data, $data)); + if (is_object($data) === true) { + $data = ['item' => $data]; + } + + $snippet = ($this->component('snippet'))($this, $name, array_merge($this->data, $data)); + + if ($return === true) { + return $snippet; + } + + echo $snippet; + return null; } /** @@ -1602,7 +1726,7 @@ class App * * @param string $type * @param bool $object If set to `true`, the URL is converted to an object - * @return string|\Kirby\Http\Uri + * @return string|\Kirby\Http\Uri|null */ public function url(string $type = 'index', bool $object = false) { diff --git a/kirby/src/Cms/AppCaches.php b/kirby/src/Cms/AppCaches.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/AppErrors.php b/kirby/src/Cms/AppErrors.php old mode 100644 new mode 100755 index b6c1d5b..279d2d4 --- a/kirby/src/Cms/AppErrors.php +++ b/kirby/src/Cms/AppErrors.php @@ -2,6 +2,7 @@ namespace Kirby\Cms; +use Kirby\Filesystem\F; use Kirby\Http\Response; use Kirby\Toolkit\I18n; use Whoops\Handler\CallbackHandler; @@ -46,7 +47,7 @@ trait AppErrors */ protected function handleErrors(): void { - if ($this->request()->cli() === true) { + if ($this->environment()->cli() === true) { $this->handleCliErrors(); return; } @@ -129,7 +130,7 @@ trait AppErrors 'code' => $code, 'message' => $exception->getMessage(), 'details' => $details, - 'file' => ltrim($exception->getFile(), $_SERVER['DOCUMENT_ROOT'] ?? ''), + 'file' => F::relativepath($exception->getFile(), $this->environment()->get('DOCUMENT_ROOT', '')), 'line' => $exception->getLine(), ], $httpCode); } else { diff --git a/kirby/src/Cms/AppPlugins.php b/kirby/src/Cms/AppPlugins.php old mode 100644 new mode 100755 index 44e90a1..26d0f4c --- a/kirby/src/Cms/AppPlugins.php +++ b/kirby/src/Cms/AppPlugins.php @@ -790,6 +790,18 @@ trait AppPlugins $this->extendTemplates($this->core->templates()); } + /** + * Checks if a native component was extended + * @since 3.7.0 + * + * @param string $component + * @return bool + */ + public function isNativeComponent(string $component): bool + { + return $this->component($component) === $this->nativeComponent($component); + } + /** * Returns the native implementation * of a core component diff --git a/kirby/src/Cms/AppTranslations.php b/kirby/src/Cms/AppTranslations.php old mode 100644 new mode 100755 index 61f18ff..dd5ff6b --- a/kirby/src/Cms/AppTranslations.php +++ b/kirby/src/Cms/AppTranslations.php @@ -155,22 +155,6 @@ trait AppTranslations I18n::$locale = $translationCode ?? 'en'; } - /** - * Set locale settings - * - * @deprecated 3.5.0 Use `\Kirby\Toolkit\Locale::set()` instead - * @todo Remove in 3.7.0 - * - * @param string|array $locale - */ - public function setLocale($locale): void - { - // @codeCoverageIgnoreStart - deprecated('`Kirby\Cms\App::setLocale()` has been deprecated and will be removed in 3.7.0. Use `Kirby\Toolkit\Locale::set()` instead'); - Locale::set($locale); - // @codeCoverageIgnoreEnd - } - /** * Load a specific translation by locale * diff --git a/kirby/src/Cms/AppUsers.php b/kirby/src/Cms/AppUsers.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/Auth.php b/kirby/src/Cms/Auth.php old mode 100644 new mode 100755 index ea903a6..6c3604b --- a/kirby/src/Cms/Auth.php +++ b/kirby/src/Cms/Auth.php @@ -194,8 +194,9 @@ class Auth */ public function csrfFromSession(): string { - $isDev = $this->kirby->option('panel.dev', false) !== false; - return $this->kirby->option('api.csrf', $isDev ? 'dev' : csrf()); + $isDev = $this->kirby->option('panel.dev', false) !== false; + $fallback = $isDev ? 'dev' : $this->kirby->csrf(); + return $this->kirby->option('api.csrf', $fallback); } /** diff --git a/kirby/src/Cms/Auth/Challenge.php b/kirby/src/Cms/Auth/Challenge.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/Auth/EmailChallenge.php b/kirby/src/Cms/Auth/EmailChallenge.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/Auth/Status.php b/kirby/src/Cms/Auth/Status.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/Block.php b/kirby/src/Cms/Block.php old mode 100644 new mode 100755 index 3033897..4310f0b --- a/kirby/src/Cms/Block.php +++ b/kirby/src/Cms/Block.php @@ -73,15 +73,17 @@ class Block extends Item { parent::__construct($params); - // import old builder format - $params = BlockConverter::builderBlock($params); - $params = BlockConverter::editorBlock($params); - if (isset($params['type']) === false) { throw new InvalidArgumentException('The block type is missing'); } - $this->content = $params['content'] ?? []; + // make sure the content is always defined as array to keep + // at least a bit of backward compatibility with older fields + if (is_array($params['content'] ?? null) === false) { + $params['content'] = []; + } + + $this->content = $params['content']; $this->isHidden = $params['isHidden'] ?? false; $this->type = $params['type']; @@ -99,34 +101,6 @@ class Block extends Item return $this->toHtml(); } - /** - * Deprecated method to return the block type - * - * @deprecated 3.5.0 Use `\Kirby\Cms\Block::type()` instead - * @todo Remove in 3.7.0 - * - * @return string - */ - public function _key(): string - { - deprecated('Block::_key() has been deprecated. Use Block::type() instead.'); - return $this->type(); - } - - /** - * Deprecated method to return the block id - * - * @deprecated 3.5.0 Use `\Kirby\Cms\Block::id()` instead - * @todo Remove in 3.7.0 - * - * @return string - */ - public function _uid(): string - { - deprecated('Block::_uid() has been deprecated. Use Block::id() instead.'); - return $this->id(); - } - /** * Returns the content object * @@ -278,7 +252,8 @@ class Block extends Item public function toHtml(): string { try { - return (string)snippet('blocks/' . $this->type(), $this->controller(), true); + $kirby = $this->parent()->kirby(); + return (string)$kirby->snippet('blocks/' . $this->type(), $this->controller(), true); } catch (Throwable $e) { return '

Block error: "' . $e->getMessage() . '" in block type: "' . $this->type() . '"

'; } diff --git a/kirby/src/Cms/BlockConverter.php b/kirby/src/Cms/BlockConverter.php deleted file mode 100644 index 9939c8a..0000000 --- a/kirby/src/Cms/BlockConverter.php +++ /dev/null @@ -1,280 +0,0 @@ - - * @link https://getkirby.com - * @copyright Bastian Allgeier - * @license https://getkirby.com/license - */ -class BlockConverter -{ - public static function builderBlock(array $params): array - { - if (isset($params['_key']) === false) { - return $params; - } - - $params['type'] = $params['_key']; - $params['content'] = $params; - unset($params['_uid']); - - return $params; - } - - public static function editorBlock(array $params): array - { - if (static::isEditorBlock($params) === false) { - return $params; - } - - $method = 'editor' . $params['type']; - - if (method_exists(static::class, $method) === true) { - $params = static::$method($params); - } else { - $params = static::editorCustom($params); - } - - return $params; - } - - public static function editorBlocks(array $blocks = []): array - { - if (empty($blocks) === true) { - return $blocks; - } - - if (static::isEditorBlock($blocks[0]) === false) { - return $blocks; - } - - $list = []; - $listStart = null; - - foreach ($blocks as $index => $block) { - if (in_array($block['type'], ['ul', 'ol']) === true) { - $prev = $blocks[$index-1] ?? null; - $next = $blocks[$index+1] ?? null; - - // new list starts here - if (!$prev || $prev['type'] !== $block['type']) { - $listStart = $index; - } - - // add the block to the list - $list[] = $block; - - // list ends here - if (!$next || $next['type'] !== $block['type']) { - $blocks[$listStart] = [ - 'content' => [ - 'text' => - '<' . $block['type'] . '>' . - implode(array_map(function ($item) { - return '
  • ' . $item['content'] . '
  • '; - }, $list)) . - '', - ], - 'type' => 'list' - ]; - - $start = $listStart + 1; - $end = $listStart + count($list); - - for ($x = $start; $x <= $end; $x++) { - $blocks[$x] = false; - } - - $listStart = null; - $list = []; - } - } else { - $blocks[$index] = static::editorBlock($block); - } - } - - return array_filter($blocks); - } - - public static function editorBlockquote(array $params): array - { - return [ - 'content' => [ - 'text' => $params['content'] - ], - 'type' => 'quote' - ]; - } - - public static function editorCode(array $params): array - { - return [ - 'content' => [ - 'language' => $params['attrs']['language'] ?? null, - 'code' => $params['content'] - ], - 'type' => 'code' - ]; - } - - public static function editorCustom(array $params): array - { - return [ - 'content' => array_merge( - $params['attrs'] ?? [], - [ - 'body' => $params['content'] ?? null - ] - ), - 'type' => $params['type'] ?? 'unknown' - ]; - } - - public static function editorH1(array $params): array - { - return static::editorHeading($params, 'h1'); - } - - public static function editorH2(array $params): array - { - return static::editorHeading($params, 'h2'); - } - - public static function editorH3(array $params): array - { - return static::editorHeading($params, 'h3'); - } - - public static function editorH4(array $params): array - { - return static::editorHeading($params, 'h4'); - } - - public static function editorH5(array $params): array - { - return static::editorHeading($params, 'h5'); - } - - public static function editorH6(array $params): array - { - return static::editorHeading($params, 'h6'); - } - - public static function editorHr(array $params): array - { - return [ - 'content' => [], - 'type' => 'line' - ]; - } - - public static function editorHeading(array $params, string $level): array - { - return [ - 'content' => [ - 'level' => $level, - 'text' => $params['content'] - ], - 'type' => 'heading' - ]; - } - - public static function editorImage(array $params): array - { - // internal image - if (isset($params['attrs']['id']) === true) { - return [ - 'content' => [ - 'alt' => $params['attrs']['alt'] ?? null, - 'caption' => $params['attrs']['caption'] ?? null, - 'image' => $params['attrs']['id'] ?? $params['attrs']['src'] ?? null, - 'location' => 'kirby', - 'ratio' => $params['attrs']['ratio'] ?? null, - ], - 'type' => 'image' - ]; - } - - return [ - 'content' => [ - 'alt' => $params['attrs']['alt'] ?? null, - 'caption' => $params['attrs']['caption'] ?? null, - 'src' => $params['attrs']['src'] ?? null, - 'location' => 'web', - 'ratio' => $params['attrs']['ratio'] ?? null, - ], - 'type' => 'image' - ]; - } - - public static function editorKirbytext(array $params): array - { - return [ - 'content' => [ - 'text' => $params['content'] - ], - 'type' => 'markdown' - ]; - } - - public static function editorOl(array $params): array - { - return [ - 'content' => [ - 'text' => $params['content'] - ], - 'type' => 'list' - ]; - } - - public static function editorParagraph(array $params): array - { - return [ - 'content' => [ - 'text' => '

    ' . $params['content'] . '

    ' - ], - 'type' => 'text' - ]; - } - - public static function editorUl(array $params): array - { - return [ - 'content' => [ - 'text' => $params['content'] - ], - 'type' => 'list' - ]; - } - - public static function editorVideo(array $params): array - { - return [ - 'content' => [ - 'caption' => $params['attrs']['caption'] ?? null, - 'url' => $params['attrs']['src'] ?? null - ], - 'type' => 'video' - ]; - } - - public static function isEditorBlock(array $params): bool - { - if (isset($params['attrs']) === true) { - return true; - } - - if (is_string($params['content'] ?? null) === true) { - return true; - } - - return false; - } -} diff --git a/kirby/src/Cms/Blocks.php b/kirby/src/Cms/Blocks.php old mode 100644 new mode 100755 index 35f96c6..3d2fbfb --- a/kirby/src/Cms/Blocks.php +++ b/kirby/src/Cms/Blocks.php @@ -2,12 +2,9 @@ namespace Kirby\Cms; -use Exception; use Kirby\Data\Json; -use Kirby\Data\Yaml; use Kirby\Parsley\Parsley; use Kirby\Parsley\Schema\Blocks as BlockSchema; -use Kirby\Toolkit\A; use Kirby\Toolkit\Str; use Throwable; @@ -60,7 +57,6 @@ class Blocks extends Items public static function factory(array $items = null, array $params = []) { $items = static::extractFromLayouts($items); - $items = BlockConverter::editorBlocks($items); return parent::factory($items, $params); } @@ -77,12 +73,8 @@ class Blocks extends Items return []; } - if ( - // no columns = no layout - array_key_exists('columns', $input[0]) === false || - // checks if this is a block for the builder plugin - array_key_exists('_key', $input[0]) === true - ) { + // no columns = no layout + if (array_key_exists('columns', $input[0]) === false) { return $input; } @@ -123,21 +115,8 @@ class Blocks extends Items try { $input = Json::decode((string)$input); } catch (Throwable $e) { - try { - // try to import the old YAML format - $yaml = Yaml::decode((string)$input); - $first = A::first($yaml); - - // check for valid yaml - if (empty($yaml) === true || (isset($first['_key']) === false && isset($first['type']) === false)) { - throw new Exception('Invalid YAML'); - } else { - $input = $yaml; - } - } catch (Throwable $e) { - $parser = new Parsley((string)$input, new BlockSchema()); - $input = $parser->blocks(); - } + $parser = new Parsley((string)$input, new BlockSchema()); + $input = $parser->blocks(); } } diff --git a/kirby/src/Cms/Blueprint.php b/kirby/src/Cms/Blueprint.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/Collection.php b/kirby/src/Cms/Collection.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/Collections.php b/kirby/src/Cms/Collections.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/Content.php b/kirby/src/Cms/Content.php old mode 100644 new mode 100755 index 66d5006..8ad474c --- a/kirby/src/Cms/Content.php +++ b/kirby/src/Cms/Content.php @@ -60,9 +60,14 @@ class Content * * @param array|null $data * @param object|null $parent + * @param bool $normalize Set to `false` if the input field keys are already lowercase */ - public function __construct(array $data = [], $parent = null) + public function __construct(array $data = [], $parent = null, bool $normalize = true) { + if ($normalize === true) { + $data = array_change_key_case($data, CASE_LOWER); + } + $this->data = $data; $this->parent = $parent; } @@ -163,9 +168,7 @@ class Content return $this->fields[$key]; } - // fetch the value no matter the case - $data = $this->data(); - $value = $data[$key] ?? array_change_key_case($data)[$key] ?? null; + $value = $this->data()[$key] ?? null; return $this->fields[$key] = new Field($this->parent, $key, $value); } @@ -178,10 +181,7 @@ class Content */ public function has(string $key): bool { - $key = strtolower($key); - $data = array_change_key_case($this->data); - - return isset($data[$key]) === true; + return isset($this->data[strtolower($key)]) === true; } /** @@ -208,7 +208,7 @@ class Content $copy->fields = null; foreach ($keys as $key) { - unset($copy->data[$key]); + unset($copy->data[strtolower($key)]); } return $copy; @@ -258,7 +258,8 @@ class Content */ public function update(array $content = null, bool $overwrite = false) { - $this->data = $overwrite === true ? (array)$content : array_merge($this->data, (array)$content); + $content = array_change_key_case((array)$content, CASE_LOWER); + $this->data = $overwrite === true ? $content : array_merge($this->data, $content); // clear cache of Field objects $this->fields = []; diff --git a/kirby/src/Cms/ContentLock.php b/kirby/src/Cms/ContentLock.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/ContentLocks.php b/kirby/src/Cms/ContentLocks.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/ContentTranslation.php b/kirby/src/Cms/ContentTranslation.php old mode 100644 new mode 100755 index 273df6a..60b9d0e --- a/kirby/src/Cms/ContentTranslation.php +++ b/kirby/src/Cms/ContentTranslation.php @@ -177,7 +177,12 @@ class ContentTranslation */ protected function setContent(array $content = null) { - $this->content = $content; + if ($content !== null) { + $this->content = array_change_key_case($content); + } else { + $this->content = null; + } + return $this; } @@ -220,7 +225,8 @@ class ContentTranslation */ public function update(array $data = null, bool $overwrite = false) { - $this->content = $overwrite === true ? (array)$data : array_merge($this->content(), (array)$data); + $data = array_change_key_case((array)$data); + $this->content = $overwrite === true ? $data : array_merge($this->content(), $data); return $this; } diff --git a/kirby/src/Cms/Core.php b/kirby/src/Cms/Core.php old mode 100644 new mode 100755 index 74c004d..bffa287 --- a/kirby/src/Cms/Core.php +++ b/kirby/src/Cms/Core.php @@ -267,6 +267,7 @@ class Core 'textarea' => $this->root . '/fields/textarea.php', 'time' => $this->root . '/fields/time.php', 'toggle' => $this->root . '/fields/toggle.php', + 'toggles' => $this->root . '/fields/toggles.php', 'url' => $this->root . '/fields/url.php', 'users' => $this->root . '/fields/users.php', 'writer' => $this->root . '/fields/writer.php' @@ -399,6 +400,7 @@ class Core public function sectionMixins(): array { return [ + 'details' => $this->root . '/sections/mixins/details.php', 'empty' => $this->root . '/sections/mixins/empty.php', 'headline' => $this->root . '/sections/mixins/headline.php', 'help' => $this->root . '/sections/mixins/help.php', @@ -407,6 +409,8 @@ class Core 'min' => $this->root . '/sections/mixins/min.php', 'pagination' => $this->root . '/sections/mixins/pagination.php', 'parent' => $this->root . '/sections/mixins/parent.php', + 'search' => $this->root . '/sections/mixins/search.php', + 'sort' => $this->root . '/sections/mixins/sort.php', ]; } @@ -424,6 +428,7 @@ class Core 'files' => $this->root . '/sections/files.php', 'info' => $this->root . '/sections/info.php', 'pages' => $this->root . '/sections/pages.php', + 'stats' => $this->root . '/sections/stats.php', ]; } @@ -452,7 +457,7 @@ class Core public function urls(): array { return $this->cache['urls'] ??= [ - 'index' => fn () => $this->kirby->environment()->url(), + 'index' => fn () => $this->kirby->environment()->baseUrl(), 'base' => fn (array $urls) => rtrim($urls['index'], '/'), 'current' => function (array $urls) { $path = trim($this->kirby->path(), '/'); diff --git a/kirby/src/Cms/Email.php b/kirby/src/Cms/Email.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/Environment.php b/kirby/src/Cms/Environment.php deleted file mode 100644 index 0f90004..0000000 --- a/kirby/src/Cms/Environment.php +++ /dev/null @@ -1,222 +0,0 @@ - - * @link https://getkirby.com - * @copyright Bastian Allgeier - * @license https://getkirby.com/license - */ -class Environment -{ - /** - * @var string - */ - protected $root; - - /** - * @var \Kirby\Http\Uri - */ - protected $uri; - - /** - * @param string $root - * @param bool|string|array|null $allowed - */ - public function __construct(string $root, $allowed = null) - { - $this->root = $root; - - if (is_string($allowed) === true) { - $this->setupFromString($allowed); - return; - } - - if (is_array($allowed) === true) { - $this->setupFromArray($allowed); - return; - } - - if (is_int($allowed) === true) { - $this->setupFromFlag($allowed); - return; - } - - if (is_null($allowed) === true) { - $this->setupFromFlag(Server::HOST_FROM_SERVER | Server::HOST_ALLOW_EMPTY); - return; - } - - throw new InvalidArgumentException('Invalid allow list setup for base URLs'); - } - - /** - * Throw an exception if the host in the URI - * object is empty - * - * @throws \Kirby\Exception\InvalidArgumentException - * @return void - */ - protected function blockEmptyHost(): void - { - if (empty($this->uri->host()) === true) { - throw new InvalidArgumentException('Invalid host setup. The detected host is not allowed.'); - } - } - - /** - * Returns the detected host name - * - * @return string|null - */ - public function host(): ?string - { - return $this->uri->host(); - } - - /** - * Loads and returns the environment options - * - * @return array - */ - public function options(): array - { - $configHost = []; - $configAddr = []; - - $host = $this->host(); - $addr = Server::address(); - - // load the config for the host - if (empty($host) === false) { - $configHost = F::load($this->root . '/config.' . $host . '.php', []); - } - - // load the config for the server IP - if (empty($addr) === false) { - $configAddr = F::load($this->root . '/config.' . $addr . '.php', []); - } - - return array_replace_recursive($configHost, $configAddr); - } - - /** - * The current URL should be auto detected from a host allowlist - * - * @param array $allowed - * @return \Kirby\Http\Uri - */ - public function setupFromArray(array $allowed) - { - $allowedStrings = []; - $allowedUris = []; - $hosts = []; - - foreach ($allowed as $url) { - $allowedUris[] = $uri = new Uri($url, ['slash' => false]); - $allowedStrings[] = $uri->toString(); - $hosts[] = $uri->host(); - } - - // register all allowed hosts - Server::hosts($hosts); - - // get the index URL, including the subfolder if it exists - $this->uri = Uri::index(); - - // empty URLs don't make sense in an allow list - $this->blockEmptyHost(); - - // validate against the list of allowed base URLs - if (in_array($this->uri->toString(), $allowedStrings) === false) { - throw new InvalidArgumentException('The subfolder is not in the allowed base URL list'); - } - - return $this->uri; - } - - /** - * The URL option receives a set of Server constant flags - * - * Server::HOST_FROM_SERVER - * Server::HOST_FROM_SERVER | Server::HOST_ALLOW_EMPTY - * Server::HOST_FROM_HOST - * Server::HOST_FROM_HOST | Server::HOST_ALLOW_EMPTY - * - * @param int $allowed - * @return \Kirby\Http\Uri - */ - public function setupFromFlag(int $allowed) - { - // allow host detection from host headers - if ($allowed & Server::HOST_FROM_HEADER) { - Server::hosts(Server::HOST_FROM_HEADER); - - // detect host only from server name - } else { - Server::hosts(Server::HOST_FROM_SERVER); - } - - // get the base URL - $this->uri = Uri::index(); - - // accept empty hosts - if ($allowed & Server::HOST_ALLOW_EMPTY) { - return $this->uri; - } - - // block empty hosts - $this->blockEmptyHost(); - - return $this->uri; - } - - /** - * The current URL is predefined with a single string - * and not detected automatically. - * - * If the url option is relative (i.e. '/' or '/some/subfolder') - * The host will be empty and that's totally fine. - * No need to block an empty host here - * - * @param string $allowed - * @return \Kirby\Http\Uri - */ - public function setupFromString(string $allowed) - { - // create the URI object directly from the given option - // without any form of detection from the server - $this->uri = new Uri($allowed); - - // only create an allow list from absolute URLs - // otherwise the default secure host detection - // behavior will be used - if (empty($host = $this->uri->host()) === false) { - Server::hosts([$host]); - } - - return $this->uri; - } - - /** - * Returns the base URL for the environment - * - * @return string - */ - public function url(): string - { - return $this->uri; - } -} diff --git a/kirby/src/Cms/Event.php b/kirby/src/Cms/Event.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/Field.php b/kirby/src/Cms/Field.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/Fieldset.php b/kirby/src/Cms/Fieldset.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/Fieldsets.php b/kirby/src/Cms/Fieldsets.php old mode 100644 new mode 100755 index 29d3177..aaf0150 --- a/kirby/src/Cms/Fieldsets.php +++ b/kirby/src/Cms/Fieldsets.php @@ -70,7 +70,7 @@ class Fieldsets extends Items public static function factory(array $items = null, array $params = []) { - $items ??= option('blocks.fieldsets', [ + $items ??= App::instance()->option('blocks.fieldsets', [ 'code' => 'blocks/code', 'gallery' => 'blocks/gallery', 'heading' => 'blocks/heading', diff --git a/kirby/src/Cms/File.php b/kirby/src/Cms/File.php old mode 100644 new mode 100755 index a0afdf9..02f66c2 --- a/kirby/src/Cms/File.php +++ b/kirby/src/Cms/File.php @@ -425,16 +425,11 @@ class File extends ModelWithContent * Returns the parent id if a parent exists * * @internal - * @todo 3.7.0 When setParent() is changed, the if check is not needed anymore - * @return string|null + * @return string */ - public function parentId(): ?string + public function parentId(): string { - if ($parent = $this->parent()) { - return $parent->id(); - } - - return null; + return $this->parent()->id(); } /** @@ -511,22 +506,13 @@ class File extends ModelWithContent } /** - * Sets the parent model object; - * this property is required for `File::create()` and - * will be generally required starting with Kirby 3.7.0 + * Sets the parent model object * - * @param \Kirby\Cms\Model|null $parent + * @param \Kirby\Cms\Model $parent * @return $this - * @todo make property required in 3.7.0 */ - protected function setParent(Model $parent = null) + protected function setParent(Model $parent) { - // @codeCoverageIgnoreStart - if ($parent === null) { - deprecated('You are creating a `Kirby\Cms\File` object without passing the `parent` property. While unsupported, this hasn\'t caused any direct errors so far. To fix inconsistencies, the `parent` property will be required when creating a `Kirby\Cms\File` object in Kirby 3.7.0 and higher. Not passing this property will start throwing a breaking error.'); - } - // @codeCoverageIgnoreEnd - $this->parent = $parent; return $this; } @@ -641,7 +627,6 @@ class File extends ModelWithContent * used in the panel, when the file * gets dragged onto a textarea * - * @todo Add `deprecated()` helper warning in 3.7.0 * @todo Remove in 3.8.0 * * @internal @@ -652,6 +637,7 @@ class File extends ModelWithContent */ public function dragText(string $type = null, bool $absolute = false): string { + Helpers::deprecated('Cms\File::dragText() has been deprecated and will be removed in Kirby 3.8.0. Use $file->panel()->dragText() instead.'); return $this->panel()->dragText($type, $absolute); } @@ -659,7 +645,6 @@ class File extends ModelWithContent * Returns an array of all actions * that can be performed in the Panel * - * @todo Add `deprecated()` helper warning in 3.7.0 * @todo Remove in 3.8.0 * * @since 3.3.0 This also checks for the lock status @@ -671,13 +656,13 @@ class File extends ModelWithContent */ public function panelOptions(array $unlock = []): array { + Helpers::deprecated('Cms\File::panelOptions() has been deprecated and will be removed in Kirby 3.8.0. Use $file->panel()->options() instead.'); return $this->panel()->options($unlock); } /** * Returns the full path without leading slash * - * @todo Add `deprecated()` helper warning in 3.7.0 * @todo Remove in 3.8.0 * * @internal @@ -686,6 +671,7 @@ class File extends ModelWithContent */ public function panelPath(): string { + Helpers::deprecated('Cms\File::panelPath() has been deprecated and will be removed in Kirby 3.8.0. Use $file->panel()->path() instead.'); return $this->panel()->path(); } @@ -693,7 +679,6 @@ class File extends ModelWithContent * Prepares the response data for file pickers * and file fields * - * @todo Add `deprecated()` helper warning in 3.7.0 * @todo Remove in 3.8.0 * * @param array|null $params @@ -702,6 +687,7 @@ class File extends ModelWithContent */ public function panelPickerData(array $params = []): array { + Helpers::deprecated('Cms\File::panelPickerData() has been deprecated and will be removed in Kirby 3.8.0. Use $file->panel()->pickerData() instead.'); return $this->panel()->pickerData($params); } @@ -709,7 +695,6 @@ class File extends ModelWithContent * Returns the url to the editing view * in the panel * - * @todo Add `deprecated()` helper warning in 3.7.0 * @todo Remove in 3.8.0 * * @internal @@ -719,6 +704,7 @@ class File extends ModelWithContent */ public function panelUrl(bool $relative = false): string { + Helpers::deprecated('Cms\File::panelUrl() has been deprecated and will be removed in Kirby 3.8.0. Use $file->panel()->url() instead.'); return $this->panel()->url($relative); } @@ -732,7 +718,7 @@ class File extends ModelWithContent public function previewUrl(): string { $parent = $this->parent(); - $url = url($this->id()); + $url = Url::to($this->id()); switch ($parent::CLASS_ALIAS) { case 'page': @@ -752,6 +738,11 @@ class File extends ModelWithContent return $this->url(); } + // checks `file::url` component is extended + if ($this->kirby()->isNativeComponent('file::url') === false) { + return $this->url(); + } + return $url; case 'user': return $this->url(); diff --git a/kirby/src/Cms/FileActions.php b/kirby/src/Cms/FileActions.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/FileBlueprint.php b/kirby/src/Cms/FileBlueprint.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/FileModifications.php b/kirby/src/Cms/FileModifications.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/FilePermissions.php b/kirby/src/Cms/FilePermissions.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/FilePicker.php b/kirby/src/Cms/FilePicker.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/FileRules.php b/kirby/src/Cms/FileRules.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/FileVersion.php b/kirby/src/Cms/FileVersion.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/Files.php b/kirby/src/Cms/Files.php old mode 100644 new mode 100755 index b71b82b..fe00604 --- a/kirby/src/Cms/Files.php +++ b/kirby/src/Cms/Files.php @@ -107,26 +107,30 @@ class Files extends Collection /** * Tries to find a file by id/filename + * @deprecated 3.7.0 Use `$files->find()` instead + * @todo 3.8.0 Remove method + * @codeCoverageIgnore * * @param string $id * @return \Kirby\Cms\File|null */ public function findById(string $id) { - return $this->get(ltrim($this->parent->id() . '/' . $id, '/')); + Helpers::deprecated('Cms\Files::findById() has been deprecated and will be removed in Kirby 3.8.0. Use $files->find() instead.'); + + return $this->findByKey($id); } /** - * Alias for FilesFinder::findById() which is - * used internally in the Files collection to - * map the get method correctly. + * Finds a file by its filename + * @internal Use `$files->find()` instead * * @param string $key * @return \Kirby\Cms\File|null */ public function findByKey(string $key) { - return $this->findById($key); + return $this->get(ltrim($this->parent->id() . '/' . $key, '/')); } /** diff --git a/kirby/src/Cms/Find.php b/kirby/src/Cms/Find.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/HasChildren.php b/kirby/src/Cms/HasChildren.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/HasFiles.php b/kirby/src/Cms/HasFiles.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/HasMethods.php b/kirby/src/Cms/HasMethods.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/HasSiblings.php b/kirby/src/Cms/HasSiblings.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/Helpers.php b/kirby/src/Cms/Helpers.php new file mode 100755 index 0000000..38caf16 --- /dev/null +++ b/kirby/src/Cms/Helpers.php @@ -0,0 +1,87 @@ + + * @link https://getkirby.com + * @copyright Bastian Allgeier + * @license https://getkirby.com/license + */ +class Helpers +{ + /** + * Triggers a deprecation warning if debug mode is active + * + * @param string $message + * @return bool Whether the warning was triggered + */ + public static function deprecated(string $message): bool + { + if (App::instance()->option('debug') === true) { + return trigger_error($message, E_USER_DEPRECATED) === true; + } + + return false; + } + + /** + * Simple object and variable dumper + * to help with debugging. + * + * @param mixed $variable + * @param bool $echo + * @return string + */ + public static function dump($variable, bool $echo = true): string + { + $kirby = App::instance(); + return ($kirby->component('dump'))($kirby, $variable, $echo); + } + + /** + * Checks if a helper was overridden by the user + * by setting the `KIRBY_HELPER_*` constant + * @internal + * + * @param string $name Name of the helper + * @return bool + */ + public static function hasOverride(string $name): bool + { + $name = 'KIRBY_HELPER_' . strtoupper($name); + return defined($name) === true && constant($name) === false; + } + + /** + * Determines the size/length of numbers, + * strings, arrays and countable objects + * + * @param mixed $value + * @return int + * @throws \Kirby\Exception\InvalidArgumentException + */ + public static function size($value): int + { + if (is_numeric($value)) { + return (int)$value; + } + + if (is_string($value)) { + return Str::length(trim($value)); + } + + if (is_countable($value)) { + return count($value); + } + + throw new InvalidArgumentException('Could not determine the size of the given value'); + } +} diff --git a/kirby/src/Cms/Html.php b/kirby/src/Cms/Html.php old mode 100644 new mode 100755 index 37c470c..5b1f881 --- a/kirby/src/Cms/Html.php +++ b/kirby/src/Cms/Html.php @@ -2,6 +2,9 @@ namespace Kirby\Cms; +use Kirby\Filesystem\F; +use Kirby\Toolkit\A; + /** * The `Html` class provides methods for building * common HTML tags and also contains some helper @@ -15,6 +18,50 @@ namespace Kirby\Cms; */ class Html extends \Kirby\Toolkit\Html { + /** + * Creates one or multiple CSS link tags + * @since 3.7.0 + * + * @param string|array $url Relative or absolute URLs, an array of URLs or `@auto` for automatic template css loading + * @param string|array $options Pass an array of attributes for the link tag or a media attribute string + * @return string|null + */ + public static function css($url, $options = null): ?string + { + if (is_array($url) === true) { + $links = A::map($url, fn ($url) => static::css($url, $options)); + return implode(PHP_EOL, $links); + } + + if (is_string($options) === true) { + $options = ['media' => $options]; + } + + $kirby = App::instance(); + + if ($url === '@auto') { + if (!$url = Url::toTemplateAsset('css/templates', 'css')) { + return null; + } + } + + // only valid value for 'rel' is 'alternate stylesheet', if 'title' is given as well + if ( + ($options['rel'] ?? '') !== 'alternate stylesheet' || + ($options['title'] ?? '') === '' + ) { + $options['rel'] = 'stylesheet'; + } + + $url = ($kirby->component('css'))($kirby, $url, $options); + $url = Url::to($url); + $attr = array_merge((array)$options, [ + 'href' => $url + ]); + + return ''; + } + /** * Generates an `a` tag with an absolute Url * @@ -27,4 +74,76 @@ class Html extends \Kirby\Toolkit\Html { return parent::link(Url::to($href), $text, $attr); } + + /** + * Creates a script tag to load a javascript file + * @since 3.7.0 + * + * @param string|array $url + * @param string|array $options + * @return string|null + */ + public static function js($url, $options = null): ?string + { + if (is_array($url) === true) { + $scripts = A::map($url, fn ($url) => static::js($url, $options)); + return implode(PHP_EOL, $scripts); + } + + if (is_bool($options) === true) { + $options = ['async' => $options]; + } + + $kirby = App::instance(); + + if ($url === '@auto') { + if (!$url = Url::toTemplateAsset('js/templates', 'js')) { + return null; + } + } + + $url = ($kirby->component('js'))($kirby, $url, $options); + $url = Url::to($url); + $attr = array_merge((array)$options, ['src' => $url]); + + return ''; + } + + /** + * Includes an SVG file by absolute or + * relative file path. + * @since 3.7.0 + * + * @param string|\Kirby\Cms\File $file + * @return string|false + */ + public static function svg($file) + { + // support for Kirby's file objects + if ( + is_a($file, 'Kirby\Cms\File') === true && + $file->extension() === 'svg' + ) { + return $file->read(); + } + + if (is_string($file) === false) { + return false; + } + + $extension = F::extension($file); + + // check for valid svg files + if ($extension !== 'svg') { + return false; + } + + // try to convert relative paths to absolute + if (file_exists($file) === false) { + $root = App::instance()->root(); + $file = realpath($root . '/' . $file); + } + + return F::read($file); + } } diff --git a/kirby/src/Cms/Ingredients.php b/kirby/src/Cms/Ingredients.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/Item.php b/kirby/src/Cms/Item.php old mode 100644 new mode 100755 index aa1f313..ac0bb4a --- a/kirby/src/Cms/Item.php +++ b/kirby/src/Cms/Item.php @@ -2,6 +2,8 @@ namespace Kirby\Cms; +use Kirby\Toolkit\Str; + /** * The Item class is the foundation * for every object in context with @@ -53,9 +55,9 @@ class Item { $siblingsClass = static::ITEMS_CLASS; - $this->id = $params['id'] ?? uuid(); + $this->id = $params['id'] ?? Str::uuid(); $this->params = $params; - $this->parent = $params['parent'] ?? site(); + $this->parent = $params['parent'] ?? App::instance()->site(); $this->siblings = $params['siblings'] ?? new $siblingsClass(); } diff --git a/kirby/src/Cms/Items.php b/kirby/src/Cms/Items.php old mode 100644 new mode 100755 index 7e72272..c5783e4 --- a/kirby/src/Cms/Items.php +++ b/kirby/src/Cms/Items.php @@ -38,7 +38,7 @@ class Items extends Collection public function __construct($objects = [], array $options = []) { $this->options = $options; - $this->parent = $options['parent'] ?? site(); + $this->parent = $options['parent'] ?? App::instance()->site(); parent::__construct($objects, $this->parent); } @@ -55,7 +55,7 @@ class Items extends Collection { $options = array_merge([ 'options' => [], - 'parent' => site(), + 'parent' => App::instance()->site(), ], $params); if (empty($items) === true || is_array($items) === false) { diff --git a/kirby/src/Cms/Language.php b/kirby/src/Cms/Language.php old mode 100644 new mode 100755 index d15eb7c..f63420e --- a/kirby/src/Cms/Language.php +++ b/kirby/src/Cms/Language.php @@ -340,7 +340,7 @@ class Language extends Model */ public static function loadRules(string $code) { - $kirby = kirby(); + $kirby = App::instance(); $code = Str::contains($code, '.') ? Str::before($code, '.') : $code; $file = $kirby->root('i18n:rules') . '/' . $code . '.json'; diff --git a/kirby/src/Cms/LanguageRouter.php b/kirby/src/Cms/LanguageRouter.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/LanguageRoutes.php b/kirby/src/Cms/LanguageRoutes.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/LanguageRules.php b/kirby/src/Cms/LanguageRules.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/Languages.php b/kirby/src/Cms/Languages.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/Layout.php b/kirby/src/Cms/Layout.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/LayoutColumn.php b/kirby/src/Cms/LayoutColumn.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/LayoutColumns.php b/kirby/src/Cms/LayoutColumns.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/Layouts.php b/kirby/src/Cms/Layouts.php old mode 100644 new mode 100755 index 512f175..35dfc73 --- a/kirby/src/Cms/Layouts.php +++ b/kirby/src/Cms/Layouts.php @@ -3,6 +3,7 @@ namespace Kirby\Cms; use Kirby\Data\Data; +use Kirby\Toolkit\Str; use Throwable; /** @@ -27,7 +28,7 @@ class Layouts extends Items if (array_key_exists('content', $first) === true || array_key_exists('type', $first) === true) { $items = [ [ - 'id' => uuid(), + 'id' => Str::uuid(), 'columns' => [ [ 'width' => '1/1', diff --git a/kirby/src/Cms/Loader.php b/kirby/src/Cms/Loader.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/Media.php b/kirby/src/Cms/Media.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/Model.php b/kirby/src/Cms/Model.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/ModelPermissions.php b/kirby/src/Cms/ModelPermissions.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/ModelWithContent.php b/kirby/src/Cms/ModelWithContent.php old mode 100644 new mode 100755 index 249e588..8dfe878 --- a/kirby/src/Cms/ModelWithContent.php +++ b/kirby/src/Cms/ModelWithContent.php @@ -90,7 +90,8 @@ abstract class ModelWithContent extends Model return $this->content; } - return $this->setContent($this->readContent())->content; + // don't normalize field keys (already handled by the `Data` class) + return $this->content = new Content($this->readContent(), $this, false); // multi language support } else { @@ -102,7 +103,8 @@ abstract class ModelWithContent extends Model // get the translation by code if ($translation = $this->translation($languageCode)) { - $content = new Content($translation->content(), $this); + // don't normalize field keys (already handled by the `ContentTranslation` class) + $content = new Content($translation->content(), $this, false); } else { throw new InvalidArgumentException('Invalid language: ' . $languageCode); } @@ -453,7 +455,7 @@ abstract class ModelWithContent extends Model if ($languageCode !== $kirby->defaultLanguage()->code()) { foreach ($this->blueprint()->fields() as $field) { if (($field['translate'] ?? true) === false) { - $content[$field['name']] = null; + $content[strtolower($field['name'])] = null; } } @@ -544,7 +546,8 @@ abstract class ModelWithContent extends Model $result = Str::$handler($template, array_replace([ 'kirby' => $this->kirby(), 'site' => is_a($this, 'Kirby\Cms\Site') ? $this : $this->site(), - static::CLASS_ALIAS => $this + 'model' => $this, + static::CLASS_ALIAS => $this, ], $data), ['fallback' => $fallback]); return $result; @@ -652,7 +655,6 @@ abstract class ModelWithContent extends Model * Returns the panel icon definition * * @deprecated 3.6.0 Use `->panel()->image()` instead - * @todo Add `deprecated()` helper warning in 3.7.0 * @todo Remove in 3.8.0 * * @internal @@ -662,12 +664,12 @@ abstract class ModelWithContent extends Model */ public function panelIcon(array $params = null): ?array { + Helpers::deprecated('Cms\ModelWithContent::panelIcon() has been deprecated and will be removed in Kirby 3.8.0. Use $model->panel()->image() instead.'); return $this->panel()->image($params); } /** * @deprecated 3.6.0 Use `->panel()->image()` instead - * @todo Add `deprecated()` helper warning in 3.7.0 * @todo Remove in 3.8.0 * * @internal @@ -677,6 +679,7 @@ abstract class ModelWithContent extends Model */ public function panelImage($settings = null): ?array { + Helpers::deprecated('Cms\ModelWithContent::panelImage() has been deprecated and will be removed in Kirby 3.8.0. Use $model->panel()->image() instead.'); return $this->panel()->image($settings); } @@ -686,7 +689,6 @@ abstract class ModelWithContent extends Model * This also checks for the lock status * * @deprecated 3.6.0 Use `->panel()->options()` instead - * @todo Add `deprecated()` helper warning in 3.7.0 * @todo Remove in 3.8.0 * * @param array $unlock An array of options that will be force-unlocked @@ -695,6 +697,7 @@ abstract class ModelWithContent extends Model */ public function panelOptions(array $unlock = []): array { + Helpers::deprecated('Cms\ModelWithContent::panelOptions() has been deprecated and will be removed in Kirby 3.8.0. Use $model->panel()->options() instead.'); return $this->panel()->options($unlock); } } diff --git a/kirby/src/Cms/Nest.php b/kirby/src/Cms/Nest.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/NestCollection.php b/kirby/src/Cms/NestCollection.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/NestObject.php b/kirby/src/Cms/NestObject.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/Page.php b/kirby/src/Cms/Page.php old mode 100644 new mode 100755 index c583d97..7157bb0 --- a/kirby/src/Cms/Page.php +++ b/kirby/src/Cms/Page.php @@ -7,6 +7,7 @@ use Kirby\Exception\InvalidArgumentException; use Kirby\Exception\NotFoundException; use Kirby\Filesystem\Dir; use Kirby\Filesystem\F; +use Kirby\Http\Response; use Kirby\Http\Uri; use Kirby\Panel\Page as Panel; use Kirby\Toolkit\A; @@ -465,7 +466,7 @@ class Page extends ModelWithContent */ public function go(array $options = [], int $code = 302) { - go($this->url($options), $code); + Response::go($this->url($options), $code); } /** @@ -1029,11 +1030,19 @@ class Page extends ModelWithContent // try to get the page from cache if (empty($data) === true && $this->isCacheable() === true) { - $cache = $kirby->cache('pages'); - $cacheId = $this->cacheId($contentType); - $result = $cache->get($cacheId); - $html = $result['html'] ?? null; - $response = $result['response'] ?? []; + $cache = $kirby->cache('pages'); + $cacheId = $this->cacheId($contentType); + $result = $cache->get($cacheId); + $html = $result['html'] ?? null; + $response = $result['response'] ?? []; + $usesAuth = $result['usesAuth'] ?? false; + $usesCookies = $result['usesCookies'] ?? []; + + // if the request contains dynamic data that the cached response + // relied on, don't use the cache to allow dynamic code to run + if (Responder::isPrivate($usesAuth, $usesCookies) === true) { + $html = null; + } // reconstruct the response configuration if (empty($html) === false && empty($response) === false) { @@ -1060,15 +1069,15 @@ class Page extends ModelWithContent // render the page $html = $template->render($kirby->data); - // convert the response configuration to an array - $response = $kirby->response()->toArray(); - // cache the result - if ($cache !== null && $kirby->response()->cache() === true) { + $response = $kirby->response(); + if ($cache !== null && $response->cache() === true) { $cache->set($cacheId, [ - 'html' => $html, - 'response' => $response - ], $kirby->response()->expires() ?? 0); + 'html' => $html, + 'response' => $response->toArray(), + 'usesAuth' => $response->usesAuth(), + 'usesCookies' => $response->usesCookies(), + ], $response->expires() ?? 0); } } @@ -1471,7 +1480,6 @@ class Page extends ModelWithContent * gets dragged onto a textarea * * @deprecated 3.6.0 Use `->panel()->dragText()` instead - * @todo Add `deprecated()` helper warning in 3.7.0 * @todo Remove in 3.8.0 * * @internal @@ -1481,6 +1489,7 @@ class Page extends ModelWithContent */ public function dragText(string $type = null): string { + Helpers::deprecated('Cms\Page::dragText() has been deprecated and will be removed in Kirby 3.8.0. Use $page->panel()->dragText() instead.'); return $this->panel()->dragText($type); } @@ -1489,7 +1498,6 @@ class Page extends ModelWithContent * used in the panel to make routing work properly * * @deprecated 3.6.0 Use `->panel()->id()` instead - * @todo Add `deprecated()` helper warning in 3.7.0 * @todo Remove in 3.8.0 * * @internal @@ -1498,6 +1506,7 @@ class Page extends ModelWithContent */ public function panelId(): string { + Helpers::deprecated('Cms\Page::panelId() has been deprecated and will be removed in Kirby 3.8.0. Use $page->panel()->id() instead.'); return $this->panel()->id(); } @@ -1505,7 +1514,6 @@ class Page extends ModelWithContent * Returns the full path without leading slash * * @deprecated 3.6.0 Use `->panel()->path()` instead - * @todo Add `deprecated()` helper warning in 3.7.0 * @todo Remove in 3.8.0 * * @internal @@ -1514,6 +1522,7 @@ class Page extends ModelWithContent */ public function panelPath(): string { + Helpers::deprecated('Cms\Page::panelPath() has been deprecated and will be removed in Kirby 3.8.0. Use $page->panel()->path() instead.'); return $this->panel()->path(); } @@ -1522,7 +1531,6 @@ class Page extends ModelWithContent * and page fields * * @deprecated 3.6.0 Use `->panel()->pickerData()` instead - * @todo Add `deprecated()` helper warning in 3.7.0 * @todo Remove in 3.8.0 * * @param array|null $params @@ -1531,6 +1539,7 @@ class Page extends ModelWithContent */ public function panelPickerData(array $params = []): array { + Helpers::deprecated('Cms\Page::panelPickerData() has been deprecated and will be removed in Kirby 3.8.0. Use $page->panel()->pickerData() instead.'); return $this->panel()->pickerData($params); } @@ -1539,7 +1548,6 @@ class Page extends ModelWithContent * in the panel * * @deprecated 3.6.0 Use `->panel()->url()` instead - * @todo Add `deprecated()` helper warning in 3.7.0 * @todo Remove in 3.8.0 * * @internal @@ -1549,6 +1557,7 @@ class Page extends ModelWithContent */ public function panelUrl(bool $relative = false): string { + Helpers::deprecated('Cms\Page::panelUrl() has been deprecated and will be removed in Kirby 3.8.0. Use $page->panel()->url() instead.'); return $this->panel()->url($relative); } } diff --git a/kirby/src/Cms/PageActions.php b/kirby/src/Cms/PageActions.php old mode 100644 new mode 100755 index 364ed5b..fd804b5 --- a/kirby/src/Cms/PageActions.php +++ b/kirby/src/Cms/PageActions.php @@ -11,6 +11,7 @@ use Kirby\Filesystem\Dir; use Kirby\Filesystem\F; use Kirby\Form\Form; use Kirby\Toolkit\A; +use Kirby\Toolkit\I18n; use Kirby\Toolkit\Str; /** @@ -665,7 +666,7 @@ trait PageActions { // create the slug for the duplicate - $slug = Str::slug($slug ?? $this->slug() . '-' . Str::slug(t('page.duplicate.appendix'))); + $slug = Str::slug($slug ?? $this->slug() . '-' . Str::slug(I18n::translate('page.duplicate.appendix'))); $arguments = [ 'originalPage' => $this, diff --git a/kirby/src/Cms/PageBlueprint.php b/kirby/src/Cms/PageBlueprint.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/PagePermissions.php b/kirby/src/Cms/PagePermissions.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/PagePicker.php b/kirby/src/Cms/PagePicker.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/PageRules.php b/kirby/src/Cms/PageRules.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/PageSiblings.php b/kirby/src/Cms/PageSiblings.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/Pages.php b/kirby/src/Cms/Pages.php old mode 100644 new mode 100755 index 2b9259a..55125c9 --- a/kirby/src/Cms/Pages.php +++ b/kirby/src/Cms/Pages.php @@ -54,12 +54,14 @@ class Pages extends Collection */ public function add($object) { + $site = App::instance()->site(); + // add a pages collection if (is_a($object, self::class) === true) { $this->data = array_merge($this->data, $object->data); // add a page by id - } elseif (is_string($object) === true && $page = page($object)) { + } elseif (is_string($object) === true && $page = $site->find($object)) { $this->__set($page->id(), $page); // add a page object @@ -92,7 +94,7 @@ class Pages extends Collection */ public function children() { - $children = new Pages([], $this->parent); + $children = new Pages([]); foreach ($this->data as $page) { foreach ($page->children() as $childKey => $child) { @@ -130,7 +132,7 @@ class Pages extends Collection */ public function drafts() { - $drafts = new Pages([], $this->parent); + $drafts = new Pages([]); foreach ($this->data as $page) { foreach ($page->drafts() as $draftKey => $draft) { @@ -199,51 +201,38 @@ class Pages extends Collection * Finds a page in the collection by id. * This works recursively for children and * children of children, etc. + * @deprecated 3.7.0 Use `$pages->get()` or `$pages->find()` instead + * @todo 3.8.0 Remove method + * @codeCoverageIgnore * * @param string|null $id * @return mixed */ public function findById(string $id = null) { - if ($id === null) { - return null; - } + Helpers::deprecated('Cms\Pages::findById() has been deprecated and will be removed in Kirby 3.8.0. Use $pages->get() or $pages->find() instead.'); - // remove trailing or leading slashes - $id = trim($id, '/'); - - // strip extensions from the id - if (strpos($id, '.') !== false) { - $info = pathinfo($id); - - if ($info['dirname'] !== '.') { - $id = $info['dirname'] . '/' . $info['filename']; - } else { - $id = $info['filename']; - } - } - - // try the obvious way - if ($page = $this->get($id)) { - return $page; - } - - $start = is_a($this->parent, 'Kirby\Cms\Page') === true ? $this->parent->id() : ''; - $page = $this->findByIdRecursive($id, $start, App::instance()->multilang()); - - return $page; + return $this->findByKey($id); } /** * Finds a child or child of a child recursively. + * @deprecated 3.7.0 Use `$pages->find()` instead + * @todo 3.8.0 Integrate code into `findByKey()` and remove this method * * @param string $id * @param string|null $startAt * @param bool $multiLang * @return mixed */ - public function findByIdRecursive(string $id, string $startAt = null, bool $multiLang = false) + public function findByIdRecursive(string $id, string $startAt = null, bool $multiLang = false, bool $silenceWarning = false) { + // @codeCoverageIgnoreStart + if ($silenceWarning !== true) { + Helpers::deprecated('Cms\Pages::findByIdRecursive() has been deprecated and will be removed in Kirby 3.8.0. Use $pages->find() instead.'); + } + // @codeCoverageIgnoreEnd + $path = explode('/', $id); $item = null; $query = $startAt; @@ -272,25 +261,70 @@ class Pages extends Collection } /** - * Uses the specialized find by id method + * Finds a page by its ID or URI + * @internal Use `$pages->find()` instead * * @param string|null $key - * @return mixed + * @return \Kirby\Cms\Page|null */ - public function findByKey(string $key = null) + public function findByKey(?string $key = null) { - return $this->findById($key); + if ($key === null) { + return null; + } + + // remove trailing or leading slashes + $key = trim($key, '/'); + + // strip extensions from the id + if (strpos($key, '.') !== false) { + $info = pathinfo($key); + + if ($info['dirname'] !== '.') { + $key = $info['dirname'] . '/' . $info['filename']; + } else { + $key = $info['filename']; + } + } + + // try the obvious way + if ($page = $this->get($key)) { + return $page; + } + + // try to find the page by its (translated) URI by stepping through the page tree + $start = is_a($this->parent, 'Kirby\Cms\Page') === true ? $this->parent->id() : ''; + if ($page = $this->findByIdRecursive($key, $start, App::instance()->multilang(), true)) { + return $page; + } + + // for secondary languages, try the full translated URI + // (for collections without parent that won't have a result above) + if ( + App::instance()->multilang() === true && + App::instance()->language()->isDefault() === false && + $page = $this->findBy('uri', $key) + ) { + return $page; + } + + return null; } /** - * Alias for Pages::findById + * Alias for `$pages->find()` + * @deprecated 3.7.0 Use `$pages->find()` instead + * @todo 3.8.0 Remove method + * @codeCoverageIgnore * * @param string $id * @return \Kirby\Cms\Page|null */ public function findByUri(string $id) { - return $this->findById($id); + Helpers::deprecated('Cms\Pages::findByUri() has been deprecated and will be removed in Kirby 3.8.0. Use $pages->find() instead.'); + + return $this->findByKey($id); } /** @@ -350,7 +384,7 @@ class Pages extends Collection return $index; } - $index = new Pages([], $this->parent); + $index = new Pages([]); foreach ($this->data as $pageKey => $page) { $index->data[$pageKey] = $page; diff --git a/kirby/src/Cms/Pagination.php b/kirby/src/Cms/Pagination.php old mode 100644 new mode 100755 index ec65276..253a523 --- a/kirby/src/Cms/Pagination.php +++ b/kirby/src/Cms/Pagination.php @@ -96,9 +96,9 @@ class Pagination extends BasePagination /** * Returns the Url for the first page * - * @return string + * @return string|null */ - public function firstPageUrl(): string + public function firstPageUrl(): ?string { return $this->pageUrl(1); } @@ -106,9 +106,9 @@ class Pagination extends BasePagination /** * Returns the Url for the last page * - * @return string + * @return string|null */ - public function lastPageUrl(): string + public function lastPageUrl(): ?string { return $this->pageUrl($this->lastPage()); } diff --git a/kirby/src/Cms/Permissions.php b/kirby/src/Cms/Permissions.php old mode 100644 new mode 100755 index 4a01379..c7cb6c1 --- a/kirby/src/Cms/Permissions.php +++ b/kirby/src/Cms/Permissions.php @@ -160,7 +160,7 @@ class Permissions protected function setAction(string $category, string $action, $setting) { // deprecated fallback for the settings/system view - // TODO: remove in 3.7 + // TODO: remove in 3.8.0 if ($category === 'access' && $action === 'settings') { $action = 'system'; } diff --git a/kirby/src/Cms/Picker.php b/kirby/src/Cms/Picker.php old mode 100644 new mode 100755 index 9575359..d141740 --- a/kirby/src/Cms/Picker.php +++ b/kirby/src/Cms/Picker.php @@ -61,7 +61,7 @@ abstract class Picker // optional mapping function for the result array 'map' => null, // the reference model - 'model' => site(), + 'model' => App::instance()->site(), // current page when paginating 'page' => 1, // a query string to fetch specific items diff --git a/kirby/src/Cms/Plugin.php b/kirby/src/Cms/Plugin.php old mode 100644 new mode 100755 index c75138e..2f17dfd --- a/kirby/src/Cms/Plugin.php +++ b/kirby/src/Cms/Plugin.php @@ -122,9 +122,10 @@ class Plugin extends Model */ public function link(): ?string { - $homepage = $this->info['homepage'] ?? null; - $docs = $this->info['support']['docs'] ?? null; - $source = $this->info['support']['source'] ?? null; + $info = $this->info(); + $homepage = $info['homepage'] ?? null; + $docs = $info['support']['docs'] ?? null; + $source = $info['support']['source'] ?? null; $link = $homepage ?? $docs ?? $source; diff --git a/kirby/src/Cms/PluginAssets.php b/kirby/src/Cms/PluginAssets.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/R.php b/kirby/src/Cms/R.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/Responder.php b/kirby/src/Cms/Responder.php old mode 100644 new mode 100755 index 360ac84..92d1974 --- a/kirby/src/Cms/Responder.php +++ b/kirby/src/Cms/Responder.php @@ -43,7 +43,7 @@ class Responder * Flag that defines whether the current * response can be cached by Kirby's cache * - * @var string + * @var bool */ protected $cache = true; @@ -61,6 +61,23 @@ class Responder */ protected $type = null; + /** + * Flag that defines whether the current + * response uses the HTTP `Authorization` + * request header + * + * @var bool + */ + protected $usesAuth = false; + + /** + * List of cookie names the response + * relies on + * + * @var array + */ + protected $usesCookies = []; + /** * Creates and sends the response * @@ -99,6 +116,11 @@ class Responder public function cache(?bool $cache = null) { if ($cache === null) { + // never ever cache private responses + if (static::isPrivate($this->usesAuth(), $this->usesCookies()) === true) { + return false; + } + return $this->cache; } @@ -106,6 +128,59 @@ class Responder return $this; } + /** + * Setter and getter for the flag that defines + * whether the current response uses the HTTP + * `Authorization` request header + * @since 3.7.0 + * + * @param bool|null $usesAuth + * @return bool|$this + */ + public function usesAuth(?bool $usesAuth = null) + { + if ($usesAuth === null) { + return $this->usesAuth; + } + + $this->usesAuth = $usesAuth; + return $this; + } + + /** + * Setter for a cookie name that is + * used by the response + * @since 3.7.0 + * + * @param string $name + * @return void + */ + public function usesCookie(string $name): void + { + // only add unique names + if (in_array($name, $this->usesCookies) === false) { + $this->usesCookies[] = $name; + } + } + + /** + * Setter and getter for the list of cookie + * names the response relies on + * @since 3.7.0 + * + * @param array|null $usesCookies + * @return array|$this + */ + public function usesCookies(?array $usesCookies = null) + { + if ($usesCookies === null) { + return $this->usesCookies; + } + + $this->usesCookies = $usesCookies; + return $this; + } + /** * Setter and getter for the cache expiry * timestamp for Kirby's cache @@ -179,10 +254,13 @@ class Responder public function fromArray(array $response): void { $this->body($response['body'] ?? null); - $this->expires($response['expires'] ?? null); + $this->cache($response['cache'] ?? null); $this->code($response['code'] ?? null); + $this->expires($response['expires'] ?? null); $this->headers($response['headers'] ?? null); $this->type($response['type'] ?? null); + $this->usesAuth($response['usesAuth'] ?? null); + $this->usesCookies($response['usesCookies'] ?? null); } /** @@ -196,7 +274,7 @@ class Responder public function header(string $key, $value = null, bool $lazy = false) { if ($value === null) { - return $this->headers[$key] ?? null; + return $this->headers()[$key] ?? null; } if ($value === false) { @@ -221,7 +299,31 @@ class Responder public function headers(array $headers = null) { if ($headers === null) { - return $this->headers; + $injectedHeaders = []; + + if (static::isPrivate($this->usesAuth(), $this->usesCookies()) === true) { + // never ever cache private responses + $injectedHeaders['Cache-Control'] = 'no-store, private'; + } else { + // the response is public, but it may + // vary based on request headers + $vary = []; + + if ($this->usesAuth() === true) { + $vary[] = 'Authorization'; + } + + if ($this->usesCookies() !== []) { + $vary[] = 'Cookie'; + } + + if ($vary !== []) { + $injectedHeaders['Vary'] = implode(', ', $vary); + } + } + + // lazily inject (never override custom headers) + return array_merge($injectedHeaders, $this->headers); } $this->headers = $headers; @@ -283,11 +385,14 @@ class Responder */ public function toArray(): array { + // the `cache`, `expires`, `usesAuth` and `usesCookies` + // values are explicitly *not* serialized as they are + // volatile and not to be exported return [ - 'body' => $this->body, - 'code' => $this->code, - 'headers' => $this->headers, - 'type' => $this->type, + 'body' => $this->body(), + 'code' => $this->code(), + 'headers' => $this->headers(), + 'type' => $this->type(), ]; } @@ -310,4 +415,33 @@ class Responder $this->type = $type; return $this; } + + /** + * Checks whether the response needs to be exempted from + * all caches due to using dynamic data based on auth + * and/or cookies; the request data only matters if it + * is actually used/relied on by the response + * @since 3.7.0 + * @internal + * + * @param bool $usesAuth + * @param array $usesCookies + * @return bool + */ + public static function isPrivate(bool $usesAuth, array $usesCookies): bool + { + $kirby = App::instance(); + + if ($usesAuth === true && $kirby->request()->hasAuth() === true) { + return true; + } + + foreach ($usesCookies as $cookie) { + if (isset($_COOKIE[$cookie]) === true) { + return true; + } + } + + return false; + } } diff --git a/kirby/src/Cms/Response.php b/kirby/src/Cms/Response.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/Role.php b/kirby/src/Cms/Role.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/Roles.php b/kirby/src/Cms/Roles.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/S.php b/kirby/src/Cms/S.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/Search.php b/kirby/src/Cms/Search.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/Section.php b/kirby/src/Cms/Section.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/Site.php b/kirby/src/Cms/Site.php old mode 100644 new mode 100755 index c546fd0..a365173 --- a/kirby/src/Cms/Site.php +++ b/kirby/src/Cms/Site.php @@ -668,7 +668,6 @@ class Site extends ModelWithContent /** * Returns the full path without leading slash * - * @todo Add `deprecated()` helper warning in 3.7.0 * @todo Remove in 3.8.0 * * @internal @@ -677,6 +676,7 @@ class Site extends ModelWithContent */ public function panelPath(): string { + Helpers::deprecated('Cms\Site::panelPath() has been deprecated and will be removed in Kirby 3.8.0. Use $site->panel()->path() instead.'); return $this->panel()->path(); } @@ -684,7 +684,6 @@ class Site extends ModelWithContent * Returns the url to the editing view * in the panel * - * @todo Add `deprecated()` helper warning in 3.7.0 * @todo Remove in 3.8.0 * * @internal @@ -694,6 +693,7 @@ class Site extends ModelWithContent */ public function panelUrl(bool $relative = false): string { + Helpers::deprecated('Cms\Site::panelUrl() has been deprecated and will be removed in Kirby 3.8.0. Use $site->panel()->url() instead.'); return $this->panel()->url($relative); } } diff --git a/kirby/src/Cms/SiteActions.php b/kirby/src/Cms/SiteActions.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/SiteBlueprint.php b/kirby/src/Cms/SiteBlueprint.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/SitePermissions.php b/kirby/src/Cms/SitePermissions.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/SiteRules.php b/kirby/src/Cms/SiteRules.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/Structure.php b/kirby/src/Cms/Structure.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/StructureObject.php b/kirby/src/Cms/StructureObject.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/System.php b/kirby/src/Cms/System.php old mode 100644 new mode 100755 index fdec9c1..f585aad --- a/kirby/src/Cms/System.php +++ b/kirby/src/Cms/System.php @@ -86,6 +86,93 @@ class System return extension_loaded('curl'); } + /** + * Returns the URL to the file within a system folder + * if the file is located in the document + * root. Otherwise it will return null. + * + * @param string $folder 'git', 'content', 'site', 'kirby' + * @return string|null + */ + public function exposedFileUrl(string $folder): ?string + { + if (!$url = $this->folderUrl($folder)) { + return null; + } + + switch ($folder) { + case 'content': + return $url . '/' . basename($this->app->site()->contentFile()); + case 'git': + return $url . '/config'; + case 'kirby': + return $url . '/composer.json'; + case 'site': + $root = $this->app->root('site'); + $files = glob($root . '/blueprints/*.yml'); + + if (empty($files) === true) { + $files = glob($root . '/templates/*.*'); + } + + if (empty($files) === true) { + $files = glob($root . '/snippets/*.*'); + } + + if (empty($files) === true || empty($files[0]) === true) { + return $url; + } + + $file = $files[0]; + $file = basename(dirname($file)) . '/' . basename($file); + + return $url . '/' . $file; + default: + return null; + } + } + + /** + * Returns the URL to a system folder + * if the folder is located in the document + * root. Otherwise it will return null. + * + * @param string $folder 'git', 'content', 'site', 'kirby' + * @return string|null + */ + public function folderUrl(string $folder): ?string + { + $index = $this->app->root('index'); + + if ($folder === 'git') { + $root = $index . '/.git'; + } else { + $root = $this->app->root($folder); + } + + if ($root === null || is_dir($root) === false || is_dir($index) === false) { + return null; + } + + $root = realpath($root); + $index = realpath($index); + + // windows + $root = str_replace('\\', '/', $root); + $index = str_replace('\\', '/', $index); + + // the folder is not within the document root? + if (Str::startsWith($root, $index) === false) { + return null; + } + + // get the path after the document root + $path = trim(Str::after($root, $index), '/'); + + // build the absolute URL to the folder + return Url::to($path); + } + /** * Returns the app's human-readable * index URL without scheme @@ -165,44 +252,7 @@ class System */ public function isLocal(): bool { - $server = $this->app->server(); - $visitor = $this->app->visitor(); - $host = $server->host(); - - if ($host === 'localhost') { - return true; - } - - if (Str::endsWith($host, '.local') === true) { - return true; - } - - if (Str::endsWith($host, '.test') === true) { - return true; - } - - if (in_array($visitor->ip(), ['::1', '127.0.0.1']) === true) { - // ensure that there is no reverse proxy in between - - if ( - isset($_SERVER['HTTP_X_FORWARDED_FOR']) === true && - in_array($_SERVER['HTTP_X_FORWARDED_FOR'], ['::1', '127.0.0.1']) === false - ) { - return false; - } - - if ( - isset($_SERVER['HTTP_CLIENT_IP']) === true && - in_array($_SERVER['HTTP_CLIENT_IP'], ['::1', '127.0.0.1']) === false - ) { - return false; - } - - // no reverse proxy or the real client also comes from localhost - return true; - } - - return false; + return $this->app->environment()->isLocal(); } /** @@ -508,7 +558,7 @@ class System ]; } - $software = $_SERVER['SERVER_SOFTWARE'] ?? ''; + $software = $this->app->environment()->get('SERVER_SOFTWARE', ''); preg_match('!(' . implode('|', $servers) . ')!i', $software, $matches); diff --git a/kirby/src/Cms/Template.php b/kirby/src/Cms/Template.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/Translation.php b/kirby/src/Cms/Translation.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/Translations.php b/kirby/src/Cms/Translations.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/Url.php b/kirby/src/Cms/Url.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/User.php b/kirby/src/Cms/User.php old mode 100644 new mode 100755 index 11ed048..02d5417 --- a/kirby/src/Cms/User.php +++ b/kirby/src/Cms/User.php @@ -888,7 +888,6 @@ class User extends ModelWithContent /** * Returns the full path without leading slash * - * @todo Add `deprecated()` helper warning in 3.7.0 * @todo Remove in 3.8.0 * * @internal @@ -897,13 +896,13 @@ class User extends ModelWithContent */ public function panelPath(): string { + Helpers::deprecated('Cms\User::panelPath() has been deprecated and will be removed in Kirby 3.8.0. Use $user->panel()->path() instead.'); return $this->panel()->path(); } /** * Returns prepared data for the panel user picker * - * @todo Add `deprecated()` helper warning in 3.7.0 * @todo Remove in 3.8.0 * * @param array|null $params @@ -912,6 +911,7 @@ class User extends ModelWithContent */ public function panelPickerData(array $params = null): array { + Helpers::deprecated('Cms\User::panelPickerData() has been deprecated and will be removed in Kirby 3.8.0. Use $user->panel()->pickerData() instead.'); return $this->panel()->pickerData($params); } @@ -919,7 +919,6 @@ class User extends ModelWithContent * Returns the url to the editing view * in the panel * - * @todo Add `deprecated()` helper warning in 3.7.0 * @todo Remove in 3.8.0 * * @internal @@ -929,6 +928,7 @@ class User extends ModelWithContent */ public function panelUrl(bool $relative = false): string { + Helpers::deprecated('Cms\User::panelUrl() has been deprecated and will be removed in Kirby 3.8.0. Use $user->panel()->url() instead.'); return $this->panel()->url($relative); } } diff --git a/kirby/src/Cms/UserActions.php b/kirby/src/Cms/UserActions.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/UserBlueprint.php b/kirby/src/Cms/UserBlueprint.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/UserPermissions.php b/kirby/src/Cms/UserPermissions.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/UserPicker.php b/kirby/src/Cms/UserPicker.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/UserRules.php b/kirby/src/Cms/UserRules.php old mode 100644 new mode 100755 diff --git a/kirby/src/Cms/Users.php b/kirby/src/Cms/Users.php old mode 100644 new mode 100755 index 907f88e..ec0da33 --- a/kirby/src/Cms/Users.php +++ b/kirby/src/Cms/Users.php @@ -86,7 +86,8 @@ class Users extends Collection } /** - * Finds a user in the collection by id or email address + * Finds a user in the collection by ID or email address + * @internal Use `$users->find()` instead * * @param string $key * @return \Kirby\Cms\User|null diff --git a/kirby/src/Cms/Visitor.php b/kirby/src/Cms/Visitor.php old mode 100644 new mode 100755 diff --git a/kirby/src/Data/Data.php b/kirby/src/Data/Data.php old mode 100644 new mode 100755 diff --git a/kirby/src/Data/Handler.php b/kirby/src/Data/Handler.php old mode 100644 new mode 100755 diff --git a/kirby/src/Data/Json.php b/kirby/src/Data/Json.php old mode 100644 new mode 100755 diff --git a/kirby/src/Data/PHP.php b/kirby/src/Data/PHP.php old mode 100644 new mode 100755 diff --git a/kirby/src/Data/Txt.php b/kirby/src/Data/Txt.php old mode 100644 new mode 100755 diff --git a/kirby/src/Data/Xml.php b/kirby/src/Data/Xml.php old mode 100644 new mode 100755 diff --git a/kirby/src/Data/Yaml.php b/kirby/src/Data/Yaml.php old mode 100644 new mode 100755 diff --git a/kirby/src/Database/Database.php b/kirby/src/Database/Database.php old mode 100644 new mode 100755 diff --git a/kirby/src/Database/Db.php b/kirby/src/Database/Db.php old mode 100644 new mode 100755 diff --git a/kirby/src/Database/Query.php b/kirby/src/Database/Query.php old mode 100644 new mode 100755 diff --git a/kirby/src/Database/Sql.php b/kirby/src/Database/Sql.php old mode 100644 new mode 100755 diff --git a/kirby/src/Database/Sql/Mysql.php b/kirby/src/Database/Sql/Mysql.php old mode 100644 new mode 100755 diff --git a/kirby/src/Database/Sql/Sqlite.php b/kirby/src/Database/Sql/Sqlite.php old mode 100644 new mode 100755 diff --git a/kirby/src/Email/Body.php b/kirby/src/Email/Body.php old mode 100644 new mode 100755 diff --git a/kirby/src/Email/Email.php b/kirby/src/Email/Email.php old mode 100644 new mode 100755 diff --git a/kirby/src/Email/PHPMailer.php b/kirby/src/Email/PHPMailer.php old mode 100644 new mode 100755 diff --git a/kirby/src/Exception/BadMethodCallException.php b/kirby/src/Exception/BadMethodCallException.php old mode 100644 new mode 100755 diff --git a/kirby/src/Exception/DuplicateException.php b/kirby/src/Exception/DuplicateException.php old mode 100644 new mode 100755 diff --git a/kirby/src/Exception/ErrorPageException.php b/kirby/src/Exception/ErrorPageException.php old mode 100644 new mode 100755 diff --git a/kirby/src/Exception/Exception.php b/kirby/src/Exception/Exception.php old mode 100644 new mode 100755 index 596b49d..415f880 --- a/kirby/src/Exception/Exception.php +++ b/kirby/src/Exception/Exception.php @@ -2,6 +2,7 @@ namespace Kirby\Exception; +use Kirby\Http\Environment; use Kirby\Toolkit\I18n; use Kirby\Toolkit\Str; @@ -143,10 +144,11 @@ class Exception extends \Exception */ final public function getFileRelative(): string { - $file = $this->getFile(); + $file = $this->getFile(); + $docRoot = Environment::getGlobally('DOCUMENT_ROOT'); - if (empty($_SERVER['DOCUMENT_ROOT']) === false) { - $file = ltrim(Str::after($file, $_SERVER['DOCUMENT_ROOT']), '/'); + if (empty($docRoot) === false) { + $file = ltrim(Str::after($file, $docRoot), '/'); } return $file; diff --git a/kirby/src/Exception/InvalidArgumentException.php b/kirby/src/Exception/InvalidArgumentException.php old mode 100644 new mode 100755 diff --git a/kirby/src/Exception/LogicException.php b/kirby/src/Exception/LogicException.php old mode 100644 new mode 100755 diff --git a/kirby/src/Exception/NotFoundException.php b/kirby/src/Exception/NotFoundException.php old mode 100644 new mode 100755 diff --git a/kirby/src/Exception/PermissionException.php b/kirby/src/Exception/PermissionException.php old mode 100644 new mode 100755 diff --git a/kirby/src/Filesystem/Asset.php b/kirby/src/Filesystem/Asset.php old mode 100644 new mode 100755 diff --git a/kirby/src/Filesystem/Dir.php b/kirby/src/Filesystem/Dir.php old mode 100644 new mode 100755 diff --git a/kirby/src/Filesystem/F.php b/kirby/src/Filesystem/F.php old mode 100644 new mode 100755 index 93445ee..452e723 --- a/kirby/src/Filesystem/F.php +++ b/kirby/src/Filesystem/F.php @@ -393,6 +393,34 @@ class F return $result; } + /** + * A super simple class autoloader + * @since 3.7.0 + * + * @param array $classmap + * @param string|null $base + * @return void + */ + public static function loadClasses(array $classmap, ?string $base = null): void + { + // convert all classnames to lowercase + $classmap = array_change_key_case($classmap); + + spl_autoload_register(function ($class) use ($classmap, $base) { + $class = strtolower($class); + + if (!isset($classmap[$class])) { + return false; + } + + if ($base) { + include $base . '/' . $classmap[$class]; + } else { + include $classmap[$class]; + } + }); + } + /** * Loads a file with as little as possible in the variable scope * diff --git a/kirby/src/Filesystem/File.php b/kirby/src/Filesystem/File.php old mode 100644 new mode 100755 diff --git a/kirby/src/Filesystem/Filename.php b/kirby/src/Filesystem/Filename.php old mode 100644 new mode 100755 diff --git a/kirby/src/Filesystem/IsFile.php b/kirby/src/Filesystem/IsFile.php old mode 100644 new mode 100755 diff --git a/kirby/src/Filesystem/Mime.php b/kirby/src/Filesystem/Mime.php old mode 100644 new mode 100755 diff --git a/kirby/src/Form/Field.php b/kirby/src/Form/Field.php old mode 100644 new mode 100755 diff --git a/kirby/src/Form/Field/BlocksField.php b/kirby/src/Form/Field/BlocksField.php old mode 100644 new mode 100755 index 7afa288..b49c473 --- a/kirby/src/Form/Field/BlocksField.php +++ b/kirby/src/Form/Field/BlocksField.php @@ -2,6 +2,7 @@ namespace Kirby\Form\Field; +use Kirby\Cms\App; use Kirby\Cms\Block; use Kirby\Cms\Blocks as BlocksCollection; use Kirby\Cms\Fieldsets; @@ -12,6 +13,7 @@ use Kirby\Form\Form; use Kirby\Form\Mixin\EmptyState; use Kirby\Form\Mixin\Max; use Kirby\Form\Mixin\Min; +use Kirby\Toolkit\Str; use Throwable; class BlocksField extends FieldClass @@ -28,7 +30,7 @@ class BlocksField extends FieldClass public function __construct(array $params = []) { - $this->setFieldsets($params['fieldsets'] ?? null, $params['model'] ?? site()); + $this->setFieldsets($params['fieldsets'] ?? null, $params['model'] ?? App::instance()->site()); parent::__construct($params); @@ -142,13 +144,15 @@ class BlocksField extends FieldClass return [ [ 'pattern' => 'uuid', - 'action' => fn () => ['uuid' => uuid()] + 'action' => fn () => ['uuid' => Str::uuid()] ], [ 'pattern' => 'paste', 'method' => 'POST', 'action' => function () use ($field) { - $value = BlocksCollection::parse(get('html')); + $request = App::instance()->request(); + + $value = BlocksCollection::parse($request->get('html')); $blocks = BlocksCollection::factory($value); return $field->blocksToValues($blocks->toArray()); } diff --git a/kirby/src/Form/Field/LayoutField.php b/kirby/src/Form/Field/LayoutField.php old mode 100644 new mode 100755 index 02222ba..56856b0 --- a/kirby/src/Form/Field/LayoutField.php +++ b/kirby/src/Form/Field/LayoutField.php @@ -2,6 +2,7 @@ namespace Kirby\Form\Field; +use Kirby\Cms\App; use Kirby\Cms\Blueprint; use Kirby\Cms\Fieldset; use Kirby\Cms\Layout; @@ -18,7 +19,7 @@ class LayoutField extends BlocksField public function __construct(array $params) { - $this->setModel($params['model'] ?? site()); + $this->setModel($params['model'] ?? App::instance()->site()); $this->setLayouts($params['layouts'] ?? ['1/1']); $this->setSettings($params['settings'] ?? null); @@ -78,15 +79,17 @@ class LayoutField extends BlocksField 'pattern' => 'layout', 'method' => 'POST', 'action' => function () use ($field) { + $request = App::instance()->request(); + $defaults = $field->attrsForm([])->data(true); $attrs = $field->attrsForm($defaults)->values(); - $columns = get('columns') ?? ['1/1']; + $columns = $request->get('columns') ?? ['1/1']; return Layout::factory([ 'attrs' => $attrs, 'columns' => array_map(fn ($width) => [ 'blocks' => [], - 'id' => uuid(), + 'id' => Str::uuid(), 'width' => $width, ], $columns) ])->toArray(); diff --git a/kirby/src/Form/FieldClass.php b/kirby/src/Form/FieldClass.php old mode 100644 new mode 100755 index 84fc63c..f242f74 --- a/kirby/src/Form/FieldClass.php +++ b/kirby/src/Form/FieldClass.php @@ -3,6 +3,7 @@ namespace Kirby\Form; use Exception; +use Kirby\Cms\App; use Kirby\Cms\HasSiblings; use Kirby\Cms\ModelWithContent; use Kirby\Data\Data; @@ -144,7 +145,7 @@ abstract class FieldClass $this->setHelp($params['help'] ?? null); $this->setIcon($params['icon'] ?? null); $this->setLabel($params['label'] ?? null); - $this->setModel($params['model'] ?? site()); + $this->setModel($params['model'] ?? App::instance()->site()); $this->setName($params['name'] ?? null); $this->setPlaceholder($params['placeholder'] ?? null); $this->setRequired($params['required'] ?? false); diff --git a/kirby/src/Form/Fields.php b/kirby/src/Form/Fields.php old mode 100644 new mode 100755 diff --git a/kirby/src/Form/Form.php b/kirby/src/Form/Form.php old mode 100644 new mode 100755 diff --git a/kirby/src/Form/Mixin/EmptyState.php b/kirby/src/Form/Mixin/EmptyState.php old mode 100644 new mode 100755 diff --git a/kirby/src/Form/Mixin/Max.php b/kirby/src/Form/Mixin/Max.php old mode 100644 new mode 100755 diff --git a/kirby/src/Form/Mixin/Min.php b/kirby/src/Form/Mixin/Min.php old mode 100644 new mode 100755 diff --git a/kirby/src/Form/Options.php b/kirby/src/Form/Options.php old mode 100644 new mode 100755 index fbc6a1f..1e61e0d --- a/kirby/src/Form/Options.php +++ b/kirby/src/Form/Options.php @@ -144,6 +144,9 @@ class Options ]; } + // fallback for the text + $option['text'] ??= $option['value']; + // translate the option text if (is_array($option['text']) === true) { $option['text'] = I18n::translate($option['text'], $option['text']); diff --git a/kirby/src/Form/OptionsApi.php b/kirby/src/Form/OptionsApi.php old mode 100644 new mode 100755 diff --git a/kirby/src/Form/OptionsQuery.php b/kirby/src/Form/OptionsQuery.php old mode 100644 new mode 100755 diff --git a/kirby/src/Form/Validations.php b/kirby/src/Form/Validations.php old mode 100644 new mode 100755 diff --git a/kirby/src/Http/Cookie.php b/kirby/src/Http/Cookie.php old mode 100644 new mode 100755 index d076718..71843ee --- a/kirby/src/Http/Cookie.php +++ b/kirby/src/Http/Cookie.php @@ -2,6 +2,7 @@ namespace Kirby\Http; +use Kirby\Cms\App; use Kirby\Toolkit\Str; /** @@ -41,6 +42,9 @@ class Cookie */ public static function set(string $key, string $value, array $options = []): bool { + // modify CMS caching behavior + static::trackUsage($key); + // extract options $expires = static::lifetime($options['lifetime'] ?? 0); $path = $options['path'] ?? '/'; @@ -123,6 +127,10 @@ class Cookie if ($key === null) { return $_COOKIE; } + + // modify CMS caching behavior + static::trackUsage($key); + $value = $_COOKIE[$key] ?? null; return empty($value) ? $default : static::parse($value); } @@ -206,4 +214,24 @@ class Cookie return false; } + + /** + * Tells the CMS responder that the response relies on a cookie and + * its value (even if the cookie isn't set in the current request); + * this ensures that the response is only cached for visitors who don't + * have this cookie set; + * https://github.com/getkirby/kirby/issues/4423#issuecomment-1166300526 + * + * @param string $key + * @return void + */ + protected static function trackUsage(string $key): void + { + // lazily request the instance for non-CMS use cases + $kirby = App::instance(null, true); + + if ($kirby) { + $kirby->response()->usesCookie($key); + } + } } diff --git a/kirby/src/Http/Environment.php b/kirby/src/Http/Environment.php new file mode 100755 index 0000000..386e62a --- /dev/null +++ b/kirby/src/Http/Environment.php @@ -0,0 +1,1039 @@ + + * @link https://getkirby.com + * @copyright Bastian Allgeier + * @license https://opensource.org/licenses/MIT + */ +class Environment +{ + /** + * Full base URL object + * + * @var \Kirby\Http\Uri + */ + protected $baseUri; + + /** + * Full base URL + * + * @var string + */ + protected $baseUrl; + + /** + * Whether the request is being served by the CLI + * + * @var bool + */ + protected $cli; + + /** + * Current host name + * + * @var string + */ + protected $host; + + /** + * Whether the HTTPS protocol is used + * + * @var bool + */ + protected $https; + + /** + * Sanitized `$_SERVER` data + * + * @var array + */ + protected $info; + + /** + * Current server's IP address + * + * @var string + */ + protected $ip; + + /** + * Whether the site is behind a reverse proxy; + * `null` if not known (fixed allowed URL setup) + * + * @var bool|null + */ + protected $isBehindProxy; + + /** + * URI path to the base + * + * @var string + */ + protected $path; + + /** + * Port number in the site URL + * + * @var int|null + */ + protected $port; + + /** + * Intermediary value of the port + * extracted from the host name + * + * @var int|null + */ + protected $portInHost; + + /** + * Uri object for the full request URI. + * It is a combination of the base URL and `REQUEST_URI` + * + * @var \Kirby\Http\Uri + */ + protected $requestUri; + + /** + * Full request URL + * + * @var string + */ + protected $requestUrl; + + /** + * Path to the php script within the + * document root without the + * filename of the script + * + * @var string + */ + protected $scriptPath; + + /** + * Class constructor + * + * @param array|null $options + * @param array|null $info Optional override for `$_SERVER` + */ + public function __construct(?array $options = null, ?array $info = null) + { + $this->detect($options, $info); + } + + /** + * Returns the server's IP address + * + * @see static::ip + * @return string|null + */ + public function address(): ?string + { + return $this->ip(); + } + + /** + * Returns the full base URL object + * + * @return \Kirby\Http\Uri + */ + public function baseUri() + { + return $this->baseUri; + } + + /** + * Returns the full base URL + * + * @return string + */ + public function baseUrl(): string + { + return $this->baseUrl; + } + + /** + * Checks if the request is being served by the CLI + * + * @return bool + */ + public function cli(): bool + { + return $this->cli; + } + + /** + * Sanitizes the server info and detects + * all relevant parts. This can be called + * again at a later point to overwrite all + * the stored information and re-detect the + * environment if necessary. + * + * @param array|null $options + * @param array|null $info Optional override for `$_SERVER` + * @return array + */ + public function detect(array $options = null, array $info = null): array + { + $info ??= $_SERVER; + $options = array_merge([ + 'cli' => null, + 'allowed' => null + ], $options ?? []); + + $this->info = static::sanitize($info); + $this->cli = $this->detectCli($options['cli']); + $this->ip = $this->detectIp(); + $this->host = null; + $this->https = false; + $this->isBehindProxy = null; + $this->scriptPath = $this->detectScriptPath($this->get('SCRIPT_NAME')); + $this->path = $this->detectPath($this->scriptPath); + $this->port = null; + + // keep Server flags compatible for now + // TODO: remove in 3.8.0 + // @codeCoverageIgnoreStart + if (is_int($options['allowed']) === true) { + Helpers::deprecated(' + Using `Server::` constants for the `allowed` option has been deprecated and support will be removed in 3.8.0. Use one of the following instead: a single fixed URL, an array of allowed URLs to match dynamically, `*` wildcard to match dynamically even from insecure headers, or `true` to match automtically from safe server variables. + '); + + $options['allowed'] = $this->detectAllowedFromFlag($options['allowed']); + } + // @codeCoverageIgnoreEnd + + // insecure auto-detection + if ($options['allowed'] === '*' || $options['allowed'] === ['*']) { + $this->detectAuto(true); + + // fixed environments + } elseif (empty($options['allowed']) === false) { + $this->detectAllowed($options['allowed']); + + // secure auto-detection + } else { + $this->detectAuto(); + } + + // build the URI based on the detected params + $this->detectBaseUri(); + + // build the request URI based on the detected URL + $this->detectRequestUri($this->get('REQUEST_URI')); + + // return the sanitized $_SERVER array + return $this->info; + } + + /** + * Sets the host name, port, path and protocol from the + * fixed list of allowed URLs + * + * @param array|string $allowed + * @return void + */ + protected function detectAllowed($allowed): void + { + $allowed = A::wrap($allowed); + + // with a single allowed URL, the entire + // environment will be based on that + if (count($allowed) === 1) { + $baseUrl = A::first($allowed); + + if (is_string($baseUrl) === false) { + throw new InvalidArgumentException('Invalid allow list setup for base URLs'); + } + + $uri = new Uri($baseUrl, ['slash' => false]); + + $this->host = $uri->host(); + $this->https = $uri->https(); + $this->port = $uri->port(); + $this->path = $uri->path()->toString(); + return; + } + + // run insecure auto detection to get + // host, port and https from the environment; + // security is achieved by checking against + // the fixed allowlist below + $this->detectAuto(true); + + // build the baseUrl based on the detected environment + // to compare it against what is allowed + $this->detectBaseUri(); + + foreach ($allowed as $url) { + // skip invalid URLs + if (is_string($url) === false) { + continue; + } + + $uri = new Uri($url, ['slash' => false]); + + if ($uri->toString() === $this->baseUrl) { + // the current environment is allowed, + // stop before the exception below is thrown + return; + } + } + + throw new InvalidArgumentException('The environment is not allowed'); + } + + /** + * The URL option receives a set of Server constant flags + * + * Server::HOST_FROM_SERVER + * Server::HOST_FROM_SERVER | Server::HOST_ALLOW_EMPTY + * Server::HOST_FROM_HEADER + * Server::HOST_FROM_HEADER | Server::HOST_ALLOW_EMPTY + * @todo Remove in 3.8.0 + * + * @param int $flags + * @return string|null + */ + protected function detectAllowedFromFlag(int $flags): ?string + { + // allow host detection from host headers + if ($flags & Server::HOST_FROM_HEADER) { + return '*'; + } + + // detect host only from server name + return null; + } + + /** + * Sets the host name, port and protocol without configuration + * + * @param bool $insecure Include the `Host` and `X-Forwarded-*` headers in the search + * @return void + */ + protected function detectAuto(bool $insecure = false): void + { + // proxy server setup + if ( + $insecure === true && + empty($this->info['HTTP_X_FORWARDED_HOST']) === false + ) { + $this->isBehindProxy = true; + + $this->host = $this->detectForwardedHost(); + $this->https = $this->detectForwardedHttps(); + $this->port = $this->detectForwardedPort(); + + return; + } + + // local server setup + $this->isBehindProxy = false; + + $this->host = $this->detectHost($insecure); + $this->https = $this->detectHttps(); + $this->port = $this->detectPort(); + } + + /** + * Builds the base URL based on the + * given environment params + * + * @return \Kirby\Http\Uri + */ + protected function detectBaseUri() + { + $this->baseUri = new Uri([ + 'host' => $this->host, + 'path' => $this->path, + 'port' => $this->port, + 'scheme' => $this->https ? 'https' : 'http', + ]); + + $this->baseUrl = $this->baseUri->toString(); + + return $this->baseUri; + } + + /** + * Detects if the request is served by the CLI + * + * @param bool|null $override Set to a boolean to override detection (for testing) + * @return bool + */ + protected function detectCli(?bool $override = null): bool + { + if (is_bool($override) === true) { + return $override; + } + + if (defined('STDIN') === true) { + return true; + } + + $term = getenv('TERM'); + + if (substr(PHP_SAPI, 0, 3) === 'cgi' && $term && $term !== 'unknown') { + return true; + } + + return false; + } + + /** + * Detects the host name of the reverse proxy + * + * @return string|null + */ + protected function detectForwardedHost(): ?string + { + $host = $this->get('HTTP_X_FORWARDED_HOST'); + $parts = $this->detectPortInHost($host); + + $this->portInHost = $parts['port']; + + return $parts['host']; + } + + /** + * Detects the protocol of the reverse proxy + * + * @return bool + */ + protected function detectForwardedHttps(): bool + { + if ($this->detectHttpsOn($this->get('HTTP_X_FORWARDED_SSL')) === true) { + return true; + } + + if ($this->detectHttpsProtocol($this->get('HTTP_X_FORWARDED_PROTO')) === true) { + return true; + } + + return false; + } + + /** + * Detects the port of the reverse proxy + * + * @return int|null + */ + protected function detectForwardedPort(): ?int + { + // based on forwarded port + $port = $this->get('HTTP_X_FORWARDED_PORT'); + + if (is_int($port) === true) { + return $port; + } + + // based on forwarded host + if (is_int($this->portInHost) === true) { + return $this->portInHost; + } + + // based on the detected https state + if ($this->https === true) { + return 443; + } + + return null; + } + + /** + * Detects the host name from various headers + * + * @param bool $insecure Include the `Host` header in the search + * @return string|null + */ + protected function detectHost(bool $insecure = false): ?string + { + if ($insecure === true) { + $hosts[] = $this->get('HTTP_HOST'); + } + + $hosts[] = $this->get('SERVER_NAME'); + $hosts[] = $this->get('SERVER_ADDR'); + + // use the first header that is not empty + $hosts = array_filter($hosts); + $host = A::first($hosts); + + $parts = $this->detectPortInHost($host); + + $this->portInHost = $parts['port']; + + return $parts['host']; + } + + /** + * Detects the HTTPS status + * + * @return bool + */ + protected function detectHttps(): bool + { + if ($this->detectHttpsOn($this->get('HTTPS')) === true) { + return true; + } + + return false; + } + + /** + * Normalizes the HTTPS status into a boolean + * + * @param string|bool|null|int $value + * @return bool + */ + protected function detectHttpsOn($value): bool + { + // off can mean many things :) + $off = ['off', null, '', 0, '0', false, 'false', -1, '-1']; + + return in_array($value, $off, true) === false; + } + + /** + * Detects the HTTPS status from a `X-Forwarded-Proto` string + * + * @param string|null $protocol + * @return bool + */ + protected function detectHttpsProtocol(?string $protocol = null): bool + { + if ($protocol === null) { + return false; + } + + return in_array(strtolower($protocol), ['https', 'https, http']) === true; + } + + /** + * Detects the server's IP address + * + * @return string|null + */ + protected function detectIp(): ?string + { + return $this->get('SERVER_ADDR'); + } + + /** + * Detects the URI path unless in CLI mode + * + * @param string|null $path + * @return string + */ + protected function detectPath(?string $path = null): string + { + if ($this->cli === true) { + return ''; + } + + return $path ?? ''; + } + + /** + * Detects the port from various sources + * + * @return int|null + */ + protected function detectPort(): ?int + { + // based on server port + $port = $this->get('SERVER_PORT'); + + if (is_int($port) === true) { + return $port; + } + + // based on the detected host + if (is_int($this->portInHost) === true) { + return $this->portInHost; + } + + // based on the detected https state + if ($this->https === true) { + return 443; + } + + return null; + } + + /** + * Splits a hostname:port string into its components + * + * @param string|null $host + * @return array + */ + protected function detectPortInHost(?string $host = null): array + { + if (empty($host) === true) { + return [ + 'host' => null, + 'port' => null + ]; + } + + $parts = Str::split($host, ':'); + + return [ + 'host' => $parts[0] ?? null, + 'port' => static::sanitizePort($parts[1] ?? null), + ]; + } + + /** + * Splits any URI into path and query + * + * @param string|null $requestUri + * @return \Kirby\Http\Uri + */ + protected function detectRequestUri(?string $requestUri = null) + { + // make sure the URL parser works properly when there's a + // colon in the request URI but the URI is relative + if (Url::isAbsolute($requestUri) === false) { + $requestUri = 'https://getkirby.com' . $requestUri; + } + + $uri = new Uri($requestUri); + + // create the URI object as a combination of base uri parts + // and the parts from REQUEST_URI + $this->requestUri = $this->baseUri()->clone([ + 'fragment' => $uri->fragment(), + 'params' => $uri->params(), + 'path' => $uri->path(), + 'query' => $uri->query() + ]); + + // build the full request URL + $this->requestUrl = $this->requestUri->toString(); + + return $this->requestUri; + } + + /** + * Returns the sanitized script path unless in CLI mode + * + * @param string|null $scriptPath + * @return string + */ + protected function detectScriptPath(?string $scriptPath = null): string + { + if ($this->cli === true) { + return ''; + } + + return $this->sanitizeScriptPath($scriptPath); + } + + /** + * Gets a value from the server environment array + * + * + * $server->get('document_root'); + * // sample output: /var/www/kirby + * + * $server->get(); + * // returns the whole server array + * + * + * @param string|false|null $key The key to look for. Pass `false` or `null` + * to return the entire server array. + * @param mixed $default Optional default value, which should be + * returned if no element has been found + * @return mixed + */ + public function get($key = null, $default = null) + { + if (is_string($key) === false) { + return $this->info; + } + + if (isset($this->info[$key]) === false) { + $key = strtoupper($key); + } + + return $this->info[$key] ?? static::sanitize($key, $default); + } + + /** + * Gets a value from the global server environment array + * of the current app instance; falls back to `$_SERVER` if + * no app instance is running + * + * @param string|false|null $key The key to look for. Pass `false` or `null` + * to return the entire server array. + * @param mixed $default Optional default value, which should be + * returned if no element has been found + * @return mixed + */ + public static function getGlobally($key = null, $default = null) + { + // first try the global `Environment` object if the CMS is running + $app = App::instance(null, true); + if ($app) { + return $app->environment()->get($key, $default); + } + + if (is_string($key) === false) { + return static::sanitize($_SERVER); + } + + if (isset($_SERVER[$key]) === false) { + $key = strtoupper($key); + } + + return static::sanitize($key, $_SERVER[$key] ?? $default); + } + + /** + * Returns the current host name + * + * @return string|null + */ + public function host(): ?string + { + return $this->host; + } + + /** + * Returns whether the HTTPS protocol is used + * + * @return bool + */ + public function https(): bool + { + return $this->https; + } + + /** + * Returns the sanitized `$_SERVER` array + * + * @return array + */ + public function info(): array + { + return $this->info; + } + + /** + * Returns the server's IP address + * + * @return string|null + */ + public function ip(): ?string + { + return $this->ip; + } + + /** + * Returns if the server is behind a + * reverse proxy server + * + * @return bool|null + */ + public function isBehindProxy(): ?bool + { + return $this->isBehindProxy; + } + + /** + * Checks if this is a local installation; + * returns `false` if in doubt + * + * @return bool + */ + public function isLocal(): bool + { + // check host + $host = $this->host(); + + if ($host === 'localhost') { + return true; + } + + if (Str::endsWith($host, '.local') === true) { + return true; + } + + if (Str::endsWith($host, '.test') === true) { + return true; + } + + // collect all possible visitor ips + $ips = [ + $this->get('REMOTE_ADDR'), + $this->get('HTTP_X_FORWARDED_FOR'), + $this->get('HTTP_CLIENT_IP') + ]; + + // remove duplicates and empty ips + $ips = array_unique(array_filter($ips)); + + // no known ip? Better not assume it's local + if (empty($ips) === true) { + return false; + } + + // stop as soon as a non-local ip is found + foreach ($ips as $ip) { + if (in_array($ip, ['::1', '127.0.0.1']) === false) { + return false; + } + } + + return true; + } + + /** + * Loads and returns options from environment-specific + * PHP files (by host name and server IP address) + * + * @param string $root Root directory to load configs from + * @return array + */ + public function options(string $root): array + { + $configHost = []; + $configAddr = []; + + $host = $this->host(); + $addr = $this->ip(); + + // load the config for the host + if (empty($host) === false) { + $configHost = F::load($root . '/config.' . $host . '.php', []); + } + + // load the config for the server IP + if (empty($addr) === false) { + $configAddr = F::load($root . '/config.' . $addr . '.php', []); + } + + return array_replace_recursive($configHost, $configAddr); + } + + /** + * Returns the detected path + * + * @return string|null + */ + public function path(): ?string + { + return $this->path; + } + + /** + * Returns the correct port number + * + * @return int|null + */ + public function port(): ?int + { + return $this->port; + } + + /** + * Returns an URI object for the requested URL + * + * @return \Kirby\Http\Uri + */ + public function requestUri() + { + return $this->requestUri; + } + + /** + * Returns the current URL, including the request path + * and query + * + * @return string + */ + public function requestUrl(): string + { + return $this->requestUrl; + } + + /** + * Sanitizes some `$_SERVER` keys + * + * @param string|array $key + * @param mixed $value + * @return mixed + */ + public static function sanitize($key, $value = null) + { + if (is_array($key) === true) { + foreach ($key as $k => $v) { + $key[$k] = static::sanitize($k, $v); + } + + return $key; + } + + switch ($key) { + case 'SERVER_ADDR': + case 'SERVER_NAME': + case 'HTTP_HOST': + case 'HTTP_X_FORWARDED_HOST': + return static::sanitizeHost($value); + case 'SERVER_PORT': + case 'HTTP_X_FORWARDED_PORT': + return static::sanitizePort($value); + default: + return $value; + } + } + + /** + * Sanitizes the given host name + * + * @param string|null $host + * @return string|null + */ + protected static function sanitizeHost(?string $host = null): ?string + { + if (empty($host) === true) { + return null; + } + + $host = Str::lower($host); + $host = strip_tags($host); + $host = basename($host); + $host = preg_replace('![^\w.:-]+!iu', '', $host); + $host = htmlspecialchars($host, ENT_COMPAT); + $host = trim($host, '-'); + $host = trim($host, '.'); + $host = trim($host); + + if ($host === '') { + return null; + } + + return $host; + } + + /** + * Sanitizes the given port number + * + * @param string|int|null $port + * @return int|null + */ + protected static function sanitizePort($port = null): ?int + { + // already fine + if (is_int($port) === true) { + return $port; + } + + // no port given + if ($port === null || $port === false || $port === '') { + return null; + } + + // remove any character that is not an integer + $port = preg_replace('![^0-9]+!', '', (string)($port ?? '')); + + // no port + if ($port === '') { + return null; + } + + // convert to integer + return (int)$port; + } + + /** + * Sanitizes the given script path + * + * @param string|null $scriptPath + * @return string + */ + protected function sanitizeScriptPath(?string $scriptPath = null): string + { + $scriptPath ??= ''; + $scriptPath = trim($scriptPath); + + // skip all the sanitizing steps if the path is empty + if ($scriptPath === '') { + return $scriptPath; + } + + // replace Windows backslashes + $scriptPath = str_replace('\\', '/', $scriptPath); + // remove the script + $scriptPath = dirname($scriptPath); + // replace those fucking backslashes again + $scriptPath = str_replace('\\', '/', $scriptPath); + // remove the leading and trailing slashes + $scriptPath = trim($scriptPath, '/'); + + // top-level scripts don't have a path + // and dirname() will return '.' + if ($scriptPath === '.') { + return ''; + } + + return $scriptPath; + } + + /** + * Returns the path to the php script + * within the document root without the + * filename of the script. + * + * i.e. /subfolder/index.php -> subfolder + * + * This can be used to build the base baseUrl + * for subfolder installations + * + * @return string + */ + public function scriptPath(): string + { + return $this->scriptPath; + } + + /** + * Returns all environment data as array + * + * @return array + */ + public function toArray(): array + { + return [ + 'baseUrl' => $this->baseUrl, + 'host' => $this->host, + 'https' => $this->https, + 'info' => $this->info, + 'ip' => $this->ip, + 'isBehindProxy' => $this->isBehindProxy, + 'path' => $this->path, + 'port' => $this->port, + 'requestUrl' => $this->requestUrl, + 'scriptPath' => $this->scriptPath, + ]; + } +} diff --git a/kirby/src/Http/Exceptions/NextRouteException.php b/kirby/src/Http/Exceptions/NextRouteException.php old mode 100644 new mode 100755 diff --git a/kirby/src/Http/Header.php b/kirby/src/Http/Header.php old mode 100644 new mode 100755 index 2c5dc71..92aeb90 --- a/kirby/src/Http/Header.php +++ b/kirby/src/Http/Header.php @@ -130,7 +130,7 @@ class Header public static function status($code = null, bool $send = true) { $codes = static::$codes; - $protocol = $_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.1'; + $protocol = Environment::getGlobally('SERVER_PROTOCOL', 'HTTP/1.1'); // allow full control over code and message if (is_string($code) === true && preg_match('/^\d{3} \w.+$/', $code) === 1) { diff --git a/kirby/src/Http/Idn.php b/kirby/src/Http/Idn.php old mode 100644 new mode 100755 diff --git a/kirby/src/Http/Params.php b/kirby/src/Http/Params.php old mode 100644 new mode 100755 diff --git a/kirby/src/Http/Path.php b/kirby/src/Http/Path.php old mode 100644 new mode 100755 diff --git a/kirby/src/Http/Query.php b/kirby/src/Http/Query.php old mode 100644 new mode 100755 diff --git a/kirby/src/Http/Remote.php b/kirby/src/Http/Remote.php old mode 100644 new mode 100755 diff --git a/kirby/src/Http/Request.php b/kirby/src/Http/Request.php old mode 100644 new mode 100755 index ee859d8..0772faa --- a/kirby/src/Http/Request.php +++ b/kirby/src/Http/Request.php @@ -2,8 +2,7 @@ namespace Kirby\Http; -use Kirby\Http\Request\Auth\BasicAuth; -use Kirby\Http\Request\Auth\BearerAuth; +use Kirby\Cms\App; use Kirby\Http\Request\Body; use Kirby\Http\Request\Files; use Kirby\Http\Request\Query; @@ -23,10 +22,16 @@ use Kirby\Toolkit\Str; */ class Request { + public static $authTypes = [ + 'basic' => 'Kirby\Http\Request\Auth\BasicAuth', + 'bearer' => 'Kirby\Http\Request\Auth\BearerAuth', + 'session' => 'Kirby\Http\Request\Auth\SessionAuth', + ]; + /** * The auth object if available * - * @var BearerAuth|BasicAuth|false|null + * @var \Kirby\Http\Request\Auth|false|null */ protected $auth; @@ -109,19 +114,19 @@ class Request $this->method = $this->detectRequestMethod($options['method'] ?? null); if (isset($options['body']) === true) { - $this->body = new Body($options['body']); + $this->body = is_a($options['body'], Body::class) ? $options['body'] : new Body($options['body']); } if (isset($options['files']) === true) { - $this->files = new Files($options['files']); + $this->files = is_a($options['files'], Files::class) ? $options['files'] : new Files($options['files']); } if (isset($options['query']) === true) { - $this->query = new Query($options['query']); + $this->query = is_a($options['query'], Query::class) === true ? $options['query'] : new Query($options['query']); } if (isset($options['url']) === true) { - $this->url = new Uri($options['url']); + $this->url = is_a($options['url'], Uri::class) === true ? $options['url'] : new Uri($options['url']); } } @@ -144,7 +149,7 @@ class Request /** * Returns the Auth object if authentication is set * - * @return \Kirby\Http\Request\Auth\BasicAuth|\Kirby\Http\Request\Auth\BearerAuth|null + * @return \Kirby\Http\Request\Auth|null */ public function auth() { @@ -152,16 +157,31 @@ class Request return $this->auth; } - if ($auth = $this->options['auth'] ?? $this->header('authorization')) { - $type = Str::before($auth, ' '); - $token = Str::after($auth, ' '); - $class = 'Kirby\\Http\\Request\\Auth\\' . ucfirst($type) . 'Auth'; + // lazily request the instance for non-CMS use cases + $kirby = App::instance(null, true); - if (class_exists($class) === false) { + // tell the CMS responder that the response relies on + // the `Authorization` header and its value (even if + // the header isn't set in the current request); + // this ensures that the response is only cached for + // unauthenticated visitors; + // https://github.com/getkirby/kirby/issues/4423#issuecomment-1166300526 + if ($kirby) { + $kirby->response()->usesAuth(true); + } + + if ($auth = $this->options['auth'] ?? $this->header('authorization')) { + $type = Str::lower(Str::before($auth, ' ')); + $data = Str::after($auth, ' '); + + $class = static::$authTypes[$type] ?? null; + if (!$class || class_exists($class) === false) { return $this->auth = false; } - return $this->auth = new $class($token); + $object = new $class($data); + + return $this->auth = $object; } return $this->auth = false; @@ -184,7 +204,7 @@ class Request */ public function cli(): bool { - return Server::cli(); + return $this->options['cli'] ?? (new Environment())->cli(); } /** @@ -220,14 +240,14 @@ class Request $methods = ['GET', 'HEAD', 'POST', 'PUT', 'DELETE', 'CONNECT', 'OPTIONS', 'TRACE', 'PATCH']; // the request method can be overwritten with a header - $methodOverride = strtoupper($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'] ?? ''); + $methodOverride = strtoupper(Environment::getGlobally('HTTP_X_HTTP_METHOD_OVERRIDE', '')); if ($method === null && in_array($methodOverride, $methods) === true) { $method = $methodOverride; } // final chain of options to detect the method - $method = $method ?? $_SERVER['REQUEST_METHOD'] ?? 'GET'; + $method = $method ?? Environment::getGlobally('REQUEST_METHOD', 'GET'); // uppercase the shit out of it $method = strtoupper($method); @@ -285,6 +305,20 @@ class Request return A::get($this->data(), $key, $fallback); } + /** + * Returns whether the request contains + * the `Authorization` header + * @since 3.7.0 + * + * @return bool + */ + public function hasAuth(): bool + { + $header = $this->options['auth'] ?? $this->header('authorization'); + + return $header !== null; + } + /** * Returns a header by key if it exists * @@ -308,7 +342,7 @@ class Request { $headers = []; - foreach ($_SERVER as $key => $value) { + foreach (Environment::getGlobally() as $key => $value) { if (substr($key, 0, 5) !== 'HTTP_' && substr($key, 0, 14) !== 'REDIRECT_HTTP_') { continue; } diff --git a/kirby/src/Http/Request/Auth.php b/kirby/src/Http/Request/Auth.php new file mode 100755 index 0000000..62f4c68 --- /dev/null +++ b/kirby/src/Http/Request/Auth.php @@ -0,0 +1,61 @@ + + * @link https://getkirby.com + * @copyright Bastian Allgeier + * @license https://opensource.org/licenses/MIT + */ +abstract class Auth +{ + /** + * Raw authentication data after the first space + * in the `Authorization` header + * + * @var string + */ + protected $data; + + /** + * Constructor + * + * @param string $data + */ + public function __construct(string $data) + { + $this->data = $data; + } + + /** + * Converts the object to a string + * + * @return string + */ + public function __toString(): string + { + return ucfirst($this->type()) . ' ' . $this->data(); + } + + /** + * Returns the raw authentication data after the + * first space in the `Authorization` header + * + * @return string + */ + public function data(): string + { + return $this->data; + } + + /** + * Returns the name of the auth type (lowercase) + * + * @return string + */ + abstract public function type(): string; +} diff --git a/kirby/src/Http/Request/Auth/BasicAuth.php b/kirby/src/Http/Request/Auth/BasicAuth.php old mode 100644 new mode 100755 index 4df6e8f..0618e7a --- a/kirby/src/Http/Request/Auth/BasicAuth.php +++ b/kirby/src/Http/Request/Auth/BasicAuth.php @@ -2,12 +2,19 @@ namespace Kirby\Http\Request\Auth; +use Kirby\Http\Request\Auth; use Kirby\Toolkit\Str; /** - * Basic Authentication + * HTTP basic authentication data + * + * @package Kirby Http + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier + * @license https://opensource.org/licenses/MIT */ -class BasicAuth extends BearerAuth +class BasicAuth extends Auth { /** * @var string @@ -27,11 +34,11 @@ class BasicAuth extends BearerAuth /** * @param string $token */ - public function __construct(string $token) + public function __construct(string $data) { - parent::__construct($token); + parent::__construct($data); - $this->credentials = base64_decode($token); + $this->credentials = base64_decode($data); $this->username = Str::before($this->credentials, ':'); $this->password = Str::after($this->credentials, ':'); } diff --git a/kirby/src/Http/Request/Auth/BearerAuth.php b/kirby/src/Http/Request/Auth/BearerAuth.php old mode 100644 new mode 100755 index 2c5b1c2..860fdb1 --- a/kirby/src/Http/Request/Auth/BearerAuth.php +++ b/kirby/src/Http/Request/Auth/BearerAuth.php @@ -2,36 +2,19 @@ namespace Kirby\Http\Request\Auth; +use Kirby\Http\Request\Auth; + /** - * Bearer Auth + * Bearer token authentication data + * + * @package Kirby Http + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier + * @license https://opensource.org/licenses/MIT */ -class BearerAuth +class BearerAuth extends Auth { - /** - * @var string - */ - protected $token; - - /** - * Creates a new Bearer Auth object - * - * @param string $token - */ - public function __construct(string $token) - { - $this->token = $token; - } - - /** - * Converts the object to a string - * - * @return string - */ - public function __toString(): string - { - return ucfirst($this->type()) . ' ' . $this->token(); - } - /** * Returns the authentication token * @@ -39,7 +22,7 @@ class BearerAuth */ public function token(): string { - return $this->token; + return $this->data; } /** diff --git a/kirby/src/Http/Request/Auth/SessionAuth.php b/kirby/src/Http/Request/Auth/SessionAuth.php new file mode 100755 index 0000000..bf6fdcd --- /dev/null +++ b/kirby/src/Http/Request/Auth/SessionAuth.php @@ -0,0 +1,48 @@ + + * @link https://getkirby.com + * @copyright Bastian Allgeier + * @license https://opensource.org/licenses/MIT + */ +class SessionAuth extends Auth +{ + /** + * Tries to return the session object + * + * @return \Kirby\Session\Session + */ + public function session() + { + return App::instance()->sessionHandler()->getManually($this->data); + } + + /** + * Returns the session token + * + * @return string + */ + public function token(): string + { + return $this->data; + } + + /** + * Returns the authentication type + * + * @return string + */ + public function type(): string + { + return 'session'; + } +} diff --git a/kirby/src/Http/Request/Body.php b/kirby/src/Http/Request/Body.php old mode 100644 new mode 100755 diff --git a/kirby/src/Http/Request/Data.php b/kirby/src/Http/Request/Data.php old mode 100644 new mode 100755 diff --git a/kirby/src/Http/Request/Files.php b/kirby/src/Http/Request/Files.php old mode 100644 new mode 100755 diff --git a/kirby/src/Http/Request/Query.php b/kirby/src/Http/Request/Query.php old mode 100644 new mode 100755 diff --git a/kirby/src/Http/Response.php b/kirby/src/Http/Response.php old mode 100644 new mode 100755 index d552839..4455b2b --- a/kirby/src/Http/Response.php +++ b/kirby/src/Http/Response.php @@ -200,6 +200,23 @@ class Response return new static($props); } + + /** + * Redirects to the given Urls + * Urls can be relative or absolute. + * @since 3.7.0 + * + * @param string $url + * @param int $code + * @return void + * + * @codeCoverageIgnore + */ + public static function go(string $url = '/', int $code = 302) + { + die(static::redirect($url, $code)); + } + /** * Getter for single headers * diff --git a/kirby/src/Http/Route.php b/kirby/src/Http/Route.php old mode 100644 new mode 100755 diff --git a/kirby/src/Http/Router.php b/kirby/src/Http/Router.php old mode 100644 new mode 100755 index 241bd9b..1928be7 --- a/kirby/src/Http/Router.php +++ b/kirby/src/Http/Router.php @@ -16,14 +16,25 @@ use Kirby\Toolkit\A; */ class Router { - public static $beforeEach; - public static $afterEach; + /** + * Hook that is called after each route + * + * @var \Closure + */ + protected $afterEach; + + /** + * Hook that is called before each route + * + * @var \Closure + */ + protected $beforeEach; /** * Store for the current route, * if one can be found * - * @var Route|null + * @var \Kirby\Http\Route|null */ protected $route; @@ -52,9 +63,13 @@ class Router * registers all the given routes * * @param array $routes + * @param array $hooks Optional `beforeEach` and `afterEach` hooks */ - public function __construct(array $routes = []) + public function __construct(array $routes = [], array $hooks = []) { + $this->beforeEach = $hooks['beforeEach'] ?? null; + $this->afterEach = $hooks['afterEach'] ?? null; + foreach ($routes as $props) { if (isset($props['pattern'], $props['action']) === false) { throw new InvalidArgumentException('Invalid route parameters'); @@ -72,7 +87,12 @@ class Router foreach ($methods as $method) { foreach ($patterns as $pattern) { - $this->routes[$method][] = new Route($pattern, $method, $props['action'], $props); + $this->routes[$method][] = new Route( + $pattern, + $method, + $props['action'], + $props + ); } } } @@ -100,8 +120,8 @@ class Router while ($loop === true) { $route = $this->find($path, $method, $ignore); - if (is_a(static::$beforeEach, 'Closure') === true) { - (static::$beforeEach)($route, $path, $method); + if (is_a($this->beforeEach, 'Closure') === true) { + ($this->beforeEach)($route, $path, $method); } try { @@ -116,15 +136,31 @@ class Router $ignore[] = $route; } - if (is_a(static::$afterEach, 'Closure') === true) { + if (is_a($this->afterEach, 'Closure') === true) { $final = $loop === false; - $result = (static::$afterEach)($route, $path, $method, $result, $final); + $result = ($this->afterEach)($route, $path, $method, $result, $final); } } return $result; } + /** + * Creates a micro-router and executes + * the routing action immediately + * @since 3.7.0 + * + * @param string|null $path + * @param string $method + * @param array $routes + * @param \Closure|null $callback + * @return mixed + */ + public static function execute(?string $path = null, string $method = 'GET', array $routes = [], ?Closure $callback = null) + { + return (new static($routes))->call($path, $method, $callback); + } + /** * Finds a Route object by path and method * The Route's arguments method is used to diff --git a/kirby/src/Http/Server.php b/kirby/src/Http/Server.php old mode 100644 new mode 100755 index d343254..7a69c41 --- a/kirby/src/Http/Server.php +++ b/kirby/src/Http/Server.php @@ -2,7 +2,7 @@ namespace Kirby\Http; -use Kirby\Toolkit\A; +use Kirby\Toolkit\Facade; /** * A set of methods that make it more convenient to get variables @@ -13,343 +13,26 @@ use Kirby\Toolkit\A; * @link https://getkirby.com * @copyright Bastian Allgeier * @license https://opensource.org/licenses/MIT + * @deprecated 3.7.0 Use `Kirby\Http\Environment` instead + * @todo Remove in 3.8.0 */ -class Server +class Server extends Facade { public const HOST_FROM_SERVER = 1; public const HOST_FROM_HEADER = 2; public const HOST_ALLOW_EMPTY = 4; - /** - * Cache for the cli status - * - * @var bool|null - */ public static $cli; + public static $hosts; /** - * List of trusted hosts - * - * @var array + * @return \Kirby\Http\Environment */ - public static $hosts = []; - - /** - * Returns the server's IP address - * - * @return string - */ - public static function address(): string + public static function instance() { - return static::get('SERVER_ADDR', ''); - } - - /** - * Checks if the request is being served by the CLI - * - * @return bool - */ - public static function cli(): bool - { - if (static::$cli !== null) { - return static::$cli; - } - - if (defined('STDIN') === true) { - return static::$cli = true; - } - - $term = getenv('TERM'); - - if (substr(PHP_SAPI, 0, 3) === 'cgi' && $term && $term !== 'unknown') { - return static::$cli = true; - } - - return static::$cli = false; - } - - /** - * Gets a value from the _SERVER array - * - * - * Server::get('document_root'); - * // sample output: /var/www/kirby - * - * Server::get(); - * // returns the whole server array - * - * - * @param mixed $key The key to look for. Pass false or null to - * return the entire server array. - * @param mixed $default Optional default value, which should be - * returned if no element has been found - * @return mixed - */ - public static function get($key = null, $default = null) - { - if ($key === null) { - return $_SERVER; - } - - $key = strtoupper($key); - $value = $_SERVER[$key] ?? $default; - return static::sanitize($key, $value); - } - - /** - * Returns the correct host - * - * @param bool $forwarded Deprecated. Todo: remove in 3.7.0 - * @return string - */ - public static function host(bool $forwarded = false): string - { - $hosts[] = static::get('SERVER_NAME'); - $hosts[] = static::get('SERVER_ADDR'); - - // insecure host parameters are only allowed when hosts - // are validated against set of host patterns - if (empty(static::$hosts) === false) { - $hosts[] = static::get('HTTP_HOST'); - $hosts[] = static::get('HTTP_X_FORWARDED_HOST'); - } - - // remove empty hosts - $hosts = array_filter($hosts); - - foreach ($hosts as $host) { - if (static::isAllowedHost($host) === true) { - return explode(':', $host)[0]; - } - } - - return ''; - } - - /** - * Setter and getter for the the static $hosts property - * - * $hosts = null -> return all defined hosts - * $hosts = Server::HOST_FROM_SERVER -> [] - * $hosts = Server::HOST_FROM_HEADER -> ['*'] - * $hosts = array -> [array of trusted hosts] - * $hosts = string -> [single trusted host] - * - * @param string|array|int|null $hosts - * @return array - */ - public static function hosts($hosts = null): array - { - if ($hosts === null) { - return static::$hosts; - } - - if (is_int($hosts) && $hosts & static::HOST_FROM_SERVER) { - return static::$hosts = []; - } - - if (is_int($hosts) && $hosts & static::HOST_FROM_HEADER) { - return static::$hosts = ['*']; - } - - // make sure hosts are always an array - $hosts = A::wrap($hosts); - - // return unique hosts - return static::$hosts = array_unique($hosts); - } - - /** - * Checks for a https request - * - * @return bool - */ - public static function https(): bool - { - $https = $_SERVER['HTTPS'] ?? null; - $off = ['off', null, '', 0, '0', false, 'false', -1, '-1']; - - // check for various options to send a negative HTTPS header - if (in_array($https, $off, true) === false) { - return true; - } - - // check for the port - if (static::port() === 443) { - return true; - } - - return false; - } - - /** - * Checks for allowed host names - * - * @param string $host - * @return bool - */ - public static function isAllowedHost(string $host): bool - { - if (empty(static::$hosts) === true) { - return true; - } - - foreach (static::$hosts as $pattern) { - if (empty($pattern) === true) { - continue; - } - - if (fnmatch($pattern, $host) === true) { - return true; - } - } - - return false; - } - - /** - * Checks if the server is behind a - * proxy server. - * - * @return bool - */ - public static function isBehindProxy(): bool - { - return empty($_SERVER['HTTP_X_FORWARDED_HOST']) === false; - } - - /** - * Returns the correct port number - * - * @param bool $forwarded Deprecated. Todo: remove in 3.7.0 - * @return int - */ - public static function port(bool $forwarded = false): int - { - $port = null; - - // handle reverse proxy setups - if (static::isBehindProxy() === true) { - // based on forwarded port - $port = static::get('HTTP_X_FORWARDED_PORT'); - - // based on the forwarded host - if (empty($port) === true) { - $port = (int)parse_url(static::get('HTTP_X_FORWARDED_HOST'), PHP_URL_PORT); - } - - // based on the forwarded proto - if (empty($port) === true) { - if (in_array($_SERVER['HTTP_X_FORWARDED_PROTO'] ?? null, ['https', 'https, http']) === true) { - $port = 443; - } - } - } - - // based on the host - if (empty($port) === true) { - $port = (int)parse_url(static::get('HTTP_HOST'), PHP_URL_PORT); - } - - // based on server port - if (empty($port) === true) { - $port = static::get('SERVER_PORT'); - } - - return $port ?? 0; - } - - /** - * Returns an array with path and query - * from the REQUEST_URI - * - * @return array - */ - public static function requestUri(): array - { - $uri = static::get('REQUEST_URI', ''); - - if (Url::isAbsolute($uri) === true) { - $uri = parse_url($uri); - } else { - // the fake domain is needed to make sure the URL parsing is - // always correct. Even if there's a colon in the path for params - $uri = parse_url('http://getkirby.com' . $uri); - } - - return [ - 'path' => $uri['path'] ?? null, - 'query' => $uri['query'] ?? null, - ]; - } - - /** - * Help to sanitize some _SERVER keys - * - * @param string $key - * @param mixed $value - * @return mixed - */ - public static function sanitize(string $key, $value) - { - switch ($key) { - case 'SERVER_ADDR': - case 'SERVER_NAME': - case 'HTTP_HOST': - case 'HTTP_X_FORWARDED_HOST': - $value ??= ''; - $value = strtolower($value); - $value = strip_tags($value); - $value = basename($value); - $value = preg_replace('![^\w.:-]+!iu', '', $value); - $value = htmlspecialchars($value, ENT_COMPAT); - $value = trim($value, '-'); - $value = trim($value, '.'); - break; - case 'SERVER_PORT': - case 'HTTP_X_FORWARDED_PORT': - $value ??= ''; - $value = (int)(preg_replace('![^0-9]+!', '', $value)); - break; - } - - return $value; - } - - /** - * Returns the path to the php script - * within the document root without the - * filename of the script. - * - * i.e. /subfolder/index.php -> subfolder - * - * This can be used to build the base url - * for subfolder installations - * - * @return string - */ - public static function scriptPath(): string - { - if (static::cli() === true) { - return ''; - } - - $path = $_SERVER['SCRIPT_NAME'] ?? ''; - // replace Windows backslashes - $path = str_replace('\\', '/', $path); - // remove the script - $path = dirname($path); - // replace those fucking backslashes again - $path = str_replace('\\', '/', $path); - // remove the leading and trailing slashes - $path = trim($path, '/'); - - // top-level scripts don't have a path - // and dirname() will return '.' - if ($path === '.') { - $path = ''; - } - - return $path; + return new Environment([ + 'cli' => static::$cli, + 'allowed' => static::$hosts + ]); } } diff --git a/kirby/src/Http/Uri.php b/kirby/src/Http/Uri.php old mode 100644 new mode 100755 index 22d6cf2..48ad048 --- a/kirby/src/Http/Uri.php +++ b/kirby/src/Http/Uri.php @@ -2,6 +2,7 @@ namespace Kirby\Http; +use Kirby\Cms\App; use Kirby\Exception\InvalidArgumentException; use Kirby\Toolkit\Properties; use Throwable; @@ -234,25 +235,21 @@ class Uri /** * @param array $props - * @param bool $forwarded Deprecated! Todo: remove in 3.7.0 * @return static */ - public static function current(array $props = [], bool $forwarded = false) + public static function current(array $props = []) { if (static::$current !== null) { return static::$current; } - $uri = Server::requestUri(); - $url = new static(array_merge([ - 'scheme' => Server::https() === true ? 'https' : 'http', - 'host' => Server::host(), - 'port' => Server::port(), - 'path' => $uri['path'], - 'query' => $uri['query'], - ], $props)); + if ($app = App::instance(null, true)) { + $url = $app->url('current'); + } else { + $url = (new Environment())->requestUrl(); + } - return $url; + return new static($url, $props); } /** @@ -306,6 +303,14 @@ class Uri return $this->query()->isNotEmpty(); } + /** + * @return bool + */ + public function https(): bool + { + return $this->scheme() === 'https'; + } + /** * Tries to convert the internationalized host * name to the human-readable UTF8 representation @@ -325,18 +330,18 @@ class Uri * or any other executed script. * * @param array $props - * @param bool $forwarded Deprecated! Todo: remove in 3.7.0 - * @return string + * @return static */ - public static function index(array $props = [], bool $forwarded = false) + public static function index(array $props = []) { - return static::current(array_merge($props, [ - 'path' => Server::scriptPath(), - 'query' => null, - 'fragment' => null, - ])); - } + if ($app = App::instance(null, true)) { + $url = $app->url('index'); + } else { + $url = (new Environment())->baseUrl(); + } + return new static($url, $props); + } /** * Checks if the host exists diff --git a/kirby/src/Http/Url.php b/kirby/src/Http/Url.php old mode 100644 new mode 100755 index d9d23c2..c36e618 --- a/kirby/src/Http/Url.php +++ b/kirby/src/Http/Url.php @@ -100,10 +100,9 @@ class Url * Returns the url to the executed script * * @param array $props - * @param bool $forwarded Deprecated! Todo: remove in 3.7.0 * @return string */ - public static function index(array $props = [], bool $forwarded = false): string + public static function index(array $props = []): string { return Uri::index($props)->toString(); } @@ -186,7 +185,7 @@ class Url */ public static function last(): string { - return $_SERVER['HTTP_REFERER'] ?? ''; + return Environment::getGlobally('HTTP_REFERER', ''); } /** diff --git a/kirby/src/Http/Visitor.php b/kirby/src/Http/Visitor.php old mode 100644 new mode 100755 index 97907cc..255bf9e --- a/kirby/src/Http/Visitor.php +++ b/kirby/src/Http/Visitor.php @@ -55,10 +55,10 @@ class Visitor */ public function __construct(array $arguments = []) { - $this->ip($arguments['ip'] ?? $_SERVER['REMOTE_ADDR'] ?? ''); - $this->userAgent($arguments['userAgent'] ?? $_SERVER['HTTP_USER_AGENT'] ?? ''); - $this->acceptedLanguage($arguments['acceptedLanguage'] ?? $_SERVER['HTTP_ACCEPT_LANGUAGE'] ?? ''); - $this->acceptedMimeType($arguments['acceptedMimeType'] ?? $_SERVER['HTTP_ACCEPT'] ?? ''); + $this->ip($arguments['ip'] ?? Environment::getGlobally('REMOTE_ADDR', '')); + $this->userAgent($arguments['userAgent'] ?? Environment::getGlobally('HTTP_USER_AGENT', '')); + $this->acceptedLanguage($arguments['acceptedLanguage'] ?? Environment::getGlobally('HTTP_ACCEPT_LANGUAGE', '')); + $this->acceptedMimeType($arguments['acceptedMimeType'] ?? Environment::getGlobally('HTTP_ACCEPT', '')); } /** diff --git a/kirby/src/Image/Camera.php b/kirby/src/Image/Camera.php old mode 100644 new mode 100755 diff --git a/kirby/src/Image/Darkroom.php b/kirby/src/Image/Darkroom.php old mode 100644 new mode 100755 diff --git a/kirby/src/Image/Darkroom/GdLib.php b/kirby/src/Image/Darkroom/GdLib.php old mode 100644 new mode 100755 diff --git a/kirby/src/Image/Darkroom/ImageMagick.php b/kirby/src/Image/Darkroom/ImageMagick.php old mode 100644 new mode 100755 diff --git a/kirby/src/Image/Dimensions.php b/kirby/src/Image/Dimensions.php old mode 100644 new mode 100755 diff --git a/kirby/src/Image/Exif.php b/kirby/src/Image/Exif.php old mode 100644 new mode 100755 diff --git a/kirby/src/Image/Image.php b/kirby/src/Image/Image.php old mode 100644 new mode 100755 diff --git a/kirby/src/Image/Location.php b/kirby/src/Image/Location.php old mode 100644 new mode 100755 diff --git a/kirby/src/Panel/Dialog.php b/kirby/src/Panel/Dialog.php old mode 100644 new mode 100755 diff --git a/kirby/src/Panel/Document.php b/kirby/src/Panel/Document.php old mode 100644 new mode 100755 index 2010e94..00fcf58 --- a/kirby/src/Panel/Document.php +++ b/kirby/src/Panel/Document.php @@ -2,8 +2,11 @@ namespace Kirby\Panel; +use Kirby\Cms\App; +use Kirby\Cms\Helpers; use Kirby\Exception\Exception; use Kirby\Exception\InvalidArgumentException; +use Kirby\Filesystem\Asset; use Kirby\Filesystem\Dir; use Kirby\Filesystem\F; use Kirby\Http\Response; @@ -33,7 +36,7 @@ class Document */ public static function assets(): array { - $kirby = kirby(); + $kirby = App::instance(); $nonce = $kirby->nonce(); // get the assets from the Vite dev server in dev mode; @@ -129,15 +132,15 @@ class Document /** * Check for a custom asset file from the * config (e.g. panel.css or panel.js) - * @since 3.6.2 + * @since 3.7.0 * * @param string $option asset option name * @return string|null */ public static function customAsset(string $option): ?string { - if ($path = kirby()->option($option)) { - $asset = asset($path); + if ($path = App::instance()->option($option)) { + $asset = new Asset($path); if ($asset->exists() === true) { return $asset->url() . '?' . $asset->modified(); @@ -149,33 +152,37 @@ class Document /** * @deprecated 3.7.0 Use `Document::customAsset('panel.css)` instead - * @todo add deprecation warning in 3.7.0, remove in 3.8.0 + * @todo remove in 3.8.0 + * @codeCoverageIgnore */ public static function customCss(): ?string { + Helpers::deprecated('Panel\Document::customCss() has been deprecated and will be removed in Kirby 3.8.0. Use Panel\Document::customAsset(\'panel.css\') instead.'); return static::customAsset('panel.css'); } /** * @deprecated 3.7.0 Use `Document::customAsset('panel.js)` instead - * @todo add deprecation warning in 3.7.0, remove in 3.8.0 + * @todo remove in 3.8.0 + * @codeCoverageIgnore */ public static function customJs(): ?string { + Helpers::deprecated('Panel\Document::customJs() has been deprecated and will be removed in Kirby 3.8.0. Use Panel\Document::customAsset(\'panel.js\') instead.'); return static::customAsset('panel.js'); } /** * Returns array of favion icons * based on config option - * @since 3.6.2 + * @since 3.7.0 * * @param string $url URL prefix for default icons * @return array */ public static function favicon(string $url = ''): array { - $kirby = kirby(); + $kirby = App::instance(); $icons = $kirby->option('panel.favicon', [ 'apple-touch-icon' => [ 'type' => 'image/png', @@ -217,7 +224,7 @@ class Document */ public static function icons(): string { - return F::read(kirby()->root('kirby') . '/panel/dist/img/icons.svg'); + return F::read(App::instance()->root('kirby') . '/panel/dist/img/icons.svg'); } /** @@ -229,7 +236,7 @@ class Document */ public static function link(): bool { - $kirby = kirby(); + $kirby = App::instance(); $mediaRoot = $kirby->root('media') . '/panel'; $panelRoot = $kirby->root('panel') . '/dist'; $versionHash = $kirby->versionHash(); @@ -262,14 +269,14 @@ class Document */ public static function response(array $fiber) { - $kirby = kirby(); + $kirby = App::instance(); // Full HTML response // @codeCoverageIgnoreStart try { if (static::link() === true) { usleep(1); - go($kirby->url('index') . '/' . $kirby->path()); + Response::go($kirby->url('index') . '/' . $kirby->path()); } } catch (Throwable $e) { die('The Panel assets cannot be installed properly. ' . $e->getMessage()); diff --git a/kirby/src/Panel/Dropdown.php b/kirby/src/Panel/Dropdown.php old mode 100644 new mode 100755 index 0d92a0c..abb5685 --- a/kirby/src/Panel/Dropdown.php +++ b/kirby/src/Panel/Dropdown.php @@ -2,6 +2,7 @@ namespace Kirby\Panel; +use Kirby\Cms\App; use Kirby\Cms\Find; use Kirby\Exception\LogicException; use Kirby\Http\Uri; @@ -31,9 +32,9 @@ class Dropdown extends Json */ public static function changes(): array { - $kirby = kirby(); + $kirby = App::instance(); $multilang = $kirby->multilang(); - $ids = Str::split(get('ids')); + $ids = Str::split($kirby->request()->get('ids')); $options = []; foreach ($ids as $id) { diff --git a/kirby/src/Panel/Field.php b/kirby/src/Panel/Field.php old mode 100644 new mode 100755 index 6317a45..3b1ab9c --- a/kirby/src/Panel/Field.php +++ b/kirby/src/Panel/Field.php @@ -2,8 +2,10 @@ namespace Kirby\Panel; +use Kirby\Cms\App; use Kirby\Cms\File; use Kirby\Cms\Page; +use Kirby\Toolkit\I18n; /** * Provides common field prop definitions @@ -27,7 +29,7 @@ class Field public static function email(array $props = []): array { return array_merge([ - 'label' => t('email'), + 'label' => I18n::translate('email'), 'type' => 'email', 'counter' => false, ], $props); @@ -68,7 +70,7 @@ class Field ]; return array_merge([ - 'label' => t('file.sort'), + 'label' => I18n::translate('file.sort'), 'type' => 'select', 'empty' => false, 'options' => $options @@ -126,7 +128,7 @@ class Field } return array_merge([ - 'label' => t('page.changeStatus.position'), + 'label' => I18n::translate('page.changeStatus.position'), 'type' => 'select', 'empty' => false, 'options' => $options, @@ -142,7 +144,7 @@ class Field public static function password(array $props = []): array { return array_merge([ - 'label' => t('password'), + 'label' => I18n::translate('password'), 'type' => 'password' ], $props); } @@ -155,7 +157,7 @@ class Field */ public static function role(array $props = []): array { - $kirby = kirby(); + $kirby = App::instance(); $user = $kirby->user(); $isAdmin = $user && $user->isAdmin(); $roles = []; @@ -169,13 +171,13 @@ class Field $roles[] = [ 'text' => $role->title(), - 'info' => $role->description() ?? t('role.description.placeholder'), + 'info' => $role->description() ?? I18n::translate('role.description.placeholder'), 'value' => $role->name() ]; } return array_merge([ - 'label' => t('role'), + 'label' => I18n::translate('role'), 'type' => count($roles) <= 1 ? 'hidden' : 'radio', 'options' => $roles ], $props); @@ -188,7 +190,7 @@ class Field public static function slug(array $props = []): array { return array_merge([ - 'label' => t('slug'), + 'label' => I18n::translate('slug'), 'type' => 'slug', ], $props); } @@ -210,7 +212,7 @@ class Field } return array_merge([ - 'label' => t('template'), + 'label' => I18n::translate('template'), 'type' => 'select', 'empty' => false, 'options' => $options, @@ -226,7 +228,7 @@ class Field public static function title(array $props = []): array { return array_merge([ - 'label' => t('title'), + 'label' => I18n::translate('title'), 'type' => 'text', 'icon' => 'title', ], $props); @@ -241,7 +243,7 @@ class Field public static function translation(array $props = []): array { $translations = []; - foreach (kirby()->translations() as $translation) { + foreach (App::instance()->translations() as $translation) { $translations[] = [ 'text' => $translation->name(), 'value' => $translation->code() @@ -249,7 +251,7 @@ class Field } return array_merge([ - 'label' => t('language'), + 'label' => I18n::translate('language'), 'type' => 'select', 'icon' => 'globe', 'options' => $translations, @@ -265,7 +267,7 @@ class Field { return array_merge([ 'icon' => 'user', - 'label' => t('name'), + 'label' => I18n::translate('name'), 'type' => 'text', ], $props); } diff --git a/kirby/src/Panel/File.php b/kirby/src/Panel/File.php old mode 100644 new mode 100755 index aa25042..eee102d --- a/kirby/src/Panel/File.php +++ b/kirby/src/Panel/File.php @@ -2,6 +2,7 @@ namespace Kirby\Panel; +use Kirby\Toolkit\I18n; use Throwable; /** @@ -104,14 +105,11 @@ class File extends Model */ public function dropdown(array $options = []): array { - $defaults = [ - 'view' => get('view'), - 'update' => get('update'), - 'delete' => get('delete') - ]; + $file = $this->model; + + $defaults = $file->kirby()->request()->get(['view', 'update', 'delete']); + $options = array_merge($defaults, $options); - $options = array_merge($defaults, $options); - $file = $this->model; $permissions = $this->options(['preview']); $view = $options['view'] ?? 'view'; $url = $this->url(true); @@ -122,7 +120,7 @@ class File extends Model 'link' => $file->previewUrl(), 'target' => '_blank', 'icon' => 'open', - 'text' => t('open') + 'text' => I18n::translate('open') ]; $result[] = '-'; } @@ -130,14 +128,14 @@ class File extends Model $result[] = [ 'dialog' => $url . '/changeName', 'icon' => 'title', - 'text' => t('rename'), + 'text' => I18n::translate('rename'), 'disabled' => $this->isDisabledDropdownOption('changeName', $options, $permissions) ]; $result[] = [ 'click' => 'replace', 'icon' => 'upload', - 'text' => t('replace'), + 'text' => I18n::translate('replace'), 'disabled' => $this->isDisabledDropdownOption('replace', $options, $permissions) ]; @@ -146,7 +144,7 @@ class File extends Model $result[] = [ 'dialog' => $url . '/changeSort', 'icon' => 'sort', - 'text' => t('file.sort'), + 'text' => I18n::translate('file.sort'), 'disabled' => $this->isDisabledDropdownOption('update', $options, $permissions) ]; } @@ -155,7 +153,7 @@ class File extends Model $result[] = [ 'dialog' => $url . '/delete', 'icon' => 'trash', - 'text' => t('delete'), + 'text' => I18n::translate('delete'), 'disabled' => $this->isDisabledDropdownOption('delete', $options, $permissions) ]; @@ -190,7 +188,7 @@ class File extends Model 'document' => 'red-400', 'audio' => 'aqua-400', 'code' => 'blue-400', - 'archive' => 'white' + 'archive' => 'gray-500' ]; $extensions = [ @@ -205,7 +203,7 @@ class File extends Model return $extensions[$this->model->extension()] ?? $types[$this->model->type()] ?? - parent::imageDefaults()['icon']; + parent::imageDefaults()['color']; } /** @@ -229,28 +227,28 @@ class File extends Model protected function imageIcon(): string { $types = [ - 'image' => 'file-image', - 'video' => 'file-video', - 'document' => 'file-document', - 'audio' => 'file-audio', - 'code' => 'file-code', - 'archive' => 'file-zip' + 'image' => 'image', + 'video' => 'video', + 'document' => 'document', + 'audio' => 'audio', + 'code' => 'code', + 'archive' => 'archive' ]; $extensions = [ - 'xls' => 'file-spreadsheet', - 'xlsx' => 'file-spreadsheet', - 'csv' => 'file-spreadsheet', - 'docx' => 'file-word', - 'doc' => 'file-word', - 'rtf' => 'file-word', - 'mdown' => 'file-text', - 'md' => 'file-text' + 'xls' => 'table', + 'xlsx' => 'table', + 'csv' => 'table', + 'docx' => 'pen', + 'doc' => 'pen', + 'rtf' => 'pen', + 'mdown' => 'markdown', + 'md' => 'markdown' ]; return $extensions[$this->model->extension()] ?? $types[$this->model->type()] ?? - parent::imageDefaults()['color']; + 'file'; } /** @@ -377,29 +375,29 @@ class File extends Model 'url' => $url = $file->previewUrl(), 'details' => [ [ - 'title' => t('template'), + 'title' => I18n::translate('template'), 'text' => $file->template() ?? '—' ], [ - 'title' => t('mime'), + 'title' => I18n::translate('mime'), 'text' => $file->mime() ], [ - 'title' => t('url'), + 'title' => I18n::translate('url'), 'text' => $id, 'link' => $url ], [ - 'title' => t('size'), + 'title' => I18n::translate('size'), 'text' => $file->niceSize() ], [ - 'title' => t('dimensions'), - 'text' => $file->type() === 'image' ? $file->dimensions() . ' ' . t('pixel') : '—' + 'title' => I18n::translate('dimensions'), + 'text' => $file->type() === 'image' ? $file->dimensions() . ' ' . I18n::translate('pixel') : '—' ], [ - 'title' => t('orientation'), - 'text' => $file->type() === 'image' ? t('orientation.' . $dimensions->orientation()) : '—' + 'title' => I18n::translate('orientation'), + 'text' => $file->type() === 'image' ? I18n::translate('orientation.' . $dimensions->orientation()) : '—' ], ] ] diff --git a/kirby/src/Panel/Home.php b/kirby/src/Panel/Home.php old mode 100644 new mode 100755 index df9d6f6..655893e --- a/kirby/src/Panel/Home.php +++ b/kirby/src/Panel/Home.php @@ -2,9 +2,11 @@ namespace Kirby\Panel; +use Kirby\Cms\App; use Kirby\Cms\User; use Kirby\Exception\InvalidArgumentException; use Kirby\Exception\NotFoundException; +use Kirby\Http\Router; use Kirby\Http\Uri; use Kirby\Toolkit\Str; use Throwable; @@ -46,7 +48,7 @@ class Home // no access to the panel? The only good alternative is the main url if ($permissions->for('access', 'panel') === false) { - return site()->url(); + return App::instance()->site()->url(); } // needed to create a proper menu @@ -104,7 +106,7 @@ class Home // create a dummy router to check if we can access this route at all try { - return router($path, 'GET', $routes, function ($route) use ($user) { + return Router::execute($path, 'GET', $routes, function ($route) use ($user) { $auth = $route->attributes()['auth'] ?? true; $areaId = $route->attributes()['area'] ?? null; $type = $route->attributes()['type'] ?? 'view'; @@ -138,7 +140,8 @@ class Home */ public static function hasValidDomain(Uri $uri): bool { - return $uri->domain() === (new Uri(site()->url()))->domain(); + $rootUrl = App::instance()->site()->url(); + return $uri->domain() === (new Uri($rootUrl))->domain(); } /** @@ -149,7 +152,7 @@ class Home */ public static function isPanelUrl(string $url): bool { - return Str::startsWith($url, kirby()->url('panel')); + return Str::startsWith($url, App::instance()->url('panel')); } /** @@ -161,7 +164,7 @@ class Home */ public static function panelPath(string $url): ?string { - $after = Str::after($url, kirby()->url('panel')); + $after = Str::after($url, App::instance()->url('panel')); return trim($after, '/'); } @@ -176,7 +179,7 @@ class Home public static function remembered(): ?string { // check for a stored path after login - $remembered = kirby()->session()->pull('panel.path'); + $remembered = App::instance()->session()->pull('panel.path'); // convert the result to an absolute URL if available return $remembered ? Panel::url($remembered) : null; @@ -208,7 +211,7 @@ class Home */ public static function url(): string { - $user = kirby()->user(); + $user = App::instance()->user(); // if there's no authenticated user, all internal // redirects will be blocked and the user is redirected diff --git a/kirby/src/Panel/Json.php b/kirby/src/Panel/Json.php old mode 100644 new mode 100755 diff --git a/kirby/src/Panel/Model.php b/kirby/src/Panel/Model.php old mode 100644 new mode 100755 index fd3934a..275a7d0 --- a/kirby/src/Panel/Model.php +++ b/kirby/src/Panel/Model.php @@ -53,7 +53,7 @@ abstract class Model public function dragTextFromCallback(string $type, ...$args): ?string { $option = 'panel.' . $type . '.' . $this->model::CLASS_ALIAS . 'DragText'; - $callback = option($option); + $callback = $this->model->kirby()->option($option); if ( empty($callback) === false && @@ -81,7 +81,8 @@ abstract class Model $type ??= 'auto'; if ($type === 'auto') { - $type = option('panel.kirbytext', true) ? 'kirbytext' : 'markdown'; + $kirby = $this->model->kirby(); + $type = $kirby->option('panel.kirbytext', true) ? 'kirbytext' : 'markdown'; } return $type === 'markdown' ? 'markdown' : 'kirbytext'; @@ -351,8 +352,9 @@ abstract class Model public function props(): array { $blueprint = $this->model->blueprint(); + $request = $this->model->kirby()->request(); $tabs = $blueprint->tabs(); - $tab = $blueprint->tab(get('tab')) ?? $tabs[0] ?? null; + $tab = $blueprint->tab($request->get('tab')) ?? $tabs[0] ?? null; $props = [ 'lock' => $this->lock(), @@ -407,7 +409,7 @@ abstract class Model $data = $model->panel()->toLink($tooltip); - if ($tab = get('tab')) { + if ($tab = $model->kirby()->request()->get('tab')) { $uri = new Uri($data['link'], [ 'query' => ['tab' => $tab] ]); diff --git a/kirby/src/Panel/Page.php b/kirby/src/Panel/Page.php old mode 100644 new mode 100755 index 6f7061b..784187c --- a/kirby/src/Panel/Page.php +++ b/kirby/src/Panel/Page.php @@ -2,6 +2,8 @@ namespace Kirby\Panel; +use Kirby\Toolkit\I18n; + /** * Provides information about the page model for the Panel * @since 3.6.0 @@ -66,14 +68,11 @@ class Page extends Model */ public function dropdown(array $options = []): array { - $defaults = [ - 'view' => get('view'), - 'sort' => get('sort'), - 'delete' => get('delete') - ]; + $page = $this->model; + + $defaults = $page->kirby()->request()->get(['view', 'sort', 'delete']); + $options = array_merge($defaults, $options); - $options = array_merge($defaults, $options); - $page = $this->model; $permissions = $this->options(['preview']); $view = $options['view'] ?? 'view'; $url = $this->url(true); @@ -84,7 +83,7 @@ class Page extends Model 'link' => $page->previewUrl(), 'target' => '_blank', 'icon' => 'open', - 'text' => t('open'), + 'text' => I18n::translate('open'), 'disabled' => $this->isDisabledDropdownOption('preview', $options, $permissions) ]; $result[] = '-'; @@ -98,14 +97,14 @@ class Page extends Model ] ], 'icon' => 'title', - 'text' => t('rename'), + 'text' => I18n::translate('rename'), 'disabled' => $this->isDisabledDropdownOption('changeTitle', $options, $permissions) ]; $result['duplicate'] = [ 'dialog' => $url . '/duplicate', 'icon' => 'copy', - 'text' => t('duplicate'), + 'text' => I18n::translate('duplicate'), 'disabled' => $this->isDisabledDropdownOption('duplicate', $options, $permissions) ]; @@ -119,14 +118,14 @@ class Page extends Model ] ], 'icon' => 'url', - 'text' => t('page.changeSlug'), + 'text' => I18n::translate('page.changeSlug'), 'disabled' => $this->isDisabledDropdownOption('changeSlug', $options, $permissions) ]; $result['changeStatus'] = [ 'dialog' => $url . '/changeStatus', 'icon' => 'preview', - 'text' => t('page.changeStatus'), + 'text' => I18n::translate('page.changeStatus'), 'disabled' => $this->isDisabledDropdownOption('changeStatus', $options, $permissions) ]; @@ -135,14 +134,14 @@ class Page extends Model $result['changeSort'] = [ 'dialog' => $url . '/changeSort', 'icon' => 'sort', - 'text' => t('page.sort'), + 'text' => I18n::translate('page.sort'), 'disabled' => $siblings->count() === 0 || $this->isDisabledDropdownOption('sort', $options, $permissions) ]; $result['changeTemplate'] = [ 'dialog' => $url . '/changeTemplate', 'icon' => 'template', - 'text' => t('page.changeTemplate'), + 'text' => I18n::translate('page.changeTemplate'), 'disabled' => $this->isDisabledDropdownOption('changeTemplate', $options, $permissions) ]; @@ -150,7 +149,7 @@ class Page extends Model $result['delete'] = [ 'dialog' => $url . '/delete', 'icon' => 'trash', - 'text' => t('delete'), + 'text' => I18n::translate('delete'), 'disabled' => $this->isDisabledDropdownOption('delete', $options, $permissions) ]; diff --git a/kirby/src/Panel/Panel.php b/kirby/src/Panel/Panel.php old mode 100644 new mode 100755 index 2a8dfe0..f3b6bba --- a/kirby/src/Panel/Panel.php +++ b/kirby/src/Panel/Panel.php @@ -2,11 +2,14 @@ namespace Kirby\Panel; +use Kirby\Cms\App; +use Kirby\Cms\Url as CmsUrl; use Kirby\Cms\User; use Kirby\Exception\Exception; use Kirby\Exception\NotFoundException; use Kirby\Exception\PermissionException; use Kirby\Http\Response; +use Kirby\Http\Router; use Kirby\Http\Url; use Kirby\Toolkit\Str; use Kirby\Toolkit\Tpl; @@ -55,7 +58,7 @@ class Panel */ public static function areas(): array { - $kirby = kirby(); + $kirby = App::instance(); $system = $kirby->system(); $user = $kirby->user(); $areas = $kirby->load()->areas(); @@ -189,7 +192,7 @@ class Panel */ public static function isFiberRequest(): bool { - $request = kirby()->request(); + $request = App::instance()->request(); if ($request->method() === 'GET') { return (bool)($request->get('_json') ?? $request->header('X-Fiber')); @@ -208,9 +211,11 @@ class Panel */ public static function json(array $data, int $code = 200) { - return Response::json($data, $code, get('_pretty'), [ + $request = App::instance()->request(); + + return Response::json($data, $code, $request->get('_pretty'), [ 'X-Fiber' => 'true', - 'Cache-Control' => 'no-store' + 'Cache-Control' => 'no-store, private' ]); } @@ -222,7 +227,7 @@ class Panel public static function multilang(): bool { // multilang setup check - $kirby = kirby(); + $kirby = App::instance(); return $kirby->option('languages') || $kirby->multilang(); } @@ -233,8 +238,10 @@ class Panel */ public static function referrer(): string { - $referrer = kirby()->request()->header('X-Fiber-Referrer') - ?? get('_referrer') + $request = App::instance()->request(); + + $referrer = $request->header('X-Fiber-Referrer') + ?? $request->get('_referrer') ?? ''; return '/' . trim($referrer, '/'); @@ -285,7 +292,7 @@ class Panel */ public static function router(string $path = null) { - $kirby = kirby(); + $kirby = App::instance(); if ($kirby->option('panel') === false) { return null; @@ -303,7 +310,7 @@ class Panel $routes = static::routes($areas); // create a micro-router for the Panel - return router($path, $method = $kirby->request()->method(), $routes, function ($route) use ($areas, $kirby, $method, $path) { + return Router::execute($path, $method = $kirby->request()->method(), $routes, function ($route) use ($areas, $kirby, $method, $path) { // route needs authentication? $auth = $route->attributes()['auth'] ?? true; @@ -345,7 +352,7 @@ class Panel */ public static function routes(array $areas): array { - $kirby = kirby(); + $kirby = App::instance(); // the browser incompatibility // warning is always needed @@ -492,7 +499,9 @@ class Panel 'type' => 'search', 'area' => $areaId, 'action' => function () use ($params) { - return $params['query'](get('query')); + $request = App::instance()->request(); + + return $params['query']($request->get('query')); } ]; } @@ -530,7 +539,7 @@ class Panel */ public static function setLanguage(): ?string { - $kirby = kirby(); + $kirby = App::instance(); // language switcher if (static::multilang()) { @@ -542,7 +551,7 @@ class Panel $session = $kirby->session(); $sessionLanguage = $session->get('panel.language', $fallback); - $language = get('language') ?? $sessionLanguage; + $language = $kirby->request()->get('language') ?? $sessionLanguage; // keep the language for the next visit if ($language !== $sessionLanguage) { @@ -566,7 +575,7 @@ class Panel */ public static function setTranslation(): string { - $kirby = kirby(); + $kirby = App::instance(); if ($user = $kirby->user()) { // use the user language for the default translation @@ -590,7 +599,7 @@ class Panel */ public static function url(?string $url = null): string { - $slug = kirby()->option('panel.slug', 'panel'); + $slug = App::instance()->option('panel.slug', 'panel'); // only touch relative paths if (Url::isAbsolute($url) === false) { @@ -603,7 +612,7 @@ class Panel } // create an absolute URL - $url = url($path); + $url = CmsUrl::to($path); } return $url; diff --git a/kirby/src/Panel/Plugins.php b/kirby/src/Panel/Plugins.php old mode 100644 new mode 100755 diff --git a/kirby/src/Panel/Redirect.php b/kirby/src/Panel/Redirect.php old mode 100644 new mode 100755 diff --git a/kirby/src/Panel/Search.php b/kirby/src/Panel/Search.php old mode 100644 new mode 100755 diff --git a/kirby/src/Panel/Site.php b/kirby/src/Panel/Site.php old mode 100644 new mode 100755 diff --git a/kirby/src/Panel/User.php b/kirby/src/Panel/User.php old mode 100644 new mode 100755 index 959884a..e839675 --- a/kirby/src/Panel/User.php +++ b/kirby/src/Panel/User.php @@ -2,6 +2,9 @@ namespace Kirby\Panel; +use Kirby\Cms\Url; +use Kirby\Toolkit\I18n; + /** * Provides information about the user model for the Panel * @since 3.6.0 @@ -51,7 +54,7 @@ class User extends Model $result[] = [ 'dialog' => $url . '/changeName', 'icon' => 'title', - 'text' => t($i18nPrefix . '.changeName'), + 'text' => I18n::translate($i18nPrefix . '.changeName'), 'disabled' => $this->isDisabledDropdownOption('changeName', $options, $permissions) ]; @@ -60,28 +63,28 @@ class User extends Model $result[] = [ 'dialog' => $url . '/changeEmail', 'icon' => 'email', - 'text' => t('user.changeEmail'), + 'text' => I18n::translate('user.changeEmail'), 'disabled' => $this->isDisabledDropdownOption('changeEmail', $options, $permissions) ]; $result[] = [ 'dialog' => $url . '/changeRole', 'icon' => 'bolt', - 'text' => t('user.changeRole'), + 'text' => I18n::translate('user.changeRole'), 'disabled' => $this->isDisabledDropdownOption('changeRole', $options, $permissions) ]; $result[] = [ 'dialog' => $url . '/changePassword', 'icon' => 'key', - 'text' => t('user.changePassword'), + 'text' => I18n::translate('user.changePassword'), 'disabled' => $this->isDisabledDropdownOption('changePassword', $options, $permissions) ]; $result[] = [ 'dialog' => $url . '/changeLanguage', 'icon' => 'globe', - 'text' => t('user.changeLanguage'), + 'text' => I18n::translate('user.changeLanguage'), 'disabled' => $this->isDisabledDropdownOption('changeLanguage', $options, $permissions) ]; @@ -90,7 +93,7 @@ class User extends Model $result[] = [ 'dialog' => $url . '/delete', 'icon' => 'trash', - 'text' => t($i18nPrefix . '.delete'), + 'text' => I18n::translate($i18nPrefix . '.delete'), 'disabled' => $this->isDisabledDropdownOption('delete', $options, $permissions) ]; @@ -119,7 +122,7 @@ class User extends Model { if ($home = ($this->model->blueprint()->home() ?? null)) { $url = $this->model->toString($home); - return url($url); + return Url::to($url); } return Panel::url('site'); diff --git a/kirby/src/Panel/View.php b/kirby/src/Panel/View.php old mode 100644 new mode 100755 index 87ae814..da5fa1f --- a/kirby/src/Panel/View.php +++ b/kirby/src/Panel/View.php @@ -2,9 +2,10 @@ namespace Kirby\Panel; +use Kirby\Cms\App; use Kirby\Http\Response; -use Kirby\Http\Url; use Kirby\Toolkit\A; +use Kirby\Toolkit\I18n; use Kirby\Toolkit\Str; /** @@ -32,14 +33,14 @@ class View */ public static function apply(array $data): array { - $request = kirby()->request(); - $only = $request->header('X-Fiber-Only') ?? get('_only'); + $request = App::instance()->request(); + $only = $request->header('X-Fiber-Only') ?? $request->get('_only'); if (empty($only) === false) { return static::applyOnly($data, $only); } - $globals = $request->header('X-Fiber-Globals') ?? get('_globals'); + $globals = $request->header('X-Fiber-Globals') ?? $request->get('_globals'); if (empty($globals) === false) { return static::applyGlobals($data, $globals); @@ -139,7 +140,7 @@ class View */ public static function data(array $view = [], array $options = []): array { - $kirby = kirby(); + $kirby = App::instance(); // multilang setup check $multilang = Panel::multilang(); @@ -196,7 +197,7 @@ class View '$license' => (bool)$kirby->system()->license(), '$multilang' => $multilang, '$searches' => static::searches($options['areas'] ?? [], $permissions), - '$url' => Url::current(), + '$url' => $kirby->request()->url()->toString(), '$user' => function () use ($user) { if ($user) { return [ @@ -251,7 +252,7 @@ class View 'error' => $message, 'props' => [ 'error' => $message, - 'layout' => Panel::hasAccess(kirby()->user()) ? 'inside' : 'outside' + 'layout' => Panel::hasAccess(App::instance()->user()) ? 'inside' : 'outside' ], 'title' => 'Error' ]; @@ -269,7 +270,7 @@ class View */ public static function globals(): array { - $kirby = kirby(); + $kirby = App::instance(); return [ '$config' => function () use ($kirby) { @@ -372,7 +373,7 @@ class View 'id' => 'account', 'link' => 'account', 'disabled' => ($permissions['access']['account'] ?? false) === false, - 'text' => t('view.account'), + 'text' => I18n::translate('view.account'), ]; $menu[] = '-'; @@ -381,7 +382,7 @@ class View 'icon' => 'logout', 'id' => 'logout', 'link' => 'logout', - 'text' => t('logout') + 'text' => I18n::translate('logout') ]; return $menu; } diff --git a/kirby/src/Parsley/Element.php b/kirby/src/Parsley/Element.php old mode 100644 new mode 100755 diff --git a/kirby/src/Parsley/Inline.php b/kirby/src/Parsley/Inline.php old mode 100644 new mode 100755 index eea71f1..3c58d14 --- a/kirby/src/Parsley/Inline.php +++ b/kirby/src/Parsley/Inline.php @@ -149,7 +149,7 @@ class Inline // close self-closing elements if (Html::isVoid($node->tagName) === true) { - return '<' . $node->tagName . attr($attrs, ' ') . ' />'; + return '<' . $node->tagName . Html::attr($attrs, null, ' ') . ' />'; } $innerHtml = static::parseInnerHtml($node, $marks); @@ -160,7 +160,7 @@ class Inline } // create the outer html for the element - return '<' . $node->tagName . attr($attrs, ' ') . '>' . $innerHtml . 'tagName . '>'; + return '<' . $node->tagName . Html::attr($attrs, null, ' ') . '>' . $innerHtml . 'tagName . '>'; } /** diff --git a/kirby/src/Parsley/Parsley.php b/kirby/src/Parsley/Parsley.php old mode 100644 new mode 100755 diff --git a/kirby/src/Parsley/Schema.php b/kirby/src/Parsley/Schema.php old mode 100644 new mode 100755 diff --git a/kirby/src/Parsley/Schema/Blocks.php b/kirby/src/Parsley/Schema/Blocks.php old mode 100644 new mode 100755 diff --git a/kirby/src/Parsley/Schema/Plain.php b/kirby/src/Parsley/Schema/Plain.php old mode 100644 new mode 100755 diff --git a/kirby/src/Sane/DomHandler.php b/kirby/src/Sane/DomHandler.php old mode 100644 new mode 100755 diff --git a/kirby/src/Sane/Handler.php b/kirby/src/Sane/Handler.php old mode 100644 new mode 100755 diff --git a/kirby/src/Sane/Html.php b/kirby/src/Sane/Html.php old mode 100644 new mode 100755 diff --git a/kirby/src/Sane/Sane.php b/kirby/src/Sane/Sane.php old mode 100644 new mode 100755 diff --git a/kirby/src/Sane/Svg.php b/kirby/src/Sane/Svg.php old mode 100644 new mode 100755 diff --git a/kirby/src/Sane/Svgz.php b/kirby/src/Sane/Svgz.php old mode 100644 new mode 100755 diff --git a/kirby/src/Sane/Xml.php b/kirby/src/Sane/Xml.php old mode 100644 new mode 100755 diff --git a/kirby/src/Session/AutoSession.php b/kirby/src/Session/AutoSession.php old mode 100644 new mode 100755 diff --git a/kirby/src/Session/FileSessionStore.php b/kirby/src/Session/FileSessionStore.php old mode 100644 new mode 100755 diff --git a/kirby/src/Session/Session.php b/kirby/src/Session/Session.php old mode 100644 new mode 100755 diff --git a/kirby/src/Session/SessionData.php b/kirby/src/Session/SessionData.php old mode 100644 new mode 100755 diff --git a/kirby/src/Session/SessionStore.php b/kirby/src/Session/SessionStore.php old mode 100644 new mode 100755 diff --git a/kirby/src/Session/Sessions.php b/kirby/src/Session/Sessions.php old mode 100644 new mode 100755 diff --git a/kirby/src/Text/KirbyTag.php b/kirby/src/Text/KirbyTag.php old mode 100644 new mode 100755 diff --git a/kirby/src/Text/KirbyTags.php b/kirby/src/Text/KirbyTags.php old mode 100644 new mode 100755 diff --git a/kirby/src/Text/Markdown.php b/kirby/src/Text/Markdown.php old mode 100644 new mode 100755 diff --git a/kirby/src/Text/SmartyPants.php b/kirby/src/Text/SmartyPants.php old mode 100644 new mode 100755 diff --git a/kirby/src/Toolkit/A.php b/kirby/src/Toolkit/A.php old mode 100644 new mode 100755 diff --git a/kirby/src/Toolkit/Collection.php b/kirby/src/Toolkit/Collection.php old mode 100644 new mode 100755 diff --git a/kirby/src/Toolkit/Component.php b/kirby/src/Toolkit/Component.php old mode 100644 new mode 100755 diff --git a/kirby/src/Toolkit/Config.php b/kirby/src/Toolkit/Config.php old mode 100644 new mode 100755 diff --git a/kirby/src/Toolkit/Controller.php b/kirby/src/Toolkit/Controller.php old mode 100644 new mode 100755 diff --git a/kirby/src/Toolkit/Date.php b/kirby/src/Toolkit/Date.php old mode 100644 new mode 100755 index 0305a46..eb07b68 --- a/kirby/src/Toolkit/Date.php +++ b/kirby/src/Toolkit/Date.php @@ -359,6 +359,32 @@ class Date extends DateTime return $this; } + /** + * Rounds the minutes of the given date + * by the defined step + * @since 3.7.0 + * + * @param string|null $date + * @param int|array|null $step array of `unit` and `size` to round to nearest + * @return int|null + */ + public static function roundedTimestamp(?string $date = null, $step = null): ?int + { + if ($date = static::optional($date)) { + if ($step !== null) { + $step = static::stepConfig($step, [ + 'unit' => 'minute', + 'size' => 1 + ]); + $date->round($step['unit'], $step['size']); + } + + return $date->timestamp(); + } + + return null; + } + /** * Gets or sets the second value * diff --git a/kirby/src/Toolkit/Dom.php b/kirby/src/Toolkit/Dom.php old mode 100644 new mode 100755 diff --git a/kirby/src/Toolkit/Escape.php b/kirby/src/Toolkit/Escape.php old mode 100644 new mode 100755 diff --git a/kirby/src/Toolkit/Facade.php b/kirby/src/Toolkit/Facade.php old mode 100644 new mode 100755 diff --git a/kirby/src/Toolkit/Html.php b/kirby/src/Toolkit/Html.php old mode 100644 new mode 100755 index 383855d..057d0f6 --- a/kirby/src/Toolkit/Html.php +++ b/kirby/src/Toolkit/Html.php @@ -133,9 +133,11 @@ class Html extends Xml * Key-value array: A list of attributes will be generated. Don't pass a second argument in that case. * @param mixed $value If used with a `$name` string, pass the value of the attribute here. * If used with a `$name` array, this can be set to `false` to disable attribute sorting. + * @param string|null $before An optional string that will be prepended if the result is not empty + * @param string|null $after An optional string that will be appended if the result is not empty * @return string|null The generated HTML attributes string */ - public static function attr($name, $value = null): ?string + public static function attr($name, $value = null, ?string $before = null, ?string $after = null): ?string { // HTML supports boolean attributes without values if (is_array($name) === false && is_bool($value) === true) { @@ -153,7 +155,13 @@ class Html extends Xml $entities = parent::entities(); $html = array_keys($entities); $xml = array_values($entities); - return str_replace($xml, $html, $attr); + $attr = str_replace($xml, $html, $attr); + + if ($attr) { + return $before . $attr . $after; + } + + return null; } /** diff --git a/kirby/src/Toolkit/I18n.php b/kirby/src/Toolkit/I18n.php old mode 100644 new mode 100755 index c52e50d..381c2b5 --- a/kirby/src/Toolkit/I18n.php +++ b/kirby/src/Toolkit/I18n.php @@ -52,22 +52,6 @@ class I18n */ protected static $decimalsFormatters = []; - /** - * Returns the first fallback locale - * - * @deprecated 3.5.1 Use `\Kirby\Toolkit\I18n::fallbacks()` instead - * @todo Remove in 3.7.0 - * - * @return string - */ - public static function fallback(): string - { - // @codeCoverageIgnoreStart - deprecated('I18n::fallback() has been deprecated. Use I18n::fallbacks() instead.'); - return static::fallbacks()[0]; - // @codeCoverageIgnoreEnd - } - /** * Returns the list of fallback locales * diff --git a/kirby/src/Toolkit/Iterator.php b/kirby/src/Toolkit/Iterator.php old mode 100644 new mode 100755 diff --git a/kirby/src/Toolkit/Locale.php b/kirby/src/Toolkit/Locale.php old mode 100644 new mode 100755 diff --git a/kirby/src/Toolkit/Obj.php b/kirby/src/Toolkit/Obj.php old mode 100644 new mode 100755 diff --git a/kirby/src/Toolkit/Pagination.php b/kirby/src/Toolkit/Pagination.php old mode 100644 new mode 100755 diff --git a/kirby/src/Toolkit/Properties.php b/kirby/src/Toolkit/Properties.php old mode 100644 new mode 100755 diff --git a/kirby/src/Toolkit/Query.php b/kirby/src/Toolkit/Query.php old mode 100644 new mode 100755 diff --git a/kirby/src/Toolkit/Silo.php b/kirby/src/Toolkit/Silo.php old mode 100644 new mode 100755 diff --git a/kirby/src/Toolkit/Str.php b/kirby/src/Toolkit/Str.php old mode 100644 new mode 100755 index 6f573fb..9082a4f --- a/kirby/src/Toolkit/Str.php +++ b/kirby/src/Toolkit/Str.php @@ -5,6 +5,7 @@ namespace Kirby\Toolkit; use DateTime; use Exception; use IntlDateFormatter; +use Kirby\Cms\Helpers; use Kirby\Exception\InvalidArgumentException; /** @@ -170,7 +171,7 @@ class Str } /** - * Returns the rest of the string after the given character + * Returns the rest of the string after the given substring or character * * @param string $string * @param string $needle @@ -188,6 +189,28 @@ class Str return static::substr($string, $position + static::length($needle)); } + /** + * Removes the given substring or character only from the start of the string + * @since 3.7.0 + * + * @param string $string + * @param string $needle + * @param bool $caseInsensitive + * @return string + */ + public static function afterStart(string $string, string $needle, bool $caseInsensitive = false): string + { + if ($needle === '') { + return $string; + } + + if (static::startsWith($string, $needle, $caseInsensitive) === true) { + return static::substr($string, static::length($needle)); + } + + return $string; + } + /** * Convert a string to 7-bit ASCII. * @@ -212,7 +235,7 @@ class Str } /** - * Returns the beginning of a string before the given character + * Returns the beginning of a string before the given substring or character * * @param string $string * @param string $needle @@ -230,6 +253,28 @@ class Str return static::substr($string, 0, $position); } + /** + * Removes the given substring or character only from the end of the string + * @since 3.7.0 + * + * @param string $string + * @param string $needle + * @param bool $caseInsensitive + * @return string + */ + public static function beforeEnd(string $string, string $needle, bool $caseInsensitive = false): string + { + if ($needle === '') { + return $string; + } + + if (static::endsWith($string, $needle, $caseInsensitive) === true) { + return static::substr($string, 0, -static::length($needle)); + } + + return $string; + } + /** * Returns everything between two strings from the first occurrence of a given string * @@ -243,6 +288,17 @@ class Str return static::before(static::after($string, $start), $end); } + /** + * Converts a string to camel case + * + * @param string $value The string to convert + * @return string + */ + public static function camel(string $value = null): string + { + return lcfirst(static::studly($value)); + } + /** * Checks if a str contains another string * @@ -366,7 +422,7 @@ class Str * @param bool $caseInsensitive * @return bool */ - public static function endsWith(string $string, string $needle, bool $caseInsensitive = false): bool + public static function endsWith(string $string = null, string $needle, bool $caseInsensitive = false): bool { if ($needle === '') { return true; @@ -382,6 +438,23 @@ class Str return $needle === $probe; } + /** + * Escape string for context specific output + * @since 3.7.0 + * + * @param string $string Untrusted data + * @param string $context Location of output (`html`, `attr`, `js`, `css`, `url` or `xml`) + * @return string Escaped data + */ + public static function esc(string $string, string $context = 'html'): string + { + if (method_exists('Kirby\Toolkit\Escape', $context) === true) { + return Escape::$context($string); + } + + return $string; + } + /** * Creates an excerpt of a string * It removes all html tags first and then cuts the string @@ -457,18 +530,40 @@ class Str return static::substr($string, $position); } + /** + * Adds `-1` to a string or increments the ending number to allow `-2`, `-3`, etc. + * @since 3.7.0 + * + * @param string $string The string to increment + * @param string $separator + * @param int $first Starting number + * @return string + */ + public static function increment(string $string, string $separator = '-', int $first = 1): string + { + preg_match('/(.+)' . preg_quote($separator, '/') . '([0-9]+)$/', $string, $matches); + + if (isset($matches[2]) === true) { + // increment the existing ending number + return $matches[1] . $separator . ((int)$matches[2] + 1); + } + + // append a new ending number + return $string . $separator . $first; + } + /** * Checks if the given string is a URL * * @param string|null $string * @return bool * @deprecated 3.6.0 use `Kirby\Toolkit\V::url()` instead - * @todo Throw deprecation warning in 3.7.0 * @todo Remove in 3.8.0 * @codeCoverageIgnore */ public static function isURL(?string $string = null): bool { + Helpers::deprecated('Toolkit\Str::isUrl() has been deprecated and will be removed in Kirby 3.8.0. Use Toolkit\V::url() instead.'); return filter_var($string, FILTER_VALIDATE_URL) !== false; } @@ -1050,6 +1145,18 @@ class Str return static::position($string, $needle, $caseInsensitive) === 0; } + /** + * Converts a string to studly caps case + * @since 3.7.0 + * + * @param string $value The string to convert + * @return string + */ + public static function studly(string $value = null): string + { + return str_replace(' ', '', ucwords(str_replace(['-', '_'], ' ', $value))); + } + /** * A UTF-8 safe version of substr() * @@ -1077,36 +1184,19 @@ class Str * @param array $data Associative array with placeholders as * keys and replacements as values. * Supports query syntax. - * @param string|array|null $fallback An options array that contains: - * - fallback: if a token does not have any matches - * - callback: to be able to handle each matching result - * - start: start placeholder - * - end: end placeholder - * A simple fallback string is supported for compatibility (but deprecated). - * @param string $start Placeholder start characters (deprecated) - * @param string $end Placeholder end characters (deprecated) - * - * @todo Remove `$start` and `$end` parameters, rename `$fallback` to `$options` and only support `array` type for `$options` in 3.7.0 - * + * @param array $options An options array that contains: + * - fallback: if a token does not have any matches + * - callback: to be able to handle each matching result + * - start: start placeholder + * - end: end placeholder * @return string The filled-in string */ - public static function template(string $string = null, array $data = [], $fallback = null, string $start = '{{', string $end = '}}'): string + public static function template(string $string = null, array $data = [], array $options = []): string { - // @codeCoverageIgnoreStart - if ( - is_string($fallback) === true || - $start !== '{{' || - $end !== '}}' - ) { - deprecated('Str::template(): The $fallback, $start and $end parameters have been deprecated. Please pass an array to the $options parameter instead with `fallback`, `start` or `end` keys: Str::template($string, $data, $options)'); - } - // @codeCoverageIgnoreEnd - - $options = $fallback; - $fallback = is_string($options) === true ? $options : ($options['fallback'] ?? null); + $fallback = $options['fallback'] ?? null; $callback = is_a(($options['callback'] ?? null), 'Closure') === true ? $options['callback'] : null; - $start = (string)($options['start'] ?? $start); - $end = (string)($options['end'] ?? $end); + $start = (string)($options['start'] ?? '{{'); + $end = (string)($options['end'] ?? '}}'); // make sure $string is string $string ??= ''; @@ -1144,15 +1234,11 @@ class Str * Converts a filesize string with shortcuts * like M, G or K to an integer value * - * @param mixed $size + * @param string $size * @return int */ - public static function toBytes($size): int + public static function toBytes(string $size): int { - // TODO: remove in 3.7.0 - // in favor of strict parameter type hint - $size ??= ''; - $size = trim($size); $last = strtolower($size[strlen($size)-1] ?? ''); $size = (int)$size; @@ -1283,6 +1369,36 @@ class Str return mb_strtoupper($string ?? '', 'UTF-8'); } + /** + * Creates a compliant v4 UUID + * Taken from: https://github.com/symfony/polyfill + * @since 3.7.0 + * + * @return string + */ + public static function uuid(): string + { + $uuid = bin2hex(random_bytes(16)); + + return sprintf( + '%08s-%04s-4%03s-%04x-%012s', + // 32 bits for "time_low" + substr($uuid, 0, 8), + // 16 bits for "time_mid" + substr($uuid, 8, 4), + // 16 bits for "time_hi_and_version", + // four most significant bits holds version number 4 + substr($uuid, 13, 3), + // 16 bits: + // * 8 bits for "clk_seq_hi_res", + // * 8 bits for "clk_seq_low", + // two most significant bits holds zero and one for variant DCE1.1 + hexdec(substr($uuid, 16, 4)) & 0x3fff | 0x8000, + // 48 bits for "node" + substr($uuid, 20, 12) + ); + } + /** * The widont function makes sure that there are no * typographical widows at the end of a paragraph – @@ -1309,4 +1425,18 @@ class Str return ' ' . $matches[2]; }, $string); } + + /** + * Wraps the string with the given string(s) + * @since 3.7.0 + * + * @param string $string String to wrap + * @param string $before String to prepend + * @param string|null $after String to append (if different from `$before`) + * @return string + */ + public static function wrap(string $string, string $before, string $after = null): string + { + return $before . $string . ($after ?? $before); + } } diff --git a/kirby/src/Toolkit/Tpl.php b/kirby/src/Toolkit/Tpl.php old mode 100644 new mode 100755 diff --git a/kirby/src/Toolkit/V.php b/kirby/src/Toolkit/V.php old mode 100644 new mode 100755 index df7fa9f..a4506e1 --- a/kirby/src/Toolkit/V.php +++ b/kirby/src/Toolkit/V.php @@ -43,6 +43,75 @@ class V return $errors === true ? [] : $errors; } + /** + * Runs a number of validators on a set of data and + * checks if the data is invalid + * @since 3.7.0 + * + * @param array $data + * @param array $rules + * @param array $messages + * @return array + */ + public static function invalid(array $data = [], array $rules = [], array $messages = []): array + { + $errors = []; + + foreach ($rules as $field => $validations) { + $validationIndex = -1; + + // See: http://php.net/manual/en/types.comparisons.php + // only false for: null, undefined variable, '', [] + $value = $data[$field] ?? null; + $filled = $value !== null && $value !== '' && $value !== []; + $message = $messages[$field] ?? $field; + + // True if there is an error message for each validation method. + $messageArray = is_array($message); + + foreach ($validations as $method => $options) { + // If the index is numeric, there is no option + // and `$value` is sent directly as a `$options` parameter + if (is_numeric($method) === true) { + $method = $options; + $options = [$value]; + } else { + if (is_array($options) === false) { + $options = [$options]; + } + + array_unshift($options, $value); + } + + $validationIndex++; + + if ($method === 'required') { + if ($filled) { + // Field is required and filled. + continue; + } + } elseif ($filled) { + if (V::$method(...$options) === true) { + // Field is filled and passes validation method. + continue; + } + } else { + // If a field is not required and not filled, no validation should be done. + continue; + } + + // If no continue was called we have a failed validation. + if ($messageArray) { + $errors[$field][] = $message[$validationIndex] ?? $field; + } else { + $errors[$field] = $message; + } + } + } + + return $errors; + } + /** * Creates a useful error message for the given validator * and the arguments. This is used mainly internally @@ -321,6 +390,23 @@ V::$validators = [ return true; }, + /** + * Checks for empty values + */ + 'empty' => function ($value = null): bool { + $empty = ['', null, []]; + + if (in_array($value, $empty, true) === true) { + return true; + } + + if (is_countable($value) === true) { + return count($value) === 0; + } + + return false; + }, + /** * Checks if the given string ends with the given value */ @@ -360,6 +446,19 @@ V::$validators = [ return filter_var($value, FILTER_VALIDATE_IP) !== false; }, + /** + * Checks for valid json + */ + 'json' => function ($value): bool { + if (!is_string($value) || $value === '') { + return false; + } + + json_decode($value); + + return json_last_error() === JSON_ERROR_NONE; + }, + /** * Checks if the value is lower than the second value */ @@ -430,6 +529,13 @@ V::$validators = [ return V::contains($value, $needle) === false; }, + /** + * Checks that the given value is not empty + */ + 'notEmpty' => function ($value): bool { + return V::empty($value) === false; + }, + /** * Checks that the given value is not in the given list of values */ @@ -445,11 +551,16 @@ V::$validators = [ }, /** - * Checks if the value is present in the given array + * Checks if the value is present */ - 'required' => function ($key, array $array): bool { - return isset($array[$key]) === true && - V::notIn($array[$key], [null, '', []]) === true; + 'required' => function ($value, $array = null): bool { + // with reference array + if (is_array($array) === true) { + return isset($array[$value]) === true && V::notEmpty($array[$value]) === true; + } + + // without reference array + return V::notEmpty($value); }, /** diff --git a/kirby/src/Toolkit/View.php b/kirby/src/Toolkit/View.php old mode 100644 new mode 100755 diff --git a/kirby/src/Toolkit/Xml.php b/kirby/src/Toolkit/Xml.php old mode 100644 new mode 100755 index 9dc60c0..0ee8ee0 --- a/kirby/src/Toolkit/Xml.php +++ b/kirby/src/Toolkit/Xml.php @@ -421,8 +421,7 @@ class Xml return $value; } - // TODO: in 3.7.0 use ENT_NOQUOTES | ENT_XML1 instead - $encoded = htmlentities($value, ENT_COMPAT); + $encoded = htmlentities($value, ENT_NOQUOTES | ENT_XML1); if ($encoded === $value) { // no CDATA block needed return $value; diff --git a/kirby/vendor/autoload.php b/kirby/vendor/autoload.php old mode 100644 new mode 100755 index 9c925f4..3180c98 --- a/kirby/vendor/autoload.php +++ b/kirby/vendor/autoload.php @@ -2,6 +2,11 @@ // autoload.php @generated by Composer +if (PHP_VERSION_ID < 50600) { + echo 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL; + exit(1); +} + require_once __DIR__ . '/composer/autoload_real.php'; return ComposerAutoloaderInita8011b477bb239488e5d139cdeb7b31e::getLoader(); diff --git a/kirby/vendor/claviska/simpleimage/LICENSE.md b/kirby/vendor/claviska/simpleimage/LICENSE.md old mode 100644 new mode 100755 diff --git a/kirby/vendor/claviska/simpleimage/composer.json b/kirby/vendor/claviska/simpleimage/composer.json old mode 100644 new mode 100755 diff --git a/kirby/vendor/claviska/simpleimage/src/claviska/SimpleImage.php b/kirby/vendor/claviska/simpleimage/src/claviska/SimpleImage.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/composer/ClassLoader.php b/kirby/vendor/composer/ClassLoader.php old mode 100644 new mode 100755 index 0cd6055..afef3fa --- a/kirby/vendor/composer/ClassLoader.php +++ b/kirby/vendor/composer/ClassLoader.php @@ -149,7 +149,7 @@ class ClassLoader /** * @return string[] Array of classname => path - * @psalm-var array + * @psalm-return array */ public function getClassMap() { diff --git a/kirby/vendor/composer/InstalledVersions.php b/kirby/vendor/composer/InstalledVersions.php old mode 100644 new mode 100755 index d50e0c9..c6b54af --- a/kirby/vendor/composer/InstalledVersions.php +++ b/kirby/vendor/composer/InstalledVersions.php @@ -21,12 +21,14 @@ use Composer\Semver\VersionParser; * See also https://getcomposer.org/doc/07-runtime.md#installed-versions * * To require its presence, you can require `composer-runtime-api ^2.0` + * + * @final */ class InstalledVersions { /** * @var mixed[]|null - * @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array}|array{}|null + * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array}|array{}|null */ private static $installed; @@ -37,7 +39,7 @@ class InstalledVersions /** * @var array[] - * @psalm-var array}> + * @psalm-var array}> */ private static $installedByVendor = array(); @@ -241,7 +243,7 @@ class InstalledVersions /** * @return array - * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string} + * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool} */ public static function getRootPackage() { @@ -255,7 +257,7 @@ class InstalledVersions * * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. * @return array[] - * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array} + * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} */ public static function getRawData() { @@ -278,7 +280,7 @@ class InstalledVersions * Returns the raw data of all installed.php which are currently loaded for custom implementations * * @return array[] - * @psalm-return list}> + * @psalm-return list}> */ public static function getAllRawData() { @@ -301,7 +303,7 @@ class InstalledVersions * @param array[] $data A vendor/composer/installed.php data set * @return void * - * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array} $data + * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $data */ public static function reload($data) { @@ -311,7 +313,7 @@ class InstalledVersions /** * @return array[] - * @psalm-return list}> + * @psalm-return list}> */ private static function getInstalled() { diff --git a/kirby/vendor/composer/LICENSE b/kirby/vendor/composer/LICENSE old mode 100644 new mode 100755 diff --git a/kirby/vendor/composer/autoload_classmap.php b/kirby/vendor/composer/autoload_classmap.php old mode 100644 new mode 100755 index c8527f7..d256b64 --- a/kirby/vendor/composer/autoload_classmap.php +++ b/kirby/vendor/composer/autoload_classmap.php @@ -2,7 +2,7 @@ // autoload_classmap.php @generated by Composer -$vendorDir = dirname(dirname(__FILE__)); +$vendorDir = dirname(__DIR__); $baseDir = dirname($vendorDir); return array( @@ -29,7 +29,6 @@ return array( 'Kirby\\Cms\\Auth\\EmailChallenge' => $baseDir . '/src/Cms/Auth/EmailChallenge.php', 'Kirby\\Cms\\Auth\\Status' => $baseDir . '/src/Cms/Auth/Status.php', 'Kirby\\Cms\\Block' => $baseDir . '/src/Cms/Block.php', - 'Kirby\\Cms\\BlockConverter' => $baseDir . '/src/Cms/BlockConverter.php', 'Kirby\\Cms\\Blocks' => $baseDir . '/src/Cms/Blocks.php', 'Kirby\\Cms\\Blueprint' => $baseDir . '/src/Cms/Blueprint.php', 'Kirby\\Cms\\Collection' => $baseDir . '/src/Cms/Collection.php', @@ -40,7 +39,6 @@ return array( 'Kirby\\Cms\\ContentTranslation' => $baseDir . '/src/Cms/ContentTranslation.php', 'Kirby\\Cms\\Core' => $baseDir . '/src/Cms/Core.php', 'Kirby\\Cms\\Email' => $baseDir . '/src/Cms/Email.php', - 'Kirby\\Cms\\Environment' => $baseDir . '/src/Cms/Environment.php', 'Kirby\\Cms\\Event' => $baseDir . '/src/Cms/Event.php', 'Kirby\\Cms\\Field' => $baseDir . '/src/Cms/Field.php', 'Kirby\\Cms\\Fieldset' => $baseDir . '/src/Cms/Fieldset.php', @@ -59,6 +57,7 @@ return array( 'Kirby\\Cms\\HasFiles' => $baseDir . '/src/Cms/HasFiles.php', 'Kirby\\Cms\\HasMethods' => $baseDir . '/src/Cms/HasMethods.php', 'Kirby\\Cms\\HasSiblings' => $baseDir . '/src/Cms/HasSiblings.php', + 'Kirby\\Cms\\Helpers' => $baseDir . '/src/Cms/Helpers.php', 'Kirby\\Cms\\Html' => $baseDir . '/src/Cms/Html.php', 'Kirby\\Cms\\Ingredients' => $baseDir . '/src/Cms/Ingredients.php', 'Kirby\\Cms\\Item' => $baseDir . '/src/Cms/Item.php', @@ -166,6 +165,7 @@ return array( 'Kirby\\Form\\OptionsQuery' => $baseDir . '/src/Form/OptionsQuery.php', 'Kirby\\Form\\Validations' => $baseDir . '/src/Form/Validations.php', 'Kirby\\Http\\Cookie' => $baseDir . '/src/Http/Cookie.php', + 'Kirby\\Http\\Environment' => $baseDir . '/src/Http/Environment.php', 'Kirby\\Http\\Exceptions\\NextRouteException' => $baseDir . '/src/Http/Exceptions/NextRouteException.php', 'Kirby\\Http\\Header' => $baseDir . '/src/Http/Header.php', 'Kirby\\Http\\Idn' => $baseDir . '/src/Http/Idn.php', @@ -174,8 +174,10 @@ return array( 'Kirby\\Http\\Query' => $baseDir . '/src/Http/Query.php', 'Kirby\\Http\\Remote' => $baseDir . '/src/Http/Remote.php', 'Kirby\\Http\\Request' => $baseDir . '/src/Http/Request.php', + 'Kirby\\Http\\Request\\Auth' => $baseDir . '/src/Http/Request/Auth.php', 'Kirby\\Http\\Request\\Auth\\BasicAuth' => $baseDir . '/src/Http/Request/Auth/BasicAuth.php', 'Kirby\\Http\\Request\\Auth\\BearerAuth' => $baseDir . '/src/Http/Request/Auth/BearerAuth.php', + 'Kirby\\Http\\Request\\Auth\\SessionAuth' => $baseDir . '/src/Http/Request/Auth/SessionAuth.php', 'Kirby\\Http\\Request\\Body' => $baseDir . '/src/Http/Request/Body.php', 'Kirby\\Http\\Request\\Data' => $baseDir . '/src/Http/Request/Data.php', 'Kirby\\Http\\Request\\Files' => $baseDir . '/src/Http/Request/Files.php', @@ -269,6 +271,7 @@ return array( 'Normalizer' => $vendorDir . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php', 'PHPMailer\\PHPMailer\\Exception' => $vendorDir . '/phpmailer/phpmailer/src/Exception.php', 'PHPMailer\\PHPMailer\\OAuth' => $vendorDir . '/phpmailer/phpmailer/src/OAuth.php', + 'PHPMailer\\PHPMailer\\OAuthTokenProvider' => $vendorDir . '/phpmailer/phpmailer/src/OAuthTokenProvider.php', 'PHPMailer\\PHPMailer\\PHPMailer' => $vendorDir . '/phpmailer/phpmailer/src/PHPMailer.php', 'PHPMailer\\PHPMailer\\POP3' => $vendorDir . '/phpmailer/phpmailer/src/POP3.php', 'PHPMailer\\PHPMailer\\SMTP' => $vendorDir . '/phpmailer/phpmailer/src/SMTP.php', diff --git a/kirby/vendor/composer/autoload_files.php b/kirby/vendor/composer/autoload_files.php old mode 100644 new mode 100755 index 174a65b..efdbea2 --- a/kirby/vendor/composer/autoload_files.php +++ b/kirby/vendor/composer/autoload_files.php @@ -2,7 +2,7 @@ // autoload_files.php @generated by Composer -$vendorDir = dirname(dirname(__FILE__)); +$vendorDir = dirname(__DIR__); $baseDir = dirname($vendorDir); return array( diff --git a/kirby/vendor/composer/autoload_namespaces.php b/kirby/vendor/composer/autoload_namespaces.php old mode 100644 new mode 100755 index f135c18..f67d4ab --- a/kirby/vendor/composer/autoload_namespaces.php +++ b/kirby/vendor/composer/autoload_namespaces.php @@ -2,7 +2,7 @@ // autoload_namespaces.php @generated by Composer -$vendorDir = dirname(dirname(__FILE__)); +$vendorDir = dirname(__DIR__); $baseDir = dirname($vendorDir); return array( diff --git a/kirby/vendor/composer/autoload_psr4.php b/kirby/vendor/composer/autoload_psr4.php old mode 100644 new mode 100755 index 2c5eabc..b93dd84 --- a/kirby/vendor/composer/autoload_psr4.php +++ b/kirby/vendor/composer/autoload_psr4.php @@ -2,7 +2,7 @@ // autoload_psr4.php @generated by Composer -$vendorDir = dirname(dirname(__FILE__)); +$vendorDir = dirname(__DIR__); $baseDir = dirname($vendorDir); return array( diff --git a/kirby/vendor/composer/autoload_real.php b/kirby/vendor/composer/autoload_real.php old mode 100644 new mode 100755 index 8768e82..fe2eb1e --- a/kirby/vendor/composer/autoload_real.php +++ b/kirby/vendor/composer/autoload_real.php @@ -23,38 +23,15 @@ class ComposerAutoloaderInita8011b477bb239488e5d139cdeb7b31e } spl_autoload_register(array('ComposerAutoloaderInita8011b477bb239488e5d139cdeb7b31e', 'loadClassLoader'), true, true); - self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); + self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); spl_autoload_unregister(array('ComposerAutoloaderInita8011b477bb239488e5d139cdeb7b31e', 'loadClassLoader')); - $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); - if ($useStaticLoader) { - require __DIR__ . '/autoload_static.php'; - - call_user_func(\Composer\Autoload\ComposerStaticInita8011b477bb239488e5d139cdeb7b31e::getInitializer($loader)); - } else { - $map = require __DIR__ . '/autoload_namespaces.php'; - foreach ($map as $namespace => $path) { - $loader->set($namespace, $path); - } - - $map = require __DIR__ . '/autoload_psr4.php'; - foreach ($map as $namespace => $path) { - $loader->setPsr4($namespace, $path); - } - - $classMap = require __DIR__ . '/autoload_classmap.php'; - if ($classMap) { - $loader->addClassMap($classMap); - } - } + require __DIR__ . '/autoload_static.php'; + call_user_func(\Composer\Autoload\ComposerStaticInita8011b477bb239488e5d139cdeb7b31e::getInitializer($loader)); $loader->register(true); - if ($useStaticLoader) { - $includeFiles = Composer\Autoload\ComposerStaticInita8011b477bb239488e5d139cdeb7b31e::$files; - } else { - $includeFiles = require __DIR__ . '/autoload_files.php'; - } + $includeFiles = \Composer\Autoload\ComposerStaticInita8011b477bb239488e5d139cdeb7b31e::$files; foreach ($includeFiles as $fileIdentifier => $file) { composerRequirea8011b477bb239488e5d139cdeb7b31e($fileIdentifier, $file); } @@ -63,11 +40,16 @@ class ComposerAutoloaderInita8011b477bb239488e5d139cdeb7b31e } } +/** + * @param string $fileIdentifier + * @param string $file + * @return void + */ function composerRequirea8011b477bb239488e5d139cdeb7b31e($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { - require $file; - $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; + + require $file; } } diff --git a/kirby/vendor/composer/autoload_static.php b/kirby/vendor/composer/autoload_static.php old mode 100644 new mode 100755 index 7016204..e662a2e --- a/kirby/vendor/composer/autoload_static.php +++ b/kirby/vendor/composer/autoload_static.php @@ -121,7 +121,6 @@ class ComposerStaticInita8011b477bb239488e5d139cdeb7b31e 'Kirby\\Cms\\Auth\\EmailChallenge' => __DIR__ . '/../..' . '/src/Cms/Auth/EmailChallenge.php', 'Kirby\\Cms\\Auth\\Status' => __DIR__ . '/../..' . '/src/Cms/Auth/Status.php', 'Kirby\\Cms\\Block' => __DIR__ . '/../..' . '/src/Cms/Block.php', - 'Kirby\\Cms\\BlockConverter' => __DIR__ . '/../..' . '/src/Cms/BlockConverter.php', 'Kirby\\Cms\\Blocks' => __DIR__ . '/../..' . '/src/Cms/Blocks.php', 'Kirby\\Cms\\Blueprint' => __DIR__ . '/../..' . '/src/Cms/Blueprint.php', 'Kirby\\Cms\\Collection' => __DIR__ . '/../..' . '/src/Cms/Collection.php', @@ -132,7 +131,6 @@ class ComposerStaticInita8011b477bb239488e5d139cdeb7b31e 'Kirby\\Cms\\ContentTranslation' => __DIR__ . '/../..' . '/src/Cms/ContentTranslation.php', 'Kirby\\Cms\\Core' => __DIR__ . '/../..' . '/src/Cms/Core.php', 'Kirby\\Cms\\Email' => __DIR__ . '/../..' . '/src/Cms/Email.php', - 'Kirby\\Cms\\Environment' => __DIR__ . '/../..' . '/src/Cms/Environment.php', 'Kirby\\Cms\\Event' => __DIR__ . '/../..' . '/src/Cms/Event.php', 'Kirby\\Cms\\Field' => __DIR__ . '/../..' . '/src/Cms/Field.php', 'Kirby\\Cms\\Fieldset' => __DIR__ . '/../..' . '/src/Cms/Fieldset.php', @@ -151,6 +149,7 @@ class ComposerStaticInita8011b477bb239488e5d139cdeb7b31e 'Kirby\\Cms\\HasFiles' => __DIR__ . '/../..' . '/src/Cms/HasFiles.php', 'Kirby\\Cms\\HasMethods' => __DIR__ . '/../..' . '/src/Cms/HasMethods.php', 'Kirby\\Cms\\HasSiblings' => __DIR__ . '/../..' . '/src/Cms/HasSiblings.php', + 'Kirby\\Cms\\Helpers' => __DIR__ . '/../..' . '/src/Cms/Helpers.php', 'Kirby\\Cms\\Html' => __DIR__ . '/../..' . '/src/Cms/Html.php', 'Kirby\\Cms\\Ingredients' => __DIR__ . '/../..' . '/src/Cms/Ingredients.php', 'Kirby\\Cms\\Item' => __DIR__ . '/../..' . '/src/Cms/Item.php', @@ -258,6 +257,7 @@ class ComposerStaticInita8011b477bb239488e5d139cdeb7b31e 'Kirby\\Form\\OptionsQuery' => __DIR__ . '/../..' . '/src/Form/OptionsQuery.php', 'Kirby\\Form\\Validations' => __DIR__ . '/../..' . '/src/Form/Validations.php', 'Kirby\\Http\\Cookie' => __DIR__ . '/../..' . '/src/Http/Cookie.php', + 'Kirby\\Http\\Environment' => __DIR__ . '/../..' . '/src/Http/Environment.php', 'Kirby\\Http\\Exceptions\\NextRouteException' => __DIR__ . '/../..' . '/src/Http/Exceptions/NextRouteException.php', 'Kirby\\Http\\Header' => __DIR__ . '/../..' . '/src/Http/Header.php', 'Kirby\\Http\\Idn' => __DIR__ . '/../..' . '/src/Http/Idn.php', @@ -266,8 +266,10 @@ class ComposerStaticInita8011b477bb239488e5d139cdeb7b31e 'Kirby\\Http\\Query' => __DIR__ . '/../..' . '/src/Http/Query.php', 'Kirby\\Http\\Remote' => __DIR__ . '/../..' . '/src/Http/Remote.php', 'Kirby\\Http\\Request' => __DIR__ . '/../..' . '/src/Http/Request.php', + 'Kirby\\Http\\Request\\Auth' => __DIR__ . '/../..' . '/src/Http/Request/Auth.php', 'Kirby\\Http\\Request\\Auth\\BasicAuth' => __DIR__ . '/../..' . '/src/Http/Request/Auth/BasicAuth.php', 'Kirby\\Http\\Request\\Auth\\BearerAuth' => __DIR__ . '/../..' . '/src/Http/Request/Auth/BearerAuth.php', + 'Kirby\\Http\\Request\\Auth\\SessionAuth' => __DIR__ . '/../..' . '/src/Http/Request/Auth/SessionAuth.php', 'Kirby\\Http\\Request\\Body' => __DIR__ . '/../..' . '/src/Http/Request/Body.php', 'Kirby\\Http\\Request\\Data' => __DIR__ . '/../..' . '/src/Http/Request/Data.php', 'Kirby\\Http\\Request\\Files' => __DIR__ . '/../..' . '/src/Http/Request/Files.php', @@ -361,6 +363,7 @@ class ComposerStaticInita8011b477bb239488e5d139cdeb7b31e 'Normalizer' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php', 'PHPMailer\\PHPMailer\\Exception' => __DIR__ . '/..' . '/phpmailer/phpmailer/src/Exception.php', 'PHPMailer\\PHPMailer\\OAuth' => __DIR__ . '/..' . '/phpmailer/phpmailer/src/OAuth.php', + 'PHPMailer\\PHPMailer\\OAuthTokenProvider' => __DIR__ . '/..' . '/phpmailer/phpmailer/src/OAuthTokenProvider.php', 'PHPMailer\\PHPMailer\\PHPMailer' => __DIR__ . '/..' . '/phpmailer/phpmailer/src/PHPMailer.php', 'PHPMailer\\PHPMailer\\POP3' => __DIR__ . '/..' . '/phpmailer/phpmailer/src/POP3.php', 'PHPMailer\\PHPMailer\\SMTP' => __DIR__ . '/..' . '/phpmailer/phpmailer/src/SMTP.php', diff --git a/kirby/vendor/composer/installed.json b/kirby/vendor/composer/installed.json old mode 100644 new mode 100755 index 055bb3c..60e141e --- a/kirby/vendor/composer/installed.json +++ b/kirby/vendor/composer/installed.json @@ -361,17 +361,17 @@ }, { "name": "phpmailer/phpmailer", - "version": "v6.5.4", - "version_normalized": "6.5.4.0", + "version": "v6.6.3", + "version_normalized": "6.6.3.0", "source": { "type": "git", "url": "https://github.com/PHPMailer/PHPMailer.git", - "reference": "c0d9f7dd3c2aa247ca44791e9209233829d82285" + "reference": "9400f305a898f194caff5521f64e5dfa926626f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/c0d9f7dd3c2aa247ca44791e9209233829d82285", - "reference": "c0d9f7dd3c2aa247ca44791e9209233829d82285", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/9400f305a898f194caff5521f64e5dfa926626f3", + "reference": "9400f305a898f194caff5521f64e5dfa926626f3", "shasum": "" }, "require": { @@ -383,8 +383,8 @@ "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "doctrine/annotations": "^1.2", - "php-parallel-lint/php-console-highlighter": "^0.5.0", - "php-parallel-lint/php-parallel-lint": "^1.3.1", + "php-parallel-lint/php-console-highlighter": "^1.0.0", + "php-parallel-lint/php-parallel-lint": "^1.3.2", "phpcompatibility/php-compatibility": "^9.3.5", "roave/security-advisories": "dev-latest", "squizlabs/php_codesniffer": "^3.6.2", @@ -398,7 +398,7 @@ "stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication", "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)" }, - "time": "2022-02-17T08:19:04+00:00", + "time": "2022-06-20T09:21:02+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -430,7 +430,7 @@ "description": "PHPMailer is a full-featured email creation and transfer class for PHP", "support": { "issues": "https://github.com/PHPMailer/PHPMailer/issues", - "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.5.4" + "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.6.3" }, "funding": [ { @@ -495,17 +495,17 @@ }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.25.0", - "version_normalized": "1.25.0.0", + "version": "v1.26.0", + "version_normalized": "1.26.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "749045c69efb97c70d25d7463abba812e91f3a44" + "reference": "59a8d271f00dd0e4c2e518104cc7963f655a1aa8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/749045c69efb97c70d25d7463abba812e91f3a44", - "reference": "749045c69efb97c70d25d7463abba812e91f3a44", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/59a8d271f00dd0e4c2e518104cc7963f655a1aa8", + "reference": "59a8d271f00dd0e4c2e518104cc7963f655a1aa8", "shasum": "" }, "require": { @@ -516,11 +516,11 @@ "suggest": { "ext-intl": "For best performance" }, - "time": "2021-09-14T14:02:44+00:00", + "time": "2022-05-24T11:49:31+00:00", "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -565,7 +565,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.26.0" }, "funding": [ { @@ -585,17 +585,17 @@ }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.25.0", - "version_normalized": "1.25.0.0", + "version": "v1.26.0", + "version_normalized": "1.26.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8" + "reference": "219aa369ceff116e673852dce47c3a41794c14bd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8", - "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/219aa369ceff116e673852dce47c3a41794c14bd", + "reference": "219aa369ceff116e673852dce47c3a41794c14bd", "shasum": "" }, "require": { @@ -604,11 +604,11 @@ "suggest": { "ext-intl": "For best performance" }, - "time": "2021-02-19T12:13:01+00:00", + "time": "2022-05-24T11:49:31+00:00", "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -652,7 +652,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.26.0" }, "funding": [ { @@ -672,17 +672,17 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.25.0", - "version_normalized": "1.25.0.0", + "version": "v1.26.0", + "version_normalized": "1.26.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825" + "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825", - "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", "shasum": "" }, "require": { @@ -694,11 +694,11 @@ "suggest": { "ext-mbstring": "For best performance" }, - "time": "2021-11-30T18:21:41+00:00", + "time": "2022-05-24T11:49:31+00:00", "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -738,7 +738,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" }, "funding": [ { diff --git a/kirby/vendor/composer/installed.php b/kirby/vendor/composer/installed.php old mode 100644 new mode 100755 index a29b80e..fc8e7de --- a/kirby/vendor/composer/installed.php +++ b/kirby/vendor/composer/installed.php @@ -1,67 +1,67 @@ array( - 'pretty_version' => '3.6.6', - 'version' => '3.6.6.0', + 'name' => 'getkirby/cms', + 'pretty_version' => '3.7.0', + 'version' => '3.7.0.0', + 'reference' => NULL, 'type' => 'kirby-cms', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), - 'reference' => NULL, - 'name' => 'getkirby/cms', 'dev' => true, ), 'versions' => array( 'claviska/simpleimage' => array( 'pretty_version' => '3.6.5', 'version' => '3.6.5.0', + 'reference' => '00f90662686696b9b7157dbb176183aabe89700f', 'type' => 'library', 'install_path' => __DIR__ . '/../claviska/simpleimage', 'aliases' => array(), - 'reference' => '00f90662686696b9b7157dbb176183aabe89700f', 'dev_requirement' => false, ), 'filp/whoops' => array( 'pretty_version' => '2.14.5', 'version' => '2.14.5.0', + 'reference' => 'a63e5e8f26ebbebf8ed3c5c691637325512eb0dc', 'type' => 'library', 'install_path' => __DIR__ . '/../filp/whoops', 'aliases' => array(), - 'reference' => 'a63e5e8f26ebbebf8ed3c5c691637325512eb0dc', 'dev_requirement' => false, ), 'getkirby/cms' => array( - 'pretty_version' => '3.6.6', - 'version' => '3.6.6.0', + 'pretty_version' => '3.7.0', + 'version' => '3.7.0.0', + 'reference' => NULL, 'type' => 'kirby-cms', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), - 'reference' => NULL, 'dev_requirement' => false, ), 'getkirby/composer-installer' => array( 'pretty_version' => '1.2.1', 'version' => '1.2.1.0', + 'reference' => 'c98ece30bfba45be7ce457e1102d1b169d922f3d', 'type' => 'composer-plugin', 'install_path' => __DIR__ . '/../getkirby/composer-installer', 'aliases' => array(), - 'reference' => 'c98ece30bfba45be7ce457e1102d1b169d922f3d', 'dev_requirement' => false, ), 'laminas/laminas-escaper' => array( 'pretty_version' => '2.10.0', 'version' => '2.10.0.0', + 'reference' => '58af67282db37d24e584a837a94ee55b9c7552be', 'type' => 'library', 'install_path' => __DIR__ . '/../laminas/laminas-escaper', 'aliases' => array(), - 'reference' => '58af67282db37d24e584a837a94ee55b9c7552be', 'dev_requirement' => false, ), 'league/color-extractor' => array( 'pretty_version' => '0.3.2', 'version' => '0.3.2.0', + 'reference' => '837086ec60f50c84c611c613963e4ad2e2aec806', 'type' => 'library', 'install_path' => __DIR__ . '/../league/color-extractor', 'aliases' => array(), - 'reference' => '837086ec60f50c84c611c613963e4ad2e2aec806', 'dev_requirement' => false, ), 'matthecat/colorextractor' => array( @@ -73,55 +73,55 @@ 'michelf/php-smartypants' => array( 'pretty_version' => '1.8.1', 'version' => '1.8.1.0', + 'reference' => '47d17c90a4dfd0ccf1f87e25c65e6c8012415aad', 'type' => 'library', 'install_path' => __DIR__ . '/../michelf/php-smartypants', 'aliases' => array(), - 'reference' => '47d17c90a4dfd0ccf1f87e25c65e6c8012415aad', 'dev_requirement' => false, ), 'phpmailer/phpmailer' => array( - 'pretty_version' => 'v6.5.4', - 'version' => '6.5.4.0', + 'pretty_version' => 'v6.6.3', + 'version' => '6.6.3.0', + 'reference' => '9400f305a898f194caff5521f64e5dfa926626f3', 'type' => 'library', 'install_path' => __DIR__ . '/../phpmailer/phpmailer', 'aliases' => array(), - 'reference' => 'c0d9f7dd3c2aa247ca44791e9209233829d82285', 'dev_requirement' => false, ), 'psr/log' => array( 'pretty_version' => '1.1.4', 'version' => '1.1.4.0', + 'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/log', 'aliases' => array(), - 'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11', 'dev_requirement' => false, ), 'symfony/polyfill-intl-idn' => array( - 'pretty_version' => 'v1.25.0', - 'version' => '1.25.0.0', + 'pretty_version' => 'v1.26.0', + 'version' => '1.26.0.0', + 'reference' => '59a8d271f00dd0e4c2e518104cc7963f655a1aa8', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-intl-idn', 'aliases' => array(), - 'reference' => '749045c69efb97c70d25d7463abba812e91f3a44', 'dev_requirement' => false, ), 'symfony/polyfill-intl-normalizer' => array( - 'pretty_version' => 'v1.25.0', - 'version' => '1.25.0.0', + 'pretty_version' => 'v1.26.0', + 'version' => '1.26.0.0', + 'reference' => '219aa369ceff116e673852dce47c3a41794c14bd', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-intl-normalizer', 'aliases' => array(), - 'reference' => '8590a5f561694770bdcd3f9b5c69dde6945028e8', 'dev_requirement' => false, ), 'symfony/polyfill-mbstring' => array( - 'pretty_version' => 'v1.25.0', - 'version' => '1.25.0.0', + 'pretty_version' => 'v1.26.0', + 'version' => '1.26.0.0', + 'reference' => '9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', 'aliases' => array(), - 'reference' => '0abb51d2f102e00a4eefcf46ba7fec406d245825', 'dev_requirement' => false, ), 'symfony/polyfill-php72' => array( diff --git a/kirby/vendor/filp/whoops/LICENSE.md b/kirby/vendor/filp/whoops/LICENSE.md old mode 100644 new mode 100755 diff --git a/kirby/vendor/filp/whoops/composer.json b/kirby/vendor/filp/whoops/composer.json old mode 100644 new mode 100755 diff --git a/kirby/vendor/filp/whoops/src/Whoops/Exception/ErrorException.php b/kirby/vendor/filp/whoops/src/Whoops/Exception/ErrorException.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/filp/whoops/src/Whoops/Exception/Formatter.php b/kirby/vendor/filp/whoops/src/Whoops/Exception/Formatter.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/filp/whoops/src/Whoops/Exception/Frame.php b/kirby/vendor/filp/whoops/src/Whoops/Exception/Frame.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/filp/whoops/src/Whoops/Exception/FrameCollection.php b/kirby/vendor/filp/whoops/src/Whoops/Exception/FrameCollection.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/filp/whoops/src/Whoops/Exception/Inspector.php b/kirby/vendor/filp/whoops/src/Whoops/Exception/Inspector.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/filp/whoops/src/Whoops/Handler/CallbackHandler.php b/kirby/vendor/filp/whoops/src/Whoops/Handler/CallbackHandler.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/filp/whoops/src/Whoops/Handler/Handler.php b/kirby/vendor/filp/whoops/src/Whoops/Handler/Handler.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/filp/whoops/src/Whoops/Handler/HandlerInterface.php b/kirby/vendor/filp/whoops/src/Whoops/Handler/HandlerInterface.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/filp/whoops/src/Whoops/Handler/JsonResponseHandler.php b/kirby/vendor/filp/whoops/src/Whoops/Handler/JsonResponseHandler.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/filp/whoops/src/Whoops/Handler/PlainTextHandler.php b/kirby/vendor/filp/whoops/src/Whoops/Handler/PlainTextHandler.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/filp/whoops/src/Whoops/Handler/PrettyPageHandler.php b/kirby/vendor/filp/whoops/src/Whoops/Handler/PrettyPageHandler.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/filp/whoops/src/Whoops/Handler/XmlResponseHandler.php b/kirby/vendor/filp/whoops/src/Whoops/Handler/XmlResponseHandler.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/filp/whoops/src/Whoops/Resources/css/prism.css b/kirby/vendor/filp/whoops/src/Whoops/Resources/css/prism.css old mode 100644 new mode 100755 diff --git a/kirby/vendor/filp/whoops/src/Whoops/Resources/css/whoops.base.css b/kirby/vendor/filp/whoops/src/Whoops/Resources/css/whoops.base.css old mode 100644 new mode 100755 diff --git a/kirby/vendor/filp/whoops/src/Whoops/Resources/js/clipboard.min.js b/kirby/vendor/filp/whoops/src/Whoops/Resources/js/clipboard.min.js old mode 100644 new mode 100755 diff --git a/kirby/vendor/filp/whoops/src/Whoops/Resources/js/prism.js b/kirby/vendor/filp/whoops/src/Whoops/Resources/js/prism.js old mode 100644 new mode 100755 diff --git a/kirby/vendor/filp/whoops/src/Whoops/Resources/js/whoops.base.js b/kirby/vendor/filp/whoops/src/Whoops/Resources/js/whoops.base.js old mode 100644 new mode 100755 diff --git a/kirby/vendor/filp/whoops/src/Whoops/Resources/js/zepto.min.js b/kirby/vendor/filp/whoops/src/Whoops/Resources/js/zepto.min.js old mode 100644 new mode 100755 diff --git a/kirby/vendor/filp/whoops/src/Whoops/Resources/views/env_details.html.php b/kirby/vendor/filp/whoops/src/Whoops/Resources/views/env_details.html.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/filp/whoops/src/Whoops/Resources/views/frame_code.html.php b/kirby/vendor/filp/whoops/src/Whoops/Resources/views/frame_code.html.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/filp/whoops/src/Whoops/Resources/views/frame_list.html.php b/kirby/vendor/filp/whoops/src/Whoops/Resources/views/frame_list.html.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/filp/whoops/src/Whoops/Resources/views/frames_container.html.php b/kirby/vendor/filp/whoops/src/Whoops/Resources/views/frames_container.html.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/filp/whoops/src/Whoops/Resources/views/frames_description.html.php b/kirby/vendor/filp/whoops/src/Whoops/Resources/views/frames_description.html.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/filp/whoops/src/Whoops/Resources/views/header.html.php b/kirby/vendor/filp/whoops/src/Whoops/Resources/views/header.html.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/filp/whoops/src/Whoops/Resources/views/header_outer.html.php b/kirby/vendor/filp/whoops/src/Whoops/Resources/views/header_outer.html.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/filp/whoops/src/Whoops/Resources/views/layout.html.php b/kirby/vendor/filp/whoops/src/Whoops/Resources/views/layout.html.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/filp/whoops/src/Whoops/Resources/views/panel_details.html.php b/kirby/vendor/filp/whoops/src/Whoops/Resources/views/panel_details.html.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/filp/whoops/src/Whoops/Resources/views/panel_details_outer.html.php b/kirby/vendor/filp/whoops/src/Whoops/Resources/views/panel_details_outer.html.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/filp/whoops/src/Whoops/Resources/views/panel_left.html.php b/kirby/vendor/filp/whoops/src/Whoops/Resources/views/panel_left.html.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/filp/whoops/src/Whoops/Resources/views/panel_left_outer.html.php b/kirby/vendor/filp/whoops/src/Whoops/Resources/views/panel_left_outer.html.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/filp/whoops/src/Whoops/Run.php b/kirby/vendor/filp/whoops/src/Whoops/Run.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/filp/whoops/src/Whoops/RunInterface.php b/kirby/vendor/filp/whoops/src/Whoops/RunInterface.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/filp/whoops/src/Whoops/Util/HtmlDumperOutput.php b/kirby/vendor/filp/whoops/src/Whoops/Util/HtmlDumperOutput.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/filp/whoops/src/Whoops/Util/Misc.php b/kirby/vendor/filp/whoops/src/Whoops/Util/Misc.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/filp/whoops/src/Whoops/Util/SystemFacade.php b/kirby/vendor/filp/whoops/src/Whoops/Util/SystemFacade.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/filp/whoops/src/Whoops/Util/TemplateHelper.php b/kirby/vendor/filp/whoops/src/Whoops/Util/TemplateHelper.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/laminas/laminas-escaper/COPYRIGHT.md b/kirby/vendor/laminas/laminas-escaper/COPYRIGHT.md old mode 100644 new mode 100755 diff --git a/kirby/vendor/laminas/laminas-escaper/LICENSE.md b/kirby/vendor/laminas/laminas-escaper/LICENSE.md old mode 100644 new mode 100755 diff --git a/kirby/vendor/laminas/laminas-escaper/composer.json b/kirby/vendor/laminas/laminas-escaper/composer.json old mode 100644 new mode 100755 diff --git a/kirby/vendor/laminas/laminas-escaper/composer.lock b/kirby/vendor/laminas/laminas-escaper/composer.lock old mode 100644 new mode 100755 diff --git a/kirby/vendor/laminas/laminas-escaper/src/Escaper.php b/kirby/vendor/laminas/laminas-escaper/src/Escaper.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/laminas/laminas-escaper/src/Exception/ExceptionInterface.php b/kirby/vendor/laminas/laminas-escaper/src/Exception/ExceptionInterface.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/laminas/laminas-escaper/src/Exception/InvalidArgumentException.php b/kirby/vendor/laminas/laminas-escaper/src/Exception/InvalidArgumentException.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/laminas/laminas-escaper/src/Exception/RuntimeException.php b/kirby/vendor/laminas/laminas-escaper/src/Exception/RuntimeException.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/league/color-extractor/LICENSE b/kirby/vendor/league/color-extractor/LICENSE old mode 100644 new mode 100755 diff --git a/kirby/vendor/league/color-extractor/composer.json b/kirby/vendor/league/color-extractor/composer.json old mode 100644 new mode 100755 diff --git a/kirby/vendor/league/color-extractor/src/League/ColorExtractor/Color.php b/kirby/vendor/league/color-extractor/src/League/ColorExtractor/Color.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/league/color-extractor/src/League/ColorExtractor/ColorExtractor.php b/kirby/vendor/league/color-extractor/src/League/ColorExtractor/ColorExtractor.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/league/color-extractor/src/League/ColorExtractor/Palette.php b/kirby/vendor/league/color-extractor/src/League/ColorExtractor/Palette.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/michelf/php-smartypants/License.md b/kirby/vendor/michelf/php-smartypants/License.md old mode 100644 new mode 100755 diff --git a/kirby/vendor/michelf/php-smartypants/Michelf/SmartyPants.inc.php b/kirby/vendor/michelf/php-smartypants/Michelf/SmartyPants.inc.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/michelf/php-smartypants/Michelf/SmartyPants.php b/kirby/vendor/michelf/php-smartypants/Michelf/SmartyPants.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/michelf/php-smartypants/Michelf/SmartyPantsTypographer.inc.php b/kirby/vendor/michelf/php-smartypants/Michelf/SmartyPantsTypographer.inc.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/michelf/php-smartypants/Michelf/SmartyPantsTypographer.php b/kirby/vendor/michelf/php-smartypants/Michelf/SmartyPantsTypographer.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/michelf/php-smartypants/composer.json b/kirby/vendor/michelf/php-smartypants/composer.json old mode 100644 new mode 100755 diff --git a/kirby/vendor/phpmailer/phpmailer/LICENSE b/kirby/vendor/phpmailer/phpmailer/LICENSE old mode 100644 new mode 100755 diff --git a/kirby/vendor/phpmailer/phpmailer/composer.json b/kirby/vendor/phpmailer/phpmailer/composer.json old mode 100644 new mode 100755 index b13732b..1db6f03 --- a/kirby/vendor/phpmailer/phpmailer/composer.json +++ b/kirby/vendor/phpmailer/phpmailer/composer.json @@ -39,8 +39,8 @@ "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "doctrine/annotations": "^1.2", - "php-parallel-lint/php-console-highlighter": "^0.5.0", - "php-parallel-lint/php-parallel-lint": "^1.3.1", + "php-parallel-lint/php-console-highlighter": "^1.0.0", + "php-parallel-lint/php-parallel-lint": "^1.3.2", "phpcompatibility/php-compatibility": "^9.3.5", "roave/security-advisories": "dev-latest", "squizlabs/php_codesniffer": "^3.6.2", @@ -70,7 +70,7 @@ "test": "./vendor/bin/phpunit --no-coverage", "coverage": "./vendor/bin/phpunit", "lint": [ - "@php ./vendor/php-parallel-lint/php-parallel-lint/parallel-lint . -e php,phps --exclude vendor --exclude .git --exclude build" + "@php ./vendor/php-parallel-lint/php-parallel-lint/parallel-lint . --show-deprecated -e php,phps --exclude vendor --exclude .git --exclude build" ] } } diff --git a/kirby/vendor/phpmailer/phpmailer/get_oauth_token.php b/kirby/vendor/phpmailer/phpmailer/get_oauth_token.php old mode 100644 new mode 100755 index befdc34..ba66f6c --- a/kirby/vendor/phpmailer/phpmailer/get_oauth_token.php +++ b/kirby/vendor/phpmailer/phpmailer/get_oauth_token.php @@ -45,13 +45,25 @@ use Hayageek\OAuth2\Client\Provider\Yahoo; //@see https://github.com/stevenmaguire/oauth2-microsoft use Stevenmaguire\OAuth2\Client\Provider\Microsoft; -if (!isset($_GET['code']) && !isset($_GET['provider'])) { +if (!isset($_GET['code']) && !isset($_POST['provider'])) { ?> -Select Provider:
    -Google
    -Yahoo
    -Microsoft/Outlook/Hotmail/Live/Office365
    + +
    +

    Select Provider

    + +
    + +
    + +
    +

    Enter id and secret

    +

    These details are obtained by setting up an app in your provider's developer console. +

    +

    ClientId:

    +

    ClientSecret:

    + +
    - */ - -$PHPMAILER_LANG['authenticate'] = 'SMTP 错误:身份验证失败。'; -$PHPMAILER_LANG['connect_host'] = 'SMTP 错误: 不能连接SMTP主机。'; -$PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误: 数据不可接受。'; -//$PHPMAILER_LANG['empty_message'] = 'Message body empty'; -$PHPMAILER_LANG['encoding'] = '未知编码:'; -$PHPMAILER_LANG['execute'] = '不能执行: '; -$PHPMAILER_LANG['file_access'] = '不能访问文件:'; -$PHPMAILER_LANG['file_open'] = '文件错误:不能打开文件:'; -$PHPMAILER_LANG['from_failed'] = '下面的发送地址邮件发送失败了: '; -$PHPMAILER_LANG['instantiate'] = '不能实现mail方法。'; -//$PHPMAILER_LANG['invalid_address'] = 'Invalid address: '; -$PHPMAILER_LANG['mailer_not_supported'] = ' 您所选择的发送邮件的方法并不支持。'; -$PHPMAILER_LANG['provide_address'] = '您必须提供至少一个 收信人的email地址。'; -$PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误: 下面的 收件人失败了: '; -//$PHPMAILER_LANG['signing'] = 'Signing Error: '; -//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; -//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; -//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; -//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-cs.php b/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-cs.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-da.php b/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-da.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-de.php b/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-de.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-el.php b/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-el.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-eo.php b/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-eo.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-es.php b/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-es.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-et.php b/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-et.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-fa.php b/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-fa.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-fi.php b/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-fi.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-fo.php b/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-fo.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-fr.php b/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-fr.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-gl.php b/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-gl.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-he.php b/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-he.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-hi.php b/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-hi.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-hr.php b/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-hr.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-hu.php b/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-hu.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-hy.php b/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-hy.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-id.php b/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-id.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-it.php b/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-it.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-ja.php b/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-ja.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-ka.php b/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-ka.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-ko.php b/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-ko.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-lt.php b/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-lt.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-lv.php b/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-lv.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-mg.php b/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-mg.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-mn.php b/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-mn.php new file mode 100755 index 0000000..04d262c --- /dev/null +++ b/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-mn.php @@ -0,0 +1,27 @@ + */ -class OAuth +class OAuth implements OAuthTokenProvider { /** * An instance of the League OAuth Client Provider. diff --git a/kirby/vendor/phpmailer/phpmailer/src/OAuthTokenProvider.php b/kirby/vendor/phpmailer/phpmailer/src/OAuthTokenProvider.php new file mode 100755 index 0000000..1155507 --- /dev/null +++ b/kirby/vendor/phpmailer/phpmailer/src/OAuthTokenProvider.php @@ -0,0 +1,44 @@ + + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + * @copyright 2012 - 2020 Marcus Bointon + * @copyright 2010 - 2012 Jim Jagielski + * @copyright 2004 - 2009 Andy Prevost + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @note This program is distributed in the hope that it will be useful - WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + */ + +namespace PHPMailer\PHPMailer; + +/** + * OAuthTokenProvider - OAuth2 token provider interface. + * Provides base64 encoded OAuth2 auth strings for SMTP authentication. + * + * @see OAuth + * @see SMTP::authenticate() + * + * @author Peter Scopes (pdscopes) + * @author Marcus Bointon (Synchro/coolbru) + */ +interface OAuthTokenProvider +{ + /** + * Generate a base64-encoded OAuth token ensuring that the access token has not expired. + * The string to be base 64 encoded should be in the form: + * "user=\001auth=Bearer \001\001" + * + * @return string + */ + public function getOauth64(); +} diff --git a/kirby/vendor/phpmailer/phpmailer/src/PHPMailer.php b/kirby/vendor/phpmailer/phpmailer/src/PHPMailer.php old mode 100644 new mode 100755 index 19110df..6590a0e --- a/kirby/vendor/phpmailer/phpmailer/src/PHPMailer.php +++ b/kirby/vendor/phpmailer/phpmailer/src/PHPMailer.php @@ -358,9 +358,9 @@ class PHPMailer public $AuthType = ''; /** - * An instance of the PHPMailer OAuth class. + * An implementation of the PHPMailer OAuthTokenProvider interface. * - * @var OAuth + * @var OAuthTokenProvider */ protected $oauth; @@ -750,7 +750,7 @@ class PHPMailer * * @var string */ - const VERSION = '6.5.4'; + const VERSION = '6.6.3'; /** * Error severity: message only, continue processing. @@ -1066,8 +1066,8 @@ class PHPMailer * Addresses that have been added already return false, but do not throw exceptions. * * @param string $kind One of 'to', 'cc', 'bcc', or 'ReplyTo' - * @param string $address The email address to send, resp. to reply to - * @param string $name + * @param string $address The email address + * @param string $name An optional username associated with the address * * @throws Exception * @@ -1075,9 +1075,11 @@ class PHPMailer */ protected function addOrEnqueueAnAddress($kind, $address, $name) { - $address = trim($address); - $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim - $pos = strrpos($address, '@'); + $pos = false; + if ($address !== null) { + $address = trim($address); + $pos = strrpos($address, '@'); + } if (false === $pos) { //At-sign is missing. $error_message = sprintf( @@ -1094,8 +1096,14 @@ class PHPMailer return false; } + if ($name !== null) { + $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim + } else { + $name = ''; + } $params = [$kind, $address, $name]; //Enqueue addresses with IDN until we know the PHPMailer::$CharSet. + //Domain is assumed to be whatever is after the last @ symbol in the address if (static::idnSupported() && $this->has8bitChars(substr($address, ++$pos))) { if ('Reply-To' !== $kind) { if (!array_key_exists($address, $this->RecipientsQueue)) { @@ -1547,17 +1555,17 @@ class PHPMailer //Validate From, Sender, and ConfirmReadingTo addresses foreach (['From', 'Sender', 'ConfirmReadingTo'] as $address_kind) { - $this->$address_kind = trim($this->$address_kind); - if (empty($this->$address_kind)) { + $this->{$address_kind} = trim($this->{$address_kind}); + if (empty($this->{$address_kind})) { continue; } - $this->$address_kind = $this->punyencodeAddress($this->$address_kind); - if (!static::validateAddress($this->$address_kind)) { + $this->{$address_kind} = $this->punyencodeAddress($this->{$address_kind}); + if (!static::validateAddress($this->{$address_kind})) { $error_message = sprintf( '%s (%s): %s', $this->lang('invalid_address'), $address_kind, - $this->$address_kind + $this->{$address_kind} ); $this->setError($error_message); $this->edebug($error_message); @@ -1657,7 +1665,7 @@ class PHPMailer default: $sendMethod = $this->Mailer . 'Send'; if (method_exists($this, $sendMethod)) { - return $this->$sendMethod($this->MIMEHeader, $this->MIMEBody); + return $this->{$sendMethod}($this->MIMEHeader, $this->MIMEBody); } return $this->mailSend($this->MIMEHeader, $this->MIMEBody); @@ -2161,7 +2169,8 @@ class PHPMailer } if ($tls) { if (!$this->smtp->startTLS()) { - throw new Exception($this->lang('connect_host')); + $message = $this->getSmtpErrorMessage('connect_host'); + throw new Exception($message); } //We must resend EHLO after TLS negotiation $this->smtp->hello($hello); @@ -2192,6 +2201,11 @@ class PHPMailer if ($this->exceptions && null !== $lastexception) { throw $lastexception; } + if ($this->exceptions) { + // no exception was thrown, likely $this->smtp->connect() failed + $message = $this->getSmtpErrorMessage('connect_host'); + throw new Exception($message); + } return false; } @@ -3700,20 +3714,21 @@ class PHPMailer * These differ from 'regular' attachments in that they are intended to be * displayed inline with the message, not just attached for download. * This is used in HTML messages that embed the images - * the HTML refers to using the $cid value. + * the HTML refers to using the `$cid` value in `img` tags, for example ``. * Never use a user-supplied path to a file! * * @param string $path Path to the attachment * @param string $cid Content ID of the attachment; Use this to reference * the content when using an embedded image in HTML - * @param string $name Overrides the attachment name - * @param string $encoding File encoding (see $Encoding) - * @param string $type File MIME type - * @param string $disposition Disposition to use - * - * @throws Exception + * @param string $name Overrides the attachment filename + * @param string $encoding File encoding (see $Encoding) defaults to `base64` + * @param string $type File MIME type (by default mapped from the `$path` filename's extension) + * @param string $disposition Disposition to use: `inline` (default) or `attachment` + * (unlikely you want this – {@see `addAttachment()`} instead) * * @return bool True on successfully adding an attachment + * @throws Exception + * */ public function addEmbeddedImage( $path, @@ -4091,12 +4106,8 @@ class PHPMailer //Is it a valid IPv4 address? return filter_var($host, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) !== false; } - if (filter_var('http://' . $host, FILTER_VALIDATE_URL) !== false) { - //Is it a syntactically valid hostname? - return true; - } - - return false; + //Is it a syntactically valid hostname (when embeded in a URL)? + return filter_var('http://' . $host, FILTER_VALIDATE_URL) !== false; } /** @@ -4127,6 +4138,26 @@ class PHPMailer return $key; } + /** + * Build an error message starting with a generic one and adding details if possible. + * + * @param string $base_key + * @return string + */ + private function getSmtpErrorMessage($base_key) + { + $message = $this->lang($base_key); + $error = $this->smtp->getError(); + if (!empty($error['error'])) { + $message .= ' ' . $error['error']; + if (!empty($error['detail'])) { + $message .= ' ' . $error['detail']; + } + } + + return $message; + } + /** * Check if an error occurred. * @@ -4546,7 +4577,7 @@ class PHPMailer public function set($name, $value = '') { if (property_exists($this, $name)) { - $this->$name = $value; + $this->{$name} = $value; return true; } @@ -5027,9 +5058,9 @@ class PHPMailer } /** - * Get the OAuth instance. + * Get the OAuthTokenProvider instance. * - * @return OAuth + * @return OAuthTokenProvider */ public function getOAuth() { @@ -5037,9 +5068,9 @@ class PHPMailer } /** - * Set an OAuth instance. + * Set an OAuthTokenProvider instance. */ - public function setOAuth(OAuth $oauth) + public function setOAuth(OAuthTokenProvider $oauth) { $this->oauth = $oauth; } diff --git a/kirby/vendor/phpmailer/phpmailer/src/POP3.php b/kirby/vendor/phpmailer/phpmailer/src/POP3.php old mode 100644 new mode 100755 index 6ca3e3c..a7cc391 --- a/kirby/vendor/phpmailer/phpmailer/src/POP3.php +++ b/kirby/vendor/phpmailer/phpmailer/src/POP3.php @@ -46,7 +46,7 @@ class POP3 * * @var string */ - const VERSION = '6.5.4'; + const VERSION = '6.6.3'; /** * Default POP3 port number. diff --git a/kirby/vendor/phpmailer/phpmailer/src/SMTP.php b/kirby/vendor/phpmailer/phpmailer/src/SMTP.php old mode 100644 new mode 100755 index 1381770..c439a88 --- a/kirby/vendor/phpmailer/phpmailer/src/SMTP.php +++ b/kirby/vendor/phpmailer/phpmailer/src/SMTP.php @@ -35,7 +35,7 @@ class SMTP * * @var string */ - const VERSION = '6.5.4'; + const VERSION = '6.6.3'; /** * SMTP line break constant. @@ -483,7 +483,7 @@ class SMTP * @param string $username The user name * @param string $password The password * @param string $authtype The auth type (CRAM-MD5, PLAIN, LOGIN, XOAUTH2) - * @param OAuth $OAuth An optional OAuth instance for XOAUTH2 authentication + * @param OAuthTokenProvider $OAuth An optional OAuthTokenProvider instance for XOAUTH2 authentication * * @return bool True if successfully authenticated */ @@ -1037,7 +1037,10 @@ class SMTP return false; } - $this->setError(''); + //Don't clear the error store when using keepalive + if ($command !== 'RSET') { + $this->setError(''); + } return true; } diff --git a/kirby/vendor/psr/log/LICENSE b/kirby/vendor/psr/log/LICENSE old mode 100644 new mode 100755 diff --git a/kirby/vendor/psr/log/Psr/Log/AbstractLogger.php b/kirby/vendor/psr/log/Psr/Log/AbstractLogger.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/psr/log/Psr/Log/InvalidArgumentException.php b/kirby/vendor/psr/log/Psr/Log/InvalidArgumentException.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/psr/log/Psr/Log/LogLevel.php b/kirby/vendor/psr/log/Psr/Log/LogLevel.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/psr/log/Psr/Log/LoggerAwareInterface.php b/kirby/vendor/psr/log/Psr/Log/LoggerAwareInterface.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/psr/log/Psr/Log/LoggerAwareTrait.php b/kirby/vendor/psr/log/Psr/Log/LoggerAwareTrait.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/psr/log/Psr/Log/LoggerInterface.php b/kirby/vendor/psr/log/Psr/Log/LoggerInterface.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/psr/log/Psr/Log/LoggerTrait.php b/kirby/vendor/psr/log/Psr/Log/LoggerTrait.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/psr/log/Psr/Log/NullLogger.php b/kirby/vendor/psr/log/Psr/Log/NullLogger.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/psr/log/composer.json b/kirby/vendor/psr/log/composer.json old mode 100644 new mode 100755 diff --git a/kirby/vendor/symfony/polyfill-intl-idn/Idn.php b/kirby/vendor/symfony/polyfill-intl-idn/Idn.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/symfony/polyfill-intl-idn/Info.php b/kirby/vendor/symfony/polyfill-intl-idn/Info.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/symfony/polyfill-intl-idn/LICENSE b/kirby/vendor/symfony/polyfill-intl-idn/LICENSE old mode 100644 new mode 100755 diff --git a/kirby/vendor/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php b/kirby/vendor/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/symfony/polyfill-intl-idn/Resources/unidata/Regex.php b/kirby/vendor/symfony/polyfill-intl-idn/Resources/unidata/Regex.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/symfony/polyfill-intl-idn/Resources/unidata/deviation.php b/kirby/vendor/symfony/polyfill-intl-idn/Resources/unidata/deviation.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed.php b/kirby/vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed_STD3_mapped.php b/kirby/vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed_STD3_mapped.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed_STD3_valid.php b/kirby/vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed_STD3_valid.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/symfony/polyfill-intl-idn/Resources/unidata/ignored.php b/kirby/vendor/symfony/polyfill-intl-idn/Resources/unidata/ignored.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/symfony/polyfill-intl-idn/Resources/unidata/mapped.php b/kirby/vendor/symfony/polyfill-intl-idn/Resources/unidata/mapped.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/symfony/polyfill-intl-idn/Resources/unidata/virama.php b/kirby/vendor/symfony/polyfill-intl-idn/Resources/unidata/virama.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/symfony/polyfill-intl-idn/bootstrap.php b/kirby/vendor/symfony/polyfill-intl-idn/bootstrap.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/symfony/polyfill-intl-idn/bootstrap80.php b/kirby/vendor/symfony/polyfill-intl-idn/bootstrap80.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/symfony/polyfill-intl-idn/composer.json b/kirby/vendor/symfony/polyfill-intl-idn/composer.json old mode 100644 new mode 100755 index c5a2a46..71030a2 --- a/kirby/vendor/symfony/polyfill-intl-idn/composer.json +++ b/kirby/vendor/symfony/polyfill-intl-idn/composer.json @@ -34,7 +34,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", diff --git a/kirby/vendor/symfony/polyfill-intl-normalizer/LICENSE b/kirby/vendor/symfony/polyfill-intl-normalizer/LICENSE old mode 100644 new mode 100755 diff --git a/kirby/vendor/symfony/polyfill-intl-normalizer/Normalizer.php b/kirby/vendor/symfony/polyfill-intl-normalizer/Normalizer.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php b/kirby/vendor/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/canonicalComposition.php b/kirby/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/canonicalComposition.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/canonicalDecomposition.php b/kirby/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/canonicalDecomposition.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/combiningClass.php b/kirby/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/combiningClass.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/compatibilityDecomposition.php b/kirby/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/compatibilityDecomposition.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/symfony/polyfill-intl-normalizer/bootstrap.php b/kirby/vendor/symfony/polyfill-intl-normalizer/bootstrap.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/symfony/polyfill-intl-normalizer/bootstrap80.php b/kirby/vendor/symfony/polyfill-intl-normalizer/bootstrap80.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/symfony/polyfill-intl-normalizer/composer.json b/kirby/vendor/symfony/polyfill-intl-normalizer/composer.json old mode 100644 new mode 100755 index 393edf7..eb452bf --- a/kirby/vendor/symfony/polyfill-intl-normalizer/composer.json +++ b/kirby/vendor/symfony/polyfill-intl-normalizer/composer.json @@ -29,7 +29,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", diff --git a/kirby/vendor/symfony/polyfill-mbstring/LICENSE b/kirby/vendor/symfony/polyfill-mbstring/LICENSE old mode 100644 new mode 100755 diff --git a/kirby/vendor/symfony/polyfill-mbstring/Mbstring.php b/kirby/vendor/symfony/polyfill-mbstring/Mbstring.php old mode 100644 new mode 100755 index b65c54a..693749f --- a/kirby/vendor/symfony/polyfill-mbstring/Mbstring.php +++ b/kirby/vendor/symfony/polyfill-mbstring/Mbstring.php @@ -568,7 +568,7 @@ final class Mbstring } $rx .= '.{'.$split_length.'})/us'; - return preg_split($rx, $string, null, \PREG_SPLIT_DELIM_CAPTURE | \PREG_SPLIT_NO_EMPTY); + return preg_split($rx, $string, -1, \PREG_SPLIT_DELIM_CAPTURE | \PREG_SPLIT_NO_EMPTY); } $result = []; diff --git a/kirby/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php b/kirby/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php b/kirby/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php b/kirby/vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/symfony/polyfill-mbstring/bootstrap.php b/kirby/vendor/symfony/polyfill-mbstring/bootstrap.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/symfony/polyfill-mbstring/bootstrap80.php b/kirby/vendor/symfony/polyfill-mbstring/bootstrap80.php old mode 100644 new mode 100755 diff --git a/kirby/vendor/symfony/polyfill-mbstring/composer.json b/kirby/vendor/symfony/polyfill-mbstring/composer.json old mode 100644 new mode 100755 index 1fa21ca..9cd2e92 --- a/kirby/vendor/symfony/polyfill-mbstring/composer.json +++ b/kirby/vendor/symfony/polyfill-mbstring/composer.json @@ -31,7 +31,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", diff --git a/kirby/views/browser.php b/kirby/views/browser.php old mode 100644 new mode 100755 diff --git a/kirby/views/fatal.php b/kirby/views/fatal.php old mode 100644 new mode 100755 diff --git a/kirby/views/panel.php b/kirby/views/panel.php old mode 100644 new mode 100755 index 3ca733d..e9add9a --- a/kirby/views/panel.php +++ b/kirby/views/panel.php @@ -1,4 +1,7 @@ $icon): ?> - + diff --git a/kirby/views/php.php b/kirby/views/php.php old mode 100644 new mode 100755 diff --git a/kirby/views/snippets/footer.php b/kirby/views/snippets/footer.php old mode 100644 new mode 100755 diff --git a/kirby/views/snippets/header.php b/kirby/views/snippets/header.php old mode 100644 new mode 100755