From 9c89153d3588e4856d0270f418e462b9aac5db63 Mon Sep 17 00:00:00 2001 From: Bastian Allgeier Date: Tue, 25 Jun 2019 09:56:08 +0200 Subject: [PATCH] Upgrade to 3.2.0 --- kirby/bootstrap.php | 4 +- kirby/composer.json | 4 +- kirby/config/api/models/Language.php | 5 + kirby/config/api/models/Page.php | 4 +- kirby/config/api/models/Site.php | 4 + kirby/config/api/models/System.php | 11 +- kirby/config/api/routes.php | 1 + kirby/config/api/routes/auth.php | 8 +- kirby/config/api/routes/lock.php | 52 + kirby/config/api/routes/pages.php | 10 + kirby/config/components.php | 45 +- kirby/config/fields/checkboxes.php | 3 - kirby/config/fields/files.php | 130 +- kirby/config/fields/mixins/filepicker.php | 40 + kirby/config/fields/mixins/options.php | 5 + kirby/config/fields/mixins/pagepicker.php | 49 + kirby/config/fields/mixins/picker.php | 63 + kirby/config/fields/mixins/upload.php | 57 + kirby/config/fields/mixins/userpicker.php | 44 + kirby/config/fields/pages.php | 100 +- kirby/config/fields/radio.php | 3 - kirby/config/fields/select.php | 6 + kirby/config/fields/tags.php | 7 +- kirby/config/fields/textarea.php | 83 +- kirby/config/fields/users.php | 68 +- kirby/config/helpers.php | 35 +- kirby/config/methods.php | 123 +- kirby/config/presets/files.php | 8 + kirby/config/roots.php | 17 +- kirby/config/routes.php | 27 +- kirby/config/sections/files.php | 15 +- kirby/config/sections/mixins/help.php | 2 + kirby/config/sections/mixins/parent.php | 7 +- kirby/config/sections/pages.php | 18 +- kirby/config/{aliases.php => setup.php} | 31 +- kirby/config/tags.php | 11 +- kirby/config/tests.php | 15 - kirby/i18n/rules/LICENSE | 9 + kirby/i18n/rules/ar.json | 30 + kirby/i18n/rules/az.json | 16 + kirby/i18n/rules/bg.json | 65 + kirby/i18n/rules/cs.json | 20 + kirby/i18n/rules/da.json | 10 + kirby/i18n/rules/de.json | 9 + kirby/i18n/rules/el.json | 111 + kirby/i18n/rules/eo.json | 14 + kirby/i18n/rules/et.json | 14 + kirby/i18n/rules/fa.json | 34 + kirby/i18n/rules/fi.json | 6 + kirby/i18n/rules/fr.json | 34 + kirby/i18n/rules/hi.json | 66 + kirby/i18n/rules/hr.json | 12 + kirby/i18n/rules/hu.json | 20 + kirby/i18n/rules/hy.json | 79 + kirby/i18n/rules/it.json | 13 + kirby/i18n/rules/ka.json | 35 + kirby/i18n/rules/lt.json | 20 + kirby/i18n/rules/lv.json | 18 + kirby/i18n/rules/mk.json | 64 + kirby/i18n/rules/my.json | 121 + kirby/i18n/rules/nb.json | 8 + kirby/i18n/rules/pl.json | 20 + kirby/i18n/rules/pt_BR.json | 187 + kirby/i18n/rules/rm.json | 16 + kirby/i18n/rules/ru.json | 68 + kirby/i18n/rules/sr.json | 72 + kirby/i18n/rules/sv_SE.json | 8 + kirby/i18n/rules/tr.json | 14 + kirby/i18n/rules/uk.json | 10 + kirby/i18n/rules/vi.json | 92 + kirby/i18n/rules/zh.json | 6937 +++++++++++++++++ kirby/{ => i18n}/translations/bg.json | 31 + kirby/{ => i18n}/translations/ca.json | 43 +- kirby/{ => i18n}/translations/cs.json | 31 + kirby/{ => i18n}/translations/da.json | 43 +- kirby/{ => i18n}/translations/de.json | 33 +- kirby/{ => i18n}/translations/el.json | 31 + kirby/{ => i18n}/translations/en.json | 31 + kirby/{ => i18n}/translations/es_419.json | 31 + kirby/{ => i18n}/translations/es_ES.json | 55 +- kirby/{ => i18n}/translations/fa.json | 31 + kirby/{ => i18n}/translations/fi.json | 31 + kirby/{ => i18n}/translations/fr.json | 39 +- kirby/{ => i18n}/translations/hu.json | 31 + kirby/{ => i18n}/translations/id.json | 31 + kirby/{ => i18n}/translations/it.json | 31 + kirby/{ => i18n}/translations/ko.json | 31 + kirby/{ => i18n}/translations/nb.json | 31 + kirby/{ => i18n}/translations/nl.json | 45 +- kirby/{ => i18n}/translations/pl.json | 31 + kirby/{ => i18n}/translations/pt_BR.json | 31 + kirby/{ => i18n}/translations/pt_PT.json | 31 + kirby/{ => i18n}/translations/sk.json | 31 + kirby/{ => i18n}/translations/sv_SE.json | 31 + kirby/{ => i18n}/translations/tr.json | 39 +- kirby/panel/dist/css/app.css | 2 +- kirby/panel/dist/img/icons.svg | 7 + kirby/panel/dist/js/app.js | 2 +- kirby/panel/dist/js/plugins.js | 12 + kirby/panel/dist/js/vendor.js | 8 +- kirby/src/Api/Api.php | 37 +- kirby/src/Api/Collection.php | 7 +- kirby/src/Api/Model.php | 6 +- kirby/src/Cache/ApcuCache.php | 44 +- kirby/src/Cache/Cache.php | 161 +- kirby/src/Cache/FileCache.php | 112 +- kirby/src/Cache/MemCached.php | 107 +- kirby/src/Cache/MemoryCache.php | 83 + kirby/src/Cache/NullCache.php | 70 + kirby/src/Cache/Value.php | 72 +- kirby/src/Cms/Api.php | 98 +- kirby/src/Cms/App.php | 202 +- kirby/src/Cms/AppCaches.php | 36 +- kirby/src/Cms/AppErrors.php | 13 +- kirby/src/Cms/AppPlugins.php | 242 +- kirby/src/Cms/AppTranslations.php | 48 +- kirby/src/Cms/AppUsers.php | 34 +- kirby/src/Cms/Asset.php | 6 + kirby/src/Cms/Auth.php | 29 +- kirby/src/Cms/Blueprint.php | 43 +- kirby/src/Cms/Collection.php | 28 +- kirby/src/Cms/Collections.php | 10 +- kirby/src/Cms/Content.php | 33 +- kirby/src/Cms/ContentLock.php | 220 + kirby/src/Cms/ContentLocks.php | 226 + kirby/src/Cms/ContentTranslation.php | 32 +- kirby/src/Cms/Dir.php | 17 +- kirby/src/Cms/Email.php | 26 +- kirby/src/Cms/Field.php | 19 +- kirby/src/Cms/File.php | 266 +- kirby/src/Cms/FileActions.php | 56 +- kirby/src/Cms/FileBlueprint.php | 14 +- kirby/src/Cms/FileFoundation.php | 19 +- kirby/src/Cms/FileModifications.php | 45 +- kirby/src/Cms/FilePermissions.php | 9 + kirby/src/Cms/FileRules.php | 6 + kirby/src/Cms/FileVersion.php | 14 +- kirby/src/Cms/Filename.php | 5 +- kirby/src/Cms/Files.php | 23 +- kirby/src/Cms/Form.php | 11 + kirby/src/Cms/HasChildren.php | 37 +- kirby/src/Cms/HasFiles.php | 47 +- kirby/src/Cms/HasMethods.php | 9 + kirby/src/Cms/HasSiblings.php | 15 +- kirby/src/Cms/Html.php | 13 +- kirby/src/Cms/Ingredients.php | 14 +- kirby/src/Cms/KirbyTag.php | 16 +- kirby/src/Cms/KirbyTags.php | 12 +- kirby/src/Cms/Language.php | 103 +- kirby/src/Cms/LanguageRouter.php | 132 + kirby/src/Cms/LanguageRules.php | 55 + kirby/src/Cms/Languages.php | 20 +- kirby/src/Cms/Media.php | 108 +- kirby/src/Cms/Model.php | 29 +- kirby/src/Cms/ModelPermissions.php | 37 +- kirby/src/Cms/ModelWithContent.php | 216 +- kirby/src/Cms/Nest.php | 8 +- kirby/src/Cms/NestCollection.php | 9 + kirby/src/Cms/NestObject.php | 9 + kirby/src/Cms/Page.php | 226 +- kirby/src/Cms/PageActions.php | 143 +- kirby/src/Cms/PageBlueprint.php | 10 + kirby/src/Cms/PagePermissions.php | 9 + kirby/src/Cms/PageRules.php | 21 +- kirby/src/Cms/PageSiblings.php | 39 +- kirby/src/Cms/Pages.php | 100 +- kirby/src/Cms/Pagination.php | 20 +- kirby/src/Cms/Panel.php | 24 +- kirby/src/Cms/PanelPlugins.php | 168 +- kirby/src/Cms/Permissions.php | 21 +- kirby/src/Cms/Plugin.php | 11 +- kirby/src/Cms/PluginAssets.php | 10 +- kirby/src/Cms/R.php | 8 +- kirby/src/Cms/Responder.php | 15 +- kirby/src/Cms/Response.php | 12 +- kirby/src/Cms/Role.php | 66 +- kirby/src/Cms/Roles.php | 22 +- kirby/src/Cms/S.php | 8 +- kirby/src/Cms/Search.php | 22 + kirby/src/Cms/Section.php | 15 + kirby/src/Cms/Site.php | 95 +- kirby/src/Cms/SiteActions.php | 21 +- kirby/src/Cms/SiteBlueprint.php | 31 + kirby/src/Cms/SitePermissions.php | 9 + kirby/src/Cms/SiteRules.php | 7 +- kirby/src/Cms/Structure.php | 7 +- kirby/src/Cms/StructureObject.php | 25 +- kirby/src/Cms/System.php | 84 +- kirby/src/Cms/Template.php | 8 +- kirby/src/Cms/Translation.php | 8 +- kirby/src/Cms/Translations.php | 19 +- kirby/src/Cms/Url.php | 6 +- kirby/src/Cms/User.php | 216 +- kirby/src/Cms/UserActions.php | 29 +- kirby/src/Cms/UserBlueprint.php | 6 + kirby/src/Cms/UserPermissions.php | 9 + kirby/src/Cms/UserRules.php | 8 +- kirby/src/Cms/Users.php | 36 +- kirby/src/Cms/Visitor.php | 8 +- kirby/src/Data/Data.php | 65 +- kirby/src/Data/Handler.php | 14 +- kirby/src/Data/Json.php | 7 +- kirby/src/Data/PHP.php | 15 +- kirby/src/Data/Txt.php | 23 +- kirby/src/Data/Yaml.php | 12 +- kirby/src/Database/Database.php | 24 +- kirby/src/Database/Db.php | 16 +- kirby/src/Database/Query.php | 58 +- kirby/src/Database/Sql.php | 8 +- kirby/src/Database/Sql/Mysql.php | 6 + kirby/src/Database/Sql/Sqlite.php | 6 + kirby/src/Email/Body.php | 6 +- kirby/src/Email/Email.php | 11 +- kirby/src/Email/PHPMailer.php | 6 +- .../src/Exception/BadMethodCallException.php | 10 + kirby/src/Exception/DuplicateException.php | 11 + kirby/src/Exception/Exception.php | 136 +- .../Exception/InvalidArgumentException.php | 10 + kirby/src/Exception/LogicException.php | 10 + kirby/src/Exception/NotFoundException.php | 10 + kirby/src/Exception/PermissionException.php | 11 + kirby/src/Form/Field.php | 31 +- kirby/src/Form/Fields.php | 7 +- kirby/src/Form/Form.php | 9 +- kirby/src/Form/Options.php | 13 +- kirby/src/Form/OptionsApi.php | 8 +- kirby/src/Form/OptionsQuery.php | 6 + kirby/src/Form/Validations.php | 8 +- kirby/src/Http/Cookie.php | 5 +- .../Http/Exceptions/NextRouteException.php | 9 + kirby/src/Http/Header.php | 5 +- kirby/src/Http/Idn.php | 6 +- kirby/src/Http/Params.php | 7 +- kirby/src/Http/Path.php | 6 + kirby/src/Http/Query.php | 6 + kirby/src/Http/Remote.php | 8 +- kirby/src/Http/Request.php | 57 +- kirby/src/Http/Request/Body.php | 6 +- kirby/src/Http/Request/Data.php | 8 +- kirby/src/Http/Request/Files.php | 6 +- kirby/src/Http/Request/Query.php | 6 +- kirby/src/Http/Response.php | 8 +- kirby/src/Http/Route.php | 13 +- kirby/src/Http/Router.php | 24 +- kirby/src/Http/Server.php | 6 +- kirby/src/Http/Uri.php | 97 +- kirby/src/Http/Url.php | 27 +- kirby/src/Http/Visitor.php | 15 +- kirby/src/Image/Camera.php | 18 +- kirby/src/Image/Darkroom.php | 6 + kirby/src/Image/Darkroom/GdLib.php | 9 + kirby/src/Image/Darkroom/ImageMagick.php | 27 +- kirby/src/Image/Dimensions.php | 40 +- kirby/src/Image/Exif.php | 14 +- kirby/src/Image/Image.php | 20 +- kirby/src/Image/Location.php | 20 +- kirby/src/Session/AutoSession.php | 16 +- kirby/src/Session/FileSessionStore.php | 8 +- kirby/src/Session/Session.php | 12 +- kirby/src/Session/SessionData.php | 9 +- kirby/src/Session/SessionStore.php | 6 +- kirby/src/Session/Sessions.php | 24 +- kirby/src/Text/KirbyTag.php | 20 +- kirby/src/Text/KirbyTags.php | 6 + kirby/src/Text/Markdown.php | 6 +- kirby/src/Text/SmartyPants.php | 6 +- kirby/src/Toolkit/A.php | 5 +- kirby/src/Toolkit/Collection.php | 56 +- kirby/src/Toolkit/Component.php | 9 +- kirby/src/Toolkit/Config.php | 6 +- kirby/src/Toolkit/Controller.php | 7 +- kirby/src/Toolkit/Dir.php | 17 +- kirby/src/Toolkit/Escape.php | 7 +- kirby/src/Toolkit/F.php | 9 +- kirby/src/Toolkit/Facade.php | 6 + kirby/src/Toolkit/File.php | 14 +- kirby/src/Toolkit/Html.php | 53 +- kirby/src/Toolkit/I18n.php | 6 + kirby/src/Toolkit/Iterator.php | 6 + kirby/src/Toolkit/Mime.php | 30 +- kirby/src/Toolkit/Obj.php | 8 +- kirby/src/Toolkit/Pagination.php | 8 +- kirby/src/Toolkit/Properties.php | 10 +- kirby/src/Toolkit/Query.php | 137 +- kirby/src/Toolkit/Silo.php | 6 +- kirby/src/Toolkit/Str.php | 45 +- kirby/src/Toolkit/Tpl.php | 7 +- kirby/src/Toolkit/V.php | 31 +- kirby/src/Toolkit/View.php | 6 +- kirby/src/Toolkit/Xml.php | 16 +- kirby/vendor/composer/autoload_files.php | 4 +- kirby/vendor/composer/autoload_static.php | 4 +- .../src/ComposerInstaller/CmsInstaller.php | 2 +- .../src/ComposerInstaller/Installer.php | 2 +- .../src/ComposerInstaller/Plugin.php | 2 +- .../src/ComposerInstaller/PluginInstaller.php | 2 +- 296 files changed, 14408 insertions(+), 2504 deletions(-) create mode 100755 kirby/config/api/routes/lock.php create mode 100755 kirby/config/fields/mixins/filepicker.php create mode 100755 kirby/config/fields/mixins/pagepicker.php create mode 100755 kirby/config/fields/mixins/picker.php create mode 100755 kirby/config/fields/mixins/upload.php create mode 100755 kirby/config/fields/mixins/userpicker.php rename kirby/config/{aliases.php => setup.php} (78%) delete mode 100755 kirby/config/tests.php create mode 100755 kirby/i18n/rules/LICENSE create mode 100755 kirby/i18n/rules/ar.json create mode 100755 kirby/i18n/rules/az.json create mode 100755 kirby/i18n/rules/bg.json create mode 100755 kirby/i18n/rules/cs.json create mode 100755 kirby/i18n/rules/da.json create mode 100755 kirby/i18n/rules/de.json create mode 100755 kirby/i18n/rules/el.json create mode 100755 kirby/i18n/rules/eo.json create mode 100755 kirby/i18n/rules/et.json create mode 100755 kirby/i18n/rules/fa.json create mode 100755 kirby/i18n/rules/fi.json create mode 100755 kirby/i18n/rules/fr.json create mode 100755 kirby/i18n/rules/hi.json create mode 100755 kirby/i18n/rules/hr.json create mode 100755 kirby/i18n/rules/hu.json create mode 100755 kirby/i18n/rules/hy.json create mode 100755 kirby/i18n/rules/it.json create mode 100755 kirby/i18n/rules/ka.json create mode 100755 kirby/i18n/rules/lt.json create mode 100755 kirby/i18n/rules/lv.json create mode 100755 kirby/i18n/rules/mk.json create mode 100755 kirby/i18n/rules/my.json create mode 100755 kirby/i18n/rules/nb.json create mode 100755 kirby/i18n/rules/pl.json create mode 100755 kirby/i18n/rules/pt_BR.json create mode 100755 kirby/i18n/rules/rm.json create mode 100755 kirby/i18n/rules/ru.json create mode 100755 kirby/i18n/rules/sr.json create mode 100755 kirby/i18n/rules/sv_SE.json create mode 100755 kirby/i18n/rules/tr.json create mode 100755 kirby/i18n/rules/uk.json create mode 100755 kirby/i18n/rules/vi.json create mode 100755 kirby/i18n/rules/zh.json rename kirby/{ => i18n}/translations/bg.json (94%) rename kirby/{ => i18n}/translations/ca.json (89%) rename kirby/{ => i18n}/translations/cs.json (92%) rename kirby/{ => i18n}/translations/da.json (90%) rename kirby/{ => i18n}/translations/de.json (91%) rename kirby/{ => i18n}/translations/el.json (94%) rename kirby/{ => i18n}/translations/en.json (91%) rename kirby/{ => i18n}/translations/es_419.json (92%) rename kirby/{ => i18n}/translations/es_ES.json (89%) rename kirby/{ => i18n}/translations/fa.json (93%) rename kirby/{ => i18n}/translations/fi.json (92%) rename kirby/{ => i18n}/translations/fr.json (90%) rename kirby/{ => i18n}/translations/hu.json (92%) rename kirby/{ => i18n}/translations/id.json (91%) rename kirby/{ => i18n}/translations/it.json (91%) rename kirby/{ => i18n}/translations/ko.json (92%) rename kirby/{ => i18n}/translations/nb.json (92%) rename kirby/{ => i18n}/translations/nl.json (89%) rename kirby/{ => i18n}/translations/pl.json (92%) rename kirby/{ => i18n}/translations/pt_BR.json (92%) rename kirby/{ => i18n}/translations/pt_PT.json (92%) rename kirby/{ => i18n}/translations/sk.json (92%) rename kirby/{ => i18n}/translations/sv_SE.json (92%) rename kirby/{ => i18n}/translations/tr.json (90%) create mode 100755 kirby/src/Cache/MemoryCache.php create mode 100755 kirby/src/Cache/NullCache.php create mode 100755 kirby/src/Cms/ContentLock.php create mode 100755 kirby/src/Cms/ContentLocks.php create mode 100755 kirby/src/Cms/LanguageRouter.php create mode 100755 kirby/src/Cms/LanguageRules.php diff --git a/kirby/bootstrap.php b/kirby/bootstrap.php index 7f1e65d..0f593d0 100755 --- a/kirby/bootstrap.php +++ b/kirby/bootstrap.php @@ -25,10 +25,8 @@ if (is_file($autoloader = dirname(__DIR__) . '/vendor/autoload.php')) { } else { /** - * If neither one exists, don't bother searching + * If neither one exists, don't bother searching; * it's a custom directory setup and the users need to * load the autoloader themselves */ } - -define('DS', '/'); diff --git a/kirby/composer.json b/kirby/composer.json index b48e8b3..e0ef1cc 100755 --- a/kirby/composer.json +++ b/kirby/composer.json @@ -1,7 +1,7 @@ { "name": "getkirby/cms", "description": "The Kirby 3 core", - "version": "3.1.4", + "version": "3.2.0", "license": "proprietary", "keywords": ["kirby", "cms", "core"], "homepage": "https://getkirby.com", @@ -33,7 +33,7 @@ "zendframework/zend-escaper": "2.6.0" }, "autoload": { - "files": ["config/helpers.php", "config/aliases.php", "config/tests.php"], + "files": ["config/setup.php"], "classmap": ["dependencies/"], "psr-4": { "Kirby\\": "src/" diff --git a/kirby/config/api/models/Language.php b/kirby/config/api/models/Language.php index 0134883..f05626f 100755 --- a/kirby/config/api/models/Language.php +++ b/kirby/config/api/models/Language.php @@ -22,6 +22,9 @@ return [ 'name' => function (Language $language) { return $language->name(); }, + 'rules' => function (Language $language) { + return $language->rules(); + }, 'url' => function (Language $language) { return $language->url(); }, @@ -32,6 +35,8 @@ return [ 'code', 'default', 'name', + 'rules', + 'direction' ] ] ]; diff --git a/kirby/config/api/models/Page.php b/kirby/config/api/models/Page.php index 8b82b81..efadb03 100755 --- a/kirby/config/api/models/Page.php +++ b/kirby/config/api/models/Page.php @@ -35,6 +35,9 @@ return [ 'hasDrafts' => function (Page $page) { return $page->hasDrafts(); }, + 'hasFiles' => function (Page $page) { + return $page->hasFiles(); + }, 'id' => function (Page $page) { return $page->id(); }, @@ -125,7 +128,6 @@ return [ 'id', 'blueprint', 'content', - 'errors', 'status', 'options', 'next' => ['id', 'slug', 'title'], diff --git a/kirby/config/api/models/Site.php b/kirby/config/api/models/Site.php index e44dede..8909837 100755 --- a/kirby/config/api/models/Site.php +++ b/kirby/config/api/models/Site.php @@ -29,6 +29,9 @@ return [ 'options' => function (Site $site) { return $site->permissions()->toArray(); }, + 'previewUrl' => function (Site $site) { + return $site->previewUrl(); + }, 'title' => function (Site $site) { return $site->title()->value(); }, @@ -53,6 +56,7 @@ return [ 'blueprint', 'content', 'options', + 'previewUrl', 'url' ], 'selector' => [ diff --git a/kirby/config/api/models/System.php b/kirby/config/api/models/System.php index 1fa5041..3943ba0 100755 --- a/kirby/config/api/models/System.php +++ b/kirby/config/api/models/System.php @@ -1,12 +1,16 @@ [ + 'ascii' => function () { + return Str::$ascii; + }, 'isOk' => function (System $system) { return $system->isOk(); }, @@ -38,6 +42,9 @@ return [ return $this->site()->title()->value(); } }, + 'slugs' => function () { + return Str::$language; + }, 'title' => function () { return $this->site()->title()->value(); }, @@ -82,6 +89,7 @@ return [ 'requirements' ], 'panel' => [ + 'ascii', 'breadcrumbTitle', 'isOk', 'isInstalled', @@ -91,10 +99,11 @@ return [ 'license', 'multilang', 'requirements', + 'slugs', 'title', 'translation', 'user' => 'auth', - 'version' + 'version' ] ], ]; diff --git a/kirby/config/api/routes.php b/kirby/config/api/routes.php index 1d6bdf6..fd3449d 100755 --- a/kirby/config/api/routes.php +++ b/kirby/config/api/routes.php @@ -11,6 +11,7 @@ return function ($kirby) { include __DIR__ . '/routes/site.php', include __DIR__ . '/routes/users.php', include __DIR__ . '/routes/files.php', + include __DIR__ . '/routes/lock.php', include __DIR__ . '/routes/system.php', include __DIR__ . '/routes/translations.php' ); diff --git a/kirby/config/api/routes/auth.php b/kirby/config/api/routes/auth.php index 6f2371e..94170d6 100755 --- a/kirby/config/api/routes/auth.php +++ b/kirby/config/api/routes/auth.php @@ -43,8 +43,14 @@ return [ 'user' => $this->resolve($user)->view('auth')->toArray() ]; } + + throw new NotFoundException(['key' => 'user.undefined']); } catch (Throwable $e) { - // catch any kind of login error + if ($this->kirby()->option('debug') === true) { + throw $e; + } else { + // catch any kind of login error + } } throw new InvalidArgumentException('Invalid email or password'); diff --git a/kirby/config/api/routes/lock.php b/kirby/config/api/routes/lock.php new file mode 100755 index 0000000..28d642e --- /dev/null +++ b/kirby/config/api/routes/lock.php @@ -0,0 +1,52 @@ + '(:all)/lock', + 'method' => 'GET', + 'action' => function (string $path) { + return $this->parent($path)->lock()->get(); + } + ], + [ + 'pattern' => '(:all)/lock', + 'method' => 'PATCH', + 'action' => function (string $path) { + return $this->parent($path)->lock()->create(); + } + ], + [ + 'pattern' => '(:all)/lock', + 'method' => 'DELETE', + 'action' => function (string $path) { + return $this->parent($path)->lock()->remove(); + } + ], + [ + 'pattern' => '(:all)/unlock', + 'method' => 'GET', + 'action' => function (string $path) { + return [ + 'isUnlocked' => $this->parent($path)->lock()->isUnlocked() + ]; + } + ], + [ + 'pattern' => '(:all)/unlock', + 'method' => 'PATCH', + 'action' => function (string $path) { + return $this->parent($path)->lock()->unlock(); + } + ], + [ + 'pattern' => '(:all)/unlock', + 'method' => 'DELETE', + 'action' => function (string $path) { + return $this->parent($path)->lock()->resolve(); + } + ], +]; diff --git a/kirby/config/api/routes/pages.php b/kirby/config/api/routes/pages.php index 233d76d..8101c2e 100755 --- a/kirby/config/api/routes/pages.php +++ b/kirby/config/api/routes/pages.php @@ -62,6 +62,16 @@ return [ } } ], + [ + 'pattern' => 'pages/(:any)/duplicate', + 'method' => 'POST', + 'action' => function (string $id) { + return $this->page($id)->duplicate($this->requestBody('slug'), [ + 'children' => $this->requestBody('children'), + 'files' => $this->requestBody('files'), + ]); + } + ], [ 'pattern' => 'pages/(:any)/slug', 'method' => 'PATCH', diff --git a/kirby/config/components.php b/kirby/config/components.php index 15f98c3..0fb8532 100755 --- a/kirby/config/components.php +++ b/kirby/config/components.php @@ -13,6 +13,7 @@ use Kirby\Exception\NotFoundException; use Kirby\Image\Darkroom; use Kirby\Text\Markdown; use Kirby\Text\SmartyPants; +use Kirby\Toolkit\A; use Kirby\Toolkit\F; use Kirby\Toolkit\Tpl as Snippet; @@ -53,20 +54,16 @@ return [ return $file; } - // pre-calculate all thumb attributes - $darkroom = Darkroom::factory(option('thumbs.driver', 'gd'), option('thumbs', [])); - $attributes = $darkroom->preprocess($file->root(), $options); - // create url and root $mediaRoot = dirname($file->mediaRoot()); $dst = $mediaRoot . '/{{ name }}{{ attributes }}.{{ extension }}'; - $thumbRoot = (new Filename($file->root(), $dst, $attributes))->toString(); + $thumbRoot = (new Filename($file->root(), $dst, $options))->toString(); $thumbName = basename($thumbRoot); $job = $mediaRoot . '/.jobs/' . $thumbName . '.json'; if (file_exists($thumbRoot) === false) { try { - Data::write($job, array_merge($attributes, [ + Data::write($job, array_merge($options, [ 'filename' => $file->filename() ])); } catch (Throwable $e) { @@ -104,8 +101,14 @@ return [ */ 'markdown' => function (App $kirby, string $text = null, array $options = [], bool $inline = false): string { static $markdown; + static $config; - $markdown = $markdown ?? new Markdown($options); + // if the config options have changed or the component is called for the first time, + // (re-)initialize the parser object + if ($config !== $options) { + $markdown = new Markdown($options); + $config = $options; + } return $markdown->parse($text, $inline); }, @@ -120,8 +123,14 @@ return [ */ 'smartypants' => function (App $kirby, string $text = null, array $options = []): string { static $smartypants; + static $config; - $smartypants = $smartypants ?? new Smartypants($options); + // if the config options have changed or the component is called for the first time, + // (re-)initialize the parser object + if ($config !== $options) { + $smartypants = new Smartypants($options); + $config = $options; + } return $smartypants->parse($text); }, @@ -130,15 +139,23 @@ return [ * Add your own snippet loader * * @param Kirby\Cms\App $kirby Kirby instance - * @param string $name Snippet name + * @param string|array $name Snippet name * @param array $data Data array for the snippet * @return string|null */ - 'snippet' => function (App $kirby, string $name, array $data = []): ?string { - $file = $kirby->root('snippets') . '/' . $name . '.php'; + 'snippet' => function (App $kirby, $name, array $data = []): ?string { + $snippets = A::wrap($name); - if (file_exists($file) === false) { - $file = $kirby->extensions('snippets')[$name] ?? null; + foreach ($snippets as $name) { + $file = $kirby->root('snippets') . '/' . $name . '.php'; + + if (file_exists($file) === false) { + $file = $kirby->extensions('snippets')[$name] ?? null; + } + + if ($file) { + break; + } } return Snippet::load($file, $data); @@ -171,7 +188,7 @@ return [ $options = $darkroom->preprocess($src, $options); $root = (new Filename($src, $dst, $options))->toString(); - F::copy($src, $root); + F::copy($src, $root, true); $darkroom->process($root, $options); return $root; diff --git a/kirby/config/fields/checkboxes.php b/kirby/config/fields/checkboxes.php index 065db4f..6837b45 100755 --- a/kirby/config/fields/checkboxes.php +++ b/kirby/config/fields/checkboxes.php @@ -43,9 +43,6 @@ return [ }, ], 'computed' => [ - 'options' => function (): array { - return $this->getOptions(); - }, 'default' => function () { return $this->sanitizeOptions($this->default); }, diff --git a/kirby/config/fields/files.php b/kirby/config/fields/files.php index fd6ebeb..b0f7aad 100755 --- a/kirby/config/fields/files.php +++ b/kirby/config/fields/files.php @@ -3,7 +3,12 @@ use Kirby\Toolkit\A; return [ - 'mixins' => ['min'], + 'mixins' => [ + 'picker', + 'filepicker', + 'min', + 'upload' + ], 'props' => [ /** * Unset inherited props @@ -21,27 +26,6 @@ return [ return $default; }, - /** - * The placeholder text if no pages have been selected yet - */ - 'empty' => function ($empty = null) { - return I18n::translate($empty, $empty); - }, - - /** - * Image settings for each item - */ - 'image' => function (array $image = null) { - return $image ?? []; - }, - - /** - * Info text - */ - 'info' => function (string $info = null) { - return $info; - }, - /** * Changes the layout of the selected files. Available layouts: `list`, `cards` */ @@ -49,48 +33,13 @@ return [ return $layout; }, - /** - * Minimum number of required files - */ - 'min' => function (int $min = null) { - return $min; - }, - - /** - * Maximum number of allowed files - */ - 'max' => function (int $max = null) { - return $max; - }, - - /** - * If false, only a single file can be selected - */ - 'multiple' => function (bool $multiple = true) { - return $multiple; - }, - - /** - * Query for the files to be included - */ - 'query' => function (string $query = null) { - return $query; - }, - /** * Layout size for cards: `tiny`, `small`, `medium`, `large` or `huge` */ - 'size' => function (string $size = null) { + 'size' => function (string $size = 'auto') { return $size; }, - /** - * Main text - */ - 'text' => function (string $text = '{{ file.filename }}') { - return $text; - }, - 'value' => function ($value = null) { return $value; } @@ -118,38 +67,15 @@ return [ ], 'methods' => [ 'fileResponse' => function ($file) { - if ($this->layout === 'list') { - $thumb = [ - 'width' => 100, - 'height' => 100 - ]; - } else { - $thumb = [ - 'width' => 400, - 'height' => 400 - ]; - } - - $image = $file->panelImage($this->image, $thumb); - $model = $this->model(); - $uuid = $file->parent() === $model ? $file->filename() : $file->id(); - - return [ - 'filename' => $file->filename(), - 'text' => $file->toString($this->text), - 'link' => $file->panelUrl(true), - 'id' => $file->id(), - 'uuid' => $uuid, - 'url' => $file->url(), - 'info' => $file->toString($this->info ?? false), - 'image' => $image, - 'icon' => $file->panelIcon($image), - 'type' => $file->type(), - ]; + return $file->panelPickerData([ + 'image' => $this->image, + 'info' => $this->info ?? false, + 'model' => $this->model(), + 'text' => $this->text, + ]); }, 'toFiles' => function ($value = null) { $files = []; - $kirby = kirby(); foreach (Yaml::decode($value) as $id) { if (is_array($id) === true) { @@ -168,16 +94,32 @@ return [ return [ [ 'pattern' => '/', - 'action' => function () { + 'action' => function () { $field = $this->field(); - $files = $field->model()->query($field->query(), 'Kirby\Cms\Files'); - $data = []; - foreach ($files as $index => $file) { - $data[] = $field->fileResponse($file); - } + return $field->filepicker([ + 'query' => $field->query(), + 'image' => $field->image(), + 'info' => $field->info(), + 'text' => $field->text() + ]); + } + ], + [ + 'pattern' => 'upload', + 'method' => 'POST', + 'action' => function () { + $field = $this->field(); + $uploads = $field->uploads(); - return $data; + return $field->upload($this, $uploads, function ($file) use ($field) { + return $file->panelPickerData([ + 'image' => $field->image(), + 'info' => $field->info(), + 'model' => $field->model(), + 'text' => $field->text(), + ]); + }); } ] ]; diff --git a/kirby/config/fields/mixins/filepicker.php b/kirby/config/fields/mixins/filepicker.php new file mode 100755 index 0000000..d288f88 --- /dev/null +++ b/kirby/config/fields/mixins/filepicker.php @@ -0,0 +1,40 @@ + [ + 'filepicker' => function (array $params = []) { + + // fetch the parent model + $model = $this->model(); + + // find the right default query + if (empty($params['query']) === false) { + $query = $params['query']; + } elseif (is_a($model, 'Kirby\Cms\File') === true) { + $query = 'file.siblings'; + } else { + $query = $model::CLASS_ALIAS . '.files'; + } + + // fetch all files for the picker + $files = $model->query($query, 'Kirby\Cms\Files'); + $data = []; + + // prepare the response for each file + foreach ($files as $index => $file) { + if (empty($params['map']) === false) { + $data[] = $params['map']($file); + } else { + $data[] = $file->panelPickerData([ + 'image' => $params['image'] ?? [], + 'info' => $params['info'] ?? false, + 'model' => $model, + 'text' => $params['text'] ?? '{{ file.filename }}', + ]); + } + } + + return $data; + } + ] +]; diff --git a/kirby/config/fields/mixins/options.php b/kirby/config/fields/mixins/options.php index 7e60056..170761a 100755 --- a/kirby/config/fields/mixins/options.php +++ b/kirby/config/fields/mixins/options.php @@ -23,6 +23,11 @@ return [ return $query; }, ], + 'computed' => [ + 'options' => function (): array { + return $this->getOptions(); + } + ], 'methods' => [ 'getOptions' => function () { return Options::factory( diff --git a/kirby/config/fields/mixins/pagepicker.php b/kirby/config/fields/mixins/pagepicker.php new file mode 100755 index 0000000..62bc77a --- /dev/null +++ b/kirby/config/fields/mixins/pagepicker.php @@ -0,0 +1,49 @@ + [ + 'pagepicker' => function (array $params = []) { + $query = $params['query'] ?? null; + $model = $this->model(); + $site = $this->kirby()->site(); + + if ($query) { + $pages = $model->query($query, 'Kirby\Cms\Pages'); + $self = null; + } else { + if (!$parent = $site->find($params['parent'] ?? null)) { + $parent = $site; + } + + $pages = $parent->children(); + $self = [ + 'id' => $parent->id() == '' ? null : $parent->id(), + 'title' => $parent->title()->value(), + 'parent' => is_a($parent->parent(), Page::class) === true ? $parent->parent()->id() : null, + ]; + } + + $children = []; + + foreach ($pages as $index => $page) { + if ($page->isReadable() === true) { + if (empty($params['map']) === false) { + $children[] = $params['map']($page); + } else { + $children[] = $page->panelPickerData([ + 'image' => $params['image'] ?? [], + 'info' => $params['info'] ?? false, + 'model' => $model, + 'text' => $params['text'] ?? null, + ]); + } + } + } + + return [ + 'model' => $self, + 'pages' => $children + ]; + } + ] +]; diff --git a/kirby/config/fields/mixins/picker.php b/kirby/config/fields/mixins/picker.php new file mode 100755 index 0000000..f713f82 --- /dev/null +++ b/kirby/config/fields/mixins/picker.php @@ -0,0 +1,63 @@ + [ + /** + * The placeholder text if none have been selected yet + */ + 'empty' => function ($empty = null) { + return I18n::translate($empty, $empty); + }, + + /** + * Image settings for each item + */ + 'image' => function (array $image = null) { + return $image ?? []; + }, + + /** + * Info text for each item + */ + 'info' => function (string $info = null) { + return $info; + }, + + /** + * The minimum number of required selected + */ + 'min' => function (int $min = null) { + return $min; + }, + + /** + * The maximum number of allowed selected + */ + 'max' => function (int $max = null) { + return $max; + }, + + /** + * If `false`, only a single one can be selected + */ + 'multiple' => function (bool $multiple = true) { + return $multiple; + }, + + /** + * Query for the items to be included in the picker + */ + 'query' => function (string $query = null) { + return $query; + }, + + /** + * Main text for each item + */ + 'text' => function (string $text = '{{ file.filename }}') { + return $text; + }, + + ], +]; diff --git a/kirby/config/fields/mixins/upload.php b/kirby/config/fields/mixins/upload.php new file mode 100755 index 0000000..b2e6f75 --- /dev/null +++ b/kirby/config/fields/mixins/upload.php @@ -0,0 +1,57 @@ + [ + /** + * Sets the upload options for linked files + */ + 'uploads' => function ($uploads = []) { + if ($uploads === false) { + return false; + } + + if (is_string($uploads) === true) { + return ['template' => $uploads]; + } + + if (is_array($uploads) === false) { + $uploads = []; + } + + return $uploads; + }, + ], + 'methods' => [ + 'upload' => function (Api $api, $params, Closure $map) { + if ($params === false) { + throw new Exception('Uploads are disabled for this field'); + } + + if ($parentQuery = ($params['parent'] ?? null)) { + $parent = $this->model()->query($parentQuery); + } else { + $parent = $this->model(); + } + + if (is_a($parent, 'Kirby\Cms\File') === true) { + $parent = $parent->parent(); + } + + return $api->upload(function ($source, $filename) use ($parent, $params, $map) { + $file = $parent->createFile([ + 'source' => $source, + 'template' => $params['template'] ?? null, + 'filename' => $filename, + ]); + + if (is_a($file, 'Kirby\Cms\File') === false) { + throw new Exception('The file could not be uploaded'); + } + + return $map($file); + }); + } + ] +]; diff --git a/kirby/config/fields/mixins/userpicker.php b/kirby/config/fields/mixins/userpicker.php new file mode 100755 index 0000000..1432bed --- /dev/null +++ b/kirby/config/fields/mixins/userpicker.php @@ -0,0 +1,44 @@ + [ + 'userpicker' => function (array $params = []) { + + // fetch the parent model + $model = $this->model(); + + // find the right default query + if (empty($params['query']) === false) { + $query = $params['query']; + } elseif (is_a($model, 'Kirby\Cms\User') === true) { + $query = 'user.siblings'; + } else { + $query = 'kirby.users'; + } + + // fetch all users for the picker + $users = $model->query($query, 'Kirby\Cms\Users'); + $data = []; + + if (!$users) { + return []; + } + + // prepare the response for each user + foreach ($users->sortBy('username', 'asc') as $index => $user) { + if (empty($params['map']) === false) { + $data[] = $params['map']($user); + } else { + $data[] = $user->panelPickerData([ + 'image' => $params['image'] ?? [], + 'info' => $params['info'] ?? false, + 'model' => $model, + 'text' => $params['text'] ?? '{{ user.username }}', + ]); + } + } + + return $data; + } + ] +]; diff --git a/kirby/config/fields/pages.php b/kirby/config/fields/pages.php index b560b48..3a35ed8 100755 --- a/kirby/config/fields/pages.php +++ b/kirby/config/fields/pages.php @@ -4,7 +4,7 @@ use Kirby\Toolkit\A; use Kirby\Toolkit\I18n; return [ - 'mixins' => ['min'], + 'mixins' => ['min', 'pagepicker', 'picker'], 'props' => [ /** * Unset inherited props @@ -22,13 +22,6 @@ return [ return $this->toPages($default); }, - /** - * The placeholder text if no pages have been selected yet - */ - 'empty' => function ($empty = null) { - return I18n::translate($empty, $empty); - }, - /** * Image settings for each item */ @@ -37,7 +30,7 @@ return [ }, /** - * Info text + * Info text for each item */ 'info' => function (string $info = null) { return $info; @@ -50,27 +43,6 @@ return [ return $layout; }, - /** - * The minimum number of required selected pages - */ - 'min' => function (int $min = null) { - return $min; - }, - - /** - * The maximum number of allowed selected pages - */ - 'max' => function (int $max = null) { - return $max; - }, - - /** - * If `false`, only a single page can be selected - */ - 'multiple' => function (bool $multiple = true) { - return $multiple; - }, - /** * Optional query to select a specific set of pages */ @@ -81,12 +53,12 @@ return [ /** * Layout size for cards: `tiny`, `small`, `medium`, `large` or `huge` */ - 'size' => function (string $size = null) { + 'size' => function (string $size = 'auto') { return $size; }, /** - * Main text + * Main text for each item */ 'text' => function (string $text = null) { return $text; @@ -98,30 +70,11 @@ return [ ], 'methods' => [ 'pageResponse' => function ($page) { - if ($this->layout === 'list') { - $thumb = [ - 'width' => 100, - 'height' => 100 - ]; - } else { - $thumb = [ - 'width' => 400, - 'height' => 400 - ]; - } - - $image = $page->panelImage($this->image, $thumb); - $model = $this->model(); - - return [ - 'text' => $page->toString($this->text ?? '{{ page.title }}'), - 'link' => $page->panelUrl(true), - 'id' => $page->id(), - 'info' => $page->toString($this->info ?? false), - 'image' => $image, - 'icon' => $page->panelIcon($image), - 'hasChildren' => $page->hasChildren(), - ]; + return $page->panelPickerData([ + 'image' => $this->image, + 'info' => $this->info, + 'text' => $this->text, + ]); }, 'toPages' => function ($value = null) { $pages = []; @@ -146,35 +99,14 @@ return [ 'pattern' => '/', 'action' => function () { $field = $this->field(); - $query = $field->query(); - if ($query) { - $pages = $field->model()->query($query, 'Kirby\Cms\Pages'); - $model = null; - } else { - if (!$parent = $this->site()->find($this->requestQuery('parent'))) { - $parent = $this->site(); - } - - $pages = $parent->children(); - $model = [ - 'id' => $parent->id() == '' ? null : $parent->id(), - 'title' => $parent->title()->value() - ]; - } - - $children = []; - - foreach ($pages as $index => $page) { - if ($page->isReadable() === true) { - $children[] = $field->pageResponse($page); - } - } - - return [ - 'model' => $model, - 'pages' => $children - ]; + return $field->pagepicker([ + 'image' => $field->image(), + 'info' => $field->info(), + 'parent' => $this->requestQuery('parent'), + 'query' => $field->query(), + 'text' => $field->text() + ]); } ] ]; diff --git a/kirby/config/fields/radio.php b/kirby/config/fields/radio.php index 750e2ad..dd9ffc3 100755 --- a/kirby/config/fields/radio.php +++ b/kirby/config/fields/radio.php @@ -19,9 +19,6 @@ return [ }, ], 'computed' => [ - 'options' => function (): array { - return $this->getOptions(); - }, 'default' => function () { return $this->sanitizeOption($this->default); }, diff --git a/kirby/config/fields/select.php b/kirby/config/fields/select.php index b6bfb4f..24b14b6 100755 --- a/kirby/config/fields/select.php +++ b/kirby/config/fields/select.php @@ -14,5 +14,11 @@ return [ 'icon' => function (string $icon = null) { return $icon; }, + /** + * Custom placeholder string for empty option. + */ + 'placeholder' => function (string $placeholder = '—') { + return $placeholder; + }, ] ]; diff --git a/kirby/config/fields/tags.php b/kirby/config/fields/tags.php index a38f677..8177985 100755 --- a/kirby/config/fields/tags.php +++ b/kirby/config/fields/tags.php @@ -43,9 +43,6 @@ return [ }, ], 'computed' => [ - 'options' => function () { - return $this->getOptions(); - }, 'default' => function (): array { return $this->toTags($this->default); }, @@ -55,6 +52,10 @@ return [ ], 'methods' => [ 'toTags' => function ($value) { + if (is_null($value) === true) { + return []; + } + $options = $this->options(); // transform into value-text objects diff --git a/kirby/config/fields/textarea.php b/kirby/config/fields/textarea.php index 9842aa1..194d990 100755 --- a/kirby/config/fields/textarea.php +++ b/kirby/config/fields/textarea.php @@ -1,6 +1,7 @@ ['filepicker', 'upload'], 'props' => [ /** * Unset inherited props @@ -44,6 +45,13 @@ return [ return $files; }, + /** + * Sets the font family (sans or monospace) + */ + 'font' => function (string $font = null) { + return $font === 'monospace' ? 'monospace' : 'sans-serif'; + }, + /** * Maximum number of allowed characters */ @@ -65,24 +73,6 @@ return [ return $size; }, - /** - * Sets the upload options for linked files - */ - 'uploads' => function ($uploads = []) { - if ($uploads === false) { - return false; - } - - if (is_string($uploads) === true) { - return ['template' => $uploads]; - } - - if (is_array($uploads) === false) { - $uploads = []; - } - - return $uploads; - }, 'value' => function (string $value = null) { return trim($value); @@ -93,66 +83,13 @@ return [ [ 'pattern' => 'files', 'action' => function () { - $field = $this->field(); - $model = $field->model(); - - if (empty($filed->files['query']) === false) { - $query = $filed->files['query']; - } elseif (is_a($model, 'Kirby\Cms\File') === true) { - $query = 'file.siblings'; - } else { - $query = $model::CLASS_ALIAS . '.files'; - } - - $files = $model->query($query, 'Kirby\Cms\Files'); - $data = []; - - foreach ($files as $index => $file) { - $image = $file->panelImage($field->files['image'] ?? []); - $model = $field->model(); - - $data[] = [ - 'filename' => $file->filename(), - 'dragText' => $file->dragText(), - 'image' => $image, - 'icon' => $file->panelIcon($image) - ]; - } - - return $data; + return $this->field()->filepicker($this->field()->files()); } ], [ 'pattern' => 'upload', 'action' => function () { - $field = $this->field(); - $uploads = $field->uploads(); - - if ($uploads === false) { - throw new Exception('Uploads are disabled for this field'); - } - - if ($parentQuery = ($uploads['parent'] ?? null)) { - $parent = $field->model()->query($parentQuery); - } else { - $parent = $field->model(); - } - - if (is_a($parent, 'Kirby\Cms\File') === true) { - $parent = $parent->parent(); - } - - return $this->upload(function ($source, $filename) use ($field, $parent, $uploads) { - $file = $parent->createFile([ - 'source' => $source, - 'template' => $uploads['template'] ?? null, - 'filename' => $filename, - ]); - - if (is_a($file, 'Kirby\Cms\File') === false) { - throw new Exception('The file could not be uploaded'); - } - + return $this->field()->upload($this, $this->field()->uploads(), function ($file) { return [ 'filename' => $file->filename(), 'dragText' => $file->dragText(), diff --git a/kirby/config/fields/users.php b/kirby/config/fields/users.php index 6ee6abc..62844b7 100755 --- a/kirby/config/fields/users.php +++ b/kirby/config/fields/users.php @@ -1,7 +1,7 @@ ['min', 'selector'], + 'mixins' => ['min', 'picker', 'userpicker'], 'props' => [ /** * Unset inherited props @@ -29,56 +29,17 @@ return [ return $this->toUsers($default); }, - /** - * The placeholder text if none have been selected yet - */ - 'empty' => function ($empty = null) { - return I18n::translate($empty, $empty); - }, - - /** - * The minimum number of required selected - */ - 'min' => function (int $min = null) { - return $min; - }, - - /** - * The maximum number of allowed selected - */ - 'max' => function (int $max = null) { - return $max; - }, - - /** - * If `false`, only a single one can be selected - */ - 'multiple' => function (bool $multiple = true) { - return $multiple; - }, - 'value' => function ($value = null) { return $this->toUsers($value); }, ], 'methods' => [ 'userResponse' => function ($user) { - $avatar = function ($user) { - if ($avatar = $user->avatar()) { - return [ - 'url' => $avatar->crop(512)->url() - ]; - } - - return null; - }; - - return [ - 'username' => $user->username(), - 'id' => $user->id(), - 'email' => $user->email(), - 'avatar' => $avatar($user) - ]; + return $user->panelPickerData([ + 'info' => $this->info, + 'image' => $this->image, + 'text' => $this->text, + ]); }, 'toUsers' => function ($value = null) { $users = []; @@ -97,6 +58,23 @@ return [ return $users; } ], + 'api' => function () { + return [ + [ + 'pattern' => '/', + 'action' => function () { + $field = $this->field(); + + return $field->userpicker([ + 'query' => $field->query(), + 'image' => $field->image(), + 'info' => $field->info(), + 'text' => $field->text() + ]); + } + ] + ]; + }, 'save' => function ($value = null) { return A::pluck($value, 'email'); }, diff --git a/kirby/config/helpers.php b/kirby/config/helpers.php index bf02fce..6444d85 100755 --- a/kirby/config/helpers.php +++ b/kirby/config/helpers.php @@ -16,7 +16,7 @@ use Kirby\Toolkit\View; * Helper to create an asset object * * @param string $path - * @return Asset + * @return Kirby\Cms\Asset */ function asset(string $path) { @@ -44,7 +44,7 @@ function attr(array $attr = null, $before = null, $after = null) * Returns the result of a collection by name * * @param string $name - * @return Collection|null + * @return Kirby\Cms\Collection|null */ function collection(string $name) { @@ -246,7 +246,7 @@ function html(string $string = null, bool $keepTags = false) * * * @param string $path - * @return File|null + * @return Kirby\Cms\File|null */ function image(string $path = null) { @@ -382,9 +382,9 @@ function js($url, $options = null) /** * Returns the Kirby object in any situation * - * @return App + * @return Kirby\Cms\App */ -function kirby(): App +function kirby() { return App::instance(); } @@ -527,7 +527,7 @@ function option(string $key, $default = null) * id or the current page when no id is specified * * @param string|array ...$id - * @return Page|null + * @return Kirby\Cms\Page|null */ function page(...$id) { @@ -542,7 +542,7 @@ function page(...$id) * Helper to build page collections * * @param string|array ...$id - * @return Pages + * @return Kirby\Cms\Pages */ function pages(...$id) { @@ -616,7 +616,7 @@ function timestamp(string $date = null, int $step = null): ?string /** * Returns the currrent site object * - * @return Site + * @return Kirby\Cms\Site */ function site() { @@ -669,12 +669,12 @@ function smartypants(string $text = null): string /** * Embeds a snippet from the snippet folder * - * @param string $name + * @param string|array $name * @param array|object $data * @param boolean $return * @return string */ -function snippet(string $name, $data = [], bool $return = false) +function snippet($name, $data = [], bool $return = false) { if (is_object($data) === true) { $data = ['item' => $data]; @@ -742,6 +742,21 @@ function tc($key, int $count) return I18n::translateCount($key, $count); } +/** + * Translate by key and then replace + * placeholders in the text + * + * @param string $key + * @param string $fallback + * @param array $replace + * @param string $locale + * @return string + */ +function tt(string $key, $fallback = null, array $replace = null, string $locale = null) +{ + return I18n::template($key, $fallback, $replace, $locale); +} + /** * Builds a Twitter link * diff --git a/kirby/config/methods.php b/kirby/config/methods.php index 824d749..e63e97b 100755 --- a/kirby/config/methods.php +++ b/kirby/config/methods.php @@ -25,7 +25,7 @@ return function (App $app) { /** * Converts the field value into a proper boolean and inverts it * - * @param Field $field + * @param Kirby\Cms\Field $field * @return boolean */ 'isFalse' => function (Field $field): bool { @@ -35,7 +35,7 @@ return function (App $app) { /** * Converts the field value into a proper boolean * - * @param Field $field + * @param Kirby\Cms\Field $field * @return boolean */ 'isTrue' => function (Field $field): bool { @@ -58,7 +58,7 @@ return function (App $app) { /** * Parses the field value with the given method * - * @param Field $field + * @param Kirby\Cms\Field $field * @param string $method [',', 'yaml', 'json'] * @return array */ @@ -76,7 +76,7 @@ return function (App $app) { /** * Converts the field value into a proper boolean * - * @param Field $field + * @param Kirby\Cms\Field $field * @param bool $default Default value if the field is empty * @return bool */ @@ -88,27 +88,30 @@ return function (App $app) { /** * Converts the field value to a timestamp or a formatted date * - * @param Field $field - * @param string $format PHP date formatting string + * @param Kirby\Cms\Field $field + * @param string|null $format PHP date formatting string + * @param string|null $fallback Fallback string for `strtotime` (since 3.2) * @return string|int */ - 'toDate' => function (Field $field, string $format = null) use ($app) { - if (empty($field->value) === true) { + 'toDate' => function (Field $field, string $format = null, string $fallback = null) use ($app) { + if (empty($field->value) === true && $fallback === null) { return null; } + $time = empty($field->value) === true ? strtotime($fallback) : $field->toTimestamp(); + if ($format === null) { - return $field->toTimestamp(); + return $time; } - return $app->option('date.handler', 'date')($format, $field->toTimestamp()); + return $app->option('date.handler', 'date')($format, $time); }, /** * Returns a file object from a filename in the field * - * @param Field $field - * @return File|null + * @param Kirby\Cms\Field $field + * @return Kirby\Cms\File|null */ 'toFile' => function (Field $field) { return $field->toFiles()->first(); @@ -117,7 +120,9 @@ return function (App $app) { /** * Returns a file collection from a yaml list of filenames in the field * - * @return Files + * @param Kirby\Cms\Field $field + * @param string $separator + * @return Kirby\Cms\Files */ 'toFiles' => function (Field $field, string $separator = 'yaml') { $parent = $field->parent(); @@ -135,7 +140,7 @@ return function (App $app) { /** * Converts the field value into a proper float * - * @param Field $field + * @param Kirby\Cms\Field $field * @param float $default Default value if the field is empty * @return float */ @@ -147,7 +152,7 @@ return function (App $app) { /** * Converts the field value into a proper integer * - * @param Field $field + * @param Kirby\Cms\Field $field * @param int $default Default value if the field is empty * @return int */ @@ -159,7 +164,7 @@ return function (App $app) { /** * Wraps a link tag around the field value. The field value is used as the link text * - * @param Field $field + * @param Kirby\Cms\Field $field * @param mixed $attr1 Can be an optional Url. If no Url is set, the Url of the Page, File or Site will be used. Can also be an array of link attributes * @param mixed $attr2 If `$attr1` is used to set the Url, you can use `$attr2` to pass an array of additional attributes. * @return string @@ -183,8 +188,8 @@ return function (App $app) { /** * Returns a page object from a page id in the field * - * @param Field $field - * @return Page|null + * @param Kirby\Cms\Field $field + * @return Kirby\Cms\Page|null */ 'toPage' => function (Field $field) use ($app) { return $field->toPages()->first(); @@ -193,8 +198,9 @@ return function (App $app) { /** * Returns a pages collection from a yaml list of page ids in the field * + * @param Kirby\Cms\Field $field * @param string $separator Can be any other separator to split the field value by - * @return Pages + * @return Kirby\Cms\Pages */ 'toPages' => function (Field $field, string $separator = 'yaml') use ($app) { return $app->site()->find(false, false, ...$field->toData($separator)); @@ -202,6 +208,9 @@ return function (App $app) { /** * Converts a yaml field to a Structure object + * + * @param Kirby\Cms\Field $field + * @return Kirby\Cms\Structure */ 'toStructure' => function (Field $field) { return new Structure(Yaml::decode($field->value), $field->parent()); @@ -209,22 +218,29 @@ return function (App $app) { /** * Converts the field value to a Unix timestamp + * + * @param Kirby\Cms\Field $field + * @return int */ - 'toTimestamp' => function (Field $field) { + 'toTimestamp' => function (Field $field): int { return strtotime($field->value); }, /** * Turns the field value into an absolute Url + * + * @param Kirby\Cms\Field $field + * @return string */ - 'toUrl' => function (Field $field) { + 'toUrl' => function (Field $field): string { return Url::to($field->value); }, /** * Converts a user email address to a user object * - * @return User|null + * @param Kirby\Cms\Field $field + * @return Kirby\Cms\User|null */ 'toUser' => function (Field $field) use ($app) { return $field->toUsers()->first(); @@ -233,7 +249,9 @@ return function (App $app) { /** * Returns a users collection from a yaml list of user email addresses in the field * - * @return Users + * @param Kirby\Cms\Field $field + * @param string $separator + * @return Kirby\Cms\Users */ 'toUsers' => function (Field $field, string $separator = 'yaml') use ($app) { return $app->users()->find(false, false, ...$field->toData($separator)); @@ -261,7 +279,7 @@ return function (App $app) { * Escapes the field value to be safely used in HTML * templates without the risk of XSS attacks * - * @param Field $field + * @param Kirby\Cms\Field $field * @param string $context html, attr, js or css */ 'escape' => function (Field $field, string $context = 'html') { @@ -272,6 +290,12 @@ return function (App $app) { /** * Creates an excerpt of the field value without html * or any other formatting. + * + * @param Kirby\Cms\Field $field + * @param int $cahrs + * @param boolean $strip + * @param string $rep + * @return Kirby\Cms\Field */ 'excerpt' => function (Field $field, int $chars = 0, bool $strip = true, string $rep = '…') { $field->value = Str::excerpt($field->kirbytext()->value(), $chars, $strip, $rep); @@ -280,6 +304,9 @@ return function (App $app) { /** * Converts the field content to valid HTML + * + * @param Kirby\Cms\Field $field + * @return Kirby\Cms\Field */ 'html' => function (Field $field) { $field->value = htmlentities($field->value, ENT_COMPAT, 'utf-8'); @@ -288,6 +315,9 @@ return function (App $app) { /** * Converts the field content from Markdown/Kirbytext to valid HTML + * + * @param Kirby\Cms\Field $field + * @return Kirby\Cms\Field */ 'kirbytext' => function (Field $field) use ($app) { $field->value = $app->kirbytext($field->value, [ @@ -299,8 +329,12 @@ return function (App $app) { }, /** - * Converts the field content from inline Markdown/Kirbytext to valid HTML + * Converts the field content from inline Markdown/Kirbytext + * to valid HTML * @since 3.1.0 + * + * @param Kirby\Cms\Field $field + * @return Kirby\Cms\Field */ 'kirbytextinline' => function (Field $field) use ($app) { $field->value = $app->kirbytext($field->value, [ @@ -313,6 +347,9 @@ return function (App $app) { /** * Parses all KirbyTags without also parsing Markdown + * + * @param Kirby\Cms\Field $field + * @return Kirby\Cms\Field */ 'kirbytags' => function (Field $field) use ($app) { $field->value = $app->kirbytags($field->value, [ @@ -325,6 +362,9 @@ return function (App $app) { /** * Converts the field content to lowercase + * + * @param Kirby\Cms\Field $field + * @return Kirby\Cms\Field */ 'lower' => function (Field $field) { $field->value = Str::lower($field->value); @@ -333,6 +373,9 @@ return function (App $app) { /** * Converts markdown to valid HTML + * + * @param Kirby\Cms\Field $field + * @return Kirby\Cms\Field */ 'markdown' => function (Field $field) use ($app) { $field->value = $app->markdown($field->value); @@ -341,6 +384,9 @@ return function (App $app) { /** * Converts the field content to valid XML + * + * @param Kirby\Cms\Field $field + * @return Kirby\Cms\Field */ 'xml' => function (Field $field) { $field->value = Xml::encode($field->value); @@ -348,11 +394,13 @@ return function (App $app) { }, /** - * Cuts the string after the given length and adds "…" if it is longer + * Cuts the string after the given length and + * adds "…" if it is longer * + * @param Kirby\Cms\Field $field * @param int $length The number of characters in the string * @param string $appendix An optional replacement for the missing rest - * @return Field + * @return Kirby\Cms\Field */ 'short' => function (Field $field, int $length, string $appendix = '…') { $field->value = Str::short($field->value, $length, $appendix); @@ -361,6 +409,9 @@ return function (App $app) { /** * Converts the field content to a slug + * + * @param Kirby\Cms\Field $field + * @return Kirby\cms\Field */ 'slug' => function (Field $field) { $field->value = Str::slug($field->value); @@ -369,6 +420,9 @@ return function (App $app) { /** * Applies SmartyPants to the field + * + * @param Kirby\Cms\Field $field + * @return Kirby\cms\Field */ 'smartypants' => function (Field $field) use ($app) { $field->value = $app->smartypants($field->value); @@ -377,6 +431,9 @@ return function (App $app) { /** * Splits the field content into an array + * + * @param Kirby\Cms\Field $field + * @return Kirby\cms\Field */ 'split' => function (Field $field, $separator = ',') { return Str::split((string)$field->value, $separator); @@ -384,6 +441,9 @@ return function (App $app) { /** * Converts the field content to uppercase + * + * @param Kirby\Cms\Field $field + * @return Kirby\cms\Field */ 'upper' => function (Field $field) { $field->value = Str::upper($field->value); @@ -391,7 +451,11 @@ return function (App $app) { }, /** - * Avoids typographical widows in strings by replacing the last space with   + * Avoids typographical widows in strings by replacing + * the last space with ` ` + * + * @param Kirby\Cms\Field $field + * @return Kirby\cms\Field */ 'widont' => function (Field $field) { $field->value = Str::widont($field->value); @@ -402,6 +466,9 @@ return function (App $app) { /** * Parses yaml in the field content and returns an array + * + * @param Kirby\Cms\Field $field + * @return array */ 'yaml' => function (Field $field): array { return $field->toData('yaml'); diff --git a/kirby/config/presets/files.php b/kirby/config/presets/files.php index 576981e..6969ded 100755 --- a/kirby/config/presets/files.php +++ b/kirby/config/presets/files.php @@ -6,9 +6,17 @@ return function (array $props) { 'headline' => $props['headline'] ?? t('files'), 'type' => 'files', 'layout' => $props['layout'] ?? 'cards', + 'template' => $props['template'] ?? null, 'info' => '{{ file.dimensions }}' ] ]; + // remove global options + unset( + $props['headline'], + $props['layout'], + $props['template'] + ); + return $props; }; diff --git a/kirby/config/roots.php b/kirby/config/roots.php index 364ed96..b9621de 100755 --- a/kirby/config/roots.php +++ b/kirby/config/roots.php @@ -5,8 +5,23 @@ return [ 'kirby' => function (array $roots) { return realpath(__DIR__ . '/../'); }, + + // i18n + 'i18n' => function (array $roots) { + return $roots['kirby'] . '/i18n'; + }, + 'i18n:translations' => function (array $roots) { + return $roots['translations']; + }, + 'i18n:rules' => function (array $roots) { + return $roots['i18n'] . '/rules'; + }, + /** + * @deprecated 3.2.0 Use `i18n:translations` instead + * @TODO move logic over to i18n:translations before removing + */ 'translations' => function (array $roots) { - return $roots['kirby'] . '/translations'; + return $roots['i18n'] . '/translations'; }, // index diff --git a/kirby/config/routes.php b/kirby/config/routes.php index 7098eec..0fc4687 100755 --- a/kirby/config/routes.php +++ b/kirby/config/routes.php @@ -9,6 +9,7 @@ use Kirby\Cms\PluginAssets; use Kirby\Cms\Response; use Kirby\Exception\NotFoundException; use Kirby\Http\Response\Redirect; +use Kirby\Http\Router; use Kirby\Http\Router\Route; use Kirby\Toolkit\F; use Kirby\Toolkit\Str; @@ -54,27 +55,15 @@ return function ($kirby) { } ], [ - 'pattern' => $media . '/panel/(:any)/plugins/(css|js)/(:any)/index.(css|js)', + 'pattern' => $media . '/plugins/index.(css|js)', 'env' => 'media', - 'action' => function (string $version, string $type) use ($kirby) { - $plugins = new PanelPlugins($type); - $plugins->publish(); + 'action' => function (string $type) use ($kirby) { + $plugins = new PanelPlugins(); return $kirby ->response() ->type($type) - ->body($plugins->read()); - } - ], - [ - 'pattern' => $media . '/panel/plugins/index.(css|js)', - 'env' => 'media', - 'action' => function (string $type) use ($kirby) { - $plugins = new PanelPlugins($type); - - return $kirby - ->response() - ->redirect($plugins->url(), 302); + ->body($plugins->read($type)); } ], [ @@ -150,7 +139,7 @@ return function ($kirby) { // default home page } else { - return $kirby->resolve(null, $kirby->defaultLanguage()->code()); + return $kirby->defaultLanguage()->router()->call(); } } ]; @@ -161,7 +150,7 @@ return function ($kirby) { 'method' => 'ALL', 'env' => 'site', 'action' => function ($path = null) use ($kirby, $language) { - return $kirby->resolve($path, $language->code()); + return $language->router()->call($path); } ]; } @@ -191,7 +180,7 @@ return function ($kirby) { } } - return $kirby->resolve($path, $kirby->defaultLanguage()->code()); + return $kirby->defaultLanguage()->router()->call($path); } ]; } else { diff --git a/kirby/config/sections/files.php b/kirby/config/sections/files.php index 5e5220c..77e4c8a 100755 --- a/kirby/config/sections/files.php +++ b/kirby/config/sections/files.php @@ -98,24 +98,12 @@ return [ 'data' => function () { $data = []; - if ($this->layout === 'list') { - $thumb = [ - 'width' => 100, - 'height' => 100 - ]; - } else { - $thumb = [ - 'width' => 400, - 'height' => 400 - ]; - } - // the drag text needs to be absolute when the files come from // a different parent model $dragTextAbsolute = $this->model->is($this->parent) === false; foreach ($this->files as $file) { - $image = $file->panelImage($this->image, $thumb); + $image = $file->panelImage($this->image); $data[] = [ 'dragText' => $file->dragText($this->dragTextType, $dragTextAbsolute), @@ -220,6 +208,7 @@ return [ 'accept' => $this->accept, 'empty' => $this->empty, 'headline' => $this->headline, + 'help' => $this->help, 'layout' => $this->layout, 'link' => $this->link, 'max' => $this->max, diff --git a/kirby/config/sections/mixins/help.php b/kirby/config/sections/mixins/help.php index 59571aa..20cec1b 100755 --- a/kirby/config/sections/mixins/help.php +++ b/kirby/config/sections/mixins/help.php @@ -1,5 +1,7 @@ [ /** diff --git a/kirby/config/sections/mixins/parent.php b/kirby/config/sections/mixins/parent.php index e441b1a..c4d17bf 100755 --- a/kirby/config/sections/mixins/parent.php +++ b/kirby/config/sections/mixins/parent.php @@ -16,7 +16,12 @@ return [ $parent = $this->parent; if (is_string($parent) === true) { - $parent = $this->model->query($parent); + $query = $parent; + $parent = $this->model->query($query); + + if (!$parent) { + throw new Exception('The parent for the query "' . $query . '" cannot be found in the section "' . $this->name() . '"'); + } } if ($parent === null) { diff --git a/kirby/config/sections/pages.php b/kirby/config/sections/pages.php index 7960a8f..c94b401 100755 --- a/kirby/config/sections/pages.php +++ b/kirby/config/sections/pages.php @@ -1,9 +1,7 @@ function () { $data = []; - if ($this->layout === 'list') { - $thumb = [ - 'width' => 100, - 'height' => 100 - ]; - } else { - $thumb = [ - 'width' => 400, - 'height' => 400 - ]; - } - foreach ($this->pages as $item) { $permissions = $item->permissions(); - $blueprint = $item->blueprint(); - $image = $item->panelImage($this->image, $thumb); + $image = $item->panelImage($this->image); $data[] = [ 'id' => $item->id(), @@ -281,6 +266,7 @@ return [ 'add' => $this->add, 'empty' => $this->empty, 'headline' => $this->headline, + 'help' => $this->help, 'layout' => $this->layout, 'link' => $this->link, 'max' => $this->max, diff --git a/kirby/config/aliases.php b/kirby/config/setup.php similarity index 78% rename from kirby/config/aliases.php rename to kirby/config/setup.php index c23e123..422e778 100755 --- a/kirby/config/aliases.php +++ b/kirby/config/setup.php @@ -1,7 +1,19 @@ 'Kirby\Cms\Asset', 'collection' => 'Kirby\Cms\Collection', @@ -64,3 +76,20 @@ spl_autoload_register(function ($class) use ($aliases) { class_alias($aliases[$class], $class); } }); + +/** + * Tests + */ +$testDir = dirname(__DIR__) . '/tests'; + +if (is_dir($testDir) === true) { + spl_autoload_register(function ($className) use ($testDir) { + $path = str_replace('Kirby\\', '', $className); + $path = str_replace('\\', '/', $path); + $file = $testDir . '/' . $path . '.php'; + + if (file_exists($file)) { + include $file; + } + }); +} diff --git a/kirby/config/tags.php b/kirby/config/tags.php index 49f18bb..c8deb39 100755 --- a/kirby/config/tags.php +++ b/kirby/config/tags.php @@ -39,6 +39,7 @@ return [ 'file' => [ 'attr' => [ 'class', + 'download', 'rel', 'target', 'text', @@ -57,7 +58,7 @@ return [ return Html::a($file->url(), $tag->text, [ 'class' => $tag->class, - 'download' => true, + 'download' => $tag->download !== 'false', 'rel' => $tag->rel, 'target' => $tag->target, 'title' => $tag->title, @@ -105,8 +106,14 @@ return [ if (empty($tag->link) === true) { return $img; } + + if ($link = $tag->file($tag->link)) { + $link = $link->url(); + } else { + $link = $tag->link === 'self' ? $tag->src : $tag->link; + } - return Html::a($tag->link === 'self' ? $tag->src : $tag->link, [$img], [ + return Html::a($link, [$img], [ 'rel' => $tag->rel, 'class' => $tag->linkclass, 'target' => $tag->target diff --git a/kirby/config/tests.php b/kirby/config/tests.php deleted file mode 100755 index 0ea8692..0000000 --- a/kirby/config/tests.php +++ /dev/null @@ -1,15 +0,0 @@ -{email}", + "lock.file.isLocked": "The file is currently being edited by {email} and cannot be changed.", + "lock.page.isLocked": "The page is currently being edited by {email} and cannot be changed.", + "lock.unlock": "Unlock", + "lock.isUnlocked": "Your unsaved changes have been overwritten by another user. You can download your changes to merge them manually.", + "login": "Вход", "login.remember": "Keep me logged in", @@ -297,6 +319,8 @@ "more": "Още", "name": "Име", "next": "Next", + "off": "off", + "on": "on", "open": "Отвори", "options": "Options", @@ -317,6 +341,9 @@ "Тази страница има подстраници.
Всички подстраници също ще бъдат изтрити.", "page.delete.confirm.title": "Въведи заглавие на страница за да потвърдиш", "page.draft.create": "Създай чернова", + "page.duplicate.appendix": "Копирай", + "page.duplicate.files": "Copy files", + "page.duplicate.pages": "Copy pages", "page.status": "Status", "page.status.draft": "Чернова", "page.status.draft.description": @@ -342,9 +369,13 @@ "revert": "\u041e\u0442\u043c\u0435\u043d\u0438", "role": "\u0420\u043e\u043b\u044f", + "role.admin.description": "The admin has all rights", + "role.admin.title": "Admin", "role.all": "Всички", "role.empty": "Не съществуват потребители с тази роля", "role.description.placeholder": "Липсва описание", + "role.nobody.description": "This is a fallback role without any permissions", + "role.nobody.title": "Nobody", "save": "\u0417\u0430\u043f\u0438\u0448\u0438", "search": "Търси", diff --git a/kirby/translations/ca.json b/kirby/i18n/translations/ca.json similarity index 89% rename from kirby/translations/ca.json rename to kirby/i18n/translations/ca.json index f6f3903..3974498 100755 --- a/kirby/translations/ca.json +++ b/kirby/i18n/translations/ca.json @@ -24,8 +24,14 @@ "delete": "Eliminar", "dimensions": "Dimensions", "discard": "Descartar", + "download": "Descarregar", + "duplicate": "Duplicar", "edit": "Editar", + "dialog.files.empty": "No hi ha cap fitxer per seleccionar", + "dialog.pages.empty": "No hi ha cap pàgina per seleccionar", + "dialog.users.empty": "No hi ha cap usuari per seleccionar", + "email": "Email", "email.placeholder": "mail@exemple.com", @@ -65,6 +71,14 @@ "error.form.incomplete": "Si us plau, corregeix els errors del formulari ...", "error.form.notSaved": "No s'ha pogut desar el formulari", + "error.language.code": "Introdueix un codi vàlid per a l’idioma", + "error.language.duplicate": "L'idioma ja existeix", + "error.language.name": "Introdueix un nom vàlid per a l'idioma", + + "error.license.format": "Introduïu una clau de llicència vàlida", + "error.license.email": "Si us plau, introdueix una adreça de correu electrònic vàlida", + "error.license.verification": "No s’ha pogut verificar la llicència", + "error.page.changeSlug.permission": "No teniu permís per canviar l'apèndix d'URL per a \"{slug}\"", "error.page.changeStatus.incomplete": @@ -90,6 +104,7 @@ "Ja existeix un esborrany de pàgina amb l'apèndix d'URL \"{slug}\"", "error.page.duplicate": "Ja existeix una pàgina amb l'apèndix d'URL \"{slug}\"", + "error.page.duplicate.permission": "No tens permís per duplicar \"{slug}\"", "error.page.notFound": "La pàgina \"{slug}\" no s'ha trobat", "error.page.num.invalid": "Si us plau, introdueix un número d 'ordenació vàlid. Els números no poden ser negatius.", @@ -104,18 +119,18 @@ "error.section.files.max.singular": "No podeu afegir més d'un fitxer a la secció \"{section}\"", "error.section.files.min.plural": - "The \"{section}\" section requires at least {min} files", + "La secció \"{section}\" requereix almenys {min} fitxer", "error.section.files.min.singular": - "The \"{section}\" section requires at least one file", + "La secció \"{section}\" requereix almenys un fitxer", "error.section.pages.max.plural": "No heu d'afegir més de {max} pàgines a la secció \"{section}\"", "error.section.pages.max.singular": "No podeu afegir més d'una pàgina a la secció \"{section}\"", "error.section.pages.min.plural": - "The \"{section}\" section requires at least {min} pages", + "La secció \"{section}\" requereix almenys {min} pàgines", "error.section.pages.min.singular": - "The \"{section}\" section requires at least one page", + "La secció \"{section}\" requereix almenys una pàgina", "error.section.notLoaded": "No s'ha pogut carregar la secció \"{name}\"", "error.section.type.invalid": "La secció tipus \"{type}\" no és vàlida", @@ -270,6 +285,13 @@ "loading": "Carregant", + "lock.unsaved": "Canvis no guardats", + "lock.isLocked": "Canvis no guardats per {email}", + "lock.file.isLocked": "El fitxer està sent editat actualment per {email} i no pot ser modificat.", + "lock.page.isLocked": "La pàgina està sent editat actualment per {email} i no pot ser modificat.", + "lock.unlock": "Desbloquejar", + "lock.isUnlocked": "Els teus canvis sense guardar han estat sobreescrits per a un altra usuario. Pots descarregar els teus canvis per combinar-los manualment.", + "login": "Entrar", "login.remember": "Manten-me connectat", @@ -297,6 +319,8 @@ "more": "Més", "name": "Nom", "next": "Següent", + "off": "apagat", + "on": "encès", "open": "Obrir", "options": "Opcions", @@ -317,6 +341,9 @@ "Aquesta pàgina té subpàgines.
Totes les subpàgines també s'eliminaran.", "page.delete.confirm.title": "Introduïu el títol de la pàgina per confirmar", "page.draft.create": "Crear un esborrany", + "page.duplicate.appendix": "Copiar", + "page.duplicate.files": "Copiar fitxers", + "page.duplicate.pages": "Copiar pàgines", "page.status": "Estat", "page.status.draft": "Esborrany", "page.status.draft.description": @@ -342,9 +369,13 @@ "revert": "Revertir", "role": "Rol", + "role.admin.description": "L’administrador té tots els permisos", + "role.admin.title": "Administrador", "role.all": "Tots", "role.empty": "No hi ha usuaris amb aquest rol", "role.description.placeholder": "Sense descripció", + "role.nobody.description": "Aquest és un rol per defecte sense permisos", + "role.nobody.title": "Ningú", "save": "Desar", "search": "Cercar", @@ -366,8 +397,8 @@ "toolbar.button.heading.3": "Encapçalament 3", "toolbar.button.italic": "Cursiva", "toolbar.button.file": "Arxiu", - "toolbar.button.file.select": "Select a file", - "toolbar.button.file.upload": "Upload a file", + "toolbar.button.file.select": "Selecciona un fitxer", + "toolbar.button.file.upload": "Carrega un fitxer", "toolbar.button.link": "Enlla\u00e7", "toolbar.button.ol": "Llista ordenada", "toolbar.button.ul": "Llista de vinyetes", diff --git a/kirby/translations/cs.json b/kirby/i18n/translations/cs.json similarity index 92% rename from kirby/translations/cs.json rename to kirby/i18n/translations/cs.json index b5118f0..fea2aac 100755 --- a/kirby/translations/cs.json +++ b/kirby/i18n/translations/cs.json @@ -24,8 +24,14 @@ "delete": "Smazat", "dimensions": "Rozměry", "discard": "Zahodit", + "download": "Download", + "duplicate": "Duplicate", "edit": "Upravit", + "dialog.files.empty": "No files to select", + "dialog.pages.empty": "No pages to select", + "dialog.users.empty": "No users to select", + "email": "Email", "email.placeholder": "mail@example.com", @@ -65,6 +71,14 @@ "error.form.incomplete": "Prosím opravte všechny chyby ve formuláři", "error.form.notSaved": "Formulář nemohl být uložen", + "error.language.code": "Please enter a valid code for the language", + "error.language.duplicate": "The language already exists", + "error.language.name": "Please enter a valid name for the language", + + "error.license.format": "Please enter a valid license key", + "error.license.email": "Zadejte prosím platnou emailovou adresu", + "error.license.verification": "The license could not be verified", + "error.page.changeSlug.permission": "Nem\u016f\u017eete zm\u011bnit URL t\u00e9to str\u00e1nky", "error.page.changeStatus.incomplete": @@ -90,6 +104,7 @@ "Koncept stránky, který obsahuje v adrese URL \"{slug}\" již existuje ", "error.page.duplicate": "Stránka, která v adrese URL obsahuje \"{slug}\" již existuje", + "error.page.duplicate.permission": "You are not allowed to duplicate \"{slug}\"", "error.page.notFound": "Str\u00e1nku se nepoda\u0159ilo nal\u00e9zt.", "error.page.num.invalid": "Zadejte prosím platné pořadové číslo. Čísla nesmí být záporná.", @@ -270,6 +285,13 @@ "loading": "Načítám", + "lock.unsaved": "Unsaved changes", + "lock.isLocked": "Unsaved changes by {email}", + "lock.file.isLocked": "The file is currently being edited by {email} and cannot be changed.", + "lock.page.isLocked": "The page is currently being edited by {email} and cannot be changed.", + "lock.unlock": "Unlock", + "lock.isUnlocked": "Your unsaved changes have been overwritten by another user. You can download your changes to merge them manually.", + "login": "P\u0159ihl\u00e1sit se", "login.remember": "Zůstat přihlášen", @@ -297,6 +319,8 @@ "more": "Více", "name": "Jméno", "next": "Další", + "off": "off", + "on": "on", "open": "Otevřít", "options": "Možnosti", @@ -317,6 +341,9 @@ "Tato stránka má podstránky.
Všechny podstránky budou vymazány.", "page.delete.confirm.title": "Pro potvrzení zadejte titulek stránky", "page.draft.create": "Vytvořit koncept", + "page.duplicate.appendix": "Kopírovat", + "page.duplicate.files": "Copy files", + "page.duplicate.pages": "Copy pages", "page.status": "Stav", "page.status.draft": "Koncept", "page.status.draft.description": @@ -342,9 +369,13 @@ "revert": "Zahodit", "role": "Role", + "role.admin.description": "The admin has all rights", + "role.admin.title": "Admin", "role.all": "Vše", "role.empty": "Neexistují uživatelé s touto rolí", "role.description.placeholder": "Žádný popis", + "role.nobody.description": "This is a fallback role without any permissions", + "role.nobody.title": "Nobody", "save": "Ulo\u017eit", "search": "Hledat", diff --git a/kirby/translations/da.json b/kirby/i18n/translations/da.json similarity index 90% rename from kirby/translations/da.json rename to kirby/i18n/translations/da.json index 0f14d7e..28f5042 100755 --- a/kirby/translations/da.json +++ b/kirby/i18n/translations/da.json @@ -24,8 +24,14 @@ "delete": "Slet", "dimensions": "Dimensioner", "discard": "Kass\u00e9r", + "download": "Download", + "duplicate": "Dupliker", "edit": "Rediger", + "dialog.files.empty": "Ingen filer kan vælges", + "dialog.pages.empty": "Ingen sider kan vælges", + "dialog.users.empty": "Ingen brugere kan vælges", + "email": "Email", "email.placeholder": "mail@eksempel.dk", @@ -65,6 +71,14 @@ "error.form.incomplete": "Ret venligst alle fejl i formularen...", "error.form.notSaved": "Formularen kunne ikke gemmes", + "error.language.code": "Indtast venligst en gyldig kode for sproget", + "error.language.duplicate": "Sproget eksisterer allerede", + "error.language.name": "Indtast venligst et gyldigt navn for sproget", + + "error.license.format": "Indtast venligst en gyldig licensnøgle", + "error.license.email": "Indtast venligst en gyldig email adresse", + "error.license.verification": "Licensen kunne ikke verificeres", + "error.page.changeSlug.permission": "Du kan ikke \u00e6ndre denne sides URL", "error.page.changeStatus.incomplete": @@ -90,6 +104,7 @@ "En sidekladde med URL-endelsen \"{slug}\" eksisterer allerede", "error.page.duplicate": "En side med URL-endelsen \"{slug}\" eksisterer allerede", + "error.page.duplicate.permission": "Du har ikke mulighed for at duplikere \"{slug}\"", "error.page.notFound": "Siden kunne ikke findes", "error.page.num.invalid": "Indtast venligst et gyldigt sorteringsnummer. Nummeret kan ikke være negativt.", @@ -104,18 +119,18 @@ "error.section.files.max.singular": "Du kan ikke tilføje mere end en fil til \"{section}\" sektionen", "error.section.files.min.plural": - "The \"{section}\" section requires at least {min} files", + "Sektionen \"{section}\" kræver mindst {min} filer", "error.section.files.min.singular": - "The \"{section}\" section requires at least one file", + "Sektionen \"{section}\" kræver mindst en fil", "error.section.pages.max.plural": "Du kan ikke tilføje flere end {max} sider til \"{section}\" sektionen", "error.section.pages.max.singular": "Du kan ikke tilføje mere end een side til \"{section}\" sektionen", "error.section.pages.min.plural": - "The \"{section}\" section requires at least {min} pages", + "Sektionen \"{section}\" kræver mindst {min} sider", "error.section.pages.min.singular": - "The \"{section}\" section requires at least one page", + "Sektionen \"{section}\" kræver mindst en side", "error.section.notLoaded": "Sektionen \"{section}\" kunne ikke indlæses", "error.section.type.invalid": "Sektionstypen \"{type}\" er ikke gyldig", @@ -270,6 +285,13 @@ "loading": "Indlæser", + "lock.unsaved": "Ugemte ændringer", + "lock.isLocked": "Ugemte ændringer af {email}", + "lock.file.isLocked": "Filen redigeres på nuværende af {email} og kan derfor ikke ændres.", + "lock.page.isLocked": "Siden redigeres på nuværende af {email} og kan derfor ikke ændres.", + "lock.unlock": "Lås op", + "lock.isUnlocked": "Dine ugemte ændringer er blevet overskrevet af en anden bruger. Du kan downloade dine ændringer for at flette dem ind manuelt.", + "login": "Log ind", "login.remember": "Forbliv logget ind", @@ -297,6 +319,8 @@ "more": "Mere", "name": "Navn", "next": "Næste", + "off": "Sluk", + "on": "Tænd", "open": "Åben", "options": "Indstillinger", @@ -317,6 +341,9 @@ "Denne side har undersider.
Alle undersider vil også blive slettet.", "page.delete.confirm.title": "Indtast sidens titel for at bekræfte", "page.draft.create": "Opret kladde", + "page.duplicate.appendix": "Kopier", + "page.duplicate.files": "Kopier filer", + "page.duplicate.pages": "Kopier sider", "page.status": "Status", "page.status.draft": "Kladde", "page.status.draft.description": @@ -342,9 +369,13 @@ "revert": "Kass\u00e9r", "role": "Rolle", + "role.admin.description": "Admin har alle rettigheder", + "role.admin.title": "Admin", "role.all": "All", "role.empty": "Der er ingen bruger med denne rolle", "role.description.placeholder": "Ingen beskrivelse", + "role.nobody.description": "Dette er en tilbagefaldsrolle uden rettigheder", + "role.nobody.title": "Ingen", "save": "Gem", "search": "Søg", @@ -366,8 +397,8 @@ "toolbar.button.heading.3": "Overskrift 3", "toolbar.button.italic": "Kursiv tekst", "toolbar.button.file": "Fil", - "toolbar.button.file.select": "Select a file", - "toolbar.button.file.upload": "Upload a file", + "toolbar.button.file.select": "Vælg en fil", + "toolbar.button.file.upload": "Upload en fil", "toolbar.button.link": "Link", "toolbar.button.ol": "Ordnet liste", "toolbar.button.ul": "Punktliste", diff --git a/kirby/translations/de.json b/kirby/i18n/translations/de.json similarity index 91% rename from kirby/translations/de.json rename to kirby/i18n/translations/de.json index a665cac..ffdca1c 100755 --- a/kirby/translations/de.json +++ b/kirby/i18n/translations/de.json @@ -24,8 +24,14 @@ "delete": "L\u00f6schen", "dimensions": "Maße", "discard": "Verwerfen", + "download": "Download", + "duplicate": "Duplizieren", "edit": "Bearbeiten", + "dialog.files.empty": "Keine verfügbaren Dateien", + "dialog.pages.empty": "Keine verfügbaren Seiten", + "dialog.users.empty": "Keine verfügbaren Benutzer", + "email": "E-Mail", "email.placeholder": "mail@beispiel.de", @@ -65,6 +71,14 @@ "error.form.incomplete": "Bitte behebe alle Fehler …", "error.form.notSaved": "Das Formular konnte nicht gespeichert werden", + "error.language.code": "Bitte gib einen gültigen Code für die Sprache an", + "error.language.duplicate": "Die Sprache besteht bereits", + "error.language.name": "Bitte gib einen gültigen Namen für die Sprache an", + + "error.license.format": "Bitte gib einen gültigen Lizenzschlüssel ein", + "error.license.email": "Bitte gib eine gültige E-Mailadresse an", + "error.license.verification": "Die Lizenz konnte nicht verifiziert werden", + "error.page.changeSlug.permission": "Du darfst die URL der Seite \"{slug}\" nicht ändern", "error.page.changeStatus.incomplete": @@ -90,6 +104,7 @@ "Ein Entwurf mit dem URL-Kürzel \"{slug}\" besteht bereits", "error.page.duplicate": "Eine Seite mit dem URL-Kürzel \"{slug}\" besteht bereits", + "error.page.duplicate.permission": "Du kannst die Seite \"{slug}\" nicht duplizieren", "error.page.notFound": "Die Seite \"{slug}\" konnte nicht gefunden werden", "error.page.num.invalid": "Bitte gib eine gültige Sortierungszahl an. Negative Zahlen sind nicht erlaubt.", @@ -260,7 +275,7 @@ "license.buy": "Kaufe eine Lizenz", "license.register": "Registrieren", "license.register.help": - "Den Lizenzcode findest du in der Bestätigungsmai zu deinem Kauf. Bitte kopiere und füge ihn ein, um Kirby zu registrieren.", + "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", @@ -270,6 +285,13 @@ "loading": "Laden", + "lock.unsaved": "Ungespeicherte Änderungen", + "lock.isLocked": "Ungespeicherte Änderungen von {email}", + "lock.file.isLocked": "Die Datei wird von {email} bearbeitet und kann nicht geändert werden.", + "lock.page.isLocked": "Die Seite wird von {email} bearbeitet und kann nicht geändert werden.", + "lock.unlock": "Entsperren", + "lock.isUnlocked": "Deine ungespeicherten Änderungen wurden von einem anderen Benutzer überschrieben. Du kannst sie herunterladen, um sie manuell einzufügen. ", + "login": "Anmelden", "login.remember": "Angemeldet bleiben", @@ -297,6 +319,8 @@ "more": "Mehr", "name": "Name", "next": "Nächster Eintrag", + "off": "aus", + "on": "an", "open": "Öffnen", "options": "Optionen", @@ -317,6 +341,9 @@ "Diese Seite hat Unterseiten.
Alle Unterseiten werden ebenfalls gelöscht.", "page.delete.confirm.title": "Gib zur Bestätigung den Seitentitel ein", "page.draft.create": "Entwurf anlegen", + "page.duplicate.appendix": "Kopie", + "page.duplicate.files": "Dateien kopieren", + "page.duplicate.pages": "Seiten kopieren", "page.status": "Status", "page.status.draft": "Entwurf", "page.status.draft.description": @@ -342,9 +369,13 @@ "revert": "Verwerfen", "role": "Rolle", + "role.admin.description": "Administratoren haben alle Rechte", + "role.admin.title": "Administrator", "role.all": "Alle", "role.empty": "Keine Benutzer mit dieser Rolle", "role.description.placeholder": "Keine Beschreibung", + "role.nobody.description": "Dies ist die Platzhalterrolle ohne Rechte", + "role.nobody.title": "Niemand", "save": "Speichern", "search": "Suchen", diff --git a/kirby/translations/el.json b/kirby/i18n/translations/el.json similarity index 94% rename from kirby/translations/el.json rename to kirby/i18n/translations/el.json index 5fc5ab0..9099a25 100755 --- a/kirby/translations/el.json +++ b/kirby/i18n/translations/el.json @@ -24,8 +24,14 @@ "delete": "\u0394\u03b9\u03b1\u03b3\u03c1\u03b1\u03c6\u03ae", "dimensions": "Διαστάσεις", "discard": "Απόρριψη", + "download": "Download", + "duplicate": "Duplicate", "edit": "\u0395\u03c0\u03b5\u03be\u03b5\u03c1\u03b3\u03b1\u03c3\u03af\u03b1", + "dialog.files.empty": "No files to select", + "dialog.pages.empty": "No pages to select", + "dialog.users.empty": "No users to select", + "email": "Διεύθυνση ηλεκτρονικού ταχυδρομείου", "email.placeholder": "mail@example.com", @@ -65,6 +71,14 @@ "error.form.incomplete": "Παρακαλώ διορθώστε τα σφάλματα στη φόρμα...", "error.form.notSaved": "Δεν ήταν δυνατή η αποθήκευση της φόρμας", + "error.language.code": "Please enter a valid code for the language", + "error.language.duplicate": "The language already exists", + "error.language.name": "Please enter a valid name for the language", + + "error.license.format": "Please enter a valid license key", + "error.license.email": "Παρακαλώ εισάγετε μια έγκυρη διεύθυνση ηλεκτρονικού ταχυδρομείου", + "error.license.verification": "The license could not be verified", + "error.page.changeSlug.permission": "Δεν επιτρέπεται να αλλάξετε το URL της σελίδας \"{slug}\"", "error.page.changeStatus.incomplete": @@ -90,6 +104,7 @@ "Υπάρχει ήδη ένα προσχέδιο σελίδας με την διεύθυνση URL \"{slug}\"", "error.page.duplicate": "Υπάρχει ήδη μια σελίδα με την διεύθυνση URL \"{slug}\"", + "error.page.duplicate.permission": "You are not allowed to duplicate \"{slug}\"", "error.page.notFound": "Δεν ήταν δυνατή η εύρεση της σελίδας \"{slug}\"", "error.page.num.invalid": "Παρακαλώ εισάγετε έναν έγκυρο αριθμό ταξινόμησης. Οι αριθμοί δεν μπορεί να είναι αρνητικοί.", @@ -270,6 +285,13 @@ "loading": "Φόρτωση", + "lock.unsaved": "Unsaved changes", + "lock.isLocked": "Unsaved changes by {email}", + "lock.file.isLocked": "The file is currently being edited by {email} and cannot be changed.", + "lock.page.isLocked": "The page is currently being edited by {email} and cannot be changed.", + "lock.unlock": "Unlock", + "lock.isUnlocked": "Your unsaved changes have been overwritten by another user. You can download your changes to merge them manually.", + "login": "\u03a3\u03cd\u03bd\u03b4\u03b5\u03c3\u03b7", "login.remember": "Κρατήστε με συνδεδεμένο", @@ -297,6 +319,8 @@ "more": "Περισσότερα", "name": "Ονομασία", "next": "Επόμενο", + "off": "off", + "on": "on", "open": "Άνοιγμα", "options": "Eπιλογές", @@ -317,6 +341,9 @@ "Αυτή η σελίδα έχει υποσελίδες.
Όλες οι υποσελίδες θα διαγραφούν επίσης.", "page.delete.confirm.title": "Εισάγετε τον τίτλο της σελίδας για επιβεβαίωση", "page.draft.create": "Δημιουργία προσχεδίου", + "page.duplicate.appendix": "Αντιγραφή", + "page.duplicate.files": "Copy files", + "page.duplicate.pages": "Copy pages", "page.status": "Kατάσταση", "page.status.draft": "Προσχέδιο", "page.status.draft.description": @@ -342,9 +369,13 @@ "revert": "\u0391\u03b3\u03bd\u03cc\u03b7\u03c3\u03b7", "role": "\u03a1\u03cc\u03bb\u03bf\u03c2", + "role.admin.description": "The admin has all rights", + "role.admin.title": "Admin", "role.all": "Όλα", "role.empty": "Δεν υπάρχουν χρήστες με αυτόν τον ρόλο", "role.description.placeholder": "Χωρίς περιγραφή", + "role.nobody.description": "This is a fallback role without any permissions", + "role.nobody.title": "Nobody", "save": "\u0391\u03c0\u03bf\u03b8\u03ae\u03ba\u03b5\u03c5\u03c3\u03b7", "search": "Αναζήτηση", diff --git a/kirby/translations/en.json b/kirby/i18n/translations/en.json similarity index 91% rename from kirby/translations/en.json rename to kirby/i18n/translations/en.json index 5f95d2a..a48bb07 100755 --- a/kirby/translations/en.json +++ b/kirby/i18n/translations/en.json @@ -24,8 +24,14 @@ "delete": "Delete", "dimensions": "Dimensions", "discard": "Discard", + "download": "Download", + "duplicate": "Duplicate", "edit": "Edit", + "dialog.files.empty": "No files to select", + "dialog.pages.empty": "No pages to select", + "dialog.users.empty": "No users to select", + "email": "Email", "email.placeholder": "mail@example.com", @@ -65,6 +71,14 @@ "error.form.incomplete": "Please fix all form errors…", "error.form.notSaved": "The form could not be saved", + "error.language.code": "Please enter a valid code for the language", + "error.language.duplicate": "The language already exists", + "error.language.name": "Please enter a valid name for the language", + + "error.license.format": "Please enter a valid license key", + "error.license.email": "Please enter a valid email address", + "error.license.verification": "The license could not be verified", + "error.page.changeSlug.permission": "You are not allowed to change the URL appendix for \"{slug}\"", "error.page.changeStatus.incomplete": @@ -90,6 +104,7 @@ "A page draft with the URL appendix \"{slug}\" already exists", "error.page.duplicate": "A page with the URL appendix \"{slug}\" already exists", + "error.page.duplicate.permission": "You are not allowed to duplicate \"{slug}\"", "error.page.notFound": "The page \"{slug}\" cannot be found", "error.page.num.invalid": "Please enter a valid sorting number. Numbers must not be negative.", @@ -270,6 +285,13 @@ "loading": "Loading", + "lock.unsaved": "Unsaved changes", + "lock.isLocked": "Unsaved changes by {email}", + "lock.file.isLocked": "The file is currently being edited by {email} and cannot be changed.", + "lock.page.isLocked": "The page is currently being edited by {email} and cannot be changed.", + "lock.unlock": "Unlock", + "lock.isUnlocked": "Your unsaved changes have been overwritten by another user. You can download your changes to merge them manually.", + "login": "Login", "login.remember": "Keep me logged in", @@ -297,6 +319,8 @@ "more": "More", "name": "Name", "next": "Next", + "off": "off", + "on": "on", "open": "Open", "options": "Options", @@ -317,6 +341,9 @@ "This page has subpages.
All subpages will be deleted as well.", "page.delete.confirm.title": "Enter the page title to confirm", "page.draft.create": "Create draft", + "page.duplicate.appendix": "Copy", + "page.duplicate.files": "Copy files", + "page.duplicate.pages": "Copy pages", "page.status": "Status", "page.status.draft": "Draft", "page.status.draft.description": @@ -342,9 +369,13 @@ "revert": "Revert", "role": "Role", + "role.admin.description": "The admin has all rights", + "role.admin.title": "Admin", "role.all": "All", "role.empty": "There are no users with this role", "role.description.placeholder": "No description", + "role.nobody.description": "This is a fallback role without any permissions", + "role.nobody.title": "Nobody", "save": "Save", "search": "Search", diff --git a/kirby/translations/es_419.json b/kirby/i18n/translations/es_419.json similarity index 92% rename from kirby/translations/es_419.json rename to kirby/i18n/translations/es_419.json index 0b6c3e2..307071c 100755 --- a/kirby/translations/es_419.json +++ b/kirby/i18n/translations/es_419.json @@ -24,8 +24,14 @@ "delete": "Eliminar", "dimensions": "Dimensiones", "discard": "Descartar", + "download": "Download", + "duplicate": "Duplicate", "edit": "Editar", + "dialog.files.empty": "No files to select", + "dialog.pages.empty": "No pages to select", + "dialog.users.empty": "No users to select", + "email": "Correo Electrónico", "email.placeholder": "correo@ejemplo.com", @@ -65,6 +71,14 @@ "error.form.incomplete": "Por favor, corrige todos los errores del formulario...", "error.form.notSaved": "No se pudo guardar el formulario.", + "error.language.code": "Please enter a valid code for the language", + "error.language.duplicate": "The language already exists", + "error.language.name": "Please enter a valid name for the language", + + "error.license.format": "Please enter a valid license key", + "error.license.email": "Por favor ingresa un correo electrónico valido", + "error.license.verification": "The license could not be verified", + "error.page.changeSlug.permission": "No está permitido cambiar el apéndice de URL para \"{slug}\".", "error.page.changeStatus.incomplete": @@ -90,6 +104,7 @@ "Ya existe un borrador de página con el apéndice de URL \"{slug}\"", "error.page.duplicate": "Ya existe una página con el apéndice de URL \"{slug}\"", + "error.page.duplicate.permission": "You are not allowed to duplicate \"{slug}\"", "error.page.notFound": "La página \"{slug}\" no se encuentra", "error.page.num.invalid": "Por favor, introduce un número de posición válido. Los números no deben ser negativos.", @@ -270,6 +285,13 @@ "loading": "Cargando", + "lock.unsaved": "Unsaved changes", + "lock.isLocked": "Unsaved changes by {email}", + "lock.file.isLocked": "The file is currently being edited by {email} and cannot be changed.", + "lock.page.isLocked": "The page is currently being edited by {email} and cannot be changed.", + "lock.unlock": "Unlock", + "lock.isUnlocked": "Your unsaved changes have been overwritten by another user. You can download your changes to merge them manually.", + "login": "Iniciar sesi\u00f3n", "login.remember": "Mantener mi sesión iniciada", @@ -297,6 +319,8 @@ "more": "Màs", "name": "Nombre", "next": "Siguiente", + "off": "off", + "on": "on", "open": "Abrir", "options": "Opciones", @@ -317,6 +341,9 @@ "Esta página tiene subpáginas.
Todas las súbpaginas serán eliminadas también.", "page.delete.confirm.title": "Introduce el título de la página para confirmar", "page.draft.create": "Crear borrador", + "page.duplicate.appendix": "Copiar", + "page.duplicate.files": "Copy files", + "page.duplicate.pages": "Copy pages", "page.status": "Estado", "page.status.draft": "Borrador", "page.status.draft.description": @@ -342,9 +369,13 @@ "revert": "Revertir", "role": "Rol", + "role.admin.description": "The admin has all rights", + "role.admin.title": "Admin", "role.all": "Todos", "role.empty": "No hay usuarios con este rol", "role.description.placeholder": "Sin descripción", + "role.nobody.description": "This is a fallback role without any permissions", + "role.nobody.title": "Nobody", "save": "Guardar", "search": "Buscar", diff --git a/kirby/translations/es_ES.json b/kirby/i18n/translations/es_ES.json similarity index 89% rename from kirby/translations/es_ES.json rename to kirby/i18n/translations/es_ES.json index 3d62738..c66a805 100755 --- a/kirby/translations/es_ES.json +++ b/kirby/i18n/translations/es_ES.json @@ -1,5 +1,5 @@ { - "add": "Add", + "add": "Añadir", "avatar": "Foto de perfil", "back": "Atrás", "cancel": "Cancelar", @@ -12,7 +12,7 @@ "date": "Fecha", "date.select": "Selecciona una fecha", - "day": "Dáa", + "day": "Día", "days.fri": "Vi", "days.mon": "Lu", "days.sat": "Sá", @@ -24,8 +24,14 @@ "delete": "Borrar", "dimensions": "Dimensiones", "discard": "Descartar", + "download": "Download", + "duplicate": "Duplicate", "edit": "Editar", + "dialog.files.empty": "No files to select", + "dialog.pages.empty": "No pages to select", + "dialog.users.empty": "No users to select", + "email": "Correo electrónico", "email.placeholder": "correo@ejemplo.com", @@ -33,7 +39,7 @@ "error.access.panel": "No estás autorizado para acceder al panel", "error.avatar.create.fail": "No se pudo subir la foto de perfil.", - "error.avatar.delete.fail": "Nose pudo borrar la foto de perfil", + "error.avatar.delete.fail": "No se pudo borrar la foto de perfil", "error.avatar.dimensions.invalid": "Por favor, mantenga el ancho y la altura de la imagen de perfil debajo de 3000 píxeles", "error.avatar.mime.forbidden": @@ -62,9 +68,17 @@ "error.file.type.forbidden": "No está permitido subir archivos {type}", "error.file.undefined": "El archivo no pudo ser encontrado", - "error.form.incomplete": "Por favor, corrija todo los errores del formulario…", + "error.form.incomplete": "Por favor, corrija todos los errores del formulario…", "error.form.notSaved": "El formulario no pudo ser guardado", + "error.language.code": "Please enter a valid code for the language", + "error.language.duplicate": "The language already exists", + "error.language.name": "Please enter a valid name for the language", + + "error.license.format": "Please enter a valid license key", + "error.license.email": "Por favor, introduce un correo electrónico válido", + "error.license.verification": "The license could not be verified", + "error.page.changeSlug.permission": "No está permitido cambiar el apéndice de URL para \"{slug}\"", "error.page.changeStatus.incomplete": @@ -90,6 +104,7 @@ "Un borrador de página con el apéndice de URL \"{slug}\" ya existe", "error.page.duplicate": "Una página con el apéndice de URL. \"{slug}\" ya existe", + "error.page.duplicate.permission": "You are not allowed to duplicate \"{slug}\"", "error.page.notFound": "La página \"{slug}\" no puede ser encontrada", "error.page.num.invalid": "Por favor, introduzca un número válido. Estos no deben ser negativos.", @@ -104,18 +119,18 @@ "error.section.files.max.singular": "No debes agregar más de 1 archivo a la sección \"{section}\"", "error.section.files.min.plural": - "The \"{section}\" section requires at least {min} files", + "La sección \"{section}\" requiere al menos {min} archivos", "error.section.files.min.singular": - "The \"{section}\" section requires at least one file", + "La sección \"{section}\" requiere al menos un archivo", "error.section.pages.max.plural": "No debe agregar más de {max} páginas a la sección \"{section}\"", "error.section.pages.max.singular": "No debe agregar más de una página a la sección \"{section}\"", "error.section.pages.min.plural": - "The \"{section}\" section requires at least {min} pages", + "La sección \"{section}\" requiere al menos {min} páginas", "error.section.pages.min.singular": - "The \"{section}\" section requires at least one page", + "La sección \"{section}\" requiere al menos una página", "error.section.notLoaded": "La sección \"{name}\" no pudo ser cargada", "error.section.type.invalid": "El sección tipo \"{tipo}\" no es válido", @@ -151,7 +166,7 @@ "error.user.notFound": "El usuario \"{name}\" no pudo ser encontrado", "error.user.password.invalid": "Por favor introduce una contraseña válida. Las contraseñas deben tener al menos 8 caracteres de largo.", - "error.user.password.notSame": "las contraseñas no coinciden", + "error.user.password.notSame": "Las contraseñas no coinciden", "error.user.password.undefined": "El usuario no tiene contraseña", "error.user.role.invalid": "Por favor ingrese un rol válido", "error.user.undefined": "El usuario no puede ser encontrado", @@ -270,6 +285,13 @@ "loading": "Cargando", + "lock.unsaved": "Unsaved changes", + "lock.isLocked": "Unsaved changes by {email}", + "lock.file.isLocked": "The file is currently being edited by {email} and cannot be changed.", + "lock.page.isLocked": "The page is currently being edited by {email} and cannot be changed.", + "lock.unlock": "Unlock", + "lock.isUnlocked": "Your unsaved changes have been overwritten by another user. You can download your changes to merge them manually.", + "login": "Iniciar sesión", "login.remember": "Mantener sesión iniciada", @@ -297,10 +319,12 @@ "more": "Más", "name": "Nombre", "next": "Siguiente", + "off": "off", + "on": "on", "open": "Abrir", "options": "Opciones", - "orientation": "Orientacion", + "orientation": "Orientación", "orientation.landscape": "Paisaje", "orientation.portrait": "Retrato", "orientation.square": "Cuadrado", @@ -317,6 +341,9 @@ "Esta página tiene subpáginas.
Todas las subpáginas también serán eliminadas.", "page.delete.confirm.title": "Introduzca el título de la página para confirmar", "page.draft.create": "Crear borrador", + "page.duplicate.appendix": "Copiar", + "page.duplicate.files": "Copy files", + "page.duplicate.pages": "Copy pages", "page.status": "Estado", "page.status.draft": "Borrador", "page.status.draft.description": @@ -342,9 +369,13 @@ "revert": "Revertir", "role": "Rol", + "role.admin.description": "The admin has all rights", + "role.admin.title": "Admin", "role.all": "Todos", "role.empty": "No hay usuarios con este rol", "role.description.placeholder": "Sin descripción", + "role.nobody.description": "This is a fallback role without any permissions", + "role.nobody.title": "Nobody", "save": "Guardar", "search": "Buscar", @@ -366,8 +397,8 @@ "toolbar.button.heading.3": "Encabezado 3", "toolbar.button.italic": "Italica", "toolbar.button.file": "Archivo", - "toolbar.button.file.select": "Select a file", - "toolbar.button.file.upload": "Upload a file", + "toolbar.button.file.select": "Seleccione un archivo", + "toolbar.button.file.upload": "Sube un archivo", "toolbar.button.link": "Enlace", "toolbar.button.ol": "Lista ordenada", "toolbar.button.ul": "Lista de viñetas", diff --git a/kirby/translations/fa.json b/kirby/i18n/translations/fa.json similarity index 93% rename from kirby/translations/fa.json rename to kirby/i18n/translations/fa.json index 1d02ee2..9bcbf95 100755 --- a/kirby/translations/fa.json +++ b/kirby/i18n/translations/fa.json @@ -24,8 +24,14 @@ "delete": "\u062d\u0630\u0641", "dimensions": "ابعاد", "discard": "\u0627\u0646\u0635\u0631\u0627\u0641", + "download": "Download", + "duplicate": "Duplicate", "edit": "\u0648\u06cc\u0631\u0627\u06cc\u0634", + "dialog.files.empty": "No files to select", + "dialog.pages.empty": "No pages to select", + "dialog.users.empty": "No users to select", + "email": "\u067e\u0633\u062a \u0627\u0644\u06a9\u062a\u0631\u0648\u0646\u06cc\u06a9", "email.placeholder": "mail@example.com", @@ -65,6 +71,14 @@ "error.form.incomplete": "لطفا کلیه خطاهای فرم را برطرف کنید", "error.form.notSaved": "امکان دخیره فرم وجود ندارد", + "error.language.code": "Please enter a valid code for the language", + "error.language.duplicate": "The language already exists", + "error.language.name": "Please enter a valid name for the language", + + "error.license.format": "Please enter a valid license key", + "error.license.email": "لطفا ایمیل صحیحی وارد کنید", + "error.license.verification": "The license could not be verified", + "error.page.changeSlug.permission": "شما امکان تغییر پسوند Url صفحه «{slug}» را ندارید", "error.page.changeStatus.incomplete": @@ -90,6 +104,7 @@ "صفحه پیش‌نویسی با پسوند Url مشابه «{slug}» هم اکنون موجود است", "error.page.duplicate": "صفحه‌ای با آدرس Url مشابه «{slug}» هم اکنون موجود است", + "error.page.duplicate.permission": "You are not allowed to duplicate \"{slug}\"", "error.page.notFound": "صفحه مورد نظر با آدرس «{slug}» پیدا نشد.", "error.page.num.invalid": "لطفا شماره ترتیب را بدرستی وارد نمایید. اعداد نباید منفی باشند.", @@ -270,6 +285,13 @@ "loading": "بارگزاری", + "lock.unsaved": "Unsaved changes", + "lock.isLocked": "Unsaved changes by {email}", + "lock.file.isLocked": "The file is currently being edited by {email} and cannot be changed.", + "lock.page.isLocked": "The page is currently being edited by {email} and cannot be changed.", + "lock.unlock": "Unlock", + "lock.isUnlocked": "Your unsaved changes have been overwritten by another user. You can download your changes to merge them manually.", + "login": "ورود", "login.remember": "مرا به خاطر بسپار", @@ -297,6 +319,8 @@ "more": "بیشتر", "name": "نام", "next": "بعدی", + "off": "off", + "on": "on", "open": "بازکردن", "options": "گزینه‌ها", @@ -317,6 +341,9 @@ "این صفحه دارای زیرصفحه است.
تمام زیر صفحات نیز حذف خواهد شد.", "page.delete.confirm.title": "جهت ادامه عنوان صفحه را وارد کنید", "page.draft.create": "ایجاد پیش‌نویس", + "page.duplicate.appendix": "کپی", + "page.duplicate.files": "Copy files", + "page.duplicate.pages": "Copy pages", "page.status": "وضعیت", "page.status.draft": "پیش‌نویس", "page.status.draft.description": @@ -342,9 +369,13 @@ "revert": "بازگرداندن تغییرات", "role": "\u0646\u0642\u0634", + "role.admin.description": "The admin has all rights", + "role.admin.title": "Admin", "role.all": "همه", "role.empty": "هیچ کاربری با این نقش وجود ندارد", "role.description.placeholder": "فاقد شرح", + "role.nobody.description": "This is a fallback role without any permissions", + "role.nobody.title": "Nobody", "save": "\u0630\u062e\u06cc\u0631\u0647", "search": "جستجو", diff --git a/kirby/translations/fi.json b/kirby/i18n/translations/fi.json similarity index 92% rename from kirby/translations/fi.json rename to kirby/i18n/translations/fi.json index 8d828aa..96bf5e5 100755 --- a/kirby/translations/fi.json +++ b/kirby/i18n/translations/fi.json @@ -24,8 +24,14 @@ "delete": "Poista", "dimensions": "Mitat", "discard": "Hylkää", + "download": "Download", + "duplicate": "Duplicate", "edit": "Muokkaa", + "dialog.files.empty": "No files to select", + "dialog.pages.empty": "No pages to select", + "dialog.users.empty": "No users to select", + "email": "S\u00e4hk\u00f6posti", "email.placeholder": "nimi@osoite.fi", @@ -65,6 +71,14 @@ "error.form.incomplete": "Korjaa kaikki lomakkeen virheet...", "error.form.notSaved": "Lomaketta ei voitu tallentaa", + "error.language.code": "Please enter a valid code for the language", + "error.language.duplicate": "The language already exists", + "error.language.name": "Please enter a valid name for the language", + + "error.license.format": "Please enter a valid license key", + "error.license.email": "Anna kelpaava sähköpostiosoite", + "error.license.verification": "The license could not be verified", + "error.page.changeSlug.permission": "Sinulla ei ole oikeutta muuttaa URL-liitettä sivulle \"{slug}\"", "error.page.changeStatus.incomplete": @@ -90,6 +104,7 @@ "Sivuluonnos URL-liitteellä \"{slug}\" on jo olemassa", "error.page.duplicate": "Sivu URL-liitteellä \"{slug}\" on jo olemassa", + "error.page.duplicate.permission": "You are not allowed to duplicate \"{slug}\"", "error.page.notFound": "Sivua \"{slug}\" ei löytynyt", "error.page.num.invalid": "Anna kelpaava järjestysnumero. Numero ei voi olla negatiivinen.", @@ -270,6 +285,13 @@ "loading": "Ladataan", + "lock.unsaved": "Unsaved changes", + "lock.isLocked": "Unsaved changes by {email}", + "lock.file.isLocked": "The file is currently being edited by {email} and cannot be changed.", + "lock.page.isLocked": "The page is currently being edited by {email} and cannot be changed.", + "lock.unlock": "Unlock", + "lock.isUnlocked": "Your unsaved changes have been overwritten by another user. You can download your changes to merge them manually.", + "login": "Kirjaudu", "login.remember": "Pidä minut kirjautuneena", @@ -297,6 +319,8 @@ "more": "Lisää", "name": "Nimi", "next": "Seuraava", + "off": "off", + "on": "on", "open": "Avaa", "options": "Asetukset", @@ -317,6 +341,9 @@ "Tällä sivulla on alasivuja.
Myös kaikki alasivut poistetaan.", "page.delete.confirm.title": "Anna vahvistuksena sivun nimi", "page.draft.create": "Uusi luonnos", + "page.duplicate.appendix": "Kopioi", + "page.duplicate.files": "Copy files", + "page.duplicate.pages": "Copy pages", "page.status": "Tila", "page.status.draft": "Luonnos", "page.status.draft.description": @@ -342,9 +369,13 @@ "revert": "Palauta", "role": "K\u00e4ytt\u00e4j\u00e4taso", + "role.admin.description": "The admin has all rights", + "role.admin.title": "Admin", "role.all": "Kaikki", "role.empty": "Tällä käyttäjätasolla ei ole yhtään käyttäjää", "role.description.placeholder": "Ei kuvausta", + "role.nobody.description": "This is a fallback role without any permissions", + "role.nobody.title": "Nobody", "save": "Tallenna", "search": "Haku", diff --git a/kirby/translations/fr.json b/kirby/i18n/translations/fr.json similarity index 90% rename from kirby/translations/fr.json rename to kirby/i18n/translations/fr.json index 7e312ab..243c268 100755 --- a/kirby/translations/fr.json +++ b/kirby/i18n/translations/fr.json @@ -24,8 +24,14 @@ "delete": "Supprimer", "dimensions": "Dimensions", "discard": "Supprimer", + "download": "Télécharger", + "duplicate": "Dupliquer", "edit": "Éditer", + "dialog.files.empty": "Aucun fichier à sélectionner", + "dialog.pages.empty": "Aucune page à sélectionner", + "dialog.users.empty": "Aucun utilisateur à sélectionner", + "email": "Courriel", "email.placeholder": "mail@example.com", @@ -65,6 +71,14 @@ "error.form.incomplete": "Veuillez corriger toutes les erreurs du formulaire…", "error.form.notSaved": "Le formulaire n’a pu être enregistré", + "error.language.code": "Veuillez saisir un code valide pour cette langue", + "error.language.duplicate": "Cette langue existe déjà", + "error.language.name": "Veuillez saisir un nom valide pour cette langue", + + "error.license.format": "Veuillez saisir un numéro de licence valide", + "error.license.email": "Veuillez saisir un courriel valide", + "error.license.verification": "La licence n’a pu être vérifiée", + "error.page.changeSlug.permission": "Vous n’êtes pas autorisé à modifier l’identifiant d’URL pour « {slug} »", "error.page.changeStatus.incomplete": @@ -90,6 +104,7 @@ "Un brouillon avec l’identifiant d’URL « {slug} » existe déjà", "error.page.duplicate": "Une page avec l’identifiant d’URL « {slug} » existe déjà", + "error.page.duplicate.permission": "Vous n'êtes pas autorisé à dupliquer « {slug} »", "error.page.notFound": "La page « {slug} » n’a pu être trouvée", "error.page.num.invalid": "Veuillez saisir un numéro de position valide. Les numéros ne doivent pas être négatifs.", @@ -104,18 +119,18 @@ "error.section.files.max.singular": "Vous ne pouvez ajouter plus d’un fichier à la section « {section} »", "error.section.files.min.plural": - "The \"{section}\" section requires at least {min} files", + "La section « {section}\" » requiert au moins {min} fichiers", "error.section.files.min.singular": - "The \"{section}\" section requires at least one file", + "La section « {section}\" » requiert au moins un fichier", "error.section.pages.max.plural": "Vous ne pouvez ajouter plus de {max} pages à la section « {section} »", "error.section.pages.max.singular": "Vous ne pouvez ajouter plus d’une page à la section « {section} »", "error.section.pages.min.plural": - "The \"{section}\" section requires at least {min} pages", + "La section « {section}\" » requiert au moins {min} pages", "error.section.pages.min.singular": - "The \"{section}\" section requires at least one page", + "La section « {section}\" » requiert au moins une page", "error.section.notLoaded": "La section « {name} » n’a pu être chargée", "error.section.type.invalid": "Le type de section « {type} » est incorrect", @@ -270,6 +285,13 @@ "loading": "Chargement", + "lock.unsaved": "Modifications non enregistrées", + "lock.isLocked": "Modifications non enregistrées par {email}", + "lock.file.isLocked": "Le fichier est actuellement édité par {email} et ne peut être modifié.", + "lock.page.isLocked": "La page est actuellement éditée par {email} et ne peut être modifiée.", + "lock.unlock": "Déverrouiller", + "lock.isUnlocked": "Vos modifications non enregistrées ont été écrasées pas un autre utilisateur. Vous pouvez télécharger vos modifications pour les fusionner manuellement.", + "login": "Se connecter", "login.remember": "Rester connecté", @@ -297,6 +319,8 @@ "more": "Plus", "name": "Nom", "next": "Suivant", + "off": "off", + "on": "on", "open": "Ouvrir", "options": "Options", @@ -317,6 +341,9 @@ "Cette page contient des sous-pages.
Toutes les sous-pages seront également supprimées.", "page.delete.confirm.title": "Veuillez saisir le titre de la page pour confirmer", "page.draft.create": "Créer un brouillon", + "page.duplicate.appendix": "Copier", + "page.duplicate.files": "Copier les fichiers", + "page.duplicate.pages": "Copier les pages", "page.status": "Statut", "page.status.draft": "Brouillon", "page.status.draft.description": @@ -342,9 +369,13 @@ "revert": "Revenir", "role": "Rôle", + "role.admin.description": "L’administrateur dispose de tous les droits", + "role.admin.title": "Administrateur", "role.all": "Tous", "role.empty": "Il n’y a aucun utilisateur avec ce rôle", "role.description.placeholder": "Pas de description", + "role.nobody.description": "Ceci est un rôle de secours sans aucune permission.", + "role.nobody.title": "Personne", "save": "Enregistrer", "search": "Rechercher", diff --git a/kirby/translations/hu.json b/kirby/i18n/translations/hu.json similarity index 92% rename from kirby/translations/hu.json rename to kirby/i18n/translations/hu.json index 453da84..7eed49a 100755 --- a/kirby/translations/hu.json +++ b/kirby/i18n/translations/hu.json @@ -24,8 +24,14 @@ "delete": "T\u00f6rl\u00e9s", "dimensions": "Méretek", "discard": "Visszavon\u00e1s", + "download": "Download", + "duplicate": "Duplicate", "edit": "Aloldal szerkeszt\u00e9se", + "dialog.files.empty": "No files to select", + "dialog.pages.empty": "No pages to select", + "dialog.users.empty": "No users to select", + "email": "Email", "email.placeholder": "mail@pelda.hu", @@ -65,6 +71,14 @@ "error.form.incomplete": "Kérlek javítsd ki az összes hibát az űrlapon", "error.form.notSaved": "Az űrlap nem menthető", + "error.language.code": "Please enter a valid code for the language", + "error.language.duplicate": "The language already exists", + "error.language.name": "Please enter a valid name for the language", + + "error.license.format": "Please enter a valid license key", + "error.license.email": "Kérlek adj meg egy valós email-címet", + "error.license.verification": "The license could not be verified", + "error.page.changeSlug.permission": "Nem változtathatod meg az URL-előtagot: \"{slug}\"", "error.page.changeStatus.incomplete": @@ -90,6 +104,7 @@ "Van már egy másik oldal ezzel az URL-lel: \"{slug}\"", "error.page.duplicate": "Van már egy másik oldal ezzel az URL-lel: \"{slug}\"", + "error.page.duplicate.permission": "You are not allowed to duplicate \"{slug}\"", "error.page.notFound": "Az oldal nem tal\u00e1lhat\u00f3", "error.page.num.invalid": "Kérlek megfelelő oldalszámozást adj meg. Negatív szám itt nem használható.", @@ -270,6 +285,13 @@ "loading": "Betöltés", + "lock.unsaved": "Unsaved changes", + "lock.isLocked": "Unsaved changes by {email}", + "lock.file.isLocked": "The file is currently being edited by {email} and cannot be changed.", + "lock.page.isLocked": "The page is currently being edited by {email} and cannot be changed.", + "lock.unlock": "Unlock", + "lock.isUnlocked": "Your unsaved changes have been overwritten by another user. You can download your changes to merge them manually.", + "login": "Bejelentkezés", "login.remember": "Maradjak bejelentkezve", @@ -297,6 +319,8 @@ "more": "Több", "name": "Név", "next": "Következő", + "off": "off", + "on": "on", "open": "Megnyitás", "options": "Beállítások", @@ -317,6 +341,9 @@ "Ehhez az oldalhoz aloldalak tartoznak.
Az oldal törlésekor a hozzá tartozó aloldalak is törlődnek.", "page.delete.confirm.title": "Megerősítéshez add meg az oldal címét", "page.draft.create": "Piszkozat létrehozása", + "page.duplicate.appendix": "Másol", + "page.duplicate.files": "Copy files", + "page.duplicate.pages": "Copy pages", "page.status": "Állapot", "page.status.draft": "Piszkozat", "page.status.draft.description": @@ -342,9 +369,13 @@ "revert": "Visszavon\u00e1s", "role": "Szerepkör", + "role.admin.description": "The admin has all rights", + "role.admin.title": "Admin", "role.all": "Összes", "role.empty": "Nincsenek felhasználók ilyen szerepkörrel", "role.description.placeholder": "Nincs leírás", + "role.nobody.description": "This is a fallback role without any permissions", + "role.nobody.title": "Nobody", "save": "Ment\u00e9s", "search": "Keresés", diff --git a/kirby/translations/id.json b/kirby/i18n/translations/id.json similarity index 91% rename from kirby/translations/id.json rename to kirby/i18n/translations/id.json index 4d28d91..831183f 100755 --- a/kirby/translations/id.json +++ b/kirby/i18n/translations/id.json @@ -24,8 +24,14 @@ "delete": "Hapus", "dimensions": "Dimensi", "discard": "Buang", + "download": "Download", + "duplicate": "Duplicate", "edit": "Sunting", + "dialog.files.empty": "No files to select", + "dialog.pages.empty": "No pages to select", + "dialog.users.empty": "No users to select", + "email": "Surel", "email.placeholder": "surel@contohsurel.com", @@ -65,6 +71,14 @@ "error.form.incomplete": "Pastikan semua bidang telah diisi dengan benar…", "error.form.notSaved": "Formulir tidak dapat disimpan", + "error.language.code": "Please enter a valid code for the language", + "error.language.duplicate": "The language already exists", + "error.language.name": "Please enter a valid name for the language", + + "error.license.format": "Please enter a valid license key", + "error.license.email": "Masukkan surel yang valid", + "error.license.verification": "The license could not be verified", + "error.page.changeSlug.permission": "Anda tidak diizinkan mengubah akhiran URL untuk \"{slug}\"", "error.page.changeStatus.incomplete": @@ -90,6 +104,7 @@ "Draf halaman dengan akhiran URL \"{slug}\" sudah ada", "error.page.duplicate": "Halaman dengan akhiran URL \"{slug}\" sudah ada", + "error.page.duplicate.permission": "You are not allowed to duplicate \"{slug}\"", "error.page.notFound": "Halaman \"{slug}\" tidak dapat ditemukan", "error.page.num.invalid": "Masukkan nomor urut yang valid. Nomor tidak boleh negatif.", @@ -270,6 +285,13 @@ "loading": "Memuat", + "lock.unsaved": "Unsaved changes", + "lock.isLocked": "Unsaved changes by {email}", + "lock.file.isLocked": "The file is currently being edited by {email} and cannot be changed.", + "lock.page.isLocked": "The page is currently being edited by {email} and cannot be changed.", + "lock.unlock": "Unlock", + "lock.isUnlocked": "Your unsaved changes have been overwritten by another user. You can download your changes to merge them manually.", + "login": "Masuk", "login.remember": "Biarkan tetap masuk", @@ -297,6 +319,8 @@ "more": "Lebih lanjut", "name": "Nama", "next": "Selanjutnya", + "off": "off", + "on": "on", "open": "Buka", "options": "Opsi", @@ -317,6 +341,9 @@ "Halaman ini memiliki sub-halaman.
Semua sub-halaman akan ikut dihapus.", "page.delete.confirm.title": "Masukkan judul halaman untuk mengonfirmasi", "page.draft.create": "Buat draf", + "page.duplicate.appendix": "Salin", + "page.duplicate.files": "Copy files", + "page.duplicate.pages": "Copy pages", "page.status": "Status", "page.status.draft": "Draf", "page.status.draft.description": @@ -342,9 +369,13 @@ "revert": "Kembalikan", "role": "Peran", + "role.admin.description": "The admin has all rights", + "role.admin.title": "Admin", "role.all": "Semua", "role.empty": "Tidak ada pengguna dengan peran ini", "role.description.placeholder": "Tidak ada deskripsi", + "role.nobody.description": "This is a fallback role without any permissions", + "role.nobody.title": "Nobody", "save": "Simpan", "search": "Cari", diff --git a/kirby/translations/it.json b/kirby/i18n/translations/it.json similarity index 91% rename from kirby/translations/it.json rename to kirby/i18n/translations/it.json index 27580c6..5db7a44 100755 --- a/kirby/translations/it.json +++ b/kirby/i18n/translations/it.json @@ -24,8 +24,14 @@ "delete": "Elimina", "dimensions": "Dimensioni", "discard": "Abbandona", + "download": "Scarica", + "duplicate": "Duplica", "edit": "Modifica", + "dialog.files.empty": "No files to select", + "dialog.pages.empty": "No pages to select", + "dialog.users.empty": "No users to select", + "email": "Email", "email.placeholder": "mail@esempio.com", @@ -65,6 +71,14 @@ "error.form.incomplete": "Correggi tutti gli errori nel form...", "error.form.notSaved": "Non è stato possibile salvare il form", + "error.language.code": "Please enter a valid code for the language", + "error.language.duplicate": "The language already exists", + "error.language.name": "Please enter a valid name for the language", + + "error.license.format": "Inserisci un codice di licenza valido", + "error.license.email": "Inserisci un indirizzo email valido", + "error.license.verification": "Non è stato possibile verificare la licenza", + "error.page.changeSlug.permission": "Non ti è permesso cambiare l'URL di \"{slug}\"", "error.page.changeStatus.incomplete": @@ -90,6 +104,7 @@ "Una bozza di pagina con l'URL \"{slug}\" esiste già", "error.page.duplicate": "Una pagina con l'URL \"{slug}\" esiste già", + "error.page.duplicate.permission": "Non ti è permesso duplicare \"{slug}\"", "error.page.notFound": "La pagina \"{slug}\" non è stata trovata", "error.page.num.invalid": "Inserisci un numero di ordinamento valido. I numeri non devono essere negativi", @@ -270,6 +285,13 @@ "loading": "Caricamento", + "lock.unsaved": "Modifiche non salvate", + "lock.isLocked": "Modifiche non salvate di {email}", + "lock.file.isLocked": "Il file viene attualmente modificato da {email} e non può essere cambiato.", + "lock.page.isLocked": "la pagina viene attualmente modificata da {email} e non può essere cambiata.", + "lock.unlock": "Sblocca", + "lock.isUnlocked": "Un altro utente ha sovrascritto le tue modifiche non salvate. Puoi scaricarle per recuperarle e quindi incorporarle manualmente. ", + "login": "Accedi", "login.remember": "Resta collegato", @@ -297,6 +319,8 @@ "more": "Di più", "name": "Nome", "next": "Prossimo", + "off": "off", + "on": "on", "open": "Apri", "options": "Opzioni", @@ -317,6 +341,9 @@ "Questa pagina ha sottopagine.
Anche tutte le sottopagine verranno eliminate.", "page.delete.confirm.title": "Inserisci il titolo della pagina per confermare", "page.draft.create": "Crea bozza", + "page.duplicate.appendix": "Copia", + "page.duplicate.files": "Copia file", + "page.duplicate.pages": "Copia pagine", "page.status": "Stato", "page.status.draft": "Bozza", "page.status.draft.description": @@ -342,9 +369,13 @@ "revert": "Abbandona", "role": "Ruolo", + "role.admin.description": "L'amministratore ha tutti i permessi", + "role.admin.title": "Amministratore", "role.all": "Tutti", "role.empty": "Non ci sono utenti con questo ruolo", "role.description.placeholder": "Nessuna descrizione", + "role.nobody.description": "Questo è un ruolo \"fallback\" senza permessi", + "role.nobody.title": "Nessuno", "save": "Salva", "search": "Cerca", diff --git a/kirby/translations/ko.json b/kirby/i18n/translations/ko.json similarity index 92% rename from kirby/translations/ko.json rename to kirby/i18n/translations/ko.json index e778741..952cb87 100755 --- a/kirby/translations/ko.json +++ b/kirby/i18n/translations/ko.json @@ -24,8 +24,14 @@ "delete": "\uc0ad\uc81c", "dimensions": "크기", "discard": "무시", + "download": "Download", + "duplicate": "Duplicate", "edit": "\ud3b8\uc9d1", + "dialog.files.empty": "No files to select", + "dialog.pages.empty": "No pages to select", + "dialog.users.empty": "No users to select", + "email": "\uc774\uba54\uc77c \uc8fc\uc18c", "email.placeholder": "mail@example.com", @@ -65,6 +71,14 @@ "error.form.incomplete": "항목에 오류가 있습니다.", "error.form.notSaved": "항목을 저장할 수 없습니다.", + "error.language.code": "Please enter a valid code for the language", + "error.language.duplicate": "The language already exists", + "error.language.name": "Please enter a valid name for the language", + + "error.license.format": "Please enter a valid license key", + "error.license.email": "올바른 이메일 주소를 입력하세요.", + "error.license.verification": "The license could not be verified", + "error.page.changeSlug.permission": "고유 주소({slug})를 변경할 권한이 없습니다.", "error.page.changeStatus.incomplete": @@ -90,6 +104,7 @@ "고유 주소({slug})가 같은 초안이 있습니다.", "error.page.duplicate": "고유 주소({slug})가 같은 페이지가 있습니다.", + "error.page.duplicate.permission": "You are not allowed to duplicate \"{slug}\"", "error.page.notFound": "페이지({slug})가 없습니다.", "error.page.num.invalid": "올바른 정수를 입력하세요.", @@ -270,6 +285,13 @@ "loading": "로딩 중", + "lock.unsaved": "Unsaved changes", + "lock.isLocked": "Unsaved changes by {email}", + "lock.file.isLocked": "The file is currently being edited by {email} and cannot be changed.", + "lock.page.isLocked": "The page is currently being edited by {email} and cannot be changed.", + "lock.unlock": "Unlock", + "lock.isUnlocked": "Your unsaved changes have been overwritten by another user. You can download your changes to merge them manually.", + "login": "\ub85c\uadf8\uc778", "login.remember": "로그인 유지", @@ -297,6 +319,8 @@ "more": "더 보기", "name": "이름", "next": "다음", + "off": "off", + "on": "on", "open": "열기", "options": "옵션", @@ -317,6 +341,9 @@ "페이지에 하위 페이지가 있습니다. 모든 하위 페이지가 삭제됩니다.", "page.delete.confirm.title": "페이지 제목을 입력하세요.", "page.draft.create": "초안 작성", + "page.duplicate.appendix": "복사", + "page.duplicate.files": "Copy files", + "page.duplicate.pages": "Copy pages", "page.status": "상태", "page.status.draft": "초안", "page.status.draft.description": @@ -342,9 +369,13 @@ "revert": "복원", "role": "역할", + "role.admin.description": "The admin has all rights", + "role.admin.title": "Admin", "role.all": "전체 보기", "role.empty": "이 역할에 해당하는 사용자가 없습니다.", "role.description.placeholder": "설명이 없습니다.", + "role.nobody.description": "This is a fallback role without any permissions", + "role.nobody.title": "Nobody", "save": "\uc800\uc7a5", "search": "검색", diff --git a/kirby/translations/nb.json b/kirby/i18n/translations/nb.json similarity index 92% rename from kirby/translations/nb.json rename to kirby/i18n/translations/nb.json index 42f4be3..704b871 100755 --- a/kirby/translations/nb.json +++ b/kirby/i18n/translations/nb.json @@ -24,8 +24,14 @@ "delete": "Slett", "dimensions": "Dimensjoner", "discard": "Forkast", + "download": "Download", + "duplicate": "Duplicate", "edit": "Rediger", + "dialog.files.empty": "No files to select", + "dialog.pages.empty": "No pages to select", + "dialog.users.empty": "No users to select", + "email": "Epost", "email.placeholder": "epost@eksempel.no", @@ -65,6 +71,14 @@ "error.form.incomplete": "Vennligst fiks alle feil…", "error.form.notSaved": "Skjemaet kunne ikke lagres", + "error.language.code": "Please enter a valid code for the language", + "error.language.duplicate": "The language already exists", + "error.language.name": "Please enter a valid name for the language", + + "error.license.format": "Please enter a valid license key", + "error.license.email": "Vennligst skriv inn en gyldig e-postadresse", + "error.license.verification": "The license could not be verified", + "error.page.changeSlug.permission": "Du kan ikke endre URLen for denne siden", "error.page.changeStatus.incomplete": @@ -90,6 +104,7 @@ "Et sideutkast med URL-tillegget \"{slug}\" eksisterer allerede", "error.page.duplicate": "En side med URL-tillegget \"{slug}\" eksisterer allerede", + "error.page.duplicate.permission": "You are not allowed to duplicate \"{slug}\"", "error.page.notFound": "Siden \"{slug}\" ble ikke funnet", "error.page.num.invalid": "Vennligst skriv inn et gyldig sorteringsnummer. Tallet må ikke være negativt.", @@ -270,6 +285,13 @@ "loading": "Laster inn", + "lock.unsaved": "Unsaved changes", + "lock.isLocked": "Unsaved changes by {email}", + "lock.file.isLocked": "The file is currently being edited by {email} and cannot be changed.", + "lock.page.isLocked": "The page is currently being edited by {email} and cannot be changed.", + "lock.unlock": "Unlock", + "lock.isUnlocked": "Your unsaved changes have been overwritten by another user. You can download your changes to merge them manually.", + "login": "Logg Inn", "login.remember": "Hold meg innlogget", @@ -297,6 +319,8 @@ "more": "Mer", "name": "Navn", "next": "Neste", + "off": "off", + "on": "on", "open": "Åpne", "options": "Alternativer", @@ -317,6 +341,9 @@ "Denne siden har undersider.
Alle undersider vil også bli slettet.", "page.delete.confirm.title": "Skriv inn sidetittel for å bekrefte", "page.draft.create": "Lag utkast", + "page.duplicate.appendix": "Kopier", + "page.duplicate.files": "Copy files", + "page.duplicate.pages": "Copy pages", "page.status": "Status", "page.status.draft": "Utkast", "page.status.draft.description": @@ -342,9 +369,13 @@ "revert": "Forkast", "role": "Rolle", + "role.admin.description": "The admin has all rights", + "role.admin.title": "Admin", "role.all": "Alle", "role.empty": "Det er ingen brukere med denne rollen", "role.description.placeholder": "Ingen beskrivelse", + "role.nobody.description": "This is a fallback role without any permissions", + "role.nobody.title": "Nobody", "save": "Lagre", "search": "Søk", diff --git a/kirby/translations/nl.json b/kirby/i18n/translations/nl.json similarity index 89% rename from kirby/translations/nl.json rename to kirby/i18n/translations/nl.json index b2d1dfb..de14c98 100755 --- a/kirby/translations/nl.json +++ b/kirby/i18n/translations/nl.json @@ -1,5 +1,5 @@ { - "add": "Toevoegen", + "add": "Voeg toe", "avatar": "Avatar", "back": "Terug", "cancel": "Annuleren", @@ -24,8 +24,14 @@ "delete": "Verwijderen", "dimensions": "Dimensies", "discard": "Annuleren", + "download": "Download", + "duplicate": "Dupliceren", "edit": "Wijzig", + "dialog.files.empty": "No files to select", + "dialog.pages.empty": "No pages to select", + "dialog.users.empty": "No users to select", + "email": "E-mailadres", "email.placeholder": "mail@voorbeeld.nl", @@ -65,6 +71,14 @@ "error.form.incomplete": "Verbeter alle fouten in het formulier", "error.form.notSaved": "Het formulier kon niet worden opgeslagen", + "error.language.code": "Please enter a valid code for the language", + "error.language.duplicate": "The language already exists", + "error.language.name": "Please enter a valid name for the language", + + "error.license.format": "Vul een gelidge licentie-key in", + "error.license.email": "Gelieve een geldig emailadres in te voeren", + "error.license.verification": "De licentie kon niet worden geverifieerd. ", + "error.page.changeSlug.permission": "Je kunt de URL van deze pagina niet wijzigen", "error.page.changeStatus.incomplete": @@ -90,6 +104,7 @@ "Er bestaat al een conceptpagina met de URL-appendix \"{slug}\"", "error.page.duplicate": "Er bestaat al een pagina met de URL-appendix \"{slug}\"", + "error.page.duplicate.permission": "Je bent niet gemachtigd om \"{slug}\" te dupliceren", "error.page.notFound": "De pagina \"{slug}\" kan niet worden gevonden", "error.page.num.invalid": "Vul een geldig sorteer-cijfer in. Het cijfer mag niet negatief zijn", @@ -104,18 +119,18 @@ "error.section.files.max.singular": "Je kunt niet meer dan 1 bestand toevoegen aan de zone \"{section}\"", "error.section.files.min.plural": - "The \"{section}\" section requires at least {min} files", + "De \"{section}\" sectie moet minimaal {min} bestanden bevatten.", "error.section.files.min.singular": - "The \"{section}\" section requires at least one file", + "De \"{section}\" sectie moet minimaal 1 bestand bevatten.", "error.section.pages.max.plural": "Je kunt niet meer dan {max} pagina's toevoegen aan de zone \"{section}\"", "error.section.pages.max.singular": "Je kunt niet meer dan 1 pagina toevoegen aan de zone \"{section}\"", "error.section.pages.min.plural": - "The \"{section}\" section requires at least {min} pages", + "De \"{section}\" sectie moet minimaal {min} pagina's bevatten.", "error.section.pages.min.singular": - "The \"{section}\" section requires at least one page", + "De \"{section}\" sectie moet minimaal 1 pagina bevatten.", "error.section.notLoaded": "De zone \"{name}\" kan niet worden geladen", "error.section.type.invalid": "Zone-type \"{type}\" is niet geldig", @@ -270,6 +285,13 @@ "loading": "Laden", + "lock.unsaved": "Unsaved changes", + "lock.isLocked": "Niet opgeslagen wijzigingen door {email}", + "lock.file.isLocked": "Dit bestand wordt momenteel bewerkt door {email} en kan niet worden gewijzigd.", + "lock.page.isLocked": "Deze pagina wordt momenteel bewerkt door {email} en kan niet worden gewijzigd.", + "lock.unlock": "Ontgrendelen", + "lock.isUnlocked": "Je niet opgeslagen wijzigingen zijn overschreven door een andere gebruiker. Je kunt je wijzigingen downloaden om ze handmatig samen te voegen.", + "login": "Inloggen", "login.remember": "Houd mij ingelogd", @@ -297,6 +319,8 @@ "more": "Meer", "name": "Naam", "next": "Volgende", + "off": "uit", + "on": "aan", "open": "Open", "options": "Opties", @@ -317,6 +341,9 @@ "Deze pagina heeft subpagina's.
Alle subpagina's worden ook verwijderd.", "page.delete.confirm.title": "Voeg een paginatitel in om te bevestigen", "page.draft.create": "Maak concept", + "page.duplicate.appendix": "Kopiëren", + "page.duplicate.files": "Kopieer bestanden", + "page.duplicate.pages": "Copy pages", "page.status": "Status", "page.status.draft": "Concept", "page.status.draft.description": @@ -342,9 +369,13 @@ "revert": "Annuleren", "role": "Rol", + "role.admin.description": "De admin heeft alle rechten", + "role.admin.title": "Admin", "role.all": "Alle", "role.empty": "Er zijn geen gebruikers met deze rol", "role.description.placeholder": "Geen beschrijving", + "role.nobody.description": "Dit is een fallback-rol zonder rechten", + "role.nobody.title": "Niemand", "save": "Opslaan", "search": "Zoeken", @@ -366,8 +397,8 @@ "toolbar.button.heading.3": "Titel 3", "toolbar.button.italic": "Cursieve tekst", "toolbar.button.file": "Bestand", - "toolbar.button.file.select": "Select a file", - "toolbar.button.file.upload": "Upload a file", + "toolbar.button.file.select": "Selecteer een bestand", + "toolbar.button.file.upload": "Upload bestand", "toolbar.button.link": "Link", "toolbar.button.ol": "Genummerde lijst", "toolbar.button.ul": "Opsomming", diff --git a/kirby/translations/pl.json b/kirby/i18n/translations/pl.json similarity index 92% rename from kirby/translations/pl.json rename to kirby/i18n/translations/pl.json index b4c5d17..4f88b26 100755 --- a/kirby/translations/pl.json +++ b/kirby/i18n/translations/pl.json @@ -24,8 +24,14 @@ "delete": "Usu\u0144", "dimensions": "Wymiary", "discard": "Odrzu\u0107", + "download": "Pobierz", + "duplicate": "Zduplikuj", "edit": "Edytuj", + "dialog.files.empty": "No files to select", + "dialog.pages.empty": "No pages to select", + "dialog.users.empty": "No users to select", + "email": "Email", "email.placeholder": "mail@example.com", @@ -65,6 +71,14 @@ "error.form.incomplete": "Popraw wszystkie błędy w formularzu…", "error.form.notSaved": "Nie udało się zapisać formularza", + "error.language.code": "Please enter a valid code for the language", + "error.language.duplicate": "The language already exists", + "error.language.name": "Please enter a valid name for the language", + + "error.license.format": "Wprowadź poprawny klucz licencyjny", + "error.license.email": "Wprowadź poprawny adres email", + "error.license.verification": "Nie udało się zweryfikować licencji", + "error.page.changeSlug.permission": "Nie możesz zmienić końcówki adresu URL w \"{slug}\"", "error.page.changeStatus.incomplete": @@ -90,6 +104,7 @@ "Istnieje już szkic z końcówką URL \"{slug}\"", "error.page.duplicate": "Istnieje już strona z końcówką URL \"{slug}\"", + "error.page.duplicate.permission": "Nie masz uprawnień, by zduplikować \"{slug}\"", "error.page.notFound": "Nie można znaleźć strony \"{slug}\"", "error.page.num.invalid": "Wprowadź poprawny numer sortujący. Liczby nie mogą być ujemne.", @@ -270,6 +285,13 @@ "loading": "Ładuję", + "lock.unsaved": "Niezapisane zmiany", + "lock.isLocked": "Niezapisane zmiany autorstwa {email}", + "lock.file.isLocked": "The file is currently being edited by {email} and cannot be changed.", + "lock.page.isLocked": "The page is currently being edited by {email} and cannot be changed.", + "lock.unlock": "Unlock", + "lock.isUnlocked": "Your unsaved changes have been overwritten by another user. You can download your changes to merge them manually.", + "login": "Zaloguj", "login.remember": "Nie wylogowuj mnie", @@ -297,6 +319,8 @@ "more": "Więcej", "name": "Nazwa", "next": "Następne", + "off": "off", + "on": "on", "open": "Otwórz", "options": "Opcje", @@ -317,6 +341,9 @@ "Ta strona zawiera podstrony.
Wszystkie podstrony również zostaną usunięte.", "page.delete.confirm.title": "Wprowadź tytuł strony, aby potwierdzić", "page.draft.create": "Utwórz szkic", + "page.duplicate.appendix": "Kopiuj", + "page.duplicate.files": "Copy files", + "page.duplicate.pages": "Copy pages", "page.status": "Status", "page.status.draft": "Szkic", "page.status.draft.description": @@ -342,9 +369,13 @@ "revert": "Odrzu\u0107", "role": "Rola", + "role.admin.description": "The admin has all rights", + "role.admin.title": "Admin", "role.all": "Wszystkie", "role.empty": "Nie ma użytkowników z tą rolą", "role.description.placeholder": "Brak opisu", + "role.nobody.description": "This is a fallback role without any permissions", + "role.nobody.title": "Nobody", "save": "Zapisz", "search": "Szukaj", diff --git a/kirby/translations/pt_BR.json b/kirby/i18n/translations/pt_BR.json similarity index 92% rename from kirby/translations/pt_BR.json rename to kirby/i18n/translations/pt_BR.json index 97ae55a..549db6a 100755 --- a/kirby/translations/pt_BR.json +++ b/kirby/i18n/translations/pt_BR.json @@ -24,8 +24,14 @@ "delete": "Excluir", "dimensions": "Dimensões", "discard": "Descartar", + "download": "Download", + "duplicate": "Duplicate", "edit": "Editar", + "dialog.files.empty": "No files to select", + "dialog.pages.empty": "No pages to select", + "dialog.users.empty": "No users to select", + "email": "Email", "email.placeholder": "mail@exemplo.com", @@ -65,6 +71,14 @@ "error.form.incomplete": "Por favor, corrija os erros do formulário…", "error.form.notSaved": "O formulário não pôde ser salvo", + "error.language.code": "Please enter a valid code for the language", + "error.language.duplicate": "The language already exists", + "error.language.name": "Please enter a valid name for the language", + + "error.license.format": "Please enter a valid license key", + "error.license.email": "Digite um endereço de email válido", + "error.license.verification": "The license could not be verified", + "error.page.changeSlug.permission": "Você não tem permissão para alterar a URL de \"{slug}\"", "error.page.changeStatus.incomplete": @@ -90,6 +104,7 @@ "Um rascunho de página com a URL \"{slug}\" já existe", "error.page.duplicate": "Uma página com a URL \"{slug}\" já existe", + "error.page.duplicate.permission": "You are not allowed to duplicate \"{slug}\"", "error.page.notFound": "Página\"{slug}\" não encontrada", "error.page.num.invalid": "Digite um número de ordenação válido. Este número não pode ser negativo.", @@ -270,6 +285,13 @@ "loading": "Carregando", + "lock.unsaved": "Unsaved changes", + "lock.isLocked": "Unsaved changes by {email}", + "lock.file.isLocked": "The file is currently being edited by {email} and cannot be changed.", + "lock.page.isLocked": "The page is currently being edited by {email} and cannot be changed.", + "lock.unlock": "Unlock", + "lock.isUnlocked": "Your unsaved changes have been overwritten by another user. You can download your changes to merge them manually.", + "login": "Entrar", "login.remember": "Manter-me conectado", @@ -297,6 +319,8 @@ "more": "Mais", "name": "Nome", "next": "Próximo", + "off": "off", + "on": "on", "open": "Abrir", "options": "Opções", @@ -317,6 +341,9 @@ "Esta página possui subpáginas.
Todas as subpáginas serão excluídas também.", "page.delete.confirm.title": "Digite o título da página para confirmar", "page.draft.create": "Criar rascunho", + "page.duplicate.appendix": "Copiar", + "page.duplicate.files": "Copy files", + "page.duplicate.pages": "Copy pages", "page.status": "Estado", "page.status.draft": "Rascunho", "page.status.draft.description": @@ -342,9 +369,13 @@ "revert": "Descartar", "role": "Papel", + "role.admin.description": "The admin has all rights", + "role.admin.title": "Admin", "role.all": "Todos", "role.empty": "Não há usuários com este papel", "role.description.placeholder": "Sem descrição", + "role.nobody.description": "This is a fallback role without any permissions", + "role.nobody.title": "Nobody", "save": "Salvar", "search": "Buscar", diff --git a/kirby/translations/pt_PT.json b/kirby/i18n/translations/pt_PT.json similarity index 92% rename from kirby/translations/pt_PT.json rename to kirby/i18n/translations/pt_PT.json index de02f74..3b287d6 100755 --- a/kirby/translations/pt_PT.json +++ b/kirby/i18n/translations/pt_PT.json @@ -24,8 +24,14 @@ "delete": "Excluir", "dimensions": "Dimensões", "discard": "Descartar", + "download": "Download", + "duplicate": "Duplicate", "edit": "Editar", + "dialog.files.empty": "No files to select", + "dialog.pages.empty": "No pages to select", + "dialog.users.empty": "No users to select", + "email": "Email", "email.placeholder": "mail@exemplo.pt", @@ -65,6 +71,14 @@ "error.form.incomplete": "Por favor, corrija os erros do formulário…", "error.form.notSaved": "O formulário não foi guardado", + "error.language.code": "Please enter a valid code for the language", + "error.language.duplicate": "The language already exists", + "error.language.name": "Please enter a valid name for the language", + + "error.license.format": "Please enter a valid license key", + "error.license.email": "Digite um endereço de email válido", + "error.license.verification": "The license could not be verified", + "error.page.changeSlug.permission": "Não tem permissões para alterar a URL de \"{slug}\"", "error.page.changeStatus.incomplete": @@ -90,6 +104,7 @@ "Um rascunho de página com a URL \"{slug}\" já existe", "error.page.duplicate": "Uma página com a URL \"{slug}\" já existe", + "error.page.duplicate.permission": "You are not allowed to duplicate \"{slug}\"", "error.page.notFound": "Página\"{slug}\" não encontrada", "error.page.num.invalid": "Digite um número de ordenação válido. Este número não pode ser negativo.", @@ -270,6 +285,13 @@ "loading": "A carregar", + "lock.unsaved": "Unsaved changes", + "lock.isLocked": "Unsaved changes by {email}", + "lock.file.isLocked": "The file is currently being edited by {email} and cannot be changed.", + "lock.page.isLocked": "The page is currently being edited by {email} and cannot be changed.", + "lock.unlock": "Unlock", + "lock.isUnlocked": "Your unsaved changes have been overwritten by another user. You can download your changes to merge them manually.", + "login": "Entrar", "login.remember": "Manter-me conectado", @@ -297,6 +319,8 @@ "more": "Mais", "name": "Nome", "next": "Próximo", + "off": "off", + "on": "on", "open": "Abrir", "options": "Opções", @@ -317,6 +341,9 @@ "Esta página possui subpáginas.
Todas as subpáginas serão excluídas também.", "page.delete.confirm.title": "Digite o título da página para confirmar", "page.draft.create": "Criar rascunho", + "page.duplicate.appendix": "Copiar", + "page.duplicate.files": "Copy files", + "page.duplicate.pages": "Copy pages", "page.status": "Estado", "page.status.draft": "Rascunho", "page.status.draft.description": @@ -342,9 +369,13 @@ "revert": "Descartar", "role": "Função", + "role.admin.description": "The admin has all rights", + "role.admin.title": "Admin", "role.all": "Todos", "role.empty": "Não há utilizadores com esta função", "role.description.placeholder": "Sem descrição", + "role.nobody.description": "This is a fallback role without any permissions", + "role.nobody.title": "Nobody", "save": "Salvar", "search": "Buscar", diff --git a/kirby/translations/sk.json b/kirby/i18n/translations/sk.json similarity index 92% rename from kirby/translations/sk.json rename to kirby/i18n/translations/sk.json index 99f2462..91c01ec 100755 --- a/kirby/translations/sk.json +++ b/kirby/i18n/translations/sk.json @@ -24,8 +24,14 @@ "delete": "Zmazať", "dimensions": "Rozmery", "discard": "Zahodiť", + "download": "Download", + "duplicate": "Duplicate", "edit": "Upraviť", + "dialog.files.empty": "No files to select", + "dialog.pages.empty": "No pages to select", + "dialog.users.empty": "No users to select", + "email": "E-mail", "email.placeholder": "mail@example.com", @@ -65,6 +71,14 @@ "error.form.incomplete": "Prosím, opravte všetky chyby v rámci formuláru...", "error.form.notSaved": "Formulár sa nepodarilo uložiť", + "error.language.code": "Please enter a valid code for the language", + "error.language.duplicate": "The language already exists", + "error.language.name": "Please enter a valid name for the language", + + "error.license.format": "Please enter a valid license key", + "error.license.email": "Prosím, zadajte platnú e-mailovú adresu", + "error.license.verification": "The license could not be verified", + "error.page.changeSlug.permission": "Nemáte povolenie na zmenu URL príponu pre \"{slug}\"", "error.page.changeStatus.incomplete": @@ -90,6 +104,7 @@ "Koncept stránky s URL appendix-om \"{slug}\" už existuje", "error.page.duplicate": "Stránka s URL appendix-om \"{slug}\" už existuje", + "error.page.duplicate.permission": "You are not allowed to duplicate \"{slug}\"", "error.page.notFound": "Stránku \"{slug}\" nie je možné nájsť", "error.page.num.invalid": "Prosím, zadajte platné číslo pre radenie. Čísla nemôžu byť záporné.", @@ -270,6 +285,13 @@ "loading": "Načítavanie", + "lock.unsaved": "Unsaved changes", + "lock.isLocked": "Unsaved changes by {email}", + "lock.file.isLocked": "The file is currently being edited by {email} and cannot be changed.", + "lock.page.isLocked": "The page is currently being edited by {email} and cannot be changed.", + "lock.unlock": "Unlock", + "lock.isUnlocked": "Your unsaved changes have been overwritten by another user. You can download your changes to merge them manually.", + "login": "Prihlásenie", "login.remember": "Ponechať ma prihláseného", @@ -297,6 +319,8 @@ "more": "Viac", "name": "Meno", "next": "Ďalej", + "off": "off", + "on": "on", "open": "Otvoriť", "options": "Nastavenia", @@ -317,6 +341,9 @@ "Táto stránka obsahuje podstránky.
Všetky podstránky budú taktiež zmazané.", "page.delete.confirm.title": "Pre potvrdenie zadajte titulok stránky", "page.draft.create": "Vytvoriť koncept", + "page.duplicate.appendix": "Kopírovať", + "page.duplicate.files": "Copy files", + "page.duplicate.pages": "Copy pages", "page.status": "Status", "page.status.draft": "Koncept", "page.status.draft.description": @@ -342,9 +369,13 @@ "revert": "Vrátiť späť", "role": "Rola", + "role.admin.description": "The admin has all rights", + "role.admin.title": "Admin", "role.all": "Všetko", "role.empty": "S touto rolou neexistujú žiadni užívatelia", "role.description.placeholder": "Žiadny popis", + "role.nobody.description": "This is a fallback role without any permissions", + "role.nobody.title": "Nobody", "save": "Uložiť", "search": "Hľadať", diff --git a/kirby/translations/sv_SE.json b/kirby/i18n/translations/sv_SE.json similarity index 92% rename from kirby/translations/sv_SE.json rename to kirby/i18n/translations/sv_SE.json index 7e3132c..cfcf9e5 100755 --- a/kirby/translations/sv_SE.json +++ b/kirby/i18n/translations/sv_SE.json @@ -24,8 +24,14 @@ "delete": "Radera", "dimensions": "Dimensioner", "discard": "Kassera", + "download": "Download", + "duplicate": "Duplicate", "edit": "Redigera", + "dialog.files.empty": "No files to select", + "dialog.pages.empty": "No pages to select", + "dialog.users.empty": "No users to select", + "email": "E-post", "email.placeholder": "namn@exampel.se", @@ -65,6 +71,14 @@ "error.form.incomplete": "Vänligen åtgärda alla formulärfel...", "error.form.notSaved": "Formuläret kunde inte sparas", + "error.language.code": "Please enter a valid code for the language", + "error.language.duplicate": "The language already exists", + "error.language.name": "Please enter a valid name for the language", + + "error.license.format": "Please enter a valid license key", + "error.license.email": "Ange en giltig e-postadress", + "error.license.verification": "The license could not be verified", + "error.page.changeSlug.permission": "Du har inte behörighet att ändra URL-appendixen för \"{slug}\"", "error.page.changeStatus.incomplete": @@ -90,6 +104,7 @@ "Ett utkast med URL-appendixen \"{slug}\" existerar redan", "error.page.duplicate": "En sida med URL-appendixen \"{slug}\" existerar redan", + "error.page.duplicate.permission": "You are not allowed to duplicate \"{slug}\"", "error.page.notFound": "Sidan \"{slug}\" kan inte hittas", "error.page.num.invalid": "Ange ett giltigt nummer för sortering. Numret får inte vara negativt.", @@ -270,6 +285,13 @@ "loading": "Laddar", + "lock.unsaved": "Unsaved changes", + "lock.isLocked": "Unsaved changes by {email}", + "lock.file.isLocked": "The file is currently being edited by {email} and cannot be changed.", + "lock.page.isLocked": "The page is currently being edited by {email} and cannot be changed.", + "lock.unlock": "Unlock", + "lock.isUnlocked": "Your unsaved changes have been overwritten by another user. You can download your changes to merge them manually.", + "login": "Logga in", "login.remember": "Håll mig inloggad", @@ -297,6 +319,8 @@ "more": "Mer", "name": "Namn", "next": "Nästa", + "off": "off", + "on": "on", "open": "Öppna", "options": "Alternativ", @@ -317,6 +341,9 @@ "Denna sida har undersidor.
Alla undersidor kommer också att raderas.", "page.delete.confirm.title": "Fyll i sidans titel för att bekräfta", "page.draft.create": "Skapa utkast", + "page.duplicate.appendix": "Kopiera", + "page.duplicate.files": "Copy files", + "page.duplicate.pages": "Copy pages", "page.status": "Status", "page.status.draft": "Utkast", "page.status.draft.description": @@ -342,9 +369,13 @@ "revert": "Återgå", "role": "Roll", + "role.admin.description": "The admin has all rights", + "role.admin.title": "Admin", "role.all": "Alla", "role.empty": "Det finns inga användare med denna roll", "role.description.placeholder": "Ingen beskrivning", + "role.nobody.description": "This is a fallback role without any permissions", + "role.nobody.title": "Nobody", "save": "Spara", "search": "Sök", diff --git a/kirby/translations/tr.json b/kirby/i18n/translations/tr.json similarity index 90% rename from kirby/translations/tr.json rename to kirby/i18n/translations/tr.json index 91bad69..10db752 100755 --- a/kirby/translations/tr.json +++ b/kirby/i18n/translations/tr.json @@ -24,8 +24,14 @@ "delete": "Sil", "dimensions": "Boyutlar", "discard": "Vazge\u00e7", + "download": "İndir", + "duplicate": "Kopyala", "edit": "D\u00fczenle", + "dialog.files.empty": "Seçilecek dosya yok", + "dialog.pages.empty": "Seçilecek sayfa yok", + "dialog.users.empty": "Seçilecek kullanıcı yok", + "email": "E-Posta", "email.placeholder": "eposta@ornek.com", @@ -65,6 +71,14 @@ "error.form.incomplete": "Lütfen tüm form hatalarını düzeltin...", "error.form.notSaved": "Form kaydedilemedi", + "error.language.code": "Lütfen dil için geçerli bir kod girin", + "error.language.duplicate": "Bu dil zaten var", + "error.language.name": "Lütfen dil için geçerli bir isim girin", + + "error.license.format": "Lütfen geçerli bir lisans anahtarı girin", + "error.license.email": "Lütfen geçerli bir e-posta adresi girin", + "error.license.verification": "Lisans doğrulanamadı", + "error.page.changeSlug.permission": "\"{slug}\" uzantısına sahip bu sayfanın adresini değiştirilemez", "error.page.changeStatus.incomplete": @@ -90,6 +104,7 @@ "\"{slug}\" adres eki olan bir sayfa taslağı zaten mevcut", "error.page.duplicate": "\"{slug}\" adres eki içeren bir sayfa zaten mevcut", + "error.page.duplicate.permission": "\"{slug}\" öğesini çoğaltmanıza izin verilmiyor", "error.page.notFound": "\"{slug}\" uzantısındaki sayfa bulunamadı", "error.page.num.invalid": "Lütfen geçerli bir sıralama numarası girin. Sayılar negatif olmamalıdır.", @@ -104,18 +119,18 @@ "error.section.files.max.singular": "\"{section}\" bölümüne birden fazla dosya eklememelisiniz", "error.section.files.min.plural": - "The \"{section}\" section requires at least {min} files", + "\"{section}\" bölümü en az {min} dosya gerektiriyor", "error.section.files.min.singular": - "The \"{section}\" section requires at least one file", + "\"{section}\" bölümü en az bir dosya gerektiriyor", "error.section.pages.max.plural": "\"{section}\" bölümüne maksimum {max} sayfadan fazla ekleyemezsiniz", "error.section.pages.max.singular": "\"{section}\" bölümüne birden fazla sayfa ekleyemezsiniz", "error.section.pages.min.plural": - "The \"{section}\" section requires at least {min} pages", + "\"{section}\" bölümü en az {min} sayfa gerektiriyor", "error.section.pages.min.singular": - "The \"{section}\" section requires at least one page", + "\"{section}\" bölümü en az bir sayfa gerektiriyor", "error.section.notLoaded": "\"{name}\" bölümü yüklenemedi", "error.section.type.invalid": "\"{type}\" tipi geçerli değil", @@ -270,6 +285,13 @@ "loading": "Yükleniyor", + "lock.unsaved": "Kaydedilmemiş değişiklikler", + "lock.isLocked": "{email} tarafından kaydedilmemiş değişiklikler", + "lock.file.isLocked": "Dosya şu anda {email} tarafından düzenlenmektedir ve değiştirilemez.", + "lock.page.isLocked": "Sayfa şu anda {email} tarafından düzenlenmektedir ve değiştirilemez.", + "lock.unlock": "Kilidi Aç", + "lock.isUnlocked": "Kaydedilmemiş değişikliklerin üzerine başka bir kullanıcı yazmış. Değişikliklerinizi el ile birleştirmek için değişikliklerinizi indirebilirsiniz.", + "login": "Giri\u015f", "login.remember": "Oturumumu açık tut", @@ -297,6 +319,8 @@ "more": "Daha Fazla", "name": "İsim", "next": "Sonraki", + "off": "kapalı", + "on": "açık", "open": "Açık", "options": "Seçenekler", @@ -317,6 +341,9 @@ "Bu sayfada alt sayfalar var.
Tüm alt sayfalar da silinecek.", "page.delete.confirm.title": "Onaylamak için sayfa başlığını girin", "page.draft.create": "Taslak oluştur", + "page.duplicate.appendix": "Kopyala", + "page.duplicate.files": "Dosyaları kopyala", + "page.duplicate.pages": "Sayfaları kopyala", "page.status": "Durum", "page.status.draft": "Taslak", "page.status.draft.description": @@ -342,9 +369,13 @@ "revert": "Vazge\u00e7", "role": "Rol", + "role.admin.description": "Yönetici tüm haklara sahiptir", + "role.admin.title": "Yönetici", "role.all": "Tümü", "role.empty": "Bu role ait kullanıcı bulunamadı", "role.description.placeholder": "Açıklama yok", + "role.nobody.description": "Bu hiçbir izni olmayan bir geri dönüş rolüdür.", + "role.nobody.title": "Hiçkimse", "save": "Kaydet", "search": "Arama", diff --git a/kirby/panel/dist/css/app.css b/kirby/panel/dist/css/app.css index 273e907..8935d42 100755 --- a/kirby/panel/dist/css/app.css +++ b/kirby/panel/dist/css/app.css @@ -1 +1 @@ -.k-search{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000;overflow:auto;background:rgba(22,23,26,.6)}.k-search-box{max-width:30rem;margin:0 auto;-webkit-box-shadow:rgba(22,23,26,.2) 0 2px 10px;box-shadow:0 2px 10px rgba(22,23,26,.2)}@media screen and (min-width:65em){.k-search-box{margin:2.5rem auto}}.k-search-input{background:#efefef}.k-search-input,.k-search-types{display:-webkit-box;display:-ms-flexbox;display:flex}.k-search-types{-ms-flex-negative:0;flex-shrink:0}.k-search-types>.k-button{padding:0 0 0 .7rem;font-size:1rem;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:none;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;font:inherit;padding:.75rem;border:0;height:2.5rem}.k-search-close{width:2.5rem;line-height:1}.k-search input:focus{outline:0}.k-search ul{background:#fff}.k-search li{border-bottom:1px solid #efefef;line-height:1.125;display:-webkit-box;display:-ms-flexbox;display:flex}.k-search li .k-link{display:block;padding:.5rem .75rem;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.k-search li strong{display:block;font-size:.875rem;font-weight:400}.k-search li small{font-size:.75rem;color:#777}.k-search li[data-selected]{outline:2px solid #4271ae;background:rgba(66,113,174,.25);border-bottom:1px solid transparent}.k-search-empty{padding:.825rem .75rem;font-size:.75rem;background:#efefef;border-top:1px dashed #ccc;color:#777}*,:after,:before{margin:0;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box}noscript{padding:1.5rem;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;height:100vh;text-align:center}html{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;background:#efefef}body,html{color:#16171a;overflow:hidden;height:100%}a{color:inherit;text-decoration:none}li{list-style:none}b,strong{font-weight:600}.fade-enter-active,.fade-leave-active{-webkit-transition:opacity .5s;transition:opacity .5s}.fade-enter,.fade-leave-to{opacity:0}.k-panel{position:absolute;top:0;right:0;bottom:0;left:0;background:#efefef}.k-panel[data-loading]{-webkit-animation:LoadingCursor .5s;animation:LoadingCursor .5s}.k-panel-header{position:absolute;top:0;left:0;right:0;z-index:300}.k-panel .k-form-buttons{position:fixed;bottom:0;left:0;right:0;z-index:300}.k-panel-view{position:absolute;top:0;right:0;bottom:0;left:0;padding-bottom:6rem;overflow-y:scroll;-webkit-overflow-scrolling:touch;-webkit-transform:translateZ(0);transform:translateZ(0)}.k-panel[data-dialog] .k-panel-view{overflow:hidden;-webkit-transform:none;transform:none}.k-panel[data-topbar] .k-panel-view{top:2.5rem}.k-panel[data-dragging],.k-panel[data-loading]:after{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.k-offline-warning{position:fixed;content:" ";top:0;right:0;bottom:0;left:0;z-index:900;background:rgba(22,23,26,.7);content:"offline";display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;color:#fff}@-webkit-keyframes LoadingCursor{to{cursor:progress}}@keyframes LoadingCursor{to{cursor:progress}}@-webkit-keyframes Spin{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes Spin{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.k-offscreen{-webkit-clip-path:inset(100%);clip-path:inset(100%);clip:rect(1px,1px,1px,1px);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}.k-icons{position:absolute;width:0;height:0}.k-dialog{-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;position:fixed;top:0;right:0;bottom:0;left:0;border:0;width:100%;height:100%;background:rgba(22,23,26,.6);z-index:600;-webkit-transform:translateZ(0);transform:translateZ(0)}.k-dialog,.k-dialog-box{display:-webkit-box;display:-ms-flexbox;display:flex}.k-dialog-box{position:relative;background:#efefef;width:22rem;-webkit-box-shadow:rgba(22,23,26,.2) 0 2px 10px;box-shadow:0 2px 10px rgba(22,23,26,.2);border-radius:1px;line-height:1;max-height:calc(100vh - 3rem);margin:1.5rem;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.k-dialog-box[data-size=small]{width:20rem}.k-dialog-box[data-size=medium]{width:30rem}.k-dialog-box[data-size=large]{width:40rem}.k-dialog-notification{padding:.75rem 1.5rem;background:#16171a;width:100%;line-height:1.25rem;color:#fff;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-negative:0;flex-shrink:0;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.k-dialog-notification[data-theme=error]{background:#d16464;color:#000}.k-dialog-notification[data-theme=success]{background:#a7bd68;color:#000}.k-dialog-notification p{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;word-wrap:break-word;overflow:hidden}.k-dialog-notification .k-button{display:-webkit-box;display:-ms-flexbox;display:flex;margin-left:1rem}.k-dialog-body{padding:1.5rem;overflow-y:auto;overflow-x:hidden}.k-dialog-body .k-fieldset{padding-bottom:.5rem}.k-dialog-footer{border-top:1px solid #ccc;padding:0;border-bottom-left-radius:1px;border-bottom-right-radius:1px;line-height:1;-ms-flex-negative:0;flex-shrink:0}.k-dialog-footer .k-button-group{display:-webkit-box;display:-ms-flexbox;display:flex;margin:0;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.k-dialog-footer .k-button-group .k-button{padding:.75rem 1rem;line-height:1.25rem}.k-dialog-footer .k-button-group .k-button:first-child{text-align:left;padding-left:1.5rem}.k-dialog-footer .k-button-group .k-button:last-child{text-align:right;padding-right:1.5rem}.k-error-details{background:#fff;display:block;overflow:auto;padding:1rem;font-size:.875rem;line-height:1.25em;margin-top:.75rem}.k-error-details dt{color:#d16464;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 #efefef;padding-bottom:.25rem;margin-bottom:.25rem}.k-files-dialog .k-list-item{cursor:pointer}.k-page-remove-warning{margin:1.5rem 0}.k-page-remove-warning .k-box{font-size:1rem;line-height:1.5em;padding-top:.75rem;padding-bottom:.75rem}.k-pages-dialog-navbar{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-bottom:.5rem;padding-right:38px}.k-pages-dialog-navbar .k-button{width:38px}.k-pages-dialog-navbar .k-button[disabled]{opacity:0}.k-pages-dialog-navbar .k-headline{-webkit-box-flex:1;-ms-flex-positive:1;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-pages-dialog .k-empty{border:0}.k-users-dialog .k-list-item{cursor:pointer}.k-users-dialog .k-empty{border:0}.k-calendar-input{padding:.5rem;background:#16171a;color:#efefef;border-radius:1px}.k-calendar-table{table-layout:fixed;width:100%;min-width:15rem;padding-top:.5rem}.k-calendar-input>nav{display:-webkit-box;display:-ms-flexbox;display:flex;direction:ltr}.k-calendar-input>nav .k-button{padding:.5rem}.k-calendar-selects{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack: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:400;font-size:.875rem}.k-calendar-selects .k-select-input:focus-within{color:#81a2be!important}.k-calendar-input th{padding:.5rem 0;color:#999;font-size:.75rem;font-weight:400;text-align:center}.k-calendar-day .k-button{width:2rem;height:2rem;margin:0 auto;color:#fff;line-height:1.75rem;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;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:#fff}.k-calendar-day:hover .k-button{border-color:hsla(0,0%,100%,.25)}.k-calendar-day[aria-current=date] .k-button{color:#81a2be;font-weight:500}.k-calendar-day[aria-selected=date] .k-button{border-color:#a7bd68;color:#a7bd68}.k-calendar-today{text-align:center;padding-top:.5rem}.k-calendar-today .k-button{color:#81a2be;font-size:.75rem;padding:1rem}.k-calendar-today .k-button-text{opacity:1}.k-counter{font-size:.75rem;color:#16171a;font-weight:600}.k-counter[data-invalid]{color:#c82829}.k-counter-rules{color:#777;font-weight:400}[dir=ltr] .k-counter-rules{padding-left:.5rem}[dir=rtl] .k-counter-rules{padding-right:.5rem}.k-form-submitter{display:none}.k-form-buttons{background:#de935f}.k-form-buttons .k-view{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.k-form-button,.k-form-buttons .k-view{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.k-form-button{font-weight:500;white-space:nowrap;line-height:1;height:2.5rem;padding:0 1rem}.k-form-button:first-child{margin-left:-1rem}.k-form-button:last-child{margin-right:-1rem}.k-field-label{font-weight:600;display:block;padding:0 0 .75rem;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;line-height:1.25rem}.k-field-label abbr{text-decoration:none;color:#999;padding-left:.25rem}.k-field-header{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:baseline;-ms-flex-align:baseline;align-items:baseline}.k-field[data-disabled]{cursor:not-allowed}.k-field[data-disabled] *{pointer-events: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:auto}.k-input{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;line-height:1;border:0;outline:0;background:none}.k-input-element{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.k-input-icon{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;line-height:0}.k-input[data-disabled]{pointer-events:none}.k-input[data-theme=field]{line-height:1;border:1px solid #ccc;background:#fff}.k-input[data-theme=field]:focus-within{border:1px solid #4271ae;-webkit-box-shadow:rgba(66,113,174,.25) 0 0 0 2px;box-shadow:0 0 0 2px rgba(66,113,174,.25)}.k-input[data-theme=field][data-disabled]{background:#efefef}.k-input[data-theme=field][data-invalid]{border:1px solid rgba(200,40,41,.25);-webkit-box-shadow:rgba(200,40,41,.25) 0 0 3px 2px;box-shadow:0 0 3px 2px rgba(200,40,41,.25)}.k-input[data-theme=field][data-invalid]:focus-within{border:1px solid #c82829;-webkit-box-shadow:rgba(200,40,41,.25) 0 0 0 2px;box-shadow:0 0 0 2px rgba(200,40,41,.25)}.k-input[data-theme=field] .k-input-icon{width:2.25rem}.k-input[data-theme=field] .k-input-after,.k-input[data-theme=field] .k-input-before,.k-input[data-theme=field] .k-input-icon{-ms-flex-item-align:stretch;align-self:stretch;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-negative:0;flex-shrink:0}.k-input[data-theme=field] .k-input-after,.k-input[data-theme=field] .k-input-before{padding:0 .5rem}.k-input[data-theme=field] .k-input-before{color:#777;padding-right:0}.k-input[data-theme=field] .k-input-after{color:#777;padding-left:0}.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:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-ms-flex-negative:0;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:.5rem;line-height:1.25rem}.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:.5rem}[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:.5rem}.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:#4271ae;font-weight:600}.k-input[data-theme=field] .k-time-input .k-time-input-meridiem{padding-left:.5rem}.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}.k-input[data-theme=field][data-type=checkboxes] .k-input-before{border-right:1px solid #efefef}.k-input[data-theme=field][data-type=checkboxes] .k-input-element+.k-input-after,.k-input[data-theme=field][data-type=checkboxes] .k-input-element+.k-input-icon{border-left:1px solid #efefef}.k-input[data-theme=field][data-type=checkboxes] .k-input-element{overflow:hidden}.k-input[data-theme=field][data-type=checkboxes] .k-checkboxes-input{display:grid;grid-template-columns:1fr;margin-bottom:-1px;margin-right:-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)}}.k-input[data-theme=field][data-type=checkboxes] .k-checkboxes-input li{border-right:1px solid #efefef;border-bottom:1px solid #efefef}.k-input[data-theme=field][data-type=checkboxes] .k-checkboxes-input label{display:block;line-height:1.25rem;padding:.5rem .5rem}.k-input[data-theme=field][data-type=checkboxes] .k-checkbox-input-icon{top:.625rem;left:.5rem;margin-top:0}.k-input[data-theme=field][data-type=radio] .k-input-before{border-right:1px solid #efefef}.k-input[data-theme=field][data-type=radio] .k-input-element+.k-input-after,.k-input[data-theme=field][data-type=radio] .k-input-element+.k-input-icon{border-left:1px solid #efefef}.k-input[data-theme=field][data-type=radio] .k-input-element{overflow:hidden}.k-input[data-theme=field][data-type=radio] .k-radio-input{display:grid;grid-template-columns:1fr;margin-bottom:-1px;margin-right:-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)}}.k-input[data-theme=field][data-type=radio] .k-radio-input li{border-right:1px solid #efefef;border-bottom:1px solid #efefef}.k-input[data-theme=field][data-type=radio] .k-radio-input label{display:block;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;min-height:2.25rem;line-height:1.25rem;padding:.5rem .5rem}.k-input[data-theme=field][data-type=radio] .k-radio-input label:before{top:.625rem;left:.5rem;margin-top:-1px}.k-input[data-theme=field][data-type=radio] .k-radio-input .k-radio-input-info{display:block;font-size:.875rem;color:#777;line-height:1.25rem;padding-top:.125rem}.k-input[data-theme=field][data-type=radio] .k-radio-input .k-icon{width:2.25rem;height:2.25rem;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.k-input[data-theme=field][data-type=range] .k-range-input{padding:.5rem}.k-input[data-theme=field][data-type=select]{position:relative}.k-input[data-theme=field][data-type=select] .k-input-icon{position:absolute;top:0;bottom:0}[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=tags] .k-tags-input{padding:.25rem .25rem 0 .25rem}.k-input[data-theme=field][data-type=tags] .k-tag{margin-right:.25rem;margin-bottom:.25rem;height:1.75rem;font-size:.875rem}.k-input[data-theme=field][data-type=tags] .k-tags-input input{font-size:.875rem;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=multiselect]{position:relative}.k-input[data-theme=field][data-type=multiselect] .k-multiselect-input{padding:.25rem 2rem 0 .25rem;min-height:2.25rem}.k-input[data-theme=field][data-type=multiselect] .k-tag{margin-right:.25rem;margin-bottom:.25rem;height:1.75rem;font-size:.875rem}.k-input[data-theme=field][data-type=multiselect] .k-input-icon{position:absolute;top:0;right:0;bottom:0;pointer-events:none}.k-input[data-theme=field][data-type=textarea] .k-textarea-input-native{padding:.25rem .5rem;line-height:1.5rem}.k-input[data-theme=field][data-type=toggle] .k-input-before{padding-right:.25rem}.k-input[data-theme=field][data-type=toggle] .k-toggle-input{padding-left:.5rem}.k-input[data-theme=field][data-type=toggle] .k-toggle-input-label{padding:0 .5rem 0 .75rem;line-height:2.25rem}.k-upload input{position:absolute;top:0}[dir=ltr] .k-upload input{left:-3000px}[dir=rtl] .k-upload input{right:-3000px}.k-upload .k-headline{margin-bottom:.75rem}.k-upload-error-list,.k-upload-list{line-height:1.5em;font-size:.875rem}.k-upload-list-filename{color:#777}.k-upload-error-list li{padding:.75rem;background:#fff;border-radius:1px}.k-upload-error-list li:not(:last-child){margin-bottom:2px}.k-upload-error-filename{color:#c82829;font-weight:600}.k-upload-error-message{color:#777}.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}.k-checkbox-input-label{display:block;padding-left:1.75rem}.k-checkbox-input-icon{position:absolute;left:0;width:1rem;height:1rem;border:2px solid #999}.k-checkbox-input-icon svg{position:absolute;width:12px;height:12px;display:none}.k-checkbox-input-icon path{stroke:#fff}.k-checkbox-input-native:checked+.k-checkbox-input-icon{border-color:#16171a;background:#16171a}.k-checkbox-input-native:checked+.k-checkbox-input-icon svg{display:block}.k-checkbox-input-native:focus+.k-checkbox-input-icon{border-color:#4271ae}.k-checkbox-input-native:focus:checked+.k-checkbox-input-icon{background:#4271ae}.k-date-input{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.k-date-input-separator{padding:0 .125rem}.k-datetime-input{display:-webkit-box;display:-ms-flexbox;display:flex}.k-datetime-input .k-time-input{padding-left:.5rem}.k-text-input{width:100%;border:0;background:none;font:inherit;color:inherit}.k-text-input::-webkit-input-placeholder{color:#999}.k-text-input:-ms-input-placeholder{color:#999}.k-text-input::-ms-input-placeholder{color:#999}.k-text-input::placeholder{color:#999}.k-text-input:focus{outline:0}.k-text-input:invalid{-webkit-box-shadow:none;box-shadow:none;outline:0}.k-multiselect-input{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;position:relative;font-size:.875rem;min-height:2.25rem;line-height:1}.k-multiselect-input .k-sortable-ghost{background:#4271ae}.k-multiselect-input .k-dropdown-content{width:100%}.k-multiselect-search{margin-top:0!important;color:#fff;background:#16171a;border-bottom:1px dashed hsla(0,0%,100%,.2)}.k-multiselect-search>.k-button-text{-webkit-box-flex:1;-ms-flex:1;flex:1}.k-multiselect-search input{width:100%;color:#fff;background:none;border:none;outline:none;padding:.25rem 0;font:inherit}.k-multiselect-options{position:relative;max-height:240px;overflow-y:scroll;padding:.5rem 0}.k-multiselect-option{position:relative}.k-multiselect-option.selected{color:#a7bd68}.k-multiselect-option.disabled:not(.selected) .k-icon{opacity:0}.k-multiselect-option b{color:#81a2be;font-weight:700}.k-multiselect-value{color:#999;margin-left:.25rem}.k-multiselect-value:before{content:" ("}.k-multiselect-value:after{content:")"}.k-multiselect-input[data-layout=list] .k-tag{width:100%;margin-right:0!important}.k-number-input{width:100%;border:0;background:none;font:inherit;color:inherit}.k-number-input::-webkit-input-placeholder{color:$color-light-grey}.k-number-input:-ms-input-placeholder{color:$color-light-grey}.k-number-input::-ms-input-placeholder{color:$color-light-grey}.k-number-input::placeholder{color:$color-light-grey}.k-number-input:focus{outline:0}.k-number-input:invalid{-webkit-box-shadow:none;box-shadow:none;outline:0}.k-radio-input li{position:relative;line-height:1.5rem;padding-left:1.75rem}.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;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.k-radio-input label:before{position:absolute;top:.175em;left:0;content:"";width:1rem;height:1rem;border-radius:50%;border:2px solid #999;-webkit-box-shadow:#fff 0 0 0 2px inset;box-shadow:inset 0 0 0 2px #fff}.k-radio-input input:checked+label:before{border-color:#16171a;background:#16171a}.k-radio-input input:focus+label:before{border-color:#4271ae}.k-radio-input input:focus:checked+label:before{background:#4271ae}.k-radio-input-text{display:block}.k-range-input{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;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(8px + var(--ratio)*(100% - 16px));-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;height:16px;background:transparent;font-size:.875rem;line-height:1}.k-range-input-native::-webkit-slider-thumb{-webkit-appearance:none;appearance:none}.k-range-input-native::-webkit-slider-runnable-track{border:none;border-radius:4px;width:100%;height:4px;background:#ccc;background:-webkit-gradient(linear,left top,left bottom,from(#16171a),to(#16171a)) 0/var(--position) 100% no-repeat #ccc;background:linear-gradient(#16171a,#16171a) 0/var(--position) 100% no-repeat #ccc}.k-range-input-native::-moz-range-track{border:none;border-radius:4px;width:100%;height:4px;background:#ccc}.k-range-input-native::-ms-track{border:none;border-radius:4px;width:100%;height:4px;background:#ccc}.k-range-input-native::-moz-range-progress{height:4px;background:#16171a}.k-range-input-native::-ms-fill-lower{height:4px;background:#16171a}.k-range-input-native::-webkit-slider-thumb{margin-top:-6px;-webkit-box-sizing:border-box;box-sizing:border-box;width:16px;height:16px;background:#efefef;border:4px solid #16171a;border-radius:50%;cursor:pointer}.k-range-input-native::-moz-range-thumb{box-sizing:border-box;width:16px;height:16px;background:#efefef;border:4px solid #16171a;border-radius:50%;cursor:pointer}.k-range-input-native::-ms-thumb{margin-top:0;box-sizing:border-box;width:16px;height:16px;background:#efefef;border:4px solid #16171a;border-radius:50%;cursor:pointer}.k-range-input-native::-ms-tooltip{display:none}.k-range-input-native:focus{outline:none}.k-range-input-native:focus::-webkit-slider-runnable-track{border:none;border-radius:4px;width:100%;height:4px;background:#ccc;background:-webkit-gradient(linear,left top,left bottom,from(#4271ae),to(#4271ae)) 0/var(--position) 100% no-repeat #ccc;background:linear-gradient(#4271ae,#4271ae) 0/var(--position) 100% no-repeat #ccc}.k-range-input-native:focus::-moz-range-progress{height:4px;background:#4271ae}.k-range-input-native:focus::-ms-fill-lower{height:4px;background:#4271ae}.k-range-input-native:focus::-webkit-slider-thumb{background:#efefef;border:4px solid #4271ae}.k-range-input-native:focus::-moz-range-thumb{background:#efefef;border:4px solid #4271ae}.k-range-input-native:focus::-ms-thumb{background:#efefef;border:4px solid #4271ae}.k-range-input-tooltip{position:relative;max-width:20%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:#fff;font-size:.75rem;line-height:1;text-align:center;border-radius:1px;background:#16171a;margin-left:1rem;padding:0 .25rem;white-space:nowrap}.k-range-input-tooltip:after{position:absolute;top:50%;left:-5px;width:0;height:0;-webkit-transform:translateY(-50%);transform:translateY(-50%);border-top:5px solid transparent;border-right:5px solid #16171a;border-bottom:5px solid transparent;content:""}.k-range-input-tooltip>*{padding:4px}.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}.k-select-input-native[disabled]{cursor:default}.k-tags-input{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.k-tags-input .k-sortable-ghost{background:#4271ae}.k-tags-input-element{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;min-width:0}.k-tags-input:focus-within .k-tags-input-element{-ms-flex-preferred-size:4rem;flex-basis:4rem}.k-tags-input-element input{font:inherit;border:0;width:100%;background:none}.k-tags-input-element input:focus{outline:0}.k-tags-input[data-layout=list] .k-tag{width:100%;margin-right:0!important}.k-toolbar{background:#fff;border-bottom:1px solid #efefef;height:38px}.k-toolbar-buttons{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.k-toolbar-divider{width:1px;background:#efefef}.k-toolbar-button{width:36px;height:36px}.k-toolbar-button:hover{background:hsla(0,0%,93.7%,.5)}.k-textarea-input-wrapper{position:relative}.k-textarea-input-native{resize:none;border:0;width:100%;background:none;font:inherit;line-height:1.5em;color:inherit}.k-textarea-input-native::-webkit-input-placeholder{color:#999}.k-textarea-input-native:-ms-input-placeholder{color:#999}.k-textarea-input-native::-ms-input-placeholder{color:#999}.k-textarea-input-native::placeholder{color:#999}.k-textarea-input-native:focus{outline:0}.k-textarea-input-native:invalid{-webkit-box-shadow:none;box-shadow:none;outline:0}.k-textarea-input-native[data-size=small]{min-height:7.5rem}.k-textarea-input-native[data-size=medium]{min-height:15rem}.k-textarea-input-native[data-size=large]{min-height:30rem}.k-textarea-input-native[data-size=huge]{min-height:45rem}.k-toolbar{margin-bottom:.25rem;color:#aaa}.k-textarea-input:focus-within .k-toolbar{position:-webkit-sticky;position:sticky;top:0;right:0;left:0;z-index:1;-webkit-box-shadow:rgba(0,0,0,.05) 0 2px 5px;box-shadow:0 2px 5px rgba(0,0,0,.05);border-bottom:1px solid rgba(0,0,0,.1);color:#000}.k-time-input{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-webkit-box-align:center;-ms-flex-align:center;align-items:center;line-height:1}.k-time-input-separator{padding:0 .125rem}.k-time-input-meridiem{padding-left:.5rem}.k-toggle-input{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.k-toggle-input-native{position:relative;height:16px;width:32px;border-radius:16px;border:2px solid #999;-webkit-box-shadow:inset 0 0 0 2px #fff,inset -16px 0 0 2px #fff;box-shadow:inset 0 0 0 2px #fff,inset -16px 0 0 2px #fff;background-color:#999;outline:0;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;-ms-flex-negative:0;flex-shrink:0}.k-toggle-input-native:checked{border-color:#16171a;-webkit-box-shadow:inset 0 0 0 2px #fff,inset 16px 0 0 2px #fff;box-shadow:inset 0 0 0 2px #fff,inset 16px 0 0 2px #fff;background-color:#16171a}.k-toggle-input-native:focus:checked{border:2px solid #4271ae;background-color:#4271ae}.k-toggle-input-native::-ms-check{opacity:0}.k-toggle-input-label{cursor:pointer;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.k-files-field[data-disabled] *{pointer-events:all!important}body{counter-reset:headline-counter}.k-headline-field{position:relative;padding-top:1.5rem}.k-headline-field[data-numbered]:before{counter-increment:headline-counter;content:counter(headline-counter,decimal-leading-zero);color:#4271ae;font-weight:400;padding-right:.25rem}.k-fieldset>.k-grid .k-column:first-child .k-headline-field{padding-top:0}.k-info-field .k-headline{padding-bottom:.75rem;line-height:1.25rem}.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:#ccc}.k-pages-field[data-disabled] *{pointer-events:all!important}.k-structure-table{table-layout:fixed;width:100%;background:#fff;font-size:.875rem;border-spacing:0;-webkit-box-shadow:rgba(22,23,26,.05) 0 2px 5px;box-shadow:0 2px 5px rgba(22,23,26,.05)}.k-structure-table td,.k-structure-table th{border-bottom:1px solid #efefef;line-height:1.25em;overflow:hidden;text-overflow:ellipsis}[dir=ltr] .k-structure-table td,[dir=ltr] .k-structure-table th{border-right:1px solid #efefef}[dir=rtl] .k-structure-table td,[dir=rtl] .k-structure-table th{border-left:1px solid #efefef}.k-structure-table th{font-weight:400;color:#777;padding:0 .75rem;height:38px}[dir=ltr] .k-structure-table th{text-align:left}[dir=rtl] .k-structure-table th{text-align:right}.k-structure-table td:last-child,.k-structure-table th:last-child{width:38px}[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 tr:last-child td{border-bottom:0}.k-structure-table tbody tr:hover td{background:hsla(0,0%,93.7%,.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 .k-structure-table-column[data-align=center]{text-align:center}[dir=ltr] .k-structure-table .k-structure-table-column[data-align=right]{text-align:right}[dir=rtl] .k-structure-table .k-structure-table-column[data-align=right]{text-align:left}.k-structure-table .k-structure-table-column[data-width="1/2"]{width:50%}.k-structure-table .k-structure-table-column[data-width="1/3"]{width:33.33%}.k-structure-table .k-structure-table-column[data-width="1/4"]{width:25%}.k-structure-table .k-structure-table-column[data-width="2/3"]{width:66.66%}.k-structure-table .k-structure-table-column[data-width="3/4"]{width:75%}.k-structure-table .k-structure-table-index{width:38px;text-align:center}.k-structure-table .k-structure-table-index-number{font-size:.75rem;color:#999;padding-top:.15rem}.k-structure-table .k-sort-handle{width:38px;height:38px;display:none}.k-structure-table[data-sortable] tr:hover .k-structure-table-index-number{display:none}.k-structure-table[data-sortable] tr:hover .k-sort-handle{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important}.k-structure-table .k-structure-table-option{width:38px;text-align:center}.k-structure-table .k-structure-table-option .k-button{width:38px;height:38px}.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:#fff;-webkit-box-shadow:rgba(22,23,26,.25) 0 5px 10px;box-shadow:0 5px 10px rgba(22,23,26,.25);outline:2px solid #4271ae;margin-bottom:2px;cursor:-webkit-grabbing}.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:1px;margin-bottom:1px;-webkit-box-shadow:rgba(22,23,26,.05) 0 0 0 3px;box-shadow:0 0 0 3px rgba(22,23,26,.05);border:1px solid #ccc;background:#efefef}.k-structure-form-fields{padding:1.5rem 1.5rem 2rem}.k-structure-form-buttons{border-top:1px solid #ccc;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;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:-webkit-box;display:-ms-flexbox;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:-webkit-box;display:-ms-flexbox;display:flex}.k-field-counter{display:none}.k-text-field:focus-within .k-field-counter{display:block}.k-users-field[data-disabled] *{pointer-events:all!important}.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-url-field-preview{padding:0 .75rem}.k-url-field-preview a{color:#4271ae;text-decoration:underline;-webkit-transition:color .3s;transition:color .3s;overflow:hidden;white-space:nowrap;max-width:100%;text-overflow:ellipsis}.k-url-field-preview a:hover{color:#000}.k-pages-field-preview{padding:0 .25rem 0 .75rem;display:-webkit-box;display:-ms-flexbox;display:flex}.k-pages-field-preview li{line-height:0;margin-right:.5rem}.k-pages-field-preview .k-link{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;background:#efefef;-webkit-box-shadow:rgba(22,23,26,.05) 0 2px 5px;box-shadow:0 2px 5px rgba(22,23,26,.05)}.k-pages-field-preview-image{width:1.525rem;height:1.525rem;color:#999!important}.k-pages-field-preview figcaption{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;line-height:1.5em;padding:0 .5rem;border:1px solid #ccc;border-left:0;border-radius:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.k-users-field-preview{padding:0 .25rem 0 .75rem;display:-webkit-box;display:-ms-flexbox;display:flex}.k-users-field-preview li{line-height:0;margin-right:.5rem}.k-users-field-preview .k-link{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;background:#efefef;-webkit-box-shadow:rgba(22,23,26,.05) 0 2px 5px;box-shadow:0 2px 5px rgba(22,23,26,.05)}.k-users-field-preview-avatar{width:1.525rem;height:1.525rem;color:#999!important}.k-users-field-preview-avatar.k-image{display:block}.k-users-field-preview figcaption{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;line-height:1.5em;padding:0 .5rem;border:1px solid #ccc;border-left:0;border-radius:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.k-bar{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;line-height:1}.k-bar-slot{-webkit-box-flex:1;-ms-flex-positive:1;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-text{line-height:1.5em}.k-text p{margin-bottom:1.5em}.k-text a{text-decoration:underline}.k-text>:last-child{margin-bottom:0}.k-text[data-align=center]{text-align:center}.k-text[data-align=right]{text-align:right}.k-text[data-size=tiny]{font-size:.75rem}.k-text[data-size=small]{font-size:.875rem}.k-text[data-size=medium]{font-size:1rem}.k-text[data-size=large]{font-size:1.25rem}.k-text[data-theme=help]{color:#777}.k-box,.k-text[data-theme=help]{font-size:.875rem;line-height:1.25rem}.k-box{background:#d9d9d9;border-radius:1px;padding:.375rem .75rem;border-left:2px solid #999;padding:.5rem 1.5rem;word-wrap:break-word}.k-box[data-theme=code]{background:#16171a;border:1px solid #000;color:#efefef;font-family:Input,Menlo,monospace;font-size:.875rem;line-height:1.5}.k-box[data-theme=button]{padding:0}.k-box[data-theme=button] .k-button{padding:0 .75rem;height:2.25rem;width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;line-height:2rem;text-align:left}.k-box[data-theme=positive]{background:#dbe4c1;border:0;border-left:2px solid #a7bd68;padding:.5rem 1.5rem}.k-box[data-theme=negative]{background:#eec6c6;border:0;border-left:2px solid #d16464;padding:.5rem 1.5rem}.k-box[data-theme=notice]{background:#f4dac9;border:0;border-left:2px solid #de935f;padding:.5rem 1.5rem}.k-box[data-theme=info]{background:#d5e0e9;border:0;border-left:2px solid #81a2be;padding:.5rem 1.5rem}.k-box[data-theme=empty]{text-align:center;border-left:0;padding:3rem 1.5rem;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;background:#efefef;border-radius:1px;color:#777;border:1px dashed #ccc}.k-box[data-theme=empty] .k-icon{margin-bottom:.5rem;color:#999}.k-box[data-theme=empty] p{color:#777}.k-card{position:relative;border-radius:1px;-webkit-box-shadow:rgba(22,23,26,.05) 0 2px 5px;box-shadow:0 2px 5px rgba(22,23,26,.05)}.k-card,.k-card a{min-width:0;background:#fff}.k-card:focus-within{-webkit-box-shadow:#4271ae 0 0 0 2px;box-shadow:0 0 0 2px #4271ae}.k-card a:focus{outline:0}.k-card .k-sort-handle{position:absolute;top:.75rem;width:2rem;height:2rem;border-radius:1px;background:#fff;opacity:0;color:#16171a;z-index:1;will-change:opacity;-webkit-transition:opacity .3s;transition:opacity .3s}[dir=ltr] .k-card .k-sort-handle{right:.75rem}[dir=rtl] .k-card .k-sort-handle{left:.75rem}.k-cards:hover .k-sort-handle{opacity:.25}.k-card:hover .k-sort-handle{opacity:1}.k-card.k-sortable-ghost{outline:2px solid #4271ae;border-radius:0}.k-card-icon,.k-card-image{border-top-left-radius:1px;border-top-right-radius:1px;overflow:hidden}.k-card-icon{position:relative;display:block}.k-card-icon .k-icon{position:absolute;top:0;right:0;bottom:0;left:0}.k-card-icon .k-icon-emoji{font-size:3rem}.k-card-icon .k-icon svg{width:3rem;height:3rem;opacity:.5}.k-card-content{line-height:1.25rem;border-bottom-left-radius:1px;border-bottom-right-radius:1px;min-height:2.25rem;padding:.5rem .75rem;overflow-wrap:break-word;word-wrap:break-word}.k-card-text{display:block;font-weight:400;text-overflow:ellipsis;font-size:.875rem}.k-card-text[data-noinfo]:after{content:" ";height:1em;width:5rem;display:inline-block}.k-card-info{color:#777;display:block;font-size:.875rem;text-overflow:ellipsis;overflow:hidden}[dir=ltr] .k-card-info{margin-right:4rem}[dir=rtl] .k-card-info{margin-left:4rem}.k-card-options{position:absolute;bottom:0}[dir=ltr] .k-card-options{right:0}[dir=rtl] .k-card-options{left:0}.k-card-options>.k-button{position:relative;float:left;height:2.25rem;padding:0 .75rem;line-height:1}.k-card-options-dropdown{top:2.25rem}.k-cards{display:grid;grid-gap:1.5rem;grid-template-columns:repeat(auto-fit,minmax(12rem,1fr))}@media screen and (min-width:30em){.k-cards[data-size=tiny]{grid-template-columns:repeat(auto-fill,minmax(12rem,1fr))}.k-cards[data-size=small]{grid-template-columns:repeat(auto-fill,minmax(16rem,1fr))}.k-cards[data-size=medium]{grid-template-columns:repeat(auto-fill,minmax(24rem,1fr))}.k-cards[data-size=huge],.k-cards[data-size=large]{grid-template-columns:1fr}}@media screen and (min-width:65em){.k-cards[data-size=large]{grid-template-columns:repeat(auto-fill,minmax(32rem,1fr))}}.k-collection-help{padding:.5rem .75rem}.k-collection-footer{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin-right:-.75rem;margin-left:-.75rem}.k-collection-pagination{line-height:1.25rem;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}@media screen and (min-width:65em){.k-column[data-width="1/1"],.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="1/2"],.k-column[data-width="2/4"],.k-column[data-width="3/6"]{grid-column-start:span 6}.k-column[data-width="1/3"],.k-column[data-width="2/6"]{grid-column-start:span 4}.k-column[data-width="2/3"],.k-column[data-width="4/6"]{grid-column-start:span 8}.k-column[data-width="1/4"]{grid-column-start:span 3}.k-column[data-width="1/6"]{grid-column-start:span 2}.k-column[data-width="5/6"]{grid-column-start:span 10}.k-column[data-width="3/4"]{grid-column-start:span 9}}.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]:after{display:block;outline:1px solid #4271ae;-webkit-box-shadow:rgba(66,113,174,.25) 0 0 0 3px;box-shadow:0 0 0 3px rgba(66,113,174,.25)}.k-empty{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-radius:1px;color:#777;border:1px dashed #ccc}.k-empty p{font-size:.875rem;color:#777}.k-empty .k-icon{color:#999}.k-empty[data-layout=cards]{text-align:center;padding:1.5rem;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.k-empty[data-layout=cards] .k-icon{margin-bottom:1rem}.k-empty[data-layout=cards] .k-icon svg{width:2rem;height:2rem}.k-empty[data-layout=list]{height:38px}.k-empty[data-layout=list] .k-icon{width:36px;height:36px;border-right:1px solid rgba(0,0,0,.05)}.k-empty[data-layout=list] p{line-height:1.25rem;padding:.5rem .75rem}.k-file-preview{background:#2d2f36}.k-file-preview-layout{display:grid}@media screen and (max-width:65em){.k-file-preview-layout{padding:0!important}}@media screen and (min-width:30em){.k-file-preview-layout{grid-template-columns:50% auto}}@media screen and (min-width:65em){.k-file-preview-layout{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}}.k-file-preview-layout>*{min-width:0}.k-file-preview-image{position:relative;background:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXR0ZXJuIGlkPSJhIiB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiPjxwYXRoIGZpbGw9InJnYmEoMCwgMCwgMCwgMC4yKSIgZD0iTTAgMGgxMHYxMEgwem0xMCAxMGgxMHYxMEgxMHoiLz48L3BhdHRlcm4+PHJlY3QgZmlsbD0idXJsKCNhKSIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIvPjwvc3ZnPg==")}@media screen and (min-width:65em){.k-file-preview-image{width:33.33%}}@media screen and (min-width:90em){.k-file-preview-image{width:25%}}.k-file-preview-image .k-image span{overflow:hidden;padding-bottom:66.66%}@media screen and (min-width:30em) and (max-width:65em){.k-file-preview-image .k-image span{position:absolute;top:0;left:0;bottom:0;right:0;padding-bottom:0!important}}@media screen and (min-width:65em){.k-file-preview-image .k-image span{padding-bottom:100%}}.k-file-preview-placeholder{display:block;padding-bottom:100%}.k-file-preview-image img{padding:3rem}.k-file-preview-image-link{display:block;outline:0}.k-file-preview-image-link[data-tabbed]{outline:2px solid #4271ae!important;outline-offset:-2px}.k-file-preview-icon{position:relative;display:block;padding-bottom:100%;overflow:hidden;color:hsla(0,0%,100%,.5)}.k-file-preview-icon svg{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%) scale(4);transform:translate(-50%,-50%) scale(4)}.k-file-preview-details{padding:1.5rem;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}@media screen and (min-width:65em){.k-file-preview-details{padding:3rem}}.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))}@media screen and (min-width:30em){.k-file-preview-details ul{grid-template-columns:repeat(auto-fill,minmax(200px,1fr))}}.k-file-preview-details h3{font-size:.875rem;font-weight:500;color:#999}.k-file-preview-details p{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:hsla(0,0%,100%,.75);font-size:.875rem}.k-file-preview-details p a{display:block;width:100%;overflow:hidden;text-overflow:ellipsis}.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{border-bottom:1px solid #ccc;margin-bottom:2rem;padding-top:4vh}.k-header .k-headline{min-height:1.25em;margin-bottom:.5rem}.k-header .k-header-buttons{margin-top:-.5rem;height:3.25rem}.k-header .k-headline-editable{cursor:pointer}.k-header .k-headline-editable .k-icon{color:#999;opacity:0;-webkit-transition:opacity .3s;transition:opacity .3s;display:inline-block}[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:hover .k-icon{opacity:1}.k-header-tabs{position:relative;background:#e9e9e9;border-top:1px solid #ccc;border-left:1px solid #ccc;border-right:1px solid #ccc}.k-header-tabs nav{display:-webkit-box;display:-ms-flexbox;display:flex;margin-left:-1px;margin-right:-1px}.k-header-tabs nav,.k-tab-button.k-button{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.k-tab-button.k-button{position:relative;z-index:1;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:.625rem 0;font-size:.75rem;text-transform:uppercase;font-weight:500;border-left:1px solid transparent;border-right:1px solid #ccc;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}@media screen and (min-width:30em){.k-tab-button.k-button{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}}@media screen and (min-width:65em){.k-tab-button.k-button{max-width:13rem}}@media screen and (min-width:30em){.k-tab-button.k-button .k-icon{margin-right:.5rem}}.k-tab-button.k-button>.k-button-text{padding-top:.375rem;font-size:10px;overflow:hidden;text-overflow:ellipsis}[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}@media screen and (min-width:30em){.k-tab-button.k-button>.k-button-text{font-size:.75rem;padding-top:0}}.k-tab-button:last-child{border-right:1px solid transparent}.k-tab-button[aria-current]{position:relative;background:#efefef;border-right:1px solid #ccc;pointer-events:none}.k-tab-button[aria-current]:first-child{border-left:1px solid #ccc}.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;height:2px;top:-1px;background:#16171a}.k-tab-button[aria-current]:after{left:0;right:0;height:1px;bottom:-1px;background:#efefef}.k-tabs-dropdown{top:100%;right:0}.k-list .k-list-item:not(:last-child){margin-bottom:2px}.k-list-item{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background:#fff;border-radius:1px;-webkit-box-shadow:rgba(22,23,26,.05) 0 2px 5px;box-shadow:0 2px 5px rgba(22,23,26,.05)}.k-list-item .k-sort-handle{position:absolute;left:-1.5rem;width:1.5rem;height:38px;opacity:0}.k-list:hover .k-sort-handle{opacity:.25}.k-list-item:hover .k-sort-handle{opacity:1}.k-list-item.k-sortable-ghost{position:relative;outline:2px solid #4271ae;z-index:1;-webkit-box-shadow:rgba(22,23,26,.25) 0 5px 10px;box-shadow:0 5px 10px rgba(22,23,26,.25)}.k-list-item.k-sortable-fallback{opacity:.25!important;overflow:hidden}.k-list-item-image{width:38px;height:38px;overflow:hidden;-ms-flex-negative:0;flex-shrink:0;line-height:0}.k-list-item-image .k-image{width:38px;height:38px;-o-object-fit:contain;object-fit:contain}.k-list-item-image .k-icon{width:38px;height:38px}.k-list-item-image .k-icon svg{opacity:.5}.k-list-item-content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:1;flex-shrink:1;overflow:hidden;outline:none}.k-list-item-content[data-tabbed]{outline:none;-webkit-box-shadow:#4271ae 0 0 0 2px,rgba(66,113,174,.2) 0 0 0 2px;box-shadow:0 0 0 2px #4271ae,0 0 0 2px rgba(66,113,174,.2)}.k-list-item-text{display:-webkit-box;display:-ms-flexbox;display:flex;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;-webkit-box-align:baseline;-ms-flex-align:baseline;align-items:baseline;width:100%;line-height:1.25rem;padding:.5rem .75rem}.k-list-item-text em{font-style:normal;margin-right:1rem;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;font-size:.875rem;color:#16171a}.k-list-item-text em,.k-list-item-text small{min-width:0;overflow:hidden;text-overflow:ellipsis}.k-list-item-text small{color:#999;font-size:.75rem;color:#777;display:none}@media screen and (min-width:30em){.k-list-item-text small{display:block}}.k-list-item-options{position:relative;-ms-flex-negative:0;flex-shrink:0}.k-list-item-options .k-dropdown-content{top:38px}.k-list-item-options>.k-button{height:38px;padding:0 12px}.k-list-item-options>.k-button>.k-button-icon{height:38px}.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:calc(100vh - 6rem);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;padding:0 3rem;overflow:auto}.k-view[data-align=center]>*{-ms-flex-preferred-size:22.5rem;flex-basis:22.5rem}.k-headline{font-size:1rem;font-weight:600;line-height:1.5em}.k-headline[data-size=small]{font-size:.875rem}.k-headline[data-size=large]{font-size:1.25rem;font-weight:400}@media screen and (min-width:65em){.k-headline[data-size=large]{font-size:1.5rem}}.k-headline[data-size=huge]{font-size:1.5rem;line-height:1.15em}@media screen and (min-width:65em){.k-headline[data-size=huge]{font-size:1.75rem}}.k-headline[data-theme=negative]{color:#c82829}.k-headline[data-theme=positive]{color:#5d800d}.k-headline abbr{color:#999;padding-left:.25rem;text-decoration:none}.k-icon{position:relative;line-height:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-ms-flex-negative:0;flex-shrink:0}.k-icon svg{width:1rem;height:1rem;-moz-transform:scale(1)}.k-icon svg *{fill:currentColor}.k-icon[data-back=black]{background:#16171a;color:#fff}.k-icon[data-back=white]{background:#fff;color:#16171a}.k-icon[data-back=pattern]{background:#2d2f36 url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXR0ZXJuIGlkPSJhIiB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiPjxwYXRoIGZpbGw9InJnYmEoMCwgMCwgMCwgMC4yKSIgZD0iTTAgMGgxMHYxMEgwem0xMCAxMGgxMHYxMEgxMHoiLz48L3BhdHRlcm4+PHJlY3QgZmlsbD0idXJsKCNhKSIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIvPjwvc3ZnPg==");color:#fff}.k-icon[data-size=medium] svg{width:2rem;height:2rem}.k-icon[data-size=large] svg{width:3rem;height:3rem}.k-icon-emoji{display:block;line-height:1;font-style:normal;font-size:1rem}@media not all,only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min-resolution:2dppx),only screen and (min-resolution:192dpi){.k-icon-emoji{font-size:1.25rem;margin-left:.2rem}}.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}.k-image-error{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);color:#fff;font-size:.9em}.k-image-error svg *{fill:hsla(0,0%,100%,.3)}.k-image[data-cover] img{-o-object-fit:cover;object-fit:cover}.k-image[data-back=black] span{background:#16171a}.k-image[data-back=white] span{background:#fff;color:#16171a}.k-image[data-back=white] .k-image-error{background:#16171a;color:#fff}.k-image[data-back=pattern] span{background:#2d2f36 url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXR0ZXJuIGlkPSJhIiB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiPjxwYXRoIGZpbGw9InJnYmEoMCwgMCwgMCwgMC4yKSIgZD0iTTAgMGgxMHYxMEgwem0xMCAxMGgxMHYxMEgxMHoiLz48L3BhdHRlcm4+PHJlY3QgZmlsbD0idXJsKCNhKSIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIvPjwvc3ZnPg==")}.k-progress{-webkit-appearance:none;width:100%;height:.5rem;border-radius:5rem}.k-progress::-webkit-progress-bar{border:none;background:#ccc;height:.5rem;border-radius:20px}.k-progress::-webkit-progress-value{border-radius:20px;background:#4271ae;-webkit-transition:width .3s;transition:width .3s}.k-sort-handle{cursor:-webkit-grab;color:#16171a;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;line-height:0;width:2rem;height:2rem;display:-webkit-box;display:-ms-flexbox;display:flex;will-change:opacity,color;-webkit-transition:opacity .3s;transition:opacity .3s;z-index:1}.k-sort-handle svg{width:1rem}.k-sort-handle:active{cursor:-webkit-grabbing}button{line-height:inherit;border:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;font-size:1rem;color:currentColor;background:none;cursor:pointer}button::-moz-focus-inner{padding:0;border:0}.k-button[data-disabled],.k-button[disabled]{pointer-events:none;opacity:.5}.k-button{display:inline-block;position:relative;font-size:.875rem;-webkit-transition:color .3s;transition:color .3s}.k-button,.k-button:focus,.k-button:hover{outline:none}.k-button[data-tabbed]{outline:none;-webkit-box-shadow:#4271ae 0 0 0 2px,rgba(66,113,174,.2) 0 0 0 2px;box-shadow:0 0 0 2px #4271ae,0 0 0 2px rgba(66,113,174,.2)}.k-button *{vertical-align:middle}.k-button[data-responsive] .k-button-text{display:none}@media screen and (min-width:30em){.k-button[data-responsive] .k-button-text{display:inline}}.k-button[data-theme=positive]{color:#5d800d}.k-button[data-theme=negative]{color:#c82829}.k-button-icon{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;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-group{font-size:0;margin-left:-.75rem;margin-right:-.75rem}.k-button-group>.k-dropdown{height:3rem;display:inline-block}.k-button-group>.k-button,.k-button-group>.k-dropdown>.k-button{padding:1rem .75rem;line-height:1rem}.k-button-group .k-dropdown-content{top:calc(100% + 1px);margin:0 .75rem}.k-dropdown{position:relative}.k-dropdown-content{position:absolute;top:100%;background:#16171a;color:#fff;z-index:700;-webkit-box-shadow:rgba(22,23,26,.2) 0 2px 10px;box-shadow:0 2px 10px rgba(22,23,26,.2);border-radius:1px;text-align:left}[dir=ltr] .k-dropdown-content{left:0}[dir=rtl] .k-dropdown-content{right:0}[dir=ltr] .k-dropdown-content[data-align=right]{left:auto;right:0}[dir=rtl] .k-dropdown-content[data-align=right]{left:0;right:auto}.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 hr{position:relative;padding:.5rem 0;border:0}.k-dropdown-content hr:after{position:absolute;top:.5rem;left:1rem;right:1rem;content:"";height:1px;background:currentColor;opacity:.2}.k-dropdown-item{white-space:nowrap;line-height:1;display:-webkit-box;display:-ms-flexbox;display:flex;width:100%;-webkit-box-align:center;-ms-flex-align:center;align-items:center;font-size:.875rem;padding:6px 16px}.k-dropdown-item:focus{outline:none;-webkit-box-shadow:#4271ae 0 0 0 2px,rgba(66,113,174,.2) 0 0 0 2px;box-shadow:0 0 0 2px #4271ae,0 0 0 2px rgba(66,113,174,.2)}.k-dropdown-item .k-button-figure{text-align:center;padding-right:.5rem}.k-pagination{-webkit-user-select:none;-moz-user-select:none;-ms-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:.875rem}.k-pagination[data-align=center]{text-align:center}.k-pagination[data-align=right]{text-align:right}.k-dropdown-content.k-pagination-selector{position:absolute;top:100%;left:50%;width:14rem;margin-left:-7rem;background:#000}[dir=ltr] .k-dropdown-content.k-pagination-selector{direction:ltr}[dir=rtl] .k-dropdown-content.k-pagination-selector{direction:rtl}.k-pagination-selector>div{font-size:.875rem;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.k-pagination-selector .k-button{padding:.75rem 1rem;line-height:1}.k-pagination-selector>div>label{padding:.75rem 1rem}.k-pagination-selector>div>input{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;font:inherit;border:0;padding:.75rem 1rem;color:#fff;background:none;text-align:center;border-left:1px solid hsla(0,0%,100%,.2);border-right:1px solid hsla(0,0%,100%,.2)}.k-pagination-selector>div>input:focus{outline:0}.k-prev-next{direction:ltr}.k-tag{position:relative;font-size:.875rem;line-height:1;cursor:pointer;background-color:#16171a;color:#efefef;border-radius:1px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.k-tag:focus{outline:0;background-color:#4271ae;border-color:#4271ae;color:#fff}.k-tag-text{padding:0 .75rem}.k-tag-toggle{color:hsla(0,0%,100%,.7);width:2rem;height:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;border-left:1px solid hsla(0,0%,100%,.15)}.k-tag-toggle:hover{background:hsla(0,0%,100%,.2);color:#fff}.k-topbar{position:relative;color:#fff;-ms-flex-negative:0;flex-shrink:0;height:2.5rem;line-height:1;background:#16171a}.k-topbar-wrapper{position:relative;margin-left:-.75rem;margin-right:-.75rem}.k-topbar-loader,.k-topbar-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.k-topbar-loader{position:absolute;top:0;right:0;bottom:0;height:2.5rem;width:2.5rem;padding:.75rem;background:#16171a;z-index:1;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.k-topbar-loader svg{height:18px;width:18px;-webkit-animation:Spin .9s linear infinite;animation:Spin .9s linear infinite}.k-topbar-menu{-ms-flex-negative:0;flex-shrink:0}.k-topbar-menu ul{padding:.5rem 0}.k-topbar-menu-button{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.k-topbar-menu-button .k-button-text{opacity:1}.k-topbar-button,.k-topbar-signals .k-button{padding:.75rem;line-height:1;font-size:.875rem}.k-topbar-signals .k-button .k-button-text{opacity:1}.k-topbar-button .k-button-text{display:-webkit-box;display:-ms-flexbox;display:flex;opacity:1}.k-topbar-view-button{-ms-flex-negative:0;flex-shrink:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;outline:none}.k-topbar-view-button[data-tabbed]{outline:none;-webkit-box-shadow:#4271ae 0 0 0 2px,rgba(66,113,174,.2) 0 0 0 2px;box-shadow:0 0 0 2px #4271ae,0 0 0 2px rgba(66,113,174,.2)}[dir=ltr] .k-topbar-view-button{padding-right:0}[dir=rtl] .k-topbar-view-button{padding-left:0}[dir=ltr] .k-topbar-view-button .k-icon{margin-right:.5rem}[dir=rtl] .k-topbar-view-button .k-icon{margin-left:.5rem}.k-topbar-crumbs{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;display:-webkit-box;display:-ms-flexbox;display:flex}.k-topbar-crumbs a{position:relative;font-size:.875rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:none;padding-top:.75rem;padding-bottom:.75rem;line-height:1;-webkit-transition:opacity .3s;transition:opacity .3s;outline:none}.k-topbar-crumbs a:before{content:"/";padding:0 .5rem;opacity:.25}.k-topbar-crumbs a:focus,.k-topbar-crumbs a:hover{opacity:1}.k-topbar-crumbs a[data-tabbed]{outline:none;-webkit-box-shadow:#4271ae 0 0 0 2px,rgba(66,113,174,.2) 0 0 0 2px;box-shadow:0 0 0 2px #4271ae,0 0 0 2px rgba(66,113,174,.2)}.k-topbar-crumbs a:not(:last-child){max-width:15vw}.k-topbar-breadcrumb-menu{-ms-flex-negative:0;flex-shrink:0}@media screen and (min-width:30em){.k-topbar-crumbs a{display:block}.k-topbar-breadcrumb-menu{display:none}}.k-topbar-signals{position:absolute;top:0;background:#16171a;height:2.5rem;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}[dir=ltr] .k-topbar-signals{right:0}[dir=rtl] .k-topbar-signals{left:0}.k-topbar-signals:before{position:absolute;content:"";top:0;bottom:0;width:.5rem}[dir=ltr] .k-topbar-signals:before{left:-.5rem;background:-webkit-linear-gradient(left,rgba(22,23,26,0),#16171a)}[dir=rtl] .k-topbar-signals:before{right:-.5rem;background:-webkit-linear-gradient(right,rgba(22,23,26,0),#16171a)}.k-topbar-signals .k-button{line-height:1}.k-topbar-notification{font-weight:600;line-height:1;display:-webkit-box;display:-ms-flexbox;display:flex}.k-topbar .k-button[data-theme=positive]{color:#a7bd68}.k-topbar .k-button[data-theme=negative]{color:#d16464}.k-topbar .k-button[data-theme=negative] .k-button-text{display:none}@media screen and (min-width:30em){.k-topbar .k-button[data-theme=negative] .k-button-text{display:inline}}.k-topbar .k-button[data-theme] .k-button-text{opacity:1}.k-topbar .k-dropdown-content{color:#16171a;background:#fff}.k-topbar .k-dropdown-content hr:after{opacity:.1}.k-topbar-menu [aria-current] .k-link{color:#4271ae;font-weight:500}.k-registration{display:inline-block;margin-right:1rem;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.k-registration p{color:#d16464;font-size:.875rem;margin-right:1rem;font-weight:600;display:none}@media screen and (min-width:90em){.k-registration p{display:block}}.k-registration .k-button{color:#fff}.k-section,.k-sections{padding-bottom:3rem}.k-section-header{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:baseline;-ms-flex-align:baseline;align-items:baseline;z-index:1}.k-section-header .k-headline{line-height:1.25rem;padding-bottom:.75rem;min-height:2rem}.k-section-header .k-button-group{position:absolute;top:-.875rem}[dir=ltr] .k-section-header .k-button-group{right:0}[dir=rtl] .k-section-header .k-button-group{left:0}.k-fields-issue-headline,.k-info-section-headline{margin-bottom:.5rem}.k-fields-section input[type=submit]{display:none}.k-error-view{position:absolute;top:0;right:0;bottom:0;left:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.k-error-view-content{line-height:1.5em;max-width:25rem;text-align:center}.k-error-view-icon{color:#c82829;display:inline-block}.k-error-view-content p:not(:last-child){margin-bottom:.75rem}.k-browser-view .k-error-view-content{text-align:left}.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:.875rem}.k-installation-issues li{position:relative;padding:1.5rem;background:#fff}[dir=ltr] .k-installation-issues li{padding-left:3.5rem}[dir=rtl] .k-installation-issues li{padding-right:3.5rem}.k-installation-issues .k-icon{position:absolute;top:calc(1.5rem + 2px)}[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 svg *{fill:#c82829}.k-installation-issues li:not(:last-child){margin-bottom:2px}.k-installation-issues li code{font:inherit;color:#c82829}.k-installation-view .k-button[type=submit]{padding:1rem}[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-settings-view section{margin-bottom:3rem}.k-settings-view .k-header{margin-bottom:1.5rem}.k-settings-view header{margin-bottom:.5rem;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.k-settings-view header,.k-system-info-box{display:-webkit-box;display:-ms-flexbox;display:flex}.k-system-info-box{background:#fff;padding:.75rem}.k-system-info-box li{-ms-flex-negative:0;flex-shrink:0;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0}.k-system-info-box dt{font-size:.875rem;color:#777;margin-bottom:.25rem}.k-system-unregistered{color:#c82829}.k-languages-section{margin-bottom:2rem}.k-login-form[data-invalid]{-webkit-animation:shake .5s linear;animation:shake .5s linear}.k-login-form[data-invalid] .k-field label{-webkit-animation:nope 2s linear;animation:nope 2s linear}.k-login-form label abbr{visibility:hidden}.k-login-buttons{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:1.5rem 0}.k-login-button{padding:.5rem 1rem;font-weight:500;-webkit-transition:opacity .3s;transition:opacity .3s}[dir=ltr] .k-login-button{margin-right:-1rem}[dir=rtl] .k-login-button{margin-left:-1rem}.k-login-button span{opacity:1}.k-login-button[disabled]{opacity:.25}.k-login-checkbox{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:.5rem 0;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;font-size:.875rem;cursor:pointer}.k-login-checkbox .k-checkbox-text{opacity:.75;-webkit-transition:opacity .3s;transition:opacity .3s}.k-login-checkbox:focus span,.k-login-checkbox:hover span{opacity:1}@-webkit-keyframes nope{0%{color:#c82829}to{color:#16171a}}@keyframes nope{0%{color:#c82829}to{color:#16171a}}@-webkit-keyframes shake{8%,41%{-webkit-transform:translateX(-10px);transform:translateX(-10px)}25%,58%{-webkit-transform:translateX(10px);transform:translateX(10px)}75%{-webkit-transform:translateX(-5px);transform:translateX(-5px)}92%{-webkit-transform:translateX(5px);transform:translateX(5px)}0%,to{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes shake{8%,41%{-webkit-transform:translateX(-10px);transform:translateX(-10px)}25%,58%{-webkit-transform:translateX(10px);transform:translateX(10px)}75%{-webkit-transform:translateX(-5px);transform:translateX(-5px)}92%{-webkit-transform:translateX(5px);transform:translateX(5px)}0%,to{-webkit-transform:translateX(0);transform:translateX(0)}}.k-status-flag svg{width:14px;height:14px}.k-status-flag-listed .k-icon{color:#a7bd68}.k-status-flag-unlisted .k-icon{color:#81a2be}.k-status-flag-draft .k-icon{color:#d16464}.k-status-flag[disabled]{opacity:1}.k-user-profile{background:#fff}.k-user-profile>.k-view{padding-top:3rem;padding-bottom:3rem;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;line-height:0}.k-user-profile .k-button-group{overflow:hidden}[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 .k-button{display:block;padding-top:.25rem;padding-bottom:.25rem;overflow:hidden;white-space:nowrap}.k-user-profile .k-button-group .k-button[disabled]{opacity:1}.k-user-profile .k-dropdown-content{margin-top:.5rem;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.k-user-view-image .k-image{display:block;width:4rem;height:4rem;line-height:0}.k-user-view-image .k-button-text{opacity:1}.k-user-view-image .k-icon{width:4rem;height:4rem;background:#16171a;color:#999}.k-user-name-placeholder{color:#999;-webkit-transition:color .3s;transition:color .3s}.k-header[data-editable] .k-user-name-placeholder:hover{color:#16171a} \ No newline at end of file +*,:after,:before{margin:0;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box}noscript{padding:1.5rem;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;height:100vh;text-align:center}html{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;background:#efefef}body,html{color:#16171a;overflow:hidden;height:100%}a{color:inherit;text-decoration:none}li{list-style:none}b,strong{font-weight:600}.fade-enter-active,.fade-leave-active{-webkit-transition:opacity .5s;transition:opacity .5s}.fade-enter,.fade-leave-to{opacity:0}.k-panel{position:absolute;top:0;right:0;bottom:0;left:0;background:#efefef}.k-panel[data-loading]{-webkit-animation:LoadingCursor .5s;animation:LoadingCursor .5s}.k-panel-header{position:absolute;top:0;left:0;right:0;z-index:300}.k-panel .k-form-buttons{position:fixed;bottom:0;left:0;right:0;z-index:300}.k-panel-view{position:absolute;top:0;right:0;bottom:0;left:0;padding-bottom:6rem;overflow-y:scroll;-webkit-overflow-scrolling:touch;-webkit-transform:translateZ(0);transform:translateZ(0)}.k-panel[data-dialog] .k-panel-view{overflow:hidden;-webkit-transform:none;transform:none}.k-panel[data-topbar] .k-panel-view{top:2.5rem}.k-panel[data-dragging],.k-panel[data-loading]:after{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.k-offline-warning{position:fixed;content:" ";top:0;right:0;bottom:0;left:0;z-index:900;background:rgba(22,23,26,.7);content:"offline";display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;color:#fff}@-webkit-keyframes LoadingCursor{to{cursor:progress}}@keyframes LoadingCursor{to{cursor:progress}}@-webkit-keyframes Spin{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes Spin{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.k-offscreen{-webkit-clip-path:inset(100%);clip-path:inset(100%);clip:rect(1px,1px,1px,1px);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}.k-icons{position:absolute;width:0;height:0}.k-dialog{-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;position:fixed;top:0;right:0;bottom:0;left:0;border:0;width:100%;height:100%;background:rgba(22,23,26,.6);z-index:600;-webkit-transform:translateZ(0);transform:translateZ(0)}.k-dialog,.k-dialog-box{display:-webkit-box;display:-ms-flexbox;display:flex}.k-dialog-box{position:relative;background:#efefef;width:22rem;-webkit-box-shadow:rgba(22,23,26,.2) 0 2px 10px;box-shadow:0 2px 10px rgba(22,23,26,.2);border-radius:1px;line-height:1;max-height:calc(100vh - 3rem);margin:1.5rem;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.k-dialog-box[data-size=small]{width:20rem}.k-dialog-box[data-size=medium]{width:30rem}.k-dialog-box[data-size=large]{width:40rem}.k-dialog-notification{padding:.75rem 1.5rem;background:#16171a;width:100%;line-height:1.25rem;color:#fff;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-negative:0;flex-shrink:0;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.k-dialog-notification[data-theme=error]{background:#d16464;color:#000}.k-dialog-notification[data-theme=success]{background:#a7bd68;color:#000}.k-dialog-notification p{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;word-wrap:break-word;overflow:hidden}.k-dialog-notification .k-button{display:-webkit-box;display:-ms-flexbox;display:flex;margin-left:1rem}.k-dialog-body{padding:1.5rem;overflow-y:auto;overflow-x:hidden}.k-dialog-body .k-fieldset{padding-bottom:.5rem}.k-dialog-footer{border-top:1px solid #ccc;padding:0;border-bottom-left-radius:1px;border-bottom-right-radius:1px;line-height:1;-ms-flex-negative:0;flex-shrink:0}.k-dialog-footer .k-button-group{display:-webkit-box;display:-ms-flexbox;display:flex;margin:0;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.k-dialog-footer .k-button-group .k-button{padding:.75rem 1rem;line-height:1.25rem}.k-dialog-footer .k-button-group .k-button:first-child{text-align:left;padding-left:1.5rem}.k-dialog-footer .k-button-group .k-button:last-child{text-align:right;padding-right:1.5rem}.k-error-details{background:#fff;display:block;overflow:auto;padding:1rem;font-size:.875rem;line-height:1.25em;margin-top:.75rem}.k-error-details dt{color:#d16464;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 #efefef;padding-bottom:.25rem;margin-bottom:.25rem}.k-files-dialog .k-list-item{cursor:pointer}.k-page-remove-warning{margin:1.5rem 0}.k-page-remove-warning .k-box{font-size:1rem;line-height:1.5em;padding-top:.75rem;padding-bottom:.75rem}.k-pages-dialog-navbar{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-bottom:.5rem;padding-right:38px}.k-pages-dialog-navbar .k-button{width:38px}.k-pages-dialog-navbar .k-button[disabled]{opacity:0}.k-pages-dialog-navbar .k-headline{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;text-align:center}.k-pages-dialog-search{margin-bottom:.5rem}.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-pages-dialog .k-empty{border:0}.k-users-dialog .k-list-item{cursor:pointer}.k-calendar-input{padding:.5rem;background:#16171a;color:#efefef;border-radius:1px}.k-calendar-table{table-layout:fixed;width:100%;min-width:15rem;padding-top:.5rem}.k-calendar-input>nav{display:-webkit-box;display:-ms-flexbox;display:flex;direction:ltr}.k-calendar-input>nav .k-button{padding:.5rem}.k-calendar-selects{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack: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:400;font-size:.875rem}.k-calendar-selects .k-select-input:focus-within{color:#81a2be!important}.k-calendar-input th{padding:.5rem 0;color:#999;font-size:.75rem;font-weight:400;text-align:center}.k-calendar-day .k-button{width:2rem;height:2rem;margin:0 auto;color:#fff;line-height:1.75rem;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;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:#fff}.k-calendar-day:hover .k-button{border-color:hsla(0,0%,100%,.25)}.k-calendar-day[aria-current=date] .k-button{color:#81a2be;font-weight:500}.k-calendar-day[aria-selected=date] .k-button{border-color:#a7bd68;color:#a7bd68}.k-calendar-today{text-align:center;padding-top:.5rem}.k-calendar-today .k-button{color:#81a2be;font-size:.75rem;padding:1rem}.k-calendar-today .k-button-text{opacity:1}.k-counter{font-size:.75rem;color:#16171a;font-weight:600}.k-counter[data-invalid]{color:#c82829}.k-counter-rules{color:#777;font-weight:400}[dir=ltr] .k-counter-rules{padding-left:.5rem}[dir=rtl] .k-counter-rules{padding-right:.5rem}.k-form-submitter{display:none}.k-form-buttons[data-theme=changes]{background:#de935f}.k-form-buttons[data-theme=lock]{background:#d16464}.k-form-buttons[data-theme=unlock]{background:#81a2be}.k-form-buttons .k-view{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.k-form-button,.k-form-buttons .k-view{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.k-form-button{font-weight:500;white-space:nowrap;line-height:1;height:2.5rem;padding:0 1rem}.k-form-button:first-child{margin-left:-1rem}.k-form-button:last-child{margin-right:-1rem}.k-form-lock-info{display:-webkit-box;display:-ms-flexbox;display:flex;font-size:.875rem;-webkit-box-align:center;-ms-flex-align:center;align-items:center;line-height:1.5em;padding:.625rem 0;margin-right:3rem}.k-form-lock-info>.k-icon{margin-right:.5rem}.k-form-lock-buttons{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-negative:0;flex-shrink:0}.k-form-indicator-icon{color:#de935f}.k-form-indicator-info{font-size:.875rem;font-weight:600;padding:.75rem 1rem .25rem;line-height:1.25em;width:15rem}.k-field-label{font-weight:600;display:block;padding:0 0 .75rem;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;line-height:1.25rem}.k-field-label abbr{text-decoration:none;color:#999;padding-left:.25rem}.k-field-header{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:baseline;-ms-flex-align:baseline;align-items:baseline}.k-field-options{position:absolute;top:calc(-.5rem - 1px)}[dir=ltr] .k-field-options{right:0}[dir=rtl] .k-field-options{left:0}.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:-webkit-box;display:-ms-flexbox;display:flex}.k-field[data-disabled]{cursor:not-allowed}.k-field[data-disabled] *{pointer-events: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:auto}.k-input{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;line-height:1;border:0;outline:0;background:none}.k-input-element{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.k-input-icon{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;line-height:0}.k-input[data-disabled]{pointer-events:none}.k-input[data-theme=field]{line-height:1;border:1px solid #ccc;background:#fff}.k-input[data-theme=field]:focus-within{border:1px solid #4271ae;-webkit-box-shadow:rgba(66,113,174,.25) 0 0 0 2px;box-shadow:0 0 0 2px rgba(66,113,174,.25)}.k-input[data-theme=field][data-disabled]{background:#efefef}.k-input[data-theme=field][data-invalid]{border:1px solid rgba(200,40,41,.25);-webkit-box-shadow:rgba(200,40,41,.25) 0 0 3px 2px;box-shadow:0 0 3px 2px rgba(200,40,41,.25)}.k-input[data-theme=field][data-invalid]:focus-within{border:1px solid #c82829;-webkit-box-shadow:rgba(200,40,41,.25) 0 0 0 2px;box-shadow:0 0 0 2px rgba(200,40,41,.25)}.k-input[data-theme=field] .k-input-icon{width:2.25rem}.k-input[data-theme=field] .k-input-after,.k-input[data-theme=field] .k-input-before,.k-input[data-theme=field] .k-input-icon{-ms-flex-item-align:stretch;align-self:stretch;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-negative:0;flex-shrink:0}.k-input[data-theme=field] .k-input-after,.k-input[data-theme=field] .k-input-before{padding:0 .5rem}.k-input[data-theme=field] .k-input-before{color:#777;padding-right:0}.k-input[data-theme=field] .k-input-after{color:#777;padding-left:0}.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:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-ms-flex-negative:0;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:.5rem;line-height:1.25rem}.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:.5rem}[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:.5rem}.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:#4271ae;font-weight:600}.k-input[data-theme=field] .k-time-input .k-time-input-meridiem{padding-left:.5rem}.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}.k-input[data-theme=field][data-type=checkboxes] .k-input-before{border-right:1px solid #efefef}.k-input[data-theme=field][data-type=checkboxes] .k-input-element+.k-input-after,.k-input[data-theme=field][data-type=checkboxes] .k-input-element+.k-input-icon{border-left:1px solid #efefef}.k-input[data-theme=field][data-type=checkboxes] .k-input-element{overflow:hidden}.k-input[data-theme=field][data-type=checkboxes] .k-checkboxes-input{display:grid;grid-template-columns:1fr;margin-bottom:-1px;margin-right:-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)}}.k-input[data-theme=field][data-type=checkboxes] .k-checkboxes-input li{border-right:1px solid #efefef;border-bottom:1px solid #efefef}.k-input[data-theme=field][data-type=checkboxes] .k-checkboxes-input label{display:block;line-height:1.25rem;padding:.5rem .5rem}.k-input[data-theme=field][data-type=checkboxes] .k-checkbox-input-icon{top:.625rem;left:.5rem;margin-top:0}.k-input[data-theme=field][data-type=radio] .k-input-before{border-right:1px solid #efefef}.k-input[data-theme=field][data-type=radio] .k-input-element+.k-input-after,.k-input[data-theme=field][data-type=radio] .k-input-element+.k-input-icon{border-left:1px solid #efefef}.k-input[data-theme=field][data-type=radio] .k-input-element{overflow:hidden}.k-input[data-theme=field][data-type=radio] .k-radio-input{display:grid;grid-template-columns:1fr;margin-bottom:-1px;margin-right:-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)}}.k-input[data-theme=field][data-type=radio] .k-radio-input li{border-right:1px solid #efefef;border-bottom:1px solid #efefef}.k-input[data-theme=field][data-type=radio] .k-radio-input label{display:block;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;min-height:2.25rem;line-height:1.25rem;padding:.5rem .5rem}.k-input[data-theme=field][data-type=radio] .k-radio-input label:before{top:.625rem;left:.5rem;margin-top:-1px}.k-input[data-theme=field][data-type=radio] .k-radio-input .k-radio-input-info{display:block;font-size:.875rem;color:#777;line-height:1.25rem;padding-top:.125rem}.k-input[data-theme=field][data-type=radio] .k-radio-input .k-icon{width:2.25rem;height:2.25rem;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.k-input[data-theme=field][data-type=range] .k-range-input{padding:.5rem}.k-input[data-theme=field][data-type=select]{position:relative}.k-input[data-theme=field][data-type=select] .k-input-icon{position:absolute;top:0;bottom:0}[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=tags] .k-tags-input{padding:.25rem .25rem 0 .25rem}.k-input[data-theme=field][data-type=tags] .k-tag{margin-right:.25rem;margin-bottom:.25rem;height:1.75rem;font-size:.875rem}.k-input[data-theme=field][data-type=tags] .k-tags-input input{font-size:.875rem;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=multiselect]{position:relative}.k-input[data-theme=field][data-type=multiselect] .k-multiselect-input{padding:.25rem 2rem 0 .25rem;min-height:2.25rem}.k-input[data-theme=field][data-type=multiselect] .k-tag{margin-right:.25rem;margin-bottom:.25rem;height:1.75rem;font-size:.875rem}.k-input[data-theme=field][data-type=multiselect] .k-input-icon{position:absolute;top:0;right:0;bottom:0;pointer-events:none}.k-input[data-theme=field][data-type=textarea] .k-textarea-input-native{padding:.25rem .5rem;line-height:1.5rem}.k-input[data-theme=field][data-type=toggle] .k-input-before{padding-right:.25rem}.k-input[data-theme=field][data-type=toggle] .k-toggle-input{padding-left:.5rem}.k-input[data-theme=field][data-type=toggle] .k-toggle-input-label{padding:0 .5rem 0 .75rem;line-height:2.25rem}.k-upload input{position:absolute;top:0}[dir=ltr] .k-upload input{left:-3000px}[dir=rtl] .k-upload input{right:-3000px}.k-upload .k-headline{margin-bottom:.75rem}.k-upload-error-list,.k-upload-list{line-height:1.5em;font-size:.875rem}.k-upload-list-filename{color:#777}.k-upload-error-list li{padding:.75rem;background:#fff;border-radius:1px}.k-upload-error-list li:not(:last-child){margin-bottom:2px}.k-upload-error-filename{color:#c82829;font-weight:600}.k-upload-error-message{color:#777}.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}.k-checkbox-input-label{display:block;padding-left:1.75rem}.k-checkbox-input-icon{position:absolute;left:0;width:1rem;height:1rem;border:2px solid #999}.k-checkbox-input-icon svg{position:absolute;width:12px;height:12px;display:none}.k-checkbox-input-icon path{stroke:#fff}.k-checkbox-input-native:checked+.k-checkbox-input-icon{border-color:#16171a;background:#16171a}.k-checkbox-input-native:checked+.k-checkbox-input-icon svg{display:block}.k-checkbox-input-native:focus+.k-checkbox-input-icon{border-color:#4271ae}.k-checkbox-input-native:focus:checked+.k-checkbox-input-icon{background:#4271ae}.k-date-input{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.k-date-input-separator{padding:0 .125rem}.k-datetime-input{display:-webkit-box;display:-ms-flexbox;display:flex}.k-datetime-input .k-time-input{padding-left:.5rem}.k-text-input{width:100%;border:0;background:none;font:inherit;color:inherit}.k-text-input::-webkit-input-placeholder{color:#999}.k-text-input::-moz-placeholder{color:#999}.k-text-input:-ms-input-placeholder{color:#999}.k-text-input::-ms-input-placeholder{color:#999}.k-text-input::placeholder{color:#999}.k-text-input:focus{outline:0}.k-text-input:invalid{-webkit-box-shadow:none;box-shadow:none;outline:0}.k-multiselect-input{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;position:relative;font-size:.875rem;min-height:2.25rem;line-height:1}.k-multiselect-input .k-sortable-ghost{background:#4271ae}.k-multiselect-input .k-dropdown-content{width:100%}.k-multiselect-search{margin-top:0!important;color:#fff;background:#16171a;border-bottom:1px dashed hsla(0,0%,100%,.2)}.k-multiselect-search>.k-button-text{-webkit-box-flex:1;-ms-flex:1;flex:1}.k-multiselect-search input{width:100%;color:#fff;background:none;border:none;outline:none;padding:.25rem 0;font:inherit}.k-multiselect-options{position:relative;max-height:240px;overflow-y:scroll;padding:.5rem 0}.k-multiselect-option{position:relative}.k-multiselect-option.selected{color:#a7bd68}.k-multiselect-option.disabled:not(.selected) .k-icon{opacity:0}.k-multiselect-option b{color:#81a2be;font-weight:700}.k-multiselect-value{color:#999;margin-left:.25rem}.k-multiselect-value:before{content:" ("}.k-multiselect-value:after{content:")"}.k-multiselect-input[data-layout=list] .k-tag{width:100%;margin-right:0!important}.k-number-input{width:100%;border:0;background:none;font:inherit;color:inherit}.k-number-input::-webkit-input-placeholder{color:$color-light-grey}.k-number-input::-moz-placeholder{color:$color-light-grey}.k-number-input:-ms-input-placeholder{color:$color-light-grey}.k-number-input::-ms-input-placeholder{color:$color-light-grey}.k-number-input::placeholder{color:$color-light-grey}.k-number-input:focus{outline:0}.k-number-input:invalid{-webkit-box-shadow:none;box-shadow:none;outline:0}.k-radio-input li{position:relative;line-height:1.5rem;padding-left:1.75rem}.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;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.k-radio-input label:before{position:absolute;top:.175em;left:0;content:"";width:1rem;height:1rem;border-radius:50%;border:2px solid #999;-webkit-box-shadow:#fff 0 0 0 2px inset;box-shadow:inset 0 0 0 2px #fff}.k-radio-input input:checked+label:before{border-color:#16171a;background:#16171a}.k-radio-input input:focus+label:before{border-color:#4271ae}.k-radio-input input:focus:checked+label:before{background:#4271ae}.k-radio-input-text{display:block}.k-range-input{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;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(8px + var(--ratio)*(100% - 16px));-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;height:16px;background:transparent;font-size:.875rem;line-height:1}.k-range-input-native::-webkit-slider-thumb{-webkit-appearance:none;appearance:none}.k-range-input-native::-webkit-slider-runnable-track{border:none;border-radius:4px;width:100%;height:4px;background:#ccc;background:-webkit-gradient(linear,left top,left bottom,from(#16171a),to(#16171a)) 0/var(--position) 100% no-repeat #ccc;background:linear-gradient(#16171a,#16171a) 0/var(--position) 100% no-repeat #ccc}.k-range-input-native::-moz-range-track{border:none;border-radius:4px;width:100%;height:4px;background:#ccc}.k-range-input-native::-ms-track{border:none;border-radius:4px;width:100%;height:4px;background:#ccc}.k-range-input-native::-moz-range-progress{height:4px;background:#16171a}.k-range-input-native::-ms-fill-lower{height:4px;background:#16171a}.k-range-input-native::-webkit-slider-thumb{margin-top:-6px;-webkit-box-sizing:border-box;box-sizing:border-box;width:16px;height:16px;background:#efefef;border:4px solid #16171a;border-radius:50%;cursor:pointer}.k-range-input-native::-moz-range-thumb{box-sizing:border-box;width:16px;height:16px;background:#efefef;border:4px solid #16171a;border-radius:50%;cursor:pointer}.k-range-input-native::-ms-thumb{margin-top:0;box-sizing:border-box;width:16px;height:16px;background:#efefef;border:4px solid #16171a;border-radius:50%;cursor:pointer}.k-range-input-native::-ms-tooltip{display:none}.k-range-input-native:focus{outline:none}.k-range-input-native:focus::-webkit-slider-runnable-track{border:none;border-radius:4px;width:100%;height:4px;background:#ccc;background:-webkit-gradient(linear,left top,left bottom,from(#4271ae),to(#4271ae)) 0/var(--position) 100% no-repeat #ccc;background:linear-gradient(#4271ae,#4271ae) 0/var(--position) 100% no-repeat #ccc}.k-range-input-native:focus::-moz-range-progress{height:4px;background:#4271ae}.k-range-input-native:focus::-ms-fill-lower{height:4px;background:#4271ae}.k-range-input-native:focus::-webkit-slider-thumb{background:#efefef;border:4px solid #4271ae}.k-range-input-native:focus::-moz-range-thumb{background:#efefef;border:4px solid #4271ae}.k-range-input-native:focus::-ms-thumb{background:#efefef;border:4px solid #4271ae}.k-range-input-tooltip{position:relative;max-width:20%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:#fff;font-size:.75rem;line-height:1;text-align:center;border-radius:1px;background:#16171a;margin-left:1rem;padding:0 .25rem;white-space:nowrap}.k-range-input-tooltip:after{position:absolute;top:50%;left:-5px;width:0;height:0;-webkit-transform:translateY(-50%);transform:translateY(-50%);border-top:5px solid transparent;border-right:5px solid #16171a;border-bottom:5px solid transparent;content:""}.k-range-input-tooltip>*{padding:4px}.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}.k-select-input-native[disabled]{cursor:default}.k-tags-input{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.k-tags-input .k-sortable-ghost{background:#4271ae}.k-tags-input-element{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;min-width:0}.k-tags-input:focus-within .k-tags-input-element{-ms-flex-preferred-size:4rem;flex-basis:4rem}.k-tags-input-element input{font:inherit;border:0;width:100%;background:none}.k-tags-input-element input:focus{outline:0}.k-tags-input[data-layout=list] .k-tag{width:100%;margin-right:0!important}.k-textarea-input-wrapper{position:relative}.k-textarea-input-native{resize:none;border:0;width:100%;background:none;font:inherit;line-height:1.5em;color:inherit}.k-textarea-input-native::-webkit-input-placeholder{color:#999}.k-textarea-input-native::-moz-placeholder{color:#999}.k-textarea-input-native:-ms-input-placeholder{color:#999}.k-textarea-input-native::-ms-input-placeholder{color:#999}.k-textarea-input-native::placeholder{color:#999}.k-textarea-input-native:focus{outline:0}.k-textarea-input-native:invalid{-webkit-box-shadow:none;box-shadow:none;outline:0}.k-textarea-input-native[data-size=small]{min-height:7.5rem}.k-textarea-input-native[data-size=medium]{min-height:15rem}.k-textarea-input-native[data-size=large]{min-height:30rem}.k-textarea-input-native[data-size=huge]{min-height:45rem}.k-textarea-input-native[data-font=monospace]{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace}.k-toolbar{margin-bottom:.25rem;color:#aaa}.k-textarea-input:focus-within .k-toolbar{position:-webkit-sticky;position:sticky;top:0;right:0;left:0;z-index:1;-webkit-box-shadow:rgba(0,0,0,.05) 0 2px 5px;box-shadow:0 2px 5px rgba(0,0,0,.05);border-bottom:1px solid rgba(0,0,0,.1);color:#000}.k-time-input{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-webkit-box-align:center;-ms-flex-align:center;align-items:center;line-height:1}.k-time-input-separator{padding:0 .125rem}.k-time-input-meridiem{padding-left:.5rem}.k-toggle-input{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.k-toggle-input-native{position:relative;height:16px;width:32px;border-radius:16px;border:2px solid #999;-webkit-box-shadow:inset 0 0 0 2px #fff,inset -16px 0 0 2px #fff;box-shadow:inset 0 0 0 2px #fff,inset -16px 0 0 2px #fff;background-color:#999;outline:0;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;-ms-flex-negative:0;flex-shrink:0}.k-toggle-input-native:checked{border-color:#16171a;-webkit-box-shadow:inset 0 0 0 2px #fff,inset 16px 0 0 2px #fff;box-shadow:inset 0 0 0 2px #fff,inset 16px 0 0 2px #fff;background-color:#16171a}.k-toggle-input-native[disabled]{border-color:#ccc;-webkit-box-shadow:inset 0 0 0 2px #efefef,inset 16px 0 0 2px #efefef;box-shadow:inset 0 0 0 2px #efefef,inset 16px 0 0 2px #efefef;background-color:#ccc}.k-toggle-input-native:focus:checked{border:2px solid #4271ae;background-color:#4271ae}.k-toggle-input-native::-ms-check{opacity:0}.k-toggle-input-label{cursor:pointer;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.k-files-field[data-disabled] *{pointer-events:all!important}body{counter-reset:headline-counter}.k-headline-field{position:relative;padding-top:1.5rem}.k-headline-field[data-numbered]:before{counter-increment:headline-counter;content:counter(headline-counter,decimal-leading-zero);color:#4271ae;font-weight:400;padding-right:.25rem}.k-fieldset>.k-grid .k-column:first-child .k-headline-field{padding-top:0}.k-info-field .k-headline{padding-bottom:.75rem;line-height:1.25rem}.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:#ccc}.k-pages-field[data-disabled] *{pointer-events:all!important}.k-structure-table{table-layout:fixed;width:100%;background:#fff;font-size:.875rem;border-spacing:0;-webkit-box-shadow:rgba(22,23,26,.05) 0 2px 5px;box-shadow:0 2px 5px rgba(22,23,26,.05)}.k-structure-table td,.k-structure-table th{border-bottom:1px solid #efefef;line-height:1.25em;overflow:hidden;text-overflow:ellipsis}[dir=ltr] .k-structure-table td,[dir=ltr] .k-structure-table th{border-right:1px solid #efefef}[dir=rtl] .k-structure-table td,[dir=rtl] .k-structure-table th{border-left:1px solid #efefef}.k-structure-table th{font-weight:400;color:#777;padding:0 .75rem;height:38px}[dir=ltr] .k-structure-table th{text-align:left}[dir=rtl] .k-structure-table th{text-align:right}.k-structure-table td:last-child,.k-structure-table th:last-child{width:38px}[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 tr:last-child td{border-bottom:0}.k-structure-table tbody tr:hover td{background:hsla(0,0%,93.7%,.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 .k-structure-table-column[data-align=center]{text-align:center}[dir=ltr] .k-structure-table .k-structure-table-column[data-align=right]{text-align:right}[dir=rtl] .k-structure-table .k-structure-table-column[data-align=right]{text-align:left}.k-structure-table .k-structure-table-column[data-width="1/2"]{width:50%}.k-structure-table .k-structure-table-column[data-width="1/3"]{width:33.33%}.k-structure-table .k-structure-table-column[data-width="1/4"]{width:25%}.k-structure-table .k-structure-table-column[data-width="1/5"]{width:20%}.k-structure-table .k-structure-table-column[data-width="1/6"]{width:16.66%}.k-structure-table .k-structure-table-column[data-width="1/8"]{width:12.5%}.k-structure-table .k-structure-table-column[data-width="1/9"]{width:11.11%}.k-structure-table .k-structure-table-column[data-width="2/3"]{width:66.66%}.k-structure-table .k-structure-table-column[data-width="3/4"]{width:75%}.k-structure-table .k-structure-table-index{width:38px;text-align:center}.k-structure-table .k-structure-table-index-number{font-size:.75rem;color:#999;padding-top:.15rem}.k-structure-table .k-sort-handle{width:38px;height:38px;display:none}.k-structure-table[data-sortable] tr:hover .k-structure-table-index-number{display:none}.k-structure-table[data-sortable] tr:hover .k-sort-handle{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important}.k-structure-table .k-structure-table-option{width:38px;text-align:center}.k-structure-table .k-structure-table-option .k-button{width:38px;height:38px}.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:#fff;-webkit-box-shadow:rgba(22,23,26,.25) 0 5px 10px;box-shadow:0 5px 10px rgba(22,23,26,.25);outline:2px solid #4271ae;margin-bottom:2px;cursor:-webkit-grabbing}.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:1px;margin-bottom:1px;-webkit-box-shadow:rgba(22,23,26,.05) 0 0 0 3px;box-shadow:0 0 0 3px rgba(22,23,26,.05);border:1px solid #ccc;background:#efefef}.k-structure-form-fields{padding:1.5rem 1.5rem 2rem}.k-structure-form-buttons{border-top:1px solid #ccc;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;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:-webkit-box;display:-ms-flexbox;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:-webkit-box;display:-ms-flexbox;display:flex}.k-field-counter{display:none}.k-text-field:focus-within .k-field-counter{display:block}.k-users-field[data-disabled] *{pointer-events:all!important}.k-toolbar{background:#fff;border-bottom:1px solid #efefef;height:38px}.k-toolbar-wrapper{position:absolute;top:0;right:0;left:0;max-width:100%}.k-toolbar-buttons{display:-webkit-box;display:-ms-flexbox;display:flex}.k-toolbar-divider{width:1px;background:#efefef}.k-toolbar-button{width:36px;height:36px}.k-toolbar-button:hover{background:hsla(0,0%,93.7%,.5)}.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-url-field-preview{padding:0 .75rem}.k-url-field-preview a{color:#4271ae;text-decoration:underline;-webkit-transition:color .3s;transition:color .3s;overflow:hidden;white-space:nowrap;max-width:100%;text-overflow:ellipsis}.k-url-field-preview a:hover{color:#000}.k-pages-field-preview{padding:0 .25rem 0 .75rem;display:-webkit-box;display:-ms-flexbox;display:flex}.k-pages-field-preview li{line-height:0;margin-right:.5rem}.k-pages-field-preview .k-link{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;background:#efefef;-webkit-box-shadow:rgba(22,23,26,.05) 0 2px 5px;box-shadow:0 2px 5px rgba(22,23,26,.05)}.k-pages-field-preview-image{width:1.525rem;height:1.525rem;color:#999!important}.k-pages-field-preview figcaption{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;line-height:1.5em;padding:0 .5rem;border:1px solid #ccc;border-left:0;border-radius:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.k-users-field-preview{padding:0 .25rem 0 .75rem;display:-webkit-box;display:-ms-flexbox;display:flex}.k-users-field-preview li{line-height:0;margin-right:.5rem}.k-users-field-preview .k-link{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;background:#efefef;-webkit-box-shadow:rgba(22,23,26,.05) 0 2px 5px;box-shadow:0 2px 5px rgba(22,23,26,.05)}.k-users-field-preview-avatar{width:1.525rem;height:1.525rem;color:#999!important}.k-users-field-preview-avatar.k-image{display:block}.k-users-field-preview figcaption{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;line-height:1.5em;padding:0 .5rem;border:1px solid #ccc;border-left:0;border-radius:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.k-bar{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;line-height:1}.k-bar-slot{-webkit-box-flex:1;-ms-flex-positive:1;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{background:#d9d9d9;border-radius:1px;padding:.375rem .75rem;line-height:1.25rem;border-left:2px solid #999;padding:.5rem 1.5rem;word-wrap:break-word;font-size:.875rem}.k-box[data-theme=code]{background:#16171a;border:1px solid #000;color:#efefef;font-family:Input,Menlo,monospace;font-size:.875rem;line-height:1.5}.k-box[data-theme=button]{padding:0}.k-box[data-theme=button] .k-button{padding:0 .75rem;height:2.25rem;width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;line-height:2rem;text-align:left}.k-box[data-theme=positive]{background:#dbe4c1;border:0;border-left:2px solid #a7bd68;padding:.5rem 1.5rem}.k-box[data-theme=negative]{background:#eec6c6;border:0;border-left:2px solid #d16464;padding:.5rem 1.5rem}.k-box[data-theme=notice]{background:#f4dac9;border:0;border-left:2px solid #de935f;padding:.5rem 1.5rem}.k-box[data-theme=info]{background:#d5e0e9;border:0;border-left:2px solid #81a2be;padding:.5rem 1.5rem}.k-box[data-theme=empty]{text-align:center;border-left:0;padding:3rem 1.5rem;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;background:#efefef;border-radius:1px;color:#777;border:1px dashed #ccc}.k-box[data-theme=empty] .k-icon{margin-bottom:.5rem;color:#999}.k-box[data-theme=empty] p{color:#777}.k-card{position:relative;border-radius:1px;-webkit-box-shadow:rgba(22,23,26,.05) 0 2px 5px;box-shadow:0 2px 5px rgba(22,23,26,.05)}.k-card,.k-card a{min-width:0;background:#fff}.k-card:focus-within{-webkit-box-shadow:#4271ae 0 0 0 2px;box-shadow:0 0 0 2px #4271ae}.k-card a:focus{outline:0}.k-card .k-sort-handle{position:absolute;top:.75rem;width:2rem;height:2rem;border-radius:1px;background:#fff;opacity:0;color:#16171a;z-index:1;will-change:opacity;-webkit-transition:opacity .3s;transition:opacity .3s}[dir=ltr] .k-card .k-sort-handle{right:.75rem}[dir=rtl] .k-card .k-sort-handle{left:.75rem}.k-cards:hover .k-sort-handle{opacity:.25}.k-card:hover .k-sort-handle{opacity:1}.k-card.k-sortable-ghost{outline:2px solid #4271ae;border-radius:0}.k-card-icon,.k-card-image{border-top-left-radius:1px;border-top-right-radius:1px;overflow:hidden}.k-card-icon{position:relative;display:block}.k-card-icon .k-icon{position:absolute;top:0;right:0;bottom:0;left:0}.k-card-icon .k-icon-emoji{font-size:3rem}.k-card-icon .k-icon svg{width:3rem;height:3rem}.k-card-content{line-height:1.25rem;border-bottom-left-radius:1px;border-bottom-right-radius:1px;min-height:2.25rem;padding:.5rem .75rem;overflow-wrap:break-word;word-wrap:break-word}.k-card-text{display:block;font-weight:400;text-overflow:ellipsis;font-size:.875rem}.k-card-text[data-noinfo]:after{content:" ";height:1em;width:5rem;display:inline-block}.k-card-info{color:#777;display:block;font-size:.875rem;text-overflow:ellipsis;overflow:hidden}[dir=ltr] .k-card-info{margin-right:4rem}[dir=rtl] .k-card-info{margin-left:4rem}.k-card-options{position:absolute;bottom:0}[dir=ltr] .k-card-options{right:0}[dir=rtl] .k-card-options{left:0}.k-card-options>.k-button{position:relative;float:left;height:2.25rem;padding:0 .75rem;line-height:1}.k-card-options-dropdown{top:2.25rem}.k-cards{display:grid;grid-gap:1.5rem;grid-template-columns:repeat(auto-fit,minmax(12rem,1fr))}@media screen and (min-width:30em){.k-cards[data-size=tiny]{grid-template-columns:repeat(auto-fill,minmax(12rem,1fr))}.k-cards[data-size=small]{grid-template-columns:repeat(auto-fill,minmax(16rem,1fr))}.k-cards[data-size=medium]{grid-template-columns:repeat(auto-fill,minmax(24rem,1fr))}.k-cards[data-size=huge],.k-cards[data-size=large]{grid-template-columns:1fr}}@media screen and (min-width:65em){.k-cards[data-size=large]{grid-template-columns:repeat(auto-fill,minmax(32rem,1fr))}}.k-collection-help{padding:.5rem .75rem}.k-collection-footer{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin-right:-.75rem;margin-left:-.75rem}.k-collection-pagination{line-height:1.25rem;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}@media screen and (min-width:65em){.k-column[data-width="1/1"],.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="1/2"],.k-column[data-width="2/4"],.k-column[data-width="3/6"]{grid-column-start:span 6}.k-column[data-width="1/3"],.k-column[data-width="2/6"]{grid-column-start:span 4}.k-column[data-width="2/3"],.k-column[data-width="4/6"]{grid-column-start:span 8}.k-column[data-width="1/4"]{grid-column-start:span 3}.k-column[data-width="1/6"]{grid-column-start:span 2}.k-column[data-width="5/6"]{grid-column-start:span 10}.k-column[data-width="3/4"]{grid-column-start:span 9}}.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]:after{display:block;outline:1px solid #4271ae;-webkit-box-shadow:rgba(66,113,174,.25) 0 0 0 3px;box-shadow:0 0 0 3px rgba(66,113,174,.25)}.k-empty{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-radius:1px;color:#777;border:1px dashed #ccc}.k-empty p{font-size:.875rem;color:#777}.k-empty>.k-icon{color:#999}.k-empty[data-layout=cards]{text-align:center;padding:1.5rem;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.k-empty[data-layout=cards] .k-icon{margin-bottom:1rem}.k-empty[data-layout=cards] .k-icon svg{width:2rem;height:2rem}.k-empty[data-layout=list]{height:38px}.k-empty[data-layout=list]>.k-icon{width:36px;height:36px;border-right:1px solid rgba(0,0,0,.05)}.k-empty[data-layout=list]>p{line-height:1.25rem;padding:.5rem .75rem}.k-file-preview{background:#2d2f36}.k-file-preview-layout{display:grid}@media screen and (max-width:65em){.k-file-preview-layout{padding:0!important}}@media screen and (min-width:30em){.k-file-preview-layout{grid-template-columns:50% auto}}@media screen and (min-width:65em){.k-file-preview-layout{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}}.k-file-preview-layout>*{min-width:0}.k-file-preview-image{position:relative;background:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXR0ZXJuIGlkPSJhIiB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiPjxwYXRoIGZpbGw9InJnYmEoMCwgMCwgMCwgMC4yKSIgZD0iTTAgMGgxMHYxMEgwem0xMCAxMGgxMHYxMEgxMHoiLz48L3BhdHRlcm4+PHJlY3QgZmlsbD0idXJsKCNhKSIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIvPjwvc3ZnPg==")}@media screen and (min-width:65em){.k-file-preview-image{width:33.33%}}@media screen and (min-width:90em){.k-file-preview-image{width:25%}}.k-file-preview-image .k-image span{overflow:hidden;padding-bottom:66.66%}@media screen and (min-width:30em) and (max-width:65em){.k-file-preview-image .k-image span{position:absolute;top:0;left:0;bottom:0;right:0;padding-bottom:0!important}}@media screen and (min-width:65em){.k-file-preview-image .k-image span{padding-bottom:100%}}.k-file-preview-placeholder{display:block;padding-bottom:100%}.k-file-preview-image img{padding:3rem}.k-file-preview-image-link{display:block;outline:0}.k-file-preview-image-link[data-tabbed]{outline:2px solid #4271ae!important;outline-offset:-2px}.k-file-preview-icon{position:relative;display:block;padding-bottom:100%;overflow:hidden;color:hsla(0,0%,100%,.5)}.k-file-preview-icon svg{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%) scale(4);transform:translate(-50%,-50%) scale(4)}.k-file-preview-details{padding:1.5rem;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}@media screen and (min-width:65em){.k-file-preview-details{padding:3rem}}.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))}@media screen and (min-width:30em){.k-file-preview-details ul{grid-template-columns:repeat(auto-fill,minmax(200px,1fr))}}.k-file-preview-details h3{font-size:.875rem;font-weight:500;color:#999}.k-file-preview-details p{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:hsla(0,0%,100%,.75);font-size:.875rem}.k-file-preview-details p a{display:block;width:100%;overflow:hidden;text-overflow:ellipsis}.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{border-bottom:1px solid #ccc;margin-bottom:2rem;padding-top:4vh}.k-header .k-headline{min-height:1.25em;margin-bottom:.5rem}.k-header .k-header-buttons{margin-top:-.5rem;height:3.25rem}.k-header .k-headline-editable{cursor:pointer}.k-header .k-headline-editable .k-icon{color:#999;opacity:0;-webkit-transition:opacity .3s;transition:opacity .3s;display:inline-block}[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:hover .k-icon{opacity:1}.k-header-tabs{position:relative;background:#e9e9e9;border-top:1px solid #ccc;border-left:1px solid #ccc;border-right:1px solid #ccc}.k-header-tabs nav{display:-webkit-box;display:-ms-flexbox;display:flex;margin-left:-1px;margin-right:-1px}.k-header-tabs nav,.k-tab-button.k-button{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.k-tab-button.k-button{position:relative;z-index:1;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:.625rem 0;font-size:.75rem;text-transform:uppercase;font-weight:500;border-left:1px solid transparent;border-right:1px solid #ccc;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}@media screen and (min-width:30em){.k-tab-button.k-button{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}}@media screen and (min-width:65em){.k-tab-button.k-button{max-width:13rem}}@media screen and (min-width:30em){.k-tab-button.k-button .k-icon{margin-right:.5rem}}.k-tab-button.k-button>.k-button-text{padding-top:.375rem;font-size:10px;overflow:hidden;text-overflow:ellipsis}[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}@media screen and (min-width:30em){.k-tab-button.k-button>.k-button-text{font-size:.75rem;padding-top:0}}.k-tab-button:last-child{border-right:1px solid transparent}.k-tab-button[aria-current]{position:relative;background:#efefef;border-right:1px solid #ccc;pointer-events:none}.k-tab-button[aria-current]:first-child{border-left:1px solid #ccc}.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;height:2px;top:-1px;background:#16171a}.k-tab-button[aria-current]:after{left:0;right:0;height:1px;bottom:-1px;background:#efefef}.k-tabs-dropdown{top:100%;right:0}.k-list .k-list-item:not(:last-child){margin-bottom:2px}.k-list-item{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background:#fff;border-radius:1px;-webkit-box-shadow:rgba(22,23,26,.05) 0 2px 5px;box-shadow:0 2px 5px rgba(22,23,26,.05)}.k-list-item .k-sort-handle{position:absolute;left:-1.5rem;width:1.5rem;height:38px;opacity:0}.k-list:hover .k-sort-handle{opacity:.25}.k-list-item:hover .k-sort-handle{opacity:1}.k-list-item.k-sortable-ghost{position:relative;outline:2px solid #4271ae;z-index:1;-webkit-box-shadow:rgba(22,23,26,.25) 0 5px 10px;box-shadow:0 5px 10px rgba(22,23,26,.25)}.k-list-item.k-sortable-fallback{opacity:.25!important;overflow:hidden}.k-list-item-image{width:38px;height:38px;overflow:hidden;-ms-flex-negative:0;flex-shrink:0;line-height:0}.k-list-item-image .k-image{width:38px;height:38px;-o-object-fit:contain;object-fit:contain}.k-list-item-image .k-icon{width:38px;height:38px}.k-list-item-image .k-icon svg{opacity:.5}.k-list-item-content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:1;flex-shrink:1;overflow:hidden;outline:none}.k-list-item-content[data-tabbed]{outline:none;-webkit-box-shadow:#4271ae 0 0 0 2px,rgba(66,113,174,.2) 0 0 0 2px;box-shadow:0 0 0 2px #4271ae,0 0 0 2px rgba(66,113,174,.2)}.k-list-item-text{display:-webkit-box;display:-ms-flexbox;display:flex;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;-webkit-box-align:baseline;-ms-flex-align:baseline;align-items:baseline;width:100%;line-height:1.25rem;padding:.5rem .75rem}.k-list-item-text em{font-style:normal;margin-right:1rem;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;font-size:.875rem;color:#16171a}.k-list-item-text em,.k-list-item-text small{min-width:0;overflow:hidden;text-overflow:ellipsis}.k-list-item-text small{color:#999;font-size:.75rem;color:#777;display:none}@media screen and (min-width:30em){.k-list-item-text small{display:block}}.k-list-item-options{position:relative;-ms-flex-negative:0;flex-shrink:0}.k-list-item-options .k-dropdown-content{top:38px}.k-list-item-options>.k-button{height:38px;padding:0 12px}.k-list-item-options>.k-button>.k-button-icon{height:38px}.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:calc(100vh - 6rem);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;padding:0 3rem;overflow:auto}.k-view[data-align=center]>*{-ms-flex-preferred-size:22.5rem;flex-basis:22.5rem}.k-headline{font-size:1rem;font-weight:600;line-height:1.5em}.k-headline[data-size=small]{font-size:.875rem}.k-headline[data-size=large]{font-size:1.25rem;font-weight:400}@media screen and (min-width:65em){.k-headline[data-size=large]{font-size:1.5rem}}.k-headline[data-size=huge]{font-size:1.5rem;line-height:1.15em}@media screen and (min-width:65em){.k-headline[data-size=huge]{font-size:1.75rem}}.k-headline[data-theme=negative]{color:#c82829}.k-headline[data-theme=positive]{color:#5d800d}.k-headline abbr{color:#999;padding-left:.25rem;text-decoration:none}.k-icon{position:relative;line-height:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-ms-flex-negative:0;flex-shrink:0}.k-icon svg{width:1rem;height:1rem;-moz-transform:scale(1)}.k-icon svg *{fill:currentColor}.k-icon[data-back=black]{background:#16171a;color:#fff}.k-icon[data-back=white]{background:#fff;color:#16171a}.k-icon[data-back=pattern]{background:#2d2f36 url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXR0ZXJuIGlkPSJhIiB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiPjxwYXRoIGZpbGw9InJnYmEoMCwgMCwgMCwgMC4yKSIgZD0iTTAgMGgxMHYxMEgwem0xMCAxMGgxMHYxMEgxMHoiLz48L3BhdHRlcm4+PHJlY3QgZmlsbD0idXJsKCNhKSIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIvPjwvc3ZnPg==");color:#fff}.k-icon[data-size=medium] svg{width:2rem;height:2rem}.k-icon[data-size=large] svg{width:3rem;height:3rem}.k-icon-emoji{display:block;line-height:1;font-style:normal;font-size:1rem}@media not all,only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min-resolution:2dppx),only screen and (min-resolution:192dpi){.k-icon-emoji{font-size:1.25rem;margin-left:.2rem}}.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}.k-image-error{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);color:#fff;font-size:.9em}.k-image-error svg *{fill:hsla(0,0%,100%,.3)}.k-image[data-cover] img{-o-object-fit:cover;object-fit:cover}.k-image[data-back=black] span{background:#16171a}.k-image[data-back=white] span{background:#fff;color:#16171a}.k-image[data-back=white] .k-image-error{background:#16171a;color:#fff}.k-image[data-back=pattern] span{background:#2d2f36 url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXR0ZXJuIGlkPSJhIiB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiPjxwYXRoIGZpbGw9InJnYmEoMCwgMCwgMCwgMC4yKSIgZD0iTTAgMGgxMHYxMEgwem0xMCAxMGgxMHYxMEgxMHoiLz48L3BhdHRlcm4+PHJlY3QgZmlsbD0idXJsKCNhKSIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIvPjwvc3ZnPg==")}.k-progress{-webkit-appearance:none;width:100%;height:.5rem;border-radius:5rem}.k-progress::-webkit-progress-bar{border:none;background:#ccc;height:.5rem;border-radius:20px}.k-progress::-webkit-progress-value{border-radius:20px;background:#4271ae;-webkit-transition:width .3s;transition:width .3s}.k-sort-handle{cursor:-webkit-grab;color:#16171a;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;line-height:0;width:2rem;height:2rem;display:-webkit-box;display:-ms-flexbox;display:flex;will-change:opacity,color;-webkit-transition:opacity .3s;transition:opacity .3s;z-index:1}.k-sort-handle svg{width:1rem}.k-sort-handle:active{cursor:-webkit-grabbing}.k-text{line-height:1.5em}.k-text p{margin-bottom:1.5em}.k-text a{text-decoration:underline}.k-text>:last-child{margin-bottom:0}.k-text[data-align=center]{text-align:center}.k-text[data-align=right]{text-align:right}.k-text[data-size=tiny]{font-size:.75rem}.k-text[data-size=small]{font-size:.875rem}.k-text[data-size=medium]{font-size:1rem}.k-text[data-size=large]{font-size:1.25rem}.k-text[data-theme=help]{font-size:.875rem;color:#777;line-height:1.25rem}button{line-height:inherit;border:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;font-size:1rem;color:currentColor;background:none;cursor:pointer}button::-moz-focus-inner{padding:0;border:0}.k-button[data-disabled],.k-button[disabled]{pointer-events:none;opacity:.5}.k-button{display:inline-block;position:relative;font-size:.875rem;-webkit-transition:color .3s;transition:color .3s}.k-button,.k-button:focus,.k-button:hover{outline:none}.k-button[data-tabbed]{outline:none;-webkit-box-shadow:#4271ae 0 0 0 2px,rgba(66,113,174,.2) 0 0 0 2px;box-shadow:0 0 0 2px #4271ae,0 0 0 2px rgba(66,113,174,.2)}.k-button *{vertical-align:middle}.k-button[data-responsive] .k-button-text{display:none}@media screen and (min-width:30em){.k-button[data-responsive] .k-button-text{display:inline}}.k-button[data-theme=positive]{color:#5d800d}.k-button[data-theme=negative]{color:#c82829}.k-button-icon{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;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-group{font-size:0;margin-left:-.75rem;margin-right:-.75rem}.k-button-group>.k-dropdown{height:3rem;display:inline-block}.k-button-group>.k-button,.k-button-group>.k-dropdown>.k-button{padding:1rem .75rem;line-height:1rem}.k-button-group .k-dropdown-content{top:calc(100% + 1px);margin:0 .75rem}.k-dropdown{position:relative}.k-dropdown-content{position:absolute;top:100%;background:#16171a;color:#fff;z-index:700;-webkit-box-shadow:rgba(22,23,26,.2) 0 2px 10px;box-shadow:0 2px 10px rgba(22,23,26,.2);border-radius:1px;text-align:left}[dir=ltr] .k-dropdown-content{left:0}[dir=rtl] .k-dropdown-content{right:0}[dir=ltr] .k-dropdown-content[data-align=right]{left:auto;right:0}[dir=rtl] .k-dropdown-content[data-align=right]{left:0;right:auto}.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 hr{position:relative;padding:.5rem 0;border:0}.k-dropdown-content hr:after{position:absolute;top:.5rem;left:1rem;right:1rem;content:"";height:1px;background:currentColor;opacity:.2}.k-dropdown-item{white-space:nowrap;line-height:1;display:-webkit-box;display:-ms-flexbox;display:flex;width:100%;-webkit-box-align:center;-ms-flex-align:center;align-items:center;font-size:.875rem;padding:6px 16px}.k-dropdown-item:focus{outline:none;-webkit-box-shadow:#4271ae 0 0 0 2px,rgba(66,113,174,.2) 0 0 0 2px;box-shadow:0 0 0 2px #4271ae,0 0 0 2px rgba(66,113,174,.2)}.k-dropdown-item .k-button-figure{text-align:center;padding-right:.5rem}.k-pagination{-webkit-user-select:none;-moz-user-select:none;-ms-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:.875rem}.k-pagination[data-align=center]{text-align:center}.k-pagination[data-align=right]{text-align:right}.k-dropdown-content.k-pagination-selector{position:absolute;top:100%;left:50%;width:14rem;margin-left:-7rem;background:#000}[dir=ltr] .k-dropdown-content.k-pagination-selector{direction:ltr}[dir=rtl] .k-dropdown-content.k-pagination-selector{direction:rtl}.k-pagination-selector>div{font-size:.875rem;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.k-pagination-selector .k-button{padding:.75rem 1rem;line-height:1}.k-pagination-selector>div>label{padding:.75rem 1rem}.k-pagination-selector>div>input{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;font:inherit;border:0;padding:.75rem 1rem;color:#fff;background:none;text-align:center;border-left:1px solid hsla(0,0%,100%,.2);border-right:1px solid hsla(0,0%,100%,.2)}.k-pagination-selector>div>input:focus{outline:0}.k-prev-next{direction:ltr}.k-search{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000;overflow:auto;background:rgba(22,23,26,.6)}.k-search-box{max-width:30rem;margin:0 auto;-webkit-box-shadow:rgba(22,23,26,.2) 0 2px 10px;box-shadow:0 2px 10px rgba(22,23,26,.2)}@media screen and (min-width:65em){.k-search-box{margin:2.5rem auto}}.k-search-input{background:#efefef}.k-search-input,.k-search-types{display:-webkit-box;display:-ms-flexbox;display:flex}.k-search-types{-ms-flex-negative:0;flex-shrink:0}.k-search-types>.k-button{padding:0 0 0 .7rem;font-size:1rem;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:none;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;font:inherit;padding:.75rem;border:0;height:2.5rem}.k-search-close{width:2.5rem;line-height:1}.k-search input:focus{outline:0}.k-search ul{background:#fff}.k-search li{border-bottom:1px solid #efefef;line-height:1.125;display:-webkit-box;display:-ms-flexbox;display:flex}.k-search li .k-link{display:block;padding:.5rem .75rem;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.k-search li strong{display:block;font-size:.875rem;font-weight:400}.k-search li small{font-size:.75rem;color:#777}.k-search li[data-selected]{outline:2px solid #4271ae;background:rgba(66,113,174,.25);border-bottom:1px solid transparent}.k-search-empty{padding:.825rem .75rem;font-size:.75rem;background:#efefef;border-top:1px dashed #ccc;color:#777}.k-tag{position:relative;font-size:.875rem;line-height:1;cursor:pointer;background-color:#16171a;color:#efefef;border-radius:1px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.k-tag:focus{outline:0;background-color:#4271ae;border-color:#4271ae;color:#fff}.k-tag-text{padding:0 .75rem}.k-tag-toggle{color:hsla(0,0%,100%,.7);width:2rem;height:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;border-left:1px solid hsla(0,0%,100%,.15)}.k-tag-toggle:hover{background:hsla(0,0%,100%,.2);color:#fff}.k-topbar{position:relative;color:#fff;-ms-flex-negative:0;flex-shrink:0;height:2.5rem;line-height:1;background:#16171a}.k-topbar-wrapper{position:relative;margin-left:-.75rem;margin-right:-.75rem}.k-topbar-loader,.k-topbar-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.k-topbar-loader{position:absolute;top:0;right:0;bottom:0;height:2.5rem;width:2.5rem;padding:.75rem;background:#16171a;z-index:1;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.k-topbar-loader svg{height:18px;width:18px;-webkit-animation:Spin .9s linear infinite;animation:Spin .9s linear infinite}.k-topbar-menu{-ms-flex-negative:0;flex-shrink:0}.k-topbar-menu ul{padding:.5rem 0}.k-topbar-menu-button{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.k-topbar-menu-button .k-button-text{opacity:1}.k-topbar-button,.k-topbar-signals-button{padding:.75rem;line-height:1;font-size:.875rem}.k-topbar-signals .k-button .k-button-text{opacity:1}.k-topbar-button .k-button-text{display:-webkit-box;display:-ms-flexbox;display:flex;opacity:1}.k-topbar-view-button{-ms-flex-negative:0;flex-shrink:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;outline:none}.k-topbar-view-button[data-tabbed]{outline:none;-webkit-box-shadow:#4271ae 0 0 0 2px,rgba(66,113,174,.2) 0 0 0 2px;box-shadow:0 0 0 2px #4271ae,0 0 0 2px rgba(66,113,174,.2)}[dir=ltr] .k-topbar-view-button{padding-right:0}[dir=rtl] .k-topbar-view-button{padding-left:0}[dir=ltr] .k-topbar-view-button .k-icon{margin-right:.5rem}[dir=rtl] .k-topbar-view-button .k-icon{margin-left:.5rem}.k-topbar-crumbs{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;display:-webkit-box;display:-ms-flexbox;display:flex}.k-topbar-crumbs a{position:relative;font-size:.875rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:none;padding-top:.75rem;padding-bottom:.75rem;line-height:1;-webkit-transition:opacity .3s;transition:opacity .3s;outline:none}.k-topbar-crumbs a:before{content:"/";padding:0 .5rem;opacity:.25}.k-topbar-crumbs a:focus,.k-topbar-crumbs a:hover{opacity:1}.k-topbar-crumbs a[data-tabbed]{outline:none;-webkit-box-shadow:#4271ae 0 0 0 2px,rgba(66,113,174,.2) 0 0 0 2px;box-shadow:0 0 0 2px #4271ae,0 0 0 2px rgba(66,113,174,.2)}.k-topbar-crumbs a:not(:last-child){max-width:15vw}.k-topbar-breadcrumb-menu{-ms-flex-negative:0;flex-shrink:0}@media screen and (min-width:30em){.k-topbar-crumbs a{display:block}.k-topbar-breadcrumb-menu{display:none}}.k-topbar-signals{position:absolute;top:0;background:#16171a;height:2.5rem;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}[dir=ltr] .k-topbar-signals{right:0}[dir=rtl] .k-topbar-signals{left:0}.k-topbar-signals:before{position:absolute;content:"";top:0;bottom:0;width:.5rem}[dir=ltr] .k-topbar-signals:before{left:-.5rem;background:-webkit-linear-gradient(left,rgba(22,23,26,0),#16171a)}[dir=rtl] .k-topbar-signals:before{right:-.5rem;background:-webkit-linear-gradient(right,rgba(22,23,26,0),#16171a)}.k-topbar-signals .k-button{line-height:1}.k-topbar-notification{font-weight:600;line-height:1;display:-webkit-box;display:-ms-flexbox;display:flex}.k-topbar .k-button[data-theme=positive]{color:#a7bd68}.k-topbar .k-button[data-theme=negative]{color:#d16464}.k-topbar .k-button[data-theme=negative] .k-button-text{display:none}@media screen and (min-width:30em){.k-topbar .k-button[data-theme=negative] .k-button-text{display:inline}}.k-topbar .k-button[data-theme] .k-button-text{opacity:1}.k-topbar .k-dropdown-content{color:#16171a;background:#fff}.k-topbar .k-dropdown-content hr:after{opacity:.1}.k-topbar-menu [aria-current] .k-link{color:#4271ae;font-weight:500}.k-registration{display:inline-block;margin-right:1rem;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.k-registration p{color:#d16464;font-size:.875rem;margin-right:1rem;font-weight:600;display:none}@media screen and (min-width:90em){.k-registration p{display:block}}.k-registration .k-button{color:#fff}.k-section,.k-sections{padding-bottom:3rem}.k-section-header{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:baseline;-ms-flex-align:baseline;align-items:baseline;z-index:1}.k-section-header .k-headline{line-height:1.25rem;padding-bottom:.75rem;min-height:2rem}.k-section-header .k-button-group{position:absolute;top:-.875rem}[dir=ltr] .k-section-header .k-button-group{right:0}[dir=rtl] .k-section-header .k-button-group{left:0}.k-fields-issue-headline,.k-info-section-headline{margin-bottom:.5rem}.k-fields-section input[type=submit]{display:none}[data-locked] .k-fields-section{opacity:.2;pointer-events:none}.k-browser-view .k-error-view-content{text-align:left}.k-error-view{position:absolute;top:0;right:0;bottom:0;left:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.k-error-view-content{line-height:1.5em;max-width:25rem;text-align:center}.k-error-view-icon{color:#c82829;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:.875rem}.k-installation-issues li{position:relative;padding:1.5rem;background:#fff}[dir=ltr] .k-installation-issues li{padding-left:3.5rem}[dir=rtl] .k-installation-issues li{padding-right:3.5rem}.k-installation-issues .k-icon{position:absolute;top:calc(1.5rem + 2px)}[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 svg *{fill:#c82829}.k-installation-issues li:not(:last-child){margin-bottom:2px}.k-installation-issues li code{font:inherit;color:#c82829}.k-installation-view .k-button[type=submit]{padding:1rem}[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-login-form[data-invalid]{-webkit-animation:shake .5s linear;animation:shake .5s linear}.k-login-form[data-invalid] .k-field label{-webkit-animation:nope 2s linear;animation:nope 2s linear}.k-login-form label abbr{visibility:hidden}.k-login-buttons{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:1.5rem 0}.k-login-button{padding:.5rem 1rem;font-weight:500;-webkit-transition:opacity .3s;transition:opacity .3s}[dir=ltr] .k-login-button{margin-right:-1rem}[dir=rtl] .k-login-button{margin-left:-1rem}.k-login-button span{opacity:1}.k-login-button[disabled]{opacity:.25}.k-login-checkbox{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:.5rem 0;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;font-size:.875rem;cursor:pointer}.k-login-checkbox .k-checkbox-text{opacity:.75;-webkit-transition:opacity .3s;transition:opacity .3s}.k-login-checkbox:focus span,.k-login-checkbox:hover span{opacity:1}@-webkit-keyframes nope{0%{color:#c82829}to{color:#16171a}}@keyframes nope{0%{color:#c82829}to{color:#16171a}}@-webkit-keyframes shake{8%,41%{-webkit-transform:translateX(-10px);transform:translateX(-10px)}25%,58%{-webkit-transform:translateX(10px);transform:translateX(10px)}75%{-webkit-transform:translateX(-5px);transform:translateX(-5px)}92%{-webkit-transform:translateX(5px);transform:translateX(5px)}0%,to{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes shake{8%,41%{-webkit-transform:translateX(-10px);transform:translateX(-10px)}25%,58%{-webkit-transform:translateX(10px);transform:translateX(10px)}75%{-webkit-transform:translateX(-5px);transform:translateX(-5px)}92%{-webkit-transform:translateX(5px);transform:translateX(5px)}0%,to{-webkit-transform:translateX(0);transform:translateX(0)}}.k-status-flag svg{width:14px;height:14px}.k-status-flag-listed .k-icon{color:#a7bd68}.k-status-flag-unlisted .k-icon{color:#81a2be}.k-status-flag-draft .k-icon{color:#d16464}.k-status-flag[disabled]{opacity:1}.k-settings-view section{margin-bottom:3rem}.k-settings-view .k-header{margin-bottom:1.5rem}.k-settings-view header{margin-bottom:.5rem;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.k-settings-view header,.k-system-info-box{display:-webkit-box;display:-ms-flexbox;display:flex}.k-system-info-box{background:#fff;padding:.75rem}.k-system-info-box li{-ms-flex-negative:0;flex-shrink:0;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0}.k-system-info-box dt{font-size:.875rem;color:#777;margin-bottom:.25rem}.k-system-unregistered{color:#c82829}.k-languages-section{margin-bottom:2rem}.k-user-profile{background:#fff}.k-user-profile>.k-view{padding-top:3rem;padding-bottom:3rem;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;line-height:0}.k-user-profile .k-button-group{overflow:hidden}[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 .k-button{display:block;padding-top:.25rem;padding-bottom:.25rem;overflow:hidden;white-space:nowrap}.k-user-profile .k-button-group .k-button[disabled]{opacity:1}.k-user-profile .k-dropdown-content{margin-top:.5rem;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.k-user-view-image .k-image{display:block;width:4rem;height:4rem;line-height:0}.k-user-view-image .k-button-text{opacity:1}.k-user-view-image .k-icon{width:4rem;height:4rem;background:#16171a;color:#999}.k-user-name-placeholder{color:#999;-webkit-transition:color .3s;transition:color .3s}.k-header[data-editable] .k-user-name-placeholder:hover{color:#16171a} \ No newline at end of file diff --git a/kirby/panel/dist/img/icons.svg b/kirby/panel/dist/img/icons.svg index 90d217d..4ec6dbd 100755 --- a/kirby/panel/dist/img/icons.svg +++ b/kirby/panel/dist/img/icons.svg @@ -251,6 +251,9 @@ + + + @@ -400,5 +403,9 @@ + + + + diff --git a/kirby/panel/dist/js/app.js b/kirby/panel/dist/js/app.js index 44485f3..3d29f5e 100755 --- a/kirby/panel/dist/js/app.js +++ b/kirby/panel/dist/js/app.js @@ -1 +1 @@ -(function(t){function e(e){for(var i,o,r=e[0],l=e[1],u=e[2],d=0,p=[];d=0&&this.selected--}}},f=p,h=(n("4cb2"),n("2877")),m=Object(h["a"])(f,a,o,!1,null,null,null),g=m.exports,v=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("license.register"),size:"medium"},on:{submit:t.submit}},[n("k-form",{attrs:{fields:t.fields,novalidate:!0},on:{submit:t.submit},model:{value:t.registration,callback:function(e){t.registration=e},expression:"registration"}})],1)},b=[],k={methods:{open:function(){this.$refs.dialog.open(),this.$emit("open")},close:function(){this.$refs.dialog.close(),this.$emit("close")},success:function(t){this.$refs.dialog.close(),t.route&&this.$router.push(t.route),t.message&&this.$store.dispatch("notification/success",t.message),t.event&&this.$events.$emit(t.event),this.$emit("success")}}},$={mixins:[k],data:function(){return{registration:{license:null,email:null}}},computed:{fields:function(){return{license:{label:this.$t("license.register.label"),type:"text",required:!0,counter:!1,placeholder:"K3-",help:this.$t("license.register.help")},email:{label:this.$t("email"),type:"email",required:!0,counter:!1}}}},methods:{submit:function(){var t=this;this.$api.system.register(this.registration).then(function(){t.$store.dispatch("system/register",t.registration.license),t.success({message:t.$t("license.register.success")})}).catch(function(e){t.$refs.dialog.error(e.message)})}}},_=$,y=Object(h["a"])(_,v,b,!1,null,null,null),x=y.exports,w={name:"App",components:{"k-registration":x,"k-search":g},data:function(){return{offline:!1,dragging:!1,debug:d.debug}},computed:{inside:function(){return!(this.$route.meta.outside||!this.$store.state.user.current)}},created:function(){this.$events.$on("offline",this.isOffline),this.$events.$on("online",this.isOnline),this.$events.$on("keydown.cmd.shift.f",this.search),this.$events.$on("drop",this.drop)},destroyed:function(){this.$events.$off("offline",this.isOffline),this.$events.$off("online",this.isOnline),this.$events.$off("keydown.cmd.shift.f",this.search),this.$events.$off("drop",this.drop)},methods:{drop:function(){this.$store.dispatch("drag",null)},isOnline:function(){this.offline=!1},isOffline:function(){!1===this.$store.state.system.info.isLocal&&(this.offline=!0)},search:function(t){t.preventDefault(),this.$store.dispatch("search",!0)}}},O=w,S=(n("5c0b"),Object(h["a"])(O,i,s,!1,null,null,null)),C=S.exports,E={inserted:function(t){t.addEventListener("keyup",function(e){9===e.keyCode&&(t.dataset.tabbed=!0)}),t.addEventListener("blur",function(){delete t.dataset.tabbed})}},T={install:function(t){t.directive("tab",E)}},j={install:function(t){t.filter("t",function(t){return t})}};n("6762"),n("2fdb");function I(t){var e=String(t);return e.charAt(0).toLowerCase()+e.substr(1)}var L,q,N={install:function(t){t.prototype.$events=new t({data:function(){return{entered:null}},created:function(){window.addEventListener("online",this.online),window.addEventListener("offline",this.offline),window.addEventListener("dragenter",this.dragenter,!1),window.addEventListener("dragover",this.prevent,!1),window.addEventListener("dragexit",this.prevent,!1),window.addEventListener("dragleave",this.dragleave,!1),window.addEventListener("drop",this.drop,!1),window.addEventListener("keydown",this.keydown,!1),window.addEventListener("keyup",this.keyup,!1),document.addEventListener("click",this.click,!1)},destroyed:function(){window.removeEventListener("online",this.online),window.removeEventListener("offline",this.offline),window.removeEventListener("dragenter",this.dragenter,!1),window.removeEventListener("dragover",this.prevent,!1),window.removeEventListener("dragexit",this.prevent,!1),window.removeEventListener("dragleave",this.dragleave,!1),window.removeEventListener("drop",this.drop,!1),window.removeEventListener("keydown",this.keydown,!1),window.removeEventListener("keyup",this.keyup,!1),document.removeEventListener("click",this.click,!1)},methods:{click:function(t){this.$emit("click",t)},drop:function(t){this.prevent(t),this.$emit("drop",t)},dragenter:function(t){this.entered=t.target,this.prevent(t),this.$emit("dragenter",t)},dragleave:function(t){this.prevent(t),this.entered===t.target&&this.$emit("dragleave",t)},keydown:function(t){var e=["keydown"];(t.metaKey||t.ctrlKey)&&e.push("cmd"),!0===t.altKey&&e.push("alt"),!0===t.shiftKey&&e.push("shift");var n=I(t.key),i={escape:"esc",arrowUp:"up",arrowDown:"down",arrowLeft:"left",arrowRight:"right"};i[n]&&(n=i[n]),!1===["alt","control","shift","meta"].includes(n)&&e.push(n),this.$emit(e.join("."),t),this.$emit("keydown",t)},keyup:function(t){this.$emit("keyup",t)},online:function(t){this.$emit("online",t)},offline:function(t){this.$emit("offline",t)},prevent:function(t){t.stopPropagation(),t.preventDefault()}}})}},A=n("a026"),B=n("1dce"),P=n.n(B),D=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.isOpen?n("div",{staticClass:"k-dialog",on:{click:t.cancel}},[n("div",{staticClass:"k-dialog-box",attrs:{"data-size":t.size},on:{click: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"},[t._t("default")],2),n("footer",{staticClass:"k-dialog-footer"},[t._t("footer",[n("k-button-group",[n("k-button",{staticClass:"k-dialog-button-cancel",attrs:{icon:"cancel"},on:{click:t.cancel}},[t._v("\n "+t._s(t.$t("cancel"))+"\n ")]),n("k-button",{staticClass:"k-dialog-button-submit",attrs:{icon:t.icon,theme:t.theme},on:{click:t.submit}},[t._v("\n "+t._s(t.button||t.$t("confirm"))+"\n ")])],1)])],2)])]):t._e()},M=[],R={props:{button:{type:String,default:"Ok"},icon:{type:String,default:"check"},size:String,theme:String,visible:Boolean},data:function(){return{notification:null,isOpen:this.visible,scrollTop:0}},created:function(){this.$events.$on("keydown.esc",this.close,!1)},destroyed:function(){this.$events.$off("keydown.esc",this.close,!1)},mounted:function(){!0===this.isOpen&&this.$emit("open")},methods:{storeScrollPosition:function(){var t=document.querySelector(".k-panel-view");t&&t.scrollTop?this.scrollTop=t.scrollTop:this.scrollTop=0},restoreScrollPosition:function(){var t=document.querySelector(".k-panel-view");t&&t.scrollTop&&(t.scrollTop=this.scrollTop)},open:function(){var t=this;this.storeScrollPosition(),this.$store.dispatch("dialog",!0),this.notification=null,this.isOpen=!0,this.$emit("open"),this.$events.$on("keydown.esc",this.close),this.$nextTick(function(){t.$el&&(t.focus(),document.body.addEventListener("focus",function(e){!1===t.$el.contains(e.target)&&t.focus()},!0))})},close:function(){this.notification=null,this.isOpen=!1,this.$emit("close"),this.$events.$off("keydown.esc",this.close),this.$store.dispatch("dialog",null),this.restoreScrollPosition()},cancel:function(){this.$emit("cancel"),this.close()},focus:function(){if(this.$el&&this.$el.querySelector){var t=this.$el.querySelector("[autofocus], [data-autofocus], input, textarea, select, .k-dialog-button-submit");if(t||(t=this.$el.querySelector(".k-dialog-button-cancel")),t)return void t.focus()}},error:function(t){this.notification={message:t,type:"error"}},submit:function(){this.$emit("submit")},success:function(t){this.notification={message:t,type:"success"}}}},z=R,F=(n("a5f3"),Object(h["a"])(z,D,M,!1,null,null,null)),U=F.exports,H=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.error?n("k-dialog",{ref:"dialog",staticClass:"k-error-dialog",attrs:{visible:!0},on:{close:t.exit,open:t.enter}},[n("k-text",[t._v(t._s(t.error.message))]),t.error.details&&Object.keys(t.error.details).length?n("dl",{staticClass:"k-error-details"},[t._l(t.error.details,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("\n "+t._s(e)+"\n ")])}),0)]:[t._v("\n "+t._s(e.message)+"\n ")]],2)]})],2):t._e(),n("k-button-group",{attrs:{slot:"footer"},slot:"footer"},[n("k-button",{attrs:{icon:"check"},on:{click:t.close}},[t._v("\n "+t._s(t.$t("confirm"))+"\n ")])],1)],1):t._e()},K=[],V={mixins:[k],computed:{error:function(){var t=this.$store.state.notification;return"error"===t.type?t:null}},methods:{enter:function(){var t=this;this.$nextTick(function(){t.$el.querySelector(".k-dialog-footer .k-button").focus()})},exit:function(){this.$store.dispatch("notification/close")}}},Y=V,G=(n("7737"),Object(h["a"])(Y,H,K,!1,null,null,null)),W=G.exports,J=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("delete"),theme:"negative",icon:"trash"},on:{submit:t.submit}},[n("k-text",{domProps:{innerHTML:t._s(t.$t("file.delete.confirm",{filename:t.filename}))}})],1)},X=[],Z={mixins:[k],data:function(){return{id:null,parent:null,filename:null}},methods:{open:function(t,e){var n=this;this.$api.files.get(t,e).then(function(e){n.id=e.id,n.filename=e.filename,n.parent=t,n.$refs.dialog.open()}).catch(function(t){n.$store.dispatch("notification/error",t)})},submit:function(){var t=this;this.$api.files.delete(this.parent,this.filename).then(function(){t.$store.dispatch("form/remove","files/"+t.id),t.$store.dispatch("notification/success",":)"),t.$events.$emit("file.delete",t.id),t.$emit("success"),t.$refs.dialog.close()}).catch(function(e){t.$refs.dialog.error(e.message)})}}},Q=Z,tt=Object(h["a"])(Q,J,X,!1,null,null,null),et=tt.exports,nt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("rename"),size:"medium",theme:"positive"},on:{submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.submit,input:function(e){t.file.name=t.sluggify(t.file.name)}},model:{value:t.file,callback:function(e){t.file=e},expression:"file"}})],1)},it=[],st=n("b747"),at=n.n(st),ot=function(t){return at()(t,{remove:/[$*_+~.,;:()'"`!?§$%\/=#@]/g}).toLowerCase()},rt={mixins:[k],data:function(){return{parent:null,file:{id:null,name:null,filename:null,extension:null}}},computed:{fields:function(){return{name:{label:this.$t("name"),type:"text",required:!0,icon:"title",after:"."+this.file.extension,preselect:!0}}}},methods:{open:function(t,e){var n=this;this.$api.files.get(t,e,{select:["id","filename","name","extension"]}).then(function(e){n.file=e,n.parent=t,n.$refs.dialog.open()}).catch(function(t){n.$store.dispatch("notification/error",t)})},sluggify:function(t){return ot(t)},submit:function(){var t=this;this.$api.files.rename(this.parent,this.file.filename,this.file.name).then(function(e){t.$store.dispatch("form/revert","files/"+t.file.id),t.$store.dispatch("notification/success",":)"),t.$emit("success",e),t.$events.$emit("file.changeName",e),t.$refs.dialog.close()}).catch(function(e){t.$refs.dialog.error(e.message)})}}},lt=rt,ut=Object(h["a"])(lt,nt,it,!1,null,null,null),ct=ut.exports,dt=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.files.length?n("k-list",t._l(t.files,function(e,i){return n("k-list-item",{key:e.filename,attrs:{text:e.filename,image:e.image,icon:e.icon},on:{click:function(e){return t.toggle(i)}}},[e.selected?n("k-button",{attrs:{slot:"options",autofocus:!0,icon:t.checkedIcon,tooltip:t.$t("remove"),theme:"positive"},slot:"options"}):n("k-button",{attrs:{slot:"options",autofocus:!0,tooltip:t.$t("select"),icon:"circle-outline"},slot:"options"})],1)}),1):n("k-empty",{attrs:{icon:"image"}},[t._v("\n No files to select\n ")])]],2)},pt=[],ft={data:function(){return{files:[],issue:null,options:{max:null,multiple:!0,api:null,selected:[]}}},computed:{multiple:function(){return!0===this.options.multiple&&1!==this.options.max},checkedIcon:function(){return!0===this.multiple?"check":"circle-filled"}},methods:{selected:function(){return this.files.filter(function(t){return t.selected})},submit:function(){this.$emit("submit",this.selected()),this.$refs.dialog.close()},toggle:function(t){if(!1===this.multiple)this.files=this.files.map(function(t){return t.selected=!1,t}),this.files[t].selected=!0;else if(this.files[t].selected)this.files[t].selected=!1;else{if(this.options.max&&this.options.max<=this.selected().length)return;this.files[t].selected=!0}},open:function(t,e){this.files=t,this.options=e,this.$refs.dialog.open()}}},ht=ft,mt=(n("bf53"),Object(h["a"])(ht,dt,pt,!1,null,null,null)),gt=mt.exports,vt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("language.create"),notification:t.notification,theme:"positive",size:"medium"},on:{submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields,novalidate:!0},on:{submit:t.submit},model:{value:t.language,callback:function(e){t.language=e},expression:"language"}})],1)},bt=[],kt={mixins:[k],data:function(){return{notification:null,language:{name:"",code:"",direction:"ltr"}}},computed:{fields:function(){return{name:{label:this.$t("language.name"),type:"text",required:!0,icon:"title"},code:{label:this.$t("language.code"),type:"text",required:!0,counter:!1,icon:"globe",width:"1/2"},direction:{label:this.$t("language.direction"),type:"select",required:!0,empty:!1,options:[{value:"ltr",text:this.$t("language.direction.ltr")},{value:"rtl",text:this.$t("language.direction.rtl")}],width:"1/2"},locale:{label:this.$t("language.locale"),type:"text",placeholder:"en_US"}}}},watch:{"language.name":function(t){this.onNameChanges(t)},"language.code":function(t){this.language.code=ot(t)}},methods:{onNameChanges:function(t){this.language.code=ot(t).substr(0,2)},open:function(){this.language={name:"",code:"",direction:"ltr"},this.$refs.dialog.open()},submit:function(){var t=this;this.$api.post("languages",{name:this.language.name,code:this.language.code,direction:this.language.direction,locale:this.language.locale}).then(function(){t.$store.dispatch("languages/load"),t.success({message:":)",event:"language.create"})}).catch(function(e){t.$refs.dialog.error(e.message)})}}},$t=kt,_t=Object(h["a"])($t,vt,bt,!1,null,null,null),yt=_t.exports,xt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("delete"),theme:"negative",icon:"trash"},on:{submit:t.submit}},[n("k-text",{domProps:{innerHTML:t._s(t.$t("language.delete.confirm",{name:t.language.name}))}})],1)},wt=[],Ot={mixins:[k],data:function(){return{language:{name:null}}},methods:{open:function(t){var e=this;this.$api.get("languages/"+t).then(function(t){e.language=t,e.$refs.dialog.open()}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){var t=this;this.$api.delete("languages/"+this.language.code).then(function(){t.$store.dispatch("languages/load"),t.success({message:t.$t("language.deleted"),event:"language.delete"})}).catch(function(e){t.$refs.dialog.error(e.message)})}}},St=Ot,Ct=Object(h["a"])(St,xt,wt,!1,null,null,null),Et=Ct.exports,Tt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("save"),notification:t.notification,size:"medium"},on:{submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.language,callback:function(e){t.language=e},expression:"language"}})],1)},jt=[],It={mixins:[yt],computed:{fields:function(){var t=yt.computed.fields.apply(this);return t.code.disabled=!0,t}},methods:{onNameChanges:function(){return!1},open:function(t){var e=this;this.$api.get("languages/"+t).then(function(t){e.language=t,e.$refs.dialog.open()}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){var t=this;this.$api.patch("languages/"+this.language.code,{name:this.language.name,direction:this.language.direction,locale:this.language.locale}).then(function(){t.$store.dispatch("languages/load"),t.success({message:t.$t("language.updated"),event:"language.update"})}).catch(function(e){t.$refs.dialog.error(e.message)})}}},Lt=It,qt=Object(h["a"])(Lt,Tt,jt,!1,null,null,null),Nt=qt.exports,At=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("page.draft.create"),notification:t.notification,size:"medium",theme:"positive"},on:{submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields,novalidate:!0},on:{submit:t.submit},model:{value:t.page,callback:function(e){t.page=e},expression:"page"}})],1)},Bt=[],Pt={mixins:[k],data:function(){return{notification:null,parent:null,section:null,templates:[],page:{title:"",slug:"",template:null}}},computed:{fields:function(){return{title:{label:this.$t("title"),type:"text",required:!0,icon:"title"},slug:{label:this.$t("slug"),type:"text",required:!0,counter:!1,icon:"url"},template:{name:"template",label:this.$t("template"),type:"select",disabled:1===this.templates.length,required:!0,icon:"code",empty:!1,options:this.templates}}}},watch:{"page.title":function(t){this.page.slug=ot(t)}},methods:{open:function(t,e,n){var i=this;this.parent=t,this.section=n,this.$api.get(e,{section:n}).then(function(t){i.templates=t.map(function(t){return{value:t.name,text:t.title}}),i.templates[0]&&(i.page.template=i.templates[0].value),i.$refs.dialog.open()}).catch(function(t){i.$store.dispatch("notification/error",t)})},submit:function(){var t=this;if(0===this.page.title.length)return this.$refs.dialog.error("Please enter a title"),!1;var e={template:this.page.template,slug:this.page.slug,content:{title:this.page.title}};this.$api.post(this.parent+"/children",e).then(function(e){t.success({route:t.$api.pages.link(e.id),message:":)",event:"page.create"})}).catch(function(e){t.$refs.dialog.error(e.message)})}}},Dt=Pt,Mt=Object(h["a"])(Dt,At,Bt,!1,null,null,null),Rt=Mt.exports,zt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("delete"),size:t.hasSubpages?"medium":"small",theme:"negative",icon:"trash"},on:{submit:t.submit}},[t.page.hasChildren||t.page.hasDrafts?[n("k-text",{domProps:{innerHTML:t._s(t.$t("page.delete.confirm",{title:t.page.title}))}}),n("div",{staticClass:"k-page-remove-warning"},[n("k-box",{attrs:{theme:"negative"},domProps:{innerHTML:t._s(t.$t("page.delete.confirm.subpages"))}})],1),t.hasSubpages?n("k-form",{attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.model,callback:function(e){t.model=e},expression:"model"}}):t._e()]:[n("k-text",{domProps:{innerHTML:t._s(t.$t("page.delete.confirm",{title:t.page.title}))},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.submit(e)}}})]],2)},Ft=[],Ut=(n("a481"),{mixins:[k],data:function(){return{page:{title:null,hasChildren:!1,hasDrafts:!1},model:{check:null}}},computed:{hasSubpages:function(){return this.page.hasChildren||this.page.hasDrafts},fields:function(){return{check:{label:this.$t("page.delete.confirm.title"),type:"text",counter:!1}}}},methods:{open:function(t){var e=this;this.$api.pages.get(t,{select:"id, title, hasChildren, hasDrafts, parent"}).then(function(t){e.page=t,e.$refs.dialog.open()}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){var t=this;this.hasSubpages&&this.model.check!==this.page.title?this.$refs.dialog.error(this.$t("error.page.delete.confirm")):this.$api.pages.delete(this.page.id,{force:!0}).then(function(){t.$store.dispatch("form/remove","pages/"+t.page.id);var e={message:":)",event:"page.delete"};t.$route.params.path&&t.page.id===t.$route.params.path.replace(/\+/g,"/")&&(t.page.parent?e.route="/pages/"+t.page.parent.id:e.route="/pages"),t.success(e)}).catch(function(e){t.$refs.dialog.error(e.message)})}}}),Ht=Ut,Kt=(n("12fb"),Object(h["a"])(Ht,zt,Ft,!1,null,null,null)),Vt=Kt.exports,Yt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("rename"),size:"medium",theme:"positive"},on:{submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.page,callback:function(e){t.page=e},expression:"page"}})],1)},Gt=[],Wt={mixins:[k],data:function(){return{page:{id:null,title:null}}},computed:{fields:function(){return{title:{label:this.$t("title"),type:"text",required:!0,icon:"title",preselect:!0}}}},methods:{open:function(t){var e=this;this.$api.pages.get(t,{select:["id","title"]}).then(function(t){e.page=t,e.$refs.dialog.open()}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){var t=this;0!==this.page.title.length?this.$api.pages.title(this.page.id,this.page.title).then(function(){t.success({message:":)",event:"page.changeTitle"})}).catch(function(e){t.$refs.dialog.error(e.message)}):this.$refs.dialog.error(this.$t("error.page.changeTitle.empty"))}}},Jt=Wt,Xt=Object(h["a"])(Jt,Yt,Gt,!1,null,null,null),Zt=Xt.exports,Qt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("change"),size:"medium",theme:"positive"},on:{submit:t.submit}},[n("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.changeStatus},model:{value:t.form,callback:function(e){t.form=e},expression:"form"}})],1)},te=[],ee=(n("ac6a"),n("a4bb")),ne=n.n(ee),ie={mixins:[k],data:function(){return{page:{id:null},isBlocked:!1,isIncomplete:!1,form:{status:null,position:null},states:{}}},computed:{fields:function(){var t=this,e={status:{name:"status",label:this.$t("page.changeStatus.select"),type:"radio",required:!0,options:ne()(this.states).map(function(e){return{value:e,text:t.states[e].label,info:t.states[e].text}})}};return"listed"===this.form.status&&"default"===this.page.blueprint.num&&(e.position={name:"position",label:this.$t("page.changeStatus.position"),type:"select",empty:!1,options:this.sortingOptions()}),e}},methods:{sortingOptions:function(){var t=this,e=[],n=0;return this.page.siblings.forEach(function(i){if(i.id===t.page.id||i.num<1)return!1;n++,e.push({value:n,text:n}),e.push({value:i.id,text:i.title,disabled:!0})}),e.push({value:n+1,text:n+1}),e},open:function(t){var e=this;this.$api.pages.get(t,{select:["id","status","num","errors","siblings","blueprint"]}).then(function(t){return!1===t.blueprint.options.changeStatus?e.$store.dispatch("notification/error",{message:e.$t("error.page.changeStatus.permission")}):"draft"===t.status&&ne()(t.errors).length>0?e.$store.dispatch("notification/error",{message:e.$t("error.page.changeStatus.incomplete"),details:t.errors}):(e.states=t.blueprint.status,e.page=t,e.form.status=t.status,e.form.position=t.num||t.siblings.length+1,void e.$refs.dialog.open())}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){this.$refs.form.submit()},changeStatus:function(){var t=this;this.$api.pages.status(this.page.id,this.form.status,this.form.position||1).then(function(){t.success({message:":)",event:"page.changeStatus"})}).catch(function(e){t.$refs.dialog.error(e.message)})}}},se=ie,ae=Object(h["a"])(se,Qt,te,!1,null,null,null),oe=ae.exports,re=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("change"),size:"medium",theme:"positive"},on:{submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.page,callback:function(e){t.page=e},expression:"page"}})],1)},le=[],ue={mixins:[k],data:function(){return{blueprints:[],page:{id:null,template:null}}},computed:{fields:function(){return{template:{label:this.$t("template"),type:"select",required:!0,empty:!1,options:this.page.blueprints,icon:"template"}}}},methods:{open:function(t){var e=this;this.$api.pages.get(t,{select:["id","template","blueprints"]}).then(function(t){if(t.blueprints.length<=1)return e.$store.dispatch("notification/error",{message:e.$t("error.page.changeTemplate.invalid",{slug:t.id})});e.page=t,e.page.blueprints=e.page.blueprints.map(function(t){return{text:t.title,value:t.name}}),e.$refs.dialog.open()}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){var t=this;this.$events.$emit("keydown.cmd.s"),this.$api.pages.template(this.page.id,this.page.template).then(function(){t.success({message:":)",event:"page.changeTemplate"})}).catch(function(e){t.$refs.dialog.error(e.message)})}}},ce=ue,de=Object(h["a"])(ce,re,le,!1,null,null,null),pe=de.exports,fe=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("change"),size:"medium",theme:"positive"},on:{submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",on:{submit:t.submit}},[n("k-text-field",t._b({attrs:{value:t.slug},on:{input:function(e){return t.sluggify(e)}}},"k-text-field",t.field,!1),[n("k-button",{attrs:{slot:"options",icon:"wand","data-options":""},on:{click:function(e){return t.sluggify(t.page.title)}},slot:"options"},[t._v("\n "+t._s(t.$t("page.changeSlug.fromTitle"))+"\n ")])],1)],1)],1)},he=[],me={mixins:[k],data:function(){return{slug:null,url:null,page:{id:null,parent:null,title:null}}},computed:{field:function(){return{name:"slug",label:this.$t("slug"),type:"text",required:!0,icon:"url",help:"/"+this.url,counter:!1,preselect:!0}}},methods:{sluggify:function(t){this.slug=ot(t),this.page.parents?this.url=this.page.parents.map(function(t){return t.slug}).concat([this.slug]).join("/"):this.url=this.slug},open:function(t){var e=this;this.$api.pages.get(t,{view:"panel"}).then(function(t){e.page=t,e.sluggify(e.page.slug),e.$refs.dialog.open()}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){var t=this;if(this.slug===this.page.slug)return this.$refs.dialog.close(),void this.$store.dispatch("notification/success",":)");0!==this.slug.length?this.$api.pages.slug(this.page.id,this.slug).then(function(e){t.$store.dispatch("form/remove","pages/"+t.page.id);var n={message:":)",event:"page.changeSlug"};!t.$route.params.path||t.page.id!==t.$route.params.path.replace(/\+/g,"/")||t.$store.state.languages.current&&!0!==t.$store.state.languages.current.default||(n.route=t.$api.pages.link(e.id),delete n.event),t.success(n)}).catch(function(e){t.$refs.dialog.error(e.message)}):this.$refs.dialog.error(this.$t("error.page.slug.invalid"))}}},ge=me,ve=Object(h["a"])(ge,fe,he,!1,null,null,null),be=ve.exports,ke=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.pages.length?n("k-list",t._l(t.pages,function(e){return n("k-list-item",{key:e.id,attrs:{text:e.text,info:e.info,image:e.image,icon:e.icon},on:{click:function(n){return t.toggle(e)}}},[n("template",{slot:"options"},[t.isSelected(e)?n("k-button",{attrs:{slot:"options",autofocus:!0,icon:t.checkedIcon,tooltip:t.$t("remove"),theme:"positive"},slot:"options"}):n("k-button",{attrs:{slot:"options",autofocus:!0,tooltip:t.$t("select"),icon:"circle-outline"},slot:"options"}),t.model?n("k-button",{attrs:{disabled:!e.hasChildren,tooltip:t.$t("open"),icon:"angle-right"},on:{click:function(n){return n.stopPropagation(),t.go(e)}}}):t._e()],1)],2)}),1):n("k-empty",{attrs:{icon:"page"}},[t._v("\n No pages to select\n ")])]],2)},$e=[],_e={data:function(){return{model:{title:null,parent:null},pages:[],issue:null,options:{endpoint:null,max:null,multiple:!0,parent:null,selected:[]}}},computed:{multiple:function(){return!0===this.options.multiple&&1!==this.options.max},checkedIcon:function(){return!0===this.multiple?"check":"circle-filled"}},methods:{fetch:function(){var t=this;return this.$api.get(this.options.endpoint,{parent:this.options.parent}).then(function(e){t.model=e.model,t.pages=e.pages}).catch(function(e){t.pages=[],t.issue=e.message})},back:function(){this.options.parent=this.model.parent?this.model.parent.id:null,this.fetch()},submit:function(){this.$emit("submit",this.options.selected),this.$refs.dialog.close()},isSelected:function(t){return this.options.selected.map(function(t){return t.id}).includes(t.id)},toggle:function(t){if(!1===this.options.multiple&&(this.options.selected=[]),!1===this.isSelected(t)){if(this.options.max&&this.options.max<=this.options.selected.length)return;this.options.selected.push(t)}else this.options.selected=this.options.selected.filter(function(e){return e.id!==t.id})},open:function(t){var e=this;this.options=t,this.fetch().then(function(){e.$refs.dialog.open()})},go:function(t){this.options.parent=t.id,this.fetch()}}},ye=_e,xe=(n("ac27"),Object(h["a"])(ye,ke,$e,!1,null,null,null)),we=xe.exports,Oe={extends:Zt,methods:{open:function(){var t=this;this.$api.site.get({select:["title"]}).then(function(e){t.page=e,t.$refs.dialog.open()}).catch(function(e){t.$store.dispatch("notification/error",e)})},submit:function(){var t=this;this.$api.site.title(this.page.title).then(function(){t.$store.dispatch("system/title",t.page.title),t.success({message:":)",event:"site.changeTitle"})}).catch(function(e){t.$refs.dialog.error(e.message)})}}},Se=Oe,Ce=Object(h["a"])(Se,L,q,!1,null,null,null),Ee=Ce.exports,Te=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("create"),size:"medium",theme:"positive"},on:{submit:function(e){return t.$refs.form.submit()},close:t.reset}},[n("k-form",{ref:"form",attrs:{fields:t.fields,novalidate:!0},on:{submit:t.create},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}})],1)},je=[],Ie={mixins:[k],data:function(){return{user:this.emptyUser(),languages:[],roles:[]}},computed:{fields:function(){return{name:{label:this.$t("name"),type:"text",icon:"user"},email:{label:this.$t("email"),type:"email",icon:"email",link:!1,required:!0},password:{label:this.$t("password"),type:"password",icon:"key"},language:{label:this.$t("language"),type:"select",icon:"globe",options:this.languages,required:!0,empty:!1},role:{label:this.$t("role"),type:1===this.roles.length?"hidden":"radio",required:!0,options:this.roles}}}},methods:{create:function(){var t=this;this.$api.users.create(this.user).then(function(){t.success({message:":)",event:"user.create"})}).catch(function(e){t.$refs.dialog.error(e.message)})},emptyUser:function(){return{name:"",email:"",password:"",language:"en",role:"admin"}},open:function(){var t=this;this.$api.roles.options().then(function(e){t.roles=e,t.$api.translations.options().then(function(e){t.languages=e,t.$refs.dialog.open()}).catch(function(e){t.$store.dispatch("notification/error",e)})}).catch(function(e){t.$store.dispatch("notification/error",e)})},reset:function(){this.user=this.emptyUser()}}},Le=Ie,qe=Object(h["a"])(Le,Te,je,!1,null,null,null),Ne=qe.exports,Ae=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("change"),size:"medium",theme:"positive"},on:{submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}})],1)},Be=[],Pe={mixins:[k],data:function(){return{user:{id:null,email:null}}},computed:{fields:function(){return{email:{label:this.$t("email"),preselect:!0,required:!0,type:"email"}}}},methods:{open:function(t){var e=this;this.$api.users.get(t,{select:["id","email"]}).then(function(t){e.user=t,e.$refs.dialog.open()}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){var t=this;this.$api.users.changeEmail(this.user.id,this.user.email).then(function(e){t.$store.dispatch("form/revert","users/"+t.user.id);var n={message:":)",event:"user.changeEmail"};"User"===t.$route.name&&(n.route=t.$api.users.link(e.id)),t.success(n)}).catch(function(e){t.$refs.dialog.error(e.message)})}}},De=Pe,Me=Object(h["a"])(De,Ae,Be,!1,null,null,null),Re=Me.exports,ze=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("change"),theme:"positive",icon:"check"},on:{submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}})],1)},Fe=[],Ue={mixins:[k],data:function(){return{user:{language:"en"},languages:[]}},computed:{fields:function(){return{language:{label:this.$t("language"),type:"select",icon:"globe",options:this.languages,required:!0,empty:!1}}}},created:function(){var t=this;this.$api.translations.options().then(function(e){t.languages=e})},methods:{open:function(t){var e=this;this.$api.users.get(t,{view:"compact"}).then(function(t){e.user=t,e.$refs.dialog.open()}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){var t=this;this.$api.users.changeLanguage(this.user.id,this.user.language).then(function(e){t.user=e,t.$store.state.user.current.id===t.user.id&&t.$store.dispatch("user/language",t.user.language),t.success({message:":)",event:"user.changeLanguage"})}).catch(function(e){t.$refs.dialog.error(e.message)})}}},He=Ue,Ke=Object(h["a"])(He,ze,Fe,!1,null,null,null),Ve=Ke.exports,Ye=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("change"),theme:"positive",icon:"check"},on:{submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.values,callback:function(e){t.values=e},expression:"values"}})],1)},Ge=[],We={mixins:[k],data:function(){return{user:null,values:{password:null,passwordConfirmation:null}}},computed:{fields:function(){return{password:{label:this.$t("user.changePassword.new"),type:"password",icon:"key"},passwordConfirmation:{label:this.$t("user.changePassword.new.confirm"),icon:"key",type:"password"}}}},methods:{open:function(t){var e=this;this.$api.users.get(t).then(function(t){e.user=t,e.$refs.dialog.open()}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){var t=this;return this.values.password.length<8?(this.$refs.dialog.error(this.$t("error.user.password.invalid")),!1):this.values.password!==this.values.passwordConfirmation?(this.$refs.dialog.error(this.$t("error.user.password.notSame")),!1):void this.$api.users.changePassword(this.user.id,this.values.password).then(function(){t.success({message:":)",event:"user.changePassword"})}).catch(function(e){t.$refs.dialog.error(e.message)})}}},Je=We,Xe=Object(h["a"])(Je,Ye,Ge,!1,null,null,null),Ze=Xe.exports,Qe=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("delete"),theme:"negative",icon:"trash"},on:{submit:t.submit}},[n("k-text",{domProps:{innerHTML:t._s(t.$t("user.delete.confirm",{email:t.user.email}))}})],1)},tn=[],en={mixins:[k],data:function(){return{user:{email:null}}},methods:{open:function(t){var e=this;this.$api.users.get(t).then(function(t){e.user=t,e.$refs.dialog.open()}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){var t=this;this.$api.users.delete(this.user.id).then(function(){t.$store.dispatch("form/remove","users/"+t.user.id),t.success({message:":)",event:"user.delete"}),"User"===t.$route.name&&t.$router.push("/users")}).catch(function(e){t.$refs.dialog.error(e.message)})}}},nn=en,sn=Object(h["a"])(nn,Qe,tn,!1,null,null,null),an=sn.exports,on=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("rename"),size:"medium",theme:"positive"},on:{submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}})],1)},rn=[],ln={mixins:[k],data:function(){return{user:{id:null,name:null}}},computed:{fields:function(){return{name:{label:this.$t("name"),type:"text",icon:"user",preselect:!0}}}},methods:{open:function(t){var e=this;this.$api.users.get(t,{select:["id","name"]}).then(function(t){e.user=t,e.$refs.dialog.open()}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){var t=this;this.$api.users.changeName(this.user.id,this.user.name).then(function(){t.success({message:":)",event:"user.changeName"})}).catch(function(e){t.$refs.dialog.error(e.message)})}}},un=ln,cn=Object(h["a"])(un,on,rn,!1,null,null,null),dn=cn.exports,pn=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("user.changeRole"),size:"medium",theme:"positive"},on:{submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}})],1)},fn=[],hn={mixins:[k],data:function(){return{roles:[],user:{id:null,role:"visitor"}}},computed:{fields:function(){return{role:{label:this.$t("user.changeRole.select"),type:"radio",required:!0,options:this.roles}}}},methods:{open:function(t){var e=this;this.id=t,this.$api.users.get(t).then(function(t){e.$api.roles.options().then(function(n){e.roles=n,e.user=t,e.user.role=e.user.role.name,e.$refs.dialog.open()})}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){var t=this;this.$api.users.changeRole(this.user.id,this.user.role).then(function(){t.success({message:":)",event:"user.changeRole"})}).catch(function(e){t.$refs.dialog.error(e.message)})}}},mn=hn,gn=Object(h["a"])(mn,pn,fn,!1,null,null,null),vn=gn.exports,bn=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.users.length?n("k-list",t._l(t.users,function(e,i){return n("k-list-item",{key:e.email,attrs:{text:e.username,image:e.avatar?{url:e.avatar.url,back:"pattern",cover:!0}:null,icon:{type:"user",back:"black"}},on:{click:function(e){return t.toggle(i)}}},[e.selected?n("k-button",{attrs:{slot:"options",autofocus:!0,icon:t.checkedIcon,tooltip:t.$t("remove"),theme:"positive"},slot:"options"}):n("k-button",{attrs:{slot:"options",autofocus:!0,tooltip:t.$t("select"),icon:"circle-outline"},slot:"options"})],1)}),1):n("k-empty",{attrs:{icon:"users"}},[t._v("\n No users to select\n ")])]],2)},kn=[],$n={data:function(){return{users:[],issue:null,options:{max:null,multiple:!0,selected:[]}}},computed:{multiple:function(){return!0===this.options.multiple&&1!==this.options.max},checkedIcon:function(){return!0===this.multiple?"check":"circle-filled"}},methods:{fetch:function(){var t=this;return this.users=[],this.$api.get("users").then(function(e){var n=t.options.selected||[];t.users=e.data.map(function(t){return t.selected=-1!==n.indexOf(t.email),t})}).catch(function(e){t.users=[],t.issue=e.message})},selected:function(){return this.users.filter(function(t){return t.selected})},submit:function(){this.$emit("submit",this.selected()),this.$refs.dialog.close()},toggle:function(t){if(!1===this.options.multiple&&(this.users=this.users.map(function(t){return t.selected=!1,t})),this.users[t].selected)this.users[t].selected=!1;else{if(this.options.max&&this.options.max<=this.selected().length)return;this.users[t].selected=!0}},open:function(t){var e=this;this.options=t,this.fetch().then(function(){e.$refs.dialog.open()})}}},_n=$n,yn=(n("7568"),Object(h["a"])(_n,bn,kn,!1,null,null,null)),xn=yn.exports,wn=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:{click: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"])?null:"button"in e&&0!==e.button?null:(e.preventDefault(),t.close(e))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"backspace",void 0,e.key,void 0)?null:(e.preventDefault(),t.close(e))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"delete",[8,46],e.key,["Backspace","Delete","Del"])?null:(e.preventDefault(),t.close(e))}]}},"k-dropdown-item",e,!1),[t._v("\n "+t._s(e.text)+"\n ")])}),1),t._v("\n "+t._s(t.query)+"\n")],2)},On=[];n("4917"),n("3b2b");RegExp.escape=function(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")};var Sn,Cn,En,Tn,jn,In,Ln={props:{limit:10,skip:{type:Array,default:function(){return[]}},options:Array,query:String},data:function(){return{matches:[],selected:{text:null}}},methods:{close:function(){this.$refs.dropdown.close()},onSelect:function(t){this.$refs.dropdown.close(),this.$emit("select",t)},search:function(t){var e=this;if(!(t.length<1)){var n=new RegExp(RegExp.escape(t),"ig");this.matches=this.options.filter(function(t){return!!t.text&&(-1===e.skip.indexOf(t.value)&&null!==t.text.match(n))}).slice(0,this.limit),this.$emit("search",t,this.matches),this.$refs.dropdown.open()}}}},qn=Ln,Nn=Object(h["a"])(qn,wn,On,!1,null,null,null),An=Nn.exports,Bn=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.prev}}),n("span",{staticClass:"k-calendar-selects"},[n("k-select-input",{attrs:{options:t.months,disabled:t.disabled,empty:!1,required:!0},model:{value:t.month,callback:function(e){t.month=t._n(e)},expression:"month"}}),n("k-select-input",{attrs:{options:t.years,disabled:t.disabled,empty:!1,required:!0},model:{value:t.year,callback:function(e){t.year=t._n(e)},expression:"year"}})],1),n("k-button",{attrs:{icon:"angle-right"},on:{click:t.next}})],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.numberOfWeeks,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.isCurrent(e)&&"date"}},[e?n("k-button",{on:{click:function(n){return t.select(e)}}},[t._v(t._s(e))]):t._e()],1)}),0)}),0),n("tfoot",[n("tr",[n("td",{staticClass:"k-calendar-today",attrs:{colspan:"7"}},[n("k-button",{on:{click:function(e){return t.go("today")}}},[t._v(t._s(t.$t("today")))])],1)])])])])},Pn=[],Dn=n("5a0c"),Mn=n.n(Dn),Rn=function(t,e){t=String(t);var n="";e=(e||2)-t.length;while(n.length0?t:7},weekdays:function(){return[this.$t("days.mon"),this.$t("days.tue"),this.$t("days.wed"),this.$t("days.thu"),this.$t("days.fri"),this.$t("days.sat"),this.$t("days.sun")]},monthnames:function(){return[this.$t("months.january"),this.$t("months.february"),this.$t("months.march"),this.$t("months.april"),this.$t("months.may"),this.$t("months.june"),this.$t("months.july"),this.$t("months.august"),this.$t("months.september"),this.$t("months.october"),this.$t("months.november"),this.$t("months.december")]},months:function(){var t=[];return this.monthnames.forEach(function(e,n){t.push({value:n,text:e})}),t},years:function(){for(var t=[],e=this.year-10;e<=this.year+10;e++)t.push({value:e,text:Rn(e)});return t}},watch:{value:function(t){var e=Mn()(t);this.day=e.date(),this.month=e.month(),this.year=e.year(),this.current=e}},methods:{days:function(t){for(var e=[],n=7*(t-1)+1,i=n;ithis.numberOfDays?e.push(""):e.push(s)}return e},next:function(){var t=this.date.clone().add(1,"month");this.set(t)},isToday:function(t){return this.month===this.today.month()&&this.year===this.today.year()&&t===this.today.date()},isCurrent:function(t){return this.month===this.current.month()&&this.year===this.current.year()&&t===this.current.date()},prev:function(){var t=this.date.clone().subtract(1,"month");this.set(t)},go:function(t,e){"today"===t&&(t=this.today.year(),e=this.today.month()),this.year=t,this.month=e},set:function(t){this.day=t.date(),this.month=t.month(),this.year=t.year()},select:function(t){t&&(this.day=t);var e=Mn()(new Date(this.year,this.month,this.day,this.current.hour(),this.current.minute()));this.$emit("input",e.toISOString())}}},Fn=zn,Un=(n("ee15"),Object(h["a"])(Fn,Bn,Pn,!1,null,null,null)),Hn=Un.exports,Kn=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()])},Vn=[],Yn=(n("c5f6"),{props:{count:Number,min:Number,max:Number,required:{type:Boolean,default:!1}},computed:{valid:function(){return!1===this.required&&0===this.count||(!0!==this.required||0!==this.count)&&(!(this.min&&this.countthis.max))}}}),Gn=Yn,Wn=(n("fc0f"),Object(h["a"])(Gn,Kn,Vn,!1,null,null,null)),Jn=Wn.exports,Xn=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(e)}}},[t._t("header"),t._t("default",[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)},Zn=[],Qn={props:{disabled:Boolean,config:Object,fields:{type:[Array,Object],default:function(){return{}}},novalidate:{type:Boolean,default:!1},value:{type:Object,default:function(){return{}}}},data:function(){return{errors:{},listeners:Object(l["a"])({},this.$listeners,{submit:this.onSubmit})}},methods:{focus:function(t){this.$refs.fields&&this.$refs.fields.focus&&this.$refs.fields.focus(t)},onSubmit:function(){this.$emit("submit",this.value)},submit:function(){this.$refs.submitter.click()}}},ti=Qn,ei=(n("5d33"),Object(h["a"])(ti,Xn,Zn,!1,null,null,null)),ni=ei.exports,ii=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.hasChanges?n("nav",{staticClass:"k-form-buttons"},[n("k-view",[n("k-button",{staticClass:"k-form-button",attrs:{icon:"undo"},on:{click:t.reset}},[t._v("\n "+t._s(t.$t("revert"))+"\n ")]),n("k-button",{staticClass:"k-form-button",attrs:{icon:"check"},on:{click:t.save}},[t._v("\n "+t._s(t.$t("save"))+"\n ")])],1)],1):t._e()},si=[],ai={computed:{hasChanges:function(){return this.$store.getters["form/hasChanges"](this.id)},id:function(){return this.$store.state.form.current}},created:function(){this.$events.$on("keydown.cmd.s",this.save)},destroyed:function(){this.$events.$off("keydown.cmd.s",this.save)},methods:{reset:function(){this.$store.dispatch("form/revert",this.id)},save:function(t){var e=this;return!!t&&(t.preventDefault&&t.preventDefault(),!1===this.hasChanges||void this.$store.dispatch("form/save",this.id).then(function(){e.$events.$emit("model.update"),e.$store.dispatch("notification/success",":)")}).catch(function(t){403!==t.code&&(t.details?e.$store.dispatch("notification/error",{message:e.$t("error.form.incomplete"),details:t.details}):e.$store.dispatch("notification/error",{message:e.$t("error.form.notSaved"),details:[{label:"Exception: "+t.exception,message:t.message}]}))}))}}},oi=ai,ri=(n("18dd"),Object(h["a"])(oi,ii,si,!1,null,null,null)),li=ri.exports,ui=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},on:{focusin:function(e){return t.$emit("focus",e)},focusout:function(e){return t.$emit("blur",e)}}},[t._t("header",[n("header",{staticClass:"k-field-header"},[t._t("label",[n("label",{staticClass:"k-field-label",attrs:{for:t.input}},[t._v(t._s(t.labelText)+" "),t.required?n("abbr",{attrs:{title:"This field is required"}},[t._v("*")]):t._e()])]),t._t("options"),t._t("counter",[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",[t.help||t.$slots.help?n("footer",{staticClass:"k-field-footer"},[t._t("help",[t.help?n("k-text",{staticClass:"k-field-help",attrs:{theme:"help"},domProps:{innerHTML:t._s(t.help)}}):t._e()])],2):t._e()])],2)},ci=[],di={inheritAttrs:!1,props:{counter:[Boolean,Object],disabled:Boolean,endpoints:Object,help:String,input:[String,Number],label:String,name:[String,Number],required:Boolean,type:String},computed:{labelText:function(){return this.label||" "}}},pi=di,fi=(n("a134"),Object(h["a"])(pi,ui,ci,!1,null,null,null)),hi=fi.exports,mi=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:{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("\n The field type "),n("strong",[t._v('"'+t._s(i)+'"')]),t._v(" does not exist\n ")])],1)],1)],1):t._e()}),1)],1)},gi=[],vi={props:{config:Object,disabled:Boolean,fields:{type:[Array,Object],default:function(){return[]}},novalidate:{type:Boolean,default:!1},value:{type:Object,default:function(){return{}}}},data:function(){return{errors:{}}},methods:{focus:function(t){if(t)this.hasField(t)&&"function"===typeof this.$refs[t][0].focus&&this.$refs[t][0].focus();else{var e=ne()(this.$refs)[0];this.focus(e)}},hasFieldType:function(t){return A["a"].options.components["k-"+t+"-field"]},hasField:function(t){return this.$refs[t]&&this.$refs[t][0]},meetsCondition:function(t){var e=this;if(!t.when)return!0;var n=!0;return ne()(t.when).forEach(function(i){var s=e.value[i.toLowerCase()],a=t.when[i];s!==a&&(n=!1)}),n},onInvalid:function(t,e,n,i){this.errors[i]=e,this.$emit("invalid",this.errors)},hasErrors:function(){return ne()(this.errors).length}}},bi=vi,ki=(n("862b"),Object(h["a"])(bi,mi,gi,!1,null,null,null)),$i=ki.exports,_i=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",[t._v(t._s(t.before))])],2):t._e(),n("span",{staticClass:"k-input-element",on:{click:function(e){return e.stopPropagation(),t.focus(e)}}},[t._t("default",[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",[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",[n("k-icon",{attrs:{type:t.icon}})])],2):t._e()])},yi=[],xi={inheritAttrs:!1,props:{after:String,before:String,disabled:Boolean,type:String,icon:[String,Boolean],invalid:Boolean,theme:String,novalidate:{type:Boolean,default:!1},value:{type:[String,Boolean,Number,Object,Array],default:null}},data:function(){var t=this;return{isInvalid:this.invalid,listeners:Object(l["a"])({},this.$listeners,{invalid:function(e,n){t.isInvalid=e,t.$emit("invalid",e,n)}}),inputProps:Object(l["a"])({},this.$props,this.$attrs)}},methods:{blur:function(t){t.relatedTarget&&!1===this.$el.contains(t.relatedTarget)&&this.$refs.input.blur&&this.$refs.input.blur()},focus:function(t){if(t&&t.target&&"INPUT"===t.target.tagName)t.target.focus();else if(this.$refs.input&&this.$refs.input.focus)this.$refs.input.focus();else{var e=this.$el.querySelector("input, select, textarea");e&&e.focus()}}}},wi=xi,Oi=(n("c7c8"),Object(h["a"])(wi,_i,yi,!1,null,null,null)),Si=Oi.exports,Ci=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}}),n("k-dialog",{ref:"dialog",attrs:{size:"medium"}},[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)],n("template",{slot:"footer"},[t.errors.length>0?[n("k-button-group",[n("k-button",{attrs:{icon:"check"},on:{click:function(e){return t.$refs.dialog.close()}}},[t._v("\n "+t._s(t.$t("confirm"))+"\n ")])],1)]:t._e()],2)],2)],1)},Ei=[],Ti=n("db0c"),ji=n.n(Ti),Ii=n("75fc"),Li=n("5176"),qi=n.n(Li),Ni=function(t,e){var n={url:"/",field:"file",method:"POST",accept:"text",attributes:{},complete:function(){},error:function(){},success:function(){},progress:function(){}},i=qi()(n,e),s=new FormData;s.append(i.field,t),i.attributes&&ne()(i.attributes).forEach(function(t){s.append(t,i.attributes[t])});var a=new XMLHttpRequest,o=function(e){if(e.lengthComputable&&i.progress){var n=Math.max(0,Math.min(100,e.loaded/e.total*100));i.progress(a,t,Math.ceil(n))}};a.addEventListener("loadstart",o),a.addEventListener("progress",o),a.addEventListener("load",function(e){var n=null;try{n=JSON.parse(e.target.response)}catch(s){n={status:"error",message:"The file could not be uploaded"}}n.status&&"error"===n.status?i.error(a,t,n):(i.success(a,t,n),i.progress(a,t,100))}),a.addEventListener("error",function(e){var n=JSON.parse(e.target.response);i.error(a,t,n),i.progress(a,t,100)}),a.open("POST",i.url,!0),i.headers&&ne()(i.headers).forEach(function(t){var e=i.headers[t];a.setRequestHeader(t,e)}),a.send(s)},Ai={props:{url:{type:String},accept:{type:String,default:"*"},attributes:{type:Object},multiple:{type:Boolean,default:!0},max:{type:Number}},data:function(){return{options:this.$props,completed:{},errors:[],files:[],total:0}},methods:{open:function(t){var e=this;this.params(t),setTimeout(function(){e.$refs.input.click()},1)},params:function(t){this.options=qi()({},this.$props,t)},select:function(t){this.upload(t.target.files)},drop:function(t,e){this.params(e),this.upload(t)},upload:function(t){var e=this;this.$refs.dialog.open(),this.files=Object(Ii["a"])(t),this.completed={},this.errors=[],this.hasErrors=!1,this.options.max&&(this.files=this.files.slice(0,this.options.max)),this.total=this.files.length,this.files.forEach(function(t){Ni(t,{url:e.options.url,attributes:e.options.attributes,headers:{"X-CSRF":window.panel.csrf},progress:function(t,n,i){e.$refs[n.name]&&e.$refs[n.name][0]&&e.$refs[n.name][0].set(i)},success:function(t,n,i){e.complete(n,i.data)},error:function(t,n,i){e.errors.push({file:n,message:i.message}),e.complete(n)}})})},complete:function(t,e){var n=this;if(this.completed[t.name]=e,ne()(this.completed).length==this.total){if(this.$refs.input.value="",this.errors.length>0)return this.$forceUpdate(),void this.$emit("error",this.files);setTimeout(function(){n.$refs.dialog.close(),n.$emit("success",n.files,ji()(n.completed))},250)}}}},Bi=Ai,Pi=(n("5aee"),Object(h["a"])(Bi,Ci,Ei,!1,null,null,null)),Di=Pi.exports,Mi=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("label",{staticClass:"k-checkbox-input"},[n("input",{ref:"input",staticClass:"k-checkbox-input-native",attrs:{disabled:t.disabled,id:t.id,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)}})])},Ri=[],zi=n("b5ae"),Fi={inheritAttrs:!1,props:{autofocus:Boolean,disabled:Boolean,id:[Number,String],label:String,required:Boolean,value:Boolean},watch:{value:function(){this.onInvalid()}},mounted:function(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus:function(){this.$refs.input.focus()},onChange:function(t){this.$emit("input",t)},onInvalid:function(){this.$emit("invalid",this.$v.$invalid,this.$v)},select:function(){this.$refs.input.focus()}},validations:function(){return{value:{required:!this.required||zi["required"]}}}},Ui=Fi,Hi=(n("42e4"),Object(h["a"])(Ui,Mi,Ri,!1,null,null,null)),Ki=Hi.exports,Vi=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)},Yi=[],Gi=(n("28a5"),n("a745")),Wi=n.n(Gi),Ji={inheritAttrs:!1,props:{autofocus:Boolean,columns:Number,disabled:Boolean,id:{type:[Number,String],default:function(){return this._uid}},max:Number,min:Number,options:Array,required:Boolean,value:{type:Array,default:function(){return[]}}},data:function(){return{selected:this.valueToArray(this.value)}},watch:{value:function(t){this.selected=this.valueToArray(t)},selected:function(){this.onInvalid()}},mounted:function(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus:function(){this.$el.querySelector("input").focus()},onInput:function(t,e){if(!0===e)this.selected.push(t);else{var n=this.selected.indexOf(t);-1!==n&&this.selected.splice(n,1)}this.$emit("input",this.selected)},onInvalid:function(){this.$emit("invalid",this.$v.$invalid,this.$v)},select:function(){this.focus()},valueToArray:function(t){return Wi()(t)?t:String(t).split(",")}},validations:function(){return{selected:{required:!this.required||zi["required"],min:!this.min||Object(zi["minLength"])(this.min),max:!this.max||Object(zi["maxLength"])(this.max)}}}},Xi=Ji,Zi=Object(h["a"])(Xi,Vi,Yi,!1,null,null,null),Qi=Zi.exports,ts=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-date-input"},[n("k-select-input",{ref:"years",attrs:{"aria-label":t.$t("year"),options:t.years,disabled:t.disabled,required:t.required,value:t.year,placeholder:"––––",empty:"––––"},on:{input:t.setYear,invalid:t.onInvalid}}),n("span",{staticClass:"k-date-input-separator"},[t._v("-")]),n("k-select-input",{ref:"months",attrs:{"aria-label":t.$t("month"),options:t.months,disabled:t.disabled,required:t.required,value:t.month,empty:"––",placeholder:"––"},on:{input:t.setMonth,invalid:t.onInvalid}}),n("span",{staticClass:"k-date-input-separator"},[t._v("-")]),n("k-select-input",{ref:"days",attrs:{"aria-label":t.$t("day"),autofocus:t.autofocus,id:t.id,options:t.days,disabled:t.disabled,required:t.required,value:t.day,placeholder:"––",empty:"––"},on:{input:t.setDay,invalid:t.onInvalid}})],1)},es=[],ns=n("e814"),is=n.n(ns),ss={inheritAttrs:!1,props:{autofocus:Boolean,disabled:Boolean,id:[String,Number],max:String,min:String,required:Boolean,value:String},data:function(){return{date:Mn()(this.value),minDate:this.calculate(this.min,"min"),maxDate:this.calculate(this.max,"max")}},computed:{day:function(){return isNaN(this.date.date())?"":this.date.date()},days:function(){return this.options(1,this.date.daysInMonth()||31,"days")},month:function(){return isNaN(this.date.date())?"":this.date.month()+1},months:function(){return this.options(1,12,"months")},year:function(){return isNaN(this.date.year())?"":this.date.year()},years:function(){var t=this.date.isBefore(this.minDate)?this.date.year():this.minDate.year(),e=this.date.isAfter(this.maxDate)?this.date.year():this.maxDate.year();return this.options(t,e)}},watch:{value:function(t){this.date=Mn()(t)}},methods:{calculate:function(t,e){var n={min:{run:"subtract",take:"startOf"},max:{run:"add",take:"endOf"}}[e],i=t?Mn()(t):null;return i&&!1!==i.isValid()||(i=Mn()()[n.run](10,"year")[n.take]("year")),i},focus:function(){this.$refs.years.focus()},onInput:function(){!1!==this.date.isValid()?this.$emit("input",this.date.toISOString()):this.$emit("input","")},onInvalid:function(t,e){this.$emit("invalid",t,e)},options:function(t,e){for(var n=[],i=t;i<=e;i++)n.push({value:i,text:Rn(i)});return n},set:function(t,e){if(""===e||null===e||!1===e||-1===e)return this.setInvalid(),void this.onInput();if(!1===this.date.isValid())return this.setInitialDate(t,e),void this.onInput();var n=this.date,i=this.date.date();this.date=this.date.set(t,is()(e)),"month"===t&&this.date.date()!==i&&(this.date=n.set("date",1).set("month",e).endOf("month")),this.onInput()},setInvalid:function(){this.date=Mn()("invalid")},setInitialDate:function(t,e){var n=Mn()();return this.date=Mn()().set(t,is()(e)),"date"===t&&n.month()!==this.date.month()&&(this.date=n.endOf("month")),this.date},setDay:function(t){this.set("date",t)},setMonth:function(t){this.set("month",t-1)},setYear:function(t){this.set("year",t)}}},as=ss,os=(n("6ab3"),Object(h["a"])(as,ts,es,!1,null,null,null)),rs=os.exports,ls=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-datetime-input"},[n("k-date-input",{ref:"dateInput",attrs:{autofocus:t.autofocus,required:t.required,id:t.id,disabled:t.disabled,value:t.dateValue},on:{input:t.setDate}}),n("k-time-input",t._b({ref:"timeInput",attrs:{required:t.required,disabled:t.disabled,value:t.timeValue},on:{input:t.setTime}},"k-time-input",t.timeOptions,!1))],1)},us=[],cs={inheritAttrs:!1,props:Object(l["a"])({},rs.props,{time:{type:[Boolean,Object],default:function(){return{}}},value:String}),data:function(){return{dateValue:this.parseDate(this.value),timeValue:this.parseTime(this.value),timeOptions:this.setTimeOptions()}},watch:{value:function(t){this.dateValue=this.parseDate(t),this.timeValue=this.parseTime(t),this.onInvalid()}},mounted:function(){this.onInvalid()},methods:{focus:function(){this.$refs.dateInput.focus()},onInput:function(){if(this.timeValue&&this.dateValue){var t=this.dateValue+"T"+this.timeValue+":00";this.$emit("input",t)}else this.$emit("input","")},onInvalid:function(){this.$emit("invalid",this.$v.$invalid,this.$v)},parseDate:function(t){var e=Mn()(t);return e.isValid()?e.format("YYYY-MM-DD"):null},parseTime:function(t){var e=Mn()(t);return e.isValid()?e.format("HH:mm"):null},setDate:function(t){t&&!this.timeValue&&(this.timeValue=Mn()().format("HH:mm")),t?this.dateValue=this.parseDate(t):(this.dateValue=null,this.timeValue=null),this.onInput()},setTime:function(t){t&&!this.dateValue&&(this.dateValue=Mn()().format("YYYY-MM-DD")),t?this.timeValue=t:(this.dateValue=null,this.timeValue=null),this.onInput()},setTimeOptions:function(){return!0===this.time?{}:this.time}},validations:function(){return{value:{required:!this.required||zi["required"]}}}},ds=cs,ps=(n("4433"),Object(h["a"])(ds,ls,us,!1,null,null,null)),fs=ps.exports,hs=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("input",t._g(t._b({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))},ms=[],gs={inheritAttrs:!1,class:"k-text-input",props:{autocomplete:{type:[Boolean,String],default:"off"},autofocus:Boolean,disabled:Boolean,id:[Number,String],maxlength:Number,minlength:Number,name:[Number,String],pattern:String,placeholder:String,preselect:Boolean,required:Boolean,spellcheck:{type:[Boolean,String],default:"off"},type:{type:String,default:"text"},value:String},data:function(){var t=this;return{listeners:Object(l["a"])({},this.$listeners,{input:function(e){return t.onInput(e.target.value)}})}},watch:{value:function(){this.onInvalid()}},mounted:function(){this.onInvalid(),this.$props.autofocus&&this.focus(),this.$props.preselect&&this.select()},methods:{focus:function(){this.$refs.input.focus()},onInput:function(t){this.$emit("input",t)},onInvalid:function(){this.$emit("invalid",this.$v.$invalid,this.$v)},select:function(){this.$refs.input.select()}},validations:function(){return{value:{required:!this.required||zi["required"],minLength:!this.minlength||Object(zi["minLength"])(this.minlength),maxLength:!this.maxlength||Object(zi["maxLength"])(this.maxlength),email:"email"!==this.type||zi["email"],url:"url"!==this.type||zi["url"]}}}},vs=gs,bs=(n("cb8f"),Object(h["a"])(vs,hs,ms,!1,null,null,null)),ks=bs.exports,$s={extends:ks,props:Object(l["a"])({},ks.props,{autocomplete:{type:String,default:"email"},placeholder:{type:String,default:function(){return this.$t("email.placeholder")}},type:{type:String,default:"email"}})},_s=$s,ys=Object(h["a"])(_s,Sn,Cn,!1,null,null,null),xs=ys.exports,ws=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(e)}}},[t._l(t.sorted,function(e){return n("k-tag",{key:e.value,ref:e.value,refInFor:!0,attrs:{removable:!0},on:{remove:function(n){return t.remove(e)}},nativeOn:{click:function(t){t.stopPropagation()},keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])?null:"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"])?null:"button"in e&&2!==e.button?null:t.navigate("next")},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"])?null:t.$refs.dropdown.open(e)}]}},[t._v("\n "+t._s(e.text)+"\n ")])}),n("k-dropdown-content",{ref:"dropdown",attrs:{slot:"footer"},on:{open:t.onOpen,close:function(e){t.q=null}},slot:"footer"},[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",domProps:{value:t.q},on:{input:function(e){e.target.composing||(t.q=e.target.value)}}})]):t._e(),n("div",{staticClass:"k-multiselect-options"},t._l(t.filtered,function(e){return n("k-dropdown-item",{key:e.value,class:{"k-multiselect-option":!0,selected:t.isSelected(e),disabled:!t.addable},attrs:{icon:t.isSelected(e)?"check":"circle-outline"},on:{click:function(n){return t.select(e)}},nativeOn:{keydown:[function(n){return!n.type.indexOf("key")&&t._k(n.keyCode,"enter",13,n.key,"Enter")?null:(n.preventDefault(),t.select(e))},function(n){return!n.type.indexOf("key")&&t._k(n.keyCode,"space",32,n.key,[" ","Spacebar"])?null:(n.preventDefault(),t.select(e))}]}},[n("span",{domProps:{innerHTML:t._s(e.display)}}),n("span",{staticClass:"k-multiselect-value",domProps:{innerHTML:t._s(e.info)}})])}),1)],1)],2)},Os=[],Ss=(n("20d6"),n("55dd"),{inheritAttrs:!1,props:{disabled:Boolean,id:[Number,String],max:Number,min:Number,layout:String,options:{type:Array,default:function(){return[]}},required:Boolean,search:Boolean,separator:{type:String,default:","},sort:Boolean,value:{type:Array,required:!0,default:function(){return[]}}},data:function(){return{state:this.value,q:null}},computed:{addable:function(){return!this.max||this.state.length1&&!this.sort},dragOptions:function(){return{disabled:!this.draggable,draggable:".k-tag",delay:1}},filtered:function(){if(null===this.q)return this.options.map(function(t){return Object(l["a"])({},t,{display:t.text,info:t.value})});var t=new RegExp("(".concat(RegExp.escape(this.q),")"),"ig");return this.options.filter(function(e){return e.text.match(t)||e.value.match(t)}).map(function(e){return Object(l["a"])({},e,{display:e.text.replace(t,"$1"),info:e.value.replace(t,"$1")})})},sorted:function(){var t=this;if(!1===this.sort)return this.state;var e=this.state,n=function(e){return t.options.findIndex(function(t){return t.value===e.value})};return e.sort(function(t,e){return n(t)-n(e)})}},watch:{value:function(t){this.state=t,this.onInvalid()}},mounted:function(){this.onInvalid(),this.$events.$on("click",this.close),this.$events.$on("keydown.cmd.s",this.close),this.$events.$on("keydown.esc",this.escape)},destroyed:function(){this.$events.$off("click",this.close),this.$events.$off("keydown.cmd.s",this.close),this.$events.$off("keydown.esc",this.escape)},methods:{add:function(t){this.addable&&(this.state.push(t),this.onInput())},blur:function(){this.close()},close:function(){this.$refs.dropdown.close(),this.q=null,this.$el.focus()},escape:function(){this.q?this.q=null:this.close()},focus:function(){this.$refs.dropdown.open()},index:function(t){return this.state.findIndex(function(e){return e.value===t.value})},isSelected:function(t){return-1!==this.index(t)},navigate:function(t){var e=document.activeElement;switch(t){case"prev":e&&e.previousSibling&&e.previousSibling.focus();break;case"next":e&&e.nextSibling&&e.nextSibling.focus();break}},onInput:function(){this.$emit("input",this.sorted)},onInvalid:function(){this.$emit("invalid",this.$v.$invalid,this.$v)},onOpen:function(){var t=this;this.$nextTick(function(){t.$refs.search&&t.$refs.search.focus()})},remove:function(t){this.state.splice(this.index(t),1),this.onInput()},select:function(t){t={text:t.text,value:t.value},this.isSelected(t)?this.remove(t):this.add(t)}},validations:function(){return{state:{required:!this.required||zi["required"],minLength:!this.min||Object(zi["minLength"])(this.min),maxLength:!this.max||Object(zi["maxLength"])(this.max)}}}}),Cs=Ss,Es=(n("11ae"),Object(h["a"])(Cs,ws,Os,!1,null,null,null)),Ts=Es.exports,js=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("input",t._g(t._b({ref:"input",staticClass:"k-number-input",attrs:{type:"number"}},"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,step:t.step,value:t.value},!1),t.listeners))},Is=[],Ls={inheritAttrs:!1,props:{autofocus:Boolean,disabled:Boolean,id:[Number,String],max:Number,min:Number,name:[Number,String],placeholder:String,preselect:Boolean,required:Boolean,step:Number,value:{type:[Number,String],default:null}},data:function(){var t=this;return{listeners:Object(l["a"])({},this.$listeners,{input:function(e){return t.onInput(e.target.value)}})}},watch:{value:function(){this.onInvalid()}},mounted:function(){this.onInvalid(),this.$props.autofocus&&this.focus(),this.$props.preselect&&this.select()},methods:{focus:function(){this.$refs.input.focus()},onInvalid:function(){this.$emit("invalid",this.$v.$invalid,this.$v)},onInput:function(t){null!==t&&""!==t&&"-"!==t&&"-0"!==t&&(t=Number(t)),this.$emit("input",t)},select:function(){this.$refs.input.select()}},validations:function(){return{value:{required:!this.required||zi["required"],min:!this.min||Object(zi["minValue"])(this.min),max:!this.max||Object(zi["maxValue"])(this.max)}}}},qs=Ls,Ns=(n("6018"),Object(h["a"])(qs,js,Is,!1,null,null,null)),As=Ns.exports,Bs={extends:ks,props:Object(l["a"])({},ks.props,{autocomplete:{type:String,default:"new-password"},type:{type:String,default:"password"}})},Ps=Bs,Ds=Object(h["a"])(Ps,En,Tn,!1,null,null,null),Ms=Ds.exports,Rs=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)}}}),n("label",{attrs:{for:t.id+"-"+i}},[e.info?[n("span",{staticClass:"k-radio-input-text"},[t._v(t._s(e.text))]),n("span",{staticClass:"k-radio-input-info"},[t._v(t._s(e.info))])]:[t._v("\n "+t._s(e.text)+"\n ")]],2),e.icon?n("k-icon",{attrs:{type:e.icon}}):t._e()],1)}),0)},zs=[],Fs={inheritAttrs:!1,props:{autofocus:Boolean,columns:Number,disabled:Boolean,id:{type:[Number,String],default:function(){return this._uid}},options:Array,required:Boolean,value:[String,Number,Boolean]},watch:{value:function(){this.onInvalid()}},mounted:function(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus:function(){this.$el.querySelector("input").focus()},onInput:function(t){this.$emit("input",t)},onInvalid:function(){this.$emit("invalid",this.$v.$invalid,this.$v)},select:function(){this.focus()}},validations:function(){return{value:{required:!this.required||zi["required"]}}}},Us=Fs,Hs=(n("893d"),Object(h["a"])(Us,Rs,zs,!1,null,null,null)),Ks=Hs.exports,Vs=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"}},"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,value:t.value},!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()])},Ys=[],Gs=(n("6b54"),{inheritAttrs:!1,props:{autofocus:Boolean,disabled:Boolean,id:[String,Number],max:{type:Number,default:100},min:{type:Number,default:0},name:[String,Number],required:Boolean,step:{type:Number,default:1},tooltip:{type:[Boolean,Object],default:function(){return{before:null,after:null}}},value:[Number,String]},data:function(){var t=this;return{listeners:Object(l["a"])({},this.$listeners,{input:function(e){return t.onInput(e.target.value)}})}},computed:{label:function(){return null!==this.value?this.format(this.value):"–"},center:function(){var t=(this.max-this.min)/2+this.min;return Math.ceil(t/this.step)*this.step},position:function(){return null!==this.value?this.value:this.center}},watch:{value:function(){this.onInvalid()}},mounted:function(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus:function(){this.$refs.input.focus()},format:function(t){var 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:function(){this.$emit("invalid",this.$v.$invalid,this.$v)},onInput:function(t){this.$emit("input",t)}},validations:function(){return{value:{required:!this.required||zi["required"],min:!this.min||Object(zi["minValue"])(this.min),max:!this.max||Object(zi["maxValue"])(this.max)}}}}),Ws=Gs,Js=(n("b5d2"),Object(h["a"])(Ws,Vs,Ys,!1,null,null,null)),Xs=Js.exports,Zs=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({directives:[{name:"model",rawName:"v-model",value:t.selected,expression:"selected"}],ref:"input",staticClass:"k-select-input-native",attrs:{autofocus:t.autofocus,"aria-label":t.ariaLabel,disabled:t.disabled,id:t.id,name:t.name,required:t.required},on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,function(t){return t.selected}).map(function(t){var e="_value"in t?t._value:t.value;return e});t.selected=e.target.multiple?n:n[0]}}},t.listeners),[!1!==t.empty?n("option",{attrs:{value:""}},[t._v(t._s(t.empty))]):t._e(),t._l(t.options,function(e){return n("option",{key:e.value,attrs:{disabled:e.disabled},domProps:{value:e.value}},[t._v("\n "+t._s(e.text)+"\n ")])})],2),t._v("\n "+t._s(t.label)+"\n")])},Qs=[],ta={inheritAttrs:!1,props:{autofocus:Boolean,ariaLabel:String,disabled:Boolean,id:[Number,String],name:[Number,String],placeholder:String,empty:{type:[String,Boolean],default:"—"},options:{type:Array,default:function(){return[]}},required:Boolean,value:{type:[String,Number,Boolean],default:""}},data:function(){var t=this;return{selected:this.value,listeners:Object(l["a"])({},this.$listeners,{click:function(e){return t.onClick(e)},input:function(e){return t.onInput(e.target.value)}})}},computed:{label:function(){var t=this.text(this.selected);return""===this.selected||null===this.selected||null===t?this.placeholder||"—":t}},watch:{value:function(t){this.selected=t,this.onInvalid()}},mounted:function(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus:function(){this.$refs.input.focus()},onClick:function(t){t.stopPropagation(),this.$emit("click",t)},onInvalid:function(){this.$emit("invalid",this.$v.$invalid,this.$v)},onInput:function(t){this.selected=t,this.$emit("input",this.selected)},select:function(){this.focus()},text:function(t){var e=null;return this.options.forEach(function(n){n.value==t&&(e=n.text)}),e}},validations:function(){return{selected:{required:!this.required||zi["required"]}}}},ea=ta,na=(n("6a18"),Object(h["a"])(ea,Zs,Qs,!1,null,null,null)),ia=na.exports,sa=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-draggable",{ref:"box",staticClass:"k-tags-input",attrs:{list:t.tags,"data-layout":t.layout,options:t.dragOptions},on:{end:t.onInput}},[t._l(t.tags,function(e,i){return n("k-tag",{key:i,ref:e.value,refInFor:!0,attrs:{removable:!0,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"])?null:"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"])?null:"button"in e&&2!==e.button?null:t.navigate("next")}],dblclick:function(n){return t.edit(e)}}},[t._v("\n "+t._s(e.text)+"\n ")])}),n("span",{staticClass:"k-tags-input-element",attrs:{slot:"footer"},slot:"footer"},[n("k-autocomplete",{ref:"autocomplete",attrs:{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:{autofocus:t.autofocus,disabled:t.disabled||t.max&&t.tags.length>=t.max,id:t.id,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(e):null},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])?null:"button"in e&&0!==e.button?null:e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.leaveInput(e)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.enter(e)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"tab",9,e.key,"Tab")?null:e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.tab(e)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"backspace",void 0,e.key,void 0)?null:e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.leaveInput(e)}]}})])],1)],2)},aa=[],oa={inheritAttrs:!1,props:{autofocus:Boolean,accept:{type:String,default:"all"},disabled:Boolean,icon:{type:[String,Boolean],default:"tag"},id:[Number,String],layout:String,max:Number,min:Number,name:[Number,String],options:{type:Array,default:function(){return[]}},required:Boolean,separator:{type:String,default:","},value:{type:Array,default:function(){return[]}}},data:function(){return{tags:this.prepareTags(this.value),selected:null,newTag:null,tagOptions:this.options.map(function(t){return t.icon="tag",t})}},computed:{dragOptions:function(){return{delay:1,disabled:!this.draggable,draggable:".k-tag"}},draggable:function(){return this.tags.length>1},skip:function(){return this.tags.map(function(t){return t.value})}},watch:{value:function(t){this.tags=this.prepareTags(t),this.onInvalid()}},mounted:function(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{addString:function(t){var e=this;if(t)if(t=t.trim(),t.includes(this.separator))t.split(this.separator).forEach(function(t){e.addString(t)});else if(0!==t.length)if("options"===this.accept){var n=this.options.filter(function(e){return e.text===t})[0];if(!n)return;this.addTag(n)}else this.addTag({text:t,value:t})},addTag:function(t){this.addTagToIndex(t),this.$refs.autocomplete.close(),this.$refs.input.focus()},addTagToIndex:function(t){if("options"===this.accept){var e=this.options.filter(function(e){return e.value===t.value})[0];if(!e)return}-1===this.index(t)&&(!this.max||this.tags.length0&&(t.preventDefault(),this.addString(this.newTag))},type:function(t){this.newTag=t,this.$refs.autocomplete.search(t)}},validations:function(){return{tags:{required:!this.required||zi["required"],minLength:!this.min||Object(zi["minLength"])(this.min),maxLength:!this.max||Object(zi["maxLength"])(this.max)}}}},ra=oa,la=(n("27c1"),Object(h["a"])(ra,sa,aa,!1,null,null,null)),ua=la.exports,ca={extends:ks,props:Object(l["a"])({},ks.props,{autocomplete:{type:String,default:"tel"},type:{type:String,default:"tel"}})},da=ca,pa=Object(h["a"])(da,jn,In,!1,null,null,null),fa=pa.exports,ha=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-textarea-input",attrs:{"data-theme":t.theme,"data-over":t.over}},[n("div",{staticClass:"k-textarea-input-wrapper"},[t.buttons?n("k-toolbar",{ref:"toolbar",attrs:{buttons:t.buttons,uploads:t.uploads},on:{command:t.onCommand},nativeOn:{mousedown:function(t){t.preventDefault()}}}):t._e(),n("textarea",t._b({ref:"input",staticClass:"k-textarea-input-native",attrs:{"data-size":t.size},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(e):null},function(e){return e.metaKey?t.onShortcut(e):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-email-dialog",{ref:"emailDialog",on:{cancel:t.cancel,submit:function(e){return t.insert(e)}}}),n("k-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)},ma=[],ga=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("nav",{staticClass:"k-toolbar"},[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("\n "+t._s(e.label)+"\n ")])}),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)])},va=[],ba=function(t){this.command("insert",function(e,n){var i=[];return n.split("\n").forEach(function(e,n){var s="ol"===t?n+1+".":"-";i.push(s+" "+e)}),i.join("\n")})},ka={layout:["headlines","bold","italic","|","link","email","file","|","code","ul","ol"],props:{buttons:{type:[Boolean,Array],default:!0},uploads:[Boolean,Object,Array]},data:function(){var t={},e={},n=[],i=this.commands();return!1===this.buttons?t:(Wi()(this.buttons)&&(n=this.buttons),!0!==Wi()(this.buttons)&&(n=this.$options.layout),n.forEach(function(n,s){if("|"===n)t["divider-"+s]={divider:!0};else if(i[n]){var a=i[n];t[n]=a,a.shortcut&&(e[a.shortcut]=n)}}),{layout:t,shortcuts:e})},methods:{command:function(t,e){"function"===typeof t?t.apply(this):this.$emit("command",t,e)},close:function(){var t=this;ne()(this.$refs).forEach(function(e){var n=t.$refs[e][0];n.close&&"function"===typeof n.close&&n.close()})},fileCommandSetup:function(){var 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:function(){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:"l",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:function(){return ba.apply(this,["ul"])}},ol:{label:this.$t("toolbar.button.ol"),icon:"list-numbers",command:function(){return ba.apply(this,["ol"])}}}},shortcut:function(t,e){if(this.shortcuts[t]){var n=this.layout[this.shortcuts[t]];if(!n)return!1;e.preventDefault(),this.command(n.command,n.args)}}}},$a=ka,_a=(n("df0d"),Object(h["a"])($a,ga,va,!1,null,null,null)),ya=_a.exports,xa=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{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)},wa=[],Oa={data:function(){return{value:{email:null,text:null},fields:{email:{label:this.$t("email"),type:"email"},text:{label:this.$t("link.text"),type:"text"}}}},computed:{kirbytext:function(){return this.$store.state.system.info.kirbytext}},methods:{open:function(t,e){this.value.text=e,this.$refs.dialog.open()},cancel:function(){this.$emit("cancel")},createKirbytext:function(){var t=this.value.email||"";return this.value.text&&this.value.text.length>0?"(email: ".concat(t," text: ").concat(this.value.text,")"):"(email: ".concat(t,")")},createMarkdown:function(){var t=this.value.email||"";return this.value.text&&this.value.text.length>0?"[".concat(this.value.text,"](mailto:").concat(t,")"):"<".concat(t,">")},submit:function(){this.$emit("submit",this.kirbytext?this.createKirbytext():this.createMarkdown()),this.value={email:null,text:null},this.$refs.dialog.close()}}},Sa=Oa,Ca=Object(h["a"])(Sa,xa,wa,!1,null,null,null),Ea=Ca.exports,Ta=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{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)},ja=[],Ia={data:function(){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:function(){return this.$store.state.system.info.kirbytext}},methods:{open:function(t,e){this.value.text=e,this.$refs.dialog.open()},cancel:function(){this.$emit("cancel")},createKirbytext:function(){return this.value.text.length>0?"(link: ".concat(this.value.url," text: ").concat(this.value.text,")"):"(link: ".concat(this.value.url,")")},createMarkdown:function(){return this.value.text.length>0?"[".concat(this.value.text,"](").concat(this.value.url,")"):"<".concat(this.value.url,">")},submit:function(){this.$emit("submit",this.kirbytext?this.createKirbytext():this.createMarkdown()),this.value={url:null,text:null},this.$refs.dialog.close()}}},La=Ia,qa=Object(h["a"])(La,Ta,ja,!1,null,null,null),Na=qa.exports,Aa=n("19e9"),Ba=n.n(Aa),Pa={components:{"k-toolbar":ya,"k-email-dialog":Ea,"k-link-dialog":Na},inheritAttrs:!1,props:{autofocus:Boolean,buttons:{type:[Boolean,Array],default:!0},disabled:Boolean,endpoints:Object,id:[Number,String],name:[Number,String],maxlength:Number,minlength:Number,placeholder:String,preselect:Boolean,required:Boolean,size:String,spellcheck:{type:[Boolean,String],default:"off"},theme:String,uploads:[Boolean,Object,Array],value:String},data:function(){return{over:!1}},watch:{value:function(){var t=this;this.onInvalid(),this.$nextTick(function(){t.resize()})}},mounted:function(){var t=this;this.$nextTick(function(){Ba()(t.$refs.input)}),this.onInvalid(),this.$props.autofocus&&this.focus(),this.$props.preselect&&this.select()},methods:{cancel:function(){this.$refs.input.focus()},dialog:function(t){if(!this.$refs[t+"Dialog"])throw"Invalid toolbar dialog";this.$refs[t+"Dialog"].open(this.$refs.input,this.selection())},focus:function(){this.$refs.input.focus()},insert:function(t){var e=this,n=this.$refs.input,i=n.value;setTimeout(function(){if(n.focus(),document.execCommand("insertText",!1,t),n.value===i){var s=n.value.slice(0,n.selectionStart)+t+n.value.slice(n.selectionEnd);n.value=s,e.$emit("input",s)}}),this.resize()},insertFile:function(t){t&&t.length>0&&this.insert(t[0].dragText)},insertUpload:function(t,e){this.insert(e[0].dragText),this.$events.$emit("model.update")},onClick:function(){this.$refs.toolbar&&this.$refs.toolbar.close()},onCommand:function(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:function(t){if(t.dataTransfer&&!0===t.dataTransfer.types.includes("Files"))return this.$refs.fileUpload.drop(t.dataTransfer.files,{url:d.api+"/"+this.endpoints.field+"/upload",multiple:!1});var e=this.$store.state.drag;e&&"text"===e.type&&(this.focus(),this.insert(e.data))},onFocus:function(t){this.$emit("focus",t)},onInput:function(t){this.$emit("input",t.target.value)},onInvalid:function(){this.$emit("invalid",this.$v.$invalid,this.$v)},onOut:function(){this.$refs.input.blur(),this.over=!1},onOver:function(t){if(this.uploads&&t.dataTransfer&&!0===t.dataTransfer.types.includes("Files"))return t.dataTransfer.dropEffect="copy",this.focus(),void(this.over=!0);var e=this.$store.state.drag;e&&"text"===e.type&&(t.dataTransfer.dropEffect="copy",this.focus(),this.over=!0)},onShortcut:function(t){!1!==this.buttons&&"Meta"!==t.key&&this.$refs.toolbar&&this.$refs.toolbar.shortcut(t.key,t)},onSubmit:function(t){return this.$emit("submit",t)},prepend:function(t){this.insert(t+" "+this.selection())},resize:function(){Ba.a.update(this.$refs.input)},select:function(){this.$refs.select()},selectFile:function(){var t=this;this.$api.get(this.endpoints.field+"/files").then(function(e){t.$refs.fileDialog.open(e,{multiple:!1})}).catch(function(e){t.$store.dispatch("notification/error",e)})},selection:function(){var t=this.$refs.input,e=t.selectionStart,n=t.selectionEnd;return t.value.substring(e,n)},uploadFile:function(){this.$refs.fileUpload.open({url:d.api+"/"+this.endpoints.field+"/upload",multiple:!1})},wrap:function(t){this.insert(t+this.selection()+t)}},validations:function(){return{value:{required:!this.required||zi["required"],minLength:!this.minlength||Object(zi["minLength"])(this.minlength),maxLength:!this.maxlength||Object(zi["maxLength"])(this.maxlength)}}}},Da=Pa,Ma=(n("cca8"),Object(h["a"])(Da,ha,ma,!1,null,null,null)),Ra=Ma.exports,za=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-time-input"},[n("k-select-input",{ref:"hour",attrs:{id:t.id,"aria-label":t.$t("hour"),autofocus:t.autofocus,options:t.hours,required:t.required,disabled:t.disabled,placeholder:"––",empty:"––"},on:{input:t.setHour,invalid:t.onInvalid},model:{value:t.hour,callback:function(e){t.hour=e},expression:"hour"}}),n("span",{staticClass:"k-time-input-separator"},[t._v(":")]),n("k-select-input",{ref:"minute",attrs:{"aria-label":t.$t("minutes"),options:t.minutes,required:t.required,disabled:t.disabled,placeholder:"––",empty:"––"},on:{input:t.setMinute,invalid:t.onInvalid},model:{value:t.minute,callback:function(e){t.minute=e},expression:"minute"}}),12===t.notation?n("k-select-input",{ref:"meridiem",staticClass:"k-time-input-meridiem",attrs:{"aria-label":t.$t("meridiem"),empty:!1,options:[{value:"AM",text:"AM"},{value:"PM",text:"PM"}],required:t.required,disabled:t.disabled},on:{input:t.onInput},model:{value:t.meridiem,callback:function(e){t.meridiem=e},expression:"meridiem"}}):t._e()],1)},Fa=[],Ua=n("f906"),Ha=n.n(Ua);Mn.a.extend(Ha.a);var Ka,Va,Ya={inheritAttrs:!1,props:{autofocus:Boolean,disabled:Boolean,id:[String,Number],notation:{type:Number,default:24},required:Boolean,step:{type:Number,default:5},value:{type:String}},data:function(){var t=this.toObject(this.value);return{time:this.value,hour:t.hour,minute:t.minute,meridiem:t.meridiem}},computed:{hours:function(){return this.options(24===this.notation?0:1,24===this.notation?23:12)},minutes:function(){return this.options(0,59,this.step)}},watch:{value:function(t){this.time=t},time:function(t){var e=this.toObject(t);this.hour=e.hour,this.minute=e.minute,this.meridiem=e.meridiem}},methods:{focus:function(){this.$refs.hour.focus()},setHour:function(t){t&&!this.minute&&(this.minute=0),t||(this.minute=null),this.onInput()},setMinute:function(t){t&&!this.hour&&(this.hour=0),t||(this.hour=null),this.onInput()},onInput:function(){if(null!==this.hour&&null!==this.minute){var t=Rn(this.hour||0),e=Rn(this.minute||0),n=String(this.meridiem).toUpperCase()||"AM",i=24===this.notation?"".concat(t,":").concat(e,":00"):"".concat(t,":").concat(e,":00 ").concat(n),s=24===this.notation?"HH:mm:ss":"hh:mm:ss A",a=Mn()("2000-01-01 "+i,"YYYY-MM-DD "+s);this.$emit("input",a.format("HH:mm"))}else this.$emit("input","")},onInvalid:function(t,e){this.$emit("invalid",t,e)},options:function(t,e){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=[],s=t;s<=e;s+=n)i.push({value:s,text:Rn(s)});return i},reset:function(){this.hour=null,this.minute=null,this.meridiem=null},round:function(t){return Math.floor(t/this.step)*this.step},toObject:function(t){var e=Mn()("2001-01-01 "+t+":00","YYYY-MM-DD HH:mm:ss");return t&&!1!==e.isValid()?{hour:e.format(24===this.notation?"H":"h"),minute:this.round(e.format("m")),meridiem:e.format("A")}:{hour:null,minute:null,meridiem:null}}}},Ga=Ya,Wa=(n("50da"),Object(h["a"])(Ga,za,Fa,!1,null,null,null)),Ja=Wa.exports,Xa=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("label",{staticClass:"k-toggle-input"},[n("input",{ref:"input",staticClass:"k-toggle-input-native",attrs:{disabled:t.disabled,id:t.id,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)}})])},Za=[],Qa={inheritAttrs:!1,props:{autofocus:Boolean,disabled:Boolean,id:[Number,String],text:{type:[Array,String],default:function(){return["off","on"]}},required:Boolean,value:Boolean},computed:{label:function(){return Wi()(this.text)?this.value?this.text[1]:this.text[0]:this.text}},watch:{value:function(){this.onInvalid()}},mounted:function(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus:function(){this.$refs.input.focus()},onEnter:function(t){"Enter"===t.key&&this.$refs.input.click()},onInput:function(t){this.$emit("input",t)},onInvalid:function(){this.$emit("invalid",this.$v.$invalid,this.$v)},select:function(){this.$refs.input.focus()}},validations:function(){return{value:{required:!this.required||zi["required"]}}}},to=Qa,eo=(n("bb41"),Object(h["a"])(to,Xa,Za,!1,null,null,null)),no=eo.exports,io={extends:ks,props:Object(l["a"])({},ks.props,{autocomplete:{type:String,default:"url"},type:{type:String,default:"url"}})},so=io,ao=Object(h["a"])(so,Ka,Va,!1,null,null,null),oo=ao.exports,ro=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"}},"k-input",t.$props,!1),t.$listeners))],1)},lo=[],uo={inheritAttrs:!1,props:Object(l["a"])({},hi.props,Si.props,Qi.props,{counter:{type:Boolean,default:!0}}),computed:{counterOptions:function(){return null!==this.value&&!this.disabled&&!1!==this.counter&&{count:this.value&&Wi()(this.value)?this.value.length:0,min:this.min,max:this.max}}},methods:{focus:function(){this.$refs.input.focus()}}},co=uo,po=Object(h["a"])(co,ro,lo,!1,null,null,null),fo=po.exports,ho=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("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,type:t.inputType,value:t.date,theme:"field"}},"k-input",t.$props,!1),t.listeners),[n("template",{slot:"icon"},[n("k-dropdown",[n("k-button",{staticClass:"k-input-icon-button",attrs:{icon:t.icon,tooltip:t.$t("date.select"),tabindex:"-1"},on:{click:function(e){return t.$refs.dropdown.toggle()}}}),n("k-dropdown-content",{ref:"dropdown",attrs:{align:"right"}},[n("k-calendar",{attrs:{value:t.date},on:{input:function(e){t.onInput(e),t.$refs.dropdown.close()}}})],1)],1)],1)],2)],1)},mo=[],go={inheritAttrs:!1,props:Object(l["a"])({},hi.props,Si.props,fs.props,{icon:{type:String,default:"calendar"}}),data:function(){return{date:this.value,listeners:Object(l["a"])({},this.$listeners,{input:this.onInput})}},computed:{inputType:function(){return!1===this.time?"date":"datetime"}},watch:{value:function(t){this.date=t}},methods:{focus:function(){this.$refs.input.focus()},onInput:function(t){this.date=t,this.$emit("input",t)}}},vo=go,bo=Object(h["a"])(vo,ho,mo,!1,null,null,null),ko=bo.exports,$o=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"}},"k-input",t.$props,!1),t.$listeners),[t.link?n("k-button",{staticClass:"k-input-icon-button",attrs:{slot:"icon",icon:t.icon,link:"mailto:"+t.value,tooltip:t.$t("open"),tabindex:"-1",target:"_blank"},slot:"icon"}):t._e()],1)],1)},_o=[],yo={inheritAttrs:!1,props:Object(l["a"])({},hi.props,Si.props,xs.props,{link:{type:Boolean,default:!0},icon:{type:String,default:"email"}}),methods:{focus:function(){this.$refs.input.focus()}}},xo=yo,wo=Object(h["a"])(xo,$o,_o,!1,null,null,null),Oo=wo.exports,So=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-files-field"},"k-field",t.$props,!1),[t.more&&!t.disabled?n("k-button",{attrs:{slot:"options",icon:"add"},on:{click:t.open},slot:"options"},[t._v("\n "+t._s(t.$t("select"))+"\n ")]):t._e(),t.selected.length?[n("k-draggable",{attrs:{element:t.elements.list,list:t.selected,"data-size":t.size,handle:!0},on:{end:t.onInput}},t._l(t.selected,function(e,i){return n(t.elements.item,{key:e.filename,tag:"component",attrs:{sortable:!t.disabled&&t.selected.length>1,text:e.text,link:e.link,info:e.info,image:e.image,icon:e.icon}},[t.disabled?t._e():n("k-button",{attrs:{slot:"options",tooltip:t.$t("remove"),icon:"remove"},on:{click:function(e){return t.remove(i)}},slot:"options"})],1)}),1)]:n("k-empty",t._g({attrs:{layout:t.layout,icon:"image"}},{click:t.disabled?null:t.open}),[t._v("\n "+t._s(t.empty||t.$t("field.files.empty"))+"\n ")]),n("k-files-dialog",{ref:"selector",on:{submit:t.select}})],2)},Co=[],Eo={inheritAttrs:!1,props:Object(l["a"])({},hi.props,{empty:String,layout:String,max:Number,multiple:Boolean,parent:String,size:String,value:{type:Array,default:function(){return[]}}}),data:function(){return{selected:this.value}},computed:{elements:function(){var t={cards:{list:"k-cards",item:"k-card"},list:{list:"k-list",item:"k-list-item"}};return t[this.layout]?t[this.layout]:t["list"]},more:function(){return!this.max||this.max>this.selected.length}},watch:{value:function(t){this.selected=t}},methods:{focus:function(){},onInput:function(){this.$emit("input",this.selected)},remove:function(t){this.selected.splice(t,1),this.onInput()},removeById:function(t){this.selected=this.selected.filter(function(e){return e.id!==t}),this.onInput()},select:function(t){var e=this;this.selected.forEach(function(n,i){0===t.filter(function(t){return t.id===n.id}).length&&e.selected.splice(i,1)}),t.forEach(function(t){0===e.selected.filter(function(e){return t.id===e.id}).length&&e.selected.push(t)}),this.onInput()}}},To={mixins:[Eo],created:function(){this.$events.$on("file.delete",this.removeById)},destroyed:function(){this.$events.$off("file.delete",this.removeById)},methods:{open:function(){var t=this;return this.$api.get(this.endpoints.field).then(function(e){var n=t.selected.map(function(t){return t.id});e=e.map(function(e){return e.selected=-1!==n.indexOf(e.id),e.thumb=t.image||{},e.thumb.url=!1,e.thumbs&&e.thumbs.tiny&&(e.thumb.url=e.thumbs.medium),e}),t.$refs.selector.open(e,{max:t.max,multiple:t.multiple})}).catch(function(){t.$store.dispatch("notification/error","The files query does not seem to be correct")})}}},jo=To,Io=(n("4a4b"),Object(h["a"])(jo,So,Co,!1,null,null,null)),Lo=Io.exports,qo=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-headline",{staticClass:"k-headline-field",attrs:{"data-numbered":t.numbered,size:"large"}},[t._v("\n "+t._s(t.label)+"\n")])},No=[],Ao={props:{label:String,numbered:Boolean}},Bo=Ao,Po=(n("19d7"),Object(h["a"])(Bo,qo,No,!1,null,null,null)),Do=Po.exports,Mo=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)],1)},Ro=[],zo={props:{label:String,text:String,theme:{type:String,default:"info"}}},Fo=zo,Uo=(n("ddfd"),Object(h["a"])(Fo,Mo,Ro,!1,null,null,null)),Ho=Uo.exports,Ko=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("hr",{staticClass:"k-line-field"})},Vo=[],Yo=(n("718c"),{}),Go=Object(h["a"])(Yo,Ko,Vo,!1,null,null,null),Wo=Go.exports,Jo=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}},"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)},Xo=[],Zo={inheritAttrs:!1,props:Object(l["a"])({},hi.props,Si.props,Ts.props,{counter:{type:Boolean,default:!0},icon:{type:String,default:"angle-down"}}),computed:{counterOptions:function(){return null!==this.value&&!this.disabled&&!1!==this.counter&&{count:this.value&&Wi()(this.value)?this.value.length:0,min:this.min,max:this.max}}},methods:{blur:function(t){this.$refs.input.blur(t)},focus:function(){this.$refs.input.focus()}}},Qo=Zo,tr=Object(h["a"])(Qo,Jo,Xo,!1,null,null,null),er=tr.exports,nr=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"}},"k-input",t.$props,!1),t.$listeners))],1)},ir=[],sr={inheritAttrs:!1,props:Object(l["a"])({},hi.props,Si.props,As.props),methods:{focus:function(){this.$refs.input.focus()}}},ar=sr,or=Object(h["a"])(ar,nr,ir,!1,null,null,null),rr=or.exports,lr=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-pages-field"},"k-field",t.$props,!1),[t.more&&!t.disabled?n("k-button",{attrs:{slot:"options",icon:"add"},on:{click:t.open},slot:"options"},[t._v("\n "+t._s(t.$t("select"))+"\n ")]):t._e(),t.selected.length?[n("k-draggable",{attrs:{element:t.elements.list,handle:!0,list:t.selected,"data-size":t.size},on:{end:t.onInput}},t._l(t.selected,function(e,i){return n(t.elements.item,{key:e.id,tag:"component",attrs:{sortable:!t.disabled&&t.selected.length>1,text:e.text,info:e.info,link:e.link,icon:e.icon,image:e.image}},[t.disabled?t._e():n("k-button",{attrs:{slot:"options",icon:"remove"},on:{click:function(e){return t.remove(i)}},slot:"options"})],1)}),1)]:n("k-empty",t._g({attrs:{layout:t.layout,icon:"page"}},{click:t.disabled?null:t.open}),[t._v("\n "+t._s(t.empty||t.$t("field.pages.empty"))+"\n ")]),n("k-pages-dialog",{ref:"selector",on:{submit:t.select}})],2)},ur=[],cr=n("f499"),dr=n.n(cr),pr=function(t){if(void 0!==t)return JSON.parse(dr()(t))},fr={mixins:[Eo],methods:{open:function(){this.$refs.selector.open({endpoint:this.endpoints.field,max:this.max,multiple:this.multiple,selected:pr(this.selected)})}}},hr=fr,mr=(n("7e85"),Object(h["a"])(hr,lr,ur,!1,null,null,null)),gr=mr.exports,vr=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}},"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)},br=[],kr={inheritAttrs:!1,props:Object(l["a"])({},hi.props,Si.props,Ms.props,{counter:{type:Boolean,default:!0},minlength:{type:Number,default:8},icon:{type:String,default:"key"}}),computed:{counterOptions:function(){return null!==this.value&&!this.disabled&&!1!==this.counter&&{count:this.value?String(this.value).length:0,min:this.minlength,max:this.maxlength}}},methods:{focus:function(){this.$refs.input.focus()}}},$r=kr,_r=Object(h["a"])($r,vr,br,!1,null,null,null),yr=_r.exports,xr=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"}},"k-input",t.$props,!1),t.$listeners))],1)},wr=[],Or={inheritAttrs:!1,props:Object(l["a"])({},hi.props,Si.props,Ks.props),methods:{focus:function(){this.$refs.input.focus()}}},Sr=Or,Cr=Object(h["a"])(Sr,xr,wr,!1,null,null,null),Er=Cr.exports,Tr=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"}},"k-input",t.$props,!1),t.$listeners))],1)},jr=[],Ir={inheritAttrs:!1,props:Object(l["a"])({},hi.props,Si.props,Xs.props),methods:{focus:function(){this.$refs.input.focus()}}},Lr=Ir,qr=Object(h["a"])(Lr,Tr,jr,!1,null,null,null),Nr=qr.exports,Ar=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"}},"k-input",t.$props,!1),t.$listeners))],1)},Br=[],Pr={inheritAttrs:!1,props:Object(l["a"])({},hi.props,Si.props,ia.props,{icon:{type:String,default:"angle-down"}}),methods:{focus:function(){this.$refs.input.focus()}}},Dr=Pr,Mr=Object(h["a"])(Dr,Ar,Br,!1,null,null,null),Rr=Mr.exports,zr=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()}}},"k-field",t.$props,!1),[n("template",{slot:"options"},[t.more&&null===t.currentIndex?n("k-button",{ref:"add",attrs:{id:t._uid,icon:"add"},on:{click:t.add}},[t._v("\n "+t._s(t.$t("add"))+"\n ")]):t._e()],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:{icon:"cancel"},on:{click:t.close}},[t._v(t._s(t.$t("cancel")))]),"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:{icon:"check"},on:{click:t.submit}},[t._v(t._s(t.$t("new"!==t.currentIndex?"confirm":"add")))])],1)],1)]:0===t.items.length?n("k-empty",{attrs:{icon:"list-bullet"},on:{click:t.add}},[t._v("\n "+t._s(t.empty||t.$t("field.structure.empty"))+"\n ")]):[n("table",{staticClass:"k-structure-table",attrs:{"data-sortable":t.isSortable}},[n("thead",[n("tr",[n("th",{staticClass:"k-structure-table-index"},[t._v("#")]),t._l(t.columns,function(e,i){return n("th",{key:i+"-header",staticClass:"k-structure-table-column",attrs:{"data-width":e.width,"data-align":e.align}},[t._v("\n "+t._s(e.label)+"\n ")])}),n("th")],2)]),n("k-draggable",{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,i){return n("tr",{key:i,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(i)))])],1),t._l(t.columns,function(s,a){return n("td",{key:a,staticClass:"k-structure-table-column",attrs:{title:s.label,"data-width":s.width,"data-align":s.align},on:{click:function(e){return t.jump(i,a)}}},[!1===t.columnIsEmpty(e[a])?[t.previewExists(s.type)?n("k-"+s.type+"-field-preview",{tag:"component",attrs:{value:e[a],column:s,field:t.fields[a]}}):[n("p",{staticClass:"k-structure-table-text"},[t._v("\n "+t._s(s.before)+" "+t._s(t.displayText(t.fields[a],e[a])||"–")+" "+t._s(s.after)+"\n ")])]]:t._e()],2)}),n("td",{staticClass:"k-structure-table-option"},[n("k-button",{attrs:{tooltip:t.$t("remove"),icon:"remove"},on:{click:function(e){return t.confirmRemove(i)}}})],1)],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:{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)},Fr=[],Ur=n("795b"),Hr=n.n(Ur),Kr=n("7618"),Vr=n("59ad"),Yr=n.n(Vr),Gr=function(t){t=t||{};var e=t.desc?-1:1,n=-e,i=/^0/,s=/\s+/g,a=/^\s+|\s+$/g,o=/[^\x00-\x80]/,r=/^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 d(""+t).replace(a,"")}:function(t){return(""+t).replace(a,"")};function d(t){return t.toLocaleLowerCase?t.toLocaleLowerCase():t.toLowerCase()}function p(t){return t.replace(l,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0")}function f(t,e){return(!t.match(i)||1===e)&&Yr()(t)||t.replace(s," ").replace(a,"")||0}return function(t,i){var s=c(t),a=c(i);if(!s&&!a)return 0;if(!s&&a)return n;if(s&&!a)return e;var l=p(s),d=p(a),h=is()(s.match(r),16)||1!==l.length&&Date.parse(s),m=is()(a.match(r),16)||h&&a.match(u)&&Date.parse(a)||null;if(m){if(hm)return e}for(var g=l.length,v=d.length,b=0,k=Math.max(g,v);b0)return e;if(y<0)return n;if(b===k-1)return 0}else{if($<_)return n;if($>_)return e}}return 0}};Array.prototype.sortBy=function(t){var e=Gr(),n=t.split(" "),i=n[0],s=n[1]||"asc";return this.sort(function(t,n){var a=String(t[i]).toLowerCase(),o=String(n[i]).toLowerCase();return"desc"===s?e(o,a):e(a,o)})};var Wr,Jr,Xr,Zr,Qr={inheritAttrs:!1,props:Object(l["a"])({},hi.props,{columns:Object,empty:String,fields:Object,limit:Number,max:Number,min:Number,sortable:{type:Boolean,default:!0},sortBy:String,value:{type:Array,default:function(){return[]}}}),data:function(){return{items:this.makeItems(this.value),currentIndex:null,currentModel:null,trash:null,page:1}},computed:{dragOptions:function(){return{disabled:!this.isSortable,fallbackClass:"k-sortable-row-fallback"}},formFields:function(){var t=this,e={};return ne()(this.fields).forEach(function(n){var i=t.fields[n];i.section=t.name,i.endpoints={field:t.endpoints.field+"+"+n,section:t.endpoints.section,model:t.endpoints.model},e[n]=i}),e},more:function(){return!0!==this.disabled&&!(this.max&&this.items.length>=this.max)},isSortable:function(){return!this.sortBy&&(!this.limit&&(!0!==this.disabled&&(!(this.items.length<=1)&&!1!==this.sortable)))},pagination:function(){var 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:function(){return this.limit?this.items.slice(this.pagination.offset,this.pagination.offset+this.limit):this.items}},watch:{value:function(t){t!=this.items&&(this.items=this.makeItems(t))}},methods:{add:function(){var t=this;if(!0===this.disabled)return!1;if(null!==this.currentIndex)return this.escape(),!1;var e={};ne()(this.fields).forEach(function(n){var i=t.fields[n];i.default?e[n]=pr(i.default):e[n]=null}),this.currentIndex="new",this.currentModel=e,this.createForm()},close:function(){this.currentIndex=null,this.currentModel=null,this.$events.$off("keydown.esc",this.escape),this.$events.$off("keydown.cmd.s",this.submit),this.$store.dispatch("form/unlock")},columnIsEmpty:function(t){return void 0===t||null===t||""===t||("object"===Object(Kr["a"])(t)&&0===ne()(t).length&&t.constructor===Object||void 0!==t.length&&0===t.length)},confirmRemove:function(t){this.close(),this.trash=t,this.$refs.remove.open()},createForm:function(t){var e=this;this.$events.$on("keydown.esc",this.escape),this.$events.$on("keydown.cmd.s",this.submit),this.$store.dispatch("form/lock"),this.$nextTick(function(){e.$refs.form&&e.$refs.form.focus(t)})},displayText:function(t,e){switch(t.type){case"user":return e.email;case"date":var n=Mn()(e),i=!0===t.time?"YYYY-MM-DD HH:mm":"YYYY-MM-DD";return n.isValid()?n.format(i):"";case"tags":return e.map(function(t){return t.text}).join(", ");case"checkboxes":return e.map(function(e){var n=e;return t.options.forEach(function(t){t.value===e&&(n=t.text)}),n}).join(", ");case"radio":case"select":var s=t.options.filter(function(t){return t.value===e})[0];return s?s.text:null}return"object"===Object(Kr["a"])(e)&&null!==e?"…":e},escape:function(){var t=this;if("new"===this.currentIndex){var e=ji()(this.currentModel),n=!0;if(e.forEach(function(e){!1===t.columnIsEmpty(e)&&(n=!1)}),!0===n)return void this.close()}this.submit()},focus:function(){this.$refs.add.focus()},indexOf:function(t){return this.limit?(this.page-1)*this.limit+t+1:t+1},isActive:function(t){return this.currentIndex===t},jump:function(t,e){this.open(t+this.pagination.offset,e)},makeItems:function(t){return!1===Wi()(t)?[]:this.sort(t)},onInput:function(){this.$emit("input",this.items)},open:function(t,e){this.currentIndex=t,this.currentModel=pr(this.items[t]),this.createForm(e)},beforePaginate:function(){return this.save(this.currentModel)},paginate:function(t){this.open(t.offset)},paginateItems:function(t){this.page=t.page},previewExists:function(t){return void 0!==A["a"].options.components["k-"+t+"-field-preview"]||void 0!==this.$options.components["k-"+t+"-field-preview"]},remove:function(){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:function(t){return this.sortBy?t.sortBy(this.sortBy):t},save:function(){var t=this;return null!==this.currentIndex&&void 0!==this.currentIndex?this.validate(this.currentModel).then(function(){return"new"===t.currentIndex?t.items.push(t.currentModel):t.items[t.currentIndex]=t.currentModel,t.items=t.sort(t.items),t.onInput(),!0}).catch(function(e){throw t.$store.dispatch("notification/error",{message:t.$t("error.form.incomplete"),details:e}),e}):Hr.a.resolve()},submit:function(){this.save().then(this.close).catch(function(){})},validate:function(t){return this.$api.post(this.endpoints.field+"/validate",t).then(function(t){if(t.length>0)throw t;return!0})}}},tl=Qr,el=(n("088c"),Object(h["a"])(tl,zr,Fr,!1,null,null,null)),nl=el.exports,il=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"}},"k-input",t.$props,!1),t.$listeners))],1)},sl=[],al={inheritAttrs:!1,props:Object(l["a"])({},hi.props,Si.props,ua.props,{counter:{type:Boolean,default:!0}}),computed:{counterOptions:function(){return null!==this.value&&!this.disabled&&!1!==this.counter&&{count:this.value&&Wi()(this.value)?this.value.length:0,min:this.min,max:this.max}}},methods:{focus:function(){this.$refs.input.focus()}}},ol=al,rl=Object(h["a"])(ol,il,sl,!1,null,null,null),ll=rl.exports,ul=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"}},"k-input",t.$props,!1),t.$listeners))],1)},cl=[],dl={inheritAttrs:!1,props:Object(l["a"])({},hi.props,Si.props,fa.props,{icon:{type:String,default:"phone"}}),methods:{focus:function(){this.$refs.input.focus()}}},pl=dl,fl=Object(h["a"])(pl,ul,cl,!1,null,null,null),hl=fl.exports,ml=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}},"k-field",t.$props,!1),[t._t("options",null,{slot:"options"}),n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field"}},"k-input",t.$props,!1),t.$listeners))],2)},gl=[],vl={inheritAttrs:!1,props:Object(l["a"])({},hi.props,Si.props,ks.props,{counter:{type:Boolean,default:!0}}),computed:{counterOptions:function(){return null!==this.value&&!this.disabled&&!1!==this.counter&&{count:this.value?String(this.value).length:0,min:this.minlength,max:this.maxlength}}},methods:{focus:function(){this.$refs.input.focus()}}},bl=vl,kl=(n("b746"),Object(h["a"])(bl,ml,gl,!1,null,null,null)),$l=kl.exports,_l=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)},yl=[],xl={inheritAttrs:!1,props:Object(l["a"])({},hi.props,Si.props,Ra.props,{counter:{type:Boolean,default:!0}}),computed:{counterOptions:function(){return null!==this.value&&!this.disabled&&!1!==this.counter&&{count:this.value?this.value.length:0,min:this.minlength,max:this.maxlength}}},methods:{focus:function(){this.$refs.input.focus()}}},wl=xl,Ol=Object(h["a"])(wl,_l,yl,!1,null,null,null),Sl=Ol.exports,Cl=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._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field"}},"k-input",t.$props,!1),t.$listeners))],1)},El=[],Tl={inheritAttrs:!1,props:Object(l["a"])({},hi.props,Si.props,Ja.props,{icon:{type:String,default:"clock"}}),methods:{focus:function(){this.$refs.input.focus()}}},jl=Tl,Il=Object(h["a"])(jl,Cl,El,!1,null,null,null),Ll=Il.exports,ql=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"}},"k-input",t.$props,!1),t.$listeners))],1)},Nl=[],Al={inheritAttrs:!1,props:Object(l["a"])({},hi.props,Si.props,no.props),methods:{focus:function(){this.$refs.input.focus()}}},Bl=Al,Pl=Object(h["a"])(Bl,ql,Nl,!1,null,null,null),Dl=Pl.exports,Ml=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"}},"k-input",t.$props,!1),t.$listeners),[t.link?n("k-button",{staticClass:"k-input-icon-button",attrs:{slot:"icon",icon:t.icon,link:t.value,tooltip:t.$t("open"),tabindex:"-1",target:"_blank"},slot:"icon"}):t._e()],1)],1)},Rl=[],zl={inheritAttrs:!1,props:Object(l["a"])({},hi.props,Si.props,oo.props,{link:{type:Boolean,default:!0},icon:{type:String,default:"url"}}),methods:{focus:function(){this.$refs.input.focus()}}},Fl=zl,Ul=Object(h["a"])(Fl,Ml,Rl,!1,null,null,null),Hl=Ul.exports,Kl=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-users-field"},"k-field",t.$props,!1),[t.more&&!t.disabled?n("k-button",{attrs:{slot:"options",icon:"add"},on:{click:t.open},slot:"options"},[t._v("\n "+t._s(t.$t("select"))+"\n ")]):t._e(),t.selected.length?[n("k-draggable",{attrs:{element:t.elements.list,list:t.selected,handle:!0},on:{end:t.onInput}},t._l(t.selected,function(e,i){return n(t.elements.item,{key:e.email,tag:"component",attrs:{sortable:!t.disabled&&t.selected.length>1,text:e.username,link:t.$api.users.link(e.id),image:e.avatar?{url:e.avatar.url,back:"pattern",cover:!0}:null,icon:{type:"user",back:"black"}}},[t.disabled?t._e():n("k-button",{attrs:{slot:"options",icon:"remove"},on:{click:function(e){return t.remove(i)}},slot:"options"})],1)}),1)]:n("k-empty",t._g({attrs:{icon:"users"}},{click:t.disabled?null:t.open}),[t._v("\n "+t._s(t.empty||t.$t("field.users.empty"))+"\n ")]),n("k-users-dialog",{ref:"selector",on:{submit:t.select}})],2)},Vl=[],Yl={mixins:[Eo],methods:{open:function(){this.$refs.selector.open({max:this.max,multiple:this.multiple,selected:this.selected.map(function(t){return t.email})})}}},Gl=Yl,Wl=(n("7f6e"),Object(h["a"])(Gl,Kl,Vl,!1,null,null,null)),Jl=Wl.exports,Xl=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(e){return n("li",{key:e.url},[n("k-link",{attrs:{title:e.filename,to:e.link},nativeOn:{click:function(t){t.stopPropagation()}}},[n("k-image",t._b({attrs:{src:e.url}},"k-image",t.image,!1))],1)],1)}),0):t._e()},Zl=[],Ql={props:{value:Array,field:Object},computed:{image:function(){var t=this.field.image||{};return Object(l["a"])({back:"pattern",cover:!1},t)}}},tu=Ql,eu=(n("21dc"),Object(h["a"])(tu,Xl,Zl,!1,null,null,null)),nu=eu.exports,iu=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("p",{staticClass:"k-url-field-preview"},[t._v("\n "+t._s(t.column.before)+"\n "),n("k-link",{attrs:{to:t.link,target:"_blank"},nativeOn:{click:function(t){t.stopPropagation()}}},[t._v(t._s(t.value))]),t._v("\n "+t._s(t.column.after)+"\n")],1)},su=[],au={props:{column:{type:Object,default:function(){return{}}},value:String},computed:{link:function(){return this.value}}},ou=au,ru=(n("977f"),Object(h["a"])(ou,iu,su,!1,null,null,null)),lu=ru.exports,uu={extends:lu,computed:{link:function(){return"mailto:"+this.value}}},cu=uu,du=Object(h["a"])(cu,Wr,Jr,!1,null,null,null),pu=du.exports,fu=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:t.$api.pages.link(e.id)},nativeOn:{click:function(t){t.stopPropagation()}}},[n("k-icon",{staticClass:"k-pages-field-preview-image",attrs:{type:"page",back:"pattern"}}),n("figcaption",[t._v("\n "+t._s(e.text)+"\n ")])],1)],1)])}),0):t._e()},hu=[],mu={props:{value:Array}},gu=mu,vu=(n("d0c1"),Object(h["a"])(gu,fu,hu,!1,null,null,null)),bu=vu.exports,ku=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:t.$api.users.link(e.id)},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("\n "+t._s(e.username)+"\n ")])],1)],1)])}),0):t._e()},$u=[],_u={props:{value:Array}},yu=_u,xu=(n("3a85"),Object(h["a"])(yu,ku,$u,!1,null,null,null)),wu=xu.exports,Ou=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()])},Su=[],Cu=(n("6f7b"),{}),Eu=Object(h["a"])(Cu,Ou,Su,!1,null,null,null),Tu=Eu.exports,ju=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",[n("k-text",{domProps:{innerHTML:t._s(t.text)}})])],2)},Iu=[],Lu=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-text",attrs:{"data-align":t.align,"data-size":t.size,"data-theme":t.theme}},[t._t("default")],2)},qu=[],Nu={props:{align:String,size:String,theme:String}},Au=Nu,Bu=(n("b0d6"),Object(h["a"])(Au,Lu,qu,!1,null,null,null)),Pu=Bu.exports,Du={components:{"k-text":Pu},props:{theme:String,text:String}},Mu=Du,Ru=(n("7dc7"),Object(h["a"])(Mu,ju,Iu,!1,null,null,null)),zu=Ru.exports,Fu=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("figure",t._g({staticClass:"k-card"},t.$listeners),[t.sortable?n("k-sort-handle"):t._e(),n(t.wrapper,{tag:"component",attrs:{to:t.link,target:t.target}},[t.image&&t.image.url?n("k-image",{staticClass:"k-card-image",attrs:{src:t.image.url,ratio:t.image.ratio||"3/2",back:t.image.back||"black",cover:t.image.cover}}):n("span",{staticClass:"k-card-icon",style:"padding-bottom:"+t.ratioPadding},[n("k-icon",t._b({},"k-icon",t.icon,!1))],1),n("figcaption",{staticClass:"k-card-content"},[n("span",{staticClass:"k-card-text",attrs:{"data-noinfo":!t.info}},[t._v(t._s(t.text))]),t.info?n("span",{staticClass:"k-card-info",domProps:{innerHTML:t._s(t.info)}}):t._e()])],1),n("nav",{staticClass:"k-card-options"},[t.flag?n("k-button",t._b({staticClass:"k-card-options-button",on:{click:t.flag.click}},"k-button",t.flag,!1)):t._e(),t._t("options",[t.options?n("k-button",{staticClass:"k-card-options-button",attrs:{tooltip:t.$t("options"),icon:"dots"},on:{click:function(e){return e.stopPropagation(),t.$refs.dropdown.toggle()}}}):t._e(),n("k-dropdown-content",{ref:"dropdown",staticClass:"k-card-options-dropdown",attrs:{options:t.options,align:"right"},on:{action:function(e){return t.$emit("action",e)}}})])],2)],1)},Uu=[],Hu=function(t){t=t||"3/2";var e=t.split("/");if(2!==e.length)return"100%";var n=Number(e[0]),i=Number(e[1]),s=100/n*i;return s+"%"},Ku={inheritAttrs:!1,props:{flag:Object,icon:{type:Object,default:function(){return{type:"file",back:"black"}}},image:Object,info:String,link:String,options:[Array,Function],sortable:Boolean,target:String,text:String},computed:{wrapper:function(){return this.link?"k-link":"div"},ratioPadding:function(){return this.icon&&this.icon.ratio?Hu(this.icon.ratio):Hu("3/2")}}},Vu=Ku,Yu=(n("c119"),Object(h["a"])(Vu,Fu,Uu,!1,null,null,null)),Gu=Yu.exports,Wu=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-cards"},[t._t("default",t._l(t.cards,function(e,i){return n("k-card",t._g(t._b({key:i},"k-card",e,!1),t.$listeners))}))],2)},Ju=[],Xu={props:{cards:Array}},Zu=Xu,Qu=(n("f56d"),Object(h["a"])(Zu,Wu,Ju,!1,null,null,null)),tc=Qu.exports,ec=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-collection",attrs:{"data-layout":t.layout}},[n("k-draggable",{attrs:{list:t.items,options:t.dragOptions,element:t.elements.list,"data-size":t.size,handle:!0},on:{change:function(e){return t.$emit("change",e)},end:t.onEnd}},t._l(t.items,function(e,i){return n(t.elements.item,t._b({key:i,tag:"component",class:{"k-draggable-item":e.sortable},on:{action:function(n){return t.$emit("action",e,n)},dragstart:function(n){return t.onDragStart(n,e.dragText)}}},"component",e,!1))}),1),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)},nc=[],ic={props:{help:String,items:{type:[Array,Object],default:function(){return[]}},layout:{type:String,default:"list"},size:String,sortable:Boolean,pagination:{type:[Boolean,Object],default:function(){return!1}}},computed:{hasPagination:function(){return!1!==this.pagination&&(!0!==this.paginationOptions.hide&&!(this.pagination.total<=this.pagination.limit))},hasFooter:function(){return!(!this.hasPagination&&!this.help)},dragOptions:function(){return{sort:this.sortable,disabled:!1===this.sortable,draggable:".k-draggable-item"}},elements:function(){var t={cards:{list:"k-cards",item:"k-card"},list:{list:"k-list",item:"k-list-item"}};return t[this.layout]?t[this.layout]:t["list"]},paginationOptions:function(){var t="object"!==Object(Kr["a"])(this.pagination)?{}:this.pagination;return Object(l["a"])({limit:10,details:!0,keys:!1,total:0,hide:!1},t)}},watch:{$props:function(){this.$forceUpdate()}},over:null,methods:{onEnd:function(){this.over&&this.over.removeAttribute("data-over"),this.$emit("sort",this.items)},onDragStart:function(t,e){this.$store.dispatch("drag",{type:"text",data:e})}}},sc=ic,ac=(n("8c28"),Object(h["a"])(sc,ec,nc,!1,null,null,null)),oc=ac.exports,rc=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-column",attrs:{"data-width":t.width}},[t._t("default")],2)},lc=[],uc={name:"KirbyColumn",props:{width:String}},cc=uc,dc=(n("c9cb"),Object(h["a"])(cc,rc,lc,!1,null,null,null)),pc=dc.exports,fc=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("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)},hc=[],mc={props:{label:{type:String,default:"Drop to upload"},disabled:{type:Boolean,default:!1}},data:function(){return{files:[],dragging:!1,over:!1}},methods:{cancel:function(){this.reset()},reset:function(){this.dragging=!1,this.over=!1},onDrop:function(t){return!0===this.disabled?this.reset():t.dataTransfer.types?!1===t.dataTransfer.types.includes("Files")?this.reset():(this.$events.$emit("dropzone.drop"),this.files=t.dataTransfer.files,this.$emit("drop",this.files),void this.reset()):this.reset()},onEnter:function(t){!1===this.disabled&&t.dataTransfer.types&&t.dataTransfer.types.includes("Files")&&(this.dragging=!0)},onLeave:function(){this.reset()},onOver:function(t){!1===this.disabled&&t.dataTransfer.types&&t.dataTransfer.types.includes("Files")&&(t.dataTransfer.dropEffect="copy",this.over=!0)}}},gc=mc,vc=(n("414d"),Object(h["a"])(gc,fc,hc,!1,null,null,null)),bc=vc.exports,kc=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",t._g({staticClass:"k-empty",attrs:{"data-layout":t.layout}},t.$listeners),[n("k-icon",{attrs:{type:t.icon}}),n("p",[t._t("default")],2)],1)},$c=[],_c={props:{text:String,icon:String,layout:{type:String,default:"list"}}},yc=_c,xc=(n("ba8f"),Object(h["a"])(yc,kc,$c,!1,null,null,null)),wc=xc.exports,Oc=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("a",{directives:[{name:"tab",rawName:"v-tab"}],staticClass:"k-file-preview-image-link",attrs:{href:t.file.url,title:t.$t("open"),target:"_blank"}},[t.file.panelImage&&t.file.panelImage.url?n("k-image",{attrs:{src:t.file.panelImage.url,back:"none"}}):t.file.panelIcon?n("k-icon",{staticClass:"k-file-preview-icon",style:{color:t.file.panelIcon.color},attrs:{type:t.file.panelIcon.type}}):n("span",{staticClass:"k-file-preview-placeholder"})],1)]),n("div",{staticClass:"k-file-preview-details"},[n("ul",[n("li",[n("h3",[t._v(t._s(t.$t("template")))]),n("p",[t._v(t._s(t.file.template||"—"))])]),n("li",[n("h3",[t._v(t._s(t.$t("mime")))]),n("p",[t._v(t._s(t.file.mime))])]),n("li",[n("h3",[t._v(t._s(t.$t("url")))]),n("p",[n("k-link",{attrs:{to:t.file.url,tabindex:"-1",target:"_blank"}},[t._v("/"+t._s(t.file.id))])],1)]),n("li",[n("h3",[t._v(t._s(t.$t("size")))]),n("p",[t._v(t._s(t.file.niceSize))])]),n("li",[n("h3",[t._v(t._s(t.$t("dimensions")))]),t.file.dimensions?n("p",[t._v(t._s(t.file.dimensions.width)+"×"+t._s(t.file.dimensions.height)+" "+t._s(t.$t("pixel")))]):n("p",[t._v("—")])]),n("li",[n("h3",[t._v(t._s(t.$t("orientation")))]),t.file.dimensions?n("p",[t._v(t._s(t.$t("orientation."+t.file.dimensions.orientation)))]):n("p",[t._v("—")])])])])])],1)},Sc=[],Cc={props:{file:Object}},Ec=Cc,Tc=(n("696b5"),Object(h["a"])(Ec,Oc,Sc,!1,null,null,null)),jc=Tc.exports,Ic=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-grid",attrs:{"data-gutter":t.gutter}},[t._t("default")],2)},Lc=[],qc={props:{gutter:String}},Nc=qc,Ac=(n("5b23"),Object(h["a"])(Nc,Ic,Lc,!1,null,null,null)),Bc=Ac.exports,Pc=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"},[t._t("left",null,{slot:"left"}),t._t("right",null,{slot:"right"})],2):t._e(),t.tabs&&t.tabs.length>1?n("div",{staticClass:"k-header-tabs"},[n("nav",[t._l(t.visibleTabs,function(e,i){return n("k-button",{key:t.$route.fullPath+"-tab-"+i,staticClass:"k-tab-button",attrs:{link:"#"+e.name,current:t.currentTab&&t.currentTab.name===e.name,icon:e.icon,tooltip:e.label}},[t._v("\n "+t._s(e.label)+"\n ")])}),t.invisibleTabs.length?n("k-button",{staticClass:"k-tab-button k-tabs-dropdown-button",attrs:{icon:"dots"},on:{click:function(e){return e.stopPropagation(),t.$refs.more.toggle()}}},[t._v("\n "+t._s(t.$t("more"))+"\n ")]):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,i){return n("k-dropdown-item",{key:"more-"+i,attrs:{link:"#"+e.name,current:t.currentTab&&t.currentTab.name===e.name,icon:e.icon,tooltip:e.label}},[t._v("\n "+t._s(e.label)+"\n ")])}),1):t._e()],1):t._e()],1)},Dc=[],Mc={props:{editable:Boolean,tabs:Array,tab:Object},data:function(){return{size:null,currentTab:this.tab,visibleTabs:this.tabs,invisibleTabs:[]}},watch:{tab:function(){this.currentTab=this.tab},tabs:function(t){this.visibleTabs=t,this.invisibleTabs=[],this.resize(!0)}},created:function(){window.addEventListener("resize",this.resize)},destroyed:function(){window.removeEventListener("resize",this.resize)},methods:{resize:function(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"}}}}},Rc=Mc,zc=(n("53c5"),Object(h["a"])(Rc,Pc,Dc,!1,null,null,null)),Fc=zc.exports,Uc=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("ul",{staticClass:"k-list"},[t._t("default",t._l(t.items,function(e,i){return n("k-list-item",t._g(t._b({key:i},"k-list-item",e,!1),t.$listeners))}))],2)},Hc=[],Kc={props:{items:Array}},Vc=Kc,Yc=(n("c857"),Object(h["a"])(Vc,Uc,Hc,!1,null,null,null)),Gc=Yc.exports,Wc=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n(t.element,t._g({tag:"component",staticClass:"k-list-item"},t.$listeners),[t.sortable?n("k-sort-handle"):t._e(),n("k-link",{directives:[{name:"tab",rawName:"v-tab"}],staticClass:"k-list-item-content",attrs:{to:t.link,target:t.target}},[n("span",{staticClass:"k-list-item-image"},[t.image&&t.image.url?n("k-image",{attrs:{src:t.image.url,back:t.image.back||"pattern",cover:t.image.cover}}):n("k-icon",t._b({},"k-icon",t.icon,!1))],1),n("span",{staticClass:"k-list-item-text"},[n("em",[t._v(t._s(t.text))]),t.info?n("small",{domProps:{innerHTML:t._s(t.info)}}):t._e()])]),n("nav",{staticClass:"k-list-item-options"},[t._t("options",[t.flag?n("k-button",t._b({on:{click:t.flag.click}},"k-button",t.flag,!1)):t._e(),t.options?n("k-button",{staticClass:"k-list-item-toggle",attrs:{tooltip:t.$t("options"),icon:"dots",alt:"Options"},on:{click:function(e){return e.stopPropagation(),t.$refs.options.toggle()}}}):t._e(),n("k-dropdown-content",{ref:"options",attrs:{options:t.options,align:"right"},on:{action:function(e){return t.$emit("action",e)}}})])],2)],1)},Jc=[],Xc={inheritAttrs:!1,props:{element:{type:String,default:"li"},image:Object,icon:{type:Object,default:function(){return{type:"file",back:"black"}}},sortable:Boolean,text:String,target:String,info:String,link:String,flag:Object,options:[Array,Function]}},Zc=Xc,Qc=(n("fa6a"),Object(h["a"])(Zc,Wc,Jc,!1,null,null,null)),td=Qc.exports,ed=function(){var t=this,e=t.$createElement,n=t._self._c||e;return 0===t.tabs.length?n("k-box",{attrs:{text:"This page has no blueprint setup yet",theme:"info"}}):t.tab?n("k-sections",{attrs:{parent:t.parent,blueprint:t.blueprint,columns:t.tab.columns},on:{submit:function(e){return t.$emit("submit",e)}}}):t._e()},nd=[],id={props:{parent:String,blueprint:String,tabs:Array},data:function(){return{tab:null}},watch:{$route:function(){this.open()},blueprint:function(){this.open()}},mounted:function(){this.open()},methods:{open:function(t){if(0!==this.tabs.length){t||(t=this.$route.hash.replace("#","")),t||(t=this.tabs[0].name);var e=null;this.tabs.forEach(function(n){n.name===t&&(e=n)}),e||(e=this.tabs[0]),this.tab=e,this.$emit("tab",this.tab)}}}},sd=id,ad=Object(h["a"])(sd,ed,nd,!1,null,null,null),od=ad.exports,rd=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-view",attrs:{"data-align":t.align}},[t._t("default")],2)},ld=[],ud={props:{align:String}},cd=ud,dd=(n("daa8"),Object(h["a"])(cd,rd,ld,!1,null,null,null)),pd=dd.exports,fd=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("draggable",t._g(t._b({staticClass:"k-draggable",attrs:{tag:t.element,list:t.list,move:t.move}},"draggable",t.dragOptions,!1),t.listeners),[t._t("default"),t._t("footer",null,{slot:"footer"})],2)},hd=[],md=n("1980"),gd=n.n(md),vd={components:{draggable:gd.a},props:{element:String,handle:[String,Boolean],list:[Array,Object],move:Function,options:Object},data:function(){var t=this;return{listeners:Object(l["a"])({},this.$listeners,{start:function(e){t.$store.dispatch("drag",{}),t.$listeners.start&&t.$listeners.start(e)},end:function(e){t.$store.dispatch("drag",null),t.$listeners.end&&t.$listeners.end(e)}})}},computed:{dragOptions:function(){var t=!1;return t=!0===this.handle?".k-sort-handle":this.handle,Object(l["a"])({fallbackClass:"k-sortable-fallback",fallbackOnBody:!0,forceFallback:!0,ghostClass:"k-sortable-ghost",handle:t,scroll:document.querySelector(".k-panel-view")},this.options)}}},bd=vd,kd=Object(h["a"])(bd,fd,hd,!1,null,null,null),$d=kd.exports,_d={data:function(){return{error:null}},errorCaptured:function(t){return d.debug&&window.console.error(t),this.error=t,!1},render:function(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]}},yd=_d,xd=Object(h["a"])(yd,Xr,Zr,!1,null,null,null),wd=xd.exports,Od=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)},Sd=[],Cd=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:{disabled:t.disabled,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)},Ed=[],Td={props:{disabled:Boolean,rel:String,tabindex:String,target:String,title:String,to:String},data:function(){return{relAttr:"_blank"===this.target?"noreferrer noopener":this.rel,listeners:Object(l["a"])({},this.$listeners,{click:this.onClick})}},computed:{href:function(){return void 0===this.$route||"/"!==this.to[0]||this.target?this.to:(this.$router.options.url||"")+this.to}},methods:{isRoutable:function(t){return void 0!==this.$route&&(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&(!t.defaultPrevented&&((void 0===t.button||0===t.button)&&!this.target)))},onClick:function(t){if(!0===this.disabled)return t.preventDefault(),!1;this.isRoutable(t)&&(t.preventDefault(),this.$router.push(this.to)),this.$emit("click",t)},focus:function(){this.$refs.link.focus()}}},jd=Td,Id=Object(h["a"])(jd,Cd,Ed,!1,null,null,null),Ld=Id.exports,qd={components:{"k-link":Ld},props:{link:String,size:{type:String},tag:{type:String,default:"h2"},theme:{type:String}}},Nd=qd,Ad=(n("f8a7"),Object(h["a"])(Nd,Od,Sd,!1,null,null,null)),Bd=Ad.exports,Pd=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{class:"k-icon k-icon-"+t.type,attrs:{"aria-label":t.alt,role:t.alt?"img":null,"aria-hidden":!t.alt,"data-back":t.back,"data-size":t.size}},[t.emoji?n("span",{staticClass:"k-icon-emoji"},[t._v(t._s(t.type))]):n("svg",{style:{color:t.color},attrs:{viewBox:"0 0 16 16"}},[n("use",{attrs:{"xlink:href":"#icon-"+t.type}})])])},Dd=[],Md={props:{alt:String,color:String,back:String,emoji:Boolean,size:String,type:String}},Rd=Md,zd=(n("3342"),Object(h["a"])(Rd,Pd,Dd,!1,null,null,null)),Fd=zd.exports,Ud=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},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)])},Hd=[],Kd={props:{src:String,alt:String,ratio:String,back:String,cover:Boolean},data:function(){return{loaded:{type:Boolean,default:!1},error:{type:Boolean,default:!1}}},computed:{ratioPadding:function(){return Hu(this.ratio||"1/1")}},created:function(){var t=this,e=new Image;e.onload=function(){t.loaded=!0,t.$emit("load")},e.onerror=function(){t.error=!0,t.$emit("error")},e.src=this.src}},Vd=Kd,Yd=(n("0d56"),Object(h["a"])(Vd,Ud,Hd,!1,null,null,null)),Gd=Yd.exports,Wd=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("progress",{staticClass:"k-progress",attrs:{max:"100"},domProps:{value:t.state}},[t._v("\n "+t._s(t.state)+"%\n")])},Jd=[],Xd={props:{value:{type:Number,default:0}},data:function(){return{state:this.value}},methods:{set:function(t){this.state=t}}},Zd=Xd,Qd=(n("9799"),Object(h["a"])(Zd,Wd,Jd,!1,null,null,null)),tp=Qd.exports,ep=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{staticClass:"k-sort-handle",attrs:{"aria-hidden":"true"}},[n("svg",{attrs:{viewBox:"0 0 16 16"}},[n("use",{attrs:{"xlink:href":"#icon-sort"}})])])},np=[],ip=(n("35cb"),{}),sp=Object(h["a"])(ip,ep,np,!1,null,null,null),ap=sp.exports,op=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n(t.component,t._g({directives:[{name:"tab",rawName:"v-tab"}],ref:"button",tag:"component",staticClass:"k-button",attrs:{"aria-current":t.current,autofocus:t.autofocus,id:t.id,disabled:t.disabled,"data-tabbed":t.tabbed,"data-theme":t.theme,"data-responsive":t.responsive,role:t.role,tabindex:t.tabindex,target:t.target,title:t.tooltip,to:t.link,type:t.link?null:t.type}},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)},rp=[],lp={components:{"k-icon":Fd,"k-link":Ld},directives:{tab:E},inheritAttrs:!1,props:{autofocus:Boolean,current:[String,Boolean],disabled:Boolean,icon:String,id:[String,Number],link:String,responsive:Boolean,role:String,target:String,tabindex:String,theme:String,tooltip:String,type:{type:String,default:"button"}},data:function(){return{tabbed:!1}},computed:{component:function(){return this.link?"k-link":"button"},imageUrl:function(){return this.image?"object"===Object(Kr["a"])(this.image)?this.image.url:this.image:null}},methods:{focus:function(){this.$refs.button.focus()},tab:function(){this.focus(),this.tabbed=!0},untab:function(){this.tabbed=!1}}},up=lp,cp=(n("3787"),Object(h["a"])(up,op,rp,!1,null,null,null)),dp=cp.exports,pp=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-button-group"},[t._t("default")],2)},fp=[],hp=(n("a567"),{}),mp=Object(h["a"])(hp,pp,fp,!1,null,null,null),gp=mp.exports,vp=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{staticClass:"k-dropdown",on:{click:function(t){t.stopPropagation()}}},[t._t("default")],2)},bp=[],kp=(n("f95f"),{}),$p=Object(h["a"])(kp,vp,bp,!1,null,null,null),_p=$p.exports,yp=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}},[t._t("default",t._l(t.items,function(e,i){return n("k-dropdown-item",t._b({key:t._uid+"-item-"+i,ref:t._uid+"-item-"+i,refInFor:!0,on:{click:function(n){return t.$emit("action",e.click)}}},"k-dropdown-item",e,!1),[t._v("\n "+t._s(e.text)+"\n ")])}))],2):t._e()},xp=[],wp=null,Op={props:{options:[Array,Function],align:String},data:function(){return{items:[],current:-1,isOpen:!1}},methods:{fetchOptions:function(t){if(!this.options)return t(this.items);"string"===typeof this.options?fetch(this.options).then(function(t){return t.json()}).then(function(e){return t(e)}):"function"===typeof this.options?this.options(t):Wi()(this.options)&&t(this.options)},open:function(){var t=this;this.reset(),wp&&wp!==this&&wp.close(),this.fetchOptions(function(e){t.$events.$on("keydown",t.navigate),t.$events.$on("click",t.close),t.items=e,t.isOpen=!0,t.$emit("open"),wp=t})},reset:function(){this.current=-1,this.$events.$off("keydown",this.navigate),this.$events.$off("click",this.close)},close:function(){this.reset(),this.isOpen=wp=!1,this.$emit("close")},toggle:function(){this.isOpen?this.close():this.open()},focus:function(t){t=t||0,this.$children[t]&&this.$children[t].focus&&(this.current=t,this.$children[t].focus())},navigate:function(t){switch(t.code){case"Escape":case"ArrowLeft":this.close(),this.$emit("leave",t.code);break;case"ArrowUp":t.preventDefault(),this.current>0?(this.current--,this.focus(this.current)):(this.close(),this.$emit("leave",t.code));break;case"ArrowDown":t.preventDefault(),this.current1?[t._v(t._s(t.detailsText))]:t._e(),t._v(t._s(t.total)+"\n ")],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",[n("label",{attrs:{for:"k-pagination-input"}},[t._v(t._s(t.pageLabel))]),n("input",{ref:"page",attrs:{id:"k-pagination-input",min:1,max:t.pages,type:"number"},domProps:{value:t.currentPage},on:{keydown:[function(t){t.stopPropagation()},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.goTo(e.target.value)}]}}),n("k-button",{attrs:{icon:"angle-up"},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)+"\n ")],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()},Fp=[],Up={props:{align:{type:String,default:"left"},details:{type:Boolean,default:!1},dropdown:{type:Boolean,default:!0},validate:{type:Function,default:function(){return Hr.a.resolve()}},page:{type:Number,default:1},total:{type:Number,default:0},limit:{type:Number,default:10},keys:{type:Boolean,default:!1},pageLabel:{type:String,default:"Page"},prevLabel:{type:String,default:function(){return this.$t("prev")}},nextLabel:{type:String,default:function(){return this.$t("next")}}},data:function(){return{currentPage:this.page}},computed:{show:function(){return this.pages>1},start:function(){return(this.currentPage-1)*this.limit+1},end:function(){var t=this.start-1+this.limit;return t>this.total?this.total:t},detailsText:function(){return 1===this.limit?this.start+" / ":this.start+"-"+this.end+" / "},pages:function(){return Math.ceil(this.total/this.limit)},hasPrev:function(){return this.start>1},hasNext:function(){return this.endthis.limit},offset:function(){return this.start-1}},watch:{page:function(t){this.currentPage=t}},created:function(){!0===this.keys&&window.addEventListener("keydown",this.navigate,!1)},destroyed:function(){window.removeEventListener("keydown",this.navigate,!1)},methods:{goTo:function(t){var e=this;this.validate(t).then(function(){t<1&&(t=1),t>e.pages&&(t=e.pages),e.currentPage=t,e.$refs.dropdown&&e.$refs.dropdown.close(),e.$emit("paginate",{page:is()(e.currentPage),start:e.start,end:e.end,limit:e.limit,offset:e.offset})}).catch(function(){})},prev:function(){this.goTo(this.currentPage-1)},next:function(){this.goTo(this.currentPage+1)},navigate:function(t){switch(t.code){case"ArrowLeft":this.prev();break;case"ArrowRight":this.next();break}}}},Hp=Up,Kp=(n("a66d"),Object(h["a"])(Hp,zp,Fp,!1,null,null,null)),Vp=Kp.exports,Yp=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-button-group",{staticClass:"k-prev-next"},[n("k-button",t._b({attrs:{icon:"angle-left"}},"k-button",t.prev,!1)),n("k-button",t._b({attrs:{icon:"angle-right"}},"k-button",t.next,!1))],1)},Gp=[],Wp={props:{prev:{type:Object,default:function(){return{disabled:!0,link:"#"}}},next:{type:Object,default:function(){return{disabled:!0,link:"#"}}}}},Jp=Wp,Xp=(n("7a7d"),Object(h["a"])(Jp,Yp,Gp,!1,null,null,null)),Zp=Xp.exports,Qp=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{ref:"button",staticClass:"k-tag",attrs:{"data-size":t.size,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(e))}}},[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()])},tf=[],ef={props:{removable:Boolean,size:String},methods:{remove:function(){this.removable&&this.$emit("remove")},focus:function(){this.$refs.button.focus()}}},nf=ef,sf=(n("021f"),Object(h["a"])(nf,Qp,tf,!1,null,null,null)),af=sf.exports,of=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.user&&t.view?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"},[n("ul",[t._l(t.views,function(e,i){return e.menu?n("li",{key:"menu-item-"+i,attrs:{"aria-current":t.$store.state.view===i}},[n("k-dropdown-item",{attrs:{disabled:!1===t.$permissions.access[i],icon:e.icon,link:e.link}},[t._v("\n "+t._s(t.$t("view."+i,e.label))+"\n ")])],1):t._e()}),n("li",[n("hr")]),n("li",{attrs:{"aria-current":"account"===t.$route.meta.view}},[n("k-dropdown-item",{attrs:{icon:"account",link:"/account"}},[t._v("\n "+t._s(t.$t("view.account"))+"\n ")])],1),n("li",[n("hr")]),n("li",[n("k-dropdown-item",{attrs:{icon:"logout",link:"/logout"}},[t._v("\n "+t._s(t.$t("logout"))+"\n ")])],1)],2)])],1),t.view?n("k-link",{directives:[{name:"tab",rawName:"v-tab"}],staticClass:"k-topbar-button k-topbar-view-button",attrs:{to:t.view.link}},[n("k-icon",{attrs:{type:t.view.icon}}),t._v(" "+t._s(t.breadcrumbTitle)+"\n ")],1):t._e(),t.$store.state.breadcrumb.length>1?n("k-dropdown",{staticClass:"k-topbar-breadcrumb-menu"},[n("k-button",{staticClass:"k-topbar-button",on:{click:function(e){return t.$refs.crumb.toggle()}}},[t._v("\n …\n "),n("k-icon",{attrs:{type:"angle-down"}})],1),n("k-dropdown-content",{ref:"crumb"},[n("k-dropdown-item",{attrs:{icon:t.view.icon,link:t.view.link}},[t._v("\n "+t._s(t.$t("view."+t.$store.state.view,t.view.label))+"\n ")]),t._l(t.$store.state.breadcrumb,function(e,i){return n("k-dropdown-item",{key:"crumb-"+i+"-dropdown",attrs:{icon:t.view.icon,link:e.link}},[t._v("\n "+t._s(e.label)+"\n ")])})],2)],1):t._e(),n("nav",{staticClass:"k-topbar-crumbs"},t._l(t.$store.state.breadcrumb,function(e,i){return n("k-link",{directives:[{name:"tab",rawName:"v-tab"}],key:"crumb-"+i,attrs:{to:e.link}},[t._v("\n "+t._s(e.label)+"\n ")])}),1),n("div",{staticClass:"k-topbar-signals"},[n("span",{directives:[{name:"show",rawName:"v-show",value:t.$store.state.isLoading,expression:"$store.state.isLoading"}],staticClass:"k-topbar-loader"},[n("svg",{attrs:{viewBox:"0 0 16 18"}},[n("path",{attrs:{fill:"white",d:"M8,0 L16,4.50265232 L16,13.5112142 L8,18.0138665 L0,13.5112142 L0,4.50265232 L8,0 Z M2.10648757,5.69852516 L2.10648757,12.3153414 L8,15.632396 L13.8935124,12.3153414 L13.8935124,5.69852516 L8,2.38147048 L2.10648757,5.69852516 Z"}})])]),t.notification?n("k-button",{staticClass:"k-topbar-notification",attrs:{theme:"positive"},on:{click:function(e){return t.$store.dispatch("notification/close")}}},[t._v("\n "+t._s(t.notification.message)+"\n ")]):[t.unregistered?n("div",{staticClass:"k-registration"},[n("p",[t._v(t._s(t.$t("license.unregistered")))]),n("k-button",{attrs:{responsive:!0,icon:"key"},on:{click:function(e){return t.$emit("register")}}},[t._v(t._s(t.$t("license.register")))]),n("k-button",{attrs:{responsive:!0,link:"https://getkirby.com/buy",target:"_blank",icon:"cart"}},[t._v("\n "+t._s(t.$t("license.buy"))+"\n ")])],1):t._e(),n("k-button",{attrs:{tooltip:t.$t("search"),icon:"search"},on:{click:function(e){return t.$store.dispatch("search",!0)}}})]],2)],1)])],1):t._e()},rf=[],lf=Object(l["a"])({site:{link:"/site",icon:"page",menu:!0},users:{link:"/users",icon:"users",menu:!0},settings:{link:"/settings",icon:"settings",menu:!0},account:{link:"/account",icon:"users",menu:!1}},window.panel.plugins.views),uf={computed:{breadcrumbTitle:function(){var t=this.$t("view.".concat(this.$store.state.view),this.view.label);return"site"===this.$store.state.view&&this.$store.state.system.info.title||t},view:function(){return lf[this.$store.state.view]},views:function(){return lf},user:function(){return this.$store.state.user.current},notification:function(){return this.$store.state.notification.type&&"error"!==this.$store.state.notification.type?this.$store.state.notification:null},unregistered:function(){return!this.$store.state.system.info.license}}},cf=uf,df=(n("1e3b"),Object(h["a"])(cf,of,rf,!1,null,null,null)),pf=df.exports,ff=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-grid",{staticClass:"k-sections",attrs:{gutter:"large"}},t._l(t.columns,function(e,i){return n("k-column",{key:t.parent+"-column-"+i,attrs:{width:e.width}},[t._l(e.sections,function(e,s){return[t.exists(e.type)?n("k-"+e.type+"-section",t._b({key:t.parent+"-column-"+i+"-section-"+s+"-"+t.blueprint,tag:"component",class:"k-section k-section-name-"+e.name,attrs:{name:e.name,parent:t.parent,blueprint:t.blueprint},on:{submit:function(e){return t.$emit("submit",e)}}},"component",e,!1)):[n("k-box",{key:t.parent+"-column-"+i+"-section-"+s,attrs:{text:t.$t("error.section.type.invalid",{type:e.type}),theme:"negative"}})]]})],2)}),1)},hf=[],mf={props:{parent:String,blueprint:String,columns:[Array,Object]},methods:{exists:function(t){return A["a"].options.components["k-"+t+"-section"]}}},gf=mf,vf=(n("6bcd"),Object(h["a"])(gf,ff,hf,!1,null,null,null)),bf=vf.exports,kf=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)},$f=[],_f={props:{blueprint:String,help:String,name:String,parent:String},methods:{load:function(){return this.$api.get(this.parent+"/sections/"+this.name)}}},yf={mixins:[_f],data:function(){return{headline:null,issue:null,text:null,theme:null}},created:function(){var t=this;this.load().then(function(e){t.headline=e.options.headline,t.text=e.options.text,t.theme=e.options.theme||"info"}).catch(function(e){t.issue=e})}},xf=yf,wf=(n("4333"),Object(h["a"])(xf,kf,$f,!1,null,null,null)),Of=wf.exports,Sf=function(){var t=this,e=t.$createElement,n=t._self._c||e;return!1===t.isLoading?n("section",{staticClass:"k-pages-section"},[n("header",{staticClass:"k-section-header"},[n("k-headline",{attrs:{link:t.options.link}},[t._v("\n "+t._s(t.headline)+" "),t.options.min?n("abbr",{attrs:{title:"This section is required"}},[t._v("*")]):t._e()]),t.add?n("k-button-group",[n("k-button",{attrs:{icon:"add"},on:{click:function(e){return t.action(null,"create")}}},[t._v(t._s(t.$t("add")))])],1):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("\n "+t._s(t.error)+"\n ")])],1)]:[t.data.length?n("k-collection",{attrs:{layout:t.options.layout,help:t.help,items:t.data,pagination:t.pagination,sortable:t.options.sortable,size:t.options.size},on:{change:t.sort,paginate:t.paginate,action:t.action}}):[n("k-empty",{attrs:{layout:t.options.layout,icon:"page"},on:{click:function(e){t.add&&t.action(null,"create")}}},[t._v("\n "+t._s(t.options.empty||t.$t("pages.empty"))+"\n ")]),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)],n("k-page-create-dialog",{ref:"create"}),n("k-page-rename-dialog",{ref:"rename",on:{success:t.update}}),n("k-page-url-dialog",{ref:"url",on:{success:t.update}}),n("k-page-status-dialog",{ref:"status",on:{success:t.update}}),n("k-page-template-dialog",{ref:"template",on:{success:t.update}}),n("k-page-remove-dialog",{ref:"remove",on:{success:t.update}})]],2):t._e()},Cf=[],Ef={props:{blueprint:String,parent:String,help:String,name:String},data:function(){return{data:[],error:null,isLoading:!1,options:{empty:null,headline:null,layout:"list",link:null,max:null,min:null,size:null,sortable:null},pagination:{page:null}}},computed:{headline:function(){return this.options.headline||" "},language:function(){return this.$store.state.languages.current},paginationId:function(){return"kirby$pagination$"+this.parent+"/"+this.name}},watch:{language:function(){this.reload()}},methods:{items:function(t){return t},load:function(t){var e=this;t||(this.isLoading=!0),null===this.pagination.page&&(this.pagination.page=localStorage.getItem(this.paginationId)||1),this.$api.get(this.parent+"/sections/"+this.name,{page:this.pagination.page}).then(function(t){e.isLoading=!1,e.options=t.options,e.pagination=t.pagination,e.data=e.items(t.data)}).catch(function(t){e.isLoading=!1,e.error=t.message})},paginate:function(t){localStorage.setItem(this.paginationId,t.page),this.pagination=t,this.reload()},reload:function(){this.load(!0)}}},Tf={mixins:[Ef],computed:{add:function(){return this.options.add&&this.$permissions.pages.create}},created:function(){this.load(),this.$events.$on("page.changeStatus",this.reload)},destroyed:function(){this.$events.$off("page.changeStatus",this.reload)},methods:{action:function(t,e){var n=this;switch(e){case"create":this.$refs.create.open(this.options.link||this.parent,this.parent+"/children/blueprints",this.name);break;case"preview":var i=window.open("","_blank");i.document.write="...",this.$api.pages.preview(t.id).then(function(t){i.location.href=t}).catch(function(t){n.$store.dispatch("notification/error",t)});break;case"rename":this.$refs.rename.open(t.id);break;case"url":this.$refs.url.open(t.id);break;case"status":this.$refs.status.open(t.id);break;case"template":this.$refs.template.open(t.id);break;case"remove":if(this.data.length<=this.options.min){var s=this.options.min>1?"plural":"singular";this.$store.dispatch("notification/error",{message:this.$t("error.section.pages.min."+s,{section:this.options.headline||this.name,min:this.options.min})});break}this.$refs.remove.open(t.id);break;default:throw new Error("Invalid action")}},items:function(t){var e=this;return t.map(function(t){return t.flag={class:"k-status-flag k-status-flag-"+t.status,tooltip:e.$t("page.status"),icon:!1===t.permissions.changeStatus?"protected":"circle",disabled:!1===t.permissions.changeStatus,click:function(){e.action(t,"status")}},t.options=function(n){e.$api.pages.options(t.id,"list").then(function(t){return n(t)}).catch(function(t){e.$store.dispatch("notification/error",t)})},t.sortable=t.permissions.sort&&e.options.sortable,t})},sort:function(t){var e=this,n=null;if(t.added&&(n="added"),t.moved&&(n="moved"),n){var i=t[n].element,s=t[n].newIndex+1+this.pagination.offset;this.$api.pages.status(i.id,"listed",s).then(function(){e.$store.dispatch("notification/success",":)")}).catch(function(t){e.$store.dispatch("notification/error",{message:t.message,details:t.details}),e.reload()})}},update:function(){this.reload(),this.$events.$emit("model.update")}}},jf=Tf,If=Object(h["a"])(jf,Sf,Cf,!1,null,null,null),Lf=If.exports,qf=function(){var t=this,e=t.$createElement,n=t._self._c||e;return!1===t.isLoading?n("section",{staticClass:"k-files-section"},[n("header",{staticClass:"k-section-header"},[n("k-headline",[t._v("\n "+t._s(t.headline)+" "),t.options.min?n("abbr",{attrs:{title:"This section is required"}},[t._v("*")]):t._e()]),t.add?n("k-button-group",[n("k-button",{attrs:{icon:"upload"},on:{click:t.upload}},[t._v(t._s(t.$t("add")))])],1):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("\n "+t._s(t.error)+"\n ")])],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.options.sortable,size:t.options.size},on:{sort:t.sort,paginate:t.paginate,action:t.action}}):[n("k-empty",{attrs:{layout:t.options.layout,icon:"image"},on:{click:function(e){t.add&&t.upload()}}},[t._v("\n "+t._s(t.options.empty||t.$t("files.empty"))+"\n ")]),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-file-rename-dialog",{ref:"rename",on:{success:t.update}}),n("k-file-remove-dialog",{ref:"remove",on:{success:t.update}}),n("k-upload",{ref:"upload",on:{success:t.uploaded,error:t.reload}})]],2):t._e()},Nf=[],Af={mixins:[Ef],computed:{add:function(){return!(!this.$permissions.files.create||!1===this.options.upload)&&this.options.upload}},created:function(){this.load(),this.$events.$on("model.update",this.reload)},destroyed:function(){this.$events.$off("model.update",this.reload)},methods:{action:function(t,e){switch(e){case"edit":this.$router.push(t.link);break;case"download":window.open(t.url);break;case"rename":this.$refs.rename.open(t.parent,t.filename);break;case"replace":this.replace(t);break;case"remove":if(this.data.length<=this.options.min){var n=this.options.min>1?"plural":"singular";this.$store.dispatch("notification/error",{message:this.$t("error.section.files.min."+n,{section:this.options.headline||this.name,min:this.options.min})});break}this.$refs.remove.open(t.parent,t.filename);break}},drop:function(t){if(!1===this.add)return!1;this.$refs.upload.drop(t,Object(l["a"])({},this.add,{url:d.api+"/"+this.add.api}))},items:function(t){var e=this;return t.map(function(t){return t.options=function(n){e.$api.files.options(t.parent,t.filename,"list").then(function(t){return n(t)}).catch(function(t){e.$store.dispatch("notification/error",t)})},t.sortable=e.options.sortable,t})},replace:function(t){this.$refs.upload.open({url:d.api+"/"+this.$api.files.url(t.parent,t.filename),accept:t.mime,multiple:!1})},sort:function(t){var e=this;if(!1===this.options.sortable)return!1;t=t.map(function(t){return t.id}),this.$api.patch(this.parent+"/files/sort",{files:t,index:this.pagination.offset}).then(function(){e.$store.dispatch("notification/success",":)")}).catch(function(t){e.reload(),e.$store.dispatch("notification/error",t.message)})},update:function(){this.$events.$emit("model.update")},upload:function(){if(!1===this.add)return!1;this.$refs.upload.open(Object(l["a"])({},this.add,{url:d.api+"/"+this.add.api}))},uploaded:function(){this.$events.$emit("file.create"),this.$events.$emit("model.update"),this.$store.dispatch("notification/success",":)")}}},Bf=Af,Pf=Object(h["a"])(Bf,qf,Nf,!1,null,null,null),Df=Pf.exports,Mf=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,theme:"negative"}})]:t._e(),n("k-form",{attrs:{fields:t.fields,validate:!0,value:t.values},on:{input:t.input,submit:t.onSubmit}})],2)},Rf=[],zf={mixins:[_f],data:function(){return{fields:{},isLoading:!0,issue:null}},computed:{id:function(){return this.$store.state.form.current},language:function(){return this.$store.state.languages.current},values:function(){return this.$store.getters["form/values"](this.id)}},watch:{language:function(){this.fetch()}},created:function(){this.fetch()},methods:{input:function(t,e,n){this.$store.dispatch("form/update",[this.id,n,t[n]])},fetch:function(){var t=this;this.$api.get(this.parent+"/sections/"+this.name).then(function(e){t.fields=e.fields,ne()(t.fields).forEach(function(e){t.fields[e].section=t.name,t.fields[e].endpoints={field:t.parent+"/fields/"+e,section:t.parent+"/sections/"+t.name,model:t.parent}}),t.isLoading=!1}).catch(function(e){t.issue=e,t.isLoading=!1})},onSubmit:function(t){this.$events.$emit("keydown.cmd.s",t)}}},Ff=zf,Uf=(n("7d5d"),Object(h["a"])(Ff,Mf,Rf,!1,null,null,null)),Hf=Uf.exports,Kf=function(){var t=this,e=t.$createElement,n=t._self._c||e;return 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),n("p",[t._t("default")],2)])],1)])},Vf=[],Yf=(n("d221"),{}),Gf=Object(h["a"])(Yf,Kf,Vf,!1,null,null,null),Wf=Gf.exports;A["a"].component("k-dialog",U),A["a"].component("k-error-dialog",W),A["a"].component("k-file-rename-dialog",ct),A["a"].component("k-file-remove-dialog",et),A["a"].component("k-files-dialog",gt),A["a"].component("k-language-create-dialog",yt),A["a"].component("k-language-remove-dialog",Et),A["a"].component("k-language-update-dialog",Nt),A["a"].component("k-page-create-dialog",Rt),A["a"].component("k-page-rename-dialog",Zt),A["a"].component("k-page-remove-dialog",Vt),A["a"].component("k-page-status-dialog",oe),A["a"].component("k-page-template-dialog",pe),A["a"].component("k-page-url-dialog",be),A["a"].component("k-pages-dialog",we),A["a"].component("k-site-rename-dialog",Ee),A["a"].component("k-user-create-dialog",Ne),A["a"].component("k-user-email-dialog",Re),A["a"].component("k-user-language-dialog",Ve),A["a"].component("k-user-password-dialog",Ze),A["a"].component("k-user-remove-dialog",an),A["a"].component("k-user-rename-dialog",dn),A["a"].component("k-user-role-dialog",vn),A["a"].component("k-users-dialog",xn),A["a"].component("k-calendar",Hn),A["a"].component("k-counter",Jn),A["a"].component("k-autocomplete",An),A["a"].component("k-form",ni),A["a"].component("k-form-buttons",li),A["a"].component("k-field",hi),A["a"].component("k-fieldset",$i),A["a"].component("k-input",Si),A["a"].component("k-upload",Di),A["a"].component("k-checkbox-input",Ki),A["a"].component("k-checkboxes-input",Qi),A["a"].component("k-date-input",rs),A["a"].component("k-datetime-input",fs),A["a"].component("k-email-input",xs),A["a"].component("k-multiselect-input",Ts),A["a"].component("k-number-input",As),A["a"].component("k-password-input",Ms),A["a"].component("k-radio-input",Ks),A["a"].component("k-range-input",Xs),A["a"].component("k-select-input",ia),A["a"].component("k-tags-input",ua),A["a"].component("k-tel-input",fa),A["a"].component("k-text-input",ks),A["a"].component("k-textarea-input",Ra),A["a"].component("k-time-input",Ja),A["a"].component("k-toggle-input",no),A["a"].component("k-url-input",oo),A["a"].component("k-checkboxes-field",fo),A["a"].component("k-date-field",ko),A["a"].component("k-email-field",Oo),A["a"].component("k-files-field",Lo),A["a"].component("k-headline-field",Do),A["a"].component("k-info-field",Ho),A["a"].component("k-line-field",Wo),A["a"].component("k-multiselect-field",er),A["a"].component("k-number-field",rr),A["a"].component("k-pages-field",gr),A["a"].component("k-password-field",yr),A["a"].component("k-radio-field",Er),A["a"].component("k-range-field",Nr),A["a"].component("k-select-field",Rr),A["a"].component("k-structure-field",nl),A["a"].component("k-tags-field",ll),A["a"].component("k-text-field",$l),A["a"].component("k-textarea-field",Sl),A["a"].component("k-tel-field",hl),A["a"].component("k-time-field",Ll),A["a"].component("k-toggle-field",Dl),A["a"].component("k-url-field",Hl),A["a"].component("k-users-field",Jl),A["a"].component("k-email-field-preview",pu),A["a"].component("k-files-field-preview",nu),A["a"].component("k-pages-field-preview",bu),A["a"].component("k-url-field-preview",lu),A["a"].component("k-users-field-preview",wu),A["a"].component("k-bar",Tu),A["a"].component("k-box",zu),A["a"].component("k-card",Gu),A["a"].component("k-cards",tc),A["a"].component("k-collection",oc),A["a"].component("k-column",pc),A["a"].component("k-dropzone",bc),A["a"].component("k-empty",wc),A["a"].component("k-file-preview",jc),A["a"].component("k-grid",Bc),A["a"].component("k-header",Fc),A["a"].component("k-list",Gc),A["a"].component("k-list-item",td),A["a"].component("k-tabs",od),A["a"].component("k-view",pd),A["a"].component("k-draggable",$d),A["a"].component("k-error-boundary",wd),A["a"].component("k-headline",Bd),A["a"].component("k-icon",Fd),A["a"].component("k-image",Gd),A["a"].component("k-progress",tp),A["a"].component("k-sort-handle",ap),A["a"].component("k-text",Pu),A["a"].component("k-button",dp),A["a"].component("k-button-group",gp),A["a"].component("k-dropdown",_p),A["a"].component("k-dropdown-content",Ep),A["a"].component("k-dropdown-item",Np),A["a"].component("k-languages-dropdown",Rp),A["a"].component("k-link",Ld),A["a"].component("k-pagination",Vp),A["a"].component("k-prev-next",Zp),A["a"].component("k-tag",af),A["a"].component("k-topbar",pf),A["a"].component("k-sections",bf),A["a"].component("k-info-section",Of),A["a"].component("k-pages-section",Lf),A["a"].component("k-files-section",Df),A["a"].component("k-fields-section",Hf),A["a"].component("k-error-view",Wf);var Jf={user:function(){return Cm.get("auth")},login:function(t){var e={long:t.remember||!1,email:t.email,password:t.password};return Cm.post("auth/login",e).then(function(t){return t.user})},logout:function(){return Cm.post("auth/logout")}},Xf={get:function(t,e,n){return Cm.get(this.url(t,e),n).then(function(t){return!0===Wi()(t.content)&&(t.content={}),t})},update:function(t,e,n){return Cm.patch(this.url(t,e),n)},rename:function(t,e,n){return Cm.patch(this.url(t,e,"name"),{name:n})},url:function(t,e,n){var i=t+"/files/"+e;return n&&(i+="/"+n),i},link:function(t,e,n){return"/"+this.url(t,e,n)},delete:function(t,e){return Cm.delete(this.url(t,e))},options:function(t,e,n){return Cm.get(this.url(t,e),{select:"options"}).then(function(t){var e=t.options,i=[];return"list"===n&&i.push({icon:"open",text:A["a"].i18n.translate("open"),click:"download"}),i.push({icon:"title",text:A["a"].i18n.translate("rename"),click:"rename",disabled:!e.changeName}),i.push({icon:"upload",text:A["a"].i18n.translate("replace"),click:"replace",disabled:!e.replace}),i.push({icon:"trash",text:A["a"].i18n.translate("delete"),click:"remove",disabled:!e.delete}),i})},breadcrumb:function(t,e){var n=null,i=[];switch(e){case"UserFile":i.push({label:t.parent.username,link:Cm.users.link(t.parent.id)}),n="users/"+t.parent.id;break;case"SiteFile":n="site";break;case"PageFile":i=t.parents.map(function(t){return{label:t.title,link:Cm.pages.link(t.id)}}),n=Cm.pages.url(t.parent.id);break}return i.push({label:t.filename,link:this.link(n,t.filename)}),i}},Zf={create:function(t,e){return null===t||"/"===t?Cm.post("site/children",e):Cm.post(this.url(t,"children"),e)},url:function(t,e){var n=null===t?"pages":"pages/"+t.replace(/\//g,"+");return e&&(n+="/"+e),n},link:function(t){return"/"+this.url(t)},get:function(t,e){return Cm.get(this.url(t),e).then(function(t){return!0===Wi()(t.content)&&(t.content={}),t})},options:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"view";return Cm.get(this.url(t),{select:"options"}).then(function(t){var n=t.options,i=[];return"list"===e&&i.push({click:"preview",icon:"open",text:A["a"].i18n.translate("open"),disabled:!1===n.preview}),i.push({click:"rename",icon:"title",text:A["a"].i18n.translate("rename"),disabled:!n.changeTitle}),i.push({click:"url",icon:"url",text:A["a"].i18n.translate("page.changeSlug"),disabled:!n.changeSlug}),i.push({click:"status",icon:"preview",text:A["a"].i18n.translate("page.changeStatus"),disabled:!n.changeStatus}),i.push({click:"template",icon:"template",text:A["a"].i18n.translate("page.changeTemplate"),disabled:!n.changeTemplate}),i.push({click:"remove",icon:"trash",text:A["a"].i18n.translate("delete"),disabled:!n.delete}),i})},preview:function(t){return this.get(t,{select:"previewUrl"}).then(function(t){return t.previewUrl})},update:function(t,e){return Cm.patch(this.url(t),e)},children:function(t,e){return Cm.post(this.url(t,"children/search"),e)},files:function(t,e){return Cm.post(this.url(t,"files/search"),e)},delete:function(t,e){return Cm.delete(this.url(t),e)},slug:function(t,e){return Cm.patch(this.url(t,"slug"),{slug:e})},title:function(t,e){return Cm.patch(this.url(t,"title"),{title:e})},template:function(t,e){return Cm.patch(this.url(t,"template"),{template:e})},search:function(t,e){return t?Cm.post("pages/"+t.replace("/","+")+"/children/search?select=id,title,hasChildren",e):Cm.post("site/children/search?select=id,title,hasChildren",e)},status:function(t,e,n){return Cm.patch(this.url(t,"status"),{status:e,position:n})},breadcrumb:function(t){var e=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=t.parents.map(function(t){return{label:t.title,link:e.link(t.id)}});return!0===n&&i.push({label:t.title,link:this.link(t.id)}),i}},Qf=n("2f62"),th=(n("f559"),n("768b")),eh={namespaced:!0,state:{models:{},current:null,isLocked:!1},getters:{current:function(t){return t.current},exists:function(t){return function(e){return t.models.hasOwnProperty(e)}},hasChanges:function(t,e){return function(t){return ne()(e.model(t).changes).length>0}},id:function(t,e,n){return function(t){return n.languages.current?t+"/"+n.languages.current.code:t}},isCurrent:function(t){return function(e){return t.current=e}},model:function(t,e){return function(n){return e.exists(n)?t.models[n]:{originals:{},values:{},changes:{},api:null}}},originals:function(t,e){return function(t){return pr(e.model(t).originals)}},values:function(t,e){return function(t){return pr(e.model(t).values)}}},mutations:{CREATE:function(t,e){A["a"].set(t.models,e.id,{api:e.api,originals:pr(e.content),values:pr(e.content),changes:{}})},CURRENT:function(t,e){t.current=e},IS_LOCKED:function(t,e){t.isLocked=e},REMOVE:function(t,e){A["a"].delete(t.models,e),localStorage.removeItem("kirby$form$"+e)},DELETE_CHANGES:function(t,e){A["a"].set(t.models[e],"changes",{}),localStorage.removeItem("kirby$form$"+e)},SET_ORIGINALS:function(t,e){var n=Object(th["a"])(e,2),i=n[0],s=n[1];t.models[i].originals=pr(s)},SET_VALUES:function(t,e){var n=Object(th["a"])(e,2),i=n[0],s=n[1];t.models[i].values=pr(s)},UPDATE:function(t,e){var n=Object(th["a"])(e,3),i=n[0],s=n[1],a=n[2];a=pr(a),A["a"].set(t.models[i].values,s,a);var o=dr()(t.models[i].originals[s]),r=dr()(a);o===r?A["a"].delete(t.models[i].changes,s):A["a"].set(t.models[i].changes,s,!0),localStorage.setItem("kirby$form$"+i,dr()(t.models[i].values))}},actions:{create:function(t,e){t.rootState.languages.current&&t.rootState.languages.current.code&&(e.id=t.getters.id(e.id)),(e.id.startsWith("pages/")||e.id.startsWith("site"))&&delete e.content.title,t.commit("CREATE",e),t.commit("CURRENT",e.id);var n=localStorage.getItem("kirby$form$"+e.id);if(n){var i=JSON.parse(n);ne()(i).forEach(function(n){var s=i[n];t.commit("UPDATE",[e.id,n,s])})}},remove:function(t,e){t.commit("REMOVE",e)},revert:function(t,e){var n=t.getters.model(e);return Cm.get(n.api,{select:"content"}).then(function(n){(e.startsWith("pages/")||e.startsWith("site"))&&delete n.content.title,t.commit("SET_ORIGINALS",[e,n.content]),t.commit("SET_VALUES",[e,n.content]),t.commit("DELETE_CHANGES",e)})},save:function(t,e){e=e||t.state.current;var n=t.getters.model(e);return(!t.getters.isCurrent(e)||!t.state.isLocked)&&Cm.patch(n.api,n.values).then(function(){t.dispatch("revert",e)})},lock:function(t){t.commit("IS_LOCKED",!0)},unlock:function(t){t.commit("IS_LOCKED",!1)},update:function(t,e){var n=Object(th["a"])(e,3),i=n[0],s=n[1],a=n[2];t.commit("UPDATE",[i,s,a])}}},nh={namespaced:!0,state:{all:[],current:null,default:null},mutations:{SET_ALL:function(t,e){t.all=e.map(function(t){return{code:t.code,name:t.name,default:t.default,direction:t.direction}})},SET_CURRENT:function(t,e){t.current=e,e&&e.code&&localStorage.setItem("kirby$language",e.code)},SET_DEFAULT:function(t,e){t.default=e}},actions:{current:function(t,e){t.commit("SET_CURRENT",e)},install:function(t,e){var n=e.filter(function(t){return t.default})[0];t.commit("SET_ALL",e),t.commit("SET_DEFAULT",n);var i=localStorage.getItem("kirby$language");if(i){var s=e.filter(function(t){return t.code===i})[0];if(s)return void t.commit("SET_CURRENT",s)}t.commit("SET_CURRENT",n||e[0])},load:function(t){return Cm.get("languages").then(function(e){t.dispatch("install",e.data)})}}},ih={timer:null,namespaced:!0,state:{type:null,message:null,details:null,timeout:null},mutations:{SET:function(t,e){t.type=e.type,t.message=e.message,t.details=e.details,t.timeout=e.timeout},UNSET:function(t){t.type=null,t.message=null,t.details=null,t.timeout=null}},actions:{close:function(t){clearTimeout(this.timer),t.commit("UNSET")},open:function(t,e){t.dispatch("close"),t.commit("SET",e),e.timeout&&(this.timer=setTimeout(function(){t.dispatch("close")},e.timeout))},success:function(t,e){"string"===typeof e&&(e={message:e}),t.dispatch("open",Object(l["a"])({type:"success",timeout:4e3},e))},error:function(t,e){"string"===typeof e&&(e={message:e}),t.dispatch("open",Object(l["a"])({type:"error"},e))}}},sh={namespaced:!0,state:{info:{title:null}},mutations:{SET_INFO:function(t,e){t.info=e},SET_LICENSE:function(t,e){t.info.license=e},SET_TITLE:function(t,e){t.info.title=e}},actions:{title:function(t,e){t.commit("SET_TITLE",e)},register:function(t,e){t.commit("SET_LICENSE",e)},load:function(t,e){return!e&&t.state.info.isReady&&t.rootState.user.current?new Hr.a(function(e){e(t.state.info)}):Cm.system.info({view:"panel"}).then(function(e){return t.commit("SET_INFO",Object(l["a"])({isReady:e.isInstalled&&e.isOk},e)),e.languages&&t.dispatch("languages/install",e.languages,{root:!0}),t.dispatch("translation/install",e.translation,{root:!0}),t.dispatch("translation/activate",e.translation.id,{root:!0}),e.user&&t.dispatch("user/current",e.user,{root:!0}),t.state.info}).catch(function(e){t.commit("SET_INFO",{isBroken:!0,error:e.message})})}}},ah={namespaced:!0,state:{current:null,installed:[]},mutations:{SET_CURRENT:function(t,e){t.current=e},INSTALL:function(t,e){t.installed[e.id]=e}},actions:{load:function(t,e){return Cm.translations.get(e)},install:function(t,e){t.commit("INSTALL",e),A["a"].i18n.add(e.id,e.data)},activate:function(t,e){var n=t.state.installed[e];n?(A["a"].i18n.set(e),t.commit("SET_CURRENT",e),document.dir=n.direction,document.documentElement.lang=e):t.dispatch("load",e).then(function(n){t.dispatch("install",n),t.dispatch("activate",e)})}}},oh=n("8c4f"),rh=function(t,e,n){$m.dispatch("system/load").then(function(){var e=$m.state.user.current;if(!e)return $m.dispatch("user/visit",t.path),$m.dispatch("user/logout"),!1;var i=e.permissions.access;return!1===i.panel?(window.location.href=d.site,!1):!1===i[t.meta.view]?($m.dispatch("notification/error",{message:A["a"].i18n.translate("error.access.view")}),n("/")):void n()})},lh=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-error-view",{staticClass:"k-browser-view"},[n("p",[t._v("\n We are really sorry, but your browser does not support\n all features required for the Kirby Panel.\n ")]),!1===t.hasFetchSupport?[n("p",[n("strong",[t._v("Fetch")]),n("br"),t._v("\n We use Javascript's new Fetch API. You can find a list of supported browsers for this feature on\n "),n("strong",[n("a",{attrs:{href:"https://caniuse.com/#feat=fetch"}},[t._v("caniuse.com")])])])]:t._e(),!1===t.hasGridSupport?[n("p",[n("strong",[t._v("CSS Grid")]),n("br"),t._v("\n We use CSS Grids for all our layouts. You can find a list of supported browsers for this feature on\n "),n("strong",[n("a",{attrs:{href:"https://caniuse.com/#feat=css-grid"}},[t._v("caniuse.com")])])])]:t._e()],2)},uh=[],ch={grid:function(){return!(!window.CSS||!window.CSS.supports("display","grid"))},fetch:function(){return void 0!==window.fetch},all:function(){return this.fetch()&&this.grid()}},dh={computed:{hasFetchSupport:function(){return ch.fetch()},hasGridSupport:function(){return ch.grid()}},created:function(){ch.all()&&this.$router.push("/")}},ph=dh,fh=(n("d6fc"),Object(h["a"])(ph,lh,uh,!1,null,null,null)),hh=fh.exports,mh=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-error-boundary",{key:t.plugin,scopedSlots:t._u([{key:"error",fn:function(e){var i=e.error;return n("k-error-view",{},[t._v("\n "+t._s(i.message||i)+"\n ")])}}])},[n("k-"+t.plugin+"-plugin-view",{tag:"component"})],1)},gh=[],vh={props:{plugin:String},beforeRouteEnter:function(t,e,n){n(function(t){t.$store.dispatch("breadcrumb",[])})},watch:{plugin:function(){this.$store.dispatch("view",this.plugin)}},created:function(){this.$store.dispatch("view",this.plugin)}},bh=vh,kh=Object(h["a"])(bh,mh,gh,!1,null,null,null),$h=kh.exports,_h=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.issue?n("k-error-view",[t._v("\n "+t._s(t.issue.message)+"\n")]):n("div",{staticClass:"k-file-view"},[n("k-file-preview",{attrs:{file:t.file}}),n("k-view",{staticClass:"k-file-content"},[n("k-header",{attrs:{editable:t.permissions.changeName,tabs:t.tabs,tab:t.tab},on:{edit:function(e){return t.action("rename")}}},[t._v("\n\n "+t._s(t.file.filename)+"\n\n "),n("k-button-group",{attrs:{slot:"left"},slot:"left"},[n("k-button",{attrs:{responsive:!0,icon:"open"},on:{click:function(e){return t.action("download")}}},[t._v("\n "+t._s(t.$t("open"))+"\n ")]),n("k-dropdown",[n("k-button",{attrs:{responsive:!0,icon:"cog"},on:{click:function(e){return t.$refs.settings.toggle()}}},[t._v("\n "+t._s(t.$t("settings"))+"\n ")]),n("k-dropdown-content",{ref:"settings",attrs:{options:t.options},on:{action:t.action}})],1),n("k-languages-dropdown")],1),t.file.id?n("k-prev-next",{attrs:{slot:"right",prev:t.prev,next:t.next},slot:"right"}):t._e()],1),t.file.id?n("k-tabs",{key:t.tabsKey,ref:"tabs",attrs:{parent:t.$api.files.url(t.path,t.file.filename),tabs:t.tabs,blueprint:t.file.blueprint.name},on:{tab:function(e){t.tab=e}}}):t._e(),n("k-file-rename-dialog",{ref:"rename",on:{success:t.renamed}}),n("k-file-remove-dialog",{ref:"remove",on:{success:t.deleted}}),n("k-upload",{ref:"upload",attrs:{url:t.uploadApi,accept:t.file.mime,multiple:!1},on:{success:t.uploaded}})],1)],1)},yh=[],xh={created:function(){this.fetch(),this.$events.$on("keydown.left",this.toPrev),this.$events.$on("keydown.right",this.toNext)},destroyed:function(){this.$events.$off("keydown.left",this.toPrev),this.$events.$off("keydown.right",this.toNext)},methods:{toPrev:function(t){this.prev&&"body"===t.target.localName&&this.$router.push(this.prev.link)},toNext:function(t){this.next&&"body"===t.target.localName&&this.$router.push(this.next.link)}}},wh={mixins:[xh],props:{path:{type:String},filename:{type:String,required:!0}},data:function(){return{name:"",file:{id:null,parent:null,filename:"",url:"",prev:null,next:null,panelIcon:null,panelImage:null,mime:null,content:{}},permissions:{changeName:!1,delete:!1},issue:null,tabs:[],tab:null,options:null}},computed:{uploadApi:function(){return d.api+"/"+this.path+"/files/"+this.filename},prev:function(){if(this.file.prev)return{link:this.$api.files.link(this.path,this.file.prev.filename),tooltip:this.file.prev.filename}},tabsKey:function(){return"file-"+this.file.id+"-tabs"},language:function(){return this.$store.state.languages.current},next:function(){if(this.file.next)return{link:this.$api.files.link(this.path,this.file.next.filename),tooltip:this.file.next.filename}}},watch:{language:function(){this.fetch()},filename:function(){this.fetch()}},methods:{fetch:function(){var t=this;this.$api.files.get(this.path,this.filename,{view:"panel"}).then(function(e){t.file=e,t.file.next=e.nextWithTemplate,t.file.prev=e.prevWithTemplate,t.file.url=e.url,t.name=e.name,t.tabs=e.blueprint.tabs,t.permissions=e.options,t.options=function(e){t.$api.files.options(t.path,t.file.filename).then(function(t){e(t)})},t.$store.dispatch("breadcrumb",t.$api.files.breadcrumb(t.file,t.$route.name)),t.$store.dispatch("title",t.filename),t.$store.dispatch("form/create",{id:"files/"+e.id,api:t.$api.files.link(t.path,t.filename),content:e.content})}).catch(function(e){window.console.error(e),t.issue=e})},action:function(t){switch(t){case"download":window.open(this.file.url);break;case"rename":this.$refs.rename.open(this.path,this.file.filename);break;case"replace":this.$refs.upload.open({url:d.api+"/"+this.$api.files.url(this.path,this.file.filename),accept:this.file.mime});break;case"remove":this.$refs.remove.open(this.path,this.file.filename);break}},deleted:function(){this.path?this.$router.push("/"+this.path):this.$router.push("/site")},renamed:function(t){this.$router.push(this.$api.files.link(this.path,t.filename))},uploaded:function(){this.fetch(),this.$store.dispatch("notification/success",":)")}}},Oh=wh,Sh=Object(h["a"])(Oh,_h,yh,!1,null,null,null),Ch=Sh.exports,Eh=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.system?n("k-view",{staticClass:"k-installation-view",attrs:{align:"center"}},["install"===t.state?n("form",{on:{submit:function(e){return e.preventDefault(),t.install(e)}}},[n("h1",{staticClass:"k-offscreen"},[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:{type:"submit",icon:"check"}},[t._v(t._s(t.$t("install")))])],1):"completed"===t.state?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):n("div",[t.system.isInstalled?t._e():n("k-headline",[t._v(t._s(t.$t("installation.issues.headline")))]),n("ul",{staticClass:"k-installation-issues"},[!1===t.system.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:{icon:"refresh"},on:{click:t.check}},[n("span",{domProps:{innerHTML:t._s(t.$t("retry"))}})])],1)],1):t._e()},Th=[],jh={data:function(){return{user:{name:"",email:"",language:"en",password:"",role:"admin"},languages:[],system:null}},computed:{state:function(){return this.system.isOk&&this.system.isInstallable&&!this.system.isInstalled?"install":this.system.isOk&&this.system.isInstallable&&this.system.isInstalled?"completed":void 0},translation:function(){return this.$store.state.translation.current},requirements:function(){return this.system&&this.system.requirements?this.system.requirements:{}},fields:function(){return{name:{label:this.$t("name"),type:"text",icon:"user",autofocus:!0},email:{label:this.$t("email"),type:"email",link:!1,required:!0},password:{label:this.$t("password"),type:"password",placeholder:this.$t("password")+" …",required:!0},language:{label:this.$t("language"),type:"select",options:this.languages,icon:"globe",empty:!1,required:!0}}}},watch:{translation:function(t){this.user.language=t},"user.language":function(t){this.$store.dispatch("translation/activate",t)}},created:function(){this.check()},methods:{install:function(){var t=this;this.$api.system.install(this.user).then(function(e){t.$store.dispatch("user/current",e),t.$store.dispatch("notification/success",t.$t("welcome")+"!"),t.$router.push("/")}).catch(function(e){t.$store.dispatch("notification/error",e)})},check:function(){var t=this;this.$store.dispatch("system/load",!0).then(function(e){!0===e.isInstalled&&e.isReady?t.$router.push("/login"):t.$api.translations.options().then(function(n){t.languages=n,t.system=e,t.$store.dispatch("title",t.$t("view.installation"))})})}}},Ih=jh,Lh=(n("146c"),Object(h["a"])(Ih,Eh,Th,!1,null,null,null)),qh=Lh.exports,Nh=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-view",{staticClass:"k-settings-view"},[n("k-header",[t._v("\n "+t._s(t.$t("view.settings"))+"\n ")]),n("section",{staticClass:"k-system-info"},[n("header",[n("k-headline",[t._v("Kirby")])],1),n("ul",{staticClass:"k-system-info-box"},[n("li",[n("dl",[n("dt",[t._v(t._s(t.$t("license")))]),n("dd",[t.license?[t._v("\n "+t._s(t.license)+"\n ")]:n("p",[n("strong",{staticClass:"k-system-unregistered"},[t._v(t._s(t.$t("license.unregistered")))])])],2)])]),n("li",[n("dl",[n("dt",[t._v(t._s(t.$t("version")))]),n("dd",[t._v(t._s(t.$store.state.system.info.version))])])])])]),t.multilang?n("section",{staticClass:"k-languages"},[t.languages.length>0?[n("section",{staticClass:"k-languages-section"},[n("header",[n("k-headline",[t._v(t._s(t.$t("languages.default")))])],1),n("k-collection",{attrs:{items:t.defaultLanguage},on:{action:t.action}})],1),n("section",{staticClass:"k-languages-section"},[n("header",[n("k-headline",[t._v(t._s(t.$t("languages.secondary")))]),n("k-button",{attrs:{icon:"add"},on:{click:function(e){return t.$refs.create.open()}}},[t._v(t._s(t.$t("language.create")))])],1),t.translations.length?n("k-collection",{attrs:{items:t.translations},on:{action:t.action}}):n("k-empty",{attrs:{icon:"globe"},on:{click:function(e){return t.$refs.create.open()}}},[t._v(t._s(t.$t("languages.secondary.empty")))])],1)]:0===t.languages.length?[n("header",[n("k-headline",[t._v(t._s(t.$t("languages")))]),n("k-button",{attrs:{icon:"add"},on:{click:function(e){return t.$refs.create.open()}}},[t._v(t._s(t.$t("language.create")))])],1),n("k-empty",{attrs:{icon:"globe"},on:{click:function(e){return t.$refs.create.open()}}},[t._v(t._s(t.$t("languages.empty")))])]:t._e(),n("k-language-create-dialog",{ref:"create",on:{success:t.fetch}}),n("k-language-update-dialog",{ref:"update",on:{success:t.fetch}}),n("k-language-remove-dialog",{ref:"remove",on:{success:t.fetch}})],2):t._e()],1)},Ah=[],Bh={data:function(){return{languages:[]}},computed:{defaultLanguage:function(){return this.languages.filter(function(t){return t.default})},multilang:function(){return this.$store.state.system.info.multilang},license:function(){return this.$store.state.system.info.license},translations:function(){return this.languages.filter(function(t){return!1===t.default})}},created:function(){this.fetch(),this.$store.dispatch("title",this.$t("view.settings")),this.$store.dispatch("breadcrumb",[])},methods:{fetch:function(){var t=this;!1!==this.multilang?this.$api.get("languages").then(function(e){t.languages=e.data.map(function(n){return{id:n.code,default:n.default,icon:{type:"globe",back:"black"},text:n.name,info:n.code,options:[{icon:"edit",text:t.$t("edit"),click:"update"},{icon:"trash",text:t.$t("delete"),disabled:n.default&&1!==e.data.length,click:"remove"}]}})}):this.languages=[]},action:function(t,e){switch(e){case"update":this.$refs.update.open(t.id);break;case"remove":this.$refs.remove.open(t.id);break}}}},Ph=Bh,Dh=(n("9bd5"),Object(h["a"])(Ph,Nh,Ah,!1,null,null,null)),Mh=Dh.exports,Rh=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.issue?n("k-error-view",[t._v("\n "+t._s(t.issue.message)+"\n")]):t.ready?n("k-view",{staticClass:"k-login-view",attrs:{align:"center"}},[n("form",{staticClass:"k-login-form",attrs:{"data-invalid":t.invalid},on:{submit:function(e){return e.preventDefault(),t.login(e)}}},[n("h1",{staticClass:"k-offscreen"},[t._v(t._s(t.$t("login")))]),n("k-fieldset",{attrs:{novalidate:!0,fields:t.fields},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}}),n("div",{staticClass:"k-login-buttons"},[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),n("k-button",{staticClass:"k-login-button",attrs:{icon:"check",type:"submit"}},[t._v("\n "+t._s(t.$t("login"))+" "),t.isLoading?[t._v("…")]:t._e()],2)],1)],1)]):t._e()},zh=[],Fh={data:function(){return{ready:!1,issue:null,invalid:!1,isLoading:!1,user:{email:"",password:"",remember:!1}}},computed:{fields:function(){return{email:{autofocus:!0,label:this.$t("email"),type:"email",required:!0,link:!1},password:{label:this.$t("password"),type:"password",minLength:8,required:!0,autocomplete:"current-password",counter:!1}}}},created:function(){var t=this;this.$store.dispatch("system/load").then(function(e){e.isReady||t.$router.push("/installation"),e.user&&e.user.id&&t.$router.push("/"),t.ready=!0,t.$store.dispatch("title",t.$t("login"))}).catch(function(e){t.issue=e})},methods:{login:function(){var t=this;this.invalid=!1,this.isLoading=!0,this.$store.dispatch("user/login",this.user).then(function(){t.$store.dispatch("system/load",!0).then(function(){t.$store.dispatch("notification/success",t.$t("welcome")),t.isLoading=!1})}).catch(function(){t.invalid=!0,t.isLoading=!1})}}},Uh=Fh,Hh=(n("24c1"),Object(h["a"])(Uh,Rh,zh,!1,null,null,null)),Kh=Hh.exports,Vh=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.issue?n("k-error-view",[t._v("\n "+t._s(t.issue.message)+"\n")]):n("k-view",{staticClass:"k-page-view"},[n("k-header",{attrs:{tabs:t.tabs,tab:t.tab,editable:t.permissions.changeTitle},on:{edit:function(e){return t.action("rename")}}},[t._v("\n "+t._s(t.page.title)+"\n "),n("k-button-group",{attrs:{slot:"left"},slot:"left"},[t.permissions.preview&&t.page.previewUrl?n("k-button",{attrs:{responsive:!0,link:t.page.previewUrl,target:"_blank",icon:"open"}},[t._v("\n "+t._s(t.$t("open"))+"\n ")]):t._e(),t.status?n("k-button",{class:["k-status-flag","k-status-flag-"+t.page.status],attrs:{disabled:!1===t.permissions.changeStatus,icon:!1===t.permissions.changeStatus?"protected":"circle",responsive:!0},on:{click:function(e){return t.action("status")}}},[t._v("\n "+t._s(t.status.label)+"\n ")]):t._e(),n("k-dropdown",[n("k-button",{attrs:{responsive:!0,icon:"cog"},on:{click:function(e){return t.$refs.settings.toggle()}}},[t._v("\n "+t._s(t.$t("settings"))+"\n ")]),n("k-dropdown-content",{ref:"settings",attrs:{options:t.options},on:{action:t.action}})],1),n("k-languages-dropdown")],1),t.page.id?n("k-prev-next",{attrs:{slot:"right",prev:t.prev,next:t.next},slot:"right"}):t._e()],1),t.page.id?n("k-tabs",{key:t.tabsKey,ref:"tabs",attrs:{parent:t.$api.pages.url(t.page.id),blueprint:t.blueprint,tabs:t.tabs},on:{tab:function(e){t.tab=e}}}):t._e(),n("k-page-rename-dialog",{ref:"rename",on:{success:t.update}}),n("k-page-url-dialog",{ref:"url"}),n("k-page-status-dialog",{ref:"status",on:{success:t.update}}),n("k-page-template-dialog",{ref:"template",on:{success:t.update}}),n("k-page-remove-dialog",{ref:"remove"})],1)},Yh=[],Gh={mixins:[xh],props:{path:{type:String,required:!0}},data:function(){return{page:{title:"",id:null,prev:null,next:null,status:null},blueprint:null,preview:!0,permissions:{changeTitle:!1,changeStatus:!1},icon:"page",issue:null,tab:null,tabs:[],options:null}},computed:{prev:function(){if(this.page.prev)return{link:this.$api.pages.link(this.page.prev.id),tooltip:this.page.prev.title}},language:function(){return this.$store.state.languages.current},next:function(){if(this.page.next)return{link:this.$api.pages.link(this.page.next.id),tooltip:this.page.next.title}},status:function(){return null!==this.page.status?this.page.blueprint.status[this.page.status]:null},tabsKey:function(){return"page-"+this.page.id+"-tabs"}},created:function(){this.$events.$on("page.changeSlug",this.update)},destroyed:function(){this.$events.$off("page.changeSlug",this.update)},watch:{language:function(){this.fetch()},path:function(){this.fetch()}},methods:{action:function(t){var e=this;switch(t){case"preview":this.$api.pages.preview(this.page.id).then(function(t){window.open(t)}).catch(function(t){e.$store.dispatch("notification/error",t)});break;case"rename":this.$refs.rename.open(this.page.id);break;case"url":this.$refs.url.open(this.page.id);break;case"status":this.$refs.status.open(this.page.id);break;case"template":this.$refs.template.open(this.page.id);break;case"remove":this.$refs.remove.open(this.page.id);break;default:this.$store.dispatch("notification/error",this.$t("notification.notImplemented"));break}},changeLanguage:function(t){this.$store.dispatch("languages/current",t),this.fetch()},fetch:function(){var t=this;this.$api.pages.get(this.path,{view:"panel"}).then(function(e){t.page=e,t.blueprint=e.blueprint.name,t.permissions=e.options,t.tabs=e.blueprint.tabs,t.options=function(e){t.$api.pages.options(t.page.id).then(function(t){e(t)})},t.$store.dispatch("breadcrumb",t.$api.pages.breadcrumb(e)),t.$store.dispatch("title",t.page.title),t.$store.dispatch("form/create",{id:"pages/"+e.id,api:t.$api.pages.link(e.id),content:e.content})}).catch(function(e){t.issue=e})},update:function(){this.fetch(),this.$emit("model.update")}}},Wh=Gh,Jh=(n("202d"),Object(h["a"])(Wh,Vh,Yh,!1,null,null,null)),Xh=Jh.exports,Zh=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.issue?n("k-error-view",[t._v("\n "+t._s(t.issue.message)+"\n")]):n("k-view",{key:"site-view",staticClass:"k-site-view"},[n("k-header",{attrs:{tabs:t.tabs,tab:t.tab,editable:t.permissions.changeTitle},on:{edit:function(e){return t.action("rename")}}},[t._v("\n "+t._s(t.site.title)+"\n "),n("k-button-group",{attrs:{slot:"left"},slot:"left"},[n("k-button",{attrs:{responsive:!0,link:t.site.url,target:"_blank",icon:"open"}},[t._v("\n "+t._s(t.$t("open"))+"\n ")]),n("k-languages-dropdown")],1)],1),t.site.url?n("k-tabs",{ref:"tabs",attrs:{tabs:t.tabs,blueprint:t.site.blueprint.name,parent:"site"},on:{tab:function(e){t.tab=e}}}):t._e(),n("k-site-rename-dialog",{ref:"rename",on:{success:t.fetch}})],1)},Qh=[],tm={data:function(){return{site:{title:null,url:null},issue:null,tab:null,tabs:[],options:null,permissions:{changeTitle:!0}}},computed:{language:function(){return this.$store.state.languages.current}},watch:{language:function(){this.fetch()}},created:function(){this.fetch()},methods:{fetch:function(){var t=this;this.$api.site.get({view:"panel"}).then(function(e){t.site=e,t.tabs=e.blueprint.tabs,t.permissions=e.options,t.options=function(e){t.$api.site.options().then(function(t){e(t)})},t.$store.dispatch("breadcrumb",[]),t.$store.dispatch("title",null),t.$store.dispatch("form/create",{id:"site",api:"site",content:e.content})}).catch(function(e){t.issue=e})},action:function(t){switch(t){case"languages":this.$refs.languages.open();break;case"rename":this.$refs.rename.open();break;default:this.$store.dispatch("notification/error",this.$t("notification.notImplemented"));break}}}},em=tm,nm=Object(h["a"])(em,Zh,Qh,!1,null,null,null),im=nm.exports,sm=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.issue?n("k-error-view",[t._v("\n "+t._s(t.issue.message)+"\n")]):n("k-view",{staticClass:"k-users-view"},[n("k-header",[t._v("\n "+t._s(t.$t("view.users"))+"\n "),n("k-button-group",{attrs:{slot:"left"},slot:"left"},[n("k-button",{attrs:{disabled:!1===t.$permissions.users.create,icon:"add"},on:{click:function(e){return t.$refs.create.open()}}},[t._v(t._s(t.$t("user.create")))])],1),n("k-button-group",{attrs:{slot:"right"},slot:"right"},[n("k-dropdown",[n("k-button",{attrs:{responsive:!0,icon:"funnel"},on:{click:function(e){return t.$refs.roles.toggle()}}},[t._v("\n "+t._s(t.$t("role"))+": "+t._s(t.role?t.role.text:t.$t("role.all"))+"\n ")]),n("k-dropdown-content",{ref:"roles",attrs:{align:"right"}},[n("k-dropdown-item",{attrs:{icon:"bolt"},on:{click:function(e){return t.filter(!1)}}},[t._v("\n "+t._s(t.$t("role.all"))+"\n ")]),n("hr"),t._l(t.roles,function(e){return n("k-dropdown-item",{key:e.value,attrs:{icon:"bolt"},on:{click:function(n){return t.filter(e)}}},[t._v("\n "+t._s(e.text)+"\n ")])})],2)],1)],1)],1),t.users.length>0?[n("k-collection",{attrs:{items:t.users,pagination:t.pagination},on:{paginate:t.paginate,action:t.action}})]:0===t.total?[n("k-empty",{attrs:{icon:"users"}},[t._v(t._s(t.$t("role.empty")))])]:t._e(),n("k-user-create-dialog",{ref:"create",on:{success:t.fetch}}),n("k-user-email-dialog",{ref:"email",on:{success:t.fetch}}),n("k-user-language-dialog",{ref:"language",on:{success:t.fetch}}),n("k-user-password-dialog",{ref:"password"}),n("k-user-remove-dialog",{ref:"remove",on:{success:t.fetch}}),n("k-user-rename-dialog",{ref:"rename",on:{success:t.fetch}}),n("k-user-role-dialog",{ref:"role",on:{success:t.fetch}})],2)},am=[],om={data:function(){return{page:1,limit:20,total:null,users:[],roles:[],issue:null}},computed:{pagination:function(){return{page:this.page,limit:this.limit,total:this.total}},role:function(){var t=this,e=null;return this.$route.params.role&&this.roles.forEach(function(n){n.value===t.$route.params.role&&(e=n)}),e}},watch:{$route:function(){this.fetch()}},created:function(){var t=this;this.$api.roles.options().then(function(e){t.roles=e,t.fetch()})},methods:{fetch:function(){var t=this;this.$store.dispatch("title",this.$t("view.users"));var e={paginate:{page:this.page,limit:this.limit}};this.role&&(e.filterBy=[{field:"role",operator:"==",value:this.role.value}]),this.$api.users.list(e).then(function(e){t.users=e.data.map(function(e){var n={id:e.id,icon:{type:"user",back:"black"},text:e.name||e.email,info:e.role.title,link:"/users/"+e.id,options:function(n){t.$api.users.options(e.id,"list").then(function(t){return n(t)}).catch(function(e){t.$store.dispatch("notification/error",e)})},image:null};return e.avatar&&(n.image={url:e.avatar.url,cover:!0}),n}),t.role?t.$store.dispatch("breadcrumb",[{link:"/users/role/"+t.role.value,label:t.$t("role")+": "+t.role.text}]):t.$store.dispatch("breadcrumb",[]),t.total=e.pagination.total}).catch(function(e){t.issue=e})},paginate:function(t){this.page=t.page,this.limit=t.limit,this.fetch()},action:function(t,e){switch(e){case"edit":this.$router.push("/users/"+t.id);break;case"email":this.$refs.email.open(t.id);break;case"role":this.$refs.role.open(t.id);break;case"rename":this.$refs.rename.open(t.id);break;case"password":this.$refs.password.open(t.id);break;case"language":this.$refs.language.open(t.id);break;case"remove":this.$refs.remove.open(t.id);break}},filter:function(t){!1===t?this.$router.push("/users"):this.$router.push("/users/role/"+t.value),this.$refs.roles.close()}}},rm=om,lm=Object(h["a"])(rm,sm,am,!1,null,null,null),um=lm.exports,cm=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.issue?n("k-error-view",[t._v("\n "+t._s(t.issue.message)+"\n")]):t.ready?n("div",{staticClass:"k-user-view"},[n("div",{staticClass:"k-user-profile"},[n("k-view",[t.avatar?[n("k-dropdown",[n("k-button",{staticClass:"k-user-view-image",attrs:{tooltip:t.$t("avatar")},on:{click:function(e){return t.$refs.picture.toggle()}}},[t.avatar?n("k-image",{attrs:{cover:!0,src:t.avatar,ratio:"1/1"}}):t._e()],1),n("k-dropdown-content",{ref:"picture"},[n("k-dropdown-item",{attrs:{icon:"upload"},on:{click:function(e){return t.$refs.upload.open()}}},[t._v("\n "+t._s(t.$t("change"))+"\n ")]),n("k-dropdown-item",{attrs:{icon:"trash"},on:{click:function(e){return t.action("picture.delete")}}},[t._v("\n "+t._s(t.$t("delete"))+"\n ")])],1)],1)]:[n("k-button",{staticClass:"k-user-view-image",attrs:{tooltip:t.$t("avatar")},on:{click:function(e){return t.$refs.upload.open()}}},[n("k-icon",{attrs:{type:"user"}})],1)],n("k-button-group",[n("k-button",{attrs:{disabled:!t.permissions.changeEmail,icon:"email"},on:{click:function(e){return t.action("email")}}},[t._v(t._s(t.$t("email"))+": "+t._s(t.user.email))]),n("k-button",{attrs:{disabled:!t.permissions.changeRole,icon:"bolt"},on:{click:function(e){return t.action("role")}}},[t._v(t._s(t.$t("role"))+": "+t._s(t.user.role.title))]),n("k-button",{attrs:{disabled:!t.permissions.changeLanguage,icon:"globe"},on:{click:function(e){return t.action("language")}}},[t._v(t._s(t.$t("language"))+": "+t._s(t.user.language))])],1)],2)],1),n("k-view",[n("k-header",{attrs:{editable:t.permissions.changeName,tabs:t.tabs,tab:t.tab},on:{edit:function(e){return t.action("rename")}}},[t.user.name&&0!==t.user.name.length?[t._v(t._s(t.user.name))]:n("span",{staticClass:"k-user-name-placeholder"},[t._v(t._s(t.$t("name"))+" …")]),n("k-button-group",{attrs:{slot:"left"},slot:"left"},[n("k-dropdown",[n("k-button",{attrs:{icon:"cog"},on:{click:function(e){return t.$refs.settings.toggle()}}},[t._v("\n "+t._s(t.$t("settings"))+"\n ")]),n("k-dropdown-content",{ref:"settings",attrs:{options:t.options},on:{action:t.action}})],1),n("k-languages-dropdown")],1),t.user.id&&"User"===t.$route.name?n("k-prev-next",{attrs:{slot:"right",prev:t.prev,next:t.next},slot:"right"}):t._e()],2),t.user&&t.tabs.length?n("k-tabs",{key:t.tabsKey,ref:"tabs",attrs:{parent:"users/"+t.user.id,blueprint:t.user.blueprint.name,tabs:t.tabs},on:{tab:function(e){t.tab=e}}}):t.ready?n("k-box",{attrs:{text:t.$t("user.blueprint",{role:t.user.role.name}),theme:"info"}}):t._e(),n("k-user-email-dialog",{ref:"email",on:{success:t.fetch}}),n("k-user-language-dialog",{ref:"language",on:{success:t.fetch}}),n("k-user-password-dialog",{ref:"password"}),n("k-user-remove-dialog",{ref:"remove"}),n("k-user-rename-dialog",{ref:"rename",on:{success:t.fetch}}),n("k-user-role-dialog",{ref:"role",on:{success:t.fetch}}),n("k-upload",{ref:"upload",attrs:{url:t.uploadApi,multiple:!1,accept:"image/*"},on:{success:t.uploadedAvatar}})],1)],1):t._e()},dm=[],pm={mixins:[xh],props:{id:{type:String,required:!0}},data:function(){return{tab:null,tabs:[],ready:!1,user:{role:{name:null},name:null,language:null,prev:null,next:null},permissions:{changeEmail:!0,changeName:!0,changeLanguage:!0,changeRole:!0},issue:null,avatar:null,options:null}},computed:{language:function(){return this.$store.state.languages.current},next:function(){if(this.user.next)return{link:this.$api.users.link(this.user.next.id),tooltip:this.user.next.name}},prev:function(){if(this.user.prev)return{link:this.$api.users.link(this.user.prev.id),tooltip:this.user.prev.name}},tabsKey:function(){return"user-"+this.user.id+"-tabs"},uploadApi:function(){return d.api+"/users/"+this.user.id+"/avatar"}},watch:{language:function(){this.fetch()},id:function(){this.fetch()}},methods:{action:function(t){var e=this;switch(t){case"email":this.$refs.email.open(this.user.id);break;case"language":this.$refs.language.open(this.user.id);break;case"password":this.$refs.password.open(this.user.id);break;case"picture.delete":this.$api.users.deleteAvatar(this.id).then(function(){e.$store.dispatch("notification/success",":)"),e.avatar=null});break;case"remove":this.$refs.remove.open(this.user.id);break;case"rename":this.$refs.rename.open(this.user.id);break;case"role":this.$refs.role.open(this.user.id);break;default:this.$store.dispatch("notification/error","Not yet implemented")}},fetch:function(){var t=this;this.$api.users.get(this.id,{view:"panel"}).then(function(e){t.user=e,t.tabs=e.blueprint.tabs,t.ready=!0,t.permissions=e.options,t.options=function(e){t.$api.users.options(t.user.id).then(function(t){e(t)})},e.avatar?t.avatar=e.avatar.url:t.avatar=null,"User"===t.$route.name?t.$store.dispatch("breadcrumb",t.$api.users.breadcrumb(e)):t.$store.dispatch("breadcrumb",[]),t.$store.dispatch("title",t.user.name||t.user.email),t.$store.dispatch("form/create",{id:"users/"+e.id,api:t.$api.users.link(e.id),content:e.content})}).catch(function(e){t.issue=e})},uploadedAvatar:function(){this.$store.dispatch("notification/success",":)"),this.fetch()}}},fm=pm,hm=(n("bd96"),Object(h["a"])(fm,cm,dm,!1,null,null,null)),mm=hm.exports,gm=[{path:"/",name:"Home",redirect:"/site"},{path:"/browser",name:"Browser",component:hh,meta:{outside:!0}},{path:"/login",component:Kh,meta:{outside:!0}},{path:"/logout",beforeEnter:function(){$m.dispatch("user/logout")},meta:{outside:!0}},{path:"/installation",component:qh,meta:{outside:!0}},{path:"/site",name:"Site",meta:{view:"site"},component:im,beforeEnter:rh},{path:"/site/files/:filename",name:"SiteFile",meta:{view:"site"},component:Ch,beforeEnter:rh,props:function(t){return{path:"site",filename:t.params.filename}}},{path:"/pages/:path/files/:filename",name:"PageFile",meta:{view:"site"},component:Ch,beforeEnter:rh,props:function(t){return{path:"pages/"+t.params.path,filename:t.params.filename}}},{path:"/users/:path/files/:filename",name:"UserFile",meta:{view:"users"},component:Ch,beforeEnter:rh,props:function(t){return{path:"users/"+t.params.path,filename:t.params.filename}}},{path:"/pages/:path",name:"Page",meta:{view:"site"},component:Xh,beforeEnter:rh,props:function(t){return{path:t.params.path}}},{path:"/settings",name:"Settings",meta:{view:"settings"},component:Mh,beforeEnter:rh},{path:"/users/role/:role",name:"UsersByRole",meta:{view:"users"},component:um,beforeEnter:rh,props:function(t){return{role:t.params.role}}},{path:"/users",name:"Users",meta:{view:"users"},beforeEnter:rh,component:um},{path:"/users/:id",name:"User",meta:{view:"users"},component:mm,beforeEnter:rh,props:function(t){return{id:t.params.id}}},{path:"/account",name:"Account",meta:{view:"account"},component:mm,beforeEnter:rh,props:function(){return{id:$m.state.user.current?$m.state.user.current.id:null}}},{path:"/plugins/:id",name:"Plugin",meta:{view:"plugin"},props:function(t){return{plugin:t.params.id}},beforeEnter:rh,component:$h},{path:"*",name:"NotFound",beforeEnter:function(t,e,n){n("/")}}];A["a"].use(oh["a"]);var vm=new oh["a"]({mode:"history",routes:gm,url:"/"===d.url?"":d.url});vm.beforeEach(function(t,e,n){"Browser"!==t.name&&!1===ch.all()&&n("/browser"),$m.dispatch("view",t.meta.view),t.meta.outside||$m.dispatch("user/visit",t.path),n()});var bm=vm,km={namespaced:!0,state:{current:null,path:null},mutations:{SET_CURRENT:function(t,e){t.current=e,e&&e.permissions?(A["a"].prototype.$user=e,A["a"].prototype.$permissions=e.permissions):(A["a"].prototype.$user=null,A["a"].prototype.$permissions=null)},SET_PATH:function(t,e){t.path=e}},actions:{current:function(t,e){t.commit("SET_CURRENT",e)},language:function(t,e){t.dispatch("translation/activate",e,{root:!0}),t.commit("SET_CURRENT",Object(l["a"])({language:e},t.state.current))},load:function(t){return Cm.auth.user().then(function(e){return t.commit("SET_CURRENT",e),e})},login:function(t,e){return Cm.auth.login(e).then(function(e){return t.commit("SET_CURRENT",e),t.dispatch("translation/activate",e.language,{root:!0}),bm.push(t.state.path||"/"),e})},logout:function(t,e){t.commit("SET_CURRENT",null),e?window.location.href=(window.panel.url||"")+"/login":Cm.auth.logout().then(function(){bm.push("/login")}).catch(function(){bm.push("/login")})},visit:function(t,e){t.commit("SET_PATH",e)}}};A["a"].use(Qf["a"]);var $m=new Qf["a"].Store({strict:!1,state:{breadcrumb:[],dialog:null,drag:null,isLoading:!1,search:!1,title:null,view:null},mutations:{SET_BREADCRUMB:function(t,e){t.breadcrumb=e},SET_DIALOG:function(t,e){t.dialog=e},SET_DRAG:function(t,e){t.drag=e},SET_SEARCH:function(t,e){!0===e&&(e={}),t.search=e},SET_TITLE:function(t,e){t.title=e},SET_VIEW:function(t,e){t.view=e},START_LOADING:function(t){t.isLoading=!0},STOP_LOADING:function(t){t.isLoading=!1}},actions:{breadcrumb:function(t,e){t.commit("SET_BREADCRUMB",e)},dialog:function(t,e){t.commit("SET_DIALOG",e)},drag:function(t,e){t.commit("SET_DRAG",e)},isLoading:function(t,e){t.commit(!0===e?"START_LOADING":"STOP_LOADING")},search:function(t,e){t.commit("SET_SEARCH",e)},title:function(t,e){t.commit("SET_TITLE",e),document.title=e||"",t.state.system.info.title&&(document.title+=null!==e?" | "+t.state.system.info.title:t.state.system.info.title)},view:function(t,e){t.commit("SET_VIEW",e)}},modules:{form:eh,languages:nh,notification:ih,system:sh,translation:ah,user:km}}),_m={running:0,request:function(t,e){var n=this;e=qi()(e||{},{credentials:"same-origin",cache:"no-cache",headers:Object(l["a"])({"x-requested-with":"xmlhttprequest","content-type":"application/json"},e.headers)}),$m.state.languages.current&&(e.headers["x-language"]=$m.state.languages.current.code),e.headers["x-csrf"]=window.panel.csrf;var i=t+"/"+dr()(e);return Cm.config.onStart(i),this.running++,fetch(Cm.config.endpoint+"/"+t,e).then(function(t){return t.text()}).then(function(t){try{return JSON.parse(t)}catch(e){throw new Error("The JSON response from the API could not be parsed. Please check your API connection.")}}).then(function(t){if(t.status&&"error"===t.status)throw t;var e=t;return t.data&&t.type&&"model"===t.type&&(e=t.data),n.running--,Cm.config.onComplete(i),Cm.config.onSuccess(t),e}).catch(function(t){throw n.running--,Cm.config.onComplete(i),Cm.config.onError(t),t})},get:function(t,e,n){return e&&(t+="?"+ne()(e).map(function(t){return t+"="+e[t]}).join("&")),this.request(t,qi()(n||{},{method:"GET"}))},post:function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"POST";return this.request(t,qi()(n||{},{method:i,body:dr()(e)}))},patch:function(t,e,n){return this.post(t,e,n,"PATCH")},delete:function(t,e,n){return this.post(t,e,n,"DELETE")}},ym={list:function(){return Cm.get("roles")},get:function(t){return Cm.get("roles/"+t)},options:function(){return this.list().then(function(t){return t.data.map(function(t){return{info:t.description||"(".concat(A["a"].i18n.translate("role.description.placeholder"),")"),text:t.title,value:t.name}})})}},xm={info:function(t){return Cm.get("system",t)},install:function(t){return Cm.post("system/install",t).then(function(t){return t.user})},register:function(t){return Cm.post("system/register",t)}},wm={get:function(t){return Cm.get("site",t)},update:function(t){return Cm.post("site",t)},title:function(t){return Cm.patch("site/title",{title:t})},options:function(){return Cm.get("site",{select:"options"}).then(function(t){var e=t.options,n=[];return n.push({click:"rename",icon:"title",text:A["a"].i18n.translate("rename"),disabled:!e.changeTitle}),n})},children:function(t){return Cm.post("site/children/search",t)},blueprint:function(){return Cm.get("site/blueprint")},blueprints:function(){return Cm.get("site/blueprints")}},Om={list:function(){return Cm.get("translations")},get:function(t){return Cm.get("translations/"+t)},options:function(){var t=[];return this.list().then(function(e){return t=e.data.map(function(t){return{value:t.id,text:t.name}}),t})}},Sm={create:function(t){return Cm.post(this.url(),t)},list:function(t){return Cm.post(this.url(null,"search"),t)},get:function(t,e){return Cm.get(this.url(t),e)},update:function(t,e){return Cm.patch(this.url(t),e)},delete:function(t){return Cm.delete(this.url(t))},changeEmail:function(t,e){return Cm.patch(this.url(t,"email"),{email:e})},changeLanguage:function(t,e){return Cm.patch(this.url(t,"language"),{language:e})},changeName:function(t,e){return Cm.patch(this.url(t,"name"),{name:e})},changePassword:function(t,e){return Cm.patch(this.url(t,"password"),{password:e})},changeRole:function(t,e){return Cm.patch(this.url(t,"role"),{role:e})},deleteAvatar:function(t){return Cm.delete(this.url(t,"avatar"))},blueprint:function(t){return Cm.get(this.url(t,"blueprint"))},breadcrumb:function(t){return[{link:"/users/"+t.id,label:t.username}]},options:function(t){return Cm.get(this.url(t),{select:"options"}).then(function(t){var e=t.options,n=[];return n.push({click:"rename",icon:"title",text:A["a"].i18n.translate("user.changeName"),disabled:!e.changeName}),n.push({click:"email",icon:"email",text:A["a"].i18n.translate("user.changeEmail"),disabled:!e.changeEmail}),n.push({click:"role",icon:"bolt",text:A["a"].i18n.translate("user.changeRole"),disabled:!e.changeRole}),n.push({click:"password",icon:"key",text:A["a"].i18n.translate("user.changePassword"),disabled:!e.changePassword}),n.push({click:"language",icon:"globe",text:A["a"].i18n.translate("user.changeLanguage"),disabled:!e.changeLanguage}),n.push({click:"remove",icon:"trash",text:A["a"].i18n.translate("user.delete"),disabled:!e.delete}),n})},url:function(t,e){var n=t?"users/"+t:"users";return e&&(n+="/"+e),n},link:function(t,e){return"/"+this.url(t,e)}},Cm=Object(l["a"])({config:{onStart:function(){},onComplete:function(){},onSuccess:function(){},onError:function(t){throw window.console.log(t.message),t}},auth:Jf,files:Xf,pages:Zf,roles:ym,system:xm,site:wm,translations:Om,users:Sm},_m);Cm.config.endpoint=d.api,Cm.requests=[],Cm.config.onStart=function(t){$m.dispatch("isLoading",!0),Cm.requests.push(t)},Cm.config.onComplete=function(t){Cm.requests=Cm.requests.filter(function(e){return e!==t}),0===Cm.requests.length&&$m.dispatch("isLoading",!1)},Cm.config.onError=function(t){d.debug&&window.console.error(t),403===t.code&&$m.dispatch("user/logout",!0)};var Em=setInterval(Cm.auth.user,3e5);Cm.config.onSuccess=function(){clearInterval(Em),Em=setInterval(Cm.auth.user,3e5)},A["a"].prototype.$api=Cm,A["a"].config.errorHandler=function(t){d.debug&&window.console.error(t),$m.dispatch("notification/error",{message:t.message||"An error occurred. Please reload the panel"})},window.panel=window.panel||{},window.panel.error=function(t,e){d.debug&&window.console.error(t+": "+e),$m.dispatch("error",t+". See the console for more information.")};var Tm=n("f2f3");A["a"].use(Tm["a"].plugin,$m);var jm=n("2d1f"),Im=n.n(jm),Lm={};for(var qm in A["a"].options.components)Lm[qm]=A["a"].options.components[qm];var Nm=function(t,e){e.template||e.render||e.extends?(e.extends&&"string"===typeof e.extends&&(e.extends=Lm[e.extends],e.template&&(e.render=null)),e.mixins&&(e.mixins=e.mixins.map(function(t){return"string"===typeof t?Lm[t]:t})),Lm[t]&&window.console.warn('Plugin is replacing "'.concat(t,'"')),A["a"].component(t,e)):$m.dispatch("notification/error",'Neither template or render method provided nor extending a component when loading plugin component "'.concat(t,'". The component has not been registered.'))};Im()(window.panel.plugins.components).forEach(function(t){var e=Object(th["a"])(t,2),n=e[0],i=e[1];Nm(n,i)}),Im()(window.panel.plugins.fields).forEach(function(t){var e=Object(th["a"])(t,2),n=e[0],i=e[1];Nm(n,i)}),Im()(window.panel.plugins.sections).forEach(function(t){var e=Object(th["a"])(t,2),n=e[0],i=e[1];Nm(n,Object(l["a"])({},i,{mixins:[_f].concat(i.mixins||[])}))}),Im()(window.panel.plugins.views).forEach(function(t){var e=Object(th["a"])(t,2),n=e[0],i=e[1];if(!i.component)return $m.dispatch("notification/error",'No view component provided when loading view "'.concat(n,'". The view has not been registered.')),void delete window.panel.plugins.views[n];i.link="/plugins/"+n,void 0===i.icon&&(i.icon="page"),void 0===i.menu&&(i.menu=!0),window.panel.plugins.views[n]={link:i.link,icon:i.icon,menu:i.menu},A["a"].component("k-"+n+"-plugin-view",i.component)}),window.panel.plugins.use.forEach(function(t){A["a"].use(t)}),A["a"].use(T),A["a"].use(N),A["a"].use(j),A["a"].use(P.a),A["a"].config.productionTip=!1,A["a"].config.devtools=!0,window.panel.app=new A["a"]({router:bm,store:$m,render:function(t){return t(C)}}).$mount("#app")},5714:function(t,e,n){},"580a":function(t,e,n){"use strict";var i=n("61ab"),s=n.n(i);s.a},"589a":function(t,e,n){},"58e5":function(t,e,n){},"5ab5":function(t,e,n){},"5aee":function(t,e,n){"use strict";var i=n("04b2"),s=n.n(i);s.a},"5b23":function(t,e,n){"use strict";var i=n("9798"),s=n.n(i);s.a},"5c0b":function(t,e,n){"use strict";var i=n("5e27"),s=n.n(i);s.a},"5d33":function(t,e,n){"use strict";var i=n("2246"),s=n.n(i);s.a},"5e27":function(t,e,n){},"5f12":function(t,e,n){},6018:function(t,e,n){"use strict";var i=n("e30b"),s=n.n(i);s.a},"61ab":function(t,e,n){},"64e6":function(t,e,n){},"65a9":function(t,e,n){},"696b5":function(t,e,n){"use strict";var i=n("0cdc"),s=n.n(i);s.a},"6a18":function(t,e,n){"use strict";var i=n("de8a"),s=n.n(i);s.a},"6ab3":function(t,e,n){"use strict";var i=n("784e"),s=n.n(i);s.a},"6ab9":function(t,e,n){},"6b7f":function(t,e,n){},"6bcd":function(t,e,n){"use strict";var i=n("9e0a"),s=n.n(i);s.a},"6f7b":function(t,e,n){"use strict";var i=n("5ab5"),s=n.n(i);s.a},7075:function(t,e,n){},"718c":function(t,e,n){"use strict";var i=n("773d"),s=n.n(i);s.a},7568:function(t,e,n){"use strict";var i=n("4150"),s=n.n(i);s.a},"75cd":function(t,e,n){},7737:function(t,e,n){"use strict";var i=n("ca19"),s=n.n(i);s.a},"773d":function(t,e,n){},"778b":function(t,e,n){},7797:function(t,e,n){},"784e":function(t,e,n){},"7a7d":function(t,e,n){"use strict";var i=n("65a9"),s=n.n(i);s.a},"7d2d":function(t,e,n){},"7d5d":function(t,e,n){"use strict";var i=n("6ab9"),s=n.n(i);s.a},"7dc7":function(t,e,n){"use strict";var i=n("eb17"),s=n.n(i);s.a},"7e0c":function(t,e,n){},"7e85":function(t,e,n){"use strict";var i=n("d1c5"),s=n.n(i);s.a},"7f6e":function(t,e,n){"use strict";var i=n("4364"),s=n.n(i);s.a},"862b":function(t,e,n){"use strict";var i=n("589a"),s=n.n(i);s.a},"893d":function(t,e,n){"use strict";var i=n("abb3"),s=n.n(i);s.a},"8ae6":function(t,e,n){},"8c28":function(t,e,n){"use strict";var i=n("3d5b"),s=n.n(i);s.a},"8e4d":function(t,e,n){},"910b":function(t,e,n){},"957b":function(t,e,n){},9749:function(t,e,n){},"977f":function(t,e,n){"use strict";var i=n("b7f5"),s=n.n(i);s.a},9798:function(t,e,n){},9799:function(t,e,n){"use strict";var i=n("4fe0"),s=n.n(i);s.a},9811:function(t,e,n){},"98a1":function(t,e,n){"use strict";var i=n("f0cb"),s=n.n(i);s.a},"9bd5":function(t,e,n){"use strict";var i=n("64e6"),s=n.n(i);s.a},"9df7":function(t,e,n){},"9e0a":function(t,e,n){},a134:function(t,e,n){"use strict";var i=n("4390"),s=n.n(i);s.a},a567:function(t,e,n){"use strict";var i=n("c0b5"),s=n.n(i);s.a},a5f3:function(t,e,n){"use strict";var i=n("43f4"),s=n.n(i);s.a},a66d:function(t,e,n){"use strict";var i=n("2eb5"),s=n.n(i);s.a},abb3:function(t,e,n){},ac27:function(t,e,n){"use strict";var i=n("3c9d"),s=n.n(i);s.a},b0d6:function(t,e,n){"use strict";var i=n("d31d"),s=n.n(i);s.a},b37e:function(t,e,n){},b3c3:function(t,e,n){},b5d2:function(t,e,n){"use strict";var i=n("ed7b"),s=n.n(i);s.a},b746:function(t,e,n){"use strict";var i=n("7e0c"),s=n.n(i);s.a},b7f5:function(t,e,n){},ba8f:function(t,e,n){"use strict";var i=n("9749"),s=n.n(i);s.a},bb41:function(t,e,n){"use strict";var i=n("ceb4"),s=n.n(i);s.a},bd96:function(t,e,n){"use strict";var i=n("d6a4"),s=n.n(i);s.a},bf53:function(t,e,n){"use strict";var i=n("3c80"),s=n.n(i);s.a},c0b5:function(t,e,n){},c119:function(t,e,n){"use strict";var i=n("4b49"),s=n.n(i);s.a},c7c8:function(t,e,n){"use strict";var i=n("1be2"),s=n.n(i);s.a},c857:function(t,e,n){"use strict";var i=n("7d2d"),s=n.n(i);s.a},c9cb:function(t,e,n){"use strict";var i=n("b37e"),s=n.n(i);s.a},ca19:function(t,e,n){},ca3a:function(t,e,n){},cb8f:function(t,e,n){"use strict";var i=n("8e4d"),s=n.n(i);s.a},cca8:function(t,e,n){"use strict";var i=n("18b7"),s=n.n(i);s.a},ceb4:function(t,e,n){},d0c1:function(t,e,n){"use strict";var i=n("9df7"),s=n.n(i);s.a},d0e7:function(t,e,n){},d1c5:function(t,e,n){},d221:function(t,e,n){"use strict";var i=n("6b7f"),s=n.n(i);s.a},d31d:function(t,e,n){},d6a4:function(t,e,n){},d6c1:function(t,e,n){},d6fc:function(t,e,n){"use strict";var i=n("08ec"),s=n.n(i);s.a},d9c4:function(t,e,n){},daa8:function(t,e,n){"use strict";var i=n("e60b"),s=n.n(i);s.a},db92:function(t,e,n){},ddfd:function(t,e,n){"use strict";var i=n("4dc8"),s=n.n(i);s.a},de8a:function(t,e,n){},df0d:function(t,e,n){"use strict";var i=n("3ab9"),s=n.n(i);s.a},e30b:function(t,e,n){},e60b:function(t,e,n){},e697:function(t,e,n){},eb17:function(t,e,n){},ec72:function(t,e,n){},ed7b:function(t,e,n){},ee15:function(t,e,n){"use strict";var i=n("fd81"),s=n.n(i);s.a},f0cb:function(t,e,n){},f56d:function(t,e,n){"use strict";var i=n("75cd"),s=n.n(i);s.a},f5e3:function(t,e,n){},f8a7:function(t,e,n){"use strict";var i=n("db92"),s=n.n(i);s.a},f95f:function(t,e,n){"use strict";var i=n("5f12"),s=n.n(i);s.a},fa6a:function(t,e,n){"use strict";var i=n("778b"),s=n.n(i);s.a},fb1a:function(t,e,n){},fc0f:function(t,e,n){"use strict";var i=n("424a"),s=n.n(i);s.a},fd81:function(t,e,n){},ff6d:function(t,e,n){},fffc:function(t,e,n){}}); \ No newline at end of file +(function(t){function e(e){for(var i,o,r=e[0],l=e[1],u=e[2],d=0,p=[];d1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",i="-";return n="a-z0-9"+n,t=t.trim().toLowerCase(),e.forEach(function(e){e&&J()(e).forEach(function(n){var i="/"!==n.substr(0,1),s=n.substring(1,n.length-1),a=i?n:s;t=t.replace(new RegExp(a,"g"),e[n])})}),t=t.replace("/[^\t\n\r -~]/",""),t=t.replace(new RegExp("[^"+n+"]","ig"),i),t=t.replace(new RegExp("["+RegExp.escape(i)+"]{2,}","g"),i),t=t.replace("/",i),t=t.replace(new RegExp("^[^"+n+"]+","g"),""),t=t.replace(new RegExp("[^"+n+"]+$","g"),""),t},ot={mixins:[r],data:function(){return{parent:null,file:{id:null,name:null,filename:null,extension:null}}},computed:{fields:function(){return{name:{label:this.$t("name"),type:"text",required:!0,icon:"title",after:"."+this.file.extension,preselect:!0}}},slugs:function(){return this.$store.state.languages.default?this.$store.state.languages.default.rules:this.system.slugs},system:function(){return this.$store.state.system.info}},methods:{open:function(t,e){var n=this;this.$api.files.get(t,e,{select:["id","filename","name","extension"]}).then(function(e){n.file=e,n.parent=t,n.$refs.dialog.open()}).catch(function(t){n.$store.dispatch("notification/error",t)})},sluggify:function(t){return at(t,[this.slugs,this.system.ascii],".")},submit:function(){var t=this;this.$api.files.rename(this.parent,this.file.filename,this.file.name).then(function(e){t.$store.dispatch("form/move",{old:t.$store.getters["form/id"](t.file.id),new:t.$store.getters["form/id"](e.id)}),t.$store.dispatch("notification/success",":)"),t.$emit("success",e),t.$events.$emit("file.changeName",e),t.$refs.dialog.close()}).catch(function(e){t.$refs.dialog.error(e.message)})}}},rt=ot,lt=Object(c["a"])(rt,Y,W,!1,null,null,null),ut=lt.exports,ct=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.models.length?n("k-list",t._l(t.models,function(e){return n("k-list-item",{key:e.filename,attrs:{text:e.text,info:e.info,image:e.image,icon:e.icon},on:{click:function(n){return t.toggle(e)}}},[t.isSelected(e)?n("k-button",{attrs:{slot:"options",autofocus:!0,icon:t.checkedIcon,tooltip:t.$t("remove"),theme:"positive"},slot:"options"}):n("k-button",{attrs:{slot:"options",autofocus:!0,tooltip:t.$t("select"),icon:"circle-outline"},slot:"options"})],1)}),1):n("k-empty",{attrs:{icon:"image"}},[t._v("\n "+t._s(t.$t("dialog.files.empty"))+"\n ")])]],2)},dt=[],pt=n("db0c"),ft=n.n(pt),ht=n("a745"),mt=n.n(ht),gt={data:function(){return{models:[],issue:null,selected:{},options:{endpoint:null,max:null,multiple:!0,parent:null,selected:[]}}},computed:{multiple:function(){return!0===this.options.multiple&&1!==this.options.max},checkedIcon:function(){return!0===this.multiple?"check":"circle-filled"}},methods:{fetch:function(){var t=this;return this.$api.get(this.options.endpoint,this.fetchData||{}).then(function(e){t.models=e.data||e.pages||e,t.onFetched&&t.onFetched(e)}).catch(function(e){t.models=[],t.issue=e.message})},open:function(t,e){var n=this,i=!0;mt()(t)?(this.models=t,i=!1):(this.models=[],e=t),this.options=Object(f["a"])({},this.options,e),this.selected={},this.options.selected.forEach(function(t){n.$set(n.selected,t,{id:t})}),i?this.fetch().then(function(){n.$refs.dialog.open()}):this.$refs.dialog.open()},submit:function(){this.$emit("submit",ft()(this.selected)),this.$refs.dialog.close()},isSelected:function(t){return void 0!==this.selected[t.id]},toggle:function(t){!1===this.options.multiple&&(this.selected={}),!0!==this.isSelected(t)?this.options.max&&this.options.max<=J()(this.selected).length||this.$set(this.selected,t.id,t):this.$delete(this.selected,t.id)}}},vt={mixins:[gt]},bt=vt,kt=(n("bf53"),Object(c["a"])(bt,ct,dt,!1,null,null,null)),$t=kt.exports,_t=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("language.create"),notification:t.notification,theme:"positive",size:"medium"},on:{submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields,novalidate:!0},on:{submit:t.submit},model:{value:t.language,callback:function(e){t.language=e},expression:"language"}})],1)},yt=[],xt={mixins:[r],data:function(){return{notification:null,language:{name:"",code:"",direction:"ltr",locale:""}}},computed:{fields:function(){return{name:{label:this.$t("language.name"),type:"text",required:!0,icon:"title"},code:{label:this.$t("language.code"),type:"text",required:!0,counter:!1,icon:"globe",width:"1/2"},direction:{label:this.$t("language.direction"),type:"select",required:!0,empty:!1,options:[{value:"ltr",text:this.$t("language.direction.ltr")},{value:"rtl",text:this.$t("language.direction.rtl")}],width:"1/2"},locale:{label:this.$t("language.locale"),type:"text",placeholder:"en_US"}}},system:function(){return this.$store.state.system.info}},watch:{"language.name":function(t){this.onNameChanges(t)},"language.code":function(t){this.language.code=at(t,[this.system.ascii])}},methods:{onNameChanges:function(t){this.language.code=at(t,[this.language.rules,this.system.ascii]).substr(0,2)},open:function(){this.language={name:"",code:"",direction:"ltr"},this.$refs.dialog.open()},submit:function(){var t=this;this.$api.post("languages",{name:this.language.name,code:this.language.code,direction:this.language.direction,locale:this.language.locale}).then(function(){t.$store.dispatch("languages/load"),t.success({message:":)",event:"language.create"})}).catch(function(e){t.$refs.dialog.error(e.message)})}}},wt=xt,Ot=Object(c["a"])(wt,_t,yt,!1,null,null,null),Ct=Ot.exports,St=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("delete"),theme:"negative",icon:"trash"},on:{submit:t.submit}},[n("k-text",{domProps:{innerHTML:t._s(t.$t("language.delete.confirm",{name:t.language.name}))}})],1)},Et=[],jt={mixins:[r],data:function(){return{language:{name:null}}},methods:{open:function(t){var e=this;this.$api.get("languages/"+t).then(function(t){e.language=t,e.$refs.dialog.open()}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){var t=this;this.$api.delete("languages/"+this.language.code).then(function(){t.$store.dispatch("languages/load"),t.success({message:t.$t("language.deleted"),event:"language.delete"})}).catch(function(e){t.$refs.dialog.error(e.message)})}}},Tt=jt,It=Object(c["a"])(Tt,St,Et,!1,null,null,null),Lt=It.exports,qt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("save"),notification:t.notification,size:"medium"},on:{submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.language,callback:function(e){t.language=e},expression:"language"}})],1)},At=[],Nt=n("7618"),Bt={mixins:[Ct],computed:{fields:function(){var t=Ct.computed.fields.apply(this);return t.code.disabled=!0,"object"===Object(Nt["a"])(this.language.locale)&&(t.locale={label:t.locale.label,type:"info",text:"You are using a custom locale set up. Please modify it in the language file in /site/languages"}),t}},methods:{onNameChanges:function(){return!1},open:function(t){var e=this;this.$api.get("languages/"+t).then(function(t){e.language=t;var n=J()(e.language.locale);1===n.length&&(e.language.locale=e.language.locale[n[0]]),e.$refs.dialog.open()}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){var t=this;this.$api.patch("languages/"+this.language.code,{name:this.language.name,direction:this.language.direction,locale:this.language.locale}).then(function(){t.$store.dispatch("languages/load"),t.success({message:t.$t("language.updated"),event:"language.update"})}).catch(function(e){t.$refs.dialog.error(e.message)})}}},Dt=Bt,Pt=Object(c["a"])(Dt,qt,At,!1,null,null,null),Mt=Pt.exports,Rt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("page.draft.create"),notification:t.notification,size:"medium",theme:"positive"},on:{submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields,novalidate:!0},on:{submit:t.submit},model:{value:t.page,callback:function(e){t.page=e},expression:"page"}})],1)},zt=[],Ut=(n("b54a"),{mixins:[r],data:function(){return{notification:null,parent:null,section:null,templates:[],page:{title:"",slug:"",template:null}}},computed:{fields:function(){return{title:{label:this.$t("title"),type:"text",required:!0,icon:"title"},slug:{label:this.$t("slug"),type:"text",required:!0,counter:!1,icon:"url"},template:{name:"template",label:this.$t("template"),type:"select",disabled:1===this.templates.length,required:!0,icon:"code",empty:!1,options:this.templates}}},slugs:function(){return this.$store.state.languages.default?this.$store.state.languages.default.rules:this.system.slugs},system:function(){return this.$store.state.system.info}},watch:{"page.title":function(t){this.page.slug=at(t,[this.slugs,this.system.ascii])}},methods:{open:function(t,e,n){var i=this;this.parent=t,this.section=n,this.$api.get(e,{section:n}).then(function(t){i.templates=t.map(function(t){return{value:t.name,text:t.title}}),i.templates[0]&&(i.page.template=i.templates[0].value),i.$refs.dialog.open()}).catch(function(t){i.$store.dispatch("notification/error",t)})},submit:function(){var t=this;if(0===this.page.title.length)return this.$refs.dialog.error("Please enter a title"),!1;var e={template:this.page.template,slug:this.page.slug,content:{title:this.page.title}};this.$api.post(this.parent+"/children",e).then(function(e){t.success({route:t.$api.pages.link(e.id),message:":)",event:"page.create"})}).catch(function(e){t.$refs.dialog.error(e.message)})}}}),Ft=Ut,Ht=Object(c["a"])(Ft,Rt,zt,!1,null,null,null),Kt=Ht.exports,Vt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("duplicate"),notification:t.notification,size:"medium",theme:"positive"},on:{submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields,novalidate:!0},on:{submit:t.submit},model:{value:t.page,callback:function(e){t.page=e},expression:"page"}})],1)},Yt=[],Wt={mixins:[r],data:function(){return{notification:null,page:{children:!1,files:!1,hasChildren:!1,hasDrafts:!1,hasFiles:!1,id:null,slug:""}}},computed:{fields:function(){var t=this.page.hasChildren||this.page.hasDrafts,e=this.page.hasFiles,n={slug:{label:this.$t("slug"),type:"text",required:!0,counter:!1,spellcheck:!1,icon:"url"}};return e&&(n.files={label:this.$t("page.duplicate.files"),type:"toggle",required:!0,width:t?"1/2":null}),t&&(n.children={label:this.$t("page.duplicate.pages"),type:"toggle",required:!0,width:e?"1/2":null}),n},slugs:function(){return this.$store.state.languages.default?this.$store.state.languages.default.rules:this.system.slugs},system:function(){return this.$store.state.system.info}},watch:{"page.slug":function(t){this.page.slug=at(t,[this.slugs,this.system.ascii])}},methods:{open:function(t){var e=this;this.$api.pages.get(t,{language:"@default",select:"id,slug,hasChildren,hasDrafts,hasFiles,title"}).then(function(t){e.page.id=t.id,e.page.slug=t.slug+"-"+at(e.$t("page.duplicate.appendix")),e.page.hasChildren=t.hasChildren,e.page.hasDrafts=t.hasDrafts,e.page.hasFiles=t.hasFiles,e.$refs.dialog.open()}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){var t=this;this.$api.pages.duplicate(this.page.id,this.page.slug,{children:this.page.children,files:this.page.files}).then(function(e){t.success({route:t.$api.pages.link(e.id),message:":)",event:"page.duplicate"})}).catch(function(e){t.$refs.dialog.error(e.message)})}}},Gt=Wt,Jt=Object(c["a"])(Gt,Vt,Yt,!1,null,null,null),Zt=Jt.exports,Xt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("delete"),size:t.hasSubpages?"medium":"small",theme:"negative",icon:"trash"},on:{submit:t.submit}},[t.page.hasChildren||t.page.hasDrafts?[n("k-text",{domProps:{innerHTML:t._s(t.$t("page.delete.confirm",{title:t.page.title}))}}),n("div",{staticClass:"k-page-remove-warning"},[n("k-box",{attrs:{theme:"negative"},domProps:{innerHTML:t._s(t.$t("page.delete.confirm.subpages"))}})],1),t.hasSubpages?n("k-form",{attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.model,callback:function(e){t.model=e},expression:"model"}}):t._e()]:[n("k-text",{domProps:{innerHTML:t._s(t.$t("page.delete.confirm",{title:t.page.title}))},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.submit(e)}}})]],2)},Qt=[],te={mixins:[r],data:function(){return{page:{title:null,hasChildren:!1,hasDrafts:!1},model:{check:null}}},computed:{hasSubpages:function(){return this.page.hasChildren||this.page.hasDrafts},fields:function(){return{check:{label:this.$t("page.delete.confirm.title"),type:"text",counter:!1}}}},methods:{open:function(t){var e=this;this.$api.pages.get(t,{select:"id, title, hasChildren, hasDrafts, parent"}).then(function(t){e.page=t,e.$refs.dialog.open()}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){var t=this;this.hasSubpages&&this.model.check!==this.page.title?this.$refs.dialog.error(this.$t("error.page.delete.confirm")):this.$api.pages.delete(this.page.id,{force:!0}).then(function(){t.$store.dispatch("form/remove","pages/"+t.page.id);var e={message:":)",event:"page.delete"};t.$route.params.path&&t.page.id===t.$route.params.path.replace(/\+/g,"/")&&(t.page.parent?e.route="/pages/"+t.page.parent.id:e.route="/pages"),t.success(e)}).catch(function(e){t.$refs.dialog.error(e.message)})}}},ee=te,ne=(n("12fb"),Object(c["a"])(ee,Xt,Qt,!1,null,null,null)),ie=ne.exports,se=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("rename"),size:"medium",theme:"positive"},on:{submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.page,callback:function(e){t.page=e},expression:"page"}})],1)},ae=[],oe={mixins:[r],data:function(){return{page:{id:null,title:null}}},computed:{fields:function(){return{title:{label:this.$t("title"),type:"text",required:!0,icon:"title",preselect:!0}}}},methods:{open:function(t){var e=this;this.$api.pages.get(t,{select:["id","title"]}).then(function(t){e.page=t,e.$refs.dialog.open()}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){var t=this;0!==this.page.title.length?this.$api.pages.title(this.page.id,this.page.title).then(function(){t.success({message:":)",event:"page.changeTitle"})}).catch(function(e){t.$refs.dialog.error(e.message)}):this.$refs.dialog.error(this.$t("error.page.changeTitle.empty"))}}},re=oe,le=Object(c["a"])(re,se,ae,!1,null,null,null),ue=le.exports,ce=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("change"),size:"medium",theme:"positive"},on:{submit:t.submit}},[n("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.changeStatus},model:{value:t.form,callback:function(e){t.form=e},expression:"form"}})],1)},de=[],pe={mixins:[r],data:function(){return{page:{id:null},isBlocked:!1,isIncomplete:!1,form:{status:null,position:null},states:{}}},computed:{fields:function(){var t=this,e={status:{name:"status",label:this.$t("page.changeStatus.select"),type:"radio",required:!0,options:J()(this.states).map(function(e){return{value:e,text:t.states[e].label,info:t.states[e].text}})}};return"listed"===this.form.status&&"default"===this.page.blueprint.num&&(e.position={name:"position",label:this.$t("page.changeStatus.position"),type:"select",empty:!1,options:this.sortingOptions()}),e}},methods:{sortingOptions:function(){var t=this,e=[],n=0;return this.page.siblings.forEach(function(i){if(i.id===t.page.id||i.num<1)return!1;n++,e.push({value:n,text:n}),e.push({value:i.id,text:i.title,disabled:!0})}),e.push({value:n+1,text:n+1}),e},open:function(t){var e=this;this.$api.pages.get(t,{select:["id","status","num","errors","siblings","blueprint"]}).then(function(t){return!1===t.blueprint.options.changeStatus?e.$store.dispatch("notification/error",{message:e.$t("error.page.changeStatus.permission")}):"draft"===t.status&&J()(t.errors).length>0?e.$store.dispatch("notification/error",{message:e.$t("error.page.changeStatus.incomplete"),details:t.errors}):(e.states=t.blueprint.status,e.page=t,e.form.status=t.status,e.form.position=t.num||t.siblings.length+1,void e.$refs.dialog.open())}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){this.$refs.form.submit()},changeStatus:function(){var t=this;this.$api.pages.status(this.page.id,this.form.status,this.form.position||1).then(function(){t.success({message:":)",event:"page.changeStatus"})}).catch(function(e){t.$refs.dialog.error(e.message)})}}},fe=pe,he=Object(c["a"])(fe,ce,de,!1,null,null,null),me=he.exports,ge=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("change"),size:"medium",theme:"positive"},on:{submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.page,callback:function(e){t.page=e},expression:"page"}})],1)},ve=[],be={mixins:[r],data:function(){return{blueprints:[],page:{id:null,template:null}}},computed:{fields:function(){return{template:{label:this.$t("template"),type:"select",required:!0,empty:!1,options:this.page.blueprints,icon:"template"}}}},methods:{open:function(t){var e=this;this.$api.pages.get(t,{select:["id","template","blueprints"]}).then(function(t){if(t.blueprints.length<=1)return e.$store.dispatch("notification/error",{message:e.$t("error.page.changeTemplate.invalid",{slug:t.id})});e.page=t,e.page.blueprints=e.page.blueprints.map(function(t){return{text:t.title,value:t.name}}),e.$refs.dialog.open()}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){var t=this;this.$events.$emit("keydown.cmd.s"),this.$api.pages.template(this.page.id,this.page.template).then(function(){t.success({message:":)",event:"page.changeTemplate"})}).catch(function(e){t.$refs.dialog.error(e.message)})}}},ke=be,$e=Object(c["a"])(ke,ge,ve,!1,null,null,null),_e=$e.exports,ye=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("change"),size:"medium",theme:"positive"},on:{submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",on:{submit:t.submit}},[n("k-text-field",t._b({attrs:{value:t.slug},on:{input:function(e){return t.sluggify(e)}}},"k-text-field",t.field,!1),[n("k-button",{attrs:{slot:"options",icon:"wand","data-options":""},on:{click:function(e){return t.sluggify(t.page.title)}},slot:"options"},[t._v("\n "+t._s(t.$t("page.changeSlug.fromTitle"))+"\n ")])],1)],1)],1)},xe=[],we={mixins:[r],data:function(){return{slug:null,url:null,page:{id:null,parent:null,title:null}}},computed:{field:function(){return{name:"slug",label:this.$t("slug"),type:"text",required:!0,icon:"url",help:"/"+this.url,counter:!1,preselect:!0}},slugs:function(){return this.$store.state.languages.current?this.$store.state.languages.current.rules:this.system.slugs},system:function(){return this.$store.state.system.info}},methods:{sluggify:function(t){this.slug=at(t,[this.slugs,this.system.ascii]),this.page.parents?this.url=this.page.parents.map(function(t){return t.slug}).concat([this.slug]).join("/"):this.url=this.slug},open:function(t){var e=this;this.$api.pages.get(t,{view:"panel"}).then(function(t){e.page=t,e.sluggify(e.page.slug),e.$refs.dialog.open()}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){var t=this;if(this.slug===this.page.slug)return this.$refs.dialog.close(),void this.$store.dispatch("notification/success",":)");0!==this.slug.length?this.$api.pages.slug(this.page.id,this.slug).then(function(e){t.$store.dispatch("form/move",{old:t.$store.getters["form/id"](t.page.id),new:t.$store.getters["form/id"](e.id)});var n={message:":)",event:"page.changeSlug"};!t.$route.params.path||t.page.id!==t.$route.params.path.replace(/\+/g,"/")||t.$store.state.languages.current&&!0!==t.$store.state.languages.current.default||(n.route=t.$api.pages.link(e.id),delete n.event),t.success(n)}).catch(function(e){t.$refs.dialog.error(e.message)}):this.$refs.dialog.error(this.$t("error.page.slug.invalid"))}}},Oe=we,Ce=Object(c["a"])(Oe,ye,xe,!1,null,null,null),Se=Ce.exports,Ee=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.models.length?n("k-list",t._l(t.models,function(e){return n("k-list-item",{key:e.id,attrs:{text:e.text,info:e.info,image:e.image,icon:e.icon},on:{click:function(n){return t.toggle(e)}}},[n("template",{slot:"options"},[t.isSelected(e)?n("k-button",{attrs:{slot:"options",autofocus:!0,icon:t.checkedIcon,tooltip:t.$t("remove"),theme:"positive"},slot:"options"}):n("k-button",{attrs:{slot:"options",autofocus:!0,tooltip:t.$t("select"),icon:"circle-outline"},slot:"options"}),t.model?n("k-button",{attrs:{disabled:!e.hasChildren,tooltip:t.$t("open"),icon:"angle-right"},on:{click:function(n){return n.stopPropagation(),t.go(e)}}}):t._e()],1)],2)}),1):n("k-empty",{attrs:{icon:"page"}},[t._v("\n "+t._s(t.$t("dialog.pages.empty"))+"\n ")])]],2)},je=[],Te={mixins:[gt],data:function(){var t=gt.data();return Object(f["a"])({},t,{model:{title:null,parent:null},options:Object(f["a"])({},t.options,{parent:null})})},computed:{fetchData:function(){return{parent:this.options.parent}}},methods:{back:function(){this.options.parent=this.model.parent,this.fetch()},go:function(t){this.options.parent=t.id,this.fetch()},onFetched:function(t){this.model=t.model}}},Ie=Te,Le=(n("ac27"),Object(c["a"])(Ie,Ee,je,!1,null,null,null)),qe=Le.exports,Ae={extends:ue,methods:{open:function(){var t=this;this.$api.site.get({select:["title"]}).then(function(e){t.page=e,t.$refs.dialog.open()}).catch(function(e){t.$store.dispatch("notification/error",e)})},submit:function(){var t=this;this.$api.site.title(this.page.title).then(function(){t.$store.dispatch("system/title",t.page.title),t.success({message:":)",event:"site.changeTitle"})}).catch(function(e){t.$refs.dialog.error(e.message)})}}},Ne=Ae,Be=Object(c["a"])(Ne,Z,X,!1,null,null,null),De=Be.exports,Pe=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("create"),size:"medium",theme:"positive"},on:{submit:function(e){return t.$refs.form.submit()},close:t.reset}},[n("k-form",{ref:"form",attrs:{fields:t.fields,novalidate:!0},on:{submit:t.create},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}})],1)},Me=[],Re={mixins:[r],data:function(){return{user:this.emptyUser(),languages:[],roles:[]}},computed:{fields:function(){return{name:{label:this.$t("name"),type:"text",icon:"user"},email:{label:this.$t("email"),type:"email",icon:"email",link:!1,required:!0},password:{label:this.$t("password"),type:"password",icon:"key"},language:{label:this.$t("language"),type:"select",icon:"globe",options:this.languages,required:!0,empty:!1},role:{label:this.$t("role"),type:1===this.roles.length?"hidden":"radio",required:!0,options:this.roles}}}},methods:{create:function(){var t=this;this.$api.users.create(this.user).then(function(){t.success({message:":)",event:"user.create"})}).catch(function(e){t.$refs.dialog.error(e.message)})},emptyUser:function(){return{name:"",email:"",password:"",language:"en",role:"admin"}},open:function(){var t=this;this.$api.roles.options().then(function(e){t.roles=e,t.$api.translations.options().then(function(e){t.languages=e,t.$refs.dialog.open()}).catch(function(e){t.$store.dispatch("notification/error",e)})}).catch(function(e){t.$store.dispatch("notification/error",e)})},reset:function(){this.user=this.emptyUser()}}},ze=Re,Ue=Object(c["a"])(ze,Pe,Me,!1,null,null,null),Fe=Ue.exports,He=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("change"),size:"medium",theme:"positive"},on:{submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}})],1)},Ke=[],Ve={mixins:[r],data:function(){return{user:{id:null,email:null}}},computed:{fields:function(){return{email:{label:this.$t("email"),preselect:!0,required:!0,type:"email"}}}},methods:{open:function(t){var e=this;this.$api.users.get(t,{select:["id","email"]}).then(function(t){e.user=t,e.$refs.dialog.open()}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){var t=this;this.$api.users.changeEmail(this.user.id,this.user.email).then(function(e){t.$store.dispatch("form/revert","users/"+t.user.id);var n={message:":)",event:"user.changeEmail"};"User"===t.$route.name&&(n.route=t.$api.users.link(e.id)),t.success(n)}).catch(function(e){t.$refs.dialog.error(e.message)})}}},Ye=Ve,We=Object(c["a"])(Ye,He,Ke,!1,null,null,null),Ge=We.exports,Je=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("change"),theme:"positive",icon:"check"},on:{submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}})],1)},Ze=[],Xe={mixins:[r],data:function(){return{user:{language:"en"},languages:[]}},computed:{fields:function(){return{language:{label:this.$t("language"),type:"select",icon:"globe",options:this.languages,required:!0,empty:!1}}}},created:function(){var t=this;this.$api.translations.options().then(function(e){t.languages=e})},methods:{open:function(t){var e=this;this.$api.users.get(t,{view:"compact"}).then(function(t){e.user=t,e.$refs.dialog.open()}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){var t=this;this.$api.users.changeLanguage(this.user.id,this.user.language).then(function(e){t.user=e,t.$store.state.user.current.id===t.user.id&&t.$store.dispatch("user/language",t.user.language),t.success({message:":)",event:"user.changeLanguage"})}).catch(function(e){t.$refs.dialog.error(e.message)})}}},Qe=Xe,tn=Object(c["a"])(Qe,Je,Ze,!1,null,null,null),en=tn.exports,nn=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("change"),theme:"positive",icon:"check"},on:{submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.values,callback:function(e){t.values=e},expression:"values"}})],1)},sn=[],an={mixins:[r],data:function(){return{user:null,values:{password:null,passwordConfirmation:null}}},computed:{fields:function(){return{password:{label:this.$t("user.changePassword.new"),type:"password",icon:"key"},passwordConfirmation:{label:this.$t("user.changePassword.new.confirm"),icon:"key",type:"password"}}}},methods:{open:function(t){var e=this;this.$api.users.get(t).then(function(t){e.user=t,e.$refs.dialog.open()}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){var t=this;return this.values.password.length<8?(this.$refs.dialog.error(this.$t("error.user.password.invalid")),!1):this.values.password!==this.values.passwordConfirmation?(this.$refs.dialog.error(this.$t("error.user.password.notSame")),!1):void this.$api.users.changePassword(this.user.id,this.values.password).then(function(){t.success({message:":)",event:"user.changePassword"})}).catch(function(e){t.$refs.dialog.error(e.message)})}}},on=an,rn=Object(c["a"])(on,nn,sn,!1,null,null,null),ln=rn.exports,un=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("delete"),theme:"negative",icon:"trash"},on:{submit:t.submit}},[n("k-text",{domProps:{innerHTML:t._s(t.$t("user.delete.confirm",{email:t.user.email}))}})],1)},cn=[],dn={mixins:[r],data:function(){return{user:{email:null}}},methods:{open:function(t){var e=this;this.$api.users.get(t).then(function(t){e.user=t,e.$refs.dialog.open()}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){var t=this;this.$api.users.delete(this.user.id).then(function(){t.$store.dispatch("form/remove","users/"+t.user.id),t.success({message:":)",event:"user.delete"}),"User"===t.$route.name&&t.$router.push("/users")}).catch(function(e){t.$refs.dialog.error(e.message)})}}},pn=dn,fn=Object(c["a"])(pn,un,cn,!1,null,null,null),hn=fn.exports,mn=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("rename"),size:"medium",theme:"positive"},on:{submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}})],1)},gn=[],vn={mixins:[r],data:function(){return{user:{id:null,name:null}}},computed:{fields:function(){return{name:{label:this.$t("name"),type:"text",icon:"user",preselect:!0}}}},methods:{open:function(t){var e=this;this.$api.users.get(t,{select:["id","name"]}).then(function(t){e.user=t,e.$refs.dialog.open()}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){var t=this;this.$api.users.changeName(this.user.id,this.user.name).then(function(){t.success({message:":)",event:"user.changeName"})}).catch(function(e){t.$refs.dialog.error(e.message)})}}},bn=vn,kn=Object(c["a"])(bn,mn,gn,!1,null,null,null),$n=kn.exports,_n=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{button:t.$t("user.changeRole"),size:"medium",theme:"positive"},on:{submit:function(e){return t.$refs.form.submit()}}},[n("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}})],1)},yn=[],xn={mixins:[r],data:function(){return{roles:[],user:{id:null,role:"visitor"}}},computed:{fields:function(){return{role:{label:this.$t("user.changeRole.select"),type:"radio",required:!0,options:this.roles}}}},methods:{open:function(t){var e=this;this.id=t,this.$api.users.get(t).then(function(t){e.$api.roles.options().then(function(n){e.roles=n,e.user=t,e.user.role=e.user.role.name,e.$refs.dialog.open()})}).catch(function(t){e.$store.dispatch("notification/error",t)})},submit:function(){var t=this;this.$api.users.changeRole(this.user.id,this.user.role).then(function(){t.success({message:":)",event:"user.changeRole"})}).catch(function(e){t.$refs.dialog.error(e.message)})}}},wn=xn,On=Object(c["a"])(wn,_n,yn,!1,null,null,null),Cn=On.exports,Sn=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.models.length?n("k-list",t._l(t.models,function(e){return n("k-list-item",{key:e.email,attrs:{text:e.username,image:e.image,icon:e.icon},on:{click:function(n){return t.toggle(e)}}},[t.isSelected(e)?n("k-button",{attrs:{slot:"options",autofocus:!0,icon:t.checkedIcon,tooltip:t.$t("remove"),theme:"positive"},slot:"options"}):n("k-button",{attrs:{slot:"options",autofocus:!0,tooltip:t.$t("select"),icon:"circle-outline"},slot:"options"})],1)}),1):n("k-empty",{attrs:{icon:"users"}},[t._v("\n "+t._s(t.$t("dialog.users.empty"))+"\n ")])]],2)},En=[],jn={mixins:[gt]},Tn=jn,In=(n("7568"),Object(c["a"])(Tn,Sn,En,!1,null,null,null)),Ln=In.exports,qn=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:{click: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"])?null:"button"in e&&0!==e.button?null:(e.preventDefault(),t.close(e))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"backspace",void 0,e.key,void 0)?null:(e.preventDefault(),t.close(e))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"delete",[8,46],e.key,["Backspace","Delete","Del"])?null:(e.preventDefault(),t.close(e))}]}},"k-dropdown-item",e,!1),[t._v("\n "+t._s(e.text)+"\n ")])}),1),t._v("\n "+t._s(t.query)+"\n")],2)},An=[],Nn=(n("4917"),{props:{limit:10,skip:{type:Array,default:function(){return[]}},options:Array,query:String},data:function(){return{matches:[],selected:{text:null}}},methods:{close:function(){this.$refs.dropdown.close()},onSelect:function(t){this.$refs.dropdown.close(),this.$emit("select",t)},search:function(t){var e=this;if(!(t.length<1)){var n=new RegExp(RegExp.escape(t),"ig");this.matches=this.options.filter(function(t){return!!t.text&&(-1===e.skip.indexOf(t.value)&&null!==t.text.match(n))}).slice(0,this.limit),this.$emit("search",t,this.matches),this.$refs.dropdown.open()}}}}),Bn=Nn,Dn=Object(c["a"])(Bn,qn,An,!1,null,null,null),Pn=Dn.exports,Mn=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.prev}}),n("span",{staticClass:"k-calendar-selects"},[n("k-select-input",{attrs:{options:t.months,disabled:t.disabled,required:!0},model:{value:t.month,callback:function(e){t.month=t._n(e)},expression:"month"}}),n("k-select-input",{attrs:{options:t.years,disabled:t.disabled,required:!0},model:{value:t.year,callback:function(e){t.year=t._n(e)},expression:"year"}})],1),n("k-button",{attrs:{icon:"angle-right"},on:{click:t.next}})],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.numberOfWeeks,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.isCurrent(e)&&"date"}},[e?n("k-button",{on:{click:function(n){return t.select(e)}}},[t._v(t._s(e))]):t._e()],1)}),0)}),0),n("tfoot",[n("tr",[n("td",{staticClass:"k-calendar-today",attrs:{colspan:"7"}},[n("k-button",{on:{click:function(e){return t.go("today")}}},[t._v(t._s(t.$t("today")))])],1)])])])])},Rn=[],zn=n("5a0c"),Un=n.n(zn),Fn=function(t,e){t=String(t);var n="";e=(e||2)-t.length;while(n.length0?t:7},weekdays:function(){return[this.$t("days.mon"),this.$t("days.tue"),this.$t("days.wed"),this.$t("days.thu"),this.$t("days.fri"),this.$t("days.sat"),this.$t("days.sun")]},monthnames:function(){return[this.$t("months.january"),this.$t("months.february"),this.$t("months.march"),this.$t("months.april"),this.$t("months.may"),this.$t("months.june"),this.$t("months.july"),this.$t("months.august"),this.$t("months.september"),this.$t("months.october"),this.$t("months.november"),this.$t("months.december")]},months:function(){var t=[];return this.monthnames.forEach(function(e,n){t.push({value:n,text:e})}),t},years:function(){for(var t=[],e=this.year-10;e<=this.year+10;e++)t.push({value:e,text:Fn(e)});return t}},watch:{value:function(t){var e=Un()(t);this.day=e.date(),this.month=e.month(),this.year=e.year(),this.current=e}},methods:{days:function(t){for(var e=[],n=7*(t-1)+1,i=n;ithis.numberOfDays?e.push(""):e.push(s)}return e},next:function(){var t=this.date.clone().add(1,"month");this.set(t)},isToday:function(t){return this.month===this.today.month()&&this.year===this.today.year()&&t===this.today.date()},isCurrent:function(t){return this.month===this.current.month()&&this.year===this.current.year()&&t===this.current.date()},prev:function(){var t=this.date.clone().subtract(1,"month");this.set(t)},go:function(t,e){"today"===t&&(t=this.today.year(),e=this.today.month()),this.year=t,this.month=e},set:function(t){this.day=t.date(),this.month=t.month(),this.year=t.year()},select:function(t){t&&(this.day=t);var e=Un()(new Date(this.year,this.month,this.day,this.current.hour(),this.current.minute()));this.$emit("input",e.toISOString())}}},Kn=Hn,Vn=(n("ee15"),Object(c["a"])(Kn,Mn,Rn,!1,null,null,null)),Yn=Vn.exports,Wn=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()])},Gn=[],Jn=(n("c5f6"),{props:{count:Number,min:Number,max:Number,required:{type:Boolean,default:!1}},computed:{valid:function(){return!1===this.required&&0===this.count||(!0!==this.required||0!==this.count)&&(!(this.min&&this.countthis.max))}}}),Zn=Jn,Xn=(n("fc0f"),Object(c["a"])(Zn,Wn,Gn,!1,null,null,null)),Qn=Xn.exports,ti=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(e)}}},[t._t("header"),t._t("default",[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)},ei=[],ni={props:{disabled:Boolean,config:Object,fields:{type:[Array,Object],default:function(){return{}}},novalidate:{type:Boolean,default:!1},value:{type:Object,default:function(){return{}}}},data:function(){return{errors:{},listeners:Object(f["a"])({},this.$listeners,{submit:this.onSubmit})}},methods:{focus:function(t){this.$refs.fields&&this.$refs.fields.focus&&this.$refs.fields.focus(t)},onSubmit:function(){this.$emit("submit",this.value)},submit:function(){this.$refs.submitter.click()}}},ii=ni,si=(n("5d33"),Object(c["a"])(ii,ti,ei,!1,null,null,null)),ai=si.exports,oi=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("nav",{staticClass:"k-form-buttons",attrs:{"data-theme":t.mode}},["unlock"===t.mode?n("k-view",[n("p",{staticClass:"k-form-lock-info"},[t._v("\n "+t._s(t.$t("lock.isUnlocked"))+"\n ")]),n("span",{staticClass:"k-form-lock-buttons"},[n("k-button",{staticClass:"k-form-button",attrs:{icon:"download"},on:{click:t.onDownload}},[t._v("\n "+t._s(t.$t("download"))+"\n ")]),n("k-button",{staticClass:"k-form-button",attrs:{icon:"check"},on:{click:t.onResolve}},[t._v("\n "+t._s(t.$t("confirm"))+"\n ")])],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.form.lock.email}))}})],1),n("k-button",{staticClass:"k-form-button",attrs:{disabled:!t.form.lock.canUnlock,icon:"unlock"},on:{click:t.setUnlock}},[t._v("\n "+t._s(t.$t("lock.unlock"))+"\n ")])],1):"changes"===t.mode?n("k-view",[n("k-button",{staticClass:"k-form-button",attrs:{disabled:t.isDisabled,icon:"undo"},on:{click:t.onRevert}},[t._v("\n "+t._s(t.$t("revert"))+"\n ")]),n("k-button",{staticClass:"k-form-button",attrs:{disabled:t.isDisabled,icon:"check"},on:{click:t.onSave}},[t._v("\n "+t._s(t.$t("save"))+"\n ")])],1):t._e()],1)},ri=[],li=n("e814"),ui=n.n(li),ci={computed:{hasChanges:function(){return this.$store.getters["form/hasChanges"](this.id)},hasLock:function(){return null!==this.form.lock},hasUnlock:function(){return null!==this.form.unlock},form:function(){return{lock:this.$store.getters["form/lock"],unlock:this.$store.getters["form/unlock"]}},id:function(){return this.$store.getters["form/current"]},isDisabled:function(){return this.$store.getters["form/isDisabled"]},mode:function(){return!0===this.hasUnlock?"unlock":!0===this.hasLock?"lock":!0===this.hasChanges?"changes":void 0}},watch:{hasChanges:function(t,e){!0===t&&0==e?(this.$store.dispatch("heartbeat/remove",this.listen),this.$store.dispatch("heartbeat/add",[this.setLock,30])):this.id&&!1===t&&1==e&&this.removeLock()},id:function(){if(!this.id)return this.$store.dispatch("heartbeat/remove",this.listen),void this.$store.dispatch("heartbeat/remove",this.setLock);!1===this.hasChanges&&this.$store.dispatch("heartbeat/add",this.listen)}},created:function(){this.$events.$on("keydown.cmd.s",this.onSave)},destroyed:function(){this.$events.$off("keydown.cmd.s",this.onSave)},methods:{listen:function(){var t=this;return this.$api.get(this.$route.path+"/lock",null,null,!0).then(function(e){!0!==e.locked?(t.hasLock&&t.form.lock.user!==t.$store.state.user.current.id&&t.$events.$emit("model.reload"),t.$store.dispatch("form/lock",null)):t.$store.dispatch("form/lock",{user:e.user,email:e.email,time:ui()(e.time,10),canUnlock:e.canUnlock})})},setLock:function(){var t=this;this.$api.patch(this.$route.path+"/lock",null,null,!0).catch(function(){t.$store.dispatch("form/revert",t.id),t.$store.dispatch("heartbeat/remove",t.setLock),t.$store.dispatch("heartbeat/add",t.listen)})},removeLock:function(){var t=this;this.$store.dispatch("heartbeat/remove",this.setLock),this.$api.delete(this.$route.path+"/lock",null,null,!0).then(function(){t.$store.dispatch("form/lock",null),t.$store.dispatch("heartbeat/add",t.listen)})},setUnlock:function(){var t=this;this.$store.dispatch("heartbeat/remove",this.setLock),this.$api.patch(this.$route.path+"/unlock",null,null,!0).then(function(){t.$store.dispatch("form/lock",null),t.$store.dispatch("heartbeat/add",t.listen)})},removeUnlock:function(){var t=this;this.$store.dispatch("heartbeat/remove",this.setLock),this.$api.delete(this.$route.path+"/unlock",null,null,!0).then(function(){t.$store.dispatch("form/unlock",null),t.$store.dispatch("heartbeat/add",t.listen)})},onDownload:function(){var t=this,e="";J()(this.form.unlock).forEach(function(n){e+=n+": \n\n"+t.form.unlock[n],e+="\n\n----\n\n"});var n=document.createElement("a");n.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(e)),n.setAttribute("download",this.id+".txt"),n.style.display="none",document.body.appendChild(n),n.click(),document.body.removeChild(n)},onResolve:function(){this.$store.dispatch("form/revert",this.id),this.removeUnlock()},onRevert:function(){this.$store.dispatch("form/revert",this.id)},onSave:function(t){var e=this;return!!t&&(t.preventDefault&&t.preventDefault(),!1===this.hasChanges||void this.$store.dispatch("form/save",this.id).then(function(){e.$events.$emit("model.update"),e.$store.dispatch("notification/success",":)")}).catch(function(t){403!==t.code&&(t.details?e.$store.dispatch("notification/error",{message:e.$t("error.form.incomplete"),details:t.details}):e.$store.dispatch("notification/error",{message:e.$t("error.form.notSaved"),details:[{label:"Exception: "+t.exception,message:t.message}]}))}))}}},di=ci,pi=(n("18dd"),Object(c["a"])(di,oi,ri,!1,null,null,null)),fi=pi.exports,hi=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.storage.length>0?n("k-dropdown",{staticClass:"k-form-indicator"},[n("k-button",{staticClass:"k-topbar-button",on:{click:t.toggle}},[n("k-icon",{staticClass:"k-form-indicator-icon",attrs:{type:"edit"}})],1),n("k-dropdown-content",{ref:"list",attrs:{align:"right"}},[n("p",{staticClass:"k-form-indicator-info"},[t._v("\n "+t._s(t.$t("lock.unsaved"))+":\n ")]),n("hr"),t._l(t.entries,function(e){return n("k-dropdown-item",{key:e.link,attrs:{icon:e.icon,link:e.link}},[t._v("\n "+t._s(e.label)+"\n ")])})],2)],1):t._e()},mi=[],gi=(n("28a5"),n("795b")),vi=n.n(gi),bi=(n("5df3"),n("f559"),{data:function(){return{isOpen:!1,entries:[],storage:[]}},computed:{store:function(){return this.$store.state.form.models}},watch:{store:{handler:function(){this.loadFromStorage()},deep:!0}},created:function(){this.loadFromStorage()},methods:{loadFromApi:function(){var t=this,e=this.storage.map(function(e){return t.$api.get(e.api,{view:"compact"},null,!0).then(function(n){return e.id.startsWith("pages/")?{icon:"page",label:n.title,link:t.$api.pages.link(n.id)}:e.id.startsWith("files/")?{icon:"image",label:n.filename,link:n.link}:e.id.startsWith("users/")?{icon:"user",label:n.email,link:t.$api.users.link(n.id)}:void 0})});return vi.a.all(e).then(function(e){t.entries=e})},loadFromStorage:function(){var t=J()(localStorage);t=t.filter(function(t){return t.startsWith("kirby$form$")}),this.storage=t.map(function(t){return Object(f["a"])({},JSON.parse(localStorage.getItem(t)),{id:t.split("kirby$form$")[1]})}),this.storage=this.storage.filter(function(t){return J()(t.changes||{}).length>0})},toggle:function(){var t=this;this.isOpen=!this.isOpen,!0===this.isOpen?this.loadFromApi().then(function(){t.$refs.list.toggle()}):this.$refs.list.toggle()}}}),ki=bi,$i=(n("9e26"),Object(c["a"])(ki,hi,mi,!1,null,null,null)),_i=$i.exports,yi=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},on:{focusin:function(e){return t.$emit("focus",e)},focusout:function(e){return t.$emit("blur",e)}}},[t._t("header",[n("header",{staticClass:"k-field-header"},[t._t("label",[n("label",{staticClass:"k-field-label",attrs:{for:t.input}},[t._v(t._s(t.labelText)+" "),t.required?n("abbr",{attrs:{title:"This field is required"}},[t._v("*")]):t._e()])]),t._t("options"),t._t("counter",[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",[t.help||t.$slots.help?n("footer",{staticClass:"k-field-footer"},[t._t("help",[t.help?n("k-text",{staticClass:"k-field-help",attrs:{theme:"help"},domProps:{innerHTML:t._s(t.help)}}):t._e()])],2):t._e()])],2)},xi=[],wi={inheritAttrs:!1,props:{counter:[Boolean,Object],disabled:Boolean,endpoints:Object,help:String,input:[String,Number],label:String,name:[String,Number],required:Boolean,type:String},computed:{labelText:function(){return this.label||" "}}},Oi=wi,Ci=(n("a134"),Object(c["a"])(Oi,yi,xi,!1,null,null,null)),Si=Ci.exports,Ei=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:{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("\n The field type "),n("strong",[t._v('"'+t._s(i)+'"')]),t._v(" does not exist\n ")])],1)],1)],1):t._e()}),1)],1)},ji=[],Ti={props:{config:Object,disabled:Boolean,fields:{type:[Array,Object],default:function(){return[]}},novalidate:{type:Boolean,default:!1},value:{type:Object,default:function(){return{}}}},data:function(){return{errors:{}}},methods:{focus:function(t){if(t)this.hasField(t)&&"function"===typeof this.$refs[t][0].focus&&this.$refs[t][0].focus();else{var e=J()(this.$refs)[0];this.focus(e)}},hasFieldType:function(t){return C["a"].options.components["k-"+t+"-field"]},hasField:function(t){return this.$refs[t]&&this.$refs[t][0]},meetsCondition:function(t){var e=this;if(!t.when)return!0;var n=!0;return J()(t.when).forEach(function(i){var s=e.value[i.toLowerCase()],a=t.when[i];s!==a&&(n=!1)}),n},onInvalid:function(t,e,n,i){this.errors[i]=e,this.$emit("invalid",this.errors)},hasErrors:function(){return J()(this.errors).length}}},Ii=Ti,Li=(n("862b"),Object(c["a"])(Ii,Ei,ji,!1,null,null,null)),qi=Li.exports,Ai=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",[t._v(t._s(t.before))])],2):t._e(),n("span",{staticClass:"k-input-element",on:{click:function(e){return e.stopPropagation(),t.focus(e)}}},[t._t("default",[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",[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",[n("k-icon",{attrs:{type:t.icon}})])],2):t._e()])},Ni=[],Bi={inheritAttrs:!1,props:{after:String,before:String,disabled:Boolean,type:String,icon:[String,Boolean],invalid:Boolean,theme:String,novalidate:{type:Boolean,default:!1},value:{type:[String,Boolean,Number,Object,Array],default:null}},data:function(){var t=this;return{isInvalid:this.invalid,listeners:Object(f["a"])({},this.$listeners,{invalid:function(e,n){t.isInvalid=e,t.$emit("invalid",e,n)}}),inputProps:Object(f["a"])({},this.$props,this.$attrs)}},methods:{blur:function(t){t.relatedTarget&&!1===this.$el.contains(t.relatedTarget)&&this.$refs.input.blur&&this.$refs.input.blur()},focus:function(t){if(t&&t.target&&"INPUT"===t.target.tagName)t.target.focus();else if(this.$refs.input&&this.$refs.input.focus)this.$refs.input.focus();else{var e=this.$el.querySelector("input, select, textarea");e&&e.focus()}}}},Di=Bi,Pi=(n("c7c8"),Object(c["a"])(Di,Ai,Ni,!1,null,null,null)),Mi=Pi.exports,Ri=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}}),n("k-dialog",{ref:"dialog",attrs:{size:"medium"}},[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)],n("template",{slot:"footer"},[t.errors.length>0?[n("k-button-group",[n("k-button",{attrs:{icon:"check"},on:{click:function(e){return t.$refs.dialog.close()}}},[t._v("\n "+t._s(t.$t("confirm"))+"\n ")])],1)]:t._e()],2)],2)],1)},zi=[],Ui=n("75fc"),Fi=n("5176"),Hi=n.n(Fi),Ki=function(t,e){var n={url:"/",field:"file",method:"POST",accept:"text",attributes:{},complete:function(){},error:function(){},success:function(){},progress:function(){}},i=Hi()(n,e),s=new FormData;s.append(i.field,t,t.name),i.attributes&&J()(i.attributes).forEach(function(t){s.append(t,i.attributes[t])});var a=new XMLHttpRequest,o=function(e){if(e.lengthComputable&&i.progress){var n=Math.max(0,Math.min(100,e.loaded/e.total*100));i.progress(a,t,Math.ceil(n))}};a.addEventListener("loadstart",o),a.addEventListener("progress",o),a.addEventListener("load",function(e){var n=null;try{n=JSON.parse(e.target.response)}catch(s){n={status:"error",message:"The file could not be uploaded"}}n.status&&"error"===n.status?i.error(a,t,n):(i.success(a,t,n),i.progress(a,t,100))}),a.addEventListener("error",function(e){var n=JSON.parse(e.target.response);i.error(a,t,n),i.progress(a,t,100)}),a.open("POST",i.url,!0),i.headers&&J()(i.headers).forEach(function(t){var e=i.headers[t];a.setRequestHeader(t,e)}),a.send(s)},Vi={props:{url:{type:String},accept:{type:String,default:"*"},attributes:{type:Object},multiple:{type:Boolean,default:!0},max:{type:Number}},data:function(){return{options:this.$props,completed:{},errors:[],files:[],total:0}},methods:{open:function(t){var e=this;this.params(t),setTimeout(function(){e.$refs.input.click()},1)},params:function(t){this.options=Hi()({},this.$props,t)},select:function(t){this.upload(t.target.files)},drop:function(t,e){this.params(e),this.upload(t)},upload:function(t){var e=this;this.$refs.dialog.open(),this.files=Object(Ui["a"])(t),this.completed={},this.errors=[],this.hasErrors=!1,this.options.max&&(this.files=this.files.slice(0,this.options.max)),this.total=this.files.length,this.files.forEach(function(t){Ki(t,{url:e.options.url,attributes:e.options.attributes,headers:{"X-CSRF":window.panel.csrf},progress:function(t,n,i){e.$refs[n.name]&&e.$refs[n.name][0]&&e.$refs[n.name][0].set(i)},success:function(t,n,i){e.complete(n,i.data)},error:function(t,n,i){e.errors.push({file:n,message:i.message}),e.complete(n,i.data)}})})},complete:function(t,e){var n=this;if(this.completed[t.name]=e,J()(this.completed).length==this.total){if(this.$refs.input.value="",this.errors.length>0)return this.$forceUpdate(),void this.$emit("error",this.files);setTimeout(function(){n.$refs.dialog.close(),n.$emit("success",n.files,ft()(n.completed))},250)}}}},Yi=Vi,Wi=(n("5aee"),Object(c["a"])(Yi,Ri,zi,!1,null,null,null)),Gi=Wi.exports,Ji=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("label",{staticClass:"k-checkbox-input"},[n("input",{ref:"input",staticClass:"k-checkbox-input-native",attrs:{disabled:t.disabled,id:t.id,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)}})])},Zi=[],Xi=n("b5ae"),Qi={inheritAttrs:!1,props:{autofocus:Boolean,disabled:Boolean,id:[Number,String],label:String,required:Boolean,value:Boolean},watch:{value:function(){this.onInvalid()}},mounted:function(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus:function(){this.$refs.input.focus()},onChange:function(t){this.$emit("input",t)},onInvalid:function(){this.$emit("invalid",this.$v.$invalid,this.$v)},select:function(){this.$refs.input.focus()}},validations:function(){return{value:{required:!this.required||Xi["required"]}}}},ts=Qi,es=(n("42e4"),Object(c["a"])(ts,Ji,Zi,!1,null,null,null)),ns=es.exports,is=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)},ss=[],as={inheritAttrs:!1,props:{autofocus:Boolean,columns:Number,disabled:Boolean,id:{type:[Number,String],default:function(){return this._uid}},max:Number,min:Number,options:Array,required:Boolean,value:{type:Array,default:function(){return[]}}},data:function(){return{selected:this.valueToArray(this.value)}},watch:{value:function(t){this.selected=this.valueToArray(t)},selected:function(){this.onInvalid()}},mounted:function(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus:function(){this.$el.querySelector("input").focus()},onInput:function(t,e){if(!0===e)this.selected.push(t);else{var n=this.selected.indexOf(t);-1!==n&&this.selected.splice(n,1)}this.$emit("input",this.selected)},onInvalid:function(){this.$emit("invalid",this.$v.$invalid,this.$v)},select:function(){this.focus()},valueToArray:function(t){return mt()(t)?t:String(t).split(",")}},validations:function(){return{selected:{required:!this.required||Xi["required"],min:!this.min||Object(Xi["minLength"])(this.min),max:!this.max||Object(Xi["maxLength"])(this.max)}}}},os=as,rs=Object(c["a"])(os,is,ss,!1,null,null,null),ls=rs.exports,us=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-date-input"},[n("k-select-input",{ref:"years",attrs:{"aria-label":t.$t("year"),options:t.years,disabled:t.disabled,required:t.required,value:t.year,placeholder:"––––"},on:{input:t.setYear,invalid:t.onInvalid}}),n("span",{staticClass:"k-date-input-separator"},[t._v("-")]),n("k-select-input",{ref:"months",attrs:{"aria-label":t.$t("month"),options:t.months,disabled:t.disabled,required:t.required,value:t.month,placeholder:"––"},on:{input:t.setMonth,invalid:t.onInvalid}}),n("span",{staticClass:"k-date-input-separator"},[t._v("-")]),n("k-select-input",{ref:"days",attrs:{"aria-label":t.$t("day"),autofocus:t.autofocus,id:t.id,options:t.days,disabled:t.disabled,required:t.required,value:t.day,placeholder:"––"},on:{input:t.setDay,invalid:t.onInvalid}})],1)},cs=[],ds={inheritAttrs:!1,props:{autofocus:Boolean,disabled:Boolean,id:[String,Number],max:String,min:String,required:Boolean,value:String},data:function(){return{date:Un()(this.value),minDate:this.calculate(this.min,"min"),maxDate:this.calculate(this.max,"max")}},computed:{day:function(){return isNaN(this.date.date())?"":this.date.date()},days:function(){return this.options(1,this.date.daysInMonth()||31,"days")},month:function(){return isNaN(this.date.date())?"":this.date.month()+1},months:function(){return this.options(1,12,"months")},year:function(){return isNaN(this.date.year())?"":this.date.year()},years:function(){var t=this.date.isBefore(this.minDate)?this.date.year():this.minDate.year(),e=this.date.isAfter(this.maxDate)?this.date.year():this.maxDate.year();return this.options(t,e)}},watch:{value:function(t){this.date=Un()(t)}},methods:{calculate:function(t,e){var n={min:{run:"subtract",take:"startOf"},max:{run:"add",take:"endOf"}}[e],i=t?Un()(t):null;return i&&!1!==i.isValid()||(i=Un()()[n.run](10,"year")[n.take]("year")),i},focus:function(){this.$refs.years.focus()},onInput:function(){!1!==this.date.isValid()?this.$emit("input",this.date.toISOString()):this.$emit("input","")},onInvalid:function(t,e){this.$emit("invalid",t,e)},options:function(t,e){for(var n=[],i=t;i<=e;i++)n.push({value:i,text:Fn(i)});return n},set:function(t,e){if(""===e||null===e||!1===e||-1===e)return this.setInvalid(),void this.onInput();if(!1===this.date.isValid())return this.setInitialDate(t,e),void this.onInput();var n=this.date,i=this.date.date();this.date=this.date.set(t,ui()(e)),"month"===t&&this.date.date()!==i&&(this.date=n.set("date",1).set("month",e).endOf("month")),this.onInput()},setInvalid:function(){this.date=Un()("invalid")},setInitialDate:function(t,e){var n=Un()();return this.date=Un()().set(t,ui()(e)),"date"===t&&n.month()!==this.date.month()&&(this.date=n.endOf("month")),this.date},setDay:function(t){this.set("date",t)},setMonth:function(t){this.set("month",t-1)},setYear:function(t){this.set("year",t)}}},ps=ds,fs=(n("6ab3"),Object(c["a"])(ps,us,cs,!1,null,null,null)),hs=fs.exports,ms=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-datetime-input"},[n("k-date-input",{ref:"dateInput",attrs:{autofocus:t.autofocus,required:t.required,id:t.id,disabled:t.disabled,value:t.dateValue},on:{input:t.setDate}}),n("k-time-input",t._b({ref:"timeInput",attrs:{required:t.required,disabled:t.disabled,value:t.timeValue},on:{input:t.setTime}},"k-time-input",t.timeOptions,!1))],1)},gs=[],vs={inheritAttrs:!1,props:Object(f["a"])({},hs.props,{time:{type:[Boolean,Object],default:function(){return{}}},value:String}),data:function(){return{dateValue:this.parseDate(this.value),timeValue:this.parseTime(this.value),timeOptions:this.setTimeOptions()}},watch:{value:function(t){this.dateValue=this.parseDate(t),this.timeValue=this.parseTime(t),this.onInvalid()}},mounted:function(){this.onInvalid()},methods:{focus:function(){this.$refs.dateInput.focus()},onInput:function(){if(this.timeValue&&this.dateValue){var t=this.dateValue+"T"+this.timeValue+":00";this.$emit("input",t)}else this.$emit("input","")},onInvalid:function(){this.$emit("invalid",this.$v.$invalid,this.$v)},parseDate:function(t){var e=Un()(t);return e.isValid()?e.format("YYYY-MM-DD"):null},parseTime:function(t){var e=Un()(t);return e.isValid()?e.format("HH:mm"):null},setDate:function(t){t&&!this.timeValue&&(this.timeValue=Un()().format("HH:mm")),t?this.dateValue=this.parseDate(t):(this.dateValue=null,this.timeValue=null),this.onInput()},setTime:function(t){t&&!this.dateValue&&(this.dateValue=Un()().format("YYYY-MM-DD")),t?this.timeValue=t:(this.dateValue=null,this.timeValue=null),this.onInput()},setTimeOptions:function(){return!0===this.time?{}:this.time}},validations:function(){return{value:{required:!this.required||Xi["required"]}}}},bs=vs,ks=(n("4433"),Object(c["a"])(bs,ms,gs,!1,null,null,null)),$s=ks.exports,_s=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("input",t._g(t._b({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))},ys=[],xs={inheritAttrs:!1,class:"k-text-input",props:{autocomplete:{type:[Boolean,String],default:"off"},autofocus:Boolean,disabled:Boolean,id:[Number,String],maxlength:Number,minlength:Number,name:[Number,String],pattern:String,placeholder:String,preselect:Boolean,required:Boolean,spellcheck:{type:[Boolean,String],default:"off"},type:{type:String,default:"text"},value:String},data:function(){var t=this;return{listeners:Object(f["a"])({},this.$listeners,{input:function(e){return t.onInput(e.target.value)}})}},watch:{value:function(){this.onInvalid()}},mounted:function(){this.onInvalid(),this.$props.autofocus&&this.focus(),this.$props.preselect&&this.select()},methods:{focus:function(){this.$refs.input.focus()},onInput:function(t){this.$emit("input",t)},onInvalid:function(){this.$emit("invalid",this.$v.$invalid,this.$v)},select:function(){this.$refs.input.select()}},validations:function(){return{value:{required:!this.required||Xi["required"],minLength:!this.minlength||Object(Xi["minLength"])(this.minlength),maxLength:!this.maxlength||Object(Xi["maxLength"])(this.maxlength),email:"email"!==this.type||Xi["email"],url:"url"!==this.type||Xi["url"]}}}},ws=xs,Os=(n("cb8f"),Object(c["a"])(ws,_s,ys,!1,null,null,null)),Cs=Os.exports,Ss={extends:Cs,props:Object(f["a"])({},Cs.props,{autocomplete:{type:String,default:"email"},placeholder:{type:String,default:function(){return this.$t("email.placeholder")}},type:{type:String,default:"email"}})},Es=Ss,js=Object(c["a"])(Es,Q,tt,!1,null,null,null),Ts=js.exports,Is=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(e)}}},[t._l(t.sorted,function(e){return n("k-tag",{key:e.value,ref:e.value,refInFor:!0,attrs:{removable:!0},on:{remove:function(n){return t.remove(e)}},nativeOn:{click:function(t){t.stopPropagation()},keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])?null:"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"])?null:"button"in e&&2!==e.button?null:t.navigate("next")},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"])?null:t.$refs.dropdown.open(e)}]}},[t._v("\n "+t._s(e.text)+"\n ")])}),n("k-dropdown-content",{ref:"dropdown",attrs:{slot:"footer"},on:{open:t.onOpen,close:function(e){t.q=null}},slot:"footer"},[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",domProps:{value:t.q},on:{input:function(e){e.target.composing||(t.q=e.target.value)}}})]):t._e(),n("div",{staticClass:"k-multiselect-options"},t._l(t.filtered,function(e){return n("k-dropdown-item",{key:e.value,class:{"k-multiselect-option":!0,selected:t.isSelected(e),disabled:!t.addable},attrs:{icon:t.isSelected(e)?"check":"circle-outline"},on:{click:function(n){return t.select(e)}},nativeOn:{keydown:[function(n){return!n.type.indexOf("key")&&t._k(n.keyCode,"enter",13,n.key,"Enter")?null:(n.preventDefault(),t.select(e))},function(n){return!n.type.indexOf("key")&&t._k(n.keyCode,"space",32,n.key,[" ","Spacebar"])?null:(n.preventDefault(),t.select(e))}]}},[n("span",{domProps:{innerHTML:t._s(e.display)}}),n("span",{staticClass:"k-multiselect-value",domProps:{innerHTML:t._s(e.info)}})])}),1)],1)],2)},Ls=[],qs=(n("20d6"),n("55dd"),{inheritAttrs:!1,props:{disabled:Boolean,id:[Number,String],max:Number,min:Number,layout:String,options:{type:Array,default:function(){return[]}},required:Boolean,search:Boolean,separator:{type:String,default:","},sort:Boolean,value:{type:Array,required:!0,default:function(){return[]}}},data:function(){return{state:this.value,q:null}},computed:{addable:function(){return!this.max||this.state.length1&&!this.sort},dragOptions:function(){return{disabled:!this.draggable,draggable:".k-tag",delay:1}},filtered:function(){if(null===this.q)return this.options.map(function(t){return Object(f["a"])({},t,{display:t.text,info:t.value})});var t=new RegExp("(".concat(RegExp.escape(this.q),")"),"ig");return this.options.filter(function(e){return e.text.match(t)||e.value.match(t)}).map(function(e){return Object(f["a"])({},e,{display:e.text.replace(t,"$1"),info:e.value.replace(t,"$1")})})},sorted:function(){var t=this;if(!1===this.sort)return this.state;var e=this.state,n=function(e){return t.options.findIndex(function(t){return t.value===e.value})};return e.sort(function(t,e){return n(t)-n(e)})}},watch:{value:function(t){this.state=t,this.onInvalid()}},mounted:function(){this.onInvalid(),this.$events.$on("click",this.close),this.$events.$on("keydown.cmd.s",this.close),this.$events.$on("keydown.esc",this.escape)},destroyed:function(){this.$events.$off("click",this.close),this.$events.$off("keydown.cmd.s",this.close),this.$events.$off("keydown.esc",this.escape)},methods:{add:function(t){this.addable&&(this.state.push(t),this.onInput())},blur:function(){this.close()},close:function(){this.$refs.dropdown.close(),this.q=null,this.$el.focus()},escape:function(){this.q?this.q=null:this.close()},focus:function(){this.$refs.dropdown.open()},index:function(t){return this.state.findIndex(function(e){return e.value===t.value})},isSelected:function(t){return-1!==this.index(t)},navigate:function(t){var e=document.activeElement;switch(t){case"prev":e&&e.previousSibling&&e.previousSibling.focus();break;case"next":e&&e.nextSibling&&e.nextSibling.focus();break}},onInput:function(){this.$emit("input",this.sorted)},onInvalid:function(){this.$emit("invalid",this.$v.$invalid,this.$v)},onOpen:function(){var t=this;this.$nextTick(function(){t.$refs.search&&t.$refs.search.focus()})},remove:function(t){this.state.splice(this.index(t),1),this.onInput()},select:function(t){t={text:t.text,value:t.value},this.isSelected(t)?this.remove(t):this.add(t)}},validations:function(){return{state:{required:!this.required||Xi["required"],minLength:!this.min||Object(Xi["minLength"])(this.min),maxLength:!this.max||Object(Xi["maxLength"])(this.max)}}}}),As=qs,Ns=(n("11ae"),Object(c["a"])(As,Is,Ls,!1,null,null,null)),Bs=Ns.exports,Ds=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("input",t._g(t._b({ref:"input",staticClass:"k-number-input",attrs:{type:"number"}},"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,step:t.step,value:t.value},!1),t.listeners))},Ps=[],Ms={inheritAttrs:!1,props:{autofocus:Boolean,disabled:Boolean,id:[Number,String],max:Number,min:Number,name:[Number,String],placeholder:String,preselect:Boolean,required:Boolean,step:Number,value:{type:[Number,String],default:null}},data:function(){var t=this;return{listeners:Object(f["a"])({},this.$listeners,{input:function(e){return t.onInput(e.target.value)}})}},watch:{value:function(){this.onInvalid()}},mounted:function(){this.onInvalid(),this.$props.autofocus&&this.focus(),this.$props.preselect&&this.select()},methods:{focus:function(){this.$refs.input.focus()},onInvalid:function(){this.$emit("invalid",this.$v.$invalid,this.$v)},onInput:function(t){null!==t&&""!==t&&"-"!==t&&"-0"!==t&&(t=Number(t)),this.$emit("input",t)},select:function(){this.$refs.input.select()}},validations:function(){return{value:{required:!this.required||Xi["required"],min:!this.min||Object(Xi["minValue"])(this.min),max:!this.max||Object(Xi["maxValue"])(this.max)}}}},Rs=Ms,zs=(n("6018"),Object(c["a"])(Rs,Ds,Ps,!1,null,null,null)),Us=zs.exports,Fs={extends:Cs,props:Object(f["a"])({},Cs.props,{autocomplete:{type:String,default:"new-password"},type:{type:String,default:"password"}})},Hs=Fs,Ks=Object(c["a"])(Hs,et,nt,!1,null,null,null),Vs=Ks.exports,Ys=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)}}}),n("label",{attrs:{for:t.id+"-"+i}},[e.info?[n("span",{staticClass:"k-radio-input-text"},[t._v(t._s(e.text))]),n("span",{staticClass:"k-radio-input-info"},[t._v(t._s(e.info))])]:[t._v("\n "+t._s(e.text)+"\n ")]],2),e.icon?n("k-icon",{attrs:{type:e.icon}}):t._e()],1)}),0)},Ws=[],Gs={inheritAttrs:!1,props:{autofocus:Boolean,columns:Number,disabled:Boolean,id:{type:[Number,String],default:function(){return this._uid}},options:Array,required:Boolean,value:[String,Number,Boolean]},watch:{value:function(){this.onInvalid()}},mounted:function(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus:function(){this.$el.querySelector("input").focus()},onInput:function(t){this.$emit("input",t)},onInvalid:function(){this.$emit("invalid",this.$v.$invalid,this.$v)},select:function(){this.focus()}},validations:function(){return{value:{required:!this.required||Xi["required"]}}}},Js=Gs,Zs=(n("893d"),Object(c["a"])(Js,Ys,Ws,!1,null,null,null)),Xs=Zs.exports,Qs=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"}},"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,value:t.value},!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()])},ta=[],ea=(n("6b54"),{inheritAttrs:!1,props:{autofocus:Boolean,disabled:Boolean,id:[String,Number],max:{type:Number,default:100},min:{type:Number,default:0},name:[String,Number],required:Boolean,step:{type:Number,default:1},tooltip:{type:[Boolean,Object],default:function(){return{before:null,after:null}}},value:[Number,String]},data:function(){var t=this;return{listeners:Object(f["a"])({},this.$listeners,{input:function(e){return t.onInput(e.target.value)}})}},computed:{label:function(){return null!==this.value?this.format(this.value):"–"},center:function(){var t=(this.max-this.min)/2+this.min;return Math.ceil(t/this.step)*this.step},position:function(){return null!==this.value?this.value:this.center}},watch:{value:function(){this.onInvalid()}},mounted:function(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus:function(){this.$refs.input.focus()},format:function(t){var 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:function(){this.$emit("invalid",this.$v.$invalid,this.$v)},onInput:function(t){this.$emit("input",t)}},validations:function(){return{value:{required:!this.required||Xi["required"],min:!this.min||Object(Xi["minValue"])(this.min),max:!this.max||Object(Xi["maxValue"])(this.max)}}}}),na=ea,ia=(n("b5d2"),Object(c["a"])(na,Qs,ta,!1,null,null,null)),sa=ia.exports,aa=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({directives:[{name:"model",rawName:"v-model",value:t.selected,expression:"selected"}],ref:"input",staticClass:"k-select-input-native",attrs:{autofocus:t.autofocus,"aria-label":t.ariaLabel,disabled:t.disabled,id:t.id,name:t.name,required:t.required},on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,function(t){return t.selected}).map(function(t){var e="_value"in t?t._value:t.value;return e});t.selected=e.target.multiple?n:n[0]}}},t.listeners),[t.hasEmptyOption?n("option",{attrs:{disabled:t.required,value:""}},[t._v("\n "+t._s(t.emptyOption)+"\n ")]):t._e(),t._l(t.options,function(e){return n("option",{key:e.value,attrs:{disabled:e.disabled},domProps:{value:e.value}},[t._v("\n "+t._s(e.text)+"\n ")])})],2),t._v("\n "+t._s(t.label)+"\n")])},oa=[],ra={inheritAttrs:!1,props:{autofocus:Boolean,ariaLabel:String,default:String,disabled:Boolean,empty:{type:[Boolean,String],default:!0},id:[Number,String],name:[Number,String],placeholder:String,options:{type:Array,default:function(){return[]}},required:Boolean,value:{type:[String,Number,Boolean],default:""}},data:function(){var t=this;return{selected:this.value,listeners:Object(f["a"])({},this.$listeners,{click:function(e){return t.onClick(e)},input:function(e){return t.onInput(e.target.value)}})}},computed:{emptyOption:function(){return this.placeholder||"—"},hasEmptyOption:function(){return!1!==this.empty&&!(this.required&&this.default)},label:function(){var t=this.text(this.selected);return""===this.selected||null===this.selected||null===t?this.emptyOption:t}},watch:{value:function(t){this.selected=t,this.onInvalid()}},mounted:function(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus:function(){this.$refs.input.focus()},onClick:function(t){t.stopPropagation(),this.$emit("click",t)},onInvalid:function(){this.$emit("invalid",this.$v.$invalid,this.$v)},onInput:function(t){this.selected=t,this.$emit("input",this.selected)},select:function(){this.focus()},text:function(t){var e=null;return this.options.forEach(function(n){n.value==t&&(e=n.text)}),e}},validations:function(){return{selected:{required:!this.required||Xi["required"]}}}},la=ra,ua=(n("6a18"),Object(c["a"])(la,aa,oa,!1,null,null,null)),ca=ua.exports,da=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-draggable",{ref:"box",staticClass:"k-tags-input",attrs:{list:t.tags,"data-layout":t.layout,options:t.dragOptions},on:{end:t.onInput}},[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"])?null:"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"])?null:"button"in e&&2!==e.button?null:t.navigate("next")}],dblclick:function(n){return t.edit(e)}}},[t._v("\n "+t._s(e.text)+"\n ")])}),n("span",{staticClass:"k-tags-input-element",attrs:{slot:"footer"},slot:"footer"},[n("k-autocomplete",{ref:"autocomplete",attrs:{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:{autofocus:t.autofocus,disabled:t.disabled||t.max&&t.tags.length>=t.max,id:t.id,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(e):null},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])?null:"button"in e&&0!==e.button?null:e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.leaveInput(e)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.enter(e)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"tab",9,e.key,"Tab")?null:e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.tab(e)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"backspace",void 0,e.key,void 0)?null:e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.leaveInput(e)}]}})])],1)],2)},pa=[],fa={inheritAttrs:!1,props:{autofocus:Boolean,accept:{type:String,default:"all"},disabled:Boolean,icon:{type:[String,Boolean],default:"tag"},id:[Number,String],layout:String,max:Number,min:Number,name:[Number,String],options:{type:Array,default:function(){return[]}},required:Boolean,separator:{type:String,default:","},value:{type:Array,default:function(){return[]}}},data:function(){return{tags:this.prepareTags(this.value),selected:null,newTag:null,tagOptions:this.options.map(function(t){return t.icon="tag",t})}},computed:{dragOptions:function(){return{delay:1,disabled:!this.draggable,draggable:".k-tag"}},draggable:function(){return this.tags.length>1},skip:function(){return this.tags.map(function(t){return t.value})}},watch:{value:function(t){this.tags=this.prepareTags(t),this.onInvalid()}},mounted:function(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{addString:function(t){var e=this;if(t)if(t=t.trim(),t.includes(this.separator))t.split(this.separator).forEach(function(t){e.addString(t)});else if(0!==t.length)if("options"===this.accept){var n=this.options.filter(function(e){return e.text===t})[0];if(!n)return;this.addTag(n)}else this.addTag({text:t,value:t})},addTag:function(t){this.addTagToIndex(t),this.$refs.autocomplete.close(),this.$refs.input.focus()},addTagToIndex:function(t){if("options"===this.accept){var e=this.options.filter(function(e){return e.value===t.value})[0];if(!e)return}-1===this.index(t)&&(!this.max||this.tags.length0&&(t.preventDefault(),this.addString(this.newTag))},type:function(t){this.newTag=t,this.$refs.autocomplete.search(t)}},validations:function(){return{tags:{required:!this.required||Xi["required"],minLength:!this.min||Object(Xi["minLength"])(this.min),maxLength:!this.max||Object(Xi["maxLength"])(this.max)}}}},ha=fa,ma=(n("27c1"),Object(c["a"])(ha,da,pa,!1,null,null,null)),ga=ma.exports,va={extends:Cs,props:Object(f["a"])({},Cs.props,{autocomplete:{type:String,default:"tel"},type:{type:String,default:"tel"}})},ba=va,ka=Object(c["a"])(ba,it,st,!1,null,null,null),$a=ka.exports,_a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-textarea-input",attrs:{"data-theme":t.theme,"data-over":t.over}},[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({ref:"input",staticClass:"k-textarea-input-native",attrs:{"data-font":t.font,"data-size":t.size},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(e):null},function(e){return e.metaKey?t.onShortcut(e):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)},ya=[],xa=n("19e9"),wa=n.n(xa),Oa={inheritAttrs:!1,props:{autofocus:Boolean,buttons:{type:[Boolean,Array],default:!0},disabled:Boolean,endpoints:Object,font:String,id:[Number,String],name:[Number,String],maxlength:Number,minlength:Number,placeholder:String,preselect:Boolean,required:Boolean,size:String,spellcheck:{type:[Boolean,String],default:"off"},theme:String,uploads:[Boolean,Object,Array],value:String},data:function(){return{over:!1}},watch:{value:function(){var t=this;this.onInvalid(),this.$nextTick(function(){t.resize()})}},mounted:function(){var t=this;this.$nextTick(function(){wa()(t.$refs.input)}),this.onInvalid(),this.$props.autofocus&&this.focus(),this.$props.preselect&&this.select()},methods:{cancel:function(){this.$refs.input.focus()},dialog:function(t){if(!this.$refs[t+"Dialog"])throw"Invalid toolbar dialog";this.$refs[t+"Dialog"].open(this.$refs.input,this.selection())},focus:function(){this.$refs.input.focus()},insert:function(t){var e=this,n=this.$refs.input,i=n.value;setTimeout(function(){if(n.focus(),document.execCommand("insertText",!1,t),n.value===i){var s=n.value.slice(0,n.selectionStart)+t+n.value.slice(n.selectionEnd);n.value=s,e.$emit("input",s)}}),this.resize()},insertFile:function(t){t&&t.length>0&&this.insert(t[0].dragText)},insertUpload:function(t,e){this.insert(e[0].dragText),this.$events.$emit("model.update")},onClick:function(){this.$refs.toolbar&&this.$refs.toolbar.close()},onCommand:function(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:function(t){if(t.dataTransfer&&!0===t.dataTransfer.types.includes("Files"))return this.$refs.fileUpload.drop(t.dataTransfer.files,{url:g.api+"/"+this.endpoints.field+"/upload",multiple:!1});var e=this.$store.state.drag;e&&"text"===e.type&&(this.focus(),this.insert(e.data))},onFocus:function(t){this.$emit("focus",t)},onInput:function(t){this.$emit("input",t.target.value)},onInvalid:function(){this.$emit("invalid",this.$v.$invalid,this.$v)},onOut:function(){this.$refs.input.blur(),this.over=!1},onOver:function(t){if(this.uploads&&t.dataTransfer&&!0===t.dataTransfer.types.includes("Files"))return t.dataTransfer.dropEffect="copy",this.focus(),void(this.over=!0);var e=this.$store.state.drag;e&&"text"===e.type&&(t.dataTransfer.dropEffect="copy",this.focus(),this.over=!0)},onShortcut:function(t){!1!==this.buttons&&"Meta"!==t.key&&this.$refs.toolbar&&this.$refs.toolbar.shortcut(t.key,t)},onSubmit:function(t){return this.$emit("submit",t)},prepend:function(t){this.insert(t+" "+this.selection())},resize:function(){wa.a.update(this.$refs.input)},select:function(){this.$refs.select()},selectFile:function(){this.$refs.fileDialog.open({endpoint:this.endpoints.field+"/files",multiple:!1})},selection:function(){var t=this.$refs.input,e=t.selectionStart,n=t.selectionEnd;return t.value.substring(e,n)},uploadFile:function(){this.$refs.fileUpload.open({url:g.api+"/"+this.endpoints.field+"/upload",multiple:!1})},wrap:function(t){this.insert(t+this.selection()+t)}},validations:function(){return{value:{required:!this.required||Xi["required"],minLength:!this.minlength||Object(Xi["minLength"])(this.minlength),maxLength:!this.maxlength||Object(Xi["maxLength"])(this.maxlength)}}}},Ca=Oa,Sa=(n("cca8"),Object(c["a"])(Ca,_a,ya,!1,null,null,null)),Ea=Sa.exports,ja=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-time-input"},[n("k-select-input",{ref:"hour",attrs:{id:t.id,"aria-label":t.$t("hour"),autofocus:t.autofocus,options:t.hours,required:t.required,disabled:t.disabled,placeholder:"––"},on:{input:t.setHour,invalid:t.onInvalid},model:{value:t.hour,callback:function(e){t.hour=e},expression:"hour"}}),n("span",{staticClass:"k-time-input-separator"},[t._v(":")]),n("k-select-input",{ref:"minute",attrs:{"aria-label":t.$t("minutes"),options:t.minutes,required:t.required,disabled:t.disabled,placeholder:"––"},on:{input:t.setMinute,invalid:t.onInvalid},model:{value:t.minute,callback:function(e){t.minute=e},expression:"minute"}}),12===t.notation?n("k-select-input",{ref:"meridiem",staticClass:"k-time-input-meridiem",attrs:{"aria-label":t.$t("meridiem"),empty:!1,options:[{value:"AM",text:"AM"},{value:"PM",text:"PM"}],required:t.required,disabled:t.disabled},on:{input:t.onInput},model:{value:t.meridiem,callback:function(e){t.meridiem=e},expression:"meridiem"}}):t._e()],1)},Ta=[],Ia=n("f906"),La=n.n(Ia);Un.a.extend(La.a);var qa,Aa,Na={inheritAttrs:!1,props:{autofocus:Boolean,disabled:Boolean,id:[String,Number],notation:{type:Number,default:24},required:Boolean,step:{type:Number,default:5},value:{type:String}},data:function(){var t=this.toObject(this.value);return{time:this.value,hour:t.hour,minute:t.minute,meridiem:t.meridiem}},computed:{hours:function(){return this.options(24===this.notation?0:1,24===this.notation?23:12)},minutes:function(){return this.options(0,59,this.step)}},watch:{value:function(t){this.time=t},time:function(t){var e=this.toObject(t);this.hour=e.hour,this.minute=e.minute,this.meridiem=e.meridiem}},methods:{focus:function(){this.$refs.hour.focus()},setHour:function(t){t&&!this.minute&&(this.minute=0),t||(this.minute=null),this.onInput()},setMinute:function(t){t&&!this.hour&&(this.hour=0),t||(this.hour=null),this.onInput()},onInput:function(){if(null!==this.hour&&null!==this.minute){var t=Fn(this.hour||0),e=Fn(this.minute||0),n=String(this.meridiem).toUpperCase()||"AM",i=24===this.notation?"".concat(t,":").concat(e,":00"):"".concat(t,":").concat(e,":00 ").concat(n),s=24===this.notation?"HH:mm:ss":"hh:mm:ss A",a=Un()("2000-01-01 "+i,"YYYY-MM-DD "+s);this.$emit("input",a.format("HH:mm"))}else this.$emit("input","")},onInvalid:function(t,e){this.$emit("invalid",t,e)},options:function(t,e){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=[],s=t;s<=e;s+=n)i.push({value:s,text:Fn(s)});return i},reset:function(){this.hour=null,this.minute=null,this.meridiem=null},round:function(t){return Math.floor(t/this.step)*this.step},toObject:function(t){var e=Un()("2001-01-01 "+t+":00","YYYY-MM-DD HH:mm:ss");return t&&!1!==e.isValid()?{hour:e.format(24===this.notation?"H":"h"),minute:this.round(e.format("m")),meridiem:e.format("A")}:{hour:null,minute:null,meridiem:null}}}},Ba=Na,Da=(n("50da"),Object(c["a"])(Ba,ja,Ta,!1,null,null,null)),Pa=Da.exports,Ma=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:{disabled:t.disabled,id:t.id,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)}})])},Ra=[],za={inheritAttrs:!1,props:{autofocus:Boolean,disabled:Boolean,id:[Number,String],text:{type:[Array,String],default:function(){return[this.$t("off"),this.$t("on")]}},required:Boolean,value:Boolean},computed:{label:function(){return mt()(this.text)?this.value?this.text[1]:this.text[0]:this.text}},watch:{value:function(){this.onInvalid()}},mounted:function(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus:function(){this.$refs.input.focus()},onEnter:function(t){"Enter"===t.key&&this.$refs.input.click()},onInput:function(t){this.$emit("input",t)},onInvalid:function(){this.$emit("invalid",this.$v.$invalid,this.$v)},select:function(){this.$refs.input.focus()}},validations:function(){return{value:{required:!this.required||Xi["required"]}}}},Ua=za,Fa=(n("bb41"),Object(c["a"])(Ua,Ma,Ra,!1,null,null,null)),Ha=Fa.exports,Ka={extends:Cs,props:Object(f["a"])({},Cs.props,{autocomplete:{type:String,default:"url"},type:{type:String,default:"url"}})},Va=Ka,Ya=Object(c["a"])(Va,qa,Aa,!1,null,null,null),Wa=Ya.exports,Ga=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"}},"k-input",t.$props,!1),t.$listeners))],1)},Ja=[],Za={inheritAttrs:!1,props:Object(f["a"])({},Si.props,Mi.props,ls.props,{counter:{type:Boolean,default:!0}}),computed:{counterOptions:function(){return null!==this.value&&!this.disabled&&!1!==this.counter&&{count:this.value&&mt()(this.value)?this.value.length:0,min:this.min,max:this.max}}},methods:{focus:function(){this.$refs.input.focus()}}},Xa=Za,Qa=Object(c["a"])(Xa,Ga,Ja,!1,null,null,null),to=Qa.exports,eo=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("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,type:t.inputType,value:t.date,theme:"field"}},"k-input",t.$props,!1),t.listeners),[n("template",{slot:"icon"},[n("k-dropdown",[n("k-button",{staticClass:"k-input-icon-button",attrs:{icon:t.icon,tooltip:t.$t("date.select"),tabindex:"-1"},on:{click:function(e){return t.$refs.dropdown.toggle()}}}),n("k-dropdown-content",{ref:"dropdown",attrs:{align:"right"}},[n("k-calendar",{attrs:{value:t.date},on:{input:function(e){t.onInput(e),t.$refs.dropdown.close()}}})],1)],1)],1)],2)],1)},no=[],io={inheritAttrs:!1,props:Object(f["a"])({},Si.props,Mi.props,$s.props,{icon:{type:String,default:"calendar"}}),data:function(){return{date:this.value,listeners:Object(f["a"])({},this.$listeners,{input:this.onInput})}},computed:{inputType:function(){return!1===this.time?"date":"datetime"}},watch:{value:function(t){this.date=t}},methods:{focus:function(){this.$refs.input.focus()},onInput:function(t){this.date=t,this.$emit("input",t)}}},so=io,ao=Object(c["a"])(so,eo,no,!1,null,null,null),oo=ao.exports,ro=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"}},"k-input",t.$props,!1),t.$listeners),[t.link?n("k-button",{staticClass:"k-input-icon-button",attrs:{slot:"icon",icon:t.icon,link:"mailto:"+t.value,tooltip:t.$t("open"),tabindex:"-1",target:"_blank"},slot:"icon"}):t._e()],1)],1)},lo=[],uo={inheritAttrs:!1,props:Object(f["a"])({},Si.props,Mi.props,Ts.props,{link:{type:Boolean,default:!0},icon:{type:String,default:"email"}}),methods:{focus:function(){this.$refs.input.focus()}}},co=uo,po=Object(c["a"])(co,ro,lo,!1,null,null,null),fo=po.exports,ho=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-files-field"},"k-field",t.$props,!1),[t.more&&!t.disabled?n("template",{slot:"options"},[n("k-button-group",{staticClass:"k-field-options"},[t.uploads?[n("k-dropdown",[n("k-button",{ref:"pickerToggle",staticClass:"k-field-options-button",attrs:{icon:"add"},on:{click:function(e){return t.$refs.picker.toggle()}}},[t._v("\n "+t._s(t.$t("add"))+"\n ")]),n("k-dropdown-content",{ref:"picker",attrs:{align:"right"}},[n("k-dropdown-item",{attrs:{icon:"check"},on:{click:t.open}},[t._v(t._s(t.$t("select")))]),n("k-dropdown-item",{attrs:{icon:"upload"},on:{click:t.upload}},[t._v(t._s(t.$t("upload")))])],1)],1)]:[n("k-button",{staticClass:"k-field-options-button",attrs:{icon:"add"},on:{click:t.open}},[t._v(t._s(t.$t("add")))])]],2)],1):t._e(),t.selected.length?[n("k-draggable",{attrs:{element:t.elements.list,list:t.selected,"data-size":t.size,handle:!0},on:{end:t.onInput}},t._l(t.selected,function(e,i){return n(t.elements.item,{key:e.filename,tag:"component",attrs:{sortable:!t.disabled&&t.selected.length>1,text:e.text,link:e.link,info:e.info,image:e.image,icon:e.icon}},[t.disabled?t._e():n("k-button",{attrs:{slot:"options",tooltip:t.$t("remove"),icon:"remove"},on:{click:function(e){return t.remove(i)}},slot:"options"})],1)}),1)]:n("k-empty",{attrs:{layout:t.layout,icon:"image"},on:{click:t.open}},[t._v("\n "+t._s(t.empty||t.$t("field.files.empty"))+"\n ")]),n("k-files-dialog",{ref:"selector",on:{submit:t.select}}),n("k-upload",{ref:"fileUpload",on:{success:t.selectUpload}})],2)},mo=[],go={inheritAttrs:!1,props:Object(f["a"])({},Si.props,{empty:String,info:String,layout:String,max:Number,multiple:Boolean,parent:String,size:String,text:String,value:{type:Array,default:function(){return[]}}}),data:function(){return{selected:this.value}},computed:{elements:function(){var t={cards:{list:"k-cards",item:"k-card"},list:{list:"k-list",item:"k-list-item"}};return t[this.layout]?t[this.layout]:t["list"]},more:function(){return!this.max||this.max>this.selected.length}},watch:{value:function(t){this.selected=t}},methods:{focus:function(){},onInput:function(){this.$emit("input",this.selected)},remove:function(t){this.selected.splice(t,1),this.onInput()},removeById:function(t){this.selected=this.selected.filter(function(e){return e.id!==t}),this.onInput()},select:function(t){var e=this;0!==t.length?(this.selected=this.selected.filter(function(e){return t.filter(function(t){return t.id===e.id}).length>0}),t.forEach(function(t){0===e.selected.filter(function(e){return t.id===e.id}).length&&e.selected.push(t)}),this.onInput()):this.selected=[]}}},vo={mixins:[go],props:{uploads:[Boolean,Object,Array]},created:function(){this.$events.$on("file.delete",this.removeById)},destroyed:function(){this.$events.$off("file.delete",this.removeById)},methods:{prompt:function(t){t.stopPropagation(),this.uploads?this.$refs.picker.toggle():this.open()},open:function(){if(this.disabled)return!1;this.$refs.selector.open({endpoint:this.endpoints.field,max:this.max,multiple:this.multiple,selected:this.selected.map(function(t){return t.id})})},selectUpload:function(t,e){var n=this;!1===this.multiple&&(this.selected=[]),e.forEach(function(t){n.selected.push(t)}),this.onInput(),this.$events.$emit("model.update")},upload:function(){this.$refs.fileUpload.open({url:g.api+"/"+this.endpoints.field+"/upload",multiple:this.multiple})}}},bo=vo,ko=(n("4a4b"),Object(c["a"])(bo,ho,mo,!1,null,null,null)),$o=ko.exports,_o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-headline",{staticClass:"k-headline-field",attrs:{"data-numbered":t.numbered,size:"large"}},[t._v("\n "+t._s(t.label)+"\n")])},yo=[],xo={props:{label:String,numbered:Boolean}},wo=xo,Oo=(n("19d7"),Object(c["a"])(wo,_o,yo,!1,null,null,null)),Co=Oo.exports,So=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)],1)},Eo=[],jo={props:{label:String,text:String,theme:{type:String,default:"info"}}},To=jo,Io=(n("ddfd"),Object(c["a"])(To,So,Eo,!1,null,null,null)),Lo=Io.exports,qo=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("hr",{staticClass:"k-line-field"})},Ao=[],No=(n("718c"),{}),Bo=Object(c["a"])(No,qo,Ao,!1,null,null,null),Do=Bo.exports,Po=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}},"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)},Mo=[],Ro={inheritAttrs:!1,props:Object(f["a"])({},Si.props,Mi.props,Bs.props,{counter:{type:Boolean,default:!0},icon:{type:String,default:"angle-down"}}),computed:{counterOptions:function(){return null!==this.value&&!this.disabled&&!1!==this.counter&&{count:this.value&&mt()(this.value)?this.value.length:0,min:this.min,max:this.max}}},methods:{blur:function(t){this.$refs.input.blur(t)},focus:function(){this.$refs.input.focus()}}},zo=Ro,Uo=Object(c["a"])(zo,Po,Mo,!1,null,null,null),Fo=Uo.exports,Ho=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"}},"k-input",t.$props,!1),t.$listeners))],1)},Ko=[],Vo={inheritAttrs:!1,props:Object(f["a"])({},Si.props,Mi.props,Us.props),methods:{focus:function(){this.$refs.input.focus()}}},Yo=Vo,Wo=Object(c["a"])(Yo,Ho,Ko,!1,null,null,null),Go=Wo.exports,Jo=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-pages-field"},"k-field",t.$props,!1),[n("k-button-group",{staticClass:"k-field-options",attrs:{slot:"options"},slot:"options"},[t.more&&!t.disabled?n("k-button",{staticClass:"k-field-options-button",attrs:{icon:"add"},on:{click:t.open}},[t._v("\n "+t._s(t.$t("select"))+"\n ")]):t._e()],1),t.selected.length?[n("k-draggable",{attrs:{element:t.elements.list,handle:!0,list:t.selected,"data-size":t.size},on:{end:t.onInput}},t._l(t.selected,function(e,i){return n(t.elements.item,{key:e.id,tag:"component",attrs:{sortable:!t.disabled&&t.selected.length>1,text:e.text,info:e.info,link:e.link,icon:e.icon,image:e.image}},[t.disabled?t._e():n("k-button",{attrs:{slot:"options",icon:"remove"},on:{click:function(e){return t.remove(i)}},slot:"options"})],1)}),1)]:n("k-empty",{attrs:{layout:t.layout,icon:"page"},on:{click:t.open}},[t._v("\n "+t._s(t.empty||t.$t("field.pages.empty"))+"\n ")]),n("k-pages-dialog",{ref:"selector",on:{submit:t.select}})],2)},Zo=[],Xo={mixins:[go],methods:{open:function(){if(this.disabled)return!1;this.$refs.selector.open({endpoint:this.endpoints.field,max:this.max,multiple:this.multiple,selected:this.selected.map(function(t){return t.id})})}}},Qo=Xo,tr=(n("7e85"),Object(c["a"])(Qo,Jo,Zo,!1,null,null,null)),er=tr.exports,nr=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}},"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)},ir=[],sr={inheritAttrs:!1,props:Object(f["a"])({},Si.props,Mi.props,Vs.props,{counter:{type:Boolean,default:!0},minlength:{type:Number,default:8},icon:{type:String,default:"key"}}),computed:{counterOptions:function(){return null!==this.value&&!this.disabled&&!1!==this.counter&&{count:this.value?String(this.value).length:0,min:this.minlength,max:this.maxlength}}},methods:{focus:function(){this.$refs.input.focus()}}},ar=sr,or=Object(c["a"])(ar,nr,ir,!1,null,null,null),rr=or.exports,lr=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"}},"k-input",t.$props,!1),t.$listeners))],1)},ur=[],cr={inheritAttrs:!1,props:Object(f["a"])({},Si.props,Mi.props,Xs.props),methods:{focus:function(){this.$refs.input.focus()}}},dr=cr,pr=Object(c["a"])(dr,lr,ur,!1,null,null,null),fr=pr.exports,hr=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"}},"k-input",t.$props,!1),t.$listeners))],1)},mr=[],gr={inheritAttrs:!1,props:Object(f["a"])({},Si.props,Mi.props,sa.props),methods:{focus:function(){this.$refs.input.focus()}}},vr=gr,br=Object(c["a"])(vr,hr,mr,!1,null,null,null),kr=br.exports,$r=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"}},"k-input",t.$props,!1),t.$listeners))],1)},_r=[],yr={inheritAttrs:!1,props:Object(f["a"])({},Si.props,Mi.props,ca.props,{icon:{type:String,default:"angle-down"}}),methods:{focus:function(){this.$refs.input.focus()}}},xr=yr,wr=Object(c["a"])(xr,$r,_r,!1,null,null,null),Or=wr.exports,Cr=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()}}},"k-field",t.$props,!1),[n("template",{slot:"options"},[t.more&&null===t.currentIndex?n("k-button",{ref:"add",attrs:{id:t._uid,icon:"add"},on:{click:t.add}},[t._v("\n "+t._s(t.$t("add"))+"\n ")]):t._e()],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:{icon:"cancel"},on:{click:t.close}},[t._v(t._s(t.$t("cancel")))]),"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:{icon:"check"},on:{click:t.submit}},[t._v(t._s(t.$t("new"!==t.currentIndex?"confirm":"add")))])],1)],1)]:0===t.items.length?n("k-empty",{attrs:{icon:"list-bullet"},on:{click:t.add}},[t._v("\n "+t._s(t.empty||t.$t("field.structure.empty"))+"\n ")]):[n("table",{staticClass:"k-structure-table",attrs:{"data-sortable":t.isSortable}},[n("thead",[n("tr",[n("th",{staticClass:"k-structure-table-index"},[t._v("#")]),t._l(t.columns,function(e,i){return n("th",{key:i+"-header",staticClass:"k-structure-table-column",style:"width:"+t.width(e.width),attrs:{"data-align":e.align}},[t._v("\n "+t._s(e.label)+"\n ")])}),n("th")],2)]),n("k-draggable",{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,i){return n("tr",{key:i,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(i)))])],1),t._l(t.columns,function(s,a){return n("td",{key:a,staticClass:"k-structure-table-column",style:"width:"+t.width(s.width),attrs:{title:s.label,"data-align":s.align},on:{click:function(e){return t.jump(i,a)}}},[!1===t.columnIsEmpty(e[a])?[t.previewExists(s.type)?n("k-"+s.type+"-field-preview",{tag:"component",attrs:{value:e[a],column:s,field:t.fields[a]}}):[n("p",{staticClass:"k-structure-table-text"},[t._v("\n "+t._s(s.before)+" "+t._s(t.displayText(t.fields[a],e[a])||"–")+" "+t._s(s.after)+"\n ")])]]:t._e()],2)}),n("td",{staticClass:"k-structure-table-option"},[n("k-button",{attrs:{tooltip:t.$t("remove"),icon:"remove"},on:{click:function(e){return t.confirmRemove(i)}}})],1)],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:{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)},Sr=[],Er=n("59ad"),jr=n.n(Er),Tr=function(t){t=t||{};var e=t.desc?-1:1,n=-e,i=/^0/,s=/\s+/g,a=/^\s+|\s+$/g,o=/[^\x00-\x80]/,r=/^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 d(""+t).replace(a,"")}:function(t){return(""+t).replace(a,"")};function d(t){return t.toLocaleLowerCase?t.toLocaleLowerCase():t.toLowerCase()}function p(t){return t.replace(l,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0")}function f(t,e){return(!t.match(i)||1===e)&&jr()(t)||t.replace(s," ").replace(a,"")||0}return function(t,i){var s=c(t),a=c(i);if(!s&&!a)return 0;if(!s&&a)return n;if(s&&!a)return e;var l=p(s),d=p(a),h=ui()(s.match(r),16)||1!==l.length&&Date.parse(s),m=ui()(a.match(r),16)||h&&a.match(u)&&Date.parse(a)||null;if(m){if(hm)return e}for(var g=l.length,v=d.length,b=0,k=Math.max(g,v);b0)return e;if(y<0)return n;if(b===k-1)return 0}else{if($<_)return n;if($>_)return e}}return 0}},Ir=n("f499"),Lr=n.n(Ir),qr=function(t){if(void 0!==t)return JSON.parse(Lr()(t))};Array.prototype.sortBy=function(t){var e=Tr(),n=t.split(" "),i=n[0],s=n[1]||"asc";return this.sort(function(t,n){var a=String(t[i]).toLowerCase(),o=String(n[i]).toLowerCase();return"desc"===s?e(o,a):e(a,o)})};var Ar,Nr,Br,Dr,Pr={inheritAttrs:!1,props:Object(f["a"])({},Si.props,{columns:Object,empty:String,fields:Object,limit:Number,max:Number,min:Number,sortable:{type:Boolean,default:!0},sortBy:String,value:{type:Array,default:function(){return[]}}}),data:function(){return{items:this.makeItems(this.value),currentIndex:null,currentModel:null,trash:null,page:1}},computed:{dragOptions:function(){return{disabled:!this.isSortable,fallbackClass:"k-sortable-row-fallback"}},formFields:function(){var t=this,e={};return J()(this.fields).forEach(function(n){var i=t.fields[n];i.section=t.name,i.endpoints={field:t.endpoints.field+"+"+n,section:t.endpoints.section,model:t.endpoints.model},e[n]=i}),e},more:function(){return!0!==this.disabled&&!(this.max&&this.items.length>=this.max)},isSortable:function(){return!this.sortBy&&(!this.limit&&(!0!==this.disabled&&(!(this.items.length<=1)&&!1!==this.sortable)))},pagination:function(){var 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:function(){return this.limit?this.items.slice(this.pagination.offset,this.pagination.offset+this.limit):this.items}},watch:{value:function(t){t!=this.items&&(this.items=this.makeItems(t))}},methods:{add:function(){var t=this;if(!0===this.disabled)return!1;if(null!==this.currentIndex)return this.escape(),!1;var e={};J()(this.fields).forEach(function(n){var i=t.fields[n];i.default?e[n]=qr(i.default):e[n]=null}),this.currentIndex="new",this.currentModel=e,this.createForm()},close:function(){this.currentIndex=null,this.currentModel=null,this.$events.$off("keydown.esc",this.escape),this.$events.$off("keydown.cmd.s",this.submit),this.$store.dispatch("form/enable")},columnIsEmpty:function(t){return void 0===t||null===t||""===t||("object"===Object(Nt["a"])(t)&&0===J()(t).length&&t.constructor===Object||void 0!==t.length&&0===t.length)},confirmRemove:function(t){this.close(),this.trash=t,this.$refs.remove.open()},createForm:function(t){var e=this;this.$events.$on("keydown.esc",this.escape),this.$events.$on("keydown.cmd.s",this.submit),this.$store.dispatch("form/disable"),this.$nextTick(function(){e.$refs.form&&e.$refs.form.focus(t)})},displayText:function(t,e){switch(t.type){case"user":return e.email;case"date":var n=Un()(e),i=!0===t.time?"YYYY-MM-DD HH:mm":"YYYY-MM-DD";return n.isValid()?n.format(i):"";case"tags":return e.map(function(t){return t.text}).join(", ");case"checkboxes":return e.map(function(e){var n=e;return t.options.forEach(function(t){t.value===e&&(n=t.text)}),n}).join(", ");case"radio":case"select":var s=t.options.filter(function(t){return t.value===e})[0];return s?s.text:null}return"object"===Object(Nt["a"])(e)&&null!==e?"…":e},escape:function(){var t=this;if("new"===this.currentIndex){var e=ft()(this.currentModel),n=!0;if(e.forEach(function(e){!1===t.columnIsEmpty(e)&&(n=!1)}),!0===n)return void this.close()}this.submit()},focus:function(){this.$refs.add.focus()},indexOf:function(t){return this.limit?(this.page-1)*this.limit+t+1:t+1},isActive:function(t){return this.currentIndex===t},jump:function(t,e){this.open(t+this.pagination.offset,e)},makeItems:function(t){return!1===mt()(t)?[]:this.sort(t)},onInput:function(){this.$emit("input",this.items)},open:function(t,e){this.currentIndex=t,this.currentModel=qr(this.items[t]),this.createForm(e)},beforePaginate:function(){return this.save(this.currentModel)},paginate:function(t){this.open(t.offset)},paginateItems:function(t){this.page=t.page},previewExists:function(t){return void 0!==C["a"].options.components["k-"+t+"-field-preview"]||void 0!==this.$options.components["k-"+t+"-field-preview"]},remove:function(){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:function(t){return this.sortBy?t.sortBy(this.sortBy):t},save:function(){var t=this;return null!==this.currentIndex&&void 0!==this.currentIndex?this.validate(this.currentModel).then(function(){return"new"===t.currentIndex?t.items.push(t.currentModel):t.items[t.currentIndex]=t.currentModel,t.items=t.sort(t.items),t.onInput(),!0}).catch(function(e){throw t.$store.dispatch("notification/error",{message:t.$t("error.form.incomplete"),details:e}),e}):vi.a.resolve()},submit:function(){this.save().then(this.close).catch(function(){})},validate:function(t){return this.$api.post(this.endpoints.field+"/validate",t).then(function(t){if(t.length>0)throw t;return!0})},width:function(t){if(!t)return"auto";var e=t.split("/");if(2!==e.length)return"auto";var n=Number(e[0]),i=Number(e[1]);return jr()(100/i*n,2).toFixed(2)+"%"}}},Mr=Pr,Rr=(n("088c"),Object(c["a"])(Mr,Cr,Sr,!1,null,null,null)),zr=Rr.exports,Ur=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"}},"k-input",t.$props,!1),t.$listeners))],1)},Fr=[],Hr={inheritAttrs:!1,props:Object(f["a"])({},Si.props,Mi.props,ga.props,{counter:{type:Boolean,default:!0}}),computed:{counterOptions:function(){return null!==this.value&&!this.disabled&&!1!==this.counter&&{count:this.value&&mt()(this.value)?this.value.length:0,min:this.min,max:this.max}}},methods:{focus:function(){this.$refs.input.focus()}}},Kr=Hr,Vr=Object(c["a"])(Kr,Ur,Fr,!1,null,null,null),Yr=Vr.exports,Wr=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"}},"k-input",t.$props,!1),t.$listeners))],1)},Gr=[],Jr={inheritAttrs:!1,props:Object(f["a"])({},Si.props,Mi.props,$a.props,{icon:{type:String,default:"phone"}}),methods:{focus:function(){this.$refs.input.focus()}}},Zr=Jr,Xr=Object(c["a"])(Zr,Wr,Gr,!1,null,null,null),Qr=Xr.exports,tl=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}},"k-field",t.$props,!1),[t._t("options",null,{slot:"options"}),n("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field"}},"k-input",t.$props,!1),t.$listeners))],2)},el=[],nl={inheritAttrs:!1,props:Object(f["a"])({},Si.props,Mi.props,Cs.props,{counter:{type:Boolean,default:!0}}),computed:{counterOptions:function(){return null!==this.value&&!this.disabled&&!1!==this.counter&&{count:this.value?String(this.value).length:0,min:this.minlength,max:this.maxlength}}},methods:{focus:function(){this.$refs.input.focus()}}},il=nl,sl=(n("b746"),Object(c["a"])(il,tl,el,!1,null,null,null)),al=sl.exports,ol=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)},rl=[],ll={inheritAttrs:!1,props:Object(f["a"])({},Si.props,Mi.props,Ea.props,{counter:{type:Boolean,default:!0}}),computed:{counterOptions:function(){return null!==this.value&&!this.disabled&&!1!==this.counter&&{count:this.value?this.value.length:0,min:this.minlength,max:this.maxlength}}},methods:{focus:function(){this.$refs.input.focus()}}},ul=ll,cl=Object(c["a"])(ul,ol,rl,!1,null,null,null),dl=cl.exports,pl=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._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field"}},"k-input",t.$props,!1),t.$listeners))],1)},fl=[],hl={inheritAttrs:!1,props:Object(f["a"])({},Si.props,Mi.props,Pa.props,{icon:{type:String,default:"clock"}}),methods:{focus:function(){this.$refs.input.focus()}}},ml=hl,gl=Object(c["a"])(ml,pl,fl,!1,null,null,null),vl=gl.exports,bl=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"}},"k-input",t.$props,!1),t.$listeners))],1)},kl=[],$l={inheritAttrs:!1,props:Object(f["a"])({},Si.props,Mi.props,Ha.props),methods:{focus:function(){this.$refs.input.focus()}}},_l=$l,yl=Object(c["a"])(_l,bl,kl,!1,null,null,null),xl=yl.exports,wl=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"}},"k-input",t.$props,!1),t.$listeners),[t.link?n("k-button",{staticClass:"k-input-icon-button",attrs:{slot:"icon",icon:t.icon,link:t.value,tooltip:t.$t("open"),tabindex:"-1",target:"_blank"},slot:"icon"}):t._e()],1)],1)},Ol=[],Cl={inheritAttrs:!1,props:Object(f["a"])({},Si.props,Mi.props,Wa.props,{link:{type:Boolean,default:!0},icon:{type:String,default:"url"}}),methods:{focus:function(){this.$refs.input.focus()}}},Sl=Cl,El=Object(c["a"])(Sl,wl,Ol,!1,null,null,null),jl=El.exports,Tl=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-field",t._b({staticClass:"k-users-field"},"k-field",t.$props,!1),[n("k-button-group",{staticClass:"k-field-options",attrs:{slot:"options"},slot:"options"},[t.more&&!t.disabled?n("k-button",{staticClass:"k-field-options-button",attrs:{icon:"add"},on:{click:t.open}},[t._v("\n "+t._s(t.$t("select"))+"\n ")]):t._e()],1),t.selected.length?[n("k-draggable",{attrs:{element:t.elements.list,list:t.selected,handle:!0},on:{end:t.onInput}},t._l(t.selected,function(e,i){return n(t.elements.item,{key:e.email,tag:"component",attrs:{sortable:!t.disabled&&t.selected.length>1,text:e.username,link:t.$api.users.link(e.id),image:e.image,icon:e.icon}},[t.disabled?t._e():n("k-button",{attrs:{slot:"options",icon:"remove"},on:{click:function(e){return t.remove(i)}},slot:"options"})],1)}),1)]:n("k-empty",{attrs:{icon:"users"},on:{click:t.open}},[t._v("\n "+t._s(t.empty||t.$t("field.users.empty"))+"\n ")]),n("k-users-dialog",{ref:"selector",on:{submit:t.select}})],2)},Il=[],Ll={mixins:[go],methods:{open:function(){if(this.disabled)return!1;this.$refs.selector.open({endpoint:this.endpoints.field,max:this.max,multiple:this.multiple,selected:this.selected.map(function(t){return t.id})})}}},ql=Ll,Al=(n("7f6e"),Object(c["a"])(ql,Tl,Il,!1,null,null,null)),Nl=Al.exports,Bl=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("\n "+t._s(e.label)+"\n ")])}),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)])])},Dl=[],Pl=function(t){this.command("insert",function(e,n){var i=[];return n.split("\n").forEach(function(e,n){var s="ol"===t?n+1+".":"-";i.push(s+" "+e)}),i.join("\n")})},Ml={layout:["headlines","bold","italic","|","link","email","file","|","code","ul","ol"],props:{buttons:{type:[Boolean,Array],default:!0},uploads:[Boolean,Object,Array]},data:function(){var t={},e={},n=[],i=this.commands();return!1===this.buttons?t:(mt()(this.buttons)&&(n=this.buttons),!0!==mt()(this.buttons)&&(n=this.$options.layout),n.forEach(function(n,s){if("|"===n)t["divider-"+s]={divider:!0};else if(i[n]){var a=i[n];t[n]=a,a.shortcut&&(e[a.shortcut]=n)}}),{layout:t,shortcuts:e})},methods:{command:function(t,e){"function"===typeof t?t.apply(this):this.$emit("command",t,e)},close:function(){var t=this;J()(this.$refs).forEach(function(e){var n=t.$refs[e][0];n.close&&"function"===typeof n.close&&n.close()})},fileCommandSetup:function(){var 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:function(){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:"l",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:function(){return Pl.apply(this,["ul"])}},ol:{label:this.$t("toolbar.button.ol"),icon:"list-numbers",command:function(){return Pl.apply(this,["ol"])}}}},shortcut:function(t,e){if(this.shortcuts[t]){var n=this.layout[this.shortcuts[t]];if(!n)return!1;e.preventDefault(),this.command(n.command,n.args)}}}},Rl=Ml,zl=(n("df0d"),Object(c["a"])(Rl,Bl,Dl,!1,null,null,null)),Ul=zl.exports,Fl=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{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)},Hl=[],Kl={data:function(){return{value:{email:null,text:null},fields:{email:{label:this.$t("email"),type:"email"},text:{label:this.$t("link.text"),type:"text"}}}},computed:{kirbytext:function(){return this.$store.state.system.info.kirbytext}},methods:{open:function(t,e){this.value.text=e,this.$refs.dialog.open()},cancel:function(){this.$emit("cancel")},createKirbytext:function(){var t=this.value.email||"";return this.value.text&&this.value.text.length>0?"(email: ".concat(t," text: ").concat(this.value.text,")"):"(email: ".concat(t,")")},createMarkdown:function(){var t=this.value.email||"";return this.value.text&&this.value.text.length>0?"[".concat(this.value.text,"](mailto:").concat(t,")"):"<".concat(t,">")},submit:function(){this.$emit("submit",this.kirbytext?this.createKirbytext():this.createMarkdown()),this.value={email:null,text:null},this.$refs.dialog.close()}}},Vl=Kl,Yl=Object(c["a"])(Vl,Fl,Hl,!1,null,null,null),Wl=Yl.exports,Gl=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-dialog",{ref:"dialog",attrs:{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)},Jl=[],Zl={data:function(){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:function(){return this.$store.state.system.info.kirbytext}},methods:{open:function(t,e){this.value.text=e,this.$refs.dialog.open()},cancel:function(){this.$emit("cancel")},createKirbytext:function(){return this.value.text.length>0?"(link: ".concat(this.value.url," text: ").concat(this.value.text,")"):"(link: ".concat(this.value.url,")")},createMarkdown:function(){return this.value.text.length>0?"[".concat(this.value.text,"](").concat(this.value.url,")"):"<".concat(this.value.url,">")},submit:function(){this.$emit("submit",this.kirbytext?this.createKirbytext():this.createMarkdown()),this.value={url:null,text:null},this.$refs.dialog.close()}}},Xl=Zl,Ql=Object(c["a"])(Xl,Gl,Jl,!1,null,null,null),tu=Ql.exports,eu=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(e){return n("li",{key:e.url},[n("k-link",{attrs:{title:e.filename,to:e.link},nativeOn:{click:function(t){t.stopPropagation()}}},[n("k-image",t._b({attrs:{src:e.url}},"k-image",t.image,!1))],1)],1)}),0):t._e()},nu=[],iu={props:{value:Array,field:Object},computed:{image:function(){var t=this.field.image||{};return Object(f["a"])({back:"pattern",cover:!1},t)}}},su=iu,au=(n("21dc"),Object(c["a"])(su,eu,nu,!1,null,null,null)),ou=au.exports,ru=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("p",{staticClass:"k-url-field-preview"},[t._v("\n "+t._s(t.column.before)+"\n "),n("k-link",{attrs:{to:t.link,target:"_blank"},nativeOn:{click:function(t){t.stopPropagation()}}},[t._v(t._s(t.value))]),t._v("\n "+t._s(t.column.after)+"\n")],1)},lu=[],uu={props:{column:{type:Object,default:function(){return{}}},value:String},computed:{link:function(){return this.value}}},cu=uu,du=(n("977f"),Object(c["a"])(cu,ru,lu,!1,null,null,null)),pu=du.exports,fu={extends:pu,computed:{link:function(){return"mailto:"+this.value}}},hu=fu,mu=Object(c["a"])(hu,Ar,Nr,!1,null,null,null),gu=mu.exports,vu=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:t.$api.pages.link(e.id)},nativeOn:{click:function(t){t.stopPropagation()}}},[n("k-icon",{staticClass:"k-pages-field-preview-image",attrs:{type:"page",back:"pattern"}}),n("figcaption",[t._v("\n "+t._s(e.text)+"\n ")])],1)],1)])}),0):t._e()},bu=[],ku={props:{value:Array}},$u=ku,_u=(n("d0c1"),Object(c["a"])($u,vu,bu,!1,null,null,null)),yu=_u.exports,xu=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:t.$api.users.link(e.id)},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("\n "+t._s(e.username)+"\n ")])],1)],1)])}),0):t._e()},wu=[],Ou={props:{value:Array}},Cu=Ou,Su=(n("3a85"),Object(c["a"])(Cu,xu,wu,!1,null,null,null)),Eu=Su.exports,ju=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()])},Tu=[],Iu=(n("6f7b"),{}),Lu=Object(c["a"])(Iu,ju,Tu,!1,null,null,null),qu=Lu.exports,Au=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",[n("k-text",{domProps:{innerHTML:t._s(t.text)}})])],2)},Nu=[],Bu={props:{theme:String,text:String}},Du=Bu,Pu=(n("7dc7"),Object(c["a"])(Du,Au,Nu,!1,null,null,null)),Mu=Pu.exports,Ru=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("figure",t._g({staticClass:"k-card"},t.$listeners),[t.sortable?n("k-sort-handle"):t._e(),n(t.wrapper,{tag:"component",attrs:{to:t.link,target:t.target}},[t.imageOptions?n("k-image",t._b({staticClass:"k-card-image"},"k-image",t.imageOptions,!1)):n("span",{staticClass:"k-card-icon",style:"padding-bottom:"+t.ratioPadding},[n("k-icon",t._b({},"k-icon",t.icon,!1))],1),n("figcaption",{staticClass:"k-card-content"},[n("span",{staticClass:"k-card-text",attrs:{"data-noinfo":!t.info}},[t._v(t._s(t.text))]),t.info?n("span",{staticClass:"k-card-info",domProps:{innerHTML:t._s(t.info)}}):t._e()])],1),n("nav",{staticClass:"k-card-options"},[t.flag?n("k-button",t._b({staticClass:"k-card-options-button",on:{click:t.flag.click}},"k-button",t.flag,!1)):t._e(),t._t("options",[t.options?n("k-button",{staticClass:"k-card-options-button",attrs:{tooltip:t.$t("options"),icon:"dots"},on:{click:function(e){return e.stopPropagation(),t.$refs.dropdown.toggle()}}}):t._e(),n("k-dropdown-content",{ref:"dropdown",staticClass:"k-card-options-dropdown",attrs:{options:t.options,align:"right"},on:{action:function(e){return t.$emit("action",e)}}})])],2)],1)},zu=[],Uu=function(t){t=t||"3/2";var e=t.split("/");if(2!==e.length)return"100%";var n=Number(e[0]),i=Number(e[1]),s=100/n*i;return s+"%"},Fu={inheritAttrs:!1,props:{column:String,flag:Object,icon:{type:Object,default:function(){return{type:"file",back:"black"}}},image:Object,info:String,link:String,options:[Array,Function],sortable:Boolean,target:String,text:String},computed:{wrapper:function(){return this.link?"k-link":"div"},ratioPadding:function(){return this.icon&&this.icon.ratio?Uu(this.icon.ratio):Uu("3/2")},imageOptions:function(){if(!this.image)return!1;var t=null,e=null;return this.image.cards?(t=this.image.cards.url,e=this.image.cards.srcset):(t=this.image.url,e=this.image.srcset),!!t&&{src:t,srcset:e,back:this.image.back||"black",cover:this.image.cover,ratio:this.image.ratio||"3/2",sizes:this.getSizes(this.column)}}},methods:{getSizes:function(t){switch(t){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"}}}},Hu=Fu,Ku=(n("c119"),Object(c["a"])(Hu,Ru,zu,!1,null,null,null)),Vu=Ku.exports,Yu=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-cards"},[t._t("default",t._l(t.cards,function(e,i){return n("k-card",t._g(t._b({key:i},"k-card",e,!1),t.$listeners))}))],2)},Wu=[],Gu={props:{cards:Array}},Ju=Gu,Zu=(n("f56d"),Object(c["a"])(Ju,Yu,Wu,!1,null,null,null)),Xu=Zu.exports,Qu=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-collection",attrs:{"data-layout":t.layout}},[n("k-draggable",{attrs:{list:t.items,options:t.dragOptions,element:t.elements.list,"data-size":t.size,handle:!0},on:{change:function(e){return t.$emit("change",e)},end:t.onEnd}},t._l(t.items,function(e,i){return n(t.elements.item,t._b({key:i,tag:"component",class:{"k-draggable-item":e.sortable},on:{action:function(n){return t.$emit("action",e,n)},dragstart:function(n){return t.onDragStart(n,e.dragText)}}},"component",e,!1))}),1),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)},tc=[],ec={props:{help:String,items:{type:[Array,Object],default:function(){return[]}},layout:{type:String,default:"list"},size:String,sortable:Boolean,pagination:{type:[Boolean,Object],default:function(){return!1}}},computed:{hasPagination:function(){return!1!==this.pagination&&(!0!==this.paginationOptions.hide&&!(this.pagination.total<=this.pagination.limit))},hasFooter:function(){return!(!this.hasPagination&&!this.help)},dragOptions:function(){return{sort:this.sortable,disabled:!1===this.sortable,draggable:".k-draggable-item"}},elements:function(){var t={cards:{list:"k-cards",item:"k-card"},list:{list:"k-list",item:"k-list-item"}};return t[this.layout]?t[this.layout]:t["list"]},paginationOptions:function(){var t="object"!==Object(Nt["a"])(this.pagination)?{}:this.pagination;return Object(f["a"])({limit:10,details:!0,keys:!1,total:0,hide:!1},t)}},watch:{$props:function(){this.$forceUpdate()}},over:null,methods:{onEnd:function(){this.over&&this.over.removeAttribute("data-over"),this.$emit("sort",this.items)},onDragStart:function(t,e){this.$store.dispatch("drag",{type:"text",data:e})}}},nc=ec,ic=(n("8c28"),Object(c["a"])(nc,Qu,tc,!1,null,null,null)),sc=ic.exports,ac=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-column",attrs:{"data-width":t.width}},[t._t("default")],2)},oc=[],rc={name:"KirbyColumn",props:{width:String}},lc=rc,uc=(n("c9cb"),Object(c["a"])(lc,ac,oc,!1,null,null,null)),cc=uc.exports,dc=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("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)},pc=[],fc={props:{label:{type:String,default:"Drop to upload"},disabled:{type:Boolean,default:!1}},data:function(){return{files:[],dragging:!1,over:!1}},methods:{cancel:function(){this.reset()},reset:function(){this.dragging=!1,this.over=!1},onDrop:function(t){return!0===this.disabled?this.reset():t.dataTransfer.types?!1===t.dataTransfer.types.includes("Files")?this.reset():(this.$events.$emit("dropzone.drop"),this.files=t.dataTransfer.files,this.$emit("drop",this.files),void this.reset()):this.reset()},onEnter:function(t){!1===this.disabled&&t.dataTransfer.types&&t.dataTransfer.types.includes("Files")&&(this.dragging=!0)},onLeave:function(){this.reset()},onOver:function(t){!1===this.disabled&&t.dataTransfer.types&&t.dataTransfer.types.includes("Files")&&(t.dataTransfer.dropEffect="copy",this.over=!0)}}},hc=fc,mc=(n("414d"),Object(c["a"])(hc,dc,pc,!1,null,null,null)),gc=mc.exports,vc=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",t._g({staticClass:"k-empty",attrs:{"data-layout":t.layout}},t.$listeners),[n("k-icon",{attrs:{type:t.icon}}),n("p",[t._t("default")],2)],1)},bc=[],kc={props:{text:String,icon:String,layout:{type:String,default:"list"}}},$c=kc,_c=(n("ba8f"),Object(c["a"])($c,vc,bc,!1,null,null,null)),yc=_c.exports,xc=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("a",{directives:[{name:"tab",rawName:"v-tab"}],staticClass:"k-file-preview-image-link",attrs:{href:t.file.url,title:t.$t("open"),target:"_blank"}},[t.file.panelImage&&t.file.panelImage.cards&&t.file.panelImage.cards.url?n("k-image",{attrs:{src:t.file.panelImage.cards.url,srcset:t.file.panelImage.cards.srcset,back:"none"}}):t.file.panelIcon?n("k-icon",{staticClass:"k-file-preview-icon",style:{color:t.file.panelIcon.color},attrs:{type:t.file.panelIcon.type}}):n("span",{staticClass:"k-file-preview-placeholder"})],1)]),n("div",{staticClass:"k-file-preview-details"},[n("ul",[n("li",[n("h3",[t._v(t._s(t.$t("template")))]),n("p",[t._v(t._s(t.file.template||"—"))])]),n("li",[n("h3",[t._v(t._s(t.$t("mime")))]),n("p",[t._v(t._s(t.file.mime))])]),n("li",[n("h3",[t._v(t._s(t.$t("url")))]),n("p",[n("k-link",{attrs:{to:t.file.url,tabindex:"-1",target:"_blank"}},[t._v("/"+t._s(t.file.id))])],1)]),n("li",[n("h3",[t._v(t._s(t.$t("size")))]),n("p",[t._v(t._s(t.file.niceSize))])]),n("li",[n("h3",[t._v(t._s(t.$t("dimensions")))]),t.file.dimensions?n("p",[t._v(t._s(t.file.dimensions.width)+"×"+t._s(t.file.dimensions.height)+" "+t._s(t.$t("pixel")))]):n("p",[t._v("—")])]),n("li",[n("h3",[t._v(t._s(t.$t("orientation")))]),t.file.dimensions?n("p",[t._v(t._s(t.$t("orientation."+t.file.dimensions.orientation)))]):n("p",[t._v("—")])])])])])],1)},wc=[],Oc={props:{file:Object}},Cc=Oc,Sc=(n("696b5"),Object(c["a"])(Cc,xc,wc,!1,null,null,null)),Ec=Sc.exports,jc=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-grid",attrs:{"data-gutter":t.gutter}},[t._t("default")],2)},Tc=[],Ic={props:{gutter:String}},Lc=Ic,qc=(n("5b23"),Object(c["a"])(Lc,jc,Tc,!1,null,null,null)),Ac=qc.exports,Nc=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"},[t._t("left",null,{slot:"left"}),t._t("right",null,{slot:"right"})],2):t._e(),t.tabs&&t.tabs.length>1?n("div",{staticClass:"k-header-tabs"},[n("nav",[t._l(t.visibleTabs,function(e,i){return n("k-button",{key:t.$route.fullPath+"-tab-"+i,staticClass:"k-tab-button",attrs:{link:"#"+e.name,current:t.currentTab&&t.currentTab.name===e.name,icon:e.icon,tooltip:e.label}},[t._v("\n "+t._s(e.label)+"\n ")])}),t.invisibleTabs.length?n("k-button",{staticClass:"k-tab-button k-tabs-dropdown-button",attrs:{icon:"dots"},on:{click:function(e){return e.stopPropagation(),t.$refs.more.toggle()}}},[t._v("\n "+t._s(t.$t("more"))+"\n ")]):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,i){return n("k-dropdown-item",{key:"more-"+i,attrs:{link:"#"+e.name,current:t.currentTab&&t.currentTab.name===e.name,icon:e.icon,tooltip:e.label}},[t._v("\n "+t._s(e.label)+"\n ")])}),1):t._e()],1):t._e()],1)},Bc=[],Dc={props:{editable:Boolean,tabs:Array,tab:Object},data:function(){return{size:null,currentTab:this.tab,visibleTabs:this.tabs,invisibleTabs:[]}},watch:{tab:function(){this.currentTab=this.tab},tabs:function(t){this.visibleTabs=t,this.invisibleTabs=[],this.resize(!0)}},created:function(){window.addEventListener("resize",this.resize)},destroyed:function(){window.removeEventListener("resize",this.resize)},methods:{resize:function(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"}}}}},Pc=Dc,Mc=(n("53c5"),Object(c["a"])(Pc,Nc,Bc,!1,null,null,null)),Rc=Mc.exports,zc=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("ul",{staticClass:"k-list"},[t._t("default",t._l(t.items,function(e,i){return n("k-list-item",t._g(t._b({key:i},"k-list-item",e,!1),t.$listeners))}))],2)},Uc=[],Fc={props:{items:Array}},Hc=Fc,Kc=(n("c857"),Object(c["a"])(Hc,zc,Uc,!1,null,null,null)),Vc=Kc.exports,Yc=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n(t.element,t._g({tag:"component",staticClass:"k-list-item"},t.$listeners),[t.sortable?n("k-sort-handle"):t._e(),n("k-link",{directives:[{name:"tab",rawName:"v-tab"}],staticClass:"k-list-item-content",attrs:{to:t.link,target:t.target}},[n("span",{staticClass:"k-list-item-image"},[t.imageOptions?n("k-image",t._b({},"k-image",t.imageOptions,!1)):n("k-icon",t._b({},"k-icon",t.icon,!1))],1),n("span",{staticClass:"k-list-item-text"},[n("em",[t._v(t._s(t.text))]),t.info?n("small",{domProps:{innerHTML:t._s(t.info)}}):t._e()])]),n("nav",{staticClass:"k-list-item-options"},[t._t("options",[t.flag?n("k-button",t._b({on:{click:t.flag.click}},"k-button",t.flag,!1)):t._e(),t.options?n("k-button",{staticClass:"k-list-item-toggle",attrs:{tooltip:t.$t("options"),icon:"dots",alt:"Options"},on:{click:function(e){return e.stopPropagation(),t.$refs.options.toggle()}}}):t._e(),n("k-dropdown-content",{ref:"options",attrs:{options:t.options,align:"right"},on:{action:function(e){return t.$emit("action",e)}}})])],2)],1)},Wc=[],Gc={inheritAttrs:!1,props:{element:{type:String,default:"li"},image:Object,icon:{type:Object,default:function(){return{type:"file",back:"black"}}},sortable:Boolean,text:String,target:String,info:String,link:String,flag:Object,options:[Array,Function]},computed:{imageOptions:function(){if(!this.image)return!1;var t=null,e=null;return this.image.list?(t=this.image.list.url,e=this.image.list.srcset):(t=this.image.url,e=this.image.srcset),!!t&&{src:t,srcset:e,back:this.image.back||"black",cover:this.image.cover}}}},Jc=Gc,Zc=(n("fa6a"),Object(c["a"])(Jc,Yc,Wc,!1,null,null,null)),Xc=Zc.exports,Qc=function(){var t=this,e=t.$createElement,n=t._self._c||e;return 0===t.tabs.length?n("k-box",{attrs:{text:"This page has no blueprint setup yet",theme:"info"}}):t.tab?n("k-sections",{attrs:{parent:t.parent,blueprint:t.blueprint,columns:t.tab.columns},on:{submit:function(e){return t.$emit("submit",e)}}}):t._e()},td=[],ed={props:{parent:String,blueprint:String,tabs:Array},data:function(){return{tab:null}},watch:{$route:function(){this.open()},blueprint:function(){this.open()}},mounted:function(){this.open()},methods:{open:function(t){if(0!==this.tabs.length){t||(t=this.$route.hash.replace("#","")),t||(t=this.tabs[0].name);var e=null;this.tabs.forEach(function(n){n.name===t&&(e=n)}),e||(e=this.tabs[0]),this.tab=e,this.$emit("tab",this.tab)}}}},nd=ed,id=Object(c["a"])(nd,Qc,td,!1,null,null,null),sd=id.exports,ad=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-view",attrs:{"data-align":t.align}},[t._t("default")],2)},od=[],rd={props:{align:String}},ld=rd,ud=(n("daa8"),Object(c["a"])(ld,ad,od,!1,null,null,null)),cd=ud.exports,dd=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("draggable",t._g(t._b({staticClass:"k-draggable",attrs:{tag:t.element,list:t.list,move:t.move}},"draggable",t.dragOptions,!1),t.listeners),[t._t("default"),t._t("footer",null,{slot:"footer"})],2)},pd=[],fd=n("1980"),hd=n.n(fd),md={components:{draggable:hd.a},props:{element:String,handle:[String,Boolean],list:[Array,Object],move:Function,options:Object},data:function(){var t=this;return{listeners:Object(f["a"])({},this.$listeners,{start:function(e){t.$store.dispatch("drag",{}),t.$listeners.start&&t.$listeners.start(e)},end:function(e){t.$store.dispatch("drag",null),t.$listeners.end&&t.$listeners.end(e)}})}},computed:{dragOptions:function(){var t=!1;return t=!0===this.handle?".k-sort-handle":this.handle,Object(f["a"])({fallbackClass:"k-sortable-fallback",fallbackOnBody:!0,forceFallback:!0,ghostClass:"k-sortable-ghost",handle:t,scroll:document.querySelector(".k-panel-view")},this.options)}}},gd=md,vd=Object(c["a"])(gd,dd,pd,!1,null,null,null),bd=vd.exports,kd={data:function(){return{error:null}},errorCaptured:function(t){return g.debug&&window.console.warn(t),this.error=t,!1},render:function(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]}},$d=kd,_d=Object(c["a"])($d,Br,Dr,!1,null,null,null),yd=_d.exports,xd=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)},wd=[],Od={props:{link:String,size:{type:String},tag:{type:String,default:"h2"},theme:{type:String}}},Cd=Od,Sd=(n("f8a7"),Object(c["a"])(Cd,xd,wd,!1,null,null,null)),Ed=Sd.exports,jd=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{class:"k-icon k-icon-"+t.type,attrs:{"aria-label":t.alt,role:t.alt?"img":null,"aria-hidden":!t.alt,"data-back":t.back,"data-size":t.size}},[t.emoji?n("span",{staticClass:"k-icon-emoji"},[t._v(t._s(t.type))]):n("svg",{style:{color:t.color},attrs:{viewBox:"0 0 16 16"}},[n("use",{attrs:{"xlink:href":"#icon-"+t.type}})])])},Td=[],Id={props:{alt:String,color:String,back:String,emoji:Boolean,size:String,type:String}},Ld=Id,qd=(n("3342"),Object(c["a"])(Ld,jd,Td,!1,null,null,null)),Ad=qd.exports,Nd=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)])},Bd=[],Dd={props:{alt:String,back:String,cover:Boolean,ratio:String,sizes:String,src:String,srcset:String},data:function(){return{loaded:{type:Boolean,default:!1},error:{type:Boolean,default:!1}}},computed:{ratioPadding:function(){return Uu(this.ratio||"1/1")}},created:function(){var t=this,e=new Image;e.onload=function(){t.loaded=!0,t.$emit("load")},e.onerror=function(){t.error=!0,t.$emit("error")},e.src=this.src}},Pd=Dd,Md=(n("0d56"),Object(c["a"])(Pd,Nd,Bd,!1,null,null,null)),Rd=Md.exports,zd=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("progress",{staticClass:"k-progress",attrs:{max:"100"},domProps:{value:t.state}},[t._v("\n "+t._s(t.state)+"%\n")])},Ud=[],Fd={props:{value:{type:Number,default:0}},data:function(){return{state:this.value}},methods:{set:function(t){this.state=t}}},Hd=Fd,Kd=(n("9799"),Object(c["a"])(Hd,zd,Ud,!1,null,null,null)),Vd=Kd.exports,Yd=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{staticClass:"k-sort-handle",attrs:{"aria-hidden":"true"}},[n("svg",{attrs:{viewBox:"0 0 16 16"}},[n("use",{attrs:{"xlink:href":"#icon-sort"}})])])},Wd=[],Gd=(n("35cb"),{}),Jd=Object(c["a"])(Gd,Yd,Wd,!1,null,null,null),Zd=Jd.exports,Xd=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-text",attrs:{"data-align":t.align,"data-size":t.size,"data-theme":t.theme}},[t._t("default")],2)},Qd=[],tp={props:{align:String,size:String,theme:String}},ep=tp,np=(n("b0d6"),Object(c["a"])(ep,Xd,Qd,!1,null,null,null)),ip=np.exports,sp=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n(t.component,t._g({directives:[{name:"tab",rawName:"v-tab"}],ref:"button",tag:"component",staticClass:"k-button",attrs:{"aria-current":t.current,autofocus:t.autofocus,id:t.id,disabled:t.disabled,"data-tabbed":t.tabbed,"data-theme":t.theme,"data-responsive":t.responsive,role:t.role,tabindex:t.tabindex,target:t.target,title:t.tooltip,to:t.link,type:t.link?null:t.type}},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)},ap=[],op={directives:{tab:_},inheritAttrs:!1,props:{autofocus:Boolean,current:[String,Boolean],disabled:Boolean,icon:String,id:[String,Number],link:String,responsive:Boolean,role:String,target:String,tabindex:String,theme:String,tooltip:String,type:{type:String,default:"button"}},data:function(){return{tabbed:!1}},computed:{component:function(){return this.link?"k-link":"button"},imageUrl:function(){return this.image?"object"===Object(Nt["a"])(this.image)?this.image.url:this.image:null}},methods:{focus:function(){this.$refs.button.focus()},tab:function(){this.focus(),this.tabbed=!0},untab:function(){this.tabbed=!1}}},rp=op,lp=(n("3787"),Object(c["a"])(rp,sp,ap,!1,null,null,null)),up=lp.exports,cp=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-button-group"},[t._t("default")],2)},dp=[],pp=(n("a567"),{}),fp=Object(c["a"])(pp,cp,dp,!1,null,null,null),hp=fp.exports,mp=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{staticClass:"k-dropdown",on:{click:function(t){t.stopPropagation()}}},[t._t("default")],2)},gp=[],vp=(n("f95f"),{}),bp=Object(c["a"])(vp,mp,gp,!1,null,null,null),kp=bp.exports,$p=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}},[t._t("default",[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.$emit("action",e.click)}}},"k-dropdown-item",e,!1),[t._v("\n "+t._s(e.text)+"\n ")])]})])],2):t._e()},_p=[],yp=null,xp={props:{options:[Array,Function],align:String},data:function(){return{items:[],current:-1,isOpen:!1}},methods:{fetchOptions:function(t){if(!this.options)return t(this.items);"string"===typeof this.options?fetch(this.options).then(function(t){return t.json()}).then(function(e){return t(e)}):"function"===typeof this.options?this.options(t):mt()(this.options)&&t(this.options)},open:function(){var t=this;this.reset(),yp&&yp!==this&&yp.close(),this.fetchOptions(function(e){t.$events.$on("keydown",t.navigate),t.$events.$on("click",t.close),t.items=e,t.isOpen=!0,t.$emit("open"),yp=t})},reset:function(){this.current=-1,this.$events.$off("keydown",this.navigate),this.$events.$off("click",this.close)},close:function(){this.reset(),this.isOpen=yp=!1,this.$emit("close")},toggle:function(){this.isOpen?this.close():this.open()},focus:function(t){t=t||0,this.$children[t]&&this.$children[t].focus&&(this.current=t,this.$children[t].focus())},navigate:function(t){switch(t.code){case"Escape":case"ArrowLeft":this.close(),this.$emit("leave",t.code);break;case"ArrowUp":t.preventDefault(),this.current>0?(this.current--,this.focus(this.current)):(this.close(),this.$emit("leave",t.code));break;case"ArrowDown":t.preventDefault(),this.current1?[t._v(t._s(t.detailsText))]:t._e(),t._v(t._s(t.total)+"\n ")],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",[n("label",{attrs:{for:"k-pagination-input"}},[t._v(t._s(t.pageLabel))]),n("input",{ref:"page",attrs:{id:"k-pagination-input",min:1,max:t.pages,type:"number"},domProps:{value:t.currentPage},on:{keydown:[function(t){t.stopPropagation()},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.goTo(e.target.value)}]}}),n("k-button",{attrs:{icon:"angle-up"},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)+"\n ")],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()},Vp=[],Yp={props:{align:{type:String,default:"left"},details:{type:Boolean,default:!1},dropdown:{type:Boolean,default:!0},validate:{type:Function,default:function(){return vi.a.resolve()}},page:{type:Number,default:1},total:{type:Number,default:0},limit:{type:Number,default:10},keys:{type:Boolean,default:!1},pageLabel:{type:String,default:"Page"},prevLabel:{type:String,default:function(){return this.$t("prev")}},nextLabel:{type:String,default:function(){return this.$t("next")}}},data:function(){return{currentPage:this.page}},computed:{show:function(){return this.pages>1},start:function(){return(this.currentPage-1)*this.limit+1},end:function(){var t=this.start-1+this.limit;return t>this.total?this.total:t},detailsText:function(){return 1===this.limit?this.start+" / ":this.start+"-"+this.end+" / "},pages:function(){return Math.ceil(this.total/this.limit)},hasPrev:function(){return this.start>1},hasNext:function(){return this.endthis.limit},offset:function(){return this.start-1}},watch:{page:function(t){this.currentPage=t}},created:function(){!0===this.keys&&window.addEventListener("keydown",this.navigate,!1)},destroyed:function(){window.removeEventListener("keydown",this.navigate,!1)},methods:{goTo:function(t){var e=this;this.validate(t).then(function(){t<1&&(t=1),t>e.pages&&(t=e.pages),e.currentPage=t,e.$refs.dropdown&&e.$refs.dropdown.close(),e.$emit("paginate",{page:ui()(e.currentPage),start:e.start,end:e.end,limit:e.limit,offset:e.offset})}).catch(function(){})},prev:function(){this.goTo(this.currentPage-1)},next:function(){this.goTo(this.currentPage+1)},navigate:function(t){switch(t.code){case"ArrowLeft":this.prev();break;case"ArrowRight":this.next();break}}}},Wp=Yp,Gp=(n("a66d"),Object(c["a"])(Wp,Kp,Vp,!1,null,null,null)),Jp=Gp.exports,Zp=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-button-group",{staticClass:"k-prev-next"},[n("k-button",t._b({attrs:{icon:"angle-left"}},"k-button",t.prev,!1)),n("k-button",t._b({attrs:{icon:"angle-right"}},"k-button",t.next,!1))],1)},Xp=[],Qp={props:{prev:{type:Object,default:function(){return{disabled:!0,link:"#"}}},next:{type:Object,default:function(){return{disabled:!0,link:"#"}}}}},tf=Qp,ef=(n("7a7d"),Object(c["a"])(tf,Zp,Xp,!1,null,null,null)),nf=ef.exports,sf=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"k-search",attrs:{role:"search"},on:{click:t.close}},[n("div",{staticClass:"k-search-box",on:{click:function(t){t.stopPropagation()}}},[n("div",{staticClass:"k-search-input"},[n("k-dropdown",{staticClass:"k-search-types"},[n("k-button",{attrs:{icon:t.type.icon},on:{click:function(e){return t.$refs.types.toggle()}}},[t._v(t._s(t.type.label)+":")]),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){t.currentType=i}}},[t._v("\n "+t._s(e.label)+"\n ")])}),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('search')",type:"text"},domProps:{value:t.q},on:{keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"])?null:(e.preventDefault(),t.down(e))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"up",38,e.key,["Up","ArrowUp"])?null:(e.preventDefault(),t.up(e))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"tab",9,e.key,"Tab")?null:(e.preventDefault(),t.tab(e))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.enter(e)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}],input:function(e){e.target.composing||(t.q=e.target.value)}}}),n("k-button",{staticClass:"k-search-close",attrs:{tooltip:t.$t("close"),icon:"cancel"},on:{click:t.close}})],1),n("ul",t._l(t.items,function(e,i){return n("li",{key:e.id,attrs:{"data-selected":t.selected===i},on:{mouseover:function(e){t.selected=i}}},[n("k-link",{attrs:{to:e.link},on:{click:function(e){return t.click(i)}}},[n("strong",[t._v(t._s(e.title))]),n("small",[t._v(t._s(e.info))])])],1)}),0)])])},af=[],of=function(t,e){var n=null;return function(){var i=this,s=arguments;clearTimeout(n),n=setTimeout(function(){t.apply(i,s)},e)}},rf={data:function(){return{items:[],q:null,selected:-1,currentType:"pages"}},computed:{type:function(){return this.types[this.currentType]||this.types["pages"]},types:function(){return{pages:{label:this.$t("pages"),icon:"page",endpoint:"site/search"},users:{label:this.$t("users"),icon:"users",endpoint:"users/search"}}}},watch:{q:of(function(t){this.search(t)},200),currentType:function(){this.search(this.q)}},mounted:function(){var t=this;this.$nextTick(function(){t.$refs.input.focus()})},methods:{open:function(t){t.preventDefault(),this.$store.dispatch("search",!0)},click:function(t){this.selected=t,this.tab()},close:function(){this.$store.dispatch("search",!1)},down:function(){this.selected=0&&this.selected--}}},lf=rf,uf=(n("4cb2"),Object(c["a"])(lf,sf,af,!1,null,null,null)),cf=uf.exports,df=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{ref:"button",staticClass:"k-tag",attrs:{"data-size":t.size,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(e))}}},[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()])},pf=[],ff={props:{removable:Boolean,size:String},methods:{remove:function(){this.removable&&this.$emit("remove")},focus:function(){this.$refs.button.focus()}}},hf=ff,mf=(n("021f"),Object(c["a"])(hf,df,pf,!1,null,null,null)),gf=mf.exports,vf=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.user&&t.view?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"},[n("ul",[t._l(t.views,function(e,i){return e.menu?n("li",{key:"menu-item-"+i,attrs:{"aria-current":t.$store.state.view===i}},[n("k-dropdown-item",{attrs:{disabled:!1===t.$permissions.access[i],icon:e.icon,link:e.link}},[t._v("\n "+t._s(t.$t("view."+i,e.label))+"\n ")])],1):t._e()}),n("li",[n("hr")]),n("li",{attrs:{"aria-current":"account"===t.$route.meta.view}},[n("k-dropdown-item",{attrs:{icon:"account",link:"/account"}},[t._v("\n "+t._s(t.$t("view.account"))+"\n ")])],1),n("li",[n("hr")]),n("li",[n("k-dropdown-item",{attrs:{icon:"logout",link:"/logout"}},[t._v("\n "+t._s(t.$t("logout"))+"\n ")])],1)],2)])],1),t.view?n("k-link",{directives:[{name:"tab",rawName:"v-tab"}],staticClass:"k-topbar-button k-topbar-view-button",attrs:{to:t.view.link}},[n("k-icon",{attrs:{type:t.view.icon}}),t._v(" "+t._s(t.breadcrumbTitle)+"\n ")],1):t._e(),t.$store.state.breadcrumb.length>1?n("k-dropdown",{staticClass:"k-topbar-breadcrumb-menu"},[n("k-button",{staticClass:"k-topbar-button",on:{click:function(e){return t.$refs.crumb.toggle()}}},[t._v("\n …\n "),n("k-icon",{attrs:{type:"angle-down"}})],1),n("k-dropdown-content",{ref:"crumb"},[n("k-dropdown-item",{attrs:{icon:t.view.icon,link:t.view.link}},[t._v("\n "+t._s(t.$t("view."+t.$store.state.view,t.view.label))+"\n ")]),t._l(t.$store.state.breadcrumb,function(e,i){return n("k-dropdown-item",{key:"crumb-"+i+"-dropdown",attrs:{icon:t.view.icon,link:e.link}},[t._v("\n "+t._s(e.label)+"\n ")])})],2)],1):t._e(),n("nav",{staticClass:"k-topbar-crumbs"},t._l(t.$store.state.breadcrumb,function(e,i){return n("k-link",{directives:[{name:"tab",rawName:"v-tab"}],key:"crumb-"+i,attrs:{to:e.link}},[t._v("\n "+t._s(e.label)+"\n ")])}),1),n("div",{staticClass:"k-topbar-signals"},[n("span",{directives:[{name:"show",rawName:"v-show",value:t.$store.state.isLoading,expression:"$store.state.isLoading"}],staticClass:"k-topbar-loader"},[n("svg",{attrs:{viewBox:"0 0 16 18"}},[n("path",{attrs:{fill:"white",d:"M8,0 L16,4.50265232 L16,13.5112142 L8,18.0138665 L0,13.5112142 L0,4.50265232 L8,0 Z M2.10648757,5.69852516 L2.10648757,12.3153414 L8,15.632396 L13.8935124,12.3153414 L13.8935124,5.69852516 L8,2.38147048 L2.10648757,5.69852516 Z"}})])]),t.notification?[n("k-button",{staticClass:"k-topbar-notification k-topbar-signals-button",attrs:{theme:"positive"},on:{click:function(e){return t.$store.dispatch("notification/close")}}},[t._v("\n "+t._s(t.notification.message)+"\n ")])]:t.unregistered?[n("div",{staticClass:"k-registration"},[n("p",[t._v(t._s(t.$t("license.unregistered")))]),n("k-button",{staticClass:"k-topbar-signals-button",attrs:{responsive:!0,icon:"key"},on:{click:function(e){return t.$emit("register")}}},[t._v("\n "+t._s(t.$t("license.register"))+"\n ")]),n("k-button",{staticClass:"k-topbar-signals-button",attrs:{responsive:!0,link:"https://getkirby.com/buy",target:"_blank",icon:"cart"}},[t._v("\n "+t._s(t.$t("license.buy"))+"\n ")])],1)]:t._e(),n("k-button",{staticClass:"k-topbar-signals-button",attrs:{tooltip:t.$t("search"),icon:"search"},on:{click:function(e){return t.$store.dispatch("search",!0)}}})],2)],1)])],1):t._e()},bf=[],kf=Object(f["a"])({site:{link:"/site",icon:"page",menu:!0},users:{link:"/users",icon:"users",menu:!0},settings:{link:"/settings",icon:"settings",menu:!0},account:{link:"/account",icon:"users",menu:!1}},window.panel.plugins.views),$f={computed:{breadcrumbTitle:function(){var t=this.$t("view.".concat(this.$store.state.view),this.view.label);return"site"===this.$store.state.view&&this.$store.state.system.info.title||t},view:function(){return kf[this.$store.state.view]},views:function(){return kf},user:function(){return this.$store.state.user.current},notification:function(){return this.$store.state.notification.type&&"error"!==this.$store.state.notification.type?this.$store.state.notification:null},unregistered:function(){return!this.$store.state.system.info.license}}},_f=$f,yf=(n("1e3b"),Object(c["a"])(_f,vf,bf,!1,null,null,null)),xf=yf.exports,wf=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-grid",{staticClass:"k-sections",attrs:{gutter:"large"}},t._l(t.columns,function(e,i){return n("k-column",{key:t.parent+"-column-"+i,attrs:{width:e.width}},[t._l(e.sections,function(s,a){return t.meetsCondition(s)?[t.exists(s.type)?n("k-"+s.type+"-section",t._b({key:t.parent+"-column-"+i+"-section-"+a+"-"+t.blueprint,tag:"component",class:"k-section k-section-name-"+s.name,attrs:{name:s.name,parent:t.parent,blueprint:t.blueprint,column:e.width},on:{submit:function(e){return t.$emit("submit",e)}}},"component",s,!1)):[n("k-box",{key:t.parent+"-column-"+i+"-section-"+a,attrs:{text:t.$t("error.section.type.invalid",{type:s.type}),theme:"negative"}})]]:t._e()})],2)}),1)},Of=[],Cf={props:{parent:String,blueprint:String,columns:[Array,Object]},computed:{content:function(){return this.$store.getters["form/values"]()}},methods:{exists:function(t){return C["a"].options.components["k-"+t+"-section"]},meetsCondition:function(t){var e=this;if(!t.when)return!0;var n=!0;return J()(t.when).forEach(function(i){var s=e.content[i.toLowerCase()],a=t.when[i];s!==a&&(n=!1)}),n}}},Sf=Cf,Ef=(n("6bcd"),Object(c["a"])(Sf,wf,Of,!1,null,null,null)),jf=Ef.exports,Tf=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)},If=[],Lf={props:{blueprint:String,help:String,name:String,parent:String},methods:{load:function(){return this.$api.get(this.parent+"/sections/"+this.name)}}},qf={mixins:[Lf],data:function(){return{headline:null,issue:null,text:null,theme:null}},created:function(){var t=this;this.load().then(function(e){t.headline=e.options.headline,t.text=e.options.text,t.theme=e.options.theme||"info"}).catch(function(e){t.issue=e})}},Af=qf,Nf=(n("4333"),Object(c["a"])(Af,Tf,If,!1,null,null,null)),Bf=Nf.exports,Df=function(){var t=this,e=t.$createElement,n=t._self._c||e;return!1===t.isLoading?n("section",{staticClass:"k-pages-section"},[n("header",{staticClass:"k-section-header"},[n("k-headline",{attrs:{link:t.options.link}},[t._v("\n "+t._s(t.headline)+" "),t.options.min?n("abbr",{attrs:{title:"This section is required"}},[t._v("*")]):t._e()]),t.add?n("k-button-group",[n("k-button",{attrs:{icon:"add"},on:{click:t.create}},[t._v(t._s(t.$t("add")))])],1):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("\n "+t._s(t.error)+"\n ")])],1)]:[t.data.length?n("k-collection",{attrs:{layout:t.options.layout,help:t.help,items:t.data,pagination:t.pagination,sortable:t.options.sortable,size:t.options.size},on:{change:t.sort,paginate:t.paginate,action:t.action}}):[n("k-empty",{attrs:{layout:t.options.layout,icon:"page"},on:{click:t.create}},[t._v("\n "+t._s(t.options.empty||t.$t("pages.empty"))+"\n ")]),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)],n("k-page-create-dialog",{ref:"create"}),n("k-page-duplicate-dialog",{ref:"duplicate"}),n("k-page-rename-dialog",{ref:"rename",on:{success:t.update}}),n("k-page-url-dialog",{ref:"url",on:{success:t.update}}),n("k-page-status-dialog",{ref:"status",on:{success:t.update}}),n("k-page-template-dialog",{ref:"template",on:{success:t.update}}),n("k-page-remove-dialog",{ref:"remove",on:{success:t.update}})]],2):t._e()},Pf=[],Mf={inheritAttrs:!1,props:{blueprint:String,column:String,parent:String,name:String},data:function(){return{data:[],error:null,isLoading:!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:function(){return this.options.headline||" "},help:function(){return this.options.help},language:function(){return this.$store.state.languages.current},paginationId:function(){return"kirby$pagination$"+this.parent+"/"+this.name}},watch:{language:function(){this.reload()}},methods:{items:function(t){return t},load:function(t){var e=this;t||(this.isLoading=!0),null===this.pagination.page&&(this.pagination.page=localStorage.getItem(this.paginationId)||1),this.$api.get(this.parent+"/sections/"+this.name,{page:this.pagination.page}).then(function(t){e.isLoading=!1,e.options=t.options,e.pagination=t.pagination,e.data=e.items(t.data)}).catch(function(t){e.isLoading=!1,e.error=t.message})},paginate:function(t){localStorage.setItem(this.paginationId,t.page),this.pagination=t,this.reload()},reload:function(){this.load(!0)}}},Rf={mixins:[Mf],computed:{add:function(){return this.options.add&&this.$permissions.pages.create}},created:function(){this.load(),this.$events.$on("page.changeStatus",this.reload)},destroyed:function(){this.$events.$off("page.changeStatus",this.reload)},methods:{create:function(){this.add&&this.$refs.create.open(this.options.link||this.parent,this.parent+"/children/blueprints",this.name)},action:function(t,e){var n=this,i=this.$api.pages.url(t.id,"lock");this.$api.get(i).then(function(i){if(i.locked&&!1===["preview"].includes(e))n.$store.dispatch("notification/error",n.$t("lock.page.isLocked",{email:i.email}));else switch(e){case"duplicate":n.$refs.duplicate.open(t.id);break;case"preview":var s=window.open("","_blank");s.document.write="...",n.$api.pages.preview(t.id).then(function(t){s.location.href=t}).catch(function(t){n.$store.dispatch("notification/error",t)});break;case"rename":n.$refs.rename.open(t.id);break;case"url":n.$refs.url.open(t.id);break;case"status":n.$refs.status.open(t.id);break;case"template":n.$refs.template.open(t.id);break;case"remove":if(n.data.length<=n.options.min){var a=n.options.min>1?"plural":"singular";n.$store.dispatch("notification/error",{message:n.$t("error.section.pages.min."+a,{section:n.options.headline||n.name,min:n.options.min})});break}n.$refs.remove.open(t.id);break;default:throw new Error("Invalid action")}})},items:function(t){var e=this;return t.map(function(t){return t.flag={class:"k-status-flag k-status-flag-"+t.status,tooltip:e.$t("page.status"),icon:!1===t.permissions.changeStatus?"protected":"circle",disabled:!1===t.permissions.changeStatus,click:function(){e.action(t,"status")}},t.options=function(n){e.$api.pages.options(t.id,"list").then(function(t){return n(t)}).catch(function(t){e.$store.dispatch("notification/error",t)})},t.sortable=t.permissions.sort&&e.options.sortable,t.column=e.column,t})},sort:function(t){var e=this,n=null;if(t.added&&(n="added"),t.moved&&(n="moved"),n){var i=t[n].element,s=t[n].newIndex+1+this.pagination.offset;this.$api.pages.status(i.id,"listed",s).then(function(){e.$store.dispatch("notification/success",":)")}).catch(function(t){e.$store.dispatch("notification/error",{message:t.message,details:t.details}),e.reload()})}},update:function(){this.reload(),this.$events.$emit("model.update")}}},zf=Rf,Uf=Object(c["a"])(zf,Df,Pf,!1,null,null,null),Ff=Uf.exports,Hf=function(){var t=this,e=t.$createElement,n=t._self._c||e;return!1===t.isLoading?n("section",{staticClass:"k-files-section"},[n("header",{staticClass:"k-section-header"},[n("k-headline",[t._v("\n "+t._s(t.headline)+" "),t.options.min?n("abbr",{attrs:{title:"This section is required"}},[t._v("*")]):t._e()]),t.add?n("k-button-group",[n("k-button",{attrs:{icon:"upload"},on:{click:t.upload}},[t._v(t._s(t.$t("add")))])],1):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("\n "+t._s(t.error)+"\n ")])],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.options.sortable,size:t.options.size},on:{sort:t.sort,paginate:t.paginate,action:t.action}}):[n("k-empty",{attrs:{layout:t.options.layout,icon:"image"},on:{click:function(e){t.add&&t.upload()}}},[t._v("\n "+t._s(t.options.empty||t.$t("files.empty"))+"\n ")]),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-file-rename-dialog",{ref:"rename",on:{success:t.update}}),n("k-file-remove-dialog",{ref:"remove",on:{success:t.update}}),n("k-upload",{ref:"upload",on:{success:t.uploaded,error:t.reload}})]],2):t._e()},Kf=[],Vf={mixins:[Mf],computed:{add:function(){return!(!this.$permissions.files.create||!1===this.options.upload)&&this.options.upload}},created:function(){this.load(),this.$events.$on("model.update",this.reload)},destroyed:function(){this.$events.$off("model.update",this.reload)},methods:{action:function(t,e){var n=this,i=this.$api.files.url(t.parent,t.filename,"lock");this.$api.get(i).then(function(i){if(i.locked&&!1===["download","edit"].includes(e))n.$store.dispatch("notification/error",n.$t("lock.file.isLocked",{email:i.email}));else switch(e){case"edit":n.$router.push(t.link);break;case"download":window.open(t.url);break;case"rename":n.$refs.rename.open(t.parent,t.filename);break;case"replace":n.replace(t);break;case"remove":if(n.data.length<=n.options.min){var s=n.options.min>1?"plural":"singular";n.$store.dispatch("notification/error",{message:n.$t("error.section.files.min."+s,{section:n.options.headline||n.name,min:n.options.min})});break}n.$refs.remove.open(t.parent,t.filename);break}})},drop:function(t){if(!1===this.add)return!1;this.$refs.upload.drop(t,Object(f["a"])({},this.add,{url:g.api+"/"+this.add.api}))},items:function(t){var e=this;return t.map(function(t){return t.options=function(n){e.$api.files.options(t.parent,t.filename,"list").then(function(t){return n(t)}).catch(function(t){e.$store.dispatch("notification/error",t)})},t.sortable=e.options.sortable,t.column=e.column,t})},replace:function(t){this.$refs.upload.open({url:g.api+"/"+this.$api.files.url(t.parent,t.filename),accept:t.mime,multiple:!1})},sort:function(t){var e=this;if(!1===this.options.sortable)return!1;t=t.map(function(t){return t.id}),this.$api.patch(this.parent+"/files/sort",{files:t,index:this.pagination.offset}).then(function(){e.$store.dispatch("notification/success",":)")}).catch(function(t){e.reload(),e.$store.dispatch("notification/error",t.message)})},update:function(){this.$events.$emit("model.update")},upload:function(){if(!1===this.add)return!1;this.$refs.upload.open(Object(f["a"])({},this.add,{url:g.api+"/"+this.add.api}))},uploaded:function(){this.$events.$emit("file.create"),this.$events.$emit("model.update"),this.$store.dispatch("notification/success",":)")}}},Yf=Vf,Wf=Object(c["a"])(Yf,Hf,Kf,!1,null,null,null),Gf=Wf.exports,Jf=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,theme:"negative"}})]:t._e(),n("k-form",{attrs:{fields:t.fields,validate:!0,value:t.values},on:{input:t.input,submit:t.onSubmit}})],2)},Zf=[],Xf={mixins:[Lf],inheritAttrs:!1,data:function(){return{fields:{},isLoading:!0,issue:null}},computed:{id:function(){return this.$store.state.form.current},language:function(){return this.$store.state.languages.current},values:function(){return this.$store.getters["form/values"](this.id)}},watch:{language:function(){this.fetch()}},created:function(){this.fetch()},methods:{input:function(t,e,n){this.$store.dispatch("form/update",[this.id,n,t[n]])},fetch:function(){var t=this;this.$api.get(this.parent+"/sections/"+this.name).then(function(e){t.fields=e.fields,J()(t.fields).forEach(function(e){t.fields[e].section=t.name,t.fields[e].endpoints={field:t.parent+"/fields/"+e,section:t.parent+"/sections/"+t.name,model:t.parent}}),t.isLoading=!1}).catch(function(e){t.issue=e,t.isLoading=!1})},onSubmit:function(t){this.$events.$emit("keydown.cmd.s",t)}}},Qf=Xf,th=(n("7d5d"),Object(c["a"])(Qf,Jf,Zf,!1,null,null,null)),eh=th.exports,nh=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-error-view",{staticClass:"k-browser-view"},[n("p",[t._v("\n We are really sorry, but your browser does not support\n all features required for the Kirby Panel.\n ")]),!1===t.hasFetchSupport?[n("p",[n("strong",[t._v("Fetch")]),n("br"),t._v("\n We use Javascript's new Fetch API. You can find a list of supported browsers for this feature on\n "),n("strong",[n("a",{attrs:{href:"https://caniuse.com/#feat=fetch"}},[t._v("caniuse.com")])])])]:t._e(),!1===t.hasGridSupport?[n("p",[n("strong",[t._v("CSS Grid")]),n("br"),t._v("\n We use CSS Grids for all our layouts. You can find a list of supported browsers for this feature on\n "),n("strong",[n("a",{attrs:{href:"https://caniuse.com/#feat=css-grid"}},[t._v("caniuse.com")])])])]:t._e()],2)},ih=[],sh={grid:function(){return!(!window.CSS||!window.CSS.supports("display","grid"))},fetch:function(){return void 0!==window.fetch},all:function(){return this.fetch()&&this.grid()}},ah={computed:{hasFetchSupport:function(){return sh.fetch()},hasGridSupport:function(){return sh.grid()}},created:function(){sh.all()&&this.$router.push("/")}},oh=ah,rh=(n("d6fc"),Object(c["a"])(oh,nh,ih,!1,null,null,null)),lh=rh.exports,uh=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-error-boundary",{key:t.plugin,scopedSlots:t._u([{key:"error",fn:function(e){var i=e.error;return n("k-error-view",{},[t._v("\n "+t._s(i.message||i)+"\n ")])}}])},[n("k-"+t.plugin+"-plugin-view",{tag:"component"})],1)},ch=[],dh={props:{plugin:String},beforeRouteEnter:function(t,e,n){n(function(t){t.$store.dispatch("breadcrumb",[])})},watch:{plugin:{handler:function(){this.$store.dispatch("view",this.plugin)},immediate:!0}}},ph=dh,fh=Object(c["a"])(ph,uh,ch,!1,null,null,null),hh=fh.exports,mh=function(){var t=this,e=t.$createElement,n=t._self._c||e;return 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),n("p",[t._t("default")],2)])],1)])},gh=[],vh=(n("d221"),{}),bh=Object(c["a"])(vh,mh,gh,!1,null,null,null),kh=bh.exports,$h=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.issue?n("k-error-view",[t._v("\n "+t._s(t.issue.message)+"\n")]):n("div",{staticClass:"k-file-view"},[n("k-file-preview",{attrs:{file:t.file}}),n("k-view",{staticClass:"k-file-content",attrs:{"data-locked":t.isLocked}},[n("k-header",{attrs:{editable:t.permissions.changeName&&!t.isLocked,tabs:t.tabs,tab:t.tab},on:{edit:function(e){return t.action("rename")}}},[t._v("\n\n "+t._s(t.file.filename)+"\n\n "),n("k-button-group",{attrs:{slot:"left"},slot:"left"},[n("k-button",{attrs:{responsive:!0,icon:"open"},on:{click:function(e){return t.action("download")}}},[t._v("\n "+t._s(t.$t("open"))+"\n ")]),n("k-dropdown",[n("k-button",{attrs:{responsive:!0,disabled:t.isLocked,icon:"cog"},on:{click:function(e){return t.$refs.settings.toggle()}}},[t._v("\n "+t._s(t.$t("settings"))+"\n ")]),n("k-dropdown-content",{ref:"settings",attrs:{options:t.options},on:{action:t.action}})],1),n("k-languages-dropdown")],1),t.file.id?n("k-prev-next",{attrs:{slot:"right",prev:t.prev,next:t.next},slot:"right"}):t._e()],1),t.file.id?n("k-tabs",{key:t.tabsKey,ref:"tabs",attrs:{parent:t.$api.files.url(t.path,t.file.filename),tabs:t.tabs,blueprint:t.file.blueprint.name},on:{tab:function(e){t.tab=e}}}):t._e(),n("k-file-rename-dialog",{ref:"rename",on:{success:t.renamed}}),n("k-file-remove-dialog",{ref:"remove",on:{success:t.deleted}}),n("k-upload",{ref:"upload",attrs:{url:t.uploadApi,accept:t.file.mime,multiple:!1},on:{success:t.uploaded}})],1)],1)},_h=[],yh={computed:{isLocked:function(){return null!==this.$store.getters["form/lock"]}},created:function(){this.fetch(),this.$events.$on("model.reload",this.fetch),this.$events.$on("keydown.left",this.toPrev),this.$events.$on("keydown.right",this.toNext)},destroyed:function(){this.$events.$off("model.reload",this.fetch),this.$events.$off("keydown.left",this.toPrev),this.$events.$off("keydown.right",this.toNext)},methods:{toPrev:function(t){this.prev&&"body"===t.target.localName&&this.$router.push(this.prev.link)},toNext:function(t){this.next&&"body"===t.target.localName&&this.$router.push(this.next.link)}}},xh={mixins:[yh],props:{path:{type:String},filename:{type:String,required:!0}},data:function(){return{name:"",file:{id:null,parent:null,filename:"",url:"",prev:null,next:null,panelIcon:null,panelImage:null,mime:null,content:{}},permissions:{changeName:!1,delete:!1},issue:null,tabs:[],tab:null,options:null}},computed:{uploadApi:function(){return g.api+"/"+this.path+"/files/"+this.filename},prev:function(){if(this.file.prev)return{link:this.$api.files.link(this.path,this.file.prev.filename),tooltip:this.file.prev.filename}},tabsKey:function(){return"file-"+this.file.id+"-tabs"},language:function(){return this.$store.state.languages.current},next:function(){if(this.file.next)return{link:this.$api.files.link(this.path,this.file.next.filename),tooltip:this.file.next.filename}}},watch:{language:function(){this.fetch()},filename:function(){this.fetch()}},methods:{fetch:function(){var t=this;this.$api.files.get(this.path,this.filename,{view:"panel"}).then(function(e){t.file=e,t.file.next=e.nextWithTemplate,t.file.prev=e.prevWithTemplate,t.file.url=e.url,t.name=e.name,t.tabs=e.blueprint.tabs,t.permissions=e.options,t.options=function(e){t.$api.files.options(t.path,t.file.filename).then(function(t){e(t)})},t.$store.dispatch("breadcrumb",t.$api.files.breadcrumb(t.file,t.$route.name)),t.$store.dispatch("title",t.filename),t.$store.dispatch("form/create",{id:"files/"+e.id,api:t.$api.files.link(t.path,t.filename),content:e.content})}).catch(function(e){window.console.error(e),t.issue=e})},action:function(t){switch(t){case"download":window.open(this.file.url);break;case"rename":this.$refs.rename.open(this.path,this.file.filename);break;case"replace":this.$refs.upload.open({url:g.api+"/"+this.$api.files.url(this.path,this.file.filename),accept:this.file.mime});break;case"remove":this.$refs.remove.open(this.path,this.file.filename);break}},deleted:function(){this.path?this.$router.push("/"+this.path):this.$router.push("/site")},renamed:function(t){this.$router.push(this.$api.files.link(this.path,t.filename))},uploaded:function(){this.fetch(),this.$store.dispatch("notification/success",":)")}}},wh=xh,Oh=Object(c["a"])(wh,$h,_h,!1,null,null,null),Ch=Oh.exports,Sh=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.system?n("k-view",{staticClass:"k-installation-view",attrs:{align:"center"}},["install"===t.state?n("form",{on:{submit:function(e){return e.preventDefault(),t.install(e)}}},[n("h1",{staticClass:"k-offscreen"},[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:{type:"submit",icon:"check"}},[t._v(t._s(t.$t("install")))])],1):"completed"===t.state?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):n("div",[t.system.isInstalled?t._e():n("k-headline",[t._v(t._s(t.$t("installation.issues.headline")))]),n("ul",{staticClass:"k-installation-issues"},[!1===t.system.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:{icon:"refresh"},on:{click:t.check}},[n("span",{domProps:{innerHTML:t._s(t.$t("retry"))}})])],1)],1):t._e()},Eh=[],jh={data:function(){return{user:{name:"",email:"",language:"en",password:"",role:"admin"},languages:[],system:null}},computed:{state:function(){return this.system.isOk&&this.system.isInstallable&&!this.system.isInstalled?"install":this.system.isOk&&this.system.isInstallable&&this.system.isInstalled?"completed":void 0},translation:function(){return this.$store.state.translation.current},requirements:function(){return this.system&&this.system.requirements?this.system.requirements:{}},fields:function(){return{name:{label:this.$t("name"),type:"text",icon:"user",autofocus:!0},email:{label:this.$t("email"),type:"email",link:!1,required:!0},password:{label:this.$t("password"),type:"password",placeholder:this.$t("password")+" …",required:!0},language:{label:this.$t("language"),type:"select",options:this.languages,icon:"globe",empty:!1,required:!0}}}},watch:{translation:function(t){this.user.language=t},"user.language":function(t){this.$store.dispatch("translation/activate",t)}},created:function(){this.check()},methods:{install:function(){var t=this;this.$api.system.install(this.user).then(function(e){t.$store.dispatch("user/current",e),t.$store.dispatch("notification/success",t.$t("welcome")+"!"),t.$router.push("/")}).catch(function(e){t.$store.dispatch("notification/error",e)})},check:function(){var t=this;this.$store.dispatch("system/load",!0).then(function(e){!0===e.isInstalled&&e.isReady?t.$router.push("/login"):t.$api.translations.options().then(function(n){t.languages=n,t.system=e,t.$store.dispatch("title",t.$t("view.installation"))})})}}},Th=jh,Ih=(n("146c"),Object(c["a"])(Th,Sh,Eh,!1,null,null,null)),Lh=Ih.exports,qh=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.issue?n("k-error-view",[t._v("\n "+t._s(t.issue.message)+"\n")]):t.ready?n("k-view",{staticClass:"k-login-view",attrs:{align:"center"}},[n("k-login-form")],1):t._e()},Ah=[],Nh=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("form",{staticClass:"k-login-form",attrs:{"data-invalid":t.invalid},on:{submit:function(e){return e.preventDefault(),t.login(e)}}},[n("h1",{staticClass:"k-offscreen"},[t._v(t._s(t.$t("login")))]),n("k-fieldset",{attrs:{novalidate:!0,fields:t.fields},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}}),n("div",{staticClass:"k-login-buttons"},[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),n("k-button",{staticClass:"k-login-button",attrs:{icon:"check",type:"submit"}},[t._v("\n "+t._s(t.$t("login"))+" "),t.isLoading?[t._v("…")]:t._e()],2)],1)],1)},Bh=[],Dh={data:function(){return{invalid:!1,isLoading:!1,user:{email:"",password:"",remember:!1}}},computed:{fields:function(){return{email:{autofocus:!0,label:this.$t("email"),type:"email",required:!0,link:!1},password:{label:this.$t("password"),type:"password",minLength:8,required:!0,autocomplete:"current-password",counter:!1}}}},methods:{login:function(){var t=this;this.invalid=!1,this.isLoading=!0,this.$store.dispatch("user/login",this.user).then(function(){t.$store.dispatch("system/load",!0).then(function(){t.$store.dispatch("notification/success",t.$t("welcome")),t.isLoading=!1})}).catch(function(){t.invalid=!0,t.isLoading=!1})}}},Ph=Dh,Mh=Object(c["a"])(Ph,Nh,Bh,!1,null,null,null),Rh=Mh.exports,zh={components:{"k-login-form":window.panel.plugins.login||Rh},data:function(){return{ready:!1,issue:null}},created:function(){var t=this;this.$store.dispatch("system/load").then(function(e){e.isReady||t.$router.push("/installation"),e.user&&e.user.id&&t.$router.push("/"),t.ready=!0,t.$store.dispatch("title",t.$t("login"))}).catch(function(e){t.issue=e})}},Uh=zh,Fh=(n("24c1"),Object(c["a"])(Uh,qh,Ah,!1,null,null,null)),Hh=Fh.exports,Kh=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.issue?n("k-error-view",[t._v("\n "+t._s(t.issue.message)+"\n")]):n("k-view",{staticClass:"k-page-view",attrs:{"data-locked":t.isLocked}},[n("k-header",{attrs:{tabs:t.tabs,tab:t.tab,editable:t.permissions.changeTitle&&!t.isLocked},on:{edit:function(e){return t.action("rename")}}},[t._v("\n "+t._s(t.page.title)+"\n "),n("k-button-group",{attrs:{slot:"left"},slot:"left"},[t.permissions.preview&&t.page.previewUrl?n("k-button",{attrs:{responsive:!0,link:t.page.previewUrl,target:"_blank",icon:"open"}},[t._v("\n "+t._s(t.$t("open"))+"\n ")]):t._e(),t.status?n("k-button",{class:["k-status-flag","k-status-flag-"+t.page.status],attrs:{disabled:!t.permissions.changeStatus||t.isLocked,icon:!t.permissions.changeStatus||t.isLocked?"protected":"circle",responsive:!0},on:{click:function(e){return t.action("status")}}},[t._v("\n "+t._s(t.status.label)+"\n ")]):t._e(),n("k-dropdown",[n("k-button",{attrs:{responsive:!0,disabled:!0===t.isLocked,icon:"cog"},on:{click:function(e){return t.$refs.settings.toggle()}}},[t._v("\n "+t._s(t.$t("settings"))+"\n ")]),n("k-dropdown-content",{ref:"settings",attrs:{options:t.options},on:{action:t.action}})],1),n("k-languages-dropdown")],1),t.page.id?n("k-prev-next",{attrs:{slot:"right",prev:t.prev,next:t.next},slot:"right"}):t._e()],1),t.page.id?n("k-tabs",{key:t.tabsKey,ref:"tabs",attrs:{parent:t.$api.pages.url(t.page.id),blueprint:t.blueprint,tabs:t.tabs},on:{tab:t.onTab}}):t._e(),n("k-page-rename-dialog",{ref:"rename",on:{success:t.update}}),n("k-page-duplicate-dialog",{ref:"duplicate"}),n("k-page-url-dialog",{ref:"url"}),n("k-page-status-dialog",{ref:"status",on:{success:t.update}}),n("k-page-template-dialog",{ref:"template",on:{success:t.update}}),n("k-page-remove-dialog",{ref:"remove"})],1)},Vh=[],Yh={mixins:[yh],props:{path:{type:String,required:!0}},data:function(){return{page:{title:"",id:null,prev:null,next:null,status:null},blueprint:null,preview:!0,permissions:{changeTitle:!1,changeStatus:!1},icon:"page",issue:null,tab:null,tabs:[],options:null}},computed:{language:function(){return this.$store.state.languages.current},next:function(){if(this.page.next)return{link:this.$api.pages.link(this.page.next.id),tooltip:this.page.next.title}},prev:function(){if(this.page.prev)return{link:this.$api.pages.link(this.page.prev.id),tooltip:this.page.prev.title}},status:function(){return null!==this.page.status?this.page.blueprint.status[this.page.status]:null},tabsKey:function(){return"page-"+this.page.id+"-tabs"}},watch:{language:function(){this.fetch()},path:function(){this.fetch()}},created:function(){this.$events.$on("page.changeSlug",this.update)},destroyed:function(){this.$events.$off("page.changeSlug",this.update)},methods:{action:function(t){switch(t){case"duplicate":this.$refs.duplicate.open(this.page.id);break;case"rename":this.$refs.rename.open(this.page.id);break;case"url":this.$refs.url.open(this.page.id);break;case"status":this.$refs.status.open(this.page.id);break;case"template":this.$refs.template.open(this.page.id);break;case"remove":this.$refs.remove.open(this.page.id);break;default:this.$store.dispatch("notification/error",this.$t("notification.notImplemented"));break}},fetch:function(){var t=this;this.$api.pages.get(this.path,{view:"panel"}).then(function(e){t.page=e,t.blueprint=e.blueprint.name,t.permissions=e.options,t.tabs=e.blueprint.tabs,t.options=function(e){t.$api.pages.options(t.page.id).then(function(t){e(t)})},t.$store.dispatch("breadcrumb",t.$api.pages.breadcrumb(e)),t.$store.dispatch("title",t.page.title),t.$store.dispatch("form/create",{id:"pages/"+t.page.id,api:t.$api.pages.link(t.page.id),content:t.page.content})}).catch(function(e){t.issue=e})},onTab:function(t){this.tab=t},update:function(){this.fetch(),this.$emit("model.update")}}},Wh=Yh,Gh=(n("202d"),Object(c["a"])(Wh,Kh,Vh,!1,null,null,null)),Jh=Gh.exports,Zh=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("k-view",{staticClass:"k-settings-view"},[n("k-header",[t._v("\n "+t._s(t.$t("view.settings"))+"\n ")]),n("section",{staticClass:"k-system-info"},[n("header",[n("k-headline",[t._v("Kirby")])],1),n("ul",{staticClass:"k-system-info-box"},[n("li",[n("dl",[n("dt",[t._v(t._s(t.$t("license")))]),n("dd",[t.license?[t._v("\n "+t._s(t.license)+"\n ")]:n("p",[n("strong",{staticClass:"k-system-unregistered"},[t._v(t._s(t.$t("license.unregistered")))])])],2)])]),n("li",[n("dl",[n("dt",[t._v(t._s(t.$t("version")))]),n("dd",[t._v(t._s(t.$store.state.system.info.version))])])])])]),t.multilang?n("section",{staticClass:"k-languages"},[t.languages.length>0?[n("section",{staticClass:"k-languages-section"},[n("header",[n("k-headline",[t._v(t._s(t.$t("languages.default")))])],1),n("k-collection",{attrs:{items:t.defaultLanguage},on:{action:t.action}})],1),n("section",{staticClass:"k-languages-section"},[n("header",[n("k-headline",[t._v(t._s(t.$t("languages.secondary")))]),n("k-button",{attrs:{icon:"add"},on:{click:function(e){return t.$refs.create.open()}}},[t._v(t._s(t.$t("language.create")))])],1),t.translations.length?n("k-collection",{attrs:{items:t.translations},on:{action:t.action}}):n("k-empty",{attrs:{icon:"globe"},on:{click:function(e){return t.$refs.create.open()}}},[t._v(t._s(t.$t("languages.secondary.empty")))])],1)]:0===t.languages.length?[n("header",[n("k-headline",[t._v(t._s(t.$t("languages")))]),n("k-button",{attrs:{icon:"add"},on:{click:function(e){return t.$refs.create.open()}}},[t._v(t._s(t.$t("language.create")))])],1),n("k-empty",{attrs:{icon:"globe"},on:{click:function(e){return t.$refs.create.open()}}},[t._v(t._s(t.$t("languages.empty")))])]:t._e(),n("k-language-create-dialog",{ref:"create",on:{success:t.fetch}}),n("k-language-update-dialog",{ref:"update",on:{success:t.fetch}}),n("k-language-remove-dialog",{ref:"remove",on:{success:t.fetch}})],2):t._e()],1)},Xh=[],Qh={data:function(){return{languages:[]}},computed:{defaultLanguage:function(){return this.languages.filter(function(t){return t.default})},multilang:function(){return this.$store.state.system.info.multilang},license:function(){return this.$store.state.system.info.license},translations:function(){return this.languages.filter(function(t){return!1===t.default})}},created:function(){this.fetch(),this.$store.dispatch("title",this.$t("view.settings")),this.$store.dispatch("breadcrumb",[])},methods:{fetch:function(){var t=this;!1!==this.multilang?this.$api.get("languages").then(function(e){t.languages=e.data.map(function(n){return{id:n.code,default:n.default,icon:{type:"globe",back:"black"},text:n.name,info:n.code,options:[{icon:"edit",text:t.$t("edit"),click:"update"},{icon:"trash",text:t.$t("delete"),disabled:n.default&&1!==e.data.length,click:"remove"}]}})}):this.languages=[]},action:function(t,e){switch(e){case"update":this.$refs.update.open(t.id);break;case"remove":this.$refs.remove.open(t.id);break}}}},tm=Qh,em=(n("9bd5"),Object(c["a"])(tm,Zh,Xh,!1,null,null,null)),nm=em.exports,im=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.issue?n("k-error-view",[t._v("\n "+t._s(t.issue.message)+"\n")]):n("k-view",{key:"site-view",staticClass:"k-site-view",attrs:{"data-locked":t.isLocked}},[n("k-header",{attrs:{tabs:t.tabs,tab:t.tab,editable:t.permissions.changeTitle&&!t.isLocked},on:{edit:function(e){return t.action("rename")}}},[t._v("\n "+t._s(t.site.title)+"\n "),n("k-button-group",{attrs:{slot:"left"},slot:"left"},[n("k-button",{attrs:{responsive:!0,link:t.site.previewUrl,target:"_blank",icon:"open"}},[t._v("\n "+t._s(t.$t("open"))+"\n ")]),n("k-languages-dropdown")],1)],1),t.site.url?n("k-tabs",{ref:"tabs",attrs:{tabs:t.tabs,blueprint:t.site.blueprint.name,parent:"site"},on:{tab:function(e){t.tab=e}}}):t._e(),n("k-site-rename-dialog",{ref:"rename",on:{success:t.fetch}})],1)},sm=[],am={data:function(){return{site:{title:null,url:null},issue:null,tab:null,tabs:[],options:null,permissions:{changeTitle:!0}}},computed:{isLocked:function(){return null!==this.$store.getters["form/lock"]},language:function(){return this.$store.state.languages.current}},watch:{language:function(){this.fetch()}},created:function(){this.fetch()},methods:{fetch:function(){var t=this;this.$api.site.get({view:"panel"}).then(function(e){t.site=e,t.tabs=e.blueprint.tabs,t.permissions=e.options,t.options=function(e){t.$api.site.options().then(function(t){e(t)})},t.$store.dispatch("breadcrumb",[]),t.$store.dispatch("title",null),t.$store.dispatch("form/create",{id:"site",api:"site",content:e.content})}).catch(function(e){t.issue=e})},action:function(t){switch(t){case"languages":this.$refs.languages.open();break;case"rename":this.$refs.rename.open();break;default:this.$store.dispatch("notification/error",this.$t("notification.notImplemented"));break}}}},om=am,rm=Object(c["a"])(om,im,sm,!1,null,null,null),lm=rm.exports,um=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.issue?n("k-error-view",[t._v("\n "+t._s(t.issue.message)+"\n")]):n("k-view",{staticClass:"k-users-view"},[n("k-header",[t._v("\n "+t._s(t.$t("view.users"))+"\n "),n("k-button-group",{attrs:{slot:"left"},slot:"left"},[n("k-button",{attrs:{disabled:!1===t.$permissions.users.create,icon:"add"},on:{click:function(e){return t.$refs.create.open()}}},[t._v(t._s(t.$t("user.create")))])],1),n("k-button-group",{attrs:{slot:"right"},slot:"right"},[n("k-dropdown",[n("k-button",{attrs:{responsive:!0,icon:"funnel"},on:{click:function(e){return t.$refs.roles.toggle()}}},[t._v("\n "+t._s(t.$t("role"))+": "+t._s(t.role?t.role.text:t.$t("role.all"))+"\n ")]),n("k-dropdown-content",{ref:"roles",attrs:{align:"right"}},[n("k-dropdown-item",{attrs:{icon:"bolt"},on:{click:function(e){return t.filter(!1)}}},[t._v("\n "+t._s(t.$t("role.all"))+"\n ")]),n("hr"),t._l(t.roles,function(e){return n("k-dropdown-item",{key:e.value,attrs:{icon:"bolt"},on:{click:function(n){return t.filter(e)}}},[t._v("\n "+t._s(e.text)+"\n ")])})],2)],1)],1)],1),t.users.length>0?[n("k-collection",{attrs:{items:t.users,pagination:t.pagination},on:{paginate:t.paginate,action:t.action}})]:0===t.total?[n("k-empty",{attrs:{icon:"users"}},[t._v(t._s(t.$t("role.empty")))])]:t._e(),n("k-user-create-dialog",{ref:"create",on:{success:t.fetch}}),n("k-user-email-dialog",{ref:"email",on:{success:t.fetch}}),n("k-user-language-dialog",{ref:"language",on:{success:t.fetch}}),n("k-user-password-dialog",{ref:"password"}),n("k-user-remove-dialog",{ref:"remove",on:{success:t.fetch}}),n("k-user-rename-dialog",{ref:"rename",on:{success:t.fetch}}),n("k-user-role-dialog",{ref:"role",on:{success:t.fetch}})],2)},cm=[],dm={data:function(){return{page:1,limit:20,total:null,users:[],roles:[],issue:null}},computed:{pagination:function(){return{page:this.page,limit:this.limit,total:this.total}},role:function(){var t=this,e=null;return this.$route.params.role&&this.roles.forEach(function(n){n.value===t.$route.params.role&&(e=n)}),e}},watch:{$route:function(){this.fetch()}},created:function(){var t=this;this.$api.roles.options().then(function(e){t.roles=e,t.fetch()})},methods:{fetch:function(){var t=this;this.$store.dispatch("title",this.$t("view.users"));var e={paginate:{page:this.page,limit:this.limit},sortBy:"username asc"};this.role&&(e.filterBy=[{field:"role",operator:"==",value:this.role.value}]),this.$api.users.list(e).then(function(e){t.users=e.data.map(function(e){var n={id:e.id,icon:{type:"user",back:"black"},text:e.name||e.email,info:e.role.title,link:"/users/"+e.id,options:function(n){t.$api.users.options(e.id,"list").then(function(t){return n(t)}).catch(function(e){t.$store.dispatch("notification/error",e)})},image:null};return e.avatar&&(n.image={url:e.avatar.url,cover:!0}),n}),t.role?t.$store.dispatch("breadcrumb",[{link:"/users/role/"+t.role.value,label:t.$t("role")+": "+t.role.text}]):t.$store.dispatch("breadcrumb",[]),t.total=e.pagination.total}).catch(function(e){t.issue=e})},paginate:function(t){this.page=t.page,this.limit=t.limit,this.fetch()},action:function(t,e){switch(e){case"edit":this.$router.push("/users/"+t.id);break;case"email":this.$refs.email.open(t.id);break;case"role":this.$refs.role.open(t.id);break;case"rename":this.$refs.rename.open(t.id);break;case"password":this.$refs.password.open(t.id);break;case"language":this.$refs.language.open(t.id);break;case"remove":this.$refs.remove.open(t.id);break}},filter:function(t){!1===t?this.$router.push("/users"):this.$router.push("/users/role/"+t.value),this.$refs.roles.close()}}},pm=dm,fm=Object(c["a"])(pm,um,cm,!1,null,null,null),hm=fm.exports,mm=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.issue?n("k-error-view",[t._v("\n "+t._s(t.issue.message)+"\n")]):t.ready?n("div",{staticClass:"k-user-view",attrs:{"data-locked":t.isLocked}},[n("div",{staticClass:"k-user-profile"},[n("k-view",[t.avatar?[n("k-dropdown",[n("k-button",{staticClass:"k-user-view-image",attrs:{tooltip:t.$t("avatar"),disabled:t.isLocked},on:{click:function(e){return t.$refs.picture.toggle()}}},[t.avatar?n("k-image",{attrs:{cover:!0,src:t.avatar,ratio:"1/1"}}):t._e()],1),n("k-dropdown-content",{ref:"picture"},[n("k-dropdown-item",{attrs:{icon:"upload"},on:{click:function(e){return t.$refs.upload.open()}}},[t._v("\n "+t._s(t.$t("change"))+"\n ")]),n("k-dropdown-item",{attrs:{icon:"trash"},on:{click:function(e){return t.action("picture.delete")}}},[t._v("\n "+t._s(t.$t("delete"))+"\n ")])],1)],1)]:[n("k-button",{staticClass:"k-user-view-image",attrs:{tooltip:t.$t("avatar")},on:{click:function(e){return t.$refs.upload.open()}}},[n("k-icon",{attrs:{type:"user"}})],1)],n("k-button-group",[n("k-button",{attrs:{disabled:!t.permissions.changeEmail||t.isLocked,icon:"email"},on:{click:function(e){return t.action("email")}}},[t._v(t._s(t.$t("email"))+": "+t._s(t.user.email))]),n("k-button",{attrs:{disabled:!t.permissions.changeRole||t.isLocked,icon:"bolt"},on:{click:function(e){return t.action("role")}}},[t._v(t._s(t.$t("role"))+": "+t._s(t.user.role.title))]),n("k-button",{attrs:{disabled:!t.permissions.changeLanguage||t.isLocked,icon:"globe"},on:{click:function(e){return t.action("language")}}},[t._v(t._s(t.$t("language"))+": "+t._s(t.user.language))])],1)],2)],1),n("k-view",[n("k-header",{attrs:{editable:t.permissions.changeName&&!t.isLocked,tabs:t.tabs,tab:t.tab},on:{edit:function(e){return t.action("rename")}}},[t.user.name&&0!==t.user.name.length?[t._v(t._s(t.user.name))]:n("span",{staticClass:"k-user-name-placeholder"},[t._v(t._s(t.$t("name"))+" …")]),n("k-button-group",{attrs:{slot:"left"},slot:"left"},[n("k-dropdown",[n("k-button",{attrs:{disabled:t.isLocked,icon:"cog"},on:{click:function(e){return t.$refs.settings.toggle()}}},[t._v("\n "+t._s(t.$t("settings"))+"\n ")]),n("k-dropdown-content",{ref:"settings",attrs:{options:t.options},on:{action:t.action}})],1),n("k-languages-dropdown")],1),t.user.id&&"User"===t.$route.name?n("k-prev-next",{attrs:{slot:"right",prev:t.prev,next:t.next},slot:"right"}):t._e()],2),t.user&&t.tabs.length?n("k-tabs",{key:t.tabsKey,ref:"tabs",attrs:{parent:"users/"+t.user.id,blueprint:t.user.blueprint.name,tabs:t.tabs},on:{tab:function(e){t.tab=e}}}):t.ready?n("k-box",{attrs:{text:t.$t("user.blueprint",{role:t.user.role.name}),theme:"info"}}):t._e(),n("k-user-email-dialog",{ref:"email",on:{success:t.fetch}}),n("k-user-language-dialog",{ref:"language",on:{success:t.fetch}}),n("k-user-password-dialog",{ref:"password"}),n("k-user-remove-dialog",{ref:"remove"}),n("k-user-rename-dialog",{ref:"rename",on:{success:t.fetch}}),n("k-user-role-dialog",{ref:"role",on:{success:t.fetch}}),n("k-upload",{ref:"upload",attrs:{url:t.uploadApi,multiple:!1,accept:"image/*"},on:{success:t.uploadedAvatar}})],1)],1):t._e()},gm=[],vm={mixins:[yh],props:{id:{type:String,required:!0}},data:function(){return{tab:null,tabs:[],ready:!1,user:{role:{name:null},name:null,language:null,prev:null,next:null},permissions:{changeEmail:!0,changeName:!0,changeLanguage:!0,changeRole:!0},issue:null,avatar:null,options:null}},computed:{language:function(){return this.$store.state.languages.current},next:function(){if(this.user.next)return{link:this.$api.users.link(this.user.next.id),tooltip:this.user.next.name}},prev:function(){if(this.user.prev)return{link:this.$api.users.link(this.user.prev.id),tooltip:this.user.prev.name}},tabsKey:function(){return"user-"+this.user.id+"-tabs"},uploadApi:function(){return g.api+"/users/"+this.user.id+"/avatar"}},watch:{language:function(){this.fetch()},id:function(){this.fetch()}},methods:{action:function(t){var e=this;switch(t){case"email":this.$refs.email.open(this.user.id);break;case"language":this.$refs.language.open(this.user.id);break;case"password":this.$refs.password.open(this.user.id);break;case"picture.delete":this.$api.users.deleteAvatar(this.id).then(function(){e.$store.dispatch("notification/success",":)"),e.avatar=null});break;case"remove":this.$refs.remove.open(this.user.id);break;case"rename":this.$refs.rename.open(this.user.id);break;case"role":this.$refs.role.open(this.user.id);break;default:this.$store.dispatch("notification/error","Not yet implemented")}},fetch:function(){var t=this;this.$api.users.get(this.id,{view:"panel"}).then(function(e){t.user=e,t.tabs=e.blueprint.tabs,t.ready=!0,t.permissions=e.options,t.options=function(e){t.$api.users.options(t.user.id).then(function(t){e(t)})},e.avatar?t.avatar=e.avatar.url:t.avatar=null,"User"===t.$route.name?t.$store.dispatch("breadcrumb",t.$api.users.breadcrumb(e)):t.$store.dispatch("breadcrumb",[]),t.$store.dispatch("title",t.user.name||t.user.email),t.$store.dispatch("form/create",{id:"users/"+e.id,api:t.$api.users.link(e.id),content:e.content})}).catch(function(e){t.issue=e})},uploadedAvatar:function(){this.$store.dispatch("notification/success",":)"),this.fetch()}}},bm=vm,km=(n("bd96"),Object(c["a"])(bm,mm,gm,!1,null,null,null)),$m=km.exports;C["a"].component("k-dialog",A),C["a"].component("k-error-dialog",R),C["a"].component("k-file-rename-dialog",ut),C["a"].component("k-file-remove-dialog",V),C["a"].component("k-files-dialog",$t),C["a"].component("k-language-create-dialog",Ct),C["a"].component("k-language-remove-dialog",Lt),C["a"].component("k-language-update-dialog",Mt),C["a"].component("k-page-create-dialog",Kt),C["a"].component("k-page-duplicate-dialog",Zt),C["a"].component("k-page-rename-dialog",ue),C["a"].component("k-page-remove-dialog",ie),C["a"].component("k-page-status-dialog",me),C["a"].component("k-page-template-dialog",_e),C["a"].component("k-page-url-dialog",Se),C["a"].component("k-pages-dialog",qe),C["a"].component("k-site-rename-dialog",De),C["a"].component("k-user-create-dialog",Fe),C["a"].component("k-user-email-dialog",Ge),C["a"].component("k-user-language-dialog",en),C["a"].component("k-user-password-dialog",ln),C["a"].component("k-user-remove-dialog",hn),C["a"].component("k-user-rename-dialog",$n),C["a"].component("k-user-role-dialog",Cn),C["a"].component("k-users-dialog",Ln),C["a"].component("k-calendar",Yn),C["a"].component("k-counter",Qn),C["a"].component("k-autocomplete",Pn),C["a"].component("k-form",ai),C["a"].component("k-form-buttons",fi),C["a"].component("k-form-indicator",_i),C["a"].component("k-field",Si),C["a"].component("k-fieldset",qi),C["a"].component("k-input",Mi),C["a"].component("k-upload",Gi),C["a"].component("k-checkbox-input",ns),C["a"].component("k-checkboxes-input",ls),C["a"].component("k-date-input",hs),C["a"].component("k-datetime-input",$s),C["a"].component("k-email-input",Ts),C["a"].component("k-multiselect-input",Bs),C["a"].component("k-number-input",Us),C["a"].component("k-password-input",Vs),C["a"].component("k-radio-input",Xs),C["a"].component("k-range-input",sa),C["a"].component("k-select-input",ca),C["a"].component("k-tags-input",ga),C["a"].component("k-tel-input",$a),C["a"].component("k-text-input",Cs),C["a"].component("k-textarea-input",Ea),C["a"].component("k-time-input",Pa),C["a"].component("k-toggle-input",Ha),C["a"].component("k-url-input",Wa),C["a"].component("k-checkboxes-field",to),C["a"].component("k-date-field",oo),C["a"].component("k-email-field",fo),C["a"].component("k-files-field",$o),C["a"].component("k-headline-field",Co),C["a"].component("k-info-field",Lo),C["a"].component("k-line-field",Do),C["a"].component("k-multiselect-field",Fo),C["a"].component("k-number-field",Go),C["a"].component("k-pages-field",er),C["a"].component("k-password-field",rr),C["a"].component("k-radio-field",fr),C["a"].component("k-range-field",kr),C["a"].component("k-select-field",Or),C["a"].component("k-structure-field",zr),C["a"].component("k-tags-field",Yr),C["a"].component("k-text-field",al),C["a"].component("k-textarea-field",dl),C["a"].component("k-tel-field",Qr),C["a"].component("k-time-field",vl),C["a"].component("k-toggle-field",xl),C["a"].component("k-url-field",jl),C["a"].component("k-users-field",Nl),C["a"].component("k-toolbar",Ul),C["a"].component("k-toolbar-email-dialog",Wl),C["a"].component("k-toolbar-link-dialog",tu),C["a"].component("k-email-field-preview",gu),C["a"].component("k-files-field-preview",ou),C["a"].component("k-pages-field-preview",yu),C["a"].component("k-url-field-preview",pu),C["a"].component("k-users-field-preview",Eu),C["a"].component("k-bar",qu),C["a"].component("k-box",Mu),C["a"].component("k-card",Vu),C["a"].component("k-cards",Xu),C["a"].component("k-collection",sc),C["a"].component("k-column",cc),C["a"].component("k-dropzone",gc),C["a"].component("k-empty",yc),C["a"].component("k-file-preview",Ec),C["a"].component("k-grid",Ac),C["a"].component("k-header",Rc),C["a"].component("k-list",Vc),C["a"].component("k-list-item",Xc),C["a"].component("k-tabs",sd),C["a"].component("k-view",cd),C["a"].component("k-draggable",bd),C["a"].component("k-error-boundary",yd),C["a"].component("k-headline",Ed),C["a"].component("k-icon",Ad),C["a"].component("k-image",Rd),C["a"].component("k-progress",Vd),C["a"].component("k-sort-handle",Zd),C["a"].component("k-text",ip),C["a"].component("k-button",up),C["a"].component("k-button-group",hp),C["a"].component("k-dropdown",kp),C["a"].component("k-dropdown-content",Cp),C["a"].component("k-dropdown-item",Lp),C["a"].component("k-languages-dropdown",Hp),C["a"].component("k-link",Pp),C["a"].component("k-pagination",Jp),C["a"].component("k-prev-next",nf),C["a"].component("k-search",cf),C["a"].component("k-tag",gf),C["a"].component("k-topbar",xf),C["a"].component("k-sections",jf),C["a"].component("k-info-section",Bf),C["a"].component("k-pages-section",Ff),C["a"].component("k-files-section",Gf),C["a"].component("k-fields-section",eh),C["a"].component("k-browser-view",lh),C["a"].component("k-custom-view",hh),C["a"].component("k-error-view",kh),C["a"].component("k-file-view",Ch),C["a"].component("k-installation-view",Lh),C["a"].component("k-login-view",Hh),C["a"].component("k-page-view",Jh),C["a"].component("k-settings-view",nm),C["a"].component("k-site-view",lm),C["a"].component("k-users-view",hm),C["a"].component("k-user-view",$m);var _m={user:function(){return Km.get("auth")},login:function(t){var e={long:t.remember||!1,email:t.email,password:t.password};return Km.post("auth/login",e).then(function(t){return t.user})},logout:function(){return Km.post("auth/logout")}},ym={get:function(t,e,n){return Km.get(this.url(t,e),n).then(function(t){return!0===mt()(t.content)&&(t.content={}),t})},update:function(t,e,n){return Km.patch(this.url(t,e),n)},rename:function(t,e,n){return Km.patch(this.url(t,e,"name"),{name:n})},url:function(t,e,n){var i=t+"/files/"+e;return n&&(i+="/"+n),i},link:function(t,e,n){return"/"+this.url(t,e,n)},delete:function(t,e){return Km.delete(this.url(t,e))},options:function(t,e,n){return Km.get(this.url(t,e),{select:"options"}).then(function(t){var e=t.options,i=[];return"list"===n&&i.push({icon:"open",text:C["a"].i18n.translate("open"),click:"download"}),i.push({icon:"title",text:C["a"].i18n.translate("rename"),click:"rename",disabled:!e.changeName}),i.push({icon:"upload",text:C["a"].i18n.translate("replace"),click:"replace",disabled:!e.replace}),i.push({icon:"trash",text:C["a"].i18n.translate("delete"),click:"remove",disabled:!e.delete}),i})},breadcrumb:function(t,e){var n=null,i=[];switch(e){case"UserFile":i.push({label:t.parent.username,link:Km.users.link(t.parent.id)}),n="users/"+t.parent.id;break;case"SiteFile":n="site";break;case"PageFile":i=t.parents.map(function(t){return{label:t.title,link:Km.pages.link(t.id)}}),n=Km.pages.url(t.parent.id);break}return i.push({label:t.filename,link:this.link(n,t.filename)}),i}},xm={create:function(t,e){return null===t||"/"===t?Km.post("site/children",e):Km.post(this.url(t,"children"),e)},duplicate:function(t,e,n){return Km.post(this.url(t,"duplicate"),{slug:e,children:n.children||!1,files:n.files||!1})},url:function(t,e){var n=null===t?"pages":"pages/"+t.replace(/\//g,"+");return e&&(n+="/"+e),n},link:function(t){return"/"+this.url(t)},get:function(t,e){return Km.get(this.url(t),e).then(function(t){return!0===mt()(t.content)&&(t.content={}),t})},options:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"view";return Km.get(this.url(t),{select:"options"}).then(function(t){var n=t.options,i=[];return"list"===e&&(i.push({click:"preview",icon:"open",text:C["a"].i18n.translate("open"),disabled:!1===n.preview}),i.push("-")),i.push({click:"rename",icon:"title",text:C["a"].i18n.translate("rename"),disabled:!n.changeTitle}),i.push({click:"duplicate",icon:"copy",text:C["a"].i18n.translate("duplicate"),disabled:!n.duplicate}),i.push("-"),i.push({click:"url",icon:"url",text:C["a"].i18n.translate("page.changeSlug"),disabled:!n.changeSlug}),i.push({click:"status",icon:"preview",text:C["a"].i18n.translate("page.changeStatus"),disabled:!n.changeStatus}),i.push({click:"template",icon:"template",text:C["a"].i18n.translate("page.changeTemplate"),disabled:!n.changeTemplate}),i.push("-"),i.push({click:"remove",icon:"trash",text:C["a"].i18n.translate("delete"),disabled:!n.delete}),i})},preview:function(t){return this.get(t,{select:"previewUrl"}).then(function(t){return t.previewUrl})},update:function(t,e){return Km.patch(this.url(t),e)},children:function(t,e){return Km.post(this.url(t,"children/search"),e)},files:function(t,e){return Km.post(this.url(t,"files/search"),e)},delete:function(t,e){return Km.delete(this.url(t),e)},slug:function(t,e){return Km.patch(this.url(t,"slug"),{slug:e})},title:function(t,e){return Km.patch(this.url(t,"title"),{title:e})},template:function(t,e){return Km.patch(this.url(t,"template"),{template:e})},search:function(t,e){return t?Km.post("pages/"+t.replace("/","+")+"/children/search?select=id,title,hasChildren",e):Km.post("site/children/search?select=id,title,hasChildren",e)},status:function(t,e,n){return Km.patch(this.url(t,"status"),{status:e,position:n})},breadcrumb:function(t){var e=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=t.parents.map(function(t){return{label:t.title,link:e.link(t.id)}});return!0===n&&i.push({label:t.title,link:this.link(t.id)}),i}},wm=n("2f62"),Om=n("768b"),Cm={namespaced:!0,state:{models:{},current:null,isDisabled:!1,lock:null,unlock:null},getters:{current:function(t){return t.current},exists:function(t){return function(e){return t.models.hasOwnProperty(e)}},hasChanges:function(t,e){return function(t){return J()(e.model(t).changes).length>0}},id:function(t,e,n){return function(t){return n.languages.current?t+"/"+n.languages.current.code:t}},isCurrent:function(t){return function(e){return t.current===e}},isDisabled:function(t){return!0===t.isDisabled},lock:function(t){return t.lock},model:function(t,e){return function(n){return e.exists(n)?t.models[n]:{originals:{},values:{},changes:{},api:null}}},originals:function(t,e){return function(t){return qr(e.model(t).originals)}},values:function(t,e){return function(n){return n=n||t.current,qr(e.model(n).values)}},unlock:function(t){return t.unlock}},mutations:{CREATE:function(t,e){C["a"].set(t.models,e.id,{api:e.api,originals:qr(e.content),values:qr(e.content),changes:{}})},CURRENT:function(t,e){t.current=e},DELETE_CHANGES:function(t,e){C["a"].set(t.models[e],"changes",{}),C["a"].set(t.models[e],"values",qr(t.models[e].originals)),localStorage.removeItem("kirby$form$"+e)},IS_DISABLED:function(t,e){t.isDisabled=e},LOCK:function(t,e){t.lock=e},MOVE:function(t,e){var n=qr(t.models[e.old]);C["a"].delete(t.models,e.old),C["a"].set(t.models,e.new,n);var i=localStorage.getItem("kirby$form$"+e.old);localStorage.removeItem("kirby$form$"+e.old),localStorage.setItem("kirby$form$"+e.new,i)},REMOVE:function(t,e){C["a"].delete(t.models,e),localStorage.removeItem("kirby$form$"+e)},SET_ORIGINALS:function(t,e){var n=Object(Om["a"])(e,2),i=n[0],s=n[1];t.models[i].originals=qr(s)},SET_VALUES:function(t,e){var n=Object(Om["a"])(e,2),i=n[0],s=n[1];t.models[i].values=qr(s)},UNLOCK:function(t,e){t.unlock=e},UPDATE:function(t,e){var n=Object(Om["a"])(e,3),i=n[0],s=n[1],a=n[2];if(!t.models[i])return!1;a=qr(a),C["a"].set(t.models[i].values,s,a);var o=Lr()(t.models[i].originals[s]),r=Lr()(a);o===r?C["a"].delete(t.models[i].changes,s):C["a"].set(t.models[i].changes,s,!0),localStorage.setItem("kirby$form$"+i,Lr()({api:t.models[i].api,originals:t.models[i].originals,values:t.models[i].values,changes:t.models[i].changes}))}},actions:{create:function(t,e){t.rootState.languages.current&&t.rootState.languages.current.code&&(e.id=t.getters.id(e.id)),(e.id.startsWith("pages/")||e.id.startsWith("site"))&&delete e.content.title,t.commit("CREATE",e),t.commit("CURRENT",e.id);var n=localStorage.getItem("kirby$form$"+e.id);if(n){var i=JSON.parse(n);Km.get(e.api+"/unlock").then(function(n){!0===n.isUnlocked?t.commit("UNLOCK",i.values):i.values&&J()(i.values).forEach(function(n){var s=i.values[n];t.commit("UPDATE",[e.id,n,s])})})}},disable:function(t){t.commit("IS_DISABLED",!0)},enable:function(t){t.commit("IS_DISABLED",!1)},lock:function(t,e){t.commit("LOCK",e)},move:function(t,e){t.commit("MOVE",e)},remove:function(t,e){t.commit("REMOVE",e)},reset:function(t){t.commit("CURRENT",null),t.commit("LOCK",null),t.commit("UNLOCK",null)},revert:function(t,e){var n=t.getters.model(e);return Km.get(n.api,{select:"content"}).then(function(n){(e.startsWith("pages/")||e.startsWith("site"))&&delete n.content.title,t.commit("SET_ORIGINALS",[e,n.content]),t.commit("SET_VALUES",[e,n.content]),t.commit("DELETE_CHANGES",e)})},save:function(t,e){e=e||t.state.current;var n=t.getters.model(e);return(!t.getters.isCurrent(e)||!t.state.isDisabled)&&(t.dispatch("disable"),Km.patch(n.api,n.values).then(function(){t.dispatch("revert",e),t.dispatch("enable")}).catch(function(e){throw t.dispatch("enable"),e}))},unlock:function(t,e){t.commit("UNLOCK",e)},update:function(t,e){var n=Object(Om["a"])(e,3),i=n[0],s=n[1],a=n[2];t.commit("UPDATE",[i,s,a])}}},Sm={namespaced:!0,state:{instance:null,clock:0,step:5,beats:[]},mutations:{ADD:function(t,e){t.beats.push(e)},CLEAR:function(t){clearInterval(t.instance),t.clock=0},CLOCK:function(t){t.clock+=t.step},INITIALIZE:function(t,e){t.instance=e},REMOVE:function(t,e){var n=t.beats.map(function(t){return t.handler}).indexOf(e);-1!==n&&C["a"].delete(t.beats,n)}},actions:{add:function(t,e){e={handler:e[0]||e,interval:e[1]||t.state.step},e.handler(),t.commit("ADD",e),1===t.state.beats.length&&t.dispatch("run")},remove:function(t,e){t.commit("REMOVE",e),t.state.beats.length<1&&t.commit("CLEAR")},run:function(t){t.commit("CLEAR"),t.commit("INITIALIZE",setInterval(function(){t.commit("CLOCK"),t.state.beats.forEach(function(e){t.state.clock%e.interval===0&&e.handler()})},1e3*t.state.step))}}},Em={namespaced:!0,state:{all:[],current:null,default:null},mutations:{SET_ALL:function(t,e){t.all=e.map(function(t){return{code:t.code,name:t.name,default:t.default,direction:t.direction,rules:t.rules}})},SET_CURRENT:function(t,e){t.current=e,e&&e.code&&localStorage.setItem("kirby$language",e.code)},SET_DEFAULT:function(t,e){t.default=e}},actions:{current:function(t,e){t.commit("SET_CURRENT",e)},install:function(t,e){var n=e.filter(function(t){return t.default})[0];t.commit("SET_ALL",e),t.commit("SET_DEFAULT",n);var i=localStorage.getItem("kirby$language");if(i){var s=e.filter(function(t){return t.code===i})[0];if(s)return void t.dispatch("current",s)}t.dispatch("current",n||e[0]||null)},load:function(t){return Km.get("languages").then(function(e){t.dispatch("install",e.data)})}}},jm={timer:null,namespaced:!0,state:{type:null,message:null,details:null,timeout:null},mutations:{SET:function(t,e){t.type=e.type,t.message=e.message,t.details=e.details,t.timeout=e.timeout},UNSET:function(t){t.type=null,t.message=null,t.details=null,t.timeout=null}},actions:{close:function(t){clearTimeout(this.timer),t.commit("UNSET")},open:function(t,e){t.dispatch("close"),t.commit("SET",e),e.timeout&&(this.timer=setTimeout(function(){t.dispatch("close")},e.timeout))},success:function(t,e){"string"===typeof e&&(e={message:e}),t.dispatch("open",Object(f["a"])({type:"success",timeout:4e3},e))},error:function(t,e){"string"===typeof e&&(e={message:e}),t.dispatch("open",Object(f["a"])({type:"error"},e))}}},Tm={namespaced:!0,state:{info:{title:null}},mutations:{SET_INFO:function(t,e){t.info=e},SET_LICENSE:function(t,e){t.info.license=e},SET_TITLE:function(t,e){t.info.title=e}},actions:{title:function(t,e){t.commit("SET_TITLE",e)},register:function(t,e){t.commit("SET_LICENSE",e)},load:function(t,e){return!e&&t.state.info.isReady&&t.rootState.user.current?new vi.a(function(e){e(t.state.info)}):Km.system.info({view:"panel"}).then(function(e){return t.commit("SET_INFO",Object(f["a"])({isReady:e.isInstalled&&e.isOk},e)),e.languages&&t.dispatch("languages/install",e.languages,{root:!0}),t.dispatch("translation/install",e.translation,{root:!0}),t.dispatch("translation/activate",e.translation.id,{root:!0}),e.user&&t.dispatch("user/current",e.user,{root:!0}),t.state.info}).catch(function(e){t.commit("SET_INFO",{isBroken:!0,error:e.message})})}}},Im={namespaced:!0,state:{current:null,installed:[]},mutations:{SET_CURRENT:function(t,e){t.current=e},INSTALL:function(t,e){t.installed[e.id]=e}},actions:{load:function(t,e){return Km.translations.get(e)},install:function(t,e){t.commit("INSTALL",e),C["a"].i18n.add(e.id,e.data)},activate:function(t,e){var n=t.state.installed[e];n?(C["a"].i18n.set(e),t.commit("SET_CURRENT",e),document.dir=n.direction,document.documentElement.lang=e):t.dispatch("load",e).then(function(n){t.dispatch("install",n),t.dispatch("activate",e)})}}},Lm=n("8c4f"),qm=function(t,e,n){Pm.dispatch("system/load").then(function(){var e=Pm.state.user.current;if(!e)return Pm.dispatch("user/visit",t.path),Pm.dispatch("user/logout"),!1;var i=e.permissions.access;return!1===i.panel?(window.location.href=g.site,!1):!1===i[t.meta.view]?(Pm.dispatch("notification/error",{message:C["a"].i18n.translate("error.access.view")}),n("/")):void n()})},Am=[{path:"/",name:"Home",redirect:"/site"},{path:"/browser",name:"Browser",component:C["a"].component("k-browser-view"),meta:{outside:!0}},{path:"/login",component:C["a"].component("k-login-view"),meta:{outside:!0}},{path:"/logout",beforeEnter:function(){J()(localStorage).forEach(function(t){t.startsWith("kirby$form")&&localStorage.removeItem(t)}),Pm.dispatch("user/logout")},meta:{outside:!0}},{path:"/installation",component:C["a"].component("k-installation-view"),meta:{outside:!0}},{path:"/site",name:"Site",meta:{view:"site"},component:C["a"].component("k-site-view"),beforeEnter:qm},{path:"/site/files/:filename",name:"SiteFile",meta:{view:"site"},component:C["a"].component("k-file-view"),beforeEnter:qm,props:function(t){return{path:"site",filename:t.params.filename}}},{path:"/pages/:path/files/:filename",name:"PageFile",meta:{view:"site"},component:C["a"].component("k-file-view"),beforeEnter:qm,props:function(t){return{path:"pages/"+t.params.path,filename:t.params.filename}}},{path:"/users/:path/files/:filename",name:"UserFile",meta:{view:"users"},component:C["a"].component("k-file-view"),beforeEnter:qm,props:function(t){return{path:"users/"+t.params.path,filename:t.params.filename}}},{path:"/pages/:path",name:"Page",meta:{view:"site"},component:C["a"].component("k-page-view"),beforeEnter:qm,props:function(t){return{path:t.params.path}}},{path:"/settings",name:"Settings",meta:{view:"settings"},component:C["a"].component("k-settings-view"),beforeEnter:qm},{path:"/users/role/:role",name:"UsersByRole",meta:{view:"users"},component:C["a"].component("k-users-view"),beforeEnter:qm,props:function(t){return{role:t.params.role}}},{path:"/users",name:"Users",meta:{view:"users"},beforeEnter:qm,component:C["a"].component("k-users-view")},{path:"/users/:id",name:"User",meta:{view:"users"},component:C["a"].component("k-user-view"),beforeEnter:qm,props:function(t){return{id:t.params.id}}},{path:"/account",name:"Account",meta:{view:"account"},component:C["a"].component("k-user-view"),beforeEnter:qm,props:function(){return{id:Pm.state.user.current?Pm.state.user.current.id:null}}},{path:"/plugins/:id",name:"Plugin",meta:{view:"plugin"},props:function(t){return{plugin:t.params.id}},beforeEnter:qm,component:C["a"].component("k-custom-view")},{path:"*",name:"NotFound",beforeEnter:function(t,e,n){n("/")}}];C["a"].use(Lm["a"]);var Nm=new Lm["a"]({mode:"history",routes:Am,url:"/"===g.url?"":g.url});Nm.beforeEach(function(t,e,n){"Browser"!==t.name&&!1===sh.all()&&n("/browser"),Pm.dispatch("view",t.meta.view),t.path!==e.path&&Pm.dispatch("form/reset"),t.meta.outside||Pm.dispatch("user/visit",t.path),n()});var Bm=Nm,Dm={namespaced:!0,state:{current:null,path:null},mutations:{SET_CURRENT:function(t,e){t.current=e,e&&e.permissions?(C["a"].prototype.$user=e,C["a"].prototype.$permissions=e.permissions):(C["a"].prototype.$user=null,C["a"].prototype.$permissions=null)},SET_PATH:function(t,e){t.path=e}},actions:{current:function(t,e){t.commit("SET_CURRENT",e)},language:function(t,e){t.dispatch("translation/activate",e,{root:!0}),t.commit("SET_CURRENT",Object(f["a"])({language:e},t.state.current))},load:function(t){return Km.auth.user().then(function(e){return t.commit("SET_CURRENT",e),e})},login:function(t,e){return Km.auth.login(e).then(function(e){return t.commit("SET_CURRENT",e),t.dispatch("translation/activate",e.language,{root:!0}),Bm.push(t.state.path||"/"),e})},logout:function(t,e){t.commit("SET_CURRENT",null),e?window.location.href=(window.panel.url||"")+"/login":Km.auth.logout().then(function(){Bm.push("/login")}).catch(function(){Bm.push("/login")})},visit:function(t,e){t.commit("SET_PATH",e)}}};C["a"].use(wm["a"]);var Pm=new wm["a"].Store({strict:!1,state:{breadcrumb:[],dialog:null,drag:null,isLoading:!1,search:!1,title:null,view:null},mutations:{SET_BREADCRUMB:function(t,e){t.breadcrumb=e},SET_DIALOG:function(t,e){t.dialog=e},SET_DRAG:function(t,e){t.drag=e},SET_SEARCH:function(t,e){!0===e&&(e={}),t.search=e},SET_TITLE:function(t,e){t.title=e},SET_VIEW:function(t,e){t.view=e},START_LOADING:function(t){t.isLoading=!0},STOP_LOADING:function(t){t.isLoading=!1}},actions:{breadcrumb:function(t,e){t.commit("SET_BREADCRUMB",e)},dialog:function(t,e){t.commit("SET_DIALOG",e)},drag:function(t,e){t.commit("SET_DRAG",e)},isLoading:function(t,e){t.commit(!0===e?"START_LOADING":"STOP_LOADING")},search:function(t,e){t.commit("SET_SEARCH",e)},title:function(t,e){t.commit("SET_TITLE",e),document.title=e||"",t.state.system.info.title&&(document.title+=null!==e?" | "+t.state.system.info.title:t.state.system.info.title)},view:function(t,e){t.commit("SET_VIEW",e)}},modules:{form:Cm,heartbeat:Sm,languages:Em,notification:jm,system:Tm,translation:Im,user:Dm}}),Mm={running:0,request:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];e=Hi()(e||{},{credentials:"same-origin",cache:"no-store",headers:Object(f["a"])({"x-requested-with":"xmlhttprequest","content-type":"application/json"},e.headers)}),Pm.state.languages.current&&(e.headers["x-language"]=Pm.state.languages.current.code),e.headers["x-csrf"]=window.panel.csrf;var s=t+"/"+Lr()(e);return Km.config.onStart(s,i),this.running++,fetch(Km.config.endpoint+"/"+t,e).then(function(t){return t.text()}).then(function(t){try{return JSON.parse(t)}catch(e){throw new Error("The JSON response from the API could not be parsed. Please check your API connection.")}}).then(function(t){if(t.status&&"error"===t.status)throw t;var e=t;return t.data&&t.type&&"model"===t.type&&(e=t.data),n.running--,Km.config.onComplete(s),Km.config.onSuccess(t),e}).catch(function(t){throw n.running--,Km.config.onComplete(s),Km.config.onError(t),t})},get:function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return e&&(t+="?"+J()(e).map(function(t){var n=e[t];return void 0!==n&&null!==n?t+"="+n:null}).filter(function(t){return null!==t}).join("&")),this.request(t,Hi()(n||{},{method:"GET"}),i)},post:function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"POST",s=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return this.request(t,Hi()(n||{},{method:i,body:Lr()(e)}),s)},patch:function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return this.post(t,e,n,"PATCH",i)},delete:function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return this.post(t,e,n,"DELETE",i)}},Rm={list:function(){return Km.get("roles")},get:function(t){return Km.get("roles/"+t)},options:function(){return this.list().then(function(t){return t.data.map(function(t){return{info:t.description||"(".concat(C["a"].i18n.translate("role.description.placeholder"),")"),text:t.title,value:t.name}})})}},zm={info:function(t){return Km.get("system",t)},install:function(t){return Km.post("system/install",t).then(function(t){return t.user})},register:function(t){return Km.post("system/register",t)}},Um={get:function(t){return Km.get("site",t)},update:function(t){return Km.post("site",t)},title:function(t){return Km.patch("site/title",{title:t})},options:function(){return Km.get("site",{select:"options"}).then(function(t){var e=t.options,n=[];return n.push({click:"rename",icon:"title",text:C["a"].i18n.translate("rename"),disabled:!e.changeTitle}),n})},children:function(t){return Km.post("site/children/search",t)},blueprint:function(){return Km.get("site/blueprint")},blueprints:function(){return Km.get("site/blueprints")}},Fm={list:function(){return Km.get("translations")},get:function(t){return Km.get("translations/"+t)},options:function(){var t=[];return this.list().then(function(e){return t=e.data.map(function(t){return{value:t.id,text:t.name}}),t})}},Hm={create:function(t){return Km.post(this.url(),t)},list:function(t){return Km.post(this.url(null,"search"),t)},get:function(t,e){return Km.get(this.url(t),e)},update:function(t,e){return Km.patch(this.url(t),e)},delete:function(t){return Km.delete(this.url(t))},changeEmail:function(t,e){return Km.patch(this.url(t,"email"),{email:e})},changeLanguage:function(t,e){return Km.patch(this.url(t,"language"),{language:e})},changeName:function(t,e){return Km.patch(this.url(t,"name"),{name:e})},changePassword:function(t,e){return Km.patch(this.url(t,"password"),{password:e})},changeRole:function(t,e){return Km.patch(this.url(t,"role"),{role:e})},deleteAvatar:function(t){return Km.delete(this.url(t,"avatar"))},blueprint:function(t){return Km.get(this.url(t,"blueprint"))},breadcrumb:function(t){return[{link:"/users/"+t.id,label:t.username}]},options:function(t){return Km.get(this.url(t),{select:"options"}).then(function(t){var e=t.options,n=[];return n.push({click:"rename",icon:"title",text:C["a"].i18n.translate("user.changeName"),disabled:!e.changeName}),n.push({click:"email",icon:"email",text:C["a"].i18n.translate("user.changeEmail"),disabled:!e.changeEmail}),n.push({click:"role",icon:"bolt",text:C["a"].i18n.translate("user.changeRole"),disabled:!e.changeRole}),n.push({click:"password",icon:"key",text:C["a"].i18n.translate("user.changePassword"),disabled:!e.changePassword}),n.push({click:"language",icon:"globe",text:C["a"].i18n.translate("user.changeLanguage"),disabled:!e.changeLanguage}),n.push({click:"remove",icon:"trash",text:C["a"].i18n.translate("user.delete"),disabled:!e.delete}),n})},url:function(t,e){var n=t?"users/"+t:"users";return e&&(n+="/"+e),n},link:function(t,e){return"/"+this.url(t,e)}},Km=Object(f["a"])({config:{onStart:function(){},onComplete:function(){},onSuccess:function(){},onError:function(t){throw window.console.log(t.message),t}},auth:_m,files:ym,pages:xm,roles:Rm,system:zm,site:Um,translations:Fm,users:Hm},Mm);Km.config.endpoint=g.api,Km.requests=[],Km.config.onStart=function(t,e){!1===e&&Pm.dispatch("isLoading",!0),Km.requests.push(t)},Km.config.onComplete=function(t){Km.requests=Km.requests.filter(function(e){return e!==t}),0===Km.requests.length&&Pm.dispatch("isLoading",!1)},Km.config.onError=function(t){g.debug&&window.console.error(t),403!==t.code||"Unauthenticated"!==t.message&&"access.panel"!==t.key||Pm.dispatch("user/logout",!0)};var Vm=setInterval(Km.auth.user,3e5);Km.config.onSuccess=function(){clearInterval(Vm),Vm=setInterval(Km.auth.user,3e5)},C["a"].prototype.$api=Km,C["a"].config.errorHandler=function(t){g.debug&&window.console.error(t),Pm.dispatch("notification/error",{message:t.message||"An error occurred. Please reload the panel"})},window.panel=window.panel||{},window.panel.error=function(t,e){g.debug&&window.console.error(t+": "+e),Pm.dispatch("error",t+". See the console for more information.")};var Ym=n("f2f3");C["a"].use(Ym["a"].plugin,Pm);var Wm=n("2d1f"),Gm=n.n(Wm),Jm={};for(var Zm in C["a"].options.components)Jm[Zm]=C["a"].options.components[Zm];var Xm=function(t,e){e.template||e.render||e.extends?(e.extends&&"string"===typeof e.extends&&(e.extends=Jm[e.extends],e.template&&(e.render=null)),e.mixins&&(e.mixins=e.mixins.map(function(t){return"string"===typeof t?Jm[t]:t})),Jm[t]&&window.console.warn('Plugin is replacing "'.concat(t,'"')),C["a"].component(t,e)):Pm.dispatch("notification/error",'Neither template or render method provided nor extending a component when loading plugin component "'.concat(t,'". The component has not been registered.'))};Gm()(window.panel.plugins.components).forEach(function(t){var e=Object(Om["a"])(t,2),n=e[0],i=e[1];Xm(n,i)}),Gm()(window.panel.plugins.fields).forEach(function(t){var e=Object(Om["a"])(t,2),n=e[0],i=e[1];Xm(n,i)}),Gm()(window.panel.plugins.sections).forEach(function(t){var e=Object(Om["a"])(t,2),n=e[0],i=e[1];Xm(n,Object(f["a"])({},i,{mixins:[Lf].concat(i.mixins||[])}))}),Gm()(window.panel.plugins.views).forEach(function(t){var e=Object(Om["a"])(t,2),n=e[0],i=e[1];if(!i.component)return Pm.dispatch("notification/error",'No view component provided when loading view "'.concat(n,'". The view has not been registered.')),void delete window.panel.plugins.views[n];i.link="/plugins/"+n,void 0===i.icon&&(i.icon="page"),void 0===i.menu&&(i.menu=!0),window.panel.plugins.views[n]={link:i.link,icon:i.icon,menu:i.menu},C["a"].component("k-"+n+"-plugin-view",i.component)}),window.panel.plugins.use.forEach(function(t){C["a"].use(t)}),C["a"].use(y),C["a"].use(O),C["a"].use(x),C["a"].use(E.a),C["a"].config.productionTip=!1,C["a"].config.devtools=!0,new C["a"]({router:Bm,store:Pm,created:function(){var t=this;window.panel.app=this,window.panel.plugins.created.forEach(function(e){e(t)})},render:function(t){return t($)}}).$mount("#app")},5714:function(t,e,n){},"580a":function(t,e,n){"use strict";var i=n("61ab"),s=n.n(i);s.a},"589a":function(t,e,n){},"58e5":function(t,e,n){},"5ab5":function(t,e,n){},"5aee":function(t,e,n){"use strict";var i=n("04b2"),s=n.n(i);s.a},"5b23":function(t,e,n){"use strict";var i=n("9798"),s=n.n(i);s.a},"5c0b":function(t,e,n){"use strict";var i=n("5e27"),s=n.n(i);s.a},"5d33":function(t,e,n){"use strict";var i=n("2246"),s=n.n(i);s.a},"5e27":function(t,e,n){},"5f12":function(t,e,n){},6018:function(t,e,n){"use strict";var i=n("e30b"),s=n.n(i);s.a},"61ab":function(t,e,n){},"64e6":function(t,e,n){},"65a9":function(t,e,n){},"696b5":function(t,e,n){"use strict";var i=n("0cdc"),s=n.n(i);s.a},"6a18":function(t,e,n){"use strict";var i=n("de8a"),s=n.n(i);s.a},"6ab3":function(t,e,n){"use strict";var i=n("784e"),s=n.n(i);s.a},"6ab9":function(t,e,n){},"6b7f":function(t,e,n){},"6bcd":function(t,e,n){"use strict";var i=n("9e0a"),s=n.n(i);s.a},"6f7b":function(t,e,n){"use strict";var i=n("5ab5"),s=n.n(i);s.a},7075:function(t,e,n){},"718c":function(t,e,n){"use strict";var i=n("773d"),s=n.n(i);s.a},7568:function(t,e,n){"use strict";var i=n("4150"),s=n.n(i);s.a},"75cd":function(t,e,n){},7737:function(t,e,n){"use strict";var i=n("ca19"),s=n.n(i);s.a},"773d":function(t,e,n){},"778b":function(t,e,n){},7797:function(t,e,n){},"784e":function(t,e,n){},"7a7d":function(t,e,n){"use strict";var i=n("65a9"),s=n.n(i);s.a},"7d2d":function(t,e,n){},"7d5d":function(t,e,n){"use strict";var i=n("6ab9"),s=n.n(i);s.a},"7dc7":function(t,e,n){"use strict";var i=n("eb17"),s=n.n(i);s.a},"7e0c":function(t,e,n){},"7e85":function(t,e,n){"use strict";var i=n("d1c5"),s=n.n(i);s.a},"7f6e":function(t,e,n){"use strict";var i=n("4364"),s=n.n(i);s.a},"862b":function(t,e,n){"use strict";var i=n("589a"),s=n.n(i);s.a},"893d":function(t,e,n){"use strict";var i=n("abb3"),s=n.n(i);s.a},"8ae6":function(t,e,n){},"8c28":function(t,e,n){"use strict";var i=n("3d5b"),s=n.n(i);s.a},"8e4d":function(t,e,n){},"910b":function(t,e,n){},"957b":function(t,e,n){},9749:function(t,e,n){},"977f":function(t,e,n){"use strict";var i=n("b7f5"),s=n.n(i);s.a},9798:function(t,e,n){},9799:function(t,e,n){"use strict";var i=n("4fe0"),s=n.n(i);s.a},9811:function(t,e,n){},"98a1":function(t,e,n){"use strict";var i=n("f0cb"),s=n.n(i);s.a},"9bd5":function(t,e,n){"use strict";var i=n("64e6"),s=n.n(i);s.a},"9df7":function(t,e,n){},"9e0a":function(t,e,n){},"9e26":function(t,e,n){"use strict";var i=n("a440"),s=n.n(i);s.a},a134:function(t,e,n){"use strict";var i=n("4390"),s=n.n(i);s.a},a440:function(t,e,n){},a567:function(t,e,n){"use strict";var i=n("c0b5"),s=n.n(i);s.a},a5f3:function(t,e,n){"use strict";var i=n("43f4"),s=n.n(i);s.a},a66d:function(t,e,n){"use strict";var i=n("2eb5"),s=n.n(i);s.a},abb3:function(t,e,n){},ac27:function(t,e,n){"use strict";var i=n("3c9d"),s=n.n(i);s.a},b0d6:function(t,e,n){"use strict";var i=n("d31d"),s=n.n(i);s.a},b37e:function(t,e,n){},b3c3:function(t,e,n){},b5d2:function(t,e,n){"use strict";var i=n("ed7b"),s=n.n(i);s.a},b746:function(t,e,n){"use strict";var i=n("7e0c"),s=n.n(i);s.a},b7f5:function(t,e,n){},ba8f:function(t,e,n){"use strict";var i=n("9749"),s=n.n(i);s.a},bb41:function(t,e,n){"use strict";var i=n("ceb4"),s=n.n(i);s.a},bd96:function(t,e,n){"use strict";var i=n("d6a4"),s=n.n(i);s.a},bf53:function(t,e,n){"use strict";var i=n("3c80"),s=n.n(i);s.a},c0b5:function(t,e,n){},c119:function(t,e,n){"use strict";var i=n("4b49"),s=n.n(i);s.a},c7c8:function(t,e,n){"use strict";var i=n("1be2"),s=n.n(i);s.a},c857:function(t,e,n){"use strict";var i=n("7d2d"),s=n.n(i);s.a},c9cb:function(t,e,n){"use strict";var i=n("b37e"),s=n.n(i);s.a},ca19:function(t,e,n){},ca3a:function(t,e,n){},cb8f:function(t,e,n){"use strict";var i=n("8e4d"),s=n.n(i);s.a},cca8:function(t,e,n){"use strict";var i=n("18b7"),s=n.n(i);s.a},ceb4:function(t,e,n){},d0c1:function(t,e,n){"use strict";var i=n("9df7"),s=n.n(i);s.a},d0e7:function(t,e,n){},d1c5:function(t,e,n){},d221:function(t,e,n){"use strict";var i=n("6b7f"),s=n.n(i);s.a},d31d:function(t,e,n){},d6a4:function(t,e,n){},d6c1:function(t,e,n){},d6fc:function(t,e,n){"use strict";var i=n("08ec"),s=n.n(i);s.a},d9c4:function(t,e,n){},daa8:function(t,e,n){"use strict";var i=n("e60b"),s=n.n(i);s.a},db92:function(t,e,n){},ddfd:function(t,e,n){"use strict";var i=n("4dc8"),s=n.n(i);s.a},de8a:function(t,e,n){},df0d:function(t,e,n){"use strict";var i=n("3ab9"),s=n.n(i);s.a},e30b:function(t,e,n){},e60b:function(t,e,n){},e697:function(t,e,n){},eb17:function(t,e,n){},ec72:function(t,e,n){},ed7b:function(t,e,n){},ee15:function(t,e,n){"use strict";var i=n("fd81"),s=n.n(i);s.a},f0cb:function(t,e,n){},f56d:function(t,e,n){"use strict";var i=n("75cd"),s=n.n(i);s.a},f5e3:function(t,e,n){},f8a7:function(t,e,n){"use strict";var i=n("db92"),s=n.n(i);s.a},f95f:function(t,e,n){"use strict";var i=n("5f12"),s=n.n(i);s.a},fa6a:function(t,e,n){"use strict";var i=n("778b"),s=n.n(i);s.a},fb1a:function(t,e,n){},fc0f:function(t,e,n){"use strict";var i=n("424a"),s=n.n(i);s.a},fd81:function(t,e,n){},ff6d:function(t,e,n){},fffc:function(t,e,n){}}); \ No newline at end of file diff --git a/kirby/panel/dist/js/plugins.js b/kirby/panel/dist/js/plugins.js index 271a1f1..08363d7 100755 --- a/kirby/panel/dist/js/plugins.js +++ b/kirby/panel/dist/js/plugins.js @@ -2,6 +2,7 @@ window.panel = window.panel || {}; window.panel.plugins = { components: {}, + created: [], fields: {}, sections: {}, routes: [], @@ -30,10 +31,21 @@ window.panel.plugin = function (plugin, parts) { window.panel.plugins["use"].push(options); }); + // created callback + if (parts["created"]) { + window.panel.plugins["created"].push(parts["created"]); + } + // Views resolve(parts, "views", function (name, options) { window.panel.plugins["views"][name] = options; }); + + // Login + if (parts.login) { + window.panel.plugins.login = parts.login; + } + }; function resolve(object, type, callback) { diff --git a/kirby/panel/dist/js/vendor.js b/kirby/panel/dist/js/vendor.js index ae5af26..f0d6890 100755 --- a/kirby/panel/dist/js/vendor.js +++ b/kirby/panel/dist/js/vendor.js @@ -1,4 +1,4 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-vendors"],{"0029":function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},"0185":function(t,e,n){var r=n("e5fa");t.exports=function(t){return Object(r(t))}},"01f9":function(t,e,n){"use strict";var r=n("2d00"),o=n("5ca1"),i=n("2aba"),a=n("32e9"),c=n("84f2"),s=n("41a0"),u=n("7f20"),f=n("38fd"),l=n("2b4c")("iterator"),p=!([].keys&&"next"in[].keys()),d="@@iterator",h="keys",v="values",y=function(){return this};t.exports=function(t,e,n,g,m,b,_){s(n,e,g);var w,x,O,S=function(t){if(!p&&t in k)return k[t];switch(t){case h:return function(){return new n(this,t)};case v:return function(){return new n(this,t)}}return function(){return new n(this,t)}},$=e+" Iterator",A=m==v,C=!1,k=t.prototype,E=k[l]||k[d]||m&&k[m],M=E||S(m),j=m?A?S("entries"):M:void 0,T="Array"==e&&k.entries||E;if(T&&(O=f(T.call(new t)),O!==Object.prototype&&O.next&&(u(O,$,!0),r||"function"==typeof O[l]||a(O,l,y))),A&&E&&E.name!==v&&(C=!0,M=function(){return E.call(this)}),r&&!_||!p&&!C&&k[l]||a(k,l,M),c[e]=M,c[$]=y,m)if(w={values:A?M:S(v),keys:b?M:S(h),entries:j},_)for(x in w)x in k||i(k,x,w[x]);else o(o.P+o.F*(p||C),e,w);return w}},"0234":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=Object.assign||function(t){for(var e=1;e=u?t?"":void 0:(i=c.charCodeAt(s),i<55296||i>56319||s+1===u||(a=c.charCodeAt(s+1))<56320||a>57343?t?c.charAt(s):i:t?c.slice(s,s+2):a-56320+(i-55296<<10)+65536)}}},"0390":function(t,e,n){"use strict";var r=n("02f4")(!0);t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},"03ca":function(t,e,n){"use strict";var r=n("f2fe");function o(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r}),this.resolve=r(e),this.reject=r(n)}t.exports.f=function(t){return new o(t)}},"04cf":function(t,e,n){var r=n("4a89"),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},"08c1":function(t,e,n){"use strict";var r,o,i,a,c=n("e6a1"),s=n("b808"),u=n("a9f2"),f=n("a274"),l=n("569f"),p=n("ab4c"),d=n("9184"),h=n("8115"),v=n("88b8"),y=n("1aa7"),g=n("1ad4").set,m=n("a24c")(),b=n("cc20"),_=n("73c3"),w=n("4b9e"),x=n("1c08"),O="Promise",S=s.TypeError,$=s.process,A=$&&$.versions,C=A&&A.v8||"",k=s[O],E="process"==f($),M=function(){},j=o=b.f,T=!!function(){try{var t=k.resolve(1),e=(t.constructor={})[n("b67f")("species")]=function(t){t(M,M)};return(E||"function"==typeof PromiseRejectionEvent)&&t.then(M)instanceof e&&0!==C.indexOf("6.6")&&-1===w.indexOf("Chrome/66")}catch(r){}}(),P=function(t){var e;return!(!p(t)||"function"!=typeof(e=t.then))&&e},D=function(t,e){if(!t._n){t._n=!0;var n=t._c;m(function(){var r=t._v,o=1==t._s,i=0,a=function(e){var n,i,a,c=o?e.ok:e.fail,s=e.resolve,u=e.reject,f=e.domain;try{c?(o||(2==t._h&&N(t),t._h=1),!0===c?n=r:(f&&f.enter(),n=c(r),f&&(f.exit(),a=!0)),n===e.promise?u(S("Promise-chain cycle")):(i=P(n))?i.call(n,s,u):s(n)):u(r)}catch(l){f&&!a&&f.exit(),u(l)}};while(n.length>i)a(n[i++]);t._c=[],t._n=!1,e&&!t._h&&L(t)})}},L=function(t){g.call(s,function(){var e,n,r,o=t._v,i=I(t);if(i&&(e=_(function(){E?$.emit("unhandledRejection",o,t):(n=s.onunhandledrejection)?n({promise:t,reason:o}):(r=s.console)&&r.error&&r.error("Unhandled promise rejection",o)}),t._h=E||I(t)?2:1),t._a=void 0,i&&e.e)throw e.v})},I=function(t){return 1!==t._h&&0===(t._a||t._c).length},N=function(t){g.call(s,function(){var e;E?$.emit("rejectionHandled",t):(e=s.onrejectionhandled)&&e({promise:t,reason:t._v})})},R=function(t){var e=this;e._d||(e._d=!0,e=e._w||e,e._v=t,e._s=2,e._a||(e._a=e._c.slice()),D(e,!0))},F=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw S("Promise can't be resolved itself");(e=P(t))?m(function(){var r={_w:n,_d:!1};try{e.call(t,u(F,r,1),u(R,r,1))}catch(o){R.call(r,o)}}):(n._v=t,n._s=1,D(n,!1))}catch(r){R.call({_w:n,_d:!1},r)}}};T||(k=function(t){h(this,k,O,"_h"),d(t),r.call(this);try{t(u(F,this,1),u(R,this,1))}catch(e){R.call(this,e)}},r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},r.prototype=n("9faf")(k.prototype,{then:function(t,e){var n=j(y(this,k));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=E?$.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&D(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new r;this.promise=t,this.resolve=u(F,t,1),this.reject=u(R,t,1)},b.f=j=function(t){return t===k||t===a?new i(t):o(t)}),l(l.G+l.W+l.F*!T,{Promise:k}),n("aab6")(k,O),n("0ec0")(O),a=n("ca38")[O],l(l.S+l.F*!T,O,{reject:function(t){var e=j(this),n=e.reject;return n(t),e.promise}}),l(l.S+l.F*(c||!T),O,{resolve:function(t){return x(c&&this===a?k:this,t)}}),l(l.S+l.F*!(T&&n("2299")(function(t){k.all(t)["catch"](M)})),O,{all:function(t){var e=this,n=j(e),r=n.resolve,o=n.reject,i=_(function(){var n=[],i=0,a=1;v(t,!1,function(t){var c=i++,s=!1;n.push(void 0),a++,e.resolve(t).then(function(t){s||(s=!0,n[c]=t,--a||r(n))},o)}),--a||r(n)});return i.e&&o(i.v),n.promise},race:function(t){var e=this,n=j(e),r=n.reject,o=_(function(){v(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return o.e&&r(o.v),n.promise}})},"0965":function(t,e,n){n("384f"),t.exports=n("a7d3").parseFloat},"0a0a":function(t,e,n){var r=n("da3c"),o=n("a7d3"),i=n("b457"),a=n("fda1"),c=n("3adc").f;t.exports=function(t){var e=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||c(e,t,{value:a.f(t)})}},"0a49":function(t,e,n){var r=n("9b43"),o=n("626a"),i=n("4bf8"),a=n("9def"),c=n("cd1c");t.exports=function(t,e){var n=1==t,s=2==t,u=3==t,f=4==t,l=6==t,p=5==t||l,d=e||c;return function(e,c,h){for(var v,y,g=i(e),m=o(g),b=r(c,h,3),_=a(m.length),w=0,x=n?d(e,_):s?d(e,0):void 0;_>w;w++)if((p||w in m)&&(v=m[w],y=b(v,w,g),t))if(n)x[w]=y;else if(y)switch(t){case 3:return!0;case 5:return v;case 6:return w;case 2:x.push(v)}else if(f)return!1;return l?-1:u||f?f:x}}},"0a91":function(t,e,n){n("b42c"),n("93c4"),t.exports=n("b77f")},"0bfb":function(t,e,n){"use strict";var r=n("cb7c");t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},"0d58":function(t,e,n){var r=n("ce10"),o=n("e11e");t.exports=Object.keys||function(t){return r(t,o)}},"0ec0":function(t,e,n){"use strict";var r=n("b808"),o=n("e4e1"),i=n("45e2"),a=n("b67f")("species");t.exports=function(t){var e=r[t];i&&e&&!e[a]&&o.f(e,a,{configurable:!0,get:function(){return this}})}},"0f4a":function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},"0f89":function(t,e,n){var r=n("6f8a");t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},"103a":function(t,e,n){var r=n("da3c").document;t.exports=r&&r.documentElement},1169:function(t,e,n){var r=n("2d95");t.exports=Array.isArray||function(t){return"Array"==r(t)}},"11e9":function(t,e,n){var r=n("52a7"),o=n("4630"),i=n("6821"),a=n("6a99"),c=n("69a8"),s=n("c69a"),u=Object.getOwnPropertyDescriptor;e.f=n("9e1e")?u:function(t,e){if(t=i(t),e=a(e,!0),s)try{return u(t,e)}catch(n){}if(c(t,e))return o(!r.f.call(t,e),t[e])}},"11ff":function(t,e,n){var r=n("da3c").parseFloat,o=n("633a").trim;t.exports=1/r(n("702a")+"-0")!==-1/0?function(t){var e=o(String(t),3),n=r(e);return 0===n&&"-"==e.charAt(0)?-0:n}:r},"12fd":function(t,e,n){var r=n("6f8a"),o=n("da3c").document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},"12fd9":function(t,e){},1495:function(t,e,n){var r=n("86cc"),o=n("cb7c"),i=n("0d58");t.exports=n("9e1e")?Object.defineProperties:function(t,e){o(t);var n,a=i(e),c=a.length,s=0;while(c>s)r.f(t,n=a[s++],e[n]);return t}},"14c6":function(t,e,n){"use strict";var r=n("3bb1"),o=n("b5cb"),i=n("a638"),a=n("58b9");t.exports=n("fa2d")(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},"16e7":function(t,e,n){var r=n("d13f"),o=n("7704");r(r.G+r.F*(parseInt!=o),{parseInt:o})},1938:function(t,e,n){var r=n("d13f");r(r.S,"Array",{isArray:n("b5aa")})},"196c":function(t,e){t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},1980:function(t,e,n){(function(e,r){t.exports=r(n("53fe"))})("undefined"!==typeof self&&self,function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="fb15")}({"02f4":function(t,e,n){var r=n("4588"),o=n("be13");t.exports=function(t){return function(e,n){var i,a,c=String(o(e)),s=r(n),u=c.length;return s<0||s>=u?t?"":void 0:(i=c.charCodeAt(s),i<55296||i>56319||s+1===u||(a=c.charCodeAt(s+1))<56320||a>57343?t?c.charAt(s):i:t?c.slice(s,s+2):a-56320+(i-55296<<10)+65536)}}},"0390":function(t,e,n){"use strict";var r=n("02f4")(!0);t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},"07e3":function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},"0bfb":function(t,e,n){"use strict";var r=n("cb7c");t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},"0fc9":function(t,e,n){var r=n("3a38"),o=Math.max,i=Math.min;t.exports=function(t,e){return t=r(t),t<0?o(t+e,0):i(t,e)}},1654:function(t,e,n){"use strict";var r=n("71c1")(!0);n("30f1")(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},1691:function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},"1af6":function(t,e,n){var r=n("63b6");r(r.S,"Array",{isArray:n("9003")})},"1bc3":function(t,e,n){var r=n("f772");t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},"1ec9":function(t,e,n){var r=n("f772"),o=n("e53d").document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},"20fd":function(t,e,n){"use strict";var r=n("d9f6"),o=n("aebd");t.exports=function(t,e,n){e in t?r.f(t,e,o(0,n)):t[e]=n}},"214f":function(t,e,n){"use strict";n("b0c5");var r=n("2aba"),o=n("32e9"),i=n("79e5"),a=n("be13"),c=n("2b4c"),s=n("520a"),u=c("species"),f=!i(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")}),l=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();t.exports=function(t,e,n){var p=c(t),d=!i(function(){var e={};return e[p]=function(){return 7},7!=""[t](e)}),h=d?!i(function(){var e=!1,n=/a/;return n.exec=function(){return e=!0,null},"split"===t&&(n.constructor={},n.constructor[u]=function(){return n}),n[p](""),!e}):void 0;if(!d||!h||"replace"===t&&!f||"split"===t&&!l){var v=/./[p],y=n(a,p,""[t],function(t,e,n,r,o){return e.exec===s?d&&!o?{done:!0,value:v.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}),g=y[0],m=y[1];r(String.prototype,t,g),o(RegExp.prototype,p,2==e?function(t,e){return m.call(t,this,e)}:function(t){return m.call(t,this)})}}},"230e":function(t,e,n){var r=n("d3f4"),o=n("7726").document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},"23c6":function(t,e,n){var r=n("2d95"),o=n("2b4c")("toStringTag"),i="Arguments"==r(function(){return arguments}()),a=function(t,e){try{return t[e]}catch(n){}};t.exports=function(t){var e,n,c;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=a(e=Object(t),o))?n:i?r(e):"Object"==(c=r(e))&&"function"==typeof e.callee?"Arguments":c}},"241e":function(t,e,n){var r=n("25eb");t.exports=function(t){return Object(r(t))}},"25eb":function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},"294c":function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},"2aba":function(t,e,n){var r=n("7726"),o=n("32e9"),i=n("69a8"),a=n("ca5a")("src"),c=n("fa5b"),s="toString",u=(""+c).split(s);n("8378").inspectSource=function(t){return c.call(t)},(t.exports=function(t,e,n,c){var s="function"==typeof n;s&&(i(n,"name")||o(n,"name",e)),t[e]!==n&&(s&&(i(n,a)||o(n,a,t[e]?""+t[e]:u.join(String(e)))),t===r?t[e]=n:c?t[e]?t[e]=n:o(t,e,n):(delete t[e],o(t,e,n)))})(Function.prototype,s,function(){return"function"==typeof this&&this[a]||c.call(this)})},"2b4c":function(t,e,n){var r=n("5537")("wks"),o=n("ca5a"),i=n("7726").Symbol,a="function"==typeof i,c=t.exports=function(t){return r[t]||(r[t]=a&&i[t]||(a?i:o)("Symbol."+t))};c.store=r},"2d00":function(t,e){t.exports=!1},"2d95":function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},"2fdb":function(t,e,n){"use strict";var r=n("5ca1"),o=n("d2c8"),i="includes";r(r.P+r.F*n("5147")(i),"String",{includes:function(t){return!!~o(this,t,i).indexOf(t,arguments.length>1?arguments[1]:void 0)}})},"30f1":function(t,e,n){"use strict";var r=n("b8e3"),o=n("63b6"),i=n("9138"),a=n("35e8"),c=n("481b"),s=n("8f60"),u=n("45f2"),f=n("53e2"),l=n("5168")("iterator"),p=!([].keys&&"next"in[].keys()),d="@@iterator",h="keys",v="values",y=function(){return this};t.exports=function(t,e,n,g,m,b,_){s(n,e,g);var w,x,O,S=function(t){if(!p&&t in k)return k[t];switch(t){case h:return function(){return new n(this,t)};case v:return function(){return new n(this,t)}}return function(){return new n(this,t)}},$=e+" Iterator",A=m==v,C=!1,k=t.prototype,E=k[l]||k[d]||m&&k[m],M=E||S(m),j=m?A?S("entries"):M:void 0,T="Array"==e&&k.entries||E;if(T&&(O=f(T.call(new t)),O!==Object.prototype&&O.next&&(u(O,$,!0),r||"function"==typeof O[l]||a(O,l,y))),A&&E&&E.name!==v&&(C=!0,M=function(){return E.call(this)}),r&&!_||!p&&!C&&k[l]||a(k,l,M),c[e]=M,c[$]=y,m)if(w={values:A?M:S(v),keys:b?M:S(h),entries:j},_)for(x in w)x in k||i(k,x,w[x]);else o(o.P+o.F*(p||C),e,w);return w}},"32a6":function(t,e,n){var r=n("241e"),o=n("c3a1");n("ce7e")("keys",function(){return function(t){return o(r(t))}})},"32e9":function(t,e,n){var r=n("86cc"),o=n("4630");t.exports=n("9e1e")?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},"32fc":function(t,e,n){var r=n("e53d").document;t.exports=r&&r.documentElement},"335c":function(t,e,n){var r=n("6b4c");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},"355d":function(t,e){e.f={}.propertyIsEnumerable},"35e8":function(t,e,n){var r=n("d9f6"),o=n("aebd");t.exports=n("8e60")?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},"36c3":function(t,e,n){var r=n("335c"),o=n("25eb");t.exports=function(t){return r(o(t))}},3702:function(t,e,n){var r=n("481b"),o=n("5168")("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||i[o]===t)}},"3a38":function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},"40c3":function(t,e,n){var r=n("6b4c"),o=n("5168")("toStringTag"),i="Arguments"==r(function(){return arguments}()),a=function(t,e){try{return t[e]}catch(n){}};t.exports=function(t){var e,n,c;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=a(e=Object(t),o))?n:i?r(e):"Object"==(c=r(e))&&"function"==typeof e.callee?"Arguments":c}},4588:function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},"45f2":function(t,e,n){var r=n("d9f6").f,o=n("07e3"),i=n("5168")("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},4630:function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"469f":function(t,e,n){n("6c1c"),n("1654"),t.exports=n("7d7b")},"481b":function(t,e){t.exports={}},"4aa6":function(t,e,n){t.exports=n("dc62")},"4bf8":function(t,e,n){var r=n("be13");t.exports=function(t){return Object(r(t))}},"4ee1":function(t,e,n){var r=n("5168")("iterator"),o=!1;try{var i=[7][r]();i["return"]=function(){o=!0},Array.from(i,function(){throw 2})}catch(a){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i=[7],c=i[r]();c.next=function(){return{done:n=!0}},i[r]=function(){return c},t(i)}catch(a){}return n}},"50ed":function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},5147:function(t,e,n){var r=n("2b4c")("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,!"/./"[t](e)}catch(o){}}return!0}},5168:function(t,e,n){var r=n("dbdb")("wks"),o=n("62a0"),i=n("e53d").Symbol,a="function"==typeof i,c=t.exports=function(t){return r[t]||(r[t]=a&&i[t]||(a?i:o)("Symbol."+t))};c.store=r},5176:function(t,e,n){t.exports=n("51b6")},"51b6":function(t,e,n){n("a3c3"),t.exports=n("584a").Object.assign},"520a":function(t,e,n){"use strict";var r=n("0bfb"),o=RegExp.prototype.exec,i=String.prototype.replace,a=o,c="lastIndex",s=function(){var t=/a/,e=/b*/g;return o.call(t,"a"),o.call(e,"a"),0!==t[c]||0!==e[c]}(),u=void 0!==/()??/.exec("")[1],f=s||u;f&&(a=function(t){var e,n,a,f,l=this;return u&&(n=new RegExp("^"+l.source+"$(?!\\s)",r.call(l))),s&&(e=l[c]),a=o.call(l,t),s&&a&&(l[c]=l.global?a.index+a[0].length:e),u&&a&&a.length>1&&i.call(a[0],n,function(){for(f=1;f1?arguments[1]:void 0,y=void 0!==v,g=0,m=f(p);if(y&&(v=r(v,h>2?arguments[2]:void 0,2)),void 0==m||d==Array&&c(m))for(e=s(p.length),n=new d(e);e>g;g++)u(n,g,y?v(p[g],g):p[g]);else for(l=m.call(p),n=new d;!(o=l.next()).done;g++)u(n,g,y?a(l,v,[o.value,g],!0):o.value);return n.length=g,n}})},"54a1":function(t,e,n){n("6c1c"),n("1654"),t.exports=n("95d5")},5537:function(t,e,n){var r=n("8378"),o=n("7726"),i="__core-js_shared__",a=o[i]||(o[i]={});(t.exports=function(t,e){return a[t]||(a[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n("2d00")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},5559:function(t,e,n){var r=n("dbdb")("keys"),o=n("62a0");t.exports=function(t){return r[t]||(r[t]=o(t))}},"584a":function(t,e){var n=t.exports={version:"2.6.5"};"number"==typeof __e&&(__e=n)},"5b4e":function(t,e,n){var r=n("36c3"),o=n("b447"),i=n("0fc9");t.exports=function(t){return function(e,n,a){var c,s=r(e),u=o(s.length),f=i(a,u);if(t&&n!=n){while(u>f)if(c=s[f++],c!=c)return!0}else for(;u>f;f++)if((t||f in s)&&s[f]===n)return t||f||0;return!t&&-1}}},"5ca1":function(t,e,n){var r=n("7726"),o=n("8378"),i=n("32e9"),a=n("2aba"),c=n("9b43"),s="prototype",u=function(t,e,n){var f,l,p,d,h=t&u.F,v=t&u.G,y=t&u.S,g=t&u.P,m=t&u.B,b=v?r:y?r[e]||(r[e]={}):(r[e]||{})[s],_=v?o:o[e]||(o[e]={}),w=_[s]||(_[s]={});for(f in v&&(n=e),n)l=!h&&b&&void 0!==b[f],p=(l?b:n)[f],d=m&&l?c(p,r):g&&"function"==typeof p?c(Function.call,p):p,b&&a(b,f,p,t&u.U),_[f]!=p&&i(_,f,d),g&&w[f]!=p&&(w[f]=p)};r.core=o,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},"5d73":function(t,e,n){t.exports=n("469f")},"5f1b":function(t,e,n){"use strict";var r=n("23c6"),o=RegExp.prototype.exec;t.exports=function(t,e){var n=t.exec;if("function"===typeof n){var i=n.call(t,e);if("object"!==typeof i)throw new TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==r(t))throw new TypeError("RegExp#exec called on incompatible receiver");return o.call(t,e)}},"626a":function(t,e,n){var r=n("2d95");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},"62a0":function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},"63b6":function(t,e,n){var r=n("e53d"),o=n("584a"),i=n("d864"),a=n("35e8"),c=n("07e3"),s="prototype",u=function(t,e,n){var f,l,p,d=t&u.F,h=t&u.G,v=t&u.S,y=t&u.P,g=t&u.B,m=t&u.W,b=h?o:o[e]||(o[e]={}),_=b[s],w=h?r:v?r[e]:(r[e]||{})[s];for(f in h&&(n=e),n)l=!d&&w&&void 0!==w[f],l&&c(b,f)||(p=l?w[f]:n[f],b[f]=h&&"function"!=typeof w[f]?n[f]:g&&l?i(p,r):m&&w[f]==p?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e[s]=t[s],e}(p):y&&"function"==typeof p?i(Function.call,p):p,y&&((b.virtual||(b.virtual={}))[f]=p,t&u.R&&_&&!_[f]&&a(_,f,p)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},6762:function(t,e,n){"use strict";var r=n("5ca1"),o=n("c366")(!0);r(r.P,"Array",{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),n("9c6c")("includes")},6821:function(t,e,n){var r=n("626a"),o=n("be13");t.exports=function(t){return r(o(t))}},"69a8":function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},"6a99":function(t,e,n){var r=n("d3f4");t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},"6b4c":function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},"6c1c":function(t,e,n){n("c367");for(var r=n("e53d"),o=n("35e8"),i=n("481b"),a=n("5168")("toStringTag"),c="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),s=0;s=u?t?"":void 0:(i=c.charCodeAt(s),i<55296||i>56319||s+1===u||(a=c.charCodeAt(s+1))<56320||a>57343?t?c.charAt(s):i:t?c.slice(s,s+2):a-56320+(i-55296<<10)+65536)}}},7726:function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},"774e":function(t,e,n){t.exports=n("d2d5")},"77f1":function(t,e,n){var r=n("4588"),o=Math.max,i=Math.min;t.exports=function(t,e){return t=r(t),t<0?o(t+e,0):i(t,e)}},"794b":function(t,e,n){t.exports=!n("8e60")&&!n("294c")(function(){return 7!=Object.defineProperty(n("1ec9")("div"),"a",{get:function(){return 7}}).a})},"79aa":function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},"79e5":function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},"7cd6":function(t,e,n){var r=n("40c3"),o=n("5168")("iterator"),i=n("481b");t.exports=n("584a").getIteratorMethod=function(t){if(void 0!=t)return t[o]||t["@@iterator"]||i[r(t)]}},"7d7b":function(t,e,n){var r=n("e4ae"),o=n("7cd6");t.exports=n("584a").getIterator=function(t){var e=o(t);if("function"!=typeof e)throw TypeError(t+" is not iterable!");return r(e.call(t))}},"7e90":function(t,e,n){var r=n("d9f6"),o=n("e4ae"),i=n("c3a1");t.exports=n("8e60")?Object.defineProperties:function(t,e){o(t);var n,a=i(e),c=a.length,s=0;while(c>s)r.f(t,n=a[s++],e[n]);return t}},8378:function(t,e){var n=t.exports={version:"2.6.5"};"number"==typeof __e&&(__e=n)},8436:function(t,e){t.exports=function(){}},"86cc":function(t,e,n){var r=n("cb7c"),o=n("c69a"),i=n("6a99"),a=Object.defineProperty;e.f=n("9e1e")?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return a(t,e,n)}catch(c){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},"8aae":function(t,e,n){n("32a6"),t.exports=n("584a").Object.keys},"8e60":function(t,e,n){t.exports=!n("294c")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},"8f60":function(t,e,n){"use strict";var r=n("a159"),o=n("aebd"),i=n("45f2"),a={};n("35e8")(a,n("5168")("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(a,{next:o(1,n)}),i(t,e+" Iterator")}},9003:function(t,e,n){var r=n("6b4c");t.exports=Array.isArray||function(t){return"Array"==r(t)}},9138:function(t,e,n){t.exports=n("35e8")},9306:function(t,e,n){"use strict";var r=n("c3a1"),o=n("9aa9"),i=n("355d"),a=n("241e"),c=n("335c"),s=Object.assign;t.exports=!s||n("294c")(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=s({},t)[n]||Object.keys(s({},e)).join("")!=r})?function(t,e){var n=a(t),s=arguments.length,u=1,f=o.f,l=i.f;while(s>u){var p,d=c(arguments[u++]),h=f?r(d).concat(f(d)):r(d),v=h.length,y=0;while(v>y)l.call(d,p=h[y++])&&(n[p]=d[p])}return n}:s},9427:function(t,e,n){var r=n("63b6");r(r.S,"Object",{create:n("a159")})},"95d5":function(t,e,n){var r=n("40c3"),o=n("5168")("iterator"),i=n("481b");t.exports=n("584a").isIterable=function(t){var e=Object(t);return void 0!==e[o]||"@@iterator"in e||i.hasOwnProperty(r(e))}},"9aa9":function(t,e){e.f=Object.getOwnPropertySymbols},"9b43":function(t,e,n){var r=n("d8e8");t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},"9c6c":function(t,e,n){var r=n("2b4c")("unscopables"),o=Array.prototype;void 0==o[r]&&n("32e9")(o,r,{}),t.exports=function(t){o[r][t]=!0}},"9def":function(t,e,n){var r=n("4588"),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},"9e1e":function(t,e,n){t.exports=!n("79e5")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},a159:function(t,e,n){var r=n("e4ae"),o=n("7e90"),i=n("1691"),a=n("5559")("IE_PROTO"),c=function(){},s="prototype",u=function(){var t,e=n("1ec9")("iframe"),r=i.length,o="<",a=">";e.style.display="none",n("32fc").appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(o+"script"+a+"document.F=Object"+o+"/script"+a),t.close(),u=t.F;while(r--)delete u[s][i[r]];return u()};t.exports=Object.create||function(t,e){var n;return null!==t?(c[s]=r(t),n=new c,c[s]=null,n[a]=t):n=u(),void 0===e?n:o(n,e)}},a352:function(e,n){e.exports=t},a3c3:function(t,e,n){var r=n("63b6");r(r.S+r.F,"Object",{assign:n("9306")})},a481:function(t,e,n){"use strict";var r=n("cb7c"),o=n("4bf8"),i=n("9def"),a=n("4588"),c=n("0390"),s=n("5f1b"),u=Math.max,f=Math.min,l=Math.floor,p=/\$([$&`']|\d\d?|<[^>]*>)/g,d=/\$([$&`']|\d\d?)/g,h=function(t){return void 0===t?t:String(t)};n("214f")("replace",2,function(t,e,n,v){return[function(r,o){var i=t(this),a=void 0==r?void 0:r[e];return void 0!==a?a.call(r,i,o):n.call(String(i),r,o)},function(t,e){var o=v(n,t,this,e);if(o.done)return o.value;var l=r(t),p=String(this),d="function"===typeof e;d||(e=String(e));var g=l.global;if(g){var m=l.unicode;l.lastIndex=0}var b=[];while(1){var _=s(l,p);if(null===_)break;if(b.push(_),!g)break;var w=String(_[0]);""===w&&(l.lastIndex=c(p,i(l.lastIndex),m))}for(var x="",O=0,S=0;S=O&&(x+=p.slice(O,A)+j,O=A+$.length)}return x+p.slice(O)}];function y(t,e,r,i,a,c){var s=r+t.length,u=i.length,f=d;return void 0!==a&&(a=o(a),f=p),n.call(c,f,function(n,o){var c;switch(o.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,r);case"'":return e.slice(s);case"<":c=a[o.slice(1,-1)];break;default:var f=+o;if(0===f)return n;if(f>u){var p=l(f/10);return 0===p?n:p<=u?void 0===i[p-1]?o.charAt(1):i[p-1]+o.charAt(1):n}c=i[f-1]}return void 0===c?"":c})}})},a4bb:function(t,e,n){t.exports=n("8aae")},a745:function(t,e,n){t.exports=n("f410")},aae3:function(t,e,n){var r=n("d3f4"),o=n("2d95"),i=n("2b4c")("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},aebd:function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},b0c5:function(t,e,n){"use strict";var r=n("520a");n("5ca1")({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},b0dc:function(t,e,n){var r=n("e4ae");t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(a){var i=t["return"];throw void 0!==i&&r(i.call(t)),a}}},b447:function(t,e,n){var r=n("3a38"),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},b8e3:function(t,e){t.exports=!0},be13:function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},c366:function(t,e,n){var r=n("6821"),o=n("9def"),i=n("77f1");t.exports=function(t){return function(e,n,a){var c,s=r(e),u=o(s.length),f=i(a,u);if(t&&n!=n){while(u>f)if(c=s[f++],c!=c)return!0}else for(;u>f;f++)if((t||f in s)&&s[f]===n)return t||f||0;return!t&&-1}}},c367:function(t,e,n){"use strict";var r=n("8436"),o=n("50ed"),i=n("481b"),a=n("36c3");t.exports=n("30f1")(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},c3a1:function(t,e,n){var r=n("e6f3"),o=n("1691");t.exports=Object.keys||function(t){return r(t,o)}},c649:function(t,e,n){"use strict";(function(t){n.d(e,"c",function(){return l}),n.d(e,"a",function(){return u}),n.d(e,"b",function(){return a}),n.d(e,"d",function(){return f}),n("a481");var r=n("4aa6"),o=n.n(r);function i(){return"undefined"!==typeof window?window.console:t.console}var a=i();function c(t){var e=o()(null);return function(n){var r=e[n];return r||(e[n]=t(n))}}var s=/-(\w)/g,u=c(function(t){return t.replace(s,function(t,e){return e?e.toUpperCase():""})});function f(t){null!==t.parentElement&&t.parentElement.removeChild(t)}function l(t,e,n){var r=0===n?t.children[0]:t.children[n-1].nextSibling;t.insertBefore(e,r)}}).call(this,n("c8ba"))},c69a:function(t,e,n){t.exports=!n("9e1e")&&!n("79e5")(function(){return 7!=Object.defineProperty(n("230e")("div"),"a",{get:function(){return 7}}).a})},c8ba:function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}t.exports=n},c8bb:function(t,e,n){t.exports=n("54a1")},ca5a:function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},cb7c:function(t,e,n){var r=n("d3f4");t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},ce7e:function(t,e,n){var r=n("63b6"),o=n("584a"),i=n("294c");t.exports=function(t,e){var n=(o.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*i(function(){n(1)}),"Object",a)}},d2c8:function(t,e,n){var r=n("aae3"),o=n("be13");t.exports=function(t,e,n){if(r(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(o(t))}},d2d5:function(t,e,n){n("1654"),n("549b"),t.exports=n("584a").Array.from},d3f4:function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},d864:function(t,e,n){var r=n("79aa");t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},d8e8:function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},d9f6:function(t,e,n){var r=n("e4ae"),o=n("794b"),i=n("1bc3"),a=Object.defineProperty;e.f=n("8e60")?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return a(t,e,n)}catch(c){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},dbdb:function(t,e,n){var r=n("584a"),o=n("e53d"),i="__core-js_shared__",a=o[i]||(o[i]={});(t.exports=function(t,e){return a[t]||(a[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n("b8e3")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},dc62:function(t,e,n){n("9427");var r=n("584a").Object;t.exports=function(t,e){return r.create(t,e)}},e4ae:function(t,e,n){var r=n("f772");t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},e53d:function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},e6f3:function(t,e,n){var r=n("07e3"),o=n("36c3"),i=n("5b4e")(!1),a=n("5559")("IE_PROTO");t.exports=function(t,e){var n,c=o(t),s=0,u=[];for(n in c)n!=a&&r(c,n)&&u.push(n);while(e.length>s)r(c,n=e[s++])&&(~i(u,n)||u.push(n));return u}},f410:function(t,e,n){n("1af6"),t.exports=n("584a").Array.isArray},f559:function(t,e,n){"use strict";var r=n("5ca1"),o=n("9def"),i=n("d2c8"),a="startsWith",c=""[a];r(r.P+r.F*n("5147")(a),"String",{startsWith:function(t){var e=i(this,t,a),n=o(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return c?c.call(e,r,n):e.slice(n,n+r.length)===r}})},f772:function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},fa5b:function(t,e,n){t.exports=n("5537")("native-function-to-string",Function.toString)},fb15:function(t,e,n){"use strict";var r;n.r(e),"undefined"!==typeof window&&(r=window.document.currentScript)&&(r=r.src.match(/(.+\/)[^\/]+\.js(\?.*)?$/))&&(n.p=r[1]);var o=n("5176"),i=n.n(o),a=(n("f559"),n("a4bb")),c=n.n(a),s=(n("6762"),n("2fdb"),n("a745")),u=n.n(s);function f(t){if(u()(t))return t}var l=n("5d73"),p=n.n(l);function d(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=p()(t);!(r=(a=c.next()).done);r=!0)if(n.push(a.value),e&&n.length===e)break}catch(s){o=!0,i=s}finally{try{r||null==c["return"]||c["return"]()}finally{if(o)throw i}}return n}function h(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function v(t,e){return f(t)||d(t,e)||h()}function y(t){if(u()(t)){for(var e=0,n=new Array(t.length);e=i?o.length:o.indexOf(t)});return n?a.filter(function(t){return-1!==t}):a}function M(t,e){var n=this;this.$nextTick(function(){return n.$emit(t.toLowerCase(),e)})}function j(t){var e=this;return function(n){null!==e.realList&&e["onDrag"+t](n),M.call(e,t,n)}}function T(t){if(!t||1!==t.length)return!1;var e=v(t,1),n=e[0].componentOptions;return!!n&&["transition-group","TransitionGroup"].includes(n.tag)}function P(t,e){var n=e.header,r=e.footer,o=0,i=0;return n&&(o=n.length,t=t?[].concat(O(n),O(t)):O(n)),r&&(i=r.length,t=t?[].concat(O(t),O(r)):O(r)),{children:t,headerOffset:o,footerOffset:i}}function D(t,e){var n=null,r=function(t,e){n=C(n,t,e)},o=c()(t).filter(function(t){return"id"===t||t.startsWith("data-")}).reduce(function(e,n){return e[n]=t[n],e},{});if(r("attrs",o),!e)return n;var a=e.on,s=e.props,u=e.attrs;return r("on",a),r("props",s),i()(n.attrs,u),n}var L=["Start","Add","Remove","Update","End"],I=["Choose","Sort","Filter","Clone"],N=["Move"].concat(L,I).map(function(t){return"on"+t}),R=null,F={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:function(t){return t}},element:{type:String,default:"div"},tag:{type:String,default:null},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},z={name:"draggable",inheritAttrs:!1,props:F,data:function(){return{transitionMode:!1,noneFunctionalComponentMode:!1,init:!1}},render:function(t){var e=this.$slots.default;this.transitionMode=T(e);var n=P(e,this.$slots),r=n.children,o=n.headerOffset,i=n.footerOffset;this.headerOffset=o,this.footerOffset=i;var a=D(this.$attrs,this.componentData);return t(this.getTag(),a,r)},created:function(){null!==this.list&&null!==this.value&&A["b"].error("Value and list props are mutually exclusive! Please set one or another."),"div"!==this.element&&A["b"].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&&A["b"].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:function(){var t=this;if(this.noneFunctionalComponentMode=this.getTag().toLowerCase()!==this.$el.nodeName.toLowerCase(),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: ".concat(this.getTag()));var e={};L.forEach(function(n){e["on"+n]=j.call(t,n)}),I.forEach(function(n){e["on"+n]=M.bind(t,n)});var n=c()(this.$attrs).reduce(function(e,n){return e[Object(A["a"])(n)]=t.$attrs[n],e},{}),r=i()({},this.options,n,e,{onMove:function(e,n){return t.onDragMove(e,n)}});!("draggable"in r)&&(r.draggable=">*"),this._sortable=new $.a(this.rootContainer,r),this.computeIndexes()},beforeDestroy:function(){void 0!==this._sortable&&this._sortable.destroy()},computed:{rootContainer:function(){return this.transitionMode?this.$el.children[0]:this.$el},realList:function(){return this.list?this.list:this.value}},watch:{options:{handler:function(t){this.updateOptions(t)},deep:!0},$attrs:{handler:function(t){this.updateOptions(t)},deep:!0},realList:function(){this.computeIndexes()}},methods:{getTag:function(){return this.tag||this.element},updateOptions:function(t){for(var e in t){var n=Object(A["a"])(e);-1===N.indexOf(n)&&this._sortable.option(n,t[e])}},getChildrenNodes:function(){if(this.init||(this.noneFunctionalComponentMode=this.noneFunctionalComponentMode&&1===this.$children.length,this.init=!0),this.noneFunctionalComponentMode)return this.$children[0].$slots.default;var t=this.$slots.default;return this.transitionMode?t[0].child.$slots.default:t},computeIndexes:function(){var t=this;this.$nextTick(function(){t.visibleIndexes=E(t.getChildrenNodes(),t.rootContainer.children,t.transitionMode,t.footerOffset)})},getUnderlyingVm:function(t){var e=k(this.getChildrenNodes()||[],t);if(-1===e)return null;var n=this.realList[e];return{index:e,element:n}},getUnderlyingPotencialDraggableComponent:function(t){var e=t.__vue__;return e&&e.$options&&"transition-group"===e.$options._componentTag?e.$parent:e},emitChanges:function(t){var e=this;this.$nextTick(function(){e.$emit("change",t)})},alterList:function(t){if(this.list)t(this.list);else{var e=O(this.value);t(e),this.$emit("input",e)}},spliceList:function(){var t=arguments,e=function(e){return e.splice.apply(e,O(t))};this.alterList(e)},updatePosition:function(t,e){var n=function(n){return n.splice(e,0,n.splice(t,1)[0])};this.alterList(n)},getRelatedContextFromMoveEvent:function(t){var e=t.to,n=t.related,r=this.getUnderlyingPotencialDraggableComponent(e);if(!r)return{component:r};var o=r.realList,a={list:o,component:r};if(e!==n&&o&&r.getUnderlyingVm){var c=r.getUnderlyingVm(n);if(c)return i()(c,a)}return a},getVmIndex:function(t){var e=this.visibleIndexes,n=e.length;return t>n-1?n:e[t]},getComponent:function(){return this.$slots.default[0].componentInstance},resetTransitionData:function(t){if(this.noTransitionOnDrag&&this.transitionMode){var e=this.getChildrenNodes();e[t].data=null;var n=this.getComponent();n.children=[],n.kept=void 0}},onDragStart:function(t){this.context=this.getUnderlyingVm(t.item),t.item._underlying_vm_=this.clone(this.context.element),R=t.item},onDragAdd:function(t){var e=t.item._underlying_vm_;if(void 0!==e){Object(A["d"])(t.item);var n=this.getVmIndex(t.newIndex);this.spliceList(n,0,e),this.computeIndexes();var r={element:e,newIndex:n};this.emitChanges({added:r})}},onDragRemove:function(t){if(Object(A["c"])(this.rootContainer,t.item,t.oldIndex),"clone"!==t.pullMode){var e=this.context.index;this.spliceList(e,1);var n={element:this.context.element,oldIndex:e};this.resetTransitionData(e),this.emitChanges({removed:n})}else Object(A["d"])(t.clone)},onDragUpdate:function(t){Object(A["d"])(t.item),Object(A["c"])(t.from,t.item,t.oldIndex);var e=this.context.index,n=this.getVmIndex(t.newIndex);this.updatePosition(e,n);var r={element:this.context.element,oldIndex:e,newIndex:n};this.emitChanges({moved:r})},updateProperty:function(t,e){t.hasOwnProperty(e)&&(t[e]+=this.headerOffset)},computeFutureIndex:function(t,e){if(!t.element)return 0;var n=O(e.to.children).filter(function(t){return"none"!==t.style["display"]}),r=n.indexOf(e.related),o=t.component.getVmIndex(r),i=-1!==n.indexOf(R);return i||!e.willInsertAfter?o:o+1},onDragMove:function(t,e){var n=this.move;if(!n||!this.realList)return!0;var r=this.getRelatedContextFromMoveEvent(t),o=this.context,a=this.computeFutureIndex(r,t);i()(o,{futureIndex:a});var c=i()({},t,{relatedContext:r,draggedContext:o});return n(c,e)},onDragEnd:function(){this.computeIndexes(),R=null}}};"undefined"!==typeof window&&"Vue"in window&&window.Vue.component("draggable",z);var H=z;e["default"]=H}})["default"]})},"19e9":function(t,e,n){var r,o,i; +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-vendors"],{"0029":function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},"0185":function(t,e,n){var r=n("e5fa");t.exports=function(t){return Object(r(t))}},"01f9":function(t,e,n){"use strict";var r=n("2d00"),o=n("5ca1"),i=n("2aba"),a=n("32e9"),c=n("84f2"),s=n("41a0"),u=n("7f20"),f=n("38fd"),l=n("2b4c")("iterator"),p=!([].keys&&"next"in[].keys()),d="@@iterator",h="keys",v="values",y=function(){return this};t.exports=function(t,e,n,g,m,b,_){s(n,e,g);var w,x,O,S=function(t){if(!p&&t in k)return k[t];switch(t){case h:return function(){return new n(this,t)};case v:return function(){return new n(this,t)}}return function(){return new n(this,t)}},$=e+" Iterator",A=m==v,C=!1,k=t.prototype,E=k[l]||k[d]||m&&k[m],M=E||S(m),j=m?A?S("entries"):M:void 0,T="Array"==e&&k.entries||E;if(T&&(O=f(T.call(new t)),O!==Object.prototype&&O.next&&(u(O,$,!0),r||"function"==typeof O[l]||a(O,l,y))),A&&E&&E.name!==v&&(C=!0,M=function(){return E.call(this)}),r&&!_||!p&&!C&&k[l]||a(k,l,M),c[e]=M,c[$]=y,m)if(w={values:A?M:S(v),keys:b?M:S(h),entries:j},_)for(x in w)x in k||i(k,x,w[x]);else o(o.P+o.F*(p||C),e,w);return w}},"0234":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=Object.assign||function(t){for(var e=1;e=u?t?"":void 0:(i=c.charCodeAt(s),i<55296||i>56319||s+1===u||(a=c.charCodeAt(s+1))<56320||a>57343?t?c.charAt(s):i:t?c.slice(s,s+2):a-56320+(i-55296<<10)+65536)}}},"0390":function(t,e,n){"use strict";var r=n("02f4")(!0);t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},"03ca":function(t,e,n){"use strict";var r=n("f2fe");function o(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r}),this.resolve=r(e),this.reject=r(n)}t.exports.f=function(t){return new o(t)}},"04cf":function(t,e,n){var r=n("4a89"),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},"08c1":function(t,e,n){"use strict";var r,o,i,a,c=n("e6a1"),s=n("b808"),u=n("a9f2"),f=n("a274"),l=n("569f"),p=n("ab4c"),d=n("9184"),h=n("8115"),v=n("88b8"),y=n("1aa7"),g=n("1ad4").set,m=n("a24c")(),b=n("cc20"),_=n("73c3"),w=n("4b9e"),x=n("1c08"),O="Promise",S=s.TypeError,$=s.process,A=$&&$.versions,C=A&&A.v8||"",k=s[O],E="process"==f($),M=function(){},j=o=b.f,T=!!function(){try{var t=k.resolve(1),e=(t.constructor={})[n("b67f")("species")]=function(t){t(M,M)};return(E||"function"==typeof PromiseRejectionEvent)&&t.then(M)instanceof e&&0!==C.indexOf("6.6")&&-1===w.indexOf("Chrome/66")}catch(r){}}(),P=function(t){var e;return!(!p(t)||"function"!=typeof(e=t.then))&&e},D=function(t,e){if(!t._n){t._n=!0;var n=t._c;m(function(){var r=t._v,o=1==t._s,i=0,a=function(e){var n,i,a,c=o?e.ok:e.fail,s=e.resolve,u=e.reject,f=e.domain;try{c?(o||(2==t._h&&N(t),t._h=1),!0===c?n=r:(f&&f.enter(),n=c(r),f&&(f.exit(),a=!0)),n===e.promise?u(S("Promise-chain cycle")):(i=P(n))?i.call(n,s,u):s(n)):u(r)}catch(l){f&&!a&&f.exit(),u(l)}};while(n.length>i)a(n[i++]);t._c=[],t._n=!1,e&&!t._h&&L(t)})}},L=function(t){g.call(s,function(){var e,n,r,o=t._v,i=I(t);if(i&&(e=_(function(){E?$.emit("unhandledRejection",o,t):(n=s.onunhandledrejection)?n({promise:t,reason:o}):(r=s.console)&&r.error&&r.error("Unhandled promise rejection",o)}),t._h=E||I(t)?2:1),t._a=void 0,i&&e.e)throw e.v})},I=function(t){return 1!==t._h&&0===(t._a||t._c).length},N=function(t){g.call(s,function(){var e;E?$.emit("rejectionHandled",t):(e=s.onrejectionhandled)&&e({promise:t,reason:t._v})})},R=function(t){var e=this;e._d||(e._d=!0,e=e._w||e,e._v=t,e._s=2,e._a||(e._a=e._c.slice()),D(e,!0))},F=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw S("Promise can't be resolved itself");(e=P(t))?m(function(){var r={_w:n,_d:!1};try{e.call(t,u(F,r,1),u(R,r,1))}catch(o){R.call(r,o)}}):(n._v=t,n._s=1,D(n,!1))}catch(r){R.call({_w:n,_d:!1},r)}}};T||(k=function(t){h(this,k,O,"_h"),d(t),r.call(this);try{t(u(F,this,1),u(R,this,1))}catch(e){R.call(this,e)}},r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},r.prototype=n("9faf")(k.prototype,{then:function(t,e){var n=j(y(this,k));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=E?$.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&D(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new r;this.promise=t,this.resolve=u(F,t,1),this.reject=u(R,t,1)},b.f=j=function(t){return t===k||t===a?new i(t):o(t)}),l(l.G+l.W+l.F*!T,{Promise:k}),n("aab6")(k,O),n("0ec0")(O),a=n("ca38")[O],l(l.S+l.F*!T,O,{reject:function(t){var e=j(this),n=e.reject;return n(t),e.promise}}),l(l.S+l.F*(c||!T),O,{resolve:function(t){return x(c&&this===a?k:this,t)}}),l(l.S+l.F*!(T&&n("2299")(function(t){k.all(t)["catch"](M)})),O,{all:function(t){var e=this,n=j(e),r=n.resolve,o=n.reject,i=_(function(){var n=[],i=0,a=1;v(t,!1,function(t){var c=i++,s=!1;n.push(void 0),a++,e.resolve(t).then(function(t){s||(s=!0,n[c]=t,--a||r(n))},o)}),--a||r(n)});return i.e&&o(i.v),n.promise},race:function(t){var e=this,n=j(e),r=n.reject,o=_(function(){v(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return o.e&&r(o.v),n.promise}})},"0965":function(t,e,n){n("384f"),t.exports=n("a7d3").parseFloat},"0a0a":function(t,e,n){var r=n("da3c"),o=n("a7d3"),i=n("b457"),a=n("fda1"),c=n("3adc").f;t.exports=function(t){var e=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||c(e,t,{value:a.f(t)})}},"0a49":function(t,e,n){var r=n("9b43"),o=n("626a"),i=n("4bf8"),a=n("9def"),c=n("cd1c");t.exports=function(t,e){var n=1==t,s=2==t,u=3==t,f=4==t,l=6==t,p=5==t||l,d=e||c;return function(e,c,h){for(var v,y,g=i(e),m=o(g),b=r(c,h,3),_=a(m.length),w=0,x=n?d(e,_):s?d(e,0):void 0;_>w;w++)if((p||w in m)&&(v=m[w],y=b(v,w,g),t))if(n)x[w]=y;else if(y)switch(t){case 3:return!0;case 5:return v;case 6:return w;case 2:x.push(v)}else if(f)return!1;return l?-1:u||f?f:x}}},"0a91":function(t,e,n){n("b42c"),n("93c4"),t.exports=n("b77f")},"0bfb":function(t,e,n){"use strict";var r=n("cb7c");t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},"0d58":function(t,e,n){var r=n("ce10"),o=n("e11e");t.exports=Object.keys||function(t){return r(t,o)}},"0ec0":function(t,e,n){"use strict";var r=n("b808"),o=n("e4e1"),i=n("45e2"),a=n("b67f")("species");t.exports=function(t){var e=r[t];i&&e&&!e[a]&&o.f(e,a,{configurable:!0,get:function(){return this}})}},"0f4a":function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},"0f89":function(t,e,n){var r=n("6f8a");t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},"103a":function(t,e,n){var r=n("da3c").document;t.exports=r&&r.documentElement},1169:function(t,e,n){var r=n("2d95");t.exports=Array.isArray||function(t){return"Array"==r(t)}},"11e9":function(t,e,n){var r=n("52a7"),o=n("4630"),i=n("6821"),a=n("6a99"),c=n("69a8"),s=n("c69a"),u=Object.getOwnPropertyDescriptor;e.f=n("9e1e")?u:function(t,e){if(t=i(t),e=a(e,!0),s)try{return u(t,e)}catch(n){}if(c(t,e))return o(!r.f.call(t,e),t[e])}},"11ff":function(t,e,n){var r=n("da3c").parseFloat,o=n("633a").trim;t.exports=1/r(n("702a")+"-0")!==-1/0?function(t){var e=o(String(t),3),n=r(e);return 0===n&&"-"==e.charAt(0)?-0:n}:r},"12fd":function(t,e,n){var r=n("6f8a"),o=n("da3c").document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},"12fd9":function(t,e){},1495:function(t,e,n){var r=n("86cc"),o=n("cb7c"),i=n("0d58");t.exports=n("9e1e")?Object.defineProperties:function(t,e){o(t);var n,a=i(e),c=a.length,s=0;while(c>s)r.f(t,n=a[s++],e[n]);return t}},"14c6":function(t,e,n){"use strict";var r=n("3bb1"),o=n("b5cb"),i=n("a638"),a=n("58b9");t.exports=n("fa2d")(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},"16e7":function(t,e,n){var r=n("d13f"),o=n("7704");r(r.G+r.F*(parseInt!=o),{parseInt:o})},1938:function(t,e,n){var r=n("d13f");r(r.S,"Array",{isArray:n("b5aa")})},"196c":function(t,e){t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},1980:function(t,e,n){(function(e,r){t.exports=r(n("53fe"))})("undefined"!==typeof self&&self,function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="fb15")}({"02f4":function(t,e,n){var r=n("4588"),o=n("be13");t.exports=function(t){return function(e,n){var i,a,c=String(o(e)),s=r(n),u=c.length;return s<0||s>=u?t?"":void 0:(i=c.charCodeAt(s),i<55296||i>56319||s+1===u||(a=c.charCodeAt(s+1))<56320||a>57343?t?c.charAt(s):i:t?c.slice(s,s+2):a-56320+(i-55296<<10)+65536)}}},"0390":function(t,e,n){"use strict";var r=n("02f4")(!0);t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},"07e3":function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},"0bfb":function(t,e,n){"use strict";var r=n("cb7c");t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},"0fc9":function(t,e,n){var r=n("3a38"),o=Math.max,i=Math.min;t.exports=function(t,e){return t=r(t),t<0?o(t+e,0):i(t,e)}},1654:function(t,e,n){"use strict";var r=n("71c1")(!0);n("30f1")(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},1691:function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},"1af6":function(t,e,n){var r=n("63b6");r(r.S,"Array",{isArray:n("9003")})},"1bc3":function(t,e,n){var r=n("f772");t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},"1ec9":function(t,e,n){var r=n("f772"),o=n("e53d").document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},"20fd":function(t,e,n){"use strict";var r=n("d9f6"),o=n("aebd");t.exports=function(t,e,n){e in t?r.f(t,e,o(0,n)):t[e]=n}},"214f":function(t,e,n){"use strict";n("b0c5");var r=n("2aba"),o=n("32e9"),i=n("79e5"),a=n("be13"),c=n("2b4c"),s=n("520a"),u=c("species"),f=!i(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")}),l=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();t.exports=function(t,e,n){var p=c(t),d=!i(function(){var e={};return e[p]=function(){return 7},7!=""[t](e)}),h=d?!i(function(){var e=!1,n=/a/;return n.exec=function(){return e=!0,null},"split"===t&&(n.constructor={},n.constructor[u]=function(){return n}),n[p](""),!e}):void 0;if(!d||!h||"replace"===t&&!f||"split"===t&&!l){var v=/./[p],y=n(a,p,""[t],function(t,e,n,r,o){return e.exec===s?d&&!o?{done:!0,value:v.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}),g=y[0],m=y[1];r(String.prototype,t,g),o(RegExp.prototype,p,2==e?function(t,e){return m.call(t,this,e)}:function(t){return m.call(t,this)})}}},"230e":function(t,e,n){var r=n("d3f4"),o=n("7726").document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},"23c6":function(t,e,n){var r=n("2d95"),o=n("2b4c")("toStringTag"),i="Arguments"==r(function(){return arguments}()),a=function(t,e){try{return t[e]}catch(n){}};t.exports=function(t){var e,n,c;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=a(e=Object(t),o))?n:i?r(e):"Object"==(c=r(e))&&"function"==typeof e.callee?"Arguments":c}},"241e":function(t,e,n){var r=n("25eb");t.exports=function(t){return Object(r(t))}},"25eb":function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},"294c":function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},"2aba":function(t,e,n){var r=n("7726"),o=n("32e9"),i=n("69a8"),a=n("ca5a")("src"),c=n("fa5b"),s="toString",u=(""+c).split(s);n("8378").inspectSource=function(t){return c.call(t)},(t.exports=function(t,e,n,c){var s="function"==typeof n;s&&(i(n,"name")||o(n,"name",e)),t[e]!==n&&(s&&(i(n,a)||o(n,a,t[e]?""+t[e]:u.join(String(e)))),t===r?t[e]=n:c?t[e]?t[e]=n:o(t,e,n):(delete t[e],o(t,e,n)))})(Function.prototype,s,function(){return"function"==typeof this&&this[a]||c.call(this)})},"2b4c":function(t,e,n){var r=n("5537")("wks"),o=n("ca5a"),i=n("7726").Symbol,a="function"==typeof i,c=t.exports=function(t){return r[t]||(r[t]=a&&i[t]||(a?i:o)("Symbol."+t))};c.store=r},"2d00":function(t,e){t.exports=!1},"2d95":function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},"2fdb":function(t,e,n){"use strict";var r=n("5ca1"),o=n("d2c8"),i="includes";r(r.P+r.F*n("5147")(i),"String",{includes:function(t){return!!~o(this,t,i).indexOf(t,arguments.length>1?arguments[1]:void 0)}})},"30f1":function(t,e,n){"use strict";var r=n("b8e3"),o=n("63b6"),i=n("9138"),a=n("35e8"),c=n("481b"),s=n("8f60"),u=n("45f2"),f=n("53e2"),l=n("5168")("iterator"),p=!([].keys&&"next"in[].keys()),d="@@iterator",h="keys",v="values",y=function(){return this};t.exports=function(t,e,n,g,m,b,_){s(n,e,g);var w,x,O,S=function(t){if(!p&&t in k)return k[t];switch(t){case h:return function(){return new n(this,t)};case v:return function(){return new n(this,t)}}return function(){return new n(this,t)}},$=e+" Iterator",A=m==v,C=!1,k=t.prototype,E=k[l]||k[d]||m&&k[m],M=E||S(m),j=m?A?S("entries"):M:void 0,T="Array"==e&&k.entries||E;if(T&&(O=f(T.call(new t)),O!==Object.prototype&&O.next&&(u(O,$,!0),r||"function"==typeof O[l]||a(O,l,y))),A&&E&&E.name!==v&&(C=!0,M=function(){return E.call(this)}),r&&!_||!p&&!C&&k[l]||a(k,l,M),c[e]=M,c[$]=y,m)if(w={values:A?M:S(v),keys:b?M:S(h),entries:j},_)for(x in w)x in k||i(k,x,w[x]);else o(o.P+o.F*(p||C),e,w);return w}},"32a6":function(t,e,n){var r=n("241e"),o=n("c3a1");n("ce7e")("keys",function(){return function(t){return o(r(t))}})},"32e9":function(t,e,n){var r=n("86cc"),o=n("4630");t.exports=n("9e1e")?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},"32fc":function(t,e,n){var r=n("e53d").document;t.exports=r&&r.documentElement},"335c":function(t,e,n){var r=n("6b4c");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},"355d":function(t,e){e.f={}.propertyIsEnumerable},"35e8":function(t,e,n){var r=n("d9f6"),o=n("aebd");t.exports=n("8e60")?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},"36c3":function(t,e,n){var r=n("335c"),o=n("25eb");t.exports=function(t){return r(o(t))}},3702:function(t,e,n){var r=n("481b"),o=n("5168")("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||i[o]===t)}},"3a38":function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},"40c3":function(t,e,n){var r=n("6b4c"),o=n("5168")("toStringTag"),i="Arguments"==r(function(){return arguments}()),a=function(t,e){try{return t[e]}catch(n){}};t.exports=function(t){var e,n,c;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=a(e=Object(t),o))?n:i?r(e):"Object"==(c=r(e))&&"function"==typeof e.callee?"Arguments":c}},4588:function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},"45f2":function(t,e,n){var r=n("d9f6").f,o=n("07e3"),i=n("5168")("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},4630:function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"469f":function(t,e,n){n("6c1c"),n("1654"),t.exports=n("7d7b")},"481b":function(t,e){t.exports={}},"4aa6":function(t,e,n){t.exports=n("dc62")},"4bf8":function(t,e,n){var r=n("be13");t.exports=function(t){return Object(r(t))}},"4ee1":function(t,e,n){var r=n("5168")("iterator"),o=!1;try{var i=[7][r]();i["return"]=function(){o=!0},Array.from(i,function(){throw 2})}catch(a){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i=[7],c=i[r]();c.next=function(){return{done:n=!0}},i[r]=function(){return c},t(i)}catch(a){}return n}},"50ed":function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},5147:function(t,e,n){var r=n("2b4c")("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,!"/./"[t](e)}catch(o){}}return!0}},5168:function(t,e,n){var r=n("dbdb")("wks"),o=n("62a0"),i=n("e53d").Symbol,a="function"==typeof i,c=t.exports=function(t){return r[t]||(r[t]=a&&i[t]||(a?i:o)("Symbol."+t))};c.store=r},5176:function(t,e,n){t.exports=n("51b6")},"51b6":function(t,e,n){n("a3c3"),t.exports=n("584a").Object.assign},"520a":function(t,e,n){"use strict";var r=n("0bfb"),o=RegExp.prototype.exec,i=String.prototype.replace,a=o,c="lastIndex",s=function(){var t=/a/,e=/b*/g;return o.call(t,"a"),o.call(e,"a"),0!==t[c]||0!==e[c]}(),u=void 0!==/()??/.exec("")[1],f=s||u;f&&(a=function(t){var e,n,a,f,l=this;return u&&(n=new RegExp("^"+l.source+"$(?!\\s)",r.call(l))),s&&(e=l[c]),a=o.call(l,t),s&&a&&(l[c]=l.global?a.index+a[0].length:e),u&&a&&a.length>1&&i.call(a[0],n,function(){for(f=1;f1?arguments[1]:void 0,y=void 0!==v,g=0,m=f(p);if(y&&(v=r(v,h>2?arguments[2]:void 0,2)),void 0==m||d==Array&&c(m))for(e=s(p.length),n=new d(e);e>g;g++)u(n,g,y?v(p[g],g):p[g]);else for(l=m.call(p),n=new d;!(o=l.next()).done;g++)u(n,g,y?a(l,v,[o.value,g],!0):o.value);return n.length=g,n}})},"54a1":function(t,e,n){n("6c1c"),n("1654"),t.exports=n("95d5")},5537:function(t,e,n){var r=n("8378"),o=n("7726"),i="__core-js_shared__",a=o[i]||(o[i]={});(t.exports=function(t,e){return a[t]||(a[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n("2d00")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},5559:function(t,e,n){var r=n("dbdb")("keys"),o=n("62a0");t.exports=function(t){return r[t]||(r[t]=o(t))}},"584a":function(t,e){var n=t.exports={version:"2.6.5"};"number"==typeof __e&&(__e=n)},"5b4e":function(t,e,n){var r=n("36c3"),o=n("b447"),i=n("0fc9");t.exports=function(t){return function(e,n,a){var c,s=r(e),u=o(s.length),f=i(a,u);if(t&&n!=n){while(u>f)if(c=s[f++],c!=c)return!0}else for(;u>f;f++)if((t||f in s)&&s[f]===n)return t||f||0;return!t&&-1}}},"5ca1":function(t,e,n){var r=n("7726"),o=n("8378"),i=n("32e9"),a=n("2aba"),c=n("9b43"),s="prototype",u=function(t,e,n){var f,l,p,d,h=t&u.F,v=t&u.G,y=t&u.S,g=t&u.P,m=t&u.B,b=v?r:y?r[e]||(r[e]={}):(r[e]||{})[s],_=v?o:o[e]||(o[e]={}),w=_[s]||(_[s]={});for(f in v&&(n=e),n)l=!h&&b&&void 0!==b[f],p=(l?b:n)[f],d=m&&l?c(p,r):g&&"function"==typeof p?c(Function.call,p):p,b&&a(b,f,p,t&u.U),_[f]!=p&&i(_,f,d),g&&w[f]!=p&&(w[f]=p)};r.core=o,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},"5d73":function(t,e,n){t.exports=n("469f")},"5f1b":function(t,e,n){"use strict";var r=n("23c6"),o=RegExp.prototype.exec;t.exports=function(t,e){var n=t.exec;if("function"===typeof n){var i=n.call(t,e);if("object"!==typeof i)throw new TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==r(t))throw new TypeError("RegExp#exec called on incompatible receiver");return o.call(t,e)}},"626a":function(t,e,n){var r=n("2d95");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},"62a0":function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},"63b6":function(t,e,n){var r=n("e53d"),o=n("584a"),i=n("d864"),a=n("35e8"),c=n("07e3"),s="prototype",u=function(t,e,n){var f,l,p,d=t&u.F,h=t&u.G,v=t&u.S,y=t&u.P,g=t&u.B,m=t&u.W,b=h?o:o[e]||(o[e]={}),_=b[s],w=h?r:v?r[e]:(r[e]||{})[s];for(f in h&&(n=e),n)l=!d&&w&&void 0!==w[f],l&&c(b,f)||(p=l?w[f]:n[f],b[f]=h&&"function"!=typeof w[f]?n[f]:g&&l?i(p,r):m&&w[f]==p?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e[s]=t[s],e}(p):y&&"function"==typeof p?i(Function.call,p):p,y&&((b.virtual||(b.virtual={}))[f]=p,t&u.R&&_&&!_[f]&&a(_,f,p)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},6762:function(t,e,n){"use strict";var r=n("5ca1"),o=n("c366")(!0);r(r.P,"Array",{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),n("9c6c")("includes")},6821:function(t,e,n){var r=n("626a"),o=n("be13");t.exports=function(t){return r(o(t))}},"69a8":function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},"6a99":function(t,e,n){var r=n("d3f4");t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},"6b4c":function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},"6c1c":function(t,e,n){n("c367");for(var r=n("e53d"),o=n("35e8"),i=n("481b"),a=n("5168")("toStringTag"),c="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),s=0;s=u?t?"":void 0:(i=c.charCodeAt(s),i<55296||i>56319||s+1===u||(a=c.charCodeAt(s+1))<56320||a>57343?t?c.charAt(s):i:t?c.slice(s,s+2):a-56320+(i-55296<<10)+65536)}}},7726:function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},"774e":function(t,e,n){t.exports=n("d2d5")},"77f1":function(t,e,n){var r=n("4588"),o=Math.max,i=Math.min;t.exports=function(t,e){return t=r(t),t<0?o(t+e,0):i(t,e)}},"794b":function(t,e,n){t.exports=!n("8e60")&&!n("294c")(function(){return 7!=Object.defineProperty(n("1ec9")("div"),"a",{get:function(){return 7}}).a})},"79aa":function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},"79e5":function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},"7cd6":function(t,e,n){var r=n("40c3"),o=n("5168")("iterator"),i=n("481b");t.exports=n("584a").getIteratorMethod=function(t){if(void 0!=t)return t[o]||t["@@iterator"]||i[r(t)]}},"7d7b":function(t,e,n){var r=n("e4ae"),o=n("7cd6");t.exports=n("584a").getIterator=function(t){var e=o(t);if("function"!=typeof e)throw TypeError(t+" is not iterable!");return r(e.call(t))}},"7e90":function(t,e,n){var r=n("d9f6"),o=n("e4ae"),i=n("c3a1");t.exports=n("8e60")?Object.defineProperties:function(t,e){o(t);var n,a=i(e),c=a.length,s=0;while(c>s)r.f(t,n=a[s++],e[n]);return t}},8378:function(t,e){var n=t.exports={version:"2.6.5"};"number"==typeof __e&&(__e=n)},8436:function(t,e){t.exports=function(){}},"86cc":function(t,e,n){var r=n("cb7c"),o=n("c69a"),i=n("6a99"),a=Object.defineProperty;e.f=n("9e1e")?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return a(t,e,n)}catch(c){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},"8aae":function(t,e,n){n("32a6"),t.exports=n("584a").Object.keys},"8e60":function(t,e,n){t.exports=!n("294c")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},"8f60":function(t,e,n){"use strict";var r=n("a159"),o=n("aebd"),i=n("45f2"),a={};n("35e8")(a,n("5168")("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(a,{next:o(1,n)}),i(t,e+" Iterator")}},9003:function(t,e,n){var r=n("6b4c");t.exports=Array.isArray||function(t){return"Array"==r(t)}},9138:function(t,e,n){t.exports=n("35e8")},9306:function(t,e,n){"use strict";var r=n("c3a1"),o=n("9aa9"),i=n("355d"),a=n("241e"),c=n("335c"),s=Object.assign;t.exports=!s||n("294c")(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=s({},t)[n]||Object.keys(s({},e)).join("")!=r})?function(t,e){var n=a(t),s=arguments.length,u=1,f=o.f,l=i.f;while(s>u){var p,d=c(arguments[u++]),h=f?r(d).concat(f(d)):r(d),v=h.length,y=0;while(v>y)l.call(d,p=h[y++])&&(n[p]=d[p])}return n}:s},9427:function(t,e,n){var r=n("63b6");r(r.S,"Object",{create:n("a159")})},"95d5":function(t,e,n){var r=n("40c3"),o=n("5168")("iterator"),i=n("481b");t.exports=n("584a").isIterable=function(t){var e=Object(t);return void 0!==e[o]||"@@iterator"in e||i.hasOwnProperty(r(e))}},"9aa9":function(t,e){e.f=Object.getOwnPropertySymbols},"9b43":function(t,e,n){var r=n("d8e8");t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},"9c6c":function(t,e,n){var r=n("2b4c")("unscopables"),o=Array.prototype;void 0==o[r]&&n("32e9")(o,r,{}),t.exports=function(t){o[r][t]=!0}},"9def":function(t,e,n){var r=n("4588"),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},"9e1e":function(t,e,n){t.exports=!n("79e5")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},a159:function(t,e,n){var r=n("e4ae"),o=n("7e90"),i=n("1691"),a=n("5559")("IE_PROTO"),c=function(){},s="prototype",u=function(){var t,e=n("1ec9")("iframe"),r=i.length,o="<",a=">";e.style.display="none",n("32fc").appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(o+"script"+a+"document.F=Object"+o+"/script"+a),t.close(),u=t.F;while(r--)delete u[s][i[r]];return u()};t.exports=Object.create||function(t,e){var n;return null!==t?(c[s]=r(t),n=new c,c[s]=null,n[a]=t):n=u(),void 0===e?n:o(n,e)}},a352:function(e,n){e.exports=t},a3c3:function(t,e,n){var r=n("63b6");r(r.S+r.F,"Object",{assign:n("9306")})},a481:function(t,e,n){"use strict";var r=n("cb7c"),o=n("4bf8"),i=n("9def"),a=n("4588"),c=n("0390"),s=n("5f1b"),u=Math.max,f=Math.min,l=Math.floor,p=/\$([$&`']|\d\d?|<[^>]*>)/g,d=/\$([$&`']|\d\d?)/g,h=function(t){return void 0===t?t:String(t)};n("214f")("replace",2,function(t,e,n,v){return[function(r,o){var i=t(this),a=void 0==r?void 0:r[e];return void 0!==a?a.call(r,i,o):n.call(String(i),r,o)},function(t,e){var o=v(n,t,this,e);if(o.done)return o.value;var l=r(t),p=String(this),d="function"===typeof e;d||(e=String(e));var g=l.global;if(g){var m=l.unicode;l.lastIndex=0}var b=[];while(1){var _=s(l,p);if(null===_)break;if(b.push(_),!g)break;var w=String(_[0]);""===w&&(l.lastIndex=c(p,i(l.lastIndex),m))}for(var x="",O=0,S=0;S=O&&(x+=p.slice(O,A)+j,O=A+$.length)}return x+p.slice(O)}];function y(t,e,r,i,a,c){var s=r+t.length,u=i.length,f=d;return void 0!==a&&(a=o(a),f=p),n.call(c,f,function(n,o){var c;switch(o.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,r);case"'":return e.slice(s);case"<":c=a[o.slice(1,-1)];break;default:var f=+o;if(0===f)return n;if(f>u){var p=l(f/10);return 0===p?n:p<=u?void 0===i[p-1]?o.charAt(1):i[p-1]+o.charAt(1):n}c=i[f-1]}return void 0===c?"":c})}})},a4bb:function(t,e,n){t.exports=n("8aae")},a745:function(t,e,n){t.exports=n("f410")},aae3:function(t,e,n){var r=n("d3f4"),o=n("2d95"),i=n("2b4c")("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},aebd:function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},b0c5:function(t,e,n){"use strict";var r=n("520a");n("5ca1")({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},b0dc:function(t,e,n){var r=n("e4ae");t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(a){var i=t["return"];throw void 0!==i&&r(i.call(t)),a}}},b447:function(t,e,n){var r=n("3a38"),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},b8e3:function(t,e){t.exports=!0},be13:function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},c366:function(t,e,n){var r=n("6821"),o=n("9def"),i=n("77f1");t.exports=function(t){return function(e,n,a){var c,s=r(e),u=o(s.length),f=i(a,u);if(t&&n!=n){while(u>f)if(c=s[f++],c!=c)return!0}else for(;u>f;f++)if((t||f in s)&&s[f]===n)return t||f||0;return!t&&-1}}},c367:function(t,e,n){"use strict";var r=n("8436"),o=n("50ed"),i=n("481b"),a=n("36c3");t.exports=n("30f1")(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},c3a1:function(t,e,n){var r=n("e6f3"),o=n("1691");t.exports=Object.keys||function(t){return r(t,o)}},c649:function(t,e,n){"use strict";(function(t){n.d(e,"c",function(){return l}),n.d(e,"a",function(){return u}),n.d(e,"b",function(){return a}),n.d(e,"d",function(){return f}),n("a481");var r=n("4aa6"),o=n.n(r);function i(){return"undefined"!==typeof window?window.console:t.console}var a=i();function c(t){var e=o()(null);return function(n){var r=e[n];return r||(e[n]=t(n))}}var s=/-(\w)/g,u=c(function(t){return t.replace(s,function(t,e){return e?e.toUpperCase():""})});function f(t){null!==t.parentElement&&t.parentElement.removeChild(t)}function l(t,e,n){var r=0===n?t.children[0]:t.children[n-1].nextSibling;t.insertBefore(e,r)}}).call(this,n("c8ba"))},c69a:function(t,e,n){t.exports=!n("9e1e")&&!n("79e5")(function(){return 7!=Object.defineProperty(n("230e")("div"),"a",{get:function(){return 7}}).a})},c8ba:function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}t.exports=n},c8bb:function(t,e,n){t.exports=n("54a1")},ca5a:function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},cb7c:function(t,e,n){var r=n("d3f4");t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},ce7e:function(t,e,n){var r=n("63b6"),o=n("584a"),i=n("294c");t.exports=function(t,e){var n=(o.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*i(function(){n(1)}),"Object",a)}},d2c8:function(t,e,n){var r=n("aae3"),o=n("be13");t.exports=function(t,e,n){if(r(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(o(t))}},d2d5:function(t,e,n){n("1654"),n("549b"),t.exports=n("584a").Array.from},d3f4:function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},d864:function(t,e,n){var r=n("79aa");t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},d8e8:function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},d9f6:function(t,e,n){var r=n("e4ae"),o=n("794b"),i=n("1bc3"),a=Object.defineProperty;e.f=n("8e60")?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return a(t,e,n)}catch(c){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},dbdb:function(t,e,n){var r=n("584a"),o=n("e53d"),i="__core-js_shared__",a=o[i]||(o[i]={});(t.exports=function(t,e){return a[t]||(a[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n("b8e3")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},dc62:function(t,e,n){n("9427");var r=n("584a").Object;t.exports=function(t,e){return r.create(t,e)}},e4ae:function(t,e,n){var r=n("f772");t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},e53d:function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},e6f3:function(t,e,n){var r=n("07e3"),o=n("36c3"),i=n("5b4e")(!1),a=n("5559")("IE_PROTO");t.exports=function(t,e){var n,c=o(t),s=0,u=[];for(n in c)n!=a&&r(c,n)&&u.push(n);while(e.length>s)r(c,n=e[s++])&&(~i(u,n)||u.push(n));return u}},f410:function(t,e,n){n("1af6"),t.exports=n("584a").Array.isArray},f559:function(t,e,n){"use strict";var r=n("5ca1"),o=n("9def"),i=n("d2c8"),a="startsWith",c=""[a];r(r.P+r.F*n("5147")(a),"String",{startsWith:function(t){var e=i(this,t,a),n=o(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return c?c.call(e,r,n):e.slice(n,n+r.length)===r}})},f772:function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},fa5b:function(t,e,n){t.exports=n("5537")("native-function-to-string",Function.toString)},fb15:function(t,e,n){"use strict";var r;n.r(e),"undefined"!==typeof window&&(r=window.document.currentScript)&&(r=r.src.match(/(.+\/)[^\/]+\.js(\?.*)?$/))&&(n.p=r[1]);var o=n("5176"),i=n.n(o),a=(n("f559"),n("a4bb")),c=n.n(a),s=(n("6762"),n("2fdb"),n("a745")),u=n.n(s);function f(t){if(u()(t))return t}var l=n("5d73"),p=n.n(l);function d(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=p()(t);!(r=(a=c.next()).done);r=!0)if(n.push(a.value),e&&n.length===e)break}catch(s){o=!0,i=s}finally{try{r||null==c["return"]||c["return"]()}finally{if(o)throw i}}return n}function h(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function v(t,e){return f(t)||d(t,e)||h()}function y(t){if(u()(t)){for(var e=0,n=new Array(t.length);e=i?o.length:o.indexOf(t)});return n?a.filter(function(t){return-1!==t}):a}function M(t,e){var n=this;this.$nextTick(function(){return n.$emit(t.toLowerCase(),e)})}function j(t){var e=this;return function(n){null!==e.realList&&e["onDrag"+t](n),M.call(e,t,n)}}function T(t){if(!t||1!==t.length)return!1;var e=v(t,1),n=e[0].componentOptions;return!!n&&["transition-group","TransitionGroup"].includes(n.tag)}function P(t,e){var n=e.header,r=e.footer,o=0,i=0;return n&&(o=n.length,t=t?[].concat(O(n),O(t)):O(n)),r&&(i=r.length,t=t?[].concat(O(t),O(r)):O(r)),{children:t,headerOffset:o,footerOffset:i}}function D(t,e){var n=null,r=function(t,e){n=C(n,t,e)},o=c()(t).filter(function(t){return"id"===t||t.startsWith("data-")}).reduce(function(e,n){return e[n]=t[n],e},{});if(r("attrs",o),!e)return n;var a=e.on,s=e.props,u=e.attrs;return r("on",a),r("props",s),i()(n.attrs,u),n}var L=["Start","Add","Remove","Update","End"],I=["Choose","Sort","Filter","Clone"],N=["Move"].concat(L,I).map(function(t){return"on"+t}),R=null,F={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:function(t){return t}},element:{type:String,default:"div"},tag:{type:String,default:null},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},H={name:"draggable",inheritAttrs:!1,props:F,data:function(){return{transitionMode:!1,noneFunctionalComponentMode:!1,init:!1}},render:function(t){var e=this.$slots.default;this.transitionMode=T(e);var n=P(e,this.$slots),r=n.children,o=n.headerOffset,i=n.footerOffset;this.headerOffset=o,this.footerOffset=i;var a=D(this.$attrs,this.componentData);return t(this.getTag(),a,r)},created:function(){null!==this.list&&null!==this.value&&A["b"].error("Value and list props are mutually exclusive! Please set one or another."),"div"!==this.element&&A["b"].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&&A["b"].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:function(){var t=this;if(this.noneFunctionalComponentMode=this.getTag().toLowerCase()!==this.$el.nodeName.toLowerCase(),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: ".concat(this.getTag()));var e={};L.forEach(function(n){e["on"+n]=j.call(t,n)}),I.forEach(function(n){e["on"+n]=M.bind(t,n)});var n=c()(this.$attrs).reduce(function(e,n){return e[Object(A["a"])(n)]=t.$attrs[n],e},{}),r=i()({},this.options,n,e,{onMove:function(e,n){return t.onDragMove(e,n)}});!("draggable"in r)&&(r.draggable=">*"),this._sortable=new $.a(this.rootContainer,r),this.computeIndexes()},beforeDestroy:function(){void 0!==this._sortable&&this._sortable.destroy()},computed:{rootContainer:function(){return this.transitionMode?this.$el.children[0]:this.$el},realList:function(){return this.list?this.list:this.value}},watch:{options:{handler:function(t){this.updateOptions(t)},deep:!0},$attrs:{handler:function(t){this.updateOptions(t)},deep:!0},realList:function(){this.computeIndexes()}},methods:{getTag:function(){return this.tag||this.element},updateOptions:function(t){for(var e in t){var n=Object(A["a"])(e);-1===N.indexOf(n)&&this._sortable.option(n,t[e])}},getChildrenNodes:function(){if(this.init||(this.noneFunctionalComponentMode=this.noneFunctionalComponentMode&&1===this.$children.length,this.init=!0),this.noneFunctionalComponentMode)return this.$children[0].$slots.default;var t=this.$slots.default;return this.transitionMode?t[0].child.$slots.default:t},computeIndexes:function(){var t=this;this.$nextTick(function(){t.visibleIndexes=E(t.getChildrenNodes(),t.rootContainer.children,t.transitionMode,t.footerOffset)})},getUnderlyingVm:function(t){var e=k(this.getChildrenNodes()||[],t);if(-1===e)return null;var n=this.realList[e];return{index:e,element:n}},getUnderlyingPotencialDraggableComponent:function(t){var e=t.__vue__;return e&&e.$options&&"transition-group"===e.$options._componentTag?e.$parent:e},emitChanges:function(t){var e=this;this.$nextTick(function(){e.$emit("change",t)})},alterList:function(t){if(this.list)t(this.list);else{var e=O(this.value);t(e),this.$emit("input",e)}},spliceList:function(){var t=arguments,e=function(e){return e.splice.apply(e,O(t))};this.alterList(e)},updatePosition:function(t,e){var n=function(n){return n.splice(e,0,n.splice(t,1)[0])};this.alterList(n)},getRelatedContextFromMoveEvent:function(t){var e=t.to,n=t.related,r=this.getUnderlyingPotencialDraggableComponent(e);if(!r)return{component:r};var o=r.realList,a={list:o,component:r};if(e!==n&&o&&r.getUnderlyingVm){var c=r.getUnderlyingVm(n);if(c)return i()(c,a)}return a},getVmIndex:function(t){var e=this.visibleIndexes,n=e.length;return t>n-1?n:e[t]},getComponent:function(){return this.$slots.default[0].componentInstance},resetTransitionData:function(t){if(this.noTransitionOnDrag&&this.transitionMode){var e=this.getChildrenNodes();e[t].data=null;var n=this.getComponent();n.children=[],n.kept=void 0}},onDragStart:function(t){this.context=this.getUnderlyingVm(t.item),t.item._underlying_vm_=this.clone(this.context.element),R=t.item},onDragAdd:function(t){var e=t.item._underlying_vm_;if(void 0!==e){Object(A["d"])(t.item);var n=this.getVmIndex(t.newIndex);this.spliceList(n,0,e),this.computeIndexes();var r={element:e,newIndex:n};this.emitChanges({added:r})}},onDragRemove:function(t){if(Object(A["c"])(this.rootContainer,t.item,t.oldIndex),"clone"!==t.pullMode){var e=this.context.index;this.spliceList(e,1);var n={element:this.context.element,oldIndex:e};this.resetTransitionData(e),this.emitChanges({removed:n})}else Object(A["d"])(t.clone)},onDragUpdate:function(t){Object(A["d"])(t.item),Object(A["c"])(t.from,t.item,t.oldIndex);var e=this.context.index,n=this.getVmIndex(t.newIndex);this.updatePosition(e,n);var r={element:this.context.element,oldIndex:e,newIndex:n};this.emitChanges({moved:r})},updateProperty:function(t,e){t.hasOwnProperty(e)&&(t[e]+=this.headerOffset)},computeFutureIndex:function(t,e){if(!t.element)return 0;var n=O(e.to.children).filter(function(t){return"none"!==t.style["display"]}),r=n.indexOf(e.related),o=t.component.getVmIndex(r),i=-1!==n.indexOf(R);return i||!e.willInsertAfter?o:o+1},onDragMove:function(t,e){var n=this.move;if(!n||!this.realList)return!0;var r=this.getRelatedContextFromMoveEvent(t),o=this.context,a=this.computeFutureIndex(r,t);i()(o,{futureIndex:a});var c=i()({},t,{relatedContext:r,draggedContext:o});return n(c,e)},onDragEnd:function(){this.computeIndexes(),R=null}}};"undefined"!==typeof window&&"Vue"in window&&window.Vue.component("draggable",H);var z=H;e["default"]=z}})["default"]})},"19e9":function(t,e,n){var r,o,i; /*! autosize 4.0.2 license: MIT @@ -27,15 +27,15 @@ * @author owenm * @license MIT */ -(function(i){"use strict";r=i,o="function"===typeof r?r.call(e,n,e,t):r,void 0===o||(t.exports=o)})(function(){"use strict";if("undefined"===typeof window||!window.document)return function(){throw new Error("Sortable.js requires a window with a document")};var t,e,n,r,o,i,a,c,s,u,f,l,p,d,h,v,y,g,m,b,_,w,x,O,S,$,A=[],C=!1,k=!1,E=!1,M=[],j=!1,T=!1,P=[],D=/\s+/g,L="Sortable"+(new Date).getTime(),I=window,N=I.document,R=I.parseInt,F=I.setTimeout,z=I.jQuery||I.Zepto,H=I.Polymer,U={capture:!1,passive:!1},V=!!navigator.userAgent.match(/(?:Trident.*rv[ :]?11\.|msie|iemobile)/i),B=!!navigator.userAgent.match(/Edge/i),Y=!!navigator.userAgent.match(/firefox/i),q=!(!navigator.userAgent.match(/safari/i)||navigator.userAgent.match(/chrome/i)||navigator.userAgent.match(/android/i)),W=!!navigator.userAgent.match(/iP(ad|od|hone)/i),G=W,K=B||V?"cssFloat":"float",X="draggable"in N.createElement("div"),J=function(){if(V)return!1;var t=N.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}(),Z=!1,Q=!1,tt=Math.abs,et=Math.min,nt=Math.max,rt=[],ot=function(t,e){var n=kt(t),r=R(n.width)-R(n.paddingLeft)-R(n.paddingRight)-R(n.borderLeftWidth)-R(n.borderRightWidth),o=Lt(t,0,e),i=Lt(t,1,e),a=o&&kt(o),c=i&&kt(i),s=a&&R(a.marginLeft)+R(a.marginRight)+Xt(o).width,u=c&&R(c.marginLeft)+R(c.marginRight)+Xt(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&&"none"!==a.float){var f="left"===a.float?"left":"right";return!i||"both"!==c.clear&&c.clear!==f?"horizontal":"vertical"}return o&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||s>=r&&"none"===n[K]||i&&"none"===n[K]&&s+u>r)?"vertical":"horizontal"},it=function(t,e){for(var n=0;n=r.left-o&&t<=r.right+o,a=e>=r.top-o&&e<=r.bottom+o;if(i&&a)return M[n]}},at=function(t,e,n,r,o){var i=Xt(n),a="vertical"===r?i.left:i.top,c="vertical"===r?i.right:i.bottom,s="vertical"===r?t:e;return a-1}}var n={},r=t.group;r&&"object"==typeof 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},ht=function(e){t&&t.parentNode&&t.parentNode[L]&&t.parentNode[L]._computeIsAligned(e)},vt=function(t,e){var n=e;while(!n[L])n=n.parentNode;return t===n},yt=function(t,e,n){var r=t.parentNode;while(r&&!r[L])r=r.parentNode;r&&r[L][n](Yt(e,{artificialBubble:!0}))},gt=function(){!J&&n&&kt(n,"display","none")},mt=function(){!J&&n&&kt(n,"display","")};N.addEventListener("click",function(t){if(E)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),E=!1,!1},!0);var bt,_t=function(e){if(e=e.touches?e.touches[0]:e,t){var n=it(e.clientX,e.clientY);n&&n[L]._onDragOver({clientX:e.clientX,clientY:e.clientY,target:n,rootEl:n})}};function wt(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be HTMLElement, not "+{}.toString.call(t);this.el=t,this.options=e=Yt({},e),t[L]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,scroll:!0,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0,draggable:/[uo]l/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return ot(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,touchStartThreshold:R(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==wt.supportPointer&&("PointerEvent"in window||window.navigator&&"msPointerEnabled"in window.navigator),emptyInsertThreshold:5};for(var r in n)!(r in e)&&(e[r]=n[r]);for(var o in dt(e),this)"_"===o.charAt(0)&&"function"===typeof this[o]&&(this[o]=this[o].bind(this));this.nativeDraggable=!e.forceFallback&&X,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?$t(t,"pointerdown",this._onTapStart):($t(t,"mousedown",this._onTapStart),$t(t,"touchstart",this._onTapStart)),this.nativeDraggable&&($t(t,"dragover",this),$t(t,"dragenter",this)),M.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[])}function xt(t,e,n,r){if(t){n=n||N;do{if(null!=e&&(">"===e[0]&&t.parentNode===n&&Ut(t,e.substring(1))||Ut(t,e))||r&&t===n)return t;if(t===n)break}while(t=Ot(t))}return null}function Ot(t){return t.host&&t!==N&&t.host.nodeType?t.host:t.parentNode}function St(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}function $t(t,e,n){t.addEventListener(e,n,U)}function At(t,e,n){t.removeEventListener(e,n,U)}function Ct(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var r=(" "+t.className+" ").replace(D," ").replace(" "+e+" "," ");t.className=(r+(n?" "+e:"")).replace(D," ")}}function kt(t,e,n){var r=t&&t.style;if(r){if(void 0===n)return N.defaultView&&N.defaultView.getComputedStyle?n=N.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 Et(t){var e="";do{var n=kt(t,"transform");n&&"none"!==n&&(e=n+" "+e)}while(t=t.parentNode);return window.DOMMatrix?new DOMMatrix(e):window.WebKitCSSMatrix?new WebKitCSSMatrix(e):window.CSSMatrix?new CSSMatrix(e):void 0}function Mt(t,e,n){if(t){var r=t.getElementsByTagName(e),o=0,i=r.length;if(n)for(;os+u||i<=s&&o>a&&i>=c:o>a&&i>c||o<=a&&i>s+u}function Rt(e,n,r,o,i,a,c){var s=Xt(n),u="vertical"===r?e.clientY:e.clientX,f="vertical"===r?s.height:s.width,l="vertical"===r?s.top:s.left,p="vertical"===r?s.bottom:s.right,d=Xt(t),h=!1;if(!a)if(c&&Ol+f*i/2:up-O)return-1*w}else if(u>l+f*(1-o)/2&&up-f*i/2)?u>l+f/2?1:-1:0}function Ft(e){var n=Ht(t),r=Ht(e);return n=i:r<=i,!o)return n;if(n===ut())break;n=st(n,!1)}return!1}function Zt(t){var e=0,n=0,r=ut();if(t)do{var o=Et(t),i=o.a,a=o.d;e+=t.scrollLeft*i,n+=t.scrollTop*a}while(t!==r&&(t=t.parentNode));return[e,n]}return $t(N,"dragover",_t),$t(N,"mousemove",_t),$t(N,"touchmove",_t),wt.prototype={constructor:wt,_computeIsAligned:function(e){var r;if(n&&!J?(gt(),r=N.elementFromPoint(e.clientX,e.clientY),mt()):r=e.target,r=xt(r,this.options.draggable,this.el,!1),!Q&&t&&t.parentNode===this.el){for(var o=this.el.children,i=0;i=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){t&&Pt(t),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;At(t,"mouseup",this._disableDelayedDrag),At(t,"touchend",this._disableDelayedDrag),At(t,"touchcancel",this._disableDelayedDrag),At(t,"mousemove",this._delayedDragTouchMoveHandler),At(t,"touchmove",this._delayedDragTouchMoveHandler),At(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,n){n=n||("touch"==e.pointerType?e:null),!this.nativeDraggable||n?this.options.supportPointer?$t(N,"pointermove",this._onTouchMove):$t(N,n?"touchmove":"mousemove",this._onTouchMove):($t(t,"dragend",this),$t(o,"dragstart",this._onDragStart));try{N.selection?Gt(function(){N.selection.empty()}):window.getSelection().removeAllRanges()}catch(r){}},_dragStarted:function(e,n){if(k=!1,o&&t){this.nativeDraggable&&($t(N,"dragover",this._handleAutoScroll),$t(N,"dragover",ht));var r=this.options;!e&&Ct(t,r.dragClass,!1),Ct(t,r.ghostClass,!0),kt(t,"transform",""),wt.active=this,e&&this._appendGhost(),jt(this,o,"start",t,o,o,f,void 0,n)}else this._nulling()},_emulateDragOver:function(e){if(m){if(this._lastX===m.clientX&&this._lastY===m.clientY&&!e)return;this._lastX=m.clientX,this._lastY=m.clientY,gt();var n=N.elementFromPoint(m.clientX,m.clientY),r=n;while(n&&n.shadowRoot)n=n.shadowRoot.elementFromPoint(m.clientX,m.clientY),r=n;if(r)do{var o;if(r[L])if(o=r[L]._onDragOver({clientX:m.clientX,clientY:m.clientY,target:n,rootEl:r}),o&&!this.options.dragoverBubble)break;n=r}while(r=r.parentNode);t.parentNode[L]._computeIsAligned(m),mt()}},_onTouchMove:function(t,e){if(g){var r=this.options,o=r.fallbackTolerance,i=r.fallbackOffset,a=t.touches?t.touches[0]:t,c=n&&Et(n),s=n&&c&&c.a,u=n&&c&&c.d,f=G&&S&&Zt(S),l=(a.clientX-g.clientX+i.x)/(s||1)+(f?f[0]-P[0]:0)/(s||1),p=(a.clientY-g.clientY+i.y)/(u||1)+(f?f[1]-P[1]:0)/(u||1),d=t.touches?"translate3d("+l+"px,"+p+"px,0)":"translate("+l+"px,"+p+"px)";if(!wt.active&&!k){if(o&&et(tt(a.clientX-this._lastX),tt(a.clientY-this._lastY))=0&&(jt(null,e,"add",t,e,o,f,l,a),jt(this,o,"remove",t,e,o,f,l,a),jt(null,e,"sort",t,e,o,f,l,a),jt(this,o,"sort",t,e,o,f,l,a)),d&&d.save()):t.nextSibling!==i&&(l=Ht(t,s.draggable),l>=0&&(jt(this,o,"update",t,e,o,f,l,a),jt(this,o,"sort",t,e,o,f,l,a))),wt.active&&(null!=l&&-1!==l||(l=f),jt(this,o,"end",t,e,o,f,l,a),this.save()))),this._nulling()},_nulling:function(){o=t=e=n=i=r=a=c=s=A.length=h=v=y=g=m=b=l=f=_=w=$=d=p=wt.active=null,rt.forEach(function(t){t.checked=!0}),rt.length=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":t&&(this._onDragOver(e),St(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var t,e=[],n=this.el.children,r=0,o=n.length,i=this.options;rb;b++)if(y=e?m(a(h=t[b])[0],h[1]):m(t[b]),y===u||y===f)return y}else for(v=g.call(t);!(h=v.next()).done;)if(y=o(v,m,h.value,e),y===u||y===f)return y};e.BREAK=u,e.RETURN=f},"565d":function(t,e,n){var r=n("6a9b"),o=n("d876").f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],c=function(t){try{return o(t)}catch(e){return a.slice()}};t.exports.f=function(t){return a&&"[object Window]"==i.call(t)?c(t):o(r(t))}},5698:function(t,e,n){n("d256"),t.exports=n("a7d3").Object.getOwnPropertySymbols},"569f":function(t,e,n){var r=n("b808"),o=n("ca38"),i=n("a0a8"),a=n("1f51"),c=n("a9f2"),s="prototype",u=function(t,e,n){var f,l,p,d,h=t&u.F,v=t&u.G,y=t&u.S,g=t&u.P,m=t&u.B,b=v?r:y?r[e]||(r[e]={}):(r[e]||{})[s],_=v?o:o[e]||(o[e]={}),w=_[s]||(_[s]={});for(f in v&&(n=e),n)l=!h&&b&&void 0!==b[f],p=(l?b:n)[f],d=m&&l?c(p,r):g&&"function"==typeof p?c(Function.call,p):p,b&&a(b,f,p,t&u.U),_[f]!=p&&i(_,f,d),g&&w[f]!=p&&(w[f]=p)};r.core=o,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},"57f7":function(t,e,n){n("93c4"),n("6109"),t.exports=n("a7d3").Array.from},"58b9":function(t,e,n){var r=n("d43f"),o=n("0244");t.exports=function(t){return r(o(t))}},5927:function(t,e,n){n("93c4"),n("b42c"),t.exports=n("fda1").f("iterator")},"59ad":function(t,e,n){t.exports=n("0965")},"5a0c":function(t,e,n){!function(e,n){t.exports=n()}(0,function(){"use strict";var t="millisecond",e="second",n="minute",r="hour",o="day",i="week",a="month",c="quarter",s="year",u=/^(\d{4})-?(\d{1,2})-?(\d{0,2})[^0-9]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?.?(\d{1,3})?$/,f=/\[([^\]]+)]|Y{2,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,l=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},p={s:l,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),o=n%60;return(e<=0?"+":"-")+l(r,2,"0")+":"+l(o,2,"0")},m:function(t,e){var n=12*(e.year()-t.year())+(e.month()-t.month()),r=t.clone().add(n,a),o=e-r<0,i=t.clone().add(n+(o?-1:1),a);return Number(-(n+(e-r)/(o?r-i:i-r))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(u){return{M:a,y:s,w:i,d:o,h:r,m:n,s:e,ms:t,Q:c}[u]||String(u||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},d={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},h="en",v={};v[h]=d;var y=function(t){return t instanceof _},g=function(t,e,n){var r;if(!t)return null;if("string"==typeof t)v[t]&&(r=t),e&&(v[t]=e,r=t);else{var o=t.name;v[o]=t,r=o}return n||(h=r),r},m=function(t,e,n){if(y(t))return t.clone();var r=e?"string"==typeof e?{format:e,pl:n}:e:{};return r.date=t,new _(r)},b=p;b.l=g,b.i=y,b.w=function(t,e){return m(t,{locale:e.$L,utc:e.$u})};var _=function(){function l(t){this.$L=this.$L||g(t.locale,null,!0)||h,this.parse(t)}var p=l.prototype;return p.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(u);if(r)return n?new Date(Date.UTC(r[1],r[2]-1,r[3]||1,r[4]||0,r[5]||0,r[6]||0,r[7]||0)):new Date(r[1],r[2]-1,r[3]||1,r[4]||0,r[5]||0,r[6]||0,r[7]||0)}return new Date(e)}(t),this.init()},p.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},p.$utils=function(){return b},p.isValid=function(){return!("Invalid Date"===this.$d.toString())},p.isSame=function(t,e){var n=m(t);return this.startOf(e)<=n&&n<=this.endOf(e)},p.isAfter=function(t,e){return m(t)i)a(n[i++]);t._c=[],t._n=!1,e&&!t._h&&L(t)})}},L=function(t){g.call(s,function(){var e,n,r,o=t._v,i=I(t);if(i&&(e=_(function(){E?$.emit("unhandledRejection",o,t):(n=s.onunhandledrejection)?n({promise:t,reason:o}):(r=s.console)&&r.error&&r.error("Unhandled promise rejection",o)}),t._h=E||I(t)?2:1),t._a=void 0,i&&e.e)throw e.v})},I=function(t){return 1!==t._h&&0===(t._a||t._c).length},N=function(t){g.call(s,function(){var e;E?$.emit("rejectionHandled",t):(e=s.onrejectionhandled)&&e({promise:t,reason:t._v})})},R=function(t){var e=this;e._d||(e._d=!0,e=e._w||e,e._v=t,e._s=2,e._a||(e._a=e._c.slice()),D(e,!0))},F=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw S("Promise can't be resolved itself");(e=P(t))?m(function(){var r={_w:n,_d:!1};try{e.call(t,u(F,r,1),u(R,r,1))}catch(o){R.call(r,o)}}):(n._v=t,n._s=1,D(n,!1))}catch(r){R.call({_w:n,_d:!1},r)}}};T||(k=function(t){h(this,k,O,"_h"),d(t),r.call(this);try{t(u(F,this,1),u(R,this,1))}catch(e){R.call(this,e)}},r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},r.prototype=n("3904")(k.prototype,{then:function(t,e){var n=j(y(this,k));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=E?$.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&D(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new r;this.promise=t,this.resolve=u(F,t,1),this.reject=u(R,t,1)},b.f=j=function(t){return t===k||t===a?new i(t):o(t)}),l(l.G+l.W+l.F*!T,{Promise:k}),n("c0d8")(k,O),n("1be4")(O),a=n("a7d3")[O],l(l.S+l.F*!T,O,{reject:function(t){var e=j(this),n=e.reject;return n(t),e.promise}}),l(l.S+l.F*(c||!T),O,{resolve:function(t){return x(c&&this===a?k:this,t)}}),l(l.S+l.F*!(T&&n("436c")(function(t){k.all(t)["catch"](M)})),O,{all:function(t){var e=this,n=j(e),r=n.resolve,o=n.reject,i=_(function(){var n=[],i=0,a=1;v(t,!1,function(t){var c=i++,s=!1;n.push(void 0),a++,e.resolve(t).then(function(t){s||(s=!0,n[c]=t,--a||r(n))},o)}),--a||r(n)});return i.e&&o(i.v),n.promise},race:function(t){var e=this,n=j(e),r=n.reject,o=_(function(){v(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return o.e&&r(o.v),n.promise}})},"5ca1":function(t,e,n){var r=n("7726"),o=n("8378"),i=n("32e9"),a=n("2aba"),c=n("9b43"),s="prototype",u=function(t,e,n){var f,l,p,d,h=t&u.F,v=t&u.G,y=t&u.S,g=t&u.P,m=t&u.B,b=v?r:y?r[e]||(r[e]={}):(r[e]||{})[s],_=v?o:o[e]||(o[e]={}),w=_[s]||(_[s]={});for(f in v&&(n=e),n)l=!h&&b&&void 0!==b[f],p=(l?b:n)[f],d=m&&l?c(p,r):g&&"function"==typeof p?c(Function.call,p):p,b&&a(b,f,p,t&u.U),_[f]!=p&&i(_,f,d),g&&w[f]!=p&&(w[f]=p)};r.core=o,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},"5ce7":function(t,e,n){"use strict";var r=n("7108"),o=n("f845"),i=n("c0d8"),a={};n("8ce0")(a,n("1b55")("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(a,{next:o(1,n)}),i(t,e+" Iterator")}},"5d58":function(t,e,n){t.exports=n("5927")},"5d73":function(t,e,n){t.exports=n("0a91")},"5d75":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("78ef"),o=/(^$|^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$)/;e.default=(0,r.regex)("email",o)},"5d8f":function(t,e,n){var r=n("7772")("keys"),o=n("7b00");t.exports=function(t){return r[t]||(r[t]=o(t))}},"5db3":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("78ef");e.default=function(t){return(0,r.withParams)({type:"minLength",min:t},function(e){return!(0,r.req)(e)||(0,r.len)(e)>=t})}},"5dbc":function(t,e,n){var r=n("d3f4"),o=n("8b97").set;t.exports=function(t,e,n){var i,a=e.constructor;return a!==n&&"function"==typeof a&&(i=a.prototype)!==n.prototype&&r(i)&&o&&o(t,i),t}},"5f1b":function(t,e,n){"use strict";var r=n("23c6"),o=RegExp.prototype.exec;t.exports=function(t,e){var n=t.exec;if("function"===typeof n){var i=n.call(t,e);if("object"!==typeof i)throw new TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==r(t))throw new TypeError("RegExp#exec called on incompatible receiver");return o.call(t,e)}},6109:function(t,e,n){"use strict";var r=n("bc25"),o=n("d13f"),i=n("0185"),a=n("9c93"),c=n("c227"),s=n("a5ab"),u=n("b3ec"),f=n("f159");o(o.S+o.F*!n("436c")(function(t){Array.from(t)}),"Array",{from:function(t){var e,n,o,l,p=i(t),d="function"==typeof this?this:Array,h=arguments.length,v=h>1?arguments[1]:void 0,y=void 0!==v,g=0,m=f(p);if(y&&(v=r(v,h>2?arguments[2]:void 0,2)),void 0==m||d==Array&&c(m))for(e=s(p.length),n=new d(e);e>g;g++)u(n,g,y?v(p[g],g):p[g]);else for(l=m.call(p),n=new d;!(o=l.next()).done;g++)u(n,g,y?a(l,v,[o.value,g],!0):o.value);return n.length=g,n}})},"613b":function(t,e,n){var r=n("5537")("keys"),o=n("ca5a");t.exports=function(t){return r[t]||(r[t]=o(t))}},6235:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("78ef");e.default=(0,r.regex)("alpha",/^[a-zA-Z]*$/)},"626a":function(t,e,n){var r=n("2d95");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},"626e":function(t,e,n){var r=n("d74e"),o=n("f845"),i=n("6a9b"),a=n("2ea1"),c=n("43c8"),s=n("a47f"),u=Object.getOwnPropertyDescriptor;e.f=n("7d95")?u:function(t,e){if(t=i(t),e=a(e,!0),s)try{return u(t,e)}catch(n){}if(c(t,e))return o(!r.f.call(t,e),t[e])}},6277:function(t,e,n){var r=n("7b00")("meta"),o=n("6f8a"),i=n("43c8"),a=n("3adc").f,c=0,s=Object.isExtensible||function(){return!0},u=!n("d782")(function(){return s(Object.preventExtensions({}))}),f=function(t){a(t,r,{value:{i:"O"+ ++c,w:{}}})},l=function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,r)){if(!s(t))return"F";if(!e)return"E";f(t)}return t[r].i},p=function(t,e){if(!i(t,r)){if(!s(t))return!0;if(!e)return!1;f(t)}return t[r].w},d=function(t){return u&&h.NEED&&s(t)&&!i(t,r)&&f(t),t},h=t.exports={KEY:r,NEED:!1,fastKey:l,getWeak:p,onFreeze:d}},"633a":function(t,e,n){var r=n("d13f"),o=n("e5fa"),i=n("d782"),a=n("702a"),c="["+a+"]",s="​…",u=RegExp("^"+c+c+"*"),f=RegExp(c+c+"*$"),l=function(t,e,n){var o={},c=i(function(){return!!a[t]()||s[t]()!=s}),u=o[t]=c?e(p):a[t];n&&(o[n]=u),r(r.P+r.F*c,"String",o)},p=l.trim=function(t,e){return t=String(o(t)),1&e&&(t=t.replace(u,"")),2&e&&(t=t.replace(f,"")),t};t.exports=l},6762:function(t,e,n){"use strict";var r=n("5ca1"),o=n("c366")(!0);r(r.P,"Array",{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),n("9c6c")("includes")},"67bb":function(t,e,n){t.exports=n("b258")},6821:function(t,e,n){var r=n("626a"),o=n("be13");t.exports=function(t){return r(o(t))}},"696b":function(t,e){e.f=Object.getOwnPropertySymbols},"69a8":function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},"6a99":function(t,e,n){var r=n("d3f4");t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},"6a9b":function(t,e,n){var r=n("8bab"),o=n("e5fa");t.exports=function(t){return r(o(t))}},"6b54":function(t,e,n){"use strict";n("3846");var r=n("cb7c"),o=n("0bfb"),i=n("9e1e"),a="toString",c=/./[a],s=function(t){n("2aba")(RegExp.prototype,a,t,!0)};n("79e5")(function(){return"/a/b"!=c.call({source:"a",flags:"b"})})?s(function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!i&&t instanceof RegExp?o.call(t):void 0)}):c.name!=a&&s(function(){return c.call(this)})},"6e1f":function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},"6f8a":function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},"702a":function(t,e){t.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},7108:function(t,e,n){var r=n("0f89"),o=n("f568"),i=n("0029"),a=n("5d8f")("IE_PROTO"),c=function(){},s="prototype",u=function(){var t,e=n("12fd")("iframe"),r=i.length,o="<",a=">";e.style.display="none",n("103a").appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(o+"script"+a+"document.F=Object"+o+"/script"+a),t.close(),u=t.F;while(r--)delete u[s][i[r]];return u()};t.exports=Object.create||function(t,e){var n;return null!==t?(c[s]=r(t),n=new c,c[s]=null,n[a]=t):n=u(),void 0===e?n:o(n,e)}},"71fa":function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},"73c3":function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(e){return{e:!0,v:e}}}},"75c9":function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(e){return{e:!0,v:e}}}},"75fc":function(t,e,n){"use strict";var r=n("a745"),o=n.n(r);function i(t){if(o()(t)){for(var e=0,n=new Array(t.length);e>>0||(a.test(n)?16:10))}:r},7726:function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},"772d":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("78ef"),o=/^(?:(?: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-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})))(?::\d{2,5})?(?:[\/?#]\S*)?$/i;e.default=(0,r.regex)("url",o)},"774e":function(t,e,n){t.exports=n("57f7")},7772:function(t,e,n){var r=n("a7d3"),o=n("da3c"),i="__core-js_shared__",a=o[i]||(o[i]={});(t.exports=function(t,e){return a[t]||(a[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n("b457")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},"77f1":function(t,e,n){var r=n("4588"),o=Math.max,i=Math.min;t.exports=function(t,e){return t=r(t),t<0?o(t+e,0):i(t,e)}},"781f":function(t,e,n){var r=n("ab4c"),o=n("b808").document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},"78ef":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.regex=e.ref=e.len=e.req=e.withParams=void 0;var r=n("8750"),o=i(r);function i(t){return t&&t.__esModule?t:{default:t}}e.withParams=o.default;var a=e.req=function(t){if(Array.isArray(t))return!!t.length;if(void 0===t||null===t||!1===t)return!1;if(t instanceof Date)return!isNaN(t.getTime());if("object"===typeof t){for(var e in t)return!0;return!1}return!!String(t).length};e.len=function(t){return Array.isArray(t)?t.length:"object"===typeof t?Object.keys(t).length:String(t).length},e.ref=function(t,e,n){return"function"===typeof t?t.call(e,n):n[t]},e.regex=function(t,e){return(0,o.default)({type:t},function(t){return!a(t)||e.test(t)})}},"795b":function(t,e,n){t.exports=n("dd04")},"79e5":function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},"7a56":function(t,e,n){"use strict";var r=n("7726"),o=n("86cc"),i=n("9e1e"),a=n("2b4c")("species");t.exports=function(t){var e=r[t];i&&e&&!e[a]&&o.f(e,a,{configurable:!0,get:function(){return this}})}},"7b00":function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},"7d8a":function(t,e,n){var r=n("6e1f"),o=n("1b55")("toStringTag"),i="Arguments"==r(function(){return arguments}()),a=function(t,e){try{return t[e]}catch(n){}};t.exports=function(t){var e,n,c;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=a(e=Object(t),o))?n:i?r(e):"Object"==(c=r(e))&&"function"==typeof e.callee?"Arguments":c}},"7d95":function(t,e,n){t.exports=!n("d782")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},"7f20":function(t,e,n){var r=n("86cc").f,o=n("69a8"),i=n("2b4c")("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},"7f7f":function(t,e,n){var r=n("86cc").f,o=Function.prototype,i=/^\s*function ([^ (]*)/,a="name";a in o||n("9e1e")&&r(o,a,{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(t){return""}}})},8115:function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},"81ee":function(t,e,n){n("9a51"),t.exports=n("a7d3").Object.assign},8378:function(t,e){var n=t.exports={version:"2.6.0"};"number"==typeof __e&&(__e=n)},"83a1":function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t===1/e:t!=t&&e!=e}},"84f2":function(t,e){t.exports={}},"85f2":function(t,e,n){t.exports=n("ec5b")},"86cc":function(t,e,n){var r=n("cb7c"),o=n("c69a"),i=n("6a99"),a=Object.defineProperty;e.f=n("9e1e")?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return a(t,e,n)}catch(c){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},8750:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("0234").withParams;e.default=r},"88b8":function(t,e,n){var r=n("a9f2"),o=n("1d27"),i=n("f26d"),a=n("27b2"),c=n("04cf"),s=n("b36f"),u={},f={};e=t.exports=function(t,e,n,l,p){var d,h,v,y,g=p?function(){return t}:s(t),m=r(n,l,e?2:1),b=0;if("function"!=typeof g)throw TypeError(t+" is not iterable!");if(i(g)){for(d=c(t.length);d>b;b++)if(y=e?m(a(h=t[b])[0],h[1]):m(t[b]),y===u||y===f)return y}else for(v=g.call(t);!(h=v.next()).done;)if(y=o(v,m,h.value,e),y===u||y===f)return y};e.BREAK=u,e.RETURN=f},"89ca":function(t,e,n){n("b42c"),n("93c4"),t.exports=n("d38f")},"8a12":function(t,e,n){var r=n("da3c"),o=r.navigator;t.exports=o&&o.userAgent||""},"8b97":function(t,e,n){var r=n("d3f4"),o=n("cb7c"),i=function(t,e){if(o(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{r=n("9b43")(Function.call,n("11e9").f(Object.prototype,"__proto__").set,2),r(t,[]),e=!(t instanceof Array)}catch(o){e=!0}return function(t,n){return i(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:i}},"8bab":function(t,e,n){var r=n("6e1f");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},"8c4f":function(t,e,n){"use strict"; +(function(i){"use strict";r=i,o="function"===typeof r?r.call(e,n,e,t):r,void 0===o||(t.exports=o)})(function(){"use strict";if("undefined"===typeof window||!window.document)return function(){throw new Error("Sortable.js requires a window with a document")};var t,e,n,r,o,i,a,c,s,u,f,l,p,d,h,v,y,g,m,b,_,w,x,O,S,$,A=[],C=!1,k=!1,E=!1,M=[],j=!1,T=!1,P=[],D=/\s+/g,L="Sortable"+(new Date).getTime(),I=window,N=I.document,R=I.parseInt,F=I.setTimeout,H=I.jQuery||I.Zepto,z=I.Polymer,V={capture:!1,passive:!1},B=!!navigator.userAgent.match(/(?:Trident.*rv[ :]?11\.|msie|iemobile)/i),U=!!navigator.userAgent.match(/Edge/i),Y=!!navigator.userAgent.match(/firefox/i),q=!(!navigator.userAgent.match(/safari/i)||navigator.userAgent.match(/chrome/i)||navigator.userAgent.match(/android/i)),W=!!navigator.userAgent.match(/iP(ad|od|hone)/i),G=W,K=U||B?"cssFloat":"float",X="draggable"in N.createElement("div"),J=function(){if(B)return!1;var t=N.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}(),Z=!1,Q=!1,tt=Math.abs,et=Math.min,nt=Math.max,rt=[],ot=function(t,e){var n=kt(t),r=R(n.width)-R(n.paddingLeft)-R(n.paddingRight)-R(n.borderLeftWidth)-R(n.borderRightWidth),o=Lt(t,0,e),i=Lt(t,1,e),a=o&&kt(o),c=i&&kt(i),s=a&&R(a.marginLeft)+R(a.marginRight)+Xt(o).width,u=c&&R(c.marginLeft)+R(c.marginRight)+Xt(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&&"none"!==a.float){var f="left"===a.float?"left":"right";return!i||"both"!==c.clear&&c.clear!==f?"horizontal":"vertical"}return o&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||s>=r&&"none"===n[K]||i&&"none"===n[K]&&s+u>r)?"vertical":"horizontal"},it=function(t,e){for(var n=0;n=r.left-o&&t<=r.right+o,a=e>=r.top-o&&e<=r.bottom+o;if(i&&a)return M[n]}},at=function(t,e,n,r,o){var i=Xt(n),a="vertical"===r?i.left:i.top,c="vertical"===r?i.right:i.bottom,s="vertical"===r?t:e;return a-1}}var n={},r=t.group;r&&"object"==typeof 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},ht=function(e){t&&t.parentNode&&t.parentNode[L]&&t.parentNode[L]._computeIsAligned(e)},vt=function(t,e){var n=e;while(!n[L])n=n.parentNode;return t===n},yt=function(t,e,n){var r=t.parentNode;while(r&&!r[L])r=r.parentNode;r&&r[L][n](Yt(e,{artificialBubble:!0}))},gt=function(){!J&&n&&kt(n,"display","none")},mt=function(){!J&&n&&kt(n,"display","")};N.addEventListener("click",function(t){if(E)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),E=!1,!1},!0);var bt,_t=function(e){if(e=e.touches?e.touches[0]:e,t){var n=it(e.clientX,e.clientY);n&&n[L]._onDragOver({clientX:e.clientX,clientY:e.clientY,target:n,rootEl:n})}};function wt(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be HTMLElement, not "+{}.toString.call(t);this.el=t,this.options=e=Yt({},e),t[L]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,scroll:!0,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0,draggable:/[uo]l/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return ot(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,touchStartThreshold:R(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==wt.supportPointer&&("PointerEvent"in window||window.navigator&&"msPointerEnabled"in window.navigator),emptyInsertThreshold:5};for(var r in n)!(r in e)&&(e[r]=n[r]);for(var o in dt(e),this)"_"===o.charAt(0)&&"function"===typeof this[o]&&(this[o]=this[o].bind(this));this.nativeDraggable=!e.forceFallback&&X,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?$t(t,"pointerdown",this._onTapStart):($t(t,"mousedown",this._onTapStart),$t(t,"touchstart",this._onTapStart)),this.nativeDraggable&&($t(t,"dragover",this),$t(t,"dragenter",this)),M.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[])}function xt(t,e,n,r){if(t){n=n||N;do{if(null!=e&&(">"===e[0]&&t.parentNode===n&&Vt(t,e.substring(1))||Vt(t,e))||r&&t===n)return t;if(t===n)break}while(t=Ot(t))}return null}function Ot(t){return t.host&&t!==N&&t.host.nodeType?t.host:t.parentNode}function St(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}function $t(t,e,n){t.addEventListener(e,n,V)}function At(t,e,n){t.removeEventListener(e,n,V)}function Ct(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var r=(" "+t.className+" ").replace(D," ").replace(" "+e+" "," ");t.className=(r+(n?" "+e:"")).replace(D," ")}}function kt(t,e,n){var r=t&&t.style;if(r){if(void 0===n)return N.defaultView&&N.defaultView.getComputedStyle?n=N.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 Et(t){var e="";do{var n=kt(t,"transform");n&&"none"!==n&&(e=n+" "+e)}while(t=t.parentNode);return window.DOMMatrix?new DOMMatrix(e):window.WebKitCSSMatrix?new WebKitCSSMatrix(e):window.CSSMatrix?new CSSMatrix(e):void 0}function Mt(t,e,n){if(t){var r=t.getElementsByTagName(e),o=0,i=r.length;if(n)for(;os+u||i<=s&&o>a&&i>=c:o>a&&i>c||o<=a&&i>s+u}function Rt(e,n,r,o,i,a,c){var s=Xt(n),u="vertical"===r?e.clientY:e.clientX,f="vertical"===r?s.height:s.width,l="vertical"===r?s.top:s.left,p="vertical"===r?s.bottom:s.right,d=Xt(t),h=!1;if(!a)if(c&&Ol+f*i/2:up-O)return-1*w}else if(u>l+f*(1-o)/2&&up-f*i/2)?u>l+f/2?1:-1:0}function Ft(e){var n=zt(t),r=zt(e);return n=i:r<=i,!o)return n;if(n===ut())break;n=st(n,!1)}return!1}function Zt(t){var e=0,n=0,r=ut();if(t)do{var o=Et(t),i=o.a,a=o.d;e+=t.scrollLeft*i,n+=t.scrollTop*a}while(t!==r&&(t=t.parentNode));return[e,n]}return $t(N,"dragover",_t),$t(N,"mousemove",_t),$t(N,"touchmove",_t),wt.prototype={constructor:wt,_computeIsAligned:function(e){var r;if(n&&!J?(gt(),r=N.elementFromPoint(e.clientX,e.clientY),mt()):r=e.target,r=xt(r,this.options.draggable,this.el,!1),!Q&&t&&t.parentNode===this.el){for(var o=this.el.children,i=0;i=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){t&&Pt(t),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;At(t,"mouseup",this._disableDelayedDrag),At(t,"touchend",this._disableDelayedDrag),At(t,"touchcancel",this._disableDelayedDrag),At(t,"mousemove",this._delayedDragTouchMoveHandler),At(t,"touchmove",this._delayedDragTouchMoveHandler),At(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,n){n=n||("touch"==e.pointerType?e:null),!this.nativeDraggable||n?this.options.supportPointer?$t(N,"pointermove",this._onTouchMove):$t(N,n?"touchmove":"mousemove",this._onTouchMove):($t(t,"dragend",this),$t(o,"dragstart",this._onDragStart));try{N.selection?Gt(function(){N.selection.empty()}):window.getSelection().removeAllRanges()}catch(r){}},_dragStarted:function(e,n){if(k=!1,o&&t){this.nativeDraggable&&($t(N,"dragover",this._handleAutoScroll),$t(N,"dragover",ht));var r=this.options;!e&&Ct(t,r.dragClass,!1),Ct(t,r.ghostClass,!0),kt(t,"transform",""),wt.active=this,e&&this._appendGhost(),jt(this,o,"start",t,o,o,f,void 0,n)}else this._nulling()},_emulateDragOver:function(e){if(m){if(this._lastX===m.clientX&&this._lastY===m.clientY&&!e)return;this._lastX=m.clientX,this._lastY=m.clientY,gt();var n=N.elementFromPoint(m.clientX,m.clientY),r=n;while(n&&n.shadowRoot)n=n.shadowRoot.elementFromPoint(m.clientX,m.clientY),r=n;if(r)do{var o;if(r[L])if(o=r[L]._onDragOver({clientX:m.clientX,clientY:m.clientY,target:n,rootEl:r}),o&&!this.options.dragoverBubble)break;n=r}while(r=r.parentNode);t.parentNode[L]._computeIsAligned(m),mt()}},_onTouchMove:function(t,e){if(g){var r=this.options,o=r.fallbackTolerance,i=r.fallbackOffset,a=t.touches?t.touches[0]:t,c=n&&Et(n),s=n&&c&&c.a,u=n&&c&&c.d,f=G&&S&&Zt(S),l=(a.clientX-g.clientX+i.x)/(s||1)+(f?f[0]-P[0]:0)/(s||1),p=(a.clientY-g.clientY+i.y)/(u||1)+(f?f[1]-P[1]:0)/(u||1),d=t.touches?"translate3d("+l+"px,"+p+"px,0)":"translate("+l+"px,"+p+"px)";if(!wt.active&&!k){if(o&&et(tt(a.clientX-this._lastX),tt(a.clientY-this._lastY))=0&&(jt(null,e,"add",t,e,o,f,l,a),jt(this,o,"remove",t,e,o,f,l,a),jt(null,e,"sort",t,e,o,f,l,a),jt(this,o,"sort",t,e,o,f,l,a)),d&&d.save()):t.nextSibling!==i&&(l=zt(t,s.draggable),l>=0&&(jt(this,o,"update",t,e,o,f,l,a),jt(this,o,"sort",t,e,o,f,l,a))),wt.active&&(null!=l&&-1!==l||(l=f),jt(this,o,"end",t,e,o,f,l,a),this.save()))),this._nulling()},_nulling:function(){o=t=e=n=i=r=a=c=s=A.length=h=v=y=g=m=b=l=f=_=w=$=d=p=wt.active=null,rt.forEach(function(t){t.checked=!0}),rt.length=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":t&&(this._onDragOver(e),St(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var t,e=[],n=this.el.children,r=0,o=n.length,i=this.options;rb;b++)if(y=e?m(a(h=t[b])[0],h[1]):m(t[b]),y===u||y===f)return y}else for(v=g.call(t);!(h=v.next()).done;)if(y=o(v,m,h.value,e),y===u||y===f)return y};e.BREAK=u,e.RETURN=f},"565d":function(t,e,n){var r=n("6a9b"),o=n("d876").f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],c=function(t){try{return o(t)}catch(e){return a.slice()}};t.exports.f=function(t){return a&&"[object Window]"==i.call(t)?c(t):o(r(t))}},5698:function(t,e,n){n("d256"),t.exports=n("a7d3").Object.getOwnPropertySymbols},"569f":function(t,e,n){var r=n("b808"),o=n("ca38"),i=n("a0a8"),a=n("1f51"),c=n("a9f2"),s="prototype",u=function(t,e,n){var f,l,p,d,h=t&u.F,v=t&u.G,y=t&u.S,g=t&u.P,m=t&u.B,b=v?r:y?r[e]||(r[e]={}):(r[e]||{})[s],_=v?o:o[e]||(o[e]={}),w=_[s]||(_[s]={});for(f in v&&(n=e),n)l=!h&&b&&void 0!==b[f],p=(l?b:n)[f],d=m&&l?c(p,r):g&&"function"==typeof p?c(Function.call,p):p,b&&a(b,f,p,t&u.U),_[f]!=p&&i(_,f,d),g&&w[f]!=p&&(w[f]=p)};r.core=o,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},"57f7":function(t,e,n){n("93c4"),n("6109"),t.exports=n("a7d3").Array.from},"58b9":function(t,e,n){var r=n("d43f"),o=n("0244");t.exports=function(t){return r(o(t))}},5927:function(t,e,n){n("93c4"),n("b42c"),t.exports=n("fda1").f("iterator")},"59ad":function(t,e,n){t.exports=n("0965")},"5a0c":function(t,e,n){!function(e,n){t.exports=n()}(0,function(){"use strict";var t="millisecond",e="second",n="minute",r="hour",o="day",i="week",a="month",c="quarter",s="year",u=/^(\d{4})-?(\d{1,2})-?(\d{0,2})[^0-9]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?.?(\d{1,3})?$/,f=/\[([^\]]+)]|Y{2,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,l=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},p={s:l,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),o=n%60;return(e<=0?"+":"-")+l(r,2,"0")+":"+l(o,2,"0")},m:function(t,e){var n=12*(e.year()-t.year())+(e.month()-t.month()),r=t.clone().add(n,a),o=e-r<0,i=t.clone().add(n+(o?-1:1),a);return Number(-(n+(e-r)/(o?r-i:i-r))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(u){return{M:a,y:s,w:i,d:o,h:r,m:n,s:e,ms:t,Q:c}[u]||String(u||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},d={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},h="en",v={};v[h]=d;var y=function(t){return t instanceof _},g=function(t,e,n){var r;if(!t)return null;if("string"==typeof t)v[t]&&(r=t),e&&(v[t]=e,r=t);else{var o=t.name;v[o]=t,r=o}return n||(h=r),r},m=function(t,e,n){if(y(t))return t.clone();var r=e?"string"==typeof e?{format:e,pl:n}:e:{};return r.date=t,new _(r)},b=p;b.l=g,b.i=y,b.w=function(t,e){return m(t,{locale:e.$L,utc:e.$u})};var _=function(){function l(t){this.$L=this.$L||g(t.locale,null,!0)||h,this.parse(t)}var p=l.prototype;return p.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(u);if(r)return n?new Date(Date.UTC(r[1],r[2]-1,r[3]||1,r[4]||0,r[5]||0,r[6]||0,r[7]||0)):new Date(r[1],r[2]-1,r[3]||1,r[4]||0,r[5]||0,r[6]||0,r[7]||0)}return new Date(e)}(t),this.init()},p.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},p.$utils=function(){return b},p.isValid=function(){return!("Invalid Date"===this.$d.toString())},p.isSame=function(t,e){var n=m(t);return this.startOf(e)<=n&&n<=this.endOf(e)},p.isAfter=function(t,e){return m(t)i)a(n[i++]);t._c=[],t._n=!1,e&&!t._h&&L(t)})}},L=function(t){g.call(s,function(){var e,n,r,o=t._v,i=I(t);if(i&&(e=_(function(){E?$.emit("unhandledRejection",o,t):(n=s.onunhandledrejection)?n({promise:t,reason:o}):(r=s.console)&&r.error&&r.error("Unhandled promise rejection",o)}),t._h=E||I(t)?2:1),t._a=void 0,i&&e.e)throw e.v})},I=function(t){return 1!==t._h&&0===(t._a||t._c).length},N=function(t){g.call(s,function(){var e;E?$.emit("rejectionHandled",t):(e=s.onrejectionhandled)&&e({promise:t,reason:t._v})})},R=function(t){var e=this;e._d||(e._d=!0,e=e._w||e,e._v=t,e._s=2,e._a||(e._a=e._c.slice()),D(e,!0))},F=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw S("Promise can't be resolved itself");(e=P(t))?m(function(){var r={_w:n,_d:!1};try{e.call(t,u(F,r,1),u(R,r,1))}catch(o){R.call(r,o)}}):(n._v=t,n._s=1,D(n,!1))}catch(r){R.call({_w:n,_d:!1},r)}}};T||(k=function(t){h(this,k,O,"_h"),d(t),r.call(this);try{t(u(F,this,1),u(R,this,1))}catch(e){R.call(this,e)}},r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},r.prototype=n("3904")(k.prototype,{then:function(t,e){var n=j(y(this,k));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=E?$.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&D(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new r;this.promise=t,this.resolve=u(F,t,1),this.reject=u(R,t,1)},b.f=j=function(t){return t===k||t===a?new i(t):o(t)}),l(l.G+l.W+l.F*!T,{Promise:k}),n("c0d8")(k,O),n("1be4")(O),a=n("a7d3")[O],l(l.S+l.F*!T,O,{reject:function(t){var e=j(this),n=e.reject;return n(t),e.promise}}),l(l.S+l.F*(c||!T),O,{resolve:function(t){return x(c&&this===a?k:this,t)}}),l(l.S+l.F*!(T&&n("436c")(function(t){k.all(t)["catch"](M)})),O,{all:function(t){var e=this,n=j(e),r=n.resolve,o=n.reject,i=_(function(){var n=[],i=0,a=1;v(t,!1,function(t){var c=i++,s=!1;n.push(void 0),a++,e.resolve(t).then(function(t){s||(s=!0,n[c]=t,--a||r(n))},o)}),--a||r(n)});return i.e&&o(i.v),n.promise},race:function(t){var e=this,n=j(e),r=n.reject,o=_(function(){v(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return o.e&&r(o.v),n.promise}})},"5ca1":function(t,e,n){var r=n("7726"),o=n("8378"),i=n("32e9"),a=n("2aba"),c=n("9b43"),s="prototype",u=function(t,e,n){var f,l,p,d,h=t&u.F,v=t&u.G,y=t&u.S,g=t&u.P,m=t&u.B,b=v?r:y?r[e]||(r[e]={}):(r[e]||{})[s],_=v?o:o[e]||(o[e]={}),w=_[s]||(_[s]={});for(f in v&&(n=e),n)l=!h&&b&&void 0!==b[f],p=(l?b:n)[f],d=m&&l?c(p,r):g&&"function"==typeof p?c(Function.call,p):p,b&&a(b,f,p,t&u.U),_[f]!=p&&i(_,f,d),g&&w[f]!=p&&(w[f]=p)};r.core=o,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},"5ce7":function(t,e,n){"use strict";var r=n("7108"),o=n("f845"),i=n("c0d8"),a={};n("8ce0")(a,n("1b55")("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(a,{next:o(1,n)}),i(t,e+" Iterator")}},"5d58":function(t,e,n){t.exports=n("5927")},"5d73":function(t,e,n){t.exports=n("0a91")},"5d75":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("78ef"),o=/(^$|^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$)/;e.default=(0,r.regex)("email",o)},"5d8f":function(t,e,n){var r=n("7772")("keys"),o=n("7b00");t.exports=function(t){return r[t]||(r[t]=o(t))}},"5db3":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("78ef");e.default=function(t){return(0,r.withParams)({type:"minLength",min:t},function(e){return!(0,r.req)(e)||(0,r.len)(e)>=t})}},"5dbc":function(t,e,n){var r=n("d3f4"),o=n("8b97").set;t.exports=function(t,e,n){var i,a=e.constructor;return a!==n&&"function"==typeof a&&(i=a.prototype)!==n.prototype&&r(i)&&o&&o(t,i),t}},"5df3":function(t,e,n){"use strict";var r=n("02f4")(!0);n("01f9")(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},"5f1b":function(t,e,n){"use strict";var r=n("23c6"),o=RegExp.prototype.exec;t.exports=function(t,e){var n=t.exec;if("function"===typeof n){var i=n.call(t,e);if("object"!==typeof i)throw new TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==r(t))throw new TypeError("RegExp#exec called on incompatible receiver");return o.call(t,e)}},6109:function(t,e,n){"use strict";var r=n("bc25"),o=n("d13f"),i=n("0185"),a=n("9c93"),c=n("c227"),s=n("a5ab"),u=n("b3ec"),f=n("f159");o(o.S+o.F*!n("436c")(function(t){Array.from(t)}),"Array",{from:function(t){var e,n,o,l,p=i(t),d="function"==typeof this?this:Array,h=arguments.length,v=h>1?arguments[1]:void 0,y=void 0!==v,g=0,m=f(p);if(y&&(v=r(v,h>2?arguments[2]:void 0,2)),void 0==m||d==Array&&c(m))for(e=s(p.length),n=new d(e);e>g;g++)u(n,g,y?v(p[g],g):p[g]);else for(l=m.call(p),n=new d;!(o=l.next()).done;g++)u(n,g,y?a(l,v,[o.value,g],!0):o.value);return n.length=g,n}})},"613b":function(t,e,n){var r=n("5537")("keys"),o=n("ca5a");t.exports=function(t){return r[t]||(r[t]=o(t))}},6235:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("78ef");e.default=(0,r.regex)("alpha",/^[a-zA-Z]*$/)},"626a":function(t,e,n){var r=n("2d95");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},"626e":function(t,e,n){var r=n("d74e"),o=n("f845"),i=n("6a9b"),a=n("2ea1"),c=n("43c8"),s=n("a47f"),u=Object.getOwnPropertyDescriptor;e.f=n("7d95")?u:function(t,e){if(t=i(t),e=a(e,!0),s)try{return u(t,e)}catch(n){}if(c(t,e))return o(!r.f.call(t,e),t[e])}},6277:function(t,e,n){var r=n("7b00")("meta"),o=n("6f8a"),i=n("43c8"),a=n("3adc").f,c=0,s=Object.isExtensible||function(){return!0},u=!n("d782")(function(){return s(Object.preventExtensions({}))}),f=function(t){a(t,r,{value:{i:"O"+ ++c,w:{}}})},l=function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,r)){if(!s(t))return"F";if(!e)return"E";f(t)}return t[r].i},p=function(t,e){if(!i(t,r)){if(!s(t))return!0;if(!e)return!1;f(t)}return t[r].w},d=function(t){return u&&h.NEED&&s(t)&&!i(t,r)&&f(t),t},h=t.exports={KEY:r,NEED:!1,fastKey:l,getWeak:p,onFreeze:d}},"633a":function(t,e,n){var r=n("d13f"),o=n("e5fa"),i=n("d782"),a=n("702a"),c="["+a+"]",s="​…",u=RegExp("^"+c+c+"*"),f=RegExp(c+c+"*$"),l=function(t,e,n){var o={},c=i(function(){return!!a[t]()||s[t]()!=s}),u=o[t]=c?e(p):a[t];n&&(o[n]=u),r(r.P+r.F*c,"String",o)},p=l.trim=function(t,e){return t=String(o(t)),1&e&&(t=t.replace(u,"")),2&e&&(t=t.replace(f,"")),t};t.exports=l},6762:function(t,e,n){"use strict";var r=n("5ca1"),o=n("c366")(!0);r(r.P,"Array",{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),n("9c6c")("includes")},"67bb":function(t,e,n){t.exports=n("b258")},6821:function(t,e,n){var r=n("626a"),o=n("be13");t.exports=function(t){return r(o(t))}},"696b":function(t,e){e.f=Object.getOwnPropertySymbols},"69a8":function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},"6a99":function(t,e,n){var r=n("d3f4");t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},"6a9b":function(t,e,n){var r=n("8bab"),o=n("e5fa");t.exports=function(t){return r(o(t))}},"6b54":function(t,e,n){"use strict";n("3846");var r=n("cb7c"),o=n("0bfb"),i=n("9e1e"),a="toString",c=/./[a],s=function(t){n("2aba")(RegExp.prototype,a,t,!0)};n("79e5")(function(){return"/a/b"!=c.call({source:"a",flags:"b"})})?s(function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!i&&t instanceof RegExp?o.call(t):void 0)}):c.name!=a&&s(function(){return c.call(this)})},"6e1f":function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},"6f8a":function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},"702a":function(t,e){t.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},7108:function(t,e,n){var r=n("0f89"),o=n("f568"),i=n("0029"),a=n("5d8f")("IE_PROTO"),c=function(){},s="prototype",u=function(){var t,e=n("12fd")("iframe"),r=i.length,o="<",a=">";e.style.display="none",n("103a").appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(o+"script"+a+"document.F=Object"+o+"/script"+a),t.close(),u=t.F;while(r--)delete u[s][i[r]];return u()};t.exports=Object.create||function(t,e){var n;return null!==t?(c[s]=r(t),n=new c,c[s]=null,n[a]=t):n=u(),void 0===e?n:o(n,e)}},"71fa":function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},"73c3":function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(e){return{e:!0,v:e}}}},"75c9":function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(e){return{e:!0,v:e}}}},"75fc":function(t,e,n){"use strict";var r=n("a745"),o=n.n(r);function i(t){if(o()(t)){for(var e=0,n=new Array(t.length);e>>0||(a.test(n)?16:10))}:r},7726:function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},"772d":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("78ef"),o=/^(?:(?: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-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})))(?::\d{2,5})?(?:[\/?#]\S*)?$/i;e.default=(0,r.regex)("url",o)},"774e":function(t,e,n){t.exports=n("57f7")},7772:function(t,e,n){var r=n("a7d3"),o=n("da3c"),i="__core-js_shared__",a=o[i]||(o[i]={});(t.exports=function(t,e){return a[t]||(a[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n("b457")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},"77f1":function(t,e,n){var r=n("4588"),o=Math.max,i=Math.min;t.exports=function(t,e){return t=r(t),t<0?o(t+e,0):i(t,e)}},"781f":function(t,e,n){var r=n("ab4c"),o=n("b808").document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},"78ef":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.regex=e.ref=e.len=e.req=e.withParams=void 0;var r=n("8750"),o=i(r);function i(t){return t&&t.__esModule?t:{default:t}}e.withParams=o.default;var a=e.req=function(t){if(Array.isArray(t))return!!t.length;if(void 0===t||null===t||!1===t)return!1;if(t instanceof Date)return!isNaN(t.getTime());if("object"===typeof t){for(var e in t)return!0;return!1}return!!String(t).length};e.len=function(t){return Array.isArray(t)?t.length:"object"===typeof t?Object.keys(t).length:String(t).length},e.ref=function(t,e,n){return"function"===typeof t?t.call(e,n):n[t]},e.regex=function(t,e){return(0,o.default)({type:t},function(t){return!a(t)||e.test(t)})}},"795b":function(t,e,n){t.exports=n("dd04")},"79e5":function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},"7a56":function(t,e,n){"use strict";var r=n("7726"),o=n("86cc"),i=n("9e1e"),a=n("2b4c")("species");t.exports=function(t){var e=r[t];i&&e&&!e[a]&&o.f(e,a,{configurable:!0,get:function(){return this}})}},"7b00":function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},"7d8a":function(t,e,n){var r=n("6e1f"),o=n("1b55")("toStringTag"),i="Arguments"==r(function(){return arguments}()),a=function(t,e){try{return t[e]}catch(n){}};t.exports=function(t){var e,n,c;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=a(e=Object(t),o))?n:i?r(e):"Object"==(c=r(e))&&"function"==typeof e.callee?"Arguments":c}},"7d95":function(t,e,n){t.exports=!n("d782")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},"7f20":function(t,e,n){var r=n("86cc").f,o=n("69a8"),i=n("2b4c")("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},"7f7f":function(t,e,n){var r=n("86cc").f,o=Function.prototype,i=/^\s*function ([^ (]*)/,a="name";a in o||n("9e1e")&&r(o,a,{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(t){return""}}})},8115:function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},"81ee":function(t,e,n){n("9a51"),t.exports=n("a7d3").Object.assign},8378:function(t,e){var n=t.exports={version:"2.6.0"};"number"==typeof __e&&(__e=n)},"83a1":function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t===1/e:t!=t&&e!=e}},"84f2":function(t,e){t.exports={}},"85f2":function(t,e,n){t.exports=n("ec5b")},"86cc":function(t,e,n){var r=n("cb7c"),o=n("c69a"),i=n("6a99"),a=Object.defineProperty;e.f=n("9e1e")?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return a(t,e,n)}catch(c){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},8750:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("0234").withParams;e.default=r},"88b8":function(t,e,n){var r=n("a9f2"),o=n("1d27"),i=n("f26d"),a=n("27b2"),c=n("04cf"),s=n("b36f"),u={},f={};e=t.exports=function(t,e,n,l,p){var d,h,v,y,g=p?function(){return t}:s(t),m=r(n,l,e?2:1),b=0;if("function"!=typeof g)throw TypeError(t+" is not iterable!");if(i(g)){for(d=c(t.length);d>b;b++)if(y=e?m(a(h=t[b])[0],h[1]):m(t[b]),y===u||y===f)return y}else for(v=g.call(t);!(h=v.next()).done;)if(y=o(v,m,h.value,e),y===u||y===f)return y};e.BREAK=u,e.RETURN=f},"89ca":function(t,e,n){n("b42c"),n("93c4"),t.exports=n("d38f")},"8a12":function(t,e,n){var r=n("da3c"),o=r.navigator;t.exports=o&&o.userAgent||""},"8b97":function(t,e,n){var r=n("d3f4"),o=n("cb7c"),i=function(t,e){if(o(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{r=n("9b43")(Function.call,n("11e9").f(Object.prototype,"__proto__").set,2),r(t,[]),e=!(t instanceof Array)}catch(o){e=!0}return function(t,n){return i(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:i}},"8bab":function(t,e,n){var r=n("6e1f");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},"8c4f":function(t,e,n){"use strict"; /*! * vue-router v3.0.2 * (c) 2018 Evan You * @license MIT - */function r(t,e){0}function o(t){return Object.prototype.toString.call(t).indexOf("Error")>-1}function i(t,e){for(var n in e)t[n]=e[n];return t}var a={name:"RouterView",functional:!0,props:{name:{type:String,default:"default"}},render:function(t,e){var n=e.props,r=e.children,o=e.parent,a=e.data;a.routerView=!0;var s=o.$createElement,u=n.name,f=o.$route,l=o._routerViewCache||(o._routerViewCache={}),p=0,d=!1;while(o&&o._routerRoot!==o)o.$vnode&&o.$vnode.data.routerView&&p++,o._inactive&&(d=!0),o=o.$parent;if(a.routerViewDepth=p,d)return s(l[u],a,r);var h=f.matched[p];if(!h)return l[u]=null,s();var v=l[u]=h.components[u];a.registerRouteInstance=function(t,e){var n=h.instances[u];(e&&n!==t||!e&&n===t)&&(h.instances[u]=e)},(a.hook||(a.hook={})).prepatch=function(t,e){h.instances[u]=e.componentInstance};var y=a.props=c(f,h.props&&h.props[u]);if(y){y=a.props=i({},y);var g=a.attrs=a.attrs||{};for(var m in y)v.props&&m in v.props||(g[m]=y[m],delete y[m])}return s(v,a,r)}};function c(t,e){switch(typeof e){case"undefined":return;case"object":return e;case"function":return e(t);case"boolean":return e?t.params:void 0;default:0}}var s=/[!'()*]/g,u=function(t){return"%"+t.charCodeAt(0).toString(16)},f=/%2C/g,l=function(t){return encodeURIComponent(t).replace(s,u).replace(f,",")},p=decodeURIComponent;function d(t,e,n){void 0===e&&(e={});var r,o=n||h;try{r=o(t||"")}catch(a){r={}}for(var i in e)r[i]=e[i];return r}function h(t){var e={};return t=t.trim().replace(/^(\?|#|&)/,""),t?(t.split("&").forEach(function(t){var n=t.replace(/\+/g," ").split("="),r=p(n.shift()),o=n.length>0?p(n.join("=")):null;void 0===e[r]?e[r]=o:Array.isArray(e[r])?e[r].push(o):e[r]=[e[r],o]}),e):e}function v(t){var e=t?Object.keys(t).map(function(e){var n=t[e];if(void 0===n)return"";if(null===n)return l(e);if(Array.isArray(n)){var r=[];return n.forEach(function(t){void 0!==t&&(null===t?r.push(l(e)):r.push(l(e)+"="+l(t)))}),r.join("&")}return l(e)+"="+l(n)}).filter(function(t){return t.length>0}).join("&"):null;return e?"?"+e:""}var y=/\/?$/;function g(t,e,n,r){var o=r&&r.options.stringifyQuery,i=e.query||{};try{i=m(i)}catch(c){}var a={name:e.name||t&&t.name,meta:t&&t.meta||{},path:e.path||"/",hash:e.hash||"",query:i,params:e.params||{},fullPath:w(e,o),matched:t?_(t):[]};return n&&(a.redirectedFrom=w(n,o)),Object.freeze(a)}function m(t){if(Array.isArray(t))return t.map(m);if(t&&"object"===typeof t){var e={};for(var n in t)e[n]=m(t[n]);return e}return t}var b=g(null,{path:"/"});function _(t){var e=[];while(t)e.unshift(t),t=t.parent;return e}function w(t,e){var n=t.path,r=t.query;void 0===r&&(r={});var o=t.hash;void 0===o&&(o="");var i=e||v;return(n||"/")+i(r)+o}function x(t,e){return e===b?t===e:!!e&&(t.path&&e.path?t.path.replace(y,"")===e.path.replace(y,"")&&t.hash===e.hash&&O(t.query,e.query):!(!t.name||!e.name)&&(t.name===e.name&&t.hash===e.hash&&O(t.query,e.query)&&O(t.params,e.params)))}function O(t,e){if(void 0===t&&(t={}),void 0===e&&(e={}),!t||!e)return t===e;var n=Object.keys(t),r=Object.keys(e);return n.length===r.length&&n.every(function(n){var r=t[n],o=e[n];return"object"===typeof r&&"object"===typeof o?O(r,o):String(r)===String(o)})}function S(t,e){return 0===t.path.replace(y,"/").indexOf(e.path.replace(y,"/"))&&(!e.hash||t.hash===e.hash)&&$(t.query,e.query)}function $(t,e){for(var n in e)if(!(n in t))return!1;return!0}var A,C=[String,Object],k=[String,Array],E={name:"RouterLink",props:{to:{type:C,required:!0},tag:{type:String,default:"a"},exact:Boolean,append:Boolean,replace:Boolean,activeClass:String,exactActiveClass:String,event:{type:k,default:"click"}},render:function(t){var e=this,n=this.$router,r=this.$route,o=n.resolve(this.to,r,this.append),a=o.location,c=o.route,s=o.href,u={},f=n.options.linkActiveClass,l=n.options.linkExactActiveClass,p=null==f?"router-link-active":f,d=null==l?"router-link-exact-active":l,h=null==this.activeClass?p:this.activeClass,v=null==this.exactActiveClass?d:this.exactActiveClass,y=a.path?g(null,a,null,n):c;u[v]=x(r,y),u[h]=this.exact?u[v]:S(r,y);var m=function(t){M(t)&&(e.replace?n.replace(a):n.push(a))},b={click:M};Array.isArray(this.event)?this.event.forEach(function(t){b[t]=m}):b[this.event]=m;var _={class:u};if("a"===this.tag)_.on=b,_.attrs={href:s};else{var w=j(this.$slots.default);if(w){w.isStatic=!1;var O=w.data=i({},w.data);O.on=b;var $=w.data.attrs=i({},w.data.attrs);$.href=s}else _.on=b}return t(this.tag,_,this.$slots.default)}};function M(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&!t.defaultPrevented&&(void 0===t.button||0===t.button)){if(t.currentTarget&&t.currentTarget.getAttribute){var e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function j(t){if(t)for(var e,n=0;n=0&&(e=t.slice(r),t=t.slice(0,r));var o=t.indexOf("?");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{path:t,query:n,hash:e}}function I(t){return t.replace(/\/\//g,"/")}var N=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)},R=rt,F=B,z=Y,H=G,U=nt,V=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function B(t,e){var n,r=[],o=0,i=0,a="",c=e&&e.delimiter||"/";while(null!=(n=V.exec(t))){var s=n[0],u=n[1],f=n.index;if(a+=t.slice(i,f),i=f+s.length,u)a+=u[1];else{var l=t[i],p=n[2],d=n[3],h=n[4],v=n[5],y=n[6],g=n[7];a&&(r.push(a),a="");var m=null!=p&&null!=l&&l!==p,b="+"===y||"*"===y,_="?"===y||"*"===y,w=n[2]||c,x=h||v;r.push({name:d||o++,prefix:p||"",delimiter:w,optional:_,repeat:b,partial:m,asterisk:!!g,pattern:x?X(x):g?".*":"[^"+K(w)+"]+?"})}}return i-1&&(c.params[p]=n.params[p]);if(u)return c.path=it(u.path,c.params,'named route "'+s+'"'),f(u,c,a)}else if(c.path){c.params={};for(var d=0;d=t.length?n():t[o]?e(t[o],function(){r(o+1)}):r(o+1)};r(0)}function Dt(t){return function(e,n,r){var i=!1,a=0,c=null;Lt(t,function(t,e,n,s){if("function"===typeof t&&void 0===t.cid){i=!0,a++;var u,f=Ft(function(e){Rt(e)&&(e=e.default),t.resolved="function"===typeof e?e:A.extend(e),n.components[s]=e,a--,a<=0&&r()}),l=Ft(function(t){var e="Failed to resolve async component "+s+": "+t;c||(c=o(t)?t:new Error(e),r(c))});try{u=t(f,l)}catch(d){l(d)}if(u)if("function"===typeof u.then)u.then(f,l);else{var p=u.component;p&&"function"===typeof p.then&&p.then(f,l)}}}),i||r()}}function Lt(t,e){return It(t.map(function(t){return Object.keys(t.components).map(function(n){return e(t.components[n],t.instances[n],t,n)})}))}function It(t){return Array.prototype.concat.apply([],t)}var Nt="function"===typeof Symbol&&"symbol"===typeof Symbol.toStringTag;function Rt(t){return t.__esModule||Nt&&"Module"===t[Symbol.toStringTag]}function Ft(t){var e=!1;return function(){var n=[],r=arguments.length;while(r--)n[r]=arguments[r];if(!e)return e=!0,t.apply(this,n)}}var zt=function(t,e){this.router=t,this.base=Ht(e),this.current=b,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[]};function Ht(t){if(!t)if(P){var e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^https?:\/\/[^\/]+/,"")}else t="/";return"/"!==t.charAt(0)&&(t="/"+t),t.replace(/\/$/,"")}function Ut(t,e){var n,r=Math.max(t.length,e.length);for(n=0;n=0?e.slice(0,n):e;return r+"#"+t}function oe(t){$t?jt(re(t)):window.location.hash=t}function ie(t){$t?Tt(re(t)):window.location.replace(re(t))}var ae=function(t){function e(e,n){t.call(this,e,n),this.stack=[],this.index=-1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.push=function(t,e,n){var r=this;this.transitionTo(t,function(t){r.stack=r.stack.slice(0,r.index+1).concat(t),r.index++,e&&e(t)},n)},e.prototype.replace=function(t,e,n){var r=this;this.transitionTo(t,function(t){r.stack=r.stack.slice(0,r.index).concat(t),e&&e(t)},n)},e.prototype.go=function(t){var e=this,n=this.index+t;if(!(n<0||n>=this.stack.length)){var r=this.stack[n];this.confirmTransition(r,function(){e.index=n,e.updateRoute(r)})}},e.prototype.getCurrentLocation=function(){var t=this.stack[this.stack.length-1];return t?t.fullPath:"/"},e.prototype.ensureURL=function(){},e}(zt),ce=function(t){void 0===t&&(t={}),this.app=null,this.apps=[],this.options=t,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=lt(t.routes||[],this);var e=t.mode||"hash";switch(this.fallback="history"===e&&!$t&&!1!==t.fallback,this.fallback&&(e="hash"),P||(e="abstract"),this.mode=e,e){case"history":this.history=new Jt(this,t.base);break;case"hash":this.history=new Qt(this,t.base,this.fallback);break;case"abstract":this.history=new ae(this,t.base);break;default:0}},se={currentRoute:{configurable:!0}};function ue(t,e){return t.push(e),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}function fe(t,e,n){var r="hash"===n?"#"+e:e;return t?I(t+"/"+r):r}ce.prototype.match=function(t,e,n){return this.matcher.match(t,e,n)},se.currentRoute.get=function(){return this.history&&this.history.current},ce.prototype.init=function(t){var e=this;if(this.apps.push(t),!this.app){this.app=t;var n=this.history;if(n instanceof Jt)n.transitionTo(n.getCurrentLocation());else if(n instanceof Qt){var r=function(){n.setupListeners()};n.transitionTo(n.getCurrentLocation(),r,r)}n.listen(function(t){e.apps.forEach(function(e){e._route=t})})}},ce.prototype.beforeEach=function(t){return ue(this.beforeHooks,t)},ce.prototype.beforeResolve=function(t){return ue(this.resolveHooks,t)},ce.prototype.afterEach=function(t){return ue(this.afterHooks,t)},ce.prototype.onReady=function(t,e){this.history.onReady(t,e)},ce.prototype.onError=function(t){this.history.onError(t)},ce.prototype.push=function(t,e,n){this.history.push(t,e,n)},ce.prototype.replace=function(t,e,n){this.history.replace(t,e,n)},ce.prototype.go=function(t){this.history.go(t)},ce.prototype.back=function(){this.go(-1)},ce.prototype.forward=function(){this.go(1)},ce.prototype.getMatchedComponents=function(t){var e=t?t.matched?t:this.resolve(t).route:this.currentRoute;return e?[].concat.apply([],e.matched.map(function(t){return Object.keys(t.components).map(function(e){return t.components[e]})})):[]},ce.prototype.resolve=function(t,e,n){var r=ft(t,e||this.history.current,n,this),o=this.match(r,e),i=o.redirectedFrom||o.fullPath,a=this.history.base,c=fe(a,i,this.mode);return{location:r,route:o,href:c,normalizedTo:r,resolved:o}},ce.prototype.addRoutes=function(t){this.matcher.addRoutes(t),this.history.current!==b&&this.history.transitionTo(this.history.getCurrentLocation())},Object.defineProperties(ce.prototype,se),ce.install=T,ce.version="3.0.2",P&&window.Vue&&window.Vue.use(ce),e["a"]=ce},"8ce0":function(t,e,n){var r=n("3adc"),o=n("f845");t.exports=n("7d95")?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},9093:function(t,e,n){var r=n("ce10"),o=n("e11e").concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},9184:function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},"91d3":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("78ef");e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:":";return(0,r.withParams)({type:"macAddress"},function(e){if(!(0,r.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(o)})};var o=function(t){return t.toLowerCase().match(/^[0-9a-f]{2}$/)}},"93c4":function(t,e,n){"use strict";var r=n("2a4e")(!0);n("e4a9")(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},"9a51":function(t,e,n){var r=n("d13f");r(r.S+r.F,"Object",{assign:n("9e44")})},"9b43":function(t,e,n){var r=n("d8e8");t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},"9c6c":function(t,e,n){var r=n("2b4c")("unscopables"),o=Array.prototype;void 0==o[r]&&n("32e9")(o,r,{}),t.exports=function(t){o[r][t]=!0}},"9c93":function(t,e,n){var r=n("0f89");t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(a){var i=t["return"];throw void 0!==i&&r(i.call(t)),a}}},"9def":function(t,e,n){var r=n("4588"),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},"9e1e":function(t,e,n){t.exports=!n("79e5")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},"9e44":function(t,e,n){"use strict";var r=n("7633"),o=n("31c2"),i=n("d74e"),a=n("0185"),c=n("8bab"),s=Object.assign;t.exports=!s||n("d782")(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=s({},t)[n]||Object.keys(s({},e)).join("")!=r})?function(t,e){var n=a(t),s=arguments.length,u=1,f=o.f,l=i.f;while(s>u){var p,d=c(arguments[u++]),h=f?r(d).concat(f(d)):r(d),v=h.length,y=0;while(v>y)l.call(d,p=h[y++])&&(n[p]=d[p])}return n}:s},"9ed1":function(t,e,n){var r=n("f6d7"),o=n("49c1");t.exports=Object.keys||function(t){return r(t,o)}},"9faf":function(t,e,n){var r=n("1f51");t.exports=function(t,e,n){for(var o in e)r(t,o,e[o],n);return t}},a026:function(t,e,n){"use strict";(function(t){ + */function r(t,e){0}function o(t){return Object.prototype.toString.call(t).indexOf("Error")>-1}function i(t,e){for(var n in e)t[n]=e[n];return t}var a={name:"RouterView",functional:!0,props:{name:{type:String,default:"default"}},render:function(t,e){var n=e.props,r=e.children,o=e.parent,a=e.data;a.routerView=!0;var s=o.$createElement,u=n.name,f=o.$route,l=o._routerViewCache||(o._routerViewCache={}),p=0,d=!1;while(o&&o._routerRoot!==o)o.$vnode&&o.$vnode.data.routerView&&p++,o._inactive&&(d=!0),o=o.$parent;if(a.routerViewDepth=p,d)return s(l[u],a,r);var h=f.matched[p];if(!h)return l[u]=null,s();var v=l[u]=h.components[u];a.registerRouteInstance=function(t,e){var n=h.instances[u];(e&&n!==t||!e&&n===t)&&(h.instances[u]=e)},(a.hook||(a.hook={})).prepatch=function(t,e){h.instances[u]=e.componentInstance};var y=a.props=c(f,h.props&&h.props[u]);if(y){y=a.props=i({},y);var g=a.attrs=a.attrs||{};for(var m in y)v.props&&m in v.props||(g[m]=y[m],delete y[m])}return s(v,a,r)}};function c(t,e){switch(typeof e){case"undefined":return;case"object":return e;case"function":return e(t);case"boolean":return e?t.params:void 0;default:0}}var s=/[!'()*]/g,u=function(t){return"%"+t.charCodeAt(0).toString(16)},f=/%2C/g,l=function(t){return encodeURIComponent(t).replace(s,u).replace(f,",")},p=decodeURIComponent;function d(t,e,n){void 0===e&&(e={});var r,o=n||h;try{r=o(t||"")}catch(a){r={}}for(var i in e)r[i]=e[i];return r}function h(t){var e={};return t=t.trim().replace(/^(\?|#|&)/,""),t?(t.split("&").forEach(function(t){var n=t.replace(/\+/g," ").split("="),r=p(n.shift()),o=n.length>0?p(n.join("=")):null;void 0===e[r]?e[r]=o:Array.isArray(e[r])?e[r].push(o):e[r]=[e[r],o]}),e):e}function v(t){var e=t?Object.keys(t).map(function(e){var n=t[e];if(void 0===n)return"";if(null===n)return l(e);if(Array.isArray(n)){var r=[];return n.forEach(function(t){void 0!==t&&(null===t?r.push(l(e)):r.push(l(e)+"="+l(t)))}),r.join("&")}return l(e)+"="+l(n)}).filter(function(t){return t.length>0}).join("&"):null;return e?"?"+e:""}var y=/\/?$/;function g(t,e,n,r){var o=r&&r.options.stringifyQuery,i=e.query||{};try{i=m(i)}catch(c){}var a={name:e.name||t&&t.name,meta:t&&t.meta||{},path:e.path||"/",hash:e.hash||"",query:i,params:e.params||{},fullPath:w(e,o),matched:t?_(t):[]};return n&&(a.redirectedFrom=w(n,o)),Object.freeze(a)}function m(t){if(Array.isArray(t))return t.map(m);if(t&&"object"===typeof t){var e={};for(var n in t)e[n]=m(t[n]);return e}return t}var b=g(null,{path:"/"});function _(t){var e=[];while(t)e.unshift(t),t=t.parent;return e}function w(t,e){var n=t.path,r=t.query;void 0===r&&(r={});var o=t.hash;void 0===o&&(o="");var i=e||v;return(n||"/")+i(r)+o}function x(t,e){return e===b?t===e:!!e&&(t.path&&e.path?t.path.replace(y,"")===e.path.replace(y,"")&&t.hash===e.hash&&O(t.query,e.query):!(!t.name||!e.name)&&(t.name===e.name&&t.hash===e.hash&&O(t.query,e.query)&&O(t.params,e.params)))}function O(t,e){if(void 0===t&&(t={}),void 0===e&&(e={}),!t||!e)return t===e;var n=Object.keys(t),r=Object.keys(e);return n.length===r.length&&n.every(function(n){var r=t[n],o=e[n];return"object"===typeof r&&"object"===typeof o?O(r,o):String(r)===String(o)})}function S(t,e){return 0===t.path.replace(y,"/").indexOf(e.path.replace(y,"/"))&&(!e.hash||t.hash===e.hash)&&$(t.query,e.query)}function $(t,e){for(var n in e)if(!(n in t))return!1;return!0}var A,C=[String,Object],k=[String,Array],E={name:"RouterLink",props:{to:{type:C,required:!0},tag:{type:String,default:"a"},exact:Boolean,append:Boolean,replace:Boolean,activeClass:String,exactActiveClass:String,event:{type:k,default:"click"}},render:function(t){var e=this,n=this.$router,r=this.$route,o=n.resolve(this.to,r,this.append),a=o.location,c=o.route,s=o.href,u={},f=n.options.linkActiveClass,l=n.options.linkExactActiveClass,p=null==f?"router-link-active":f,d=null==l?"router-link-exact-active":l,h=null==this.activeClass?p:this.activeClass,v=null==this.exactActiveClass?d:this.exactActiveClass,y=a.path?g(null,a,null,n):c;u[v]=x(r,y),u[h]=this.exact?u[v]:S(r,y);var m=function(t){M(t)&&(e.replace?n.replace(a):n.push(a))},b={click:M};Array.isArray(this.event)?this.event.forEach(function(t){b[t]=m}):b[this.event]=m;var _={class:u};if("a"===this.tag)_.on=b,_.attrs={href:s};else{var w=j(this.$slots.default);if(w){w.isStatic=!1;var O=w.data=i({},w.data);O.on=b;var $=w.data.attrs=i({},w.data.attrs);$.href=s}else _.on=b}return t(this.tag,_,this.$slots.default)}};function M(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&!t.defaultPrevented&&(void 0===t.button||0===t.button)){if(t.currentTarget&&t.currentTarget.getAttribute){var e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function j(t){if(t)for(var e,n=0;n=0&&(e=t.slice(r),t=t.slice(0,r));var o=t.indexOf("?");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{path:t,query:n,hash:e}}function I(t){return t.replace(/\/\//g,"/")}var N=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)},R=rt,F=U,H=Y,z=G,V=nt,B=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function U(t,e){var n,r=[],o=0,i=0,a="",c=e&&e.delimiter||"/";while(null!=(n=B.exec(t))){var s=n[0],u=n[1],f=n.index;if(a+=t.slice(i,f),i=f+s.length,u)a+=u[1];else{var l=t[i],p=n[2],d=n[3],h=n[4],v=n[5],y=n[6],g=n[7];a&&(r.push(a),a="");var m=null!=p&&null!=l&&l!==p,b="+"===y||"*"===y,_="?"===y||"*"===y,w=n[2]||c,x=h||v;r.push({name:d||o++,prefix:p||"",delimiter:w,optional:_,repeat:b,partial:m,asterisk:!!g,pattern:x?X(x):g?".*":"[^"+K(w)+"]+?"})}}return i-1&&(c.params[p]=n.params[p]);if(u)return c.path=it(u.path,c.params,'named route "'+s+'"'),f(u,c,a)}else if(c.path){c.params={};for(var d=0;d=t.length?n():t[o]?e(t[o],function(){r(o+1)}):r(o+1)};r(0)}function Dt(t){return function(e,n,r){var i=!1,a=0,c=null;Lt(t,function(t,e,n,s){if("function"===typeof t&&void 0===t.cid){i=!0,a++;var u,f=Ft(function(e){Rt(e)&&(e=e.default),t.resolved="function"===typeof e?e:A.extend(e),n.components[s]=e,a--,a<=0&&r()}),l=Ft(function(t){var e="Failed to resolve async component "+s+": "+t;c||(c=o(t)?t:new Error(e),r(c))});try{u=t(f,l)}catch(d){l(d)}if(u)if("function"===typeof u.then)u.then(f,l);else{var p=u.component;p&&"function"===typeof p.then&&p.then(f,l)}}}),i||r()}}function Lt(t,e){return It(t.map(function(t){return Object.keys(t.components).map(function(n){return e(t.components[n],t.instances[n],t,n)})}))}function It(t){return Array.prototype.concat.apply([],t)}var Nt="function"===typeof Symbol&&"symbol"===typeof Symbol.toStringTag;function Rt(t){return t.__esModule||Nt&&"Module"===t[Symbol.toStringTag]}function Ft(t){var e=!1;return function(){var n=[],r=arguments.length;while(r--)n[r]=arguments[r];if(!e)return e=!0,t.apply(this,n)}}var Ht=function(t,e){this.router=t,this.base=zt(e),this.current=b,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[]};function zt(t){if(!t)if(P){var e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^https?:\/\/[^\/]+/,"")}else t="/";return"/"!==t.charAt(0)&&(t="/"+t),t.replace(/\/$/,"")}function Vt(t,e){var n,r=Math.max(t.length,e.length);for(n=0;n=0?e.slice(0,n):e;return r+"#"+t}function oe(t){$t?jt(re(t)):window.location.hash=t}function ie(t){$t?Tt(re(t)):window.location.replace(re(t))}var ae=function(t){function e(e,n){t.call(this,e,n),this.stack=[],this.index=-1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.push=function(t,e,n){var r=this;this.transitionTo(t,function(t){r.stack=r.stack.slice(0,r.index+1).concat(t),r.index++,e&&e(t)},n)},e.prototype.replace=function(t,e,n){var r=this;this.transitionTo(t,function(t){r.stack=r.stack.slice(0,r.index).concat(t),e&&e(t)},n)},e.prototype.go=function(t){var e=this,n=this.index+t;if(!(n<0||n>=this.stack.length)){var r=this.stack[n];this.confirmTransition(r,function(){e.index=n,e.updateRoute(r)})}},e.prototype.getCurrentLocation=function(){var t=this.stack[this.stack.length-1];return t?t.fullPath:"/"},e.prototype.ensureURL=function(){},e}(Ht),ce=function(t){void 0===t&&(t={}),this.app=null,this.apps=[],this.options=t,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=lt(t.routes||[],this);var e=t.mode||"hash";switch(this.fallback="history"===e&&!$t&&!1!==t.fallback,this.fallback&&(e="hash"),P||(e="abstract"),this.mode=e,e){case"history":this.history=new Jt(this,t.base);break;case"hash":this.history=new Qt(this,t.base,this.fallback);break;case"abstract":this.history=new ae(this,t.base);break;default:0}},se={currentRoute:{configurable:!0}};function ue(t,e){return t.push(e),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}function fe(t,e,n){var r="hash"===n?"#"+e:e;return t?I(t+"/"+r):r}ce.prototype.match=function(t,e,n){return this.matcher.match(t,e,n)},se.currentRoute.get=function(){return this.history&&this.history.current},ce.prototype.init=function(t){var e=this;if(this.apps.push(t),!this.app){this.app=t;var n=this.history;if(n instanceof Jt)n.transitionTo(n.getCurrentLocation());else if(n instanceof Qt){var r=function(){n.setupListeners()};n.transitionTo(n.getCurrentLocation(),r,r)}n.listen(function(t){e.apps.forEach(function(e){e._route=t})})}},ce.prototype.beforeEach=function(t){return ue(this.beforeHooks,t)},ce.prototype.beforeResolve=function(t){return ue(this.resolveHooks,t)},ce.prototype.afterEach=function(t){return ue(this.afterHooks,t)},ce.prototype.onReady=function(t,e){this.history.onReady(t,e)},ce.prototype.onError=function(t){this.history.onError(t)},ce.prototype.push=function(t,e,n){this.history.push(t,e,n)},ce.prototype.replace=function(t,e,n){this.history.replace(t,e,n)},ce.prototype.go=function(t){this.history.go(t)},ce.prototype.back=function(){this.go(-1)},ce.prototype.forward=function(){this.go(1)},ce.prototype.getMatchedComponents=function(t){var e=t?t.matched?t:this.resolve(t).route:this.currentRoute;return e?[].concat.apply([],e.matched.map(function(t){return Object.keys(t.components).map(function(e){return t.components[e]})})):[]},ce.prototype.resolve=function(t,e,n){var r=ft(t,e||this.history.current,n,this),o=this.match(r,e),i=o.redirectedFrom||o.fullPath,a=this.history.base,c=fe(a,i,this.mode);return{location:r,route:o,href:c,normalizedTo:r,resolved:o}},ce.prototype.addRoutes=function(t){this.matcher.addRoutes(t),this.history.current!==b&&this.history.transitionTo(this.history.getCurrentLocation())},Object.defineProperties(ce.prototype,se),ce.install=T,ce.version="3.0.2",P&&window.Vue&&window.Vue.use(ce),e["a"]=ce},"8ce0":function(t,e,n){var r=n("3adc"),o=n("f845");t.exports=n("7d95")?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},9093:function(t,e,n){var r=n("ce10"),o=n("e11e").concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},9184:function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},"91d3":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("78ef");e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:":";return(0,r.withParams)({type:"macAddress"},function(e){if(!(0,r.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(o)})};var o=function(t){return t.toLowerCase().match(/^[0-9a-f]{2}$/)}},"93c4":function(t,e,n){"use strict";var r=n("2a4e")(!0);n("e4a9")(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},"9a51":function(t,e,n){var r=n("d13f");r(r.S+r.F,"Object",{assign:n("9e44")})},"9b43":function(t,e,n){var r=n("d8e8");t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},"9c6c":function(t,e,n){var r=n("2b4c")("unscopables"),o=Array.prototype;void 0==o[r]&&n("32e9")(o,r,{}),t.exports=function(t){o[r][t]=!0}},"9c93":function(t,e,n){var r=n("0f89");t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(a){var i=t["return"];throw void 0!==i&&r(i.call(t)),a}}},"9def":function(t,e,n){var r=n("4588"),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},"9e1e":function(t,e,n){t.exports=!n("79e5")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},"9e44":function(t,e,n){"use strict";var r=n("7633"),o=n("31c2"),i=n("d74e"),a=n("0185"),c=n("8bab"),s=Object.assign;t.exports=!s||n("d782")(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=s({},t)[n]||Object.keys(s({},e)).join("")!=r})?function(t,e){var n=a(t),s=arguments.length,u=1,f=o.f,l=i.f;while(s>u){var p,d=c(arguments[u++]),h=f?r(d).concat(f(d)):r(d),v=h.length,y=0;while(v>y)l.call(d,p=h[y++])&&(n[p]=d[p])}return n}:s},"9ed1":function(t,e,n){var r=n("f6d7"),o=n("49c1");t.exports=Object.keys||function(t){return r(t,o)}},"9faf":function(t,e,n){var r=n("1f51");t.exports=function(t,e,n){for(var o in e)r(t,o,e[o],n);return t}},a026:function(t,e,n){"use strict";(function(t){ /*! * Vue.js v2.6.10 * (c) 2014-2019 Evan You * Released under the MIT License. */ -var n=Object.freeze({});function r(t){return void 0===t||null===t}function o(t){return void 0!==t&&null!==t}function i(t){return!0===t}function a(t){return!1===t}function c(t){return"string"===typeof t||"number"===typeof t||"symbol"===typeof t||"boolean"===typeof t}function s(t){return null!==t&&"object"===typeof t}var u=Object.prototype.toString;function f(t){return"[object Object]"===u.call(t)}function l(t){return"[object RegExp]"===u.call(t)}function p(t){var e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function d(t){return o(t)&&"function"===typeof t.then&&"function"===typeof t.catch}function h(t){return null==t?"":Array.isArray(t)||f(t)&&t.toString===u?JSON.stringify(t,null,2):String(t)}function v(t){var e=parseFloat(t);return isNaN(e)?t:e}function y(t,e){for(var n=Object.create(null),r=t.split(","),o=0;o-1)return t.splice(n,1)}}var _=Object.prototype.hasOwnProperty;function w(t,e){return _.call(t,e)}function x(t){var e=Object.create(null);return function(n){var r=e[n];return r||(e[n]=t(n))}}var O=/-(\w)/g,S=x(function(t){return t.replace(O,function(t,e){return e?e.toUpperCase():""})}),$=x(function(t){return t.charAt(0).toUpperCase()+t.slice(1)}),A=/\B([A-Z])/g,C=x(function(t){return t.replace(A,"-$1").toLowerCase()});function k(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 E(t,e){return t.bind(e)}var M=Function.prototype.bind?E:k;function j(t,e){e=e||0;var n=t.length-e,r=new Array(n);while(n--)r[n]=t[n+e];return r}function T(t,e){for(var n in e)t[n]=e[n];return t}function P(t){for(var e={},n=0;n0,ot=et&&et.indexOf("edge/")>0,it=(et&&et.indexOf("android"),et&&/iphone|ipad|ipod|ios/.test(et)||"ios"===tt),at=(et&&/chrome\/\d+/.test(et),et&&/phantomjs/.test(et),et&&et.match(/firefox\/(\d+)/)),ct={}.watch,st=!1;if(Z)try{var ut={};Object.defineProperty(ut,"passive",{get:function(){st=!0}}),window.addEventListener("test-passive",null,ut)}catch(Ju){}var ft=function(){return void 0===X&&(X=!Z&&!Q&&"undefined"!==typeof t&&(t["process"]&&"server"===t["process"].env.VUE_ENV)),X},lt=Z&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function pt(t){return"function"===typeof t&&/native code/.test(t.toString())}var dt,ht="undefined"!==typeof Symbol&&pt(Symbol)&&"undefined"!==typeof Reflect&&pt(Reflect.ownKeys);dt="undefined"!==typeof Set&&pt(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 vt=D,yt=0,gt=function(){this.id=yt++,this.subs=[]};gt.prototype.addSub=function(t){this.subs.push(t)},gt.prototype.removeSub=function(t){b(this.subs,t)},gt.prototype.depend=function(){gt.target&>.target.addDep(this)},gt.prototype.notify=function(){var t=this.subs.slice();for(var e=0,n=t.length;e-1)if(i&&!w(o,"default"))a=!1;else if(""===a||a===C(t)){var s=ne(String,o.type);(s<0||c0&&(a=Ee(a,(e||"")+"_"+n),ke(a[0])&&ke(u)&&(f[s]=St(u.text+a[0].text),a.shift()),f.push.apply(f,a)):c(a)?ke(u)?f[s]=St(u.text+a):""!==a&&f.push(St(a)):ke(a)&&ke(u)?f[s]=St(u.text+a.text):(i(t._isVList)&&o(a.tag)&&r(a.key)&&o(e)&&(a.key="__vlist"+e+"_"+n+"__"),f.push(a)));return f}function Me(t){var e=t.$options.provide;e&&(t._provided="function"===typeof e?e.call(t):e)}function je(t){var e=Te(t.$options.inject,t);e&&(jt(!1),Object.keys(e).forEach(function(n){It(t,n,e[n])}),jt(!0))}function Te(t,e){if(t){for(var n=Object.create(null),r=ht?Reflect.ownKeys(t):Object.keys(t),o=0;o0,a=t?!!t.$stable:!i,c=t&&t.$key;if(t){if(t._normalized)return t._normalized;if(a&&r&&r!==n&&c===r.$key&&!i&&!r.$hasNormal)return r;for(var s in o={},t)t[s]&&"$"!==s[0]&&(o[s]=Ie(e,s,t[s]))}else o={};for(var u in e)u in o||(o[u]=Ne(e,u));return t&&Object.isExtensible(t)&&(t._normalized=o),W(o,"$stable",a),W(o,"$key",c),W(o,"$hasNormal",i),o}function Ie(t,e,n){var r=function(){var t=arguments.length?n.apply(null,arguments):n({});return t=t&&"object"===typeof t&&!Array.isArray(t)?[t]:Ce(t),t&&(0===t.length||1===t.length&&t[0].isComment)?void 0:t};return n.proxy&&Object.defineProperty(t,e,{get:r,enumerable:!0,configurable:!0}),r}function Ne(t,e){return function(){return t[e]}}function Re(t,e){var n,r,i,a,c;if(Array.isArray(t)||"string"===typeof t)for(n=new Array(t.length),r=0,i=t.length;r1?j(n):n;for(var r=j(arguments,1),o='event handler for "'+t+'"',i=0,a=n.length;idocument.createEvent("Event").timeStamp&&(Xn=function(){return Jn.now()})}function Zn(){var t,e;for(Kn=Xn(),qn=!0,Un.sort(function(t,e){return t.id-e.id}),Wn=0;WnWn&&Un[n].id>t.id)n--;Un.splice(n+1,0,t)}else Un.push(t);Yn||(Yn=!0,ye(Zn))}}var rr=0,or=function(t,e,n,r,o){this.vm=t,o&&(t._watcher=this),t._watchers.push(this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync,this.before=r.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++rr,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new dt,this.newDepIds=new dt,this.expression="","function"===typeof e?this.getter=e:(this.getter=K(e),this.getter||(this.getter=D)),this.value=this.lazy?void 0:this.get()};or.prototype.get=function(){var t;bt(this);var e=this.vm;try{t=this.getter.call(e,e)}catch(Ju){if(!this.user)throw Ju;re(Ju,e,'getter for watcher "'+this.expression+'"')}finally{this.deep&&me(t),_t(),this.cleanupDeps()}return t},or.prototype.addDep=function(t){var e=t.id;this.newDepIds.has(e)||(this.newDepIds.add(e),this.newDeps.push(t),this.depIds.has(e)||t.addSub(this))},or.prototype.cleanupDeps=function(){var t=this.deps.length;while(t--){var e=this.deps[t];this.newDepIds.has(e.id)||e.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},or.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():nr(this)},or.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||s(t)||this.deep){var e=this.value;if(this.value=t,this.user)try{this.cb.call(this.vm,t,e)}catch(Ju){re(Ju,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,t,e)}}},or.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},or.prototype.depend=function(){var t=this.deps.length;while(t--)this.deps[t].depend()},or.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||b(this.vm._watchers,this);var t=this.deps.length;while(t--)this.deps[t].removeSub(this);this.active=!1}};var ir={enumerable:!0,configurable:!0,get:D,set:D};function ar(t,e,n){ir.get=function(){return this[e][n]},ir.set=function(t){this[e][n]=t},Object.defineProperty(t,n,ir)}function cr(t){t._watchers=[];var e=t.$options;e.props&&sr(t,e.props),e.methods&&yr(t,e.methods),e.data?ur(t):Lt(t._data={},!0),e.computed&&pr(t,e.computed),e.watch&&e.watch!==ct&&gr(t,e.watch)}function sr(t,e){var n=t.$options.propsData||{},r=t._props={},o=t.$options._propKeys=[],i=!t.$parent;i||jt(!1);var a=function(i){o.push(i);var a=Zt(i,e,n,t);It(r,i,a),i in t||ar(t,"_props",i)};for(var c in e)a(c);jt(!0)}function ur(t){var e=t.$options.data;e=t._data="function"===typeof e?fr(e,t):e||{},f(e)||(e={});var n=Object.keys(e),r=t.$options.props,o=(t.$options.methods,n.length);while(o--){var i=n[o];0,r&&w(r,i)||q(i)||ar(t,"_data",i)}Lt(e,!0)}function fr(t,e){bt();try{return t.call(e,e)}catch(Ju){return re(Ju,e,"data()"),{}}finally{_t()}}var lr={lazy:!0};function pr(t,e){var n=t._computedWatchers=Object.create(null),r=ft();for(var o in e){var i=e[o],a="function"===typeof i?i:i.get;0,r||(n[o]=new or(t,a||D,D,lr)),o in t||dr(t,o,i)}}function dr(t,e,n){var r=!ft();"function"===typeof n?(ir.get=r?hr(e):vr(n),ir.set=D):(ir.get=n.get?r&&!1!==n.cache?hr(e):vr(n.get):D,ir.set=n.set||D),Object.defineProperty(t,e,ir)}function hr(t){return function(){var e=this._computedWatchers&&this._computedWatchers[t];if(e)return e.dirty&&e.evaluate(),gt.target&&e.depend(),e.value}}function vr(t){return function(){return t.call(this,this)}}function yr(t,e){t.$options.props;for(var n in e)t[n]="function"!==typeof e[n]?D:M(e[n],t)}function gr(t,e){for(var n in e){var r=e[n];if(Array.isArray(r))for(var o=0;o-1)return this;var n=j(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}}function Cr(t){t.mixin=function(t){return this.options=Xt(this.options,t),this}}function kr(t){t.cid=0;var e=1;t.extend=function(t){t=t||{};var n=this,r=n.cid,o=t._Ctor||(t._Ctor={});if(o[r])return o[r];var i=t.name||n.options.name;var a=function(t){this._init(t)};return a.prototype=Object.create(n.prototype),a.prototype.constructor=a,a.cid=e++,a.options=Xt(n.options,t),a["super"]=n,a.options.props&&Er(a),a.options.computed&&Mr(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,U.forEach(function(t){a[t]=n[t]}),i&&(a.options.components[i]=a),a.superOptions=n.options,a.extendOptions=t,a.sealedOptions=T({},a.options),o[r]=a,a}}function Er(t){var e=t.options.props;for(var n in e)ar(t.prototype,"_props",n)}function Mr(t){var e=t.options.computed;for(var n in e)dr(t.prototype,n,e[n])}function jr(t){U.forEach(function(e){t[e]=function(t,n){return n?("component"===e&&f(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]}})}function Tr(t){return t&&(t.Ctor.options.name||t.tag)}function Pr(t,e){return Array.isArray(t)?t.indexOf(e)>-1:"string"===typeof t?t.split(",").indexOf(e)>-1:!!l(t)&&t.test(e)}function Dr(t,e){var n=t.cache,r=t.keys,o=t._vnode;for(var i in n){var a=n[i];if(a){var c=Tr(a.componentOptions);c&&!e(c)&&Lr(n,i,r,o)}}}function Lr(t,e,n,r){var o=t[e];!o||r&&o.tag===r.tag||o.componentInstance.$destroy(),t[e]=null,b(n,e)}wr($r),br($r),jn($r),Ln($r),_n($r);var Ir=[String,RegExp,Array],Nr={name:"keep-alive",abstract:!0,props:{include:Ir,exclude:Ir,max:[String,Number]},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var t in this.cache)Lr(this.cache,t,this.keys)},mounted:function(){var t=this;this.$watch("include",function(e){Dr(t,function(t){return Pr(e,t)})}),this.$watch("exclude",function(e){Dr(t,function(t){return!Pr(e,t)})})},render:function(){var t=this.$slots.default,e=$n(t),n=e&&e.componentOptions;if(n){var r=Tr(n),o=this,i=o.include,a=o.exclude;if(i&&(!r||!Pr(i,r))||a&&r&&Pr(a,r))return e;var c=this,s=c.cache,u=c.keys,f=null==e.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):e.key;s[f]?(e.componentInstance=s[f].componentInstance,b(u,f),u.push(f)):(s[f]=e,u.push(f),this.max&&u.length>parseInt(this.max)&&Lr(s,u[0],u,this._vnode)),e.data.keepAlive=!0}return e||t&&t[0]}},Rr={KeepAlive:Nr};function Fr(t){var e={get:function(){return B}};Object.defineProperty(t,"config",e),t.util={warn:vt,extend:T,mergeOptions:Xt,defineReactive:It},t.set=Nt,t.delete=Rt,t.nextTick=ye,t.observable=function(t){return Lt(t),t},t.options=Object.create(null),U.forEach(function(e){t.options[e+"s"]=Object.create(null)}),t.options._base=t,T(t.options.components,Rr),Ar(t),Cr(t),kr(t),jr(t)}Fr($r),Object.defineProperty($r.prototype,"$isServer",{get:ft}),Object.defineProperty($r.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty($r,"FunctionalRenderContext",{value:Qe}),$r.version="2.6.10";var zr=y("style,class"),Hr=y("input,textarea,option,select,progress"),Ur=function(t,e,n){return"value"===n&&Hr(t)&&"button"!==e||"selected"===n&&"option"===t||"checked"===n&&"input"===t||"muted"===n&&"video"===t},Vr=y("contenteditable,draggable,spellcheck"),Br=y("events,caret,typing,plaintext-only"),Yr=function(t,e){return Xr(e)||"false"===e?"false":"contenteditable"===t&&Br(e)?e:"true"},qr=y("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,translate,truespeed,typemustmatch,visible"),Wr="http://www.w3.org/1999/xlink",Gr=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},Kr=function(t){return Gr(t)?t.slice(6,t.length):""},Xr=function(t){return null==t||!1===t};function Jr(t){var e=t.data,n=t,r=t;while(o(r.componentInstance))r=r.componentInstance._vnode,r&&r.data&&(e=Zr(r.data,e));while(o(n=n.parent))n&&n.data&&(e=Zr(e,n.data));return Qr(e.staticClass,e.class)}function Zr(t,e){return{staticClass:to(t.staticClass,e.staticClass),class:o(t.class)?[t.class,e.class]:e.class}}function Qr(t,e){return o(t)||o(e)?to(t,eo(e)):""}function to(t,e){return t?e?t+" "+e:t:e||""}function eo(t){return Array.isArray(t)?no(t):s(t)?ro(t):"string"===typeof t?t:""}function no(t){for(var e,n="",r=0,i=t.length;r-1?fo[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:fo[t]=/HTMLUnknownElement/.test(e.toString())}var po=y("text,number,password,search,email,tel,url");function ho(t){if("string"===typeof t){var e=document.querySelector(t);return e||document.createElement("div")}return t}function vo(t,e){var n=document.createElement(t);return"select"!==t?n:(e.data&&e.data.attrs&&void 0!==e.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n)}function yo(t,e){return document.createElementNS(oo[t],e)}function go(t){return document.createTextNode(t)}function mo(t){return document.createComment(t)}function bo(t,e,n){t.insertBefore(e,n)}function _o(t,e){t.removeChild(e)}function wo(t,e){t.appendChild(e)}function xo(t){return t.parentNode}function Oo(t){return t.nextSibling}function So(t){return t.tagName}function $o(t,e){t.textContent=e}function Ao(t,e){t.setAttribute(e,"")}var Co=Object.freeze({createElement:vo,createElementNS:yo,createTextNode:go,createComment:mo,insertBefore:bo,removeChild:_o,appendChild:wo,parentNode:xo,nextSibling:Oo,tagName:So,setTextContent:$o,setStyleScope:Ao}),ko={create:function(t,e){Eo(e)},update:function(t,e){t.data.ref!==e.data.ref&&(Eo(t,!0),Eo(e))},destroy:function(t){Eo(t,!0)}};function Eo(t,e){var n=t.data.ref;if(o(n)){var r=t.context,i=t.componentInstance||t.elm,a=r.$refs;e?Array.isArray(a[n])?b(a[n],i):a[n]===i&&(a[n]=void 0):t.data.refInFor?Array.isArray(a[n])?a[n].indexOf(i)<0&&a[n].push(i):a[n]=[i]:a[n]=i}}var Mo=new wt("",{},[]),jo=["create","activate","update","remove","destroy"];function To(t,e){return t.key===e.key&&(t.tag===e.tag&&t.isComment===e.isComment&&o(t.data)===o(e.data)&&Po(t,e)||i(t.isAsyncPlaceholder)&&t.asyncFactory===e.asyncFactory&&r(e.asyncFactory.error))}function Po(t,e){if("input"!==t.tag)return!0;var n,r=o(n=t.data)&&o(n=n.attrs)&&n.type,i=o(n=e.data)&&o(n=n.attrs)&&n.type;return r===i||po(r)&&po(i)}function Do(t,e,n){var r,i,a={};for(r=e;r<=n;++r)i=t[r].key,o(i)&&(a[i]=r);return a}function Lo(t){var e,n,a={},s=t.modules,u=t.nodeOps;for(e=0;ev?(l=r(n[m+1])?null:n[m+1].elm,O(t,l,n,h,m,i)):h>m&&$(t,e,p,v)}function k(t,e,n,r){for(var i=n;i-1?qo(t,e,n):qr(e)?Xr(n)?t.removeAttribute(e):(n="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,n)):Vr(e)?t.setAttribute(e,Yr(e,n)):Gr(e)?Xr(n)?t.removeAttributeNS(Wr,Kr(e)):t.setAttributeNS(Wr,e,n):qo(t,e,n)}function qo(t,e,n){if(Xr(n))t.removeAttribute(e);else{if(nt&&!rt&&"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 Wo={create:Bo,update:Bo};function Go(t,e){var n=e.elm,i=e.data,a=t.data;if(!(r(i.staticClass)&&r(i.class)&&(r(a)||r(a.staticClass)&&r(a.class)))){var c=Jr(e),s=n._transitionClasses;o(s)&&(c=to(c,eo(s))),c!==n._prevClass&&(n.setAttribute("class",c),n._prevClass=c)}}var Ko,Xo,Jo,Zo,Qo,ti,ei={create:Go,update:Go},ni=/[\w).+\-_$\]]/;function ri(t){var e,n,r,o,i,a=!1,c=!1,s=!1,u=!1,f=0,l=0,p=0,d=0;for(r=0;r=0;h--)if(v=t.charAt(h)," "!==v)break;v&&ni.test(v)||(u=!0)}}else void 0===o?(d=r+1,o=t.slice(0,r).trim()):y();function y(){(i||(i=[])).push(t.slice(d,r).trim()),d=r+1}if(void 0===o?o=t.slice(0,r).trim():0!==d&&y(),i)for(r=0;r-1?{exp:t.slice(0,Zo),key:'"'+t.slice(Zo+1)+'"'}:{exp:t,key:null};Xo=t,Zo=Qo=ti=0;while(!xi())Jo=wi(),Oi(Jo)?$i(Jo):91===Jo&&Si(Jo);return{exp:t.slice(0,Qo),key:t.slice(Qo+1,ti)}}function wi(){return Xo.charCodeAt(++Zo)}function xi(){return Zo>=Ko}function Oi(t){return 34===t||39===t}function Si(t){var e=1;Qo=Zo;while(!xi())if(t=wi(),Oi(t))$i(t);else if(91===t&&e++,93===t&&e--,0===e){ti=Zo;break}}function $i(t){var e=t;while(!xi())if(t=wi(),t===e)break}var Ai,Ci="__r",ki="__c";function Ei(t,e,n){n;var r=e.value,o=e.modifiers,i=t.tag,a=t.attrsMap.type;if(t.component)return mi(t,r,o),!1;if("select"===i)Ti(t,r,o);else if("input"===i&&"checkbox"===a)Mi(t,r,o);else if("input"===i&&"radio"===a)ji(t,r,o);else if("input"===i||"textarea"===i)Pi(t,r,o);else{if(!B.isReservedTag(i))return mi(t,r,o),!1}return!0}function Mi(t,e,n){var r=n&&n.number,o=hi(t,"value")||"null",i=hi(t,"true-value")||"true",a=hi(t,"false-value")||"false";ci(t,"checked","Array.isArray("+e+")?_i("+e+","+o+")>-1"+("true"===i?":("+e+")":":_q("+e+","+i+")")),pi(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&&("+bi(e,"$$a.concat([$$v])")+")}else{$$i>-1&&("+bi(e,"$$a.slice(0,$$i).concat($$a.slice($$i+1))")+")}}else{"+bi(e,"$$c")+"}",null,!0)}function ji(t,e,n){var r=n&&n.number,o=hi(t,"value")||"null";o=r?"_n("+o+")":o,ci(t,"checked","_q("+e+","+o+")"),pi(t,"change",bi(e,o),null,!0)}function Ti(t,e,n){var r=n&&n.number,o='Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return '+(r?"_n(val)":"val")+"})",i="$event.target.multiple ? $$selectedVal : $$selectedVal[0]",a="var $$selectedVal = "+o+";";a=a+" "+bi(e,i),pi(t,"change",a,null,!0)}function Pi(t,e,n){var r=t.attrsMap.type,o=n||{},i=o.lazy,a=o.number,c=o.trim,s=!i&&"range"!==r,u=i?"change":"range"===r?Ci:"input",f="$event.target.value";c&&(f="$event.target.value.trim()"),a&&(f="_n("+f+")");var l=bi(e,f);s&&(l="if($event.target.composing)return;"+l),ci(t,"value","("+e+")"),pi(t,u,l,null,!0),(c||a)&&pi(t,"blur","$forceUpdate()")}function Di(t){if(o(t[Ci])){var e=nt?"change":"input";t[e]=[].concat(t[Ci],t[e]||[]),delete t[Ci]}o(t[ki])&&(t.change=[].concat(t[ki],t.change||[]),delete t[ki])}function Li(t,e,n){var r=Ai;return function o(){var i=e.apply(null,arguments);null!==i&&Ri(t,o,n,r)}}var Ii=se&&!(at&&Number(at[1])<=53);function Ni(t,e,n,r){if(Ii){var o=Kn,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)}}Ai.addEventListener(t,e,st?{capture:n,passive:r}:n)}function Ri(t,e,n,r){(r||Ai).removeEventListener(t,e._wrapper||e,n)}function Fi(t,e){if(!r(t.data.on)||!r(e.data.on)){var n=e.data.on||{},o=t.data.on||{};Ai=e.elm,Di(n),xe(n,o,Ni,Ri,Li,e.context),Ai=void 0}}var zi,Hi={create:Fi,update:Fi};function Ui(t,e){if(!r(t.data.domProps)||!r(e.data.domProps)){var n,i,a=e.elm,c=t.data.domProps||{},s=e.data.domProps||{};for(n in o(s.__ob__)&&(s=e.data.domProps=T({},s)),c)n in s||(a[n]="");for(n in s){if(i=s[n],"textContent"===n||"innerHTML"===n){if(e.children&&(e.children.length=0),i===c[n])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===n&&"PROGRESS"!==a.tagName){a._value=i;var u=r(i)?"":String(i);Vi(a,u)&&(a.value=u)}else if("innerHTML"===n&&ao(a.tagName)&&r(a.innerHTML)){zi=zi||document.createElement("div"),zi.innerHTML=""+i+"";var f=zi.firstChild;while(a.firstChild)a.removeChild(a.firstChild);while(f.firstChild)a.appendChild(f.firstChild)}else if(i!==c[n])try{a[n]=i}catch(Ju){}}}}function Vi(t,e){return!t.composing&&("OPTION"===t.tagName||Bi(t,e)||Yi(t,e))}function Bi(t,e){var n=!0;try{n=document.activeElement!==t}catch(Ju){}return n&&t.value!==e}function Yi(t,e){var n=t.value,r=t._vModifiers;if(o(r)){if(r.number)return v(n)!==v(e);if(r.trim)return n.trim()!==e.trim()}return n!==e}var qi={create:Ui,update:Ui},Wi=x(function(t){var e={},n=/;(?![^(]*\))/g,r=/:(.+)/;return t.split(n).forEach(function(t){if(t){var n=t.split(r);n.length>1&&(e[n[0].trim()]=n[1].trim())}}),e});function Gi(t){var e=Ki(t.style);return t.staticStyle?T(t.staticStyle,e):e}function Ki(t){return Array.isArray(t)?P(t):"string"===typeof t?Wi(t):t}function Xi(t,e){var n,r={};if(e){var o=t;while(o.componentInstance)o=o.componentInstance._vnode,o&&o.data&&(n=Gi(o.data))&&T(r,n)}(n=Gi(t.data))&&T(r,n);var i=t;while(i=i.parent)i.data&&(n=Gi(i.data))&&T(r,n);return r}var Ji,Zi=/^--/,Qi=/\s*!important$/,ta=function(t,e,n){if(Zi.test(e))t.style.setProperty(e,n);else if(Qi.test(n))t.style.setProperty(C(e),n.replace(Qi,""),"important");else{var r=na(e);if(Array.isArray(n))for(var o=0,i=n.length;o-1?e.split(ia).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 ca(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(ia).forEach(function(e){return t.classList.remove(e)}):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{var n=" "+(t.getAttribute("class")||"")+" ",r=" "+e+" ";while(n.indexOf(r)>=0)n=n.replace(r," ");n=n.trim(),n?t.setAttribute("class",n):t.removeAttribute("class")}}function sa(t){if(t){if("object"===typeof t){var e={};return!1!==t.css&&T(e,ua(t.name||"v")),T(e,t),e}return"string"===typeof t?ua(t):void 0}}var ua=x(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"}}),fa=Z&&!rt,la="transition",pa="animation",da="transition",ha="transitionend",va="animation",ya="animationend";fa&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(da="WebkitTransition",ha="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(va="WebkitAnimation",ya="webkitAnimationEnd"));var ga=Z?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()};function ma(t){ga(function(){ga(t)})}function ba(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),aa(t,e))}function _a(t,e){t._transitionClasses&&b(t._transitionClasses,e),ca(t,e)}function wa(t,e,n){var r=Oa(t,e),o=r.type,i=r.timeout,a=r.propCount;if(!o)return n();var c=o===la?ha:ya,s=0,u=function(){t.removeEventListener(c,f),n()},f=function(e){e.target===t&&++s>=a&&u()};setTimeout(function(){s0&&(n=la,f=a,l=i.length):e===pa?u>0&&(n=pa,f=u,l=s.length):(f=Math.max(a,u),n=f>0?a>u?la:pa:null,l=n?n===la?i.length:s.length:0);var p=n===la&&xa.test(r[da+"Property"]);return{type:n,timeout:f,propCount:l,hasTransform:p}}function Sa(t,e){while(t.length1}function Ma(t,e){!0!==e.data.show&&Aa(e)}var ja=Z?{create:Ma,activate:Ma,remove:function(t,e){!0!==t.data.show?Ca(t,e):e()}}:{},Ta=[Wo,ei,Hi,qi,oa,ja],Pa=Ta.concat(Vo),Da=Lo({nodeOps:Co,modules:Pa});rt&&document.addEventListener("selectionchange",function(){var t=document.activeElement;t&&t.vmodel&&Ua(t,"input")});var La={inserted:function(t,e,n,r){"select"===n.tag?(r.elm&&!r.elm._vOptions?Oe(n,"postpatch",function(){La.componentUpdated(t,e,n)}):Ia(t,e,n.context),t._vOptions=[].map.call(t.options,Fa)):("textarea"===n.tag||po(t.type))&&(t._vModifiers=e.modifiers,e.modifiers.lazy||(t.addEventListener("compositionstart",za),t.addEventListener("compositionend",Ha),t.addEventListener("change",Ha),rt&&(t.vmodel=!0)))},componentUpdated:function(t,e,n){if("select"===n.tag){Ia(t,e,n.context);var r=t._vOptions,o=t._vOptions=[].map.call(t.options,Fa);if(o.some(function(t,e){return!R(t,r[e])})){var i=t.multiple?e.value.some(function(t){return Ra(t,o)}):e.value!==e.oldValue&&Ra(e.value,o);i&&Ua(t,"change")}}}};function Ia(t,e,n){Na(t,e,n),(nt||ot)&&setTimeout(function(){Na(t,e,n)},0)}function Na(t,e,n){var r=e.value,o=t.multiple;if(!o||Array.isArray(r)){for(var i,a,c=0,s=t.options.length;c-1,a.selected!==i&&(a.selected=i);else if(R(Fa(a),r))return void(t.selectedIndex!==c&&(t.selectedIndex=c));o||(t.selectedIndex=-1)}}function Ra(t,e){return e.every(function(e){return!R(e,t)})}function Fa(t){return"_value"in t?t._value:t.value}function za(t){t.target.composing=!0}function Ha(t){t.target.composing&&(t.target.composing=!1,Ua(t.target,"input"))}function Ua(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function Va(t){return!t.componentInstance||t.data&&t.data.transition?t:Va(t.componentInstance._vnode)}var Ba={bind:function(t,e,n){var r=e.value;n=Va(n);var o=n.data&&n.data.transition,i=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;r&&o?(n.data.show=!0,Aa(n,function(){t.style.display=i})):t.style.display=r?i:"none"},update:function(t,e,n){var r=e.value,o=e.oldValue;if(!r!==!o){n=Va(n);var i=n.data&&n.data.transition;i?(n.data.show=!0,r?Aa(n,function(){t.style.display=t.__vOriginalDisplay}):Ca(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)}},Ya={model:La,show:Ba},qa={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 Wa(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?Wa($n(e.children)):t}function Ga(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[S(i)]=o[i];return e}function Ka(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}function Xa(t){while(t=t.parent)if(t.data.transition)return!0}function Ja(t,e){return e.key===t.key&&e.tag===t.tag}var Za=function(t){return t.tag||Sn(t)},Qa=function(t){return"show"===t.name},tc={name:"transition",props:qa,abstract:!0,render:function(t){var e=this,n=this.$slots.default;if(n&&(n=n.filter(Za),n.length)){0;var r=this.mode;0;var o=n[0];if(Xa(this.$vnode))return o;var i=Wa(o);if(!i)return o;if(this._leaving)return Ka(t,o);var a="__transition-"+this._uid+"-";i.key=null==i.key?i.isComment?a+"comment":a+i.tag:c(i.key)?0===String(i.key).indexOf(a)?i.key:a+i.key:i.key;var s=(i.data||(i.data={})).transition=Ga(this),u=this._vnode,f=Wa(u);if(i.data.directives&&i.data.directives.some(Qa)&&(i.data.show=!0),f&&f.data&&!Ja(i,f)&&!Sn(f)&&(!f.componentInstance||!f.componentInstance._vnode.isComment)){var l=f.data.transition=T({},s);if("out-in"===r)return this._leaving=!0,Oe(l,"afterLeave",function(){e._leaving=!1,e.$forceUpdate()}),Ka(t,o);if("in-out"===r){if(Sn(i))return u;var p,d=function(){p()};Oe(s,"afterEnter",d),Oe(s,"enterCancelled",d),Oe(l,"delayLeave",function(t){p=t})}}return o}}},ec=T({tag:String,moveClass:String},qa);delete ec.mode;var nc={props:ec,beforeMount:function(){var t=this,e=this._update;this._update=function(n,r){var o=Pn(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=Ga(this),c=0;cs&&(c.push(i=t.slice(s,o)),a.push(JSON.stringify(i)));var u=ri(r[1].trim());a.push("_s("+u+")"),c.push({"@binding":u}),s=o+r[0].length}return s\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,Oc=/^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,Sc="[a-zA-Z_][\\-\\.0-9_a-zA-Z"+Y.source+"]*",$c="((?:"+Sc+"\\:)?"+Sc+")",Ac=new RegExp("^<"+$c),Cc=/^\s*(\/?)>/,kc=new RegExp("^<\\/"+$c+"[^>]*>"),Ec=/^]+>/i,Mc=/^",""":'"',"&":"&"," ":"\n"," ":"\t","'":"'"},Lc=/&(?:lt|gt|quot|amp|#39);/g,Ic=/&(?:lt|gt|quot|amp|#39|#10|#9);/g,Nc=y("pre,textarea",!0),Rc=function(t,e){return t&&Nc(t)&&"\n"===e[0]};function Fc(t,e){var n=e?Ic:Lc;return t.replace(n,function(t){return Dc[t]})}function zc(t,e){var n,r,o=[],i=e.expectHTML,a=e.isUnaryTag||L,c=e.canBeLeftOpenTag||L,s=0;while(t){if(n=t,r&&Tc(r)){var u=0,f=r.toLowerCase(),l=Pc[f]||(Pc[f]=new RegExp("([\\s\\S]*?)(]*>)","i")),p=t.replace(l,function(t,n,r){return u=r.length,Tc(f)||"noscript"===f||(n=n.replace(//g,"$1").replace(//g,"$1")),Rc(f,n)&&(n=n.slice(1)),e.chars&&e.chars(n),""});s+=t.length-p.length,t=p,A(f,s-u,s)}else{var d=t.indexOf("<");if(0===d){if(Mc.test(t)){var h=t.indexOf("--\x3e");if(h>=0){e.shouldKeepComment&&e.comment(t.substring(4,h),s,s+h+3),O(h+3);continue}}if(jc.test(t)){var v=t.indexOf("]>");if(v>=0){O(v+2);continue}}var y=t.match(Ec);if(y){O(y[0].length);continue}var g=t.match(kc);if(g){var m=s;O(g[0].length),A(g[1],m,s);continue}var b=S();if(b){$(b),Rc(b.tagName,t)&&O(1);continue}}var _=void 0,w=void 0,x=void 0;if(d>=0){w=t.slice(d);while(!kc.test(w)&&!Ac.test(w)&&!Mc.test(w)&&!jc.test(w)){if(x=w.indexOf("<",1),x<0)break;d+=x,w=t.slice(d)}_=t.substring(0,d)}d<0&&(_=t),_&&O(_.length),e.chars&&_&&e.chars(_,s-_.length,s)}if(t===n){e.chars&&e.chars(t);break}}function O(e){s+=e,t=t.substring(e)}function S(){var e=t.match(Ac);if(e){var n,r,o={tagName:e[1],attrs:[],start:s};O(e[0].length);while(!(n=t.match(Cc))&&(r=t.match(Oc)||t.match(xc)))r.start=s,O(r[0].length),r.end=s,o.attrs.push(r);if(n)return o.unarySlash=n[1],O(n[0].length),o.end=s,o}}function $(t){var n=t.tagName,s=t.unarySlash;i&&("p"===r&&wc(n)&&A(r),c(n)&&r===n&&A(n));for(var u=a(n)||!!s,f=t.attrs.length,l=new Array(f),p=0;p=0;a--)if(o[a].lowerCasedTag===c)break}else a=0;if(a>=0){for(var u=o.length-1;u>=a;u--)e.end&&e.end(o[u].tag,n,i);o.length=a,r=a&&o[a-1].tag}else"br"===c?e.start&&e.start(t,[],!0,n,i):"p"===c&&(e.start&&e.start(t,[],!1,n,i),e.end&&e.end(t,n,i))}A()}var Hc,Uc,Vc,Bc,Yc,qc,Wc,Gc,Kc=/^@|^v-on:/,Xc=/^v-|^@|^:/,Jc=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,Zc=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,Qc=/^\(|\)$/g,ts=/^\[.*\]$/,es=/:(.*)$/,ns=/^:|^\.|^v-bind:/,rs=/\.[^.\]]+(?=[^\]]*$)/g,os=/^v-slot(:|$)|^#/,is=/[\r\n]/,as=/\s+/g,cs=x(mc.decode),ss="_empty_";function us(t,e,n){return{type:1,tag:t,attrsList:e,attrsMap:Ms(e),rawAttrsMap:{},parent:n,children:[]}}function fs(t,e){Hc=e.warn||ii,qc=e.isPreTag||L,Wc=e.mustUseProp||L,Gc=e.getTagNamespace||L;var n=e.isReservedTag||L;(function(t){return!!t.component||!n(t.tag)}),Vc=ai(e.modules,"transformNode"),Bc=ai(e.modules,"preTransformNode"),Yc=ai(e.modules,"postTransformNode"),Uc=e.delimiters;var r,o,i=[],a=!1!==e.preserveWhitespace,c=e.whitespace,s=!1,u=!1;function f(t){if(l(t),s||t.processed||(t=ds(t,e)),i.length||t===r||r.if&&(t.elseif||t.else)&&ws(r,{exp:t.elseif,block:t}),o&&!t.forbidden)if(t.elseif||t.else)bs(t,o);else{if(t.slotScope){var n=t.slotTarget||'"default"';(o.scopedSlots||(o.scopedSlots={}))[n]=t}o.children.push(t),t.parent=o}t.children=t.children.filter(function(t){return!t.slotScope}),l(t),t.pre&&(s=!1),qc(t.tag)&&(u=!1);for(var a=0;a|^function\s*(?:[\w$]+)?\s*\(/,tu=/\([^)]*?\);*$/,eu=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,nu={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},ru={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"]},ou=function(t){return"if("+t+")return null;"},iu={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:ou("$event.target !== $event.currentTarget"),ctrl:ou("!$event.ctrlKey"),shift:ou("!$event.shiftKey"),alt:ou("!$event.altKey"),meta:ou("!$event.metaKey"),left:ou("'button' in $event && $event.button !== 0"),middle:ou("'button' in $event && $event.button !== 1"),right:ou("'button' in $event && $event.button !== 2")};function au(t,e){var n=e?"nativeOn:":"on:",r="",o="";for(var i in t){var a=cu(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 cu(t){if(!t)return"function(){}";if(Array.isArray(t))return"["+t.map(function(t){return cu(t)}).join(",")+"]";var e=eu.test(t.value),n=Qs.test(t.value),r=eu.test(t.value.replace(tu,""));if(t.modifiers){var o="",i="",a=[];for(var c in t.modifiers)if(iu[c])i+=iu[c],nu[c]&&a.push(c);else if("exact"===c){var s=t.modifiers;i+=ou(["ctrl","shift","alt","meta"].filter(function(t){return!s[t]}).map(function(t){return"$event."+t+"Key"}).join("||"))}else a.push(c);a.length&&(o+=su(a)),i&&(o+=i);var u=e?"return "+t.value+"($event)":n?"return ("+t.value+")($event)":r?"return "+t.value:t.value;return"function($event){"+o+u+"}"}return e||n?t.value:"function($event){"+(r?"return "+t.value:t.value)+"}"}function su(t){return"if(!$event.type.indexOf('key')&&"+t.map(uu).join("&&")+")return null;"}function uu(t){var e=parseInt(t,10);if(e)return"$event.keyCode!=="+e;var n=nu[t],r=ru[t];return"_k($event.keyCode,"+JSON.stringify(t)+","+JSON.stringify(n)+",$event.key,"+JSON.stringify(r)+")"}function fu(t,e){t.wrapListeners=function(t){return"_g("+t+","+e.value+")"}}function lu(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":"")+")"}}var pu={on:fu,bind:lu,cloak:D},du=function(t){this.options=t,this.warn=t.warn||ii,this.transforms=ai(t.modules,"transformCode"),this.dataGenFns=ai(t.modules,"genData"),this.directives=T(T({},pu),t.directives);var e=t.isReservedTag||L;this.maybeComponent=function(t){return!!t.component||!e(t.tag)},this.onceId=0,this.staticRenderFns=[],this.pre=!1};function hu(t,e){var n=new du(e),r=t?vu(t,n):'_c("div")';return{render:"with(this){return "+r+"}",staticRenderFns:n.staticRenderFns}}function vu(t,e){if(t.parent&&(t.pre=t.pre||t.parent.pre),t.staticRoot&&!t.staticProcessed)return yu(t,e);if(t.once&&!t.onceProcessed)return gu(t,e);if(t.for&&!t.forProcessed)return _u(t,e);if(t.if&&!t.ifProcessed)return mu(t,e);if("template"!==t.tag||t.slotTarget||e.pre){if("slot"===t.tag)return Du(t,e);var n;if(t.component)n=Lu(t.component,t,e);else{var r;(!t.plain||t.pre&&e.maybeComponent(t))&&(r=wu(t,e));var o=t.inlineTemplate?null:ku(t,e,!0);n="_c('"+t.tag+"'"+(r?","+r:"")+(o?","+o:"")+")"}for(var i=0;i>>0}function Au(t){return 1===t.type&&("slot"===t.tag||t.children.some(Au))}function Cu(t,e){var n=t.attrsMap["slot-scope"];if(t.if&&!t.ifProcessed&&!n)return mu(t,e,Cu,"null");if(t.for&&!t.forProcessed)return _u(t,e,Cu);var r=t.slotScope===ss?"":String(t.slotScope),o="function("+r+"){return "+("template"===t.tag?t.if&&n?"("+t.if+")?"+(ku(t,e)||"undefined")+":undefined":ku(t,e)||"undefined":vu(t,e))+"}",i=r?"":",proxy:true";return"{key:"+(t.slotTarget||'"default"')+",fn:"+o+i+"}"}function ku(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 c=n?e.maybeComponent(a)?",1":",0":"";return""+(r||vu)(a,e)+c}var s=n?Eu(i,e.maybeComponent):0,u=o||ju;return"["+i.map(function(t){return u(t,e)}).join(",")+"]"+(s?","+s:"")}}function Eu(t,e){for(var n=0,r=0;r':'
',Hu.innerHTML.indexOf(" ")>0}var qu=!!Z&&Yu(!1),Wu=!!Z&&Yu(!0),Gu=x(function(t){var e=ho(t);return e&&e.innerHTML}),Ku=$r.prototype.$mount;function Xu(t){if(t.outerHTML)return t.outerHTML;var e=document.createElement("div");return e.appendChild(t.cloneNode(!0)),e.innerHTML}$r.prototype.$mount=function(t,e){if(t=t&&ho(t),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=Gu(r));else{if(!r.nodeType)return this;r=r.innerHTML}else t&&(r=Xu(t));if(r){0;var o=Bu(r,{outputSourceRange:!1,shouldDecodeNewlines:qu,shouldDecodeNewlinesForHref:Wu,delimiters:n.delimiters,comments:n.comments},this),i=o.render,a=o.staticRenderFns;n.render=i,n.staticRenderFns=a}}return Ku.call(this,t,e)},$r.compile=Bu,e["a"]=$r}).call(this,n("c8ba"))},a0a8:function(t,e,n){var r=n("e4e1"),o=n("dcc3");t.exports=n("45e2")?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},a24c:function(t,e,n){var r=n("b808"),o=n("1ad4").set,i=r.MutationObserver||r.WebKitMutationObserver,a=r.process,c=r.Promise,s="process"==n("71fa")(a);t.exports=function(){var t,e,n,u=function(){var r,o;s&&(r=a.domain)&&r.exit();while(t){o=t.fn,t=t.next;try{o()}catch(i){throw t?n():e=void 0,i}}e=void 0,r&&r.enter()};if(s)n=function(){a.nextTick(u)};else if(!i||r.navigator&&r.navigator.standalone)if(c&&c.resolve){var f=c.resolve(void 0);n=function(){f.then(u)}}else n=function(){o.call(r,u)};else{var l=!0,p=document.createTextNode("");new i(u).observe(p,{characterData:!0}),n=function(){p.data=l=!l}}return function(r){var o={fn:r,next:void 0};e&&(e.next=o),t||(t=o,n()),e=o}}},a274:function(t,e,n){var r=n("71fa"),o=n("b67f")("toStringTag"),i="Arguments"==r(function(){return arguments}()),a=function(t,e){try{return t[e]}catch(n){}};t.exports=function(t){var e,n,c;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=a(e=Object(t),o))?n:i?r(e):"Object"==(c=r(e))&&"function"==typeof e.callee?"Arguments":c}},a402:function(t,e,n){"use strict";var r=n("9ed1"),o=n("696b"),i=n("bf41"),a=n("4cf4"),c=n("d43f"),s=Object.assign;t.exports=!s||n("b629")(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=s({},t)[n]||Object.keys(s({},e)).join("")!=r})?function(t,e){var n=a(t),s=arguments.length,u=1,f=o.f,l=i.f;while(s>u){var p,d=c(arguments[u++]),h=f?r(d).concat(f(d)):r(d),v=h.length,y=0;while(v>y)l.call(d,p=h[y++])&&(n[p]=d[p])}return n}:s},a47f:function(t,e,n){t.exports=!n("7d95")&&!n("d782")(function(){return 7!=Object.defineProperty(n("12fd")("div"),"a",{get:function(){return 7}}).a})},a481:function(t,e,n){"use strict";var r=n("cb7c"),o=n("4bf8"),i=n("9def"),a=n("4588"),c=n("0390"),s=n("5f1b"),u=Math.max,f=Math.min,l=Math.floor,p=/\$([$&`']|\d\d?|<[^>]*>)/g,d=/\$([$&`']|\d\d?)/g,h=function(t){return void 0===t?t:String(t)};n("214f")("replace",2,function(t,e,n,v){return[function(r,o){var i=t(this),a=void 0==r?void 0:r[e];return void 0!==a?a.call(r,i,o):n.call(String(i),r,o)},function(t,e){var o=v(n,t,this,e);if(o.done)return o.value;var l=r(t),p=String(this),d="function"===typeof e;d||(e=String(e));var g=l.global;if(g){var m=l.unicode;l.lastIndex=0}var b=[];while(1){var _=s(l,p);if(null===_)break;if(b.push(_),!g)break;var w=String(_[0]);""===w&&(l.lastIndex=c(p,i(l.lastIndex),m))}for(var x="",O=0,S=0;S=O&&(x+=p.slice(O,A)+j,O=A+$.length)}return x+p.slice(O)}];function y(t,e,r,i,a,c){var s=r+t.length,u=i.length,f=d;return void 0!==a&&(a=o(a),f=p),n.call(c,f,function(n,o){var c;switch(o.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,r);case"'":return e.slice(s);case"<":c=a[o.slice(1,-1)];break;default:var f=+o;if(0===f)return o;if(f>u){var p=l(f/10);return 0===p?o:p<=u?void 0===i[p-1]?o.charAt(1):i[p-1]+o.charAt(1):o}c=i[f-1]}return void 0===c?"":c})}})},a4bb:function(t,e,n){t.exports=n("fda6")},a5ab:function(t,e,n){var r=n("a812"),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},a638:function(t,e){t.exports={}},a745:function(t,e,n){t.exports=n("d604")},a7d3:function(t,e){var n=t.exports={version:"2.6.5"};"number"==typeof __e&&(__e=n)},a812:function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},a9f2:function(t,e,n){var r=n("9184");t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},aa77:function(t,e,n){var r=n("5ca1"),o=n("be13"),i=n("79e5"),a=n("fdef"),c="["+a+"]",s="​…",u=RegExp("^"+c+c+"*"),f=RegExp(c+c+"*$"),l=function(t,e,n){var o={},c=i(function(){return!!a[t]()||s[t]()!=s}),u=o[t]=c?e(p):a[t];n&&(o[n]=u),r(r.P+r.F*c,"String",o)},p=l.trim=function(t,e){return t=String(o(t)),1&e&&(t=t.replace(u,"")),2&e&&(t=t.replace(f,"")),t};t.exports=l},aa82:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("78ef");e.default=function(t){return(0,r.withParams)({type:"requiredIf",prop:t},function(e,n){return!(0,r.ref)(t,this,n)||(0,r.req)(e)})}},aab6:function(t,e,n){var r=n("e4e1").f,o=n("0f4a"),i=n("b67f")("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},aae3:function(t,e,n){var r=n("d3f4"),o=n("2d95"),i=n("2b4c")("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},ab4c:function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},ac6a:function(t,e,n){for(var r=n("cadf"),o=n("0d58"),i=n("2aba"),a=n("7726"),c=n("32e9"),s=n("84f2"),u=n("2b4c"),f=u("iterator"),l=u("toStringTag"),p=s.Array,d={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},h=o(d),v=0;v":"greater","|":"or","¢":"cent","£":"pound","¤":"currency","¥":"yen","©":"(c)","ª":"a","®":"(r)","º":"o","À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"DJ","đ":"dj","Ē":"E","ē":"e","Ė":"E","ė":"e","Ę":"e","ę":"e","Ě":"E","ě":"e","Ğ":"G","ğ":"g","Ģ":"G","ģ":"g","Ĩ":"I","ĩ":"i","Ī":"i","ī":"i","Į":"I","į":"i","İ":"I","ı":"i","Ķ":"k","ķ":"k","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ũ":"U","ũ":"u","Ū":"u","ū":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Lj":"LJ","lj":"lj","Nj":"NJ","nj":"nj","Ș":"S","ș":"s","Ț":"T","ț":"t","˚":"o","Ά":"A","Έ":"E","Ή":"H","Ί":"I","Ό":"O","Ύ":"Y","Ώ":"W","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"H","Θ":"8","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"3","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","Ё":"Yo","Ђ":"DJ","Є":"Ye","І":"I","Ї":"Yi","Ј":"J","Љ":"LJ","Њ":"NJ","Ћ":"C","Џ":"DZ","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ж":"Zh","З":"Z","И":"I","Й":"J","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"u","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","ђ":"dj","є":"ye","і":"i","ї":"yi","ј":"j","љ":"lj","њ":"nj","ћ":"c","џ":"dz","Ґ":"G","ґ":"g","฿":"baht","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"f","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","ẞ":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","ậ":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","Ề":"E","ề":"e","Ể":"E","ể":"e","Ễ":"E","ễ":"e","Ệ":"E","ệ":"e","Ỉ":"I","ỉ":"i","Ị":"I","ị":"i","Ọ":"O","ọ":"o","Ỏ":"O","ỏ":"o","Ố":"O","ố":"o","Ồ":"O","ồ":"o","Ổ":"O","ổ":"o","Ỗ":"O","ỗ":"o","Ộ":"O","ộ":"o","Ớ":"O","ớ":"o","Ờ":"O","ờ":"o","Ở":"O","ở":"o","Ỡ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","ủ":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","ử":"u","Ữ":"U","ữ":"u","Ự":"U","ự":"u","Ỳ":"Y","ỳ":"y","Ỵ":"Y","ỵ":"y","Ỷ":"Y","ỷ":"y","Ỹ":"Y","ỹ":"y","‘":"\'","’":"\'","“":"\\"","”":"\\"","†":"+","•":"*","…":"...","₠":"ecu","₢":"cruzeiro","₣":"french franc","₤":"lira","₥":"mill","₦":"naira","₧":"peseta","₨":"rupee","₩":"won","₪":"new shequel","₫":"dong","€":"euro","₭":"kip","₮":"tugrik","₯":"drachma","₰":"penny","₱":"peso","₲":"guarani","₳":"austral","₴":"hryvnia","₵":"cedi","₹":"indian rupee","₽":"russian ruble","₿":"bitcoin","℠":"sm","™":"tm","∂":"d","∆":"delta","∑":"sum","∞":"infinity","♥":"love","元":"yuan","円":"yen","﷼":"rial"}');function e(e,n){if("string"!==typeof e)throw new Error("slugify: string argument expected");n="string"===typeof n?{replacement:n}:n||{};var r=e.split("").reduce(function(e,r){return e+(t[r]||r).replace(n.remove||/[^\w\s$*_+~.()'"!\-:@]/g,"")},"").trim().replace(/[-\s]+/g,n.replacement||"-");return n.lower?r.toLowerCase():r}return e.extend=function(e){for(var n in e)t[n]=e[n]},e})},b77f:function(t,e,n){var r=n("0f89"),o=n("f159");t.exports=n("a7d3").getIterator=function(t){var e=o(t);if("function"!=typeof e)throw TypeError(t+" is not iterable!");return r(e.call(t))}},b808:function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},b938:function(t,e,n){var r=n("ab4c");t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},bc25:function(t,e,n){var r=n("f2fe");t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},be13:function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},be5a:function(t,e,n){var r=n("312a")("keys"),o=n("c0f4");t.exports=function(t){return r[t]||(r[t]=o(t))}},bf41:function(t,e){e.f={}.propertyIsEnumerable},c0d8:function(t,e,n){var r=n("3adc").f,o=n("43c8"),i=n("1b55")("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},c0f4:function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},c165:function(t,e,n){var r=n("d13f"),o=n("a7d3"),i=n("d782");t.exports=function(t,e){var n=(o.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*i(function(){n(1)}),"Object",a)}},c227:function(t,e,n){var r=n("b22a"),o=n("1b55")("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||i[o]===t)}},c339:function(t,e,n){var r=n("0f4a"),o=n("4cf4"),i=n("be5a")("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},c366:function(t,e,n){var r=n("6821"),o=n("9def"),i=n("77f1");t.exports=function(t){return function(e,n,a){var c,s=r(e),u=o(s.length),f=i(a,u);if(t&&n!=n){while(u>f)if(c=s[f++],c!=c)return!0}else for(;u>f;f++)if((t||f in s)&&s[f]===n)return t||f||0;return!t&&-1}}},c5f6:function(t,e,n){"use strict";var r=n("7726"),o=n("69a8"),i=n("2d95"),a=n("5dbc"),c=n("6a99"),s=n("79e5"),u=n("9093").f,f=n("11e9").f,l=n("86cc").f,p=n("aa77").trim,d="Number",h=r[d],v=h,y=h.prototype,g=i(n("2aeb")(y))==d,m="trim"in String.prototype,b=function(t){var e=c(t,!1);if("string"==typeof e&&e.length>2){e=m?e.trim():p(e,3);var n,r,o,i=e.charCodeAt(0);if(43===i||45===i){if(n=e.charCodeAt(2),88===n||120===n)return NaN}else if(48===i){switch(e.charCodeAt(1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+e}for(var a,s=e.slice(2),u=0,f=s.length;uo)return NaN;return parseInt(s,r)}}return+e};if(!h(" 0o1")||!h("0b1")||h("+0x1")){h=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof h&&(g?s(function(){y.valueOf.call(n)}):i(n)!=d)?a(new v(b(e)),n,h):b(e)};for(var _,w=n("9e1e")?u(v):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),x=0;w.length>x;x++)o(v,_=w[x])&&!o(h,_)&&l(h,_,f(v,_));h.prototype=y,y.constructor=h,n("2aba")(r,d,h)}},c609:function(t,e,n){"use strict";var r=n("d13f"),o=n("03ca"),i=n("75c9");r(r.S,"Promise",{try:function(t){var e=o.f(this),n=i(t);return(n.e?e.reject:e.resolve)(n.v),e.promise}})},c69a:function(t,e,n){t.exports=!n("9e1e")&&!n("79e5")(function(){return 7!=Object.defineProperty(n("230e")("div"),"a",{get:function(){return 7}}).a})},c764:function(t,e,n){n("dc9b"),t.exports=n("a7d3").Object.values},c8ba:function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}t.exports=n},c8bb:function(t,e,n){t.exports=n("89ca")},c99d:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("78ef");e.default=(0,r.withParams)({type:"ipAddress"},function(t){if(!(0,r.req)(t))return!0;if("string"!==typeof t)return!1;var e=t.split(".");return 4===e.length&&e.every(o)});var o=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}},ca38:function(t,e){var n=t.exports={version:"2.6.5"};"number"==typeof __e&&(__e=n)},ca5a:function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},cadf:function(t,e,n){"use strict";var r=n("9c6c"),o=n("d53b"),i=n("84f2"),a=n("6821");t.exports=n("01f9")(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},cb7c:function(t,e,n){var r=n("d3f4");t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},cc1d:function(t,e,n){var r=n("58b9"),o=n("04cf"),i=n("4052");t.exports=function(t){return function(e,n,a){var c,s=r(e),u=o(s.length),f=i(a,u);if(t&&n!=n){while(u>f)if(c=s[f++],c!=c)return!0}else for(;u>f;f++)if((t||f in s)&&s[f]===n)return t||f||0;return!t&&-1}}},cc20:function(t,e,n){"use strict";var r=n("9184");function o(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r}),this.resolve=r(e),this.reject=r(n)}t.exports.f=function(t){return new o(t)}},cd1c:function(t,e,n){var r=n("e853");t.exports=function(t,e){return new(r(t))(e)}},ce10:function(t,e,n){var r=n("69a8"),o=n("6821"),i=n("c366")(!1),a=n("613b")("IE_PROTO");t.exports=function(t,e){var n,c=o(t),s=0,u=[];for(n in c)n!=a&&r(c,n)&&u.push(n);while(e.length>s)r(c,n=e[s++])&&(~i(u,n)||u.push(n));return u}},cebc:function(t,e,n){"use strict";var r=n("268f"),o=n.n(r),i=n("e265"),a=n.n(i),c=n("a4bb"),s=n.n(c),u=n("85f2"),f=n.n(u);function l(t,e,n){return e in t?f()(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function p(t){for(var e=1;eu)i.call(a,n=c[u++])&&f.push(t?[n,a[n]]:a[n]);return f}}},d127:function(t,e,n){n("0a0a")("asyncIterator")},d13f:function(t,e,n){var r=n("da3c"),o=n("a7d3"),i=n("bc25"),a=n("8ce0"),c=n("43c8"),s="prototype",u=function(t,e,n){var f,l,p,d=t&u.F,h=t&u.G,v=t&u.S,y=t&u.P,g=t&u.B,m=t&u.W,b=h?o:o[e]||(o[e]={}),_=b[s],w=h?r:v?r[e]:(r[e]||{})[s];for(f in h&&(n=e),n)l=!d&&w&&void 0!==w[f],l&&c(b,f)||(p=l?w[f]:n[f],b[f]=h&&"function"!=typeof w[f]?n[f]:g&&l?i(p,r):m&&w[f]==p?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e[s]=t[s],e}(p):y&&"function"==typeof p?i(Function.call,p):p,y&&((b.virtual||(b.virtual={}))[f]=p,t&u.R&&_&&!_[f]&&a(_,f,p)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},d24f:function(t,e,n){n("0a0a")("observable")},d256:function(t,e,n){"use strict";var r=n("da3c"),o=n("43c8"),i=n("7d95"),a=n("d13f"),c=n("2312"),s=n("6277").KEY,u=n("d782"),f=n("7772"),l=n("c0d8"),p=n("7b00"),d=n("1b55"),h=n("fda1"),v=n("0a0a"),y=n("d2d6"),g=n("b5aa"),m=n("0f89"),b=n("6f8a"),_=n("6a9b"),w=n("2ea1"),x=n("f845"),O=n("7108"),S=n("565d"),$=n("626e"),A=n("3adc"),C=n("7633"),k=$.f,E=A.f,M=S.f,j=r.Symbol,T=r.JSON,P=T&&T.stringify,D="prototype",L=d("_hidden"),I=d("toPrimitive"),N={}.propertyIsEnumerable,R=f("symbol-registry"),F=f("symbols"),z=f("op-symbols"),H=Object[D],U="function"==typeof j,V=r.QObject,B=!V||!V[D]||!V[D].findChild,Y=i&&u(function(){return 7!=O(E({},"a",{get:function(){return E(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=k(H,e);r&&delete H[e],E(t,e,n),r&&t!==H&&E(H,e,r)}:E,q=function(t){var e=F[t]=O(j[D]);return e._k=t,e},W=U&&"symbol"==typeof j.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof j},G=function(t,e,n){return t===H&&G(z,e,n),m(t),e=w(e,!0),m(n),o(F,e)?(n.enumerable?(o(t,L)&&t[L][e]&&(t[L][e]=!1),n=O(n,{enumerable:x(0,!1)})):(o(t,L)||E(t,L,x(1,{})),t[L][e]=!0),Y(t,e,n)):E(t,e,n)},K=function(t,e){m(t);var n,r=y(e=_(e)),o=0,i=r.length;while(i>o)G(t,n=r[o++],e[n]);return t},X=function(t,e){return void 0===e?O(t):K(O(t),e)},J=function(t){var e=N.call(this,t=w(t,!0));return!(this===H&&o(F,t)&&!o(z,t))&&(!(e||!o(this,t)||!o(F,t)||o(this,L)&&this[L][t])||e)},Z=function(t,e){if(t=_(t),e=w(e,!0),t!==H||!o(F,e)||o(z,e)){var n=k(t,e);return!n||!o(F,e)||o(t,L)&&t[L][e]||(n.enumerable=!0),n}},Q=function(t){var e,n=M(_(t)),r=[],i=0;while(n.length>i)o(F,e=n[i++])||e==L||e==s||r.push(e);return r},tt=function(t){var e,n=t===H,r=M(n?z:_(t)),i=[],a=0;while(r.length>a)!o(F,e=r[a++])||n&&!o(H,e)||i.push(F[e]);return i};U||(j=function(){if(this instanceof j)throw TypeError("Symbol is not a constructor!");var t=p(arguments.length>0?arguments[0]:void 0),e=function(n){this===H&&e.call(z,n),o(this,L)&&o(this[L],t)&&(this[L][t]=!1),Y(this,t,x(1,n))};return i&&B&&Y(H,t,{configurable:!0,set:e}),q(t)},c(j[D],"toString",function(){return this._k}),$.f=Z,A.f=G,n("d876").f=S.f=Q,n("d74e").f=J,n("31c2").f=tt,i&&!n("b457")&&c(H,"propertyIsEnumerable",J,!0),h.f=function(t){return q(d(t))}),a(a.G+a.W+a.F*!U,{Symbol:j});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;et.length>nt;)d(et[nt++]);for(var rt=C(d.store),ot=0;rt.length>ot;)v(rt[ot++]);a(a.S+a.F*!U,"Symbol",{for:function(t){return o(R,t+="")?R[t]:R[t]=j(t)},keyFor:function(t){if(!W(t))throw TypeError(t+" is not a symbol!");for(var e in R)if(R[e]===t)return e},useSetter:function(){B=!0},useSimple:function(){B=!1}}),a(a.S+a.F*!U,"Object",{create:X,defineProperty:G,defineProperties:K,getOwnPropertyDescriptor:Z,getOwnPropertyNames:Q,getOwnPropertySymbols:tt}),T&&a(a.S+a.F*(!U||u(function(){var t=j();return"[null]"!=P([t])||"{}"!=P({a:t})||"{}"!=P(Object(t))})),"JSON",{stringify:function(t){var e,n,r=[t],o=1;while(arguments.length>o)r.push(arguments[o++]);if(n=e=r[1],(b(e)||void 0!==t)&&!W(t))return g(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!W(e))return e}),r[1]=e,P.apply(T,r)}}),j[D][I]||n("8ce0")(j[D],I,j[D].valueOf),l(j,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},d294:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("78ef");e.default=function(){for(var t=arguments.length,e=Array(t),n=0;n0&&e.reduce(function(e,n){return e||n.apply(t,r)},!1)})}},d2c8:function(t,e,n){var r=n("aae3"),o=n("be13");t.exports=function(t,e,n){if(r(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(o(t))}},d2d6:function(t,e,n){var r=n("7633"),o=n("31c2"),i=n("d74e");t.exports=function(t){var e=r(t),n=o.f;if(n){var a,c=n(t),s=i.f,u=0;while(c.length>u)s.call(t,a=c[u++])&&e.push(a)}return e}},d38f:function(t,e,n){var r=n("7d8a"),o=n("1b55")("iterator"),i=n("b22a");t.exports=n("a7d3").isIterable=function(t){var e=Object(t);return void 0!==e[o]||"@@iterator"in e||i.hasOwnProperty(r(e))}},d3f4:function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},d43f:function(t,e,n){var r=n("71fa");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},d4f4:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("78ef");e.default=(0,r.withParams)({type:"required"},r.req)},d53b:function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},d604:function(t,e,n){n("1938"),t.exports=n("a7d3").Array.isArray},d74e:function(t,e){e.f={}.propertyIsEnumerable},d782:function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},d876:function(t,e,n){var r=n("2695"),o=n("0029").concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},d8db:function(t,e,n){var r=n("b808").document;t.exports=r&&r.documentElement},d8e8:function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},d9fc:function(t,e,n){"use strict";var r=n("569f"),o=n("ca38"),i=n("b808"),a=n("1aa7"),c=n("1c08");r(r.P+r.R,"Promise",{finally:function(t){var e=a(this,o.Promise||i.Promise),n="function"==typeof t;return this.then(n?function(n){return c(e,t()).then(function(){return n})}:t,n?function(n){return c(e,t()).then(function(){throw n})}:t)}})},da3c:function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},db0c:function(t,e,n){t.exports=n("c764")},dc9b:function(t,e,n){var r=n("d13f"),o=n("cff3")(!1);r(r.S,"Object",{values:function(t){return o(t)}})},dcc3:function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},dd04:function(t,e,n){n("12fd9"),n("93c4"),n("b42c"),n("5b5f"),n("b604"),n("c609"),t.exports=n("a7d3").Promise},decf:function(t,e,n){var r=n("0f89"),o=n("6f8a"),i=n("03ca");t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t),a=n.resolve;return a(e),n.promise}},df0a:function(t,e,n){var r,o,i,a=n("bc25"),c=n("196c"),s=n("103a"),u=n("12fd"),f=n("da3c"),l=f.process,p=f.setImmediate,d=f.clearImmediate,h=f.MessageChannel,v=f.Dispatch,y=0,g={},m="onreadystatechange",b=function(){var t=+this;if(g.hasOwnProperty(t)){var e=g[t];delete g[t],e()}},_=function(t){b.call(t.data)};p&&d||(p=function(t){var e=[],n=1;while(arguments.length>n)e.push(arguments[n++]);return g[++y]=function(){c("function"==typeof t?t:Function(t),e)},r(y),y},d=function(t){delete g[t]},"process"==n("6e1f")(l)?r=function(t){l.nextTick(a(b,t,1))}:v&&v.now?r=function(t){v.now(a(b,t,1))}:h?(o=new h,i=o.port2,o.port1.onmessage=_,r=a(i.postMessage,i,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(t){f.postMessage(t+"","*")},f.addEventListener("message",_,!1)):r=m in u("script")?function(t){s.appendChild(u("script"))[m]=function(){s.removeChild(this),b.call(t)}}:function(t){setTimeout(a(b,t,1),0)}),t.exports={set:p,clear:d}},e11e:function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},e265:function(t,e,n){t.exports=n("5698")},e341:function(t,e,n){var r=n("d13f");r(r.S+r.F*!n("7d95"),"Object",{defineProperty:n("3adc").f})},e4a9:function(t,e,n){"use strict";var r=n("b457"),o=n("d13f"),i=n("2312"),a=n("8ce0"),c=n("b22a"),s=n("5ce7"),u=n("c0d8"),f=n("ff0c"),l=n("1b55")("iterator"),p=!([].keys&&"next"in[].keys()),d="@@iterator",h="keys",v="values",y=function(){return this};t.exports=function(t,e,n,g,m,b,_){s(n,e,g);var w,x,O,S=function(t){if(!p&&t in k)return k[t];switch(t){case h:return function(){return new n(this,t)};case v:return function(){return new n(this,t)}}return function(){return new n(this,t)}},$=e+" Iterator",A=m==v,C=!1,k=t.prototype,E=k[l]||k[d]||m&&k[m],M=E||S(m),j=m?A?S("entries"):M:void 0,T="Array"==e&&k.entries||E;if(T&&(O=f(T.call(new t)),O!==Object.prototype&&O.next&&(u(O,$,!0),r||"function"==typeof O[l]||a(O,l,y))),A&&E&&E.name!==v&&(C=!0,M=function(){return E.call(this)}),r&&!_||!p&&!C&&k[l]||a(k,l,M),c[e]=M,c[$]=y,m)if(w={values:A?M:S(v),keys:b?M:S(h),entries:j},_)for(x in w)x in k||i(k,x,w[x]);else o(o.P+o.F*(p||C),e,w);return w}},e4e1:function(t,e,n){var r=n("27b2"),o=n("e830"),i=n("b938"),a=Object.defineProperty;e.f=n("45e2")?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return a(t,e,n)}catch(c){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},e523:function(t,e,n){var r=n("e4e1"),o=n("27b2"),i=n("9ed1");t.exports=n("45e2")?Object.defineProperties:function(t,e){o(t);var n,a=i(e),c=a.length,s=0;while(c>s)r.f(t,n=a[s++],e[n]);return t}},e5fa:function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},e652:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("78ef");e.default=function(t){return(0,r.withParams)({type:"requiredUnless",prop:t},function(e,n){return!!(0,r.ref)(t,this,n)||(0,r.req)(e)})}},e6a1:function(t,e){t.exports=!1},e814:function(t,e,n){t.exports=n("54aa")},e830:function(t,e,n){t.exports=!n("45e2")&&!n("b629")(function(){return 7!=Object.defineProperty(n("781f")("div"),"a",{get:function(){return 7}}).a})},e853:function(t,e,n){var r=n("d3f4"),o=n("1169"),i=n("2b4c")("species");t.exports=function(t){var e;return o(t)&&(e=t.constructor,"function"!=typeof e||e!==Array&&!o(e.prototype)||(e=void 0),r(e)&&(e=e[i],null===e&&(e=void 0))),void 0===e?Array:e}},eb66:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("78ef");e.default=function(t){return(0,r.withParams)({type:"minValue",min:t},function(e){return!(0,r.req)(e)||(!/\s/.test(e)||e instanceof Date)&&+e>=+t})}},ebd6:function(t,e,n){var r=n("cb7c"),o=n("d8e8"),i=n("2b4c")("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||void 0==(n=r(a)[i])?e:o(n)}},ec11:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("78ef");e.default=function(t,e){return(0,r.withParams)({type:"between",min:t,max:e},function(n){return!(0,r.req)(n)||(!/\s/.test(n)||n instanceof Date)&&+t<=+n&&+e>=+n})}},ec5b:function(t,e,n){n("e341");var r=n("a7d3").Object;t.exports=function(t,e,n){return r.defineProperty(t,e,n)}},ed0f:function(t,e,n){var r=n("27b2"),o=n("e523"),i=n("49c1"),a=n("be5a")("IE_PROTO"),c=function(){},s="prototype",u=function(){var t,e=n("781f")("iframe"),r=i.length,o="<",a=">";e.style.display="none",n("d8db").appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(o+"script"+a+"document.F=Object"+o+"/script"+a),t.close(),u=t.F;while(r--)delete u[s][i[r]];return u()};t.exports=Object.create||function(t,e){var n;return null!==t?(c[s]=r(t),n=new c,c[s]=null,n[a]=t):n=u(),void 0===e?n:o(n,e)}},eec7:function(t,e,n){"use strict";var r=n("ed0f"),o=n("dcc3"),i=n("aab6"),a={};n("a0a8")(a,n("b67f")("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(a,{next:o(1,n)}),i(t,e+" Iterator")}},ef26:function(t,e){t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},f159:function(t,e,n){var r=n("7d8a"),o=n("1b55")("iterator"),i=n("b22a");t.exports=n("a7d3").getIteratorMethod=function(t){if(void 0!=t)return t[o]||t["@@iterator"]||i[r(t)]}},f26d:function(t,e,n){var r=n("a638"),o=n("b67f")("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||i[o]===t)}},f2f3:function(t,e,n){"use strict";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},r(t)}var o={namespaced:!0,state:{locale:null,fallback:null,translations:{}},mutations:{SET_LOCALE:function(t,e){t.locale=e.locale},ADD_LOCALE:function(t,e){var n=i(e.translations);if(t.translations.hasOwnProperty(e.locale)){var r=t.translations[e.locale];t.translations[e.locale]=Object.assign({},r,n)}else t.translations[e.locale]=n;try{t.translations.__ob__&&t.translations.__ob__.dep.notify()}catch(o){}},REPLACE_LOCALE:function(t,e){var n=i(e.translations);t.translations[e.locale]=n;try{t.translations.__ob__&&t.translations.__ob__.dep.notify()}catch(r){}},REMOVE_LOCALE:function(t,e){if(t.translations.hasOwnProperty(e.locale)){t.locale===e.locale&&(t.locale=null);var n=Object.assign({},t.translations);delete n[e.locale],t.translations=n}},SET_FALLBACK_LOCALE:function(t,e){t.fallback=e.locale}},actions:{setLocale:function(t,e){t.commit({type:"SET_LOCALE",locale:e.locale})},addLocale:function(t,e){t.commit({type:"ADD_LOCALE",locale:e.locale,translations:e.translations})},replaceLocale:function(t,e){t.commit({type:"REPLACE_LOCALE",locale:e.locale,translations:e.translations})},removeLocale:function(t,e){t.commit({type:"REMOVE_LOCALE",locale:e.locale,translations:e.translations})},setFallbackLocale:function(t,e){t.commit({type:"SET_FALLBACK_LOCALE",locale:e.locale})}}},i=function t(e){var n={};for(var o in e)if(e.hasOwnProperty(o)){var i=r(e[o]);if(a(e[o])){for(var c=e[o].length,s=0;s1?1:0;case"lv":return e%10===1&&e%100!==11?0:0!==e?1:2;case"lt":return e%10===1&&e%100!==11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2;case"be":case"bs":case"hr":case"ru":case"sr":case"uk":return e%10===1&&e%100!==11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2;case"mnk":return 0===e?0:1===e?1:2;case"ro":return 1===e?0:0===e||e%100>0&&e%100<20?1:2;case"pl":return 1===e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2;case"cs":case"sk":return 1===e?0:e>=2&&e<=4?1:2;case"csb":return 1===e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2;case"sl":return e%100===1?0:e%100===2?1:e%100===3||e%100===4?2:3;case"mt":return 1===e?0:0===e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3;case"gd":return 1===e||11===e?0:2===e||12===e?1:e>2&&e<20?2:3;case"cy":return 1===e?0:2===e?1:8!==e&&11!==e?2:3;case"kw":return 1===e?0:2===e?1:3===e?2:3;case"ga":return 1===e?0:2===e?1:e>2&&e<7?2:e>6&&e<11?3:4;case"ar":return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5;default:return 1!==e?1:0}}},s={install:function(t,e,n){"string"!==typeof arguments[2]&&"string"!==typeof arguments[3]||(console.warn("i18n: Registering the plugin vuex-i18n with a string for `moduleName` or `identifiers` is deprecated. Use a configuration object instead.","https://github.com/dkfbasel/vuex-i18n#setup"),n={moduleName:arguments[2],identifiers:arguments[3]}),n=Object.assign({warnings:!0,moduleName:"i18n",identifiers:["{","}"],preserveState:!1,translateFilterName:"translate",translateInFilterName:"translateIn",onTranslationNotFound:function(){}},n);var r=n.moduleName,i=n.identifiers,a=n.translateFilterName,c=n.translateInFilterName,s=n.onTranslationNotFound;if("function"!==typeof s&&(console.error("i18n: i18n config option onTranslationNotFound must be a function"),s=function(){}),e.registerModule(r,o,{preserveState:n.preserveState}),!1===e.state.hasOwnProperty(r))return console.error("i18n: i18n vuex module is not correctly initialized. Please check the module name:",r),t.prototype.$i18n=function(t){return t},t.prototype.$getLanguage=function(){return null},void(t.prototype.$setLanguage=function(){console.error("i18n: i18n vuex module is not correctly initialized")});var f=u(i,n.warnings),l=function(){var t=e.state[r].locale;return p.apply(void 0,[t].concat(Array.prototype.slice.call(arguments)))},p=function(t){var o=arguments,i="",a="",c={},u=null,l=o.length;if(l>=3&&"string"===typeof o[2]?(i=o[1],a=o[2],l>3&&(c=o[3]),l>4&&(u=o[4])):(i=o[1],a=i,l>2&&(c=o[2]),l>3&&(u=o[3])),!t)return n.warnings&&console.warn("i18n: i18n locale is not set when trying to access translations:",i),a;var p=e.state[r].translations,d=e.state[r].fallback,h=t.split("-"),v=!0;if(!1===p.hasOwnProperty(t)?v=!1:!1===p[t].hasOwnProperty(i)&&(v=!1),!0===v)return f(t,p[t][i],c,u);if(h.length>1&&!0===p.hasOwnProperty(h[0])&&!0===p[h[0]].hasOwnProperty(i))return f(h[0],p[h[0]][i],c,u);var y=s(t,i,a);return y&&Promise.resolve(y).then(function(e){var n={};n[i]=e,b(t,n)}),!1===p.hasOwnProperty(d)?f(t,a,c,u):!1===p[d].hasOwnProperty(i)?f(d,a,c,u):f(t,p[d][i],c,u)},d=function(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o1&&void 0!==arguments[1]?arguments[1]:"fallback",o=e.state[r].locale,i=e.state[r].fallback,a=e.state[r].translations;if(a.hasOwnProperty(o)&&a[o].hasOwnProperty(t))return!0;if("strict"==n)return!1;var c=o.split("-");return!!(c.length>1&&a.hasOwnProperty(c[0])&&a[c[0]].hasOwnProperty(t))||"locale"!=n&&!(!a.hasOwnProperty(i)||!a[i].hasOwnProperty(t))},v=function(t){e.dispatch({type:"".concat(r,"/setFallbackLocale"),locale:t})},y=function(t){e.dispatch({type:"".concat(r,"/setLocale"),locale:t})},g=function(){return e.state[r].locale},m=function(){return Object.keys(e.state[r].translations)},b=function(t,n){return e.dispatch({type:"".concat(r,"/addLocale"),locale:t,translations:n})},_=function(t,n){return e.dispatch({type:"".concat(r,"/replaceLocale"),locale:t,translations:n})},w=function(t){e.state[r].translations.hasOwnProperty(t)&&e.dispatch({type:"".concat(r,"/removeLocale"),locale:t})},x=function(t){return n.warnings&&console.warn("i18n: $i18n.exists is depreceated. Please use $i18n.localeExists instead. It provides exactly the same functionality."),O(t)},O=function(t){return e.state[r].translations.hasOwnProperty(t)};t.prototype.$i18n={locale:g,locales:m,set:y,add:b,replace:_,remove:w,fallback:v,localeExists:O,keyExists:h,translate:l,translateIn:p,exists:x},t.i18n={locale:g,locales:m,set:y,add:b,replace:_,remove:w,fallback:v,translate:l,translateIn:p,localeExists:O,keyExists:h,exists:x},t.prototype.$t=l,t.prototype.$tlang=p,t.filter(a,l),t.filter(c,d)}},u=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];null!=t&&2==t.length||console.warn("i18n: You must specify the start and end character identifying variable substitutions");var n=new RegExp(t[0]+"{1}(\\w{1}|\\w.+?)"+t[1]+"{1}","g"),o=function(r,o){return r.replace?r.replace(n,function(n){var i=n.replace(t[0],"").replace(t[1],"");return void 0!==o[i]?o[i]:(e&&(console.group?console.group("i18n: Not all placeholders found"):console.warn("i18n: Not all placeholders found"),console.warn("Text:",r),console.warn("Placeholder:",n),console.groupEnd&&console.groupEnd()),n)}):r},i=function(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=r(n),u=r(a),l=function(){return f(n)?n.map(function(t){return o(t,i,!1)}):"string"===s?o(n,i,!0):void 0};if(null===a)return l();if("number"!==u)return e&&console.warn("i18n: pluralization is not a number"),l();var p=l(),d=null;d=f(p)&&p.length>0?p:p.split(":::");var h=c.getTranslationIndex(t,a);return"undefined"===typeof d[h]?(e&&console.warn("i18n: pluralization not provided in locale",n,t,h),d[0].trim()):d[h].trim()};return i};function f(t){return!!t&&Array===t.constructor}var l={store:o,plugin:s};e["a"]=l},f2fe:function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},f3e0:function(t,e,n){var r=n("0185"),o=n("7633");n("c165")("keys",function(){return function(t){return o(r(t))}})},f499:function(t,e,n){t.exports=n("1c01")},f559:function(t,e,n){"use strict";var r=n("5ca1"),o=n("9def"),i=n("d2c8"),a="startsWith",c=""[a];r(r.P+r.F*n("5147")(a),"String",{startsWith:function(t){var e=i(this,t,a),n=o(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return c?c.call(e,r,n):e.slice(n,n+r.length)===r}})},f568:function(t,e,n){var r=n("3adc"),o=n("0f89"),i=n("7633");t.exports=n("7d95")?Object.defineProperties:function(t,e){o(t);var n,a=i(e),c=a.length,s=0;while(c>s)r.f(t,n=a[s++],e[n]);return t}},f6d7:function(t,e,n){var r=n("0f4a"),o=n("58b9"),i=n("cc1d")(!1),a=n("be5a")("IE_PROTO");t.exports=function(t,e){var n,c=o(t),s=0,u=[];for(n in c)n!=a&&r(c,n)&&u.push(n);while(e.length>s)r(c,n=e[s++])&&(~i(u,n)||u.push(n));return u}},f845:function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},f906:function(t,e,n){!function(e,n){t.exports=n()}(0,function(){"use strict";var t,e=/(\[[^[]*\])|([-:\/.()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d\d/,r=/\d\d?/,o=/\d*[^\s\d-:\/.()]+/,i=function(t){return function(e){this[t]=+e}},a=[/[+-]\d\d:?\d\d/,function(t){var e,n;(this.zone||(this.zone={})).offset=(e=t.match(/([+-]|\d\d)/g),0===(n=60*e[1]+ +e[2])?0:"+"===e[0]?-n:n)}],c={A:[/[AP]M/,function(t){this.afternoon="PM"===t}],a:[/[ap]m/,function(t){this.afternoon="pm"===t}],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,i("seconds")],ss:[r,i("seconds")],m:[r,i("minutes")],mm:[r,i("minutes")],H:[r,i("hours")],h:[r,i("hours")],HH:[r,i("hours")],hh:[r,i("hours")],D:[r,i("day")],DD:[n,i("day")],Do:[o,function(e){var n=t.ordinal,r=e.match(/\d+/);if(this.day=r[0],n)for(var o=1;o<=31;o+=1)n(o).replace(/\[|\]/g,"")===e&&(this.day=o)}],M:[r,i("month")],MM:[n,i("month")],MMM:[o,function(e){var n=t,r=n.months,o=n.monthsShort,i=o?o.findIndex(function(t){return t===e}):r.findIndex(function(t){return t.substr(0,3)===e});if(i<0)throw new Error;this.month=i+1}],MMMM:[o,function(e){var n=t.months.indexOf(e);if(n<0)throw new Error;this.month=n+1}],Y:[/[+-]?\d+/,i("year")],YY:[n,function(t){t=+t,this.year=t+(t>68?1900:2e3)}],YYYY:[/\d{4}/,i("year")],Z:a,ZZ:a},s=function(t,n,r){try{var o=function(t){for(var n=t.match(e),r=n.length,o=0;o0?a-1:h.getMonth(),g=s||h.getDate(),m=u||0,b=f||0,_=l||0,w=p||0;return r?new Date(Date.UTC(v,y,g,m,b,_,w)):new Date(v,y,g,m,b,_,w)}catch(t){return new Date("")}};return function(e,n,r){var o=n.prototype,i=o.parse;o.parse=function(e){var n=e.date,o=e.format,a=e.pl,c=e.utc;this.$u=c,o?(t=a?r.Ls[a]:this.$locale(),this.$d=s(n,o,c),this.init(e)):i.call(this,e)}}})},fa2d:function(t,e,n){"use strict";var r=n("e6a1"),o=n("569f"),i=n("1f51"),a=n("a0a8"),c=n("a638"),s=n("eec7"),u=n("aab6"),f=n("c339"),l=n("b67f")("iterator"),p=!([].keys&&"next"in[].keys()),d="@@iterator",h="keys",v="values",y=function(){return this};t.exports=function(t,e,n,g,m,b,_){s(n,e,g);var w,x,O,S=function(t){if(!p&&t in k)return k[t];switch(t){case h:return function(){return new n(this,t)};case v:return function(){return new n(this,t)}}return function(){return new n(this,t)}},$=e+" Iterator",A=m==v,C=!1,k=t.prototype,E=k[l]||k[d]||m&&k[m],M=E||S(m),j=m?A?S("entries"):M:void 0,T="Array"==e&&k.entries||E;if(T&&(O=f(T.call(new t)),O!==Object.prototype&&O.next&&(u(O,$,!0),r||"function"==typeof O[l]||a(O,l,y))),A&&E&&E.name!==v&&(C=!0,M=function(){return E.call(this)}),r&&!_||!p&&!C&&k[l]||a(k,l,M),c[e]=M,c[$]=y,m)if(w={values:A?M:S(v),keys:b?M:S(h),entries:j},_)for(x in w)x in k||i(k,x,w[x]);else o(o.P+o.F*(p||C),e,w);return w}},fa54:function(t,e,n){"use strict";var r=n("b3e7"),o=n("245b"),i=n("b22a"),a=n("6a9b");t.exports=n("e4a9")(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},fab2:function(t,e,n){var r=n("7726").document;t.exports=r&&r.documentElement},fbf4:function(t,e,n){"use strict";function r(t){return null===t||void 0===t}function o(t){return null!==t&&void 0!==t}function i(t,e){return e.tag===t.tag&&e.key===t.key}function a(t){var e=t.tag;t.vm=new e({data:t.args})}function c(t){for(var e=Object.keys(t.args),n=0;nu?f(e,c,v):c>v&&l(t,n,u)}function f(t,e,n){for(;e<=n;++e)a(t[e])}function l(t,e,n){for(;e<=n;++e){var r=t[e];o(r)&&(r.vm.$destroy(),r.vm=null)}}function p(t,e){t!==e&&(e.vm=t.vm,c(e))}function d(t,e){o(t)&&o(e)?t!==e&&u(t,e):o(e)?f(e,0,e.length-1):o(t)&&l(t,0,t.length-1)}function h(t,e,n){return{tag:t,key:e,args:n}}Object.defineProperty(e,"__esModule",{value:!0}),e.patchChildren=d,e.h=h},fd6f:function(t,e,n){var r=n("d13f"),o=n("cff3")(!0);r(r.S,"Object",{entries:function(t){return o(t)}})},fda1:function(t,e,n){e.f=n("1b55")},fda6:function(t,e,n){n("f3e0"),t.exports=n("a7d3").Object.keys},fdef:function(t,e){t.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},ff0c:function(t,e,n){var r=n("43c8"),o=n("0185"),i=n("5d8f")("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}}}]); \ No newline at end of file +var n=Object.freeze({});function r(t){return void 0===t||null===t}function o(t){return void 0!==t&&null!==t}function i(t){return!0===t}function a(t){return!1===t}function c(t){return"string"===typeof t||"number"===typeof t||"symbol"===typeof t||"boolean"===typeof t}function s(t){return null!==t&&"object"===typeof t}var u=Object.prototype.toString;function f(t){return"[object Object]"===u.call(t)}function l(t){return"[object RegExp]"===u.call(t)}function p(t){var e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function d(t){return o(t)&&"function"===typeof t.then&&"function"===typeof t.catch}function h(t){return null==t?"":Array.isArray(t)||f(t)&&t.toString===u?JSON.stringify(t,null,2):String(t)}function v(t){var e=parseFloat(t);return isNaN(e)?t:e}function y(t,e){for(var n=Object.create(null),r=t.split(","),o=0;o-1)return t.splice(n,1)}}var _=Object.prototype.hasOwnProperty;function w(t,e){return _.call(t,e)}function x(t){var e=Object.create(null);return function(n){var r=e[n];return r||(e[n]=t(n))}}var O=/-(\w)/g,S=x(function(t){return t.replace(O,function(t,e){return e?e.toUpperCase():""})}),$=x(function(t){return t.charAt(0).toUpperCase()+t.slice(1)}),A=/\B([A-Z])/g,C=x(function(t){return t.replace(A,"-$1").toLowerCase()});function k(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 E(t,e){return t.bind(e)}var M=Function.prototype.bind?E:k;function j(t,e){e=e||0;var n=t.length-e,r=new Array(n);while(n--)r[n]=t[n+e];return r}function T(t,e){for(var n in e)t[n]=e[n];return t}function P(t){for(var e={},n=0;n0,ot=et&&et.indexOf("edge/")>0,it=(et&&et.indexOf("android"),et&&/iphone|ipad|ipod|ios/.test(et)||"ios"===tt),at=(et&&/chrome\/\d+/.test(et),et&&/phantomjs/.test(et),et&&et.match(/firefox\/(\d+)/)),ct={}.watch,st=!1;if(Z)try{var ut={};Object.defineProperty(ut,"passive",{get:function(){st=!0}}),window.addEventListener("test-passive",null,ut)}catch(Ju){}var ft=function(){return void 0===X&&(X=!Z&&!Q&&"undefined"!==typeof t&&(t["process"]&&"server"===t["process"].env.VUE_ENV)),X},lt=Z&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function pt(t){return"function"===typeof t&&/native code/.test(t.toString())}var dt,ht="undefined"!==typeof Symbol&&pt(Symbol)&&"undefined"!==typeof Reflect&&pt(Reflect.ownKeys);dt="undefined"!==typeof Set&&pt(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 vt=D,yt=0,gt=function(){this.id=yt++,this.subs=[]};gt.prototype.addSub=function(t){this.subs.push(t)},gt.prototype.removeSub=function(t){b(this.subs,t)},gt.prototype.depend=function(){gt.target&>.target.addDep(this)},gt.prototype.notify=function(){var t=this.subs.slice();for(var e=0,n=t.length;e-1)if(i&&!w(o,"default"))a=!1;else if(""===a||a===C(t)){var s=ne(String,o.type);(s<0||c0&&(a=Ee(a,(e||"")+"_"+n),ke(a[0])&&ke(u)&&(f[s]=St(u.text+a[0].text),a.shift()),f.push.apply(f,a)):c(a)?ke(u)?f[s]=St(u.text+a):""!==a&&f.push(St(a)):ke(a)&&ke(u)?f[s]=St(u.text+a.text):(i(t._isVList)&&o(a.tag)&&r(a.key)&&o(e)&&(a.key="__vlist"+e+"_"+n+"__"),f.push(a)));return f}function Me(t){var e=t.$options.provide;e&&(t._provided="function"===typeof e?e.call(t):e)}function je(t){var e=Te(t.$options.inject,t);e&&(jt(!1),Object.keys(e).forEach(function(n){It(t,n,e[n])}),jt(!0))}function Te(t,e){if(t){for(var n=Object.create(null),r=ht?Reflect.ownKeys(t):Object.keys(t),o=0;o0,a=t?!!t.$stable:!i,c=t&&t.$key;if(t){if(t._normalized)return t._normalized;if(a&&r&&r!==n&&c===r.$key&&!i&&!r.$hasNormal)return r;for(var s in o={},t)t[s]&&"$"!==s[0]&&(o[s]=Ie(e,s,t[s]))}else o={};for(var u in e)u in o||(o[u]=Ne(e,u));return t&&Object.isExtensible(t)&&(t._normalized=o),W(o,"$stable",a),W(o,"$key",c),W(o,"$hasNormal",i),o}function Ie(t,e,n){var r=function(){var t=arguments.length?n.apply(null,arguments):n({});return t=t&&"object"===typeof t&&!Array.isArray(t)?[t]:Ce(t),t&&(0===t.length||1===t.length&&t[0].isComment)?void 0:t};return n.proxy&&Object.defineProperty(t,e,{get:r,enumerable:!0,configurable:!0}),r}function Ne(t,e){return function(){return t[e]}}function Re(t,e){var n,r,i,a,c;if(Array.isArray(t)||"string"===typeof t)for(n=new Array(t.length),r=0,i=t.length;r1?j(n):n;for(var r=j(arguments,1),o='event handler for "'+t+'"',i=0,a=n.length;idocument.createEvent("Event").timeStamp&&(Xn=function(){return Jn.now()})}function Zn(){var t,e;for(Kn=Xn(),qn=!0,Vn.sort(function(t,e){return t.id-e.id}),Wn=0;WnWn&&Vn[n].id>t.id)n--;Vn.splice(n+1,0,t)}else Vn.push(t);Yn||(Yn=!0,ye(Zn))}}var rr=0,or=function(t,e,n,r,o){this.vm=t,o&&(t._watcher=this),t._watchers.push(this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync,this.before=r.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++rr,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new dt,this.newDepIds=new dt,this.expression="","function"===typeof e?this.getter=e:(this.getter=K(e),this.getter||(this.getter=D)),this.value=this.lazy?void 0:this.get()};or.prototype.get=function(){var t;bt(this);var e=this.vm;try{t=this.getter.call(e,e)}catch(Ju){if(!this.user)throw Ju;re(Ju,e,'getter for watcher "'+this.expression+'"')}finally{this.deep&&me(t),_t(),this.cleanupDeps()}return t},or.prototype.addDep=function(t){var e=t.id;this.newDepIds.has(e)||(this.newDepIds.add(e),this.newDeps.push(t),this.depIds.has(e)||t.addSub(this))},or.prototype.cleanupDeps=function(){var t=this.deps.length;while(t--){var e=this.deps[t];this.newDepIds.has(e.id)||e.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},or.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():nr(this)},or.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||s(t)||this.deep){var e=this.value;if(this.value=t,this.user)try{this.cb.call(this.vm,t,e)}catch(Ju){re(Ju,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,t,e)}}},or.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},or.prototype.depend=function(){var t=this.deps.length;while(t--)this.deps[t].depend()},or.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||b(this.vm._watchers,this);var t=this.deps.length;while(t--)this.deps[t].removeSub(this);this.active=!1}};var ir={enumerable:!0,configurable:!0,get:D,set:D};function ar(t,e,n){ir.get=function(){return this[e][n]},ir.set=function(t){this[e][n]=t},Object.defineProperty(t,n,ir)}function cr(t){t._watchers=[];var e=t.$options;e.props&&sr(t,e.props),e.methods&&yr(t,e.methods),e.data?ur(t):Lt(t._data={},!0),e.computed&&pr(t,e.computed),e.watch&&e.watch!==ct&&gr(t,e.watch)}function sr(t,e){var n=t.$options.propsData||{},r=t._props={},o=t.$options._propKeys=[],i=!t.$parent;i||jt(!1);var a=function(i){o.push(i);var a=Zt(i,e,n,t);It(r,i,a),i in t||ar(t,"_props",i)};for(var c in e)a(c);jt(!0)}function ur(t){var e=t.$options.data;e=t._data="function"===typeof e?fr(e,t):e||{},f(e)||(e={});var n=Object.keys(e),r=t.$options.props,o=(t.$options.methods,n.length);while(o--){var i=n[o];0,r&&w(r,i)||q(i)||ar(t,"_data",i)}Lt(e,!0)}function fr(t,e){bt();try{return t.call(e,e)}catch(Ju){return re(Ju,e,"data()"),{}}finally{_t()}}var lr={lazy:!0};function pr(t,e){var n=t._computedWatchers=Object.create(null),r=ft();for(var o in e){var i=e[o],a="function"===typeof i?i:i.get;0,r||(n[o]=new or(t,a||D,D,lr)),o in t||dr(t,o,i)}}function dr(t,e,n){var r=!ft();"function"===typeof n?(ir.get=r?hr(e):vr(n),ir.set=D):(ir.get=n.get?r&&!1!==n.cache?hr(e):vr(n.get):D,ir.set=n.set||D),Object.defineProperty(t,e,ir)}function hr(t){return function(){var e=this._computedWatchers&&this._computedWatchers[t];if(e)return e.dirty&&e.evaluate(),gt.target&&e.depend(),e.value}}function vr(t){return function(){return t.call(this,this)}}function yr(t,e){t.$options.props;for(var n in e)t[n]="function"!==typeof e[n]?D:M(e[n],t)}function gr(t,e){for(var n in e){var r=e[n];if(Array.isArray(r))for(var o=0;o-1)return this;var n=j(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}}function Cr(t){t.mixin=function(t){return this.options=Xt(this.options,t),this}}function kr(t){t.cid=0;var e=1;t.extend=function(t){t=t||{};var n=this,r=n.cid,o=t._Ctor||(t._Ctor={});if(o[r])return o[r];var i=t.name||n.options.name;var a=function(t){this._init(t)};return a.prototype=Object.create(n.prototype),a.prototype.constructor=a,a.cid=e++,a.options=Xt(n.options,t),a["super"]=n,a.options.props&&Er(a),a.options.computed&&Mr(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,V.forEach(function(t){a[t]=n[t]}),i&&(a.options.components[i]=a),a.superOptions=n.options,a.extendOptions=t,a.sealedOptions=T({},a.options),o[r]=a,a}}function Er(t){var e=t.options.props;for(var n in e)ar(t.prototype,"_props",n)}function Mr(t){var e=t.options.computed;for(var n in e)dr(t.prototype,n,e[n])}function jr(t){V.forEach(function(e){t[e]=function(t,n){return n?("component"===e&&f(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]}})}function Tr(t){return t&&(t.Ctor.options.name||t.tag)}function Pr(t,e){return Array.isArray(t)?t.indexOf(e)>-1:"string"===typeof t?t.split(",").indexOf(e)>-1:!!l(t)&&t.test(e)}function Dr(t,e){var n=t.cache,r=t.keys,o=t._vnode;for(var i in n){var a=n[i];if(a){var c=Tr(a.componentOptions);c&&!e(c)&&Lr(n,i,r,o)}}}function Lr(t,e,n,r){var o=t[e];!o||r&&o.tag===r.tag||o.componentInstance.$destroy(),t[e]=null,b(n,e)}wr($r),br($r),jn($r),Ln($r),_n($r);var Ir=[String,RegExp,Array],Nr={name:"keep-alive",abstract:!0,props:{include:Ir,exclude:Ir,max:[String,Number]},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var t in this.cache)Lr(this.cache,t,this.keys)},mounted:function(){var t=this;this.$watch("include",function(e){Dr(t,function(t){return Pr(e,t)})}),this.$watch("exclude",function(e){Dr(t,function(t){return!Pr(e,t)})})},render:function(){var t=this.$slots.default,e=$n(t),n=e&&e.componentOptions;if(n){var r=Tr(n),o=this,i=o.include,a=o.exclude;if(i&&(!r||!Pr(i,r))||a&&r&&Pr(a,r))return e;var c=this,s=c.cache,u=c.keys,f=null==e.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):e.key;s[f]?(e.componentInstance=s[f].componentInstance,b(u,f),u.push(f)):(s[f]=e,u.push(f),this.max&&u.length>parseInt(this.max)&&Lr(s,u[0],u,this._vnode)),e.data.keepAlive=!0}return e||t&&t[0]}},Rr={KeepAlive:Nr};function Fr(t){var e={get:function(){return U}};Object.defineProperty(t,"config",e),t.util={warn:vt,extend:T,mergeOptions:Xt,defineReactive:It},t.set=Nt,t.delete=Rt,t.nextTick=ye,t.observable=function(t){return Lt(t),t},t.options=Object.create(null),V.forEach(function(e){t.options[e+"s"]=Object.create(null)}),t.options._base=t,T(t.options.components,Rr),Ar(t),Cr(t),kr(t),jr(t)}Fr($r),Object.defineProperty($r.prototype,"$isServer",{get:ft}),Object.defineProperty($r.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty($r,"FunctionalRenderContext",{value:Qe}),$r.version="2.6.10";var Hr=y("style,class"),zr=y("input,textarea,option,select,progress"),Vr=function(t,e,n){return"value"===n&&zr(t)&&"button"!==e||"selected"===n&&"option"===t||"checked"===n&&"input"===t||"muted"===n&&"video"===t},Br=y("contenteditable,draggable,spellcheck"),Ur=y("events,caret,typing,plaintext-only"),Yr=function(t,e){return Xr(e)||"false"===e?"false":"contenteditable"===t&&Ur(e)?e:"true"},qr=y("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,translate,truespeed,typemustmatch,visible"),Wr="http://www.w3.org/1999/xlink",Gr=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},Kr=function(t){return Gr(t)?t.slice(6,t.length):""},Xr=function(t){return null==t||!1===t};function Jr(t){var e=t.data,n=t,r=t;while(o(r.componentInstance))r=r.componentInstance._vnode,r&&r.data&&(e=Zr(r.data,e));while(o(n=n.parent))n&&n.data&&(e=Zr(e,n.data));return Qr(e.staticClass,e.class)}function Zr(t,e){return{staticClass:to(t.staticClass,e.staticClass),class:o(t.class)?[t.class,e.class]:e.class}}function Qr(t,e){return o(t)||o(e)?to(t,eo(e)):""}function to(t,e){return t?e?t+" "+e:t:e||""}function eo(t){return Array.isArray(t)?no(t):s(t)?ro(t):"string"===typeof t?t:""}function no(t){for(var e,n="",r=0,i=t.length;r-1?fo[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:fo[t]=/HTMLUnknownElement/.test(e.toString())}var po=y("text,number,password,search,email,tel,url");function ho(t){if("string"===typeof t){var e=document.querySelector(t);return e||document.createElement("div")}return t}function vo(t,e){var n=document.createElement(t);return"select"!==t?n:(e.data&&e.data.attrs&&void 0!==e.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n)}function yo(t,e){return document.createElementNS(oo[t],e)}function go(t){return document.createTextNode(t)}function mo(t){return document.createComment(t)}function bo(t,e,n){t.insertBefore(e,n)}function _o(t,e){t.removeChild(e)}function wo(t,e){t.appendChild(e)}function xo(t){return t.parentNode}function Oo(t){return t.nextSibling}function So(t){return t.tagName}function $o(t,e){t.textContent=e}function Ao(t,e){t.setAttribute(e,"")}var Co=Object.freeze({createElement:vo,createElementNS:yo,createTextNode:go,createComment:mo,insertBefore:bo,removeChild:_o,appendChild:wo,parentNode:xo,nextSibling:Oo,tagName:So,setTextContent:$o,setStyleScope:Ao}),ko={create:function(t,e){Eo(e)},update:function(t,e){t.data.ref!==e.data.ref&&(Eo(t,!0),Eo(e))},destroy:function(t){Eo(t,!0)}};function Eo(t,e){var n=t.data.ref;if(o(n)){var r=t.context,i=t.componentInstance||t.elm,a=r.$refs;e?Array.isArray(a[n])?b(a[n],i):a[n]===i&&(a[n]=void 0):t.data.refInFor?Array.isArray(a[n])?a[n].indexOf(i)<0&&a[n].push(i):a[n]=[i]:a[n]=i}}var Mo=new wt("",{},[]),jo=["create","activate","update","remove","destroy"];function To(t,e){return t.key===e.key&&(t.tag===e.tag&&t.isComment===e.isComment&&o(t.data)===o(e.data)&&Po(t,e)||i(t.isAsyncPlaceholder)&&t.asyncFactory===e.asyncFactory&&r(e.asyncFactory.error))}function Po(t,e){if("input"!==t.tag)return!0;var n,r=o(n=t.data)&&o(n=n.attrs)&&n.type,i=o(n=e.data)&&o(n=n.attrs)&&n.type;return r===i||po(r)&&po(i)}function Do(t,e,n){var r,i,a={};for(r=e;r<=n;++r)i=t[r].key,o(i)&&(a[i]=r);return a}function Lo(t){var e,n,a={},s=t.modules,u=t.nodeOps;for(e=0;ev?(l=r(n[m+1])?null:n[m+1].elm,O(t,l,n,h,m,i)):h>m&&$(t,e,p,v)}function k(t,e,n,r){for(var i=n;i-1?qo(t,e,n):qr(e)?Xr(n)?t.removeAttribute(e):(n="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,n)):Br(e)?t.setAttribute(e,Yr(e,n)):Gr(e)?Xr(n)?t.removeAttributeNS(Wr,Kr(e)):t.setAttributeNS(Wr,e,n):qo(t,e,n)}function qo(t,e,n){if(Xr(n))t.removeAttribute(e);else{if(nt&&!rt&&"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 Wo={create:Uo,update:Uo};function Go(t,e){var n=e.elm,i=e.data,a=t.data;if(!(r(i.staticClass)&&r(i.class)&&(r(a)||r(a.staticClass)&&r(a.class)))){var c=Jr(e),s=n._transitionClasses;o(s)&&(c=to(c,eo(s))),c!==n._prevClass&&(n.setAttribute("class",c),n._prevClass=c)}}var Ko,Xo,Jo,Zo,Qo,ti,ei={create:Go,update:Go},ni=/[\w).+\-_$\]]/;function ri(t){var e,n,r,o,i,a=!1,c=!1,s=!1,u=!1,f=0,l=0,p=0,d=0;for(r=0;r=0;h--)if(v=t.charAt(h)," "!==v)break;v&&ni.test(v)||(u=!0)}}else void 0===o?(d=r+1,o=t.slice(0,r).trim()):y();function y(){(i||(i=[])).push(t.slice(d,r).trim()),d=r+1}if(void 0===o?o=t.slice(0,r).trim():0!==d&&y(),i)for(r=0;r-1?{exp:t.slice(0,Zo),key:'"'+t.slice(Zo+1)+'"'}:{exp:t,key:null};Xo=t,Zo=Qo=ti=0;while(!xi())Jo=wi(),Oi(Jo)?$i(Jo):91===Jo&&Si(Jo);return{exp:t.slice(0,Qo),key:t.slice(Qo+1,ti)}}function wi(){return Xo.charCodeAt(++Zo)}function xi(){return Zo>=Ko}function Oi(t){return 34===t||39===t}function Si(t){var e=1;Qo=Zo;while(!xi())if(t=wi(),Oi(t))$i(t);else if(91===t&&e++,93===t&&e--,0===e){ti=Zo;break}}function $i(t){var e=t;while(!xi())if(t=wi(),t===e)break}var Ai,Ci="__r",ki="__c";function Ei(t,e,n){n;var r=e.value,o=e.modifiers,i=t.tag,a=t.attrsMap.type;if(t.component)return mi(t,r,o),!1;if("select"===i)Ti(t,r,o);else if("input"===i&&"checkbox"===a)Mi(t,r,o);else if("input"===i&&"radio"===a)ji(t,r,o);else if("input"===i||"textarea"===i)Pi(t,r,o);else{if(!U.isReservedTag(i))return mi(t,r,o),!1}return!0}function Mi(t,e,n){var r=n&&n.number,o=hi(t,"value")||"null",i=hi(t,"true-value")||"true",a=hi(t,"false-value")||"false";ci(t,"checked","Array.isArray("+e+")?_i("+e+","+o+")>-1"+("true"===i?":("+e+")":":_q("+e+","+i+")")),pi(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&&("+bi(e,"$$a.concat([$$v])")+")}else{$$i>-1&&("+bi(e,"$$a.slice(0,$$i).concat($$a.slice($$i+1))")+")}}else{"+bi(e,"$$c")+"}",null,!0)}function ji(t,e,n){var r=n&&n.number,o=hi(t,"value")||"null";o=r?"_n("+o+")":o,ci(t,"checked","_q("+e+","+o+")"),pi(t,"change",bi(e,o),null,!0)}function Ti(t,e,n){var r=n&&n.number,o='Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return '+(r?"_n(val)":"val")+"})",i="$event.target.multiple ? $$selectedVal : $$selectedVal[0]",a="var $$selectedVal = "+o+";";a=a+" "+bi(e,i),pi(t,"change",a,null,!0)}function Pi(t,e,n){var r=t.attrsMap.type,o=n||{},i=o.lazy,a=o.number,c=o.trim,s=!i&&"range"!==r,u=i?"change":"range"===r?Ci:"input",f="$event.target.value";c&&(f="$event.target.value.trim()"),a&&(f="_n("+f+")");var l=bi(e,f);s&&(l="if($event.target.composing)return;"+l),ci(t,"value","("+e+")"),pi(t,u,l,null,!0),(c||a)&&pi(t,"blur","$forceUpdate()")}function Di(t){if(o(t[Ci])){var e=nt?"change":"input";t[e]=[].concat(t[Ci],t[e]||[]),delete t[Ci]}o(t[ki])&&(t.change=[].concat(t[ki],t.change||[]),delete t[ki])}function Li(t,e,n){var r=Ai;return function o(){var i=e.apply(null,arguments);null!==i&&Ri(t,o,n,r)}}var Ii=se&&!(at&&Number(at[1])<=53);function Ni(t,e,n,r){if(Ii){var o=Kn,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)}}Ai.addEventListener(t,e,st?{capture:n,passive:r}:n)}function Ri(t,e,n,r){(r||Ai).removeEventListener(t,e._wrapper||e,n)}function Fi(t,e){if(!r(t.data.on)||!r(e.data.on)){var n=e.data.on||{},o=t.data.on||{};Ai=e.elm,Di(n),xe(n,o,Ni,Ri,Li,e.context),Ai=void 0}}var Hi,zi={create:Fi,update:Fi};function Vi(t,e){if(!r(t.data.domProps)||!r(e.data.domProps)){var n,i,a=e.elm,c=t.data.domProps||{},s=e.data.domProps||{};for(n in o(s.__ob__)&&(s=e.data.domProps=T({},s)),c)n in s||(a[n]="");for(n in s){if(i=s[n],"textContent"===n||"innerHTML"===n){if(e.children&&(e.children.length=0),i===c[n])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===n&&"PROGRESS"!==a.tagName){a._value=i;var u=r(i)?"":String(i);Bi(a,u)&&(a.value=u)}else if("innerHTML"===n&&ao(a.tagName)&&r(a.innerHTML)){Hi=Hi||document.createElement("div"),Hi.innerHTML=""+i+"";var f=Hi.firstChild;while(a.firstChild)a.removeChild(a.firstChild);while(f.firstChild)a.appendChild(f.firstChild)}else if(i!==c[n])try{a[n]=i}catch(Ju){}}}}function Bi(t,e){return!t.composing&&("OPTION"===t.tagName||Ui(t,e)||Yi(t,e))}function Ui(t,e){var n=!0;try{n=document.activeElement!==t}catch(Ju){}return n&&t.value!==e}function Yi(t,e){var n=t.value,r=t._vModifiers;if(o(r)){if(r.number)return v(n)!==v(e);if(r.trim)return n.trim()!==e.trim()}return n!==e}var qi={create:Vi,update:Vi},Wi=x(function(t){var e={},n=/;(?![^(]*\))/g,r=/:(.+)/;return t.split(n).forEach(function(t){if(t){var n=t.split(r);n.length>1&&(e[n[0].trim()]=n[1].trim())}}),e});function Gi(t){var e=Ki(t.style);return t.staticStyle?T(t.staticStyle,e):e}function Ki(t){return Array.isArray(t)?P(t):"string"===typeof t?Wi(t):t}function Xi(t,e){var n,r={};if(e){var o=t;while(o.componentInstance)o=o.componentInstance._vnode,o&&o.data&&(n=Gi(o.data))&&T(r,n)}(n=Gi(t.data))&&T(r,n);var i=t;while(i=i.parent)i.data&&(n=Gi(i.data))&&T(r,n);return r}var Ji,Zi=/^--/,Qi=/\s*!important$/,ta=function(t,e,n){if(Zi.test(e))t.style.setProperty(e,n);else if(Qi.test(n))t.style.setProperty(C(e),n.replace(Qi,""),"important");else{var r=na(e);if(Array.isArray(n))for(var o=0,i=n.length;o-1?e.split(ia).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 ca(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(ia).forEach(function(e){return t.classList.remove(e)}):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{var n=" "+(t.getAttribute("class")||"")+" ",r=" "+e+" ";while(n.indexOf(r)>=0)n=n.replace(r," ");n=n.trim(),n?t.setAttribute("class",n):t.removeAttribute("class")}}function sa(t){if(t){if("object"===typeof t){var e={};return!1!==t.css&&T(e,ua(t.name||"v")),T(e,t),e}return"string"===typeof t?ua(t):void 0}}var ua=x(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"}}),fa=Z&&!rt,la="transition",pa="animation",da="transition",ha="transitionend",va="animation",ya="animationend";fa&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(da="WebkitTransition",ha="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(va="WebkitAnimation",ya="webkitAnimationEnd"));var ga=Z?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()};function ma(t){ga(function(){ga(t)})}function ba(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),aa(t,e))}function _a(t,e){t._transitionClasses&&b(t._transitionClasses,e),ca(t,e)}function wa(t,e,n){var r=Oa(t,e),o=r.type,i=r.timeout,a=r.propCount;if(!o)return n();var c=o===la?ha:ya,s=0,u=function(){t.removeEventListener(c,f),n()},f=function(e){e.target===t&&++s>=a&&u()};setTimeout(function(){s0&&(n=la,f=a,l=i.length):e===pa?u>0&&(n=pa,f=u,l=s.length):(f=Math.max(a,u),n=f>0?a>u?la:pa:null,l=n?n===la?i.length:s.length:0);var p=n===la&&xa.test(r[da+"Property"]);return{type:n,timeout:f,propCount:l,hasTransform:p}}function Sa(t,e){while(t.length1}function Ma(t,e){!0!==e.data.show&&Aa(e)}var ja=Z?{create:Ma,activate:Ma,remove:function(t,e){!0!==t.data.show?Ca(t,e):e()}}:{},Ta=[Wo,ei,zi,qi,oa,ja],Pa=Ta.concat(Bo),Da=Lo({nodeOps:Co,modules:Pa});rt&&document.addEventListener("selectionchange",function(){var t=document.activeElement;t&&t.vmodel&&Va(t,"input")});var La={inserted:function(t,e,n,r){"select"===n.tag?(r.elm&&!r.elm._vOptions?Oe(n,"postpatch",function(){La.componentUpdated(t,e,n)}):Ia(t,e,n.context),t._vOptions=[].map.call(t.options,Fa)):("textarea"===n.tag||po(t.type))&&(t._vModifiers=e.modifiers,e.modifiers.lazy||(t.addEventListener("compositionstart",Ha),t.addEventListener("compositionend",za),t.addEventListener("change",za),rt&&(t.vmodel=!0)))},componentUpdated:function(t,e,n){if("select"===n.tag){Ia(t,e,n.context);var r=t._vOptions,o=t._vOptions=[].map.call(t.options,Fa);if(o.some(function(t,e){return!R(t,r[e])})){var i=t.multiple?e.value.some(function(t){return Ra(t,o)}):e.value!==e.oldValue&&Ra(e.value,o);i&&Va(t,"change")}}}};function Ia(t,e,n){Na(t,e,n),(nt||ot)&&setTimeout(function(){Na(t,e,n)},0)}function Na(t,e,n){var r=e.value,o=t.multiple;if(!o||Array.isArray(r)){for(var i,a,c=0,s=t.options.length;c-1,a.selected!==i&&(a.selected=i);else if(R(Fa(a),r))return void(t.selectedIndex!==c&&(t.selectedIndex=c));o||(t.selectedIndex=-1)}}function Ra(t,e){return e.every(function(e){return!R(e,t)})}function Fa(t){return"_value"in t?t._value:t.value}function Ha(t){t.target.composing=!0}function za(t){t.target.composing&&(t.target.composing=!1,Va(t.target,"input"))}function Va(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function Ba(t){return!t.componentInstance||t.data&&t.data.transition?t:Ba(t.componentInstance._vnode)}var Ua={bind:function(t,e,n){var r=e.value;n=Ba(n);var o=n.data&&n.data.transition,i=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;r&&o?(n.data.show=!0,Aa(n,function(){t.style.display=i})):t.style.display=r?i:"none"},update:function(t,e,n){var r=e.value,o=e.oldValue;if(!r!==!o){n=Ba(n);var i=n.data&&n.data.transition;i?(n.data.show=!0,r?Aa(n,function(){t.style.display=t.__vOriginalDisplay}):Ca(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)}},Ya={model:La,show:Ua},qa={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 Wa(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?Wa($n(e.children)):t}function Ga(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[S(i)]=o[i];return e}function Ka(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}function Xa(t){while(t=t.parent)if(t.data.transition)return!0}function Ja(t,e){return e.key===t.key&&e.tag===t.tag}var Za=function(t){return t.tag||Sn(t)},Qa=function(t){return"show"===t.name},tc={name:"transition",props:qa,abstract:!0,render:function(t){var e=this,n=this.$slots.default;if(n&&(n=n.filter(Za),n.length)){0;var r=this.mode;0;var o=n[0];if(Xa(this.$vnode))return o;var i=Wa(o);if(!i)return o;if(this._leaving)return Ka(t,o);var a="__transition-"+this._uid+"-";i.key=null==i.key?i.isComment?a+"comment":a+i.tag:c(i.key)?0===String(i.key).indexOf(a)?i.key:a+i.key:i.key;var s=(i.data||(i.data={})).transition=Ga(this),u=this._vnode,f=Wa(u);if(i.data.directives&&i.data.directives.some(Qa)&&(i.data.show=!0),f&&f.data&&!Ja(i,f)&&!Sn(f)&&(!f.componentInstance||!f.componentInstance._vnode.isComment)){var l=f.data.transition=T({},s);if("out-in"===r)return this._leaving=!0,Oe(l,"afterLeave",function(){e._leaving=!1,e.$forceUpdate()}),Ka(t,o);if("in-out"===r){if(Sn(i))return u;var p,d=function(){p()};Oe(s,"afterEnter",d),Oe(s,"enterCancelled",d),Oe(l,"delayLeave",function(t){p=t})}}return o}}},ec=T({tag:String,moveClass:String},qa);delete ec.mode;var nc={props:ec,beforeMount:function(){var t=this,e=this._update;this._update=function(n,r){var o=Pn(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=Ga(this),c=0;cs&&(c.push(i=t.slice(s,o)),a.push(JSON.stringify(i)));var u=ri(r[1].trim());a.push("_s("+u+")"),c.push({"@binding":u}),s=o+r[0].length}return s\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,Oc=/^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,Sc="[a-zA-Z_][\\-\\.0-9_a-zA-Z"+Y.source+"]*",$c="((?:"+Sc+"\\:)?"+Sc+")",Ac=new RegExp("^<"+$c),Cc=/^\s*(\/?)>/,kc=new RegExp("^<\\/"+$c+"[^>]*>"),Ec=/^]+>/i,Mc=/^",""":'"',"&":"&"," ":"\n"," ":"\t","'":"'"},Lc=/&(?:lt|gt|quot|amp|#39);/g,Ic=/&(?:lt|gt|quot|amp|#39|#10|#9);/g,Nc=y("pre,textarea",!0),Rc=function(t,e){return t&&Nc(t)&&"\n"===e[0]};function Fc(t,e){var n=e?Ic:Lc;return t.replace(n,function(t){return Dc[t]})}function Hc(t,e){var n,r,o=[],i=e.expectHTML,a=e.isUnaryTag||L,c=e.canBeLeftOpenTag||L,s=0;while(t){if(n=t,r&&Tc(r)){var u=0,f=r.toLowerCase(),l=Pc[f]||(Pc[f]=new RegExp("([\\s\\S]*?)(]*>)","i")),p=t.replace(l,function(t,n,r){return u=r.length,Tc(f)||"noscript"===f||(n=n.replace(//g,"$1").replace(//g,"$1")),Rc(f,n)&&(n=n.slice(1)),e.chars&&e.chars(n),""});s+=t.length-p.length,t=p,A(f,s-u,s)}else{var d=t.indexOf("<");if(0===d){if(Mc.test(t)){var h=t.indexOf("--\x3e");if(h>=0){e.shouldKeepComment&&e.comment(t.substring(4,h),s,s+h+3),O(h+3);continue}}if(jc.test(t)){var v=t.indexOf("]>");if(v>=0){O(v+2);continue}}var y=t.match(Ec);if(y){O(y[0].length);continue}var g=t.match(kc);if(g){var m=s;O(g[0].length),A(g[1],m,s);continue}var b=S();if(b){$(b),Rc(b.tagName,t)&&O(1);continue}}var _=void 0,w=void 0,x=void 0;if(d>=0){w=t.slice(d);while(!kc.test(w)&&!Ac.test(w)&&!Mc.test(w)&&!jc.test(w)){if(x=w.indexOf("<",1),x<0)break;d+=x,w=t.slice(d)}_=t.substring(0,d)}d<0&&(_=t),_&&O(_.length),e.chars&&_&&e.chars(_,s-_.length,s)}if(t===n){e.chars&&e.chars(t);break}}function O(e){s+=e,t=t.substring(e)}function S(){var e=t.match(Ac);if(e){var n,r,o={tagName:e[1],attrs:[],start:s};O(e[0].length);while(!(n=t.match(Cc))&&(r=t.match(Oc)||t.match(xc)))r.start=s,O(r[0].length),r.end=s,o.attrs.push(r);if(n)return o.unarySlash=n[1],O(n[0].length),o.end=s,o}}function $(t){var n=t.tagName,s=t.unarySlash;i&&("p"===r&&wc(n)&&A(r),c(n)&&r===n&&A(n));for(var u=a(n)||!!s,f=t.attrs.length,l=new Array(f),p=0;p=0;a--)if(o[a].lowerCasedTag===c)break}else a=0;if(a>=0){for(var u=o.length-1;u>=a;u--)e.end&&e.end(o[u].tag,n,i);o.length=a,r=a&&o[a-1].tag}else"br"===c?e.start&&e.start(t,[],!0,n,i):"p"===c&&(e.start&&e.start(t,[],!1,n,i),e.end&&e.end(t,n,i))}A()}var zc,Vc,Bc,Uc,Yc,qc,Wc,Gc,Kc=/^@|^v-on:/,Xc=/^v-|^@|^:/,Jc=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,Zc=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,Qc=/^\(|\)$/g,ts=/^\[.*\]$/,es=/:(.*)$/,ns=/^:|^\.|^v-bind:/,rs=/\.[^.\]]+(?=[^\]]*$)/g,os=/^v-slot(:|$)|^#/,is=/[\r\n]/,as=/\s+/g,cs=x(mc.decode),ss="_empty_";function us(t,e,n){return{type:1,tag:t,attrsList:e,attrsMap:Ms(e),rawAttrsMap:{},parent:n,children:[]}}function fs(t,e){zc=e.warn||ii,qc=e.isPreTag||L,Wc=e.mustUseProp||L,Gc=e.getTagNamespace||L;var n=e.isReservedTag||L;(function(t){return!!t.component||!n(t.tag)}),Bc=ai(e.modules,"transformNode"),Uc=ai(e.modules,"preTransformNode"),Yc=ai(e.modules,"postTransformNode"),Vc=e.delimiters;var r,o,i=[],a=!1!==e.preserveWhitespace,c=e.whitespace,s=!1,u=!1;function f(t){if(l(t),s||t.processed||(t=ds(t,e)),i.length||t===r||r.if&&(t.elseif||t.else)&&ws(r,{exp:t.elseif,block:t}),o&&!t.forbidden)if(t.elseif||t.else)bs(t,o);else{if(t.slotScope){var n=t.slotTarget||'"default"';(o.scopedSlots||(o.scopedSlots={}))[n]=t}o.children.push(t),t.parent=o}t.children=t.children.filter(function(t){return!t.slotScope}),l(t),t.pre&&(s=!1),qc(t.tag)&&(u=!1);for(var a=0;a|^function\s*(?:[\w$]+)?\s*\(/,tu=/\([^)]*?\);*$/,eu=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,nu={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},ru={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"]},ou=function(t){return"if("+t+")return null;"},iu={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:ou("$event.target !== $event.currentTarget"),ctrl:ou("!$event.ctrlKey"),shift:ou("!$event.shiftKey"),alt:ou("!$event.altKey"),meta:ou("!$event.metaKey"),left:ou("'button' in $event && $event.button !== 0"),middle:ou("'button' in $event && $event.button !== 1"),right:ou("'button' in $event && $event.button !== 2")};function au(t,e){var n=e?"nativeOn:":"on:",r="",o="";for(var i in t){var a=cu(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 cu(t){if(!t)return"function(){}";if(Array.isArray(t))return"["+t.map(function(t){return cu(t)}).join(",")+"]";var e=eu.test(t.value),n=Qs.test(t.value),r=eu.test(t.value.replace(tu,""));if(t.modifiers){var o="",i="",a=[];for(var c in t.modifiers)if(iu[c])i+=iu[c],nu[c]&&a.push(c);else if("exact"===c){var s=t.modifiers;i+=ou(["ctrl","shift","alt","meta"].filter(function(t){return!s[t]}).map(function(t){return"$event."+t+"Key"}).join("||"))}else a.push(c);a.length&&(o+=su(a)),i&&(o+=i);var u=e?"return "+t.value+"($event)":n?"return ("+t.value+")($event)":r?"return "+t.value:t.value;return"function($event){"+o+u+"}"}return e||n?t.value:"function($event){"+(r?"return "+t.value:t.value)+"}"}function su(t){return"if(!$event.type.indexOf('key')&&"+t.map(uu).join("&&")+")return null;"}function uu(t){var e=parseInt(t,10);if(e)return"$event.keyCode!=="+e;var n=nu[t],r=ru[t];return"_k($event.keyCode,"+JSON.stringify(t)+","+JSON.stringify(n)+",$event.key,"+JSON.stringify(r)+")"}function fu(t,e){t.wrapListeners=function(t){return"_g("+t+","+e.value+")"}}function lu(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":"")+")"}}var pu={on:fu,bind:lu,cloak:D},du=function(t){this.options=t,this.warn=t.warn||ii,this.transforms=ai(t.modules,"transformCode"),this.dataGenFns=ai(t.modules,"genData"),this.directives=T(T({},pu),t.directives);var e=t.isReservedTag||L;this.maybeComponent=function(t){return!!t.component||!e(t.tag)},this.onceId=0,this.staticRenderFns=[],this.pre=!1};function hu(t,e){var n=new du(e),r=t?vu(t,n):'_c("div")';return{render:"with(this){return "+r+"}",staticRenderFns:n.staticRenderFns}}function vu(t,e){if(t.parent&&(t.pre=t.pre||t.parent.pre),t.staticRoot&&!t.staticProcessed)return yu(t,e);if(t.once&&!t.onceProcessed)return gu(t,e);if(t.for&&!t.forProcessed)return _u(t,e);if(t.if&&!t.ifProcessed)return mu(t,e);if("template"!==t.tag||t.slotTarget||e.pre){if("slot"===t.tag)return Du(t,e);var n;if(t.component)n=Lu(t.component,t,e);else{var r;(!t.plain||t.pre&&e.maybeComponent(t))&&(r=wu(t,e));var o=t.inlineTemplate?null:ku(t,e,!0);n="_c('"+t.tag+"'"+(r?","+r:"")+(o?","+o:"")+")"}for(var i=0;i>>0}function Au(t){return 1===t.type&&("slot"===t.tag||t.children.some(Au))}function Cu(t,e){var n=t.attrsMap["slot-scope"];if(t.if&&!t.ifProcessed&&!n)return mu(t,e,Cu,"null");if(t.for&&!t.forProcessed)return _u(t,e,Cu);var r=t.slotScope===ss?"":String(t.slotScope),o="function("+r+"){return "+("template"===t.tag?t.if&&n?"("+t.if+")?"+(ku(t,e)||"undefined")+":undefined":ku(t,e)||"undefined":vu(t,e))+"}",i=r?"":",proxy:true";return"{key:"+(t.slotTarget||'"default"')+",fn:"+o+i+"}"}function ku(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 c=n?e.maybeComponent(a)?",1":",0":"";return""+(r||vu)(a,e)+c}var s=n?Eu(i,e.maybeComponent):0,u=o||ju;return"["+i.map(function(t){return u(t,e)}).join(",")+"]"+(s?","+s:"")}}function Eu(t,e){for(var n=0,r=0;r':'
',zu.innerHTML.indexOf(" ")>0}var qu=!!Z&&Yu(!1),Wu=!!Z&&Yu(!0),Gu=x(function(t){var e=ho(t);return e&&e.innerHTML}),Ku=$r.prototype.$mount;function Xu(t){if(t.outerHTML)return t.outerHTML;var e=document.createElement("div");return e.appendChild(t.cloneNode(!0)),e.innerHTML}$r.prototype.$mount=function(t,e){if(t=t&&ho(t),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=Gu(r));else{if(!r.nodeType)return this;r=r.innerHTML}else t&&(r=Xu(t));if(r){0;var o=Uu(r,{outputSourceRange:!1,shouldDecodeNewlines:qu,shouldDecodeNewlinesForHref:Wu,delimiters:n.delimiters,comments:n.comments},this),i=o.render,a=o.staticRenderFns;n.render=i,n.staticRenderFns=a}}return Ku.call(this,t,e)},$r.compile=Uu,e["a"]=$r}).call(this,n("c8ba"))},a0a8:function(t,e,n){var r=n("e4e1"),o=n("dcc3");t.exports=n("45e2")?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},a24c:function(t,e,n){var r=n("b808"),o=n("1ad4").set,i=r.MutationObserver||r.WebKitMutationObserver,a=r.process,c=r.Promise,s="process"==n("71fa")(a);t.exports=function(){var t,e,n,u=function(){var r,o;s&&(r=a.domain)&&r.exit();while(t){o=t.fn,t=t.next;try{o()}catch(i){throw t?n():e=void 0,i}}e=void 0,r&&r.enter()};if(s)n=function(){a.nextTick(u)};else if(!i||r.navigator&&r.navigator.standalone)if(c&&c.resolve){var f=c.resolve(void 0);n=function(){f.then(u)}}else n=function(){o.call(r,u)};else{var l=!0,p=document.createTextNode("");new i(u).observe(p,{characterData:!0}),n=function(){p.data=l=!l}}return function(r){var o={fn:r,next:void 0};e&&(e.next=o),t||(t=o,n()),e=o}}},a274:function(t,e,n){var r=n("71fa"),o=n("b67f")("toStringTag"),i="Arguments"==r(function(){return arguments}()),a=function(t,e){try{return t[e]}catch(n){}};t.exports=function(t){var e,n,c;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=a(e=Object(t),o))?n:i?r(e):"Object"==(c=r(e))&&"function"==typeof e.callee?"Arguments":c}},a402:function(t,e,n){"use strict";var r=n("9ed1"),o=n("696b"),i=n("bf41"),a=n("4cf4"),c=n("d43f"),s=Object.assign;t.exports=!s||n("b629")(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=s({},t)[n]||Object.keys(s({},e)).join("")!=r})?function(t,e){var n=a(t),s=arguments.length,u=1,f=o.f,l=i.f;while(s>u){var p,d=c(arguments[u++]),h=f?r(d).concat(f(d)):r(d),v=h.length,y=0;while(v>y)l.call(d,p=h[y++])&&(n[p]=d[p])}return n}:s},a47f:function(t,e,n){t.exports=!n("7d95")&&!n("d782")(function(){return 7!=Object.defineProperty(n("12fd")("div"),"a",{get:function(){return 7}}).a})},a481:function(t,e,n){"use strict";var r=n("cb7c"),o=n("4bf8"),i=n("9def"),a=n("4588"),c=n("0390"),s=n("5f1b"),u=Math.max,f=Math.min,l=Math.floor,p=/\$([$&`']|\d\d?|<[^>]*>)/g,d=/\$([$&`']|\d\d?)/g,h=function(t){return void 0===t?t:String(t)};n("214f")("replace",2,function(t,e,n,v){return[function(r,o){var i=t(this),a=void 0==r?void 0:r[e];return void 0!==a?a.call(r,i,o):n.call(String(i),r,o)},function(t,e){var o=v(n,t,this,e);if(o.done)return o.value;var l=r(t),p=String(this),d="function"===typeof e;d||(e=String(e));var g=l.global;if(g){var m=l.unicode;l.lastIndex=0}var b=[];while(1){var _=s(l,p);if(null===_)break;if(b.push(_),!g)break;var w=String(_[0]);""===w&&(l.lastIndex=c(p,i(l.lastIndex),m))}for(var x="",O=0,S=0;S=O&&(x+=p.slice(O,A)+j,O=A+$.length)}return x+p.slice(O)}];function y(t,e,r,i,a,c){var s=r+t.length,u=i.length,f=d;return void 0!==a&&(a=o(a),f=p),n.call(c,f,function(n,o){var c;switch(o.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,r);case"'":return e.slice(s);case"<":c=a[o.slice(1,-1)];break;default:var f=+o;if(0===f)return o;if(f>u){var p=l(f/10);return 0===p?o:p<=u?void 0===i[p-1]?o.charAt(1):i[p-1]+o.charAt(1):o}c=i[f-1]}return void 0===c?"":c})}})},a4bb:function(t,e,n){t.exports=n("fda6")},a5ab:function(t,e,n){var r=n("a812"),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},a638:function(t,e){t.exports={}},a745:function(t,e,n){t.exports=n("d604")},a7d3:function(t,e){var n=t.exports={version:"2.6.5"};"number"==typeof __e&&(__e=n)},a812:function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},a9f2:function(t,e,n){var r=n("9184");t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},aa77:function(t,e,n){var r=n("5ca1"),o=n("be13"),i=n("79e5"),a=n("fdef"),c="["+a+"]",s="​…",u=RegExp("^"+c+c+"*"),f=RegExp(c+c+"*$"),l=function(t,e,n){var o={},c=i(function(){return!!a[t]()||s[t]()!=s}),u=o[t]=c?e(p):a[t];n&&(o[n]=u),r(r.P+r.F*c,"String",o)},p=l.trim=function(t,e){return t=String(o(t)),1&e&&(t=t.replace(u,"")),2&e&&(t=t.replace(f,"")),t};t.exports=l},aa82:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("78ef");e.default=function(t){return(0,r.withParams)({type:"requiredIf",prop:t},function(e,n){return!(0,r.ref)(t,this,n)||(0,r.req)(e)})}},aab6:function(t,e,n){var r=n("e4e1").f,o=n("0f4a"),i=n("b67f")("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},aae3:function(t,e,n){var r=n("d3f4"),o=n("2d95"),i=n("2b4c")("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},ab4c:function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},ac6a:function(t,e,n){for(var r=n("cadf"),o=n("0d58"),i=n("2aba"),a=n("7726"),c=n("32e9"),s=n("84f2"),u=n("2b4c"),f=u("iterator"),l=u("toStringTag"),p=s.Array,d={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},h=o(d),v=0;vf)if(c=s[f++],c!=c)return!0}else for(;u>f;f++)if((t||f in s)&&s[f]===n)return t||f||0;return!t&&-1}}},c5f6:function(t,e,n){"use strict";var r=n("7726"),o=n("69a8"),i=n("2d95"),a=n("5dbc"),c=n("6a99"),s=n("79e5"),u=n("9093").f,f=n("11e9").f,l=n("86cc").f,p=n("aa77").trim,d="Number",h=r[d],v=h,y=h.prototype,g=i(n("2aeb")(y))==d,m="trim"in String.prototype,b=function(t){var e=c(t,!1);if("string"==typeof e&&e.length>2){e=m?e.trim():p(e,3);var n,r,o,i=e.charCodeAt(0);if(43===i||45===i){if(n=e.charCodeAt(2),88===n||120===n)return NaN}else if(48===i){switch(e.charCodeAt(1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+e}for(var a,s=e.slice(2),u=0,f=s.length;uo)return NaN;return parseInt(s,r)}}return+e};if(!h(" 0o1")||!h("0b1")||h("+0x1")){h=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof h&&(g?s(function(){y.valueOf.call(n)}):i(n)!=d)?a(new v(b(e)),n,h):b(e)};for(var _,w=n("9e1e")?u(v):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),x=0;w.length>x;x++)o(v,_=w[x])&&!o(h,_)&&l(h,_,f(v,_));h.prototype=y,y.constructor=h,n("2aba")(r,d,h)}},c609:function(t,e,n){"use strict";var r=n("d13f"),o=n("03ca"),i=n("75c9");r(r.S,"Promise",{try:function(t){var e=o.f(this),n=i(t);return(n.e?e.reject:e.resolve)(n.v),e.promise}})},c69a:function(t,e,n){t.exports=!n("9e1e")&&!n("79e5")(function(){return 7!=Object.defineProperty(n("230e")("div"),"a",{get:function(){return 7}}).a})},c764:function(t,e,n){n("dc9b"),t.exports=n("a7d3").Object.values},c8ba:function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}t.exports=n},c8bb:function(t,e,n){t.exports=n("89ca")},c99d:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("78ef");e.default=(0,r.withParams)({type:"ipAddress"},function(t){if(!(0,r.req)(t))return!0;if("string"!==typeof t)return!1;var e=t.split(".");return 4===e.length&&e.every(o)});var o=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}},ca38:function(t,e){var n=t.exports={version:"2.6.5"};"number"==typeof __e&&(__e=n)},ca5a:function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},cadf:function(t,e,n){"use strict";var r=n("9c6c"),o=n("d53b"),i=n("84f2"),a=n("6821");t.exports=n("01f9")(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},cb7c:function(t,e,n){var r=n("d3f4");t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},cc1d:function(t,e,n){var r=n("58b9"),o=n("04cf"),i=n("4052");t.exports=function(t){return function(e,n,a){var c,s=r(e),u=o(s.length),f=i(a,u);if(t&&n!=n){while(u>f)if(c=s[f++],c!=c)return!0}else for(;u>f;f++)if((t||f in s)&&s[f]===n)return t||f||0;return!t&&-1}}},cc20:function(t,e,n){"use strict";var r=n("9184");function o(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r}),this.resolve=r(e),this.reject=r(n)}t.exports.f=function(t){return new o(t)}},cd1c:function(t,e,n){var r=n("e853");t.exports=function(t,e){return new(r(t))(e)}},ce10:function(t,e,n){var r=n("69a8"),o=n("6821"),i=n("c366")(!1),a=n("613b")("IE_PROTO");t.exports=function(t,e){var n,c=o(t),s=0,u=[];for(n in c)n!=a&&r(c,n)&&u.push(n);while(e.length>s)r(c,n=e[s++])&&(~i(u,n)||u.push(n));return u}},cebc:function(t,e,n){"use strict";var r=n("268f"),o=n.n(r),i=n("e265"),a=n.n(i),c=n("a4bb"),s=n.n(c),u=n("85f2"),f=n.n(u);function l(t,e,n){return e in t?f()(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function p(t){for(var e=1;eu)i.call(a,n=c[u++])&&f.push(t?[n,a[n]]:a[n]);return f}}},d127:function(t,e,n){n("0a0a")("asyncIterator")},d13f:function(t,e,n){var r=n("da3c"),o=n("a7d3"),i=n("bc25"),a=n("8ce0"),c=n("43c8"),s="prototype",u=function(t,e,n){var f,l,p,d=t&u.F,h=t&u.G,v=t&u.S,y=t&u.P,g=t&u.B,m=t&u.W,b=h?o:o[e]||(o[e]={}),_=b[s],w=h?r:v?r[e]:(r[e]||{})[s];for(f in h&&(n=e),n)l=!d&&w&&void 0!==w[f],l&&c(b,f)||(p=l?w[f]:n[f],b[f]=h&&"function"!=typeof w[f]?n[f]:g&&l?i(p,r):m&&w[f]==p?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e[s]=t[s],e}(p):y&&"function"==typeof p?i(Function.call,p):p,y&&((b.virtual||(b.virtual={}))[f]=p,t&u.R&&_&&!_[f]&&a(_,f,p)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},d24f:function(t,e,n){n("0a0a")("observable")},d256:function(t,e,n){"use strict";var r=n("da3c"),o=n("43c8"),i=n("7d95"),a=n("d13f"),c=n("2312"),s=n("6277").KEY,u=n("d782"),f=n("7772"),l=n("c0d8"),p=n("7b00"),d=n("1b55"),h=n("fda1"),v=n("0a0a"),y=n("d2d6"),g=n("b5aa"),m=n("0f89"),b=n("6f8a"),_=n("6a9b"),w=n("2ea1"),x=n("f845"),O=n("7108"),S=n("565d"),$=n("626e"),A=n("3adc"),C=n("7633"),k=$.f,E=A.f,M=S.f,j=r.Symbol,T=r.JSON,P=T&&T.stringify,D="prototype",L=d("_hidden"),I=d("toPrimitive"),N={}.propertyIsEnumerable,R=f("symbol-registry"),F=f("symbols"),H=f("op-symbols"),z=Object[D],V="function"==typeof j,B=r.QObject,U=!B||!B[D]||!B[D].findChild,Y=i&&u(function(){return 7!=O(E({},"a",{get:function(){return E(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=k(z,e);r&&delete z[e],E(t,e,n),r&&t!==z&&E(z,e,r)}:E,q=function(t){var e=F[t]=O(j[D]);return e._k=t,e},W=V&&"symbol"==typeof j.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof j},G=function(t,e,n){return t===z&&G(H,e,n),m(t),e=w(e,!0),m(n),o(F,e)?(n.enumerable?(o(t,L)&&t[L][e]&&(t[L][e]=!1),n=O(n,{enumerable:x(0,!1)})):(o(t,L)||E(t,L,x(1,{})),t[L][e]=!0),Y(t,e,n)):E(t,e,n)},K=function(t,e){m(t);var n,r=y(e=_(e)),o=0,i=r.length;while(i>o)G(t,n=r[o++],e[n]);return t},X=function(t,e){return void 0===e?O(t):K(O(t),e)},J=function(t){var e=N.call(this,t=w(t,!0));return!(this===z&&o(F,t)&&!o(H,t))&&(!(e||!o(this,t)||!o(F,t)||o(this,L)&&this[L][t])||e)},Z=function(t,e){if(t=_(t),e=w(e,!0),t!==z||!o(F,e)||o(H,e)){var n=k(t,e);return!n||!o(F,e)||o(t,L)&&t[L][e]||(n.enumerable=!0),n}},Q=function(t){var e,n=M(_(t)),r=[],i=0;while(n.length>i)o(F,e=n[i++])||e==L||e==s||r.push(e);return r},tt=function(t){var e,n=t===z,r=M(n?H:_(t)),i=[],a=0;while(r.length>a)!o(F,e=r[a++])||n&&!o(z,e)||i.push(F[e]);return i};V||(j=function(){if(this instanceof j)throw TypeError("Symbol is not a constructor!");var t=p(arguments.length>0?arguments[0]:void 0),e=function(n){this===z&&e.call(H,n),o(this,L)&&o(this[L],t)&&(this[L][t]=!1),Y(this,t,x(1,n))};return i&&U&&Y(z,t,{configurable:!0,set:e}),q(t)},c(j[D],"toString",function(){return this._k}),$.f=Z,A.f=G,n("d876").f=S.f=Q,n("d74e").f=J,n("31c2").f=tt,i&&!n("b457")&&c(z,"propertyIsEnumerable",J,!0),h.f=function(t){return q(d(t))}),a(a.G+a.W+a.F*!V,{Symbol:j});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;et.length>nt;)d(et[nt++]);for(var rt=C(d.store),ot=0;rt.length>ot;)v(rt[ot++]);a(a.S+a.F*!V,"Symbol",{for:function(t){return o(R,t+="")?R[t]:R[t]=j(t)},keyFor:function(t){if(!W(t))throw TypeError(t+" is not a symbol!");for(var e in R)if(R[e]===t)return e},useSetter:function(){U=!0},useSimple:function(){U=!1}}),a(a.S+a.F*!V,"Object",{create:X,defineProperty:G,defineProperties:K,getOwnPropertyDescriptor:Z,getOwnPropertyNames:Q,getOwnPropertySymbols:tt}),T&&a(a.S+a.F*(!V||u(function(){var t=j();return"[null]"!=P([t])||"{}"!=P({a:t})||"{}"!=P(Object(t))})),"JSON",{stringify:function(t){var e,n,r=[t],o=1;while(arguments.length>o)r.push(arguments[o++]);if(n=e=r[1],(b(e)||void 0!==t)&&!W(t))return g(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!W(e))return e}),r[1]=e,P.apply(T,r)}}),j[D][I]||n("8ce0")(j[D],I,j[D].valueOf),l(j,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},d294:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("78ef");e.default=function(){for(var t=arguments.length,e=Array(t),n=0;n0&&e.reduce(function(e,n){return e||n.apply(t,r)},!1)})}},d2c8:function(t,e,n){var r=n("aae3"),o=n("be13");t.exports=function(t,e,n){if(r(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(o(t))}},d2d6:function(t,e,n){var r=n("7633"),o=n("31c2"),i=n("d74e");t.exports=function(t){var e=r(t),n=o.f;if(n){var a,c=n(t),s=i.f,u=0;while(c.length>u)s.call(t,a=c[u++])&&e.push(a)}return e}},d38f:function(t,e,n){var r=n("7d8a"),o=n("1b55")("iterator"),i=n("b22a");t.exports=n("a7d3").isIterable=function(t){var e=Object(t);return void 0!==e[o]||"@@iterator"in e||i.hasOwnProperty(r(e))}},d3f4:function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},d43f:function(t,e,n){var r=n("71fa");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},d4f4:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("78ef");e.default=(0,r.withParams)({type:"required"},r.req)},d53b:function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},d604:function(t,e,n){n("1938"),t.exports=n("a7d3").Array.isArray},d74e:function(t,e){e.f={}.propertyIsEnumerable},d782:function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},d876:function(t,e,n){var r=n("2695"),o=n("0029").concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},d8db:function(t,e,n){var r=n("b808").document;t.exports=r&&r.documentElement},d8e8:function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},d9fc:function(t,e,n){"use strict";var r=n("569f"),o=n("ca38"),i=n("b808"),a=n("1aa7"),c=n("1c08");r(r.P+r.R,"Promise",{finally:function(t){var e=a(this,o.Promise||i.Promise),n="function"==typeof t;return this.then(n?function(n){return c(e,t()).then(function(){return n})}:t,n?function(n){return c(e,t()).then(function(){throw n})}:t)}})},da3c:function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},db0c:function(t,e,n){t.exports=n("c764")},dc9b:function(t,e,n){var r=n("d13f"),o=n("cff3")(!1);r(r.S,"Object",{values:function(t){return o(t)}})},dcc3:function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},dd04:function(t,e,n){n("12fd9"),n("93c4"),n("b42c"),n("5b5f"),n("b604"),n("c609"),t.exports=n("a7d3").Promise},decf:function(t,e,n){var r=n("0f89"),o=n("6f8a"),i=n("03ca");t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t),a=n.resolve;return a(e),n.promise}},df0a:function(t,e,n){var r,o,i,a=n("bc25"),c=n("196c"),s=n("103a"),u=n("12fd"),f=n("da3c"),l=f.process,p=f.setImmediate,d=f.clearImmediate,h=f.MessageChannel,v=f.Dispatch,y=0,g={},m="onreadystatechange",b=function(){var t=+this;if(g.hasOwnProperty(t)){var e=g[t];delete g[t],e()}},_=function(t){b.call(t.data)};p&&d||(p=function(t){var e=[],n=1;while(arguments.length>n)e.push(arguments[n++]);return g[++y]=function(){c("function"==typeof t?t:Function(t),e)},r(y),y},d=function(t){delete g[t]},"process"==n("6e1f")(l)?r=function(t){l.nextTick(a(b,t,1))}:v&&v.now?r=function(t){v.now(a(b,t,1))}:h?(o=new h,i=o.port2,o.port1.onmessage=_,r=a(i.postMessage,i,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(t){f.postMessage(t+"","*")},f.addEventListener("message",_,!1)):r=m in u("script")?function(t){s.appendChild(u("script"))[m]=function(){s.removeChild(this),b.call(t)}}:function(t){setTimeout(a(b,t,1),0)}),t.exports={set:p,clear:d}},e11e:function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},e265:function(t,e,n){t.exports=n("5698")},e341:function(t,e,n){var r=n("d13f");r(r.S+r.F*!n("7d95"),"Object",{defineProperty:n("3adc").f})},e4a9:function(t,e,n){"use strict";var r=n("b457"),o=n("d13f"),i=n("2312"),a=n("8ce0"),c=n("b22a"),s=n("5ce7"),u=n("c0d8"),f=n("ff0c"),l=n("1b55")("iterator"),p=!([].keys&&"next"in[].keys()),d="@@iterator",h="keys",v="values",y=function(){return this};t.exports=function(t,e,n,g,m,b,_){s(n,e,g);var w,x,O,S=function(t){if(!p&&t in k)return k[t];switch(t){case h:return function(){return new n(this,t)};case v:return function(){return new n(this,t)}}return function(){return new n(this,t)}},$=e+" Iterator",A=m==v,C=!1,k=t.prototype,E=k[l]||k[d]||m&&k[m],M=E||S(m),j=m?A?S("entries"):M:void 0,T="Array"==e&&k.entries||E;if(T&&(O=f(T.call(new t)),O!==Object.prototype&&O.next&&(u(O,$,!0),r||"function"==typeof O[l]||a(O,l,y))),A&&E&&E.name!==v&&(C=!0,M=function(){return E.call(this)}),r&&!_||!p&&!C&&k[l]||a(k,l,M),c[e]=M,c[$]=y,m)if(w={values:A?M:S(v),keys:b?M:S(h),entries:j},_)for(x in w)x in k||i(k,x,w[x]);else o(o.P+o.F*(p||C),e,w);return w}},e4e1:function(t,e,n){var r=n("27b2"),o=n("e830"),i=n("b938"),a=Object.defineProperty;e.f=n("45e2")?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return a(t,e,n)}catch(c){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},e523:function(t,e,n){var r=n("e4e1"),o=n("27b2"),i=n("9ed1");t.exports=n("45e2")?Object.defineProperties:function(t,e){o(t);var n,a=i(e),c=a.length,s=0;while(c>s)r.f(t,n=a[s++],e[n]);return t}},e5fa:function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},e652:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("78ef");e.default=function(t){return(0,r.withParams)({type:"requiredUnless",prop:t},function(e,n){return!!(0,r.ref)(t,this,n)||(0,r.req)(e)})}},e6a1:function(t,e){t.exports=!1},e814:function(t,e,n){t.exports=n("54aa")},e830:function(t,e,n){t.exports=!n("45e2")&&!n("b629")(function(){return 7!=Object.defineProperty(n("781f")("div"),"a",{get:function(){return 7}}).a})},e853:function(t,e,n){var r=n("d3f4"),o=n("1169"),i=n("2b4c")("species");t.exports=function(t){var e;return o(t)&&(e=t.constructor,"function"!=typeof e||e!==Array&&!o(e.prototype)||(e=void 0),r(e)&&(e=e[i],null===e&&(e=void 0))),void 0===e?Array:e}},eb66:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("78ef");e.default=function(t){return(0,r.withParams)({type:"minValue",min:t},function(e){return!(0,r.req)(e)||(!/\s/.test(e)||e instanceof Date)&&+e>=+t})}},ebd6:function(t,e,n){var r=n("cb7c"),o=n("d8e8"),i=n("2b4c")("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||void 0==(n=r(a)[i])?e:o(n)}},ec11:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("78ef");e.default=function(t,e){return(0,r.withParams)({type:"between",min:t,max:e},function(n){return!(0,r.req)(n)||(!/\s/.test(n)||n instanceof Date)&&+t<=+n&&+e>=+n})}},ec5b:function(t,e,n){n("e341");var r=n("a7d3").Object;t.exports=function(t,e,n){return r.defineProperty(t,e,n)}},ed0f:function(t,e,n){var r=n("27b2"),o=n("e523"),i=n("49c1"),a=n("be5a")("IE_PROTO"),c=function(){},s="prototype",u=function(){var t,e=n("781f")("iframe"),r=i.length,o="<",a=">";e.style.display="none",n("d8db").appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(o+"script"+a+"document.F=Object"+o+"/script"+a),t.close(),u=t.F;while(r--)delete u[s][i[r]];return u()};t.exports=Object.create||function(t,e){var n;return null!==t?(c[s]=r(t),n=new c,c[s]=null,n[a]=t):n=u(),void 0===e?n:o(n,e)}},eec7:function(t,e,n){"use strict";var r=n("ed0f"),o=n("dcc3"),i=n("aab6"),a={};n("a0a8")(a,n("b67f")("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(a,{next:o(1,n)}),i(t,e+" Iterator")}},ef26:function(t,e){t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},f159:function(t,e,n){var r=n("7d8a"),o=n("1b55")("iterator"),i=n("b22a");t.exports=n("a7d3").getIteratorMethod=function(t){if(void 0!=t)return t[o]||t["@@iterator"]||i[r(t)]}},f26d:function(t,e,n){var r=n("a638"),o=n("b67f")("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||i[o]===t)}},f2f3:function(t,e,n){"use strict";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},r(t)}var o={namespaced:!0,state:{locale:null,fallback:null,translations:{}},mutations:{SET_LOCALE:function(t,e){t.locale=e.locale},ADD_LOCALE:function(t,e){var n=i(e.translations);if(t.translations.hasOwnProperty(e.locale)){var r=t.translations[e.locale];t.translations[e.locale]=Object.assign({},r,n)}else t.translations[e.locale]=n;try{t.translations.__ob__&&t.translations.__ob__.dep.notify()}catch(o){}},REPLACE_LOCALE:function(t,e){var n=i(e.translations);t.translations[e.locale]=n;try{t.translations.__ob__&&t.translations.__ob__.dep.notify()}catch(r){}},REMOVE_LOCALE:function(t,e){if(t.translations.hasOwnProperty(e.locale)){t.locale===e.locale&&(t.locale=null);var n=Object.assign({},t.translations);delete n[e.locale],t.translations=n}},SET_FALLBACK_LOCALE:function(t,e){t.fallback=e.locale}},actions:{setLocale:function(t,e){t.commit({type:"SET_LOCALE",locale:e.locale})},addLocale:function(t,e){t.commit({type:"ADD_LOCALE",locale:e.locale,translations:e.translations})},replaceLocale:function(t,e){t.commit({type:"REPLACE_LOCALE",locale:e.locale,translations:e.translations})},removeLocale:function(t,e){t.commit({type:"REMOVE_LOCALE",locale:e.locale,translations:e.translations})},setFallbackLocale:function(t,e){t.commit({type:"SET_FALLBACK_LOCALE",locale:e.locale})}}},i=function t(e){var n={};for(var o in e)if(e.hasOwnProperty(o)){var i=r(e[o]);if(a(e[o])){for(var c=e[o].length,s=0;s1?1:0;case"lv":return e%10===1&&e%100!==11?0:0!==e?1:2;case"lt":return e%10===1&&e%100!==11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2;case"be":case"bs":case"hr":case"ru":case"sr":case"uk":return e%10===1&&e%100!==11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2;case"mnk":return 0===e?0:1===e?1:2;case"ro":return 1===e?0:0===e||e%100>0&&e%100<20?1:2;case"pl":return 1===e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2;case"cs":case"sk":return 1===e?0:e>=2&&e<=4?1:2;case"csb":return 1===e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2;case"sl":return e%100===1?0:e%100===2?1:e%100===3||e%100===4?2:3;case"mt":return 1===e?0:0===e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3;case"gd":return 1===e||11===e?0:2===e||12===e?1:e>2&&e<20?2:3;case"cy":return 1===e?0:2===e?1:8!==e&&11!==e?2:3;case"kw":return 1===e?0:2===e?1:3===e?2:3;case"ga":return 1===e?0:2===e?1:e>2&&e<7?2:e>6&&e<11?3:4;case"ar":return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5;default:return 1!==e?1:0}}},s={install:function(t,e,n){"string"!==typeof arguments[2]&&"string"!==typeof arguments[3]||(console.warn("i18n: Registering the plugin vuex-i18n with a string for `moduleName` or `identifiers` is deprecated. Use a configuration object instead.","https://github.com/dkfbasel/vuex-i18n#setup"),n={moduleName:arguments[2],identifiers:arguments[3]}),n=Object.assign({warnings:!0,moduleName:"i18n",identifiers:["{","}"],preserveState:!1,translateFilterName:"translate",translateInFilterName:"translateIn",onTranslationNotFound:function(){}},n);var r=n.moduleName,i=n.identifiers,a=n.translateFilterName,c=n.translateInFilterName,s=n.onTranslationNotFound;if("function"!==typeof s&&(console.error("i18n: i18n config option onTranslationNotFound must be a function"),s=function(){}),e.registerModule(r,o,{preserveState:n.preserveState}),!1===e.state.hasOwnProperty(r))return console.error("i18n: i18n vuex module is not correctly initialized. Please check the module name:",r),t.prototype.$i18n=function(t){return t},t.prototype.$getLanguage=function(){return null},void(t.prototype.$setLanguage=function(){console.error("i18n: i18n vuex module is not correctly initialized")});var f=u(i,n.warnings),l=function(){var t=e.state[r].locale;return p.apply(void 0,[t].concat(Array.prototype.slice.call(arguments)))},p=function(t){var o=arguments,i="",a="",c={},u=null,l=o.length;if(l>=3&&"string"===typeof o[2]?(i=o[1],a=o[2],l>3&&(c=o[3]),l>4&&(u=o[4])):(i=o[1],a=i,l>2&&(c=o[2]),l>3&&(u=o[3])),!t)return n.warnings&&console.warn("i18n: i18n locale is not set when trying to access translations:",i),a;var p=e.state[r].translations,d=e.state[r].fallback,h=t.split("-"),v=!0;if(!1===p.hasOwnProperty(t)?v=!1:!1===p[t].hasOwnProperty(i)&&(v=!1),!0===v)return f(t,p[t][i],c,u);if(h.length>1&&!0===p.hasOwnProperty(h[0])&&!0===p[h[0]].hasOwnProperty(i))return f(h[0],p[h[0]][i],c,u);var y=s(t,i,a);return y&&Promise.resolve(y).then(function(e){var n={};n[i]=e,b(t,n)}),!1===p.hasOwnProperty(d)?f(t,a,c,u):!1===p[d].hasOwnProperty(i)?f(d,a,c,u):f(t,p[d][i],c,u)},d=function(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o1&&void 0!==arguments[1]?arguments[1]:"fallback",o=e.state[r].locale,i=e.state[r].fallback,a=e.state[r].translations;if(a.hasOwnProperty(o)&&a[o].hasOwnProperty(t))return!0;if("strict"==n)return!1;var c=o.split("-");return!!(c.length>1&&a.hasOwnProperty(c[0])&&a[c[0]].hasOwnProperty(t))||"locale"!=n&&!(!a.hasOwnProperty(i)||!a[i].hasOwnProperty(t))},v=function(t){e.dispatch({type:"".concat(r,"/setFallbackLocale"),locale:t})},y=function(t){e.dispatch({type:"".concat(r,"/setLocale"),locale:t})},g=function(){return e.state[r].locale},m=function(){return Object.keys(e.state[r].translations)},b=function(t,n){return e.dispatch({type:"".concat(r,"/addLocale"),locale:t,translations:n})},_=function(t,n){return e.dispatch({type:"".concat(r,"/replaceLocale"),locale:t,translations:n})},w=function(t){e.state[r].translations.hasOwnProperty(t)&&e.dispatch({type:"".concat(r,"/removeLocale"),locale:t})},x=function(t){return n.warnings&&console.warn("i18n: $i18n.exists is depreceated. Please use $i18n.localeExists instead. It provides exactly the same functionality."),O(t)},O=function(t){return e.state[r].translations.hasOwnProperty(t)};t.prototype.$i18n={locale:g,locales:m,set:y,add:b,replace:_,remove:w,fallback:v,localeExists:O,keyExists:h,translate:l,translateIn:p,exists:x},t.i18n={locale:g,locales:m,set:y,add:b,replace:_,remove:w,fallback:v,translate:l,translateIn:p,localeExists:O,keyExists:h,exists:x},t.prototype.$t=l,t.prototype.$tlang=p,t.filter(a,l),t.filter(c,d)}},u=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];null!=t&&2==t.length||console.warn("i18n: You must specify the start and end character identifying variable substitutions");var n=new RegExp(t[0]+"{1}(\\w{1}|\\w.+?)"+t[1]+"{1}","g"),o=function(r,o){return r.replace?r.replace(n,function(n){var i=n.replace(t[0],"").replace(t[1],"");return void 0!==o[i]?o[i]:(e&&(console.group?console.group("i18n: Not all placeholders found"):console.warn("i18n: Not all placeholders found"),console.warn("Text:",r),console.warn("Placeholder:",n),console.groupEnd&&console.groupEnd()),n)}):r},i=function(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=r(n),u=r(a),l=function(){return f(n)?n.map(function(t){return o(t,i,!1)}):"string"===s?o(n,i,!0):void 0};if(null===a)return l();if("number"!==u)return e&&console.warn("i18n: pluralization is not a number"),l();var p=l(),d=null;d=f(p)&&p.length>0?p:p.split(":::");var h=c.getTranslationIndex(t,a);return"undefined"===typeof d[h]?(e&&console.warn("i18n: pluralization not provided in locale",n,t,h),d[0].trim()):d[h].trim()};return i};function f(t){return!!t&&Array===t.constructor}var l={store:o,plugin:s};e["a"]=l},f2fe:function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},f3e0:function(t,e,n){var r=n("0185"),o=n("7633");n("c165")("keys",function(){return function(t){return o(r(t))}})},f499:function(t,e,n){t.exports=n("1c01")},f559:function(t,e,n){"use strict";var r=n("5ca1"),o=n("9def"),i=n("d2c8"),a="startsWith",c=""[a];r(r.P+r.F*n("5147")(a),"String",{startsWith:function(t){var e=i(this,t,a),n=o(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return c?c.call(e,r,n):e.slice(n,n+r.length)===r}})},f568:function(t,e,n){var r=n("3adc"),o=n("0f89"),i=n("7633");t.exports=n("7d95")?Object.defineProperties:function(t,e){o(t);var n,a=i(e),c=a.length,s=0;while(c>s)r.f(t,n=a[s++],e[n]);return t}},f6d7:function(t,e,n){var r=n("0f4a"),o=n("58b9"),i=n("cc1d")(!1),a=n("be5a")("IE_PROTO");t.exports=function(t,e){var n,c=o(t),s=0,u=[];for(n in c)n!=a&&r(c,n)&&u.push(n);while(e.length>s)r(c,n=e[s++])&&(~i(u,n)||u.push(n));return u}},f845:function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},f906:function(t,e,n){!function(e,n){t.exports=n()}(0,function(){"use strict";var t,e=/(\[[^[]*\])|([-:\/.()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d\d/,r=/\d\d?/,o=/\d*[^\s\d-:\/.()]+/,i=function(t){return function(e){this[t]=+e}},a=[/[+-]\d\d:?\d\d/,function(t){var e,n;(this.zone||(this.zone={})).offset=(e=t.match(/([+-]|\d\d)/g),0===(n=60*e[1]+ +e[2])?0:"+"===e[0]?-n:n)}],c={A:[/[AP]M/,function(t){this.afternoon="PM"===t}],a:[/[ap]m/,function(t){this.afternoon="pm"===t}],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,i("seconds")],ss:[r,i("seconds")],m:[r,i("minutes")],mm:[r,i("minutes")],H:[r,i("hours")],h:[r,i("hours")],HH:[r,i("hours")],hh:[r,i("hours")],D:[r,i("day")],DD:[n,i("day")],Do:[o,function(e){var n=t.ordinal,r=e.match(/\d+/);if(this.day=r[0],n)for(var o=1;o<=31;o+=1)n(o).replace(/\[|\]/g,"")===e&&(this.day=o)}],M:[r,i("month")],MM:[n,i("month")],MMM:[o,function(e){var n=t,r=n.months,o=n.monthsShort,i=o?o.findIndex(function(t){return t===e}):r.findIndex(function(t){return t.substr(0,3)===e});if(i<0)throw new Error;this.month=i+1}],MMMM:[o,function(e){var n=t.months.indexOf(e);if(n<0)throw new Error;this.month=n+1}],Y:[/[+-]?\d+/,i("year")],YY:[n,function(t){t=+t,this.year=t+(t>68?1900:2e3)}],YYYY:[/\d{4}/,i("year")],Z:a,ZZ:a},s=function(t,n,r){try{var o=function(t){for(var n=t.match(e),r=n.length,o=0;o0?a-1:h.getMonth(),g=s||h.getDate(),m=u||0,b=f||0,_=l||0,w=p||0;return r?new Date(Date.UTC(v,y,g,m,b,_,w)):new Date(v,y,g,m,b,_,w)}catch(t){return new Date("")}};return function(e,n,r){var o=n.prototype,i=o.parse;o.parse=function(e){var n=e.date,o=e.format,a=e.pl,c=e.utc;this.$u=c,o?(t=a?r.Ls[a]:this.$locale(),this.$d=s(n,o,c),this.init(e)):i.call(this,e)}}})},fa2d:function(t,e,n){"use strict";var r=n("e6a1"),o=n("569f"),i=n("1f51"),a=n("a0a8"),c=n("a638"),s=n("eec7"),u=n("aab6"),f=n("c339"),l=n("b67f")("iterator"),p=!([].keys&&"next"in[].keys()),d="@@iterator",h="keys",v="values",y=function(){return this};t.exports=function(t,e,n,g,m,b,_){s(n,e,g);var w,x,O,S=function(t){if(!p&&t in k)return k[t];switch(t){case h:return function(){return new n(this,t)};case v:return function(){return new n(this,t)}}return function(){return new n(this,t)}},$=e+" Iterator",A=m==v,C=!1,k=t.prototype,E=k[l]||k[d]||m&&k[m],M=E||S(m),j=m?A?S("entries"):M:void 0,T="Array"==e&&k.entries||E;if(T&&(O=f(T.call(new t)),O!==Object.prototype&&O.next&&(u(O,$,!0),r||"function"==typeof O[l]||a(O,l,y))),A&&E&&E.name!==v&&(C=!0,M=function(){return E.call(this)}),r&&!_||!p&&!C&&k[l]||a(k,l,M),c[e]=M,c[$]=y,m)if(w={values:A?M:S(v),keys:b?M:S(h),entries:j},_)for(x in w)x in k||i(k,x,w[x]);else o(o.P+o.F*(p||C),e,w);return w}},fa54:function(t,e,n){"use strict";var r=n("b3e7"),o=n("245b"),i=n("b22a"),a=n("6a9b");t.exports=n("e4a9")(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},fab2:function(t,e,n){var r=n("7726").document;t.exports=r&&r.documentElement},fbf4:function(t,e,n){"use strict";function r(t){return null===t||void 0===t}function o(t){return null!==t&&void 0!==t}function i(t,e){return e.tag===t.tag&&e.key===t.key}function a(t){var e=t.tag;t.vm=new e({data:t.args})}function c(t){for(var e=Object.keys(t.args),n=0;nu?f(e,c,v):c>v&&l(t,n,u)}function f(t,e,n){for(;e<=n;++e)a(t[e])}function l(t,e,n){for(;e<=n;++e){var r=t[e];o(r)&&(r.vm.$destroy(),r.vm=null)}}function p(t,e){t!==e&&(e.vm=t.vm,c(e))}function d(t,e){o(t)&&o(e)?t!==e&&u(t,e):o(e)?f(e,0,e.length-1):o(t)&&l(t,0,t.length-1)}function h(t,e,n){return{tag:t,key:e,args:n}}Object.defineProperty(e,"__esModule",{value:!0}),e.patchChildren=d,e.h=h},fd6f:function(t,e,n){var r=n("d13f"),o=n("cff3")(!0);r(r.S,"Object",{entries:function(t){return o(t)}})},fda1:function(t,e,n){e.f=n("1b55")},fda6:function(t,e,n){n("f3e0"),t.exports=n("a7d3").Object.keys},fdef:function(t,e){t.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},ff0c:function(t,e,n){var r=n("43c8"),o=n("0185"),i=n("5d8f")("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}}}]); \ No newline at end of file diff --git a/kirby/src/Api/Api.php b/kirby/src/Api/Api.php index 7586a20..cc219e5 100755 --- a/kirby/src/Api/Api.php +++ b/kirby/src/Api/Api.php @@ -11,12 +11,19 @@ use Kirby\Http\Router; use Kirby\Http\Response; use Kirby\Toolkit\F; use Kirby\Toolkit\Properties; +use Kirby\Toolkit\Str; /** * The API class is a generic container * for API routes, models and collections and is used * to run our REST API. You can find our API setup - * in kirby/config/api.php + * in `kirby/config/api.php`. + * + * @package Kirby Api + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class Api { @@ -179,7 +186,9 @@ class Api * * @param string $name * @param array|null $collection - * @return Collection + * @return Kirby\Api\Collection + * + * @throws NotFoundException If no collection for `$name` exists */ public function collection(string $name, $collection = null) { @@ -207,6 +216,8 @@ class Api * @param string|null $key * @param mixed ...$args * @return mixed + * + * @throws NotFoundException If no data for `$key` exists */ public function data($key = null, ...$args) { @@ -252,7 +263,9 @@ class Api * * @param string $name * @param mixed $object - * @return Model + * @return Kirby\Api\Model + * + * @throws NotFoundException If no model for `$name` exists */ public function model(string $name, $object = null) { @@ -362,7 +375,9 @@ class Api * API model or collection representation * * @param mixed $object - * @return Model|Collection + * @return Kirby\Api\Model|Kirby\Api\Collection + * + * @throws NotFoundException If `$object` cannot be resolved */ public function resolve($object) { @@ -531,11 +546,17 @@ class Api 'route' => $this->route->pattern() ] + $e->toArray(); } else { + // remove the document root from the file path + $file = $e->getFile(); + if (empty($_SERVER['DOCUMENT_ROOT']) === false) { + $file = ltrim(Str::after($file, $_SERVER['DOCUMENT_ROOT']), '/'); + } + $result = [ 'status' => 'error', 'exception' => get_class($e), 'message' => $e->getMessage(), - 'file' => ltrim($e->getFile(), $_SERVER['DOCUMENT_ROOT'] ?? null), + 'file' => $file, 'line' => $e->getLine(), 'code' => empty($e->getCode()) === false ? $e->getCode() : 500, 'route' => $this->route ? $this->route->pattern() : null @@ -578,7 +599,8 @@ class Api unset( $result['file'], $result['exception'], - $result['line'] + $result['line'], + $result['route'] ); } @@ -602,6 +624,9 @@ class Api * @param Closure $callback * @param boolean $single * @return array + * + * @throws Exception If request has no files + * @throws Exception If there was an error with the upload */ public function upload(Closure $callback, $single = false): array { diff --git a/kirby/src/Api/Collection.php b/kirby/src/Api/Collection.php index 8ab61dd..fe40b8a 100755 --- a/kirby/src/Api/Collection.php +++ b/kirby/src/Api/Collection.php @@ -2,7 +2,6 @@ namespace Kirby\Api; -use Closure; use Exception; use Kirby\Toolkit\Str; @@ -11,6 +10,12 @@ use Kirby\Toolkit\Str; * around our Kirby Collections and handles * stuff like pagination and proper JSON output * for collections in REST calls. + * + * @package Kirby Api + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class Collection { diff --git a/kirby/src/Api/Model.php b/kirby/src/Api/Model.php index 17a9bf9..1eff4e5 100755 --- a/kirby/src/Api/Model.php +++ b/kirby/src/Api/Model.php @@ -2,7 +2,6 @@ namespace Kirby\Api; -use Closure; use Exception; use Kirby\Toolkit\Str; @@ -15,6 +14,11 @@ use Kirby\Toolkit\Str; * by GraphQLs architecture and makes it possible to load * only the model data that is needed for the current API call. * + * @package Kirby Api + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class Model { diff --git a/kirby/src/Cache/ApcuCache.php b/kirby/src/Cache/ApcuCache.php index f330bcf..f59540c 100755 --- a/kirby/src/Cache/ApcuCache.php +++ b/kirby/src/Cache/ApcuCache.php @@ -9,17 +9,17 @@ use APCUIterator; * * @package Kirby Cache * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier - * @license MIT + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class ApcuCache extends Cache { /** - * Checks if the current key exists in cache + * Determines if an item exists in the cache * - * @param string $key + * @param string $key * @return boolean */ public function exists(string $key): bool @@ -28,7 +28,8 @@ class ApcuCache extends Cache } /** - * Flush the entire cache directory + * Flushes the entire cache and returns + * whether the operation was successful * * @return boolean */ @@ -42,9 +43,10 @@ class ApcuCache extends Cache } /** - * Remove an item from the cache + * Removes an item from the cache and returns + * whether the operation was successful * - * @param string $key + * @param string $key * @return boolean */ public function remove(string $key): bool @@ -53,10 +55,11 @@ class ApcuCache extends Cache } /** - * Retrieve an item from the cache. + * Internal method to retrieve the raw cache value; + * needs to return a Value object or null if not found * - * @param string $key - * @return mixed + * @param string $key + * @return Kirby\Cache\Value|null */ public function retrieve(string $key) { @@ -64,20 +67,21 @@ class ApcuCache extends Cache } /** - * Write an item to the cache for a given number of minutes. + * Writes an item to the cache for a given number of minutes and + * returns whether the operation was successful * * - * // Put an item in the cache for 15 minutes - * Cache::set('value', 'my value', 15); + * // put an item in the cache for 15 minutes + * $cache->set('value', 'my value', 15); * * - * @param string $key - * @param mixed $value - * @param int $minutes - * @return void + * @param string $key + * @param mixed $value + * @param int $minutes + * @return boolean */ - public function set(string $key, $value, int $minutes = 0) + public function set(string $key, $value, int $minutes = 0): bool { - return apcu_store($this->key($key), $this->value($value, $minutes)->toJson(), $this->expiration($minutes)); + return apcu_store($this->key($key), (new Value($value, $minutes))->toJson(), $this->expiration($minutes)); } } diff --git a/kirby/src/Cache/Cache.php b/kirby/src/Cache/Cache.php index 4edfa7f..3761b65 100755 --- a/kirby/src/Cache/Cache.php +++ b/kirby/src/Cache/Cache.php @@ -4,28 +4,27 @@ namespace Kirby\Cache; /** * Cache foundation - * This class doesn't do anything - * and is perfect as foundation for - * other cache drivers and to be used - * when the cache is disabled + * This abstract class is used as + * foundation for other cache drivers + * by extending it * * @package Kirby Cache * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier - * @license MIT + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ -class Cache +abstract class Cache { /** - * stores all options for the driver + * Stores all options for the driver * @var array */ protected $options = []; /** - * Set all parameters which are needed to connect to the cache storage + * Sets all parameters which are needed to connect to the cache storage * * @param array $options */ @@ -35,27 +34,26 @@ class Cache } /** - * Write an item to the cache for a given number of minutes. + * Writes an item to the cache for a given number of minutes and + * returns whether the operation was successful; + * this needs to be defined by the driver * * - * // Put an item in the cache for 15 minutes - * Cache::set('value', 'my value', 15); + * // put an item in the cache for 15 minutes + * $cache->set('value', 'my value', 15); * * - * @param string $key - * @param mixed $value - * @param int $minutes - * @return void + * @param string $key + * @param mixed $value + * @param int $minutes + * @return boolean */ - public function set(string $key, $value, int $minutes = 0) - { - return null; - } + abstract public function set(string $key, $value, int $minutes = 0): bool; /** * Adds the prefix to the key if given * - * @param string $key + * @param string $key * @return string */ protected function key(string $key): string @@ -68,30 +66,28 @@ class Cache } /** - * Private method to retrieve the cache value - * This needs to be defined by the driver + * Internal method to retrieve the raw cache value; + * needs to return a Value object or null if not found; + * this needs to be defined by the driver * - * @param string $key - * @return mixed + * @param string $key + * @return Kirby\Cache\Value|null */ - public function retrieve(string $key) - { - return null; - } + abstract public function retrieve(string $key); /** - * Get an item from the cache. + * Gets an item from the cache * * - * // Get an item from the cache driver - * $value = Cache::get('value'); + * // get an item from the cache driver + * $value = $cache->get('value'); * - * // Return a default value if the requested item isn't cached - * $value = Cache::get('value', 'default value'); + * // return a default value if the requested item isn't cached + * $value = $cache->get('value', 'default value'); * * - * @param string $key - * @param mixed $default + * @param string $key + * @param mixed $default * @return mixed */ public function get(string $key, $default = null) @@ -100,34 +96,31 @@ class Cache $value = $this->retrieve($key); // check for a valid cache value - if (!is_a($value, 'Kirby\Cache\Value')) { + if (!is_a($value, Value::class)) { return $default; } // remove the item if it is expired - if (time() >= $value->expires()) { + if ($value->expires() > 0 && time() >= $value->expires()) { $this->remove($key); return $default; } - // get the pure value - $cache = $value->value(); - - // return the cache value or the default - return $cache ?? $default; + // return the pure value + return $value->value(); } /** * Calculates the expiration timestamp * - * @param int $minutes + * @param int $minutes * @return int */ protected function expiration(int $minutes = 0): int { - // keep forever if minutes are not defined + // 0 = keep forever if ($minutes === 0) { - $minutes = 2628000; + return 0; } // calculate the time @@ -135,10 +128,12 @@ class Cache } /** - * Checks when an item in the cache expires + * Checks when an item in the cache expires; + * returns the expiry timestamp on success, null if the + * item never expires and false if the item does not exist * - * @param string $key - * @return mixed + * @param string $key + * @return int|null|false */ public function expires(string $key) { @@ -146,7 +141,7 @@ class Cache $value = $this->retrieve($key); // check for a valid Value object - if (!is_a($value, 'Kirby\Cache\Value')) { + if (!is_a($value, Value::class)) { return false; } @@ -157,19 +152,29 @@ class Cache /** * Checks if an item in the cache is expired * - * @param string $key + * @param string $key * @return boolean */ public function expired(string $key): bool { - return $this->expires($key) <= time(); + $expires = $this->expires($key); + + if ($expires === null) { + return false; + } elseif (!is_int($expires)) { + return true; + } else { + return time() >= $expires; + } } /** - * Checks when the cache has been created + * Checks when the cache has been created; + * returns the creation timestamp on success + * and false if the item does not exist * - * @param string $key - * @return mixed + * @param string $key + * @return int|false */ public function created(string $key) { @@ -177,7 +182,7 @@ class Cache $value = $this->retrieve($key); // check for a valid Value object - if (!is_a($value, 'Kirby\Cache\Value')) { + if (!is_a($value, Value::class)) { return false; } @@ -188,8 +193,8 @@ class Cache /** * Alternate version for Cache::created($key) * - * @param string $key - * @return mixed + * @param string $key + * @return int|false */ public function modified(string $key) { @@ -197,48 +202,34 @@ class Cache } /** - * Returns Value object + * Determines if an item exists in the cache * - * @param mixed $value The value, which should be cached - * @param int $minutes The number of minutes before expiration - * @return Value - */ - protected function value($value, int $minutes): Value - { - return new Value($value, $minutes); - } - - /** - * Determine if an item exists in the cache. - * - * @param string $key + * @param string $key * @return boolean */ public function exists(string $key): bool { - return !$this->expired($key); + return $this->expired($key) === false; } /** - * Remove an item from the cache + * Removes an item from the cache and returns + * whether the operation was successful; + * this needs to be defined by the driver * - * @param string $key + * @param string $key * @return boolean */ - public function remove(string $key): bool - { - return true; - } + abstract public function remove(string $key): bool; /** - * Flush the entire cache + * Flushes the entire cache and returns + * whether the operation was successful; + * this needs to be defined by the driver * * @return boolean */ - public function flush(): bool - { - return true; - } + abstract public function flush(): bool; /** * Returns all passed cache options diff --git a/kirby/src/Cache/FileCache.php b/kirby/src/Cache/FileCache.php index ea8c79b..18a242e 100755 --- a/kirby/src/Cache/FileCache.php +++ b/kirby/src/Cache/FileCache.php @@ -2,7 +2,6 @@ namespace Kirby\Cache; -use Exception; use Kirby\Toolkit\Dir; use Kirby\Toolkit\F; @@ -11,80 +10,107 @@ use Kirby\Toolkit\F; * * @package Kirby Cache * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier - * @license MIT + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class FileCache extends Cache { /** - * Set all parameters which are needed for the file cache - * see defaults for available parameters - * - * @param array $params + * Full root including prefix + * @var string */ - public function __construct(array $params) + protected $root; + + /** + * Sets all parameters which are needed for the file cache + * + * @param array $options 'root' (required) + * 'prefix' (default: none) + * 'extension' (file extension for cache files, default: none) + */ + public function __construct(array $options) { $defaults = [ 'root' => null, + 'prefix' => null, 'extension' => null ]; - parent::__construct(array_merge($defaults, $params)); + parent::__construct(array_merge($defaults, $options)); + + // build the full root including prefix + $this->root = $this->options['root']; + if (empty($this->options['prefix']) === false) { + $this->root .= '/' . $this->options['prefix']; + } // try to create the directory - Dir::make($this->options['root'], true); + Dir::make($this->root, true); } /** * Returns the full path to a file for a given key * - * @param string $key + * @param string $key * @return string */ protected function file(string $key): string { - $extension = isset($this->options['extension']) ? '.' . $this->options['extension'] : ''; + $file = $this->root . '/' . $key; - return $this->options['root'] . '/' . $this->key($key) . $extension; + if (isset($this->options['extension'])) { + return $file . '.' . $this->options['extension']; + } else { + return $file; + } } /** - * Write an item to the cache for a given number of minutes. + * Writes an item to the cache for a given number of minutes and + * returns whether the operation was successful * * - * // Put an item in the cache for 15 minutes - * Cache::set('value', 'my value', 15); + * // put an item in the cache for 15 minutes + * $cache->set('value', 'my value', 15); * * - * @param string $key - * @param mixed $value - * @param int $minutes + * @param string $key + * @param mixed $value + * @param int $minutes + * @return boolean */ - public function set(string $key, $value, int $minutes = 0) + public function set(string $key, $value, int $minutes = 0): bool { - return F::write($this->file($key), $this->value($value, $minutes)->toJson()); + $file = $this->file($key); + + return F::write($file, (new Value($value, $minutes))->toJson()); } /** - * Retrieve an item from the cache. + * Internal method to retrieve the raw cache value; + * needs to return a Value object or null if not found * - * @param string $key - * @return mixed + * @param string $key + * @return Kirby\Cache\Value|null */ public function retrieve(string $key) { - return Value::fromJson(F::read($this->file($key))); + $file = $this->file($key); + + return Value::fromJson(F::read($file)); } /** - * Checks when the cache has been created + * Checks when the cache has been created; + * returns the creation timestamp on success + * and false if the item does not exist * * @param string $key - * @return int + * @return mixed */ - public function created(string $key): int + public function created(string $key) { // use the modification timestamp // as indicator when the cache has been created/overwritten @@ -92,37 +118,39 @@ class FileCache extends Cache // get the file for this cache key $file = $this->file($key); - return file_exists($file) ? filemtime($this->file($key)) : 0; + return file_exists($file) ? filemtime($this->file($key)) : false; } /** - * Remove an item from the cache + * Removes an item from the cache and returns + * whether the operation was successful * - * @param string $key + * @param string $key * @return boolean */ public function remove(string $key): bool { - return F::remove($this->file($key)); + $file = $this->file($key); + + if (is_file($file) === true) { + return F::remove($file); + } else { + return false; + } } /** - * Flush the entire cache directory + * Flushes the entire cache and returns + * whether the operation was successful * * @return boolean */ public function flush(): bool { - $root = $this->options['root']; - - if (empty($this->options['prefix']) === false) { - $root = $root . '/' . $this->options['prefix']; - } - - if (Dir::remove($root) === true && Dir::make($root) === true) { + if (Dir::remove($this->root) === true && Dir::make($this->root) === true) { return true; } - return false; + return false; // @codeCoverageIgnore } } diff --git a/kirby/src/Cache/MemCached.php b/kirby/src/Cache/MemCached.php index 356e22d..627761a 100755 --- a/kirby/src/Cache/MemCached.php +++ b/kirby/src/Cache/MemCached.php @@ -3,14 +3,14 @@ namespace Kirby\Cache; /** -* Memcached Driver -* -* @package Kirby Cache -* @author Bastian Allgeier -* @link http://getkirby.com -* @copyright Bastian Allgeier -* @license MIT -*/ + * Memcached Driver + * + * @package Kirby Cache + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT + */ class MemCached extends Cache { @@ -21,12 +21,13 @@ class MemCached extends Cache protected $connection; /** - * Set all parameters which are needed for the memcache client - * see defaults for available parameters + * Sets all parameters which are needed to connect to Memcached * - * @param array $params + * @param array $options 'host' (default: localhost) + * 'port' (default: 11211) + * 'prefix' (default: null) */ - public function __construct(array $params = []) + public function __construct(array $options = []) { $defaults = [ 'host' => 'localhost', @@ -34,47 +35,37 @@ class MemCached extends Cache 'prefix' => null, ]; - parent::__construct(array_merge($defaults, $params)); + parent::__construct(array_merge($defaults, $options)); $this->connection = new \Memcached(); $this->connection->addServer($this->options['host'], $this->options['port']); } /** - * Write an item to the cache for a given number of minutes. + * Writes an item to the cache for a given number of minutes and + * returns whether the operation was successful * * - * // Put an item in the cache for 15 minutes - * Cache::set('value', 'my value', 15); + * // put an item in the cache for 15 minutes + * $cache->set('value', 'my value', 15); * * - * @param string $key - * @param mixed $value - * @param int $minutes - * @return void + * @param string $key + * @param mixed $value + * @param int $minutes + * @return boolean */ - public function set(string $key, $value, int $minutes = 0) + public function set(string $key, $value, int $minutes = 0): bool { - return $this->connection->set($this->key($key), $this->value($value, $minutes)->toJson(), $this->expiration($minutes)); + return $this->connection->set($this->key($key), (new Value($value, $minutes))->toJson(), $this->expiration($minutes)); } /** - * Returns the full keyname - * including the prefix (if set) + * Internal method to retrieve the raw cache value; + * needs to return a Value object or null if not found * - * @param string $key - * @return string - */ - public function key(string $key): string - { - return $this->options['prefix'] . $key; - } - - /** - * Retrieve the CacheValue object from the cache. - * - * @param string $key - * @return object CacheValue + * @param string $key + * @return Kirby\Cache\Value|null */ public function retrieve(string $key) { @@ -82,9 +73,10 @@ class MemCached extends Cache } /** - * Remove an item from the cache + * Removes an item from the cache and returns + * whether the operation was successful * - * @param string $key + * @param string $key * @return boolean */ public function remove(string $key): bool @@ -93,40 +85,9 @@ class MemCached extends Cache } /** - * Checks when an item in the cache expires - * - * @param string $key - * @return int - */ - public function expires(string $key): int - { - return parent::expires($this->key($key)); - } - - /** - * Checks if an item in the cache is expired - * - * @param string $key - * @return boolean - */ - public function expired(string $key): bool - { - return parent::expired($this->key($key)); - } - - /** - * Checks when the cache has been created - * - * @param string $key - * @return int - */ - public function created(string $key): int - { - return parent::created($this->key($key)); - } - - /** - * Flush the entire cache directory + * Flushes the entire cache and returns + * whether the operation was successful; + * WARNING: Memcached only supports flushing the whole cache at once! * * @return boolean */ diff --git a/kirby/src/Cache/MemoryCache.php b/kirby/src/Cache/MemoryCache.php new file mode 100755 index 0000000..4446d78 --- /dev/null +++ b/kirby/src/Cache/MemoryCache.php @@ -0,0 +1,83 @@ + + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT + */ +class MemoryCache extends Cache +{ + + /** + * Cache data + * @var array + */ + protected $store = []; + + /** + * Writes an item to the cache for a given number of minutes and + * returns whether the operation was successful + * + * + * // put an item in the cache for 15 minutes + * $cache->set('value', 'my value', 15); + * + * + * @param string $key + * @param mixed $value + * @param int $minutes + * @return boolean + */ + public function set(string $key, $value, int $minutes = 0): bool + { + $this->store[$key] = new Value($value, $minutes); + return true; + } + + /** + * Internal method to retrieve the raw cache value; + * needs to return a Value object or null if not found + * + * @param string $key + * @return Kirby\Cache\Value|null + */ + public function retrieve(string $key) + { + return $this->store[$key] ?? null; + } + + /** + * Removes an item from the cache and returns + * whether the operation was successful + * + * @param string $key + * @return boolean + */ + public function remove(string $key): bool + { + if (isset($this->store[$key])) { + unset($this->store[$key]); + return true; + } else { + return false; + } + } + + /** + * Flushes the entire cache and returns + * whether the operation was successful + * + * @return boolean + */ + public function flush(): bool + { + $this->store = []; + return true; + } +} diff --git a/kirby/src/Cache/NullCache.php b/kirby/src/Cache/NullCache.php new file mode 100755 index 0000000..e2824e1 --- /dev/null +++ b/kirby/src/Cache/NullCache.php @@ -0,0 +1,70 @@ + + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT + */ +class NullCache extends Cache +{ + + /** + * Writes an item to the cache for a given number of minutes and + * returns whether the operation was successful + * + * + * // put an item in the cache for 15 minutes + * $cache->set('value', 'my value', 15); + * + * + * @param string $key + * @param mixed $value + * @param int $minutes + * @return boolean + */ + public function set(string $key, $value, int $minutes = 0): bool + { + return true; + } + + /** + * Internal method to retrieve the raw cache value; + * needs to return a Value object or null if not found + * + * @param string $key + * @return Kirby\Cache\Value|null + */ + public function retrieve(string $key) + { + return null; + } + + /** + * Removes an item from the cache and returns + * whether the operation was successful + * + * @param string $key + * @return boolean + */ + public function remove(string $key): bool + { + return true; + } + + /** + * Flushes the entire cache and returns + * whether the operation was successful + * + * @return boolean + */ + public function flush(): bool + { + return true; + } +} diff --git a/kirby/src/Cache/Value.php b/kirby/src/Cache/Value.php index 755fbdf..a5fc5b2 100755 --- a/kirby/src/Cache/Value.php +++ b/kirby/src/Cache/Value.php @@ -7,31 +7,31 @@ use Throwable; /** * Cache Value * Stores the value, creation timestamp and expiration timestamp - * and makes it possible to store all three with a single cache key. + * and makes it possible to store all three with a single cache key * * @package Kirby Cache * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier - * @license MIT + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Value { /** - * the cached value + * Cached value * @var mixed */ protected $value; /** - * the expiration timestamp + * the number of minutes until the value expires * @var int */ - protected $expires; + protected $minutes; /** - * the creation timestamp + * Creation timestamp * @var int */ protected $created; @@ -40,18 +40,13 @@ class Value * Constructor * * @param mixed $value - * @param int $minutes the number of minutes until the value expires - * @param int $created the unix timestamp when the value has been created + * @param int $minutes the number of minutes until the value expires + * @param int $created the unix timestamp when the value has been created */ - public function __construct($value, int $minutes = 0, $created = null) + public function __construct($value, int $minutes = 0, int $created = null) { - // keep forever if minutes are not defined - if ($minutes === 0) { - $minutes = 2628000; - } - $this->value = $value; - $this->minutes = $minutes; + $this->minutes = $minutes ?? 0; $this->created = $created ?? time(); } @@ -66,12 +61,18 @@ class Value } /** - * Returns the expiration date as UNIX timestamp + * Returns the expiration date as UNIX timestamp or + * null if the value never expires * - * @return int + * @return int|null */ - public function expires(): int + public function expires(): ?int { + // 0 = keep forever + if ($this->minutes === 0) { + return null; + } + return $this->created + ($this->minutes * 60); } @@ -79,32 +80,37 @@ class Value * Creates a value object from an array * * @param array $array - * @return array + * @return self */ - public static function fromArray(array $array): self + public static function fromArray(array $array) { return new static($array['value'] ?? null, $array['minutes'] ?? 0, $array['created'] ?? null); } /** - * Creates a value object from a json string + * Creates a value object from a JSON string; + * returns null on error * * @param string $json - * @return array + * @return self|null */ - public static function fromJson($json): self + public static function fromJson(string $json) { try { - $array = json_decode($json, true) ?? []; - } catch (Throwable $e) { - $array = []; - } + $array = json_decode($json, true); - return static::fromArray($array); + if (is_array($array)) { + return static::fromArray($array); + } else { + return null; + } + } catch (Throwable $e) { + return null; + } } /** - * Convert the object to a json string + * Converts the object to a JSON string * * @return string */ @@ -114,7 +120,7 @@ class Value } /** - * Convert the object to an array + * Converts the object to an array * * @return array */ @@ -128,7 +134,7 @@ class Value } /** - * Returns the value + * Returns the pure value * * @return mixed */ diff --git a/kirby/src/Cms/Api.php b/kirby/src/Cms/Api.php index 8b4d4ec..9f4caee 100755 --- a/kirby/src/Cms/Api.php +++ b/kirby/src/Cms/Api.php @@ -7,16 +7,37 @@ use Kirby\Exception\InvalidArgumentException; use Kirby\Exception\NotFoundException; use Kirby\Toolkit\Str; +/** + * Api + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ class Api extends BaseApi { + /** + * @var App + */ protected $kirby; + /** + * Execute an API call for the given path, + * request method and optional request data + * + * @param string $path + * @param string $method + * @param array $requestData + * @return mixed + */ public function call(string $path = null, string $method = 'GET', array $requestData = []) { $this->setRequestMethod($method); $this->setRequestData($requestData); - if ($languageCode = $this->requestHeaders('x-language')) { + if ($languageCode = $this->language()) { $this->kirby->setCurrentLanguage($languageCode); } @@ -27,6 +48,12 @@ class Api extends BaseApi return parent::call($path, $method, $requestData); } + /** + * @param mixed $model + * @param string $name + * @param string $path + * @return mixed + */ public function fieldApi($model, string $name, string $path = null) { $form = Form::for($model); @@ -59,6 +86,14 @@ class Api extends BaseApi return $fieldApi->call($path, $this->requestMethod(), $this->requestData()); } + /** + * Returns the file object for the given + * parent path and filename + * + * @param string $path Path to file's parent model + * @param string $filename Filename + * @return Kirby\Cms\File|null + */ public function file(string $path = null, string $filename) { $filename = urldecode($filename); @@ -75,12 +110,22 @@ class Api extends BaseApi ]); } + /** + * Returns the model's object for the given path + * + * @param string $path Path to parent model + * @return Kirby\Cms\Model|null + */ public function parent(string $path) { - $modelType = $path === 'site' ? 'site' : dirname($path); + $modelType = $path === 'site' ? 'site' : trim(dirname($path), '/'); $modelTypes = ['site' => 'site', 'users' => 'user', 'pages' => 'page']; $modelName = $modelTypes[$modelType] ?? null; + if (Str::endsWith($modelType, '/files') === true) { + $modelName = 'file'; + } + if ($modelName === null) { throw new InvalidArgumentException('Invalid file model type'); } @@ -91,7 +136,13 @@ class Api extends BaseApi $modelId = basename($path); if ($modelName === 'page') { - $modelId = str_replace('+', '/', $modelId); + $modelId = str_replace(['+', ' '], '/', $modelId); + } + + if ($modelName === 'file') { + if ($model = $this->file(...explode('/files/', $path))) { + return $model; + } } } @@ -104,16 +155,32 @@ class Api extends BaseApi ]); } + /** + * Returns the Kirby instance + * + * @return Kirby\Cms\App + */ public function kirby() { return $this->kirby; } - public function language() + /** + * Returns the language request header + * + * @return string|null + */ + public function language(): ?string { - return $this->requestHeaders('x-language'); + return get('language') ?? $this->requestHeaders('x-language'); } + /** + * Returns the page object for the given id + * + * @param string $id Page's id + * @return Kirby\Cms\Page|null + */ public function page(string $id) { $id = str_replace('+', '/', $id); @@ -138,17 +205,33 @@ class Api extends BaseApi ], $options)); } + /** + * @param Kirby\Cms\App $kirby + */ protected function setKirby(App $kirby) { $this->kirby = $kirby; return $this; } + /** + * Returns the site object + * + * @return Kirby\Cms\Site + */ public function site() { return $this->kirby->site(); } + /** + * Returns the user object for the given id or + * returns the current authenticated user if no + * id is passed + * + * @param string $id User's id + * @return Kirby\Cms\User|null + */ public function user(string $id = null) { // get the authenticated user @@ -169,6 +252,11 @@ class Api extends BaseApi ]); } + /** + * Returns the users collection + * + * @return Kirby\Cms\Users + */ public function users() { return $this->kirby->users(); diff --git a/kirby/src/Cms/App.php b/kirby/src/Cms/App.php index 5b0a301..4026cd4 100755 --- a/kirby/src/Cms/App.php +++ b/kirby/src/Cms/App.php @@ -2,22 +2,15 @@ namespace Kirby\Cms; -use Closure; -use Exception; -use Throwable; use Kirby\Data\Data; use Kirby\Email\PHPMailer as Emailer; use Kirby\Exception\InvalidArgumentException; -use Kirby\Exception\LogicException; use Kirby\Exception\NotFoundException; -use Kirby\Form\Field; -use Kirby\Http\Route; use Kirby\Http\Router; use Kirby\Http\Request; use Kirby\Http\Server; use Kirby\Http\Visitor; -use Kirby\Image\Darkroom; -use Kirby\Session\AutoSession as Session; +use Kirby\Session\AutoSession; use Kirby\Text\KirbyTag; use Kirby\Toolkit\A; use Kirby\Toolkit\Config; @@ -25,8 +18,6 @@ use Kirby\Toolkit\Controller; use Kirby\Toolkit\F; use Kirby\Toolkit\Dir; use Kirby\Toolkit\Properties; -use Kirby\Toolkit\Str; -use Kirby\Toolkit\Url; /** * The `$kirby` object is the app instance of @@ -37,8 +28,9 @@ use Kirby\Toolkit\Url; * * @package Kirby Cms * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class App { @@ -62,6 +54,7 @@ class App protected $defaultLanguage; protected $language; protected $languages; + protected $locks; protected $multilang; protected $options; protected $path; @@ -135,7 +128,7 @@ class App } /** - * Improved var_dump output + * Improved `var_dump` output * * @return array */ @@ -156,9 +149,9 @@ class App * Returns the Api instance * * @internal - * @return Api + * @return Kirby\Cms\Api */ - public function api(): Api + public function api() { if ($this->api !== null) { return $this->api; @@ -182,19 +175,33 @@ class App } /** - * Apply a hook to the given value + * Applies a hook to the given value; + * the value that gets modified by the hooks + * is always the last argument * * @internal - * @param string $name - * @param mixed $value - * @return mixed + * @param string $name Hook name + * @param mixed $args Arguments to pass to the hooks + * @return mixed Resulting value as modified by the hooks */ - public function apply(string $name, $value) + public function apply(string $name, ...$args) { + // split up args into "passive" args and the value + $value = array_pop($args); + if ($functions = $this->extension('hooks', $name)) { foreach ($functions as $function) { + // re-assemble args + $hookArgs = $args; + $hookArgs[] = $value; + // bind the App object to the hook - $value = $function->call($this, $value); + $newValue = $function->call($this, ...$hookArgs); + + // update value if one was returned + if ($newValue !== null) { + $value = $newValue; + } } } @@ -238,7 +245,7 @@ class App * @param string $type * @return array */ - public function blueprints(string $type = 'pages') + public function blueprints(string $type = 'pages'): array { $blueprints = []; @@ -262,6 +269,8 @@ class App /** * Calls any Kirby route * + * @param string $path + * @param string $method * @return mixed */ public function call(string $path = null, string $method = null) @@ -273,7 +282,7 @@ class App }; $router::$afterEach = function ($route, $path, $method, $result) { - $this->trigger('route:after', $route, $path, $method, $result); + return $this->apply('route:after', $route, $path, $method, $result); }; return $router->call($path ?? $this->path(), $method ?? $this->request()->method()); @@ -300,9 +309,9 @@ class App /** * Returns all user-defined collections * - * @return Collections + * @return Kirby\Cms\Collections */ - public function collections(): Collections + public function collections() { return $this->collections = $this->collections ?? new Collections; } @@ -379,9 +388,9 @@ class App * Try to find a controller by name * * @param string $name - * @return Closure|null + * @return Kirby\Toolkit\Controller|null */ - protected function controllerLookup(string $name, string $contentType = 'html'): ?Controller + protected function controllerLookup(string $name, string $contentType = 'html') { if ($contentType !== null && $contentType !== 'html') { $name .= '.' . $contentType; @@ -403,9 +412,9 @@ class App /** * Returns the default language object * - * @return Language|null + * @return Kirby\Cms\Language|null */ - public function defaultLanguage(): ?Language + public function defaultLanguage() { return $this->defaultLanguage = $this->defaultLanguage ?? $this->languages()->default(); } @@ -416,7 +425,7 @@ class App * * @internal */ - public static function destroy() + public static function destroy(): void { static::$plugins = []; static::$instance = null; @@ -425,7 +434,7 @@ class App /** * Detect the prefered language from the visitor object * - * @return Language + * @return Kirby\Cms\Language */ public function detectedLanguage() { @@ -450,9 +459,9 @@ class App /** * Returns the Email singleton * - * @return Email + * @return Kirby\Email\PHPMailer */ - public function email($preset = [], array $props = []): Emailer + public function email($preset = [], array $props = []) { return new Emailer((new Email($preset, $props))->toArray(), $props['debug'] ?? false); } @@ -462,7 +471,7 @@ class App * * @param string $path * @param boolean $drafts - * @return File|null + * @return Kirby\Cms\File|null */ public function file(string $path, $parent = null, bool $drafts = true) { @@ -502,10 +511,10 @@ class App /** * Returns the current App instance * - * @param self $instance + * @param Kirby\Cms\App $instance * @return self */ - public static function instance(self $instance = null): self + public static function instance(self $instance = null) { if ($instance === null) { return static::$instance ?? new static; @@ -520,7 +529,7 @@ class App * * @internal * @param mixed $input - * @return Response + * @return Kirby\Http\Response */ public function io($input) { @@ -664,9 +673,9 @@ class App * Returns the current language * * @param string|null $code - * @return Language|null + * @return Kirby\Cms\Language|null */ - public function language(string $code = null): ?Language + public function language(string $code = null) { if ($this->multilang() === false) { return null; @@ -701,9 +710,9 @@ class App /** * Returns all available site languages * - * @return Languages + * @return Kirby\Cms\Languages */ - public function languages(): Languages + public function languages() { if ($this->languages !== null) { return clone $this->languages; @@ -712,6 +721,20 @@ class App return $this->languages = Languages::load(); } + /** + * Returns the app's locks object + * + * @return Kirby\Cms\ContentLocks + */ + public function locks(): ContentLocks + { + if ($this->locks !== null) { + return $this->locks; + } + + return $this->locks = new ContentLocks; + } + /** * Parses Markdown * @@ -766,7 +789,7 @@ class App * * @return array */ - protected function optionsFromProps(array $options = []) + protected function optionsFromProps(array $options = []): array { return $this->options = array_replace_recursive($this->options, $options); } @@ -796,9 +819,9 @@ class App * Returns any page from the content folder * * @param string $id - * @param Page|null $parent + * @param Kirby\Cms\Page|Kirby\Cms\Site|null $parent * @param bool $drafts - * @return Page|null + * @return Kirby\Cms\Page|null */ public function page(string $id, $parent = null, bool $drafts = true) { @@ -820,7 +843,7 @@ class App * * @return string */ - public function path() + public function path(): string { if (is_string($this->path) === true) { return $this->path; @@ -840,7 +863,7 @@ class App * Returns the Response object for the * current request * - * @return Response + * @return Kirby\Http\Response */ public function render(string $path = null, string $method = null) { @@ -850,9 +873,9 @@ class App /** * Returns the Request singleton * - * @return Request + * @return Kirby\Http\Request */ - public function request(): Request + public function request() { return $this->request = $this->request ?? new Request; } @@ -931,7 +954,7 @@ class App /** * Response configuration * - * @return Responder + * @return Kirby\Cms\Responder */ public function response() { @@ -941,9 +964,9 @@ class App /** * Returns all user roles * - * @return Roles + * @return Kirby\Cms\Roles */ - public function roles(): Roles + public function roles() { return $this->roles = $this->roles ?? Roles::load($this->root('roles')); } @@ -954,7 +977,7 @@ class App * @param string $type * @return string */ - public function root($type = 'index'): string + public function root(string $type = 'index'): string { return $this->roots->__get($type); } @@ -962,9 +985,9 @@ class App /** * Returns the directory structure * - * @return Ingredients + * @return Kirby\Cms\Ingredients */ - public function roots(): Ingredients + public function roots() { return $this->roots; } @@ -972,7 +995,7 @@ class App /** * Returns the currently active route * - * @return Route|null + * @return Kirby\Http\Route|null */ public function route() { @@ -983,11 +1006,21 @@ class App * Returns the Router singleton * * @internal - * @return Router + * @return Kirby\Http\Router */ - public function router(): Router + public function router() { - return $this->router = $this->router ?? new Router($this->routes()); + $routes = $this->routes(); + + if ($this->multilang() === true) { + foreach ($routes as $index => $route) { + if (empty($route['language']) === false) { + unset($routes[$index]); + } + } + } + + return $this->router = $this->router ?? new Router($routes); } /** @@ -1004,19 +1037,20 @@ class App $registry = $this->extensions('routes'); $system = (include static::$root . '/config/routes.php')($this); + $routes = array_merge($system['before'], $registry, $system['after']); - return $this->routes = array_merge($system['before'], $registry, $system['after']); + return $this->routes = $routes; } /** * Returns the current session object * * @param array $options Additional options, see the session component - * @return Session + * @return Kirby\Session\Session */ public function session(array $options = []) { - $this->session = $this->session ?? new Session($this->root('sessions'), $this->options['session'] ?? []); + $this->session = $this->session ?? new AutoSession($this->root('sessions'), $this->options['session'] ?? []); return $this->session->get($options); } @@ -1026,7 +1060,7 @@ class App * @param array $languages * @return self */ - protected function setLanguages(array $languages = null): self + protected function setLanguages(array $languages = null) { if ($languages !== null) { $this->languages = new Languages(); @@ -1053,7 +1087,13 @@ class App return $this; } - protected function setRequest(array $request = null): self + /** + * Sets the request + * + * @param array $request + * @return self + */ + protected function setRequest(array $request = null) { if ($request !== null) { $this->request = new Request($request); @@ -1068,7 +1108,7 @@ class App * @param array $roles * @return self */ - protected function setRoles(array $roles = null): self + protected function setRoles(array $roles = null) { if ($roles !== null) { $this->roles = Roles::factory($roles, [ @@ -1082,7 +1122,7 @@ class App /** * Sets a custom Site object * - * @param array|Site $site + * @param Kirby\Cms\Site|array $site * @return self */ protected function setSite($site = null) @@ -1100,9 +1140,9 @@ class App /** * Returns the Server object * - * @return Server + * @return Kirby\Http\Server */ - public function server(): Server + public function server() { return $this->server = $this->server ?? new Server; } @@ -1110,9 +1150,9 @@ class App /** * Initializes and returns the Site object * - * @return Site + * @return Kirby\Cms\Site */ - public function site(): Site + public function site() { return $this->site = $this->site ?? new Site([ 'errorPageId' => $this->options['error'] ?? 'error', @@ -1145,9 +1185,9 @@ class App * and return a template snippet * * @internal - * @return Snippet + * @return string */ - public function snippet(string $name, array $data = []): ?string + public function snippet($name, array $data = []): ?string { return $this->component('snippet')($this, $name, array_merge($this->data, $data)); } @@ -1155,9 +1195,9 @@ class App /** * System check class * - * @return System + * @return Kirby\Cms\System */ - public function system(): System + public function system() { return $this->system = $this->system ?? new System($this); } @@ -1167,9 +1207,9 @@ class App * and return the Template object * * @internal - * @return Template + * @return Kirby\Cms\Template */ - public function template(string $name, string $type = 'html', string $defaultType = 'html'): Template + public function template(string $name, string $type = 'html', string $defaultType = 'html') { return $this->component('template')($this, $name, $type, $defaultType); } @@ -1228,7 +1268,7 @@ class App * @param string $type * @return string */ - public function url($type = 'index'): string + public function url(string $type = 'index'): string { return $this->urls->__get($type); } @@ -1236,9 +1276,9 @@ class App /** * Returns the url structure * - * @return Ingredients + * @return Kirby\Cms\Ingredients */ - public function urls(): Ingredients + public function urls() { return $this->urls; } @@ -1249,7 +1289,7 @@ class App * * @return string|null */ - public static function version() + public static function version(): ?string { return static::$version = static::$version ?? Data::read(static::$root . '/composer.json')['version'] ?? null; } @@ -1267,9 +1307,9 @@ class App /** * Returns the visitor object * - * @return Visitor + * @return Kirby\Cms\Visitor */ - public function visitor(): Visitor + public function visitor() { return $this->visitor = $this->visitor ?? new Visitor(); } diff --git a/kirby/src/Cms/AppCaches.php b/kirby/src/Cms/AppCaches.php index 4dfb857..cd827e3 100755 --- a/kirby/src/Cms/AppCaches.php +++ b/kirby/src/Cms/AppCaches.php @@ -3,8 +3,18 @@ namespace Kirby\Cms; use Kirby\Cache\Cache; +use Kirby\Cache\NullCache; use Kirby\Exception\InvalidArgumentException; +/** + * AppCaches + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ trait AppCaches { protected $caches = []; @@ -13,7 +23,7 @@ trait AppCaches * Returns a cache instance by key * * @param string $key - * @return Cache + * @return Kirby\Cache\Cache */ public function cache(string $key) { @@ -25,7 +35,8 @@ trait AppCaches $options = $this->cacheOptions($key); if ($options['active'] === false) { - return $this->caches[$key] = new Cache; + // use a dummy cache that does nothing + return $this->caches[$key] = new NullCache; } $type = strtolower($options['type']); @@ -41,7 +52,17 @@ trait AppCaches $className = $types[$type]; // initialize the cache class - return $this->caches[$key] = new $className($options); + $cache = new $className($options); + + // check if it is a useable cache object + if (is_a($cache, Cache::class) !== true) { + throw new InvalidArgumentException([ + 'key' => 'app.invalid.cacheType', + 'data' => ['type' => $type] + ]); + } + + return $this->caches[$key] = $cache; } /** @@ -60,11 +81,16 @@ trait AppCaches ]; } + $prefix = str_replace('/', '_', $this->system()->indexUrl()) . + '/' . + str_replace('.', '/', $key); + $defaults = [ 'active' => true, 'type' => 'file', 'extension' => 'cache', - 'root' => $this->root('cache') . '/' . str_replace('.', '/', $key) + 'root' => $this->root('cache'), + 'prefix' => $prefix ]; if ($options === true) { @@ -103,7 +129,7 @@ trait AppCaches $cacheName = implode('.', array_slice($parts, 2)); // check if such a plugin exists - if ($plugin = $this->plugin($pluginName)) { + if ($this->plugin($pluginName)) { return empty($cacheName) === true ? $pluginPrefix . '.cache' : $pluginPrefix . '.cache.' . $cacheName; } diff --git a/kirby/src/Cms/AppErrors.php b/kirby/src/Cms/AppErrors.php index bb75d30..745fdc9 100755 --- a/kirby/src/Cms/AppErrors.php +++ b/kirby/src/Cms/AppErrors.php @@ -2,8 +2,6 @@ namespace Kirby\Cms; -use Closure; -use Kirby\Exception\Exception; use Kirby\Http\Response; use Whoops\Run as Whoops; use Whoops\Handler\Handler; @@ -11,9 +9,18 @@ use Whoops\Handler\PrettyPageHandler; use Whoops\Handler\PlainTextHandler; use Whoops\Handler\CallbackHandler; +/** + * AppErrors + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ trait AppErrors { - protected function handleCliErrors() + protected function handleCliErrors(): void { $whoops = new Whoops; $whoops->pushHandler(new PlainTextHandler); diff --git a/kirby/src/Cms/AppPlugins.php b/kirby/src/Cms/AppPlugins.php index b5b449c..5848c57 100755 --- a/kirby/src/Cms/AppPlugins.php +++ b/kirby/src/Cms/AppPlugins.php @@ -4,7 +4,6 @@ namespace Kirby\Cms; use Closure; use Kirby\Exception\DuplicateException; -use Kirby\Exception\InvalidArgumentException; use Kirby\Form\Field as FormField; use Kirby\Text\KirbyTag; use Kirby\Toolkit\A; @@ -13,6 +12,15 @@ use Kirby\Toolkit\Dir; use Kirby\Toolkit\F; use Kirby\Toolkit\V; +/** + * AppPlugins + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ trait AppPlugins { @@ -29,6 +37,10 @@ trait AppPlugins * @var array */ protected $extensions = [ + // load options first to make them available for the rest + 'options' => [], + + // other plugin types 'api' => [], 'blueprints' => [], 'cacheTypes' => [], @@ -39,13 +51,13 @@ trait AppPlugins 'fieldMethods' => [], 'fileMethods' => [], 'filesMethods' => [], + 'fileModels' => [], 'fields' => [], 'hooks' => [], - 'options' => [], 'pages' => [], 'pageMethods' => [], - 'pageModels' => [], 'pagesMethods' => [], + 'pageModels' => [], 'routes' => [], 'sections' => [], 'siteMethods' => [], @@ -53,6 +65,9 @@ trait AppPlugins 'tags' => [], 'templates' => [], 'translations' => [], + 'userMethods' => [], + 'userModels' => [], + 'usersMethods' => [], 'validators' => [] ]; @@ -69,7 +84,7 @@ trait AppPlugins * * @internal * @param array $extensions - * @param Plugin $plugin The plugin which defined those extensions + * @param Kirby\Cms\Plugin $plugin The plugin which defined those extensions * @return array */ public function extend(array $extensions, Plugin $plugin = null): array @@ -83,6 +98,12 @@ trait AppPlugins return $this->extensions; } + /** + * Registers API extensions + * + * @param array|bool $api + * @return array + */ protected function extendApi($api): array { if (is_array($api) === true) { @@ -96,56 +117,133 @@ trait AppPlugins } } + /** + * Registers additional blueprints + * + * @param array $blueprints + * @return array + */ protected function extendBlueprints(array $blueprints): array { return $this->extensions['blueprints'] = array_merge($this->extensions['blueprints'], $blueprints); } + /** + * Registers additional cache types + * + * @param array $cacheTypes + * @return array + */ protected function extendCacheTypes(array $cacheTypes): array { return $this->extensions['cacheTypes'] = array_merge($this->extensions['cacheTypes'], $cacheTypes); } + /** + * Registers additional collection filters + * + * @param array $filters + * @return array + */ protected function extendCollectionFilters(array $filters): array { return $this->extensions['collectionFilters'] = Collection::$filters = array_merge(Collection::$filters, $filters); } + /** + * Registers additional collections + * + * @param array $collections + * @return array + */ protected function extendCollections(array $collections): array { return $this->extensions['collections'] = array_merge($this->extensions['collections'], $collections); } + /** + * Registers core components + * + * @param array $components + * @return array + */ protected function extendComponents(array $components): array { return $this->extensions['components'] = array_merge($this->extensions['components'], $components); } + /** + * Registers additional controllers + * + * @param array $controllers + * @return array + */ protected function extendControllers(array $controllers): array { return $this->extensions['controllers'] = array_merge($this->extensions['controllers'], $controllers); } + /** + * Registers additional file methods + * + * @param array $methods + * @return array + */ protected function extendFileMethods(array $methods): array { return $this->extensions['fileMethods'] = File::$methods = array_merge(File::$methods, $methods); } + /** + * Registers additional files methods + * + * @param array $methods + * @return array + */ protected function extendFilesMethods(array $methods): array { return $this->extensions['filesMethods'] = Files::$methods = array_merge(Files::$methods, $methods); } + /** + * Registers additional file models + * + * @param array $models + * @return array + */ + protected function extendFileModels(array $models): array + { + return $this->extensions['fileModels'] = File::$models = array_merge(File::$models, $models); + } + + /** + * Registers additional field methods + * + * @param array $methods + * @return array + */ protected function extendFieldMethods(array $methods): array { return $this->extensions['fieldMethods'] = Field::$methods = array_merge(Field::$methods, array_change_key_case($methods)); } + /** + * Registers Panel fields + * + * @param array $fields + * @return array + */ protected function extendFields(array $fields): array { return $this->extensions['fields'] = FormField::$types = array_merge(FormField::$types, $fields); } + /** + * Registers hooks + * + * @param array $hooks + * @return array + */ protected function extendHooks(array $hooks): array { foreach ($hooks as $name => $callbacks) { @@ -165,11 +263,24 @@ trait AppPlugins return $this->extensions['hooks']; } - protected function extendMarkdown(Closure $markdown): array + /** + * Registers markdown component + * + * @param Closure $blueprints + * @return Closure + */ + protected function extendMarkdown(Closure $markdown) { return $this->extensions['markdown'] = $markdown; } + /** + * Registers additional options + * + * @param array $options + * @param Kirby\Cms\Plugin|null $plugin + * @return array + */ protected function extendOptions(array $options, Plugin $plugin = null): array { if ($plugin !== null) { @@ -185,21 +296,45 @@ trait AppPlugins return $this->extensions['options'] = $this->options = A::merge($options, $this->options, A::MERGE_REPLACE); } + /** + * Registers additional page methods + * + * @param array $methods + * @return array + */ protected function extendPageMethods(array $methods): array { return $this->extensions['pageMethods'] = Page::$methods = array_merge(Page::$methods, $methods); } + /** + * Registers additional pages methods + * + * @param array $methods + * @return array + */ protected function extendPagesMethods(array $methods): array { return $this->extensions['pagesMethods'] = Pages::$methods = array_merge(Pages::$methods, $methods); } + /** + * Registers additional page models + * + * @param array $models + * @return array + */ protected function extendPageModels(array $models): array { return $this->extensions['pageModels'] = Page::$models = array_merge(Page::$models, $models); } + /** + * Registers pages + * + * @param array $pages + * @return array + */ protected function extendPages(array $pages): array { return $this->extensions['pages'] = array_merge($this->extensions['pages'], $pages); @@ -220,41 +355,122 @@ trait AppPlugins return $this->extensions['routes'] = array_merge($this->extensions['routes'], $routes); } + /** + * Registers Panel sections + * + * @param array $sections + * @return array + */ protected function extendSections(array $sections): array { return $this->extensions['sections'] = Section::$types = array_merge(Section::$types, $sections); } + /** + * Registers additional site methods + * + * @param array $methods + * @return array + */ protected function extendSiteMethods(array $methods): array { return $this->extensions['siteMethods'] = Site::$methods = array_merge(Site::$methods, $methods); } - protected function extendSmartypants(Closure $smartypants): array + /** + * Registers SmartyPants component + * + * @param Closure $smartypants + * @return Closure + */ + protected function extendSmartypants(Closure $smartypants) { return $this->extensions['smartypants'] = $smartypants; } + /** + * Registers additional snippets + * + * @param array $snippets + * @return array + */ protected function extendSnippets(array $snippets): array { return $this->extensions['snippets'] = array_merge($this->extensions['snippets'], $snippets); } + /** + * Registers additional KirbyTags + * + * @param array $tags + * @return array + */ protected function extendTags(array $tags): array { - return $this->extensions['tags'] = KirbyTag::$types = array_merge(KirbyTag::$types, $tags); + return $this->extensions['tags'] = KirbyTag::$types = array_merge(KirbyTag::$types, array_change_key_case($tags)); } + /** + * Registers additional templates + * + * @param array $templates + * @return array + */ protected function extendTemplates(array $templates): array { return $this->extensions['templates'] = array_merge($this->extensions['templates'], $templates); } + /** + * Registers translations + * + * @param array $translations + * @return array + */ protected function extendTranslations(array $translations): array { return $this->extensions['translations'] = array_replace_recursive($this->extensions['translations'], $translations); } + /** + * Registers additional user methods + * + * @param array $methods + * @return array + */ + protected function extendUserMethods(array $methods): array + { + return $this->extensions['userMethods'] = User::$methods = array_merge(User::$methods, $methods); + } + + /** + * Registers additional user models + * + * @param array $models + * @return array + */ + protected function extendUserModels(array $models): array + { + return $this->extensions['userModels'] = User::$models = array_merge(User::$models, $models); + } + + /** + * Registers additional users methods + * + * @param array $methods + * @return array + */ + protected function extendUsersMethods(array $methods): array + { + return $this->extensions['usersMethods'] = Users::$methods = array_merge(Users::$methods, $methods); + } + + /** + * Registers additional custom validators + * + * @param array $validators + * @return array + */ protected function extendValidators(array $validators): array { return $this->extensions['validators'] = V::$validators = array_merge(V::$validators, $validators); @@ -367,8 +583,13 @@ trait AppPlugins protected function extensionsFromSystem() { // Form Field Mixins - FormField::$mixins['min'] = include static::$root . '/config/fields/mixins/min.php'; - FormField::$mixins['options'] = include static::$root . '/config/fields/mixins/options.php'; + FormField::$mixins['filepicker'] = include static::$root . '/config/fields/mixins/filepicker.php'; + FormField::$mixins['min'] = include static::$root . '/config/fields/mixins/min.php'; + FormField::$mixins['options'] = include static::$root . '/config/fields/mixins/options.php'; + FormField::$mixins['pagepicker'] = include static::$root . '/config/fields/mixins/pagepicker.php'; + FormField::$mixins['picker'] = include static::$root . '/config/fields/mixins/picker.php'; + FormField::$mixins['upload'] = include static::$root . '/config/fields/mixins/upload.php'; + FormField::$mixins['userpicker'] = include static::$root . '/config/fields/mixins/userpicker.php'; // Tag Aliases KirbyTag::$aliases = [ @@ -398,6 +619,7 @@ trait AppPlugins 'apcu' => 'Kirby\Cache\ApcuCache', 'file' => 'Kirby\Cache\FileCache', 'memcached' => 'Kirby\Cache\MemCached', + 'memory' => 'Kirby\Cache\MemoryCache', ]); $this->extendComponents(include static::$root . '/config/components.php'); @@ -433,7 +655,7 @@ trait AppPlugins * * @param string $name * @param array|null $extends If null is passed it will be used as getter. Otherwise as factory. - * @return Plugin|null + * @return Kirby\Cms\Plugin|null */ public static function plugin(string $name, array $extends = null) { diff --git a/kirby/src/Cms/AppTranslations.php b/kirby/src/Cms/AppTranslations.php index f247d68..d34440c 100755 --- a/kirby/src/Cms/AppTranslations.php +++ b/kirby/src/Cms/AppTranslations.php @@ -2,8 +2,20 @@ namespace Kirby\Cms; +use Kirby\Data\Data; +use Kirby\Toolkit\F; use Kirby\Toolkit\I18n; +use Kirby\Toolkit\Str; +/** + * AppTranslations + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ trait AppTranslations { protected $translations; @@ -13,9 +25,9 @@ trait AppTranslations * * @return void */ - protected function i18n() + protected function i18n(): void { - I18n::$load = function ($locale) { + I18n::$load = function ($locale): array { $data = []; if ($translation = $this->translation($locale)) { @@ -25,12 +37,16 @@ trait AppTranslations // inject translations from the current language if ($this->multilang() === true && $language = $this->languages()->find($locale)) { $data = array_merge($data, $language->translations()); + + // Add language slug rules to Str class + Str::$language = $language->rules(); } + return $data; }; - I18n::$locale = function () { + I18n::$locale = function (): string { if ($this->multilang() === true) { return $this->defaultLanguage()->code(); } else { @@ -38,7 +54,7 @@ trait AppTranslations } }; - I18n::$fallback = function () { + I18n::$fallback = function (): string { if ($this->multilang() === true) { return $this->defaultLanguage()->code(); } else { @@ -47,6 +63,20 @@ trait AppTranslations }; I18n::$translations = []; + + if (isset($this->options['slugs']) === true) { + $file = $this->root('i18n:rules') . '/' . $this->options['slugs'] . '.json'; + + if (F::exists($file) === true) { + try { + $data = Data::read($file); + } catch (\Exception $e) { + $data = []; + } + + Str::$language = $data; + } + } } /** @@ -55,7 +85,7 @@ trait AppTranslations * * @internal * @param string $languageCode - * @return Language|null + * @return Kirby\Cms\Language|null */ public function setCurrentLanguage(string $languageCode = null) { @@ -84,7 +114,7 @@ trait AppTranslations * @param string $translationCode * @return void */ - public function setCurrentTranslation(string $translationCode = null) + public function setCurrentTranslation(string $translationCode = null): void { I18n::$locale = $translationCode ?? 'en'; } @@ -95,7 +125,7 @@ trait AppTranslations * @internal * @param string|array $locale */ - public function setLocale($locale) + public function setLocale($locale): void { if (is_array($locale) === true) { foreach ($locale as $key => $value) { @@ -110,7 +140,7 @@ trait AppTranslations * Load a specific translation by locale * * @param string|null $locale - * @return Translation|null + * @return Kirby\Cms\Translation|null */ public function translation(string $locale = null) { @@ -134,7 +164,7 @@ trait AppTranslations /** * Returns all available translations * - * @return Translations + * @return Kirby\Cms\Translations */ public function translations() { diff --git a/kirby/src/Cms/AppUsers.php b/kirby/src/Cms/AppUsers.php index 16940d7..1acf639 100755 --- a/kirby/src/Cms/AppUsers.php +++ b/kirby/src/Cms/AppUsers.php @@ -2,6 +2,15 @@ namespace Kirby\Cms; +/** + * AppUsers + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ trait AppUsers { @@ -16,7 +25,7 @@ trait AppUsers * Returns the Authentication layer class * * @internal - * @return Auth + * @return Kirby\Cms\Auth */ public function auth() { @@ -27,7 +36,7 @@ trait AppUsers * Become any existing user * * @param string|null $who - * @return self + * @return Kirby\Cms\User|null */ public function impersonate(string $who = null) { @@ -37,10 +46,10 @@ trait AppUsers /** * Set the currently active user id * - * @param User|string $user - * @return self + * @param Kirby\Cms\User|string $user + * @return Kirby\Cms\App */ - protected function setUser($user = null): self + protected function setUser($user = null) { $this->user = $user; return $this; @@ -50,9 +59,9 @@ trait AppUsers * Create your own set of app users * * @param array $users - * @return self + * @return Kirby\Cms\App */ - protected function setUsers(array $users = null): self + protected function setUsers(array $users = null) { if ($users !== null) { $this->users = Users::factory($users, [ @@ -67,11 +76,10 @@ trait AppUsers * Returns a specific user by id * or the current user if no id is given * - * @param string $id - * @param \Kirby\Session\Session|array $session Session options or session object for getting the current user - * @return User|null + * @param string $id + * @return Kirby\Cms\User|null */ - public function user(string $id = null, $session = null) + public function user(string $id = null) { if ($id !== null) { return $this->users()->find($id); @@ -87,9 +95,9 @@ trait AppUsers /** * Returns all users * - * @return Users + * @return Kirby\Cms\Users */ - public function users(): Users + public function users() { if (is_a($this->users, 'Kirby\Cms\Users') === true) { return $this->users; diff --git a/kirby/src/Cms/Asset.php b/kirby/src/Cms/Asset.php index 28052ed..fab9fae 100755 --- a/kirby/src/Cms/Asset.php +++ b/kirby/src/Cms/Asset.php @@ -10,6 +10,12 @@ use Kirby\Toolkit\Properties; * methods and thumbnail generation as for any other * Kirby files. Pass a relative path to the Asset * object to create the asset. + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class Asset { diff --git a/kirby/src/Cms/Auth.php b/kirby/src/Cms/Auth.php index 7af939d..f16569c 100755 --- a/kirby/src/Cms/Auth.php +++ b/kirby/src/Cms/Auth.php @@ -7,11 +7,16 @@ use Kirby\Exception\PermissionException; use Kirby\Exception\InvalidArgumentException; use Kirby\Exception\NotFoundException; use Kirby\Http\Request\Auth\BasicAuth; -use Kirby\Session\Session; use Throwable; /** * Authentication layer + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class Auth { @@ -20,7 +25,7 @@ class Auth protected $user; /** - * @param App $kirby + * @param Kirby\Cms\App $kirby */ public function __construct(App $kirby) { @@ -53,8 +58,8 @@ class Auth * for a basic authentication header with * valid credentials * - * @param BasicAuth|null $auth - * @return User|null + * @param Kirby\Http\Request\Auth\BasicAuth|null $auth + * @return Kirby\Cms\User|null */ public function currentUserFromBasicAuth(BasicAuth $auth = null) { @@ -88,13 +93,13 @@ class Auth * the current session and finding a valid * valid user id in there * - * @param Session|null $session - * @return User|null + * @param Kirby\Cms\Session|array|null $session + * @return Kirby\Cms\User|null */ public function currentUserFromSession($session = null) { // use passed session options or session object if set - if (is_array($session)) { + if (is_array($session) === true) { $session = $this->kirby->session($session); } @@ -123,7 +128,7 @@ class Auth * Become any existing user * * @param string|null $who - * @return User|null + * @return Kirby\Cms\User|null */ public function impersonate(string $who = null) { @@ -185,7 +190,7 @@ class Auth * @param string $email * @param string $password * @param boolean $long - * @return User|false + * @return Kirby\Cms\User|false */ public function login(string $email, string $password, bool $long = false) { @@ -311,10 +316,10 @@ class Auth /** * Validates the currently logged in user * - * @param array|Session|null $session - * @return User|null + * @param Kirby\Session\Sessionarray||null $session + * @return Kirby\Cms\User|null */ - public function user($session = null): ?User + public function user($session = null) { if ($this->impersonate !== null) { return $this->impersonate; diff --git a/kirby/src/Cms/Blueprint.php b/kirby/src/Cms/Blueprint.php index c2c0798..c6caf5b 100755 --- a/kirby/src/Cms/Blueprint.php +++ b/kirby/src/Cms/Blueprint.php @@ -10,13 +10,18 @@ use Kirby\Form\Field; use Kirby\Toolkit\A; use Kirby\Toolkit\F; use Kirby\Toolkit\I18n; -use Kirby\Toolkit\Obj; use Throwable; /** * The Blueprint class normalizes an array from a * blueprint file and converts sections, columns, fields * etc. into a correct tab layout. + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class Blueprint { @@ -81,13 +86,13 @@ class Blueprint } /** - * Improved var_dump output + * Improved `var_dump` output * * @return array */ public function __debuginfo(): array { - return $this->props; + return $this->props ?? []; } /** @@ -217,7 +222,7 @@ class Blueprint * * @param string $name * @param string $fallback - * @param Model $model + * @param Kirby\Cms\Model $model * @return self */ public static function factory(string $name, string $fallback = null, Model $model) @@ -311,11 +316,9 @@ class Blueprint * Loads a blueprint from file or array * * @param string $name - * @param string $fallback - * @param Model $model * @return array */ - public static function load(string $name) + public static function load(string $name): array { if (isset(static::$loaded[$name]) === true) { return static::$loaded[$name]; @@ -349,7 +352,7 @@ class Blueprint /** * Returns the parent model * - * @return Model + * @return Kirby\Cms\Model */ public function model() { @@ -402,7 +405,7 @@ class Blueprint return $columns; } - public static function helpList(array $items) + public static function helpList(array $items): string { $md = []; @@ -503,6 +506,12 @@ class Blueprint $fieldProps = []; } + // unset / remove field if its propperty is false + if ($fieldProps === false) { + unset($fields[$fieldName]); + continue; + } + // inject the name $fieldProps['name'] = $fieldName; @@ -580,6 +589,12 @@ class Blueprint { foreach ($sections as $sectionName => $sectionProps) { + // unset / remove section if its propperty is false + if ($sectionProps === false) { + unset($sections[$sectionName]); + continue; + } + // inject all section extensions $sectionProps = $this->extend($sectionProps); @@ -648,6 +663,12 @@ class Blueprint foreach ($tabs as $tabName => $tabProps) { + // unset / remove tab if its propperty is false + if ($tabProps === false) { + unset($tabs[$tabName]); + continue; + } + // inject all tab extensions $tabProps = $this->extend($tabProps); @@ -691,9 +712,9 @@ class Blueprint * Returns a single section by name * * @param string $name - * @return Section|null + * @return Kirby\Cms\Section|null */ - public function section(string $name): ?Section + public function section(string $name) { if (empty($this->sections[$name]) === true) { return null; diff --git a/kirby/src/Cms/Collection.php b/kirby/src/Cms/Collection.php index 158e66c..6b56991 100755 --- a/kirby/src/Cms/Collection.php +++ b/kirby/src/Cms/Collection.php @@ -19,8 +19,9 @@ use Kirby\Toolkit\Str; * * @package Kirby Cms * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class Collection extends BaseCollection { @@ -100,9 +101,9 @@ class Collection extends BaseCollection /** * Appends an element to the data array * - * @param mixed $key - * @param mixed $item - * @return Collection + * @param mixed $key + * @param mixed $item + * @return Kirby\Cms\Collection */ public function append(...$args) { @@ -120,11 +121,12 @@ class Collection extends BaseCollection } /** - * Groups the items by a given field + * Groups the items by a given field. Returns a collection + * with an item for each group and a collection for each group. * * @param string $field - * @param bool $i (ignore upper/lowercase for group names) - * @return Collection A collection with an item for each group and a Collection for each group + * @param bool $i Ignore upper/lowercase for group names + * @return Kirby\Cms\Collection */ public function groupBy($field, bool $i = true) { @@ -195,8 +197,8 @@ class Collection extends BaseCollection /** * Returns a Collection without the given element(s) * - * @param args any number of keys, passed as individual arguments - * @return Collection + * @param mixxed[] $keys any number of keys, passed as individual arguments + * @return Kirby\Cms\Collection */ public function not(...$keys) { @@ -213,9 +215,9 @@ class Collection extends BaseCollection } /** - * Add pagination + * Add pagination and return a sliced set of data. * - * @return Collection a sliced set of data + * @return Kirby\Cms\Collection */ public function paginate(...$arguments) { @@ -228,7 +230,7 @@ class Collection extends BaseCollection /** * Returns the parent model * - * @return Model + * @return Kirby\Cms\Model */ public function parent() { diff --git a/kirby/src/Cms/Collections.php b/kirby/src/Cms/Collections.php index 9a3222b..5d7b5e8 100755 --- a/kirby/src/Cms/Collections.php +++ b/kirby/src/Cms/Collections.php @@ -2,7 +2,6 @@ namespace Kirby\Cms; -use Closure; use Kirby\Exception\NotFoundException; use Kirby\Toolkit\Controller; @@ -16,8 +15,9 @@ use Kirby\Toolkit\Controller; * * @package Kirby Cms * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class Collections { @@ -45,7 +45,7 @@ class Collections * * @param string $name * @param array $arguments - * @return Collection|null + * @return Kirby\Cms\Collection|null */ public function __call(string $name, array $arguments = []) { @@ -57,7 +57,7 @@ class Collections * * @param string $name * @param array $data - * @return Collection|null + * @return Kirby\Cms\Collection|null */ public function get(string $name, array $data = []) { diff --git a/kirby/src/Cms/Content.php b/kirby/src/Cms/Content.php index 736e9c5..4c74fcd 100755 --- a/kirby/src/Cms/Content.php +++ b/kirby/src/Cms/Content.php @@ -2,16 +2,15 @@ namespace Kirby\Cms; -use Closure; - /** * The Content class handles all fields * for content from pages, the site and users * * @package Kirby Cms * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class Content { @@ -39,7 +38,7 @@ class Content * for testing, but field methods might * need it. * - * @var Page|File|User|Site + * @var Model */ protected $parent; @@ -48,9 +47,9 @@ class Content * * @param string $name * @param array $arguments - * @return Field + * @return Kirby\Cms\Field */ - public function __call(string $name, array $arguments = []): Field + public function __call(string $name, array $arguments = []) { return $this->get($name); } @@ -58,10 +57,10 @@ class Content /** * Creates a new Content object * - * @param array $data - * @param object $parent + * @param array|null $data + * @param object|null $parent */ - public function __construct($data = [], $parent = null) + public function __construct(array $data = [], $parent = null) { $this->data = $data; $this->parent = $parent; @@ -69,7 +68,7 @@ class Content /** * Same as `self::data()` to improve - * var_dump output + * `var_dump` output * * @see self::data() * @return array @@ -149,7 +148,7 @@ class Content * or all registered fields * * @param string $key - * @return Field|array + * @return Kirby\Cms\Field|array */ public function get(string $key = null) { @@ -202,7 +201,7 @@ class Content * @param string ...$keys * @return self */ - public function not(...$keys): self + public function not(...$keys) { $copy = clone $this; $copy->fields = null; @@ -218,7 +217,7 @@ class Content * Returns the parent * Site, Page, File or User object * - * @return Site|Page|File|User + * @return Kirby\Cms\Model */ public function parent() { @@ -228,10 +227,10 @@ class Content /** * Set the parent model * - * @param Model $parent + * @param Kirby\Cms\Model $parent * @return self */ - public function setParent(Model $parent): self + public function setParent(Model $parent) { $this->parent = $parent; return $this; @@ -256,7 +255,7 @@ class Content * @param bool $overwrite * @return self */ - public function update(array $content = null, bool $overwrite = false): self + public function update(array $content = null, bool $overwrite = false) { $this->data = $overwrite === true ? (array)$content : array_merge($this->data, (array)$content); return $this; diff --git a/kirby/src/Cms/ContentLock.php b/kirby/src/Cms/ContentLock.php new file mode 100755 index 0000000..670f191 --- /dev/null +++ b/kirby/src/Cms/ContentLock.php @@ -0,0 +1,220 @@ + + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ +class ContentLock +{ + + /** + * Lock data + * + * @var array + */ + protected $data; + + /** + * The model to manage locking/unlocking for + * + * @var ModelWithContent + */ + protected $model; + + /** + * @param Kirby\Cms\ModelWithContent $model + */ + public function __construct(ModelWithContent $model) + { + $this->model = $model; + $this->data = $this->kirby()->locks()->get($model); + } + + /** + * Sets lock with the current user + * + * @return bool + */ + public function create(): bool + { + // check if model is already locked by another user + if ( + isset($this->data['lock']) === true && + $this->data['lock']['user'] !== $this->user()->id() + ) { + $id = ContentLocks::id($this->model); + throw new DuplicateException($id . ' is already locked'); + } + + $this->data['lock'] = [ + 'user' => $this->user()->id(), + 'time' => time() + ]; + + return $this->kirby()->locks()->set($this->model, $this->data); + } + + /** + * Returns array with `locked` flag and, + * if needed, `user`, `email`, `time`, `canUnlock` + * + * @return array + */ + public function get(): array + { + $data = $this->data['lock'] ?? []; + + if ( + empty($data) === false && + $data['user'] !== $this->user()->id() && + $user = $this->kirby()->user($data['user']) + ) { + $time = intval($data['time']); + + return [ + 'locked' => true, + 'user' => $user->id(), + 'email' => $user->email(), + 'time' => $time, + 'canUnlock' => $time + $this->kirby()->option('lock.duration', 60 * 2) <= time() + ]; + } + + return [ + 'locked' => false + ]; + } + + /** + * Returns if the model is locked by another user + * + * @return bool + */ + public function isLocked(): bool + { + $lock = $this->get(); + + if ( + $lock['locked'] === true && + $lock['user'] !== $this->user()->id() + ) { + return true; + } + + return false; + } + + /** + * Returns if the current user's lock has been removed by another user + * + * @return bool + */ + public function isUnlocked(): bool + { + $data = $this->data['unlock'] ?? []; + + return in_array($this->user()->id(), $data) === true; + } + + /** + * Returns the app instance + * + * @return Kirby\Cms\App + */ + protected function kirby(): App + { + return $this->model->kirby(); + } + + /** + * Removes lock of current user + * + * @return bool + */ + public function remove(): bool + { + // if no lock exists, skip + if (isset($this->data['lock']) === false) { + return true; + } + + // check if lock was set by another user + if ($this->data['lock']['user'] !== $this->user()->id()) { + throw new LogicException('The content lock can only be removed by the user who created it. Use unlock instead.', 409); + } + + // remove lock + unset($this->data['lock']); + + return $this->kirby()->locks()->set($this->model, $this->data); + } + + /** + * Removes unlock information for current user + * + * @return bool + */ + public function resolve(): bool + { + // if no unlocks exist, skip + if (isset($this->data['unlock']) === false) { + return true; + } + + // remove user from unlock array + $this->data['unlock'] = array_diff( + $this->data['unlock'], + [$this->user()->id()] + ); + + return $this->kirby()->locks()->set($this->model, $this->data); + } + + /** + * Removes current lock and adds lock user to unlock data + * + * @return bool + */ + public function unlock(): bool + { + // if no lock exists, skip + if (isset($this->data['lock']) === false) { + return true; + } + + // add lock user to unlocked data + $this->data['unlock'] = $this->data['unlock'] ?? []; + $this->data['unlock'][] = $this->data['lock']['user']; + + // remove lock + unset($this->data['lock']); + + return $this->kirby()->locks()->set($this->model, $this->data); + } + + /** + * Returns currently authenticated user; + * throws exception if none is authenticated + * + * @return Kirby\Cms\User + */ + protected function user(): User + { + if ($user = $this->kirby()->user()) { + return $user; + } + + throw new PermissionException('No user authenticated.'); + } +} diff --git a/kirby/src/Cms/ContentLocks.php b/kirby/src/Cms/ContentLocks.php new file mode 100755 index 0000000..5d979cb --- /dev/null +++ b/kirby/src/Cms/ContentLocks.php @@ -0,0 +1,226 @@ +, + * Lukas Bestle + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ +class ContentLocks +{ + + /** + * Data from the `.lock` files + * that have been read so far + * cached by `.lock` file path + * + * @var array + */ + protected $data = []; + + /** + * PHP file handles for all currently + * open `.lock` files + * + * @var array + */ + protected $handles = []; + + /** + * Closes the open file handles + * + * @codeCoverageIgnore + */ + public function __destruct() + { + foreach ($this->handles as $file => $handle) { + $this->closeHandle($file); + } + } + + /** + * Removes the file lock and closes the file handle + * + * @param string $file + * @return void + */ + protected function closeHandle(string $file) + { + if (isset($this->handles[$file]) === false) { + return; + } + + $handle = $this->handles[$file]; + $result = flock($handle, LOCK_UN) && fclose($handle); + + if ($result !== true) { + throw new Exception('Unexpected file system error.'); // @codeCoverageIgnore + } + + unset($this->handles[$file]); + } + + /** + * Returns the path to a model's lock file + * + * @param Kirby\Cms\ModelWithContent $model + * @return string + */ + public static function file(ModelWithContent $model): string + { + return $model->contentFileDirectory() . '/.lock'; + } + + /** + * Returns the lock/unlock data for the specified model + * + * @param Kirby\Cms\ModelWithContent $model + * @return array + */ + public function get(ModelWithContent $model): array + { + $file = static::file($model); + $id = static::id($model); + + // return from cache if file was already loaded + if (isset($this->data[$file]) === true) { + return $this->data[$file][$id] ?? []; + } + + // first get a handle to ensure a file system lock + $handle = $this->handle($file); + + if (is_resource($handle) === true) { + // read data from file + clearstatcache(); + $filesize = filesize($file); + + if ($filesize > 0) { + // always read the whole file + rewind($handle); + $string = fread($handle, $filesize); + $data = Yaml::decode($string); + } + } + + $this->data[$file] = $data ?? []; + + return $this->data[$file][$id] ?? []; + } + + /** + * Returns the file handle to a `.lock` file + * + * @param string $file + * @param boolean $create Whether to create the file if it does not exist + * @return resource|null File handle + */ + protected function handle(string $file, bool $create = false) + { + // check for an already open handle + if (isset($this->handles[$file]) === true) { + return $this->handles[$file]; + } + + // don't create a file if not requested + if (is_file($file) !== true && $create !== true) { + return null; + } + + $handle = @fopen($file, 'c+b'); + if (is_resource($handle) === false) { + throw new Exception('Lock file ' . $file . ' could not be opened.'); // @codeCoverageIgnore + } + + // lock the lock file exclusively to prevent changes by other threads + $result = flock($handle, LOCK_EX); + if ($result !== true) { + throw new Exception('Unexpected file system error.'); // @codeCoverageIgnore + } + + return $this->handles[$file] = $handle; + } + + /** + * Returns model ID used as the key for the data array; + * prepended with a slash because the $site otherwise won't have an ID + * + * @param Kirby\Cms\ModelWithContent $model + * @return string + */ + public static function id(ModelWithContent $model): string + { + return '/' . $model->id(); + } + + /** + * Sets and writes the lock/unlock data for the specified model + * + * @param Kirby\Cms\ModelWithContent $model + * @param array $data + * @return boolean + */ + public function set(ModelWithContent $model, array $data): bool + { + $file = static::file($model); + $id = static::id($model); + $handle = $this->handle($file, true); + + $this->data[$file][$id] = $data; + + // make sure to unset model id entries, + // if no lock data for the model exists + foreach ($this->data[$file] as $id => $data) { + // there is no data for that model whatsoever + if ( + isset($data['lock']) === false && + (isset($data['unlock']) === false || + count($data['unlock']) === 0) + ) { + unset($this->data[$file][$id]); + + // there is empty unlock data, but still lock data + } elseif ( + isset($data['unlock']) === true && + count($data['unlock']) === 0 + ) { + unset($this->data[$file][$id]['unlock']); + } + } + + // there is no data left in the file whatsoever, delete the file + if (count($this->data[$file]) === 0) { + unset($this->data[$file]); + + // close the file handle, otherwise we can't delete it on Windows + $this->closeHandle($file); + + return F::remove($file); + } + + $yaml = Yaml::encode($this->data[$file]); + + // delete all file contents first + if (rewind($handle) !== true || ftruncate($handle, 0) !== true) { + throw new Exception('Could not write lock file ' . $file . '.'); // @codeCoverageIgnore + } + + // write the new contents + $result = fwrite($handle, $yaml); + if (is_int($result) === false || $result === 0) { + throw new Exception('Could not write lock file ' . $file . '.'); // @codeCoverageIgnore + } + + return true; + } +} diff --git a/kirby/src/Cms/ContentTranslation.php b/kirby/src/Cms/ContentTranslation.php index 3634569..ca26e94 100755 --- a/kirby/src/Cms/ContentTranslation.php +++ b/kirby/src/Cms/ContentTranslation.php @@ -2,16 +2,18 @@ namespace Kirby\Cms; -use Exception; -use Kirby\Data\Data; -use Kirby\Exception\PermissionException; -use Kirby\Toolkit\F; use Kirby\Toolkit\Properties; /** * Each page, file or site can have multiple * translated versions of their content, * represented by this class + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class ContentTranslation { @@ -33,7 +35,7 @@ class ContentTranslation protected $contentFile; /** - * @var Page|Site|File + * @var Model */ protected $parent; @@ -54,7 +56,7 @@ class ContentTranslation } /** - * Improve var_dump() output + * Improve `var_dump` output * * @return array */ @@ -127,9 +129,9 @@ class ContentTranslation /** * Returns the translation code as id * - * @return void + * @return string */ - public function id() + public function id(): string { return $this->code(); } @@ -150,9 +152,9 @@ class ContentTranslation } /** - * Returns the parent Page, File or Site object + * Returns the parent page, file or site object * - * @return Page|File|Site + * @return Kirby\Cms\Model */ public function parent() { @@ -163,7 +165,7 @@ class ContentTranslation * @param string $code * @return self */ - protected function setCode(string $code): self + protected function setCode(string $code) { $this->code = $code; return $this; @@ -173,17 +175,17 @@ class ContentTranslation * @param array $content * @return self */ - protected function setContent(array $content = null): self + protected function setContent(array $content = null) { $this->content = $content; return $this; } /** - * @param Model $parent + * @param Kirby\Cms\Model $parent * @return self */ - protected function setParent(Model $parent): self + protected function setParent(Model $parent) { $this->parent = $parent; return $this; @@ -193,7 +195,7 @@ class ContentTranslation * @param string $slug * @return self */ - protected function setSlug(string $slug = null): self + protected function setSlug(string $slug = null) { $this->slug = $slug; return $this; diff --git a/kirby/src/Cms/Dir.php b/kirby/src/Cms/Dir.php index 620c9d2..434c494 100755 --- a/kirby/src/Cms/Dir.php +++ b/kirby/src/Cms/Dir.php @@ -2,14 +2,17 @@ namespace Kirby\Cms; -use Exception; -use Kirby\Toolkit\F; - /** - * Extension of the Toolkit Dir class with a new - * Dir::inventory method, that handles scanning directories + * Extension of the Toolkit `Dir` class with a new + * `Dir::inventory` method, that handles scanning directories * and converts the results into our children, files and * other page stuff. + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class Dir extends \Kirby\Toolkit\Dir { @@ -107,7 +110,7 @@ class Dir extends \Kirby\Toolkit\Dir $content = array_unique($content); } - $inventory = static::inventoryContent($dir, $inventory, $content); + $inventory = static::inventoryContent($inventory, $content); $inventory = static::inventoryModels($inventory, $contentExtension, $multilang); return $inventory; @@ -122,7 +125,7 @@ class Dir extends \Kirby\Toolkit\Dir * @param array $content * @return array */ - protected static function inventoryContent(string $dir, array $inventory, array $content): array + protected static function inventoryContent(array $inventory, array $content): array { // filter meta files from the content file diff --git a/kirby/src/Cms/Email.php b/kirby/src/Cms/Email.php index bda043e..f394026 100755 --- a/kirby/src/Cms/Email.php +++ b/kirby/src/Cms/Email.php @@ -3,13 +3,18 @@ namespace Kirby\Cms; use Kirby\Exception\NotFoundException; -use Kirby\Toolkit\Tpl; /** * Wrapper around our PHPMailer package, which * handles all the magic connections between Kirby * and sending emails, like email templates, file * attachments, etc. + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class Email { @@ -28,7 +33,7 @@ class Email public function __construct($preset = [], array $props = []) { - $this->options = $options = App::instance()->option('email'); + $this->options = App::instance()->option('email'); // load presets from options $this->preset = $this->preset($preset); @@ -46,7 +51,11 @@ class Email $this->template(); } - protected function preset($preset) + /** + * @param string|array $preset + * @return array + */ + protected function preset($preset): array { // only passed props, not preset name if (is_string($preset) !== true) { @@ -64,7 +73,7 @@ class Email return $this->options['presets'][$preset]; } - protected function template() + protected function template(): void { if (isset($this->props['template']) === true) { @@ -93,6 +102,13 @@ class Email } } + /** + * Undocumented function + * + * @param string $name + * @param string|null $type + * @return Kirby\Cms\Template + */ protected function getTemplate(string $name, string $type = null) { return App::instance()->template('emails/' . $name, $type, 'text'); @@ -130,7 +146,7 @@ class Email } } - protected function transformProp($prop, $model) + protected function transformProp(string $prop, string $model): void { if (isset($this->props[$prop]) === true) { $this->props[$prop] = $this->{'transform' . ucfirst($model)}($this->props[$prop]); diff --git a/kirby/src/Cms/Field.php b/kirby/src/Cms/Field.php index 45d6201..0abcba4 100755 --- a/kirby/src/Cms/Field.php +++ b/kirby/src/Cms/Field.php @@ -21,8 +21,9 @@ use Kirby\Exception\InvalidArgumentException; * * @package Kirby Cms * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class Field { @@ -53,7 +54,7 @@ class Field * This will be the page, site, user or file * to which the content belongs * - * @var Site|Page|File|User + * @var Model */ protected $parent; @@ -169,7 +170,7 @@ class Field /** * @see Field::parent() - * @return Page|File|Site|User + * @return Kirby\Cms\Model|null */ public function model() { @@ -200,7 +201,7 @@ class Field /** * Returns the parent object of the field * - * @return Page|File|Site|User + * @return Kirby\Cms\Model|null */ public function parent() { @@ -228,12 +229,12 @@ class Field } /** - * Returns the field content + * Returns the field content. If a new value is passed, + * the modified field will be returned. Otherwise it + * will return the field value. * * @param string|Closure $value - * @return mixed If a new value is passed, the modified - * field will be returned. Otherwise it - * will return the field value. + * @return mixed */ public function value($value = null) { diff --git a/kirby/src/Cms/File.php b/kirby/src/Cms/File.php index dd8670b..7066179 100755 --- a/kirby/src/Cms/File.php +++ b/kirby/src/Cms/File.php @@ -2,14 +2,10 @@ namespace Kirby\Cms; -use Kirby\Data\Data; -use Kirby\Exception\Exception; -use Kirby\Exception\InvalidArgumentException; use Kirby\Image\Image; use Kirby\Toolkit\A; use Kirby\Toolkit\F; use Kirby\Toolkit\Str; -use Throwable; /** * The `$file` object provides a set @@ -27,8 +23,9 @@ use Throwable; * * @package Kirby Cms * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class File extends ModelWithContent { @@ -45,14 +42,14 @@ class File extends ModelWithContent * This is used to do actual file * method calls, like size, mime, etc. * - * @var Image + * @var Kirby\Image\Image */ protected $asset; /** * Cache for the initialized blueprint object * - * @var FileBlueprint + * @var Kirby\Cms\FileBlueprint */ protected $blueprint; @@ -73,10 +70,18 @@ class File extends ModelWithContent */ public static $methods = []; + /** + * Registry with all File models + * + * @var array + */ + public static $models = []; + + /** * The parent object * - * @var Model + * @var Kirby\Cms\Model */ protected $parent; @@ -140,7 +145,7 @@ class File extends ModelWithContent } /** - * Improved var_dump() output + * Improved `var_dump` output * * @return array */ @@ -168,9 +173,9 @@ class File extends ModelWithContent * Returns the Image object * * @internal - * @return Image + * @return Kirby\Image\Image */ - public function asset(): Image + public function asset() { return $this->asset = $this->asset ?? new Image($this->root()); } @@ -178,9 +183,9 @@ class File extends ModelWithContent /** * Returns the FileBlueprint object for the file * - * @return FileBlueprint + * @return Kirby\Cms\FileBlueprint */ - public function blueprint(): FileBlueprint + public function blueprint() { if (is_a($this->blueprint, 'Kirby\Cms\FileBlueprint') === true) { return $this->blueprint; @@ -260,6 +265,22 @@ class File extends ModelWithContent } } + /** + * Constructs a File object and also + * takes File models into account. + * + * @internal + * @return self + */ + public static function factory($props) + { + if (empty($props['model']) === false) { + return static::model($props['model'], $props); + } + + return new static($props); + } + /** * Returns the filename with extension * @@ -273,9 +294,9 @@ class File extends ModelWithContent /** * Returns the parent Files collection * - * @return Files + * @return Kirby\Cms\Files */ - public function files(): Files + public function files() { return $this->siblingsCollection(); } @@ -303,7 +324,7 @@ class File extends ModelWithContent /** * Compares the current object with the given file object * - * @param File $file + * @param Kirby\Cms\File $file * @return bool */ public function is(File $file): bool @@ -319,7 +340,7 @@ class File extends ModelWithContent */ public function mediaHash(): string { - return crc32($this->filename()) . '-' . $this->modified(); + return crc32($this->filename()) . '-' . $this->modifiedFile(); } /** @@ -347,24 +368,32 @@ class File extends ModelWithContent /** * @deprecated 3.0.0 Use `File::content()` instead * - * @return Content + * @return Kirby\Cms\Content */ - public function meta(): Content + public function meta() { return $this->content(); } /** - * Returns the parent model. - * This is normally the parent page - * or the site object. + * Creates a file model if it has been registered * * @internal - * @return Site|Page + * @param string $name + * @param array $props + * @return Kirby\Cms\File */ - public function model() + public static function model(string $name, array $props = []) { - return $this->parent(); + if ($class = (static::$models[$name] ?? null)) { + $object = new $class($props); + + if (is_a($object, 'Kirby\Cms\File') === true) { + return $object; + } + } + + return new static($props); } /** @@ -376,8 +405,8 @@ class File extends ModelWithContent */ public function modified(string $format = null, string $handler = null) { - $file = F::modified($this->root()); - $content = F::modified($this->contentFile()); + $file = $this->modifiedFile(); + $content = $this->modifiedContent(); $modified = max($file, $content); if (is_null($format) === true) { @@ -389,10 +418,32 @@ class File extends ModelWithContent return $handler($format, $modified); } + /** + * Timestamp of the last modification + * of the content file + * + * @return integer + */ + protected function modifiedContent(): int + { + return F::modified($this->contentFile()); + } + + /** + * Timestamp of the last modification + * of the source file + * + * @return integer + */ + protected function modifiedFile(): int + { + return F::modified($this->root()); + } + /** * Returns the parent Page object * - * @return Page + * @return Kirby\Cms\Page|null */ public function page() { @@ -440,53 +491,26 @@ class File extends ModelWithContent $definition = array_merge($types[$this->type()] ?? [], $extensions[$this->extension()] ?? []); - return [ - 'type' => $definition['type'] ?? 'file', - 'color' => $definition['color'] ?? $colorWhite, - 'back' => $params['back'] ?? 'pattern', - 'ratio' => $params['ratio'] ?? null, - ]; + $params['type'] = $definition['type'] ?? 'file'; + $params['color'] = $definition['color'] ?? $colorWhite; + + return parent::panelIcon($params); } /** - * Panel image definition + * Returns the image file object based on provided query * * @internal - * @param string|array|false $settings - * @param array $thumbSettings - * @return array + * @param string|null $query + * @return Kirby\Cms\File|Kirby\Cms\Asset|null */ - public function panelImage($settings = null, array $thumbSettings = null): ?array + protected function panelImageSource(string $query = null) { - $defaults = [ - 'ratio' => '3/2', - 'back' => 'pattern', - 'cover' => false - ]; - - // switch the image off - if ($settings === false) { - return null; + if ($query === null && $this->isViewable()) { + return $this; } - if (is_string($settings) === true) { - $settings = [ - 'query' => $settings - ]; - } - - $image = $this->query($settings['query'] ?? null, 'Kirby\Cms\File'); - - if ($image === null && $this->isViewable() === true) { - $image = $this; - } - - if ($image) { - $settings['url'] = $image->thumb($thumbSettings)->url(true); - unset($settings['query']); - } - - return array_merge($defaults, (array)$settings); + return parent::panelImageSource($query); } /** @@ -500,6 +524,38 @@ class File extends ModelWithContent return 'files/' . $this->filename(); } + /** + * Prepares the response data for file pickers + * and file fields + * + * @param array|null $params + * @return array + */ + public function panelPickerData(array $params = []): array + { + $image = $this->panelImage($params['image'] ?? []); + $icon = $this->panelIcon($image); + $uuid = $this->id(); + + if (empty($params['model']) === false) { + $uuid = $this->parent() === $params['model'] ? $this->filename() : $this->id(); + } + + return [ + 'filename' => $this->filename(), + 'dragText' => $this->dragText(), + 'icon' => $icon, + 'id' => $this->id(), + 'image' => $image, + 'info' => $this->toString($params['info'] ?? false), + 'link' => $this->panelUrl(true), + 'text' => $this->toString($params['text'] ?? '{{ file.filename }}'), + 'type' => $this->type(), + 'url' => $this->url(), + 'uuid' => $uuid, + ]; + } + /** * Returns the url to the editing view * in the panel @@ -516,7 +572,7 @@ class File extends ModelWithContent /** * Returns the parent Model object * - * @return Model + * @return Kirby\Cms\Model */ public function parent() { @@ -541,9 +597,9 @@ class File extends ModelWithContent /** * Returns a collection of all parent pages * - * @return Pages + * @return Kirby\Cms\Pages */ - public function parents(): Pages + public function parents() { if (is_a($this->parent(), 'Kirby\Cms\Page') === true) { return $this->parent()->parents()->prepend($this->parent()->id(), $this->parent()); @@ -555,40 +611,13 @@ class File extends ModelWithContent /** * Returns the permissions object for this file * - * @return FilePermissions + * @return Kirby\Cms\FilePermissions */ public function permissions() { return new FilePermissions($this); } - /** - * Creates a string query, starting from the model - * - * @internal - * @param string|null $query - * @param string|null $expect - * @return mixed - */ - public function query(string $query = null, string $expect = null) - { - if ($query === null) { - return null; - } - - $result = Str::query($query, [ - 'kirby' => $this->kirby(), - 'site' => $this->site(), - 'file' => $this - ]); - - if ($expect !== null && is_a($result, $expect) !== true) { - return null; - } - - return $result; - } - /** * Returns the absolute root to the file * @@ -603,7 +632,7 @@ class File extends ModelWithContent * Returns the FileRules class to * validate any important action. * - * @return FileRules + * @return Kirby\Cms\FileRules */ protected function rules() { @@ -616,7 +645,7 @@ class File extends ModelWithContent * @param array|null $blueprint * @return self */ - protected function setBlueprint(array $blueprint = null): self + protected function setBlueprint(array $blueprint = null) { if ($blueprint !== null) { $blueprint['model'] = $this; @@ -632,7 +661,7 @@ class File extends ModelWithContent * @param string $filename * @return self */ - protected function setFilename(string $filename): self + protected function setFilename(string $filename) { $this->filename = $filename; return $this; @@ -641,10 +670,10 @@ class File extends ModelWithContent /** * Sets the parent model object * - * @param Model $parent + * @param Kirby\Cms\Model $parent * @return self */ - protected function setParent(Model $parent = null): self + protected function setParent(Model $parent = null) { $this->parent = $parent; return $this; @@ -667,7 +696,7 @@ class File extends ModelWithContent * @param string $template * @return self */ - protected function setTemplate(string $template = null): self + protected function setTemplate(string $template = null) { $this->template = $template; return $this; @@ -679,7 +708,7 @@ class File extends ModelWithContent * @param string $url * @return self */ - protected function setUrl(string $url = null): self + protected function setUrl(string $url = null) { $this->url = $url; return $this; @@ -689,7 +718,7 @@ class File extends ModelWithContent * Returns the parent Files collection * @internal * - * @return Files + * @return Kirby\Cms\Files */ protected function siblingsCollection() { @@ -699,9 +728,9 @@ class File extends ModelWithContent /** * Returns the parent Site object * - * @return Site + * @return Kirby\Cms\Site */ - public function site(): Site + public function site() { return is_a($this->parent(), 'Kirby\Cms\Site') === true ? $this->parent() : $this->kirby()->site(); } @@ -720,7 +749,7 @@ class File extends ModelWithContent * Returns siblings with the same template * * @param bool $self - * @return self + * @return Kirby\Cms\Files */ public function templateSiblings(bool $self = true) { @@ -739,25 +768,6 @@ class File extends ModelWithContent return array_merge($this->asset()->toArray(), parent::toArray()); } - /** - * String template builder - * - * @param string|null $template - * @return string - */ - public function toString(string $template = null): string - { - if ($template === null) { - return $this->id(); - } - - return Str::template($template, [ - 'file' => $this, - 'site' => $this->site(), - 'kirby' => $this->kirby() - ]); - } - /** * Returns the Url * diff --git a/kirby/src/Cms/FileActions.php b/kirby/src/Cms/FileActions.php index 82060db..3be7ed6 100755 --- a/kirby/src/Cms/FileActions.php +++ b/kirby/src/Cms/FileActions.php @@ -3,13 +3,20 @@ namespace Kirby\Cms; use Closure; -use Kirby\Data\Data; use Kirby\Exception\InvalidArgumentException; use Kirby\Exception\LogicException; use Kirby\Image\Image; use Kirby\Toolkit\F; -use Kirby\Toolkit\Str; +/** + * FileActions + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ trait FileActions { @@ -21,7 +28,7 @@ trait FileActions * @param bool $sanitize * @return self */ - public function changeName(string $name, bool $sanitize = true): self + public function changeName(string $name, bool $sanitize = true) { if ($sanitize === true) { $name = F::safeName($name); @@ -45,6 +52,9 @@ trait FileActions throw new LogicException('The new file exists and cannot be overwritten'); } + // remove the lock of the old file + $oldFile->lock()->remove(); + // remove all public versions $oldFile->unpublish(); @@ -108,6 +118,29 @@ trait FileActions return $result; } + /** + * Copy the file to the given page + * + * @param Kirby\Cms\Page $page + * @return Kirby\Cms\File + */ + public function copy(Page $page) + { + F::copy($this->root(), $page->root() . '/' . $this->filename()); + + if ($this->kirby()->multilang() === true) { + foreach ($this->kirby()->languages() as $language) { + $contentFile = $this->contentFile($language->code()); + F::copy($contentFile, $page->root() . '/' . basename($contentFile)); + } + } else { + $contentFile = $this->contentFile(); + F::copy($contentFile, $page->root() . '/' . basename($contentFile)); + } + + return $page->clone()->file($this->filename()); + } + /** * Creates a new file on disk and returns the * File object. The store is used to handle file @@ -117,7 +150,7 @@ trait FileActions * @param array $props * @return self */ - public static function create(array $props): self + public static function create(array $props) { if (isset($props['source'], $props['parent']) === false) { throw new InvalidArgumentException('Please provide the "source" and "parent" props for the File'); @@ -126,8 +159,10 @@ trait FileActions // prefer the filename from the props $props['filename'] = F::safeName($props['filename'] ?? basename($props['source'])); + $props['model'] = strtolower($props['template'] ?? 'default'); + // create the basic file and a test upload object - $file = new static($props); + $file = File::factory($props); $upload = new Image($props['source']); // create a form for the file @@ -176,8 +211,13 @@ trait FileActions public function delete(): bool { return $this->commit('delete', [$this], function ($file) { + + // remove all versions in the media folder $file->unpublish(); + // remove the lock of the old file + $file->lock()->remove(); + if ($file->kirby()->multilang() === true) { foreach ($file->translations() as $translation) { F::remove($file->contentFile($translation->code())); @@ -198,7 +238,7 @@ trait FileActions * * @return self */ - public function publish(): self + public function publish() { Media::publish($this->root(), $this->mediaRoot()); return $this; @@ -226,7 +266,7 @@ trait FileActions * @param string $source * @return self */ - public function replace(string $source): self + public function replace(string $source) { return $this->commit('replace', [$this, new Image($source)], function ($file, $upload) { @@ -248,7 +288,7 @@ trait FileActions * * @return self */ - public function unpublish(): self + public function unpublish() { Media::unpublish($this->parent()->mediaRoot(), $this->filename()); return $this; diff --git a/kirby/src/Cms/FileBlueprint.php b/kirby/src/Cms/FileBlueprint.php index 5c99260..2f8d0bd 100755 --- a/kirby/src/Cms/FileBlueprint.php +++ b/kirby/src/Cms/FileBlueprint.php @@ -5,6 +5,12 @@ namespace Kirby\Cms; /** * Extension of the basic blueprint class * to handle all blueprints for files. + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class FileBlueprint extends Blueprint { @@ -29,12 +35,18 @@ class FileBlueprint extends Blueprint $this->props['accept'] = $this->normalizeAccept($this->props['accept'] ?? []); } + /** + * @return array + */ public function accept(): array { return $this->props['accept']; } - protected function normalizeAccept($accept = null) + /** + * @return array + */ + protected function normalizeAccept($accept = null): array { if (is_string($accept) === true) { $accept = [ diff --git a/kirby/src/Cms/FileFoundation.php b/kirby/src/Cms/FileFoundation.php index 185f3ee..717fa13 100755 --- a/kirby/src/Cms/FileFoundation.php +++ b/kirby/src/Cms/FileFoundation.php @@ -5,10 +5,15 @@ namespace Kirby\Cms; use Kirby\Exception\BadMethodCallException; use Kirby\Image\Image; use Kirby\Toolkit\F; -use Kirby\Toolkit\Properties; /** * Foundation for all file objects + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ trait FileFoundation { @@ -66,10 +71,10 @@ trait FileFoundation /** * Returns the Image object - *^ - * @return Image + * + * @return Kirby\Image\Image */ - public function asset(): Image + public function asset() { return $this->asset = $this->asset ?? new Image($this->root()); } @@ -150,9 +155,9 @@ trait FileFoundation /** * Returns the app instance * - * @return App + * @return Kirby\Cms\App */ - public function kirby(): App + public function kirby() { return App::instance(); } @@ -225,7 +230,7 @@ trait FileFoundation * * @return string|null */ - public function type() + public function type(): ?string { return F::type($this->root()); } diff --git a/kirby/src/Cms/FileModifications.php b/kirby/src/Cms/FileModifications.php index 360628d..825162b 100755 --- a/kirby/src/Cms/FileModifications.php +++ b/kirby/src/Cms/FileModifications.php @@ -2,8 +2,16 @@ namespace Kirby\Cms; +use Kirby\Exception\InvalidArgumentException; + /** - * Resizing, blurring etc + * Resizing, blurring etc. + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ trait FileModifications { @@ -12,7 +20,7 @@ trait FileModifications * Blurs the image by the given amount of pixels * * @param boolean $pixels - * @return self + * @return Kirby\Cms\FileVersion|Kirby\Cms\File */ public function blur($pixels = true) { @@ -22,7 +30,7 @@ trait FileModifications /** * Converts the image to black and white * - * @return self + * @return Kirby\Cms\FileVersion|Kirby\Cms\File */ public function bw() { @@ -35,7 +43,7 @@ trait FileModifications * @param integer $width * @param integer $height * @param string|array $options - * @return self + * @return Kirby\Cms\FileVersion|Kirby\Cms\File */ public function crop(int $width, int $height = null, $options = null) { @@ -65,7 +73,7 @@ trait FileModifications * Sets the JPEG compression quality * * @param integer $quality - * @return self + * @return Kirby\Cms\FileVersion|Kirby\Cms\File */ public function quality(int $quality) { @@ -79,7 +87,7 @@ trait FileModifications * @param integer $width * @param integer $height * @param integer $quality - * @return self + * @return Kirby\Cms\FileVersion|Kirby\Cms\File */ public function resize(int $width = null, int $height = null, int $quality = null) { @@ -97,7 +105,7 @@ trait FileModifications * @since 3.1.0 * * @param array|string $sizes - * @return string + * @return string|null */ public function srcset($sizes = null): ?string { @@ -116,15 +124,22 @@ trait FileModifications $set = []; foreach ($sizes as $key => $value) { - if (is_string($value) === true) { - $size = $key; - $attr = $value; + if (is_array($value)) { + $options = $value; + $condition = $key; + } elseif (is_string($value) === true) { + $options = [ + 'width' => $key + ]; + $condition = $value; } else { - $size = $value; - $attr = $value . 'w'; + $options = [ + 'width' => $value + ]; + $condition = $value . 'w'; } - $set[] = $this->resize($size)->url() . ' ' . $attr; + $set[] = $this->thumb($options)->url() . ' ' . $condition; } return implode(', ', $set); @@ -135,12 +150,12 @@ trait FileModifications * The media manager takes care of generating * those modified versions and putting them * in the right place. This is normally the - * /media folder of your installation, but + * `/media` folder of your installation, but * could potentially also be a CDN or any other * place. * * @param array|null|string $options - * @return FileVersion|File + * @return Kirby\Cms\FileVersion|Kirby\Cms\File */ public function thumb($options = null) { diff --git a/kirby/src/Cms/FilePermissions.php b/kirby/src/Cms/FilePermissions.php index 223734c..91fca71 100755 --- a/kirby/src/Cms/FilePermissions.php +++ b/kirby/src/Cms/FilePermissions.php @@ -2,6 +2,15 @@ namespace Kirby\Cms; +/** + * FilePermissions + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ class FilePermissions extends ModelPermissions { protected $category = 'files'; diff --git a/kirby/src/Cms/FileRules.php b/kirby/src/Cms/FileRules.php index f2dea8c..87db5e4 100755 --- a/kirby/src/Cms/FileRules.php +++ b/kirby/src/Cms/FileRules.php @@ -12,6 +12,12 @@ use Kirby\Toolkit\V; /** * Validators for all file actions + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class FileRules { diff --git a/kirby/src/Cms/FileVersion.php b/kirby/src/Cms/FileVersion.php index f9f862c..b6f865e 100755 --- a/kirby/src/Cms/FileVersion.php +++ b/kirby/src/Cms/FileVersion.php @@ -4,6 +4,15 @@ namespace Kirby\Cms; use Kirby\Toolkit\Properties; +/** + * FileVersion + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ class FileVersion { use FileFoundation; @@ -39,7 +48,10 @@ class FileVersion return dirname($this->original()->id()) . '/' . $this->filename(); } - public function kirby(): App + /** + * @return Kirby\Cms\App + */ + public function kirby() { return $this->original()->kirby(); } diff --git a/kirby/src/Cms/Filename.php b/kirby/src/Cms/Filename.php index e5f86b5..72c9dd0 100755 --- a/kirby/src/Cms/Filename.php +++ b/kirby/src/Cms/Filename.php @@ -22,8 +22,9 @@ use Kirby\Toolkit\Str; * * @package Kirby Cms * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class Filename { diff --git a/kirby/src/Cms/Files.php b/kirby/src/Cms/Files.php index fda2abb..033fb78 100755 --- a/kirby/src/Cms/Files.php +++ b/kirby/src/Cms/Files.php @@ -12,8 +12,9 @@ namespace Kirby\Cms; * * @package Kirby Cms * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class Files extends Collection { @@ -31,7 +32,7 @@ class Files extends Collection * current collection * * @param mixed $item - * @return Files + * @return self */ public function add($object) { @@ -75,9 +76,9 @@ class Files extends Collection * Creates a files collection from an array of props * * @param array $files - * @param Model $parent + * @param Kirby\Cms\Model $parent * @param array $inject - * @return Files + * @return self */ public static function factory(array $files, Model $parent) { @@ -89,7 +90,7 @@ class Files extends Collection $props['kirby'] = $kirby; $props['parent'] = $parent; - $file = new File($props); + $file = File::factory($props); $collection->data[$file->id()] = $file; } @@ -101,9 +102,9 @@ class Files extends Collection * Tries to find a file by id/filename * * @param string $id - * @return File|null + * @return Kirby\Cms\File|null */ - public function findById($id) + public function findById(string $id) { return $this->get(ltrim($this->parent->id() . '/' . $id, '/')); } @@ -114,9 +115,9 @@ class Files extends Collection * map the get method correctly. * * @param string $key - * @return File|null + * @return Kirby\Cms\File|null */ - public function findByKey($key) + public function findByKey(string $key) { return $this->findById($key); } @@ -127,7 +128,7 @@ class Files extends Collection * @param null|string|array $template * @return self */ - public function template($template): self + public function template($template) { if (empty($template) === true) { return $this; diff --git a/kirby/src/Cms/Form.php b/kirby/src/Cms/Form.php index 243fd3e..a82ece1 100755 --- a/kirby/src/Cms/Form.php +++ b/kirby/src/Cms/Form.php @@ -8,6 +8,12 @@ use Kirby\Form\Form as BaseForm; * Extension of `Kirby\Form\Form` that introduces * a Form::for method that creates a proper form * definition for any Cms Model. + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class Form extends BaseForm { @@ -38,6 +44,11 @@ class Form extends BaseForm parent::__construct($props); } + /** + * @param Kirby\Cms\Model $model + * @param array $props + * @return self + */ public static function for(Model $model, array $props = []) { // get the original model data diff --git a/kirby/src/Cms/HasChildren.php b/kirby/src/Cms/HasChildren.php index 6a20a75..e21c162 100755 --- a/kirby/src/Cms/HasChildren.php +++ b/kirby/src/Cms/HasChildren.php @@ -4,27 +4,36 @@ namespace Kirby\Cms; use Kirby\Toolkit\Str; +/** + * HasChildren + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ trait HasChildren { /** * The Pages collection * - * @var Pages + * @var Kirby\Cms\Pages */ public $children; /** * The list of available drafts * - * @var Pages + * @var Kirby\Cms\Pages */ public $drafts; /** * Returns the Pages collection * - * @return Pages + * @return Kirby\Cms\Pages */ public function children() { @@ -38,7 +47,7 @@ trait HasChildren /** * Returns all children and drafts at the same time * - * @return Pages + * @return Kirby\Cms\Pages */ public function childrenAndDrafts() { @@ -60,7 +69,7 @@ trait HasChildren * Searches for a child draft by id * * @param string $path - * @return Page|null + * @return Kirby\Cms\Page|null */ public function draft(string $path) { @@ -93,7 +102,7 @@ trait HasChildren /** * Return all drafts of the model * - * @return Pages + * @return Kirby\Cms\Pages */ public function drafts() { @@ -118,7 +127,7 @@ trait HasChildren * Finds one or multiple children by id * * @param string ...$arguments - * @return Pages + * @return Kirby\Cms\Page|Kirby\Cms\Pages */ public function find(...$arguments) { @@ -128,7 +137,7 @@ trait HasChildren /** * Finds a single page or draft * - * @return Page|null + * @return Kirby\Cms\Page|null */ public function findPageOrDraft(string $path) { @@ -138,9 +147,9 @@ trait HasChildren /** * Returns a collection of all children of children * - * @return Pages + * @return Kirby\Cms\Pages */ - public function grandChildren(): Pages + public function grandChildren() { return $this->children()->children(); } @@ -171,7 +180,7 @@ trait HasChildren */ public function hasInvisibleChildren(): bool { - return $this->children()->invisible()->count() > 0; + return $this->hasUnlistedChildren(); } /** @@ -200,16 +209,16 @@ trait HasChildren */ public function hasVisibleChildren(): bool { - return $this->children()->listed()->count() > 0; + return $this->hasListedChildren(); } /** * Creates a flat child index * * @param bool $drafts - * @return Pages + * @return Kirby\Cms\Pages */ - public function index(bool $drafts = false): Pages + public function index(bool $drafts = false) { if ($drafts === true) { return $this->childrenAndDrafts()->index($drafts); diff --git a/kirby/src/Cms/HasFiles.php b/kirby/src/Cms/HasFiles.php index 582320a..c6b1820 100755 --- a/kirby/src/Cms/HasFiles.php +++ b/kirby/src/Cms/HasFiles.php @@ -2,24 +2,31 @@ namespace Kirby\Cms; -use Kirby\Toolkit\Str; - +/** + * HasFiles + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ trait HasFiles { /** * The Files collection * - * @var Files + * @var Kirby\Cms\Files */ protected $files; /** * Filters the Files collection by type audio * - * @return Files + * @return Kirby\Cms\Files */ - public function audio(): Files + public function audio() { return $this->files()->filterBy('type', '==', 'audio'); } @@ -27,9 +34,9 @@ trait HasFiles /** * Filters the Files collection by type code * - * @return Files + * @return Kirby\Cms\Files */ - public function code(): Files + public function code() { return $this->files()->filterBy('type', '==', 'code'); } @@ -49,7 +56,7 @@ trait HasFiles * Creates a new file * * @param array $props - * @return File + * @return Kirby\Cms\File */ public function createFile(array $props) { @@ -64,9 +71,9 @@ trait HasFiles /** * Filters the Files collection by type documents * - * @return Files + * @return Kirby\Cms\Files */ - public function documents(): Files + public function documents() { return $this->files()->filterBy('type', '==', 'document'); } @@ -76,7 +83,7 @@ trait HasFiles * * @param string $filename * @param string $in - * @return File + * @return Kirby\Cms\File|null */ public function file(string $filename = null, string $in = 'files') { @@ -101,9 +108,9 @@ trait HasFiles /** * Returns the Files collection * - * @return Files + * @return Kirby\Cms\Files */ - public function files(): Files + public function files() { if (is_a($this->files, 'Kirby\Cms\Files') === true) { return $this->files; @@ -176,7 +183,7 @@ trait HasFiles * Returns a specific image by filename or the first one * * @param string $filename - * @return File + * @return Kirby\Cms\File|null */ public function image(string $filename = null) { @@ -186,9 +193,9 @@ trait HasFiles /** * Filters the Files collection by type image * - * @return Files + * @return Kirby\Cms\Files */ - public function images(): Files + public function images() { return $this->files()->filterBy('type', '==', 'image'); } @@ -196,10 +203,10 @@ trait HasFiles /** * Sets the Files collection * - * @param Files|null $files + * @param Kirby\Cms\Files|null $files * @return self */ - protected function setFiles(array $files = null): self + protected function setFiles(array $files = null) { if ($files !== null) { $this->files = Files::factory($files, $this); @@ -211,9 +218,9 @@ trait HasFiles /** * Filters the Files collection by type videos * - * @return Files + * @return Kirby\Cms\Files */ - public function videos(): Files + public function videos() { return $this->files()->filterBy('type', '==', 'video'); } diff --git a/kirby/src/Cms/HasMethods.php b/kirby/src/Cms/HasMethods.php index c39a3a4..98830fc 100755 --- a/kirby/src/Cms/HasMethods.php +++ b/kirby/src/Cms/HasMethods.php @@ -2,6 +2,15 @@ namespace Kirby\Cms; +/** + * HasMethods + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ trait HasMethods { diff --git a/kirby/src/Cms/HasSiblings.php b/kirby/src/Cms/HasSiblings.php index 078a974..d66425e 100755 --- a/kirby/src/Cms/HasSiblings.php +++ b/kirby/src/Cms/HasSiblings.php @@ -8,8 +8,9 @@ namespace Kirby\Cms; * * @package Kirby Cms * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ trait HasSiblings { @@ -27,7 +28,7 @@ trait HasSiblings /** * Returns the next item in the collection if available * - * @return Model|null + * @return Kirby\Cms\Model|null */ public function next() { @@ -37,7 +38,7 @@ trait HasSiblings /** * Returns the end of the collection starting after the current item * - * @return Collection + * @return Kirby\Cms\Collection */ public function nextAll() { @@ -47,7 +48,7 @@ trait HasSiblings /** * Returns the previous item in the collection if available * - * @return Model|null + * @return Kirby\Cms\Model|null */ public function prev() { @@ -57,7 +58,7 @@ trait HasSiblings /** * Returns the beginning of the collection before the current item * - * @return Collection + * @return Kirby\Cms\Collection */ public function prevAll() { @@ -68,7 +69,7 @@ trait HasSiblings * Returns all sibling elements * * @param bool $self - * @return Collection + * @return Kirby\Cms\Collection */ public function siblings(bool $self = true) { diff --git a/kirby/src/Cms/Html.php b/kirby/src/Cms/Html.php index f8ef03a..c0ded7e 100755 --- a/kirby/src/Cms/Html.php +++ b/kirby/src/Cms/Html.php @@ -9,21 +9,22 @@ namespace Kirby\Cms; * * @package Kirby Cms * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class Html extends \Kirby\Toolkit\Html { /** - * Generates an a tag with an absolute Url + * Generates an `a` tag with an absolute Url * * @param string $href Relative or absolute Url - * @param string|array|null $text If null, the link will be used as link text. If an array is passed, each element will be added unencoded + * @param string|array|null $text If `null`, the link will be used as link text. If an array is passed, each element will be added unencoded * @param array $attr Additional attributes for the a tag. * @return string */ - public static function a(string $href = null, $text = null, array $attr = []): string + public static function link(string $href = null, $text = null, array $attr = []): string { - return parent::a(Url::to($href), $text, $attr); + return parent::link(Url::to($href), $text, $attr); } } diff --git a/kirby/src/Cms/Ingredients.php b/kirby/src/Cms/Ingredients.php index 9275f9e..5a44d60 100755 --- a/kirby/src/Cms/Ingredients.php +++ b/kirby/src/Cms/Ingredients.php @@ -2,13 +2,17 @@ namespace Kirby\Cms; -use Closure; - /** * The Ingredients class is the foundation for - * $kirby->urls() and $kirby->roots() objects. + * `$kirby->urls()` and `$kirby->roots()` objects. * Those are configured in `kirby/config/urls.php` * and `kirby/config/roots.php` + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class Ingredients { @@ -41,7 +45,7 @@ class Ingredients } /** - * Improved var_dump output + * Improved `var_dump` output * * @return array */ @@ -69,7 +73,7 @@ class Ingredients * @param array $ingredients * @return self */ - public static function bake(array $ingredients): self + public static function bake(array $ingredients) { foreach ($ingredients as $name => $ingredient) { if (is_a($ingredient, 'Closure') === true) { diff --git a/kirby/src/Cms/KirbyTag.php b/kirby/src/Cms/KirbyTag.php index f222869..be76d75 100755 --- a/kirby/src/Cms/KirbyTag.php +++ b/kirby/src/Cms/KirbyTag.php @@ -5,6 +5,12 @@ namespace Kirby\Cms; /** * Extended KirbyTag class to provide * common helpers for tag objects + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class KirbyTag extends \Kirby\Text\KirbyTag { @@ -16,9 +22,9 @@ class KirbyTag extends \Kirby\Text\KirbyTag * Afterwards it uses Kirby's global file finder. * * @param string $path - * @return File|null + * @return Kirby\Cms\File|null */ - public function file(string $path): ?File + public function file(string $path) { $parent = $this->parent(); @@ -36,9 +42,9 @@ class KirbyTag extends \Kirby\Text\KirbyTag /** * Returns the current Kirby instance * - * @return App + * @return Kirby\Cms\App */ - public function kirby(): App + public function kirby() { return $this->data['kirby'] ?? App::instance(); } @@ -46,7 +52,7 @@ class KirbyTag extends \Kirby\Text\KirbyTag /** * Returns the parent model * - * @return Page|Site|File|User + * @return Kirby\Cms\Model|null */ public function parent() { diff --git a/kirby/src/Cms/KirbyTags.php b/kirby/src/Cms/KirbyTags.php index deccb36..2e20624 100755 --- a/kirby/src/Cms/KirbyTags.php +++ b/kirby/src/Cms/KirbyTags.php @@ -2,11 +2,15 @@ namespace Kirby\Cms; -use Exception; - /** * Extension of `Kirby\Text\KirbyTags` that introduces * `kirbytags:before` and `kirbytags:after` hooks + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class KirbyTags extends \Kirby\Text\KirbyTags { @@ -42,9 +46,9 @@ class KirbyTags extends \Kirby\Text\KirbyTags * @param string $text * @param array $data * @param array $options - * @return string + * @return string|null */ - protected static function hooks(array $hooks, string $text = null, array $data, array $options) + protected static function hooks(array $hooks, string $text = null, array $data, array $options): ?string { foreach ($hooks as $hook) { $text = $hook->call($data['kirby'], $text, $data, $options); diff --git a/kirby/src/Cms/Language.php b/kirby/src/Cms/Language.php index 84738c8..c839db7 100755 --- a/kirby/src/Cms/Language.php +++ b/kirby/src/Cms/Language.php @@ -6,7 +6,6 @@ use Kirby\Data\Data; use Kirby\Exception\DuplicateException; use Kirby\Exception\Exception; use Kirby\Exception\InvalidArgumentException; -use Kirby\Exception\LogicException; use Kirby\Exception\PermissionException; use Kirby\Toolkit\F; use Kirby\Toolkit\Str; @@ -24,8 +23,9 @@ use Throwable; * * @package Kirby Cms * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class Language extends Model { @@ -55,6 +55,11 @@ class Language extends Model */ protected $name; + /** + * @var array|null + */ + protected $slugs; + /** * @var array|null */ @@ -81,13 +86,14 @@ class Language extends Model 'direction', 'locale', 'name', + 'slugs', 'translations', 'url', ]); } /** - * Improved var_dump output + * Improved `var_dump` output * * @return array */ @@ -167,12 +173,11 @@ class Language extends Model * @param array $props * @return self */ - public static function create(array $props): self + public static function create(array $props) { $props['code'] = Str::slug($props['code'] ?? null); $kirby = App::instance(); $languages = $kirby->languages(); - $site = $kirby->site(); // make the first language the default language if ($languages->count() === 0) { @@ -181,9 +186,8 @@ class Language extends Model $language = new static($props); - if ($language->exists() === true) { - throw new DuplicateException('The language already exists'); - } + // validate the new language + LanguageRules::create($language); $language->save(); @@ -209,7 +213,6 @@ class Language extends Model $kirby = App::instance(); $languages = $kirby->languages(); - $site = $kirby->site(); $code = $this->code(); if (F::remove($this->root()) !== true) { @@ -347,13 +350,50 @@ class Language extends Model return App::instance()->root('languages') . '/' . $this->code() . '.php'; } + /** + * Returns the LanguageRouter instance + * which is used to handle language specific + * routes. + * + * @return Kirby\Cms\LanguageRouter + */ + public function router() + { + return new LanguageRouter($this); + } + + /** + * Get slug rules for language + * + * @internal + * @return array + */ + public function rules(): array + { + $code = $this->locale(LC_CTYPE); + $code = Str::contains($code, '.') ? Str::before($code, '.') : $code; + $file = $this->kirby()->root('i18n:rules') . '/' . $code . '.json'; + + if (F::exists($file) === false) { + $file = $this->kirby()->root('i18n:rules') . '/' . Str::before($code, '_') . '.json'; + } + + try { + $data = Data::read($file); + } catch (\Exception $e) { + $data = []; + } + + return array_merge($data, $this->slugs()); + } + /** * Saves the language settings in the languages folder * * @internal * @return self */ - public function save(): self + public function save() { try { $existingData = Data::read($this->root()); @@ -384,9 +424,9 @@ class Language extends Model * @param string $code * @return self */ - protected function setCode(string $code): self + protected function setCode(string $code) { - $this->code = $code; + $this->code = trim($code); return $this; } @@ -394,7 +434,7 @@ class Language extends Model * @param boolean $default * @return self */ - protected function setDefault(bool $default = false): self + protected function setDefault(bool $default = false) { $this->default = $default; return $this; @@ -404,7 +444,7 @@ class Language extends Model * @param string $direction * @return self */ - protected function setDirection(string $direction = 'ltr'): self + protected function setDirection(string $direction = 'ltr') { $this->direction = $direction === 'rtl' ? 'rtl' : 'ltr'; return $this; @@ -414,7 +454,7 @@ class Language extends Model * @param string|array $locale * @return self */ - protected function setLocale($locale = null): self + protected function setLocale($locale = null) { if (is_array($locale)) { $this->locale = $locale; @@ -433,9 +473,19 @@ class Language extends Model * @param string $name * @return self */ - protected function setName(string $name = null): self + protected function setName(string $name = null) { - $this->name = $name ?? $this->code; + $this->name = trim($name ?? $this->code); + return $this; + } + + /** + * @param array $slug + * @return self + */ + protected function setSlugs(array $slugs = null) + { + $this->slugs = $slugs ?? []; return $this; } @@ -443,7 +493,7 @@ class Language extends Model * @param array $translations * @return self */ - protected function setTranslations(array $translations = null): self + protected function setTranslations(array $translations = null) { $this->translations = $translations ?? []; return $this; @@ -453,12 +503,22 @@ class Language extends Model * @param string $url * @return self */ - protected function setUrl(string $url = null): self + protected function setUrl(string $url = null) { $this->url = $url; return $this; } + /** + * Returns the custom slug rules for this language + * + * @return array + */ + public function slugs(): array + { + return $this->slugs; + } + /** * Returns the most important * properties as array @@ -473,6 +533,7 @@ class Language extends Model 'direction' => $this->direction(), 'locale' => $this->locale(), 'name' => $this->name(), + 'rules' => $this->rules(), 'url' => $this->url() ]; } @@ -504,7 +565,7 @@ class Language extends Model * @param array $props * @return self */ - public function update(array $props = null): self + public function update(array $props = null) { $props['slug'] = Str::slug($props['slug'] ?? null); $kirby = App::instance(); diff --git a/kirby/src/Cms/LanguageRouter.php b/kirby/src/Cms/LanguageRouter.php new file mode 100755 index 0000000..6c50ae8 --- /dev/null +++ b/kirby/src/Cms/LanguageRouter.php @@ -0,0 +1,132 @@ + + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ +class LanguageRouter +{ + + /** + * The parent language + * + * @var Language + */ + protected $language; + + /** + * The router instance + * + * @var Router + */ + protected $router; + + /** + * Creates a new language router instance + * for the given language + * + * @param Kirby\Cms\Language $language + */ + public function __construct(Language $language) + { + $this->language = $language; + } + + /** + * Fetches all scoped routes for the + * current language from the Kirby instance + * + * @return array + */ + public function routes(): array + { + $language = $this->language; + $kirby = $language->kirby(); + $routes = $kirby->routes(); + + // only keep the scoped language routes + $routes = array_values(array_filter($routes, function ($route) use ($language) { + + // no language scope + if (empty($route['language']) === true) { + return false; + } + + // wildcard + if ($route['language'] === '*') { + return true; + } + + // get all applicable languages + $languages = Str::split(strtolower($route['language']), '|'); + + // validate the language + return in_array($language->code(), $languages) === true; + })); + + // add the page-scope if necessary + foreach ($routes as $index => $route) { + if ($pageId = ($route['page'] ?? null)) { + if ($page = $kirby->page($pageId)) { + + // convert string patterns to arrays + $patterns = A::wrap($route['pattern']); + + // prefix all patterns with the page slug + $patterns = array_map(function ($pattern) use ($page, $language) { + return $page->uri($language) . '/' . $pattern; + }, $patterns); + + // reinject the pattern and the full page object + $routes[$index]['pattern'] = $patterns; + $routes[$index]['page'] = $page; + } else { + throw new NotFoundException('The page "' . $pageId . '" does not exist'); + } + } + } + + return $routes; + } + + /** + * Wrapper around the Router::call method + * that injects the Language instance and + * if needed also the Page as arguments. + * + * @param string|null $path + * @return mixed + */ + public function call(string $path = null) + { + $language = $this->language; + $kirby = $language->kirby(); + $router = new Router($this->routes()); + + try { + return $router->call($path, $kirby->request()->method(), function ($route) use ($language) { + if ($page = $route->page()) { + return $route->action()->call($route, $language, $page, ...$route->arguments()); + } else { + return $route->action()->call($route, $language, ...$route->arguments()); + } + }); + } catch (Exception $e) { + return $kirby->resolve($path, $language->code()); + } + } +} diff --git a/kirby/src/Cms/LanguageRules.php b/kirby/src/Cms/LanguageRules.php new file mode 100755 index 0000000..34b774d --- /dev/null +++ b/kirby/src/Cms/LanguageRules.php @@ -0,0 +1,55 @@ + + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ +class LanguageRules +{ + public static function create(Language $language): bool + { + if (Str::length($language->code()) < 2) { + throw new InvalidArgumentException([ + 'key' => 'language.code', + 'data' => [ + 'code' => $language->code(), + 'name' => $language->name() + ] + ]); + } + + if (Str::length($language->name()) < 1) { + throw new InvalidArgumentException([ + 'key' => 'language.name', + 'data' => [ + 'code' => $language->code(), + 'name' => $language->name() + ] + ]); + } + + if ($language->exists() === true) { + throw new DuplicateException([ + 'key' => 'language.duplicate', + 'data' => [ + 'code' => $language->code() + ] + ]); + } + + return true; + } +} diff --git a/kirby/src/Cms/Languages.php b/kirby/src/Cms/Languages.php index fb7e65e..3adad20 100755 --- a/kirby/src/Cms/Languages.php +++ b/kirby/src/Cms/Languages.php @@ -6,6 +6,12 @@ use Kirby\Toolkit\F; /** * A collection of all defined site languages + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class Languages extends Collection { @@ -25,9 +31,9 @@ class Languages extends Collection * * @internal * @param array $props - * @return Language + * @return Kirby\Cms\Language */ - public function create(array $props): Language + public function create(array $props) { return Language::create($props); } @@ -35,9 +41,9 @@ class Languages extends Collection /** * Returns the default language * - * @return Language|null + * @return Kirby\Cms\Language|null */ - public function default(): ?Language + public function default() { if ($language = $this->findBy('isDefault', true)) { return $language; @@ -48,9 +54,9 @@ class Languages extends Collection /** * @deprecated 3.0.0 Use `Languages::default()`instead - * @return Language|null + * @return Kirby\Cms\Language|null */ - public function findDefault(): ?Language + public function findDefault() { return $this->default(); } @@ -61,7 +67,7 @@ class Languages extends Collection * @internal * @return self */ - public static function load(): self + public static function load() { $languages = new static; $files = glob(App::instance()->root('languages') . '/*.php'); diff --git a/kirby/src/Cms/Media.php b/kirby/src/Cms/Media.php index 4313bf6..c90184e 100755 --- a/kirby/src/Cms/Media.php +++ b/kirby/src/Cms/Media.php @@ -5,71 +5,29 @@ namespace Kirby\Cms; use Kirby\Data\Data; use Kirby\Toolkit\Dir; use Kirby\Toolkit\F; -use Kirby\Toolkit\Str; use Throwable; /** * Handles all tasks to get the Media API * up and running and link files correctly + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class Media { - /** - * Tries to find a job file for the - * given filename and then calls the thumb - * component to create a thumbnail accordingly - * - * @param Model $model - * @param string $hash - * @param string $filename - * @return Response|false - */ - public static function thumb($model, string $hash, string $filename) - { - $kirby = App::instance(); - - if (is_string($model) === true) { - // assets - $root = $kirby->root('media') . '/assets/' . $model . '/' . $hash; - } else { - // model files - $root = $model->mediaRoot() . '/' . $hash; - } - - try { - $thumb = $root . '/' . $filename; - $job = $root . '/.jobs/' . $filename . '.json'; - $options = Data::read($job); - - if (empty($options) === true) { - return false; - } - - if (is_string($model) === true) { - $source = $kirby->root('index') . '/' . $model . '/' . $options['filename']; - } else { - $source = $model->file($options['filename'])->root(); - } - - $kirby->thumb($source, $thumb, $options); - - F::remove($job); - - return Response::file($thumb); - } catch (Throwable $e) { - return false; - } - } - /** * Tries to find a file by model and filename * and to copy it to the media folder. * - * @param Model $model + * @param Kirby\Cms\Model $model * @param string $hash * @param string $filename - * @return Response|false + * @return Kirby\Cms\Response|false */ public static function link(Model $model = null, string $hash, string $filename) { @@ -117,6 +75,56 @@ class Media return F::copy($src, $dest, true); } + /** + * Tries to find a job file for the + * given filename and then calls the thumb + * component to create a thumbnail accordingly + * + * @param Kirby\Cms\Model $model + * @param string $hash + * @param string $filename + * @return Kirby\Cms\Response|false + */ + public static function thumb($model, string $hash, string $filename) + { + $kirby = App::instance(); + + if (is_string($model) === true) { + // assets + $root = $kirby->root('media') . '/assets/' . $model . '/' . $hash; + } else { + // model files + $root = $model->mediaRoot() . '/' . $hash; + } + + try { + $thumb = $root . '/' . $filename; + $job = $root . '/.jobs/' . $filename . '.json'; + $options = Data::read($job); + + if (empty($options) === true) { + return false; + } + + if (is_string($model) === true) { + $source = $kirby->root('index') . '/' . $model . '/' . $options['filename']; + } else { + $source = $model->file($options['filename'])->root(); + } + + try { + $kirby->thumb($source, $thumb, $options); + F::remove($job); + return Response::file($thumb); + } catch (Throwable $e) { + F::remove($thumb); + return Response::file($source); + } + } catch (Throwable $e) { + return false; + } + } + /** * Deletes all versions of the given filename * within the parent directory diff --git a/kirby/src/Cms/Model.php b/kirby/src/Cms/Model.php index 4d40648..f0ca3dc 100755 --- a/kirby/src/Cms/Model.php +++ b/kirby/src/Cms/Model.php @@ -2,13 +2,16 @@ namespace Kirby\Cms; -use stdClass; -use ReflectionMethod; use Kirby\Toolkit\Properties; -use Kirby\Toolkit\Str; /** * Foundation for Page, Site, File and User models. + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ abstract class Model { @@ -17,14 +20,14 @@ abstract class Model /** * The parent Kirby instance * - * @var App + * @var Kirby\Cms\App */ public static $kirby; /** - * The parent Site instance + * The parent site instance * - * @var Site + * @var Kirby\Cms\Site */ protected $site; @@ -34,7 +37,7 @@ abstract class Model * * @return string */ - public function __toString() + public function __toString(): string { return $this->id(); } @@ -52,9 +55,9 @@ abstract class Model /** * Returns the parent Kirby instance * - * @return App|null + * @return Kirby\Cms\App */ - public function kirby(): App + public function kirby() { return static::$kirby = static::$kirby ?? App::instance(); } @@ -62,7 +65,7 @@ abstract class Model /** * Returns the parent Site instance * - * @return Site|null + * @return Kirby\Cms\Site */ public function site() { @@ -72,7 +75,7 @@ abstract class Model /** * Setter for the parent Kirby object * - * @param Kirby|null $kirby + * @param Kirby\Cms\App|null $kirby * @return self */ protected function setKirby(App $kirby = null) @@ -82,10 +85,10 @@ abstract class Model } /** - * Setter for the parent Site object + * Setter for the parent site object * * @internal - * @param Site|null $site + * @param Kirby\Cms\Site|null $site * @return self */ public function setSite(Site $site = null) diff --git a/kirby/src/Cms/ModelPermissions.php b/kirby/src/Cms/ModelPermissions.php index e6294bd..54918f3 100755 --- a/kirby/src/Cms/ModelPermissions.php +++ b/kirby/src/Cms/ModelPermissions.php @@ -2,6 +2,17 @@ namespace Kirby\Cms; +use Kirby\Toolkit\A; + +/** + * ModelPermissions + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ abstract class ModelPermissions { protected $category; @@ -10,7 +21,7 @@ abstract class ModelPermissions protected $permissions; protected $user; - public function __call(string $method, array $arguments = []) + public function __call(string $method, array $arguments = []): bool { return $this->can($method); } @@ -24,7 +35,7 @@ abstract class ModelPermissions } /** - * Improved var_dump output + * Improved `var_dump` output * * @return array */ @@ -35,16 +46,32 @@ abstract class ModelPermissions public function can(string $action): bool { - if ($this->user->role()->id() === 'nobody') { + $role = $this->user->role()->id(); + + if ($role === 'nobody') { return false; } + // check for a custom overall can method if (method_exists($this, 'can' . $action) === true && $this->{'can' . $action}() === false) { return false; } - if (isset($this->options[$action]) === true && $this->options[$action] === false) { - return false; + // evaluate the blueprint options block + if (isset($this->options[$action]) === true) { + $options = $this->options[$action]; + + if ($options === false) { + return false; + } + + if ($options === true) { + return true; + } + + if (is_array($options) === true && A::isAssociative($options) === true) { + return $options[$role] ?? $options['*'] ?? false; + } } return $this->permissions->for($this->category, $action); diff --git a/kirby/src/Cms/ModelWithContent.php b/kirby/src/Cms/ModelWithContent.php index 8aa42ed..200d402 100755 --- a/kirby/src/Cms/ModelWithContent.php +++ b/kirby/src/Cms/ModelWithContent.php @@ -4,33 +4,38 @@ namespace Kirby\Cms; use Closure; use Kirby\Data\Data; -use Kirby\Exception\Exception; use Kirby\Exception\InvalidArgumentException; -use Kirby\Exception\LogicException; -use Kirby\Toolkit\A; -use Kirby\Toolkit\F; use Kirby\Toolkit\Str; use Throwable; +/** + * ModelWithContent + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ abstract class ModelWithContent extends Model { /** * The content * - * @var Content + * @var Kirby\Cms\Content */ public $content; /** - * @var Translations + * @var Kirby\Cms\Translations */ public $translations; /** * Returns the blueprint of the model * - * @return Blueprint + * @return Kirby\Cms\Blueprint */ abstract public function blueprint(); @@ -48,9 +53,9 @@ abstract class ModelWithContent extends Model * Returns the content * * @param string $languageCode - * @return Content + * @return Kirby\Cms\Content */ - public function content(string $languageCode = null): Content + public function content(string $languageCode = null) { // single language support @@ -120,6 +125,26 @@ abstract class ModelWithContent extends Model } } + /** + * Returns an array with all content files + * + * @return array + */ + public function contentFiles(): array + { + if ($this->kirby()->multilang() === true) { + $files = []; + foreach ($this->kirby()->languages()->codes() as $code) { + $files[] = $this->contentFile($code); + } + return $files; + } else { + return [ + $this->contentFile() + ]; + } + } + /** * Prepares the content that should be written * to the text file @@ -232,6 +257,148 @@ abstract class ModelWithContent extends Model return Form::for($this)->hasErrors() === false; } + /** + * Returns the lock object for this model + * + * @return Kirby\Cms\ContentLock + */ + public function lock() + { + return new ContentLock($this); + } + + /** + * Returns the panel icon definition + * + * @internal + * @param array $params + * @return array + */ + public function panelIcon(array $params = null): array + { + $defaults = [ + 'type' => 'page', + 'ratio' => null, + 'back' => 'pattern', + 'color' => '#c5c9c6', + ]; + + return array_merge($defaults, $params ?? []); + } + + /** + * @internal + * @param string|array|false $settings + * @return array|null + */ + public function panelImage($settings = null): ?array + { + $defaults = [ + 'ratio' => '3/2', + 'back' => 'pattern', + 'cover' => false + ]; + + // switch the image off + if ($settings === false) { + return null; + } + + if (is_string($settings) === true) { + $settings = [ + 'query' => $settings + ]; + } + + if ($image = $this->panelImageSource($settings['query'] ?? null)) { + + // main url + $settings['url'] = $image->url(); + + // for cards + $settings['cards'] = [ + 'url' => 'data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw', + 'srcset' => $image->srcset([ + 352, + 864, + 1408, + ]) + ]; + + // for lists + $settings['list'] = [ + 'url' => 'data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw', + 'srcset' => $image->srcset([ + '1x' => [ + 'width' => 38, + 'height' => 38, + 'crop' => 'center' + ], + '2x' => [ + 'width' => 76, + 'height' => 76, + 'crop' => 'center' + ], + ]) + ]; + + unset($settings['query']); + } + + return array_merge($defaults, (array)$settings); + } + + /** + * Returns the image file object based on provided query + * + * @internal + * @param string|null $query + * @return Kirby\Cms\File|Kirby\Cms\Asset|null + */ + protected function panelImageSource(string $query = null) + { + $image = $this->query($query ?? null); + + // validate the query result + if (is_a($image, File::class) === false && is_a($image, Asset::class) === false) { + $image = null; + } + + // fallback for files + if ($image === null && is_a($this, File::class) === true && $this->isViewable() === true) { + $image = $this; + } + + return $image; + } + + /** + * Creates a string query, starting from the model + * + * @internal + * @param string|null $query + * @param string|null $expect + * @return mixed + */ + public function query(string $query = null, string $expect = null) + { + if ($query === null) { + return null; + } + + $result = Str::query($query, [ + 'kirby' => $this->kirby(), + 'site' => is_a($this, Site::class) ? $this : $this->site(), + static::CLASS_ALIAS => $this + ]); + + if ($expect !== null && is_a($result, $expect) !== true) { + return null; + } + + return $result; + } + /** * Read the content from the content file * @@ -251,7 +418,7 @@ abstract class ModelWithContent extends Model /** * Returns the absolute path to the model * - * @return string + * @return string|null */ abstract public function root(): ?string; @@ -330,7 +497,7 @@ abstract class ModelWithContent extends Model /** * Sets the Content object * - * @param Content|null $content + * @param array|null $content * @return self */ protected function setContent(array $content = null) @@ -364,12 +531,33 @@ abstract class ModelWithContent extends Model return $this; } + /** + * String template builder + * + * @param string|null $template + * @return string + */ + public function toString(string $template = null): string + { + if ($template === null) { + return $this->id(); + } + + $result = Str::template($template, [ + 'kirby' => $this->kirby(), + 'site' => is_a($this, Site::class) ? $this : $this->site(), + static::CLASS_ALIAS => $this + ]); + + return $result; + } + /** * Returns a single translation by language code * If no code is specified the current translation is returned * - * @param string $languageCode - * @return Translation|null + * @param string|null $languageCode + * @return Kirby\Cms\ContentTranslation|null */ public function translation(string $languageCode = null) { @@ -379,7 +567,7 @@ abstract class ModelWithContent extends Model /** * Returns the translations collection * - * @return Collection + * @return Kirby\Cms\Collection */ public function translations() { diff --git a/kirby/src/Cms/Nest.php b/kirby/src/Cms/Nest.php index 182c568..21c3eaf 100755 --- a/kirby/src/Cms/Nest.php +++ b/kirby/src/Cms/Nest.php @@ -2,8 +2,6 @@ namespace Kirby\Cms; -use Kirby\Toolkit\Obj; - /** * The Nest class converts any array type * into a Kirby style collection/object. This @@ -11,6 +9,12 @@ use Kirby\Toolkit\Obj; * with Kirby queries. * * REFACTOR: move this to the toolkit + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class Nest { diff --git a/kirby/src/Cms/NestCollection.php b/kirby/src/Cms/NestCollection.php index 5758a27..448b326 100755 --- a/kirby/src/Cms/NestCollection.php +++ b/kirby/src/Cms/NestCollection.php @@ -5,6 +5,15 @@ namespace Kirby\Cms; use Closure; use Kirby\Toolkit\Collection as BaseCollection; +/** + * NestCollection + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ class NestCollection extends BaseCollection { diff --git a/kirby/src/Cms/NestObject.php b/kirby/src/Cms/NestObject.php index 5baddf8..ed58959 100755 --- a/kirby/src/Cms/NestObject.php +++ b/kirby/src/Cms/NestObject.php @@ -4,6 +4,15 @@ namespace Kirby\Cms; use Kirby\Toolkit\Obj; +/** + * NestObject + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ class NestObject extends Obj { diff --git a/kirby/src/Cms/Page.php b/kirby/src/Cms/Page.php index f6d1b91..6adaebf 100755 --- a/kirby/src/Cms/Page.php +++ b/kirby/src/Cms/Page.php @@ -2,15 +2,12 @@ namespace Kirby\Cms; -use Closure; -use Kirby\Data\Data; use Kirby\Exception\Exception; use Kirby\Exception\NotFoundException; use Kirby\Http\Uri; use Kirby\Toolkit\A; use Kirby\Toolkit\F; use Kirby\Toolkit\Str; -use Throwable; /** * The `$page` object is the heart and @@ -20,8 +17,9 @@ use Throwable; * * @package Kirby Cms * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class Page extends ModelWithContent { @@ -51,7 +49,7 @@ class Page extends ModelWithContent /** * The PageBlueprint object * - * @var PageBlueprint + * @var Kirby\Cms\PageBlueprint */ protected $blueprint; @@ -94,7 +92,7 @@ class Page extends ModelWithContent * The template, that should be loaded * if it exists * - * @var Template + * @var Kirby\Cms\Template */ protected $intendedTemplate; @@ -113,7 +111,7 @@ class Page extends ModelWithContent /** * The parent page * - * @var Page|null + * @var Kirby\Cms\Page|null */ protected $parent; @@ -127,7 +125,7 @@ class Page extends ModelWithContent /** * The parent Site object * - * @var Site|null + * @var Kirby\Cms\Site|null */ protected $site; @@ -190,7 +188,7 @@ class Page extends ModelWithContent } /** - * Improved var_dump output + * Improved `var_dump` output * * @return array */ @@ -224,9 +222,9 @@ class Page extends ModelWithContent /** * Returns the blueprint object * - * @return PageBlueprint + * @return Kirby\Cms\PageBlueprint */ - public function blueprint(): PageBlueprint + public function blueprint() { if (is_a($this->blueprint, 'Kirby\Cms\PageBlueprint') === true) { return $this->blueprint; @@ -247,7 +245,7 @@ class Page extends ModelWithContent } $blueprints = []; - $templates = $this->blueprint()->options()['changeTemplate'] ?? []; + $templates = $this->blueprint()->changeTemplate() ?? $this->blueprint()->options()['changeTemplate'] ?? []; $currentTemplate = $this->intendedTemplate()->name(); if (is_array($templates) === false) { @@ -394,7 +392,7 @@ class Page extends ModelWithContent } if ($parent = $this->parent()) { - return $this->diruri = $this->parent()->diruri() . '/' . $dirname; + return $this->diruri = $parent->diruri() . '/' . $dirname; } else { return $this->diruri = $dirname; } @@ -436,7 +434,7 @@ class Page extends ModelWithContent * @internal * @return self */ - public static function factory($props): self + public static function factory($props) { if (empty($props['model']) === false) { return static::model($props['model'], $props); @@ -479,7 +477,7 @@ class Page extends ModelWithContent * Returns the template that should be * loaded if it exists. * - * @return Template + * @return Kirby\Cms\Template */ public function intendedTemplate() { @@ -516,7 +514,7 @@ class Page extends ModelWithContent /** * Compares the current object with the given page object * - * @param Page|string $page + * @param Kirby\Cms\Page|string $page * @return bool */ public function is($page): bool @@ -619,7 +617,7 @@ class Page extends ModelWithContent /** * Checks if the page is a child of the given page * - * @param string|Page $parent + * @param Kirby\Cms\Page|string $parent * @return boolean */ public function isChildOf($parent): bool @@ -634,7 +632,7 @@ class Page extends ModelWithContent /** * Checks if the page is a descendant of the given page * - * @param string|Page $parent + * @param Kirby\Cms\Page|string $parent * @return boolean */ public function isDescendantOf($parent): bool @@ -785,6 +783,15 @@ class Page extends ModelWithContent return $this->isListed() === false; } + /** + * @deprecated 3.0.0 Use `Page::isListed()` intead + * @return bool + */ + public function isVisible(): bool + { + return $this->isListed(); + } + /** * Checks if the page access is verified. * This is only used for drafts so far. @@ -795,7 +802,10 @@ class Page extends ModelWithContent */ public function isVerified(string $token = null) { - if ($this->isDraft() === false && !$draft = $this->parents()->findBy('status', 'draft')) { + if ( + $this->isDraft() === false && + $this->parents()->findBy('status', 'draft') === null + ) { return true; } @@ -806,15 +816,6 @@ class Page extends ModelWithContent return $this->token() === $token; } - /** - * @deprecated 3.0.0 Use `Page::isListed()` intead - * @return bool - */ - public function isVisible(): bool - { - return $this->isListed(); - } - /** * Returns the root to the media folder for the page * @@ -843,7 +844,7 @@ class Page extends ModelWithContent * @internal * @param string $name * @param array $props - * @return Page + * @return self */ public static function model(string $name, array $props = []) { @@ -875,7 +876,7 @@ class Page extends ModelWithContent * * @return integer|null */ - public function num() + public function num(): ?int { return $this->num; } @@ -890,22 +891,16 @@ class Page extends ModelWithContent */ public function panelIcon(array $params = null): array { - $options = [ - 'type' => 'page', - 'ratio' => $params['ratio'] ?? null, - 'back' => $params['back'] ?? 'black', - ]; - if ($icon = $this->blueprint()->icon()) { - $options['type'] = $icon; + $params['type'] = $icon; // check for emojis if (strlen($icon) !== Str::length($icon)) { - $options['emoji'] = true; + $params['emoji'] = true; } } - return $options; + return parent::panelIcon($params); } /** @@ -921,37 +916,19 @@ class Page extends ModelWithContent } /** + * Returns the image file object based on provided query + * * @internal - * @param string|array|false $settings - * @param array|null $thumbSettings - * @return array|null + * @param string|null $query + * @return Kirby\Cms\File|Kirby\Cms\Asset|null */ - public function panelImage($settings = null, array $thumbSettings = null): ?array + protected function panelImageSource(string $query = null) { - $defaults = [ - 'ratio' => '3/2', - 'back' => 'pattern', - 'cover' => false - ]; - - // switch the image off - if ($settings === false) { - return null; + if ($query === null) { + $query = 'page.image'; } - if (is_string($settings) === true) { - $settings = [ - 'query' => $settings - ]; - } - - if ($image = $this->query($settings['query'] ?? 'page.image', 'Kirby\Cms\File')) { - $settings['url'] = $image->thumb($thumbSettings)->url(true) . '?t=' . $image->modified(); - - unset($settings['query']); - } - - return array_merge($defaults, (array)$settings); + return parent::panelImageSource($query); } /** @@ -965,6 +942,31 @@ class Page extends ModelWithContent return 'pages/' . $this->panelId(); } + /** + * Prepares the response data for page pickers + * and page fields + * + * @param array|null $params + * @return array + */ + public function panelPickerData(array $params = []): array + { + $image = $this->panelImage($params['image'] ?? []); + $icon = $this->panelIcon($image); + + return [ + 'dragText' => $this->dragText(), + 'hasChildren' => $this->hasChildren(), + 'icon' => $icon, + 'id' => $this->id(), + 'image' => $image, + 'info' => $this->toString($params['info'] ?? false), + 'link' => $this->panelUrl(true), + 'text' => $this->toString($params['text'] ?? '{{ page.title }}'), + 'url' => $this->url(), + ]; + } + /** * Returns the url to the editing view * in the panel @@ -984,7 +986,7 @@ class Page extends ModelWithContent /** * Returns the parent Page object * - * @return Page|null + * @return Kirby\Cms\Page|null */ public function parent() { @@ -1012,7 +1014,7 @@ class Page extends ModelWithContent * or the Site * * @internal - * @return Page|Site + * @return Kirby\Cms\Page|Kirby\Cms\Site */ public function parentModel() { @@ -1022,9 +1024,9 @@ class Page extends ModelWithContent /** * Returns a list of all parents and their parents recursively * - * @return Pages + * @return Kirby\Cms\Pages */ - public function parents(): Pages + public function parents() { $parents = new Pages; $page = $this->parent(); @@ -1040,7 +1042,7 @@ class Page extends ModelWithContent /** * Returns the permissions object for this page * - * @return PagePermissions + * @return Kirby\Cms\PagePermissions */ public function permissions() { @@ -1077,33 +1079,6 @@ class Page extends ModelWithContent return $url; } - /** - * Creates a string query, starting from the model - * - * @internal - * @param string|null $query - * @param string|null $expect - * @return mixed - */ - public function query(string $query = null, string $expect = null) - { - if ($query === null) { - return null; - } - - $result = Str::query($query, [ - 'kirby' => $this->kirby(), - 'site' => $this->site(), - 'page' => $this - ]); - - if ($expect !== null && is_a($result, $expect) !== true) { - return null; - } - - return $result; - } - /** * Renders the page with the given data. * @@ -1171,12 +1146,12 @@ class Page extends ModelWithContent /** * @internal - * @return Template + * @return Kirby\Cms\Template */ public function representation($type) { $kirby = $this->kirby(); - $template = $this->template(); + $template = $this->intendedTemplate(); $representation = $kirby->template($template->name(), $type); if ($representation->exists() === true) { @@ -1202,7 +1177,7 @@ class Page extends ModelWithContent * which is being used in various methods * to check for valid actions and input. * - * @return PageRules + * @return Kirby\Cms\PageRules */ protected function rules() { @@ -1214,7 +1189,7 @@ class Page extends ModelWithContent * * @param string $query * @param array $params - * @return Pages + * @return Kirby\Cms\Pages */ public function search(string $query = null, $params = []) { @@ -1227,7 +1202,7 @@ class Page extends ModelWithContent * @param array|null $blueprint * @return self */ - protected function setBlueprint(array $blueprint = null): self + protected function setBlueprint(array $blueprint = null) { if ($blueprint !== null) { $blueprint['model'] = $this; @@ -1245,7 +1220,7 @@ class Page extends ModelWithContent * @param string $dirname * @return self */ - protected function setDirname(string $dirname = null): self + protected function setDirname(string $dirname = null) { $this->dirname = $dirname; return $this; @@ -1257,7 +1232,7 @@ class Page extends ModelWithContent * @param boolean $isDraft * @return self */ - protected function setIsDraft(bool $isDraft = null): self + protected function setIsDraft(bool $isDraft = null) { $this->isDraft = $isDraft ?? false; return $this; @@ -1269,7 +1244,7 @@ class Page extends ModelWithContent * @param integer $num * @return self */ - protected function setNum(int $num = null): self + protected function setNum(int $num = null) { $this->num = $num === null ? $num : intval($num); return $this; @@ -1278,10 +1253,10 @@ class Page extends ModelWithContent /** * Sets the parent page object * - * @param Page|null $parent + * @param Kirby\Cms\Page|null $parent * @return self */ - protected function setParent(Page $parent = null): self + protected function setParent(Page $parent = null) { $this->parent = $parent; return $this; @@ -1293,7 +1268,7 @@ class Page extends ModelWithContent * @param string|null $root * @return self */ - protected function setRoot(string $root = null): self + protected function setRoot(string $root = null) { $this->root = $root; return $this; @@ -1305,7 +1280,7 @@ class Page extends ModelWithContent * @param string $slug * @return self */ - protected function setSlug(string $slug): self + protected function setSlug(string $slug) { $this->slug = $slug; return $this; @@ -1317,7 +1292,7 @@ class Page extends ModelWithContent * @param string $template * @return self */ - protected function setTemplate(string $template = null): self + protected function setTemplate(string $template = null) { if ($template !== null) { $this->intendedTemplate = $this->kirby()->template($template); @@ -1332,7 +1307,7 @@ class Page extends ModelWithContent * @param string $url * @return self */ - protected function setUrl(string $url = null): self + protected function setUrl(string $url = null) { if (is_string($url) === true) { $url = rtrim($url, '/'); @@ -1369,7 +1344,7 @@ class Page extends ModelWithContent * * @return string */ - public function status() + public function status(): string { if ($this->isDraft() === true) { return 'draft'; @@ -1385,7 +1360,7 @@ class Page extends ModelWithContent /** * Returns the final template * - * @return Template + * @return Kirby\Cms\Template */ public function template() { @@ -1405,9 +1380,9 @@ class Page extends ModelWithContent /** * Returns the title field or the slug as fallback * - * @return Field + * @return Kirby\Cms\Field */ - public function title(): Field + public function title() { return $this->content()->get('title')->or($this->slug()); } @@ -1449,25 +1424,6 @@ class Page extends ModelWithContent return sha1($this->id() . $this->template()); } - /** - * String template builder - * - * @param string|null $template - * @return string - */ - public function toString(string $template = null): string - { - if ($template === null) { - return $this->id(); - } - - return Str::template($template, [ - 'page' => $this, - 'site' => $this->site(), - 'kirby' => $this->kirby() - ]); - } - /** * Returns the UID of the page. * The UID is basically the same as the diff --git a/kirby/src/Cms/PageActions.php b/kirby/src/Cms/PageActions.php index 03fd857..496259c 100755 --- a/kirby/src/Cms/PageActions.php +++ b/kirby/src/Cms/PageActions.php @@ -3,7 +3,7 @@ namespace Kirby\Cms; use Closure; -use Kirby\Data\Data; +use Kirby\Exception\DuplicateException; use Kirby\Exception\Exception; use Kirby\Exception\InvalidArgumentException; use Kirby\Exception\LogicException; @@ -12,6 +12,15 @@ use Kirby\Toolkit\A; use Kirby\Toolkit\F; use Kirby\Toolkit\Str; +/** + * PageActions + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ trait PageActions { @@ -23,7 +32,7 @@ trait PageActions * @param int $num * @return self */ - public function changeNum(int $num = null): self + public function changeNum(int $num = null) { if ($this->isDraft() === true) { throw new LogicException('Drafts cannot change their sorting number'); @@ -63,7 +72,7 @@ trait PageActions * @param string $language * @return self */ - public function changeSlug(string $slug, string $languageCode = null): self + public function changeSlug(string $slug, string $languageCode = null) { // always sanitize the slug $slug = Str::slug($slug); @@ -90,8 +99,11 @@ trait PageActions 'root' => null ]); - // actually move stuff on disk if ($oldPage->exists() === true) { + // remove the lock of the old page + $oldPage->lock()->remove(); + + // actually move stuff on disk if (Dir::move($oldPage->root(), $newPage->root()) !== true) { throw new LogicException('The page directory cannot be moved'); } @@ -117,7 +129,7 @@ trait PageActions * @param string $language * @return self */ - protected function changeSlugForLanguage(string $slug, string $languageCode = null): self + protected function changeSlugForLanguage(string $slug, string $languageCode = null) { $language = $this->kirby()->language($languageCode); @@ -145,9 +157,9 @@ trait PageActions * * @param string $status "draft", "listed" or "unlisted" * @param integer $position Optional sorting number - * @return Page + * @return self */ - public function changeStatus(string $status, int $position = null): self + public function changeStatus(string $status, int $position = null) { switch ($status) { case 'draft': @@ -161,7 +173,7 @@ trait PageActions } } - protected function changeStatusToDraft(): self + protected function changeStatusToDraft() { $page = $this->commit('changeStatus', [$this, 'draft'], function ($page) { return $page->unpublish(); @@ -170,7 +182,11 @@ trait PageActions return $page; } - protected function changeStatusToListed(int $position = null): self + /** + * @param int $position + * @return self + */ + protected function changeStatusToListed(int $position = null) { // create a sorting number for the page $num = $this->createNum($position); @@ -191,7 +207,10 @@ trait PageActions return $page; } - protected function changeStatusToUnlisted(): self + /** + * @return self + */ + protected function changeStatusToUnlisted() { if ($this->status() === 'unlisted') { return $this; @@ -212,7 +231,7 @@ trait PageActions * @param string $template * @return self */ - public function changeTemplate(string $template): self + public function changeTemplate(string $template) { if ($template === $this->template()->name()) { return $this; @@ -259,7 +278,7 @@ trait PageActions * @param string|null $languageCode * @return self */ - public function changeTitle(string $title, string $languageCode = null): self + public function changeTitle(string $title, string $languageCode = null) { return $this->commit('changeTitle', [$this, $title, $languageCode], function ($page, $title, $languageCode) { return $page->save(['title' => $title], $languageCode); @@ -291,13 +310,76 @@ trait PageActions return $result; } + /** + * Copies the page to a new parent + * + * @param array $options + * @return Kirby\Cms\Page + */ + public function copy(array $options = []) + { + $slug = $options['slug'] ?? $this->slug(); + $isDraft = $options['isDraft'] ?? $this->isDraft(); + $parent = $options['parent'] ?? null; + $parentModel = $options['parent'] ?? $this->site(); + $num = $options['num'] ?? null; + $children = $options['children'] ?? false; + $files = $options['files'] ?? false; + + // clean up the slug + $slug = Str::slug($slug); + + if ($parentModel->findPageOrDraft($slug)) { + throw new DuplicateException([ + 'key' => 'page.duplicate', + 'data' => [ + 'slug' => $slug + ] + ]); + } + + $tmp = new static([ + 'isDraft' => $isDraft, + 'num' => $num, + 'parent' => $parent, + 'slug' => $slug, + ]); + + $ignore = []; + + // don't copy files + if ($files === false) { + foreach ($this->files() as $file) { + $ignore[] = $file->root(); + + // append all content files + array_push($ignore, ...$file->contentFiles()); + } + } + + Dir::copy($this->root(), $tmp->root(), $children, $ignore); + + $copy = $parentModel->clone()->findPageOrDraft($slug); + + // remove all translated slugs + if ($this->kirby()->multilang() === true) { + foreach ($this->kirby()->languages() as $language) { + if ($language->isDefault() === false) { + $copy = $copy->save(['slug' => null], $language->code()); + } + } + } + + return $copy; + } + /** * Creates and stores a new page * * @param array $props * @return self */ - public static function create(array $props): self + public static function create(array $props) { // clean up the slug $props['slug'] = Str::slug($props['slug'] ?? $props['content']['title'] ?? null); @@ -352,7 +434,7 @@ trait PageActions * @param array $props * @return self */ - public function createChild(array $props): self + public function createChild(array $props) { $props = array_merge($props, [ 'url' => null, @@ -381,10 +463,7 @@ trait PageActions case 'date': case 'datetime': $format = $mode === 'date' ? 'Ymd' : 'YmdHi'; - $date = $this->content()->get('date')->value(); - $time = empty($date) === true ? time() : strtotime($date); - - return date($format, $time); + return $this->date()->toDate($format, 'now'); break; case 'default': @@ -473,6 +552,31 @@ trait PageActions }); } + /** + * Duplicates the page with the given + * slug and optionally copies all files + * + * @param string $slug + * @param array $options + * @return Kirby\Cms\Page + */ + public function duplicate(string $slug = null, array $options = []) + { + + // create the slug for the duplicate + $slug = Str::slug($slug ?? $this->slug() . '-copy'); + + return $this->commit('duplicate', [$this, $slug, $options], function ($page, $slug, $options) { + return $this->copy([ + 'parent' => $this->parent(), + 'slug' => $slug, + 'isDraft' => true, + 'files' => $options['files'] ?? false, + 'children' => $options['children'] ?? false, + ]); + }); + } + public function publish() { if ($this->isDraft() === false) { @@ -508,8 +612,9 @@ trait PageActions /** * Clean internal caches + * @return self */ - public function purge(): self + public function purge() { $this->children = null; $this->blueprint = null; diff --git a/kirby/src/Cms/PageBlueprint.php b/kirby/src/Cms/PageBlueprint.php index f74ea90..296d237 100755 --- a/kirby/src/Cms/PageBlueprint.php +++ b/kirby/src/Cms/PageBlueprint.php @@ -2,6 +2,15 @@ namespace Kirby\Cms; +/** + * PageBlueprint + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ class PageBlueprint extends Blueprint { @@ -26,6 +35,7 @@ class PageBlueprint extends Blueprint 'changeTitle' => null, 'create' => null, 'delete' => null, + 'duplicate' => null, 'read' => null, 'preview' => null, 'sort' => null, diff --git a/kirby/src/Cms/PagePermissions.php b/kirby/src/Cms/PagePermissions.php index b60b64f..1f79353 100755 --- a/kirby/src/Cms/PagePermissions.php +++ b/kirby/src/Cms/PagePermissions.php @@ -2,6 +2,15 @@ namespace Kirby\Cms; +/** + * PagePermissions + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ class PagePermissions extends ModelPermissions { protected $category = 'pages'; diff --git a/kirby/src/Cms/PageRules.php b/kirby/src/Cms/PageRules.php index f0fbc75..cddb093 100755 --- a/kirby/src/Cms/PageRules.php +++ b/kirby/src/Cms/PageRules.php @@ -5,12 +5,17 @@ namespace Kirby\Cms; use Kirby\Exception\DuplicateException; use Kirby\Exception\InvalidArgumentException; use Kirby\Exception\LogicException; -use Kirby\Exception\NotFoundException; use Kirby\Exception\PermissionException; use Kirby\Toolkit\Str; /** * Validators for all page actions + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class PageRules { @@ -257,6 +262,20 @@ class PageRules return true; } + public static function duplicate(Page $page, string $slug, array $options = []): bool + { + if ($page->permissions()->duplicate() !== true) { + throw new PermissionException([ + 'key' => 'page.duplicate.permission', + 'data' => [ + 'slug' => $page->slug() + ] + ]); + } + + return true; + } + public static function update(Page $page, array $content = []): bool { if ($page->permissions()->update() !== true) { diff --git a/kirby/src/Cms/PageSiblings.php b/kirby/src/Cms/PageSiblings.php index 4a7ba80..3cc947d 100755 --- a/kirby/src/Cms/PageSiblings.php +++ b/kirby/src/Cms/PageSiblings.php @@ -2,6 +2,15 @@ namespace Kirby\Cms; +/** + * PageSiblings + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ trait PageSiblings { @@ -25,15 +34,6 @@ trait PageSiblings return $this->nextListed() !== null; } - /** - * @deprecated 3.0.0 Use `Page::hasNextListed` instead - * @return boolean - */ - public function hasNextVisible(): bool - { - return $this->hasNextListed(); - } - /** * Checks if there's a next unlisted * page in the siblings collection @@ -45,6 +45,15 @@ trait PageSiblings return $this->nextUnlisted() !== null; } + /** + * @deprecated 3.0.0 Use `Page::hasNextListed` instead + * @return boolean + */ + public function hasNextVisible(): bool + { + return $this->hasNextListed(); + } + /** * @deprecated 3.0.0 Use `Page::hasPrevUnlisted` instead * @return boolean @@ -97,7 +106,7 @@ trait PageSiblings /** * Returns the next listed page if it exists * - * @return self|null + * @return Kirby\Cms\Page|null */ public function nextListed() { @@ -107,7 +116,7 @@ trait PageSiblings /** * Returns the next unlisted page if it exists * - * @return self|null + * @return Kirby\Cms\Page|null */ public function nextUnlisted() { @@ -135,7 +144,7 @@ trait PageSiblings /** * Returns the previous listed page * - * @return self|null + * @return Kirby\Cms\Page|null */ public function prevListed() { @@ -145,7 +154,7 @@ trait PageSiblings /** * Returns the previous unlisted page * - * @return self|null + * @return Kirby\Cms\Page|null */ public function prevUnlisted() { @@ -164,7 +173,7 @@ trait PageSiblings /** * Private siblings collector * - * @return Collection + * @return Kirby\Cms\Collection */ protected function siblingsCollection() { @@ -179,7 +188,7 @@ trait PageSiblings * Returns siblings with the same template * * @param bool $self - * @return self + * @return Kirby\Cms\Pages */ public function templateSiblings(bool $self = true) { diff --git a/kirby/src/Cms/Pages.php b/kirby/src/Cms/Pages.php index fd9610e..d5a7a35 100755 --- a/kirby/src/Cms/Pages.php +++ b/kirby/src/Cms/Pages.php @@ -2,8 +2,6 @@ namespace Kirby\Cms; -use Kirby\Toolkit\F; - /** * The `$pages` object refers to a * collection of pages. The pages in this @@ -16,8 +14,9 @@ use Kirby\Toolkit\F; * * @package Kirby Cms * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class Pages extends Collection { @@ -25,7 +24,7 @@ class Pages extends Collection /** * Cache for the index * - * @var null|Pages + * @var Kirby\Cms\Pages|null */ protected $index = null; @@ -42,7 +41,7 @@ class Pages extends Collection * current collection * * @param mixed $item - * @return Pages + * @return self */ public function add($object) { @@ -65,9 +64,9 @@ class Pages extends Collection /** * Returns all audio files of all children * - * @return Files + * @return Kirby\Cms\Files */ - public function audio(): Files + public function audio() { return $this->files()->filterBy("type", "audio"); } @@ -75,13 +74,13 @@ class Pages extends Collection /** * Returns all children for each page in the array * - * @return Pages + * @return Kirby\Cms\Pages */ - public function children(): Pages + public function children() { $children = new Pages([], $this->parent); - foreach ($this->data as $pageKey => $page) { + foreach ($this->data as $page) { foreach ($page->children() as $childKey => $child) { $children->data[$childKey] = $child; } @@ -93,9 +92,9 @@ class Pages extends Collection /** * Returns all code files of all children * - * @return Files + * @return Kirby\Cms\Files */ - public function code(): Files + public function code() { return $this->files()->filterBy("type", "code"); } @@ -103,9 +102,9 @@ class Pages extends Collection /** * Returns all documents of all children * - * @return Files + * @return Kirby\Cms\Files */ - public function documents(): Files + public function documents() { return $this->files()->filterBy("type", "document"); } @@ -113,13 +112,13 @@ class Pages extends Collection /** * Fetch all drafts for all pages in the collection * - * @return Pages + * @return Kirby\Cms\Pages */ public function drafts() { $drafts = new Pages([], $this->parent); - foreach ($this->data as $pageKey => $page) { + foreach ($this->data as $page) { foreach ($page->drafts() as $draftKey => $draft) { $drafts->data[$draftKey] = $draft; } @@ -132,10 +131,10 @@ class Pages extends Collection * Creates a pages collection from an array of props * * @param array $pages - * @param Model $parent + * @param Kirby\Cms\Model $parent * @param array $inject * @param bool $draft - * @return Pages + * @return self */ public static function factory(array $pages, Model $model = null, bool $draft = false) { @@ -168,13 +167,13 @@ class Pages extends Collection /** * Returns all files of all children * - * @return Files + * @return Kirby\Cms\Files */ - public function files(): Files + public function files() { $files = new Files([], $this->parent); - foreach ($this->data as $pageKey => $page) { + foreach ($this->data as $page) { foreach ($page->files() as $fileKey => $file) { $files->data[$fileKey] = $file; } @@ -188,10 +187,10 @@ class Pages extends Collection * This works recursively for children and * children of children, etc. * - * @param string $id + * @param string|null $id * @return mixed */ - public function findById($id) + public function findById(string $id = null) { // remove trailing or leading slashes $id = trim($id, '/'); @@ -228,10 +227,11 @@ class Pages extends Collection * Finds a child or child of a child recursively. * * @param string $id - * @param string $startAt + * @param string|null $startAt + * @param bool $multiLang * @return mixed */ - public function findByIdRecursive($id, $startAt = null, bool $multiLang = false) + public function findByIdRecursive(string $id, string $startAt = null, bool $multiLang = false) { $path = explode('/', $id); $collection = $this; @@ -259,10 +259,10 @@ class Pages extends Collection /** * Uses the specialized find by id method * - * @param string $key + * @param string|null $key * @return mixed */ - public function findByKey($key) + public function findByKey(string $key = null) { return $this->findById($key); } @@ -271,7 +271,7 @@ class Pages extends Collection * Alias for Pages::findById * * @param string $id - * @return Page|null + * @return Kirby\Cms\Page|null */ public function findByUri(string $id) { @@ -281,7 +281,7 @@ class Pages extends Collection /** * Finds the currently open page * - * @return Page|null + * @return Kirby\Cms\Page|null */ public function findOpen() { @@ -293,7 +293,7 @@ class Pages extends Collection * extension pages * * @param string $key - * @return Page|null + * @return Kirby\Cms\Page|null */ public function get($key, $default = null) { @@ -311,9 +311,9 @@ class Pages extends Collection /** * Returns all images of all children * - * @return Files + * @return Kirby\Cms\Files */ - public function images(): Files + public function images() { return $this->files()->filterBy("type", "image"); } @@ -323,9 +323,9 @@ class Pages extends Collection * pages and subpages, etc. * * @param bool $drafts - * @return Pages + * @return Kirby\Cms\Pages */ - public function index(bool $drafts = false): Pages + public function index(bool $drafts = false) { if (is_a($this->index, 'Kirby\Cms\Pages') === true) { return $this->index; @@ -349,7 +349,7 @@ class Pages extends Collection * * @return self */ - public function invisible(): self + public function invisible() { return $this->filterBy('isUnlisted', '==', true); } @@ -357,9 +357,9 @@ class Pages extends Collection /** * Returns all listed pages in the collection * - * @return self + * @return Kirby\Cms\Pages */ - public function listed(): self + public function listed() { return $this->filterBy('isListed', '==', true); } @@ -367,9 +367,9 @@ class Pages extends Collection /** * Returns all unlisted pages in the collection * - * @return self + * @return Kirby\Cms\Pages */ - public function unlisted(): self + public function unlisted() { return $this->filterBy('isUnlisted', '==', true); } @@ -379,7 +379,7 @@ class Pages extends Collection * * @return self */ - public function merge(...$args): self + public function merge(...$args) { // merge multiple arguments at once if (count($args) > 1) { @@ -441,9 +441,9 @@ class Pages extends Collection /* * Returns all listed and unlisted pages in the collection * - * @return self + * @return Kirby\Cms\Pages */ - public function published(): self + public function published() { return $this->filterBy('isDraft', '==', false); } @@ -451,10 +451,10 @@ class Pages extends Collection /** * Filter all pages by the given template * - * @param null|string|array $template - * @return self + * @param string|array $templates + * @return Kirby\Cms\Pages */ - public function template($templates): self + public function template($templates) { if (empty($templates) === true) { return $this; @@ -472,9 +472,9 @@ class Pages extends Collection /** * Returns all video files of all children * - * @return Files + * @return Kirby\Cms\Files */ - public function videos(): Files + public function videos() { return $this->files()->filterBy("type", "video"); } @@ -482,9 +482,9 @@ class Pages extends Collection /** * Deprecated alias for Pages::listed() * - * @return self + * @return Kirby\Cms\Pages */ - public function visible(): self + public function visible() { return $this->filterBy('isListed', '==', true); } diff --git a/kirby/src/Cms/Pagination.php b/kirby/src/Cms/Pagination.php index 28b95d1..e9403b4 100755 --- a/kirby/src/Cms/Pagination.php +++ b/kirby/src/Cms/Pagination.php @@ -16,8 +16,9 @@ use Kirby\Toolkit\Pagination as BasePagination; * * @package Kirby Cms * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class Pagination extends BasePagination { @@ -117,9 +118,9 @@ class Pagination extends BasePagination * Returns the Url for the next page. * Returns null if there's no next page. * - * @return string + * @return string|null */ - public function nextPageUrl() + public function nextPageUrl(): ?string { if ($page = $this->nextPage()) { return $this->pageUrl($page); @@ -129,13 +130,14 @@ class Pagination extends BasePagination } /** - * Returns the Url of the current page. - * If the $page variable is set, the Url + * Returns the URL of the current page. + * If the `$page` variable is set, the URL * for that page will be returned. * + * @param int|null $page * @return string|null */ - public function pageUrl(int $page = null) + public function pageUrl(int $page = null): ?string { if ($page === null) { return $this->pageUrl($this->page()); @@ -163,9 +165,9 @@ class Pagination extends BasePagination * Returns the Url for the previous page. * Returns null if there's no previous page. * - * @return string + * @return string|null */ - public function prevPageUrl() + public function prevPageUrl(): ?string { if ($page = $this->prevPage()) { return $this->pageUrl($page); diff --git a/kirby/src/Cms/Panel.php b/kirby/src/Cms/Panel.php index 40f8cd2..fdd3e2b 100755 --- a/kirby/src/Cms/Panel.php +++ b/kirby/src/Cms/Panel.php @@ -15,6 +15,12 @@ use Throwable; * a working panel view with all the right URLs * and other panel options. The view template is * located in `kirby/views/panel.php` + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class Panel { @@ -23,7 +29,7 @@ class Panel * Links all dist files in the media folder * and returns the link to the requested asset * - * @param App $kirby + * @param Kirby\Cms\App $kirby * @return bool */ public static function link(App $kirby): bool @@ -45,7 +51,7 @@ class Panel Dir::make($mediaRoot, true); // create a symlink to the dist folder - if (Dir::copy($kirby->root('panel') . '/dist', $versionRoot) !== true) { + if (Dir::copy($panelRoot, $versionRoot) !== true) { throw new Exception('Panel assets could not be linked'); } @@ -55,10 +61,10 @@ class Panel /** * Renders the main panel view * - * @param App $kirby - * @return Response + * @param Kirby\Cms\App $kirby + * @return Kirby\Cms\Response */ - public static function render(App $kirby): Response + public static function render(App $kirby) { try { if (static::link($kirby) === true) { @@ -72,15 +78,15 @@ class Panel // get the uri object for the panel url $uri = new Uri($url = $kirby->url('panel')); - $pluginCss = new PanelPlugins('css'); - $pluginJs = new PanelPlugins('js'); + // fetch all plugins + $plugins = new PanelPlugins(); $view = new View($kirby->root('kirby') . '/views/panel.php', [ 'kirby' => $kirby, 'config' => $kirby->option('panel'), 'assetUrl' => $kirby->url('media') . '/panel/' . $kirby->versionHash(), - 'pluginCss' => $pluginCss->url(), - 'pluginJs' => $pluginJs->url(), + 'pluginCss' => $plugins->url('css'), + 'pluginJs' => $plugins->url('js'), 'icons' => F::read($kirby->root('panel') . '/dist/img/icons.svg'), 'panelUrl' => $uri->path()->toString(true) . '/', 'options' => [ diff --git a/kirby/src/Cms/PanelPlugins.php b/kirby/src/Cms/PanelPlugins.php index d937760..088a504 100755 --- a/kirby/src/Cms/PanelPlugins.php +++ b/kirby/src/Cms/PanelPlugins.php @@ -9,6 +9,12 @@ use Kirby\Toolkit\F; * The PanelPlugins class takes care of collecting * js and css plugin files for the panel and caches * them in the media folder + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class PanelPlugins { @@ -20,30 +26,6 @@ class PanelPlugins */ public $files; - /** - * Cache of the unique plugin hash for the url and root - * - * @var string - */ - public $hash; - - /** - * css or js - * - * @var string - */ - public $type; - - /** - * Creates a new panel plugin instance by type (css or js) - * - * @param string $type - */ - public function __construct(string $type) - { - $this->type = $type; - } - /** * Collects and returns the plugin files for all plugins * @@ -58,84 +40,13 @@ class PanelPlugins $this->files = []; foreach (App::instance()->plugins() as $plugin) { - $file = $plugin->root() . '/index.' . $this->type; - - if (file_exists($file) === true) { - $this->files[] = $file; - } + $this->files[] = $plugin->root() . '/index.css'; + $this->files[] = $plugin->root() . '/index.js'; } return $this->files; } - /** - * Checks if the cache exists - * - * @return boolean - */ - public function exist(): bool - { - return file_exists($this->root()); - } - - /** - * Returns the path to the cache folder - * - * @return string - */ - public function folder(): string - { - return 'panel/' . App::versionHash() . '/plugins/' . $this->type; - } - - /** - * Collects and removes garbage from old plugin versions - * - * @return boolean - */ - public function gc(): bool - { - $folder = App::instance()->root('media') . '/' . $this->folder(); - - foreach (glob($folder . '/*') as $dir) { - $name = basename($dir); - - if ($name !== $this->hash()) { - Dir::remove($dir); - } - } - - return true; - } - - /** - * Returns the unique hash for the cache file - * The hash is generated from all plugin filenames - * and the max modification date to make sure changes - * will always be cached properly - * - * @return string - */ - public function hash(): string - { - if ($this->hash !== null) { - return $this->hash; - } - - return $this->hash = $this->id() . '-' . $this->modified(); - } - - /** - * Returns a unique id based on all - * plugin file roots - * - * @return string - */ - public function id(): string - { - return hash('crc32', implode(array_values($this->files()))); - } - /** * Returns the last modification * of the collected plugin files @@ -154,79 +65,36 @@ class PanelPlugins return max($modified); } - /** - * Returns the full path to the cache file - * This is used for the root and url methods - * - * @return string - */ - public function path(): string - { - return $this->folder() . '/' . $this->hash() . '/index.' . $this->type; - } - /** * Read the files from all plugins and concatenate them * + * @param string $type * @return string */ - public function read(): string + public function read(string $type): string { $dist = []; foreach ($this->files() as $file) { - $dist[] = file_get_contents($file); + if (F::extension($file) === $type) { + if ($content = F::read($file)) { + $dist[] = $content; + } + } } return implode(PHP_EOL, $dist); } - /** - * Checks if the cache exists and - * otherwise (re)creates it - * - * @return boolean - */ - public function publish(): bool - { - if ($this->exist() === true) { - return true; - } - - $this->write(); - $this->gc(); - - return true; - } - - /** - * Absolute path to the cache file - * - * @return string - */ - public function root(): string - { - return App::instance()->root('media') . '/' . $this->path(); - } - /** * Absolute url to the cache file * This is used by the panel to link the plugins * + * @param string $type * @return string */ - public function url(): string + public function url(string $type): string { - return App::instance()->url('media') . '/' . $this->path(); - } - - /** - * Creates the cache file - * - * @return boolean - */ - public function write(): bool - { - return F::write($this->root(), $this->read()); + return App::instance()->url('media') . '/plugins/index.' . $type . '?' . $this->modified(); } } diff --git a/kirby/src/Cms/Permissions.php b/kirby/src/Cms/Permissions.php index 66ab719..48891ec 100755 --- a/kirby/src/Cms/Permissions.php +++ b/kirby/src/Cms/Permissions.php @@ -8,6 +8,12 @@ use Kirby\Exception\InvalidArgumentException; * Handles permission definition in each user * blueprint and wraps a couple useful methods * around it to check for available permissions. + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class Permissions { @@ -36,6 +42,7 @@ class Permissions 'changeTitle' => true, 'create' => true, 'delete' => true, + 'duplicate' => true, 'preview' => true, 'read' => true, 'sort' => true, @@ -68,16 +75,16 @@ class Permissions public function __construct($settings = []) { - if (is_bool($settings) === true) { - return $this->setAll($settings); - } - if (is_array($settings) === true) { return $this->setCategories($settings); } + + if (is_bool($settings) === true) { + return $this->setAll($settings); + } } - public function for(string $category = null, string $action = null) + public function for(string $category = null, string $action = null): bool { if ($action === null) { if ($this->hasCategory($category) === false) { @@ -94,12 +101,12 @@ class Permissions return $this->actions[$category][$action]; } - protected function hasAction(string $category, string $action) + protected function hasAction(string $category, string $action): bool { return $this->hasCategory($category) === true && array_key_exists($action, $this->actions[$category]) === true; } - protected function hasCategory(string $category) + protected function hasCategory(string $category): bool { return array_key_exists($category, $this->actions) === true; } diff --git a/kirby/src/Cms/Plugin.php b/kirby/src/Cms/Plugin.php index 3185cce..e0dedc5 100755 --- a/kirby/src/Cms/Plugin.php +++ b/kirby/src/Cms/Plugin.php @@ -5,12 +5,17 @@ namespace Kirby\Cms; use Exception; use Kirby\Data\Data; use Kirby\Exception\InvalidArgumentException; -use Kirby\Toolkit\F; /** * Represents a Plugin and handles parsing of * the composer.json. It also creates the prefix * and media url for the plugin. + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class Plugin extends Model { @@ -89,6 +94,10 @@ class Plugin extends Model return $this->root; } + /** + * @param string $name + * @return self + */ protected function setName(string $name) { if (preg_match('!^[a-z0-9-]+\/[a-z0-9-]+$!i', $name) == false) { diff --git a/kirby/src/Cms/PluginAssets.php b/kirby/src/Cms/PluginAssets.php index 1b4a240..63bb35a 100755 --- a/kirby/src/Cms/PluginAssets.php +++ b/kirby/src/Cms/PluginAssets.php @@ -10,6 +10,12 @@ use Kirby\Toolkit\F; * Plugin assets are automatically copied/linked * to the media folder, to make them publicly * available. This class handles the magic around that. + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class PluginAssets { @@ -19,7 +25,7 @@ class PluginAssets * @param string $pluginName * @return void */ - public static function clean(string $pluginName) + public static function clean(string $pluginName): void { if ($plugin = App::instance()->plugin($pluginName)) { $root = $plugin->root() . '/assets'; @@ -48,7 +54,7 @@ class PluginAssets * * @param string $pluginName * @param string $filename - * @return string + * @return Kirby\Cms\Response|null */ public static function resolve(string $pluginName, string $filename) { diff --git a/kirby/src/Cms/R.php b/kirby/src/Cms/R.php index 6af244b..53dafe6 100755 --- a/kirby/src/Cms/R.php +++ b/kirby/src/Cms/R.php @@ -7,11 +7,17 @@ use Kirby\Toolkit\Facade; /** * Shortcut to the request object + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class R extends Facade { /** - * @return Request + * @return Kirby\Cms\Request */ public static function instance() { diff --git a/kirby/src/Cms/Responder.php b/kirby/src/Cms/Responder.php index 253446a..3df0804 100755 --- a/kirby/src/Cms/Responder.php +++ b/kirby/src/Cms/Responder.php @@ -7,6 +7,12 @@ use Kirby\Toolkit\Str; /** * Global response configuration + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class Responder { @@ -46,7 +52,7 @@ class Responder */ public function __toString(): string { - return $this->send(); + return (string)$this->send(); } /** @@ -85,9 +91,8 @@ class Responder * Construct response from an array * * @param array $response - * @return self */ - public function fromArray(array $response) + public function fromArray(array $response): void { $this->body($response['body'] ?? null); $this->code($response['code'] ?? null); @@ -137,7 +142,7 @@ class Responder * Shortcut to configure a json response * * @param array $json - * @return self + * @return string|self */ public function json(array $json = null) { @@ -169,7 +174,7 @@ class Responder * Creates and returns the response object from the config * * @param string|null $body - * @return Response + * @return Kirby\Cms\Response */ public function send(string $body = null) { diff --git a/kirby/src/Cms/Response.php b/kirby/src/Cms/Response.php index 8810a09..feb3411 100755 --- a/kirby/src/Cms/Response.php +++ b/kirby/src/Cms/Response.php @@ -2,15 +2,17 @@ namespace Kirby\Cms; -use Kirby\Exception\InvalidArgumentException; -use Kirby\Exception\NotFoundException; -use Kirby\Http\Response as BaseResponse; - /** * Custom response object with an optimized * redirect method to build correct Urls + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ -class Response extends BaseResponse +class Response extends \Kirby\Http\Response { /** diff --git a/kirby/src/Cms/Role.php b/kirby/src/Cms/Role.php index ae2edd4..75834bc 100755 --- a/kirby/src/Cms/Role.php +++ b/kirby/src/Cms/Role.php @@ -4,13 +4,18 @@ namespace Kirby\Cms; use Exception; use Kirby\Data\Data; -use Kirby\Exception\NotFoundException; use Kirby\Toolkit\F; use Kirby\Toolkit\I18n; /** * Represents a User role with attached * permissions. Roles are defined by user blueprints. + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class Role extends Model { @@ -25,7 +30,7 @@ class Role extends Model } /** - * Improved var_dump() output + * Improved `var_dump` output * * @return array */ @@ -48,19 +53,19 @@ class Role extends Model } } - protected static function defaults() + protected static function defaults(): array { return [ 'admin' => [ - 'description' => 'The admin has all rights', 'name' => 'admin', - 'title' => 'Admin', + 'description' => I18n::translate('role.admin.description'), + 'title' => I18n::translate('role.admin.title'), 'permissions' => true, ], 'nobody' => [ - 'description' => 'This is a fallback role without any permissions', 'name' => 'nobody', - 'title' => 'Nobody', + 'description' => I18n::translate('role.nobody.description'), + 'title' => I18n::translate('role.nobody.title'), 'permissions' => false, ] ]; @@ -71,7 +76,12 @@ class Role extends Model return $this->description; } - public static function factory(array $props, array $inject = []): self + /** + * @param array $props + * @param array $inject + * @return self + */ + public static function factory(array $props, array $inject = []) { return new static($props + $inject); } @@ -91,7 +101,12 @@ class Role extends Model return $this->name() === 'nobody'; } - public static function load(string $file, array $inject = []): self + /** + * @param string $file + * @param array $inject + * @return self + */ + public static function load(string $file, array $inject = []) { $data = Data::read($file); $data['name'] = F::name($file); @@ -104,6 +119,10 @@ class Role extends Model return $this->name; } + /** + * @param array $inject + * @return self + */ public static function nobody(array $inject = []) { try { @@ -113,30 +132,49 @@ class Role extends Model } } - public function permissions(): Permissions + /** + * @return Kirby\Cms\Permissions + */ + public function permissions() { return $this->permissions; } - protected function setDescription($description = null): self + /** + * @param [type] $description + * @return self + */ + protected function setDescription($description = null) { $this->description = I18n::translate($description, $description); return $this; } - protected function setName(string $name): self + /** + * @param string $name + * @return self + */ + protected function setName(string $name) { $this->name = $name; return $this; } - protected function setPermissions($permissions = null): self + /** + * @param [type] $permissions + * @return self + */ + protected function setPermissions($permissions = null) { $this->permissions = new Permissions($permissions); return $this; } - protected function setTitle($title = null): self + /** + * @param [type] $title + * @return self + */ + protected function setTitle($title = null) { $this->title = I18n::translate($title, $title); return $this; diff --git a/kirby/src/Cms/Roles.php b/kirby/src/Cms/Roles.php index aab9543..90604d3 100755 --- a/kirby/src/Cms/Roles.php +++ b/kirby/src/Cms/Roles.php @@ -3,7 +3,6 @@ namespace Kirby\Cms; use Kirby\Toolkit\Dir; -use Kirby\Toolkit\F; /** * Extension of the Collection class that @@ -12,10 +11,22 @@ use Kirby\Toolkit\F; * collection with Role objects. It also has * a `Roles::load()` method that handles loading * role definitions from disk. + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class Roles extends Collection { - public static function factory(array $roles, array $inject = []): self + + /** + * @param array $roles + * @param array $inject + * @return self + */ + public static function factory(array $roles, array $inject = []) { $collection = new static; @@ -34,7 +45,12 @@ class Roles extends Collection return $collection->sortBy('name', 'asc'); } - public static function load(string $root = null, array $inject = []): self + /** + * @param string $root + * @param array $inject + * @return self + */ + public static function load(string $root = null, array $inject = []) { $roles = new static; diff --git a/kirby/src/Cms/S.php b/kirby/src/Cms/S.php index 1682883..1d27cf4 100755 --- a/kirby/src/Cms/S.php +++ b/kirby/src/Cms/S.php @@ -7,11 +7,17 @@ use Kirby\Toolkit\Facade; /** * Shortcut to the session object + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class S extends Facade { /** - * @return Session + * @return Kirby\Session\Session */ public static function instance() { diff --git a/kirby/src/Cms/Search.php b/kirby/src/Cms/Search.php index ab6f863..435e952 100755 --- a/kirby/src/Cms/Search.php +++ b/kirby/src/Cms/Search.php @@ -9,9 +9,21 @@ use Kirby\Toolkit\Str; * search logic from collections, to * provide a more globally usable interface * for any searches. + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class Search { + + /** + * @param string $query + * @param array $params + * @return Kirby\Cms\Files + */ public static function files(string $query = null, $params = []) { return App::instance()->site()->index()->files()->search($query, $params); @@ -111,11 +123,21 @@ class Search return $results->sortBy('searchScore', 'desc'); } + /** + * @param string $query + * @param array $params + * @return Kirby\Cms\Pages + */ public static function pages(string $query = null, $params = []) { return App::instance()->site()->index()->search($query, $params); } + /** + * @param string $query + * @param array $params + * @return Kirby\Cms\Users + */ public static function users(string $query = null, $params = []) { return App::instance()->users()->search($query, $params); diff --git a/kirby/src/Cms/Section.php b/kirby/src/Cms/Section.php index 1212431..0abd867 100755 --- a/kirby/src/Cms/Section.php +++ b/kirby/src/Cms/Section.php @@ -5,6 +5,15 @@ namespace Kirby\Cms; use Kirby\Exception\InvalidArgumentException; use Kirby\Toolkit\Component; +/** + * Section + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ class Section extends Component { @@ -36,11 +45,17 @@ class Section extends Component parent::__construct($type, $attrs); } + /** + * @return Kirby\Cms\App + */ public function kirby() { return $this->model->kirby(); } + /** + * @return Kirby\Cms\Model + */ public function model() { return $this->model; diff --git a/kirby/src/Cms/Site.php b/kirby/src/Cms/Site.php index b659082..b0cd2f0 100755 --- a/kirby/src/Cms/Site.php +++ b/kirby/src/Cms/Site.php @@ -2,7 +2,6 @@ namespace Kirby\Cms; -use Kirby\Exception\Exception; use Kirby\Exception\InvalidArgumentException; use Kirby\Exception\LogicException; use Kirby\Toolkit\A; @@ -16,8 +15,9 @@ use Kirby\Toolkit\Str; * * @package Kirby Cms * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class Site extends ModelWithContent { @@ -128,7 +128,7 @@ class Site extends ModelWithContent } /** - * Improved var_dump output + * Improved `var_dump` output * * @return array */ @@ -160,9 +160,9 @@ class Site extends ModelWithContent /** * Returns the blueprint object * - * @return SiteBlueprint + * @return Kirby\Cms\SiteBlueprint */ - public function blueprint(): SiteBlueprint + public function blueprint() { if (is_a($this->blueprint, 'Kirby\Cms\SiteBlueprint') === true) { return $this->blueprint; @@ -200,7 +200,7 @@ class Site extends ModelWithContent /** * Builds a breadcrumb collection * - * @return Pages + * @return Kirby\Cms\Pages */ public function breadcrumb() { @@ -243,7 +243,7 @@ class Site extends ModelWithContent /** * Returns the error page object * - * @return Page + * @return Kirby\Cms\Page|null */ public function errorPage() { @@ -282,7 +282,7 @@ class Site extends ModelWithContent /** * Returns the home page object * - * @return Page + * @return Kirby\Cms\Page|null */ public function homePage() { @@ -334,7 +334,7 @@ class Site extends ModelWithContent /** * Compares the current object with the given site object * - * @param Site $site + * @param mixed $site * @return bool */ public function is($site): bool @@ -391,7 +391,7 @@ class Site extends ModelWithContent * it can be found. (see `Site::homePage()`) * * @param string $path - * @return Page|null + * @return Kirby\Cms\Page|null */ public function page(string $path = null) { @@ -413,9 +413,9 @@ class Site extends ModelWithContent /** * Alias for `Site::children()` * - * @return Pages + * @return Kirby\Cms\Pages */ - public function pages(): Pages + public function pages() { return $this->children(); } @@ -451,7 +451,7 @@ class Site extends ModelWithContent /** * Returns the permissions object for this site * - * @return SitePermissions + * @return Kirby\Cms\SitePermissions */ public function permissions() { @@ -459,29 +459,26 @@ class Site extends ModelWithContent } /** - * Creates a string query, starting from the model + * Preview Url * * @internal - * @param string|null $query - * @param string|null $expect - * @return mixed + * @return string|null */ - public function query(string $query = null, string $expect = null) + public function previewUrl(): ?string { - if ($query === null) { + $preview = $this->blueprint()->preview(); + + if ($preview === false) { return null; } - $result = Str::query($query, [ - 'kirby' => $this->kirby(), - 'site' => $this, - ]); - - if ($expect !== null && is_a($result, $expect) !== true) { - return null; + if ($preview === true) { + $url = $this->url(); + } else { + $url = $preview; } - return $result; + return $url; } /** @@ -499,7 +496,7 @@ class Site extends ModelWithContent * which is being used in various methods * to check for valid actions and input. * - * @return SiteRules + * @return Kirby\Cms\SiteRules */ protected function rules() { @@ -511,7 +508,7 @@ class Site extends ModelWithContent * * @param string $query * @param array $params - * @return Pages + * @return Kirby\Cms\Pages */ public function search(string $query = null, $params = []) { @@ -524,7 +521,7 @@ class Site extends ModelWithContent * @param array|null $blueprint * @return self */ - protected function setBlueprint(array $blueprint = null): self + protected function setBlueprint(array $blueprint = null) { if ($blueprint !== null) { $blueprint['model'] = $this; @@ -543,7 +540,7 @@ class Site extends ModelWithContent * @param string $id * @return self */ - protected function setErrorPageId(string $id = 'error'): self + protected function setErrorPageId(string $id = 'error') { $this->errorPageId = $id; return $this; @@ -558,7 +555,7 @@ class Site extends ModelWithContent * @param string $id * @return self */ - protected function setHomePageId(string $id = 'home'): self + protected function setHomePageId(string $id = 'home') { $this->homePageId = $id; return $this; @@ -568,10 +565,10 @@ class Site extends ModelWithContent * Sets the current page object * * @internal - * @param Page|null $page + * @param Kirby\Cms\Page|null $page * @return self */ - public function setPage(Page $page = null): self + public function setPage(Page $page = null) { $this->page = $page; return $this; @@ -581,9 +578,9 @@ class Site extends ModelWithContent * Sets the Url * * @param string $url - * @return void + * @return self */ - protected function setUrl($url = null): self + protected function setUrl($url = null) { $this->url = $url; return $this; @@ -609,24 +606,6 @@ class Site extends ModelWithContent ]; } - /** - * String template builder - * - * @param string|null $template - * @return string - */ - public function toString(string $template = null): string - { - if ($template === null) { - return $this->url(); - } - - return Str::template($template, [ - 'site' => $this, - 'kirby' => $this->kirby() - ]); - } - /** * Returns the Url * @@ -665,11 +644,11 @@ class Site extends ModelWithContent * returns the current page * * @internal - * @param string|Page $page + * @param string|Kirby\Cms\Page $page * @param string|null $languageCode - * @return Page + * @return Kirby\Cms\Page */ - public function visit($page, string $languageCode = null): Page + public function visit($page, string $languageCode = null) { if ($languageCode !== null) { $this->kirby()->setCurrentTranslation($languageCode); diff --git a/kirby/src/Cms/SiteActions.php b/kirby/src/Cms/SiteActions.php index bf6a859..1edf438 100755 --- a/kirby/src/Cms/SiteActions.php +++ b/kirby/src/Cms/SiteActions.php @@ -3,11 +3,16 @@ namespace Kirby\Cms; use Closure; -use Kirby\Data\Data; -use Kirby\Exception\InvalidArgumentException; -use Kirby\Toolkit\F; -use Kirby\Toolkit\Str; +/** + * SiteActions + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ trait SiteActions { @@ -44,7 +49,7 @@ trait SiteActions * @param string|null $languageCode * @return self */ - public function changeTitle(string $title, string $languageCode = null): self + public function changeTitle(string $title, string $languageCode = null) { return $this->commit('changeTitle', [$this, $title, $languageCode], function ($site, $title, $languageCode) { return $site->save(['title' => $title], $languageCode); @@ -55,7 +60,7 @@ trait SiteActions * Creates a main page * * @param array $props - * @return Page + * @return Kirby\Cms\Page */ public function createChild(array $props) { @@ -71,8 +76,10 @@ trait SiteActions /** * Clean internal caches + * + * @return self */ - public function purge(): self + public function purge() { $this->children = null; $this->blueprint = null; diff --git a/kirby/src/Cms/SiteBlueprint.php b/kirby/src/Cms/SiteBlueprint.php index 879832d..a98910d 100755 --- a/kirby/src/Cms/SiteBlueprint.php +++ b/kirby/src/Cms/SiteBlueprint.php @@ -5,9 +5,21 @@ namespace Kirby\Cms; /** * Extension of the basic blueprint class * to handle the blueprint for the site. + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class SiteBlueprint extends Blueprint { + /** + * Creates a new page blueprint object + * with the given props + * + * @param array $props + */ public function __construct(array $props) { parent::__construct($props); @@ -26,4 +38,23 @@ class SiteBlueprint extends Blueprint ] ); } + + /** + * Returns the preview settings + * The preview setting controlls the "Open" + * button in the panel and redirects it to a + * different URL if necessary. + * + * @return string|boolean + */ + public function preview() + { + $preview = $this->props['options']['preview'] ?? true; + + if (is_string($preview) === true) { + return $this->model->toString($preview); + } + + return $preview; + } } diff --git a/kirby/src/Cms/SitePermissions.php b/kirby/src/Cms/SitePermissions.php index b3c09d1..aa61ea8 100755 --- a/kirby/src/Cms/SitePermissions.php +++ b/kirby/src/Cms/SitePermissions.php @@ -2,6 +2,15 @@ namespace Kirby\Cms; +/** + * SitePermissions + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ class SitePermissions extends ModelPermissions { protected $category = 'site'; diff --git a/kirby/src/Cms/SiteRules.php b/kirby/src/Cms/SiteRules.php index 5742f9f..2a02220 100755 --- a/kirby/src/Cms/SiteRules.php +++ b/kirby/src/Cms/SiteRules.php @@ -2,11 +2,16 @@ namespace Kirby\Cms; -use Exception; use Kirby\Exception\PermissionException; /** * Validators for all site actions + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class SiteRules { diff --git a/kirby/src/Cms/Structure.php b/kirby/src/Cms/Structure.php index 94a06ee..d770bb5 100755 --- a/kirby/src/Cms/Structure.php +++ b/kirby/src/Cms/Structure.php @@ -2,8 +2,6 @@ namespace Kirby\Cms; -use Kirby\Exception\InvalidArgumentException; - /** * The Structure class wraps * array data into a nicely chainable @@ -14,8 +12,9 @@ use Kirby\Exception\InvalidArgumentException; * * @package Kirby Cms * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class Structure extends Collection { diff --git a/kirby/src/Cms/StructureObject.php b/kirby/src/Cms/StructureObject.php index 666d0ca..1559d2f 100755 --- a/kirby/src/Cms/StructureObject.php +++ b/kirby/src/Cms/StructureObject.php @@ -14,8 +14,9 @@ namespace Kirby\Cms; * * @package Kirby Cms * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class StructureObject extends Model { @@ -76,9 +77,9 @@ class StructureObject extends Model /** * Returns the content * - * @return Content + * @return Kirby\Cms\Content */ - public function content(): Content + public function content() { if (is_a($this->content, 'Kirby\Cms\Content') === true) { return $this->content; @@ -119,7 +120,7 @@ class StructureObject extends Model /** * Returns the parent Model object * - * @return Page|Site|File|User + * @return Kirby\Cms\Model */ public function parent() { @@ -132,7 +133,7 @@ class StructureObject extends Model * @param array|null $content * @return self */ - protected function setContent(array $content = null): self + protected function setContent(array $content = null) { $this->content = $content; return $this; @@ -147,7 +148,7 @@ class StructureObject extends Model * @param string $id * @return self */ - protected function setId(string $id): self + protected function setId(string $id) { $this->id = $id; return $this; @@ -157,10 +158,10 @@ class StructureObject extends Model * Sets the parent Model. This can either be a * Page, Site, File or User object * - * @param Page|Site|File|User|null $parent + * @param Kirby\Cms\Model|null $parent * @return self */ - protected function setParent(Model $parent = null): self + protected function setParent(Model $parent = null) { $this->parent = $parent; return $this; @@ -169,10 +170,10 @@ class StructureObject extends Model /** * Sets the parent Structure collection * - * @param Structure $structure + * @param Kirby\Cms\Structure $structure * @return self */ - protected function setStructure(Structure $structure = null): self + protected function setStructure(Structure $structure = null) { $this->structure = $structure; return $this; @@ -181,7 +182,7 @@ class StructureObject extends Model /** * Returns the parent Structure collection as siblings * - * @return Structure + * @return Kirby\Cms\Structure */ protected function siblingsCollection() { diff --git a/kirby/src/Cms/System.php b/kirby/src/Cms/System.php index cd753c0..4a466de 100755 --- a/kirby/src/Cms/System.php +++ b/kirby/src/Cms/System.php @@ -5,6 +5,7 @@ namespace Kirby\Cms; use Throwable; use Kirby\Data\Json; use Kirby\Exception\Exception; +use Kirby\Exception\InvalidArgumentException; use Kirby\Exception\PermissionException; use Kirby\Http\Remote; use Kirby\Http\Uri; @@ -12,6 +13,7 @@ use Kirby\Http\Url; use Kirby\Toolkit\Dir; use Kirby\Toolkit\F; use Kirby\Toolkit\Str; +use Kirby\Toolkit\V; /** * The System class gathers all information @@ -20,6 +22,12 @@ use Kirby\Toolkit\Str; * * This is mostly used by the panel installer * to check if the panel can be installed at all. + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class System { @@ -30,7 +38,7 @@ class System protected $app; /** - * @param App $app + * @param Kirby\Cms\App $app */ public function __construct(App $app) { @@ -41,7 +49,7 @@ class System } /** - * Improved var_dump output + * Improved `var_dump` output * * @return array */ @@ -99,6 +107,29 @@ class System return extension_loaded('curl'); } + /** + * Returns the app's human-readable + * index URL without scheme + * + * @return string + */ + public function indexUrl(): string + { + $url = $this->app->url('index'); + + if (Url::isAbsolute($url)) { + $uri = Url::toObject($url); + } else { + // index URL was configured without host, use the current host + $uri = Uri::current([ + 'path' => $url, + 'query' => null + ]); + } + + return $uri->setScheme(null)->setSlash(false)->toString(); + } + /** * Create the most important folders * if they don't exist yet @@ -194,29 +225,6 @@ class System return in_array(false, array_values($this->status()), true) === false; } - /** - * Returns the app's index URL for - * licensing purposes without scheme - * - * @return string - */ - protected function licenseUrl(): string - { - $url = $this->app->url('index'); - - if (Url::isAbsolute($url)) { - $uri = Url::toObject($url); - } else { - // index URL was configured without host, use the current host - $uri = Uri::current([ - 'path' => $url, - 'query' => null - ]); - } - - return $uri->setScheme(null)->setSlash(false)->toString(); - } - /** * Normalizes the app's index URL for * licensing purposes @@ -224,10 +232,10 @@ class System * @param string|null $url Input URL, by default the app's index URL * @return string Normalized URL */ - protected function licenseUrlNormalized(string $url = null): string + protected function licenseUrl(string $url = null): string { if ($url === null) { - $url = $this->licenseUrl(); + $url = $this->indexUrl(); } // remove common "testing" subdomains as well as www. @@ -300,7 +308,7 @@ class System } // verify the URL - if ($this->licenseUrlNormalized() !== $this->licenseUrlNormalized($license['domain'])) { + if ($this->licenseUrl() !== $this->licenseUrl($license['domain'])) { return false; } @@ -346,13 +354,25 @@ class System * @param string $email * @return boolean */ - public function register(string $license, string $email): bool + public function register(string $license = null, string $email = null): bool { + if (Str::startsWith($license, 'K3-PRO-') === false) { + throw new InvalidArgumentException([ + 'key' => 'license.format' + ]); + } + + if (V::email($email) === false) { + throw new InvalidArgumentException([ + 'key' => 'license.email' + ]); + } + $response = Remote::get('https://licenses.getkirby.com/register', [ 'data' => [ 'license' => $license, 'email' => $email, - 'domain' => $this->licenseUrl() + 'domain' => $this->indexUrl() ] ]); @@ -373,7 +393,9 @@ class System Json::write($file, $json); if ($this->license() === false) { - throw new Exception('The license could not be verified'); + throw new InvalidArgumentException([ + 'key' => 'license.verification' + ]); } return true; diff --git a/kirby/src/Cms/Template.php b/kirby/src/Cms/Template.php index fc5d059..775b460 100755 --- a/kirby/src/Cms/Template.php +++ b/kirby/src/Cms/Template.php @@ -5,12 +5,16 @@ namespace Kirby\Cms; use Exception; use Kirby\Toolkit\F; use Kirby\Toolkit\Tpl; -use Kirby\Toolkit\View; -use Throwable; /** * Represents a Kirby template and takes care * of loading the correct file. + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class Template { diff --git a/kirby/src/Cms/Translation.php b/kirby/src/Cms/Translation.php index a11e19d..a8944f2 100755 --- a/kirby/src/Cms/Translation.php +++ b/kirby/src/Cms/Translation.php @@ -8,6 +8,12 @@ use Kirby\Data\Data; /** * Wrapper around Kirby's localization files, * which are store in `kirby/translations`. + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class Translation { @@ -32,7 +38,7 @@ class Translation } /** - * Improved var_dump output + * Improved `var_dump` output * * @return array */ diff --git a/kirby/src/Cms/Translations.php b/kirby/src/Cms/Translations.php index 051b83f..17d1284 100755 --- a/kirby/src/Cms/Translations.php +++ b/kirby/src/Cms/Translations.php @@ -10,19 +10,29 @@ use Kirby\Toolkit\F; * Provides a factory method to convert an array * to a collection of Translation objects and load * method to load all translations from disk + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class Translations extends Collection { - public function start(string $code) + public function start(string $code): void { F::move($this->parent->contentFile('', true), $this->parent->contentFile($code, true)); } - public function stop(string $code) + public function stop(string $code): void { F::move($this->parent->contentFile($code, true), $this->parent->contentFile('', true)); } + /** + * @param array $translations + * @return self + */ public static function factory(array $translations) { $collection = new static; @@ -35,6 +45,11 @@ class Translations extends Collection return $collection; } + /** + * @param string $root + * @param array $inject + * @return self + */ public static function load(string $root, array $inject = []) { $collection = new static; diff --git a/kirby/src/Cms/Url.php b/kirby/src/Cms/Url.php index f4015c0..3b63000 100755 --- a/kirby/src/Cms/Url.php +++ b/kirby/src/Cms/Url.php @@ -3,7 +3,6 @@ namespace Kirby\Cms; use Kirby\Http\Url as BaseUrl; -use Kirby\Toolkit\Str; /** * The `Url` class extends the @@ -16,8 +15,9 @@ use Kirby\Toolkit\Str; * * @package Kirby Cms * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class Url extends BaseUrl { diff --git a/kirby/src/Cms/User.php b/kirby/src/Cms/User.php index 0ee37a0..1ed72aa 100755 --- a/kirby/src/Cms/User.php +++ b/kirby/src/Cms/User.php @@ -7,11 +7,8 @@ use Kirby\Exception\InvalidArgumentException; use Kirby\Exception\NotFoundException; use Kirby\Exception\PermissionException; use Kirby\Session\Session; -use Kirby\Toolkit\A; use Kirby\Toolkit\F; use Kirby\Toolkit\Str; -use Kirby\Toolkit\V; -use Throwable; /** * The `$user` object represents a @@ -19,14 +16,16 @@ use Throwable; * * @package Kirby Cms * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class User extends ModelWithContent { const CLASS_ALIAS = 'user'; use HasFiles; + use HasMethods; use HasSiblings; use UserActions; @@ -70,6 +69,20 @@ class User extends ModelWithContent */ protected $language; + /** + * All registered user methods + * + * @var array + */ + public static $methods = []; + + /** + * Registry with all User models + * + * @var array + */ + public static $models = []; + /** * @var string */ @@ -102,6 +115,11 @@ class User extends ModelWithContent return $this->$method; } + // user methods + if ($this->hasMethod($method)) { + return $this->callMethod($method, $arguments); + } + // return site content otherwise return $this->content()->get($method, $arguments); } @@ -118,7 +136,7 @@ class User extends ModelWithContent } /** - * Improved var_dump() output + * Improved `var_dump` output * * @return array */ @@ -150,7 +168,7 @@ class User extends ModelWithContent /** * Returns the File object for the avatar or null * - * @return File|null + * @return Kirby\Cms\File|null */ public function avatar() { @@ -160,7 +178,7 @@ class User extends ModelWithContent /** * Returns the UserBlueprint object * - * @return UserBlueprint + * @return Kirby\Cms\UserBlueprint */ public function blueprint() { @@ -237,6 +255,22 @@ class User extends ModelWithContent return is_file($this->contentFile('default')) === true; } + /** + * Constructs a User object and also + * takes User models into account. + * + * @internal + * @return self + */ + public static function factory($props) + { + if (empty($props['model']) === false) { + return static::model($props['model'], $props); + } + + return new static($props); + } + /** * Hashes user password * @@ -244,7 +278,7 @@ class User extends ModelWithContent * @param string|null $password * @return string|null */ - public static function hashPassword($password) + public static function hashPassword($password): ?string { if ($password !== null) { $info = password_get_info($password); @@ -292,7 +326,7 @@ class User extends ModelWithContent /** * Compares the current object with the given user object * - * @param User|null $user + * @param Kirby\Cms\User|null $user * @return bool */ public function is(User $user = null): bool @@ -370,19 +404,14 @@ class User extends ModelWithContent * Logs the user in * * @param string $password - * @param Session|array $session Session options or session object to set the user in + * @param Kirby\Session\Session|array $session Session options or session object to set the user in * @return bool * * @throws PermissionException If the password is not valid */ public function login(string $password, $session = null): bool { - try { - $this->validatePassword($password); - } catch (Exception $e) { - throw new PermissionException(['key' => 'access.login']); - } - + $this->validatePassword($password); $this->loginPasswordless($session); return true; @@ -391,10 +420,10 @@ class User extends ModelWithContent /** * Logs the user in without checking the password * - * @param Session|array $session Session options or session object to set the user in + * @param SKirby\Session\Session|array $session Session options or session object to set the user in * @return void */ - public function loginPasswordless($session = null) + public function loginPasswordless($session = null): void { $session = $this->sessionFromOptions($session); @@ -405,10 +434,10 @@ class User extends ModelWithContent /** * Logs the user out * - * @param Session|array $session Session options or session object to unset the user in + * @param Kirby\Session\Session|array $session Session options or session object to unset the user in * @return void */ - public function logout($session = null) + public function logout($session = null): void { $session = $this->sessionFromOptions($session); @@ -445,6 +474,27 @@ class User extends ModelWithContent return $this->kirby()->url('media') . '/users/' . $this->id(); } + /** + * Creates a user model if it has been registered + * + * @internal + * @param string $name + * @param array $props + * @return Kirby\Cms\User + */ + public static function model(string $name, array $props = []) + { + if ($class = (static::$models[$name] ?? null)) { + $object = new $class($props); + + if (is_a($object, 'Kirby\Cms\User') === true) { + return $object; + } + } + + return new static($props); + } + /** * Returns the last modification date of the user * @@ -465,7 +515,7 @@ class User extends ModelWithContent /** * Returns the user's name * - * @return Field + * @return Kirby\Cms\Field */ public function name() { @@ -486,7 +536,7 @@ class User extends ModelWithContent * @internal * @return self */ - public static function nobody(): self + public static function nobody() { return new static([ 'email' => 'nobody@getkirby.com', @@ -494,6 +544,36 @@ class User extends ModelWithContent ]); } + /** + * Panel icon definition + * + * @internal + * @param array $params + * @return array + */ + public function panelIcon(array $params = null): array + { + $params['type'] = 'user'; + + return parent::panelIcon($params); + } + + /** + * Returns the image file object based on provided query + * + * @internal + * @param string|null $query + * @return Kirby\Cms\File|Kirby\Cms\Asset|null + */ + protected function panelImageSource(string $query = null) + { + if ($query === null) { + return $this->avatar(); + } + + return parent::panelImageSource($query); + } + /** * Returns the full path without leading slash * @@ -505,6 +585,29 @@ class User extends ModelWithContent return 'users/' . $this->id(); } + /** + * Returns prepared data for the panel user picker + * + * @param array|null $params + * @return array + */ + public function panelPickerData(array $params = null): array + { + $image = $this->panelImage($params['image'] ?? []); + $icon = $this->panelIcon($image); + + return [ + 'icon' => $icon, + 'id' => $this->id(), + 'image' => $image, + 'email' => $this->email(), + 'info' => $this->toString($params['info'] ?? false), + 'link' => $this->panelUrl(true), + 'text' => $this->toString($params['text'] ?? '{{ user.username }}'), + 'username' => $this->username(), + ]; + } + /** * Returns the url to the editing view * in the panel @@ -537,46 +640,19 @@ class User extends ModelWithContent } /** - * @return UserPermissions + * @return Kirby\Cms\UserPermissions */ public function permissions() { return new UserPermissions($this); } - /** - * Creates a string query, starting from the model - * - * @internal - * @param string|null $query - * @param string|null $expect - * @return mixed - */ - public function query(string $query = null, string $expect = null) - { - if ($query === null) { - return null; - } - - $result = Str::query($query, [ - 'kirby' => $kirby = $this->kirby(), - 'site' => $kirby->site(), - 'user' => $this - ]); - - if ($expect !== null && is_a($result, $expect) !== true) { - return null; - } - - return $result; - } - /** * Returns the user role * - * @return string + * @return Kirby\Cms\Role */ - public function role(): Role + public function role() { if (is_a($this->role, 'Kirby\Cms\Role') === true) { return $this->role; @@ -605,7 +681,7 @@ class User extends ModelWithContent * Returns the UserRules class to * validate any important action. * - * @return UserRules + * @return Kirby\Cms\UserRules */ protected function rules() { @@ -618,7 +694,7 @@ class User extends ModelWithContent * @param array|null $blueprint * @return self */ - protected function setBlueprint(array $blueprint = null): self + protected function setBlueprint(array $blueprint = null) { if ($blueprint !== null) { $blueprint['model'] = $this; @@ -634,7 +710,7 @@ class User extends ModelWithContent * @param string $email * @return self */ - protected function setEmail(string $email = null): self + protected function setEmail(string $email = null) { if ($email !== null) { $this->email = strtolower(trim($email)); @@ -648,7 +724,7 @@ class User extends ModelWithContent * @param string $id * @return self */ - protected function setId(string $id = null): self + protected function setId(string $id = null) { $this->id = $id; return $this; @@ -660,7 +736,7 @@ class User extends ModelWithContent * @param string $language * @return self */ - protected function setLanguage(string $language = null): self + protected function setLanguage(string $language = null) { $this->language = $language !== null ? trim($language) : null; return $this; @@ -672,7 +748,7 @@ class User extends ModelWithContent * @param string $name * @return self */ - protected function setName(string $name = null): self + protected function setName(string $name = null) { $this->name = $name !== null ? trim($name) : null; return $this; @@ -684,7 +760,7 @@ class User extends ModelWithContent * @param string $password * @return self */ - protected function setPassword(string $password = null): self + protected function setPassword(string $password = null) { $this->password = $password; return $this; @@ -696,7 +772,7 @@ class User extends ModelWithContent * @param string $role * @return self */ - protected function setRole(string $role = null): self + protected function setRole(string $role = null) { $this->role = $role !== null ? strtolower(trim($role)) : null; return $this; @@ -705,10 +781,10 @@ class User extends ModelWithContent /** * Converts session options into a session object * - * @param Session|array $session Session options or session object to unset the user in - * @return Session + * @param Kirby\Session\Session|array $session Session options or session object to unset the user in + * @return Kirby\Session\Session */ - protected function sessionFromOptions($session): Session + protected function sessionFromOptions($session) { // use passed session options or session object if set if (is_array($session) === true) { @@ -723,7 +799,7 @@ class User extends ModelWithContent /** * Returns the parent Users collection * - * @return Users + * @return Kirby\Cms\Users */ protected function siblingsCollection() { @@ -758,14 +834,10 @@ class User extends ModelWithContent public function toString(string $template = null): string { if ($template === null) { - return $this->email(); + $template = $this->email(); } - return Str::template($template, [ - 'user' => $this, - 'site' => $this->site(), - 'kirby' => $this->kirby() - ]); + return parent::toString($template); } /** @@ -773,7 +845,7 @@ class User extends ModelWithContent * which is the given name or the email * as a fallback * - * @return string + * @return string|null */ public function username(): ?string { diff --git a/kirby/src/Cms/UserActions.php b/kirby/src/Cms/UserActions.php index 4afba21..3df99f5 100755 --- a/kirby/src/Cms/UserActions.php +++ b/kirby/src/Cms/UserActions.php @@ -4,16 +4,21 @@ namespace Kirby\Cms; use Closure; use Kirby\Data\Data; -use Kirby\Exception\DuplicateException; -use Kirby\Exception\Exception; -use Kirby\Exception\InvalidArgumentLogicException; use Kirby\Exception\LogicException; use Kirby\Exception\PermissionException; use Kirby\Toolkit\Dir; use Kirby\Toolkit\F; use Kirby\Toolkit\Str; -use Kirby\Toolkit\V; +/** + * UserActions + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ trait UserActions { @@ -23,7 +28,7 @@ trait UserActions * @param string $email * @return self */ - public function changeEmail(string $email): self + public function changeEmail(string $email) { return $this->commit('changeEmail', [$this, $email], function ($user, $email) { $user = $user->clone([ @@ -44,7 +49,7 @@ trait UserActions * @param string $language * @return self */ - public function changeLanguage(string $language): self + public function changeLanguage(string $language) { return $this->commit('changeLanguage', [$this, $language], function ($user, $language) { $user = $user->clone([ @@ -65,7 +70,7 @@ trait UserActions * @param string $name * @return self */ - public function changeName(string $name): self + public function changeName(string $name) { return $this->commit('changeName', [$this, $name], function ($user, $name) { $user = $user->clone([ @@ -86,7 +91,7 @@ trait UserActions * @param string $password * @return self */ - public function changePassword(string $password): self + public function changePassword(string $password) { return $this->commit('changePassword', [$this, $password], function ($user, $password) { $user = $user->clone([ @@ -105,7 +110,7 @@ trait UserActions * @param string $role * @return self */ - public function changeRole(string $role): self + public function changeRole(string $role) { return $this->commit('changeRole', [$this, $role], function ($user, $role) { $user = $user->clone([ @@ -156,7 +161,7 @@ trait UserActions * @param array $input * @return self */ - public static function create(array $props = null): self + public static function create(array $props = null) { $data = $props; @@ -164,7 +169,9 @@ trait UserActions $data['password'] = static::hashPassword($props['password']); } - $user = new static($data); + $props['role'] = $props['model'] = strtolower($props['role'] ?? 'default'); + + $user = User::factory($data); // create a form for the user $form = Form::for($user, [ diff --git a/kirby/src/Cms/UserBlueprint.php b/kirby/src/Cms/UserBlueprint.php index 618ad5d..e86c89c 100755 --- a/kirby/src/Cms/UserBlueprint.php +++ b/kirby/src/Cms/UserBlueprint.php @@ -5,6 +5,12 @@ namespace Kirby\Cms; /** * Extension of the basic blueprint class * to handle all blueprints for users. + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class UserBlueprint extends Blueprint { diff --git a/kirby/src/Cms/UserPermissions.php b/kirby/src/Cms/UserPermissions.php index ce3728d..3f73541 100755 --- a/kirby/src/Cms/UserPermissions.php +++ b/kirby/src/Cms/UserPermissions.php @@ -2,6 +2,15 @@ namespace Kirby\Cms; +/** + * UserPermissions + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ class UserPermissions extends ModelPermissions { protected $category = 'users'; diff --git a/kirby/src/Cms/UserRules.php b/kirby/src/Cms/UserRules.php index 818e897..ff46493 100755 --- a/kirby/src/Cms/UserRules.php +++ b/kirby/src/Cms/UserRules.php @@ -11,6 +11,12 @@ use Kirby\Toolkit\V; /** * Validators for all user actions + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class UserRules { @@ -164,7 +170,7 @@ class UserRules public static function validId(User $user, string $id): bool { - if ($duplicate = $user->kirby()->users()->find($id)) { + if ($user->kirby()->users()->find($id)) { throw new DuplicateException('A user with this id exists'); } diff --git a/kirby/src/Cms/Users.php b/kirby/src/Cms/Users.php index a22cba5..ce5f073 100755 --- a/kirby/src/Cms/Users.php +++ b/kirby/src/Cms/Users.php @@ -13,11 +13,20 @@ use Kirby\Toolkit\Str; * * @package Kirby Cms * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class Users extends Collection { + + /** + * All registered users methods + * + * @var array + */ + public static $methods = []; + public function create(array $data) { return User::create($data); @@ -29,7 +38,7 @@ class Users extends Collection * current collection * * @param mixed $item - * @return Users + * @return self */ public function add($object) { @@ -56,13 +65,13 @@ class Users extends Collection * @param array $inject * @return self */ - public static function factory(array $users, array $inject = []): self + public static function factory(array $users, array $inject = []) { $collection = new static; // read all user blueprints foreach ($users as $props) { - $user = new User($props + $inject); + $user = User::factory($props + $inject); $collection->set($user->id(), $user); } @@ -73,9 +82,9 @@ class Users extends Collection * Finds a user in the collection by id or email address * * @param string $key - * @return User|null + * @return Kirby\Cms\User|null */ - public function findByKey($key) + public function findByKey(string $key) { if (Str::contains($key, '@') === true) { return parent::findBy('email', strtolower($key)); @@ -91,7 +100,7 @@ class Users extends Collection * @param array $inject * @return self */ - public static function load(string $root, array $inject = []): self + public static function load(string $root, array $inject = []) { $users = new static; @@ -109,4 +118,15 @@ class Users extends Collection return $users; } + + /** + * Shortcut for `$users->filterBy('role', 'admin')` + * + * @param string $role + * @return self + */ + public function role(string $role) + { + return $this->filterBy('role', $role); + } } diff --git a/kirby/src/Cms/Visitor.php b/kirby/src/Cms/Visitor.php index 982a0ad..a4ef7b1 100755 --- a/kirby/src/Cms/Visitor.php +++ b/kirby/src/Cms/Visitor.php @@ -6,11 +6,17 @@ use Kirby\Toolkit\Facade; /** * Shortcut to the visitor object + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license */ class Visitor extends Facade { /** - * @return \Kirby\Http\Visitor + * @return Kirby\Http\Visitor */ public static function instance() { diff --git a/kirby/src/Data/Data.php b/kirby/src/Data/Data.php index 96328f1..5149cda 100755 --- a/kirby/src/Data/Data.php +++ b/kirby/src/Data/Data.php @@ -8,18 +8,19 @@ use Kirby\Toolkit\F; /** * The `Data` class provides readers and * writers for data. The class comes with - * three handlers for `json`, `yaml` and - * `txt` encoded data, but can be extended - * and customized. + * four handlers for `json`, `php`, `txt` + * and `yaml` encoded data, but can be + * extended and customized. * * The read and write methods automatically - * detect, which data handler to use in order + * detect which data handler to use in order * to correctly encode and decode passed data. * * @package Kirby * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Data { @@ -50,31 +51,31 @@ class Data /** * Handler getter * - * @param string $type - * @return Handler|null + * @param string $type + * @return Kirby\Data\Handler */ public static function handler(string $type) { // normalize the type - $type = strtolower($type); - $handler = static::$handlers[$type] ?? null; + $type = strtolower($type); - if ($handler === null && isset(static::$aliases[$type]) === true) { - $handler = static::$handlers[static::$aliases[$type]] ?? null; + // find a handler or alias + $handler = static::$handlers[$type] ?? + static::$handlers[static::$aliases[$type] ?? null] ?? + null; + + if (class_exists($handler)) { + return new $handler; } - if ($handler === null) { - throw new Exception('Missing Handler for type: "' . $type . '"'); - } - - return new $handler; + throw new Exception('Missing handler for type: "' . $type . '"'); } /** - * Decode data with the specified handler + * Decodes data with the specified handler * - * @param string $data - * @param string $type + * @param string $data + * @param string $type * @return array */ public static function decode(string $data = null, string $type): array @@ -83,10 +84,10 @@ class Data } /** - * Encode data with the specified handler + * Encodes data with the specified handler * - * @param array $data - * @param string $type + * @param array $data + * @param string $type * @return string */ public static function encode(array $data = null, string $type): string @@ -95,9 +96,9 @@ class Data } /** - * Reads data from a file - * The data handler is automatically chosen by - * the extension if not specified. + * Reads data from a file; + * the data handler is automatically chosen by + * the extension if not specified * * @param string $file * @param string $type @@ -109,13 +110,13 @@ class Data } /** - * Writes data to a file. - * The data handler is automatically chosen by - * the extension if not specified. + * Writes data to a file; + * the data handler is automatically chosen by + * the extension if not specified * - * @param string $file - * @param array $data - * @param string $type + * @param string $file + * @param array $data + * @param string $type * @return boolean */ public static function write(string $file = null, array $data = [], string $type = null): bool diff --git a/kirby/src/Data/Handler.php b/kirby/src/Data/Handler.php index 9e00608..803f384 100755 --- a/kirby/src/Data/Handler.php +++ b/kirby/src/Data/Handler.php @@ -12,9 +12,9 @@ use Kirby\Toolkit\F; * * @package Kirby Data * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier - * @license MIT + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ abstract class Handler { @@ -45,7 +45,7 @@ abstract class Handler */ public static function read(string $file): array { - if (file_exists($file) !== true) { + if (is_file($file) !== true) { throw new Exception('The file "' . $file . '" does not exist'); } @@ -53,11 +53,9 @@ abstract class Handler } /** - * Writes data to a file. - * The data handler is automatically chosen by - * the extension if not specified. + * Writes data to a file * - * @param array $data + * @param array $data * @return boolean */ public static function write(string $file = null, array $data = []): bool diff --git a/kirby/src/Data/Json.php b/kirby/src/Data/Json.php index 2d8a502..2f37f6b 100755 --- a/kirby/src/Data/Json.php +++ b/kirby/src/Data/Json.php @@ -9,12 +9,13 @@ use Exception; * * @package Kirby Data * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier - * @license MIT + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Json extends Handler { + /** * Converts an array to an encoded JSON string * diff --git a/kirby/src/Data/PHP.php b/kirby/src/Data/PHP.php index e6937d6..b36d359 100755 --- a/kirby/src/Data/PHP.php +++ b/kirby/src/Data/PHP.php @@ -10,17 +10,18 @@ use Kirby\Toolkit\F; * * @package Kirby Data * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier - * @license MIT + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class PHP extends Handler { + /** * Converts an array to PHP file content * * @param mixed $data - * @param string $indent + * @param string $indent For internal use only * @return string */ public static function encode($data, $indent = ''): string @@ -64,7 +65,7 @@ class PHP extends Handler */ public static function read(string $file): array { - if (file_exists($file) !== true) { + if (is_file($file) !== true) { throw new Exception('The file "' . $file . '" does not exist'); } @@ -74,7 +75,7 @@ class PHP extends Handler /** * Creates a PHP file with the given data * - * @param array $data + * @param array $data * @return boolean */ public static function write(string $file = null, array $data = []): bool @@ -87,6 +88,6 @@ class PHP extends Handler return true; } - return false; + return false; // @codeCoverageIgnore } } diff --git a/kirby/src/Data/Txt.php b/kirby/src/Data/Txt.php index 7964e58..82e982b 100755 --- a/kirby/src/Data/Txt.php +++ b/kirby/src/Data/Txt.php @@ -9,9 +9,9 @@ use Kirby\Toolkit\Str; * * @package Kirby Data * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier - * @license MIT + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Txt extends Handler { @@ -40,9 +40,9 @@ class Txt extends Handler } /** - * Helper for converting value + * Helper for converting the value * - * @param array|string $value + * @param array|string $value * @return string */ protected static function encodeValue($value): string @@ -56,13 +56,13 @@ class Txt extends Handler } // escape accidental dividers within a field - $value = preg_replace('!(\n|^)----(.*?\R*)!', '$1\\----$2', $value); + $value = preg_replace('!(?<=\n|^)----!', '\\----', $value); return $value; } /** - * Helper for converting key and value to result string + * Helper for converting the key and value to the result string * * @param string $key * @param string $value @@ -70,11 +70,13 @@ class Txt extends Handler */ protected static function encodeResult(string $key, string $value): string { - $result = $key . ': '; + $result = $key . ':'; // multi-line content if (preg_match('!\R!', $value) === 1) { $result .= "\n\n"; + } else { + $result .= ' '; } $result .= trim($value); @@ -107,7 +109,10 @@ class Txt extends Handler continue; } - $data[$key] = trim(substr($field, $pos + 1)); + $value = trim(substr($field, $pos + 1)); + + // unescape escaped dividers within a field + $data[$key] = preg_replace('!(?<=\n|^)\\\\----!', '----', $value); } return $data; diff --git a/kirby/src/Data/Yaml.php b/kirby/src/Data/Yaml.php index 42918bd..81ef4f5 100755 --- a/kirby/src/Data/Yaml.php +++ b/kirby/src/Data/Yaml.php @@ -10,9 +10,9 @@ use Spyc; * * @package Kirby Data * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier - * @license MIT + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Yaml extends Handler { @@ -56,14 +56,16 @@ class Yaml extends Handler return $yaml; } - // remove bom + // remove BOM $yaml = str_replace("\xEF\xBB\xBF", '', $yaml); $result = Spyc::YAMLLoadString($yaml); if (is_array($result)) { return $result; } else { - throw new Exception('YAML string is invalid'); + // apparently Spyc always returns an array, even for invalid YAML syntax + // so this Exception should currently never be thrown + throw new Exception('YAML string is invalid'); // @codeCoverageIgnore } } } diff --git a/kirby/src/Database/Database.php b/kirby/src/Database/Database.php index 0209c9c..be4b2ff 100755 --- a/kirby/src/Database/Database.php +++ b/kirby/src/Database/Database.php @@ -12,6 +12,12 @@ use Throwable; /** * A simple database class + * + * @package Kirby Database + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Database { @@ -153,9 +159,9 @@ class Database * Returns one of the started instance * * @param string $id - * @return Database + * @return self */ - public static function instance(string $id = null): self + public static function instance(string $id = null) { return $id === null ? A::last(static::$connections) : static::$connections[$id] ?? null; } @@ -174,7 +180,7 @@ class Database * Connects to a database * * @param array|null $params This can either be a config key or an array of parameters for the connection - * @return Database + * @return Kirby\Database\Database */ public function connect(array $params = null) { @@ -217,7 +223,7 @@ class Database /** * Returns the currently active connection * - * @return Database|null + * @return Kirby\Database\Database|null */ public function connection() { @@ -228,7 +234,7 @@ class Database * Sets the exception mode for the next query * * @param boolean $fail - * @return Database + * @return Kirby\Database\Database */ public function fail(bool $fail = true) { @@ -461,7 +467,7 @@ class Database * Returns the correct Sql generator instance * for the type of database * - * @return Sql + * @return Kirby\Database\Sql */ public function sql() { @@ -470,10 +476,12 @@ class Database } /** - * Sets the current table, which should be queried + * Sets the current table, which should be queried. Returns a + * Query object, which can be used to build a full query + * for that table * * @param string $table - * @return Query Returns a Query object, which can be used to build a full query for that table + * @return Kirby\Database\Query */ public function table(string $table) { diff --git a/kirby/src/Database/Db.php b/kirby/src/Database/Db.php index ffdc5f1..68fd5da 100755 --- a/kirby/src/Database/Db.php +++ b/kirby/src/Database/Db.php @@ -7,6 +7,12 @@ use Kirby\Toolkit\Config; /** * Database shortcuts + * + * @package Kirby Database + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Db { @@ -30,7 +36,7 @@ class Db * (Re)connect the database * * @param array $params Pass [] to use the default params from the config - * @return Database + * @return Kirby\Database\Database */ public static function connect(array $params = null) { @@ -55,7 +61,7 @@ class Db /** * Returns the current database connection * - * @return Database + * @return Kirby\Database\Database */ public static function connection() { @@ -63,10 +69,12 @@ class Db } /** - * Sets the current table, which should be queried + * Sets the current table, which should be queried. Returns a + * Query object, which can be used to build a full query for + * that table. * * @param string $table - * @return Query Returns a Query object, which can be used to build a full query for that table + * @return Kirby\Database\Query */ public static function table($table) { diff --git a/kirby/src/Database/Query.php b/kirby/src/Database/Query.php index daefe72..b35e4a0 100755 --- a/kirby/src/Database/Query.php +++ b/kirby/src/Database/Query.php @@ -10,6 +10,12 @@ use Kirby\Toolkit\Str; /** * The query builder is used by the Database class * to build SQL queries with a fluent API + * + * @package Kirby Database + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Query { @@ -144,7 +150,7 @@ class Query /** * Constructor * - * @param Database $database Database object + * @param Kirby\Database\Database $database Database object * @param string $table Optional name of the table, which should be queried */ public function __construct(Database $database, string $table) @@ -179,7 +185,7 @@ class Query * the query instead of actually executing the query and returning results * * @param boolean $debug - * @return Query + * @return Kirby\Database\Query */ public function debug(bool $debug = true) { @@ -191,7 +197,7 @@ class Query * Enables distinct select clauses. * * @param boolean $distinct - * @return Query + * @return Kirby\Database\Query */ public function distinct(bool $distinct = true) { @@ -204,7 +210,7 @@ class Query * If enabled queries will no longer fail silently but throw an exception * * @param boolean $fail - * @return Query + * @return Kirby\Database\Query */ public function fail(bool $fail = true) { @@ -217,7 +223,7 @@ class Query * Set this to array to get a simple array instead of an object * * @param string $fetch - * @return Query + * @return Kirby\Database\Query */ public function fetch(string $fetch) { @@ -230,7 +236,7 @@ class Query * Set this to array to get a simple array instead of an iterator object * * @param string $iterator - * @return Query + * @return Kirby\Database\Query */ public function iterator(string $iterator) { @@ -242,7 +248,7 @@ class Query * Sets the name of the table, which should be queried * * @param string $table - * @return Query + * @return Kirby\Database\Query */ public function table(string $table) { @@ -258,7 +264,7 @@ class Query * Sets the name of the primary key column * * @param string $primaryKeyName - * @return Query + * @return Kirby\Database\Query */ public function primaryKeyName(string $primaryKeyName) { @@ -271,7 +277,7 @@ class Query * By default all columns will be selected * * @param mixed $select Pass either a string of columns or an array - * @return Query + * @return Kirby\Database\Query */ public function select($select) { @@ -304,7 +310,7 @@ class Query * * @param string $table Name of the table, which should be joined * @param string $on The on clause for this join - * @return Query + * @return Kirby\Database\Query */ public function leftJoin(string $table, string $on) { @@ -316,7 +322,7 @@ class Query * * @param string $table Name of the table, which should be joined * @param string $on The on clause for this join - * @return Query + * @return Kirby\Database\Query */ public function rightJoin(string $table, string $on) { @@ -328,7 +334,7 @@ class Query * * @param string $table Name of the table, which should be joined * @param string $on The on clause for this join - * @return Query + * @return Kirby\Database\Query */ public function innerJoin($table, $on) { @@ -339,7 +345,7 @@ class Query * Sets the values which should be used for the update or insert clause * * @param mixed $values Can either be a string or an array of values - * @return Query + * @return Kirby\Database\Query */ public function values($values = []) { @@ -378,7 +384,7 @@ class Query * ->where('username', 'like', 'myuser'); (args: 3) * * @param list - * @return Query + * @return Kirby\Database\Query */ public function where(...$args) { @@ -391,7 +397,7 @@ class Query * Check out the where() method docs for additional info. * * @param list - * @return Query + * @return Kirby\Database\Query */ public function orWhere(...$args) { @@ -415,7 +421,7 @@ class Query * Check out the where() method docs for additional info. * * @param list - * @return Query + * @return Kirby\Database\Query */ public function andWhere(...$args) { @@ -438,7 +444,7 @@ class Query * Attaches a group by clause * * @param string $group - * @return Query + * @return Kirby\Database\Query */ public function group(string $group = null) { @@ -458,7 +464,7 @@ class Query * ->having('username', 'like', 'myuser'); (args: 3) * * @param list - * @return Query + * @return Kirby\Database\Query */ public function having(...$args) { @@ -470,7 +476,7 @@ class Query * Attaches an order clause * * @param string $order - * @return Query + * @return Kirby\Database\Query */ public function order(string $order = null) { @@ -482,7 +488,7 @@ class Query * Sets the offset for select clauses * * @param int $offset - * @return Query + * @return Kirby\Database\Query */ public function offset(int $offset = null) { @@ -494,7 +500,7 @@ class Query * Sets the limit for select clauses * * @param int $limit - * @return Query + * @return Kirby\Database\Query */ public function limit(int $limit = null) { @@ -553,7 +559,7 @@ class Query /** * Builds a count query * - * @return Query + * @return Kirby\Database\Query */ public function count() { @@ -564,7 +570,7 @@ class Query * Builds a max query * * @param string $column - * @return Query + * @return Kirby\Database\Query */ public function max(string $column) { @@ -575,7 +581,7 @@ class Query * Builds a min query * * @param string $column - * @return Query + * @return Kirby\Database\Query */ public function min(string $column) { @@ -586,7 +592,7 @@ class Query * Builds a sum query * * @param string $column - * @return Query + * @return Kirby\Database\Query */ public function sum(string $column) { @@ -597,7 +603,7 @@ class Query * Builds an average query * * @param string $column - * @return Query + * @return Kirby\Database\Query */ public function avg(string $column) { diff --git a/kirby/src/Database/Sql.php b/kirby/src/Database/Sql.php index eec3395..56ed5cb 100755 --- a/kirby/src/Database/Sql.php +++ b/kirby/src/Database/Sql.php @@ -9,6 +9,12 @@ use Kirby\Toolkit\Str; /** * SQL Query builder + * + * @package Kirby Database + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Sql { @@ -30,7 +36,7 @@ class Sql /** * Constructor * - * @param Database $database + * @param Kirby\Database\Database $database */ public function __construct($database) { diff --git a/kirby/src/Database/Sql/Mysql.php b/kirby/src/Database/Sql/Mysql.php index 113d0ab..c72a4a9 100755 --- a/kirby/src/Database/Sql/Mysql.php +++ b/kirby/src/Database/Sql/Mysql.php @@ -6,6 +6,12 @@ use Kirby\Database\Sql; /** * Mysql query builder + * + * @package Kirby Database + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Mysql extends Sql { diff --git a/kirby/src/Database/Sql/Sqlite.php b/kirby/src/Database/Sql/Sqlite.php index b214eb5..c80ba06 100755 --- a/kirby/src/Database/Sql/Sqlite.php +++ b/kirby/src/Database/Sql/Sqlite.php @@ -6,6 +6,12 @@ use Kirby\Database\Sql; /** * Sqlite query builder + * + * @package Kirby Database + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Sqlite extends Sql { diff --git a/kirby/src/Email/Body.php b/kirby/src/Email/Body.php index 0c1d5ee..2a156c4 100755 --- a/kirby/src/Email/Body.php +++ b/kirby/src/Email/Body.php @@ -11,9 +11,9 @@ use Kirby\Toolkit\Properties; * @package Kirby Email * @author Bastian Allgeier , * Nico Hoffmann - * @link http://getkirby.com - * @copyright Bastian Allgeier - * @license MIT + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Body { diff --git a/kirby/src/Email/Email.php b/kirby/src/Email/Email.php index 373d2a7..f9037da 100755 --- a/kirby/src/Email/Email.php +++ b/kirby/src/Email/Email.php @@ -13,9 +13,9 @@ use Exception; * @package Kirby Email * @author Bastian Allgeier , * Nico Hoffmann - * @link http://getkirby.com - * @copyright Bastian Allgeier - * @license MIT + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Email { @@ -46,7 +46,10 @@ class Email return $this->attachments; } - public function body(): Body + /** + * @return Kirby\Email\Body + */ + public function body() { return $this->body; } diff --git a/kirby/src/Email/PHPMailer.php b/kirby/src/Email/PHPMailer.php index 8177a4e..c2a0a3d 100755 --- a/kirby/src/Email/PHPMailer.php +++ b/kirby/src/Email/PHPMailer.php @@ -10,9 +10,9 @@ use PHPMailer\PHPMailer\PHPMailer as Mailer; * @package Kirby Email * @author Bastian Allgeier , * Nico Hoffmann - * @link http://getkirby.com - * @copyright Bastian Allgeier - * @license MIT + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class PHPMailer extends Email { diff --git a/kirby/src/Exception/BadMethodCallException.php b/kirby/src/Exception/BadMethodCallException.php index a43017d..1be6fb7 100755 --- a/kirby/src/Exception/BadMethodCallException.php +++ b/kirby/src/Exception/BadMethodCallException.php @@ -2,6 +2,16 @@ namespace Kirby\Exception; +/** + * BadMethodCallException + * Thrown when a method was called that does not exist + * + * @package Kirby Exception + * @author Nico Hoffmann + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT + */ class BadMethodCallException extends Exception { protected static $defaultKey = 'invalidMethod'; diff --git a/kirby/src/Exception/DuplicateException.php b/kirby/src/Exception/DuplicateException.php index fa33ec2..7684c4c 100755 --- a/kirby/src/Exception/DuplicateException.php +++ b/kirby/src/Exception/DuplicateException.php @@ -2,6 +2,17 @@ namespace Kirby\Exception; +/** + * DuplicateException + * Thrown when an object could not be created + * because it already exists + * + * @package Kirby Exception + * @author Nico Hoffmann + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT + */ class DuplicateException extends Exception { protected static $defaultKey = 'duplicate'; diff --git a/kirby/src/Exception/Exception.php b/kirby/src/Exception/Exception.php index 20455b4..0330614 100755 --- a/kirby/src/Exception/Exception.php +++ b/kirby/src/Exception/Exception.php @@ -6,114 +6,214 @@ use Kirby\Cms\App; use Kirby\Toolkit\I18n; use Kirby\Toolkit\Str; +/** + * Exception + * Thrown for general exceptions and extended by + * other exception classes + * + * @package Kirby Exception + * @author Nico Hoffmann + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT + */ class Exception extends \Exception { + /** + * Data variables that can be used inside the exception message + * + * @var array + */ protected $data; + + /** + * HTTP code that corresponds with the exception + * + * @var int + */ protected $httpCode; + + /** + * Additional details that are not included in the exception message + * + * @var array + */ protected $details; + + /** + * Whether the exception message could be translated into the user's language + * + * @var boolean + */ protected $isTranslated = true; + /** + * Defaults that can be overridden by specific + * exception classes + */ protected static $defaultKey = 'general'; protected static $defaultFallback = 'An error occurred'; protected static $defaultData = []; protected static $defaultHttpCode = 500; protected static $defaultDetails = []; + /** + * Prefix for the exception key (e.g. 'error.general') + * + * @var string + */ private static $prefix = 'error'; + /** + * Class constructor + * + * @param array|string $args Full option array ('key', 'translate', 'fallback', + * 'data', 'httpCode', 'details' and 'previous') or + * just the message string + */ public function __construct($args = []) { - // Set data and httpCode from provided arguments or defaults + // set data and httpCode from provided arguments or defaults $this->data = $args['data'] ?? static::$defaultData; $this->httpCode = $args['httpCode'] ?? static::$defaultHttpCode; $this->details = $args['details'] ?? static::$defaultDetails; + // define the Exception key + $key = self::$prefix . '.' . ($args['key'] ?? static::$defaultKey); + if (is_string($args) === true) { $this->isTranslated = false; parent::__construct($args); } else { - // Define whether message can/should be translated + // define whether message can/should be translated $translate = ($args['translate'] ?? true) === true && class_exists('Kirby\Cms\App') === true; - // Define the Exception key - $key = self::$prefix . '.' . ($args['key'] ?? static::$defaultKey); - - // Fallback waterfall for message string + // fallback waterfall for message string $message = null; if ($translate) { - // 1. Translation for provided key in current language - // 2. Translation for provided key in default language + // 1. translation for provided key in current language + // 2. translation for provided key in default language if (isset($args['key']) === true) { $message = I18n::translate(self::$prefix . '.' . $args['key']); $this->isTranslated = true; } } - // 3. Provided fallback message + // 3. provided fallback message if ($message === null) { $message = $args['fallback'] ?? null; $this->isTranslated = false; } if ($translate) { - // 4. Translation for default key in current language - // 5. Translation for default key in default language + // 4. translation for default key in current language + // 5. translation for default key in default language if ($message === null) { $message = I18n::translate(self::$prefix . '.' . static::$defaultKey); $this->isTranslated = true; } } - // 6. Default fallback message + // 6. default fallback message if ($message === null) { $message = static::$defaultFallback; $this->isTranslated = false; } - // Format message with passed data + // format message with passed data $message = Str::template($message, $this->data, '-', '{', '}'); - // Handover to Exception parent class constructor + // handover to Exception parent class constructor parent::__construct($message, null, $args['previous'] ?? null); - - // Set the Exception code to the key - $this->code = $key; } + + // set the Exception code to the key + $this->code = $key; } + /** + * Returns the file in which the Exception was created + * relative to the document root + * + * @return string + */ + final public function getFileRelative(): string + { + $file = $this->getFile(); + + if (empty($_SERVER['DOCUMENT_ROOT']) === false) { + $file = ltrim(Str::after($file, $_SERVER['DOCUMENT_ROOT']), '/'); + } + + return $file; + } + + /** + * Returns the data variables from the message + * + * @return array + */ final public function getData(): array { return $this->data; } + /** + * Returns the additional details that are + * not included in the message + * + * @return array + */ final public function getDetails(): array { return $this->details; } + /** + * Returns the exception key (error type) + * + * @return string + */ final public function getKey(): string { return $this->getCode(); } + /** + * Returns the HTTP code that corresponds + * with the exception + * + * @return array + */ final public function getHttpCode(): int { return $this->httpCode; } + /** + * Returns whether the exception message could + * be translated into the user's language + * + * @return boolean + */ final public function isTranslated(): bool { return $this->isTranslated; } + /** + * Converts the object to an array + * + * @return array + */ public function toArray(): array { return [ 'exception' => static::class, 'message' => $this->getMessage(), 'key' => $this->getKey(), - 'file' => ltrim($this->getFile(), $_SERVER['DOCUMENT_ROOT'] ?? null), + 'file' => $this->getFileRelative(), 'line' => $this->getLine(), 'details' => $this->getDetails(), 'code' => $this->getHttpCode() diff --git a/kirby/src/Exception/InvalidArgumentException.php b/kirby/src/Exception/InvalidArgumentException.php index 5aacd63..e536f4f 100755 --- a/kirby/src/Exception/InvalidArgumentException.php +++ b/kirby/src/Exception/InvalidArgumentException.php @@ -2,6 +2,16 @@ namespace Kirby\Exception; +/** + * InvalidArgumentException + * Thrown when a method was called with invalid arguments + * + * @package Kirby Exception + * @author Nico Hoffmann + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT + */ class InvalidArgumentException extends Exception { protected static $defaultKey = 'invalidArgument'; diff --git a/kirby/src/Exception/LogicException.php b/kirby/src/Exception/LogicException.php index 0ed996b..7d9ac20 100755 --- a/kirby/src/Exception/LogicException.php +++ b/kirby/src/Exception/LogicException.php @@ -2,6 +2,16 @@ namespace Kirby\Exception; +/** + * LogicException + * Thrown for invalid requests that can't work out + * + * @package Kirby Exception + * @author Nico Hoffmann + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT + */ class LogicException extends Exception { protected static $defaultKey = 'logic'; diff --git a/kirby/src/Exception/NotFoundException.php b/kirby/src/Exception/NotFoundException.php index c49f2fa..af08c04 100755 --- a/kirby/src/Exception/NotFoundException.php +++ b/kirby/src/Exception/NotFoundException.php @@ -2,6 +2,16 @@ namespace Kirby\Exception; +/** + * NotFoundException + * Thrown when something was not found + * + * @package Kirby Exception + * @author Nico Hoffmann + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT + */ class NotFoundException extends Exception { protected static $defaultKey = 'notFound'; diff --git a/kirby/src/Exception/PermissionException.php b/kirby/src/Exception/PermissionException.php index 663fc80..b53a053 100755 --- a/kirby/src/Exception/PermissionException.php +++ b/kirby/src/Exception/PermissionException.php @@ -2,6 +2,17 @@ namespace Kirby\Exception; +/** + * PermissionException + * Thrown when the current user has insufficient + * permissions for the action + * + * @package Kirby Exception + * @author Nico Hoffmann + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT + */ class PermissionException extends Exception { protected static $defaultKey = 'permission'; diff --git a/kirby/src/Form/Field.php b/kirby/src/Form/Field.php index 5731b1d..57b4f06 100755 --- a/kirby/src/Form/Field.php +++ b/kirby/src/Form/Field.php @@ -3,9 +3,9 @@ namespace Kirby\Form; use Exception; -use Kirby\Data\Yaml; +use Kirby\Cms\App; +use Kirby\Cms\Model; use Kirby\Exception\InvalidArgumentException; -use Kirby\Http\Router; use Kirby\Toolkit\Component; use Kirby\Toolkit\I18n; use Kirby\Toolkit\V; @@ -14,6 +14,12 @@ use Kirby\Toolkit\V; * Form Field object that takes a Vue component style * array of properties and methods and converts them * to a usable field option array for the API. + * + * @package Kirby Form + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Field extends Component { @@ -54,6 +60,9 @@ class Field extends Component $this->validate(); } + /** + * @return mixed + */ public function api() { if (isset($this->options['api']) === true && is_callable($this->options['api']) === true) { @@ -61,6 +70,9 @@ class Field extends Component } } + /** + * @return mixed + */ public function data($default = false) { $save = $this->options['save'] ?? true; @@ -103,13 +115,13 @@ class Field extends Component return I18n::translate($before, $before); }, /** - * Default value for the field, which will be used when a Page/File/User is created + * Default value for the field, which will be used when a page/file/user is created */ 'default' => function ($default = null) { return $default; }, /** - * If true, the field is no longer editable and will not be saved + * If `true`, the field is no longer editable and will not be saved */ 'disabled' => function (bool $disabled = null): bool { return $disabled ?? false; @@ -139,13 +151,13 @@ class Field extends Component return I18n::translate($placeholder, $placeholder); }, /** - * If true, the field has to be filled in correctly to be saved. + * If `true`, the field has to be filled in correctly to be saved. */ 'required' => function (bool $required = null): bool { return $required ?? false; }, /** - * If false, the field will be disabled in non-default languages and cannot be translated. This is only relevant in multi-language setups. + * If `false`, the field will be disabled in non-default languages and cannot be translated. This is only relevant in multi-language setups. */ 'translate' => function (bool $translate = true): bool { return $translate; @@ -157,7 +169,7 @@ class Field extends Component return $when; }, /** - * The width of the field in the field grid. Available widths: 1/1, 1/2, 1/3, 1/4, 2/3, 3/4 + * The width of the field in the field grid. Available widths: `1/1`, `1/2`, `1/3`, `1/4`, `2/3`, `3/4` */ 'width' => function (string $width = '1/1') { return $width; @@ -204,6 +216,9 @@ class Field extends Component return empty($this->errors) === true; } + /** + * @return Kirby\Cms\App + */ public function kirby() { return $this->model->kirby(); @@ -236,7 +251,7 @@ class Field extends Component }); } - protected function validate() + protected function validate(): void { $validations = $this->options['validations'] ?? []; $this->errors = []; diff --git a/kirby/src/Form/Fields.php b/kirby/src/Form/Fields.php index 02726dc..c3f9c72 100755 --- a/kirby/src/Form/Fields.php +++ b/kirby/src/Form/Fields.php @@ -3,11 +3,16 @@ namespace Kirby\Form; use Closure; -use Kirby\Exception\InvalidArgumentException; use Kirby\Toolkit\Collection; /** * A collection of Field objects + * + * @package Kirby Form + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Fields extends Collection { diff --git a/kirby/src/Form/Form.php b/kirby/src/Form/Form.php index af73acf..60a725d 100755 --- a/kirby/src/Form/Form.php +++ b/kirby/src/Form/Form.php @@ -3,7 +3,6 @@ namespace Kirby\Form; use Throwable; -use Kirby\Toolkit\Collection; use Kirby\Data\Yaml; /** @@ -11,6 +10,12 @@ use Kirby\Data\Yaml; * used to create a list of form fields * and handles global form validation * and submission + * + * @package Kirby Form + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Form { @@ -154,7 +159,7 @@ class Form return $strings; } - public function toArray() + public function toArray(): array { $array = [ 'errors' => $this->errors(), diff --git a/kirby/src/Form/Options.php b/kirby/src/Form/Options.php index 48dd606..42daa2d 100755 --- a/kirby/src/Form/Options.php +++ b/kirby/src/Form/Options.php @@ -3,20 +3,19 @@ namespace Kirby\Form; use Kirby\Cms\App; -use Kirby\Cms\File; -use Kirby\Cms\Page; -use Kirby\Cms\Site; -use Kirby\Cms\StructureObject; -use Kirby\Cms\User; -use Kirby\Toolkit\A; use Kirby\Toolkit\I18n; -use Kirby\Toolkit\Obj; /** * Foundation for the Options query * classes, that are used to generate * options arrays for select fields, * radio boxes, checkboxes and more. + * + * @package Kirby Form + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Options { diff --git a/kirby/src/Form/OptionsApi.php b/kirby/src/Form/OptionsApi.php index 1f4254e..9cbee48 100755 --- a/kirby/src/Form/OptionsApi.php +++ b/kirby/src/Form/OptionsApi.php @@ -3,9 +3,7 @@ namespace Kirby\Form; use Kirby\Cms\Nest; -use Kirby\Cms\Structure; use Kirby\Exception\InvalidArgumentException; -use Kirby\Exception\LogicException; use Kirby\Toolkit\Query; use Kirby\Toolkit\Properties; use Kirby\Toolkit\Str; @@ -13,6 +11,12 @@ use Kirby\Toolkit\Str; /** * The OptionsApi class handles fetching options * from any REST API with valid JSON data. + * + * @package Kirby Form + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class OptionsApi { diff --git a/kirby/src/Form/OptionsQuery.php b/kirby/src/Form/OptionsQuery.php index 121db97..6f536fb 100755 --- a/kirby/src/Form/OptionsQuery.php +++ b/kirby/src/Form/OptionsQuery.php @@ -16,6 +16,12 @@ use Kirby\Toolkit\Str; * of data. In case of Kirby, you can query * pages, files, users or structures to create * options out of them. + * + * @package Kirby Form + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class OptionsQuery { diff --git a/kirby/src/Form/Validations.php b/kirby/src/Form/Validations.php index 56846dc..fe3c584 100755 --- a/kirby/src/Form/Validations.php +++ b/kirby/src/Form/Validations.php @@ -7,6 +7,12 @@ use Kirby\Toolkit\V; /** * Often used validation rules for fields + * + * @package Kirby Form + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Validations { @@ -131,7 +137,7 @@ class Validations { if ($field->isEmpty($value) === false) { $values = array_column($field->options(), 'value'); - foreach ($value as $key => $val) { + foreach ($value as $val) { if (in_array($val, $values, true) === false) { throw new InvalidArgumentException([ 'key' => 'validation.option' diff --git a/kirby/src/Http/Cookie.php b/kirby/src/Http/Cookie.php index 8053147..6e1db05 100755 --- a/kirby/src/Http/Cookie.php +++ b/kirby/src/Http/Cookie.php @@ -10,8 +10,9 @@ use Kirby\Toolkit\Str; * * @package Kirby Http * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Cookie { diff --git a/kirby/src/Http/Exceptions/NextRouteException.php b/kirby/src/Http/Exceptions/NextRouteException.php index 6022942..de85efa 100755 --- a/kirby/src/Http/Exceptions/NextRouteException.php +++ b/kirby/src/Http/Exceptions/NextRouteException.php @@ -2,6 +2,15 @@ namespace Kirby\Http\Exceptions; +/** + * NextRouteException + * + * @package Kirby Http + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT + */ class NextRouteException extends \Exception { } diff --git a/kirby/src/Http/Header.php b/kirby/src/Http/Header.php index 71841c8..6e8c7c3 100755 --- a/kirby/src/Http/Header.php +++ b/kirby/src/Http/Header.php @@ -10,8 +10,9 @@ use Kirby\Toolkit\F; * * @package Kirby Http * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Header { diff --git a/kirby/src/Http/Idn.php b/kirby/src/Http/Idn.php index f6c55e9..dee1ff4 100755 --- a/kirby/src/Http/Idn.php +++ b/kirby/src/Http/Idn.php @@ -9,9 +9,9 @@ use TrueBV\Punycode; * * @package Kirby Http * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier - * @license MIT + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Idn { diff --git a/kirby/src/Http/Params.php b/kirby/src/Http/Params.php index d72223a..343b5d0 100755 --- a/kirby/src/Http/Params.php +++ b/kirby/src/Http/Params.php @@ -2,13 +2,18 @@ namespace Kirby\Http; -use Kirby\Toolkit\Obj; use Kirby\Toolkit\Str; /** * A wrapper around a URL params * that converts it into a Kirby Obj for easier * access of each param. + * + * @package Kirby Http + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Params extends Query { diff --git a/kirby/src/Http/Path.php b/kirby/src/Http/Path.php index ea15814..eaa014a 100755 --- a/kirby/src/Http/Path.php +++ b/kirby/src/Http/Path.php @@ -8,6 +8,12 @@ use Kirby\Toolkit\Str; /** * A wrapper around an URL path * that converts the path into a Kirby stack + * + * @package Kirby Http + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Path extends Collection { diff --git a/kirby/src/Http/Query.php b/kirby/src/Http/Query.php index cf12769..0956802 100755 --- a/kirby/src/Http/Query.php +++ b/kirby/src/Http/Query.php @@ -8,6 +8,12 @@ use Kirby\Toolkit\Obj; * A wrapper around a URL query string * that converts it into a Kirby Obj for easier * access of each query attribute. + * + * @package Kirby Http + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Query extends Obj { diff --git a/kirby/src/Http/Remote.php b/kirby/src/Http/Remote.php index 6e63155..9083bce 100755 --- a/kirby/src/Http/Remote.php +++ b/kirby/src/Http/Remote.php @@ -12,9 +12,9 @@ use Kirby\Toolkit\Str; * * @package Kirby Http * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier - * @license http://www.opensource.org/licenses/mit-license.php MIT License + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Remote { @@ -180,7 +180,7 @@ class Remote } // do some request specific stuff - switch ($action = strtoupper($this->options['method'])) { + switch (strtoupper($this->options['method'])) { case 'POST': $this->curlopt[CURLOPT_POST] = true; $this->curlopt[CURLOPT_CUSTOMREQUEST] = 'POST'; diff --git a/kirby/src/Http/Request.php b/kirby/src/Http/Request.php index 4b13dd8..e861292 100755 --- a/kirby/src/Http/Request.php +++ b/kirby/src/Http/Request.php @@ -18,9 +18,9 @@ use Kirby\Toolkit\Str; * * @package Kirby Http * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier - * @license MIT + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Request { @@ -62,18 +62,9 @@ class Request protected $files; /** - * The Method object is a tiny - * wrapper around the request method - * name, which will validate and sanitize - * the given name and always return - * its uppercase version. + * The Method type * - * Examples: - * - * `$request->method()->name()` - * `$request->method()->is('post')` - * - * @var Method + * @var string */ protected $method; @@ -137,7 +128,7 @@ class Request } /** - * Improved var_dump output + * Improved `var_dump` output * * @return array */ @@ -165,7 +156,7 @@ class Request /** * Returns the Auth object if authentication is set * - * @return BasicAuth|BearerAuth|null + * @return Kirby\Http\Request\Auth\BasicAuth|Kirby\Http\Request\Auth\BearerAuth|null */ public function auth() { @@ -191,9 +182,9 @@ class Request /** * Returns the Body object * - * @return Body + * @return Kirby\Http\Request\Body */ - public function body(): Body + public function body() { return $this->body = $this->body ?? new Body(); } @@ -228,6 +219,16 @@ class Request return array_merge($this->body()->toArray(), $this->query()->toArray()); } + /** + * Returns the domain + * + * @return string + */ + public function domain(): string + { + return $this->url()->domain(); + } + /** * Fetches a single file array * from the Files object by key @@ -243,9 +244,9 @@ class Request /** * Returns the Files object * - * @return Files + * @return Kirby\Cms\Files */ - public function files(): Files + public function files() { return $this->files = $this->files ?? new Files(); } @@ -342,12 +343,20 @@ class Request return $this->url()->params(); } + /** + * Shortcut to the Path object + */ + public function path() + { + return $this->url()->path(); + } + /** * Returns the Query object * - * @return Query + * @return Kirby\Http\Query */ - public function query(): Query + public function query() { return $this->query = $this->query ?? new Query(); } @@ -369,9 +378,9 @@ class Request * the original object. * * @param array $props - * @return Uri + * @return Kirby\Http\Uri */ - public function url(array $props = null): Uri + public function url(array $props = null) { if ($props !== null) { return $this->url()->clone($props); diff --git a/kirby/src/Http/Request/Body.php b/kirby/src/Http/Request/Body.php index f659fc9..f9b6692 100755 --- a/kirby/src/Http/Request/Body.php +++ b/kirby/src/Http/Request/Body.php @@ -10,9 +10,9 @@ namespace Kirby\Http\Request; * * @package Kirby Http * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier - * @license MIT + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Body { diff --git a/kirby/src/Http/Request/Data.php b/kirby/src/Http/Request/Data.php index f828fbe..d53da74 100755 --- a/kirby/src/Http/Request/Data.php +++ b/kirby/src/Http/Request/Data.php @@ -12,15 +12,15 @@ namespace Kirby\Http\Request; * * @package Kirby Http * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier - * @license MIT + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ trait Data { /** - * Improved var_dump output + * Improved `var_dump` output * * @return array */ diff --git a/kirby/src/Http/Request/Files.php b/kirby/src/Http/Request/Files.php index f889c8f..d5304dd 100755 --- a/kirby/src/Http/Request/Files.php +++ b/kirby/src/Http/Request/Files.php @@ -11,9 +11,9 @@ namespace Kirby\Http\Request; * * @package Kirby Http * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier - * @license MIT + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Files { diff --git a/kirby/src/Http/Request/Query.php b/kirby/src/Http/Request/Query.php index d47ea45..946218d 100755 --- a/kirby/src/Http/Request/Query.php +++ b/kirby/src/Http/Request/Query.php @@ -9,9 +9,9 @@ namespace Kirby\Http\Request; * * @package Kirby Http * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier - * @license MIT + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Query { diff --git a/kirby/src/Http/Response.php b/kirby/src/Http/Response.php index 0fad4b1..05de816 100755 --- a/kirby/src/Http/Response.php +++ b/kirby/src/Http/Response.php @@ -14,9 +14,9 @@ use Kirby\Toolkit\F; * * @package Kirby Http * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier - * @license MIT + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Response { @@ -90,7 +90,7 @@ class Response } /** - * Improved var_dump() output + * Improved `var_dump` output * * @return array */ diff --git a/kirby/src/Http/Route.php b/kirby/src/Http/Route.php index a474496..13c60c6 100755 --- a/kirby/src/Http/Route.php +++ b/kirby/src/Http/Route.php @@ -3,14 +3,13 @@ namespace Kirby\Http; use Closure; -use Exception; /** * @package Kirby Http * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier - * @license MIT + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Route { @@ -107,7 +106,7 @@ class Route * * @return Closure */ - public function action(): Closure + public function action() { return $this->action; } @@ -117,7 +116,7 @@ class Route * * @return array */ - public function arguments() + public function arguments(): array { return $this->arguments; } @@ -159,7 +158,7 @@ class Route * * @return void */ - public function next() + public function next(): void { throw new Exceptions\NextRouteException('next'); } diff --git a/kirby/src/Http/Router.php b/kirby/src/Http/Router.php index 4e39880..a5b99c9 100755 --- a/kirby/src/Http/Router.php +++ b/kirby/src/Http/Router.php @@ -2,15 +2,16 @@ namespace Kirby\Http; +use Closure; use Exception; use InvalidArgumentException; /** * @package Kirby Http * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier - * @license MIT + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Router { @@ -82,10 +83,12 @@ class Router * * @param string $path * @param string $method + * @param Closure|null $callback * @return mixed */ - public function call(string $path = '', string $method = 'GET') + public function call(string $path = null, string $method = 'GET', Closure $callback = null) { + $path = $path ?? ''; $ignore = []; $result = null; $loop = true; @@ -98,14 +101,19 @@ class Router } try { - $result = $route->action()->call($route, ...$route->arguments()); + if ($callback) { + $result = $callback($route); + } else { + $result = $route->action()->call($route, ...$route->arguments()); + } + $loop = false; } catch (Exceptions\NextRouteException $e) { $ignore[] = $route; } if (is_a(static::$afterEach, 'Closure') === true) { - (static::$afterEach)($route, $path, $method, $result); + $result = (static::$afterEach)($route, $path, $method, $result); } } @@ -121,7 +129,7 @@ class Router * @param string $path * @param string $method * @param array $ignore - * @return Route|null + * @return Kirby\Http\Route|null */ public function find(string $path, string $method, array $ignore = null) { @@ -151,7 +159,7 @@ class Router * once Router::find() has been called * and only if a route was found. * - * @return Route|null + * @return Kirby\Http\Route|null */ public function route() { diff --git a/kirby/src/Http/Server.php b/kirby/src/Http/Server.php index 9b7d0c0..39f53a3 100755 --- a/kirby/src/Http/Server.php +++ b/kirby/src/Http/Server.php @@ -8,9 +8,9 @@ namespace Kirby\Http; * * @package Kirby Http * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier - * @license MIT + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Server { diff --git a/kirby/src/Http/Uri.php b/kirby/src/Http/Uri.php index 7e27899..bdbf2ef 100755 --- a/kirby/src/Http/Uri.php +++ b/kirby/src/Http/Uri.php @@ -5,16 +5,15 @@ namespace Kirby\Http; use Throwable; use Kirby\Exception\InvalidArgumentException; use Kirby\Toolkit\Properties; -use Kirby\Toolkit\Str; /** * Uri builder class * * @package Kirby Http * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier - * @license MIT + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Uri { @@ -197,7 +196,7 @@ class Uri * * @return string|null */ - public function auth() + public function auth(): ?string { $auth = trim($this->username . ':' . $this->password); return $auth !== ':' ? $auth : null; @@ -207,28 +206,15 @@ class Uri * Returns the base url (scheme + host) * without trailing slash * - * @return string + * @return string|null */ - public function base() + public function base(): ?string { - if (empty($this->host) === true || $this->host === '/') { - return null; + if ($domain = $this->domain()) { + return $this->scheme ? $this->scheme . '://' . $domain : $domain; } - $auth = $this->auth(); - $base = $this->scheme ? $this->scheme . '://' : ''; - - if ($auth !== null) { - $base .= $auth . '@'; - } - - $base .= $this->host; - - if ($this->port !== null && in_array($this->port, [80, 443]) === false) { - $base .= ':' . $this->port; - } - - return $base; + return null; } /** @@ -238,7 +224,7 @@ class Uri * @param array $props * @return self */ - public function clone(array $props = []): self + public function clone(array $props = []) { $clone = clone $this; @@ -254,13 +240,15 @@ class Uri * @param boolean $forwarded * @return self */ - public static function current(array $props = [], bool $forwarded = false): self + public static function current(array $props = [], bool $forwarded = false) { if (static::$current !== null) { return static::$current; } - $uri = parse_url('http://getkirby.com' . Server::get('REQUEST_URI')); + $uri = Server::get('REQUEST_URI'); + $uri = str_replace(Server::get('HTTP_HOST'), '', $uri); + $uri = parse_url('http://getkirby.com' . $uri); $url = new static(array_merge([ 'scheme' => Server::https() === true ? 'https' : 'http', @@ -273,6 +261,33 @@ class Uri return $url; } + /** + * Returns the domain without scheme, path or query + * + * @return string|null + */ + public function domain(): ?string + { + if (empty($this->host) === true || $this->host === '/') { + return null; + } + + $auth = $this->auth(); + $domain = ''; + + if ($auth !== null) { + $domain .= $auth . '@'; + } + + $domain .= $this->host; + + if ($this->port !== null && in_array($this->port, [80, 443]) === false) { + $domain .= ':' . $this->port; + } + + return $domain; + } + /** * @return boolean */ @@ -303,7 +318,7 @@ class Uri * * @return self */ - public function idn(): self + public function idn() { if (empty($this->host) === false) { $this->setHost(Idn::decode($this->host)); @@ -319,7 +334,7 @@ class Uri * @param bool $forwarded * @return string */ - public static function index(array $props = [], bool $forwarded = false): self + public static function index(array $props = [], bool $forwarded = false) { if (Server::cli() === true) { $path = null; @@ -371,17 +386,17 @@ class Uri * @param string $host * @return self */ - public function setHost(string $host = null): self + public function setHost(string $host = null) { $this->host = $host; return $this; } /** - * @param Params|string|array|null $path + * @param Kirby\Http\Params|string|array|null $path * @return self */ - public function setParams($params = null): self + public function setParams($params = null) { $this->params = is_a($params, 'Kirby\Http\Params') === true ? $params : new Params($params); return $this; @@ -391,17 +406,17 @@ class Uri * @param string|null $password * @return self */ - public function setPassword(string $password = null): self + public function setPassword(string $password = null) { $this->password = $password; return $this; } /** - * @param Path|string|array|null $path + * @param Kirby\Http\Path|string|array|null $path * @return self */ - public function setPath($path = null): self + public function setPath($path = null) { $this->path = is_a($path, 'Kirby\Http\Path') === true ? $path : new Path($path); return $this; @@ -411,7 +426,7 @@ class Uri * @param int|null $port * @return self */ - public function setPort(int $port = null): self + public function setPort(int $port = null) { if ($port === 0) { $port = null; @@ -428,10 +443,10 @@ class Uri } /** - * @param string|array|null $query + * @param Kirby\Http\Query|string|array|null $query * @return self */ - public function setQuery($query = null): self + public function setQuery($query = null) { $this->query = is_a($query, 'Kirby\Http\Query') === true ? $query : new Query($query); return $this; @@ -441,7 +456,7 @@ class Uri * @param string $scheme * @return self */ - public function setScheme(string $scheme = null): self + public function setScheme(string $scheme = null) { if ($scheme !== null && in_array($scheme, ['http', 'https', 'ftp']) === false) { throw new InvalidArgumentException('Invalid URL scheme: ' . $scheme); @@ -458,7 +473,7 @@ class Uri * @param bool $slash * @return self */ - public function setSlash(bool $slash = false): self + public function setSlash(bool $slash = false) { $this->slash = $slash; return $this; @@ -468,7 +483,7 @@ class Uri * @param string|null $username * @return self */ - public function setUsername(string $username = null): self + public function setUsername(string $username = null) { $this->username = $username; return $this; @@ -538,7 +553,7 @@ class Uri * * @return self */ - public function unIdn(): self + public function unIdn() { if (empty($this->host) === false) { $this->setHost(Idn::encode($this->host)); diff --git a/kirby/src/Http/Url.php b/kirby/src/Http/Url.php index f2fa110..0eb65ea 100755 --- a/kirby/src/Http/Url.php +++ b/kirby/src/Http/Url.php @@ -2,11 +2,16 @@ namespace Kirby\Http; -use Exception; use Kirby\Toolkit\Str; /** * Static URL tools + * + * @package Kirby Http + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Url { @@ -16,7 +21,7 @@ class Url * * @var string */ - public static $home = '/'; + public static $home = '/'; /** * The current Uri object @@ -47,7 +52,7 @@ class Url */ public static function build(array $parts = [], string $url = null): string { - return (new Uri($url ?? static::current()))->clone($parts); + return (string)(new Uri($url ?? static::current()))->clone($parts); } /** @@ -76,7 +81,7 @@ class Url * @param string $url * @return string */ - public static function fix(string $url = null) + public static function fix(string $url = null): string { // make sure to not touch absolute urls return (!preg_match('!^(https|http|ftp)\:\/\/!i', $url)) ? 'http://' . $url : $url; @@ -125,7 +130,7 @@ class Url * @param string $home * @return string */ - public static function makeAbsolute(string $path = null, string $home = null) + public static function makeAbsolute(string $path = null, string $home = null): string { if ($path === '' || $path === '/' || $path === null) { return $home ?? static::home(); @@ -156,7 +161,7 @@ class Url * @param string|array|null $url * @param bool $leadingSlash * @param bool $trailingSlash - * @return mixed + * @return xtring */ public static function path($url = null, bool $leadingSlash = false, bool $trailingSlash = false): string { @@ -167,7 +172,7 @@ class Url * Returns the query for the given url * * @param string|array|null $url - * @return mixed + * @return string */ public static function query($url = null): string { @@ -188,12 +193,12 @@ class Url * Shortens the Url by removing all unnecessary parts * * @param string $url - * @param boolean $length + * @param int $length * @param boolean $base * @param string $rep * @return string */ - public static function short($url = null, $length = false, bool $base = false, string $rep = '…'): string + public static function short($url = null, int $length = 0, bool $base = false, string $rep = '…'): string { $uri = static::toObject($url); @@ -250,7 +255,7 @@ class Url * Smart resolver for internal and external urls * * @param string $path - * @param $options + * @param mixed $options * @return string */ public static function to(string $path = null, $options = null): string @@ -273,7 +278,7 @@ class Url * Converts the Url to a Uri object * * @param string $url - * @return Uri + * @return Kirby\Http\Uri */ public static function toObject($url = null) { diff --git a/kirby/src/Http/Visitor.php b/kirby/src/Http/Visitor.php index 2e67b18..564770a 100755 --- a/kirby/src/Http/Visitor.php +++ b/kirby/src/Http/Visitor.php @@ -2,7 +2,6 @@ namespace Kirby\Http; -use Kirby\Toolkit\A; use Kirby\Toolkit\Collection; use Kirby\Toolkit\Mime; use Kirby\Toolkit\Obj; @@ -15,9 +14,9 @@ use Kirby\Toolkit\Str; * * @package Kirby Http * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier - * @license MIT + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Visitor { @@ -69,7 +68,7 @@ class Visitor * accepted language otherwise * * @param string|null $acceptedLanguage - * @return Obj|Visitor|null + * @return Kirby\Toolkit\Obj|Kirby\Http\Visitor|null */ public function acceptedLanguage(string $acceptedLanguage = null) { @@ -85,7 +84,7 @@ class Visitor * Returns an array of all accepted languages * including their quality and locale * - * @return Collection + * @return Kirby\Toolkit\Collection */ public function acceptedLanguages() { @@ -136,7 +135,7 @@ class Visitor * accepted mime type otherwise * * @param string|null $acceptedMimeType - * @return Obj|Visitor + * @return Kirby\Toolkit\Obj|Kirby\Http\Visitor */ public function acceptedMimeType(string $acceptedMimeType = null) { @@ -151,7 +150,7 @@ class Visitor /** * Returns a collection of all accepted mime types * - * @return Collection + * @return Kirby\Toolkit\Collection */ public function acceptedMimeTypes() { diff --git a/kirby/src/Image/Camera.php b/kirby/src/Image/Camera.php index b4fb997..4821bab 100755 --- a/kirby/src/Image/Camera.php +++ b/kirby/src/Image/Camera.php @@ -3,14 +3,14 @@ namespace Kirby\Image; /** -* Small class which hold info about the camera -* -* @package Kirby Toolkit -* @author Bastian Allgeier -* @link http://getkirby.com -* @copyright Bastian Allgeier -* @license MIT -*/ + * Small class which hold info about the camera + * + * @package Kirby Image + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT + */ class Camera { @@ -83,7 +83,7 @@ class Camera } /** - * Improved var_dump() output + * Improved `var_dump` output * * @return array */ diff --git a/kirby/src/Image/Darkroom.php b/kirby/src/Image/Darkroom.php index 1a3ff2f..1b0a282 100755 --- a/kirby/src/Image/Darkroom.php +++ b/kirby/src/Image/Darkroom.php @@ -7,6 +7,12 @@ use Exception; /** * A wrapper around resizing and cropping * via GDLib, ImageMagick or other libraries. + * + * @package Kirby Image + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Darkroom { diff --git a/kirby/src/Image/Darkroom/GdLib.php b/kirby/src/Image/Darkroom/GdLib.php index 87074a3..6cffb7e 100755 --- a/kirby/src/Image/Darkroom/GdLib.php +++ b/kirby/src/Image/Darkroom/GdLib.php @@ -8,6 +8,15 @@ use Exception; use claviska\SimpleImage; use Kirby\Image\Darkroom; +/** + * GdLib + * + * @package Kirby Image + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT + */ class GdLib extends Darkroom { public function process(string $file, array $options = []): array diff --git a/kirby/src/Image/Darkroom/ImageMagick.php b/kirby/src/Image/Darkroom/ImageMagick.php index f7cb27c..b997552 100755 --- a/kirby/src/Image/Darkroom/ImageMagick.php +++ b/kirby/src/Image/Darkroom/ImageMagick.php @@ -6,16 +6,17 @@ use Exception; use Kirby\Image\Darkroom; use Kirby\Toolkit\F; +/** + * ImageMagick + * + * @package Kirby Image + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT + */ class ImageMagick extends Darkroom { - protected function defaults(): array - { - return parent::defaults() + [ - 'bin' => 'convert', - 'interlace' => false, - ]; - } - protected function autoOrient(string $file, array $options) { if ($options['autoOrient'] === true) { @@ -42,6 +43,14 @@ class ImageMagick extends Darkroom return sprintf($options['bin'] . ' "%s"', $file); } + protected function defaults(): array + { + return parent::defaults() + [ + 'bin' => 'convert', + 'interlace' => false, + ]; + } + protected function grayscale(string $file, array $options) { if ($options['grayscale'] === true) { @@ -80,7 +89,7 @@ class ImageMagick extends Darkroom // log broken commands if ($return !== 0) { - error_log('The imagemagick convert command could not be executed: ' . $command); + throw new Exception('The imagemagick convert command could not be executed: ' . $command); } return $options; diff --git a/kirby/src/Image/Dimensions.php b/kirby/src/Image/Dimensions.php index eb0f13c..ee8ed4b 100755 --- a/kirby/src/Image/Dimensions.php +++ b/kirby/src/Image/Dimensions.php @@ -10,9 +10,9 @@ namespace Kirby\Image; * * @package Kirby Image * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier - * @license MIT + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Dimensions { @@ -44,7 +44,7 @@ class Dimensions } /** - * Improved var_dump() output + * Improved `var_dump` output * * @return array */ @@ -68,9 +68,9 @@ class Dimensions * * @param int $width * @param int $height - * @return Dimensions + * @return self */ - public function crop(int $width, int $height = null): self + public function crop(int $width, int $height = null) { $this->width = $width; $this->height = $width; @@ -111,9 +111,9 @@ class Dimensions * @param int $box the max width and/or height * @param bool $force If true, the dimensions will be * upscaled to fit the box if smaller - * @return Dimensions object with recalculated dimensions + * @return self object with recalculated dimensions */ - public function fit(int $box, bool $force = false): self + public function fit(int $box, bool $force = false) { if ($this->width == 0 || $this->height == 0) { $this->width = $box; @@ -163,9 +163,9 @@ class Dimensions * @param int $fit the max height * @param bool $force If true, the dimensions will be * upscaled to fit the box if smaller - * @return Dimensions object with recalculated dimensions + * @return self object with recalculated dimensions */ - public function fitHeight(int $fit = null, bool $force = false): self + public function fitHeight(int $fit = null, bool $force = false) { return $this->fitSize('height', $fit, $force); } @@ -177,9 +177,9 @@ class Dimensions * @param int $fit the max width * @param bool $force If true, the dimensions will be * upscaled to fit the box if smaller - * @return Dimensions object with recalculated dimensions + * @return self object with recalculated dimensions */ - protected function fitSize(string $ref, int $fit = null, bool $force = false): self + protected function fitSize(string $ref, int $fit = null, bool $force = false) { if ($fit === 0 || $fit === null) { return $this; @@ -216,9 +216,9 @@ class Dimensions * @param int $fit the max width * @param bool $force If true, the dimensions will be * upscaled to fit the box if smaller - * @return Dimensions object with recalculated dimensions + * @return self object with recalculated dimensions */ - public function fitWidth(int $fit = null, bool $force = false): self + public function fitWidth(int $fit = null, bool $force = false) { return $this->fitSize('width', $fit, $force); } @@ -229,9 +229,9 @@ class Dimensions * @param int $width the max height * @param int $height the max width * @param bool $force - * @return Dimensions + * @return self */ - public function fitWidthAndHeight(int $width = null, int $height = null, bool $force = false): self + public function fitWidthAndHeight(int $width = null, int $height = null, bool $force = false) { if ($this->width > $this->height) { $this->fitWidth($width, $force); @@ -258,7 +258,7 @@ class Dimensions * @param string $root * @return self */ - public static function forImage(string $root): self + public static function forImage(string $root) { if (file_exists($root) === false) { return new static(0, 0); @@ -274,7 +274,7 @@ class Dimensions * @param string $root * @return self */ - public static function forSvg(string $root): self + public static function forSvg(string $root) { // avoid xml errors libxml_use_internal_errors(true); @@ -366,9 +366,9 @@ class Dimensions * @param int $width * @param int $height * @param bool $force - * @return Dimensions + * @return self */ - public function resize(int $width = null, int $height = null, bool $force = false): self + public function resize(int $width = null, int $height = null, bool $force = false) { return $this->fitWidthAndHeight($width, $height, $force); } diff --git a/kirby/src/Image/Exif.php b/kirby/src/Image/Exif.php index 99aa169..3fa8930 100755 --- a/kirby/src/Image/Exif.php +++ b/kirby/src/Image/Exif.php @@ -9,9 +9,9 @@ use Kirby\Toolkit\V; * * @package Kirby Image * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier - * @license MIT + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Exif { @@ -84,7 +84,7 @@ class Exif /** * Constructor * - * @param Image $image + * @param Kirby\Image\Image $image */ public function __construct(Image $image) { @@ -106,7 +106,7 @@ class Exif /** * Returns the Camera object * - * @return Camera|null + * @return Kirby\Image\Camera|null */ public function camera() { @@ -120,7 +120,7 @@ class Exif /** * Returns the location object * - * @return Location|null + * @return Kirby\Image\Location|null */ public function location() { @@ -283,7 +283,7 @@ class Exif } /** - * Improved var_dump() output + * Improved `var_dump` output * * @return array */ diff --git a/kirby/src/Image/Image.php b/kirby/src/Image/Image.php index 7e8bf1d..d2b6943 100755 --- a/kirby/src/Image/Image.php +++ b/kirby/src/Image/Image.php @@ -18,9 +18,9 @@ use Kirby\Toolkit\V; * * @package Kirby Image * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier - * @license MIT + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Image extends File { @@ -54,7 +54,7 @@ class Image extends File } /** - * Improved var_dump() output + * Improved `var_dump` output * * @return array */ @@ -80,15 +80,15 @@ class Image extends File /** * Returns the dimensions of the file if possible * - * @return Dimensions + * @return Kirby\Image\Dimensions */ - public function dimensions(): Dimensions + public function dimensions() { if ($this->dimensions !== null) { return $this->dimensions; } - if (in_array($this->mime(), ['image/jpeg', 'image/png', 'image/gif'])) { + if (in_array($this->mime(), ['image/jpeg', 'image/jp2', 'image/png', 'image/gif'])) { return $this->dimensions = Dimensions::forImage($this->root); } @@ -114,9 +114,9 @@ class Image extends File /** * Returns the exif object for this file (if image) * - * @return Exif + * @return Kirby\Image\Exif */ - public function exif(): Exif + public function exif() { if ($this->exif !== null) { return $this->exif; @@ -129,7 +129,7 @@ class Image extends File * Sends an appropriate header for the asset * * @param boolean $send - * @return Response|string + * @return Kirby\Http\Response|string */ public function header(bool $send = true) { diff --git a/kirby/src/Image/Location.php b/kirby/src/Image/Location.php index f6aff4e..2c2e5f8 100755 --- a/kirby/src/Image/Location.php +++ b/kirby/src/Image/Location.php @@ -3,15 +3,15 @@ namespace Kirby\Image; /** -* Returns the latitude and longitude values -* for exif location data if available -* -* @package Kirby Toolkit -* @author Bastian Allgeier -* @link http://getkirby.com -* @copyright Bastian Allgeier -* @license MIT -*/ + * Returns the latitude and longitude values + * for exif location data if available + * + * @package Kirby Image + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT + */ class Location { @@ -126,7 +126,7 @@ class Location } /** - * Improved var_dump() output + * Improved `var_dump` output * * @return array */ diff --git a/kirby/src/Session/AutoSession.php b/kirby/src/Session/AutoSession.php index 4d70e5d..e26c071 100755 --- a/kirby/src/Session/AutoSession.php +++ b/kirby/src/Session/AutoSession.php @@ -7,9 +7,9 @@ namespace Kirby\Session; * * @package Kirby Session * @author Lukas Bestle - * @link http://getkirby.com - * @copyright Bastian Allgeier - * @license MIT + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class AutoSession { @@ -21,7 +21,7 @@ class AutoSession /** * Creates a new AutoSession instance * - * @param SessionStore|string $store SessionStore object or a path to the storage directory (uses the FileSessionStore) + * @param Kirby\Session\SessionStore|string $store SessionStore object or a path to the storage directory (uses the FileSessionStore) * @param array $options Optional additional options: * - `durationNormal`: Duration of normal sessions in seconds * Defaults to 2 hours @@ -66,9 +66,9 @@ class AutoSession * Defaults to `cookie` * - `long`: Whether the session is a long "remember me" session or a normal session * Defaults to `false` - * @return Session + * @return Kirby\Session\Session */ - public function get(array $options = []): Session + public function get(array $options = []) { // merge options with defaults $options = array_merge([ @@ -149,9 +149,9 @@ class AutoSession * Defaults to `1800` (half an hour) * - `renewable`: Should it be possible to extend the expiry date? * Defaults to `true` - * @return Session + * @return Kirby\Session\Session */ - public function createManually(array $options = []): Session + public function createManually(array $options = []) { // only ever allow manual transmission mode // to prevent overwriting our "auto" session diff --git a/kirby/src/Session/FileSessionStore.php b/kirby/src/Session/FileSessionStore.php index 81c8c49..6a03bf2 100755 --- a/kirby/src/Session/FileSessionStore.php +++ b/kirby/src/Session/FileSessionStore.php @@ -12,9 +12,9 @@ use Kirby\Toolkit\Str; /** * @package Kirby Session * @author Lukas Bestle - * @link http://getkirby.com - * @copyright Bastian Allgeier - * @license MIT + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class FileSessionStore extends SessionStore { @@ -370,6 +370,8 @@ class FileSessionStore extends SessionStore /** * Cleans up the open locks and file handles + * + * @codeCoverageIgnore */ public function __destruct() { diff --git a/kirby/src/Session/Session.php b/kirby/src/Session/Session.php index 4ad544e..31fc742 100755 --- a/kirby/src/Session/Session.php +++ b/kirby/src/Session/Session.php @@ -15,9 +15,9 @@ use Kirby\Toolkit\Str; /** * @package Kirby Session * @author Lukas Bestle - * @link http://getkirby.com - * @copyright Bastian Allgeier - * @license MIT + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Session { @@ -49,7 +49,7 @@ class Session /** * Creates a new Session instance * - * @param Sessions $sessions Parent sessions object + * @param Kirby\Session\Sessions $sessions Parent sessions object * @param string|null $token Session token or null for a new session * @param array $options Optional additional options: * - `mode`: Token transmission mode (cookie or manual) @@ -305,9 +305,9 @@ class Session /** * Returns the session data object * - * @return SessionData + * @return Kirby\Session\SessionData */ - public function data(): SessionData + public function data() { return $this->data; } diff --git a/kirby/src/Session/SessionData.php b/kirby/src/Session/SessionData.php index 76c0042..7675605 100755 --- a/kirby/src/Session/SessionData.php +++ b/kirby/src/Session/SessionData.php @@ -12,9 +12,9 @@ use Kirby\Exception\LogicException; * * @package Kirby Session * @author Lukas Bestle - * @link http://getkirby.com - * @copyright Bastian Allgeier - * @license MIT + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class SessionData { @@ -24,7 +24,8 @@ class SessionData /** * Creates a new SessionData instance * - * @param Session $session Session object this data belongs to + * @codeCoverageIgnore + * @param Kirby\Session\Session $session Session object this data belongs to * @param array $data Currently stored session data */ public function __construct(Session $session, array $data) diff --git a/kirby/src/Session/SessionStore.php b/kirby/src/Session/SessionStore.php index 08b76d4..b916e9a 100755 --- a/kirby/src/Session/SessionStore.php +++ b/kirby/src/Session/SessionStore.php @@ -5,9 +5,9 @@ namespace Kirby\Session; /** * @package Kirby Session * @author Lukas Bestle - * @link http://getkirby.com - * @copyright Bastian Allgeier - * @license MIT + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ abstract class SessionStore { diff --git a/kirby/src/Session/Sessions.php b/kirby/src/Session/Sessions.php index 14a1674..5d07a7a 100755 --- a/kirby/src/Session/Sessions.php +++ b/kirby/src/Session/Sessions.php @@ -15,9 +15,9 @@ use Kirby\Toolkit\Str; * * @package Kirby Session * @author Lukas Bestle - * @link http://getkirby.com - * @copyright Bastian Allgeier - * @license MIT + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Sessions { @@ -30,7 +30,7 @@ class Sessions /** * Creates a new Sessions instance * - * @param SessionStore|string $store SessionStore object or a path to the storage directory (uses the FileSessionStore) + * @param Kirby\Session\SessionStore|string $store SessionStore object or a path to the storage directory (uses the FileSessionStore) * @param array $options Optional additional options: * - `mode`: Default token transmission mode (cookie, header or manual) * Defaults to `cookie` @@ -105,9 +105,9 @@ class Sessions * Defaults to `1800` (half an hour) * - `renewable`: Should it be possible to extend the expiry date? * Defaults to `true` - * @return Session + * @return Kirby\Session\Session */ - public function create(array $options = []): Session + public function create(array $options = []) { // fall back to default mode if (!isset($options['mode'])) { @@ -122,9 +122,9 @@ class Sessions * * @param string $token Session token, either including or without the key * @param string $mode Optional transmission mode override - * @return Session + * @return Kirby\Session\Session */ - public function get(string $token, string $mode = null): Session + public function get(string $token, string $mode = null) { if (isset($this->cache[$token])) { return $this->cache[$token]; @@ -139,7 +139,7 @@ class Sessions * - In `header` mode: Gets the session from the `Authorization` request header * - In `manual` mode: Fails and throws an Exception * - * @return Session|null Either the current session or null in case there isn't one + * @return Kirby\Session\Session|null Either the current session or null in case there isn't one */ public function current() { @@ -183,7 +183,7 @@ class Sessions * - Tries to get the session from the cookie * - Otherwise returns null * - * @return Session|null Either the current session or null in case there isn't one + * @return Kirby\Session\Session|null Either the current session or null in case there isn't one */ public function currentDetected() { @@ -211,9 +211,9 @@ class Sessions * Getter for the session store instance * Used internally * - * @return SessionStore + * @return Kirby\Session\SessionStore */ - public function store(): SessionStore + public function store() { return $this->store; } diff --git a/kirby/src/Text/KirbyTag.php b/kirby/src/Text/KirbyTag.php index 90f69f0..fd4669f 100755 --- a/kirby/src/Text/KirbyTag.php +++ b/kirby/src/Text/KirbyTag.php @@ -8,6 +8,12 @@ use Kirby\Exception\BadMethodCallException; /** * Representation and parse of a single KirbyTag. + * + * @package Kirby Text + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class KirbyTag { @@ -41,6 +47,7 @@ class KirbyTag } foreach ($attrs as $attrName => $attrValue) { + $attrName = strtolower($attrName); $this->$attrName = $attrValue; } @@ -54,11 +61,13 @@ class KirbyTag public function __get(string $attr) { - return null; + $attr = strtolower($attr); + return $this->$attr ?? null; } public function attr(string $name, $default = null) { + $name = strtolower($name); return $this->$name ?? $default; } @@ -67,11 +76,18 @@ class KirbyTag return (new static(...$arguments))->render(); } - public static function parse(string $string, array $data = [], array $options = []): self + /** + * @param string $string + * @param array $data + * @param array $options + * @return self + */ + public static function parse(string $string, array $data = [], array $options = []) { // remove the brackets, extract the first attribute (the tag type) $tag = trim(rtrim(ltrim($string, '('), ')')); $type = trim(substr($tag, 0, strpos($tag, ':'))); + $type = strtolower($type); $attr = static::$types[$type]['attr'] ?? []; // the type should be parsed as an attribute, so we add it here diff --git a/kirby/src/Text/KirbyTags.php b/kirby/src/Text/KirbyTags.php index ac9239e..690647b 100755 --- a/kirby/src/Text/KirbyTags.php +++ b/kirby/src/Text/KirbyTags.php @@ -9,6 +9,12 @@ use Exception; * given string. KiryTags are defined via * `KirbyTag::$types`. The default tags for the * Cms are located in `kirby/config/tags.php` + * + * @package Kirby Text + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class KirbyTags { diff --git a/kirby/src/Text/Markdown.php b/kirby/src/Text/Markdown.php index 03fd1ee..7ae1cb2 100755 --- a/kirby/src/Text/Markdown.php +++ b/kirby/src/Text/Markdown.php @@ -14,9 +14,9 @@ use ParsedownExtra; * * @package Kirby Text * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier - * @license MIT + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Markdown { diff --git a/kirby/src/Text/SmartyPants.php b/kirby/src/Text/SmartyPants.php index c4ccbaf..61279cb 100755 --- a/kirby/src/Text/SmartyPants.php +++ b/kirby/src/Text/SmartyPants.php @@ -12,9 +12,9 @@ use Michelf\SmartyPantsTypographer; * * @package Kirby Text * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier - * @license MIT + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class SmartyPants { diff --git a/kirby/src/Toolkit/A.php b/kirby/src/Toolkit/A.php index 7341fd8..170cb65 100755 --- a/kirby/src/Toolkit/A.php +++ b/kirby/src/Toolkit/A.php @@ -13,8 +13,9 @@ use Exception; * * @package Kirby Toolkit * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class A { diff --git a/kirby/src/Toolkit/Collection.php b/kirby/src/Toolkit/Collection.php index 54c611d..5f3973a 100755 --- a/kirby/src/Toolkit/Collection.php +++ b/kirby/src/Toolkit/Collection.php @@ -10,6 +10,12 @@ use Exception; * The collection class provides a nicer * interface around arrays of arrays or objects, * with advanced filters, sorting, navigation and more. + * + * @package Kirby Toolkit + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Collection extends Iterator implements Countable { @@ -111,7 +117,7 @@ class Collection extends Iterator implements Countable * * @param mixed $key * @param mixed $item - * @return Collection + * @return Kirby\Toolkit\Collection */ public function append(...$args) { @@ -129,7 +135,7 @@ class Collection extends Iterator implements Countable * The last chunk may be smaller * * @param int $size Number of elements per chunk - * @return Collection A new collection with an element for each chunk and + * @return Kirby\Toolkit\Collection A new collection with an element for each chunk and * a sub collection in each chunk */ public function chunk(int $size) @@ -162,7 +168,7 @@ class Collection extends Iterator implements Countable * * @return self */ - public function clone(): self + public function clone() { return clone $this; } @@ -191,7 +197,7 @@ class Collection extends Iterator implements Countable /** * Clone and remove all elements from the collection * - * @return Collection + * @return Kirby\Toolkit\Collection */ public function empty() { @@ -204,9 +210,9 @@ class Collection extends Iterator implements Countable /** * Adds all elements to the collection * - * @return Collection + * @return self */ - public function extend($items): self + public function extend($items) { $collection = clone $this; return $collection->set($items); @@ -366,11 +372,11 @@ class Collection extends Iterator implements Countable * * @param string $attribute * @param mixed $value - * @return mixed + * @return mixed|null */ public function findBy(string $attribute, $value) { - foreach ($this->data as $key => $item) { + foreach ($this->data as $item) { if ($this->getAttribute($item, $attribute) == $value) { return $item; } @@ -384,7 +390,7 @@ class Collection extends Iterator implements Countable * @param string $key * @return mixed */ - public function findByKey($key) + public function findByKey(string $key) { return $this->get($key); } @@ -403,7 +409,7 @@ class Collection extends Iterator implements Countable /** * Returns the elements in reverse order * - * @return Collection + * @return Kirby\Toolkit\Collection */ public function flip() { @@ -475,9 +481,9 @@ class Collection extends Iterator implements Countable * Groups the elements by a given callback * * @param Closure $callback - * @return Collection A new collection with an element for each group and a subcollection in each group + * @return self A new collection with an element for each group and a subcollection in each group */ - public function group(Closure $callback): Collection + public function group(Closure $callback) { $groups = []; @@ -519,7 +525,7 @@ class Collection extends Iterator implements Countable * * @param string $field * @param bool $i - * @return Collection A new collection with an element for each group and a subcollection in each group + * @return Kirby\Toolkit\Collection A new collection with an element for each group and a subcollection in each group */ public function groupBy($field, bool $i = true) { @@ -590,7 +596,7 @@ class Collection extends Iterator implements Countable * Returns a new object with a limited number of elements * * @param int $limit The number of elements to return - * @return Collection + * @return Kirby\Toolkit\Collection */ public function limit(int $limit) { @@ -601,7 +607,7 @@ class Collection extends Iterator implements Countable * Map a function to each element * * @param callable $callback - * @return Collection + * @return Kirby\Toolkit\Collection */ public function map(callable $callback) { @@ -624,7 +630,7 @@ class Collection extends Iterator implements Countable * Returns a Collection without the given element(s) * * @param args any number of keys, passed as individual arguments - * @return Collection + * @return Kirby\Toolkit\Collection */ public function not(...$keys) { @@ -639,7 +645,7 @@ class Collection extends Iterator implements Countable * Returns a new object starting from the given offset * * @param int $offset The index to start from - * @return Collection + * @return Kirby\Toolkit\Collection */ public function offset(int $offset) { @@ -649,7 +655,7 @@ class Collection extends Iterator implements Countable /** * Add pagination * - * @return Collection a sliced set of data + * @return Kirby\Toolkit\Collection a sliced set of data */ public function paginate(...$arguments) { @@ -662,7 +668,7 @@ class Collection extends Iterator implements Countable /** * Get the previously added pagination object * - * @return Pagination|null + * @return Kirby\Toolkit\Pagination|null */ public function pagination() { @@ -704,9 +710,9 @@ class Collection extends Iterator implements Countable * * @param mixed $key * @param mixed $item - * @return Collection + * @return self */ - public function prepend(...$args): self + public function prepend(...$args) { if (count($args) === 1) { array_unshift($this->data, $args[0]); @@ -786,7 +792,7 @@ class Collection extends Iterator implements Countable * @param mixed $value * @return self */ - public function set($key, $value = null): self + public function set($key, $value = null) { if (is_array($key)) { foreach ($key as $k => $v) { @@ -801,7 +807,7 @@ class Collection extends Iterator implements Countable /** * Shuffle all elements * - * @return Collection + * @return Kirby\Toolkit\Collection */ public function shuffle() { @@ -824,7 +830,7 @@ class Collection extends Iterator implements Countable * * @param int $offset The optional index to start the slice from * @param int $limit The optional number of elements to return - * @return Collection + * @return Kirby\Toolkit\Collection */ public function slice(int $offset = 0, int $limit = null) { @@ -975,7 +981,7 @@ class Collection extends Iterator implements Countable * Alias for $this->not() * * @param args any number of keys, passed as individual arguments - * @return Collection + * @return Kirby\Toolkit\Collection */ public function without(...$keys) { diff --git a/kirby/src/Toolkit/Component.php b/kirby/src/Toolkit/Component.php index a88f128..e8afd48 100755 --- a/kirby/src/Toolkit/Component.php +++ b/kirby/src/Toolkit/Component.php @@ -4,11 +4,16 @@ namespace Kirby\Toolkit; use ArgumentCountError; use Kirby\Exception\InvalidArgumentException; -use Kirby\Toolkit\A; use TypeError; /** * Vue-like components + * + * @package Kirby Toolkit + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Component { @@ -129,7 +134,7 @@ class Component } /** - * Improved var_dump output + * Improved `var_dump` output * * @return array */ diff --git a/kirby/src/Toolkit/Config.php b/kirby/src/Toolkit/Config.php index 73ca2c9..59cabf3 100755 --- a/kirby/src/Toolkit/Config.php +++ b/kirby/src/Toolkit/Config.php @@ -8,9 +8,9 @@ namespace Kirby\Toolkit; * * @package Kirby Toolkit * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier - * @license http://www.opensource.org/licenses/mit-license.php MIT License + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Config extends Silo { diff --git a/kirby/src/Toolkit/Controller.php b/kirby/src/Toolkit/Controller.php index fac7304..e711769 100755 --- a/kirby/src/Toolkit/Controller.php +++ b/kirby/src/Toolkit/Controller.php @@ -3,13 +3,18 @@ namespace Kirby\Toolkit; use Closure; -use Exception; use ReflectionFunction; /** * A smart extension of Closures with * magic dependency injection based on the * defined variable names. + * + * @package Kirby Toolkit + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Controller { diff --git a/kirby/src/Toolkit/Dir.php b/kirby/src/Toolkit/Dir.php index 2196ba1..c84dc05 100755 --- a/kirby/src/Toolkit/Dir.php +++ b/kirby/src/Toolkit/Dir.php @@ -14,8 +14,9 @@ use Throwable; * * @package Kirby Toolkit * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Dir { @@ -42,9 +43,11 @@ class Dir * * @param string $dir * @param string $target + * @param bool $recursive + * @param array $ignore * @return bool */ - public static function copy(string $dir, string $target): bool + public static function copy(string $dir, string $target, bool $recursive = true, array $ignore = []): bool { if (is_dir($dir) === false) { throw new Exception('The directory "' . $dir . '" does not exist'); @@ -61,8 +64,14 @@ class Dir foreach (static::read($dir) as $name) { $root = $dir . '/' . $name; + if (in_array($root, $ignore) === true) { + continue; + } + if (is_dir($root) === true) { - static::copy($root, $target . '/' . $name); + if ($recursive === true) { + static::copy($root, $target . '/' . $name); + } } else { F::copy($root, $target . '/' . $name); } diff --git a/kirby/src/Toolkit/Escape.php b/kirby/src/Toolkit/Escape.php index 904784a..a3601b7 100755 --- a/kirby/src/Toolkit/Escape.php +++ b/kirby/src/Toolkit/Escape.php @@ -13,8 +13,13 @@ use Zend\Escaper\Escaper; * value, etc. * * Wrapper for the Zend Escaper - * * @link https://github.com/zendframework/zend-escaper + * + * @package Kirby Toolkit + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Escape { diff --git a/kirby/src/Toolkit/F.php b/kirby/src/Toolkit/F.php index 45397c9..cf8feed 100755 --- a/kirby/src/Toolkit/F.php +++ b/kirby/src/Toolkit/F.php @@ -3,7 +3,6 @@ namespace Kirby\Toolkit; use Exception; -use Kirby\Http\Header; use Throwable; use ZipArchive; @@ -15,8 +14,9 @@ use ZipArchive; * * @package Kirby Toolkit * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class F { @@ -77,6 +77,7 @@ class F 'jpeg', 'jpg', 'jpe', + 'jp2', 'png', 'ps', 'psd', @@ -455,7 +456,7 @@ class F } // delete the existing file - unlink($newRoot); + static::remove($newRoot); } // actually move the file if it exists diff --git a/kirby/src/Toolkit/Facade.php b/kirby/src/Toolkit/Facade.php index 626b1f4..25a4679 100755 --- a/kirby/src/Toolkit/Facade.php +++ b/kirby/src/Toolkit/Facade.php @@ -5,6 +5,12 @@ namespace Kirby\Toolkit; /** * Laravel-style static facades * for class instances + * + * @package Kirby Toolkit + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ abstract class Facade { diff --git a/kirby/src/Toolkit/File.php b/kirby/src/Toolkit/File.php index 9436490..edd16f2 100755 --- a/kirby/src/Toolkit/File.php +++ b/kirby/src/Toolkit/File.php @@ -10,9 +10,9 @@ use Exception; * * @package Kirby Toolkit * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier - * @license http://getkirby.com/license + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class File { @@ -35,7 +35,7 @@ class File } /** - * Improved var_dump() output + * Improved `var_dump` output * * @return array */ @@ -61,7 +61,7 @@ class File * @param boolean $force * @return self */ - public function copy(string $target, bool $force = false): self + public function copy(string $target, bool $force = false) { if (F::copy($this->root, $target, $force) !== true) { throw new Exception('The file "' . $this->root . '" could not be copied'); @@ -194,7 +194,7 @@ class File * @param bool $overwrite Force overwriting any existing files * @return self */ - public function move(string $newRoot, bool $overwrite = false): self + public function move(string $newRoot, bool $overwrite = false) { if (F::move($this->root, $newRoot, $overwrite) !== true) { throw new Exception('The file: "' . $this->root . '" could not be moved to: "' . $newRoot . '"'); @@ -253,7 +253,7 @@ class File * @param bool $overwrite Force overwrite existing files * @return self */ - public function rename(string $newName, bool $overwrite = false): self + public function rename(string $newName, bool $overwrite = false) { $newRoot = F::rename($this->root, $newName, $overwrite); diff --git a/kirby/src/Toolkit/Html.php b/kirby/src/Toolkit/Html.php index 83820ec..c607876 100755 --- a/kirby/src/Toolkit/Html.php +++ b/kirby/src/Toolkit/Html.php @@ -10,9 +10,9 @@ use Kirby\Http\Url; * * @package Kirby Toolkit * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier - * @license http://www.opensource.org/licenses/mit-license.php MIT License + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Html { @@ -52,7 +52,7 @@ class Html } /** - * Generates an a tag + * Generates an `a` tag * * @param string $href The url for the `a` tag * @param mixed $text The optional text. If `null`, the url will be used as text @@ -61,20 +61,15 @@ class Html */ public static function a(string $href = null, $text = null, array $attr = []): string { - $attr = array_merge(['href' => $href], $attr); - - if (empty($text) === true) { - $text = $attr['href']; + if (Str::startsWith($href, 'mailto:')) { + return static::email($href, $text, $attr); } - if (is_string($text) === true && Str::isUrl($text) === true) { - $text = Url::short($text); + if (Str::startsWith($href, 'tel:')) { + return static::tel($href, $text, $attr); } - // add rel=noopener to target blank links to improve security - $attr['rel'] = static::rel($attr['rel'] ?? null, $attr['target'] ?? null); - - return static::tag('a', $text, $attr); + return static::link($href, $text, $attr); } /** @@ -167,7 +162,7 @@ class Html * @param array $attr Additional attributes for the tag * @return string the generated html */ - public static function email(string $email, string $text = null, array $attr = []): string + public static function email(string $email, $text = null, array $attr = []): string { if (empty($email) === true) { return ''; @@ -327,6 +322,32 @@ class Html return in_array(strtolower($tag), $void); } + /** + * Generates an `a` link tag + * + * @param string $href The url for the `a` tag + * @param mixed $text The optional text. If `null`, the url will be used as text + * @param array $attr Additional attributes for the tag + * @return string the generated html + */ + public static function link(string $href = null, $text = null, array $attr = []): string + { + $attr = array_merge(['href' => $href], $attr); + + if (empty($text) === true) { + $text = $attr['href']; + } + + if (is_string($text) === true && Str::isUrl($text) === true) { + $text = Url::short($text); + } + + // add rel=noopener to target blank links to improve security + $attr['rel'] = static::rel($attr['rel'] ?? null, $attr['target'] ?? null); + + return static::tag('a', $text, $attr); + } + /** * Add noopeener noreferrer to rels when target is `_blank` * @@ -398,7 +419,7 @@ class Html $text = $tel; } - return static::a('tel:' . $number, $text, $attr); + return static::link('tel:' . $number, $text, $attr); } /** diff --git a/kirby/src/Toolkit/I18n.php b/kirby/src/Toolkit/I18n.php index ad2ce4d..caf9d8f 100755 --- a/kirby/src/Toolkit/I18n.php +++ b/kirby/src/Toolkit/I18n.php @@ -7,6 +7,12 @@ use Exception; /** * Localization class, roughly inspired by VueI18n + * + * @package Kirby Toolkit + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class I18n { diff --git a/kirby/src/Toolkit/Iterator.php b/kirby/src/Toolkit/Iterator.php index c36bc3b..d39e469 100755 --- a/kirby/src/Toolkit/Iterator.php +++ b/kirby/src/Toolkit/Iterator.php @@ -6,6 +6,12 @@ namespace Kirby\Toolkit; * Extended version of PHP's iterator * class that builds the foundation of our * Collection class. + * + * @package Kirby Toolkit + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Iterator implements \Iterator { diff --git a/kirby/src/Toolkit/Mime.php b/kirby/src/Toolkit/Mime.php index a66e144..1966b10 100755 --- a/kirby/src/Toolkit/Mime.php +++ b/kirby/src/Toolkit/Mime.php @@ -12,8 +12,9 @@ use SimpleXMLElement; * * @package Kirby Toolkit * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Mime { @@ -254,6 +255,31 @@ class Mime return false; } + /** + * Returns all available extensions for a given mime type + * + * @param string|null $mime + * @return array + */ + public static function toExtensions(string $mime = null): array + { + $extensions = []; + + foreach (static::$types as $key => $value) { + if (is_array($value) === true && in_array($mime, $value) === true) { + $extensions[] = $key; + continue; + } + + if ($value === $mime) { + $extensions[] = $key; + continue; + } + } + + return $extensions; + } + /** * Returns the mime type of a file * diff --git a/kirby/src/Toolkit/Obj.php b/kirby/src/Toolkit/Obj.php index 8142279..b60fa7b 100755 --- a/kirby/src/Toolkit/Obj.php +++ b/kirby/src/Toolkit/Obj.php @@ -7,6 +7,12 @@ use stdClass; /** * Super simple stdClass extension with * magic getter methods for all properties + * + * @package Kirby Toolkit + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Obj extends stdClass { @@ -36,7 +42,7 @@ class Obj extends stdClass } /** - * Improved var_dump() output + * Improved `var_dump` output * * @return array */ diff --git a/kirby/src/Toolkit/Pagination.php b/kirby/src/Toolkit/Pagination.php index 6d7ecb2..0f524db 100755 --- a/kirby/src/Toolkit/Pagination.php +++ b/kirby/src/Toolkit/Pagination.php @@ -6,6 +6,12 @@ use Exception; /** * Basic pagination handling + * + * @package Kirby Toolkit + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Pagination { @@ -48,7 +54,7 @@ class Pagination * Creates a pagination instance for the given * collection with a flexible argument api * - * @param Collection $collection + * @param Kirby\CmToolkits\Collection $collection * @param ...mixed $arguments * @return self */ diff --git a/kirby/src/Toolkit/Properties.php b/kirby/src/Toolkit/Properties.php index 7acf5d3..52c356b 100755 --- a/kirby/src/Toolkit/Properties.php +++ b/kirby/src/Toolkit/Properties.php @@ -3,9 +3,17 @@ namespace Kirby\Toolkit; use Exception; -use ReflectionClass; use ReflectionMethod; +/** + * Properties + * + * @package Kirby Toolkit + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT + */ trait Properties { protected $propertyData = []; diff --git a/kirby/src/Toolkit/Query.php b/kirby/src/Toolkit/Query.php index 7b8b8e4..4371472 100755 --- a/kirby/src/Toolkit/Query.php +++ b/kirby/src/Toolkit/Query.php @@ -9,11 +9,22 @@ namespace Kirby\Toolkit; * * @package Kirby Toolkit * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Query { + const PARTS = '!([a-zA-Z_]*(\(.*?\))?)\.|' . self::SKIP . '!'; + const METHOD = '!\((.*)\)!'; + const PARAMETERS = '!,|' . self::SKIP . '!'; + + const NO_PNTH = '\([^\(]+\)(*SKIP)(*FAIL)'; + const NO_SQBR = '\[[^]]+\](*SKIP)(*FAIL)'; + const NO_DLQU = '\"[^"]+\"(*SKIP)(*FAIL)'; + const NO_SLQU = '\'[^\']+\'(*SKIP)(*FAIL)'; + const SKIP = self::NO_PNTH . '|' . self::NO_SQBR . '|' . + self::NO_DLQU . '|' . self::NO_SLQU; /** * The query string @@ -33,7 +44,7 @@ class Query * Creates a new Query object * * @param string $query - * @param array $data + * @param array|object $data */ public function __construct(string $query = null, $data = []) { @@ -53,13 +64,25 @@ class Query return $this->data; } - $parts = $this->parts($this->query); + return $this->resolve($this->query); + } + + /** + * Resolves the query if anything + * can be found. Otherwise returns null. + * + * @param string $query + * @return mixed + */ + protected function resolve(string $query) + { + $parts = $this->parts($query); $data = $this->data; $value = null; while (count($parts)) { $part = array_shift($parts); - $info = $this->info($part); + $info = $this->part($part); $method = $info['method']; $value = null; @@ -86,64 +109,90 @@ class Query /** * Breaks the query string down into its components * - * @param string $token + * @param string $query * @return array */ - protected function parts(string $token): array + protected function parts(string $query): array { - $token = trim($token); - $token = preg_replace_callback('!\((.*?)\)!', function ($match) { - return '(' . str_replace('.', '@@@', $match[1]) . ')'; - }, $token); + $query = trim($query); - $parts = explode('.', $token); + // match all parts but the last + preg_match_all(self::PARTS, $query, $match); - return $parts; + // remove all matched parts from the query to retrieve last part + foreach ($match[0] as $part) { + $query = Str::after($query, $part); + } + + array_push($match[1], $query); + return $match[1]; } /** * Analyzes each part of the query string and * extracts methods and method arguments. * - * @param string $token + * @param string $part * @return array */ - protected function info(string $token): array + protected function part(string $part): array { $args = []; - $method = preg_replace_callback('!\((.*?)\)!', function ($match) use (&$args) { - $args = array_map(function ($arg) { - $arg = trim($arg); - $arg = str_replace('@@@', '.', $arg); - - if (substr($arg, 0, 1) === '"') { - return trim($arg, '"'); - } - - if (substr($arg, 0, 1) === '\'') { - return trim($arg, '\''); - } - - switch ($arg) { - case 'null': - return null; - case 'false': - return false; - case 'true': - return true; - } - - if (is_numeric($arg) === true) { - return (float)$arg; - } - - return $arg; - }, str_getcsv($match[1], ',')); - }, $token); + $method = preg_replace_callback(self::METHOD, function ($match) use (&$args) { + $args = preg_split(self::PARAMETERS, $match[1]); + $args = array_map('self::parameter', $args); + }, $part); return [ 'method' => $method, 'args' => $args ]; } + + /** + * Converts a parameter of query to + * proper type. + * + * @param mixed $arg + * @return mixed + */ + protected function parameter($arg) + { + $arg = trim($arg); + + // string with double quotes + if (substr($arg, 0, 1) === '"') { + return trim($arg, '"'); + } + + // string with single quotes + if (substr($arg, 0, 1) === '\'') { + return trim($arg, '\''); + } + + // boolean or null + switch ($arg) { + case 'null': + return null; + case 'false': + return false; + case 'true': + return true; + } + + // numeric + if (is_numeric($arg) === true) { + return (float)$arg; + } + + // array: split and recursive sanitizing + if (substr($arg, 0, 1) === '[' && substr($arg, -1) === ']') { + $arg = substr($arg, 1, -1); + $arg = preg_split(self::PARAMETERS, $arg); + return array_map('self::parameter', $arg); + } + + // resolve parameter for objects and methods itself + return $this->resolve($arg); + } } diff --git a/kirby/src/Toolkit/Silo.php b/kirby/src/Toolkit/Silo.php index f058d62..760beeb 100755 --- a/kirby/src/Toolkit/Silo.php +++ b/kirby/src/Toolkit/Silo.php @@ -9,9 +9,9 @@ namespace Kirby\Toolkit; * * @package Kirby Toolkit * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier - * @license http://www.opensource.org/licenses/mit-license.php MIT License + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Silo { diff --git a/kirby/src/Toolkit/Str.php b/kirby/src/Toolkit/Str.php index 9efef66..1aaa526 100755 --- a/kirby/src/Toolkit/Str.php +++ b/kirby/src/Toolkit/Str.php @@ -11,19 +11,36 @@ use Exception; * * @package Kirby Toolkit * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier - * @license MIT + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Str { + /** + * Language translation table + * + * @var array + */ + public static $language = []; + /** * Ascii translation table * * @var array */ - protected static $ascii = [ + public static $ascii = [ + '/°|₀/' => '0', + '/¹|₁/' => '1', + '/²|₂/' => '2', + '/³|₃/' => '3', + '/⁴|₄/' => '4', + '/⁵|₅/' => '5', + '/⁶|₆/' => '6', + '/⁷|₇/' => '7', + '/⁸|₈/' => '8', + '/⁹|₉/' => '9', '/À|Á|Â|Ã|Å|Ǻ|Ā|Ă|Ą|Ǎ|Ä|A/' => 'A', '/à|á|â|ã|å|ǻ|ā|ă|ą|ǎ|ª|æ|ǽ|ä|a/' => 'a', '/Б/' => 'B', @@ -75,7 +92,7 @@ class Str '/Ź|Ż|Ž|З/' => 'Z', '/ź|ż|ž|з/' => 'z', '/Æ|Ǽ/' => 'AE', - '/ß/'=> 'ss', + '/ß/' => 'ss', '/IJ/' => 'IJ', '/ij/' => 'ij', '/Œ/' => 'OE', @@ -177,8 +194,18 @@ class Str */ public static function ascii(string $string): string { - $foreign = static::$ascii; - $string = preg_replace(array_keys($foreign), array_values($foreign), $string); + $string = str_replace( + array_keys(static::$language), + array_values(static::$language), + $string + ); + + $string = preg_replace( + array_keys(static::$ascii), + array_values(static::$ascii), + $string + ); + return preg_replace('/[^\x09\x0A\x0D\x20-\x7E]/', '', $string); } @@ -477,7 +504,7 @@ class Str * @param bool $caseInsensitive * @return int|bool */ - public static function position(string $string, string $needle, bool $caseInsensitive = false) + public static function position(string $string = null, string $needle, bool $caseInsensitive = false) { if ($caseInsensitive === true) { $string = static::lower($string); @@ -821,7 +848,7 @@ class Str * @param bool $caseInsensitive * @return bool */ - public static function startsWith(string $string, string $needle, bool $caseInsensitive = false): bool + public static function startsWith(string $string = null, string $needle, bool $caseInsensitive = false): bool { if ($needle === '') { return true; diff --git a/kirby/src/Toolkit/Tpl.php b/kirby/src/Toolkit/Tpl.php index 9e3ebda..6dd62e1 100755 --- a/kirby/src/Toolkit/Tpl.php +++ b/kirby/src/Toolkit/Tpl.php @@ -2,7 +2,6 @@ namespace Kirby\Toolkit; -use Exception; use Throwable; /** @@ -10,9 +9,9 @@ use Throwable; * * @package Kirby Toolkit * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier - * @license MIT + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class Tpl { diff --git a/kirby/src/Toolkit/V.php b/kirby/src/Toolkit/V.php index ffd1b8d..e052a7a 100755 --- a/kirby/src/Toolkit/V.php +++ b/kirby/src/Toolkit/V.php @@ -3,19 +3,19 @@ namespace Kirby\Toolkit; use Exception; -use Kirby\Image\Image; use Kirby\Toolkit\Str; use ReflectionFunction; +use Throwable; /** -* A set of validator methods -* -* @package Kirby Toolkit -* @author Bastian Allgeier -* @link http://getkirby.com -* @copyright Bastian Allgeier -* @license MIT -*/ + * A set of validator methods + * + * @package Kirby Toolkit + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT + */ class V { @@ -66,17 +66,20 @@ class V $reflection = new ReflectionFunction($validator); $arguments = []; - foreach ($reflection->getParameters() as $index => $parameter) { $value = $params[$index] ?? null; if (is_array($value) === true) { - foreach ($value as $index => $item) { - if (is_array($item) === true) { - $value[$index] = implode('|', $item); + try { + foreach ($value as $index => $item) { + if (is_array($item) === true) { + $value[$index] = implode('|', $item); + } } + $value = implode(', ', $value); + } catch (Throwable $e) { + $value = '-'; } - $value = implode(', ', $value); } $arguments[$parameter->getName()] = $value; diff --git a/kirby/src/Toolkit/View.php b/kirby/src/Toolkit/View.php index 732d7ef..8deb488 100755 --- a/kirby/src/Toolkit/View.php +++ b/kirby/src/Toolkit/View.php @@ -10,9 +10,9 @@ use Throwable; * * @package Kirby Toolkit * @author Bastian Allgeier - * @link http://getkirby.com - * @copyright Bastian Allgeier - * @license MIT + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT */ class View { diff --git a/kirby/src/Toolkit/Xml.php b/kirby/src/Toolkit/Xml.php index 2259cf6..1e4498f 100755 --- a/kirby/src/Toolkit/Xml.php +++ b/kirby/src/Toolkit/Xml.php @@ -3,14 +3,14 @@ namespace Kirby\Toolkit; /** -* XML parser and creator Class -* -* @package Kirby Toolkit -* @author Bastian Allgeier -* @link http://getkirby.com -* @copyright Bastian Allgeier -* @license http://www.opensource.org/licenses/mit-license.php MIT License -*/ + * XML parser and creator Class + * + * @package Kirby Toolkit + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT + */ class Xml { diff --git a/kirby/vendor/composer/autoload_files.php b/kirby/vendor/composer/autoload_files.php index 1a3ecf4..ed91379 100755 --- a/kirby/vendor/composer/autoload_files.php +++ b/kirby/vendor/composer/autoload_files.php @@ -8,7 +8,5 @@ $baseDir = dirname($vendorDir); return array( '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', '04c6c5c2f7095ccf6c481d3e53e1776f' => $vendorDir . '/mustangostang/spyc/Spyc.php', - '87988fc7b1c1f093da22a1a3de972f3a' => $baseDir . '/config/helpers.php', - '428e0a6316e676194f2283f47fbd1fc4' => $baseDir . '/config/aliases.php', - 'd80b806b2b0bfc4457e5f164edcb5232' => $baseDir . '/config/tests.php', + 'f864ae44e8154e5ff6f4eec32f46d37f' => $baseDir . '/config/setup.php', ); diff --git a/kirby/vendor/composer/autoload_static.php b/kirby/vendor/composer/autoload_static.php index bed5ef6..70e3b83 100755 --- a/kirby/vendor/composer/autoload_static.php +++ b/kirby/vendor/composer/autoload_static.php @@ -9,9 +9,7 @@ class ComposerStaticInit12091bebabd81c9aba88b2aeec22c8d7 public static $files = array ( '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', '04c6c5c2f7095ccf6c481d3e53e1776f' => __DIR__ . '/..' . '/mustangostang/spyc/Spyc.php', - '87988fc7b1c1f093da22a1a3de972f3a' => __DIR__ . '/../..' . '/config/helpers.php', - '428e0a6316e676194f2283f47fbd1fc4' => __DIR__ . '/../..' . '/config/aliases.php', - 'd80b806b2b0bfc4457e5f164edcb5232' => __DIR__ . '/../..' . '/config/tests.php', + 'f864ae44e8154e5ff6f4eec32f46d37f' => __DIR__ . '/../..' . '/config/setup.php', ); public static $prefixLengthsPsr4 = array ( diff --git a/kirby/vendor/getkirby/composer-installer/src/ComposerInstaller/CmsInstaller.php b/kirby/vendor/getkirby/composer-installer/src/ComposerInstaller/CmsInstaller.php index 71818eb..8a88ce4 100755 --- a/kirby/vendor/getkirby/composer-installer/src/ComposerInstaller/CmsInstaller.php +++ b/kirby/vendor/getkirby/composer-installer/src/ComposerInstaller/CmsInstaller.php @@ -11,7 +11,7 @@ use Composer\Package\PackageInterface; * @author Lukas Bestle * @link https://getkirby.com * @copyright Bastian Allgeier - * @license MIT + * @license https://opensource.org/licenses/MIT */ class CmsInstaller extends Installer { diff --git a/kirby/vendor/getkirby/composer-installer/src/ComposerInstaller/Installer.php b/kirby/vendor/getkirby/composer-installer/src/ComposerInstaller/Installer.php index 5d698ac..48935fc 100755 --- a/kirby/vendor/getkirby/composer-installer/src/ComposerInstaller/Installer.php +++ b/kirby/vendor/getkirby/composer-installer/src/ComposerInstaller/Installer.php @@ -12,7 +12,7 @@ use Composer\Repository\InstalledRepositoryInterface; * @author Lukas Bestle * @link https://getkirby.com * @copyright Bastian Allgeier - * @license MIT + * @license https://opensource.org/licenses/MIT */ class Installer extends LibraryInstaller { diff --git a/kirby/vendor/getkirby/composer-installer/src/ComposerInstaller/Plugin.php b/kirby/vendor/getkirby/composer-installer/src/ComposerInstaller/Plugin.php index 79029f2..4ead6d5 100755 --- a/kirby/vendor/getkirby/composer-installer/src/ComposerInstaller/Plugin.php +++ b/kirby/vendor/getkirby/composer-installer/src/ComposerInstaller/Plugin.php @@ -11,7 +11,7 @@ use Composer\Plugin\PluginInterface; * @author Lukas Bestle * @link https://getkirby.com * @copyright Bastian Allgeier - * @license MIT + * @license https://opensource.org/licenses/MIT */ class Plugin implements PluginInterface { diff --git a/kirby/vendor/getkirby/composer-installer/src/ComposerInstaller/PluginInstaller.php b/kirby/vendor/getkirby/composer-installer/src/ComposerInstaller/PluginInstaller.php index 7aedd89..1e56e13 100755 --- a/kirby/vendor/getkirby/composer-installer/src/ComposerInstaller/PluginInstaller.php +++ b/kirby/vendor/getkirby/composer-installer/src/ComposerInstaller/PluginInstaller.php @@ -9,7 +9,7 @@ use Composer\Package\PackageInterface; * @author Lukas Bestle * @link https://getkirby.com * @copyright Bastian Allgeier - * @license MIT + * @license https://opensource.org/licenses/MIT */ class PluginInstaller extends Installer {